@lightdash-tools/client 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.
Files changed (43) hide show
  1. package/README.md +14 -1
  2. package/dist/api/v1/explores.d.ts +4 -0
  3. package/dist/api/v1/explores.js +19 -0
  4. package/dist/api/v1/explores.test.js +32 -0
  5. package/dist/api/v1/metrics.d.ts +23 -0
  6. package/dist/api/v1/metrics.js +31 -0
  7. package/dist/api/v1/metrics.test.d.ts +1 -0
  8. package/dist/api/v1/metrics.test.js +43 -0
  9. package/dist/api/v1/schedulers.d.ts +25 -0
  10. package/dist/api/v1/schedulers.js +31 -0
  11. package/dist/api/v1/schedulers.test.d.ts +1 -0
  12. package/dist/api/v1/schedulers.test.js +43 -0
  13. package/dist/api/v1/tags.d.ts +11 -0
  14. package/dist/api/v1/tags.js +31 -0
  15. package/dist/api/v1/tags.test.d.ts +1 -0
  16. package/dist/api/v1/tags.test.js +41 -0
  17. package/dist/api/v1/validation.d.ts +22 -0
  18. package/dist/api/v1/validation.js +31 -0
  19. package/dist/api/v1/validation.test.d.ts +1 -0
  20. package/dist/api/v1/validation.test.js +43 -0
  21. package/dist/api/v2/content.d.ts +21 -0
  22. package/dist/api/v2/content.js +27 -0
  23. package/dist/api/v2/content.test.d.ts +1 -0
  24. package/dist/api/v2/content.test.js +35 -0
  25. package/dist/client.d.ts +30 -0
  26. package/dist/client.js +15 -0
  27. package/dist/index.d.ts +9 -0
  28. package/dist/index.js +11 -1
  29. package/package.json +2 -2
  30. package/src/api/v1/explores.test.ts +34 -0
  31. package/src/api/v1/explores.ts +20 -1
  32. package/src/api/v1/metrics.test.ts +37 -0
  33. package/src/api/v1/metrics.ts +43 -0
  34. package/src/api/v1/schedulers.test.ts +37 -0
  35. package/src/api/v1/schedulers.ts +43 -0
  36. package/src/api/v1/tags.test.ts +35 -0
  37. package/src/api/v1/tags.ts +20 -0
  38. package/src/api/v1/validation.test.ts +37 -0
  39. package/src/api/v1/validation.ts +43 -0
  40. package/src/api/v2/content.test.ts +28 -0
  41. package/src/api/v2/content.ts +30 -0
  42. package/src/client.ts +40 -0
  43. package/src/index.ts +9 -0
package/src/client.ts CHANGED
@@ -21,6 +21,11 @@ import { GroupsClient } from './api/v1/groups';
21
21
  import { AiAgentsClient } from './api/v1/ai-agents';
22
22
  import { ProjectAccessClient } from './api/v1/project-access';
23
23
  import { ExploresClient } from './api/v1/explores';
24
+ import { ValidationClient } from './api/v1/validation';
25
+ import { MetricsClient } from './api/v1/metrics';
26
+ import { SchedulersClient } from './api/v1/schedulers';
27
+ import { TagsClient } from './api/v1/tags';
28
+ import { ContentClient } from './api/v2/content';
24
29
 
