catalyst-relay 0.3.1 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +38 -24
- package/dist/index.d.ts +38 -24
- package/dist/index.js +508 -145
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +508 -145
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -102,12 +102,10 @@ interface ObjectContent extends ObjectRef {
|
|
|
102
102
|
* Tree discovery query for hierarchical browsing
|
|
103
103
|
*/
|
|
104
104
|
interface TreeQuery {
|
|
105
|
-
/** Package to browse (e.g., '$TMP', '
|
|
105
|
+
/** Package to browse (e.g., '$TMP', 'ZSNAP_F01'). Omit to get top-level packages only. */
|
|
106
106
|
package?: string;
|
|
107
|
-
/**
|
|
108
|
-
|
|
109
|
-
/** Parent path for nested queries */
|
|
110
|
-
parentPath?: string;
|
|
107
|
+
/** Path within the package for drilling down (e.g., 'CORE_DATA_SERVICES/DATA_DEFINITIONS') */
|
|
108
|
+
path?: string;
|
|
111
109
|
}
|
|
112
110
|
/**
|
|
113
111
|
* Data preview query
|
|
@@ -159,11 +157,11 @@ type ErrorCode = 'AUTH_FAILED' | 'SESSION_EXPIRED' | 'SESSION_NOT_FOUND' | 'CSRF
|
|
|
159
157
|
* }
|
|
160
158
|
* // data is guaranteed non-null
|
|
161
159
|
*/
|
|
162
|
-
type Result<T, E = Error> = [T, null] | [null, E];
|
|
160
|
+
type Result<T, E extends Error = Error> = [T, null] | [null, E];
|
|
163
161
|
/**
|
|
164
162
|
* Async result type alias for convenience
|
|
165
163
|
*/
|
|
166
|
-
type AsyncResult<T, E = Error> = Promise<Result<T, E>>;
|
|
164
|
+
type AsyncResult<T, E extends Error = Error> = Promise<Result<T, E>>;
|
|
167
165
|
/**
|
|
168
166
|
* Create a success result
|
|
169
167
|
*/
|
|
@@ -171,7 +169,7 @@ declare function ok<T>(value: T): Result<T, never>;
|
|
|
171
169
|
/**
|
|
172
170
|
* Create an error result
|
|
173
171
|
*/
|
|
174
|
-
declare function err<E = Error>(error: E): Result<never, E>;
|
|
172
|
+
declare function err<E extends Error = Error>(error: E): Result<never, E>;
|
|
175
173
|
|
|
176
174
|
/**
|
|
177
175
|
* Session management type definitions
|
|
@@ -258,27 +256,42 @@ interface ActivationMessage {
|
|
|
258
256
|
}
|
|
259
257
|
|
|
260
258
|
/**
|
|
261
|
-
* Tree —
|
|
259
|
+
* Tree types — Public and internal type definitions
|
|
262
260
|
*/
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
261
|
+
interface TreeResponse {
|
|
262
|
+
packages: PackageNode[];
|
|
263
|
+
folders: FolderNode[];
|
|
264
|
+
objects: ObjectNode[];
|
|
265
|
+
}
|
|
266
|
+
interface PackageNode {
|
|
267
|
+
name: string;
|
|
268
|
+
description?: string;
|
|
269
|
+
numContents: number;
|
|
270
|
+
}
|
|
271
|
+
interface FolderNode {
|
|
268
272
|
name: string;
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
extension?: string;
|
|
272
|
-
hasChildren?: boolean;
|
|
273
|
-
children?: TreeNode[];
|
|
273
|
+
displayName: string;
|
|
274
|
+
numContents: number;
|
|
274
275
|
}
|
|
276
|
+
interface ApiState {
|
|
277
|
+
useInCloudDevelopment: boolean;
|
|
278
|
+
useInCloudDvlpmntActive: boolean;
|
|
279
|
+
useInKeyUserApps: boolean;
|
|
280
|
+
}
|
|
281
|
+
interface ObjectNode {
|
|
282
|
+
name: string;
|
|
283
|
+
objectType: string;
|
|
284
|
+
extension: string;
|
|
285
|
+
apiState?: ApiState;
|
|
286
|
+
}
|
|
287
|
+
|
|
275
288
|
/**
|
|
276
|
-
*
|
|
289
|
+
* Packages — List available packages
|
|
277
290
|
*/
|
|
291
|
+
|
|
278
292
|
interface Package {
|
|
279
293
|
name: string;
|
|
280
294
|
description?: string;
|
|
281
|
-
parentPackage?: string;
|
|
282
295
|
}
|
|
283
296
|
|
|
284
297
|
/**
|
|
@@ -466,7 +479,7 @@ interface DiffResult {
|
|
|
466
479
|
* - Automatic retry on 403 CSRF errors
|
|
467
480
|
* - Session reset on 500 errors
|
|
468
481
|
*
|
|
469
|
-
* Uses
|
|
482
|
+
* Uses Node.js https module for all HTTP requests (works reliably with mTLS).
|
|
470
483
|
*/
|
|
471
484
|
|
|
472
485
|
interface ADTClient {
|
|
@@ -481,7 +494,8 @@ interface ADTClient {
|
|
|
481
494
|
activate(objects: ObjectRef[]): AsyncResult<ActivationResult[]>;
|
|
482
495
|
delete(objects: ObjectRef[], transport?: string): AsyncResult<void>;
|
|
483
496
|
getPackages(filter?: string): AsyncResult<Package[]>;
|
|
484
|
-
getTree(query: TreeQuery): AsyncResult<
|
|
497
|
+
getTree(query: TreeQuery): AsyncResult<TreeResponse>;
|
|
498
|
+
getPackageStats(packageName: string): AsyncResult<PackageNode>;
|
|
485
499
|
getTransports(packageName: string): AsyncResult<Transport[]>;
|
|
486
500
|
previewData(query: PreviewSQL): AsyncResult<DataFrame>;
|
|
487
501
|
getDistinctValues(objectName: string, parameters: Parameter[], column: string, objectType?: 'table' | 'view'): AsyncResult<DistinctResult>;
|
|
@@ -494,4 +508,4 @@ interface ADTClient {
|
|
|
494
508
|
}
|
|
495
509
|
declare function createClient(config: ClientConfig): Result<ADTClient, Error>;
|
|
496
510
|
|
|
497
|
-
export { type ADTClient, type ActivationMessage, type ActivationResult, type Aggregation, type ApiResponse, type AsyncResult, type AuthConfig, type AuthType, type BasicAuthConfig, type BasicFilter, type BetweenFilter, type ClientConfig, type ColumnInfo, type DataFrame, type DataPreviewQuery, type Dependency, type DiffResult, type DistinctResult, type ErrorCode, type ErrorResponse, type ListFilter, type ObjectConfig, type ObjectContent, type ObjectMetadata, type ObjectRef, type ObjectWithContent, type Package, type Parameter, type PreviewSQL, type QueryFilter, type Result, type SamlAuthConfig, type SearchResult, type Session, type Sorting, type SsoAuthConfig, type SuccessResponse, type Transport, type TransportConfig, type
|
|
511
|
+
export { type ADTClient, type ActivationMessage, type ActivationResult, type Aggregation, type ApiResponse, type ApiState, type AsyncResult, type AuthConfig, type AuthType, type BasicAuthConfig, type BasicFilter, type BetweenFilter, type ClientConfig, type ColumnInfo, type DataFrame, type DataPreviewQuery, type Dependency, type DiffResult, type DistinctResult, type ErrorCode, type ErrorResponse, type FolderNode, type ListFilter, type ObjectConfig, type ObjectContent, type ObjectMetadata, type ObjectNode, type ObjectRef, type ObjectWithContent, type Package, type PackageNode, type Parameter, type PreviewSQL, type QueryFilter, type Result, type SamlAuthConfig, type SearchResult, type Session, type Sorting, type SsoAuthConfig, type SuccessResponse, type Transport, type TransportConfig, type TreeQuery, type TreeResponse, type UpsertResult, buildSQLQuery, createClient, err, ok };
|
package/dist/index.d.ts
CHANGED
|
@@ -102,12 +102,10 @@ interface ObjectContent extends ObjectRef {
|
|
|
102
102
|
* Tree discovery query for hierarchical browsing
|
|
103
103
|
*/
|
|
104
104
|
interface TreeQuery {
|
|
105
|
-
/** Package to browse (e.g., '$TMP', '
|
|
105
|
+
/** Package to browse (e.g., '$TMP', 'ZSNAP_F01'). Omit to get top-level packages only. */
|
|
106
106
|
package?: string;
|
|
107
|
-
/**
|
|
108
|
-
|
|
109
|
-
/** Parent path for nested queries */
|
|
110
|
-
parentPath?: string;
|
|
107
|
+
/** Path within the package for drilling down (e.g., 'CORE_DATA_SERVICES/DATA_DEFINITIONS') */
|
|
108
|
+
path?: string;
|
|
111
109
|
}
|
|
112
110
|
/**
|
|
113
111
|
* Data preview query
|
|
@@ -159,11 +157,11 @@ type ErrorCode = 'AUTH_FAILED' | 'SESSION_EXPIRED' | 'SESSION_NOT_FOUND' | 'CSRF
|
|
|
159
157
|
* }
|
|
160
158
|
* // data is guaranteed non-null
|
|
161
159
|
*/
|
|
162
|
-
type Result<T, E = Error> = [T, null] | [null, E];
|
|
160
|
+
type Result<T, E extends Error = Error> = [T, null] | [null, E];
|
|
163
161
|
/**
|
|
164
162
|
* Async result type alias for convenience
|
|
165
163
|
*/
|
|
166
|
-
type AsyncResult<T, E = Error> = Promise<Result<T, E>>;
|
|
164
|
+
type AsyncResult<T, E extends Error = Error> = Promise<Result<T, E>>;
|
|
167
165
|
/**
|
|
168
166
|
* Create a success result
|
|
169
167
|
*/
|
|
@@ -171,7 +169,7 @@ declare function ok<T>(value: T): Result<T, never>;
|
|
|
171
169
|
/**
|
|
172
170
|
* Create an error result
|
|
173
171
|
*/
|
|
174
|
-
declare function err<E = Error>(error: E): Result<never, E>;
|
|
172
|
+
declare function err<E extends Error = Error>(error: E): Result<never, E>;
|
|
175
173
|
|
|
176
174
|
/**
|
|
177
175
|
* Session management type definitions
|
|
@@ -258,27 +256,42 @@ interface ActivationMessage {
|
|
|
258
256
|
}
|
|
259
257
|
|
|
260
258
|
/**
|
|
261
|
-
* Tree —
|
|
259
|
+
* Tree types — Public and internal type definitions
|
|
262
260
|
*/
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
261
|
+
interface TreeResponse {
|
|
262
|
+
packages: PackageNode[];
|
|
263
|
+
folders: FolderNode[];
|
|
264
|
+
objects: ObjectNode[];
|
|
265
|
+
}
|
|
266
|
+
interface PackageNode {
|
|
267
|
+
name: string;
|
|
268
|
+
description?: string;
|
|
269
|
+
numContents: number;
|
|
270
|
+
}
|
|
271
|
+
interface FolderNode {
|
|
268
272
|
name: string;
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
extension?: string;
|
|
272
|
-
hasChildren?: boolean;
|
|
273
|
-
children?: TreeNode[];
|
|
273
|
+
displayName: string;
|
|
274
|
+
numContents: number;
|
|
274
275
|
}
|
|
276
|
+
interface ApiState {
|
|
277
|
+
useInCloudDevelopment: boolean;
|
|
278
|
+
useInCloudDvlpmntActive: boolean;
|
|
279
|
+
useInKeyUserApps: boolean;
|
|
280
|
+
}
|
|
281
|
+
interface ObjectNode {
|
|
282
|
+
name: string;
|
|
283
|
+
objectType: string;
|
|
284
|
+
extension: string;
|
|
285
|
+
apiState?: ApiState;
|
|
286
|
+
}
|
|
287
|
+
|
|
275
288
|
/**
|
|
276
|
-
*
|
|
289
|
+
* Packages — List available packages
|
|
277
290
|
*/
|
|
291
|
+
|
|
278
292
|
interface Package {
|
|
279
293
|
name: string;
|
|
280
294
|
description?: string;
|
|
281
|
-
parentPackage?: string;
|
|
282
295
|
}
|
|
283
296
|
|
|
284
297
|
/**
|
|
@@ -466,7 +479,7 @@ interface DiffResult {
|
|
|
466
479
|
* - Automatic retry on 403 CSRF errors
|
|
467
480
|
* - Session reset on 500 errors
|
|
468
481
|
*
|
|
469
|
-
* Uses
|
|
482
|
+
* Uses Node.js https module for all HTTP requests (works reliably with mTLS).
|
|
470
483
|
*/
|
|
471
484
|
|
|
472
485
|
interface ADTClient {
|
|
@@ -481,7 +494,8 @@ interface ADTClient {
|
|
|
481
494
|
activate(objects: ObjectRef[]): AsyncResult<ActivationResult[]>;
|
|
482
495
|
delete(objects: ObjectRef[], transport?: string): AsyncResult<void>;
|
|
483
496
|
getPackages(filter?: string): AsyncResult<Package[]>;
|
|
484
|
-
getTree(query: TreeQuery): AsyncResult<
|
|
497
|
+
getTree(query: TreeQuery): AsyncResult<TreeResponse>;
|
|
498
|
+
getPackageStats(packageName: string): AsyncResult<PackageNode>;
|
|
485
499
|
getTransports(packageName: string): AsyncResult<Transport[]>;
|
|
486
500
|
previewData(query: PreviewSQL): AsyncResult<DataFrame>;
|
|
487
501
|
getDistinctValues(objectName: string, parameters: Parameter[], column: string, objectType?: 'table' | 'view'): AsyncResult<DistinctResult>;
|
|
@@ -494,4 +508,4 @@ interface ADTClient {
|
|
|
494
508
|
}
|
|
495
509
|
declare function createClient(config: ClientConfig): Result<ADTClient, Error>;
|
|
496
510
|
|
|
497
|
-
export { type ADTClient, type ActivationMessage, type ActivationResult, type Aggregation, type ApiResponse, type AsyncResult, type AuthConfig, type AuthType, type BasicAuthConfig, type BasicFilter, type BetweenFilter, type ClientConfig, type ColumnInfo, type DataFrame, type DataPreviewQuery, type Dependency, type DiffResult, type DistinctResult, type ErrorCode, type ErrorResponse, type ListFilter, type ObjectConfig, type ObjectContent, type ObjectMetadata, type ObjectRef, type ObjectWithContent, type Package, type Parameter, type PreviewSQL, type QueryFilter, type Result, type SamlAuthConfig, type SearchResult, type Session, type Sorting, type SsoAuthConfig, type SuccessResponse, type Transport, type TransportConfig, type
|
|
511
|
+
export { type ADTClient, type ActivationMessage, type ActivationResult, type Aggregation, type ApiResponse, type ApiState, type AsyncResult, type AuthConfig, type AuthType, type BasicAuthConfig, type BasicFilter, type BetweenFilter, type ClientConfig, type ColumnInfo, type DataFrame, type DataPreviewQuery, type Dependency, type DiffResult, type DistinctResult, type ErrorCode, type ErrorResponse, type FolderNode, type ListFilter, type ObjectConfig, type ObjectContent, type ObjectMetadata, type ObjectNode, type ObjectRef, type ObjectWithContent, type Package, type PackageNode, type Parameter, type PreviewSQL, type QueryFilter, type Result, type SamlAuthConfig, type SearchResult, type Session, type Sorting, type SsoAuthConfig, type SuccessResponse, type Transport, type TransportConfig, type TreeQuery, type TreeResponse, type UpsertResult, buildSQLQuery, createClient, err, ok };
|