dremiojs 1.0.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.
Files changed (45) hide show
  1. package/.eslintrc.json +14 -0
  2. package/.prettierrc +7 -0
  3. package/README.md +59 -0
  4. package/dremiodocs/dremio-cloud/cloud-api-reference.md +748 -0
  5. package/dremiodocs/dremio-cloud/dremio-cloud-about.md +225 -0
  6. package/dremiodocs/dremio-cloud/dremio-cloud-admin.md +3754 -0
  7. package/dremiodocs/dremio-cloud/dremio-cloud-bring-data.md +6098 -0
  8. package/dremiodocs/dremio-cloud/dremio-cloud-changelog.md +32 -0
  9. package/dremiodocs/dremio-cloud/dremio-cloud-developer.md +1147 -0
  10. package/dremiodocs/dremio-cloud/dremio-cloud-explore-analyze.md +2522 -0
  11. package/dremiodocs/dremio-cloud/dremio-cloud-get-started.md +300 -0
  12. package/dremiodocs/dremio-cloud/dremio-cloud-help-support.md +869 -0
  13. package/dremiodocs/dremio-cloud/dremio-cloud-manage-govern.md +800 -0
  14. package/dremiodocs/dremio-cloud/dremio-cloud-overview.md +36 -0
  15. package/dremiodocs/dremio-cloud/dremio-cloud-security.md +1844 -0
  16. package/dremiodocs/dremio-cloud/sql-docs.md +7180 -0
  17. package/dremiodocs/dremio-software/dremio-software-acceleration.md +1575 -0
  18. package/dremiodocs/dremio-software/dremio-software-admin.md +884 -0
  19. package/dremiodocs/dremio-software/dremio-software-client-applications.md +3277 -0
  20. package/dremiodocs/dremio-software/dremio-software-data-products.md +560 -0
  21. package/dremiodocs/dremio-software/dremio-software-data-sources.md +8701 -0
  22. package/dremiodocs/dremio-software/dremio-software-deploy-dremio.md +3446 -0
  23. package/dremiodocs/dremio-software/dremio-software-get-started.md +848 -0
  24. package/dremiodocs/dremio-software/dremio-software-monitoring.md +422 -0
  25. package/dremiodocs/dremio-software/dremio-software-reference.md +677 -0
  26. package/dremiodocs/dremio-software/dremio-software-security.md +2074 -0
  27. package/dremiodocs/dremio-software/dremio-software-v25-api.md +32637 -0
  28. package/dremiodocs/dremio-software/dremio-software-v26-api.md +36757 -0
  29. package/jest.config.js +10 -0
  30. package/package.json +25 -0
  31. package/src/api/catalog.ts +74 -0
  32. package/src/api/jobs.ts +105 -0
  33. package/src/api/reflection.ts +77 -0
  34. package/src/api/source.ts +61 -0
  35. package/src/api/user.ts +32 -0
  36. package/src/client/base.ts +66 -0
  37. package/src/client/cloud.ts +37 -0
  38. package/src/client/software.ts +73 -0
  39. package/src/index.ts +16 -0
  40. package/src/types/catalog.ts +31 -0
  41. package/src/types/config.ts +18 -0
  42. package/src/types/job.ts +18 -0
  43. package/src/types/reflection.ts +29 -0
  44. package/tests/integration_manual.ts +95 -0
  45. package/tsconfig.json +19 -0
package/.eslintrc.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "parser": "@typescript-eslint/parser",
3
+ "plugins": [
4
+ "@typescript-eslint"
5
+ ],
6
+ "extends": [
7
+ "eslint:recommended",
8
+ "plugin:@typescript-eslint/recommended"
9
+ ],
10
+ "rules": {
11
+ "@typescript-eslint/no-explicit-any": "off",
12
+ "@typescript-eslint/explicit-module-boundary-types": "off"
13
+ }
14
+ }
package/.prettierrc ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "semi": true,
3
+ "trailingComma": "all",
4
+ "singleQuote": true,
5
+ "printWidth": 100,
6
+ "tabWidth": 2
7
+ }
package/README.md ADDED
@@ -0,0 +1,59 @@
1
+ # dremiojs
2
+
3
+ Type-safe Node.js client for Dremio API. Supporting Dremio Cloud and Dremio Software (v2/v3).
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install dremiojs
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### Dremio Cloud
14
+
15
+ ```typescript
16
+ import { DremioCloudClient } from 'dremiojs';
17
+
18
+ const client = new DremioCloudClient({
19
+ baseUrl: 'https://api.dremio.cloud/v0',
20
+ authToken: 'YOUR_PAT',
21
+ projectId: 'YOUR_PROJECT_ID'
22
+ });
23
+
24
+ async function main() {
25
+ // List catalog
26
+ const catalog = await client.catalog.getByPath([]);
27
+ console.log(catalog.children);
28
+
29
+ // Execute SQL
30
+ const results = await client.jobs.executeQuery('SELECT * FROM sys.version');
31
+ console.log(results);
32
+ }
33
+ ```
34
+
35
+ ### Dremio Software
36
+
37
+ ```typescript
38
+ import { DremioSoftwareClient } from 'dremiojs';
39
+
40
+ const client = new DremioSoftwareClient({
41
+ baseUrl: 'http://dremio:9047/api/v3',
42
+ authToken: 'YOUR_PAT'
43
+ // OR username/password:
44
+ // username: 'dremio',
45
+ // password: 'password123'
46
+ });
47
+
48
+ async function main() {
49
+ const results = await client.jobs.executeQuery('SELECT 1');
50
+ }
51
+ ```
52
+
53
+ ## Features
54
+
55
+ - **Universal Support**: Works with both Dremio Cloud and Dremio Software.
56
+ - **Strict Typing**: Full TypeScript definitions for Catalog, Jobs, Reflections, etc.
57
+ - **SQL Helper**: Easy `executeQuery` method that handles job submission and polling.
58
+ - **Catalog Management**: Create, update, delete Spaces, Sources, Folders, and Datasets.
59
+ - **Reflections**: Manage reflections programmatically.