@holistics/anfra-sdk 0.24.0 → 0.25.0-rc.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.
- package/README.md +2 -1
- package/dist/api.d.ts +1 -1
- package/dist/app.d.ts +5 -5
- package/dist/app.js +2 -2
- package/dist/{bootstrap-OCA3RI1u.d.ts → bootstrap-Bte507aH.d.ts} +35 -4
- package/dist/build.d.ts +2 -2
- package/dist/{chunk-3TSGDMXL.js → chunk-FWP6LU4D.js} +1 -1
- package/dist/{chunk-WGHKHF36.js → chunk-WCRSI7ZB.js} +47 -12
- package/dist/{chunk-C63VGBIT.js → chunk-XF2OX24G.js} +1 -1
- package/dist/common.d.ts +3 -3
- package/dist/declaration.js +1 -0
- package/dist/{errors-CWaxgIdV.d.ts → errors-x9pGAmXi.d.ts} +1 -1
- package/dist/host.d.ts +2 -2
- package/dist/host.js +1 -1
- package/dist/{overview-M6VYTPXU.js → overview-EQPGLWMO.js} +2 -2
- package/dist/{plugin-CZmRhV4r.d.ts → plugin-BWEDh1nW.d.ts} +2 -2
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.js +12 -6
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +2 -2
- package/dist/{theme-CWkVSteW.d.ts → theme-CIkvL5kZ.d.ts} +1 -1
- package/dist/{types-BiRAlSSk.d.ts → types-ks7G6AVA.d.ts} +55 -19
- package/package.json +5 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ai as QueryStamp, D as DatasetDescriptor, aC as User, aq as Row, av as SelectionCondition, aA as StructureNode, a as Annotation } from './types-
|
|
1
|
+
import { ai as QueryStamp, D as DatasetDescriptor, aC as User, aq as Row, av as SelectionCondition, aA as StructureNode, a as Annotation } from './types-ks7G6AVA.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* The bridge: the postMessage protocol between a Data App's frame (`app`'s bootstrap) and the
|
|
@@ -76,7 +76,7 @@ interface paths {
|
|
|
76
76
|
put?: never;
|
|
77
77
|
/**
|
|
78
78
|
* Trace fields through the local catalog to what each one is built from
|
|
79
|
-
* @description Trace each field through the local catalog to the fields, models, and sources it is built from. Return each
|
|
79
|
+
* @description Trace each field through the local catalog to the fields, models, and sources it is built from. Name a field by its parent (a model or a dataset) and its name in it. Leave out the name to trace the whole model or dataset, with every field in it. Return each target's lineage as a diagram to draw, with cards in layers from upstream to downstream, and the links between them.
|
|
80
80
|
*/
|
|
81
81
|
post: operations["core.lineage"];
|
|
82
82
|
delete?: never;
|
|
@@ -193,7 +193,9 @@ interface paths {
|
|
|
193
193
|
* Show the repo's datasets, or one dataset, with their models, fields, and metrics
|
|
194
194
|
* @description Show the repo's datasets, or one dataset, with their models, fields, and metrics, as AQL can query them.
|
|
195
195
|
*
|
|
196
|
-
* With no fqn, it shows the repo and every dataset in full, and with a dataset's fqn, that dataset in full. It shows names, labels, types, roles,
|
|
196
|
+
* With no fqn, it shows the repo and every dataset in full, and with a dataset's fqn, that dataset in full. It shows names, labels, types, roles, @tags, AQL definitions, and the file that defines each dataset, never SQL or tables. At the index detail, it shows only each dataset's fqn, name, and the file that defines it, and the repo's models too, which is quicker when you only need to find where something is defined.
|
|
197
|
+
*
|
|
198
|
+
* Problems that affect the result come with it as diagnostics, such as a file that doesn't compile, or a data source the repo doesn't configure.
|
|
197
199
|
*/
|
|
198
200
|
post: operations["core.show"];
|
|
199
201
|
delete?: never;
|
|
@@ -684,13 +686,13 @@ interface components {
|
|
|
684
686
|
header?: "labels" | "names" | "none";
|
|
685
687
|
};
|
|
686
688
|
FieldLineage: {
|
|
687
|
-
/** @description the
|
|
689
|
+
/** @description the target's lineage. Absent when error is set. */
|
|
688
690
|
diagram?: components["schemas"]["Diagram"];
|
|
689
|
-
/** @description why the
|
|
691
|
+
/** @description why the target's lineage could not be traced, such as a parent that does not exist, or a parent without that child */
|
|
690
692
|
error?: string;
|
|
691
|
-
/** @description the search query that finds the
|
|
693
|
+
/** @description the search query that finds the target's lineage, which the search command also takes. Empty when the target could not be searched for. */
|
|
692
694
|
query: string;
|
|
693
|
-
/** @description the field, as asked */
|
|
695
|
+
/** @description the field or parent, as asked */
|
|
694
696
|
target: components["schemas"]["LineageTarget"];
|
|
695
697
|
};
|
|
696
698
|
IngestInput: {
|
|
@@ -700,7 +702,7 @@ interface components {
|
|
|
700
702
|
LineageInput: {
|
|
701
703
|
/**
|
|
702
704
|
* Format: int64
|
|
703
|
-
* @description the most upstream entities to return per
|
|
705
|
+
* @description the most upstream entities to return per target, all of them by default
|
|
704
706
|
*/
|
|
705
707
|
limit?: number;
|
|
706
708
|
/**
|
|
@@ -708,15 +710,15 @@ interface components {
|
|
|
708
710
|
* @description skip this many upstream entities first, to page with limit
|
|
709
711
|
*/
|
|
710
712
|
offset?: number;
|
|
711
|
-
/** @description the fields to trace
|
|
713
|
+
/** @description the fields or parents to trace. Name a field by its parent and its name in it: {"parent": "orders", "child": "amount"}. Name a parent alone to trace it with every field in it: {"parent": "orders"} */
|
|
712
714
|
targets?: components["schemas"]["LineageTarget"][];
|
|
713
715
|
};
|
|
714
716
|
LineageResult: {
|
|
715
717
|
results: components["schemas"]["FieldLineage"][];
|
|
716
718
|
};
|
|
717
719
|
LineageTarget: {
|
|
718
|
-
/** @description the field's name in its parent: a dimension, a measure or a metric */
|
|
719
|
-
child
|
|
720
|
+
/** @description the field's name in its parent: a dimension, a measure or a metric. Leave it out to trace the parent and every field in it. */
|
|
721
|
+
child?: string;
|
|
720
722
|
/** @description the fqn of what holds the field: a model, or a dataset */
|
|
721
723
|
parent: string;
|
|
722
724
|
};
|
|
@@ -1193,13 +1195,17 @@ interface components {
|
|
|
1193
1195
|
*/
|
|
1194
1196
|
kind: "dataset";
|
|
1195
1197
|
label?: string;
|
|
1196
|
-
/** @description
|
|
1198
|
+
/** @description where it's defined */
|
|
1199
|
+
location?: components["schemas"]["ShowLocation"];
|
|
1200
|
+
/** @description the dataset's metrics. Absent when the dataset is shown in outline, or at the index detail. */
|
|
1197
1201
|
metrics?: components["schemas"]["ShowField"][];
|
|
1198
|
-
/** @description the models the dataset uses. Absent when the dataset is shown in outline. */
|
|
1202
|
+
/** @description the models the dataset uses. Absent when the dataset is shown in outline, or at the index detail. */
|
|
1199
1203
|
models?: components["schemas"]["ShowModel"][];
|
|
1200
1204
|
name: string;
|
|
1201
|
-
/** @description the relationships between its models. Absent if the dataset failed to load. */
|
|
1205
|
+
/** @description the relationships between its models. Absent if the dataset failed to load, or at the index detail. */
|
|
1202
1206
|
relationships?: components["schemas"]["ShowRelationship"][];
|
|
1207
|
+
/** @description its @tags, in the order the AML writes them. Absent when it has none. */
|
|
1208
|
+
tags?: components["schemas"]["ShowTag"][];
|
|
1203
1209
|
};
|
|
1204
1210
|
ShowField: {
|
|
1205
1211
|
/** @description a measure's aggregation, such as sum or count distinct; custom for a custom one */
|
|
@@ -1222,7 +1228,21 @@ interface components {
|
|
|
1222
1228
|
/** @description the field's semantic type, such as number, text, date, datetime, or truefalse */
|
|
1223
1229
|
type: string;
|
|
1224
1230
|
};
|
|
1231
|
+
ShowIndexEntry: {
|
|
1232
|
+
/** @description its fully qualified name */
|
|
1233
|
+
fqn: string;
|
|
1234
|
+
/** @enum {string} */
|
|
1235
|
+
kind: "model";
|
|
1236
|
+
location: components["schemas"]["ShowLocation"];
|
|
1237
|
+
name: string;
|
|
1238
|
+
};
|
|
1225
1239
|
ShowInput: {
|
|
1240
|
+
/**
|
|
1241
|
+
* @description how much to show of each object. "full": a dataset's models, fields and metrics. "index": only its fqn, name and the file that defines it, and for the repo, its models too.
|
|
1242
|
+
* @default full
|
|
1243
|
+
* @enum {string}
|
|
1244
|
+
*/
|
|
1245
|
+
detail?: "full" | "index";
|
|
1226
1246
|
/** @description the fqn of the dataset to show, the whole repo by default */
|
|
1227
1247
|
fqn?: string;
|
|
1228
1248
|
/**
|
|
@@ -1232,6 +1252,10 @@ interface components {
|
|
|
1232
1252
|
*/
|
|
1233
1253
|
type?: "aml.dataset";
|
|
1234
1254
|
};
|
|
1255
|
+
ShowLocation: {
|
|
1256
|
+
/** @description the file that defines it, relative to the repo's root, such as models/orders.model.aml */
|
|
1257
|
+
file: string;
|
|
1258
|
+
};
|
|
1235
1259
|
ShowModel: {
|
|
1236
1260
|
description?: string;
|
|
1237
1261
|
fields: components["schemas"]["ShowField"][];
|
|
@@ -1239,6 +1263,8 @@ interface components {
|
|
|
1239
1263
|
fqn: string;
|
|
1240
1264
|
label?: string;
|
|
1241
1265
|
name: string;
|
|
1266
|
+
/** @description its @tags, in the order the AML writes them. Absent when it has none. */
|
|
1267
|
+
tags?: components["schemas"]["ShowTag"][];
|
|
1242
1268
|
};
|
|
1243
1269
|
ShowRelationship: {
|
|
1244
1270
|
/** @description whether queries join through it by default */
|
|
@@ -1261,13 +1287,15 @@ interface components {
|
|
|
1261
1287
|
type: "one_to_one" | "many_to_one" | "range" | "many_to_many";
|
|
1262
1288
|
};
|
|
1263
1289
|
ShowRepo: {
|
|
1264
|
-
/** @description the repo's datasets, each in full, or in outline (without its models and metrics) when the dataset can't be shown in full. A diagnostic then says why. */
|
|
1290
|
+
/** @description the repo's datasets, each in full, or in outline (without its models and metrics) when the dataset can't be shown in full. A diagnostic then says why. At the index detail, each has only its kind, fqn, name and location. */
|
|
1265
1291
|
datasets: components["schemas"]["ShowDataset"][];
|
|
1266
1292
|
/**
|
|
1267
1293
|
* @description discriminator enum property added by openapi-typescript
|
|
1268
1294
|
* @enum {string}
|
|
1269
1295
|
*/
|
|
1270
1296
|
kind: "repo";
|
|
1297
|
+
/** @description the repo's models, each with its fqn, name and location, sorted by fqn. Only at the index detail. */
|
|
1298
|
+
models?: components["schemas"]["ShowIndexEntry"][];
|
|
1271
1299
|
};
|
|
1272
1300
|
ShowResult: {
|
|
1273
1301
|
/** @description the problems in the repo that affect what is shown, such as files that don't compile, a dataset's data source that isn't configured, or a dataset that can't be shown in full. Empty when what is shown is complete. */
|
|
@@ -1275,6 +1303,14 @@ interface components {
|
|
|
1275
1303
|
/** @description the object shown, by kind; a client must accept a kind it does not know */
|
|
1276
1304
|
object: components["schemas"]["ShowRepo"] | components["schemas"]["ShowDataset"];
|
|
1277
1305
|
};
|
|
1306
|
+
ShowTag: {
|
|
1307
|
+
/** @description its color, as the Tag that declares it gives it. Absent when no Tag declares it, or the Tag gives none. */
|
|
1308
|
+
color?: string;
|
|
1309
|
+
/** @description its description, as the Tag that declares it gives it. Absent when no Tag declares it, or the Tag gives none. */
|
|
1310
|
+
description?: string;
|
|
1311
|
+
/** @description the tag's name, as the AML writes it */
|
|
1312
|
+
name: string;
|
|
1313
|
+
};
|
|
1278
1314
|
SidecarHealth: {
|
|
1279
1315
|
"canal-query": string;
|
|
1280
1316
|
node: string;
|
|
@@ -3163,7 +3199,7 @@ interface FieldSuggestionsRequest {
|
|
|
3163
3199
|
/** What the reader has typed so far; empty for the first page of options. */
|
|
3164
3200
|
q: string;
|
|
3165
3201
|
}
|
|
3166
|
-
/** What `Anfra.lineage()` takes besides its
|
|
3202
|
+
/** What `Anfra.lineage()` takes besides its targets. Every option is optional. */
|
|
3167
3203
|
interface LineageOptions {
|
|
3168
3204
|
/** At most this many upstream entities per field. All of them unless given. */
|
|
3169
3205
|
limit?: number;
|
|
@@ -3172,15 +3208,15 @@ interface LineageOptions {
|
|
|
3172
3208
|
/** Cancels the call. */
|
|
3173
3209
|
signal?: AbortSignal;
|
|
3174
3210
|
}
|
|
3175
|
-
/**
|
|
3211
|
+
/** What to trace: a field, by its parent and its name in it, or a whole parent, without a child. */
|
|
3176
3212
|
type LineageTarget = Schemas['LineageTarget'];
|
|
3177
|
-
/** A lineage call: the fields to trace, and the page of what each is built from. */
|
|
3213
|
+
/** A lineage call: the fields or parents to trace, and the page of what each is built from. */
|
|
3178
3214
|
type BackendLineageRequest = Omit<Schemas['LineageInput'], 'targets'> & {
|
|
3179
3215
|
targets: LineageTarget[];
|
|
3180
3216
|
};
|
|
3181
|
-
/** Each
|
|
3217
|
+
/** Each target's lineage, in the order asked. */
|
|
3182
3218
|
type LineageResult = Schemas['LineageResult'];
|
|
3183
|
-
/** One
|
|
3219
|
+
/** One target's lineage, or why it could not be traced: exactly one of `diagram` and `error`. */
|
|
3184
3220
|
type FieldLineage = Schemas['FieldLineage'];
|
|
3185
3221
|
/**
|
|
3186
3222
|
* A field's lineage, laid out to be drawn, in the API's own names: cards (the entities drawn at the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holistics/anfra-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0-rc.2",
|
|
4
4
|
"description": "Data Apps on anfra: the authoring layer (app), what hosts one (host), anfra's plugins (plugins), the core API client (api), and their shared contract (common)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -40,7 +40,8 @@
|
|
|
40
40
|
},
|
|
41
41
|
"./ambient": {
|
|
42
42
|
"types": "./dist/ambient.d.ts"
|
|
43
|
-
}
|
|
43
|
+
},
|
|
44
|
+
"./declaration.js": "./dist/declaration.js"
|
|
44
45
|
},
|
|
45
46
|
"files": [
|
|
46
47
|
"dist",
|
|
@@ -52,7 +53,8 @@
|
|
|
52
53
|
"@holistics:registry": "https://registry.npmjs.org/"
|
|
53
54
|
},
|
|
54
55
|
"scripts": {
|
|
55
|
-
"build": "tsup && node scripts/ambient.mjs",
|
|
56
|
+
"build": "tsup && node scripts/ambient.mjs && pnpm run build:declaration",
|
|
57
|
+
"build:declaration": "node scripts/declaration.mjs",
|
|
56
58
|
"test": "TZ=\"Asia/Kuala_Lumpur\" vitest run",
|
|
57
59
|
"test:watch": "TZ=\"Asia/Kuala_Lumpur\" vitest watch",
|
|
58
60
|
"typecheck": "tsc --noEmit",
|