@fusebase/fusebase-gate-sdk 1.0.2-sdk.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/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 +405 -0
- package/dist/apis/DashboardsApi.js +507 -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/OrgUsersApi.d.ts +22 -0
- package/dist/apis/OrgUsersApi.js +29 -0
- package/dist/apis/ResolveApi.d.ts +20 -0
- package/dist/apis/ResolveApi.js +29 -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 +11 -0
- package/dist/index.js +31 -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 +237 -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 +53 -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 +243 -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 +188 -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 +172 -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 +31 -0
- package/dist/types/index.js +30 -0
- package/dist/types/org-user/org-user.d.ts +19 -0
- package/dist/types/org-user/org-user.js +6 -0
- package/dist/types/relations/relations.d.ts +138 -0
- package/dist/types/relations/relations.js +14 -0
- package/dist/types/resolve/resolve.d.ts +86 -0
- package/dist/types/resolve/resolve.js +20 -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 +95 -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 +184 -0
- package/dist/types/token/token.js +8 -0
- package/package.json +16 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Relations Schemas
|
|
3
|
+
*
|
|
4
|
+
* Generated from OpenAPI specification
|
|
5
|
+
* Source: schemas/relations/relations.yaml
|
|
6
|
+
*/
|
|
7
|
+
import type { DashboardContract } from "../dashboard/dashboard";
|
|
8
|
+
import type { StandardApiResponseContract } from "../shared/common";
|
|
9
|
+
export interface AddRelationRowsRequestContract {
|
|
10
|
+
/**
|
|
11
|
+
* Row mappings to add. Each item has source_index (row in source dashboard) and target_index (row in target dashboard). Does not remove existing mappings.
|
|
12
|
+
*/
|
|
13
|
+
rows: CreateRelationRowRequestContract[];
|
|
14
|
+
}
|
|
15
|
+
export interface CreateDashboardRelationRequestContract {
|
|
16
|
+
/**
|
|
17
|
+
* Dashboard you fetch lookup data FROM (the table whose columns are displayed in relation/lookup columns).
|
|
18
|
+
*
|
|
19
|
+
* @format uuid
|
|
20
|
+
*/
|
|
21
|
+
source_dashboard_id: string;
|
|
22
|
+
/**
|
|
23
|
+
* Dashboard you are ON (the view where relation/lookup columns live).
|
|
24
|
+
*
|
|
25
|
+
* @format uuid
|
|
26
|
+
*/
|
|
27
|
+
target_dashboard_id: string;
|
|
28
|
+
relation_type: RelationTypeContract;
|
|
29
|
+
}
|
|
30
|
+
export interface CreateRelationRowRequestContract {
|
|
31
|
+
/**
|
|
32
|
+
* Row ID in the source dashboard (dashboard you fetch lookup data FROM). Use root_index_value from getDashboardViewData.
|
|
33
|
+
*/
|
|
34
|
+
source_index: string;
|
|
35
|
+
/**
|
|
36
|
+
* Row ID in the target dashboard (dashboard where relation/lookup columns live). Use root_index_value from getDashboardViewData.
|
|
37
|
+
*/
|
|
38
|
+
target_index: string;
|
|
39
|
+
}
|
|
40
|
+
export interface DashboardRelationContract {
|
|
41
|
+
/**
|
|
42
|
+
* Relation UUID. Use in updateViewIntent relations[].relation_id and addRelationRows/updateRelationRows.
|
|
43
|
+
*
|
|
44
|
+
* @format uuid
|
|
45
|
+
*/
|
|
46
|
+
global_id: string;
|
|
47
|
+
/**
|
|
48
|
+
* Dashboard you fetch lookup data FROM (the table whose columns are displayed in relation/lookup columns).
|
|
49
|
+
*
|
|
50
|
+
* @format uuid
|
|
51
|
+
*/
|
|
52
|
+
source_dashboard_id: string;
|
|
53
|
+
/**
|
|
54
|
+
* Dashboard you are ON (the view where relation/lookup columns live).
|
|
55
|
+
*
|
|
56
|
+
* @format uuid
|
|
57
|
+
*/
|
|
58
|
+
target_dashboard_id: string;
|
|
59
|
+
relation_type: RelationTypeContract;
|
|
60
|
+
/**
|
|
61
|
+
* @format date-time
|
|
62
|
+
*/
|
|
63
|
+
created_at: Date;
|
|
64
|
+
/**
|
|
65
|
+
* @format date-time
|
|
66
|
+
*/
|
|
67
|
+
updated_at: Date;
|
|
68
|
+
/**
|
|
69
|
+
* @format date-time
|
|
70
|
+
* @nullable true
|
|
71
|
+
*/
|
|
72
|
+
deleted_at?: Date | null;
|
|
73
|
+
/**
|
|
74
|
+
* Pairs of source_index (row in source dashboard) and target_index (row in target dashboard) linking rows.
|
|
75
|
+
*/
|
|
76
|
+
relation_rows?: DashboardRelationRowContract[];
|
|
77
|
+
source_dashboard?: DashboardContract;
|
|
78
|
+
target_dashboard?: DashboardContract;
|
|
79
|
+
}
|
|
80
|
+
export interface DashboardRelationListResponseContract extends StandardApiResponseContract {
|
|
81
|
+
data?: DashboardRelationContract[];
|
|
82
|
+
}
|
|
83
|
+
export interface DashboardRelationResponseContract extends StandardApiResponseContract {
|
|
84
|
+
data?: DashboardRelationContract;
|
|
85
|
+
}
|
|
86
|
+
export interface DashboardRelationRowContract {
|
|
87
|
+
/**
|
|
88
|
+
* Auto-incrementing primary key
|
|
89
|
+
*/
|
|
90
|
+
id: number;
|
|
91
|
+
/**
|
|
92
|
+
* Relation UUID (global_id from createDashboardRelation).
|
|
93
|
+
*
|
|
94
|
+
* @format uuid
|
|
95
|
+
*/
|
|
96
|
+
relation_id: string;
|
|
97
|
+
/**
|
|
98
|
+
* Row ID in the source dashboard (dashboard you fetch lookup data FROM).
|
|
99
|
+
*/
|
|
100
|
+
source_index: string;
|
|
101
|
+
/**
|
|
102
|
+
* Row ID in the target dashboard (dashboard where relation/lookup columns live).
|
|
103
|
+
*/
|
|
104
|
+
target_index: string;
|
|
105
|
+
/**
|
|
106
|
+
* @format date-time
|
|
107
|
+
*/
|
|
108
|
+
created_at: Date;
|
|
109
|
+
/**
|
|
110
|
+
* @format date-time
|
|
111
|
+
*/
|
|
112
|
+
updated_at: Date;
|
|
113
|
+
/**
|
|
114
|
+
* @format date-time
|
|
115
|
+
* @nullable true
|
|
116
|
+
*/
|
|
117
|
+
deleted_at?: Date | null;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* one_to_one - one source row ↔ one target row.
|
|
121
|
+
* one_to_many - one source row can link to many target rows (e.g. Author → Books).
|
|
122
|
+
* many_to_many - many-to-many (e.g. Tags ↔ Content).
|
|
123
|
+
*
|
|
124
|
+
*
|
|
125
|
+
* @enum "one_to_one", "one_to_many", "many_to_many"
|
|
126
|
+
*/
|
|
127
|
+
export type RelationTypeContract = "one_to_one" | "one_to_many" | "many_to_many";
|
|
128
|
+
export interface UpdateRelationRowsRequestContract {
|
|
129
|
+
/**
|
|
130
|
+
* Replaces only the mappings for the target_index values present in this array; other existing mappings are unchanged.
|
|
131
|
+
*/
|
|
132
|
+
rows: CreateRelationRowRequestContract[];
|
|
133
|
+
}
|
|
134
|
+
export declare const RelationTypeContract: {
|
|
135
|
+
readonly OneToOne: "one_to_one";
|
|
136
|
+
readonly OneToMany: "one_to_many";
|
|
137
|
+
readonly ManyToMany: "many_to_many";
|
|
138
|
+
};
|
|
@@ -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,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve Aliases Schemas
|
|
3
|
+
*
|
|
4
|
+
* Request/response contracts for resolving database, dashboard, and view
|
|
5
|
+
* by alias or id within an organization scope.
|
|
6
|
+
*/
|
|
7
|
+
import type { AliasContract, ScopeOrgContract, StandardApiResponseContract } from "../shared/common";
|
|
8
|
+
export type ResolveEntityTypeContract = "database" | "dashboard" | "view";
|
|
9
|
+
export type ResolveErrorCodeContract = "ALIAS_NOT_FOUND" | "ID_NOT_FOUND" | "SCOPE_MISMATCH" | "PARENT_NOT_FOUND";
|
|
10
|
+
/**
|
|
11
|
+
* Single item to resolve: one entity (database, dashboard, or view) with optional parent refs.
|
|
12
|
+
* For dashboard: database_id or database_alias is required.
|
|
13
|
+
* For view: database_id or database_alias and dashboard_id or dashboard_alias are required.
|
|
14
|
+
*/
|
|
15
|
+
export interface ResolveItemRequestContract {
|
|
16
|
+
/** What to resolve */
|
|
17
|
+
entity_type: ResolveEntityTypeContract;
|
|
18
|
+
/** Alias of the entity (at least one of alias or id required) */
|
|
19
|
+
alias?: AliasContract | null;
|
|
20
|
+
/**
|
|
21
|
+
* Global ID of the entity
|
|
22
|
+
* @format uuid
|
|
23
|
+
* @nullable true
|
|
24
|
+
*/
|
|
25
|
+
id?: string | null;
|
|
26
|
+
/** For dashboard/view: parent database alias. One of database_alias or database_id required. */
|
|
27
|
+
database_alias?: AliasContract | null;
|
|
28
|
+
/**
|
|
29
|
+
* For dashboard/view: parent database global ID
|
|
30
|
+
* @format uuid
|
|
31
|
+
* @nullable true
|
|
32
|
+
*/
|
|
33
|
+
database_id?: string | null;
|
|
34
|
+
/** For view: parent dashboard alias. One of dashboard_alias or dashboard_id required. */
|
|
35
|
+
dashboard_alias?: AliasContract | null;
|
|
36
|
+
/**
|
|
37
|
+
* For view: parent dashboard global ID
|
|
38
|
+
* @format uuid
|
|
39
|
+
* @nullable true
|
|
40
|
+
*/
|
|
41
|
+
dashboard_id?: string | null;
|
|
42
|
+
}
|
|
43
|
+
export interface ResolveAliasesRequestContract {
|
|
44
|
+
/** Organization scope to resolve within */
|
|
45
|
+
scope: ScopeOrgContract;
|
|
46
|
+
/** Flat list of items to resolve (order preserved in response) */
|
|
47
|
+
items: ResolveItemRequestContract[];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Result for one resolved (or unresolved) entity.
|
|
51
|
+
*/
|
|
52
|
+
export interface ResolvedItemContract {
|
|
53
|
+
entity_type: ResolveEntityTypeContract;
|
|
54
|
+
/**
|
|
55
|
+
* Resolved global_id or null if not found
|
|
56
|
+
* @format uuid
|
|
57
|
+
* @nullable true
|
|
58
|
+
*/
|
|
59
|
+
id: string | null;
|
|
60
|
+
/** Resolved alias or null */
|
|
61
|
+
alias: string | null;
|
|
62
|
+
/** Whether the entity was found and resolved */
|
|
63
|
+
resolved: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Error code when resolved is false
|
|
66
|
+
* @nullable true
|
|
67
|
+
*/
|
|
68
|
+
error_code?: ResolveErrorCodeContract | null;
|
|
69
|
+
}
|
|
70
|
+
export interface ResolveAliasesResponseDataContract {
|
|
71
|
+
results: ResolvedItemContract[];
|
|
72
|
+
}
|
|
73
|
+
export interface ResolveAliasesResponseContract extends StandardApiResponseContract {
|
|
74
|
+
data?: ResolveAliasesResponseDataContract;
|
|
75
|
+
}
|
|
76
|
+
export declare const ResolveEntityTypeContract: {
|
|
77
|
+
readonly Database: "database";
|
|
78
|
+
readonly Dashboard: "dashboard";
|
|
79
|
+
readonly View: "view";
|
|
80
|
+
};
|
|
81
|
+
export declare const ResolveErrorCodeContract: {
|
|
82
|
+
readonly AliasNotFound: "ALIAS_NOT_FOUND";
|
|
83
|
+
readonly IdNotFound: "ID_NOT_FOUND";
|
|
84
|
+
readonly ScopeMismatch: "SCOPE_MISMATCH";
|
|
85
|
+
readonly ParentNotFound: "PARENT_NOT_FOUND";
|
|
86
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Resolve Aliases Schemas
|
|
4
|
+
*
|
|
5
|
+
* Request/response contracts for resolving database, dashboard, and view
|
|
6
|
+
* by alias or id within an organization scope.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ResolveErrorCodeContract = exports.ResolveEntityTypeContract = void 0;
|
|
10
|
+
exports.ResolveEntityTypeContract = {
|
|
11
|
+
Database: "database",
|
|
12
|
+
Dashboard: "dashboard",
|
|
13
|
+
View: "view"
|
|
14
|
+
};
|
|
15
|
+
exports.ResolveErrorCodeContract = {
|
|
16
|
+
AliasNotFound: "ALIAS_NOT_FOUND",
|
|
17
|
+
IdNotFound: "ID_NOT_FOUND",
|
|
18
|
+
ScopeMismatch: "SCOPE_MISMATCH",
|
|
19
|
+
ParentNotFound: "PARENT_NOT_FOUND"
|
|
20
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common Schemas
|
|
3
|
+
*
|
|
4
|
+
* Generated from OpenAPI specification
|
|
5
|
+
* Source: schemas/shared/common.yaml
|
|
6
|
+
*/
|
|
7
|
+
import type { ScopeTypeContract, ScopeTypeOrgContract } from "./enums";
|
|
8
|
+
/**
|
|
9
|
+
* 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.
|
|
10
|
+
*
|
|
11
|
+
* @minLength 5
|
|
12
|
+
* @maxLength 64
|
|
13
|
+
* @pattern ^[a-z0-9._-]+$
|
|
14
|
+
* @nullable true
|
|
15
|
+
*/
|
|
16
|
+
export type AliasContract = (string & {
|
|
17
|
+
__pattern: "^[a-z0-9._-]+$";
|
|
18
|
+
}) | null;
|
|
19
|
+
export type ApiErrorCodeContract = "INTERNAL_ERROR" | "COLUMN_VALUE_NOT_UNIQUE" | "DATA_LOSS_CHILD_TABLE_LINK";
|
|
20
|
+
/** Filter config (Gate: no dashboard view filters) */
|
|
21
|
+
export interface FilterConfigContract {
|
|
22
|
+
required?: Record<string, unknown>;
|
|
23
|
+
optional?: Record<string, unknown>;
|
|
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: domain.action format (e.g. token.read, automation.workflow.write).
|
|
15
|
+
*
|
|
16
|
+
* @pattern ^[a-z][a-z0-9_]*(\.[a-z0-9_]+)*\.(read|write|delete)$
|
|
17
|
+
*/
|
|
18
|
+
export type PermissionContract = string & {
|
|
19
|
+
__pattern: "^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)*\\.(read|write|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 = /^[a-z][a-z0-9_]*(\\.[a-z0-9_]+)*\\.(read|write|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,95 @@
|
|
|
1
|
+
import type { AliasContract } from "./common";
|
|
2
|
+
import type { RootEntityContract, ScopeTypeContract, ScopeTypeOrgContract } from "./enums";
|
|
3
|
+
/**
|
|
4
|
+
* Parameter Schemas
|
|
5
|
+
*
|
|
6
|
+
* Generated from OpenAPI parameter $refs
|
|
7
|
+
*/
|
|
8
|
+
export type scopeTypeOrgInQueryRequired = ScopeTypeOrgContract;
|
|
9
|
+
export type scopeIdInQueryRequired = string;
|
|
10
|
+
export type copyViewsInQueryRequired = boolean;
|
|
11
|
+
export type copyDataInQueryRequired = boolean;
|
|
12
|
+
export type copyRelationsInQueryRequired = boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
export type createDefaultRowsInQuery = boolean;
|
|
17
|
+
export type rootEntitiesInQueryOptional = RootEntityContract[];
|
|
18
|
+
export type nameInQueryOptional = string;
|
|
19
|
+
export type aliasInQueryOptional = AliasContract;
|
|
20
|
+
export type scopeTypeInQueryRequired = ScopeTypeContract;
|
|
21
|
+
/**
|
|
22
|
+
* @format uuid
|
|
23
|
+
*/
|
|
24
|
+
export type dashboardIdInPathRequired = string;
|
|
25
|
+
/**
|
|
26
|
+
* @format uuid
|
|
27
|
+
*/
|
|
28
|
+
export type viewIdInPathRequired = string;
|
|
29
|
+
/**
|
|
30
|
+
* @default "use"
|
|
31
|
+
*/
|
|
32
|
+
export type cacheStrategyInQueryOptional = "use" | "bypass" | "reset";
|
|
33
|
+
export type sectionTypeInQueryOptional = string;
|
|
34
|
+
/**
|
|
35
|
+
* @maxLength 32
|
|
36
|
+
*/
|
|
37
|
+
export type sectionKeyInQueryOptional = string;
|
|
38
|
+
export type sourceDashboardIdInQueryRequired = string;
|
|
39
|
+
export type sourceIndexInQueryRequired = string;
|
|
40
|
+
export type rootEntityInQueryOptional = RootEntityContract;
|
|
41
|
+
/**
|
|
42
|
+
* @format uuid
|
|
43
|
+
*/
|
|
44
|
+
export type viewIdInQueryOptional = string;
|
|
45
|
+
export type aliasInQueryRequired = AliasContract;
|
|
46
|
+
/**
|
|
47
|
+
* @format uuid
|
|
48
|
+
*/
|
|
49
|
+
export type databaseIdInQueryRequired = string;
|
|
50
|
+
/** Column mapping (Gate: minimal stub) */
|
|
51
|
+
export interface mappingInQueryRequiredContract {
|
|
52
|
+
columns?: {
|
|
53
|
+
index: number;
|
|
54
|
+
type: string;
|
|
55
|
+
edit_type: string;
|
|
56
|
+
}[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @format uuid
|
|
60
|
+
*/
|
|
61
|
+
export type viewIdInQueryRequired = string;
|
|
62
|
+
export type sectionTypeInQueryRequired = string;
|
|
63
|
+
/**
|
|
64
|
+
* @maxLength 32
|
|
65
|
+
*/
|
|
66
|
+
export type sectionKeyInQueryRequired = string;
|
|
67
|
+
export type copyTablesInQueryRequired = boolean;
|
|
68
|
+
/**
|
|
69
|
+
* @minimum 1
|
|
70
|
+
* @default 1
|
|
71
|
+
*/
|
|
72
|
+
export type pageInQueryOptional = number;
|
|
73
|
+
/**
|
|
74
|
+
* @minimum 1
|
|
75
|
+
* @maximum 100
|
|
76
|
+
* @default 20
|
|
77
|
+
*/
|
|
78
|
+
export type limitInQueryOptional = number;
|
|
79
|
+
export type targetDashboardIdInQueryRequired = string;
|
|
80
|
+
/**
|
|
81
|
+
* @format uuid
|
|
82
|
+
*/
|
|
83
|
+
export type relationId = string;
|
|
84
|
+
/**
|
|
85
|
+
* @default true
|
|
86
|
+
*/
|
|
87
|
+
export type includeRows = boolean;
|
|
88
|
+
/**
|
|
89
|
+
* @format uuid
|
|
90
|
+
*/
|
|
91
|
+
export type templateIdInPathRequired = string;
|
|
92
|
+
/**
|
|
93
|
+
* Organization global ID (path param for org-scoped routes, e.g. /:orgId/users).
|
|
94
|
+
*/
|
|
95
|
+
export type orgIdInPathRequired = string;
|