@xylex-group/athena 2.10.0 → 2.12.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 (62) hide show
  1. package/README.md +112 -28
  2. package/dist/browser.cjs +333 -240
  3. package/dist/browser.cjs.map +1 -1
  4. package/dist/browser.d.cts +9 -8
  5. package/dist/browser.d.ts +9 -8
  6. package/dist/browser.js +333 -240
  7. package/dist/browser.js.map +1 -1
  8. package/dist/cli/index.cjs +306 -240
  9. package/dist/cli/index.cjs.map +1 -1
  10. package/dist/cli/index.d.cts +4 -3
  11. package/dist/cli/index.d.ts +4 -3
  12. package/dist/cli/index.js +306 -240
  13. package/dist/cli/index.js.map +1 -1
  14. package/dist/{client-BYii6dU9.d.ts → client-C3x75Zgn.d.cts} +22 -9
  15. package/dist/{client-B7EQ_hPV.d.cts → client-QUbAs7E8.d.ts} +22 -9
  16. package/dist/index.cjs +333 -240
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +9 -8
  19. package/dist/index.d.ts +9 -8
  20. package/dist/index.js +333 -240
  21. package/dist/index.js.map +1 -1
  22. package/dist/{model-form-DACdBLYG.d.cts → model-form-CD1uhWSh.d.cts} +2 -1
  23. package/dist/{model-form-ByvyyvxB.d.ts → model-form-Dm69I-oO.d.ts} +2 -1
  24. package/dist/{module-DbHlxpeR.d.ts → module-CW3tWJ10.d.ts} +5 -4
  25. package/dist/{module-DC96HJa3.d.cts → module-Cxcurfes.d.cts} +5 -4
  26. package/dist/next/client.cjs +333 -240
  27. package/dist/next/client.cjs.map +1 -1
  28. package/dist/next/client.d.cts +4 -3
  29. package/dist/next/client.d.ts +4 -3
  30. package/dist/next/client.js +333 -240
  31. package/dist/next/client.js.map +1 -1
  32. package/dist/next/server.cjs +333 -240
  33. package/dist/next/server.cjs.map +1 -1
  34. package/dist/next/server.d.cts +4 -3
  35. package/dist/next/server.d.ts +4 -3
  36. package/dist/next/server.js +333 -240
  37. package/dist/next/server.js.map +1 -1
  38. package/dist/{pipeline-CmUZsXsi.d.cts → pipeline-B14jVK7J.d.cts} +1 -1
  39. package/dist/{pipeline-DZMsPxUg.d.ts → pipeline-BAwb6Vzm.d.ts} +1 -1
  40. package/dist/react.cjs +234 -98
  41. package/dist/react.cjs.map +1 -1
  42. package/dist/react.d.cts +5 -4
  43. package/dist/react.d.ts +5 -4
  44. package/dist/react.js +234 -98
  45. package/dist/react.js.map +1 -1
  46. package/dist/{shared-DRptGBWP.d.ts → shared-0Kdc74lu.d.ts} +2 -2
  47. package/dist/{shared-BMVGMnti.d.cts → shared-C0wVICRv.d.cts} +2 -2
  48. package/dist/{types-C-YvfgYh.d.cts → types-BcVmPBP-.d.ts} +2 -1
  49. package/dist/types-Cq4-NoB4.d.ts +204 -0
  50. package/dist/types-CwJCPpLD.d.cts +236 -0
  51. package/dist/types-CwJCPpLD.d.ts +236 -0
  52. package/dist/{types-CRjDwmtJ.d.ts → types-DMOoYnPS.d.cts} +2 -1
  53. package/dist/types-Dr849HD6.d.cts +204 -0
  54. package/dist/utils.cjs +276 -0
  55. package/dist/utils.cjs.map +1 -1
  56. package/dist/utils.d.cts +58 -1
  57. package/dist/utils.d.ts +58 -1
  58. package/dist/utils.js +269 -1
  59. package/dist/utils.js.map +1 -1
  60. package/package.json +2 -2
  61. package/dist/types-BeZIHduP.d.cts +0 -428
  62. package/dist/types-BeZIHduP.d.ts +0 -428
