@xylex-group/athena 2.6.0 → 2.7.0

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.
Files changed (44) hide show
  1. package/README.md +1 -1
  2. package/dist/browser.cjs +837 -114
  3. package/dist/browser.cjs.map +1 -1
  4. package/dist/browser.d.cts +7 -7
  5. package/dist/browser.d.ts +7 -7
  6. package/dist/browser.js +837 -114
  7. package/dist/browser.js.map +1 -1
  8. package/dist/cli/index.cjs +830 -107
  9. package/dist/cli/index.cjs.map +1 -1
  10. package/dist/cli/index.d.cts +3 -3
  11. package/dist/cli/index.d.ts +3 -3
  12. package/dist/cli/index.js +830 -107
  13. package/dist/cli/index.js.map +1 -1
  14. package/dist/cookies.cjs +10 -3
  15. package/dist/cookies.cjs.map +1 -1
  16. package/dist/cookies.js +10 -3
  17. package/dist/cookies.js.map +1 -1
  18. package/dist/index.cjs +837 -114
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +7 -7
  21. package/dist/index.d.ts +7 -7
  22. package/dist/index.js +837 -114
  23. package/dist/index.js.map +1 -1
  24. package/dist/model-form-AKYrgede.d.ts +2772 -0
  25. package/dist/model-form-ehfqLuG7.d.cts +2772 -0
  26. package/dist/{pipeline-Ce3pTw5h.d.ts → pipeline-BUsR9XlO.d.ts} +1 -1
  27. package/dist/{pipeline-D1ZYeoH7.d.cts → pipeline-BfCWSRYl.d.cts} +1 -1
  28. package/dist/react-email-BQzmXBDE.d.cts +304 -0
  29. package/dist/react-email-BrVRp80B.d.ts +304 -0
  30. package/dist/react.cjs +178 -71
  31. package/dist/react.cjs.map +1 -1
  32. package/dist/react.d.cts +22 -5
  33. package/dist/react.d.ts +22 -5
  34. package/dist/react.js +92 -5
  35. package/dist/react.js.map +1 -1
  36. package/dist/{types-CUuo4NDi.d.cts → types-BSIsyss1.d.cts} +1 -1
  37. package/dist/{types-DSX6AT5B.d.cts → types-BsyRW49r.d.cts} +1 -1
  38. package/dist/{types-DSX6AT5B.d.ts → types-BsyRW49r.d.ts} +1 -1
  39. package/dist/{types-DapchQY5.d.ts → types-t_TVqnmp.d.ts} +1 -1
  40. package/package.json +193 -193
  41. package/dist/model-form-BaHWi3gm.d.cts +0 -1383
  42. package/dist/model-form-Dh6gWjL0.d.ts +0 -1383
  43. package/dist/react-email-B8O1Jeff.d.cts +0 -1230
  44. package/dist/react-email-CDEF0jij.d.ts +0 -1230
