@fusebase/dashboard-service-sdk 1.23.3-client.7
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 +52 -0
- package/dist/apis/CustomDashboardRowsApi.d.ts +113 -0
- package/dist/apis/CustomDashboardRowsApi.js +122 -0
- package/dist/apis/DashboardDataApi.d.ts +98 -0
- package/dist/apis/DashboardDataApi.js +91 -0
- package/dist/apis/DashboardRelationsApi.d.ts +92 -0
- package/dist/apis/DashboardRelationsApi.js +117 -0
- package/dist/apis/DashboardsApi.d.ts +395 -0
- package/dist/apis/DashboardsApi.js +493 -0
- package/dist/apis/DatabasesApi.d.ts +134 -0
- package/dist/apis/DatabasesApi.js +162 -0
- package/dist/apis/HealthApi.d.ts +19 -0
- package/dist/apis/HealthApi.js +28 -0
- package/dist/apis/TemplatesApi.d.ts +100 -0
- package/dist/apis/TemplatesApi.js +124 -0
- package/dist/apis/TokensApi.d.ts +71 -0
- package/dist/apis/TokensApi.js +95 -0
- package/dist/extras/fetchWithRetry.d.ts +30 -0
- package/dist/extras/fetchWithRetry.js +53 -0
- package/dist/extras/messaging.d.ts +81 -0
- package/dist/extras/messaging.js +16 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +42 -0
- package/dist/runtime/index.d.ts +5 -0
- package/dist/runtime/index.js +21 -0
- package/dist/runtime/transport.d.ts +28 -0
- package/dist/runtime/transport.js +209 -0
- package/dist/runtime/types.d.ts +52 -0
- package/dist/runtime/types.js +23 -0
- package/dist/types/common/portal-form.d.ts +14 -0
- package/dist/types/common/portal-form.js +8 -0
- package/dist/types/dashboard/custom-item.d.ts +49 -0
- package/dist/types/dashboard/custom-item.js +22 -0
- package/dist/types/dashboard/dashboard.d.ts +421 -0
- package/dist/types/dashboard/dashboard.js +8 -0
- package/dist/types/dashboard/dashboards.d.ts +19 -0
- package/dist/types/dashboard/dashboards.js +8 -0
- package/dist/types/dashboard/data.d.ts +10 -0
- package/dist/types/dashboard/data.js +8 -0
- package/dist/types/dashboard/export.d.ts +11 -0
- package/dist/types/dashboard/export.js +8 -0
- package/dist/types/dashboard/index.d.ts +215 -0
- package/dist/types/dashboard/index.js +34 -0
- package/dist/types/dashboard/intent.d.ts +181 -0
- package/dist/types/dashboard/intent.js +8 -0
- package/dist/types/dashboard/items.d.ts +14 -0
- package/dist/types/dashboard/items.js +8 -0
- package/dist/types/dashboard/metadata.d.ts +12 -0
- package/dist/types/dashboard/metadata.js +8 -0
- package/dist/types/dashboard/render.d.ts +183 -0
- package/dist/types/dashboard/render.js +51 -0
- package/dist/types/dashboard/rows.d.ts +77 -0
- package/dist/types/dashboard/rows.js +14 -0
- package/dist/types/dashboard/schema.d.ts +167 -0
- package/dist/types/dashboard/schema.js +17 -0
- package/dist/types/dashboard/values.d.ts +187 -0
- package/dist/types/dashboard/values.js +8 -0
- package/dist/types/dashboard/view.d.ts +249 -0
- package/dist/types/dashboard/view.js +8 -0
- package/dist/types/database/database.d.ts +203 -0
- package/dist/types/database/database.js +8 -0
- package/dist/types/database/export.d.ts +11 -0
- package/dist/types/database/export.js +8 -0
- package/dist/types/index.d.ts +29 -0
- package/dist/types/index.js +29 -0
- package/dist/types/relations/relations.d.ts +138 -0
- package/dist/types/relations/relations.js +14 -0
- package/dist/types/shared/common.d.ts +122 -0
- package/dist/types/shared/common.js +24 -0
- package/dist/types/shared/enums.d.ts +64 -0
- package/dist/types/shared/enums.js +52 -0
- package/dist/types/shared/health.d.ts +12 -0
- package/dist/types/shared/health.js +8 -0
- package/dist/types/shared/parameters.d.ts +100 -0
- package/dist/types/shared/parameters.js +2 -0
- package/dist/types/template/template.d.ts +74 -0
- package/dist/types/template/template.js +8 -0
- package/dist/types/token/token.d.ts +206 -0
- package/dist/types/token/token.js +8 -0
- package/package.json +16 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Relations Schemas
|
|
4
|
+
*
|
|
5
|
+
* Generated from OpenAPI specification
|
|
6
|
+
* Source: schemas/relations/relations.yaml
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.RelationTypeContract = void 0;
|
|
10
|
+
exports.RelationTypeContract = {
|
|
11
|
+
OneToOne: "one_to_one",
|
|
12
|
+
OneToMany: "one_to_many",
|
|
13
|
+
ManyToMany: "many_to_many"
|
|
14
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common Schemas
|
|
3
|
+
*
|
|
4
|
+
* Generated from OpenAPI specification
|
|
5
|
+
* Source: schemas/shared/common.yaml
|
|
6
|
+
*/
|
|
7
|
+
import type { DashboardViewFiltersConfigContract } from "../dashboard/index";
|
|
8
|
+
import type { ScopeTypeContract, ScopeTypeOrgContract } from "./enums";
|
|
9
|
+
/**
|
|
10
|
+
* Human-readable alias (5-64 chars, lowercase letters, numbers, dots, underscores, and hyphens). Unique within org scope for databases/dashboards, unique within dashboard for views.
|
|
11
|
+
*
|
|
12
|
+
* @minLength 5
|
|
13
|
+
* @maxLength 64
|
|
14
|
+
* @pattern ^[a-z0-9._-]+$
|
|
15
|
+
* @nullable true
|
|
16
|
+
*/
|
|
17
|
+
export type AliasContract = (string & {
|
|
18
|
+
__pattern: "^[a-z0-9._-]+$";
|
|
19
|
+
}) | null;
|
|
20
|
+
export type ApiErrorCodeContract = "INTERNAL_ERROR" | "COLUMN_VALUE_NOT_UNIQUE" | "DATA_LOSS_CHILD_TABLE_LINK";
|
|
21
|
+
export interface FilterConfigContract {
|
|
22
|
+
required?: DashboardViewFiltersConfigContract;
|
|
23
|
+
optional?: DashboardViewFiltersConfigContract;
|
|
24
|
+
}
|
|
25
|
+
export interface GetHealthResponseContract extends StandardApiResponseContract {
|
|
26
|
+
data: {
|
|
27
|
+
status: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Optional predefined mapping of old global IDs to new global IDs for copying entities
|
|
32
|
+
*/
|
|
33
|
+
export interface GlobalIdsToReplaceMapContract {
|
|
34
|
+
/**
|
|
35
|
+
* Mapping of old database IDs to new database IDs
|
|
36
|
+
*/
|
|
37
|
+
database?: Record<string, string>;
|
|
38
|
+
/**
|
|
39
|
+
* Mapping of old dashboard IDs to new dashboard IDs
|
|
40
|
+
*/
|
|
41
|
+
dashboard?: Record<string, string>;
|
|
42
|
+
/**
|
|
43
|
+
* Mapping of old view IDs to new view IDs
|
|
44
|
+
*/
|
|
45
|
+
view?: Record<string, string>;
|
|
46
|
+
/**
|
|
47
|
+
* Mapping of old representation IDs to new representation IDs
|
|
48
|
+
*/
|
|
49
|
+
representation?: Record<string, string>;
|
|
50
|
+
/**
|
|
51
|
+
* Mapping of old row UUIDs to new row UUIDs
|
|
52
|
+
*/
|
|
53
|
+
row?: Record<string, string>;
|
|
54
|
+
/**
|
|
55
|
+
* Mapping of old section UUIDs to new section UUIDs
|
|
56
|
+
*/
|
|
57
|
+
section?: Record<string, string>;
|
|
58
|
+
/**
|
|
59
|
+
* Mapping of old relation IDs to new relation IDs
|
|
60
|
+
*/
|
|
61
|
+
relation?: Record<string, string>;
|
|
62
|
+
/**
|
|
63
|
+
* Mapping of old value IDs to new value IDs
|
|
64
|
+
*/
|
|
65
|
+
value?: Record<string, string>;
|
|
66
|
+
}
|
|
67
|
+
export interface PaginatedResponseContract {
|
|
68
|
+
/**
|
|
69
|
+
* Array of items
|
|
70
|
+
*/
|
|
71
|
+
data: unknown[];
|
|
72
|
+
meta: {
|
|
73
|
+
total: number;
|
|
74
|
+
page: number;
|
|
75
|
+
limit: number;
|
|
76
|
+
total_pages: number;
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
export interface ScopeContract {
|
|
80
|
+
/**
|
|
81
|
+
* Type of scope (e.g., workspace, portal)
|
|
82
|
+
*/
|
|
83
|
+
scope_type: ScopeTypeContract;
|
|
84
|
+
/**
|
|
85
|
+
* ID of the scoped entity
|
|
86
|
+
*/
|
|
87
|
+
scope_id: string;
|
|
88
|
+
}
|
|
89
|
+
export interface ScopeOrgContract {
|
|
90
|
+
/**
|
|
91
|
+
* Type of org scope (org)
|
|
92
|
+
*/
|
|
93
|
+
scope_type: ScopeTypeOrgContract;
|
|
94
|
+
/**
|
|
95
|
+
* ID of the org scope
|
|
96
|
+
*/
|
|
97
|
+
scope_id: string;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Standard API response format
|
|
101
|
+
*/
|
|
102
|
+
export interface StandardApiResponseContract {
|
|
103
|
+
/**
|
|
104
|
+
* Whether the operation was successful
|
|
105
|
+
*/
|
|
106
|
+
success: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Response message
|
|
109
|
+
*/
|
|
110
|
+
message: string;
|
|
111
|
+
error_code?: ApiErrorCodeContract;
|
|
112
|
+
/**
|
|
113
|
+
* Response data (optional)
|
|
114
|
+
*/
|
|
115
|
+
data?: object;
|
|
116
|
+
}
|
|
117
|
+
export declare const ApiErrorCodeContract: {
|
|
118
|
+
readonly InternalError: "INTERNAL_ERROR";
|
|
119
|
+
readonly ColumnValueNotUnique: "COLUMN_VALUE_NOT_UNIQUE";
|
|
120
|
+
readonly DataLossChildTableLink: "DATA_LOSS_CHILD_TABLE_LINK";
|
|
121
|
+
};
|
|
122
|
+
export declare function asAlias(value: string | null): AliasContract;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Common Schemas
|
|
4
|
+
*
|
|
5
|
+
* Generated from OpenAPI specification
|
|
6
|
+
* Source: schemas/shared/common.yaml
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ApiErrorCodeContract = void 0;
|
|
10
|
+
exports.asAlias = asAlias;
|
|
11
|
+
exports.ApiErrorCodeContract = {
|
|
12
|
+
InternalError: "INTERNAL_ERROR",
|
|
13
|
+
ColumnValueNotUnique: "COLUMN_VALUE_NOT_UNIQUE",
|
|
14
|
+
DataLossChildTableLink: "DATA_LOSS_CHILD_TABLE_LINK"
|
|
15
|
+
};
|
|
16
|
+
const ALIAS_RE = /^[a-z0-9._-]+$/;
|
|
17
|
+
function asAlias(value) {
|
|
18
|
+
if (value === null)
|
|
19
|
+
return null;
|
|
20
|
+
if (!ALIAS_RE.test(value)) {
|
|
21
|
+
throw new Error(`Invalid alias: ${value}`);
|
|
22
|
+
}
|
|
23
|
+
return value;
|
|
24
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enums Schemas
|
|
3
|
+
*
|
|
4
|
+
* Generated from OpenAPI specification
|
|
5
|
+
* Source: schemas/shared/enums.yaml
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Organization role that determines default permissions
|
|
9
|
+
*
|
|
10
|
+
* @enum "owner", "manager", "member", "client", "guest", "visitor"
|
|
11
|
+
*/
|
|
12
|
+
export type OrgRoleContract = "owner" | "manager" | "member" | "client" | "guest" | "visitor";
|
|
13
|
+
/**
|
|
14
|
+
* Permission contract with common permissions and extensible patterns
|
|
15
|
+
*
|
|
16
|
+
* @pattern ^(token|dashboard|database|view|data|row)\.(w+)\.(write|read|delete)$
|
|
17
|
+
*/
|
|
18
|
+
export type PermissionContract = string & {
|
|
19
|
+
__pattern: "^(token|dashboard|database|view|data|row)\\.(\\w+)\\.(write|read|delete)$";
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* The type of entity that the dashboard is based on
|
|
23
|
+
*
|
|
24
|
+
* @enum "custom", "portal", "workspace", "org", "user", "client", "form", "form-response", "tracker", "tracker-result", "meeting"
|
|
25
|
+
*/
|
|
26
|
+
export type RootEntityContract = "custom" | "portal" | "workspace" | "org" | "user" | "client" | "form" | "form-response" | "tracker" | "tracker-result" | "meeting";
|
|
27
|
+
export type ScopeTypeContract = "org" | "workspace" | "portal" | "user" | "client" | "block" | "tracker" | "parent_row" | "parent_table";
|
|
28
|
+
export type ScopeTypeOrgContract = "org";
|
|
29
|
+
export declare const OrgRoleContract: {
|
|
30
|
+
readonly Owner: "owner";
|
|
31
|
+
readonly Manager: "manager";
|
|
32
|
+
readonly Member: "member";
|
|
33
|
+
readonly Client: "client";
|
|
34
|
+
readonly Guest: "guest";
|
|
35
|
+
readonly Visitor: "visitor";
|
|
36
|
+
};
|
|
37
|
+
export declare const RootEntityContract: {
|
|
38
|
+
readonly Custom: "custom";
|
|
39
|
+
readonly Portal: "portal";
|
|
40
|
+
readonly Workspace: "workspace";
|
|
41
|
+
readonly Org: "org";
|
|
42
|
+
readonly User: "user";
|
|
43
|
+
readonly Client: "client";
|
|
44
|
+
readonly Form: "form";
|
|
45
|
+
readonly FormResponse: "form-response";
|
|
46
|
+
readonly Tracker: "tracker";
|
|
47
|
+
readonly TrackerResult: "tracker-result";
|
|
48
|
+
readonly Meeting: "meeting";
|
|
49
|
+
};
|
|
50
|
+
export declare const ScopeTypeContract: {
|
|
51
|
+
readonly Org: "org";
|
|
52
|
+
readonly Workspace: "workspace";
|
|
53
|
+
readonly Portal: "portal";
|
|
54
|
+
readonly User: "user";
|
|
55
|
+
readonly Client: "client";
|
|
56
|
+
readonly Block: "block";
|
|
57
|
+
readonly Tracker: "tracker";
|
|
58
|
+
readonly ParentRow: "parent_row";
|
|
59
|
+
readonly ParentTable: "parent_table";
|
|
60
|
+
};
|
|
61
|
+
export declare const ScopeTypeOrgContract: {
|
|
62
|
+
readonly Org: "org";
|
|
63
|
+
};
|
|
64
|
+
export declare function asPermission(value: string): PermissionContract;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Enums Schemas
|
|
4
|
+
*
|
|
5
|
+
* Generated from OpenAPI specification
|
|
6
|
+
* Source: schemas/shared/enums.yaml
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ScopeTypeOrgContract = exports.ScopeTypeContract = exports.RootEntityContract = exports.OrgRoleContract = void 0;
|
|
10
|
+
exports.asPermission = asPermission;
|
|
11
|
+
exports.OrgRoleContract = {
|
|
12
|
+
Owner: "owner",
|
|
13
|
+
Manager: "manager",
|
|
14
|
+
Member: "member",
|
|
15
|
+
Client: "client",
|
|
16
|
+
Guest: "guest",
|
|
17
|
+
Visitor: "visitor"
|
|
18
|
+
};
|
|
19
|
+
exports.RootEntityContract = {
|
|
20
|
+
Custom: "custom",
|
|
21
|
+
Portal: "portal",
|
|
22
|
+
Workspace: "workspace",
|
|
23
|
+
Org: "org",
|
|
24
|
+
User: "user",
|
|
25
|
+
Client: "client",
|
|
26
|
+
Form: "form",
|
|
27
|
+
FormResponse: "form-response",
|
|
28
|
+
Tracker: "tracker",
|
|
29
|
+
TrackerResult: "tracker-result",
|
|
30
|
+
Meeting: "meeting"
|
|
31
|
+
};
|
|
32
|
+
exports.ScopeTypeContract = {
|
|
33
|
+
Org: "org",
|
|
34
|
+
Workspace: "workspace",
|
|
35
|
+
Portal: "portal",
|
|
36
|
+
User: "user",
|
|
37
|
+
Client: "client",
|
|
38
|
+
Block: "block",
|
|
39
|
+
Tracker: "tracker",
|
|
40
|
+
ParentRow: "parent_row",
|
|
41
|
+
ParentTable: "parent_table"
|
|
42
|
+
};
|
|
43
|
+
exports.ScopeTypeOrgContract = {
|
|
44
|
+
Org: "org"
|
|
45
|
+
};
|
|
46
|
+
const PERMISSION_RE = /^(token|dashboard|database|view|data|row)\\.(\\w+)\\.(write|read|delete)$/;
|
|
47
|
+
function asPermission(value) {
|
|
48
|
+
if (!PERMISSION_RE.test(value)) {
|
|
49
|
+
throw new Error(`Invalid permission: ${value}`);
|
|
50
|
+
}
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Health Schemas
|
|
3
|
+
*
|
|
4
|
+
* Generated from OpenAPI specification
|
|
5
|
+
* Source: schemas/shared/health.yaml
|
|
6
|
+
*/
|
|
7
|
+
import type { StandardApiResponseContract } from "./common";
|
|
8
|
+
export interface GetHealth200ResponseContract extends StandardApiResponseContract {
|
|
9
|
+
data?: {
|
|
10
|
+
status?: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { SchemaItemRenderEditTypeContract, SchemaItemRenderTypeContract } from "../dashboard/render";
|
|
2
|
+
import type { SectionTypeContract } from "../dashboard/rows";
|
|
3
|
+
import type { AliasContract } from "./common";
|
|
4
|
+
import type { RootEntityContract, ScopeTypeContract, ScopeTypeOrgContract } from "./enums";
|
|
5
|
+
/**
|
|
6
|
+
* Parameter Schemas
|
|
7
|
+
*
|
|
8
|
+
* Generated from OpenAPI parameter $refs
|
|
9
|
+
*/
|
|
10
|
+
export type scopeTypeOrgInQueryRequired = ScopeTypeOrgContract;
|
|
11
|
+
export type scopeIdInQueryRequired = string;
|
|
12
|
+
export type copyViewsInQueryRequired = boolean;
|
|
13
|
+
export type copyDataInQueryRequired = boolean;
|
|
14
|
+
export type copyRelationsInQueryRequired = boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @default false
|
|
17
|
+
*/
|
|
18
|
+
export type createDefaultRowsInQuery = boolean;
|
|
19
|
+
export type rootEntitiesInQueryOptional = RootEntityContract[];
|
|
20
|
+
export type nameInQueryOptional = string;
|
|
21
|
+
export type aliasInQueryOptional = AliasContract;
|
|
22
|
+
export type scopeTypeInQueryRequired = ScopeTypeContract;
|
|
23
|
+
/**
|
|
24
|
+
* @format uuid
|
|
25
|
+
*/
|
|
26
|
+
export type dashboardIdInPathRequired = string;
|
|
27
|
+
/**
|
|
28
|
+
* @format uuid
|
|
29
|
+
*/
|
|
30
|
+
export type viewIdInPathRequired = string;
|
|
31
|
+
/**
|
|
32
|
+
* @default "use"
|
|
33
|
+
*/
|
|
34
|
+
export type cacheStrategyInQueryOptional = "use" | "bypass" | "reset";
|
|
35
|
+
export type sectionTypeInQueryOptional = SectionTypeContract;
|
|
36
|
+
/**
|
|
37
|
+
* @maxLength 32
|
|
38
|
+
*/
|
|
39
|
+
export type sectionKeyInQueryOptional = string;
|
|
40
|
+
export type sourceDashboardIdInQueryRequired = string;
|
|
41
|
+
export type sourceIndexInQueryRequired = string;
|
|
42
|
+
export type rootEntityInQueryOptional = RootEntityContract;
|
|
43
|
+
/**
|
|
44
|
+
* @format uuid
|
|
45
|
+
*/
|
|
46
|
+
export type viewIdInQueryOptional = string;
|
|
47
|
+
export type aliasInQueryRequired = AliasContract;
|
|
48
|
+
/**
|
|
49
|
+
* @format uuid
|
|
50
|
+
*/
|
|
51
|
+
export type databaseIdInQueryRequired = string;
|
|
52
|
+
export interface mappingInQueryRequiredContract {
|
|
53
|
+
/**
|
|
54
|
+
* Array of column mappings
|
|
55
|
+
*/
|
|
56
|
+
columns?: {
|
|
57
|
+
/**
|
|
58
|
+
* Column index in the CSV file (0-based)
|
|
59
|
+
*
|
|
60
|
+
* @minimum 0
|
|
61
|
+
*/
|
|
62
|
+
index: number;
|
|
63
|
+
type: SchemaItemRenderTypeContract;
|
|
64
|
+
edit_type: SchemaItemRenderEditTypeContract;
|
|
65
|
+
}[];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @format uuid
|
|
69
|
+
*/
|
|
70
|
+
export type viewIdInQueryRequired = string;
|
|
71
|
+
export type sectionTypeInQueryRequired = SectionTypeContract;
|
|
72
|
+
/**
|
|
73
|
+
* @maxLength 32
|
|
74
|
+
*/
|
|
75
|
+
export type sectionKeyInQueryRequired = string;
|
|
76
|
+
export type copyTablesInQueryRequired = boolean;
|
|
77
|
+
/**
|
|
78
|
+
* @minimum 1
|
|
79
|
+
* @default 1
|
|
80
|
+
*/
|
|
81
|
+
export type pageInQueryOptional = number;
|
|
82
|
+
/**
|
|
83
|
+
* @minimum 1
|
|
84
|
+
* @maximum 100
|
|
85
|
+
* @default 20
|
|
86
|
+
*/
|
|
87
|
+
export type limitInQueryOptional = number;
|
|
88
|
+
export type targetDashboardIdInQueryRequired = string;
|
|
89
|
+
/**
|
|
90
|
+
* @format uuid
|
|
91
|
+
*/
|
|
92
|
+
export type relationId = string;
|
|
93
|
+
/**
|
|
94
|
+
* @default true
|
|
95
|
+
*/
|
|
96
|
+
export type includeRows = boolean;
|
|
97
|
+
/**
|
|
98
|
+
* @format uuid
|
|
99
|
+
*/
|
|
100
|
+
export type templateIdInPathRequired = string;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Template Schemas
|
|
3
|
+
*
|
|
4
|
+
* Generated from OpenAPI specification
|
|
5
|
+
* Source: schemas/template/template.yaml
|
|
6
|
+
*/
|
|
7
|
+
import type { DashboardMetadataContract } from "../dashboard/metadata";
|
|
8
|
+
import type { DashboardSchemaContract } from "../dashboard/schema";
|
|
9
|
+
import type { FilterConfigContract, StandardApiResponseContract } from "../shared/common";
|
|
10
|
+
import type { RootEntityContract } from "../shared/enums";
|
|
11
|
+
export interface CreateTemplateRequestContract {
|
|
12
|
+
/**
|
|
13
|
+
* Unique identifier
|
|
14
|
+
*
|
|
15
|
+
* @format uuid
|
|
16
|
+
*/
|
|
17
|
+
global_id: string;
|
|
18
|
+
/**
|
|
19
|
+
* Template name
|
|
20
|
+
*
|
|
21
|
+
* @minLength 1
|
|
22
|
+
* @maxLength 255
|
|
23
|
+
*/
|
|
24
|
+
name: string;
|
|
25
|
+
root_entity: RootEntityContract;
|
|
26
|
+
schema: DashboardSchemaContract;
|
|
27
|
+
filters: FilterConfigContract;
|
|
28
|
+
metadata?: DashboardMetadataContract;
|
|
29
|
+
}
|
|
30
|
+
export interface TemplateContract {
|
|
31
|
+
/**
|
|
32
|
+
* Unique identifier
|
|
33
|
+
*
|
|
34
|
+
* @format uuid
|
|
35
|
+
*/
|
|
36
|
+
global_id: string;
|
|
37
|
+
/**
|
|
38
|
+
* Template name
|
|
39
|
+
*/
|
|
40
|
+
name: string;
|
|
41
|
+
root_entity: RootEntityContract;
|
|
42
|
+
schema: DashboardSchemaContract;
|
|
43
|
+
filters: FilterConfigContract;
|
|
44
|
+
metadata: DashboardMetadataContract;
|
|
45
|
+
/**
|
|
46
|
+
* @format date-time
|
|
47
|
+
*/
|
|
48
|
+
created_at: Date;
|
|
49
|
+
/**
|
|
50
|
+
* @format date-time
|
|
51
|
+
*/
|
|
52
|
+
updated_at: Date;
|
|
53
|
+
/**
|
|
54
|
+
* @format date-time
|
|
55
|
+
* @nullable true
|
|
56
|
+
*/
|
|
57
|
+
deleted_at?: Date | null;
|
|
58
|
+
}
|
|
59
|
+
export interface TemplateListResponseContract extends StandardApiResponseContract {
|
|
60
|
+
data: TemplateContract[];
|
|
61
|
+
}
|
|
62
|
+
export interface TemplateResponseContract extends StandardApiResponseContract {
|
|
63
|
+
data: TemplateContract;
|
|
64
|
+
}
|
|
65
|
+
export interface UpdateTemplateRequestContract {
|
|
66
|
+
/**
|
|
67
|
+
* @minLength 1
|
|
68
|
+
* @maxLength 255
|
|
69
|
+
*/
|
|
70
|
+
name?: string;
|
|
71
|
+
schema?: DashboardSchemaContract;
|
|
72
|
+
filters?: FilterConfigContract;
|
|
73
|
+
metadata?: DashboardMetadataContract;
|
|
74
|
+
}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token Schemas
|
|
3
|
+
*
|
|
4
|
+
* Generated from OpenAPI specification
|
|
5
|
+
* Source: schemas/token/token.yaml
|
|
6
|
+
*/
|
|
7
|
+
import type { ScopeContract } from "../shared/common";
|
|
8
|
+
import type { PermissionContract } from "../shared/enums";
|
|
9
|
+
export interface CreateTokenRequestContract {
|
|
10
|
+
/**
|
|
11
|
+
* Array of scopes for the token. Must include org scope.
|
|
12
|
+
*/
|
|
13
|
+
scopes: ScopeContract[];
|
|
14
|
+
/**
|
|
15
|
+
* Array of permission strings. Users can only grant permissions they themselves possess.
|
|
16
|
+
* See Permission enum for available permissions.
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
permissions: PermissionContract[];
|
|
20
|
+
/**
|
|
21
|
+
* Resource scope defining which resources this token can access.
|
|
22
|
+
* Required to explicitly define access restrictions.
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
resource_scope: ResourceScopeContract;
|
|
26
|
+
/**
|
|
27
|
+
* Optional name for the token
|
|
28
|
+
*
|
|
29
|
+
* @nullable true
|
|
30
|
+
*/
|
|
31
|
+
name?: string | null;
|
|
32
|
+
/**
|
|
33
|
+
* Optional expiration date for the token
|
|
34
|
+
*
|
|
35
|
+
* @format date-time
|
|
36
|
+
* @nullable true
|
|
37
|
+
*/
|
|
38
|
+
expires_at?: Date | null;
|
|
39
|
+
}
|
|
40
|
+
export interface CreateTokenResponseContract {
|
|
41
|
+
success: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* @nullable true
|
|
44
|
+
*/
|
|
45
|
+
message?: string | null;
|
|
46
|
+
data: {
|
|
47
|
+
/**
|
|
48
|
+
* The token value (only returned once on creation)
|
|
49
|
+
*/
|
|
50
|
+
token: string;
|
|
51
|
+
/**
|
|
52
|
+
* @format uuid
|
|
53
|
+
*/
|
|
54
|
+
global_id: string;
|
|
55
|
+
/**
|
|
56
|
+
* @nullable true
|
|
57
|
+
*/
|
|
58
|
+
name?: string | null;
|
|
59
|
+
permissions: string[];
|
|
60
|
+
/**
|
|
61
|
+
* @format date-time
|
|
62
|
+
* @nullable true
|
|
63
|
+
*/
|
|
64
|
+
expires_at?: Date | null;
|
|
65
|
+
/**
|
|
66
|
+
* @format date-time
|
|
67
|
+
*/
|
|
68
|
+
created_at: Date;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Resource scope defining which resources a token can access.
|
|
73
|
+
* If both allow and deny are omitted/null, all resources are allowed.
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
export interface ResourceScopeContract {
|
|
77
|
+
/**
|
|
78
|
+
* Allow rules. If null/undefined, all resources are allowed unless denied.
|
|
79
|
+
* If empty array, all resources are denied.
|
|
80
|
+
*
|
|
81
|
+
*/
|
|
82
|
+
allow?: ResourceScopeRuleContract[];
|
|
83
|
+
/**
|
|
84
|
+
* Deny rules. Resources matching deny rules are always denied, even if they match allow rules.
|
|
85
|
+
*
|
|
86
|
+
*/
|
|
87
|
+
deny?: ResourceScopeRuleContract[];
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* A resource scope rule. Parent constraints (where) are calculated automatically from resources.
|
|
91
|
+
* At least one of databases, dashboards, or views should be provided.
|
|
92
|
+
*
|
|
93
|
+
*/
|
|
94
|
+
export interface ResourceScopeRuleContract {
|
|
95
|
+
/**
|
|
96
|
+
* Array of pattern strings for databases:
|
|
97
|
+
* - "*" for all databases
|
|
98
|
+
* - "globalId:<uuid-v4>" for specific database by global ID
|
|
99
|
+
* - "aliasLike:<glob>" or bare "<glob>" for alias pattern matching
|
|
100
|
+
*
|
|
101
|
+
*/
|
|
102
|
+
databases: string[];
|
|
103
|
+
/**
|
|
104
|
+
* Array of pattern strings for dashboards:
|
|
105
|
+
* - "*" for all dashboards
|
|
106
|
+
* - "globalId:<uuid-v4>" for specific dashboard by global ID
|
|
107
|
+
* - "aliasLike:<glob>" or bare "<glob>" for alias pattern matching
|
|
108
|
+
*
|
|
109
|
+
*/
|
|
110
|
+
dashboards: string[];
|
|
111
|
+
/**
|
|
112
|
+
* Array of pattern strings for views:
|
|
113
|
+
* - "*" for all views
|
|
114
|
+
* - "globalId:<uuid-v4>" for specific view by global ID
|
|
115
|
+
* - "aliasLike:<glob>" or bare "<glob>" for alias pattern matching
|
|
116
|
+
*
|
|
117
|
+
*/
|
|
118
|
+
views: string[];
|
|
119
|
+
}
|
|
120
|
+
export interface RevokeTokenResponseContract {
|
|
121
|
+
success: boolean;
|
|
122
|
+
message: string;
|
|
123
|
+
}
|
|
124
|
+
export interface TokenContract {
|
|
125
|
+
/**
|
|
126
|
+
* Unique identifier for the token
|
|
127
|
+
*
|
|
128
|
+
* @format uuid
|
|
129
|
+
*/
|
|
130
|
+
global_id: string;
|
|
131
|
+
/**
|
|
132
|
+
* Token name
|
|
133
|
+
*
|
|
134
|
+
* @nullable true
|
|
135
|
+
*/
|
|
136
|
+
name?: string | null;
|
|
137
|
+
/**
|
|
138
|
+
* Array of permission strings granted to this token
|
|
139
|
+
*/
|
|
140
|
+
permissions: PermissionContract[];
|
|
141
|
+
/**
|
|
142
|
+
* Array of scopes associated with the token
|
|
143
|
+
*
|
|
144
|
+
* @nullable true
|
|
145
|
+
*/
|
|
146
|
+
scopes?: ScopeContract[];
|
|
147
|
+
/**
|
|
148
|
+
* Token expiration date
|
|
149
|
+
*
|
|
150
|
+
* @format date-time
|
|
151
|
+
* @nullable true
|
|
152
|
+
*/
|
|
153
|
+
expires_at?: Date | null;
|
|
154
|
+
/**
|
|
155
|
+
* Last time the token was used
|
|
156
|
+
*
|
|
157
|
+
* @format date-time
|
|
158
|
+
* @nullable true
|
|
159
|
+
*/
|
|
160
|
+
last_used_at?: Date | null;
|
|
161
|
+
/**
|
|
162
|
+
* Token creation date
|
|
163
|
+
*
|
|
164
|
+
* @format date-time
|
|
165
|
+
*/
|
|
166
|
+
created_at: Date;
|
|
167
|
+
}
|
|
168
|
+
export interface TokenListResponseContract {
|
|
169
|
+
success: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* @nullable true
|
|
172
|
+
*/
|
|
173
|
+
message?: string | null;
|
|
174
|
+
data: TokenContract[];
|
|
175
|
+
}
|
|
176
|
+
export interface TokenResponseContract {
|
|
177
|
+
success: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* @nullable true
|
|
180
|
+
*/
|
|
181
|
+
message?: string | null;
|
|
182
|
+
data: TokenContract;
|
|
183
|
+
}
|
|
184
|
+
export interface UpdateTokenRequestContract {
|
|
185
|
+
/**
|
|
186
|
+
* Token name
|
|
187
|
+
*
|
|
188
|
+
* @nullable true
|
|
189
|
+
*/
|
|
190
|
+
name?: string | null;
|
|
191
|
+
/**
|
|
192
|
+
* Array of permission strings. Users can only grant permissions they themselves possess.
|
|
193
|
+
* See Permission enum for available permissions.
|
|
194
|
+
*
|
|
195
|
+
*
|
|
196
|
+
* @nullable true
|
|
197
|
+
*/
|
|
198
|
+
permissions?: PermissionContract[];
|
|
199
|
+
/**
|
|
200
|
+
* Expiration date for the token. Set to null to remove expiration.
|
|
201
|
+
*
|
|
202
|
+
* @format date-time
|
|
203
|
+
* @nullable true
|
|
204
|
+
*/
|
|
205
|
+
expires_at?: Date | null;
|
|
206
|
+
}
|