@@ -1,4 +1,5 @@
1
- import { j as AthenaModelTarget, H as RowOf, r as InsertOf, U as UpdateOf, i as AthenaJsonValue, a as AthenaGatewayCallOptions, g as AthenaJsonObject, k as AthenaRpcCallOptions, b as AthenaGatewayConnectionOptions, c as AthenaGatewayConnectionResult, V as AthenaFetchPayload, W as AthenaGatewayResponse, X as AthenaInsertPayload, Y as AthenaUpdatePayload, Q as AthenaDeletePayload, o as AthenaRpcPayload, $ as AthenaQueryPayload, Z as AthenaGatewayEndpointPath, _ as AthenaGatewayMethod, a0 as AthenaConditionValue, a1 as AthenaConditionArrayValue, R as RegistryDef, D as DatabaseDef, J as SchemaDef, N as AnyModelDef, C as ModelDef, G as ModelRelationMetadata, a2 as AthenaGatewayCondition, a3 as AthenaSortBy, l as AthenaRpcFilter, p as BackendConfig, q as BackendType, e as AthenaGatewayErrorDetails, A as AthenaConditionCastType, a4 as AthenaConditionOperator } from './types-BeZIHduP.js';
1
+ import { i as AthenaJsonValue, a as AthenaGatewayCallOptions, g as AthenaJsonObject, j as AthenaRpcCallOptions, b as AthenaGatewayConnectionOptions, c as AthenaGatewayConnectionResult, t as AthenaFetchPayload, u as AthenaGatewayResponse, v as AthenaInsertPayload, w as AthenaUpdatePayload, s as AthenaDeletePayload, n as AthenaRpcPayload, z as AthenaQueryPayload, x as AthenaGatewayEndpointPath, y as AthenaGatewayMethod, C as AthenaGatewayBaseOptions, D as AthenaConditionValue, E as AthenaConditionArrayValue, F as AthenaGatewayCondition, G as AthenaSortBy, k as AthenaRpcFilter, o as BackendConfig, p as BackendType, e as AthenaGatewayErrorDetails, A as AthenaConditionCastType, H as AthenaConditionOperator } from './types-CwJCPpLD.cjs';
2
+ import { A as AthenaModelTarget, n as RowOf, a as InsertOf, U as UpdateOf, R as RegistryDef, D as DatabaseDef, o as SchemaDef, r as AnyModelDef, j as ModelDef, m as ModelRelationMetadata } from './types-Dr849HD6.cjs';
2
3
 
3
4
  type AthenaAuthMethod = 'GET' | 'POST';
4
5
  type AthenaAuthCredentials = 'omit' | 'same-origin' | 'include';
@@ -744,6 +745,8 @@ interface AthenaAdminEmailTemplateSendRequest {
744
745
  user_id?: string;
745
746
  organization_id?: string;
746
747
  session_token?: string;
748
+ attachments?: string | AthenaAuthEmailTemplateAttachment | AthenaAuthEmailTemplateAttachment[];
749
+ attachment_failure_mode?: 'fail' | 'skip';
747
750
  metadata?: AthenaAuthLooseRecord;
748
751
  }
