@katerai/sdk 0.9.0 → 0.11.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/CHANGELOG.md +52 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +7 -0
- package/client.js.map +1 -1
- package/client.mjs +7 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/v1/compiler/cache.d.mts +4 -0
- package/resources/v1/compiler/cache.d.mts.map +1 -0
- package/resources/v1/compiler/cache.d.ts +4 -0
- package/resources/v1/compiler/cache.d.ts.map +1 -0
- package/resources/v1/compiler/cache.js +9 -0
- package/resources/v1/compiler/cache.js.map +1 -0
- package/resources/v1/compiler/cache.mjs +5 -0
- package/resources/v1/compiler/cache.mjs.map +1 -0
- package/resources/v1/compiler/combination.d.mts +120 -0
- package/resources/v1/compiler/combination.d.mts.map +1 -0
- package/resources/v1/compiler/combination.d.ts +120 -0
- package/resources/v1/compiler/combination.d.ts.map +1 -0
- package/resources/v1/compiler/combination.js +30 -0
- package/resources/v1/compiler/combination.js.map +1 -0
- package/resources/v1/compiler/combination.mjs +26 -0
- package/resources/v1/compiler/combination.mjs.map +1 -0
- package/resources/v1/compiler/compiler.d.mts +2291 -0
- package/resources/v1/compiler/compiler.d.mts.map +1 -0
- package/resources/v1/compiler/compiler.d.ts +2291 -0
- package/resources/v1/compiler/compiler.d.ts.map +1 -0
- package/resources/v1/compiler/compiler.js +145 -0
- package/resources/v1/compiler/compiler.js.map +1 -0
- package/resources/v1/compiler/compiler.mjs +140 -0
- package/resources/v1/compiler/compiler.mjs.map +1 -0
- package/resources/v1/compiler/index.d.mts +5 -0
- package/resources/v1/compiler/index.d.mts.map +1 -0
- package/resources/v1/compiler/index.d.ts +5 -0
- package/resources/v1/compiler/index.d.ts.map +1 -0
- package/resources/v1/compiler/index.js +11 -0
- package/resources/v1/compiler/index.js.map +1 -0
- package/resources/v1/compiler/index.mjs +5 -0
- package/resources/v1/compiler/index.mjs.map +1 -0
- package/resources/v1/compiler/manifest.d.mts +52 -0
- package/resources/v1/compiler/manifest.d.mts.map +1 -0
- package/resources/v1/compiler/manifest.d.ts +52 -0
- package/resources/v1/compiler/manifest.d.ts.map +1 -0
- package/resources/v1/compiler/manifest.js +29 -0
- package/resources/v1/compiler/manifest.js.map +1 -0
- package/resources/v1/compiler/manifest.mjs +25 -0
- package/resources/v1/compiler/manifest.mjs.map +1 -0
- package/resources/v1/compiler.d.mts +1 -1142
- package/resources/v1/compiler.d.mts.map +1 -1
- package/resources/v1/compiler.d.ts +1 -1142
- package/resources/v1/compiler.d.ts.map +1 -1
- package/resources/v1/compiler.js +2 -66
- package/resources/v1/compiler.js.map +1 -1
- package/resources/v1/compiler.mjs +1 -64
- package/resources/v1/compiler.mjs.map +1 -1
- package/resources/v1/index.d.mts +1 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -1
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +4 -4
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/tenants/tenants.d.mts +66 -10
- package/resources/v1/tenants/tenants.d.mts.map +1 -1
- package/resources/v1/tenants/tenants.d.ts +66 -10
- package/resources/v1/tenants/tenants.d.ts.map +1 -1
- package/resources/v1/tenants/tenants.js +27 -4
- package/resources/v1/tenants/tenants.js.map +1 -1
- package/resources/v1/tenants/tenants.mjs +27 -4
- package/resources/v1/tenants/tenants.mjs.map +1 -1
- package/resources/v1/v1.d.mts +3 -3
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +3 -3
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +2 -2
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +2 -2
- package/resources/v1/v1.mjs.map +1 -1
- package/src/client.ts +9 -1
- package/src/resources/v1/compiler/cache.ts +5 -0
- package/src/resources/v1/compiler/combination.ts +157 -0
- package/src/resources/v1/compiler/compiler.ts +2991 -0
- package/src/resources/v1/compiler/index.ts +30 -0
- package/src/resources/v1/compiler/manifest.ts +80 -0
- package/src/resources/v1/compiler.ts +1 -1514
- package/src/resources/v1/index.ts +7 -1
- package/src/resources/v1/tenants/tenants.ts +99 -12
- package/src/resources/v1/v1.ts +21 -9
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenants.js","sourceRoot":"","sources":["../../../src/resources/v1/tenants/tenants.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,+DAAsC;AACtC,wCAAsE;
|
|
1
|
+
{"version":3,"file":"tenants.js","sourceRoot":"","sources":["../../../src/resources/v1/tenants/tenants.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AACrD,+DAAsC;AACtC,wCAAsE;AAGtE,0DAAyD;AAEzD,0DAAwE;AAExE,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA0FhE,CAAC;IAxFC;;;;;;;;OAQG;IACH,gBAAgB,CAAC,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,aAAa,CACX,MAAiC,EACjC,OAAwB;QAExB,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,4BAA4B,EAC5B,IAAA,qCAA2B,EACzB;YACE,KAAK,EAAE,EAAE,MAAM,EAAE;YACjB,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBAC5E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,EACD,IAAI,CAAC,OAAO,CACb,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,mBAAmB,CACjB,MAAuC,EACvC,OAAwB;QAExB,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE;YAC3D,KAAK,EAAE,EAAE,MAAM,EAAE;YACjB,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB,EAAE,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBAC5E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA3FD,0BA2FC;AAiMD,OAAO,CAAC,MAAM,GAAG,eAAM,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { APIResource } from "../../../core/resource.mjs";
|
|
3
3
|
import * as GroupsAPI from "./groups.mjs";
|
|
4
4
|
import { Groups } from "./groups.mjs";
|
|
5
|
+
import { buildHeaders } from "../../../internal/headers.mjs";
|
|
5
6
|
import { multipartFormRequestOptions } from "../../../internal/uploads.mjs";
|
|
6
7
|
export class Tenants extends APIResource {
|
|
7
8
|
constructor() {
|
|
@@ -28,17 +29,30 @@ export class Tenants extends APIResource {
|
|
|
28
29
|
* - tenant_key (required): Unique tenant identifier
|
|
29
30
|
* - tenant_name (optional): Human-readable name
|
|
30
31
|
* - group_names (optional): Comma-separated list of group names
|
|
32
|
+
* - Additional columns can be mapped to attributes via attribute_columns
|
|
31
33
|
*
|
|
32
34
|
* Creates new tenants and updates existing ones with new name/groups. Groups are
|
|
33
35
|
* added additively (not replaced) and auto-created if needed.
|
|
34
36
|
*
|
|
37
|
+
* Optionally processes attribute columns: values are validated against
|
|
38
|
+
* attributes.yaml, stored additively, and validation errors are non-fatal.
|
|
39
|
+
*
|
|
35
40
|
* RLS: Filtered to current client (ClientRLSDB).
|
|
36
41
|
*
|
|
37
42
|
* Raises: ValidationError: If CSV format is invalid (400)
|
|
38
43
|
* TenantCreationNotAllowedError: If tenancy type is NONE (400)
|
|
39
44
|
*/
|
|
40
|
-
importFromCsv(
|
|
41
|
-
|
|
45
|
+
importFromCsv(params, options) {
|
|
46
|
+
const { source, 'X-Kater-CLI-ID': xKaterCliID, ...body } = params;
|
|
47
|
+
return this._client.post('/api/v1/tenants/import/csv', multipartFormRequestOptions({
|
|
48
|
+
query: { source },
|
|
49
|
+
body,
|
|
50
|
+
...options,
|
|
51
|
+
headers: buildHeaders([
|
|
52
|
+
{ ...(xKaterCliID != null ? { 'X-Kater-CLI-ID': xKaterCliID } : undefined) },
|
|
53
|
+
options?.headers,
|
|
54
|
+
]),
|
|
55
|
+
}, this._client));
|
|
42
56
|
}
|
|
43
57
|
/**
|
|
44
58
|
* Import tenants from a warehouse table using upsert semantics.
|
|
@@ -57,8 +71,17 @@ export class Tenants extends APIResource {
|
|
|
57
71
|
* Raises: ConnectionNotFoundError: If the connection doesn't exist (404)
|
|
58
72
|
* TenantCreationNotAllowedError: If tenancy type is NONE (400)
|
|
59
73
|
*/
|
|
60
|
-
importFromWarehouse(
|
|
61
|
-
|
|
74
|
+
importFromWarehouse(params, options) {
|
|
75
|
+
const { source, 'X-Kater-CLI-ID': xKaterCliID, ...body } = params;
|
|
76
|
+
return this._client.post('/api/v1/tenants/import/warehouse', {
|
|
77
|
+
query: { source },
|
|
78
|
+
body,
|
|
79
|
+
...options,
|
|
80
|
+
headers: buildHeaders([
|
|
81
|
+
{ ...(xKaterCliID != null ? { 'X-Kater-CLI-ID': xKaterCliID } : undefined) },
|
|
82
|
+
options?.headers,
|
|
83
|
+
]),
|
|
84
|
+
});
|
|
62
85
|
}
|
|
63
86
|
}
|
|
64
87
|
Tenants.Groups = Groups;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenants.mjs","sourceRoot":"","sources":["../../../src/resources/v1/tenants/tenants.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAsC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"tenants.mjs","sourceRoot":"","sources":["../../../src/resources/v1/tenants/tenants.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAAsC,MAAM,EAAE;OAG9C,EAAE,YAAY,EAAE;OAEhB,EAAE,2BAA2B,EAAE;AAEtC,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA0FhE,CAAC;IAxFC;;;;;;;;OAQG;IACH,gBAAgB,CAAC,OAAwB;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,aAAa,CACX,MAAiC,EACjC,OAAwB;QAExB,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,4BAA4B,EAC5B,2BAA2B,CACzB;YACE,KAAK,EAAE,EAAE,MAAM,EAAE;YACjB,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBAC5E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,EACD,IAAI,CAAC,OAAO,CACb,CACF,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,mBAAmB,CACjB,MAAuC,EACvC,OAAwB;QAExB,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAClE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE;YAC3D,KAAK,EAAE,EAAE,MAAM,EAAE;YACjB,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB,EAAE,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE;gBAC5E,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AAiMD,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC"}
|
package/resources/v1/v1.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
-
import * as CompilerAPI from "./compiler.mjs";
|
|
3
|
-
import { ChartConfig, Compiler, CompilerCompileParams, CompilerCompileResponse, CompilerErrorItem, CompilerResolveParams, CompilerResolveResponse, CompilerValidateParams, CompilerValidateResponse, InlineField, Manifest, ManifestEntry, RefWithLabel, SubqueryCondition } from "./compiler.mjs";
|
|
4
2
|
import * as ConnectionsAPI from "./connections.mjs";
|
|
5
3
|
import { Connection, ConnectionListConnectionsParams, ConnectionListConnectionsResponse, Connections } from "./connections.mjs";
|
|
4
|
+
import * as CompilerAPI from "./compiler/compiler.mjs";
|
|
5
|
+
import { ChartConfig, Compiler, CompilerCompileDashboardParams, CompilerCompileDashboardResponse, CompilerCompileParams, CompilerCompileResponse, CompilerEnumerateParams, CompilerEnumerateResponse, CompilerErrorItem, CompilerExecuteParams, CompilerExecuteResponse, CompilerResolveParams, CompilerResolveResponse, CompilerValidateParams, CompilerValidateResponse, InlineField, Manifest, ManifestEntry, RefWithLabel, SubqueryCondition } from "./compiler/compiler.mjs";
|
|
6
6
|
import * as TenantsAPI from "./tenants/tenants.mjs";
|
|
7
7
|
import { ImportTenantsResponse, TenantGetTenantsSchemaResponse, TenantImportFromCsvParams, TenantImportFromWarehouseParams, Tenants } from "./tenants/tenants.mjs";
|
|
8
8
|
export declare class V1 extends APIResource {
|
|
@@ -11,7 +11,7 @@ export declare class V1 extends APIResource {
|
|
|
11
11
|
tenants: TenantsAPI.Tenants;
|
|
12
12
|
}
|
|
13
13
|
export declare namespace V1 {
|
|
14
|
-
export { Compiler as Compiler, type ChartConfig as ChartConfig, type CompilerErrorItem as CompilerErrorItem, type InlineField as InlineField, type Manifest as Manifest, type ManifestEntry as ManifestEntry, type RefWithLabel as RefWithLabel, type SubqueryCondition as SubqueryCondition, type CompilerCompileResponse as CompilerCompileResponse, type CompilerResolveResponse as CompilerResolveResponse, type CompilerValidateResponse as CompilerValidateResponse, type CompilerCompileParams as CompilerCompileParams, type CompilerResolveParams as CompilerResolveParams, type CompilerValidateParams as CompilerValidateParams, };
|
|
14
|
+
export { Compiler as Compiler, type ChartConfig as ChartConfig, type CompilerErrorItem as CompilerErrorItem, type InlineField as InlineField, type Manifest as Manifest, type ManifestEntry as ManifestEntry, type RefWithLabel as RefWithLabel, type SubqueryCondition as SubqueryCondition, type CompilerCompileResponse as CompilerCompileResponse, type CompilerCompileDashboardResponse as CompilerCompileDashboardResponse, type CompilerEnumerateResponse as CompilerEnumerateResponse, type CompilerExecuteResponse as CompilerExecuteResponse, type CompilerResolveResponse as CompilerResolveResponse, type CompilerValidateResponse as CompilerValidateResponse, type CompilerCompileParams as CompilerCompileParams, type CompilerCompileDashboardParams as CompilerCompileDashboardParams, type CompilerEnumerateParams as CompilerEnumerateParams, type CompilerExecuteParams as CompilerExecuteParams, type CompilerResolveParams as CompilerResolveParams, type CompilerValidateParams as CompilerValidateParams, };
|
|
15
15
|
export { Connections as Connections, type Connection as Connection, type ConnectionListConnectionsResponse as ConnectionListConnectionsResponse, type ConnectionListConnectionsParams as ConnectionListConnectionsParams, };
|
|
16
16
|
export { Tenants as Tenants, type ImportTenantsResponse as ImportTenantsResponse, type TenantGetTenantsSchemaResponse as TenantGetTenantsSchemaResponse, type TenantImportFromCsvParams as TenantImportFromCsvParams, type TenantImportFromWarehouseParams as TenantImportFromWarehouseParams, };
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.d.mts","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EACL,WAAW,EACX,QAAQ,EACR,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,WAAW,EACX,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,iBAAiB,EAClB;OACM,KAAK,
|
|
1
|
+
{"version":3,"file":"v1.d.mts","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EACL,UAAU,EACV,+BAA+B,EAC/B,iCAAiC,EACjC,WAAW,EACZ;OACM,KAAK,WAAW;OAChB,EACL,WAAW,EACX,QAAQ,EACR,8BAA8B,EAC9B,gCAAgC,EAChC,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,WAAW,EACX,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,iBAAiB,EAClB;OACM,KAAK,UAAU;OACf,EACL,qBAAqB,EACrB,8BAA8B,EAC9B,yBAAyB,EACzB,+BAA+B,EAC/B,OAAO,EACR;AAED,qBAAa,EAAG,SAAQ,WAAW;IACjC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IACxE,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;IACvF,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;CACpE;AAMD,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
package/resources/v1/v1.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
|
-
import * as CompilerAPI from "./compiler.js";
|
|
3
|
-
import { ChartConfig, Compiler, CompilerCompileParams, CompilerCompileResponse, CompilerErrorItem, CompilerResolveParams, CompilerResolveResponse, CompilerValidateParams, CompilerValidateResponse, InlineField, Manifest, ManifestEntry, RefWithLabel, SubqueryCondition } from "./compiler.js";
|
|
4
2
|
import * as ConnectionsAPI from "./connections.js";
|
|
5
3
|
import { Connection, ConnectionListConnectionsParams, ConnectionListConnectionsResponse, Connections } from "./connections.js";
|
|
4
|
+
import * as CompilerAPI from "./compiler/compiler.js";
|
|
5
|
+
import { ChartConfig, Compiler, CompilerCompileDashboardParams, CompilerCompileDashboardResponse, CompilerCompileParams, CompilerCompileResponse, CompilerEnumerateParams, CompilerEnumerateResponse, CompilerErrorItem, CompilerExecuteParams, CompilerExecuteResponse, CompilerResolveParams, CompilerResolveResponse, CompilerValidateParams, CompilerValidateResponse, InlineField, Manifest, ManifestEntry, RefWithLabel, SubqueryCondition } from "./compiler/compiler.js";
|
|
6
6
|
import * as TenantsAPI from "./tenants/tenants.js";
|
|
7
7
|
import { ImportTenantsResponse, TenantGetTenantsSchemaResponse, TenantImportFromCsvParams, TenantImportFromWarehouseParams, Tenants } from "./tenants/tenants.js";
|
|
8
8
|
export declare class V1 extends APIResource {
|
|
@@ -11,7 +11,7 @@ export declare class V1 extends APIResource {
|
|
|
11
11
|
tenants: TenantsAPI.Tenants;
|
|
12
12
|
}
|
|
13
13
|
export declare namespace V1 {
|
|
14
|
-
export { Compiler as Compiler, type ChartConfig as ChartConfig, type CompilerErrorItem as CompilerErrorItem, type InlineField as InlineField, type Manifest as Manifest, type ManifestEntry as ManifestEntry, type RefWithLabel as RefWithLabel, type SubqueryCondition as SubqueryCondition, type CompilerCompileResponse as CompilerCompileResponse, type CompilerResolveResponse as CompilerResolveResponse, type CompilerValidateResponse as CompilerValidateResponse, type CompilerCompileParams as CompilerCompileParams, type CompilerResolveParams as CompilerResolveParams, type CompilerValidateParams as CompilerValidateParams, };
|
|
14
|
+
export { Compiler as Compiler, type ChartConfig as ChartConfig, type CompilerErrorItem as CompilerErrorItem, type InlineField as InlineField, type Manifest as Manifest, type ManifestEntry as ManifestEntry, type RefWithLabel as RefWithLabel, type SubqueryCondition as SubqueryCondition, type CompilerCompileResponse as CompilerCompileResponse, type CompilerCompileDashboardResponse as CompilerCompileDashboardResponse, type CompilerEnumerateResponse as CompilerEnumerateResponse, type CompilerExecuteResponse as CompilerExecuteResponse, type CompilerResolveResponse as CompilerResolveResponse, type CompilerValidateResponse as CompilerValidateResponse, type CompilerCompileParams as CompilerCompileParams, type CompilerCompileDashboardParams as CompilerCompileDashboardParams, type CompilerEnumerateParams as CompilerEnumerateParams, type CompilerExecuteParams as CompilerExecuteParams, type CompilerResolveParams as CompilerResolveParams, type CompilerValidateParams as CompilerValidateParams, };
|
|
15
15
|
export { Connections as Connections, type Connection as Connection, type ConnectionListConnectionsResponse as ConnectionListConnectionsResponse, type ConnectionListConnectionsParams as ConnectionListConnectionsParams, };
|
|
16
16
|
export { Tenants as Tenants, type ImportTenantsResponse as ImportTenantsResponse, type TenantGetTenantsSchemaResponse as TenantGetTenantsSchemaResponse, type TenantImportFromCsvParams as TenantImportFromCsvParams, type TenantImportFromWarehouseParams as TenantImportFromWarehouseParams, };
|
|
17
17
|
}
|
package/resources/v1/v1.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EACL,WAAW,EACX,QAAQ,EACR,qBAAqB,EACrB,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,WAAW,EACX,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,iBAAiB,EAClB;OACM,KAAK,
|
|
1
|
+
{"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EACL,UAAU,EACV,+BAA+B,EAC/B,iCAAiC,EACjC,WAAW,EACZ;OACM,KAAK,WAAW;OAChB,EACL,WAAW,EACX,QAAQ,EACR,8BAA8B,EAC9B,gCAAgC,EAChC,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACxB,WAAW,EACX,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,iBAAiB,EAClB;OACM,KAAK,UAAU;OACf,EACL,qBAAqB,EACrB,8BAA8B,EAC9B,yBAAyB,EACzB,+BAA+B,EAC/B,OAAO,EACR;AAED,qBAAa,EAAG,SAAQ,WAAW;IACjC,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAA0C;IACxE,WAAW,EAAE,cAAc,CAAC,WAAW,CAAgD;IACvF,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;CACpE;AAMD,MAAM,CAAC,OAAO,WAAW,EAAE,CAAC;IAC1B,OAAO,EACL,QAAQ,IAAI,QAAQ,EACpB,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,WAAW,IAAI,WAAW,EAC/B,KAAK,QAAQ,IAAI,QAAQ,EACzB,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,YAAY,IAAI,YAAY,EACjC,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;IAEF,OAAO,EACL,WAAW,IAAI,WAAW,EAC1B,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
|
package/resources/v1/v1.js
CHANGED
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.V1 = void 0;
|
|
5
5
|
const tslib_1 = require("../../internal/tslib.js");
|
|
6
6
|
const resource_1 = require("../../core/resource.js");
|
|
7
|
-
const CompilerAPI = tslib_1.__importStar(require("./compiler.js"));
|
|
8
|
-
const compiler_1 = require("./compiler.js");
|
|
9
7
|
const ConnectionsAPI = tslib_1.__importStar(require("./connections.js"));
|
|
10
8
|
const connections_1 = require("./connections.js");
|
|
9
|
+
const CompilerAPI = tslib_1.__importStar(require("./compiler/compiler.js"));
|
|
10
|
+
const compiler_1 = require("./compiler/compiler.js");
|
|
11
11
|
const TenantsAPI = tslib_1.__importStar(require("./tenants/tenants.js"));
|
|
12
12
|
const tenants_1 = require("./tenants/tenants.js");
|
|
13
13
|
class V1 extends resource_1.APIResource {
|
package/resources/v1/v1.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,
|
|
1
|
+
{"version":3,"file":"v1.js","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,yEAAgD;AAChD,kDAKuB;AACvB,4EAAmD;AACnD,qDAqB6B;AAC7B,yEAAgD;AAChD,kDAM2B;AAE3B,MAAa,EAAG,SAAQ,sBAAW;IAAnC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvF,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;CAAA;AAJD,gBAIC;AAED,EAAE,CAAC,QAAQ,GAAG,mBAAQ,CAAC;AACvB,EAAE,CAAC,WAAW,GAAG,yBAAW,CAAC;AAC7B,EAAE,CAAC,OAAO,GAAG,iBAAO,CAAC"}
|
package/resources/v1/v1.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
-
import * as CompilerAPI from "./compiler.mjs";
|
|
4
|
-
import { Compiler, } from "./compiler.mjs";
|
|
5
3
|
import * as ConnectionsAPI from "./connections.mjs";
|
|
6
4
|
import { Connections, } from "./connections.mjs";
|
|
5
|
+
import * as CompilerAPI from "./compiler/compiler.mjs";
|
|
6
|
+
import { Compiler, } from "./compiler/compiler.mjs";
|
|
7
7
|
import * as TenantsAPI from "./tenants/tenants.mjs";
|
|
8
8
|
import { Tenants, } from "./tenants/tenants.mjs";
|
|
9
9
|
export class V1 extends APIResource {
|
package/resources/v1/v1.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1.mjs","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,
|
|
1
|
+
{"version":3,"file":"v1.mjs","sourceRoot":"","sources":["../../src/resources/v1/v1.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,cAAc;OACnB,EAIL,WAAW,GACZ;OACM,KAAK,WAAW;OAChB,EAEL,QAAQ,GAmBT;OACM,KAAK,UAAU;OACf,EAKL,OAAO,GACR;AAED,MAAM,OAAO,EAAG,SAAQ,WAAW;IAAnC;;QACE,aAAQ,GAAyB,IAAI,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,gBAAW,GAA+B,IAAI,cAAc,CAAC,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvF,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;CAAA;AAED,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC;AACvB,EAAE,CAAC,WAAW,GAAG,WAAW,CAAC;AAC7B,EAAE,CAAC,OAAO,GAAG,OAAO,CAAC"}
|
package/src/client.ts
CHANGED
|
@@ -483,7 +483,7 @@ export class Kater {
|
|
|
483
483
|
loggerFor(this).info(`${responseInfo} - ${retryMessage}`);
|
|
484
484
|
|
|
485
485
|
const errText = await response.text().catch((err: any) => castToError(err).message);
|
|
486
|
-
const errJSON = safeJSON(errText);
|
|
486
|
+
const errJSON = safeJSON(errText) as any;
|
|
487
487
|
const errMessage = errJSON ? undefined : errText;
|
|
488
488
|
|
|
489
489
|
loggerFor(this).debug(
|
|
@@ -732,6 +732,14 @@ export class Kater {
|
|
|
732
732
|
(Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))
|
|
733
733
|
) {
|
|
734
734
|
return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable<Uint8Array>) };
|
|
735
|
+
} else if (
|
|
736
|
+
typeof body === 'object' &&
|
|
737
|
+
headers.values.get('content-type') === 'application/x-www-form-urlencoded'
|
|
738
|
+
) {
|
|
739
|
+
return {
|
|
740
|
+
bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
741
|
+
body: this.stringifyQuery(body as Record<string, unknown>),
|
|
742
|
+
};
|
|
735
743
|
} else {
|
|
736
744
|
return this.#encoder({ body, headers });
|
|
737
745
|
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as CompilerAPI from './compiler';
|
|
5
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
6
|
+
import { buildHeaders } from '../../../internal/headers';
|
|
7
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
8
|
+
|
|
9
|
+
export class Combination extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Preview a single combination: resolve, compile, execute, and build config.
|
|
12
|
+
*
|
|
13
|
+
* Chains existing services to provide a single-call preview for the query gallery.
|
|
14
|
+
* Returns data + WidgetConfig for immediate rendering.
|
|
15
|
+
*
|
|
16
|
+
* RLS: Filtered to current client (ClientRLSDB).
|
|
17
|
+
*/
|
|
18
|
+
preview(
|
|
19
|
+
params: CombinationPreviewParams,
|
|
20
|
+
options?: RequestOptions,
|
|
21
|
+
): APIPromise<CombinationPreviewResponse> {
|
|
22
|
+
const { source, 'X-Kater-CLI-ID': xKaterCliID, ...body } = params;
|
|
23
|
+
return this._client.post('/api/v1/compiler/combination/preview', {
|
|
24
|
+
query: { source },
|
|
25
|
+
body,
|
|
26
|
+
...options,
|
|
27
|
+
headers: buildHeaders([
|
|
28
|
+
{ ...(xKaterCliID != null ? { 'X-Kater-CLI-ID': xKaterCliID } : undefined) },
|
|
29
|
+
options?.headers,
|
|
30
|
+
]),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Response from combination preview with data + resolved config.
|
|
37
|
+
*/
|
|
38
|
+
export interface CombinationPreviewResponse {
|
|
39
|
+
/**
|
|
40
|
+
* Whether preview succeeded
|
|
41
|
+
*/
|
|
42
|
+
success: boolean;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Auto-generated title
|
|
46
|
+
*/
|
|
47
|
+
auto_title?: string | null;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Whether the result was served from cache
|
|
51
|
+
*/
|
|
52
|
+
cache_hit?: boolean;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Enriched column metadata
|
|
56
|
+
*/
|
|
57
|
+
column_map?: Array<CombinationPreviewResponse.ColumnMap>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Resolved WidgetConfig (from config builder)
|
|
61
|
+
*/
|
|
62
|
+
config?: { [key: string]: unknown };
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Query result rows
|
|
66
|
+
*/
|
|
67
|
+
data?: Array<{ [key: string]: unknown }>;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Compilation errors (if any)
|
|
71
|
+
*/
|
|
72
|
+
errors?: Array<CompilerAPI.CompilerErrorItem>;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Total execution time in milliseconds
|
|
76
|
+
*/
|
|
77
|
+
execution_time_ms?: number;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Resolved widget type (e.g. 'axis_metric_by_dimensiondate')
|
|
81
|
+
*/
|
|
82
|
+
widget_type?: string | null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export namespace CombinationPreviewResponse {
|
|
86
|
+
/**
|
|
87
|
+
* Maps a UUID column alias to its human-readable name and type.
|
|
88
|
+
*/
|
|
89
|
+
export interface ColumnMap {
|
|
90
|
+
/**
|
|
91
|
+
* Field type: dimension, measure, or calculation
|
|
92
|
+
*/
|
|
93
|
+
field_type: string;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* UUID string used as SQL column alias
|
|
97
|
+
*/
|
|
98
|
+
kater_id: string;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Human-readable column name
|
|
102
|
+
*/
|
|
103
|
+
name: string;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Aggregation type for measures: sum, count, min, max, avg, unknown. None for
|
|
107
|
+
* non-measures.
|
|
108
|
+
*/
|
|
109
|
+
aggregation?: string | null;
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Display label
|
|
113
|
+
*/
|
|
114
|
+
label?: string | null;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export interface CombinationPreviewParams {
|
|
119
|
+
/**
|
|
120
|
+
* Body param: Comma-separated slot selections, same format as
|
|
121
|
+
* ResolveRequest.combination. Example:
|
|
122
|
+
* 'dimension=due_month,measure=compliance_rate'
|
|
123
|
+
*/
|
|
124
|
+
combination: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Body param: Connection to preview against
|
|
128
|
+
*/
|
|
129
|
+
connection_id: string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Body param: Query template reference (e.g. 'q:compliance_trend.\_base')
|
|
133
|
+
*/
|
|
134
|
+
query_ref: string;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Query param
|
|
138
|
+
*/
|
|
139
|
+
source?: string | null;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Body param: Optional tenant key for multi-tenant execution
|
|
143
|
+
*/
|
|
144
|
+
tenant_key?: string | null;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Header param
|
|
148
|
+
*/
|
|
149
|
+
'X-Kater-CLI-ID'?: string;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export declare namespace Combination {
|
|
153
|
+
export {
|
|
154
|
+
type CombinationPreviewResponse as CombinationPreviewResponse,
|
|
155
|
+
type CombinationPreviewParams as CombinationPreviewParams,
|
|
156
|
+
};
|
|
157
|
+
}
|