@lightdash-tools/common 0.1.2 → 0.2.4
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 +15 -6
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/safety.d.ts +33 -0
- package/dist/safety.js +60 -0
- package/dist/safety.test.d.ts +1 -0
- package/dist/safety.test.js +27 -0
- package/dist/types/lightdash-api.d.ts +24 -333
- package/dist/types/lightdash-api.js +7 -5
- package/dist/types/{ai-agents.d.ts → v1/ai-agents.d.ts} +1 -1
- package/dist/types/{charts.d.ts → v1/charts.d.ts} +1 -1
- package/dist/types/{dashboards.d.ts → v1/dashboards.d.ts} +1 -1
- package/dist/types/{explores.d.ts → v1/explores.d.ts} +3 -1
- package/dist/types/{groups.d.ts → v1/groups.d.ts} +1 -1
- package/dist/types/v1/index.d.ts +11 -11
- package/dist/types/v1/lightdash-api.d.ts +211 -0
- package/dist/types/v1/lightdash-api.js +23 -0
- package/dist/types/v1/metrics.d.ts +6 -0
- package/dist/types/v1/metrics.js +2 -0
- package/dist/types/{organizations.d.ts → v1/organizations.d.ts} +1 -1
- package/dist/types/{project-access.d.ts → v1/project-access.d.ts} +1 -1
- package/dist/types/{projects.d.ts → v1/projects.d.ts} +1 -1
- package/dist/types/{queries.d.ts → v1/queries.d.ts} +1 -1
- package/dist/types/v1/schedulers.d.ts +7 -0
- package/dist/types/v1/schedulers.js +2 -0
- package/dist/types/{space-access.d.ts → v1/space-access.d.ts} +1 -1
- package/dist/types/{spaces.d.ts → v1/spaces.d.ts} +1 -1
- package/dist/types/v1/tags.d.ts +9 -0
- package/dist/types/v1/tags.js +2 -0
- package/dist/types/{users.d.ts → v1/users.d.ts} +1 -1
- package/dist/types/v1/validation.d.ts +7 -0
- package/dist/types/v1/validation.js +2 -0
- package/dist/types/v2/content.d.ts +6 -0
- package/dist/types/v2/content.js +2 -0
- package/dist/types/v2/index.d.ts +15 -11
- package/package.json +2 -1
- package/src/index.ts +3 -0
- package/src/safety.test.ts +36 -0
- package/src/safety.ts +71 -0
- package/src/types/lightdash-api.ts +73 -432
- package/src/types/{ai-agents.ts → v1/ai-agents.ts} +1 -1
- package/src/types/{charts.ts → v1/charts.ts} +1 -1
- package/src/types/{dashboards.ts → v1/dashboards.ts} +1 -1
- package/src/types/{explores.ts → v1/explores.ts} +3 -1
- package/src/types/{groups.ts → v1/groups.ts} +1 -1
- package/src/types/v1/index.ts +11 -11
- package/src/types/v1/lightdash-api.ts +287 -0
- package/src/types/v1/metrics.ts +7 -0
- package/src/types/{organizations.ts → v1/organizations.ts} +1 -1
- package/src/types/{project-access.ts → v1/project-access.ts} +1 -1
- package/src/types/{projects.ts → v1/projects.ts} +1 -1
- package/src/types/{queries.ts → v1/queries.ts} +1 -1
- package/src/types/v1/schedulers.ts +9 -0
- package/src/types/{space-access.ts → v1/space-access.ts} +1 -1
- package/src/types/{spaces.ts → v1/spaces.ts} +1 -1
- package/src/types/v1/tags.ts +11 -0
- package/src/types/{users.ts → v1/users.ts} +1 -1
- package/src/types/v1/validation.ts +8 -0
- package/src/types/v2/content.ts +7 -0
- package/src/types/v2/index.ts +16 -11
- package/tsconfig.json +3 -2
- /package/dist/types/{ai-agents.js → v1/ai-agents.js} +0 -0
- /package/dist/types/{charts.js → v1/charts.js} +0 -0
- /package/dist/types/{dashboards.js → v1/dashboards.js} +0 -0
- /package/dist/types/{explores.js → v1/explores.js} +0 -0
- /package/dist/types/{groups.js → v1/groups.js} +0 -0
- /package/dist/types/{organizations.js → v1/organizations.js} +0 -0
- /package/dist/types/{project-access.js → v1/project-access.js} +0 -0
- /package/dist/types/{projects.js → v1/projects.js} +0 -0
- /package/dist/types/{queries.js → v1/queries.js} +0 -0
- /package/dist/types/{space-access.js → v1/space-access.js} +0 -0
- /package/dist/types/{spaces.js → v1/spaces.js} +0 -0
- /package/dist/types/{users.js → v1/users.js} +0 -0
|
@@ -1,439 +1,80 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Lightdash API models
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Models are type aliases to generated OpenAPI types, ensuring they remain aligned with the spec.
|
|
6
|
-
* Models are split into domain-specific files for better maintainability.
|
|
2
|
+
* Lightdash API models entry point.
|
|
3
|
+
* Consolidates v1 and v2 types while maintaining backward compatibility.
|
|
7
4
|
*/
|
|
8
5
|
|
|
9
|
-
|
|
10
|
-
import
|
|
11
|
-
import type { Organizations } from './organizations';
|
|
12
|
-
import type { Queries } from './queries';
|
|
13
|
-
import type { Charts } from './charts';
|
|
14
|
-
import type { Dashboards } from './dashboards';
|
|
15
|
-
import type { Spaces } from './spaces';
|
|
16
|
-
import type { SpaceAccess } from './space-access';
|
|
17
|
-
import type { Users } from './users';
|
|
18
|
-
import type { Groups } from './groups';
|
|
19
|
-
import type { AiAgents } from './ai-agents';
|
|
20
|
-
import type { ProjectAccess } from './project-access';
|
|
21
|
-
import type { Explores } from './explores';
|
|
6
|
+
import { LightdashApi as V1Api } from './v1/lightdash-api';
|
|
7
|
+
import { V2 as V2Api } from './v2/index';
|
|
22
8
|
|
|
23
|
-
// Re-export
|
|
24
|
-
export type {
|
|
25
|
-
Projects,
|
|
26
|
-
Organizations,
|
|
27
|
-
Queries,
|
|
28
|
-
Charts,
|
|
29
|
-
Dashboards,
|
|
30
|
-
Spaces,
|
|
31
|
-
SpaceAccess,
|
|
32
|
-
Users,
|
|
33
|
-
Groups,
|
|
34
|
-
AiAgents,
|
|
35
|
-
ProjectAccess,
|
|
36
|
-
Explores,
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
// Import generated types for LightdashApi namespace assembly
|
|
40
|
-
import type { components } from './generated/openapi-types';
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Main namespace for all Lightdash API models.
|
|
44
|
-
* Provides organized access to all domain models.
|
|
45
|
-
*
|
|
46
|
-
* Usage:
|
|
47
|
-
* ```typescript
|
|
48
|
-
* import type { LightdashApi } from '@lightdash-tools/common';
|
|
49
|
-
* const project: LightdashApi.Projects.Project = ...;
|
|
50
|
-
* ```
|
|
51
|
-
*/
|
|
9
|
+
// Re-export the unified namespace
|
|
52
10
|
export namespace LightdashApi {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
export
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
export
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
components['schemas']['ExecuteAsyncDashboardChartRequestParams'];
|
|
76
|
-
export type ExecuteAsyncUnderlyingData =
|
|
77
|
-
components['schemas']['ExecuteAsyncUnderlyingDataRequestParams'];
|
|
78
|
-
}
|
|
79
|
-
export namespace Responses {
|
|
80
|
-
export type RunQueryResults = components['schemas']['ApiRunQueryResponse']['results'];
|
|
81
|
-
export type CompiledQueryResults = components['schemas']['ApiCompiledQueryResults'];
|
|
82
|
-
export type ExecuteAsyncMetricQueryResults =
|
|
83
|
-
components['schemas']['ApiExecuteAsyncMetricQueryResults'];
|
|
84
|
-
export type ExecuteAsyncDashboardChartResults =
|
|
85
|
-
components['schemas']['ApiExecuteAsyncDashboardChartQueryResults'];
|
|
86
|
-
export type ExecuteAsyncSqlQueryResults =
|
|
87
|
-
components['schemas']['ApiExecuteAsyncSqlQueryResults'];
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export namespace Charts {
|
|
92
|
-
export type SpaceQuery = components['schemas']['SpaceQuery'];
|
|
93
|
-
export type ChartAsCodeListResults =
|
|
94
|
-
components['schemas']['ApiChartAsCodeListResponse']['results'];
|
|
95
|
-
export type ChartAsCodeUpsertResults =
|
|
96
|
-
components['schemas']['ApiChartAsCodeUpsertResponse']['results'];
|
|
97
|
-
export type UpsertChartAsCodeBody =
|
|
98
|
-
components['schemas']['Omit_ChartAsCode.chartConfig-or-description_'] & {
|
|
99
|
-
description?: string | null;
|
|
100
|
-
chartConfig: components['schemas']['AnyType'];
|
|
101
|
-
publicSpaceCreate?: boolean;
|
|
102
|
-
skipSpaceCreate?: boolean;
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export namespace Dashboards {
|
|
107
|
-
export type DashboardBasicDetailsWithTileTypes =
|
|
108
|
-
components['schemas']['DashboardBasicDetailsWithTileTypes'];
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export namespace Spaces {
|
|
112
|
-
export type SpaceSummary = components['schemas']['SpaceSummary'];
|
|
113
|
-
export type Space = components['schemas']['Space'];
|
|
114
|
-
export type CreateSpace = components['schemas']['CreateSpace'];
|
|
115
|
-
export type UpdateSpace = components['schemas']['UpdateSpace'];
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
export namespace SpaceAccess {
|
|
119
|
-
export type AddSpaceUserAccess = components['schemas']['AddSpaceUserAccess'];
|
|
120
|
-
export type AddSpaceGroupAccess = components['schemas']['AddSpaceGroupAccess'];
|
|
121
|
-
export type SpaceMemberRole = components['schemas']['SpaceMemberRole'];
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export namespace ProjectAccess {
|
|
125
|
-
export type ProjectMemberProfile = components['schemas']['ProjectMemberProfile'];
|
|
126
|
-
export type ProjectMemberRole = components['schemas']['ProjectMemberRole'];
|
|
127
|
-
export type CreateProjectMember = components['schemas']['CreateProjectMember'];
|
|
128
|
-
export type UpdateProjectMember = components['schemas']['UpdateProjectMember'];
|
|
129
|
-
export type ProjectGroupAccess = components['schemas']['ProjectGroupAccess'];
|
|
130
|
-
export type CreateProjectGroupAccessBody =
|
|
131
|
-
components['schemas']['Pick_CreateProjectGroupAccess.role_'];
|
|
132
|
-
export type UpdateProjectGroupAccess = components['schemas']['UpdateDBProjectGroupAccess'];
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export namespace Users {
|
|
136
|
-
export type OrganizationMemberProfile = components['schemas']['OrganizationMemberProfile'];
|
|
137
|
-
export type OrganizationMemberProfilesResult =
|
|
138
|
-
components['schemas']['KnexPaginatedData_OrganizationMemberProfile-Array_'];
|
|
139
|
-
export type ApiOrganizationMemberProfile =
|
|
140
|
-
components['schemas']['ApiOrganizationMemberProfile'];
|
|
141
|
-
export type ApiOrganizationMemberProfiles =
|
|
142
|
-
components['schemas']['ApiOrganizationMemberProfiles'];
|
|
143
|
-
export type OrganizationMemberProfileUpdate =
|
|
144
|
-
components['schemas']['OrganizationMemberProfileUpdate'];
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export namespace Groups {
|
|
148
|
-
export type Group = components['schemas']['Group'];
|
|
149
|
-
export type GroupWithMembers = components['schemas']['GroupWithMembers'];
|
|
150
|
-
export type CreateGroup = components['schemas']['CreateGroup'];
|
|
151
|
-
export type UpdateGroupWithMembers = components['schemas']['UpdateGroupWithMembers'];
|
|
152
|
-
export type GroupListResult =
|
|
153
|
-
components['schemas']['KnexPaginatedData_Group-Array-or-GroupWithMembers-Array_'];
|
|
154
|
-
export type ApiGroupResponse = components['schemas']['ApiGroupResponse'];
|
|
155
|
-
export type ApiGroupListResponse = components['schemas']['ApiGroupListResponse'];
|
|
156
|
-
export type ApiCreateGroupResponse = components['schemas']['ApiCreateGroupResponse'];
|
|
157
|
-
export type ApiGroupMembersResponse = components['schemas']['ApiGroupMembersResponse'];
|
|
158
|
-
export type GroupMember = components['schemas']['GroupMember'];
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
export namespace AiAgents {
|
|
162
|
-
export type AiAgentSummary = components['schemas']['AiAgentSummary'];
|
|
163
|
-
export type AiAgentAdminSortField = components['schemas']['AiAgentAdminSortField'];
|
|
164
|
-
export type AdminThreadsResult =
|
|
165
|
-
components['schemas']['ApiAiAgentAdminConversationsResponse']['results'];
|
|
166
|
-
export type GetAiOrganizationSettingsResult =
|
|
167
|
-
components['schemas']['ApiAiOrganizationSettingsResponse']['results'];
|
|
168
|
-
export type UpdateAiOrganizationSettings =
|
|
169
|
-
components['schemas']['UpdateAiOrganizationSettings'];
|
|
170
|
-
export type UpdateAiOrganizationSettingsResult =
|
|
171
|
-
components['schemas']['ApiUpdateAiOrganizationSettingsResponse']['results'];
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export namespace Explores {
|
|
175
|
-
export type ApiExploresResults = components['schemas']['ApiExploresResults'];
|
|
176
|
-
export type ApiExploreResults = components['schemas']['ApiExploreResults'];
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
/** Types for Lightdash API v1 endpoints (ADR-0008). */
|
|
180
|
-
export namespace V1 {
|
|
181
|
-
export namespace Projects {
|
|
182
|
-
export type Project = components['schemas']['Project'];
|
|
183
|
-
export type OrganizationProject = components['schemas']['OrganizationProject'];
|
|
184
|
-
}
|
|
185
|
-
export namespace Organizations {
|
|
186
|
-
export type Organization = components['schemas']['Organization'];
|
|
187
|
-
}
|
|
188
|
-
export namespace Queries {
|
|
189
|
-
export namespace Requests {
|
|
190
|
-
export type MetricQuery = components['schemas']['MetricQueryRequest'];
|
|
191
|
-
export type CompileQuery = components['schemas']['MetricQuery'] & {
|
|
192
|
-
pivotConfiguration?: components['schemas']['PivotConfiguration'];
|
|
193
|
-
parameters?: components['schemas']['ParametersValuesMap'];
|
|
194
|
-
};
|
|
195
|
-
export type ExecuteAsyncMetricQuery =
|
|
196
|
-
components['schemas']['ExecuteAsyncMetricQueryRequestParams'];
|
|
197
|
-
export type ExecuteAsyncSqlQuery =
|
|
198
|
-
components['schemas']['ExecuteAsyncSqlQueryRequestParams'];
|
|
199
|
-
export type ExecuteAsyncSavedChart =
|
|
200
|
-
components['schemas']['ExecuteAsyncSavedChartRequestParams'];
|
|
201
|
-
export type ExecuteAsyncDashboardChart =
|
|
202
|
-
components['schemas']['ExecuteAsyncDashboardChartRequestParams'];
|
|
203
|
-
export type ExecuteAsyncUnderlyingData =
|
|
204
|
-
components['schemas']['ExecuteAsyncUnderlyingDataRequestParams'];
|
|
205
|
-
}
|
|
206
|
-
export namespace Responses {
|
|
207
|
-
export type RunQueryResults = components['schemas']['ApiRunQueryResponse']['results'];
|
|
208
|
-
export type CompiledQueryResults = components['schemas']['ApiCompiledQueryResults'];
|
|
209
|
-
export type ExecuteAsyncMetricQueryResults =
|
|
210
|
-
components['schemas']['ApiExecuteAsyncMetricQueryResults'];
|
|
211
|
-
export type ExecuteAsyncDashboardChartResults =
|
|
212
|
-
components['schemas']['ApiExecuteAsyncDashboardChartQueryResults'];
|
|
213
|
-
export type ExecuteAsyncSqlQueryResults =
|
|
214
|
-
components['schemas']['ApiExecuteAsyncSqlQueryResults'];
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
export namespace Charts {
|
|
218
|
-
export type SpaceQuery = components['schemas']['SpaceQuery'];
|
|
219
|
-
}
|
|
220
|
-
export namespace Dashboards {
|
|
221
|
-
export type DashboardBasicDetailsWithTileTypes =
|
|
222
|
-
components['schemas']['DashboardBasicDetailsWithTileTypes'];
|
|
223
|
-
}
|
|
224
|
-
export namespace Spaces {
|
|
225
|
-
export type SpaceSummary = components['schemas']['SpaceSummary'];
|
|
226
|
-
export type Space = components['schemas']['Space'];
|
|
227
|
-
export type CreateSpace = components['schemas']['CreateSpace'];
|
|
228
|
-
export type UpdateSpace = components['schemas']['UpdateSpace'];
|
|
229
|
-
}
|
|
230
|
-
export namespace SpaceAccess {
|
|
231
|
-
export type AddSpaceUserAccess = components['schemas']['AddSpaceUserAccess'];
|
|
232
|
-
export type AddSpaceGroupAccess = components['schemas']['AddSpaceGroupAccess'];
|
|
233
|
-
export type SpaceMemberRole = components['schemas']['SpaceMemberRole'];
|
|
234
|
-
}
|
|
235
|
-
export namespace ProjectAccess {
|
|
236
|
-
export type ProjectMemberProfile = components['schemas']['ProjectMemberProfile'];
|
|
237
|
-
export type ProjectMemberRole = components['schemas']['ProjectMemberRole'];
|
|
238
|
-
export type CreateProjectMember = components['schemas']['CreateProjectMember'];
|
|
239
|
-
export type UpdateProjectMember = components['schemas']['UpdateProjectMember'];
|
|
240
|
-
export type ProjectGroupAccess = components['schemas']['ProjectGroupAccess'];
|
|
241
|
-
export type CreateProjectGroupAccessBody =
|
|
242
|
-
components['schemas']['Pick_CreateProjectGroupAccess.role_'];
|
|
243
|
-
export type UpdateProjectGroupAccess = components['schemas']['UpdateDBProjectGroupAccess'];
|
|
244
|
-
}
|
|
245
|
-
export namespace Users {
|
|
246
|
-
export type OrganizationMemberProfile = components['schemas']['OrganizationMemberProfile'];
|
|
247
|
-
export type OrganizationMemberProfilesResult =
|
|
248
|
-
components['schemas']['KnexPaginatedData_OrganizationMemberProfile-Array_'];
|
|
249
|
-
export type ApiOrganizationMemberProfile =
|
|
250
|
-
components['schemas']['ApiOrganizationMemberProfile'];
|
|
251
|
-
export type ApiOrganizationMemberProfiles =
|
|
252
|
-
components['schemas']['ApiOrganizationMemberProfiles'];
|
|
253
|
-
export type OrganizationMemberProfileUpdate =
|
|
254
|
-
components['schemas']['OrganizationMemberProfileUpdate'];
|
|
255
|
-
}
|
|
256
|
-
export namespace Groups {
|
|
257
|
-
export type Group = components['schemas']['Group'];
|
|
258
|
-
export type GroupWithMembers = components['schemas']['GroupWithMembers'];
|
|
259
|
-
export type CreateGroup = components['schemas']['CreateGroup'];
|
|
260
|
-
export type UpdateGroupWithMembers = components['schemas']['UpdateGroupWithMembers'];
|
|
261
|
-
export type GroupListResult =
|
|
262
|
-
components['schemas']['KnexPaginatedData_Group-Array-or-GroupWithMembers-Array_'];
|
|
263
|
-
export type ApiGroupResponse = components['schemas']['ApiGroupResponse'];
|
|
264
|
-
export type ApiGroupListResponse = components['schemas']['ApiGroupListResponse'];
|
|
265
|
-
export type ApiCreateGroupResponse = components['schemas']['ApiCreateGroupResponse'];
|
|
266
|
-
export type ApiGroupMembersResponse = components['schemas']['ApiGroupMembersResponse'];
|
|
267
|
-
export type GroupMember = components['schemas']['GroupMember'];
|
|
268
|
-
}
|
|
269
|
-
export namespace AiAgents {
|
|
270
|
-
export type AiAgentSummary = components['schemas']['AiAgentSummary'];
|
|
271
|
-
export type AiAgentAdminSortField = components['schemas']['AiAgentAdminSortField'];
|
|
272
|
-
export type AdminThreadsResult =
|
|
273
|
-
components['schemas']['ApiAiAgentAdminConversationsResponse']['results'];
|
|
274
|
-
export type GetAiOrganizationSettingsResult =
|
|
275
|
-
components['schemas']['ApiAiOrganizationSettingsResponse']['results'];
|
|
276
|
-
export type UpdateAiOrganizationSettings =
|
|
277
|
-
components['schemas']['UpdateAiOrganizationSettings'];
|
|
278
|
-
export type UpdateAiOrganizationSettingsResult =
|
|
279
|
-
components['schemas']['ApiUpdateAiOrganizationSettingsResponse']['results'];
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
/** Types for Lightdash API v2 endpoints (ADR-0008). */
|
|
284
|
-
export namespace V2 {
|
|
285
|
-
export namespace Projects {
|
|
286
|
-
export type Project = components['schemas']['Project'];
|
|
287
|
-
export type OrganizationProject = components['schemas']['OrganizationProject'];
|
|
288
|
-
}
|
|
289
|
-
export namespace Organizations {
|
|
290
|
-
export type Organization = components['schemas']['Organization'];
|
|
291
|
-
}
|
|
292
|
-
export namespace Queries {
|
|
293
|
-
export namespace Requests {
|
|
294
|
-
export type MetricQuery = components['schemas']['MetricQueryRequest'];
|
|
295
|
-
export type CompileQuery = components['schemas']['MetricQuery'] & {
|
|
296
|
-
pivotConfiguration?: components['schemas']['PivotConfiguration'];
|
|
297
|
-
parameters?: components['schemas']['ParametersValuesMap'];
|
|
298
|
-
};
|
|
299
|
-
export type ExecuteAsyncMetricQuery =
|
|
300
|
-
components['schemas']['ExecuteAsyncMetricQueryRequestParams'];
|
|
301
|
-
export type ExecuteAsyncSqlQuery =
|
|
302
|
-
components['schemas']['ExecuteAsyncSqlQueryRequestParams'];
|
|
303
|
-
export type ExecuteAsyncSavedChart =
|
|
304
|
-
components['schemas']['ExecuteAsyncSavedChartRequestParams'];
|
|
305
|
-
export type ExecuteAsyncDashboardChart =
|
|
306
|
-
components['schemas']['ExecuteAsyncDashboardChartRequestParams'];
|
|
307
|
-
export type ExecuteAsyncUnderlyingData =
|
|
308
|
-
components['schemas']['ExecuteAsyncUnderlyingDataRequestParams'];
|
|
309
|
-
}
|
|
310
|
-
export namespace Responses {
|
|
311
|
-
export type RunQueryResults = components['schemas']['ApiRunQueryResponse']['results'];
|
|
312
|
-
export type CompiledQueryResults = components['schemas']['ApiCompiledQueryResults'];
|
|
313
|
-
export type ExecuteAsyncMetricQueryResults =
|
|
314
|
-
components['schemas']['ApiExecuteAsyncMetricQueryResults'];
|
|
315
|
-
export type ExecuteAsyncDashboardChartResults =
|
|
316
|
-
components['schemas']['ApiExecuteAsyncDashboardChartQueryResults'];
|
|
317
|
-
export type ExecuteAsyncSqlQueryResults =
|
|
318
|
-
components['schemas']['ApiExecuteAsyncSqlQueryResults'];
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
export namespace Charts {
|
|
322
|
-
export type SpaceQuery = components['schemas']['SpaceQuery'];
|
|
323
|
-
}
|
|
324
|
-
export namespace Dashboards {
|
|
325
|
-
export type DashboardBasicDetailsWithTileTypes =
|
|
326
|
-
components['schemas']['DashboardBasicDetailsWithTileTypes'];
|
|
327
|
-
}
|
|
328
|
-
export namespace Spaces {
|
|
329
|
-
export type SpaceSummary = components['schemas']['SpaceSummary'];
|
|
330
|
-
export type Space = components['schemas']['Space'];
|
|
331
|
-
export type CreateSpace = components['schemas']['CreateSpace'];
|
|
332
|
-
export type UpdateSpace = components['schemas']['UpdateSpace'];
|
|
333
|
-
}
|
|
334
|
-
export namespace SpaceAccess {
|
|
335
|
-
export type AddSpaceUserAccess = components['schemas']['AddSpaceUserAccess'];
|
|
336
|
-
export type AddSpaceGroupAccess = components['schemas']['AddSpaceGroupAccess'];
|
|
337
|
-
export type SpaceMemberRole = components['schemas']['SpaceMemberRole'];
|
|
338
|
-
}
|
|
339
|
-
export namespace ProjectAccess {
|
|
340
|
-
export type ProjectMemberProfile = components['schemas']['ProjectMemberProfile'];
|
|
341
|
-
export type ProjectMemberRole = components['schemas']['ProjectMemberRole'];
|
|
342
|
-
export type CreateProjectMember = components['schemas']['CreateProjectMember'];
|
|
343
|
-
export type UpdateProjectMember = components['schemas']['UpdateProjectMember'];
|
|
344
|
-
export type ProjectGroupAccess = components['schemas']['ProjectGroupAccess'];
|
|
345
|
-
export type CreateProjectGroupAccessBody =
|
|
346
|
-
components['schemas']['Pick_CreateProjectGroupAccess.role_'];
|
|
347
|
-
export type UpdateProjectGroupAccess = components['schemas']['UpdateDBProjectGroupAccess'];
|
|
348
|
-
}
|
|
349
|
-
export namespace Users {
|
|
350
|
-
export type OrganizationMemberProfile = components['schemas']['OrganizationMemberProfile'];
|
|
351
|
-
export type OrganizationMemberProfilesResult =
|
|
352
|
-
components['schemas']['KnexPaginatedData_OrganizationMemberProfile-Array_'];
|
|
353
|
-
export type ApiOrganizationMemberProfile =
|
|
354
|
-
components['schemas']['ApiOrganizationMemberProfile'];
|
|
355
|
-
export type ApiOrganizationMemberProfiles =
|
|
356
|
-
components['schemas']['ApiOrganizationMemberProfiles'];
|
|
357
|
-
export type OrganizationMemberProfileUpdate =
|
|
358
|
-
components['schemas']['OrganizationMemberProfileUpdate'];
|
|
359
|
-
}
|
|
360
|
-
export namespace Groups {
|
|
361
|
-
export type Group = components['schemas']['Group'];
|
|
362
|
-
export type GroupWithMembers = components['schemas']['GroupWithMembers'];
|
|
363
|
-
export type CreateGroup = components['schemas']['CreateGroup'];
|
|
364
|
-
export type UpdateGroupWithMembers = components['schemas']['UpdateGroupWithMembers'];
|
|
365
|
-
export type GroupListResult =
|
|
366
|
-
components['schemas']['KnexPaginatedData_Group-Array-or-GroupWithMembers-Array_'];
|
|
367
|
-
export type ApiGroupResponse = components['schemas']['ApiGroupResponse'];
|
|
368
|
-
export type ApiGroupListResponse = components['schemas']['ApiGroupListResponse'];
|
|
369
|
-
export type ApiCreateGroupResponse = components['schemas']['ApiCreateGroupResponse'];
|
|
370
|
-
export type ApiGroupMembersResponse = components['schemas']['ApiGroupMembersResponse'];
|
|
371
|
-
export type GroupMember = components['schemas']['GroupMember'];
|
|
372
|
-
}
|
|
373
|
-
export namespace AiAgents {
|
|
374
|
-
export type AiAgentSummary = components['schemas']['AiAgentSummary'];
|
|
375
|
-
export type AiAgentAdminSortField = components['schemas']['AiAgentAdminSortField'];
|
|
376
|
-
export type AdminThreadsResult =
|
|
377
|
-
components['schemas']['ApiAiAgentAdminConversationsResponse']['results'];
|
|
378
|
-
export type GetAiOrganizationSettingsResult =
|
|
379
|
-
components['schemas']['ApiAiOrganizationSettingsResponse']['results'];
|
|
380
|
-
export type UpdateAiOrganizationSettings =
|
|
381
|
-
components['schemas']['UpdateAiOrganizationSettings'];
|
|
382
|
-
export type UpdateAiOrganizationSettingsResult =
|
|
383
|
-
components['schemas']['ApiUpdateAiOrganizationSettingsResponse']['results'];
|
|
384
|
-
}
|
|
385
|
-
}
|
|
11
|
+
// Domain namespaces (legacy/v1 by default)
|
|
12
|
+
export import Projects = V1Api.Projects;
|
|
13
|
+
export import Organizations = V1Api.Organizations;
|
|
14
|
+
export import Queries = V1Api.Queries;
|
|
15
|
+
export import Charts = V1Api.Charts;
|
|
16
|
+
export import Dashboards = V1Api.Dashboards;
|
|
17
|
+
export import Spaces = V1Api.Spaces;
|
|
18
|
+
export import SpaceAccess = V1Api.SpaceAccess;
|
|
19
|
+
export import Users = V1Api.Users;
|
|
20
|
+
export import Groups = V1Api.Groups;
|
|
21
|
+
export import AiAgents = V1Api.AiAgents;
|
|
22
|
+
export import ProjectAccess = V1Api.ProjectAccess;
|
|
23
|
+
export import Explores = V1Api.Explores;
|
|
24
|
+
export import Validation = V1Api.Validation;
|
|
25
|
+
export import Metrics = V1Api.Metrics;
|
|
26
|
+
export import Schedulers = V1Api.Schedulers;
|
|
27
|
+
export import Tags = V1Api.Tags;
|
|
28
|
+
export import Content = V1Api.Content;
|
|
29
|
+
|
|
30
|
+
// Versioned namespaces
|
|
31
|
+
export import V1 = V1Api.V1;
|
|
32
|
+
export import V2 = V2Api;
|
|
386
33
|
}
|
|
387
34
|
|
|
388
|
-
// Flat exports for
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
export type UpdateAiOrganizationSettingsResult = AiAgents.UpdateAiOrganizationSettingsResult;
|
|
435
|
-
export type GetAdminThreadsParams = AiAgents.GetAdminThreadsParams;
|
|
436
|
-
|
|
437
|
-
// Explores (flat exports)
|
|
438
|
-
export type ApiExploresResults = Explores.ApiExploresResults;
|
|
439
|
-
export type ApiExploreResults = Explores.ApiExploreResults;
|
|
35
|
+
// Flat exports for backward compatibility
|
|
36
|
+
export type {
|
|
37
|
+
Project,
|
|
38
|
+
OrganizationProject,
|
|
39
|
+
Organization,
|
|
40
|
+
SpaceQuery,
|
|
41
|
+
ChartAsCodeListResults,
|
|
42
|
+
ChartAsCodeUpsertResults,
|
|
43
|
+
UpsertChartAsCodeBody,
|
|
44
|
+
DashboardBasicDetailsWithTileTypes,
|
|
45
|
+
SpaceSummary,
|
|
46
|
+
Space,
|
|
47
|
+
CreateSpace,
|
|
48
|
+
UpdateSpace,
|
|
49
|
+
AddSpaceUserAccess,
|
|
50
|
+
AddSpaceGroupAccess,
|
|
51
|
+
SpaceMemberRole,
|
|
52
|
+
ProjectMemberProfile,
|
|
53
|
+
ProjectMemberRole,
|
|
54
|
+
CreateProjectMember,
|
|
55
|
+
UpdateProjectMember,
|
|
56
|
+
ProjectGroupAccess,
|
|
57
|
+
CreateProjectGroupAccessBody,
|
|
58
|
+
UpdateProjectGroupAccess,
|
|
59
|
+
MetricQueryRequest,
|
|
60
|
+
CompileQueryRequest,
|
|
61
|
+
ExecuteAsyncMetricQueryRequestParams,
|
|
62
|
+
ExecuteAsyncSqlQueryRequestParams,
|
|
63
|
+
ExecuteAsyncSavedChartRequestParams,
|
|
64
|
+
ExecuteAsyncDashboardChartRequestParams,
|
|
65
|
+
ExecuteAsyncUnderlyingDataRequestParams,
|
|
66
|
+
RunQueryResults,
|
|
67
|
+
CompiledQueryResults,
|
|
68
|
+
ExecuteAsyncMetricQueryResults,
|
|
69
|
+
ExecuteAsyncDashboardChartResults,
|
|
70
|
+
ExecuteAsyncSqlQueryResults,
|
|
71
|
+
AiAgentSummary,
|
|
72
|
+
AiAgentAdminSortField,
|
|
73
|
+
AiAgentsAdminThreadsResult,
|
|
74
|
+
GetAiOrganizationSettingsResult,
|
|
75
|
+
UpdateAiOrganizationSettings,
|
|
76
|
+
UpdateAiOrganizationSettingsResult,
|
|
77
|
+
GetAdminThreadsParams,
|
|
78
|
+
ApiExploresResults,
|
|
79
|
+
ApiExploreResults,
|
|
80
|
+
} from './v1/lightdash-api';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Extracted from OpenAPI specification for better maintainability.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { components } from '
|
|
6
|
+
import type { components } from '../generated/openapi-types';
|
|
7
7
|
|
|
8
8
|
export namespace AiAgents {
|
|
9
9
|
/** Summary of an AI agent (admin list). */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Extracted from OpenAPI specification for better maintainability.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { components } from '
|
|
6
|
+
import type { components } from '../generated/openapi-types';
|
|
7
7
|
|
|
8
8
|
export namespace Charts {
|
|
9
9
|
/** Space query (chart listing item). */
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Extracted from OpenAPI specification for better maintainability.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { components } from '
|
|
6
|
+
import type { components } from '../generated/openapi-types';
|
|
7
7
|
|
|
8
8
|
export namespace Dashboards {
|
|
9
9
|
/** Dashboard basic details with tile types. */
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
* Explores domain models (list and get response types from the Lightdash v1 API).
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import type { components } from '
|
|
5
|
+
import type { components } from '../generated/openapi-types';
|
|
6
6
|
|
|
7
7
|
export namespace Explores {
|
|
8
8
|
/** List explores response (array of summary explore). */
|
|
9
9
|
export type ApiExploresResults = components['schemas']['ApiExploresResults'];
|
|
10
10
|
/** Get single explore response (full explore). */
|
|
11
11
|
export type ApiExploreResults = components['schemas']['ApiExploreResults'];
|
|
12
|
+
/** Compiled table within an explore. */
|
|
13
|
+
export type CompiledTable = components['schemas']['CompiledTable'];
|
|
12
14
|
}
|
package/src/types/v1/index.ts
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
* Domain files remain at types/*.ts; see ADR-0008 (file layout follow-up).
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { Projects as P } from '
|
|
7
|
-
import type { Organizations as O } from '
|
|
8
|
-
import type { Queries as Q } from '
|
|
9
|
-
import type { Charts as C } from '
|
|
10
|
-
import type { Dashboards as D } from '
|
|
11
|
-
import type { Spaces as S } from '
|
|
12
|
-
import type { SpaceAccess as SA } from '
|
|
13
|
-
import type { ProjectAccess as PA } from '
|
|
14
|
-
import type { Users as U } from '
|
|
15
|
-
import type { Groups as G } from '
|
|
16
|
-
import type { AiAgents as A } from '
|
|
6
|
+
import type { Projects as P } from './projects';
|
|
7
|
+
import type { Organizations as O } from './organizations';
|
|
8
|
+
import type { Queries as Q } from './queries';
|
|
9
|
+
import type { Charts as C } from './charts';
|
|
10
|
+
import type { Dashboards as D } from './dashboards';
|
|
11
|
+
import type { Spaces as S } from './spaces';
|
|
12
|
+
import type { SpaceAccess as SA } from './space-access';
|
|
13
|
+
import type { ProjectAccess as PA } from './project-access';
|
|
14
|
+
import type { Users as U } from './users';
|
|
15
|
+
import type { Groups as G } from './groups';
|
|
16
|
+
import type { AiAgents as A } from './ai-agents';
|
|
17
17
|
|
|
18
18
|
export namespace V1 {
|
|
19
19
|
export namespace Projects {
|