749
752
  interface AthenaAdminEmailTemplateSendResponse {
@@ -3342,15 +3345,9 @@ interface AthenaChatWsErrorEvent {
3342
3345
  code?: string | null;
3343
3346
  }
3344
3347
  type AthenaChatWsServerEvent = AthenaChatWsHelloOkEvent | AthenaChatWsSubscribedEvent | AthenaChatWsRoomCreatedEvent | AthenaChatWsRoomUpdatedEvent | AthenaChatWsRoomArchivedEvent | AthenaChatWsMessageCreatedEvent | AthenaChatWsMessageUpdatedEvent | AthenaChatWsMessageDeletedEvent | AthenaChatWsReadUpdatedEvent | AthenaChatWsMembersUpdatedEvent | AthenaChatWsTypingUpdatedEvent | AthenaChatWsPresenceUpdatedEvent | AthenaChatWsSyncRequiredEvent | AthenaChatWsReactionUpdatedEvent | AthenaChatWsPongEvent | AthenaChatWsErrorEvent;
3345
- interface AthenaChatCallOptions {
3346
- headers?: Record<string, string>;
3348
+ type AthenaChatCallOptions = Pick<AthenaGatewayBaseOptions, 'headers' | 'client' | 'apiKey' | 'athenaKey' | 'bearerToken' | 'cookie' | 'sessionToken' | 'forceNoCache'> & {
3347
3349
  signal?: AbortSignal;
3348
- client?: string;
3349
- bearerToken?: string | null;
3350
- cookie?: string | null;
3351
- sessionToken?: string | null;
3352
- forceNoCache?: boolean;
3353
- }
3350
+ };
3354
3351
  interface AthenaChatWebSocketLike {
3355
3352
  close(code?: number, reason?: string): void;
3356
3353
  send(data: string): void;
@@ -3735,6 +3732,10 @@ interface AthenaRequestOptions {
3735
3732
  path?: string;
3736
3733
  method?: AthenaRequestMethod;
3737
3734
  headers?: Record<string, string>;
3735
+ /** Per-request override for `apikey` / `x-api-key`. */
3736
+ apiKey?: string | null;
3737
+ /** Per-request override for `X-Athena-Key` only. */
3738
+ athenaKey?: string | null;
3738
3739
  query?: AthenaRequestQueryValueMap;
3739
3740
  body?: RequestInit['body'] | Record<string, unknown> | unknown[] | null;
3740
3741
  signal?: AbortSignal;
@@ -3993,6 +3994,12 @@ interface AthenaCreateClientOptions {
3993
3994
  organizationId?: string | null | undefined;
3994
3995
  forceNoCache?: boolean;
3995
3996
  headers?: Record<string, string>;
3997
+ /** Direct PostgreSQL URI forwarded as `x-pg-uri` on gateway requests. */
3998
+ pgUri?: string | null | undefined;
3999
+ /** JDBC/PostgreSQL URI mirrored to `x-athena-jdbc-url` and `x-jdbc-url`. */
4000
+ jdbcUrl?: string | null | undefined;
4001
+ /** Client-wide override for `X-Athena-Key` while `key` continues to set `apikey` / `x-api-key`. */
4002
+ athenaKey?: string | null | undefined;
3996
4003
  backend?: BackendConfig | BackendType;
3997
4004
  db?: AthenaCreateClientServiceUrlConfig;
3998
4005
  gateway?: AthenaCreateClientServiceUrlConfig;
@@ -4085,6 +4092,12 @@ interface AthenaClientBuilder<StorageEnabled extends boolean = false, TStrict ex
4085
4092
  client(clientName: string | null | undefined): AthenaClientBuilder<StorageEnabled, TStrict>;
4086
4093
  /** Attach static headers to every request. */
4087
4094
  headers(headers: Record<string, string>): AthenaClientBuilder<StorageEnabled, TStrict>;
4095
+ /** Forward a direct PostgreSQL URI as `x-pg-uri` on gateway requests. */
4096
+ pgUri(pgUri: string | null | undefined): AthenaClientBuilder<StorageEnabled, TStrict>;
4097
+ /** Forward a JDBC/PostgreSQL URI to compatibility JDBC headers. */
4098
+ jdbcUrl(jdbcUrl: string | null | undefined): AthenaClientBuilder<StorageEnabled, TStrict>;
4099
+ /** Override `X-Athena-Key` for this client while `key()` sets `apikey` / `x-api-key`. */
4100
+ athenaKey(athenaKey: string | null | undefined): AthenaClientBuilder<StorageEnabled, TStrict>;
4088
4101
  /** Configure Athena Auth client behavior for `client.auth.*` methods. */
4089
4102
  auth(config: AthenaCreateClientAuthOptions): AthenaClientBuilder<StorageEnabled, TStrict>;
4090
4103
  /** Configure experimental client options and narrow the built client when storage or strict column checks are enabled. */
@@ -1,4 +1,5 @@
1
- import { j as AthenaModelTarget, H as RowOf, r as InsertOf, U as UpdateOf, i as AthenaJsonValue, a as AthenaGatewayCallOptions, g as AthenaJsonObject, k as AthenaRpcCallOptions, b as AthenaGatewayConnectionOptions, c as AthenaGatewayConnectionResult, V as AthenaFetchPayload, W as AthenaGatewayResponse, X as AthenaInsertPayload, Y as AthenaUpdatePayload, Q as AthenaDeletePayload, o as AthenaRpcPayload, $ as AthenaQueryPayload, Z as AthenaGatewayEndpointPath, _ as AthenaGatewayMethod, a0 as AthenaConditionValue, a1 as AthenaConditionArrayValue, R as RegistryDef, D as DatabaseDef, J as SchemaDef, N as AnyModelDef, C as ModelDef, G as ModelRelationMetadata, a2 as AthenaGatewayCondition, a3 as AthenaSortBy, l as AthenaRpcFilter, p as BackendConfig, q as BackendType, e as AthenaGatewayErrorDetails, A as AthenaConditionCastType, a4 as AthenaConditionOperator } from './types-BeZIHduP.cjs';
1
+ import { i as AthenaJsonValue, a as AthenaGatewayCallOptions, g as AthenaJsonObject, j as AthenaRpcCallOptions, b as AthenaGatewayConnectionOptions, c as AthenaGatewayConnectionResult, t as AthenaFetchPayload, u as AthenaGatewayResponse, v as AthenaInsertPayload, w as AthenaUpdatePayload, s as AthenaDeletePayload, n as AthenaRpcPayload, z as AthenaQueryPayload, x as AthenaGatewayEndpointPath, y as AthenaGatewayMethod, C as AthenaGatewayBaseOptions, D as AthenaConditionValue, E as AthenaConditionArrayValue, F as AthenaGatewayCondition, G as AthenaSortBy, k as AthenaRpcFilter, o as BackendConfig, p as BackendType, e as AthenaGatewayErrorDetails, A as AthenaConditionCastType, H as AthenaConditionOperator } from './types-CwJCPpLD.js';
2
+ import { A as AthenaModelTarget, n as RowOf, a as InsertOf, U as UpdateOf, R as RegistryDef, D as DatabaseDef, o as SchemaDef, r as AnyModelDef, j as ModelDef, m as ModelRelationMetadata } from './types-Cq4-NoB4.js';
2
3
 
3
4
  type AthenaAuthMethod = 'GET' | 'POST';
4
5
  type AthenaAuthCredentials = 'omit' | 'same-origin' | 'include';
@@ -744,6 +745,8 @@ interface AthenaAdminEmailTemplateSendRequest {
744
745
  user_id?: string;
745
746
  organization_id?: string;
746
747
  session_token?: string;
748
+ attachments?: string | AthenaAuthEmailTemplateAttachment | AthenaAuthEmailTemplateAttachment[];
749
+ attachment_failure_mode?: 'fail' | 'skip';
747
750
  metadata?: AthenaAuthLooseRecord;
748
751
  }
749
752
  interface AthenaAdminEmailTemplateSendResponse {
@@ -3342,15 +3345,9 @@ interface AthenaChatWsErrorEvent {
3342
3345
  code?: string | null;
3343
3346
  }
3344
3347
  type AthenaChatWsServerEvent = AthenaChatWsHelloOkEvent | AthenaChatWsSubscribedEvent | AthenaChatWsRoomCreatedEvent | AthenaChatWsRoomUpdatedEvent | AthenaChatWsRoomArchivedEvent | AthenaChatWsMessageCreatedEvent | AthenaChatWsMessageUpdatedEvent | AthenaChatWsMessageDeletedEvent | AthenaChatWsReadUpdatedEvent | AthenaChatWsMembersUpdatedEvent | AthenaChatWsTypingUpdatedEvent | AthenaChatWsPresenceUpdatedEvent | AthenaChatWsSyncRequiredEvent | AthenaChatWsReactionUpdatedEvent | AthenaChatWsPongEvent | AthenaChatWsErrorEvent;
3345
- interface AthenaChatCallOptions {
3346
- headers?: Record<string, string>;
3348
+ type AthenaChatCallOptions = Pick<AthenaGatewayBaseOptions, 'headers' | 'client' | 'apiKey' | 'athenaKey' | 'bearerToken' | 'cookie' | 'sessionToken' | 'forceNoCache'> & {
3347
3349
  signal?: AbortSignal;
3348
- client?: string;
3349
- bearerToken?: string | null;
3350
- cookie?: string | null;
3351
- sessionToken?: string | null;
3352
- forceNoCache?: boolean;
3353
- }
3350
+ };
3354
3351
  interface AthenaChatWebSocketLike {
3355
3352
  close(code?: number, reason?: string): void;
3356
3353
  send(data: string): void;
@@ -3735,6 +3732,10 @@ interface AthenaRequestOptions {
3735
3732
  path?: string;
3736
3733
  method?: AthenaRequestMethod;
3737
3734
  headers?: Record<string, string>;
3735
+ /** Per-request override for `apikey` / `x-api-key`. */
3736
+ apiKey?: string | null;
3737
+ /** Per-request override for `X-Athena-Key` only. */
3738
+ athenaKey?: string | null;
3738
3739
  query?: AthenaRequestQueryValueMap;
3739
3740
  body?: RequestInit['body'] | Record<string, unknown> | unknown[] | null;
3740
3741
  signal?: AbortSignal;
@@ -3993,6 +3994,12 @@ interface AthenaCreateClientOptions {
3993
3994
  organizationId?: string | null | undefined;
3994
3995
  forceNoCache?: boolean;
3995
3996
  headers?: Record<string, string>;
3997
+ /** Direct PostgreSQL URI forwarded as `x-pg-uri` on gateway requests. */
3998
+ pgUri?: string | null | undefined;
3999
+ /** JDBC/PostgreSQL URI mirrored to `x-athena-jdbc-url` and `x-jdbc-url`. */
4000
+ jdbcUrl?: string | null | undefined;
4001
+ /** Client-wide override for `X-Athena-Key` while `key` continues to set `apikey` / `x-api-key`. */
4002
+ athenaKey?: string | null | undefined;
3996
4003
  backend?: BackendConfig | BackendType;
3997
4004
  db?: AthenaCreateClientServiceUrlConfig;
3998
4005
  gateway?: AthenaCreateClientServiceUrlConfig;
@@ -4085,6 +4092,12 @@ interface AthenaClientBuilder<StorageEnabled extends boolean = false, TStrict ex
4085
4092
  client(clientName: string | null | undefined): AthenaClientBuilder<StorageEnabled, TStrict>;
4086
4093
  /** Attach static headers to every request. */
4087
4094
  headers(headers: Record<string, string>): AthenaClientBuilder<StorageEnabled, TStrict>;
4095
+ /** Forward a direct PostgreSQL URI as `x-pg-uri` on gateway requests. */
4096
+ pgUri(pgUri: string | null | undefined): AthenaClientBuilder<StorageEnabled, TStrict>;
4097
+ /** Forward a JDBC/PostgreSQL URI to compatibility JDBC headers. */
4098
+ jdbcUrl(jdbcUrl: string | null | undefined): AthenaClientBuilder<StorageEnabled, TStrict>;
4099
+ /** Override `X-Athena-Key` for this client while `key()` sets `apikey` / `x-api-key`. */
4100
+ athenaKey(athenaKey: string | null | undefined): AthenaClientBuilder<StorageEnabled, TStrict>;
4088
4101
  /** Configure Athena Auth client behavior for `client.auth.*` methods. */
4089
4102
  auth(config: AthenaCreateClientAuthOptions): AthenaClientBuilder<StorageEnabled, TStrict>;
4090
4103
  /** Configure experimental client options and narrow the built client when storage or strict column checks are enabled. */