@xylex-group/athena 3.3.0 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -1
- package/dist/{athena-request-headers-Lr_m8xCV.d.cts → athena-request-headers-BnFN2mbd.d.cts} +1 -1
- package/dist/{athena-request-headers-DzimbvOA.d.ts → athena-request-headers-Dwdkq2WR.d.ts} +1 -1
- package/dist/billing.cjs +1 -1
- package/dist/billing.cjs.map +1 -1
- package/dist/billing.js +1 -1
- package/dist/billing.js.map +1 -1
- package/dist/browser.cjs +3064 -163
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +10 -10
- package/dist/browser.d.ts +10 -10
- package/dist/browser.js +3064 -163
- package/dist/browser.js.map +1 -1
- package/dist/cli/index.cjs +2990 -83
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +4 -4
- package/dist/cli/index.d.ts +4 -4
- package/dist/cli/index.js +2990 -83
- package/dist/cli/index.js.map +1 -1
- package/dist/cloudflare.cjs +12914 -0
- package/dist/cloudflare.cjs.map +1 -0
- package/dist/cloudflare.d.cts +368 -0
- package/dist/cloudflare.d.ts +368 -0
- package/dist/cloudflare.js +12885 -0
- package/dist/cloudflare.js.map +1 -0
- package/dist/cookies.cjs +4 -3
- package/dist/cookies.cjs.map +1 -1
- package/dist/cookies.js +4 -3
- package/dist/cookies.js.map +1 -1
- package/dist/env.cjs +1 -1
- package/dist/env.cjs.map +1 -1
- package/dist/env.js +1 -1
- package/dist/env.js.map +1 -1
- package/dist/index.cjs +2989 -86
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +2989 -87
- package/dist/index.js.map +1 -1
- package/dist/{model-form-3Gr8rkdT.d.cts → model-form-D0ykVVOs.d.cts} +3 -3
- package/dist/{model-form-CotpEL7z.d.ts → model-form-U8NVtfSA.d.ts} +3 -3
- package/dist/{module-CQmOaDzP.d.cts → module-CMWlJ1z3.d.cts} +4 -4
- package/dist/{module-CWkUTcUc.d.ts → module-CZ-wPcf2.d.ts} +4 -4
- package/dist/next/client.cjs +3025 -125
- package/dist/next/client.cjs.map +1 -1
- package/dist/next/client.d.cts +4 -4
- package/dist/next/client.d.ts +4 -4
- package/dist/next/client.js +3025 -125
- package/dist/next/client.js.map +1 -1
- package/dist/next/server.cjs +3108 -194
- package/dist/next/server.cjs.map +1 -1
- package/dist/next/server.d.cts +22 -9
- package/dist/next/server.d.ts +22 -9
- package/dist/next/server.js +3108 -194
- package/dist/next/server.js.map +1 -1
- package/dist/{pipeline-BnRKO_Pd.d.cts → pipeline-BCpb4BX1.d.cts} +1 -1
- package/dist/{pipeline-sWCmlFqu.d.ts → pipeline-CgmXwMeX.d.ts} +1 -1
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +6 -6
- package/dist/react.d.ts +6 -6
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/dist/{schema-handlers-VjFDhIMw.d.ts → schema-handlers-CvWqF-dW.d.ts} +1 -1
- package/dist/{schema-handlers-BtT_IQFi.d.cts → schema-handlers-Dr8h9Jg-.d.cts} +1 -1
- package/dist/social-providers.cjs +1 -1
- package/dist/social-providers.cjs.map +1 -1
- package/dist/social-providers.js +1 -1
- package/dist/social-providers.js.map +1 -1
- package/dist/{types-Bltx6iL6.d.cts → types-B2RZPivM.d.cts} +8 -1
- package/dist/{types-Bltx6iL6.d.ts → types-B2RZPivM.d.ts} +8 -1
- package/dist/{types-BDX8zS7w.d.ts → types-BKklrX4J.d.ts} +2 -2
- package/dist/{types-CgCv5o6R.d.cts → types-D5dj1v5Z.d.cts} +1 -1
- package/dist/{types-D-Am7YSd.d.cts → types-DqBFwfhn.d.cts} +2 -2
- package/dist/{types-B75PdABb.d.ts → types-S-bTMPiM.d.ts} +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +2 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js.map +1 -1
- package/dist/{v3-client-G1SLeHRa.d.cts → v3-client-DP-qg82X.d.cts} +300 -4
- package/dist/{v3-client-ao8BWQ8v.d.ts → v3-client-OAai_JNs.d.ts} +300 -4
- package/package.json +10 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { F as AthenaAuthClientConfig, D as AthenaAuthBindings } from './types-BVKpQmfY.js';
|
|
2
|
-
import { e as AthenaGatewayErrorDetails, a as AthenaGatewayCallOptions, b as AthenaGatewayConnectionOptions, c as AthenaGatewayConnectionResult,
|
|
3
|
-
import { A as AthenaModelTarget, n as RowOf, a as InsertOf, U as UpdateOf, u as AthenaClientTableName, t as AthenaClientModelForTableName, R as RegistryDef, D as DatabaseDef, o as SchemaDef, s as AnyModelDef, j as ModelDef, m as ModelRelationMetadata, r as AthenaClientModelsInput } from './types-
|
|
2
|
+
import { e as AthenaGatewayErrorDetails, a as AthenaGatewayCallOptions, b as AthenaGatewayConnectionOptions, c as AthenaGatewayConnectionResult, u as AthenaFetchPayload, s as AthenaGatewayResponse, w as AthenaInsertPayload, x as AthenaUpdatePayload, v as AthenaDeletePayload, n as AthenaRpcPayload, j as AthenaRpcCallOptions, C as AthenaQueryPayload, i as AthenaJsonValue, g as AthenaJsonObject, q as AthenaGatewayEndpointPath, r as AthenaGatewayMethod, D as AthenaGatewayBaseOptions, E as AthenaConditionValue, F as AthenaConditionArrayValue, G as AthenaGatewayCondition, H as AthenaSortBy, k as AthenaRpcFilter, A as AthenaConditionCastType, I as AthenaConditionOperator, o as BackendConfig, p as BackendType } from './types-B2RZPivM.js';
|
|
3
|
+
import { A as AthenaModelTarget, n as RowOf, a as InsertOf, U as UpdateOf, u as AthenaClientTableName, t as AthenaClientModelForTableName, R as RegistryDef, D as DatabaseDef, o as SchemaDef, s as AnyModelDef, j as ModelDef, m as ModelRelationMetadata, r as AthenaClientModelsInput } from './types-S-bTMPiM.js';
|
|
4
4
|
import { a as AthenaBillingClientConfig, c as AthenaBillingModule } from './module-C_ab-MM1.js';
|
|
5
5
|
|
|
6
6
|
type AthenaErrorKind = 'unique_violation' | 'not_found' | 'validation' | 'auth' | 'rate_limit' | 'transient' | 'unknown';
|
|
@@ -2814,6 +2814,226 @@ interface TableQueryBuilder<Row, Insert = Partial<Row>, Update = Partial<Insert>
|
|
|
2814
2814
|
reset(): TableQueryBuilder<Row, Insert, Update, TContext>;
|
|
2815
2815
|
}
|
|
2816
2816
|
|
|
2817
|
+
/**
|
|
2818
|
+
* Structural Cloudflare binding types used by the edge-local adapter.
|
|
2819
|
+
* Avoids a hard dependency on `@cloudflare/workers-types`.
|
|
2820
|
+
*/
|
|
2821
|
+
type D1PreparedStatementLike = {
|
|
2822
|
+
bind(...values: unknown[]): D1PreparedStatementLike;
|
|
2823
|
+
run<T = Record<string, unknown>>(): Promise<D1ResultLike<T>>;
|
|
2824
|
+
all<T = Record<string, unknown>>(): Promise<D1ResultLike<T>>;
|
|
2825
|
+
first<T = Record<string, unknown>>(colName?: string): Promise<T | null>;
|
|
2826
|
+
};
|
|
2827
|
+
type D1ResultLike<T = Record<string, unknown>> = {
|
|
2828
|
+
results?: T[];
|
|
2829
|
+
success?: boolean;
|
|
2830
|
+
meta?: {
|
|
2831
|
+
duration?: number;
|
|
2832
|
+
changes?: number;
|
|
2833
|
+
last_row_id?: number;
|
|
2834
|
+
rows_read?: number;
|
|
2835
|
+
rows_written?: number;
|
|
2836
|
+
[key: string]: unknown;
|
|
2837
|
+
};
|
|
2838
|
+
error?: string;
|
|
2839
|
+
};
|
|
2840
|
+
type D1ExecResultLike = {
|
|
2841
|
+
count: number;
|
|
2842
|
+
duration: number;
|
|
2843
|
+
};
|
|
2844
|
+
type D1SessionLike = {
|
|
2845
|
+
prepare(query: string): D1PreparedStatementLike;
|
|
2846
|
+
batch<T = unknown>(statements: D1PreparedStatementLike[]): Promise<D1ResultLike<T>[]>;
|
|
2847
|
+
/** Sessions may not expose exec (Wrangler D1DatabaseSession). */
|
|
2848
|
+
exec?(query: string): Promise<D1ExecResultLike>;
|
|
2849
|
+
getBookmark(): string | null;
|
|
2850
|
+
};
|
|
2851
|
+
type D1DatabaseLike = {
|
|
2852
|
+
prepare(query: string): D1PreparedStatementLike;
|
|
2853
|
+
batch<T = unknown>(statements: D1PreparedStatementLike[]): Promise<D1ResultLike<T>[]>;
|
|
2854
|
+
exec(query: string): Promise<D1ExecResultLike>;
|
|
2855
|
+
withSession?(constraintOrBookmark: string): D1SessionLike;
|
|
2856
|
+
};
|
|
2857
|
+
type R2ObjectBodyLike = {
|
|
2858
|
+
key: string;
|
|
2859
|
+
size: number;
|
|
2860
|
+
etag?: string;
|
|
2861
|
+
httpEtag?: string;
|
|
2862
|
+
uploaded?: Date;
|
|
2863
|
+
httpMetadata?: {
|
|
2864
|
+
contentType?: string;
|
|
2865
|
+
[key: string]: unknown;
|
|
2866
|
+
};
|
|
2867
|
+
customMetadata?: Record<string, string>;
|
|
2868
|
+
text(): Promise<string>;
|
|
2869
|
+
json<T = unknown>(): Promise<T>;
|
|
2870
|
+
arrayBuffer(): Promise<ArrayBuffer>;
|
|
2871
|
+
blob(): Promise<Blob>;
|
|
2872
|
+
};
|
|
2873
|
+
type R2ObjectsListLike = {
|
|
2874
|
+
objects: Array<{
|
|
2875
|
+
key: string;
|
|
2876
|
+
size: number;
|
|
2877
|
+
etag?: string;
|
|
2878
|
+
uploaded?: Date;
|
|
2879
|
+
}>;
|
|
2880
|
+
truncated: boolean;
|
|
2881
|
+
cursor?: string;
|
|
2882
|
+
delimitedPrefixes?: string[];
|
|
2883
|
+
};
|
|
2884
|
+
type R2BucketLike = {
|
|
2885
|
+
put(key: string, value: ReadableStream | ArrayBuffer | ArrayBufferView | string | Blob | null, options?: {
|
|
2886
|
+
httpMetadata?: {
|
|
2887
|
+
contentType?: string;
|
|
2888
|
+
[key: string]: unknown;
|
|
2889
|
+
};
|
|
2890
|
+
customMetadata?: Record<string, string>;
|
|
2891
|
+
}): Promise<unknown>;
|
|
2892
|
+
get(key: string): Promise<R2ObjectBodyLike | null>;
|
|
2893
|
+
delete(keys: string | string[]): Promise<void>;
|
|
2894
|
+
list(options?: {
|
|
2895
|
+
prefix?: string;
|
|
2896
|
+
limit?: number;
|
|
2897
|
+
cursor?: string;
|
|
2898
|
+
delimiter?: string;
|
|
2899
|
+
}): Promise<R2ObjectsListLike>;
|
|
2900
|
+
};
|
|
2901
|
+
type AthenaClientCapabilitiesMode = 'gateway' | 'cloudflare-edge';
|
|
2902
|
+
interface AthenaDbLayerCapabilities {
|
|
2903
|
+
query: boolean;
|
|
2904
|
+
flatCrud: boolean;
|
|
2905
|
+
findManyAst: boolean;
|
|
2906
|
+
rpc: boolean;
|
|
2907
|
+
relations: boolean;
|
|
2908
|
+
}
|
|
2909
|
+
interface AthenaDbCapabilities {
|
|
2910
|
+
engine: 'postgresql' | 'cloudflare-d1' | 'unknown';
|
|
2911
|
+
local: boolean;
|
|
2912
|
+
layers: AthenaDbLayerCapabilities;
|
|
2913
|
+
}
|
|
2914
|
+
interface AthenaStorageCapabilities {
|
|
2915
|
+
local: boolean;
|
|
2916
|
+
objects: boolean;
|
|
2917
|
+
catalogs: boolean;
|
|
2918
|
+
backups: boolean;
|
|
2919
|
+
}
|
|
2920
|
+
interface AthenaAuthCapabilities {
|
|
2921
|
+
remote: boolean;
|
|
2922
|
+
}
|
|
2923
|
+
interface AthenaClientCapabilities {
|
|
2924
|
+
mode: AthenaClientCapabilitiesMode;
|
|
2925
|
+
db: AthenaDbCapabilities;
|
|
2926
|
+
storage: AthenaStorageCapabilities;
|
|
2927
|
+
auth: AthenaAuthCapabilities;
|
|
2928
|
+
}
|
|
2929
|
+
|
|
2930
|
+
/**
|
|
2931
|
+
* Pure edge vs gateway execution resolution (no client construction).
|
|
2932
|
+
* Used by {@link createClient} and re-exported from the cloudflare façade.
|
|
2933
|
+
*/
|
|
2934
|
+
|
|
2935
|
+
/** How DB/storage execution is routed. */
|
|
2936
|
+
type AthenaExecutionMode = 'gateway' | 'edge' | 'auto';
|
|
2937
|
+
/** Resolved mode after applying config + env (never `auto`). */
|
|
2938
|
+
type AthenaResolvedExecutionMode = 'gateway' | 'edge';
|
|
2939
|
+
/** Env key used when `mode` is omitted or `'auto'`. */
|
|
2940
|
+
declare const ATHENA_EXECUTION_MODE_ENV_KEY = "ATHENA_EXECUTION_MODE";
|
|
2941
|
+
/**
|
|
2942
|
+
* When both D1 and a gateway URL are available in `auto` mode, which backend wins.
|
|
2943
|
+
* Default: `edge` (prefer local bindings when present).
|
|
2944
|
+
*/
|
|
2945
|
+
type AthenaExecutionPrefer = 'edge' | 'gateway';
|
|
2946
|
+
declare const ATHENA_EXECUTION_PREFER_ENV_KEY = "ATHENA_EXECUTION_PREFER";
|
|
2947
|
+
interface ResolveAthenaExecutionModeInput {
|
|
2948
|
+
/** Explicit mode. Default: `'auto'` (or env `ATHENA_EXECUTION_MODE`). */
|
|
2949
|
+
mode?: AthenaExecutionMode | string | null;
|
|
2950
|
+
/** D1 binding when present enables edge in auto mode. */
|
|
2951
|
+
d1?: D1DatabaseLike | null;
|
|
2952
|
+
/** Gateway base URL (or unified root) for server mode. */
|
|
2953
|
+
url?: string | null;
|
|
2954
|
+
/** Optional env map; also used when reading `ATHENA_EXECUTION_MODE`. */
|
|
2955
|
+
env?: Record<string, string | undefined>;
|
|
2956
|
+
/**
|
|
2957
|
+
* When `mode` is `auto` and **both** D1 and a gateway URL exist, pick a winner.
|
|
2958
|
+
* Default `edge`. Override with `prefer: 'gateway'` or env `ATHENA_EXECUTION_PREFER`.
|
|
2959
|
+
*/
|
|
2960
|
+
prefer?: AthenaExecutionPrefer | string | null;
|
|
2961
|
+
}
|
|
2962
|
+
/**
|
|
2963
|
+
* Resolve whether to use gateway HTTP or edge D1/R2 bindings.
|
|
2964
|
+
*
|
|
2965
|
+
* Auto rules (after env override):
|
|
2966
|
+
* 1. Only D1 → `edge`
|
|
2967
|
+
* 2. Only gateway URL → `gateway`
|
|
2968
|
+
* 3. Both → `prefer` (default `edge`, or env `ATHENA_EXECUTION_PREFER`)
|
|
2969
|
+
* 4. Neither → throw {@link AthenaConfigurationError}
|
|
2970
|
+
*/
|
|
2971
|
+
declare function resolveAthenaExecutionMode(input?: ResolveAthenaExecutionModeInput): AthenaResolvedExecutionMode;
|
|
2972
|
+
|
|
2973
|
+
/**
|
|
2974
|
+
* L3a local R2 object I/O subset for edge-local mode.
|
|
2975
|
+
* Does not implement catalogs, backups, multipart, or signed URLs.
|
|
2976
|
+
*/
|
|
2977
|
+
|
|
2978
|
+
type CloudflareR2StorageOptions = {
|
|
2979
|
+
r2: R2BucketLike;
|
|
2980
|
+
/** Key prefix applied to all object keys (trailing slash normalized). */
|
|
2981
|
+
prefix?: string;
|
|
2982
|
+
};
|
|
2983
|
+
type CloudflareR2PutBody = ReadableStream | ArrayBuffer | ArrayBufferView | string | Blob | null;
|
|
2984
|
+
interface CloudflareR2PutObjectInput {
|
|
2985
|
+
key: string;
|
|
2986
|
+
body: CloudflareR2PutBody;
|
|
2987
|
+
contentType?: string;
|
|
2988
|
+
metadata?: Record<string, string>;
|
|
2989
|
+
}
|
|
2990
|
+
interface CloudflareR2GetObjectResult {
|
|
2991
|
+
key: string;
|
|
2992
|
+
size: number;
|
|
2993
|
+
contentType?: string;
|
|
2994
|
+
body: R2ObjectBodyLike;
|
|
2995
|
+
}
|
|
2996
|
+
interface CloudflareR2ListObjectsInput {
|
|
2997
|
+
prefix?: string;
|
|
2998
|
+
limit?: number;
|
|
2999
|
+
cursor?: string;
|
|
3000
|
+
}
|
|
3001
|
+
interface CloudflareR2ListObjectsResult {
|
|
3002
|
+
objects: Array<{
|
|
3003
|
+
key: string;
|
|
3004
|
+
size: number;
|
|
3005
|
+
etag?: string;
|
|
3006
|
+
uploaded?: Date;
|
|
3007
|
+
}>;
|
|
3008
|
+
truncated: boolean;
|
|
3009
|
+
cursor?: string;
|
|
3010
|
+
}
|
|
3011
|
+
/** L3a object methods exposed when an R2 binding is configured. */
|
|
3012
|
+
interface CloudflareR2ObjectStorage {
|
|
3013
|
+
putObject(input: CloudflareR2PutObjectInput): Promise<{
|
|
3014
|
+
key: string;
|
|
3015
|
+
}>;
|
|
3016
|
+
getObject(input: {
|
|
3017
|
+
key: string;
|
|
3018
|
+
}): Promise<CloudflareR2GetObjectResult | null>;
|
|
3019
|
+
deleteObject(input: {
|
|
3020
|
+
key: string | string[];
|
|
3021
|
+
}): Promise<{
|
|
3022
|
+
deleted: string[];
|
|
3023
|
+
}>;
|
|
3024
|
+
listObjects(input?: CloudflareR2ListObjectsInput): Promise<CloudflareR2ListObjectsResult>;
|
|
3025
|
+
}
|
|
3026
|
+
/**
|
|
3027
|
+
* Storage namespace for edge-local R2: full module shape (unsupported methods throw)
|
|
3028
|
+
* plus L3a object helpers.
|
|
3029
|
+
*/
|
|
3030
|
+
type CloudflareR2StorageModule = AthenaStorageModule & CloudflareR2ObjectStorage;
|
|
3031
|
+
/**
|
|
3032
|
+
* Minimal storage surface backed by an R2 binding.
|
|
3033
|
+
* Full AthenaStorageModule methods that need catalogs throw clearly.
|
|
3034
|
+
*/
|
|
3035
|
+
declare function createCloudflareR2StorageModule(options: CloudflareR2StorageOptions): CloudflareR2StorageModule;
|
|
3036
|
+
|
|
2817
3037
|
/**
|
|
2818
3038
|
* Resolve query diagnostics flags for {@link createClient}.
|
|
2819
3039
|
*
|
|
@@ -2840,6 +3060,14 @@ interface AthenaDbConfig {
|
|
|
2840
3060
|
url?: string | null;
|
|
2841
3061
|
pgUri?: string | null;
|
|
2842
3062
|
jdbcUrl?: string | null;
|
|
3063
|
+
/**
|
|
3064
|
+
* Cloudflare D1 binding (e.g. `env.DB`).
|
|
3065
|
+
* Drop-in local DB execution for `from` / `query` / flat CRUD — same fluent API as HTTP gateway.
|
|
3066
|
+
* When set, `createClient` wires a D1 transport automatically (ADR 0015).
|
|
3067
|
+
*/
|
|
3068
|
+
d1?: D1DatabaseLike | null;
|
|
3069
|
+
/** Default D1 session mode when using `d1` (`first-unconstrained`, `first-primary`, …). */
|
|
3070
|
+
sessionMode?: string | null;
|
|
2843
3071
|
}
|
|
2844
3072
|
interface AthenaAuthConfig extends Omit<AthenaAuthClientConfig, 'baseUrl' | 'apiKey' | 'bearerToken' | 'cookie' | 'sessionToken'> {
|
|
2845
3073
|
url?: string | null;
|
|
@@ -2852,6 +3080,14 @@ interface AthenaChatConfig {
|
|
|
2852
3080
|
interface AthenaStorageConfig extends Omit<AthenaStorageClientConfig, 'baseUrl' | 'directUpload'> {
|
|
2853
3081
|
url?: string | null;
|
|
2854
3082
|
directUpload?: AthenaStorageDirectUploadConfig;
|
|
3083
|
+
/**
|
|
3084
|
+
* Cloudflare R2 binding (e.g. `env.FILES`).
|
|
3085
|
+
* Drop-in local object I/O (`putObject` / `getObject` / `listObjects` / `deleteObject`).
|
|
3086
|
+
* When set, `createClient` attaches L3a R2 storage instead of (or without) HTTP storage.
|
|
3087
|
+
*/
|
|
3088
|
+
r2?: R2BucketLike | null;
|
|
3089
|
+
/** Key prefix for R2 object ops (trailing slash normalized). */
|
|
3090
|
+
prefix?: string | null;
|
|
2855
3091
|
}
|
|
2856
3092
|
interface AthenaBillingConfig extends Omit<AthenaBillingClientConfig, 'baseUrl' | 'apiKey' | 'client' | 'fetchImpl'> {
|
|
2857
3093
|
/** Optional override; defaults to the unified/root or db Athena URL. */
|
|
@@ -2872,6 +3108,29 @@ interface AthenaClientConfig<TModels extends AthenaClientModelsInput | undefined
|
|
|
2872
3108
|
chat?: AthenaChatConfig;
|
|
2873
3109
|
storage?: AthenaStorageConfig;
|
|
2874
3110
|
billing?: AthenaBillingConfig;
|
|
3111
|
+
/**
|
|
3112
|
+
* Top-level D1 alias for `db.d1` (Worker DX). Prefer nested `db: { d1 }` in shared code.
|
|
3113
|
+
* All paths still materialize through {@link createClient}.
|
|
3114
|
+
*/
|
|
3115
|
+
d1?: D1DatabaseLike | null;
|
|
3116
|
+
/**
|
|
3117
|
+
* Top-level R2 alias for `storage.r2`. Prefer nested `storage: { r2 }` in shared code.
|
|
3118
|
+
*/
|
|
3119
|
+
r2?: R2BucketLike | null;
|
|
3120
|
+
/** Top-level alias for `storage.prefix` when using `r2`. */
|
|
3121
|
+
storagePrefix?: string | null;
|
|
3122
|
+
/** Top-level alias for `db.sessionMode` when using `d1`. */
|
|
3123
|
+
sessionMode?: string | null;
|
|
3124
|
+
/**
|
|
3125
|
+
* Edge vs gateway selection when both bindings and HTTP URLs may be present.
|
|
3126
|
+
* Default `auto` (env `ATHENA_EXECUTION_MODE`). Prefer nested service fields for backends.
|
|
3127
|
+
*/
|
|
3128
|
+
mode?: AthenaExecutionMode | string | null;
|
|
3129
|
+
/**
|
|
3130
|
+
* When `mode` is `auto` and both D1 and a gateway URL exist, which wins.
|
|
3131
|
+
* Default `edge` (env `ATHENA_EXECUTION_PREFER`).
|
|
3132
|
+
*/
|
|
3133
|
+
prefer?: AthenaExecutionPrefer | string | null;
|
|
2875
3134
|
retryReads?: boolean;
|
|
2876
3135
|
/**
|
|
2877
3136
|
* Query diagnostics mode. Prefer `'auto'` in Next/OpenNext apps so production
|
|
@@ -2882,7 +3141,26 @@ interface AthenaClientConfig<TModels extends AthenaClientModelsInput | undefined
|
|
|
2882
3141
|
traceQueries?: boolean | AthenaQueryTraceOptions;
|
|
2883
3142
|
debugAst?: boolean;
|
|
2884
3143
|
findManyAst?: boolean;
|
|
2885
|
-
|
|
3144
|
+
/**
|
|
3145
|
+
* Optional prebuilt gateway transport (tests / advanced injection).
|
|
3146
|
+
* Prefer `db.d1` for Cloudflare edge-local — `createClient` wires D1 automatically.
|
|
3147
|
+
* @see ADR 0015
|
|
3148
|
+
*/
|
|
3149
|
+
gatewayTransport?: AthenaGatewayClient;
|
|
3150
|
+
/** Optional capability bag; defaults from gateway vs `db.d1` / `storage.r2` bindings. */
|
|
3151
|
+
capabilities?: AthenaClientCapabilities;
|
|
3152
|
+
}
|
|
3153
|
+
/** Config with a required R2 binding — narrows `client.storage` to L3a object methods. */
|
|
3154
|
+
type AthenaClientConfigWithR2<TModels extends AthenaClientModelsInput | undefined = undefined> = AthenaClientConfig<TModels> & {
|
|
3155
|
+
storage: AthenaStorageConfig & {
|
|
3156
|
+
r2: R2BucketLike;
|
|
3157
|
+
};
|
|
3158
|
+
};
|
|
3159
|
+
/** Client with L3a R2 object methods typed on `storage`. */
|
|
3160
|
+
type AthenaClientWithR2Storage<TModels extends AthenaClientModelsInput | undefined = undefined> = Omit<AthenaClient<TModels>, 'storage' | 'withContext'> & {
|
|
3161
|
+
readonly storage: CloudflareR2StorageModule;
|
|
3162
|
+
withContext(context: AthenaRequestContext): AthenaClientWithR2Storage<TModels>;
|
|
3163
|
+
};
|
|
2886
3164
|
type V3TableBuilder<Row, Insert = Partial<Row>, Update = Partial<Insert>, Result = unknown> = TableQueryBuilder<Row, Insert, Update, Result>;
|
|
2887
3165
|
interface AthenaClient<TModels extends AthenaClientModelsInput | undefined = AthenaClientModelsInput | undefined> {
|
|
2888
3166
|
readonly db: AthenaDbModule<ResolvedModels<TModels>>;
|
|
@@ -2890,6 +3168,8 @@ interface AthenaClient<TModels extends AthenaClientModelsInput | undefined = Ath
|
|
|
2890
3168
|
readonly chat: AthenaChatModule;
|
|
2891
3169
|
readonly storage: AthenaStorageModule;
|
|
2892
3170
|
readonly billing: AthenaBillingModule;
|
|
3171
|
+
/** Runtime feature detection for gateway vs edge-local backends (ADR 0015). */
|
|
3172
|
+
readonly capabilities: AthenaClientCapabilities;
|
|
2893
3173
|
from<TModel extends AthenaModelTarget>(model: TModel): V3TableBuilder<RowOf<TModel>, InsertOf<TModel>, UpdateOf<TModel>>;
|
|
2894
3174
|
from<TTableName extends AthenaClientTableName<ResolvedModels<TModels>>>(table: TTableName, options?: AthenaFromOptions): V3TableBuilder<RowOf<AthenaClientModelForTableName<ResolvedModels<TModels>, TTableName>>, InsertOf<AthenaClientModelForTableName<ResolvedModels<TModels>, TTableName>>, UpdateOf<AthenaClientModelForTableName<ResolvedModels<TModels>, TTableName>>>;
|
|
2895
3175
|
from<Row = Record<string, unknown>, Insert = Partial<Row>, Update = Partial<Insert>>(table: string, options?: AthenaFromOptions): V3TableBuilder<Row, Insert, Update>;
|
|
@@ -2899,6 +3179,22 @@ interface AthenaClient<TModels extends AthenaClientModelsInput | undefined = Ath
|
|
|
2899
3179
|
verifyConnection(options?: AthenaGatewayConnectionOptions): Promise<AthenaGatewayConnectionResult>;
|
|
2900
3180
|
withContext(context: AthenaRequestContext): AthenaClient<TModels>;
|
|
2901
3181
|
}
|
|
3182
|
+
/**
|
|
3183
|
+
* Materialize an Athena client (single public constructor).
|
|
3184
|
+
*
|
|
3185
|
+
* All backends and modes go through this API:
|
|
3186
|
+
* - Gateway HTTP: `createClient({ url, key })`
|
|
3187
|
+
* - Edge D1/R2: `createClient({ db: { d1 }, storage: { r2 } })` or top-level `{ d1, r2 }`
|
|
3188
|
+
* - Hybrid: edge D1 + `url` for remote auth/billing
|
|
3189
|
+
* - Switch: `mode: 'auto' | 'edge' | 'gateway'` and `prefer` when both D1 and URL exist
|
|
3190
|
+
*
|
|
3191
|
+
* Fluent `from` / `query` / `storage.*` call sites are identical across modes (ADR 0001 / 0015 / 0016).
|
|
3192
|
+
* `createCloudflareClient` / `createAthenaRuntime` are thin façades that only map config into this function.
|
|
3193
|
+
*/
|
|
3194
|
+
declare function createClient<const TModels extends AthenaClientModelsInput | undefined = undefined>(config: AthenaClientConfigWithR2<TModels>): AthenaClientWithR2Storage<TModels>;
|
|
3195
|
+
declare function createClient<const TModels extends AthenaClientModelsInput | undefined = undefined>(config: AthenaClientConfig<TModels> & {
|
|
3196
|
+
r2: R2BucketLike;
|
|
3197
|
+
}): AthenaClientWithR2Storage<TModels>;
|
|
2902
3198
|
declare function createClient<const TModels extends AthenaClientModelsInput | undefined = undefined>(config: AthenaClientConfig<TModels>): AthenaClient<TModels>;
|
|
2903
3199
|
|
|
2904
|
-
export { type AthenaChatWsPresenceUpdatedEvent as $, type AthenaAuthConfig as A, type AthenaChatRealtimeModule as B, type AthenaChatRemoveResult as C, type AthenaChatResumeRoomCursor as D, type AthenaChatRoom as E, type AthenaChatRoomCreatedResponse as F, type AthenaChatRoomKind as G, type AthenaChatRoomPage as H, type AthenaChatSearchHit as I, type AthenaChatSearchMessagesRequest as J, type AthenaChatSearchPage as K, type AthenaChatSendMessageRequest as L, type AthenaChatUpdateRoomRequest as M, type AthenaChatWebSocketFactory as N, type AthenaChatWebSocketLike as O, type AthenaChatWsAuthHelloCommand as P, type AthenaChatWsClientCommand as Q, type AthenaChatWsErrorEvent as R, type AthenaChatWsHelloOkEvent as S, type AthenaChatWsMembersUpdatedEvent as T, type AthenaChatWsMessageCreatedEvent as U, type AthenaChatWsMessageDeletedEvent as V, type AthenaChatWsMessageEventBase as W, type AthenaChatWsMessageUpdatedEvent as X, type AthenaChatWsPingCommand as Y, type AthenaChatWsPongEvent as Z, type AthenaChatWsPresenceHeartbeatCommand as _, type AthenaBillingConfig as a, type AthenaStorageFileConfig as a$, type AthenaChatWsReactionUpdatedEvent as a0, type AthenaChatWsReadUpToCommand as a1, type AthenaChatWsReadUpdatedEvent as a2, type AthenaChatWsResumeCommand as a3, type AthenaChatWsRoomArchivedEvent as a4, type AthenaChatWsRoomCreatedEvent as a5, type AthenaChatWsRoomEventBase as a6, type AthenaChatWsRoomUpdatedEvent as a7, type AthenaChatWsServerEvent as a8, type AthenaChatWsSubscribeCommand as a9, type AthenaRequestOptions as aA, type AthenaRequestQueryValueMap as aB, type AthenaRequestResponse as aC, type AthenaRequestService as aD, type AthenaResult as aE, type AthenaRpcBuilderStateAst as aF, type AthenaRpcDebugAst as aG, type AthenaSelectDebugAst as aH, type AthenaSelectDebugTransport as aI, type AthenaStorageAuditNamespace as aJ, type AthenaStorageBackupNamespace as aK, type AthenaStorageBaseModule as aL, type AthenaStorageBinaryCallOptions as aM, type AthenaStorageBucketCorsNamespace as aN, type AthenaStorageBucketNamespace as aO, type AthenaStorageCallOptions as aP, type AthenaStorageCatalogNamespace as aQ, type AthenaStorageClientConfig as aR, type AthenaStorageConfig as aS, type AthenaStorageCredentialsNamespace as aT, type AthenaStorageDirectUploadConfig as aU, type AthenaStorageEnv as aV, AthenaStorageError as aW, AthenaStorageErrorCode as aX, type AthenaStorageErrorDetails as aY, type AthenaStorageErrorHandler as aZ, type AthenaStorageErrorInput as a_, type AthenaChatWsSubscribedEvent as aa, type AthenaChatWsSyncRequiredEvent as ab, type AthenaChatWsTypingStartCommand as ac, type AthenaChatWsTypingStopCommand as ad, type AthenaChatWsTypingUpdatedEvent as ae, type AthenaChatWsUnsubscribeCommand as af, type AthenaClient as ag, type AthenaClientConfig as ah, type AthenaDbConfig as ai, type AthenaDbModule as aj, type AthenaDeleteDebugAst as ak, type AthenaEnvelope as al, AthenaError as am, AthenaErrorCategory as an, AthenaErrorCode as ao, type AthenaErrorInput as ap, AthenaErrorKind as aq, type AthenaFindManyDebugAst as ar, type AthenaFromOptions as as, type AthenaInsertDebugAst as at, type AthenaOperationContext as au, type AthenaQueryDebugAst as av, type AthenaRawQueryDebugAst as aw, type AthenaRequestContext as ax, type AthenaRequestContextProvider as ay, type AthenaRequestMethod as az, type AthenaChatAddMembersRequest as b, type StorageBackupListQuery as b$, type AthenaStorageFileDeleteInput as b0, type AthenaStorageFileDownloadInput as b1, type AthenaStorageFileListInput as b2, type AthenaStorageFileModule as b3, type AthenaStorageFileNamespace as b4, type AthenaStorageFileUploadInput as b5, type AthenaStorageFileUploadManyRequest as b6, type AthenaStorageFileUploadRequest as b7, type AthenaStorageFileUploadResult as b8, type AthenaStorageFolderNamespace as b9, type DeleteManyStorageFilesRequest as bA, type DeleteStorageFolderRequest as bB, type DeprecatedInlineStorageConnectionFields as bC, type GetStorageFileUrlQuery as bD, type IntCoercionOptions as bE, type ListStorageFilesRequest as bF, type ListStorageFoldersRequest as bG, type ManagedFileRecord as bH, type MoveStorageFolderRequest as bI, type NormalizedAthenaError as bJ, type PresignedFileUrlResponse as bK, type RequireAffectedOptions as bL, type RetryBackoffStrategy as bM, type RetryConfig as bN, type RpcOrderOptions as bO, type RpcQueryBuilder as bP, type S3CatalogItem as bQ, type S3CredentialListItem as bR, type SearchStorageFilesRequest as bS, type SetManyStorageFileVisibilityRequest as bT, type SetStorageFileVisibilityRequest as bU, type StorageAuditEventRecord as bV, type StorageAuditListResponse as bW, type StorageAuditQueryRequest as bX, type StorageBackupCreateRequest as bY, type StorageBackupJob as bZ, type StorageBackupListPage as b_, type AthenaStorageManagedUpload as ba, type AthenaStorageModule as bb, type AthenaStorageMultipartNamespace as bc, type AthenaStorageObjectFolderNamespace as bd, type AthenaStorageObjectNamespace as be, type AthenaStoragePathContext as bf, type AthenaStoragePermissionNamespace as bg, type AthenaStoragePrefixPath as bh, type AthenaStoragePutBody as bi, type AthenaStoragePutOptions as bj, type AthenaStorageTemplateValue as bk, type AthenaStorageTemplateVars as bl, type AthenaStorageUploadConstraints as bm, type AthenaStorageUploadProgress as bn, type AthenaStorageUploadProgressHandler as bo, type AthenaStorageUploadSource as bp, type AthenaStorageUploadedFile as bq, type AthenaTableBuilderStateAst as br, type AthenaUpdateDebugAst as bs, type AthenaUpsertDebugAst as bt, type BackupRecoveryStrategy as bu, type ConfirmStorageUploadRequest as bv, type CopyStorageFileRequest as bw, type CreateStorageCatalogRequest as bx, type CreateStorageUploadUrlRequest as by, type CreateStorageUploadUrlsRequest as bz, type AthenaChatAddReactionRequest as c, coerceInt as c$, type StorageBackupQueuedJob as c0, type StorageBackupRecord as c1, type StorageBackupRestoreRequest as c2, type StorageBackupSchedule as c3, type StorageBackupScheduleCreateRequest as c4, type StorageBatchUploadUrlResponse as c5, type StorageBatchUploadUrlResponseWithPut as c6, type StorageBucketCorsRequest as c7, type StorageBucketCorsRuleInput as c8, type StorageBucketLifecycleRequest as c9, type StorageObjectVersionListRequest as cA, type StorageObjectVersionMutationRequest as cB, type StoragePermissionCheckRequest as cC, type StoragePermissionCheckResponse as cD, type StoragePermissionGrantRequest as cE, type StoragePermissionListRequest as cF, type StoragePermissionListResponse as cG, type StoragePermissionRevokeRequest as cH, type StoragePresignUploadRequest as cI, type StoragePublicAccessBlockRequest as cJ, type StorageServerSideEncryptionOptions as cK, type StorageSetBucketCorsRequest as cL, type StorageSetBucketLifecycleRequest as cM, type StorageSetBucketPolicyRequest as cN, type StorageSetPublicAccessBlockRequest as cO, type StorageSignedPostPolicyRequest as cP, type StorageUpdateObjectRequest as cQ, type StorageUploadUrlResponse as cR, type StorageUploadUrlResponseWithPut as cS, type TableQueryBuilder as cT, type TreeStorageFoldersRequest as cU, type UnwrapOneOptions as cV, type UnwrapOptions as cW, type UpdateManyStorageFilesRequest as cX, type UpdateStorageCatalogRequest as cY, type UpdateStorageFileRequest as cZ, assertInt as c_, type StorageBucketLifecycleRuleInput as ca, type StorageBucketPolicyRequest as cb, type StorageConnectionSelector as cc, type StorageFileAccessPurpose as cd, type StorageFileMutationManyResponse as ce, type StorageFileMutationResponse as cf, type StorageFilePermissionRecord as cg, type StorageFileRetentionRequest as ch, type StorageFileVersionPathRequest as ci, type StorageFolderMutationResponse as cj, type StorageListFilesResponse as ck, type StorageListObjectsRequest as cl, type StorageMultipartAbortRequest as cm, type StorageMultipartCompletePartInput as cn, type StorageMultipartCompleteRequest as co, type StorageMultipartCreateRequest as cp, type StorageMultipartListPartsRequest as cq, type StorageMultipartSignPartRequest as cr, type StorageObjectBaseRequest as cs, type StorageObjectCopyRequest as ct, type StorageObjectFolderCreateRequest as cu, type StorageObjectFolderDeleteRequest as cv, type StorageObjectFolderRenameRequest as cw, type StorageObjectPublicUrlRequest as cx, type StorageObjectRequest as cy, type StorageObjectValidateRequest as cz, type AthenaChatAttachmentInput as d, createAthenaStorageError as d0, createClient as d1, createStorageModule as d2, getAthenaDebugAst as d3, isOk as d4, normalizeAthenaError as d5, parseBooleanFlag as d6, requireAffected as d7, requireSuccess as d8, storageSdkManifest as d9, unwrap as da, unwrapOne as db, unwrapRows as dc, verifyAthenaGatewayUrl as dd, withRetry as de, type AthenaFindManyOptions as df, type AthenaFindManyResult as dg, type AthenaOrderBy as dh, type AthenaQueryTraceCallsite as di, type AthenaQueryTraceEvent as dj, type AthenaQueryTraceOptions as dk, type AthenaRelationSelectNode as dl, type AthenaResultError as dm, type AthenaSelectShape as dn, type AthenaValidatedSelectShape as dp, type AthenaWhere as dq, type AthenaWhereBooleanOperand as dr, type AthenaWhereOperatorInput as ds, DEFAULT_MULTIPART_PART_SIZE_BYTES as dt, DEFAULT_MULTIPART_THRESHOLD_BYTES as du, createStorageFileModule as dv, resolveStoragePath as dw, type AthenaChatAttachmentView as e, type AthenaChatCallOptions as f, type AthenaChatConfig as g, type AthenaChatConnectOptions as h, type AthenaChatCreateRoomRequest as i, type AthenaChatDeleteResult as j, type AthenaChatEditMessageRequest as k, type AthenaChatListMessagesQuery as l, type AthenaChatListRoomsQuery as m, type AthenaChatMarkReadUpToRequest as n, type AthenaChatMember as o, type AthenaChatMemberRole as p, type AthenaChatMessage as q, type AthenaChatMessageCreatedResponse as r, type AthenaChatMessagePage as s, type AthenaChatModule as t, type AthenaChatPresenceUser as u, type AthenaChatReactionCount as v, type AthenaChatReactionSummary as w, type AthenaChatReadCursor as x, type AthenaChatRealtimeConnection as y, type AthenaChatRealtimeInfoResponse as z };
|
|
3200
|
+
export { type AthenaChatWsPresenceUpdatedEvent as $, type AthenaAuthConfig as A, type AthenaChatRealtimeModule as B, type AthenaChatRemoveResult as C, type AthenaChatResumeRoomCursor as D, type AthenaChatRoom as E, type AthenaChatRoomCreatedResponse as F, type AthenaChatRoomKind as G, type AthenaChatRoomPage as H, type AthenaChatSearchHit as I, type AthenaChatSearchMessagesRequest as J, type AthenaChatSearchPage as K, type AthenaChatSendMessageRequest as L, type AthenaChatUpdateRoomRequest as M, type AthenaChatWebSocketFactory as N, type AthenaChatWebSocketLike as O, type AthenaChatWsAuthHelloCommand as P, type AthenaChatWsClientCommand as Q, type AthenaChatWsErrorEvent as R, type AthenaChatWsHelloOkEvent as S, type AthenaChatWsMembersUpdatedEvent as T, type AthenaChatWsMessageCreatedEvent as U, type AthenaChatWsMessageDeletedEvent as V, type AthenaChatWsMessageEventBase as W, type AthenaChatWsMessageUpdatedEvent as X, type AthenaChatWsPingCommand as Y, type AthenaChatWsPongEvent as Z, type AthenaChatWsPresenceHeartbeatCommand as _, type AthenaBillingConfig as a, type AthenaStorageErrorDetails as a$, type AthenaChatWsReactionUpdatedEvent as a0, type AthenaChatWsReadUpToCommand as a1, type AthenaChatWsReadUpdatedEvent as a2, type AthenaChatWsResumeCommand as a3, type AthenaChatWsRoomArchivedEvent as a4, type AthenaChatWsRoomCreatedEvent as a5, type AthenaChatWsRoomEventBase as a6, type AthenaChatWsRoomUpdatedEvent as a7, type AthenaChatWsServerEvent as a8, type AthenaChatWsSubscribeCommand as a9, type AthenaRequestContext as aA, type AthenaRequestContextProvider as aB, type AthenaRequestMethod as aC, type AthenaRequestOptions as aD, type AthenaRequestQueryValueMap as aE, type AthenaRequestResponse as aF, type AthenaRequestService as aG, type AthenaResult as aH, type AthenaRpcBuilderStateAst as aI, type AthenaRpcDebugAst as aJ, type AthenaSelectDebugAst as aK, type AthenaSelectDebugTransport as aL, type AthenaStorageAuditNamespace as aM, type AthenaStorageBackupNamespace as aN, type AthenaStorageBaseModule as aO, type AthenaStorageBinaryCallOptions as aP, type AthenaStorageBucketCorsNamespace as aQ, type AthenaStorageBucketNamespace as aR, type AthenaStorageCallOptions as aS, type AthenaStorageCatalogNamespace as aT, type AthenaStorageClientConfig as aU, type AthenaStorageConfig as aV, type AthenaStorageCredentialsNamespace as aW, type AthenaStorageDirectUploadConfig as aX, type AthenaStorageEnv as aY, AthenaStorageError as aZ, AthenaStorageErrorCode as a_, type AthenaChatWsSubscribedEvent as aa, type AthenaChatWsSyncRequiredEvent as ab, type AthenaChatWsTypingStartCommand as ac, type AthenaChatWsTypingStopCommand as ad, type AthenaChatWsTypingUpdatedEvent as ae, type AthenaChatWsUnsubscribeCommand as af, type AthenaClient as ag, type AthenaClientCapabilities as ah, type AthenaClientConfig as ai, type AthenaClientConfigWithR2 as aj, type AthenaClientWithR2Storage as ak, type AthenaDbConfig as al, type AthenaDbModule as am, type AthenaDeleteDebugAst as an, type AthenaEnvelope as ao, AthenaError as ap, AthenaErrorCategory as aq, AthenaErrorCode as ar, type AthenaErrorInput as as, AthenaErrorKind as at, type AthenaFindManyDebugAst as au, type AthenaFromOptions as av, type AthenaInsertDebugAst as aw, type AthenaOperationContext as ax, type AthenaQueryDebugAst as ay, type AthenaRawQueryDebugAst as az, type AthenaChatAddMembersRequest as b, type StorageBackupCreateRequest as b$, type AthenaStorageErrorHandler as b0, type AthenaStorageErrorInput as b1, type AthenaStorageFileConfig as b2, type AthenaStorageFileDeleteInput as b3, type AthenaStorageFileDownloadInput as b4, type AthenaStorageFileListInput as b5, type AthenaStorageFileModule as b6, type AthenaStorageFileNamespace as b7, type AthenaStorageFileUploadInput as b8, type AthenaStorageFileUploadManyRequest as b9, type CreateStorageCatalogRequest as bA, type CreateStorageUploadUrlRequest as bB, type CreateStorageUploadUrlsRequest as bC, type DeleteManyStorageFilesRequest as bD, type DeleteStorageFolderRequest as bE, type DeprecatedInlineStorageConnectionFields as bF, type GetStorageFileUrlQuery as bG, type IntCoercionOptions as bH, type ListStorageFilesRequest as bI, type ListStorageFoldersRequest as bJ, type ManagedFileRecord as bK, type MoveStorageFolderRequest as bL, type NormalizedAthenaError as bM, type PresignedFileUrlResponse as bN, type RequireAffectedOptions as bO, type RetryBackoffStrategy as bP, type RetryConfig as bQ, type RpcOrderOptions as bR, type RpcQueryBuilder as bS, type S3CatalogItem as bT, type S3CredentialListItem as bU, type SearchStorageFilesRequest as bV, type SetManyStorageFileVisibilityRequest as bW, type SetStorageFileVisibilityRequest as bX, type StorageAuditEventRecord as bY, type StorageAuditListResponse as bZ, type StorageAuditQueryRequest as b_, type AthenaStorageFileUploadRequest as ba, type AthenaStorageFileUploadResult as bb, type AthenaStorageFolderNamespace as bc, type AthenaStorageManagedUpload as bd, type AthenaStorageModule as be, type AthenaStorageMultipartNamespace as bf, type AthenaStorageObjectFolderNamespace as bg, type AthenaStorageObjectNamespace as bh, type AthenaStoragePathContext as bi, type AthenaStoragePermissionNamespace as bj, type AthenaStoragePrefixPath as bk, type AthenaStoragePutBody as bl, type AthenaStoragePutOptions as bm, type AthenaStorageTemplateValue as bn, type AthenaStorageTemplateVars as bo, type AthenaStorageUploadConstraints as bp, type AthenaStorageUploadProgress as bq, type AthenaStorageUploadProgressHandler as br, type AthenaStorageUploadSource as bs, type AthenaStorageUploadedFile as bt, type AthenaTableBuilderStateAst as bu, type AthenaUpdateDebugAst as bv, type AthenaUpsertDebugAst as bw, type BackupRecoveryStrategy as bx, type ConfirmStorageUploadRequest as by, type CopyStorageFileRequest as bz, type AthenaChatAddReactionRequest as c, type UpdateStorageCatalogRequest as c$, type StorageBackupJob as c0, type StorageBackupListPage as c1, type StorageBackupListQuery as c2, type StorageBackupQueuedJob as c3, type StorageBackupRecord as c4, type StorageBackupRestoreRequest as c5, type StorageBackupSchedule as c6, type StorageBackupScheduleCreateRequest as c7, type StorageBatchUploadUrlResponse as c8, type StorageBatchUploadUrlResponseWithPut as c9, type StorageObjectPublicUrlRequest as cA, type StorageObjectRequest as cB, type StorageObjectValidateRequest as cC, type StorageObjectVersionListRequest as cD, type StorageObjectVersionMutationRequest as cE, type StoragePermissionCheckRequest as cF, type StoragePermissionCheckResponse as cG, type StoragePermissionGrantRequest as cH, type StoragePermissionListRequest as cI, type StoragePermissionListResponse as cJ, type StoragePermissionRevokeRequest as cK, type StoragePresignUploadRequest as cL, type StoragePublicAccessBlockRequest as cM, type StorageServerSideEncryptionOptions as cN, type StorageSetBucketCorsRequest as cO, type StorageSetBucketLifecycleRequest as cP, type StorageSetBucketPolicyRequest as cQ, type StorageSetPublicAccessBlockRequest as cR, type StorageSignedPostPolicyRequest as cS, type StorageUpdateObjectRequest as cT, type StorageUploadUrlResponse as cU, type StorageUploadUrlResponseWithPut as cV, type TableQueryBuilder as cW, type TreeStorageFoldersRequest as cX, type UnwrapOneOptions as cY, type UnwrapOptions as cZ, type UpdateManyStorageFilesRequest as c_, type StorageBucketCorsRequest as ca, type StorageBucketCorsRuleInput as cb, type StorageBucketLifecycleRequest as cc, type StorageBucketLifecycleRuleInput as cd, type StorageBucketPolicyRequest as ce, type StorageConnectionSelector as cf, type StorageFileAccessPurpose as cg, type StorageFileMutationManyResponse as ch, type StorageFileMutationResponse as ci, type StorageFilePermissionRecord as cj, type StorageFileRetentionRequest as ck, type StorageFileVersionPathRequest as cl, type StorageFolderMutationResponse as cm, type StorageListFilesResponse as cn, type StorageListObjectsRequest as co, type StorageMultipartAbortRequest as cp, type StorageMultipartCompletePartInput as cq, type StorageMultipartCompleteRequest as cr, type StorageMultipartCreateRequest as cs, type StorageMultipartListPartsRequest as ct, type StorageMultipartSignPartRequest as cu, type StorageObjectBaseRequest as cv, type StorageObjectCopyRequest as cw, type StorageObjectFolderCreateRequest as cx, type StorageObjectFolderDeleteRequest as cy, type StorageObjectFolderRenameRequest as cz, type AthenaChatAttachmentInput as d, type UpdateStorageFileRequest as d0, assertInt as d1, coerceInt as d2, createAthenaStorageError as d3, createClient as d4, createStorageModule as d5, getAthenaDebugAst as d6, isOk as d7, normalizeAthenaError as d8, parseBooleanFlag as d9, DEFAULT_MULTIPART_THRESHOLD_BYTES as dA, createStorageFileModule as dB, resolveAthenaExecutionMode as dC, resolveStoragePath as dD, type D1DatabaseLike as dE, type D1ResultLike as dF, type AthenaGatewayClient as dG, type R2BucketLike as dH, type CloudflareR2StorageModule as dI, type AthenaDiagnosticsMode as dJ, ATHENA_EXECUTION_MODE_ENV_KEY as dK, ATHENA_EXECUTION_PREFER_ENV_KEY as dL, type AthenaDbCapabilities as dM, type AthenaStorageCapabilities as dN, type CloudflareR2GetObjectResult as dO, type CloudflareR2ListObjectsInput as dP, type CloudflareR2ListObjectsResult as dQ, type CloudflareR2ObjectStorage as dR, type CloudflareR2PutBody as dS, type CloudflareR2PutObjectInput as dT, type ResolveAthenaExecutionModeInput as dU, createCloudflareR2StorageModule as dV, requireAffected as da, requireSuccess as db, storageSdkManifest as dc, unwrap as dd, unwrapOne as de, unwrapRows as df, verifyAthenaGatewayUrl as dg, withRetry as dh, type AthenaExecutionMode as di, type AthenaExecutionPrefer as dj, type AthenaFindManyOptions as dk, type AthenaFindManyResult as dl, type AthenaOrderBy as dm, type AthenaQueryTraceCallsite as dn, type AthenaQueryTraceEvent as dp, type AthenaQueryTraceOptions as dq, type AthenaRelationSelectNode as dr, type AthenaResolvedExecutionMode as ds, type AthenaResultError as dt, type AthenaSelectShape as du, type AthenaValidatedSelectShape as dv, type AthenaWhere as dw, type AthenaWhereBooleanOperand as dx, type AthenaWhereOperatorInput as dy, DEFAULT_MULTIPART_PART_SIZE_BYTES as dz, type AthenaChatAttachmentView as e, type AthenaChatCallOptions as f, type AthenaChatConfig as g, type AthenaChatConnectOptions as h, type AthenaChatCreateRoomRequest as i, type AthenaChatDeleteResult as j, type AthenaChatEditMessageRequest as k, type AthenaChatListMessagesQuery as l, type AthenaChatListRoomsQuery as m, type AthenaChatMarkReadUpToRequest as n, type AthenaChatMember as o, type AthenaChatMemberRole as p, type AthenaChatMessage as q, type AthenaChatMessageCreatedResponse as r, type AthenaChatMessagePage as s, type AthenaChatModule as t, type AthenaChatPresenceUser as u, type AthenaChatReactionCount as v, type AthenaChatReactionSummary as w, type AthenaChatReadCursor as x, type AthenaChatRealtimeConnection as y, type AthenaChatRealtimeInfoResponse as z };
|
package/package.json
CHANGED
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
"pg": "^8.16.0",
|
|
12
12
|
"server-only": "^0.0.1",
|
|
13
13
|
"use-sync-external-store": "^1.5.0",
|
|
14
|
-
"uuid": "^9.0.1",
|
|
15
14
|
"zod": "^4.0.1"
|
|
16
15
|
},
|
|
17
16
|
"description": "Athena JS SDK",
|
|
@@ -24,7 +23,6 @@
|
|
|
24
23
|
"@types/pg": "^8.15.1",
|
|
25
24
|
"@types/react": "^18.3.12",
|
|
26
25
|
"@types/react-test-renderer": "^18.3.1",
|
|
27
|
-
"@types/uuid": "^9.0.7",
|
|
28
26
|
"@typescript-eslint/eslint-plugin": "^8.57.0",
|
|
29
27
|
"@typescript-eslint/parser": "^8.57.0",
|
|
30
28
|
"eslint": "^8.57.1",
|
|
@@ -71,6 +69,12 @@
|
|
|
71
69
|
"require": "./dist/browser.cjs",
|
|
72
70
|
"types": "./dist/browser.d.ts"
|
|
73
71
|
},
|
|
72
|
+
"./cloudflare": {
|
|
73
|
+
"default": "./dist/cloudflare.js",
|
|
74
|
+
"import": "./dist/cloudflare.js",
|
|
75
|
+
"require": "./dist/cloudflare.cjs",
|
|
76
|
+
"types": "./dist/cloudflare.d.ts"
|
|
77
|
+
},
|
|
74
78
|
"./cookies": {
|
|
75
79
|
"default": "./dist/cookies.js",
|
|
76
80
|
"import": "./dist/cookies.js",
|
|
@@ -206,6 +210,9 @@
|
|
|
206
210
|
"browser": [
|
|
207
211
|
"dist/browser.d.ts"
|
|
208
212
|
],
|
|
213
|
+
"cloudflare": [
|
|
214
|
+
"dist/cloudflare.d.ts"
|
|
215
|
+
],
|
|
209
216
|
"cookies": [
|
|
210
217
|
"dist/cookies.d.ts"
|
|
211
218
|
],
|
|
@@ -232,5 +239,5 @@
|
|
|
232
239
|
]
|
|
233
240
|
}
|
|
234
241
|
},
|
|
235
|
-
"version": "3.
|
|
242
|
+
"version": "3.5.1"
|
|
236
243
|
}
|