@xylex-group/athena 2.3.0 → 2.4.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 (36) hide show
  1. package/README.md +124 -106
  2. package/dist/browser.cjs +584 -99
  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 +583 -100
  7. package/dist/browser.js.map +1 -1
  8. package/dist/cli/index.cjs +573 -97
  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 +573 -97
  13. package/dist/cli/index.js.map +1 -1
  14. package/dist/index.cjs +584 -99
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.cts +7 -7
  17. package/dist/index.d.ts +7 -7
  18. package/dist/index.js +583 -100
  19. package/dist/index.js.map +1 -1
  20. package/dist/{model-form-BpDXlbxb.d.ts → model-form-C0FAbOaf.d.ts} +1 -1
  21. package/dist/{model-form-hoE2jHIi.d.cts → model-form-GzTqhEzM.d.cts} +1 -1
  22. package/dist/{pipeline-BNIw8pDQ.d.ts → pipeline-CR4V15jF.d.ts} +1 -1
  23. package/dist/{pipeline-DNIpEsN8.d.cts → pipeline-DZeExYMA.d.cts} +1 -1
  24. package/dist/{react-email-BvyCZnfW.d.cts → react-email-BuApZuyG.d.ts} +19 -6
  25. package/dist/{react-email-qPA1wjFV.d.ts → react-email-CQJq92zQ.d.cts} +19 -6
  26. package/dist/react.cjs +249 -12
  27. package/dist/react.cjs.map +1 -1
  28. package/dist/react.d.cts +4 -4
  29. package/dist/react.d.ts +4 -4
  30. package/dist/react.js +249 -12
  31. package/dist/react.js.map +1 -1
  32. package/dist/{types-A5e97acl.d.cts → types-09Q4D86N.d.cts} +23 -2
  33. package/dist/{types-A5e97acl.d.ts → types-09Q4D86N.d.ts} +23 -2
  34. package/dist/{types-bDlr4u7p.d.cts → types-D1JvL21V.d.cts} +1 -1
  35. package/dist/{types-BnD22-vb.d.ts → types-DU3gNdFv.d.ts} +1 -1
  36. package/package.json +40 -40
@@ -44,9 +44,12 @@ interface AthenaSortBy {
44
44
  direction: AthenaSortDirection;
45
45
  }