25
30
  /**
26
31
  * V1 API clients namespace. Contains all v1 API clients.
@@ -37,6 +42,10 @@ export class V1ApiClients {
37
42
  readonly aiAgents: AiAgentsClient;
38
43
  readonly projectAccess: ProjectAccessClient;
39
44
  readonly explores: ExploresClient;
45
+ readonly validation: ValidationClient;
46
+ readonly metrics: MetricsClient;
47
+ readonly schedulers: SchedulersClient;
48
+ readonly tags: TagsClient;
40
49
 
41
50
  constructor(http: HttpClient) {
42
51
  this.projects = new ProjectsClient(http);
@@ -50,6 +59,10 @@ export class V1ApiClients {
50
59
  this.aiAgents = new AiAgentsClient(http);
51
60
  this.projectAccess = new ProjectAccessClient(http);
52
61
  this.explores = new ExploresClient(http);
62
+ this.validation = new ValidationClient(http);
63
+ this.metrics = new MetricsClient(http);
64
+ this.schedulers = new SchedulersClient(http);
65
+ this.tags = new TagsClient(http);
53
66
  }
54
67
  }
55
68
 
@@ -60,11 +73,13 @@ export class V2ApiClients {
60
73
  readonly query: QueryClientV2;
61
74
  readonly organizationRoles: OrganizationRolesClient;
62
75
  readonly projectRoleAssignments: ProjectRoleAssignmentsClient;
76
+ readonly content: ContentClient;
63
77
 
64
78
  constructor(http: HttpClient) {
65
79
  this.query = new QueryClientV2(http);
66
80
  this.organizationRoles = new OrganizationRolesClient(http);
67
81
  this.projectRoleAssignments = new ProjectRoleAssignmentsClient(http);
82
+ this.content = new ContentClient(http);
68
83
  }
69
84
  }
70
85
 
@@ -128,6 +143,26 @@ export class LightdashClient {
128
143
  * @deprecated Use `client.v1.explores` instead. This alias will be removed in a future major version.
129
144
  */
130
145
  readonly explores: ExploresClient;
146
+ /**
147
+ * @deprecated Use `client.v1.validation` instead. This alias will be removed in a future major version.
148
+ */
149
+ readonly validation: ValidationClient;
150
+ /**
151
+ * @deprecated Use `client.v1.metrics` instead. This alias will be removed in a future major version.
152
+ */
153
+ readonly metrics: MetricsClient;
154
+ /**
155
+ * @deprecated Use `client.v1.schedulers` instead. This alias will be removed in a future major version.
156
+ */
157
+ readonly schedulers: SchedulersClient;
158
+ /**
159
+ * @deprecated Use `client.v1.tags` instead. This alias will be removed in a future major version.
160
+ */
161
+ readonly tags: TagsClient;
162
+ /**
163
+ * @deprecated Use `client.v2.content` instead. This alias will be removed in a future major version.
164
+ */
165
+ readonly content: ContentClient;
131
166
 
132
167
  constructor(config?: PartialLightdashClientConfig) {
133
168
  const merged = mergeConfig(config);
@@ -156,6 +191,11 @@ export class LightdashClient {
156
191
  this.groups = this.v1.groups;
157
192
  this.aiAgents = this.v1.aiAgents;
158
193
  this.explores = this.v1.explores;
194
+ this.validation = this.v1.validation;
195
+ this.metrics = this.v1.metrics;
196
+ this.schedulers = this.v1.schedulers;
197
+ this.tags = this.v1.tags;
198
+ this.content = this.v2.content;
159
199
  }
160
200
 
161
201
  /**
package/src/index.ts CHANGED
@@ -5,7 +5,16 @@ export { OrganizationRolesClient } from './api/v2/organization-roles';
5
5
  export { ProjectRoleAssignmentsClient } from './api/v2/project-role-assignments';
6
6
  export { AiAgentsClient } from './api/v1/ai-agents';
7
7
  export { ProjectAccessClient } from './api/v1/project-access';
8
+ export { ValidationClient } from './api/v1/validation';
9
+ export { MetricsClient } from './api/v1/metrics';
10
+ export { SchedulersClient } from './api/v1/schedulers';
11
+ export { TagsClient } from './api/v1/tags';
12
+ export { ContentClient } from './api/v2/content';
8
13
  export type { ListMembersParams, ListAllMembersParams } from './api/v1/users';
14
+ export type { GetValidationResultsParams, ValidateProjectBody } from './api/v1/validation';
15
+ export type { ListMetricsParams } from './api/v1/metrics';
16
+ export type { ListSchedulersParams } from './api/v1/schedulers';
17
+ export type { SearchContentParams } from './api/v2/content';
9
18
  export type {
10
19
  ListGroupsParams,
11
20
  ListAllGroupsParams,