@incorta/sdk 1.8.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.
- package/LICENSE +21 -0
- package/README.md +283 -0
- package/dist/index.cjs +1067 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +842 -0
- package/dist/index.d.ts +842 -0
- package/dist/index.js +1012 -0
- package/dist/index.js.map +1 -0
- package/package.json +54 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,842 @@
|
|
|
1
|
+
import { IncortaAuthConfig, IncortaAuth, IncortaUser, AuthSession } from '@incorta/auth';
|
|
2
|
+
export { AuthSession, IncortaAuth, IncortaUser } from '@incorta/auth';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Options for {@link createIncortaClient} — every `@incorta/auth` option, plus:
|
|
6
|
+
*
|
|
7
|
+
* - `auth`: an already-built {@link IncortaAuth} to reuse instead of creating
|
|
8
|
+
* one. When given, the auth options are ignored (they live on that instance).
|
|
9
|
+
* - `timeoutMs` / `maxRetries`: transport settings for the metadata calls.
|
|
10
|
+
*/
|
|
11
|
+
type IncortaClientConfig = IncortaAuthConfig & {
|
|
12
|
+
/**
|
|
13
|
+
* An existing `@incorta/auth` instance to borrow sessions from. Prefer this
|
|
14
|
+
* whenever the app already mounts one — a second instance would mean two
|
|
15
|
+
* sets of OAuth state for the same users.
|
|
16
|
+
*/
|
|
17
|
+
auth?: IncortaAuth;
|
|
18
|
+
/**
|
|
19
|
+
* Per-request timeout in milliseconds.
|
|
20
|
+
* @default 30000
|
|
21
|
+
*/
|
|
22
|
+
timeoutMs?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Retries for transient failures (HTTP 429 and 5xx, and network errors).
|
|
25
|
+
* Client errors are never retried — replaying them cannot help.
|
|
26
|
+
* @default 3
|
|
27
|
+
*/
|
|
28
|
+
maxRetries?: number;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Internal HTTP transport.
|
|
33
|
+
*
|
|
34
|
+
* Owns the auth header, the retry policy, and the translation of error
|
|
35
|
+
* responses into the error hierarchy. Not part of the public API.
|
|
36
|
+
*
|
|
37
|
+
* The bearer token is resolved per request rather than captured once: it
|
|
38
|
+
* belongs to a user session that `@incorta/auth` refreshes underneath us, so
|
|
39
|
+
* reading it late is what keeps a long-lived scoped client honest.
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Supplies the access token for one request. Throws
|
|
44
|
+
* {@link IncortaSessionExpiredError} when the session it draws on has aged out.
|
|
45
|
+
*/
|
|
46
|
+
type TokenProvider = () => string | Promise<string>;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Values the Incorta API accepts and returns.
|
|
50
|
+
*
|
|
51
|
+
* Each is a string-literal union (compile-time safety) paired with a frozen
|
|
52
|
+
* array of its members (runtime validation, for JavaScript callers who get no
|
|
53
|
+
* type checking).
|
|
54
|
+
*/
|
|
55
|
+
/**
|
|
56
|
+
* Filter for `client.schemas.list()`.
|
|
57
|
+
*
|
|
58
|
+
* Passing an unrecognised value to the API is *silently* treated as `BUSINESS`
|
|
59
|
+
* and returns HTTP 200, so a typo yields plausible-looking but wrong results.
|
|
60
|
+
* The client validates locally before sending the request to make that failure
|
|
61
|
+
* loud.
|
|
62
|
+
*/
|
|
63
|
+
declare const SCHEMA_TYPES: readonly ["ALL", "PHYSICAL", "BUSINESS"];
|
|
64
|
+
type SchemaType = (typeof SCHEMA_TYPES)[number];
|
|
65
|
+
/** Ordering accepted by the schema list endpoint. */
|
|
66
|
+
declare const SORT_ORDERS: readonly ["NAME_ASC", "NAME_DESC"];
|
|
67
|
+
type SortBy = (typeof SORT_ORDERS)[number];
|
|
68
|
+
/**
|
|
69
|
+
* Normalised type of a schema object.
|
|
70
|
+
*
|
|
71
|
+
* The API reports business views as `"BUSSINESS_VIEW"` (three S's). That
|
|
72
|
+
* spelling is preserved as the value for round-tripping, but {@link parseObjectType}
|
|
73
|
+
* accepts the corrected spelling too, so callers keep working if Incorta ever
|
|
74
|
+
* fixes it.
|
|
75
|
+
*/
|
|
76
|
+
type ObjectType = "table" | "BUSSINESS_VIEW" | "UNKNOWN";
|
|
77
|
+
/**
|
|
78
|
+
* Converts an API type string into an {@link ObjectType}.
|
|
79
|
+
*
|
|
80
|
+
* Unrecognised values map to `"UNKNOWN"` rather than throwing: an unfamiliar
|
|
81
|
+
* object type should not break metadata listing.
|
|
82
|
+
*/
|
|
83
|
+
declare function parseObjectType(raw: string | null | undefined): ObjectType;
|
|
84
|
+
/**
|
|
85
|
+
* Result format for a data query.
|
|
86
|
+
*
|
|
87
|
+
* `csv` comes back as one text blob rather than parsed rows, and cannot be
|
|
88
|
+
* combined with an unstringified response: asking for both returns only the
|
|
89
|
+
* header line, with HTTP 200. The client blocks that combination.
|
|
90
|
+
*/
|
|
91
|
+
declare const QUERY_FORMATS: readonly ["json", "csv"];
|
|
92
|
+
type QueryFormat = (typeof QUERY_FORMATS)[number];
|
|
93
|
+
/** Comparison operator for a filter. */
|
|
94
|
+
declare const FILTER_OPS: readonly ["=", "!=", ">", ">=", "<", "<=", "BETWEEN", "IN_LIST"];
|
|
95
|
+
type FilterOp = (typeof FILTER_OPS)[number];
|
|
96
|
+
/** Aggregation function applied to a measure. */
|
|
97
|
+
declare const AGGREGATIONS: readonly ["sum", "count", "distinct", "median", "average", "min", "max"];
|
|
98
|
+
type Aggregation = (typeof AGGREGATIONS)[number];
|
|
99
|
+
/**
|
|
100
|
+
* How null cells are rendered in a result.
|
|
101
|
+
*
|
|
102
|
+
* Incorta's published API schema also lists `DASH`, but the server rejects it
|
|
103
|
+
* with HTTP 400 — it is deliberately absent here rather than offered and broken.
|
|
104
|
+
*/
|
|
105
|
+
declare const NULL_VALUE_AS: readonly ["NULL", "EMPTY"];
|
|
106
|
+
type NullValueAs = (typeof NULL_VALUE_AS)[number];
|
|
107
|
+
/** Direction of a sort criterion. */
|
|
108
|
+
declare const SORT_DIRECTIONS: readonly ["asc", "desc"];
|
|
109
|
+
type SortDirection = (typeof SORT_DIRECTIONS)[number];
|
|
110
|
+
/** Semantic role Incorta assigns to a column. */
|
|
111
|
+
declare const COLUMN_FUNCTIONS: readonly ["key", "dimension", "measure", "attribute", "unknown"];
|
|
112
|
+
type ColumnFunction = (typeof COLUMN_FUNCTIONS)[number];
|
|
113
|
+
/** Converts an API function string into a {@link ColumnFunction}. */
|
|
114
|
+
declare function parseColumnFunction(raw: string | null | undefined): ColumnFunction;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Querying data out of business views.
|
|
118
|
+
*
|
|
119
|
+
* Where the schema resources describe *what exists*, this one reads *what is in
|
|
120
|
+
* it*. It wraps the single `POST {apiRoot}/query` endpoint, which takes an
|
|
121
|
+
* `InsightQuery` and returns a pivot: measures, optionally grouped by row and
|
|
122
|
+
* column dimensions.
|
|
123
|
+
*
|
|
124
|
+
* Fields are addressed by their fully qualified name, `SCHEMA.VIEW.COLUMN` —
|
|
125
|
+
* for example `HR_BS.Employee_BS.SALARY`.
|
|
126
|
+
*
|
|
127
|
+
* Three behaviours of that endpoint are worth knowing, because all three fail
|
|
128
|
+
* quietly rather than with an error:
|
|
129
|
+
*
|
|
130
|
+
* - Omitting `aggregate` makes Incorta aggregate anyway. A non-aggregate
|
|
131
|
+
* extract written without it returns **zero rows with HTTP 200**, and reports
|
|
132
|
+
* string columns as `double`. This client always sends the flag.
|
|
133
|
+
* - An aggregate query ignores the top-level `sorting` list entirely; sorting
|
|
134
|
+
* is read only from within a dimension. This client routes each sort onto the
|
|
135
|
+
* dimension it names, and rejects one that matches none.
|
|
136
|
+
* - `format: "csv"` combined with an unstringified response returns only the
|
|
137
|
+
* header line, also with HTTP 200. `csv()` handles the encoding itself.
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
/** Rows per request when `iterRows` is not given a size. */
|
|
141
|
+
declare const DEFAULT_QUERY_PAGE_SIZE = 1000;
|
|
142
|
+
/** One sorting criterion. */
|
|
143
|
+
interface Sort {
|
|
144
|
+
/** Fully qualified column to sort on. */
|
|
145
|
+
field?: string;
|
|
146
|
+
/** Expression to sort on, instead of `field`. */
|
|
147
|
+
formula?: string;
|
|
148
|
+
/** @default "asc" */
|
|
149
|
+
dir?: SortDirection;
|
|
150
|
+
label?: string;
|
|
151
|
+
/** Sort by the nth measure rather than a dimension. */
|
|
152
|
+
measureIndex?: number;
|
|
153
|
+
}
|
|
154
|
+
/** A filter applied to the source rows, before any aggregation. */
|
|
155
|
+
interface Filter {
|
|
156
|
+
type: "fieldKey" | "formulaKey";
|
|
157
|
+
/** Required when `type` is `"fieldKey"`. */
|
|
158
|
+
fieldKey?: string;
|
|
159
|
+
/** Required when `type` is `"formulaKey"`. */
|
|
160
|
+
formulaKey?: string;
|
|
161
|
+
op?: FilterOp;
|
|
162
|
+
values?: (string | number)[];
|
|
163
|
+
label?: string;
|
|
164
|
+
prompt?: boolean;
|
|
165
|
+
caseSensitive?: boolean;
|
|
166
|
+
}
|
|
167
|
+
/** A filter applied *after* aggregation — Incorta's `HAVING`. */
|
|
168
|
+
interface AggregateFilter {
|
|
169
|
+
field?: string;
|
|
170
|
+
formula?: string;
|
|
171
|
+
op?: FilterOp;
|
|
172
|
+
values?: (string | number)[];
|
|
173
|
+
aggregation?: Aggregation;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* A value to return.
|
|
177
|
+
*
|
|
178
|
+
* In an aggregate query, `aggregation` folds the column; in a non-aggregate
|
|
179
|
+
* query it is left unset and the raw values come back.
|
|
180
|
+
*/
|
|
181
|
+
interface Measure {
|
|
182
|
+
field?: string;
|
|
183
|
+
formula?: string;
|
|
184
|
+
label?: string;
|
|
185
|
+
aggregation?: Aggregation;
|
|
186
|
+
/** Value scale: `"k"`, `"m"`, or `"percent"`. */
|
|
187
|
+
scale?: string;
|
|
188
|
+
/** In hierarchy min/max queries, the physical column referenced. */
|
|
189
|
+
sourceField?: string;
|
|
190
|
+
filters?: Filter[];
|
|
191
|
+
}
|
|
192
|
+
/** A column to group by — used for both `rows` and `columns`. */
|
|
193
|
+
interface Dimension {
|
|
194
|
+
field?: string;
|
|
195
|
+
formula?: string;
|
|
196
|
+
label?: string;
|
|
197
|
+
sorting?: Sort[];
|
|
198
|
+
/** Marks the field as part of a time series (year, quarter, month, day). */
|
|
199
|
+
datePart?: boolean;
|
|
200
|
+
/** Emit a subtotal row for this level. Row dimensions only. */
|
|
201
|
+
subTotal?: boolean;
|
|
202
|
+
/** Keep groups with no matching rows. Row dimensions only. */
|
|
203
|
+
showEmptyGroups?: boolean;
|
|
204
|
+
}
|
|
205
|
+
/** A measure given as a bare field name is shorthand for `{ field }`. */
|
|
206
|
+
type MeasureInput = Measure | string;
|
|
207
|
+
/** A dimension given as a bare field name is shorthand for `{ field }`. */
|
|
208
|
+
type DimensionInput = Dimension | string;
|
|
209
|
+
interface QueryOptions {
|
|
210
|
+
/** Dimensions to group down the page. */
|
|
211
|
+
rows?: DimensionInput[];
|
|
212
|
+
/** Dimensions to pivot across the page. */
|
|
213
|
+
columns?: DimensionInput[];
|
|
214
|
+
/**
|
|
215
|
+
* `false` for a flat extract, `true` to fold the measures with their
|
|
216
|
+
* aggregation functions. Always sent explicitly — see the module docstring.
|
|
217
|
+
* @default false
|
|
218
|
+
*/
|
|
219
|
+
aggregate?: boolean;
|
|
220
|
+
/** Applied to source rows, before aggregation. */
|
|
221
|
+
filters?: Filter[];
|
|
222
|
+
/** Applied after aggregation — Incorta's `HAVING`. */
|
|
223
|
+
aggregateFilters?: AggregateFilter[];
|
|
224
|
+
/** Result ordering. */
|
|
225
|
+
sorting?: Sort[];
|
|
226
|
+
/** Maximum rows to return; `0` means the server default. @default 0 */
|
|
227
|
+
pageSize?: number;
|
|
228
|
+
/** Zero-based row to start from. @default 0 */
|
|
229
|
+
startRow?: number;
|
|
230
|
+
/** Return values with Incorta's display formatting applied. */
|
|
231
|
+
formatted?: boolean;
|
|
232
|
+
/** How null cells are rendered. */
|
|
233
|
+
nullValueAs?: NullValueAs;
|
|
234
|
+
/** Return sample data when the result exceeds the sample size. */
|
|
235
|
+
sampled?: boolean;
|
|
236
|
+
/**
|
|
237
|
+
* Incorta login name to impersonate. Base64-encoded for you; requires the
|
|
238
|
+
* caller to hold impersonation rights.
|
|
239
|
+
*/
|
|
240
|
+
asUser?: string;
|
|
241
|
+
/**
|
|
242
|
+
* Merged into the `InsightQuery` untouched, for fields this interface does
|
|
243
|
+
* not name (`ensureParentSubtotal`, `skipSelf`, `sortWithinGroups`,
|
|
244
|
+
* `distinctFilter`, `auditingInfo`).
|
|
245
|
+
*/
|
|
246
|
+
advanced?: Record<string, unknown>;
|
|
247
|
+
}
|
|
248
|
+
/** One column of a result set, in the order it appears in each row. */
|
|
249
|
+
interface ResultColumn {
|
|
250
|
+
label: string;
|
|
251
|
+
dataType: string;
|
|
252
|
+
/** Which part of the pivot this column came from. */
|
|
253
|
+
kind: "row" | "column" | "measure";
|
|
254
|
+
raw: Record<string, unknown>;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* The rows a query returned, plus the paging state that produced them.
|
|
258
|
+
*
|
|
259
|
+
* Rows come back as arrays of strings in column order — Incorta renders every
|
|
260
|
+
* cell as text, including numbers. `records()` zips them against `headers` when
|
|
261
|
+
* a mapping is easier to work with.
|
|
262
|
+
*/
|
|
263
|
+
interface QueryResult {
|
|
264
|
+
/** Column descriptors, ordered rows, then columns, then measures. */
|
|
265
|
+
columns: ResultColumn[];
|
|
266
|
+
/** Column labels, in cell order. */
|
|
267
|
+
headers: string[];
|
|
268
|
+
rows: string[][];
|
|
269
|
+
/** Rows matching the query in full, beyond this page. */
|
|
270
|
+
totalRows: number;
|
|
271
|
+
startRow: number;
|
|
272
|
+
endRow: number;
|
|
273
|
+
/** Whether this response covered every matching row. */
|
|
274
|
+
complete: boolean;
|
|
275
|
+
/** Whether rows remain beyond this page. */
|
|
276
|
+
hasMore: boolean;
|
|
277
|
+
isAggregated: boolean;
|
|
278
|
+
/** Whether the data exceeded the sample size and was sampled. */
|
|
279
|
+
isSampled: boolean;
|
|
280
|
+
/** The undecoded response, for fields this model does not name. */
|
|
281
|
+
raw: Record<string, unknown>;
|
|
282
|
+
/**
|
|
283
|
+
* The rows as `{ header: cell }` objects. Duplicate labels are disambiguated
|
|
284
|
+
* with a positional suffix, so no column is silently dropped.
|
|
285
|
+
*/
|
|
286
|
+
records(): Record<string, string>[];
|
|
287
|
+
/** Every cell of one column, by label, matched case-insensitively. */
|
|
288
|
+
column(label: string): string[];
|
|
289
|
+
}
|
|
290
|
+
interface DataResource {
|
|
291
|
+
/**
|
|
292
|
+
* Runs one query and returns its rows.
|
|
293
|
+
*
|
|
294
|
+
* @throws {IncortaConfigError} The query is malformed — caught locally,
|
|
295
|
+
* before the request is sent.
|
|
296
|
+
* @throws {PermissionDeniedError} The user may not read this data, or may not
|
|
297
|
+
* impersonate `asUser`.
|
|
298
|
+
*/
|
|
299
|
+
query(measures: MeasureInput[], options?: QueryOptions): Promise<QueryResult>;
|
|
300
|
+
/**
|
|
301
|
+
* Yields every matching row, fetching one page at a time.
|
|
302
|
+
*
|
|
303
|
+
* Preferable to a single unbounded query on a large view, where one response
|
|
304
|
+
* can be slow and memory-hungry. `startRow` is driven internally.
|
|
305
|
+
*/
|
|
306
|
+
iterRows(measures: MeasureInput[], options?: Omit<QueryOptions, "startRow">): AsyncGenerator<string[], void, undefined>;
|
|
307
|
+
/**
|
|
308
|
+
* Runs a query and returns the result as CSV text.
|
|
309
|
+
*
|
|
310
|
+
* Incorta renders the CSV itself, so this returns the body verbatim rather
|
|
311
|
+
* than re-encoding `query`'s rows. Note that the endpoint applies `pageSize`
|
|
312
|
+
* to JSON results only — a CSV request returns every matching row regardless.
|
|
313
|
+
*/
|
|
314
|
+
csv(measures: MeasureInput[], options?: QueryOptions): Promise<string>;
|
|
315
|
+
/**
|
|
316
|
+
* Sends a request body verbatim and returns the decoded response.
|
|
317
|
+
*
|
|
318
|
+
* The escape hatch for query features this resource does not model. The body
|
|
319
|
+
* is sent unvalidated, so the endpoint's quiet defaults apply — set
|
|
320
|
+
* `query.aggregate` explicitly.
|
|
321
|
+
*/
|
|
322
|
+
raw(body: Record<string, unknown>): Promise<unknown>;
|
|
323
|
+
/**
|
|
324
|
+
* Builds the request body without sending it. Exposed for inspection,
|
|
325
|
+
* logging, and tests.
|
|
326
|
+
*/
|
|
327
|
+
buildBody(measures: MeasureInput[], options?: QueryOptions & {
|
|
328
|
+
format?: QueryFormat;
|
|
329
|
+
}): Record<string, unknown>;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Builds a result from the endpoint's response body.
|
|
333
|
+
*
|
|
334
|
+
* Cells arrive as one flat array per row, ordered row dimensions, then column
|
|
335
|
+
* dimensions, then measures; the headers are reported in three separate lists
|
|
336
|
+
* and are stitched back into that same order here.
|
|
337
|
+
*/
|
|
338
|
+
declare function parseQueryResult(payload: Record<string, unknown>): QueryResult;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Typed models for Incorta metadata.
|
|
342
|
+
*
|
|
343
|
+
* The API returns structurally different payloads for physical and business
|
|
344
|
+
* schemas, and the two are modelled separately rather than merged:
|
|
345
|
+
*
|
|
346
|
+
* - A **physical** schema responds with `tablesDetails` only; the
|
|
347
|
+
* `viewsDetails` key is absent entirely.
|
|
348
|
+
* - A **business** schema responds with `viewsDetails` only.
|
|
349
|
+
*
|
|
350
|
+
* Their columns differ too. Both carry `name`/`label`/`description`/`dataType`/
|
|
351
|
+
* `function`; table columns add `formula` and `isEncrypt`, while view columns add
|
|
352
|
+
* `isFormula` and `source` (the fully qualified lineage of the underlying
|
|
353
|
+
* physical column).
|
|
354
|
+
*
|
|
355
|
+
* The models are plain data — no classes — so results survive
|
|
356
|
+
* `structuredClone`, `JSON.stringify`, and a trip through a worker or an HTTP
|
|
357
|
+
* response. Where Python uses `isinstance`, these use a `kind` discriminant,
|
|
358
|
+
* which narrows correctly in TypeScript and survives serialisation.
|
|
359
|
+
*
|
|
360
|
+
* Every parser tolerates missing keys, so a server-side addition or omission
|
|
361
|
+
* degrades to a default instead of throwing.
|
|
362
|
+
*/
|
|
363
|
+
|
|
364
|
+
type Payload = Record<string, unknown>;
|
|
365
|
+
/** Fields common to table and view columns. */
|
|
366
|
+
interface ColumnBase {
|
|
367
|
+
name: string;
|
|
368
|
+
label: string;
|
|
369
|
+
description: string;
|
|
370
|
+
dataType: string;
|
|
371
|
+
function: ColumnFunction;
|
|
372
|
+
/** The untouched API record, for fields this client does not model. */
|
|
373
|
+
raw: Payload;
|
|
374
|
+
}
|
|
375
|
+
/** A column of a physical table. */
|
|
376
|
+
interface TableColumn extends ColumnBase {
|
|
377
|
+
kind: "tableColumn";
|
|
378
|
+
formula: string;
|
|
379
|
+
isEncrypted: boolean;
|
|
380
|
+
/** Whether Incorta treats this column as a key. */
|
|
381
|
+
isKey: boolean;
|
|
382
|
+
}
|
|
383
|
+
/** A column of a business view. */
|
|
384
|
+
interface ViewColumn extends ColumnBase {
|
|
385
|
+
kind: "viewColumn";
|
|
386
|
+
/**
|
|
387
|
+
* Fully qualified lineage of the backing physical column, such as
|
|
388
|
+
* `"OnlineStore.customer.AccountNumber"`. Empty for formula columns.
|
|
389
|
+
*/
|
|
390
|
+
source: string;
|
|
391
|
+
/** Whether the column is computed rather than sourced. */
|
|
392
|
+
isFormula: boolean;
|
|
393
|
+
}
|
|
394
|
+
type Column = TableColumn | ViewColumn;
|
|
395
|
+
/** Fields common to tables and views. */
|
|
396
|
+
interface SchemaObjectBase {
|
|
397
|
+
name: string;
|
|
398
|
+
type: ObjectType;
|
|
399
|
+
owner: string;
|
|
400
|
+
description: string;
|
|
401
|
+
schemaName: string;
|
|
402
|
+
/** `schema.object` — the form used to address an object in a query. */
|
|
403
|
+
qualifiedName: string;
|
|
404
|
+
columnNames: readonly string[];
|
|
405
|
+
raw: Payload;
|
|
406
|
+
}
|
|
407
|
+
/** A physical table. */
|
|
408
|
+
interface Table extends SchemaObjectBase {
|
|
409
|
+
kind: "table";
|
|
410
|
+
columns: readonly TableColumn[];
|
|
411
|
+
/** Columns Incorta marks as keys. */
|
|
412
|
+
keys: readonly TableColumn[];
|
|
413
|
+
/**
|
|
414
|
+
* Row count as last reported by Incorta; `0` when the table has not been
|
|
415
|
+
* loaded or the count is unavailable.
|
|
416
|
+
*/
|
|
417
|
+
rowsCount: number;
|
|
418
|
+
multiDataSource: boolean;
|
|
419
|
+
hierarchy: boolean;
|
|
420
|
+
/** Timestamp of the most recent load, or `null`. */
|
|
421
|
+
lastVersion: Date | null;
|
|
422
|
+
}
|
|
423
|
+
/** A business view. */
|
|
424
|
+
interface View extends SchemaObjectBase {
|
|
425
|
+
kind: "view";
|
|
426
|
+
columns: readonly ViewColumn[];
|
|
427
|
+
/** The view's base table when Incorta reports one; often empty. */
|
|
428
|
+
baseTable: string;
|
|
429
|
+
/** Distinct physical columns this view draws from, in order. */
|
|
430
|
+
sources: readonly string[];
|
|
431
|
+
}
|
|
432
|
+
type SchemaObject = Table | View;
|
|
433
|
+
/**
|
|
434
|
+
* Summary of a schema as returned by the schema list endpoint.
|
|
435
|
+
*
|
|
436
|
+
* This is the lightweight form: it names the schema but carries no tables or
|
|
437
|
+
* views. Call `client.schemas.get()` to fetch the contents.
|
|
438
|
+
*/
|
|
439
|
+
interface SchemaInfo {
|
|
440
|
+
id: number;
|
|
441
|
+
name: string;
|
|
442
|
+
description: string;
|
|
443
|
+
type: string;
|
|
444
|
+
owner: string;
|
|
445
|
+
lastModified: Date | null;
|
|
446
|
+
isEmpty: boolean;
|
|
447
|
+
isPhysical: boolean;
|
|
448
|
+
isBusiness: boolean;
|
|
449
|
+
raw: Payload;
|
|
450
|
+
}
|
|
451
|
+
interface SchemaBase {
|
|
452
|
+
name: string;
|
|
453
|
+
total: number;
|
|
454
|
+
/** Every table or view, whichever this schema holds. */
|
|
455
|
+
objects: readonly SchemaObject[];
|
|
456
|
+
objectNames: readonly string[];
|
|
457
|
+
raw: Payload;
|
|
458
|
+
}
|
|
459
|
+
/** A physical schema, containing tables. */
|
|
460
|
+
interface PhysicalSchema extends SchemaBase {
|
|
461
|
+
kind: "physical";
|
|
462
|
+
objects: readonly Table[];
|
|
463
|
+
tables: readonly Table[];
|
|
464
|
+
}
|
|
465
|
+
/** A business schema, containing views. */
|
|
466
|
+
interface BusinessSchema extends SchemaBase {
|
|
467
|
+
kind: "business";
|
|
468
|
+
objects: readonly View[];
|
|
469
|
+
views: readonly View[];
|
|
470
|
+
}
|
|
471
|
+
type Schema = PhysicalSchema | BusinessSchema;
|
|
472
|
+
/** Looks up a table or view by name, case-insensitively. */
|
|
473
|
+
declare function findObject(schema: Schema, name: string): SchemaObject | undefined;
|
|
474
|
+
/** Looks up one column of a table or view by name, case-insensitively. */
|
|
475
|
+
declare function findColumn(object: SchemaObject, name: string): Column | undefined;
|
|
476
|
+
/** One page of results, plus the paging window that produced it. */
|
|
477
|
+
interface Page<T> {
|
|
478
|
+
/** The records in this page. */
|
|
479
|
+
items: readonly T[];
|
|
480
|
+
/** Total records available server-side, across all pages. */
|
|
481
|
+
total: number;
|
|
482
|
+
/** Page size requested; `0` means "no limit" to the API. */
|
|
483
|
+
limit: number;
|
|
484
|
+
/** Zero-based index this page started at. */
|
|
485
|
+
offset: number;
|
|
486
|
+
/** Whether more records exist beyond this page. */
|
|
487
|
+
hasMore: boolean;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* Schema listing and retrieval.
|
|
492
|
+
*
|
|
493
|
+
* Every call is made with the signed-in user's own access token, so results are
|
|
494
|
+
* already filtered to what that user may see in Incorta — there is no
|
|
495
|
+
* app-level identity to over-share from.
|
|
496
|
+
*/
|
|
497
|
+
|
|
498
|
+
/** Page size used by `iterAll` when the caller does not choose one. */
|
|
499
|
+
declare const DEFAULT_PAGE_SIZE = 100;
|
|
500
|
+
interface ListSchemasOptions {
|
|
501
|
+
/**
|
|
502
|
+
* `ALL`, `PHYSICAL`, or `BUSINESS`. Validated locally because the API
|
|
503
|
+
* silently falls back to `BUSINESS` for any unrecognised value instead of
|
|
504
|
+
* returning an error.
|
|
505
|
+
* @default "ALL"
|
|
506
|
+
*/
|
|
507
|
+
type?: SchemaType;
|
|
508
|
+
/** Maximum schemas to return; `0` means all. @default 0 */
|
|
509
|
+
limit?: number;
|
|
510
|
+
/** Zero-based index to start from. @default 0 */
|
|
511
|
+
offset?: number;
|
|
512
|
+
/** Result ordering. @default "NAME_ASC" */
|
|
513
|
+
sortBy?: SortBy;
|
|
514
|
+
}
|
|
515
|
+
interface IterSchemasOptions {
|
|
516
|
+
type?: SchemaType;
|
|
517
|
+
/** Records per request; must be positive. @default 100 */
|
|
518
|
+
pageSize?: number;
|
|
519
|
+
sortBy?: SortBy;
|
|
520
|
+
}
|
|
521
|
+
interface SchemasResource {
|
|
522
|
+
/**
|
|
523
|
+
* Lists the schemas this user can see, without their tables or views.
|
|
524
|
+
*
|
|
525
|
+
* @throws {IncortaConfigError} `type` or `sortBy` is not a valid value.
|
|
526
|
+
*/
|
|
527
|
+
list(options?: ListSchemasOptions): Promise<SchemaInfo[]>;
|
|
528
|
+
/**
|
|
529
|
+
* Like {@link list}, but also returns the server-side total. Use it when you
|
|
530
|
+
* need to know how many schemas exist beyond the current page.
|
|
531
|
+
*/
|
|
532
|
+
listPage(options?: ListSchemasOptions): Promise<Page<SchemaInfo>>;
|
|
533
|
+
/**
|
|
534
|
+
* Yields every schema, fetching one page at a time.
|
|
535
|
+
*
|
|
536
|
+
* Preferable to `limit: 0` on large tenants, where a single unbounded
|
|
537
|
+
* response can be slow and memory-hungry.
|
|
538
|
+
*/
|
|
539
|
+
iterAll(options?: IterSchemasOptions): AsyncGenerator<SchemaInfo, void, undefined>;
|
|
540
|
+
/** Lists physical schemas. Shorthand for `list({ type: "PHYSICAL" })`. */
|
|
541
|
+
physical(options?: Omit<ListSchemasOptions, "type">): Promise<SchemaInfo[]>;
|
|
542
|
+
/** Lists business schemas. Shorthand for `list({ type: "BUSINESS" })`. */
|
|
543
|
+
business(options?: Omit<ListSchemasOptions, "type">): Promise<SchemaInfo[]>;
|
|
544
|
+
/**
|
|
545
|
+
* Fetches one schema with all of its tables or views.
|
|
546
|
+
*
|
|
547
|
+
* Returns a `PhysicalSchema` or a `BusinessSchema` depending on what the
|
|
548
|
+
* environment reports; switch on `.kind` to narrow.
|
|
549
|
+
*
|
|
550
|
+
* @throws {SchemaNotFoundError} No such schema, or this user cannot see it.
|
|
551
|
+
* @throws {IncortaConfigError} `name` is empty.
|
|
552
|
+
*/
|
|
553
|
+
get(name: string): Promise<Schema>;
|
|
554
|
+
/** Whether a schema with this name is visible to this user. */
|
|
555
|
+
exists(name: string): Promise<boolean>;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
interface TablesResource {
|
|
559
|
+
/**
|
|
560
|
+
* Fetches one table or view by name.
|
|
561
|
+
*
|
|
562
|
+
* Searches physical tables and business views alike, so callers do not need to
|
|
563
|
+
* know which kind of schema they are addressing. Switch on `.kind`
|
|
564
|
+
* (`"table"` / `"view"`) to narrow the result.
|
|
565
|
+
*
|
|
566
|
+
* @throws {SchemaNotFoundError} The schema does not exist.
|
|
567
|
+
* @throws {TableNotFoundError} The schema exists but holds no such object.
|
|
568
|
+
* @throws {IncortaConfigError} `tableName` is empty.
|
|
569
|
+
*/
|
|
570
|
+
get(schemaName: string, tableName: string): Promise<SchemaObject>;
|
|
571
|
+
/** Lists every table and view in a schema. */
|
|
572
|
+
list(schemaName: string): Promise<SchemaObject[]>;
|
|
573
|
+
/** Lists the names of every table and view in a schema. */
|
|
574
|
+
names(schemaName: string): Promise<string[]>;
|
|
575
|
+
/** Fetches the columns of one table or view. */
|
|
576
|
+
columns(schemaName: string, tableName: string): Promise<Column[]>;
|
|
577
|
+
/** Whether the named table or view exists in the schema. */
|
|
578
|
+
exists(schemaName: string, tableName: string): Promise<boolean>;
|
|
579
|
+
/** Lists only physical tables, skipping views. */
|
|
580
|
+
tablesOnly(schemaName: string): Promise<Table[]>;
|
|
581
|
+
/** Lists only business views, skipping tables. */
|
|
582
|
+
viewsOnly(schemaName: string): Promise<View[]>;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
/**
|
|
586
|
+
* The per-user client.
|
|
587
|
+
*
|
|
588
|
+
* Metadata in this SDK is always read *as somebody*: the token comes from an
|
|
589
|
+
* Incorta OAuth session, so two users of the same app see two different
|
|
590
|
+
* catalogs. Nothing is cached — every call reads Incorta live, so a schema
|
|
591
|
+
* changed in Incorta is visible on the next call and no user's catalog can
|
|
592
|
+
* outlive the request that fetched it.
|
|
593
|
+
*/
|
|
594
|
+
|
|
595
|
+
/** Non-secret view of a scoped client, safe to log. */
|
|
596
|
+
interface UserClientInfo {
|
|
597
|
+
baseUrl: string;
|
|
598
|
+
tenant: string;
|
|
599
|
+
/** Incorta login name of the user this client acts as, when known. */
|
|
600
|
+
user: string | undefined;
|
|
601
|
+
/** Epoch millis when this client's access token expires; `0` when unknown. */
|
|
602
|
+
accessTokenExpiresAt: number;
|
|
603
|
+
}
|
|
604
|
+
interface IncortaUserClient {
|
|
605
|
+
/**
|
|
606
|
+
* The Incorta user this client acts as. `null` for a client built from a
|
|
607
|
+
* bare access token, where no identity was supplied alongside it.
|
|
608
|
+
*/
|
|
609
|
+
user: IncortaUser | null;
|
|
610
|
+
/** Schema listing and retrieval, as this user. */
|
|
611
|
+
schemas: SchemasResource;
|
|
612
|
+
/** Table, view, and column retrieval, as this user. */
|
|
613
|
+
tables: TablesResource;
|
|
614
|
+
/** Row queries against business views, as this user. */
|
|
615
|
+
data: DataResource;
|
|
616
|
+
/**
|
|
617
|
+
* The resolved configuration, minus the token.
|
|
618
|
+
*
|
|
619
|
+
* The token is deliberately absent so that logging the client — or
|
|
620
|
+
* serialising it into an error report — cannot leak a user's credential.
|
|
621
|
+
*/
|
|
622
|
+
info: UserClientInfo;
|
|
623
|
+
}
|
|
624
|
+
interface UserClientOptions {
|
|
625
|
+
/** Resolves the bearer token for each request. */
|
|
626
|
+
getToken: TokenProvider;
|
|
627
|
+
/** The identity behind the token, when it is known. */
|
|
628
|
+
user?: IncortaUser | null;
|
|
629
|
+
/** Epoch millis the token expires at, for {@link UserClientInfo}. */
|
|
630
|
+
accessTokenExpiresAt?: number;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
/**
|
|
634
|
+
* Error hierarchy for @incorta/sdk.
|
|
635
|
+
*
|
|
636
|
+
* Every failure thrown by this package derives from {@link IncortaError}, so
|
|
637
|
+
* callers can catch one type and still inspect the Incorta error code when they
|
|
638
|
+
* need detail.
|
|
639
|
+
*
|
|
640
|
+
* The Incorta API reports failures as `{"message": "INC_09030108: Invalid ..."}`.
|
|
641
|
+
* The `INC_` prefix is a stable machine-readable code; {@link IncortaApiError.code}
|
|
642
|
+
* exposes it separately from the human-readable remainder.
|
|
643
|
+
*/
|
|
644
|
+
/** Base class for every error thrown by @incorta/sdk. */
|
|
645
|
+
declare class IncortaError extends Error {
|
|
646
|
+
constructor(message: string);
|
|
647
|
+
}
|
|
648
|
+
/**
|
|
649
|
+
* The client was configured with missing or invalid values.
|
|
650
|
+
*
|
|
651
|
+
* Thrown before any network call, so it always indicates a caller mistake
|
|
652
|
+
* rather than a server or connectivity problem.
|
|
653
|
+
*/
|
|
654
|
+
declare class IncortaConfigError extends IncortaError {
|
|
655
|
+
constructor(message: string);
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* The request carried no signed-in user.
|
|
659
|
+
*
|
|
660
|
+
* Every call in this SDK acts *as* an Incorta user, so there is no anonymous
|
|
661
|
+
* mode to fall back to. Send the visitor through `auth.handler`'s login route
|
|
662
|
+
* (or let `auth.gate` do it) and retry once a session exists.
|
|
663
|
+
*/
|
|
664
|
+
declare class IncortaAuthRequiredError extends IncortaError {
|
|
665
|
+
constructor(message?: string);
|
|
666
|
+
}
|
|
667
|
+
/**
|
|
668
|
+
* The session's access token expired while the client was still holding it.
|
|
669
|
+
*
|
|
670
|
+
* A scoped client captures the token as it stood when the session was read, so
|
|
671
|
+
* a long-lived one eventually goes stale. Re-read the session
|
|
672
|
+
* (`client.forRequest(request)` per request) to pick up a refreshed token —
|
|
673
|
+
* `@incorta/auth` renews it automatically while reading.
|
|
674
|
+
*/
|
|
675
|
+
declare class IncortaSessionExpiredError extends IncortaError {
|
|
676
|
+
/** Epoch millis at which the captured token expired. */
|
|
677
|
+
readonly expiredAt: number;
|
|
678
|
+
constructor(
|
|
679
|
+
/** Epoch millis at which the captured token expired. */
|
|
680
|
+
expiredAt: number);
|
|
681
|
+
}
|
|
682
|
+
/** The Incorta environment could not be reached (DNS, TLS, refused connection). */
|
|
683
|
+
declare class IncortaConnectionError extends IncortaError {
|
|
684
|
+
/** The underlying `fetch` failure, when there was one. */
|
|
685
|
+
readonly cause?: unknown | undefined;
|
|
686
|
+
constructor(message: string,
|
|
687
|
+
/** The underlying `fetch` failure, when there was one. */
|
|
688
|
+
cause?: unknown | undefined);
|
|
689
|
+
}
|
|
690
|
+
/** The request exceeded the configured timeout. */
|
|
691
|
+
declare class IncortaTimeoutError extends IncortaConnectionError {
|
|
692
|
+
constructor(message: string);
|
|
693
|
+
}
|
|
694
|
+
/** The Incorta API returned a non-success HTTP status. */
|
|
695
|
+
declare class IncortaApiError extends IncortaError {
|
|
696
|
+
/** HTTP status code of the response. */
|
|
697
|
+
readonly statusCode: number;
|
|
698
|
+
/** Incorta error code such as `"INC_09030108"`, when the response carried one. */
|
|
699
|
+
readonly code: string | undefined;
|
|
700
|
+
/** Human-readable message with the `INC_` prefix stripped. */
|
|
701
|
+
readonly detail: string;
|
|
702
|
+
/** Raw response text, truncated for readability. */
|
|
703
|
+
readonly responseBody: string;
|
|
704
|
+
/** The request URL. Never carries credentials — the token travels in a header. */
|
|
705
|
+
readonly url: string | undefined;
|
|
706
|
+
constructor(statusCode: number, detail: string, options?: {
|
|
707
|
+
code?: string;
|
|
708
|
+
responseBody?: string;
|
|
709
|
+
url?: string;
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* Incorta rejected the user's access token (HTTP 401).
|
|
714
|
+
*
|
|
715
|
+
* Distinct from {@link IncortaSessionExpiredError}, which is raised locally
|
|
716
|
+
* before the request goes out. This one means the token reached Incorta and
|
|
717
|
+
* came back refused — a revoked session, a client whose registration changed,
|
|
718
|
+
* or a token minted for a different tenant.
|
|
719
|
+
*/
|
|
720
|
+
declare class AuthenticationError extends IncortaApiError {
|
|
721
|
+
constructor(...args: ConstructorParameters<typeof IncortaApiError>);
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* The user is authenticated but lacks access to the requested resource (403).
|
|
725
|
+
*
|
|
726
|
+
* Metadata is read with the signed-in user's own token, so this reflects that
|
|
727
|
+
* user's Incorta permissions — not a defect in the app's configuration.
|
|
728
|
+
*/
|
|
729
|
+
declare class PermissionDeniedError extends IncortaApiError {
|
|
730
|
+
constructor(...args: ConstructorParameters<typeof IncortaApiError>);
|
|
731
|
+
}
|
|
732
|
+
/** The requested resource does not exist (HTTP 404). */
|
|
733
|
+
declare class NotFoundError extends IncortaApiError {
|
|
734
|
+
constructor(...args: ConstructorParameters<typeof IncortaApiError>);
|
|
735
|
+
}
|
|
736
|
+
/** The named schema does not exist, or this user cannot see it. */
|
|
737
|
+
declare class SchemaNotFoundError extends NotFoundError {
|
|
738
|
+
constructor(...args: ConstructorParameters<typeof IncortaApiError>);
|
|
739
|
+
}
|
|
740
|
+
/** Incorta reported an internal error (HTTP 5xx). */
|
|
741
|
+
declare class IncortaServerError extends IncortaApiError {
|
|
742
|
+
constructor(...args: ConstructorParameters<typeof IncortaApiError>);
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* No table or view with the given name exists in the schema.
|
|
746
|
+
*
|
|
747
|
+
* Thrown client-side: the API returns the whole schema in one call, so a
|
|
748
|
+
* missing table is detected locally rather than by a failed request.
|
|
749
|
+
*/
|
|
750
|
+
declare class TableNotFoundError extends IncortaError {
|
|
751
|
+
readonly schemaName: string;
|
|
752
|
+
readonly tableName: string;
|
|
753
|
+
/** Names that *do* exist in the schema, to make the typo obvious. */
|
|
754
|
+
readonly available: string[];
|
|
755
|
+
constructor(schemaName: string, tableName: string,
|
|
756
|
+
/** Names that *do* exist in the schema, to make the typo obvious. */
|
|
757
|
+
available?: string[]);
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
/** Non-secret view of the resolved configuration, safe to log. */
|
|
761
|
+
interface ClientInfo {
|
|
762
|
+
baseUrl: string;
|
|
763
|
+
tenant: string;
|
|
764
|
+
timeoutMs: number;
|
|
765
|
+
maxRetries: number;
|
|
766
|
+
}
|
|
767
|
+
interface IncortaClient {
|
|
768
|
+
/**
|
|
769
|
+
* The OAuth instance this client reads sessions from.
|
|
770
|
+
*
|
|
771
|
+
* Mount `auth.handler` to serve the login routes and `auth.gate` to require
|
|
772
|
+
* a session, exactly as if you had built it with `createIncortaAuth`
|
|
773
|
+
* yourself — it is the same object when you passed one in.
|
|
774
|
+
*/
|
|
775
|
+
auth: IncortaAuth;
|
|
776
|
+
/**
|
|
777
|
+
* Builds a client acting as the user behind `request`, reading (and
|
|
778
|
+
* refreshing) their session.
|
|
779
|
+
*
|
|
780
|
+
* The normal entry point: call it per request, so every batch of metadata
|
|
781
|
+
* calls runs on a freshly refreshed token.
|
|
782
|
+
*
|
|
783
|
+
* @throws {IncortaAuthRequiredError} The request carries no session.
|
|
784
|
+
*/
|
|
785
|
+
forRequest(request: Request): Promise<IncortaUserClient>;
|
|
786
|
+
/**
|
|
787
|
+
* Builds a client from a session you already read (via `auth.getSession`, a
|
|
788
|
+
* framework middleware, or a gate).
|
|
789
|
+
*
|
|
790
|
+
* The session's token is captured as-is. `@incorta/auth` refreshes it while
|
|
791
|
+
* *reading* the session, so hold a scoped client no longer than the request
|
|
792
|
+
* that produced it; past the token's expiry, calls raise
|
|
793
|
+
* {@link IncortaSessionExpiredError} rather than 401ing against Incorta.
|
|
794
|
+
*/
|
|
795
|
+
forSession(session: AuthSession): IncortaUserClient;
|
|
796
|
+
/**
|
|
797
|
+
* Builds a client from a raw Incorta access token.
|
|
798
|
+
*
|
|
799
|
+
* The escape hatch for tokens that did not arrive as a cookie session — a
|
|
800
|
+
* bearer header from a mobile or SPA client, or a token minted elsewhere in
|
|
801
|
+
* the same tenant. Expiry is not tracked here: an expired token fails as a
|
|
802
|
+
* 401 {@link AuthenticationError} from Incorta.
|
|
803
|
+
*/
|
|
804
|
+
forAccessToken(accessToken: string, options?: {
|
|
805
|
+
user?: IncortaUser;
|
|
806
|
+
}): IncortaUserClient;
|
|
807
|
+
/** The resolved configuration, minus any secrets. */
|
|
808
|
+
info: ClientInfo;
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* Creates a client for Incorta metadata, authenticated with OAuth 2.0.
|
|
812
|
+
*
|
|
813
|
+
* Unlike a personal-access-token client, this one has no identity of its own:
|
|
814
|
+
* it reads schemas and tables **as the signed-in user**, so results are already
|
|
815
|
+
* scoped to that user's Incorta permissions. Sessions come from
|
|
816
|
+
* `@incorta/auth`.
|
|
817
|
+
*
|
|
818
|
+
* ```ts
|
|
819
|
+
* const client = createIncortaClient(); // reads INCORTA_* from the environment
|
|
820
|
+
*
|
|
821
|
+
* // Serve the OAuth routes with the auth instance the client owns.
|
|
822
|
+
* app.use("/auth", toNodeHandler(client.auth.handler));
|
|
823
|
+
*
|
|
824
|
+
* app.get("/api/schemas", async (req, res) => {
|
|
825
|
+
* const incorta = await client.forRequest(toWebRequest(req));
|
|
826
|
+
* res.json(await incorta.schemas.physical());
|
|
827
|
+
* });
|
|
828
|
+
* ```
|
|
829
|
+
*
|
|
830
|
+
* Pass `auth` when the app already builds its own instance — two instances
|
|
831
|
+
* would mean two sets of OAuth state for the same users:
|
|
832
|
+
*
|
|
833
|
+
* ```ts
|
|
834
|
+
* const auth = createIncortaAuth({ appAccess: "catalog" });
|
|
835
|
+
* const client = createIncortaClient({ auth });
|
|
836
|
+
* ```
|
|
837
|
+
*
|
|
838
|
+
* @throws {IncortaConfigError} A required value is missing or malformed.
|
|
839
|
+
*/
|
|
840
|
+
declare function createIncortaClient(config?: IncortaClientConfig): IncortaClient;
|
|
841
|
+
|
|
842
|
+
export { AGGREGATIONS, type AggregateFilter, type Aggregation, AuthenticationError, type BusinessSchema, COLUMN_FUNCTIONS, type ClientInfo, type Column, type ColumnBase, type ColumnFunction, DEFAULT_PAGE_SIZE, DEFAULT_QUERY_PAGE_SIZE, type DataResource, type Dimension, type DimensionInput, FILTER_OPS, type Filter, type FilterOp, IncortaApiError, IncortaAuthRequiredError, type IncortaClient, type IncortaClientConfig, IncortaConfigError, IncortaConnectionError, IncortaError, IncortaServerError, IncortaSessionExpiredError, IncortaTimeoutError, type IncortaUserClient, type IterSchemasOptions, type ListSchemasOptions, type Measure, type MeasureInput, NULL_VALUE_AS, NotFoundError, type NullValueAs, type ObjectType, type Page, PermissionDeniedError, type PhysicalSchema, QUERY_FORMATS, type QueryFormat, type QueryOptions, type QueryResult, type ResultColumn, SCHEMA_TYPES, SORT_DIRECTIONS, SORT_ORDERS, type Schema, type SchemaInfo, SchemaNotFoundError, type SchemaObject, type SchemaType, type SchemasResource, type Sort, type SortBy, type SortDirection, type Table, type TableColumn, TableNotFoundError, type TablesResource, type UserClientInfo, type UserClientOptions, type View, type ViewColumn, createIncortaClient, findColumn, findObject, parseColumnFunction, parseObjectType, parseQueryResult };
|