46
46
  interface AthenaFetchPayload {
47
+ select?: string | AthenaJsonObject;
47
48
  view_name?: string;
48
49
  table_name?: string;
49
50
  columns?: string[] | string;
51
+ where?: AthenaJsonObject;
52
+ orderBy?: AthenaJsonObject | AthenaJsonArray;
50
53
  conditions?: AthenaGatewayCondition[];
51
54
  limit?: number;
52
55
  offset?: number;
@@ -54,6 +57,8 @@ interface AthenaFetchPayload {
54
57
  page_size?: number;
55
58
  total_pages?: number;
56
59
  strip_nulls?: boolean;
60
+ count?: AthenaCountOption;
61
+ head?: boolean;
57
62
  group_by?: string;
58
63
  time_granularity?: 'day' | 'hour' | 'minute';
59
64
  aggregation_column?: string;
@@ -165,7 +170,7 @@ interface AthenaGatewayResponse<T = unknown> {
165
170
  errorDetails?: AthenaGatewayErrorDetails | null;
166
171
  raw: unknown;
167
172
  }
168
- type AthenaGatewayErrorCode = 'NETWORK_ERROR' | 'HTTP_ERROR' | 'INVALID_JSON' | 'UNKNOWN_ERROR';
173
+ type AthenaGatewayErrorCode = 'NETWORK_ERROR' | 'INVALID_URL' | 'HTTP_ERROR' | 'INVALID_JSON' | 'UNKNOWN_ERROR';
169
174
  interface AthenaGatewayErrorDetails {
170
175
  code: AthenaGatewayErrorCode;
171
176
  message: string;
@@ -176,6 +181,22 @@ interface AthenaGatewayErrorDetails {
176
181
  hint?: string;
177
182
  cause?: string;
178
183
  }
184
+ interface AthenaGatewayConnectionOptions {
185
+ path?: `/${string}`;
186
+ headers?: Record<string, string>;
187
+ signal?: AbortSignal;
188
+ }
189
+ interface AthenaGatewayConnectionResult {
190
+ ok: boolean;
191
+ reachable: boolean;
192
+ status: number;
193
+ statusText?: string | null;
194
+ baseUrl: string;
195
+ url: string;
196
+ error?: string;
197
+ errorDetails?: AthenaGatewayErrorDetails | null;
198
+ raw: unknown;
199
+ }
179
200
  interface AthenaGatewayResponseLog extends AthenaGatewayResponse {
180
201
  timestamp: string;
181
202
  }
@@ -378,4 +399,4 @@ interface SchemaIntrospectionProvider {
378
399
  inspect(options?: IntrospectionInspectOptions): Promise<IntrospectionSnapshot>;
379
400
  }
380
401
 
381
- export { type AthenaConditionCastType as A, Backend as B, type SchemaDef as C, type DatabaseDef as D, type TenantContextValue as E, type TenantKeyMap as F, type AthenaConditionValue as G, type AthenaConditionArrayValue as H, type IntrospectionSnapshot as I, type AnyModelDef as J, type AthenaConditionOperator as K, type AthenaGatewayHookConfig as L, type ModelAt as M, type AthenaGatewayHookResult as N, type AthenaDeletePayload as O, type AthenaFetchPayload as P, type AthenaGatewayResponse as Q, type RegistryDef as R, type SchemaIntrospectionProvider as S, type TenantContext as T, type UpdateOf as U, type AthenaInsertPayload as V, type AthenaUpdatePayload as W, type AthenaGatewayEndpointPath as X, type AthenaGatewayMethod as Y, type AthenaGatewayCallOptions as a, type AthenaGatewayErrorCode as b, type AthenaGatewayErrorDetails as c, type AthenaJsonArray as d, type AthenaJsonObject as e, type AthenaJsonPrimitive as f, type AthenaJsonValue as g, type AthenaRpcCallOptions as h, type AthenaRpcFilter as i, type AthenaRpcFilterOperator as j, type AthenaRpcOrder as k, type AthenaRpcPayload as l, type BackendConfig as m, type BackendType as n, type InsertOf as o, type IntrospectionColumn as p, type IntrospectionInspectOptions as q, type IntrospectionRelation as r, type IntrospectionSchema as s, type IntrospectionTable as t, type IntrospectionTypeKind as u, type ModelDef as v, type ModelMetadata as w, type ModelRelationKind as x, type ModelRelationMetadata as y, type RowOf as z };
402
+ export { type AthenaConditionCastType as A, Backend as B, type ModelRelationMetadata as C, type DatabaseDef as D, type RowOf as E, type SchemaDef as F, type TenantContextValue as G, type TenantKeyMap as H, type IntrospectionSnapshot as I, type AthenaConditionValue as J, type AthenaConditionArrayValue as K, type AnyModelDef as L, type ModelAt as M, type AthenaConditionOperator as N, type AthenaGatewayHookConfig as O, type AthenaGatewayHookResult as P, type AthenaDeletePayload as Q, type RegistryDef as R, type SchemaIntrospectionProvider as S, type TenantContext as T, type UpdateOf as U, type AthenaFetchPayload as V, type AthenaGatewayResponse as W, type AthenaInsertPayload as X, type AthenaUpdatePayload as Y, type AthenaGatewayEndpointPath as Z, type AthenaGatewayMethod as _, type AthenaGatewayCallOptions as a, type AthenaGatewayConnectionOptions as b, type AthenaGatewayConnectionResult as c, type AthenaGatewayErrorCode as d, type AthenaGatewayErrorDetails as e, type AthenaJsonArray as f, type AthenaJsonObject as g, type AthenaJsonPrimitive as h, type AthenaJsonValue as i, type AthenaRpcCallOptions as j, type AthenaRpcFilter as k, type AthenaRpcFilterOperator as l, type AthenaRpcOrder as m, type AthenaRpcPayload as n, type BackendConfig as o, type BackendType as p, type InsertOf as q, type IntrospectionColumn as r, type IntrospectionInspectOptions as s, type IntrospectionRelation as t, type IntrospectionSchema as u, type IntrospectionTable as v, type IntrospectionTypeKind as w, type ModelDef as x, type ModelMetadata as y, type ModelRelationKind as z };
@@ -44,9 +44,12 @@ interface AthenaSortBy {
44
44
  direction: AthenaSortDirection;
45
45
  }
46
46
  interface AthenaFetchPayload {
47
+ select?: string | AthenaJsonObject;
47
48
  view_name?: string;
48
49
  table_name?: string;
49
50
  columns?: string[] | string;
51
+ where?: AthenaJsonObject;
52
+ orderBy?: AthenaJsonObject | AthenaJsonArray;
50
53
  conditions?: AthenaGatewayCondition[];
51
54
  limit?: number;
52
55
  offset?: number;
@@ -54,6 +57,8 @@ interface AthenaFetchPayload {
54
57
  page_size?: number;
55
58
  total_pages?: number;
56
59
  strip_nulls?: boolean;
60
+ count?: AthenaCountOption;
61
+ head?: boolean;
57
62
  group_by?: string;
58
63
  time_granularity?: 'day' | 'hour' | 'minute';
59
64
  aggregation_column?: string;
@@ -165,7 +170,7 @@ interface AthenaGatewayResponse<T = unknown> {
165
170
  errorDetails?: AthenaGatewayErrorDetails | null;
166
171
  raw: unknown;
167
172
  }
168
- type AthenaGatewayErrorCode = 'NETWORK_ERROR' | 'HTTP_ERROR' | 'INVALID_JSON' | 'UNKNOWN_ERROR';
173
+ type AthenaGatewayErrorCode = 'NETWORK_ERROR' | 'INVALID_URL' | 'HTTP_ERROR' | 'INVALID_JSON' | 'UNKNOWN_ERROR';
169
174
  interface AthenaGatewayErrorDetails {
170
175
  code: AthenaGatewayErrorCode;
171
176
  message: string;
@@ -176,6 +181,22 @@ interface AthenaGatewayErrorDetails {
176
181
  hint?: string;
177
182
  cause?: string;
178
183
  }
184
+ interface AthenaGatewayConnectionOptions {
185
+ path?: `/${string}`;
186
+ headers?: Record<string, string>;
187
+ signal?: AbortSignal;
188
+ }
189
+ interface AthenaGatewayConnectionResult {
190
+ ok: boolean;
191
+ reachable: boolean;
192
+ status: number;
193
+ statusText?: string | null;
194
+ baseUrl: string;
195
+ url: string;
196
+ error?: string;
197
+ errorDetails?: AthenaGatewayErrorDetails | null;
198
+ raw: unknown;
199
+ }
179
200
  interface AthenaGatewayResponseLog extends AthenaGatewayResponse {
180
201
  timestamp: string;
181
202
  }
@@ -378,4 +399,4 @@ interface SchemaIntrospectionProvider {
378
399
  inspect(options?: IntrospectionInspectOptions): Promise<IntrospectionSnapshot>;
379
400
  }
380
401
 
381
- export { type AthenaConditionCastType as A, Backend as B, type SchemaDef as C, type DatabaseDef as D, type TenantContextValue as E, type TenantKeyMap as F, type AthenaConditionValue as G, type AthenaConditionArrayValue as H, type IntrospectionSnapshot as I, type AnyModelDef as J, type AthenaConditionOperator as K, type AthenaGatewayHookConfig as L, type ModelAt as M, type AthenaGatewayHookResult as N, type AthenaDeletePayload as O, type AthenaFetchPayload as P, type AthenaGatewayResponse as Q, type RegistryDef as R, type SchemaIntrospectionProvider as S, type TenantContext as T, type UpdateOf as U, type AthenaInsertPayload as V, type AthenaUpdatePayload as W, type AthenaGatewayEndpointPath as X, type AthenaGatewayMethod as Y, type AthenaGatewayCallOptions as a, type AthenaGatewayErrorCode as b, type AthenaGatewayErrorDetails as c, type AthenaJsonArray as d, type AthenaJsonObject as e, type AthenaJsonPrimitive as f, type AthenaJsonValue as g, type AthenaRpcCallOptions as h, type AthenaRpcFilter as i, type AthenaRpcFilterOperator as j, type AthenaRpcOrder as k, type AthenaRpcPayload as l, type BackendConfig as m, type BackendType as n, type InsertOf as o, type IntrospectionColumn as p, type IntrospectionInspectOptions as q, type IntrospectionRelation as r, type IntrospectionSchema as s, type IntrospectionTable as t, type IntrospectionTypeKind as u, type ModelDef as v, type ModelMetadata as w, type ModelRelationKind as x, type ModelRelationMetadata as y, type RowOf as z };
402
+ export { type AthenaConditionCastType as A, Backend as B, type ModelRelationMetadata as C, type DatabaseDef as D, type RowOf as E, type SchemaDef as F, type TenantContextValue as G, type TenantKeyMap as H, type IntrospectionSnapshot as I, type AthenaConditionValue as J, type AthenaConditionArrayValue as K, type AnyModelDef as L, type ModelAt as M, type AthenaConditionOperator as N, type AthenaGatewayHookConfig as O, type AthenaGatewayHookResult as P, type AthenaDeletePayload as Q, type RegistryDef as R, type SchemaIntrospectionProvider as S, type TenantContext as T, type UpdateOf as U, type AthenaFetchPayload as V, type AthenaGatewayResponse as W, type AthenaInsertPayload as X, type AthenaUpdatePayload as Y, type AthenaGatewayEndpointPath as Z, type AthenaGatewayMethod as _, type AthenaGatewayCallOptions as a, type AthenaGatewayConnectionOptions as b, type AthenaGatewayConnectionResult as c, type AthenaGatewayErrorCode as d, type AthenaGatewayErrorDetails as e, type AthenaJsonArray as f, type AthenaJsonObject as g, type AthenaJsonPrimitive as h, type AthenaJsonValue as i, type AthenaRpcCallOptions as j, type AthenaRpcFilter as k, type AthenaRpcFilterOperator as l, type AthenaRpcOrder as m, type AthenaRpcPayload as n, type BackendConfig as o, type BackendType as p, type InsertOf as q, type IntrospectionColumn as r, type IntrospectionInspectOptions as s, type IntrospectionRelation as t, type IntrospectionSchema as u, type IntrospectionTable as v, type IntrospectionTypeKind as w, type ModelDef as x, type ModelMetadata as y, type ModelRelationKind as z };
@@ -1,4 +1,4 @@
1
- import { n as BackendType, I as IntrospectionSnapshot, S as SchemaIntrospectionProvider } from './types-A5e97acl.cjs';
1
+ import { p as BackendType, I as IntrospectionSnapshot, S as SchemaIntrospectionProvider } from './types-09Q4D86N.cjs';
2
2
 
3
3
  /**
4
4
  * Supported case transformations for generated symbols and path token variants.
@@ -1,4 +1,4 @@
1
- import { n as BackendType, I as IntrospectionSnapshot, S as SchemaIntrospectionProvider } from './types-A5e97acl.js';
1
+ import { p as BackendType, I as IntrospectionSnapshot, S as SchemaIntrospectionProvider } from './types-09Q4D86N.js';
2
2
 
3
3
  /**
4
4
  * Supported case transformations for generated symbols and path token variants.
package/package.json CHANGED
@@ -38,71 +38,71 @@
38
38
  "exports": {
39
39
  ".": {
40
40
  "browser": {
41
+ "default": "./dist/browser.js",
41
42
  "import": {
42
- "types": "./dist/browser.d.ts",
43
- "default": "./dist/browser.js"
43
+ "default": "./dist/browser.js",
44
+ "types": "./dist/browser.d.ts"
44
45
  },
45
46
  "require": {
46
- "types": "./dist/browser.d.cts",
47
- "default": "./dist/browser.cjs"
48
- },
49
- "default": "./dist/browser.js"
47
+ "default": "./dist/browser.cjs",
48
+ "types": "./dist/browser.d.cts"
49
+ }
50
50
  },
51
+ "default": "./dist/index.js",
51
52
  "import": {
52
- "types": "./dist/index.d.ts",
53
- "default": "./dist/index.js"
53
+ "default": "./dist/index.js",
54
+ "types": "./dist/index.d.ts"
54
55
  },
55
56
  "require": {
56
- "types": "./dist/index.d.cts",
57
- "default": "./dist/index.cjs"
58
- },
59
- "default": "./dist/index.js"
57
+ "default": "./dist/index.cjs",
58
+ "types": "./dist/index.d.cts"
59
+ }
60
60
  },
61
61
  "./browser": {
62
+ "default": "./dist/browser.js",
62
63
  "import": {
63
- "types": "./dist/browser.d.ts",
64
- "default": "./dist/browser.js"
64
+ "default": "./dist/browser.js",
65
+ "types": "./dist/browser.d.ts"
65
66
  },
66
67
  "require": {
67
- "types": "./dist/browser.d.cts",
68
- "default": "./dist/browser.cjs"
69
- },
70
- "default": "./dist/browser.js"
68
+ "default": "./dist/browser.cjs",
69
+ "types": "./dist/browser.d.cts"
70
+ }
71
71
  },
72
72
  "./cookies": {
73
+ "default": "./dist/cookies.js",
73
74
  "import": {
74
- "types": "./dist/cookies.d.ts",
75
- "default": "./dist/cookies.js"
75
+ "default": "./dist/cookies.js",
76
+ "types": "./dist/cookies.d.ts"
76
77
  },
77
78
  "require": {
78
- "types": "./dist/cookies.d.cts",
79
- "default": "./dist/cookies.cjs"
80
- },
81
- "default": "./dist/cookies.js"
79
+ "default": "./dist/cookies.cjs",
80
+ "types": "./dist/cookies.d.cts"
81
+ }
82
82
  },
83
+ "./package.json": "./package.json",
83
84
  "./react": {
85
+ "default": "./dist/react.js",
84
86
  "import": {
85
- "types": "./dist/react.d.ts",
86
- "default": "./dist/react.js"
87
+ "default": "./dist/react.js",
88
+ "types": "./dist/react.d.ts"
87
89
  },
88
90
  "require": {
89
- "types": "./dist/react.d.cts",
90
- "default": "./dist/react.cjs"
91
- },
92
- "default": "./dist/react.js"
91
+ "default": "./dist/react.cjs",
92
+ "types": "./dist/react.d.cts"
93
+ }
93
94
  },
94
95
  "./utils": {
96
+ "default": "./dist/utils.js",
95
97
  "import": {
96
- "types": "./dist/utils.d.ts",
97
- "default": "./dist/utils.js"
98
+ "default": "./dist/utils.js",
99
+ "types": "./dist/utils.d.ts"
98
100
  },
99
101
  "require": {
100
- "types": "./dist/utils.d.cts",
101
- "default": "./dist/utils.cjs"
102
- },
103
- "default": "./dist/utils.js"
104
- },
105
- "./package.json": "./package.json"
102
+ "default": "./dist/utils.cjs",
103
+ "types": "./dist/utils.d.cts"
104
+ }
105
+ }
106
106
  },
107
107
  "files": [
108
108
  "dist",
@@ -125,7 +125,6 @@
125
125
  "main": "./dist/index.cjs",
126
126
  "module": "./dist/index.js",
127
127
  "name": "@xylex-group/athena",
128
- "sideEffects": false,
129
128
  "peerDependencies": {
130
129
  "@react-email/components": ">=1.0.0",
131
130
  "@react-email/render": ">=2.0.0",
@@ -147,6 +146,7 @@
147
146
  "type": "git",
148
147
  "url": "git+https://github.com/xylex-group/athena-js.git"
149
148
  },
149
+ "sideEffects": false,
150
150
  "type": "module",
151
151
  "types": "./dist/index.d.ts",
152
152
  "typesVersions": {
@@ -168,7 +168,7 @@
168
168
  ]
169
169
  }
170
170
  },
171
- "version": "2.3.0",
171
+ "version": "2.4.0",
172
172
  "scripts": {
173
173
  "build": "tsup",
174
174
  "check:all": "pnpm lint && pnpm typecheck && pnpm test && pnpm build",