@lightdash-tools/common 0.1.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/LICENSE +201 -0
- package/README.md +119 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +22 -0
- package/dist/index.test.d.ts +1 -0
- package/dist/index.test.js +9 -0
- package/dist/types/ai-agents.d.ts +38 -0
- package/dist/types/ai-agents.js +6 -0
- package/dist/types/charts.d.ts +20 -0
- package/dist/types/charts.js +6 -0
- package/dist/types/dashboards.d.ts +9 -0
- package/dist/types/dashboards.js +6 -0
- package/dist/types/explores.d.ts +10 -0
- package/dist/types/explores.js +5 -0
- package/dist/types/generated/openapi-types.d.ts +22523 -0
- package/dist/types/generated/openapi-types.js +7 -0
- package/dist/types/groups.d.ts +27 -0
- package/dist/types/groups.js +6 -0
- package/dist/types/lightdash-api.d.ts +337 -0
- package/dist/types/lightdash-api.js +9 -0
- package/dist/types/organizations.d.ts +9 -0
- package/dist/types/organizations.js +6 -0
- package/dist/types/project-access.d.ts +21 -0
- package/dist/types/project-access.js +6 -0
- package/dist/types/projects.d.ts +11 -0
- package/dist/types/projects.js +6 -0
- package/dist/types/queries.d.ts +44 -0
- package/dist/types/queries.js +6 -0
- package/dist/types/space-access.d.ts +13 -0
- package/dist/types/space-access.js +6 -0
- package/dist/types/spaces.d.ts +15 -0
- package/dist/types/spaces.js +6 -0
- package/dist/types/users.d.ts +17 -0
- package/dist/types/users.js +6 -0
- package/dist/types/v1/index.d.ts +93 -0
- package/dist/types/v1/index.js +6 -0
- package/dist/types/v2/index.d.ts +93 -0
- package/dist/types/v2/index.js +6 -0
- package/package.json +17 -0
- package/src/index.test.ts +8 -0
- package/src/index.ts +10 -0
- package/src/types/ai-agents.ts +44 -0
- package/src/types/charts.ts +28 -0
- package/src/types/dashboards.ts +12 -0
- package/src/types/explores.ts +12 -0
- package/src/types/generated/openapi-types.ts +23085 -0
- package/src/types/groups.ts +30 -0
- package/src/types/lightdash-api.ts +439 -0
- package/src/types/organizations.ts +11 -0
- package/src/types/project-access.ts +24 -0
- package/src/types/projects.ts +13 -0
- package/src/types/queries.ts +54 -0
- package/src/types/space-access.ts +15 -0
- package/src/types/spaces.ts +17 -0
- package/src/types/users.ts +22 -0
- package/src/types/v1/index.ts +105 -0
- package/src/types/v2/index.ts +105 -0
- package/tsconfig.json +13 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* V1 API type barrel. Re-exports the same surface as LightdashApi.V1.
|
|
3
|
+
* Domain files remain at types/*.ts; see ADR-0008 (file layout follow-up).
|
|
4
|
+
*/
|
|
5
|
+
|
|
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
|
+
|
|
18
|
+
export namespace V1 {
|
|
19
|
+
export namespace Projects {
|
|
20
|
+
export type Project = P.Project;
|
|
21
|
+
export type OrganizationProject = P.OrganizationProject;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export namespace Organizations {
|
|
25
|
+
export type Organization = O.Organization;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export namespace Queries {
|
|
29
|
+
export namespace Requests {
|
|
30
|
+
export type MetricQuery = Q.Requests.MetricQuery;
|
|
31
|
+
export type ExecuteAsyncMetricQuery = Q.Requests.ExecuteAsyncMetricQuery;
|
|
32
|
+
export type ExecuteAsyncSqlQuery = Q.Requests.ExecuteAsyncSqlQuery;
|
|
33
|
+
export type ExecuteAsyncSavedChart = Q.Requests.ExecuteAsyncSavedChart;
|
|
34
|
+
export type ExecuteAsyncDashboardChart = Q.Requests.ExecuteAsyncDashboardChart;
|
|
35
|
+
export type ExecuteAsyncUnderlyingData = Q.Requests.ExecuteAsyncUnderlyingData;
|
|
36
|
+
}
|
|
37
|
+
export namespace Responses {
|
|
38
|
+
export type RunQueryResults = Q.Responses.RunQueryResults;
|
|
39
|
+
export type ExecuteAsyncMetricQueryResults = Q.Responses.ExecuteAsyncMetricQueryResults;
|
|
40
|
+
export type ExecuteAsyncDashboardChartResults = Q.Responses.ExecuteAsyncDashboardChartResults;
|
|
41
|
+
export type ExecuteAsyncSqlQueryResults = Q.Responses.ExecuteAsyncSqlQueryResults;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export namespace Charts {
|
|
46
|
+
export type SpaceQuery = C.SpaceQuery;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export namespace Dashboards {
|
|
50
|
+
export type DashboardBasicDetailsWithTileTypes = D.DashboardBasicDetailsWithTileTypes;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export namespace Spaces {
|
|
54
|
+
export type SpaceSummary = S.SpaceSummary;
|
|
55
|
+
export type Space = S.Space;
|
|
56
|
+
export type CreateSpace = S.CreateSpace;
|
|
57
|
+
export type UpdateSpace = S.UpdateSpace;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export namespace SpaceAccess {
|
|
61
|
+
export type AddSpaceUserAccess = SA.AddSpaceUserAccess;
|
|
62
|
+
export type AddSpaceGroupAccess = SA.AddSpaceGroupAccess;
|
|
63
|
+
export type SpaceMemberRole = SA.SpaceMemberRole;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export namespace ProjectAccess {
|
|
67
|
+
export type ProjectMemberProfile = PA.ProjectMemberProfile;
|
|
68
|
+
export type ProjectMemberRole = PA.ProjectMemberRole;
|
|
69
|
+
export type CreateProjectMember = PA.CreateProjectMember;
|
|
70
|
+
export type UpdateProjectMember = PA.UpdateProjectMember;
|
|
71
|
+
export type ProjectGroupAccess = PA.ProjectGroupAccess;
|
|
72
|
+
export type CreateProjectGroupAccessBody = PA.CreateProjectGroupAccessBody;
|
|
73
|
+
export type UpdateProjectGroupAccess = PA.UpdateProjectGroupAccess;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export namespace Users {
|
|
77
|
+
export type OrganizationMemberProfile = U.OrganizationMemberProfile;
|
|
78
|
+
export type OrganizationMemberProfilesResult = U.OrganizationMemberProfilesResult;
|
|
79
|
+
export type ApiOrganizationMemberProfile = U.ApiOrganizationMemberProfile;
|
|
80
|
+
export type ApiOrganizationMemberProfiles = U.ApiOrganizationMemberProfiles;
|
|
81
|
+
export type OrganizationMemberProfileUpdate = U.OrganizationMemberProfileUpdate;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export namespace Groups {
|
|
85
|
+
export type Group = G.Group;
|
|
86
|
+
export type GroupWithMembers = G.GroupWithMembers;
|
|
87
|
+
export type CreateGroup = G.CreateGroup;
|
|
88
|
+
export type UpdateGroupWithMembers = G.UpdateGroupWithMembers;
|
|
89
|
+
export type GroupListResult = G.GroupListResult;
|
|
90
|
+
export type ApiGroupResponse = G.ApiGroupResponse;
|
|
91
|
+
export type ApiGroupListResponse = G.ApiGroupListResponse;
|
|
92
|
+
export type ApiCreateGroupResponse = G.ApiCreateGroupResponse;
|
|
93
|
+
export type ApiGroupMembersResponse = G.ApiGroupMembersResponse;
|
|
94
|
+
export type GroupMember = G.GroupMember;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export namespace AiAgents {
|
|
98
|
+
export type AiAgentSummary = A.AiAgentSummary;
|
|
99
|
+
export type AiAgentAdminSortField = A.AiAgentAdminSortField;
|
|
100
|
+
export type AdminThreadsResult = A.AdminThreadsResult;
|
|
101
|
+
export type GetAiOrganizationSettingsResult = A.GetAiOrganizationSettingsResult;
|
|
102
|
+
export type UpdateAiOrganizationSettings = A.UpdateAiOrganizationSettings;
|
|
103
|
+
export type UpdateAiOrganizationSettingsResult = A.UpdateAiOrganizationSettingsResult;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* V2 API type barrel. Re-exports the same surface as LightdashApi.V2.
|
|
3
|
+
* Domain files remain at types/*.ts; see ADR-0008 (file layout follow-up).
|
|
4
|
+
*/
|
|
5
|
+
|
|
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
|
+
|
|
18
|
+
export namespace V2 {
|
|
19
|
+
export namespace Projects {
|
|
20
|
+
export type Project = P.Project;
|
|
21
|
+
export type OrganizationProject = P.OrganizationProject;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export namespace Organizations {
|
|
25
|
+
export type Organization = O.Organization;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export namespace Queries {
|
|
29
|
+
export namespace Requests {
|
|
30
|
+
export type MetricQuery = Q.Requests.MetricQuery;
|
|
31
|
+
export type ExecuteAsyncMetricQuery = Q.Requests.ExecuteAsyncMetricQuery;
|
|
32
|
+
export type ExecuteAsyncSqlQuery = Q.Requests.ExecuteAsyncSqlQuery;
|
|
33
|
+
export type ExecuteAsyncSavedChart = Q.Requests.ExecuteAsyncSavedChart;
|
|
34
|
+
export type ExecuteAsyncDashboardChart = Q.Requests.ExecuteAsyncDashboardChart;
|
|
35
|
+
export type ExecuteAsyncUnderlyingData = Q.Requests.ExecuteAsyncUnderlyingData;
|
|
36
|
+
}
|
|
37
|
+
export namespace Responses {
|
|
38
|
+
export type RunQueryResults = Q.Responses.RunQueryResults;
|
|
39
|
+
export type ExecuteAsyncMetricQueryResults = Q.Responses.ExecuteAsyncMetricQueryResults;
|
|
40
|
+
export type ExecuteAsyncDashboardChartResults = Q.Responses.ExecuteAsyncDashboardChartResults;
|
|
41
|
+
export type ExecuteAsyncSqlQueryResults = Q.Responses.ExecuteAsyncSqlQueryResults;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export namespace Charts {
|
|
46
|
+
export type SpaceQuery = C.SpaceQuery;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export namespace Dashboards {
|
|
50
|
+
export type DashboardBasicDetailsWithTileTypes = D.DashboardBasicDetailsWithTileTypes;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export namespace Spaces {
|
|
54
|
+
export type SpaceSummary = S.SpaceSummary;
|
|
55
|
+
export type Space = S.Space;
|
|
56
|
+
export type CreateSpace = S.CreateSpace;
|
|
57
|
+
export type UpdateSpace = S.UpdateSpace;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export namespace SpaceAccess {
|
|
61
|
+
export type AddSpaceUserAccess = SA.AddSpaceUserAccess;
|
|
62
|
+
export type AddSpaceGroupAccess = SA.AddSpaceGroupAccess;
|
|
63
|
+
export type SpaceMemberRole = SA.SpaceMemberRole;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export namespace ProjectAccess {
|
|
67
|
+
export type ProjectMemberProfile = PA.ProjectMemberProfile;
|
|
68
|
+
export type ProjectMemberRole = PA.ProjectMemberRole;
|
|
69
|
+
export type CreateProjectMember = PA.CreateProjectMember;
|
|
70
|
+
export type UpdateProjectMember = PA.UpdateProjectMember;
|
|
71
|
+
export type ProjectGroupAccess = PA.ProjectGroupAccess;
|
|
72
|
+
export type CreateProjectGroupAccessBody = PA.CreateProjectGroupAccessBody;
|
|
73
|
+
export type UpdateProjectGroupAccess = PA.UpdateProjectGroupAccess;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export namespace Users {
|
|
77
|
+
export type OrganizationMemberProfile = U.OrganizationMemberProfile;
|
|
78
|
+
export type OrganizationMemberProfilesResult = U.OrganizationMemberProfilesResult;
|
|
79
|
+
export type ApiOrganizationMemberProfile = U.ApiOrganizationMemberProfile;
|
|
80
|
+
export type ApiOrganizationMemberProfiles = U.ApiOrganizationMemberProfiles;
|
|
81
|
+
export type OrganizationMemberProfileUpdate = U.OrganizationMemberProfileUpdate;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export namespace Groups {
|
|
85
|
+
export type Group = G.Group;
|
|
86
|
+
export type GroupWithMembers = G.GroupWithMembers;
|
|
87
|
+
export type CreateGroup = G.CreateGroup;
|
|
88
|
+
export type UpdateGroupWithMembers = G.UpdateGroupWithMembers;
|
|
89
|
+
export type GroupListResult = G.GroupListResult;
|
|
90
|
+
export type ApiGroupResponse = G.ApiGroupResponse;
|
|
91
|
+
export type ApiGroupListResponse = G.ApiGroupListResponse;
|
|
92
|
+
export type ApiCreateGroupResponse = G.ApiCreateGroupResponse;
|
|
93
|
+
export type ApiGroupMembersResponse = G.ApiGroupMembersResponse;
|
|
94
|
+
export type GroupMember = G.GroupMember;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export namespace AiAgents {
|
|
98
|
+
export type AiAgentSummary = A.AiAgentSummary;
|
|
99
|
+
export type AiAgentAdminSortField = A.AiAgentAdminSortField;
|
|
100
|
+
export type AdminThreadsResult = A.AdminThreadsResult;
|
|
101
|
+
export type GetAiOrganizationSettingsResult = A.GetAiOrganizationSettingsResult;
|
|
102
|
+
export type UpdateAiOrganizationSettings = A.UpdateAiOrganizationSettings;
|
|
103
|
+
export type UpdateAiOrganizationSettingsResult = A.UpdateAiOrganizationSettingsResult;
|
|
104
|
+
}
|
|
105
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2016",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"strict": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"forceConsistentCasingInFileNames": true
|
|
11
|
+
},
|
|
12
|
+
"include": ["src"]
|
|
13
|
+
}
|