@@ -1,1230 +0,0 @@
1
- import { i as AthenaJsonValue, a as AthenaGatewayCallOptions, g as AthenaJsonObject, j as AthenaRpcCallOptions, b as AthenaGatewayConnectionOptions, c as AthenaGatewayConnectionResult, J as AthenaGatewayEndpointPath, K as AthenaGatewayMethod, L as AthenaConditionValue, N as AthenaConditionArrayValue, R as RegistryDef, D as DatabaseDef, F as SchemaDef, O as AnyModelDef, x as ModelDef, C as ModelRelationMetadata, E as RowOf, o as BackendConfig, p as BackendType, e as AthenaGatewayErrorDetails, A as AthenaConditionCastType, P as AthenaConditionOperator, y as ModelMetadata, H as TenantKeyMap, T as TenantContext, M as ModelAt, q as InsertOf, U as UpdateOf, S as SchemaIntrospectionProvider, r as IntrospectionColumn } from './types-DSX6AT5B.js';
2
- import { f as AthenaAuthClientConfig, d as AthenaAuthBindings, N as AthenaAuthSdkClient, F as AthenaAuthReactEmailProps, C as AthenaAuthReactEmailComponent, H as AthenaAuthReactEmailRenderInput, k as AthenaAuthEmailTemplateDefinition, i as AthenaAuthEmailTemplateBuilder, I as AthenaAuthReactEmailRenderOptions, G as AthenaAuthReactEmailRenderEvent, D as AthenaAuthReactEmailConfig } from './model-form-Dh6gWjL0.js';
3
- import { j as GeneratorSchemaSelection, b as GeneratorProviderConfig } from './types-DapchQY5.js';
4
- import { A as AthenaCookiesOptions, a as AthenaSessionPair, b as AthenaCookieOptions, c as AthenaAuthCookies, g as getCookieCache, d as getSessionCookie, e as AthenaCookieContextRuntime } from './index-CVcQCGyG.js';
5
-
6
- type AthenaErrorKind = 'unique_violation' | 'not_found' | 'validation' | 'auth' | 'rate_limit' | 'transient' | 'unknown';
7
- declare const AthenaErrorKind: {
8
- readonly UniqueViolation: "unique_violation";
9
- readonly NotFound: "not_found";
10
- readonly Validation: "validation";
11
- readonly Auth: "auth";
12
- readonly RateLimit: "rate_limit";
13
- readonly Transient: "transient";
14
- readonly Unknown: "unknown";
15
- };
16
- type AthenaErrorCode = 'UNIQUE_VIOLATION' | 'NOT_FOUND' | 'VALIDATION_FAILED' | 'AUTH_UNAUTHORIZED' | 'AUTH_FORBIDDEN' | 'RATE_LIMITED' | 'NETWORK_UNAVAILABLE' | 'TRANSIENT_FAILURE' | 'HTTP_FAILURE' | 'UNKNOWN';
17
- declare const AthenaErrorCode: {
18
- readonly UniqueViolation: "UNIQUE_VIOLATION";
19
- readonly NotFound: "NOT_FOUND";
20
- readonly ValidationFailed: "VALIDATION_FAILED";
21
- readonly AuthUnauthorized: "AUTH_UNAUTHORIZED";
22
- readonly AuthForbidden: "AUTH_FORBIDDEN";
23
- readonly RateLimited: "RATE_LIMITED";
24
- readonly NetworkUnavailable: "NETWORK_UNAVAILABLE";
25
- readonly TransientFailure: "TRANSIENT_FAILURE";
26
- readonly HttpFailure: "HTTP_FAILURE";
27
- readonly Unknown: "UNKNOWN";
28
- };
29
- type AthenaErrorCategory = 'transport' | 'client' | 'server' | 'database' | 'unknown';
30
- declare const AthenaErrorCategory: {
31
- readonly Transport: "transport";
32
- readonly Client: "client";
33
- readonly Server: "server";
34
- readonly Database: "database";
35
- readonly Unknown: "unknown";
36
- };
37
- interface AthenaOperationContext {
38
- table?: string;
39
- operation?: string;
40
- identity?: string | Record<string, unknown>;
41
- }
42
- interface NormalizedAthenaError {
43
- kind: AthenaErrorKind;
44
- code: AthenaErrorCode;
45
- category: AthenaErrorCategory;
46
- retryable: boolean;
47
- status?: number;
48
- constraint?: string;
49
- table?: string;
50
- operation?: string;
51
- message: string;
52
- raw: unknown;
53
- }
54
- interface AthenaErrorInput {
55
- code: AthenaErrorCode;
56
- kind: AthenaErrorKind;
57
- category: AthenaErrorCategory;
58
- message: string;
59
- status?: number;
60
- retryable?: boolean;
61
- requestId?: string;
62
- context?: AthenaOperationContext;
63
- raw?: unknown;
64
- }
65
- interface UnwrapOptions {
66
- allowNull?: boolean;
67
- context?: AthenaOperationContext;
68
- }
69
- interface UnwrapOneOptions extends UnwrapOptions {
70
- requireExactlyOne?: boolean;
71
- }
72
- interface IntCoercionOptions {
73
- strictBigInt?: boolean;
74
- min?: number;
75
- max?: number;
76
- }
77
- type RetryBackoffStrategy = 'linear' | 'exponential' | ((attempt: number, error: unknown) => number);
78
- interface RetryConfig {
79
- retries: number;
80
- baseDelayMs?: number;
81
- maxDelayMs?: number;
82
- backoff?: RetryBackoffStrategy;
83
- jitter?: boolean | number;
84
- shouldRetry?: (error: unknown, attempt: number) => boolean | Promise<boolean>;
85
- }
86
- interface RequireAffectedOptions {
87
- min?: number;
88
- }
89
- /**
90
- * Parses a string-based boolean flag with a deterministic fallback.
91
- *
92
- * Accepts common truthy/falsey token variants used by env vars and CLI flags.
93
- */
94
- declare function parseBooleanFlag(rawValue: string | undefined, fallback: boolean): boolean;
95
- declare class AthenaError extends Error {
96
- readonly code: AthenaErrorCode;
97
- readonly kind: AthenaErrorKind;
98
- readonly category: AthenaErrorCategory;
99
- readonly status?: number;
100
- readonly retryable: boolean;
101
- readonly requestId?: string;
102
- readonly context?: AthenaOperationContext;
103
- readonly raw?: unknown;
104
- constructor(input: AthenaErrorInput);
105
- }
106
- /**
107
- * Returns `true` when a result is successful (`2xx` status and no `error`).
108
- */
109
- declare function isOk<T>(result: AthenaResult<T>): boolean;
110
- /**
111
- * Normalizes any Athena failure shape into a stable, typed error envelope.
112
- *
113
- * Accepts `AthenaResult`, `AthenaGatewayError`, native `Error`, or unknown values.
114
- * Optional `context` can override inferred table/operation metadata for clearer diagnostics.
115
- */
116
- declare function normalizeAthenaError(resultOrError: unknown, context?: AthenaOperationContext): NormalizedAthenaError;
117
- /**
118
- * Unwraps a successful result into a row array.
119
- *
120
- * - Throws on failed results.
121
- * - Converts `null` data to an empty array.
122
- * - Wraps scalar data in a single-element array.
123
- */
124
- declare function unwrapRows<T>(result: AthenaResult<T[] | T | null>, options?: UnwrapOptions): T[];
125
- /**
126
- * Unwraps successful result data from `AthenaResult<T | null>`.
127
- *
128
- * By default, `null` data throws. Pass `{ allowNull: true }` to permit nullable payloads.
129
- */
130
- declare function unwrap<T>(result: AthenaResult<T | null>, options: UnwrapOptions & {
131
- allowNull: true;
132
- }): T | null;
133
- declare function unwrap<T>(result: AthenaResult<T | null>, options?: UnwrapOptions): T;
134
- /**
135
- * Unwraps the first row from a successful result that may contain arrays/scalars/null.
136
- *
137
- * - Throws on failed results.
138
- * - Throws when no row exists unless `allowNull: true` is provided.
139
- * - Optionally enforces exact cardinality via `requireExactlyOne`.
140
- */
141
- declare function unwrapOne<T>(result: AthenaResult<T[] | T | null>, options: UnwrapOneOptions & {
142
- allowNull: true;
143
- }): T | null;
144
- declare function unwrapOne<T>(result: AthenaResult<T[] | T | null>, options?: UnwrapOneOptions): T;
145
- /**
146
- * Asserts that an Athena result is successful.
147
- *
148
- * Returns the original result for fluent composition and throws `AthenaGatewayError` on failure.
149
- */
150
- declare function requireSuccess<T>(result: AthenaResult<T>, context?: AthenaOperationContext): AthenaResult<T>;
151
- /**
152
- * Enforces mutation postconditions based on `result.count`.
153
- *
154
- * - Validates success first.
155
- * - Requires a non-null count in the response.
156
- * - Validates `count >= min` (default: `1`).
157
- *
158
- * Useful for guaranteeing that critical writes actually affected rows.
159
- */
160
- declare function requireAffected<T>(result: AthenaResult<T>, options?: RequireAffectedOptions, context?: AthenaOperationContext): number;
161
- /**
162
- * Safely coerces `unknown` values into finite integers.
163
- *
164
- * Returns `null` when coercion fails or bounds/strict bigint checks are violated.
165
- */
166
- declare function coerceInt(value: unknown, options?: IntCoercionOptions): number | null;
167
- /**
168
- * Strict integer assertion wrapper around `coerceInt`.
169
- *
170
- * Throws a `TypeError` with the provided label when coercion fails.
171
- */
172
- declare function assertInt(value: unknown, label?: string, options?: IntCoercionOptions): number;
173
- /**
174
- * Retries an async operation with configurable backoff and retry policy.
175
- *
176
- * `retries` represents additional attempts after the first failure.
177
- * By default, transient and rate-limit errors are retried.
178
- */
179
- declare function withRetry<T>(config: RetryConfig, fn: () => Promise<T>): Promise<T>;
180
-
181
- type AthenaRowShape$2 = Record<string, AthenaJsonValue | undefined>;
182
- type AthenaUpsertOptions<Update> = AthenaGatewayCallOptions & {
183
- updateBody?: Update;
184
- onConflict?: string | string[];
185
- };
186
- interface AthenaDbModule {
187
- from<Row = AthenaRowShape$2, Insert = Partial<Row>, Update = Partial<Insert>>(table: string, options?: AthenaFromOptions): TableQueryBuilder<Row, Insert, Update>;
188
- select<Row = AthenaRowShape$2, SelectedRow = Row>(table: string, columns?: string | string[], options?: AthenaGatewayCallOptions): SelectChain<Row, SelectedRow>;
189
- insert<Row = AthenaRowShape$2, Insert = Partial<Row>>(table: string, values: Insert, options?: AthenaGatewayCallOptions): MutationQuery<Row>;
190
- insert<Row = AthenaRowShape$2, Insert = Partial<Row>>(table: string, values: Insert[], options?: AthenaGatewayCallOptions): MutationQuery<Row[]>;
191
- upsert<Row = AthenaRowShape$2, Insert = Partial<Row>, Update = Partial<Insert>>(table: string, values: Insert, options?: AthenaUpsertOptions<Update>): MutationQuery<Row>;
192
- upsert<Row = AthenaRowShape$2, Insert = Partial<Row>, Update = Partial<Insert>>(table: string, values: Insert[], options?: AthenaUpsertOptions<Update>): MutationQuery<Row[]>;
193
- update<Row = AthenaRowShape$2, Insert = Partial<Row>, Update = Partial<Insert>>(table: string, values: Update, options?: AthenaGatewayCallOptions): UpdateChain<Row>;
194
- delete<Row = AthenaRowShape$2>(table: string, options?: AthenaGatewayCallOptions & {
195
- resourceId?: string;
196
- }): MutationQuery<Row | null>;
197
- rpc<Row = unknown, Args extends AthenaJsonObject = AthenaJsonObject>(fn: string, args?: Args, options?: AthenaRpcCallOptions): RpcQueryBuilder<Row>;
198
- query<Row = unknown>(query: string, options?: AthenaGatewayCallOptions): Promise<AthenaResult<Row[]>>;
199
- }
200
-
201
- declare function verifyAthenaGatewayUrl(baseUrl: string, options?: AthenaGatewayConnectionOptions): Promise<AthenaGatewayConnectionResult>;
202
-
203
- declare const storageSdkManifest: {
204
- readonly namespace: "storage";
205
- readonly basePath: "/storage";
206
- readonly envelopeKinds: {
207
- readonly raw: "response body is the payload";
208
- readonly athena: "response body is { status, message, data }";
209
- };
210
- readonly methods: readonly [{
211
- readonly name: "listStorageCatalogs";
212
- readonly method: "GET";
213
- readonly path: "/storage/catalogs";
214
- readonly responseEnvelope: "raw";
215
- readonly responseType: "{ data: S3CatalogItem[] }";
216
- }, {
217
- readonly name: "createStorageCatalog";
218
- readonly method: "POST";
219
- readonly path: "/storage/catalogs";
220
- readonly requestType: "CreateStorageCatalogRequest";
221
- readonly responseEnvelope: "raw";
222
- readonly responseType: "S3CatalogItem";
223
- }, {
224
- readonly name: "updateStorageCatalog";
225
- readonly method: "PATCH";
226
- readonly path: "/storage/catalogs/{id}";
227
- readonly pathParams: readonly ["id"];
228
- readonly requestType: "UpdateStorageCatalogRequest";
229
- readonly responseEnvelope: "raw";
230
- readonly responseType: "S3CatalogItem";
231
- }, {
232
- readonly name: "deleteStorageCatalog";
233
- readonly method: "DELETE";
234
- readonly path: "/storage/catalogs/{id}";
235
- readonly pathParams: readonly ["id"];
236
- readonly responseEnvelope: "raw";
237
- readonly responseType: "{ id: string; deleted: boolean }";
238
- }, {
239
- readonly name: "listStorageCredentials";
240
- readonly method: "GET";
241
- readonly path: "/storage/credentials";
242
- readonly responseEnvelope: "raw";
243
- readonly responseType: "{ data: S3CredentialListItem[] }";
244
- }, {
245
- readonly name: "createStorageUploadUrl";
246
- readonly method: "POST";
247
- readonly path: "/storage/files/upload-url";
248
- readonly requestType: "CreateStorageUploadUrlRequest";
249
- readonly responseEnvelope: "athena";
250
- readonly responseType: "StorageUploadUrlResponse";
251
- }, {
252
- readonly name: "createStorageUploadUrls";
253
- readonly method: "POST";
254
- readonly path: "/storage/files/upload-urls";
255
- readonly requestType: "CreateStorageUploadUrlsRequest";
256
- readonly responseEnvelope: "athena";
257
- readonly responseType: "StorageBatchUploadUrlResponse";
258
- }, {
259
- readonly name: "listStorageFiles";
260
- readonly method: "POST";
261
- readonly path: "/storage/files/list";
262
- readonly requestType: "ListStorageFilesRequest";
263
- readonly responseEnvelope: "athena";
264
- readonly responseType: "StorageListFilesResponse";
265
- }, {
266
- readonly name: "getStorageFile";
267
- readonly method: "GET";
268
- readonly path: "/storage/files/{file_id}";
269
- readonly pathParams: readonly ["file_id"];
270
- readonly responseEnvelope: "athena";
271
- readonly responseType: "StorageFileMutationResponse";
272
- }, {
273
- readonly name: "getStorageFileUrl";
274
- readonly method: "GET";
275
- readonly path: "/storage/files/{file_id}/url";
276
- readonly pathParams: readonly ["file_id"];
277
- readonly queryParams: readonly ["purpose"];
278
- readonly responseEnvelope: "athena";
279
- readonly responseType: "PresignedFileUrlResponse";
280
- }, {
281
- readonly name: "getStorageFileProxy";
282
- readonly method: "GET";
283
- readonly path: "/storage/files/{file_id}/proxy";
284
- readonly pathParams: readonly ["file_id"];
285
- readonly queryParams: readonly ["purpose"];
286
- readonly responseEnvelope: "raw";
287
- readonly responseType: "Response";
288
- readonly binary: true;
289
- }, {
290
- readonly name: "updateStorageFile";
291
- readonly method: "PATCH";
292
- readonly path: "/storage/files/{file_id}";
293
- readonly pathParams: readonly ["file_id"];
294
- readonly requestType: "UpdateStorageFileRequest";
295
- readonly responseEnvelope: "athena";
296
- readonly responseType: "StorageFileMutationResponse";
297
- }, {
298
- readonly name: "deleteStorageFile";
299
- readonly method: "DELETE";
300
- readonly path: "/storage/files/{file_id}";
301
- readonly pathParams: readonly ["file_id"];
302
- readonly responseEnvelope: "athena";
303
- readonly responseType: "StorageFileMutationResponse";
304
- }, {
305
- readonly name: "setStorageFileVisibility";
306
- readonly method: "PATCH";
307
- readonly path: "/storage/files/{file_id}/visibility";
308
- readonly pathParams: readonly ["file_id"];
309
- readonly requestType: "SetStorageFileVisibilityRequest";
310
- readonly responseEnvelope: "athena";
311
- readonly responseType: "StorageFileMutationResponse";
312
- }, {
313
- readonly name: "deleteStorageFolder";
314
- readonly method: "POST";
315
- readonly path: "/storage/folders/delete";
316
- readonly requestType: "DeleteStorageFolderRequest";
317
- readonly responseEnvelope: "athena";
318
- readonly responseType: "StorageFolderMutationResponse";
319
- }, {
320
- readonly name: "moveStorageFolder";
321
- readonly method: "POST";
322
- readonly path: "/storage/folders/move";
323
- readonly requestType: "MoveStorageFolderRequest";
324
- readonly responseEnvelope: "athena";
325
- readonly responseType: "StorageFolderMutationResponse";
326
- }];
327
- };
328
- interface S3CatalogItem {
329
- id: string;
330
- name: string;
331
- description: string;
332
- endpoint: string;
333
- region: string;
334
- bucket?: string | null;
335
- provider: string;
336
- is_active: boolean;
337
- active_credential_id?: string | null;
338
- active_access_key?: string | null;
339
- created_at: string;
340
- updated_at: string;
341
- }
342
- interface S3CredentialListItem {
343
- id: string;
344
- s3_id: string;
345
- name: string;
346
- description: string;
347
- endpoint: string;
348
- region: string;
349
- bucket?: string | null;
350
- provider: string;
351
- access_key: string;
352
- created_at: string;
353
- updated_at: string;
354
- }
355
- interface ManagedFileRecord {
356
- id: string;
357
- name: string;
358
- original_name?: string | null;
359
- url?: string | null;
360
- bucket: string;
361
- s3_id?: string | null;
362
- prefix_path?: string | null;
363
- size_bytes?: number | null;
364
- mime_type?: string | null;
365
- resource_id?: string | null;
366
- organization_id: string;
367
- metadata: Record<string, unknown>;
368
- created_at: string;
369
- updated_at: string;
370
- storage_key: string;
371
- uploaded_by_user_id?: string | null;
372
- extension?: string | null;
373
- is_public: boolean;
374
- status: string;
375
- deleted_at?: string | null;
376
- }
377
- interface PresignedFileUrlResponse {
378
- file_id: string;
379
- bucket: string;
380
- storage_key: string;
381
- purpose: string;
382
- url: string;
383
- expires_at: string;
384
- expires_at_epoch_seconds: number;
385
- expires_in: number;
386
- cache_hit: boolean;
387
- cache_layer: string;
388
- }
389
- interface CreateStorageCatalogRequest {
390
- name: string;
391
- description?: string;
392
- endpoint: string;
393
- region: string;
394
- bucket?: string;
395
- provider?: string;
396
- access_key_id: string;
397
- secret_key: string;
398
- session_token?: string;
399
- metadata?: Record<string, unknown>;
400
- }
401
- interface UpdateStorageCatalogRequest {
402
- name?: string;
403
- description?: string;
404
- endpoint?: string;
405
- region?: string;
406
- bucket?: string;
407
- provider?: string;
408
- access_key_id?: string;
409
- secret_key?: string;
410
- session_token?: string;
411
- is_active?: boolean;
412
- metadata?: Record<string, unknown>;
413
- }
414
- interface CreateStorageUploadUrlRequest {
415
- s3_id: string;
416
- bucket?: string;
417
- storage_key: string;
418
- name?: string;
419
- original_name?: string;
420
- resource_id?: string;
421
- mime_type?: string;
422
- content_type?: string;
423
- size_bytes?: number;
424
- file_id?: string;
425
- public?: boolean;
426
- metadata?: Record<string, unknown>;
427
- }
428
- interface CreateStorageUploadUrlsRequest {
429
- files: CreateStorageUploadUrlRequest[];
430
- }
431
- interface StorageUploadUrlResponse {
432
- file: ManagedFileRecord;
433
- upload: PresignedFileUrlResponse;
434
- }
435
- interface StorageBatchUploadUrlResponse {
436
- files: StorageUploadUrlResponse[];
437
- }
438
- interface ListStorageFilesRequest {
439
- s3_id: string;
440
- prefix: string;
441
- }
442
- interface StorageListFilesResponse {
443
- files: ManagedFileRecord[];
444
- count: number;
445
- }
446
- interface UpdateStorageFileRequest {
447
- storage_key: string;
448
- bucket?: string;
449
- }
450
- interface SetStorageFileVisibilityRequest {
451
- public: boolean;
452
- }
453
- interface DeleteStorageFolderRequest {
454
- s3_id: string;
455
- prefix: string;
456
- }
457
- interface MoveStorageFolderRequest {
458
- s3_id: string;
459
- from_prefix: string;
460
- to_prefix: string;
461
- }
462
- interface StorageFileMutationResponse {
463
- file: ManagedFileRecord;
464
- }
465
- interface StorageFolderMutationResponse {
466
- s3_id: string;
467
- prefix: string;
468
- processed_files: number;
469
- }
470
- interface AthenaEnvelope<T> {
471
- status: string;
472
- message: string;
473
- data: T;
474
- }
475
- type StorageFileAccessPurpose = 'read' | 'download' | 'stream';
476
- interface GetStorageFileUrlQuery {
477
- purpose?: StorageFileAccessPurpose | (string & {});
478
- }
479
- type AthenaStorageErrorHandler = (error: AthenaStorageError) => void | Promise<void>;
480
- interface AthenaStorageClientConfig {
481
- onError?: AthenaStorageErrorHandler;
482
- }
483
- interface AthenaStorageCallOptions extends AthenaGatewayCallOptions {
484
- signal?: AbortSignal;
485
- onError?: AthenaStorageErrorHandler;
486
- }
487
- type AthenaStorageBinaryCallOptions = AthenaStorageCallOptions;
488
- type AthenaStorageErrorCode = 'INVALID_URL' | 'NETWORK_ERROR' | 'HTTP_ERROR' | 'INVALID_JSON' | 'INVALID_ATHENA_ENVELOPE' | 'UNKNOWN_ERROR';
489
- declare const AthenaStorageErrorCode: {
490
- readonly InvalidUrl: "INVALID_URL";
491
- readonly NetworkError: "NETWORK_ERROR";
492
- readonly HttpError: "HTTP_ERROR";
493
- readonly InvalidJson: "INVALID_JSON";
494
- readonly InvalidAthenaEnvelope: "INVALID_ATHENA_ENVELOPE";
495
- readonly UnknownError: "UNKNOWN_ERROR";
496
- };
497
- interface AthenaStorageErrorDetails {
498
- code: AthenaStorageErrorCode;
499
- athenaCode: AthenaErrorCode;
500
- kind: AthenaErrorKind;
501
- category: AthenaErrorCategory;
502
- retryable: boolean;
503
- message: string;
504
- status: number;
505
- endpoint: AthenaGatewayEndpointPath;
506
- method: AthenaGatewayMethod;
507
- requestId?: string;
508
- hint?: string;
509
- cause?: string;
510
- raw: unknown;
511
- }
512
- interface AthenaStorageErrorInput {
513
- code: AthenaStorageErrorCode;
514
- message: string;
515
- status: number;
516
- endpoint: AthenaGatewayEndpointPath;
517
- method: AthenaGatewayMethod;
518
- raw?: unknown;
519
- requestId?: string;
520
- hint?: string;
521
- cause?: unknown;
522
- }
523
- declare class AthenaStorageError extends Error {
524
- readonly code: AthenaStorageErrorCode;
525
- readonly athenaCode: AthenaErrorCode;
526
- readonly kind: AthenaErrorKind;
527
- readonly category: AthenaErrorCategory;
528
- readonly retryable: boolean;
529
- readonly status: number;
530
- readonly endpoint: AthenaGatewayEndpointPath;
531
- readonly method: AthenaGatewayMethod;
532
- readonly requestId?: string;
533
- readonly hint?: string;
534
- readonly causeDetail?: string;
535
- readonly raw: unknown;
536
- readonly normalized: NormalizedAthenaError;
537
- readonly __athenaNormalizedError: NormalizedAthenaError;
538
- constructor(input: AthenaStorageErrorInput);
539
- toDetails(): AthenaStorageErrorDetails;
540
- }
541
- interface AthenaStorageModule {
542
- listStorageCatalogs(options?: AthenaStorageCallOptions): Promise<{
543
- data: S3CatalogItem[];
544
- }>;
545
- createStorageCatalog(input: CreateStorageCatalogRequest, options?: AthenaStorageCallOptions): Promise<S3CatalogItem>;
546
- updateStorageCatalog(id: string, input: UpdateStorageCatalogRequest, options?: AthenaStorageCallOptions): Promise<S3CatalogItem>;
547
- deleteStorageCatalog(id: string, options?: AthenaStorageCallOptions): Promise<{
548
- id: string;
549
- deleted: boolean;
550
- }>;
551
- listStorageCredentials(options?: AthenaStorageCallOptions): Promise<{
552
- data: S3CredentialListItem[];
553
- }>;
554
- createStorageUploadUrl(input: CreateStorageUploadUrlRequest, options?: AthenaStorageCallOptions): Promise<StorageUploadUrlResponse>;
555
- createStorageUploadUrls(input: CreateStorageUploadUrlsRequest, options?: AthenaStorageCallOptions): Promise<StorageBatchUploadUrlResponse>;
556
- listStorageFiles(input: ListStorageFilesRequest, options?: AthenaStorageCallOptions): Promise<StorageListFilesResponse>;
557
- getStorageFile(fileId: string, options?: AthenaStorageCallOptions): Promise<StorageFileMutationResponse>;
558
- getStorageFileUrl(fileId: string, query?: GetStorageFileUrlQuery, options?: AthenaStorageCallOptions): Promise<PresignedFileUrlResponse>;
559
- getStorageFileProxy(fileId: string, query?: GetStorageFileUrlQuery, options?: AthenaStorageBinaryCallOptions): Promise<Response>;
560
- updateStorageFile(fileId: string, input: UpdateStorageFileRequest, options?: AthenaStorageCallOptions): Promise<StorageFileMutationResponse>;
561
- deleteStorageFile(fileId: string, options?: AthenaStorageCallOptions): Promise<StorageFileMutationResponse>;
562
- setStorageFileVisibility(fileId: string, input: SetStorageFileVisibilityRequest, options?: AthenaStorageCallOptions): Promise<StorageFileMutationResponse>;
563
- deleteStorageFolder(input: DeleteStorageFolderRequest, options?: AthenaStorageCallOptions): Promise<StorageFolderMutationResponse>;
564
- moveStorageFolder(input: MoveStorageFolderRequest, options?: AthenaStorageCallOptions): Promise<StorageFolderMutationResponse>;
565
- }
566
- declare function createAthenaStorageError(input: AthenaStorageErrorInput): AthenaStorageError;
567
-
568
- type AthenaRowShape$1 = Record<string, AthenaJsonValue | undefined>;
569
- type FilterColumnKey$1<Row> = Extract<keyof NonNullable<Row>, string>;
570
- type ResolvedFilterColumnKey$1<Row> = [FilterColumnKey$1<Row>] extends [never] ? string : FilterColumnKey$1<Row>;
571
- type AthenaFilterOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'like' | 'ilike' | 'is' | 'in' | 'contains' | 'containedBy';
572
- type AthenaWherePrimitive = AthenaConditionValue;
573
- type AthenaWhereOperatorInput = {
574
- eq?: AthenaConditionValue;
575
- neq?: AthenaConditionValue;
576
- gt?: AthenaConditionValue;
577
- gte?: AthenaConditionValue;
578
- lt?: AthenaConditionValue;
579
- lte?: AthenaConditionValue;
580
- like?: AthenaConditionValue;
581
- ilike?: AthenaConditionValue;
582
- is?: AthenaConditionValue;
583
- in?: AthenaConditionArrayValue;
584
- contains?: AthenaConditionArrayValue;
585
- containedBy?: AthenaConditionArrayValue;
586
- };
587
- type AthenaWhereColumnInput<Row = AthenaRowShape$1> = Partial<Record<ResolvedFilterColumnKey$1<Row>, AthenaWherePrimitive | AthenaWhereOperatorInput>>;
588
- type AthenaBooleanSafeOperator = Exclude<AthenaFilterOperator, 'in' | 'contains' | 'containedBy'>;
589
- type AthenaWhereBooleanSafeOperatorInput = Partial<Record<AthenaBooleanSafeOperator, AthenaConditionValue>>;
590
- type AthenaWhereBooleanNotOperatorInput = {
591
- [K in AthenaBooleanSafeOperator]: {
592
- [P in K]: AthenaConditionValue;
593
- } & Partial<Record<Exclude<AthenaBooleanSafeOperator, K>, never>>;
594
- }[AthenaBooleanSafeOperator];
595
- type AthenaStrictBooleanOperand<Keys extends string, Value> = {
596
- [K in Keys]: {
597
- [P in K]: Value;
598
- } & Partial<Record<Exclude<Keys, K>, never>>;
599
- }[Keys];
600
- type AthenaNonEmptyArray<T> = [T, ...T[]];
601
- type AthenaWhereBooleanOperand<Row = AthenaRowShape$1> = string extends ResolvedFilterColumnKey$1<Row> ? AthenaWhereColumnInput<Row> : AthenaStrictBooleanOperand<ResolvedFilterColumnKey$1<Row>, AthenaWherePrimitive | AthenaWhereBooleanSafeOperatorInput>;
602
- type AthenaWhereNotOperand<Row = AthenaRowShape$1> = string extends ResolvedFilterColumnKey$1<Row> ? AthenaWhereColumnInput<Row> : AthenaStrictBooleanOperand<ResolvedFilterColumnKey$1<Row>, AthenaWherePrimitive | AthenaWhereBooleanNotOperatorInput>;
603
- type AthenaWhere<Row = AthenaRowShape$1> = AthenaWhereColumnInput<Row> & {
604
- or?: string extends ResolvedFilterColumnKey$1<Row> ? Array<AthenaWhereColumnInput<Row>> : AthenaNonEmptyArray<AthenaWhereBooleanOperand<Row>>;
605
- not?: AthenaWhereNotOperand<Row>;
606
- };
607
- interface AthenaRelationSelectNode<TSelect extends AthenaSelectShape = AthenaSelectShape> {
608
- select: TSelect;
609
- as?: string;
610
- via?: string;
611
- schema?: string;
612
- }
613
- type AthenaSelectShape = Record<string, true | AthenaRelationSelectNode<AthenaSelectShape>>;
614
- type AthenaAllowedRelationSelectNodeKey = 'select' | 'as' | 'via' | 'schema';
615
- type AthenaValidatedRelationSelectNode<TNode> = TNode extends {
616
- select: infer TChild;
617
- } ? Exclude<keyof TNode, AthenaAllowedRelationSelectNodeKey> extends never ? TNode extends {
618
- schema: string;
619
- via: string;
620
- } ? never : TChild extends Record<string, unknown> ? {
621
- [K in keyof TNode]: K extends 'select' ? AthenaValidatedSelectShape<TChild> : K extends AthenaAllowedRelationSelectNodeKey ? TNode[K] : never;
622
- } : never : never : never;
623
- type AthenaValidatedSelectShape<TSelect> = {
624
- [K in keyof TSelect]: TSelect[K] extends true ? true : AthenaValidatedRelationSelectNode<TSelect[K]>;
625
- };
626
- type GenericRegistryDef = RegistryDef<Record<string, DatabaseDef<Record<string, SchemaDef<Record<string, AnyModelDef>>>>>>;
627
- type AthenaOrderByDirectionInput = 'asc' | 'desc' | 'ascending' | 'descending' | boolean | {
628
- ascending?: boolean;
629
- };
630
- type AthenaOrderBy<Row = AthenaRowShape$1> = {
631
- column: ResolvedFilterColumnKey$1<Row>;
632
- ascending?: boolean;
633
- } | Partial<Record<ResolvedFilterColumnKey$1<Row>, AthenaOrderByDirectionInput>>;
634
- interface AthenaFindManyOptions<Row = AthenaRowShape$1, TSelect extends AthenaSelectShape = AthenaSelectShape> {
635
- select: TSelect;
636
- where?: AthenaWhere<Row>;
637
- orderBy?: AthenaOrderBy<Row>;
638
- limit?: number;
639
- }
640
- type AthenaModelContext<TRegistry extends GenericRegistryDef = GenericRegistryDef, TDatabase extends string = string, TSchema extends string = string, TModel extends AnyModelDef = AnyModelDef> = {
641
- registry: TRegistry;
642
- database: TDatabase;
643
- schema: TSchema;
644
- model: TModel;
645
- };
646
- type Simplify<T> = {
647
- [K in keyof T]: T[K];
648
- } & {};
649
- type ContextRegistry<TContext> = TContext extends AthenaModelContext<infer TRegistry, string, string, AnyModelDef> ? TRegistry : never;
650
- type ContextDatabase<TContext> = TContext extends AthenaModelContext<GenericRegistryDef, infer TDatabase, string, AnyModelDef> ? TDatabase : never;
651
- type ContextModel<TContext> = TContext extends AthenaModelContext<GenericRegistryDef, string, string, infer TModel> ? TModel : never;
652
- type ModelMetaOf<TContext> = ContextModel<TContext> extends ModelDef<unknown, unknown, unknown, infer TMeta> ? TMeta : never;
653
- type ModelRelationsOf<TContext> = NonNullable<ModelMetaOf<TContext>['relations']>;
654
- type SelectedResultKey<TKey extends string, TValue> = TValue extends {
655
- as: infer TAlias extends string;
656
- } ? TAlias : TKey;
657
- type ScalarSelectionResult<Row, TSelect extends AthenaSelectShape> = {
658
- [TKey in Extract<keyof TSelect, string> as TSelect[TKey] extends true ? TKey : never]-?: TKey extends keyof NonNullable<Row> ? NonNullable<Row>[TKey] : unknown;
659
- };
660
- type RelationByKey<TContext, TKey extends string> = TKey extends keyof ModelRelationsOf<TContext> ? ModelRelationsOf<TContext>[TKey] : never;
661
- type RelationByVia<TContext, TVia extends string> = {
662
- [TKey in keyof ModelRelationsOf<TContext>]: ModelRelationsOf<TContext>[TKey] extends infer TRelation ? TRelation extends ModelRelationMetadata ? TVia extends TRelation['sourceColumns'][number] ? TRelation : never : never : never;
663
- }[keyof ModelRelationsOf<TContext>];
664
- type ResolvedRelation<TContext, TKey extends string, TValue> = RelationByKey<TContext, TKey> extends never ? TValue extends {
665
- via: infer TVia extends string;
666
- } ? RelationByVia<TContext, TVia> : never : RelationByKey<TContext, TKey>;
667
- type TargetDatabaseName<TContext, TRelation extends ModelRelationMetadata> = TRelation['targetDatabase'] extends string ? TRelation['targetDatabase'] : ContextDatabase<TContext>;
668
- type ResolveTargetModel<TContext, TRelation extends ModelRelationMetadata> = ContextRegistry<TContext> extends infer TRegistry ? TRegistry extends GenericRegistryDef ? TargetDatabaseName<TContext, TRelation> extends keyof TRegistry & string ? TRelation['targetSchema'] extends keyof TRegistry[TargetDatabaseName<TContext, TRelation>]['schemas'] & string ? TRelation['targetModel'] extends keyof TRegistry[TargetDatabaseName<TContext, TRelation>]['schemas'][TRelation['targetSchema']]['models'] & string ? TRegistry[TargetDatabaseName<TContext, TRelation>]['schemas'][TRelation['targetSchema']]['models'][TRelation['targetModel']] : never : never : never : never : never;
669
- type RelationResultValue<TRelation extends ModelRelationMetadata, TValue, TContext> = TValue extends AthenaRelationSelectNode<infer TChildSelect> ? ResolveTargetModel<TContext, TRelation> extends infer TTargetModel ? TTargetModel extends AnyModelDef ? TRelation['kind'] extends 'one-to-many' | 'many-to-many' ? Array<AthenaFindManyResult<RowOf<TTargetModel>, TChildSelect, AthenaModelContext<ContextRegistry<TContext>, TargetDatabaseName<TContext, TRelation>, TRelation['targetSchema'], TTargetModel>>> : AthenaFindManyResult<RowOf<TTargetModel>, TChildSelect, AthenaModelContext<ContextRegistry<TContext>, TargetDatabaseName<TContext, TRelation>, TRelation['targetSchema'], TTargetModel>> | null : unknown : unknown : never;
670
- type RelationSelectionResult<TContext, TSelect extends AthenaSelectShape> = {
671
- [TKey in Extract<keyof TSelect, string> as TSelect[TKey] extends AthenaRelationSelectNode<AthenaSelectShape> ? SelectedResultKey<TKey, TSelect[TKey]> : never]-?: ResolvedRelation<TContext, TKey, TSelect[TKey]> extends infer TRelation ? TRelation extends ModelRelationMetadata ? RelationResultValue<TRelation, TSelect[TKey], TContext> : unknown : unknown;
672
- };
673
- type AthenaFindManyResult<Row, TSelect extends AthenaSelectShape, TContext = unknown> = Simplify<ScalarSelectionResult<Row, TSelect> & RelationSelectionResult<TContext, TSelect>>;
674
-
675
- interface AthenaResult<T> {
676
- data: T | null;
677
- error: AthenaResultError | null;
678
- statusText?: string | null;
679
- /**
680
- * @deprecated Prefer `error?.gatewayCode`, `error?.hint`, and related fields on `error`.
681
- */
682
- errorDetails?: AthenaGatewayErrorDetails | null;
683
- status: number;
684
- count?: number | null;
685
- raw: unknown;
686
- }
687
- interface AthenaResultError {
688
- message: string;
689
- code: string | null;
690
- athenaCode: NormalizedAthenaError['code'];
691
- gatewayCode?: AthenaGatewayErrorDetails['code'] | null;
692
- kind: NormalizedAthenaError['kind'];
693
- category: NormalizedAthenaError['category'];
694
- retryable: boolean;
695
- details: unknown | null;
696
- hint: string | null;
697
- status: number;
698
- statusText: string | null;
699
- constraint?: string;
700
- table?: string;
701
- operation?: string;
702
- endpoint?: AthenaGatewayErrorDetails['endpoint'];
703
- method?: AthenaGatewayErrorDetails['method'];
704
- requestId?: string;
705
- cause?: string;
706
- raw: unknown;
707
- }
708
- interface AthenaClientExperimentalOptions {
709
- /**
710
- * @deprecated Failed `AthenaResult` values now include normalized structured `error`
711
- * envelopes by default. This flag is retained as a no-op compatibility switch.
712
- */
713
- enableErrorNormalization?: boolean;
714
- /**
715
- * Retry retryable read failures (`select`, `findMany`, `query`) with a fixed internal policy.
716
- *
717
- * Applies two additional attempts with exponential backoff and jitter.
718
- */
719
- retryReads?: boolean;
720
- /**
721
- * Emit execution diagnostics for every query/mutation/RPC invocation.
722
- * Includes payload, synthesized SQL, full outcome, and best-effort callsite metadata.
723
- */
724
- traceQueries?: boolean | AthenaQueryTraceOptions;
725
- /**
726
- * Send the original `findMany(...)` AST body for clean object-select reads.
727
- * This requires gateway support and falls back to legacy compiled transport
728
- * when a chain carries filter/pagination state that the AST payload cannot
729
- * represent losslessly yet.
730
- */
731
- findManyAst?: boolean;
732
- /**
733
- * Expose the experimental `client.storage.*` bindings for Athena storage APIs.
734
- */
735
- athenaStorageBackend?: boolean;
736
- /**
737
- * Optional storage SDK runtime hooks. Only used when `athenaStorageBackend` is enabled.
738
- */
739
- storage?: AthenaStorageClientConfig;
740
- }
741
- interface AthenaQueryTraceOptions {
742
- /**
743
- * Custom sink for trace events. Defaults to console.info.
744
- */
745
- logger?: (event: AthenaQueryTraceEvent) => void;
746
- }
747
- interface AthenaQueryTraceCallsite {
748
- filePath: string;
749
- fileName: string;
750
- line: number;
751
- column: number;
752
- frame?: string;
753
- functionName?: string;
754
- }
755
- interface AthenaQueryTraceEvent {
756
- timestamp: string;
757
- durationMs: number;
758
- operation: 'select' | 'insert' | 'upsert' | 'update' | 'delete' | 'rpc' | 'query';
759
- endpoint: '/gateway/fetch' | '/gateway/insert' | '/gateway/update' | '/gateway/delete' | '/gateway/rpc' | '/gateway/query' | `/rpc/${string}`;
760
- table?: string;
761
- functionName?: string;
762
- sql: string;
763
- payload: unknown;
764
- options?: AthenaGatewayCallOptions | AthenaRpcCallOptions;
765
- callsite: AthenaQueryTraceCallsite | null;
766
- outcome?: {
767
- status: number;
768
- error: AthenaResultError | null;
769
- errorDetails?: AthenaGatewayErrorDetails | null;
770
- count?: number | null;
771
- data: unknown;
772
- raw: unknown;
773
- };
774
- thrownError?: unknown;
775
- }
776
- type MutationSingleResult<Result> = Result extends Array<infer Item> ? Item | null : Result | null;
777
- type AthenaRowShape = Record<string, AthenaJsonValue | undefined>;
778
- type FilterColumnKey<Row> = Extract<keyof NonNullable<Row>, string>;
779
- type ResolvedFilterColumnKey<Row> = [FilterColumnKey<Row>] extends [never] ? string : FilterColumnKey<Row>;
780
- interface MutationQuery<Result> extends PromiseLike<AthenaResult<Result>> {
781
- select(columns?: string | string[], options?: AthenaGatewayCallOptions): Promise<AthenaResult<Result>>;
782
- returning(columns?: string | string[], options?: AthenaGatewayCallOptions): Promise<AthenaResult<Result>>;
783
- single(columns?: string | string[], options?: AthenaGatewayCallOptions): Promise<AthenaResult<MutationSingleResult<Result>>>;
784
- maybeSingle(columns?: string | string[], options?: AthenaGatewayCallOptions): Promise<AthenaResult<MutationSingleResult<Result>>>;
785
- then<TResult1 = AthenaResult<Result>, TResult2 = never>(onfulfilled?: ((value: AthenaResult<Result>) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
786
- catch<TResult = never>(onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | undefined | null): Promise<AthenaResult<Result> | TResult>;
787
- finally(onfinally?: (() => void) | undefined | null): Promise<AthenaResult<Result>>;
788
- }
789
- interface OrderOptions {
790
- ascending?: boolean;
791
- }
792
- /** Shared filter chain - supports eq, limit, etc. in any order relative to select/update */
793
- interface FilterChain<Self, Row> {
794
- eq(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
795
- eqCast(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue, cast: AthenaConditionCastType): Self;
796
- eqUuid(column: ResolvedFilterColumnKey<Row>, value: string): Self;
797
- match(filters: Partial<Record<ResolvedFilterColumnKey<Row>, AthenaConditionValue>>): Self;
798
- range(from: number, to: number): Self;
799
- limit(count: number): Self;
800
- offset(count: number): Self;
801
- currentPage(value: number): Self;
802
- pageSize(value: number): Self;
803
- totalPages(value: number): Self;
804
- order(column: ResolvedFilterColumnKey<Row>, options?: OrderOptions): Self;
805
- gt(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
806
- gte(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
807
- lt(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
808
- lte(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
809
- neq(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
810
- like(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
811
- ilike(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
812
- is(column: ResolvedFilterColumnKey<Row>, value: AthenaConditionValue): Self;
813
- in(column: ResolvedFilterColumnKey<Row>, values: AthenaConditionArrayValue): Self;
814
- contains(column: ResolvedFilterColumnKey<Row>, values: AthenaConditionArrayValue): Self;
815
- containedBy(column: ResolvedFilterColumnKey<Row>, values: AthenaConditionArrayValue): Self;
816
- not(columnOrExpression: ResolvedFilterColumnKey<Row> | string, operator?: AthenaConditionOperator, value?: AthenaConditionValue): Self;
817
- or(expression: string): Self;
818
- }
819
- /** Chain returned by select() - supports filters and single/maybeSingle before execution */
820
- interface SelectChain<Row, SelectedRow = Row> extends FilterChain<SelectChain<Row, SelectedRow>, Row>, PromiseLike<AthenaResult<SelectedRow[]>> {
821
- single<T = SelectedRow>(columns?: string | string[], options?: AthenaGatewayCallOptions): Promise<AthenaResult<T | null>>;
822
- maybeSingle<T = SelectedRow>(columns?: string | string[], options?: AthenaGatewayCallOptions): Promise<AthenaResult<T | null>>;
823
- }
824
- /** Chain returned by update() - supports filters before execution, plus select/returning */
825
- interface UpdateChain<Row> extends FilterChain<UpdateChain<Row>, Row>, MutationQuery<Row[]> {
826
- }
827
- interface RpcFilterChain<Self> {
828
- eq(column: string, value: AthenaConditionValue): Self;
829
- neq(column: string, value: AthenaConditionValue): Self;
830
- gt(column: string, value: AthenaConditionValue): Self;
831
- gte(column: string, value: AthenaConditionValue): Self;
832
- lt(column: string, value: AthenaConditionValue): Self;
833
- lte(column: string, value: AthenaConditionValue): Self;
834
- like(column: string, value: AthenaConditionValue): Self;
835
- ilike(column: string, value: AthenaConditionValue): Self;
836
- is(column: string, value: AthenaConditionValue): Self;
837
- in(column: string, values: AthenaConditionArrayValue): Self;
838
- }
839
- interface RpcOrderOptions {
840
- ascending?: boolean;
841
- }
842
- interface RpcQueryBuilder<Row> extends RpcFilterChain<RpcQueryBuilder<Row>>, PromiseLike<AthenaResult<Row[]>> {
843
- select(columns?: string | string[], options?: AthenaRpcCallOptions): Promise<AthenaResult<Row[]>>;
844
- single<T = Row>(columns?: string | string[], options?: AthenaRpcCallOptions): Promise<AthenaResult<T | null>>;
845
- maybeSingle<T = Row>(columns?: string | string[], options?: AthenaRpcCallOptions): Promise<AthenaResult<T | null>>;
846
- order(column: string, options?: RpcOrderOptions): RpcQueryBuilder<Row>;
847
- limit(count: number): RpcQueryBuilder<Row>;
848
- offset(count: number): RpcQueryBuilder<Row>;
849
- range(from: number, to: number): RpcQueryBuilder<Row>;
850
- }
851
- interface AthenaFromOptions {
852
- schema?: string;
853
- }
854
- interface TableQueryBuilder<Row, Insert = Partial<Row>, Update = Partial<Insert>, TContext = unknown> extends FilterChain<TableQueryBuilder<Row, Insert, Update, TContext>, Row> {
855
- select<T = Row>(columns?: string | string[], options?: AthenaGatewayCallOptions): SelectChain<Row, T>;
856
- findMany<const TSelect extends AthenaSelectShape>(options: AthenaFindManyOptions<Row, TSelect> & {
857
- select: AthenaValidatedSelectShape<TSelect>;
858
- }): Promise<AthenaResult<Array<AthenaFindManyResult<Row, TSelect, TContext>>>>;
859
- insert(values: Insert, options?: AthenaGatewayCallOptions): MutationQuery<Row>;
860
- insert(values: Insert[], options?: AthenaGatewayCallOptions): MutationQuery<Row[]>;
861
- upsert(values: Insert, options?: AthenaGatewayCallOptions & {
862
- updateBody?: Update;
863
- onConflict?: string | string[];
864
- }): MutationQuery<Row>;
865
- upsert(values: Insert[], options?: AthenaGatewayCallOptions & {
866
- updateBody?: Update;
867
- onConflict?: string | string[];
868
- }): MutationQuery<Row[]>;
869
- update(values: Update, options?: AthenaGatewayCallOptions): UpdateChain<Row>;
870
- delete(options?: AthenaGatewayCallOptions & {
871
- resourceId?: string;
872
- }): MutationQuery<Row | null>;
873
- single<T = Row>(columns?: string | string[], options?: AthenaGatewayCallOptions): Promise<AthenaResult<T | null>>;
874
- maybeSingle<T = Row>(columns?: string | string[], options?: AthenaGatewayCallOptions): Promise<AthenaResult<T | null>>;
875
- reset(): TableQueryBuilder<Row, Insert, Update, TContext>;
876
- }
877
- interface AthenaSdkClient {
878
- from<Row = AthenaRowShape, Insert = Partial<Row>, Update = Partial<Insert>>(table: string, options?: AthenaFromOptions): TableQueryBuilder<Row, Insert, Update>;
879
- db: AthenaDbModule;
880
- rpc<Row = unknown, Args extends AthenaJsonObject = AthenaJsonObject>(fn: string, args?: Args, options?: AthenaRpcCallOptions): RpcQueryBuilder<Row>;
881
- query<Row = unknown>(query: string, options?: AthenaGatewayCallOptions): Promise<AthenaResult<Row[]>>;
882
- verifyConnection(options?: AthenaGatewayConnectionOptions): Promise<AthenaGatewayConnectionResult>;
883
- }
884
- interface AthenaSdkClientWithAuth extends AthenaSdkClient {
885
- auth: AthenaAuthBindings;
886
- }
887
- interface AthenaSdkClientWithStorage extends AthenaSdkClientWithAuth {
888
- storage: AthenaStorageModule;
889
- }
890
- interface AthenaCreateClientOptions extends Pick<AthenaGatewayCallOptions, 'client' | 'headers' | 'backend'> {
891
- auth?: AthenaAuthClientConfig;
892
- experimental?: AthenaClientExperimentalOptions;
893
- }
894
- interface AthenaCreateClientOptionsWithStorage extends AthenaCreateClientOptions {
895
- experimental: AthenaClientExperimentalOptions & {
896
- athenaStorageBackend: true;
897
- };
898
- }
899
- interface AthenaClientBuilder<StorageEnabled extends boolean = false> {
900
- /** Set the gateway base URL. */
901
- url(url: string): AthenaClientBuilder<StorageEnabled>;
902
- /** Set the API key used for all requests. */
903
- key(apiKey: string): AthenaClientBuilder<StorageEnabled>;
904
- /** Set the default backend routing strategy. */
905
- backend(backend: BackendConfig | BackendType): AthenaClientBuilder<StorageEnabled>;
906
- /** Set the default Athena client routing key. */
907
- client(clientName: string): AthenaClientBuilder<StorageEnabled>;
908
- /** Attach static headers to every request. */
909
- headers(headers: Record<string, string>): AthenaClientBuilder<StorageEnabled>;
910
- /** Configure Athena Auth client behavior for `client.auth.*` methods. */
911
- auth(config: AthenaAuthClientConfig): AthenaClientBuilder<StorageEnabled>;
912
- /** Configure experimental client options and narrow the built client when storage is enabled. */
913
- experimental(options: AthenaClientExperimentalOptions & {
914
- athenaStorageBackend: true;
915
- }): AthenaClientBuilder<true>;
916
- experimental(options: AthenaClientExperimentalOptions): AthenaClientBuilder<StorageEnabled>;
917
- /** Apply createClient options and narrow the built client when storage is enabled. */
918
- options(options: AthenaCreateClientOptionsWithStorage): AthenaClientBuilder<true>;
919
- options(options: AthenaCreateClientOptions): AthenaClientBuilder<StorageEnabled>;
920
- /** Build the immutable Athena SDK client. */
921
- build(): StorageEnabled extends true ? AthenaSdkClientWithStorage : AthenaSdkClientWithAuth;
922
- }
923
- /** Canonical Athena client factory with builder-based configuration. */
924
- declare class AthenaClient {
925
- /** Create a fluent builder for a strongly-typed Athena SDK client. */
926
- static builder(): AthenaClientBuilder<false>;
927
- /** Build a client from process environment variables. */
928
- static fromEnvironment(): AthenaSdkClientWithAuth;
929
- }
930
- /** Create client (convenience wrapper; use AthenaClient.builder() for full control) */
931
- declare function createClient(url: string, apiKey: string, options: AthenaCreateClientOptionsWithStorage): AthenaSdkClientWithStorage;
932
- declare function createClient(url: string, apiKey: string, options?: AthenaCreateClientOptions): AthenaSdkClientWithAuth;
933
-
934
- interface NormalizeAthenaGatewayBaseUrlOptions {
935
- defaultBaseUrl?: string;
936
- label?: string;
937
- }
938
- declare function normalizeAthenaGatewayBaseUrl(input: string | null | undefined, options?: NormalizeAthenaGatewayBaseUrlOptions): string;
939
-
940
- /**
941
- * Immutable identifier object with consistent SQL rendering.
942
- */
943
- interface SqlIdentifier {
944
- readonly segments: string[];
945
- toSql(): string;
946
- toString(): string;
947
- }
948
- /**
949
- * Creates a quoted identifier object from segment or dotted inputs.
950
- */
951
- declare function identifier(...segments: string[]): SqlIdentifier;
952
-
953
- /**
954
- * Declares a model contract with explicit metadata and typed row/insert/update shapes.
955
- */
956
- declare function defineModel<Row, Insert = Partial<Row>, Update = Partial<Insert>, Meta extends ModelMetadata<Row> = ModelMetadata<Row>>(input: {
957
- meta: Meta;
958
- }): ModelDef<Row, Insert, Update, Meta>;
959
- /**
960
- * Declares a schema-level model map.
961
- */
962
- declare function defineSchema<Models extends Record<string, AnyModelDef>>(models: Models): SchemaDef<Models>;
963
- /**
964
- * Declares a database-level schema map.
965
- */
966
- declare function defineDatabase<Schemas extends Record<string, SchemaDef<Record<string, AnyModelDef>>>>(schemas: Schemas): DatabaseDef<Schemas>;
967
- /**
968
- * Declares a top-level multi-database registry.
969
- */
970
- declare function defineRegistry<Databases extends Record<string, DatabaseDef<Record<string, SchemaDef<Record<string, AnyModelDef>>>>>>(databases: Databases): RegistryDef<Databases>;
971
-
972
- type RegistryConstraint = RegistryDef<Record<string, DatabaseDef<Record<string, SchemaDef<Record<string, AnyModelDef>>>>>>;
973
- /**
974
- * Options for creating typed Athena clients.
975
- */
976
- interface TypedClientOptions<TMap extends TenantKeyMap = TenantKeyMap> extends Pick<AthenaGatewayCallOptions, 'backend' | 'client' | 'headers'> {
977
- tenantKeyMap?: TMap;
978
- tenantContext?: TenantContext<TMap>;
979
- }
980
- /**
981
- * Typed Athena client with registry-driven model resolution and tenant-context propagation.
982
- */
983
- interface TypedAthenaClient<TRegistry extends RegistryConstraint, TTenantMap extends TenantKeyMap = Record<never, string>> extends AthenaSdkClient {
984
- readonly registry: TRegistry;
985
- readonly tenantKeyMap: Readonly<TTenantMap>;
986
- readonly tenantContext: TenantContext<TTenantMap>;
987
- withTenantContext(context: TenantContext<TTenantMap>): TypedAthenaClient<TRegistry, TTenantMap>;
988
- fromModel<TDatabase extends keyof TRegistry & string, TSchema extends keyof TRegistry[TDatabase]['schemas'] & string, TModel extends keyof TRegistry[TDatabase]['schemas'][TSchema]['models'] & string>(database: TDatabase, schema: TSchema, model: TModel): TableQueryBuilder<RowOf<ModelAt<TRegistry, TDatabase, TSchema, TModel>>, InsertOf<ModelAt<TRegistry, TDatabase, TSchema, TModel>>, UpdateOf<ModelAt<TRegistry, TDatabase, TSchema, TModel>>, {
989
- registry: TRegistry;
990
- database: TDatabase;
991
- schema: TSchema;
992
- model: ModelAt<TRegistry, TDatabase, TSchema, TModel>;
993
- }>;
994
- }
995
- /**
996
- * Creates a typed client bound to a registry contract and optional tenant header mapping.
997
- */
998
- declare function createTypedClient<TRegistry extends RegistryConstraint, TTenantMap extends TenantKeyMap = Record<never, string>>(registry: TRegistry, url: string, apiKey: string, options?: TypedClientOptions<TTenantMap>): TypedAthenaClient<TRegistry, TTenantMap>;
999
-
1000
- /**
1001
- * Constructor options for the PostgreSQL introspection provider.
1002
- */
1003
- interface PostgresIntrospectionProviderOptions {
1004
- connectionString: string;
1005
- database?: string;
1006
- schemas?: readonly string[];
1007
- }
1008
- /**
1009
- * Creates a PostgreSQL-backed schema introspection provider.
1010
- */
1011
- declare function createPostgresIntrospectionProvider(options: PostgresIntrospectionProviderOptions): SchemaIntrospectionProvider;
1012
-
1013
- interface GeneratorEnvBaseOptions<T> {
1014
- default?: T;
1015
- optional?: boolean;
1016
- }
1017
- type GeneratorEnvStringOptions = GeneratorEnvBaseOptions<string>;
1018
- type GeneratorEnvBooleanOptions = GeneratorEnvBaseOptions<boolean>;
1019
- interface GeneratorEnvListOptions extends GeneratorEnvBaseOptions<readonly string[]> {
1020
- separator?: string;
1021
- }
1022
- type GeneratorEnvJsonOptions<T> = GeneratorEnvBaseOptions<T>;
1023
- type GeneratorEnvOneOfOptions<T extends string> = GeneratorEnvBaseOptions<T>;
1024
- type GeneratorEnvHelper = {
1025
- (key: string, options?: GeneratorEnvStringOptions): string;
1026
- (key: string, options: GeneratorEnvStringOptions & {
1027
- optional: true;
1028
- }): string | undefined;
1029
- boolean(key: string, options?: GeneratorEnvBooleanOptions): boolean;
1030
- boolean(key: string, options: GeneratorEnvBooleanOptions & {
1031
- optional: true;
1032
- }): boolean | undefined;
1033
- list(key: string, options?: GeneratorEnvListOptions): string[];
1034
- list(key: string, options: GeneratorEnvListOptions & {
1035
- optional: true;
1036
- }): string[] | undefined;
1037
- json<T>(key: string, options?: GeneratorEnvJsonOptions<T>): T;
1038
- json<T>(key: string, options: GeneratorEnvJsonOptions<T> & {
1039
- optional: true;
1040
- }): T | undefined;
1041
- oneOf<const T extends string>(key: string, allowedValues: readonly T[], options?: GeneratorEnvOneOfOptions<T>): T;
1042
- oneOf<const T extends string>(key: string, allowedValues: readonly T[], options: GeneratorEnvOneOfOptions<T> & {
1043
- optional: true;
1044
- }): T | undefined;
1045
- };
1046
- /**
1047
- * Typed env reader for generator configs. This keeps `athena.config.*` files
1048
- * declarative while preserving exact field types for booleans, lists, unions,
1049
- * and JSON-backed objects.
1050
- */
1051
- declare const generatorEnv: GeneratorEnvHelper;
1052
-
1053
- declare function resolvePostgresColumnType(column: IntrospectionColumn): string;
1054
-
1055
- declare const DEFAULT_POSTGRES_SCHEMAS: readonly ["public"];
1056
- /**
1057
- * Normalizes schema selection from config or env-backed strings into a stable,
1058
- * deduplicated list. Empty selections fall back to PostgreSQL's public schema.
1059
- */
1060
- declare function normalizeSchemaSelection(input: GeneratorSchemaSelection | undefined): string[];
1061
- /**
1062
- * Resolves the effective schema list for provider-backed generator runs.
1063
- */
1064
- declare function resolveProviderSchemas(providerConfig: GeneratorProviderConfig): string[];
1065
-
1066
- /**
1067
- * @deprecated Prefer `createClient(...).auth` from `@xylex-group/athena`.
1068
- */
1069
- declare function createAuthClient(config?: AthenaAuthClientConfig): AthenaAuthSdkClient;
1070
-
1071
- type AthenaMaybePromise<T> = T | Promise<T>;
1072
- type AthenaAuthServerCookieOptions = Pick<AthenaCookiesOptions, 'session' | 'advanced'>;
1073
- declare const ATHENA_AUTH_BASE_ERROR_CODES: {
1074
- readonly HANDLER_NOT_CONFIGURED: "HANDLER_NOT_CONFIGURED";
1075
- readonly INVALID_BASE_URL: "INVALID_BASE_URL";
1076
- readonly UNTRUSTED_HOST: "UNTRUSTED_HOST";
1077
- };
1078
- interface AthenaAuthSocialProviderConfig {
1079
- clientId: string;
1080
- clientSecret: string;
1081
- scope?: string[];
1082
- [key: string]: unknown;
1083
- }
1084
- interface AthenaAuthPluginContext {
1085
- path?: string;
1086
- headers?: Headers;
1087
- context: {
1088
- returned?: unknown;
1089
- responseHeaders?: Headers;
1090
- setSession?: AthenaSessionPair | null;
1091
- clearSession?: boolean;
1092
- dontRememberMe?: boolean;
1093
- cookieOverrides?: Partial<AthenaCookieOptions>;
1094
- [key: string]: unknown;
1095
- };
1096
- }
1097
- interface AthenaAuthPluginHandlerContext extends AthenaAuthPluginContext {
1098
- auth: AthenaAuthServer;
1099
- }
1100
- interface AthenaAuthPlugin {
1101
- id: string;
1102
- version: string;
1103
- $ERROR_CODES?: Record<string, string>;
1104
- hooks?: {
1105
- after?: Array<{
1106
- matcher: (ctx: AthenaAuthPluginContext) => boolean;
1107
- handler: (ctx: AthenaAuthPluginHandlerContext) => Promise<void> | void;
1108
- }>;
1109
- };
1110
- }
1111
- interface AthenaAuthCookieRuntimeInput {
1112
- headers?: Headers;
1113
- responseHeaders?: Headers;
1114
- cookies?: AthenaAuthCookies;
1115
- getCookie?: (name: string) => string | null | undefined;
1116
- setCookie?: (name: string, value: string, attributes: AthenaCookieOptions) => void;
1117
- logger?: AthenaCookieContextRuntime['logger'];
1118
- setSignedCookie?: AthenaCookieContextRuntime['setSignedCookie'];
1119
- getSignedCookie?: AthenaCookieContextRuntime['getSignedCookie'];
1120
- setNewSession?: AthenaCookieContextRuntime['context']['setNewSession'];
1121
- }
1122
- interface AthenaAuthServerRuntimeOptions {
1123
- baseURL?: string;
1124
- basePath: string;
1125
- secret: string;
1126
- cookies: AthenaAuthServerCookieOptions;
1127
- }
1128
- type AthenaAuthDatabaseFactory<TDatabase = unknown> = (options: AthenaAuthServerRuntimeOptions) => TDatabase;
1129
- type AthenaAuthBaseURLConfig = AthenaCookiesOptions['baseURL'];
1130
- type AthenaAuthTrustedOrigins = string[] | ((request?: Request) => AthenaMaybePromise<string[]>);
1131
- type AthenaAuthTrustedProviders = string[] | ((request?: Request) => AthenaMaybePromise<string[]>);
1132
- interface AthenaAuthHandlerResult {
1133
- response?: Response;
1134
- returned?: unknown;
1135
- setSession?: AthenaSessionPair | null;
1136
- clearSession?: boolean;
1137
- dontRememberMe?: boolean;
1138
- cookieOverrides?: Partial<AthenaCookieOptions>;
1139
- }
1140
- interface AthenaAuthServerConfig<TDatabase = unknown> extends AthenaAuthServerCookieOptions {
1141
- baseURL?: AthenaAuthBaseURLConfig;
1142
- basePath?: string;
1143
- secret: string;
1144
- database: TDatabase | AthenaAuthDatabaseFactory<TDatabase>;
1145
- socialProviders?: Record<string, AthenaAuthSocialProviderConfig>;
1146
- trustedOrigins?: AthenaAuthTrustedOrigins;
1147
- trustedProviders?: AthenaAuthTrustedProviders;
1148
- api?: Record<string, unknown>;
1149
- errorCodes?: Record<string, string>;
1150
- handler?: (ctx: AthenaAuthRequestContext) => AthenaMaybePromise<Response | AthenaAuthHandlerResult>;
1151
- plugins?: AthenaAuthPlugin[];
1152
- }
1153
- type ResolveAthenaAuthDatabase<TConfig extends AthenaAuthServerConfig> = TConfig['database'] extends (...args: never[]) => infer TResult ? TResult : TConfig['database'];
1154
- interface AthenaAuthRequestContext<TConfig extends AthenaAuthServerConfig = AthenaAuthServerConfig> {
1155
- auth: AthenaAuthServer<TConfig>;
1156
- request: Request;
1157
- url: URL;
1158
- path: string;
1159
- basePath: string;
1160
- baseURL: string;
1161
- origin: string;
1162
- headers: Headers;
1163
- cookies: AthenaAuthCookies;
1164
- trustedOrigins: string[];
1165
- trustedProviders: string[];
1166
- options: TConfig;
1167
- runtime: AthenaAuthServerRuntimeOptions;
1168
- database: ResolveAthenaAuthDatabase<TConfig>;
1169
- socialProviders: NonNullable<TConfig['socialProviders']>;
1170
- }
1171
- interface AthenaAuthContext<TConfig extends AthenaAuthServerConfig = AthenaAuthServerConfig> {
1172
- auth: AthenaAuthServer<TConfig>;
1173
- options: TConfig;
1174
- runtime: AthenaAuthServerRuntimeOptions;
1175
- basePath: string;
1176
- baseURL?: string;
1177
- origin?: string;
1178
- database: ResolveAthenaAuthDatabase<TConfig>;
1179
- socialProviders: NonNullable<TConfig['socialProviders']>;
1180
- plugins: AthenaAuthPlugin[];
1181
- cookies: AthenaAuthCookies;
1182
- trustedOrigins: string[];
1183
- trustedProviders: string[];
1184
- }
1185
- interface AthenaAuthServerApi<TConfig extends AthenaAuthServerConfig = AthenaAuthServerConfig> {
1186
- applyResponseCookies: AthenaAuthServer<TConfig>['applyResponseCookies'];
1187
- clearSession: AthenaAuthServer<TConfig>['clearSession'];
1188
- createCookieContext: AthenaAuthServer<TConfig>['createCookieContext'];
1189
- getCookieCache: typeof getCookieCache;
1190
- getSessionCookie: typeof getSessionCookie;
1191
- resolveRequestContext: AthenaAuthServer<TConfig>['resolveRequestContext'];
1192
- runAfterHooks: AthenaAuthServer<TConfig>['runAfterHooks'];
1193
- setSession: AthenaAuthServer<TConfig>['setSession'];
1194
- }
1195
- interface AthenaAuthServer<TConfig extends AthenaAuthServerConfig = AthenaAuthServerConfig> {
1196
- config: TConfig;
1197
- options: TConfig;
1198
- runtime: AthenaAuthServerRuntimeOptions;
1199
- database: ResolveAthenaAuthDatabase<TConfig>;
1200
- socialProviders: NonNullable<TConfig['socialProviders']>;
1201
- plugins: AthenaAuthPlugin[];
1202
- cookies: AthenaAuthCookies;
1203
- api: AthenaAuthServerApi<TConfig> & Record<string, unknown>;
1204
- $context: Promise<AthenaAuthContext<TConfig>>;
1205
- $ERROR_CODES: Record<string, string>;
1206
- createCookieContext: (input?: AthenaAuthCookieRuntimeInput) => AthenaCookieContextRuntime;
1207
- setSession: (input: AthenaAuthCookieRuntimeInput | undefined, session: AthenaSessionPair, dontRememberMe?: boolean, overrides?: Partial<AthenaCookieOptions>) => Promise<void>;
1208
- clearSession: (input?: AthenaAuthCookieRuntimeInput, skipDontRememberMe?: boolean) => void;
1209
- applyResponseCookies: (ctx: AthenaAuthPluginContext) => Promise<Headers>;
1210
- runAfterHooks: (ctx: AthenaAuthPluginContext) => Promise<AthenaAuthPluginContext>;
1211
- resolveRequestContext: (request: Request) => Promise<AthenaAuthRequestContext<TConfig>>;
1212
- handler: (request: Request) => Promise<Response>;
1213
- }
1214
- declare function defineAthenaAuthConfig<TConfig extends AthenaAuthServerConfig>(config: TConfig): TConfig;
1215
- declare function athenaAuth<TConfig extends AthenaAuthServerConfig>(config: TConfig): AthenaAuthServer<TConfig>;
1216
-
1217
- interface AthenaAuthRenderedReactEmail {
1218
- html: string;
1219
- text?: string;
1220
- }
1221
- interface AthenaAuthReactEmailRuntimeOptions {
1222
- route?: string;
1223
- defaults?: AthenaAuthReactEmailRenderOptions;
1224
- observe?: (event: AthenaAuthReactEmailRenderEvent) => void;
1225
- }
1226
- declare function createAuthReactEmailInput<TProps extends AthenaAuthReactEmailProps = AthenaAuthReactEmailProps>(component: AthenaAuthReactEmailComponent<TProps>, props: TProps, overrides?: Omit<AthenaAuthReactEmailRenderInput, 'component' | 'props' | 'element'>): AthenaAuthReactEmailRenderInput;
1227
- declare function defineAuthEmailTemplate<TProps extends AthenaAuthReactEmailProps = AthenaAuthReactEmailProps>(definition: AthenaAuthEmailTemplateDefinition<TProps>): AthenaAuthEmailTemplateBuilder<TProps>;
1228
- declare function renderAthenaReactEmail(input: AthenaAuthReactEmailRenderInput, options?: AthenaAuthReactEmailRuntimeOptions | AthenaAuthReactEmailConfig): Promise<AthenaAuthRenderedReactEmail>;
1229
-
1230
- export { type AthenaWhere as $, ATHENA_AUTH_BASE_ERROR_CODES as A, type AthenaErrorInput as B, AthenaErrorKind as C, type AthenaFindManyOptions as D, type AthenaFindManyResult as E, type AthenaFromOptions as F, type AthenaOperationContext as G, type AthenaOrderBy as H, type AthenaQueryTraceCallsite as I, type AthenaQueryTraceEvent as J, type AthenaQueryTraceOptions as K, type AthenaRelationSelectNode as L, type AthenaResult as M, type AthenaResultError as N, type AthenaSdkClient as O, type AthenaSdkClientWithAuth as P, type AthenaSdkClientWithStorage as Q, type AthenaSelectShape as R, type AthenaStorageBinaryCallOptions as S, type AthenaStorageCallOptions as T, type AthenaStorageClientConfig as U, AthenaStorageError as V, AthenaStorageErrorCode as W, type AthenaStorageErrorDetails as X, type AthenaStorageErrorHandler as Y, type AthenaStorageErrorInput as Z, type AthenaStorageModule as _, type AthenaAuthBaseURLConfig as a, renderAthenaReactEmail as a$, type AthenaWhereBooleanOperand as a0, type AthenaWhereOperatorInput as a1, type CreateStorageCatalogRequest as a2, type CreateStorageUploadUrlRequest as a3, type CreateStorageUploadUrlsRequest as a4, DEFAULT_POSTGRES_SCHEMAS as a5, type DeleteStorageFolderRequest as a6, type GeneratorEnvBooleanOptions as a7, type GeneratorEnvJsonOptions as a8, type GeneratorEnvListOptions as a9, type TypedClientOptions as aA, type UnwrapOneOptions as aB, type UnwrapOptions as aC, type UpdateStorageCatalogRequest as aD, type UpdateStorageFileRequest as aE, assertInt as aF, athenaAuth as aG, coerceInt as aH, createAthenaStorageError as aI, createAuthClient as aJ, createAuthReactEmailInput as aK, createClient as aL, createPostgresIntrospectionProvider as aM, createTypedClient as aN, defineAthenaAuthConfig as aO, defineAuthEmailTemplate as aP, defineDatabase as aQ, defineModel as aR, defineRegistry as aS, defineSchema as aT, generatorEnv as aU, identifier as aV, isOk as aW, normalizeAthenaError as aX, normalizeAthenaGatewayBaseUrl as aY, normalizeSchemaSelection as aZ, parseBooleanFlag as a_, type GeneratorEnvOneOfOptions as aa, type GeneratorEnvStringOptions as ab, type GetStorageFileUrlQuery as ac, type IntCoercionOptions as ad, type ListStorageFilesRequest as ae, type ManagedFileRecord as af, type MoveStorageFolderRequest as ag, type NormalizedAthenaError as ah, type PostgresIntrospectionProviderOptions as ai, type PresignedFileUrlResponse as aj, type RequireAffectedOptions as ak, type RetryBackoffStrategy as al, type RetryConfig as am, type RpcOrderOptions as an, type RpcQueryBuilder as ao, type S3CatalogItem as ap, type S3CredentialListItem as aq, type SetStorageFileVisibilityRequest as ar, type StorageBatchUploadUrlResponse as as, type StorageFileAccessPurpose as at, type StorageFileMutationResponse as au, type StorageFolderMutationResponse as av, type StorageListFilesResponse as aw, type StorageUploadUrlResponse as ax, type TableQueryBuilder as ay, type TypedAthenaClient as az, type AthenaAuthContext as b, requireAffected as b0, requireSuccess as b1, resolvePostgresColumnType as b2, resolveProviderSchemas as b3, storageSdkManifest as b4, unwrap as b5, unwrapOne as b6, unwrapRows as b7, verifyAthenaGatewayUrl as b8, withRetry as b9, type AthenaAuthCookieRuntimeInput as c, type AthenaAuthDatabaseFactory as d, type AthenaAuthHandlerResult as e, type AthenaAuthPlugin as f, type AthenaAuthPluginContext as g, type AthenaAuthPluginHandlerContext as h, type AthenaAuthRequestContext as i, type AthenaAuthServer as j, type AthenaAuthServerApi as k, type AthenaAuthServerConfig as l, type AthenaAuthServerRuntimeOptions as m, type AthenaAuthSocialProviderConfig as n, type AthenaAuthTrustedOrigins as o, type AthenaAuthTrustedProviders as p, AthenaClient as q, type AthenaClientBuilder as r, type AthenaClientExperimentalOptions as s, type AthenaCreateClientOptions as t, type AthenaCreateClientOptionsWithStorage as u, type AthenaDbModule as v, type AthenaEnvelope as w, AthenaError as x, AthenaErrorCategory as y, AthenaErrorCode as z };