@xylex-group/athena 3.0.0 → 3.0.2

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 (70) hide show
  1. package/README.md +24 -10
  2. package/dist/{athena-auth-url-oLux_57a.d.cts → athena-request-headers-C7Jy-c_D.d.ts} +85 -1
  3. package/dist/{athena-auth-url-oLux_57a.d.ts → athena-request-headers-DujFFyMU.d.cts} +85 -1
  4. package/dist/billing.cjs +133 -21
  5. package/dist/billing.cjs.map +1 -1
  6. package/dist/billing.d.cts +41 -1
  7. package/dist/billing.d.ts +41 -1
  8. package/dist/billing.js +133 -21
  9. package/dist/billing.js.map +1 -1
  10. package/dist/browser.cjs +138 -45
  11. package/dist/browser.cjs.map +1 -1
  12. package/dist/browser.d.cts +9 -9
  13. package/dist/browser.d.ts +9 -9
  14. package/dist/browser.js +138 -45
  15. package/dist/browser.js.map +1 -1
  16. package/dist/cli/index.cjs +130 -45
  17. package/dist/cli/index.cjs.map +1 -1
  18. package/dist/cli/index.d.cts +3 -3
  19. package/dist/cli/index.d.ts +3 -3
  20. package/dist/cli/index.js +130 -45
  21. package/dist/cli/index.js.map +1 -1
  22. package/dist/index.cjs +138 -45
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +9 -9
  25. package/dist/index.d.ts +9 -9
  26. package/dist/index.js +138 -45
  27. package/dist/index.js.map +1 -1
  28. package/dist/{model-form-BKetpu6Q.d.ts → model-form-Dh0sisdL.d.ts} +1 -1
  29. package/dist/{model-form-BEfCGB5b.d.cts → model-form-oOAJUVd4.d.cts} +1 -1
  30. package/dist/{module-CrrSmpML.d.cts → module-CB25egcO.d.cts} +17 -5
  31. package/dist/{module-8dSMcy0K.d.cts → module-C_ab-MM1.d.cts} +46 -12
  32. package/dist/{module-8dSMcy0K.d.ts → module-C_ab-MM1.d.ts} +46 -12
  33. package/dist/{module-Bef_MAPO.d.ts → module-CkUM6v58.d.ts} +17 -5
  34. package/dist/next/client.cjs +9817 -3
  35. package/dist/next/client.cjs.map +1 -1
  36. package/dist/next/client.d.cts +26 -1
  37. package/dist/next/client.d.ts +26 -1
  38. package/dist/next/client.js +9788 -4
  39. package/dist/next/client.js.map +1 -1
  40. package/dist/next/server.cjs +10398 -42
  41. package/dist/next/server.cjs.map +1 -1
  42. package/dist/next/server.d.cts +39 -4
  43. package/dist/next/server.d.ts +39 -4
  44. package/dist/next/server.js +10339 -43
  45. package/dist/next/server.js.map +1 -1
  46. package/dist/{pipeline-BXFQbsUW.d.ts → pipeline-B8aN2EHe.d.ts} +1 -1
  47. package/dist/{pipeline-Dfsed4VD.d.cts → pipeline-D4W-Cc-A.d.cts} +1 -1
  48. package/dist/proxy-request-headers-DGxdoyA0.d.cts +59 -0
  49. package/dist/proxy-request-headers-m4D2Tduy.d.ts +59 -0
  50. package/dist/react.cjs +7 -7
  51. package/dist/react.cjs.map +1 -1
  52. package/dist/react.d.cts +4 -4
  53. package/dist/react.d.ts +4 -4
  54. package/dist/react.js +7 -7
  55. package/dist/react.js.map +1 -1
  56. package/dist/social-providers.cjs +15 -11
  57. package/dist/social-providers.cjs.map +1 -1
  58. package/dist/social-providers.d.cts +17 -57
  59. package/dist/social-providers.d.ts +17 -57
  60. package/dist/social-providers.js +15 -11
  61. package/dist/social-providers.js.map +1 -1
  62. package/dist/{types-jClgDy1J.d.ts → types-B75PdABb.d.ts} +1 -1
  63. package/dist/{types-Z3-rsiM3.d.cts → types-BBm-kEBL.d.cts} +1 -1
  64. package/dist/{types-CK7cBQbC.d.ts → types-BaAMXCqK.d.ts} +1 -1
  65. package/dist/{types-kO_Ut5wU.d.cts → types-CgCv5o6R.d.cts} +1 -1
  66. package/dist/utils.d.cts +4 -142
  67. package/dist/utils.d.ts +4 -142
  68. package/dist/{v3-client-G8JMOilK.d.cts → v3-client-CWfZHcKL.d.cts} +37 -21
  69. package/dist/{v3-client-CuCNy-JJ.d.ts → v3-client-DZp2NEhK.d.ts} +37 -21
  70. package/package.json +6 -3
@@ -1,7 +1,7 @@
1
1
  import { F as AthenaAuthClientConfig, D as AthenaAuthBindings } from './types-AOY-GLu8.js';
2
2
  import { e as AthenaGatewayErrorDetails, a as AthenaGatewayCallOptions, b as AthenaGatewayConnectionOptions, c as AthenaGatewayConnectionResult, x as AthenaFetchPayload, s as AthenaGatewayResponse, y as AthenaInsertPayload, z as AthenaUpdatePayload, w 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-Bltx6iL6.js';
3
- import { A as AthenaModelTarget, n as RowOf, a as InsertOf, U as UpdateOf, u as AthenaClientTableName, s as AthenaClientModelForTableName, R as RegistryDef, D as DatabaseDef, o as SchemaDef, r as AnyModelDef, j as ModelDef, m as ModelRelationMetadata, t as AthenaClientModelsInput } from './types-jClgDy1J.js';
4
- import { a as AthenaBillingClientConfig, c as AthenaBillingModule } from './module-8dSMcy0K.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-B75PdABb.js';
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';
7
7
  declare const AthenaErrorKind: {
@@ -275,18 +275,18 @@ type TrimRight<TValue extends string> = TValue extends `${infer TRest}${Whitespa
275
275
  type Trim<TValue extends string> = TrimLeft<TrimRight<TValue>>;
276
276
  /** Known string keys of a row / model type (empty when the shape is untyped). */
277
277
  type AthenaColumnKey<Row> = Extract<keyof NonNullable<Row>, string>;
278
- type KnownSelectColumnKey<Row> = AthenaColumnKey<Row>;
279
- type HasKnownSelectColumns<Row> = [KnownSelectColumnKey<Row>] extends [never] ? false : string extends KnownSelectColumnKey<Row> ? false : true;
278
+ type KnownSelectColumnKey$1<Row> = AthenaColumnKey<Row>;
279
+ type HasKnownSelectColumns<Row> = [KnownSelectColumnKey$1<Row>] extends [never] ? false : string extends KnownSelectColumnKey$1<Row> ? false : true;
280
280
  type HasComplexSelectTokenSyntax<TValue extends string> = TValue extends `${string}(${string}` ? true : TValue extends `${string})${string}` ? true : TValue extends `${string}.${string}` ? true : TValue extends `${string}"${string}` ? true : TValue extends `${string}'${string}` ? true : false;
281
- type ValidateAliasedBase<Row, TOriginal extends string, TBase extends string> = HasComplexSelectTokenSyntax<Trim<TBase>> extends true ? TOriginal : Trim<TBase> extends KnownSelectColumnKey<Row> ? TOriginal : never;
282
- type ValidateSelectToken<Row, TToken extends string> = Trim<TToken> extends infer TTrimmed extends string ? TTrimmed extends '' ? never : TTrimmed extends '*' ? TTrimmed : TTrimmed extends `${string}:${infer TBase}` ? ValidateAliasedBase<Row, TTrimmed, TBase> : TTrimmed extends `${infer TBase} as ${string}` ? ValidateAliasedBase<Row, TTrimmed, TBase> : TTrimmed extends `${infer TBase} AS ${string}` ? ValidateAliasedBase<Row, TTrimmed, TBase> : HasComplexSelectTokenSyntax<TTrimmed> extends true ? TTrimmed : TTrimmed extends KnownSelectColumnKey<Row> ? TTrimmed : never : never;
281
+ type ValidateAliasedBase<Row, TOriginal extends string, TBase extends string> = HasComplexSelectTokenSyntax<Trim<TBase>> extends true ? TOriginal : Trim<TBase> extends KnownSelectColumnKey$1<Row> ? TOriginal : never;
282
+ type ValidateSelectToken<Row, TToken extends string> = Trim<TToken> extends infer TTrimmed extends string ? TTrimmed extends '' ? never : TTrimmed extends '*' ? TTrimmed : TTrimmed extends `${string}:${infer TBase}` ? ValidateAliasedBase<Row, TTrimmed, TBase> : TTrimmed extends `${infer TBase} as ${string}` ? ValidateAliasedBase<Row, TTrimmed, TBase> : TTrimmed extends `${infer TBase} AS ${string}` ? ValidateAliasedBase<Row, TTrimmed, TBase> : HasComplexSelectTokenSyntax<TTrimmed> extends true ? TTrimmed : TTrimmed extends KnownSelectColumnKey$1<Row> ? TTrimmed : never : never;
283
283
  type ValidateSelectList<Row, TValue extends string> = string extends TValue ? TValue : HasComplexSelectTokenSyntax<TValue> extends true ? TValue : TValue extends `${infer THead},${infer TTail}` ? ValidateSelectToken<Row, THead> extends never ? never : ValidateSelectList<Row, TTail> extends never ? never : TValue : ValidateSelectToken<Row, TValue> extends never ? never : TValue;
284
284
  /**
285
285
  * Preferred element type for typed array selects.
286
286
  * Contextual typing validates each array-literal element against known keys
287
287
  * (no `as const` required) and powers IntelliSense on each slot.
288
288
  */
289
- type AthenaSelectArrayElement<Row> = HasKnownSelectColumns<Row> extends true ? KnownSelectColumnKey<Row> | '*' : string;
289
+ type AthenaSelectArrayElement<Row> = HasKnownSelectColumns<Row> extends true ? KnownSelectColumnKey$1<Row> | '*' : string;
290
290
  type AthenaSelectInput = string | string[] | readonly string[];
291
291
  /**
292
292
  * Compile-time validation for `select` / `single` / `maybeSingle` when
@@ -302,7 +302,7 @@ type AthenaValidatedSelectInput<Row, TValue extends AthenaSelectInput> = HasKnow
302
302
  * Filter / order / RPC column parameter. Known model keys are closed; dynamic
303
303
  * rows retain free-form string support.
304
304
  */
305
- type AthenaTypecheckedColumnKey<Row> = HasKnownSelectColumns<Row> extends true ? KnownSelectColumnKey<Row> : string;
305
+ type AthenaTypecheckedColumnKey<Row> = HasKnownSelectColumns<Row> extends true ? KnownSelectColumnKey$1<Row> : string;
306
306
 
307
307
  type AthenaRowShape$1 = Record<string, AthenaJsonValue | undefined>;
308
308
  type UntypedTableName<TModels> = [TModels] extends [never] ? string : [AthenaClientTableName<TModels>] extends [never] ? string : AthenaClientTableName<TModels>;
@@ -2372,6 +2372,7 @@ interface AthenaChatModule {
2372
2372
  type AthenaRowShape = Record<string, AthenaJsonValue | undefined>;
2373
2373
  type FilterColumnKey$1<Row> = Extract<keyof NonNullable<Row>, string>;
2374
2374
  type ResolvedFilterColumnKey$1<Row> = [FilterColumnKey$1<Row>] extends [never] ? string : FilterColumnKey$1<Row>;
2375
+ type KnownSelectColumnKey<Row> = AthenaColumnKey<Row>;
2375
2376
  type AthenaFilterOperator = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'like' | 'ilike' | 'is' | 'in' | 'contains' | 'containedBy';
2376
2377
  type AthenaWherePrimitive = AthenaConditionValue;
2377
2378
  type AthenaWhereOperatorInput = {
@@ -2416,17 +2417,32 @@ interface AthenaRelationSelectNode<TSelect extends AthenaSelectShape = AthenaSel
2416
2417
  }
2417
2418
  type AthenaSelectShape = Record<string, true | AthenaRelationSelectNode<AthenaSelectShape>>;
2418
2419
  type AthenaAllowedRelationSelectNodeKey = 'select' | 'as' | 'via' | 'schema';
2420
+ /**
2421
+ * Structural validation only (relation node shape). Nested relation target rows
2422
+ * are not model-checked here unless a richer context path is wired later.
2423
+ */
2424
+ type AthenaStructuralValidatedSelectShape<TSelect> = {
2425
+ [K in keyof TSelect]: TSelect[K] extends true ? true : AthenaValidatedRelationSelectNode<TSelect[K]>;
2426
+ };
2419
2427
  type AthenaValidatedRelationSelectNode<TNode> = TNode extends {
2420
2428
  select: infer TChild;
2421
2429
  } ? Exclude<keyof TNode, AthenaAllowedRelationSelectNodeKey> extends never ? TNode extends {
2422
2430
  schema: string;
2423
2431
  via: string;
2424
2432
  } ? never : TChild extends Record<string, unknown> ? {
2425
- [K in keyof TNode]: K extends 'select' ? AthenaValidatedSelectShape<TChild> : K extends AthenaAllowedRelationSelectNodeKey ? TNode[K] : never;
2433
+ [K in keyof TNode]: K extends 'select' ? AthenaStructuralValidatedSelectShape<TChild> : K extends AthenaAllowedRelationSelectNodeKey ? TNode[K] : never;
2426
2434
  } : never : never : never;
2427
- type AthenaValidatedSelectShape<TSelect> = {
2428
- [K in keyof TSelect]: TSelect[K] extends true ? true : AthenaValidatedRelationSelectNode<TSelect[K]>;
2429
- };
2435
+ /**
2436
+ * Compile-time validation for `findMany({ select })`.
2437
+ *
2438
+ * - When `Row` has known model keys: scalar `true` entries must use those keys.
2439
+ * - Relation nodes (`{ select: ... }`) keep structural validation and may use
2440
+ * non-row keys (relation names are not row columns).
2441
+ * - When `Row` is untyped: free-form keys (same as pre-model behavior).
2442
+ */
2443
+ type AthenaValidatedSelectShape<Row, TSelect> = HasKnownSelectColumns<Row> extends true ? {
2444
+ [K in keyof TSelect]: TSelect[K] extends true ? K extends KnownSelectColumnKey<Row> ? true : never : AthenaValidatedRelationSelectNode<TSelect[K]>;
2445
+ } : AthenaStructuralValidatedSelectShape<TSelect>;
2430
2446
  type GenericRegistryDef = RegistryDef<Record<string, DatabaseDef<Record<string, SchemaDef<Record<string, AnyModelDef>>>>>>;
2431
2447
  type AthenaOrderByDirectionInput = 'asc' | 'desc' | 'ascending' | 'descending' | boolean | {
2432
2448
  ascending?: boolean;
@@ -2436,6 +2452,11 @@ type AthenaOrderBy<Row = AthenaRowShape> = {
2436
2452
  ascending?: boolean;
2437
2453
  } | Partial<Record<ResolvedFilterColumnKey$1<Row>, AthenaOrderByDirectionInput>>;
2438
2454
  interface AthenaFindManyOptions<Row = AthenaRowShape, TSelect extends AthenaSelectShape = AthenaSelectShape> {
2455
+ /**
2456
+ * Object select tree. Callers should pass through `findMany(...)`, which
2457
+ * intersects this with `AthenaValidatedSelectShape<Row, TSelect>` so model
2458
+ * column keys are checked after `TSelect` is inferred from the literal.
2459
+ */
2439
2460
  select: TSelect;
2440
2461
  where?: AthenaWhere<Row>;
2441
2462
  orderBy?: AthenaOrderBy<Row>;
@@ -2543,7 +2564,7 @@ type AthenaFindManyDebugTransport<Row = Record<string, unknown>, TSelect extends
2543
2564
  interface AthenaFindManyDebugAst<Row = Record<string, unknown>, TSelect extends AthenaSelectShape = AthenaSelectShape> extends AthenaDebugAstBase<'findMany'> {
2544
2565
  tableName: string;
2545
2566
  input: {
2546
- select: AthenaValidatedSelectShape<TSelect>;
2567
+ select: TSelect;
2547
2568
  where?: AthenaWhere<Row>;
2548
2569
  orderBy?: AthenaOrderBy<Row>;
2549
2570
  limit?: number;
@@ -2766,7 +2787,7 @@ interface AthenaFromOptions {
2766
2787
  interface TableQueryBuilder<Row, Insert = Partial<Row>, Update = Partial<Insert>, TContext = unknown> extends FilterChain<TableQueryBuilder<Row, Insert, Update, TContext>, Row> {
2767
2788
  select<T = Row, const TColumns extends AthenaSelectInput = string>(columns?: SelectColumnsFor<Row, TColumns>, options?: AthenaGatewayCallOptions): SelectChain<Row, T>;
2768
2789
  findMany<const TSelect extends AthenaSelectShape>(options: AthenaFindManyOptions<Row, TSelect> & {
2769
- select: AthenaValidatedSelectShape<TSelect>;
2790
+ select: AthenaValidatedSelectShape<Row, TSelect>;
2770
2791
  }): Promise<AthenaResult<Array<AthenaFindManyResult<Row, TSelect, TContext>>>>;
2771
2792
  insert(values: Insert, options?: AthenaGatewayCallOptions): MutationQuery<Row, Row>;
2772
2793
  insert(values: Insert[], options?: AthenaGatewayCallOptions): MutationQuery<Row[], Row>;
@@ -2789,12 +2810,7 @@ interface TableQueryBuilder<Row, Insert = Partial<Row>, Update = Partial<Insert>
2789
2810
 
2790
2811
  type MaybePromise<T> = T | Promise<T>;
2791
2812
  type ResolvedModels<TModels> = TModels extends AthenaClientModelsInput ? TModels : never;
2792
- type AthenaService = 'db' | 'auth' | 'chat' | 'storage' | 'billing';
2793
- declare class AthenaConfigurationError extends Error {
2794
- readonly code: "ATHENA_SERVICE_NOT_CONFIGURED";
2795
- readonly service: AthenaService;
2796
- constructor(service: AthenaService, message?: string);
2797
- }
2813
+
2798
2814
  interface AthenaRequestContext {
2799
2815
  userId?: string | null;
2800
2816
  organizationId?: string | null;
@@ -2863,4 +2879,4 @@ interface AthenaClient<TModels extends AthenaClientModelsInput | undefined = Ath
2863
2879
  }
2864
2880
  declare function createClient<const TModels extends AthenaClientModelsInput | undefined = undefined>(config: AthenaClientConfig<TModels>): AthenaClient<TModels>;
2865
2881
 
2866
- 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 AthenaStorageErrorHandler 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 AthenaRequestMethod as aA, type AthenaRequestOptions as aB, type AthenaRequestQueryValueMap as aC, type AthenaRequestResponse as aD, type AthenaRequestService as aE, type AthenaResult as aF, type AthenaRpcBuilderStateAst as aG, type AthenaRpcDebugAst as aH, type AthenaSelectDebugAst as aI, type AthenaSelectDebugTransport as aJ, type AthenaService as aK, type AthenaStorageAuditNamespace as aL, type AthenaStorageBackupNamespace as aM, type AthenaStorageBaseModule as aN, type AthenaStorageBinaryCallOptions as aO, type AthenaStorageBucketCorsNamespace as aP, type AthenaStorageBucketNamespace as aQ, type AthenaStorageCallOptions as aR, type AthenaStorageCatalogNamespace as aS, type AthenaStorageClientConfig as aT, type AthenaStorageConfig as aU, type AthenaStorageCredentialsNamespace as aV, type AthenaStorageDirectUploadConfig as aW, type AthenaStorageEnv as aX, AthenaStorageError as aY, AthenaStorageErrorCode as aZ, type AthenaStorageErrorDetails 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, AthenaConfigurationError as ai, type AthenaDbConfig as aj, type AthenaDbModule as ak, type AthenaDeleteDebugAst as al, type AthenaEnvelope as am, AthenaError as an, AthenaErrorCategory as ao, AthenaErrorCode as ap, type AthenaErrorInput as aq, AthenaErrorKind as ar, type AthenaFindManyDebugAst as as, type AthenaFromOptions as at, type AthenaInsertDebugAst as au, type AthenaOperationContext as av, type AthenaQueryDebugAst as aw, type AthenaRawQueryDebugAst as ax, type AthenaRequestContext as ay, type AthenaRequestContextProvider as az, type AthenaChatAddMembersRequest as b, type StorageBackupJob as b$, type AthenaStorageErrorInput as b0, type AthenaStorageFileConfig as b1, type AthenaStorageFileDeleteInput as b2, type AthenaStorageFileDownloadInput as b3, type AthenaStorageFileListInput as b4, type AthenaStorageFileModule as b5, type AthenaStorageFileNamespace as b6, type AthenaStorageFileUploadInput as b7, type AthenaStorageFileUploadManyRequest as b8, type AthenaStorageFileUploadRequest as b9, type CreateStorageUploadUrlRequest as bA, type CreateStorageUploadUrlsRequest as bB, type DeleteManyStorageFilesRequest as bC, type DeleteStorageFolderRequest as bD, type DeprecatedInlineStorageConnectionFields as bE, type GetStorageFileUrlQuery as bF, type IntCoercionOptions as bG, type ListStorageFilesRequest as bH, type ListStorageFoldersRequest as bI, type ManagedFileRecord as bJ, type MoveStorageFolderRequest as bK, type NormalizedAthenaError as bL, type PresignedFileUrlResponse as bM, type RequireAffectedOptions as bN, type RetryBackoffStrategy as bO, type RetryConfig as bP, type RpcOrderOptions as bQ, type RpcQueryBuilder as bR, type S3CatalogItem as bS, type S3CredentialListItem as bT, type SearchStorageFilesRequest as bU, type SetManyStorageFileVisibilityRequest as bV, type SetStorageFileVisibilityRequest as bW, type StorageAuditEventRecord as bX, type StorageAuditListResponse as bY, type StorageAuditQueryRequest as bZ, type StorageBackupCreateRequest as b_, type AthenaStorageFileUploadResult as ba, type AthenaStorageFolderNamespace as bb, type AthenaStorageManagedUpload as bc, type AthenaStorageModule as bd, type AthenaStorageMultipartNamespace as be, type AthenaStorageObjectFolderNamespace as bf, type AthenaStorageObjectNamespace as bg, type AthenaStoragePathContext as bh, type AthenaStoragePermissionNamespace as bi, type AthenaStoragePrefixPath as bj, type AthenaStoragePutBody as bk, type AthenaStoragePutOptions as bl, type AthenaStorageTemplateValue as bm, type AthenaStorageTemplateVars as bn, type AthenaStorageUploadConstraints as bo, type AthenaStorageUploadProgress as bp, type AthenaStorageUploadProgressHandler as bq, type AthenaStorageUploadSource as br, type AthenaStorageUploadedFile as bs, type AthenaTableBuilderStateAst as bt, type AthenaUpdateDebugAst as bu, type AthenaUpsertDebugAst as bv, type BackupRecoveryStrategy as bw, type ConfirmStorageUploadRequest as bx, type CopyStorageFileRequest as by, type CreateStorageCatalogRequest as bz, type AthenaChatAddReactionRequest as c, type UpdateStorageFileRequest as c$, type StorageBackupListPage as c0, type StorageBackupListQuery as c1, type StorageBackupQueuedJob as c2, type StorageBackupRecord as c3, type StorageBackupRestoreRequest as c4, type StorageBackupSchedule as c5, type StorageBackupScheduleCreateRequest as c6, type StorageBatchUploadUrlResponse as c7, type StorageBatchUploadUrlResponseWithPut as c8, type StorageBucketCorsRequest as c9, type StorageObjectRequest as cA, type StorageObjectValidateRequest as cB, type StorageObjectVersionListRequest as cC, type StorageObjectVersionMutationRequest as cD, type StoragePermissionCheckRequest as cE, type StoragePermissionCheckResponse as cF, type StoragePermissionGrantRequest as cG, type StoragePermissionListRequest as cH, type StoragePermissionListResponse as cI, type StoragePermissionRevokeRequest as cJ, type StoragePresignUploadRequest as cK, type StoragePublicAccessBlockRequest as cL, type StorageServerSideEncryptionOptions as cM, type StorageSetBucketCorsRequest as cN, type StorageSetBucketLifecycleRequest as cO, type StorageSetBucketPolicyRequest as cP, type StorageSetPublicAccessBlockRequest as cQ, type StorageSignedPostPolicyRequest as cR, type StorageUpdateObjectRequest as cS, type StorageUploadUrlResponse as cT, type StorageUploadUrlResponseWithPut as cU, type TableQueryBuilder as cV, type TreeStorageFoldersRequest as cW, type UnwrapOneOptions as cX, type UnwrapOptions as cY, type UpdateManyStorageFilesRequest as cZ, type UpdateStorageCatalogRequest as c_, type StorageBucketCorsRuleInput as ca, type StorageBucketLifecycleRequest as cb, type StorageBucketLifecycleRuleInput as cc, type StorageBucketPolicyRequest as cd, type StorageConnectionSelector as ce, type StorageFileAccessPurpose as cf, type StorageFileMutationManyResponse as cg, type StorageFileMutationResponse as ch, type StorageFilePermissionRecord as ci, type StorageFileRetentionRequest as cj, type StorageFileVersionPathRequest as ck, type StorageFolderMutationResponse as cl, type StorageListFilesResponse as cm, type StorageListObjectsRequest as cn, type StorageMultipartAbortRequest as co, type StorageMultipartCompletePartInput as cp, type StorageMultipartCompleteRequest as cq, type StorageMultipartCreateRequest as cr, type StorageMultipartListPartsRequest as cs, type StorageMultipartSignPartRequest as ct, type StorageObjectBaseRequest as cu, type StorageObjectCopyRequest as cv, type StorageObjectFolderCreateRequest as cw, type StorageObjectFolderDeleteRequest as cx, type StorageObjectFolderRenameRequest as cy, type StorageObjectPublicUrlRequest as cz, type AthenaChatAttachmentInput as d, assertInt as d0, coerceInt as d1, createAthenaStorageError as d2, createClient as d3, createStorageModule as d4, getAthenaDebugAst as d5, isOk as d6, normalizeAthenaError as d7, parseBooleanFlag as d8, requireAffected as d9, requireSuccess as da, storageSdkManifest as db, unwrap as dc, unwrapOne as dd, unwrapRows as de, verifyAthenaGatewayUrl as df, withRetry as dg, type AthenaFindManyOptions as dh, type AthenaFindManyResult as di, type AthenaOrderBy as dj, type AthenaQueryTraceCallsite as dk, type AthenaQueryTraceEvent as dl, type AthenaQueryTraceOptions as dm, type AthenaRelationSelectNode as dn, type AthenaResultError as dp, type AthenaSelectShape as dq, type AthenaWhere as dr, type AthenaWhereBooleanOperand as ds, type AthenaWhereOperatorInput as dt, DEFAULT_MULTIPART_PART_SIZE_BYTES as du, DEFAULT_MULTIPART_THRESHOLD_BYTES as dv, createStorageFileModule as dw, resolveStoragePath as dx, 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 };
2882
+ 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 };
package/package.json CHANGED
@@ -9,6 +9,7 @@
9
9
  "cron-parser": "^4.9.0",
10
10
  "jose": "^6.2.3",
11
11
  "pg": "^8.16.0",
12
+ "server-only": "^0.0.1",
12
13
  "use-sync-external-store": "^1.5.0",
13
14
  "uuid": "^9.0.1",
14
15
  "zod": "^4.0.1"
@@ -159,6 +160,8 @@
159
160
  "check:all": "pnpm lint && pnpm typecheck && pnpm test && pnpm build",
160
161
  "dev": "tsup --watch",
161
162
  "docs:methods": "node scripts/generate-sdk-method-reference.mjs",
163
+ "docs:site:check": "pnpm --dir ../../apps/docs docs:sync-athena-js:check",
164
+ "docs:site:sync": "pnpm --dir ../../apps/docs docs:sync-athena-js",
162
165
  "example:api-call": "cd examples/api-call && bun run start",
163
166
  "example:email-resend": "cd examples/email-resend && bun run start",
164
167
  "example:express-api": "cd examples/express-api && bun run start",
@@ -170,9 +173,9 @@
170
173
  "lint:fix": "pnpm lint -- --fix",
171
174
  "prepublishOnly": "pnpm typecheck && pnpm build",
172
175
  "publish:token": "node scripts/publish.js",
173
- "test": "node --import tsx --test --test-force-exit test/*.test.ts",
176
+ "test": "node --import ./test/register-server-only.mjs --import tsx --test --test-force-exit test/*.test.ts",
174
177
  "test:integration:postgres": "node scripts/run-postgres-introspection-test.mjs",
175
- "test:watch": "node --import tsx --test --watch test/*.test.ts",
178
+ "test:watch": "node --import ./test/register-server-only.mjs --import tsx --test --watch test/*.test.ts",
176
179
  "typecheck": "tsc -p tsconfig.typecheck.json"
177
180
  },
178
181
  "sideEffects": false,
@@ -215,5 +218,5 @@
215
218
  ]
216
219
  }
217
220
  },
218
- "version": "3.0.0"
221
+ "version": "3.0.2"
219
222
  }