@dremio/js-sdk 0.20.0 → 0.22.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 (60) hide show
  1. package/dist/cloud/Dremio.d.ts +42 -0
  2. package/dist/cloud/Dremio.js +63 -0
  3. package/dist/cloud/Dremio.js.map +1 -0
  4. package/dist/cloud/arctic/ArcticCatalog.d.ts +1 -1
  5. package/dist/cloud/arctic/ArcticCatalog.js +2 -4
  6. package/dist/cloud/arctic/ArcticCatalog.js.map +1 -1
  7. package/dist/cloud/getResourceConfig.d.ts +14 -0
  8. package/dist/cloud/getResourceConfig.js +38 -0
  9. package/dist/cloud/getResourceConfig.js.map +1 -0
  10. package/dist/cloud/index.d.ts +1 -351
  11. package/dist/cloud/index.js +1 -33
  12. package/dist/cloud/index.js.map +1 -1
  13. package/dist/cloud/interfaces.d.ts +1 -0
  14. package/dist/cloud/interfaces.js +1 -0
  15. package/dist/cloud/interfaces.js.map +1 -1
  16. package/dist/cloud/organizations/organizationEntityToProperties.d.ts +1 -1
  17. package/dist/enterprise/Dremio.d.ts +38 -0
  18. package/dist/enterprise/{resources.js → Dremio.js} +34 -19
  19. package/dist/enterprise/Dremio.js.map +1 -0
  20. package/dist/enterprise/Grantee.d.ts +8 -8
  21. package/dist/enterprise/Grantee.js +12 -1
  22. package/dist/enterprise/Grantee.js.map +1 -1
  23. package/dist/enterprise/grants/Grant.d.ts +13 -0
  24. package/dist/enterprise/grants/Grant.js +29 -0
  25. package/dist/enterprise/grants/Grant.js.map +1 -0
  26. package/dist/enterprise/grants/GrantsResource.d.ts +8 -0
  27. package/dist/enterprise/grants/GrantsResource.js +26 -0
  28. package/dist/enterprise/grants/GrantsResource.js.map +1 -0
  29. package/dist/enterprise/grants/createRetrieveGrants.d.ts +5 -0
  30. package/dist/enterprise/grants/createRetrieveGrants.js +39 -0
  31. package/dist/enterprise/grants/createRetrieveGrants.js.map +1 -0
  32. package/dist/enterprise/index.d.ts +1 -28
  33. package/dist/enterprise/index.js +1 -25
  34. package/dist/enterprise/index.js.map +1 -1
  35. package/dist/enterprise/interfaces.d.ts +1 -0
  36. package/dist/enterprise/interfaces.js +1 -0
  37. package/dist/enterprise/interfaces.js.map +1 -1
  38. package/dist/enterprise/scripts/EnterpriseScript.d.ts +3 -6
  39. package/dist/enterprise/scripts/EnterpriseScript.js +4 -12
  40. package/dist/enterprise/scripts/EnterpriseScript.js.map +1 -1
  41. package/dist/enterprise/users/EnterpriseUser.d.ts +3 -2
  42. package/dist/enterprise/users/EnterpriseUser.js +5 -0
  43. package/dist/enterprise/users/EnterpriseUser.js.map +1 -1
  44. package/dist/oss/Dremio.d.ts +29 -0
  45. package/dist/oss/{resources.js → Dremio.js} +21 -8
  46. package/dist/oss/Dremio.js.map +1 -0
  47. package/dist/oss/getResourceConfig.d.ts +15 -0
  48. package/dist/oss/getResourceConfig.js +29 -0
  49. package/dist/oss/getResourceConfig.js.map +1 -0
  50. package/dist/oss/index.d.ts +1 -24
  51. package/dist/oss/index.js +1 -23
  52. package/dist/oss/index.js.map +1 -1
  53. package/package.json +1 -1
  54. package/dist/cloud/resources.d.ts +0 -352
  55. package/dist/cloud/resources.js +0 -47
  56. package/dist/cloud/resources.js.map +0 -1
  57. package/dist/enterprise/resources.d.ts +0 -21
  58. package/dist/enterprise/resources.js.map +0 -1
  59. package/dist/oss/resources.d.ts +0 -13
  60. package/dist/oss/resources.js.map +0 -1
@@ -0,0 +1,42 @@
1
+ import type { Config } from "../common/Config.ts";
2
+ import { EnterpriseCatalogResource } from "../enterprise/catalog/EnterpriseCatalogResource.js";
3
+ import { RolesResource } from "../enterprise/roles/RolesResource.js";
4
+ import { EnterpriseScriptsResource } from "../enterprise/scripts/EnterpriseScriptsResource.js";
5
+ import { SqlResource } from "../oss/sql/SqlResource.js";
6
+ import { AiResource } from "./ai/AiResource.ts";
7
+ import { ArcticResource } from "./arctic/ArcticResource.js";
8
+ import { EnginesResource } from "./engines/EnginesResource.js";
9
+ import { OrganizationsResource } from "./organizations/OrganizationsResource.js";
10
+ import { ProjectsResource } from "./projects/ProjectsResource.js";
11
+ import { CloudUsersResource } from "./users/CloudUsersResource.js";
12
+ import { JobsResource } from "../oss/jobs/JobsResource.ts";
13
+ import { OAuthApplicationsResource } from "./oauth/OAuthApplicationsResource.ts";
14
+ export declare class Dremio {
15
+ #private;
16
+ readonly ai: AiResource;
17
+ readonly arctic: (projectId: string) => ArcticResource;
18
+ readonly catalog: (projectId: string) => EnterpriseCatalogResource;
19
+ readonly engines: (projectId: string) => EnginesResource;
20
+ readonly jobs: (projectId: string) => JobsResource;
21
+ readonly oauthApplications: OAuthApplicationsResource;
22
+ readonly organizations: OrganizationsResource;
23
+ readonly projects: ProjectsResource;
24
+ readonly roles: (projectId: string) => RolesResource;
25
+ readonly scripts: (projectId: string) => EnterpriseScriptsResource;
26
+ readonly sql: (projectId: string) => SqlResource;
27
+ readonly users: (projectId: string) => CloudUsersResource;
28
+ constructor(config: Config);
29
+ get _resourceConfig(): (projectId?: string) => {
30
+ logger: {
31
+ debug: typeof console.debug;
32
+ error: typeof console.error;
33
+ info: typeof console.info;
34
+ warn: typeof console.warn;
35
+ } | undefined;
36
+ origin: string;
37
+ request: import("../common/Config.ts").RequestFn;
38
+ sonarV2Request: (path: string, init?: RequestInit) => import("ts-results-es").AsyncResult<Response, import("./index.ts").HttpError>;
39
+ sonarV3Request: (path: string, init?: RequestInit) => import("ts-results-es").AsyncResult<Response, import("./index.ts").HttpError>;
40
+ v3Request: (path: string, init?: RequestInit) => import("ts-results-es").AsyncResult<Response, import("./index.ts").HttpError>;
41
+ };
42
+ }
@@ -0,0 +1,63 @@
1
+ /*
2
+ * Copyright (C) 2024-2025 Dremio Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import moize from "moize";
17
+ import { EnterpriseCatalogResource } from "../enterprise/catalog/EnterpriseCatalogResource.js";
18
+ import { RolesResource } from "../enterprise/roles/RolesResource.js";
19
+ import { EnterpriseScriptsResource } from "../enterprise/scripts/EnterpriseScriptsResource.js";
20
+ import { SqlResource } from "../oss/sql/SqlResource.js";
21
+ import { AiResource } from "./ai/AiResource.js";
22
+ import { ArcticResource } from "./arctic/ArcticResource.js";
23
+ import { EnginesResource } from "./engines/EnginesResource.js";
24
+ import { getResourceConfig } from "./getResourceConfig.js";
25
+ import { OrganizationsResource } from "./organizations/OrganizationsResource.js";
26
+ import { ProjectsResource } from "./projects/ProjectsResource.js";
27
+ import { CloudUsersResource } from "./users/CloudUsersResource.js";
28
+ import { JobsResource } from "../oss/jobs/JobsResource.js";
29
+ import { OAuthApplicationsResource } from "./oauth/OAuthApplicationsResource.js";
30
+ export class Dremio {
31
+ ai;
32
+ arctic;
33
+ catalog;
34
+ engines;
35
+ jobs;
36
+ oauthApplications;
37
+ organizations;
38
+ projects;
39
+ roles;
40
+ scripts;
41
+ sql;
42
+ users;
43
+ #resourceConfig;
44
+ constructor(config) {
45
+ this.#resourceConfig = getResourceConfig(config);
46
+ this.ai = new AiResource(this.#resourceConfig());
47
+ this.arctic = moize.default((projectId) => new ArcticResource(this.#resourceConfig(projectId)));
48
+ this.catalog = moize.default((projectId) => new EnterpriseCatalogResource(this.#resourceConfig(projectId)));
49
+ this.engines = moize.default((projectId) => new EnginesResource(this.#resourceConfig(projectId)));
50
+ this.jobs = moize.default((projectId) => new JobsResource(this.#resourceConfig(projectId)));
51
+ this.oauthApplications = new OAuthApplicationsResource(this.#resourceConfig());
52
+ this.organizations = new OrganizationsResource(this.#resourceConfig());
53
+ this.projects = new ProjectsResource(this.#resourceConfig());
54
+ this.roles = moize.default((projectId) => new RolesResource(this.#resourceConfig(projectId)));
55
+ this.scripts = moize.default((projectId) => new EnterpriseScriptsResource(this.#resourceConfig(projectId)));
56
+ this.sql = moize.default((projectId) => new SqlResource(this.#resourceConfig(projectId)));
57
+ this.users = moize.default((projectId) => new CloudUsersResource(this.#resourceConfig(projectId)));
58
+ }
59
+ get _resourceConfig() {
60
+ return this.#resourceConfig;
61
+ }
62
+ }
63
+ //# sourceMappingURL=Dremio.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dremio.js","sourceRoot":"","sources":["../../src/cloud/Dremio.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport moize from \"moize\";\nimport type { Config } from \"../common/Config.ts\";\nimport { EnterpriseCatalogResource } from \"../enterprise/catalog/EnterpriseCatalogResource.js\";\nimport { RolesResource } from \"../enterprise/roles/RolesResource.js\";\nimport { EnterpriseScriptsResource } from \"../enterprise/scripts/EnterpriseScriptsResource.js\";\nimport { SqlResource } from \"../oss/sql/SqlResource.js\";\nimport { AiResource } from \"./ai/AiResource.ts\";\nimport { ArcticResource } from \"./arctic/ArcticResource.js\";\nimport { EnginesResource } from \"./engines/EnginesResource.js\";\nimport { getResourceConfig } from \"./getResourceConfig.ts\";\nimport { OrganizationsResource } from \"./organizations/OrganizationsResource.js\";\nimport { ProjectsResource } from \"./projects/ProjectsResource.js\";\nimport { CloudUsersResource } from \"./users/CloudUsersResource.js\";\nimport { JobsResource } from \"../oss/jobs/JobsResource.ts\";\nimport { OAuthApplicationsResource } from \"./oauth/OAuthApplicationsResource.ts\";\n\nexport class Dremio {\n readonly ai: AiResource;\n readonly arctic: (projectId: string) => ArcticResource;\n readonly catalog: (projectId: string) => EnterpriseCatalogResource;\n readonly engines: (projectId: string) => EnginesResource;\n readonly jobs: (projectId: string) => JobsResource;\n readonly oauthApplications: OAuthApplicationsResource;\n readonly organizations: OrganizationsResource;\n readonly projects: ProjectsResource;\n readonly roles: (projectId: string) => RolesResource;\n readonly scripts: (projectId: string) => EnterpriseScriptsResource;\n readonly sql: (projectId: string) => SqlResource;\n readonly users: (projectId: string) => CloudUsersResource;\n readonly #resourceConfig: ReturnType<typeof getResourceConfig>;\n\n constructor(config: Config) {\n this.#resourceConfig = getResourceConfig(config);\n this.ai = new AiResource(this.#resourceConfig());\n this.arctic = moize.default(\n (projectId: string) => new ArcticResource(this.#resourceConfig(projectId)),\n );\n this.catalog = moize.default(\n (projectId: string) => new EnterpriseCatalogResource(this.#resourceConfig(projectId)),\n );\n this.engines = moize.default(\n (projectId: string) => new EnginesResource(this.#resourceConfig(projectId)),\n );\n this.jobs = moize.default(\n (projectId: string) => new JobsResource(this.#resourceConfig(projectId)),\n );\n this.oauthApplications = new OAuthApplicationsResource(this.#resourceConfig());\n this.organizations = new OrganizationsResource(this.#resourceConfig());\n this.projects = new ProjectsResource(this.#resourceConfig());\n this.roles = moize.default(\n (projectId: string) => new RolesResource(this.#resourceConfig(projectId)),\n );\n this.scripts = moize.default(\n (projectId: string) => new EnterpriseScriptsResource(this.#resourceConfig(projectId)),\n );\n this.sql = moize.default(\n (projectId: string) => new SqlResource(this.#resourceConfig(projectId)),\n );\n this.users = moize.default(\n (projectId: string) => new CloudUsersResource(this.#resourceConfig(projectId)),\n );\n }\n\n get _resourceConfig() {\n return this.#resourceConfig;\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { UserGrantee } from "../../enterprise/Grantee.ts";
1
+ import { UserGrantee } from "../../enterprise/Grantee.js";
2
2
  export declare class ArcticCatalog implements ArcticCatalogProperties {
3
3
  readonly createdAt: ArcticCatalogProperties["createdAt"];
4
4
  readonly createdBy: ArcticCatalogProperties["createdBy"];
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ import { UserGrantee } from "../../enterprise/Grantee.js";
16
17
  export class ArcticCatalog {
17
18
  createdAt;
18
19
  createdBy;
@@ -38,9 +39,6 @@ export const arcticCatalogEntityToProperties = (entity) => ({
38
39
  modifiedAt: new Date(entity.modifiedAt),
39
40
  modifiedBy: entity.modifiedBy,
40
41
  name: entity.name,
41
- owner: {
42
- id: entity.ownerId,
43
- type: "USER",
44
- },
42
+ owner: new UserGrantee(entity.ownerId),
45
43
  });
46
44
  //# sourceMappingURL=ArcticCatalog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArcticCatalog.js","sourceRoot":"","sources":["../../../src/cloud/arctic/ArcticCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,OAAO,aAAa;IACf,SAAS,CAAuC;IAChD,SAAS,CAAuC;IAChD,EAAE,CAAgC;IAClC,UAAU,CAAwC;IAClD,UAAU,CAAwC;IAClD,IAAI,CAAkC;IACtC,KAAK,CAAmC;IAEjD,YAAY,UAAmC;QAC7C,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;IAChC,CAAC;CACF;AAiBD,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,MAA2B,EAAE,EAAE,CAAC,CAAC;IAC/E,SAAS,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC,SAAS;IAC3B,EAAE,EAAE,MAAM,CAAC,EAAE;IACb,UAAU,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;IACvC,UAAU,EAAE,MAAM,CAAC,UAAU;IAC7B,IAAI,EAAE,MAAM,CAAC,IAAI;IACjB,KAAK,EAAE;QACL,EAAE,EAAE,MAAM,CAAC,OAAO;QAClB,IAAI,EAAE,MAAM;KACwB;CACvC,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { UserGrantee } from \"../../enterprise/Grantee.ts\";\n\nexport class ArcticCatalog implements ArcticCatalogProperties {\n readonly createdAt: ArcticCatalogProperties[\"createdAt\"];\n readonly createdBy: ArcticCatalogProperties[\"createdBy\"];\n readonly id: ArcticCatalogProperties[\"id\"];\n readonly modifiedAt: ArcticCatalogProperties[\"modifiedAt\"];\n readonly modifiedBy: ArcticCatalogProperties[\"modifiedBy\"];\n readonly name: ArcticCatalogProperties[\"name\"];\n readonly owner: ArcticCatalogProperties[\"owner\"];\n\n constructor(properties: ArcticCatalogProperties) {\n this.createdAt = properties.createdAt;\n this.createdBy = properties.createdBy;\n this.id = properties.id;\n this.modifiedAt = properties.modifiedAt;\n this.modifiedBy = properties.modifiedBy;\n this.name = properties.name;\n this.owner = properties.owner;\n }\n}\n\nexport type ArcticCatalogEntity = {\n id: string;\n name: string;\n ownerId: string;\n ownerName: string;\n createdBy: string;\n modifiedBy: string;\n createdAt: string;\n modifiedAt: string;\n state: \"ACTIVE\" | \"INACTIVE\";\n nessieEndpoint: string;\n};\n\ntype ArcticCatalogProperties = ReturnType<typeof arcticCatalogEntityToProperties>;\n\nexport const arcticCatalogEntityToProperties = (entity: ArcticCatalogEntity) => ({\n createdAt: new Date(entity.createdAt),\n createdBy: entity.createdBy,\n id: entity.id,\n modifiedAt: new Date(entity.modifiedAt),\n modifiedBy: entity.modifiedBy,\n name: entity.name,\n owner: {\n id: entity.ownerId,\n type: \"USER\",\n } satisfies UserGrantee as UserGrantee,\n});\n"]}
1
+ {"version":3,"file":"ArcticCatalog.js","sourceRoot":"","sources":["../../../src/cloud/arctic/ArcticCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,OAAO,aAAa;IACf,SAAS,CAAuC;IAChD,SAAS,CAAuC;IAChD,EAAE,CAAgC;IAClC,UAAU,CAAwC;IAClD,UAAU,CAAwC;IAClD,IAAI,CAAkC;IACtC,KAAK,CAAmC;IAEjD,YAAY,UAAmC;QAC7C,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;IAChC,CAAC;CACF;AAiBD,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,MAA2B,EAAE,EAAE,CAAC,CAAC;IAC/E,SAAS,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IACrC,SAAS,EAAE,MAAM,CAAC,SAAS;IAC3B,EAAE,EAAE,MAAM,CAAC,EAAE;IACb,UAAU,EAAE,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;IACvC,UAAU,EAAE,MAAM,CAAC,UAAU;IAC7B,IAAI,EAAE,MAAM,CAAC,IAAI;IACjB,KAAK,EAAE,IAAI,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC;CACvC,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { UserGrantee } from \"../../enterprise/Grantee.js\";\n\nexport class ArcticCatalog implements ArcticCatalogProperties {\n readonly createdAt: ArcticCatalogProperties[\"createdAt\"];\n readonly createdBy: ArcticCatalogProperties[\"createdBy\"];\n readonly id: ArcticCatalogProperties[\"id\"];\n readonly modifiedAt: ArcticCatalogProperties[\"modifiedAt\"];\n readonly modifiedBy: ArcticCatalogProperties[\"modifiedBy\"];\n readonly name: ArcticCatalogProperties[\"name\"];\n readonly owner: ArcticCatalogProperties[\"owner\"];\n\n constructor(properties: ArcticCatalogProperties) {\n this.createdAt = properties.createdAt;\n this.createdBy = properties.createdBy;\n this.id = properties.id;\n this.modifiedAt = properties.modifiedAt;\n this.modifiedBy = properties.modifiedBy;\n this.name = properties.name;\n this.owner = properties.owner;\n }\n}\n\nexport type ArcticCatalogEntity = {\n id: string;\n name: string;\n ownerId: string;\n ownerName: string;\n createdBy: string;\n modifiedBy: string;\n createdAt: string;\n modifiedAt: string;\n state: \"ACTIVE\" | \"INACTIVE\";\n nessieEndpoint: string;\n};\n\ntype ArcticCatalogProperties = ReturnType<typeof arcticCatalogEntityToProperties>;\n\nexport const arcticCatalogEntityToProperties = (entity: ArcticCatalogEntity) => ({\n createdAt: new Date(entity.createdAt),\n createdBy: entity.createdBy,\n id: entity.id,\n modifiedAt: new Date(entity.modifiedAt),\n modifiedBy: entity.modifiedBy,\n name: entity.name,\n owner: new UserGrantee(entity.ownerId),\n});\n"]}
@@ -0,0 +1,14 @@
1
+ import type { Config } from "../common/Config.ts";
2
+ export declare const getResourceConfig: (config: Config) => (projectId?: string) => {
3
+ logger: {
4
+ debug: typeof console.debug;
5
+ error: typeof console.error;
6
+ info: typeof console.info;
7
+ warn: typeof console.warn;
8
+ } | undefined;
9
+ origin: string;
10
+ request: import("../common/Config.ts").RequestFn;
11
+ sonarV2Request: (path: string, init?: RequestInit) => import("ts-results-es").AsyncResult<Response, import("./index.ts").HttpError>;
12
+ sonarV3Request: (path: string, init?: RequestInit) => import("ts-results-es").AsyncResult<Response, import("./index.ts").HttpError>;
13
+ v3Request: (path: string, init?: RequestInit) => import("ts-results-es").AsyncResult<Response, import("./index.ts").HttpError>;
14
+ };
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Copyright (C) 2024-2025 Dremio Corporation
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { createRequest } from "../common/createRequest.js";
17
+ export const getResourceConfig = (config) => (projectId) => {
18
+ const request = createRequest(config);
19
+ return {
20
+ logger: config.logger,
21
+ origin: config.origin,
22
+ request,
23
+ sonarV2Request: (path, init) => {
24
+ if (!projectId) {
25
+ throw new Error("projectId is required");
26
+ }
27
+ return request(new URL(`/ui/projects/${projectId}/${path}`, config.origin.replace("api", "app")).toString(), init);
28
+ },
29
+ sonarV3Request: (path, init) => {
30
+ if (!projectId) {
31
+ throw new Error("projectId is required");
32
+ }
33
+ return request(`/v0/projects/${projectId}/${path}`, init);
34
+ },
35
+ v3Request: (path, init) => request(`/v0/${path}`, init),
36
+ };
37
+ };
38
+ //# sourceMappingURL=getResourceConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getResourceConfig.js","sourceRoot":"","sources":["../../src/cloud/getResourceConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC,SAAkB,EAAE,EAAE;IAC1E,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACtC,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,OAAO;QACP,cAAc,EAAE,CAAC,IAAY,EAAE,IAAkB,EAAE,EAAE;YACnD,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;YAC3C,CAAC;YACD,OAAO,OAAO,CACZ,IAAI,GAAG,CACL,gBAAgB,SAAS,IAAI,IAAI,EAAE,EACnC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CACpC,CAAC,QAAQ,EAAE,EACZ,IAAI,CACL,CAAC;QACJ,CAAC;QACD,cAAc,EAAE,CAAC,IAAY,EAAE,IAAkB,EAAE,EAAE;YACnD,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;YAC3C,CAAC;YACD,OAAO,OAAO,CAAC,gBAAgB,SAAS,IAAI,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;QAC5D,CAAC;QACD,SAAS,EAAE,CAAC,IAAY,EAAE,IAAkB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,EAAE,IAAI,CAAC;KACV,CAAC;AACxE,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n Config,\n ResourceConfig,\n SonarV2Config,\n SonarV3Config,\n V3Config,\n} from \"../common/Config.ts\";\nimport { createRequest } from \"../common/createRequest.ts\";\n\nexport const getResourceConfig = (config: Config) => (projectId?: string) => {\n const request = createRequest(config);\n return {\n logger: config.logger,\n origin: config.origin,\n request,\n sonarV2Request: (path: string, init?: RequestInit) => {\n if (!projectId) {\n throw new Error(\"projectId is required\");\n }\n return request(\n new URL(\n `/ui/projects/${projectId}/${path}`,\n config.origin.replace(\"api\", \"app\"),\n ).toString(),\n init,\n );\n },\n sonarV3Request: (path: string, init?: RequestInit) => {\n if (!projectId) {\n throw new Error(\"projectId is required\");\n }\n return request(`/v0/projects/${projectId}/${path}`, init);\n },\n v3Request: (path: string, init?: RequestInit) => request(`/v0/${path}`, init),\n } satisfies ResourceConfig & SonarV2Config & SonarV3Config & V3Config;\n};\n"]}
@@ -1,354 +1,4 @@
1
- import type { Config } from "../common/Config.ts";
2
- export declare const Dremio: (config: Config) => {
3
- _request: import("../common/Config.ts").RequestFn;
4
- _sonarResourceConfig: (projectId?: string) => {
5
- logger: {
6
- debug: typeof console.debug;
7
- error: typeof console.error;
8
- info: typeof console.info;
9
- warn: typeof console.warn;
10
- } | undefined;
11
- origin: string;
12
- request: import("../common/Config.ts").RequestFn;
13
- sonarV2Request: (path: string, init?: RequestInit) => import("ts-results-es").AsyncResult<Response, import("../common/HttpError.ts").HttpError>;
14
- sonarV3Request: (path: string, init?: RequestInit) => import("ts-results-es").AsyncResult<Response, import("../common/HttpError.ts").HttpError>;
15
- v3Request: (path: string, init?: RequestInit) => import("ts-results-es").AsyncResult<Response, import("../common/HttpError.ts").HttpError>;
16
- };
17
- _sonarV2Request: (projectId: string) => (path: string, init?: RequestInit) => import("ts-results-es").AsyncResult<Response, import("../common/HttpError.ts").HttpError>;
18
- _sonarV3Request: (projectId: string) => (path: string, init?: RequestInit) => import("ts-results-es").AsyncResult<Response, import("../common/HttpError.ts").HttpError>;
19
- ai: import("./ai/AiResource.ts").AiResource;
20
- arctic: import("moize").Moized<(projectId: string) => import("./arctic/ArcticResource.ts").ArcticResource, Partial<{
21
- isDeepEqual: boolean;
22
- isPromise: boolean;
23
- isReact: boolean;
24
- isSerialized: boolean;
25
- isShallowEqual: boolean;
26
- matchesArg: import("moize").IsEqual;
27
- matchesKey: import("moize").IsMatchingKey;
28
- maxAge: number;
29
- maxArgs: number;
30
- maxSize: number;
31
- onCacheAdd: import("moize").OnCacheOperation<(projectId: string) => import("./arctic/ArcticResource.ts").ArcticResource>;
32
- onCacheChange: import("moize").OnCacheOperation<(projectId: string) => import("./arctic/ArcticResource.ts").ArcticResource>;
33
- onCacheHit: import("moize").OnCacheOperation<(projectId: string) => import("./arctic/ArcticResource.ts").ArcticResource>;
34
- onExpire: import("moize").OnExpire;
35
- profileName: string;
36
- serializer: import("moize").Serialize;
37
- transformArgs: import("moize").TransformKey;
38
- updateCacheForKey: import("moize").UpdateCacheForKey;
39
- updateExpire: boolean;
40
- }> & Partial<{
41
- isDeepEqual: boolean;
42
- isPromise: boolean;
43
- isReact: boolean;
44
- isSerialized: boolean;
45
- isShallowEqual: boolean;
46
- matchesArg: import("moize").IsEqual;
47
- matchesKey: import("moize").IsMatchingKey;
48
- maxAge: number;
49
- maxArgs: number;
50
- maxSize: number;
51
- onCacheAdd: import("moize").OnCacheOperation<import("moize").Moizeable>;
52
- onCacheChange: import("moize").OnCacheOperation<import("moize").Moizeable>;
53
- onCacheHit: import("moize").OnCacheOperation<import("moize").Moizeable>;
54
- onExpire: import("moize").OnExpire;
55
- profileName: string;
56
- serializer: import("moize").Serialize;
57
- transformArgs: import("moize").TransformKey;
58
- updateCacheForKey: import("moize").UpdateCacheForKey;
59
- updateExpire: boolean;
60
- }>>;
61
- catalog: import("moize").Moized<(projectId: string) => import("../enterprise/catalog/EnterpriseCatalogResource.ts").EnterpriseCatalogResource, Partial<{
62
- isDeepEqual: boolean;
63
- isPromise: boolean;
64
- isReact: boolean;
65
- isSerialized: boolean;
66
- isShallowEqual: boolean;
67
- matchesArg: import("moize").IsEqual;
68
- matchesKey: import("moize").IsMatchingKey;
69
- maxAge: number;
70
- maxArgs: number;
71
- maxSize: number;
72
- onCacheAdd: import("moize").OnCacheOperation<(projectId: string) => import("../enterprise/catalog/EnterpriseCatalogResource.ts").EnterpriseCatalogResource>;
73
- onCacheChange: import("moize").OnCacheOperation<(projectId: string) => import("../enterprise/catalog/EnterpriseCatalogResource.ts").EnterpriseCatalogResource>;
74
- onCacheHit: import("moize").OnCacheOperation<(projectId: string) => import("../enterprise/catalog/EnterpriseCatalogResource.ts").EnterpriseCatalogResource>;
75
- onExpire: import("moize").OnExpire;
76
- profileName: string;
77
- serializer: import("moize").Serialize;
78
- transformArgs: import("moize").TransformKey;
79
- updateCacheForKey: import("moize").UpdateCacheForKey;
80
- updateExpire: boolean;
81
- }> & Partial<{
82
- isDeepEqual: boolean;
83
- isPromise: boolean;
84
- isReact: boolean;
85
- isSerialized: boolean;
86
- isShallowEqual: boolean;
87
- matchesArg: import("moize").IsEqual;
88
- matchesKey: import("moize").IsMatchingKey;
89
- maxAge: number;
90
- maxArgs: number;
91
- maxSize: number;
92
- onCacheAdd: import("moize").OnCacheOperation<import("moize").Moizeable>;
93
- onCacheChange: import("moize").OnCacheOperation<import("moize").Moizeable>;
94
- onCacheHit: import("moize").OnCacheOperation<import("moize").Moizeable>;
95
- onExpire: import("moize").OnExpire;
96
- profileName: string;
97
- serializer: import("moize").Serialize;
98
- transformArgs: import("moize").TransformKey;
99
- updateCacheForKey: import("moize").UpdateCacheForKey;
100
- updateExpire: boolean;
101
- }>>;
102
- engines: import("moize").Moized<(projectId: string) => import("./engines/EnginesResource.ts").EnginesResource, Partial<{
103
- isDeepEqual: boolean;
104
- isPromise: boolean;
105
- isReact: boolean;
106
- isSerialized: boolean;
107
- isShallowEqual: boolean;
108
- matchesArg: import("moize").IsEqual;
109
- matchesKey: import("moize").IsMatchingKey;
110
- maxAge: number;
111
- maxArgs: number;
112
- maxSize: number;
113
- onCacheAdd: import("moize").OnCacheOperation<(projectId: string) => import("./engines/EnginesResource.ts").EnginesResource>;
114
- onCacheChange: import("moize").OnCacheOperation<(projectId: string) => import("./engines/EnginesResource.ts").EnginesResource>;
115
- onCacheHit: import("moize").OnCacheOperation<(projectId: string) => import("./engines/EnginesResource.ts").EnginesResource>;
116
- onExpire: import("moize").OnExpire;
117
- profileName: string;
118
- serializer: import("moize").Serialize;
119
- transformArgs: import("moize").TransformKey;
120
- updateCacheForKey: import("moize").UpdateCacheForKey;
121
- updateExpire: boolean;
122
- }> & Partial<{
123
- isDeepEqual: boolean;
124
- isPromise: boolean;
125
- isReact: boolean;
126
- isSerialized: boolean;
127
- isShallowEqual: boolean;
128
- matchesArg: import("moize").IsEqual;
129
- matchesKey: import("moize").IsMatchingKey;
130
- maxAge: number;
131
- maxArgs: number;
132
- maxSize: number;
133
- onCacheAdd: import("moize").OnCacheOperation<import("moize").Moizeable>;
134
- onCacheChange: import("moize").OnCacheOperation<import("moize").Moizeable>;
135
- onCacheHit: import("moize").OnCacheOperation<import("moize").Moizeable>;
136
- onExpire: import("moize").OnExpire;
137
- profileName: string;
138
- serializer: import("moize").Serialize;
139
- transformArgs: import("moize").TransformKey;
140
- updateCacheForKey: import("moize").UpdateCacheForKey;
141
- updateExpire: boolean;
142
- }>>;
143
- jobs: import("moize").Moized<(projectId: string) => import("../oss/jobs/JobsResource.ts").JobsResource, Partial<{
144
- isDeepEqual: boolean;
145
- isPromise: boolean;
146
- isReact: boolean;
147
- isSerialized: boolean;
148
- isShallowEqual: boolean;
149
- matchesArg: import("moize").IsEqual;
150
- matchesKey: import("moize").IsMatchingKey;
151
- maxAge: number;
152
- maxArgs: number;
153
- maxSize: number;
154
- onCacheAdd: import("moize").OnCacheOperation<(projectId: string) => import("../oss/jobs/JobsResource.ts").JobsResource>;
155
- onCacheChange: import("moize").OnCacheOperation<(projectId: string) => import("../oss/jobs/JobsResource.ts").JobsResource>;
156
- onCacheHit: import("moize").OnCacheOperation<(projectId: string) => import("../oss/jobs/JobsResource.ts").JobsResource>;
157
- onExpire: import("moize").OnExpire;
158
- profileName: string;
159
- serializer: import("moize").Serialize;
160
- transformArgs: import("moize").TransformKey;
161
- updateCacheForKey: import("moize").UpdateCacheForKey;
162
- updateExpire: boolean;
163
- }> & Partial<{
164
- isDeepEqual: boolean;
165
- isPromise: boolean;
166
- isReact: boolean;
167
- isSerialized: boolean;
168
- isShallowEqual: boolean;
169
- matchesArg: import("moize").IsEqual;
170
- matchesKey: import("moize").IsMatchingKey;
171
- maxAge: number;
172
- maxArgs: number;
173
- maxSize: number;
174
- onCacheAdd: import("moize").OnCacheOperation<import("moize").Moizeable>;
175
- onCacheChange: import("moize").OnCacheOperation<import("moize").Moizeable>;
176
- onCacheHit: import("moize").OnCacheOperation<import("moize").Moizeable>;
177
- onExpire: import("moize").OnExpire;
178
- profileName: string;
179
- serializer: import("moize").Serialize;
180
- transformArgs: import("moize").TransformKey;
181
- updateCacheForKey: import("moize").UpdateCacheForKey;
182
- updateExpire: boolean;
183
- }>>;
184
- oauthApplications: import("./oauth/OAuthApplicationsResource.ts").OAuthApplicationsResource;
185
- organizations: import("./organizations/OrganizationsResource.ts").OrganizationsResource;
186
- projects: import("./projects/ProjectsResource.ts").ProjectsResource;
187
- roles: import("moize").Moized<(projectId: string) => import("../enterprise/roles/RolesResource.ts").RolesResource, Partial<{
188
- isDeepEqual: boolean;
189
- isPromise: boolean;
190
- isReact: boolean;
191
- isSerialized: boolean;
192
- isShallowEqual: boolean;
193
- matchesArg: import("moize").IsEqual;
194
- matchesKey: import("moize").IsMatchingKey;
195
- maxAge: number;
196
- maxArgs: number;
197
- maxSize: number;
198
- onCacheAdd: import("moize").OnCacheOperation<(projectId: string) => import("../enterprise/roles/RolesResource.ts").RolesResource>;
199
- onCacheChange: import("moize").OnCacheOperation<(projectId: string) => import("../enterprise/roles/RolesResource.ts").RolesResource>;
200
- onCacheHit: import("moize").OnCacheOperation<(projectId: string) => import("../enterprise/roles/RolesResource.ts").RolesResource>;
201
- onExpire: import("moize").OnExpire;
202
- profileName: string;
203
- serializer: import("moize").Serialize;
204
- transformArgs: import("moize").TransformKey;
205
- updateCacheForKey: import("moize").UpdateCacheForKey;
206
- updateExpire: boolean;
207
- }> & Partial<{
208
- isDeepEqual: boolean;
209
- isPromise: boolean;
210
- isReact: boolean;
211
- isSerialized: boolean;
212
- isShallowEqual: boolean;
213
- matchesArg: import("moize").IsEqual;
214
- matchesKey: import("moize").IsMatchingKey;
215
- maxAge: number;
216
- maxArgs: number;
217
- maxSize: number;
218
- onCacheAdd: import("moize").OnCacheOperation<import("moize").Moizeable>;
219
- onCacheChange: import("moize").OnCacheOperation<import("moize").Moizeable>;
220
- onCacheHit: import("moize").OnCacheOperation<import("moize").Moizeable>;
221
- onExpire: import("moize").OnExpire;
222
- profileName: string;
223
- serializer: import("moize").Serialize;
224
- transformArgs: import("moize").TransformKey;
225
- updateCacheForKey: import("moize").UpdateCacheForKey;
226
- updateExpire: boolean;
227
- }>>;
228
- scripts: import("moize").Moized<(projectId: string) => import("../enterprise/scripts/EnterpriseScriptsResource.ts").EnterpriseScriptsResource, Partial<{
229
- isDeepEqual: boolean;
230
- isPromise: boolean;
231
- isReact: boolean;
232
- isSerialized: boolean;
233
- isShallowEqual: boolean;
234
- matchesArg: import("moize").IsEqual;
235
- matchesKey: import("moize").IsMatchingKey;
236
- maxAge: number;
237
- maxArgs: number;
238
- maxSize: number;
239
- onCacheAdd: import("moize").OnCacheOperation<(projectId: string) => import("../enterprise/scripts/EnterpriseScriptsResource.ts").EnterpriseScriptsResource>;
240
- onCacheChange: import("moize").OnCacheOperation<(projectId: string) => import("../enterprise/scripts/EnterpriseScriptsResource.ts").EnterpriseScriptsResource>;
241
- onCacheHit: import("moize").OnCacheOperation<(projectId: string) => import("../enterprise/scripts/EnterpriseScriptsResource.ts").EnterpriseScriptsResource>;
242
- onExpire: import("moize").OnExpire;
243
- profileName: string;
244
- serializer: import("moize").Serialize;
245
- transformArgs: import("moize").TransformKey;
246
- updateCacheForKey: import("moize").UpdateCacheForKey;
247
- updateExpire: boolean;
248
- }> & Partial<{
249
- isDeepEqual: boolean;
250
- isPromise: boolean;
251
- isReact: boolean;
252
- isSerialized: boolean;
253
- isShallowEqual: boolean;
254
- matchesArg: import("moize").IsEqual;
255
- matchesKey: import("moize").IsMatchingKey;
256
- maxAge: number;
257
- maxArgs: number;
258
- maxSize: number;
259
- onCacheAdd: import("moize").OnCacheOperation<import("moize").Moizeable>;
260
- onCacheChange: import("moize").OnCacheOperation<import("moize").Moizeable>;
261
- onCacheHit: import("moize").OnCacheOperation<import("moize").Moizeable>;
262
- onExpire: import("moize").OnExpire;
263
- profileName: string;
264
- serializer: import("moize").Serialize;
265
- transformArgs: import("moize").TransformKey;
266
- updateCacheForKey: import("moize").UpdateCacheForKey;
267
- updateExpire: boolean;
268
- }>>;
269
- sql: import("moize").Moized<(projectId: string) => import("../oss/sql/SqlResource.ts").SqlResource, Partial<{
270
- isDeepEqual: boolean;
271
- isPromise: boolean;
272
- isReact: boolean;
273
- isSerialized: boolean;
274
- isShallowEqual: boolean;
275
- matchesArg: import("moize").IsEqual;
276
- matchesKey: import("moize").IsMatchingKey;
277
- maxAge: number;
278
- maxArgs: number;
279
- maxSize: number;
280
- onCacheAdd: import("moize").OnCacheOperation<(projectId: string) => import("../oss/sql/SqlResource.ts").SqlResource>;
281
- onCacheChange: import("moize").OnCacheOperation<(projectId: string) => import("../oss/sql/SqlResource.ts").SqlResource>;
282
- onCacheHit: import("moize").OnCacheOperation<(projectId: string) => import("../oss/sql/SqlResource.ts").SqlResource>;
283
- onExpire: import("moize").OnExpire;
284
- profileName: string;
285
- serializer: import("moize").Serialize;
286
- transformArgs: import("moize").TransformKey;
287
- updateCacheForKey: import("moize").UpdateCacheForKey;
288
- updateExpire: boolean;
289
- }> & Partial<{
290
- isDeepEqual: boolean;
291
- isPromise: boolean;
292
- isReact: boolean;
293
- isSerialized: boolean;
294
- isShallowEqual: boolean;
295
- matchesArg: import("moize").IsEqual;
296
- matchesKey: import("moize").IsMatchingKey;
297
- maxAge: number;
298
- maxArgs: number;
299
- maxSize: number;
300
- onCacheAdd: import("moize").OnCacheOperation<import("moize").Moizeable>;
301
- onCacheChange: import("moize").OnCacheOperation<import("moize").Moizeable>;
302
- onCacheHit: import("moize").OnCacheOperation<import("moize").Moizeable>;
303
- onExpire: import("moize").OnExpire;
304
- profileName: string;
305
- serializer: import("moize").Serialize;
306
- transformArgs: import("moize").TransformKey;
307
- updateCacheForKey: import("moize").UpdateCacheForKey;
308
- updateExpire: boolean;
309
- }>>;
310
- users: import("moize").Moized<(projectId: string) => import("./users/CloudUsersResource.ts").CloudUsersResource, Partial<{
311
- isDeepEqual: boolean;
312
- isPromise: boolean;
313
- isReact: boolean;
314
- isSerialized: boolean;
315
- isShallowEqual: boolean;
316
- matchesArg: import("moize").IsEqual;
317
- matchesKey: import("moize").IsMatchingKey;
318
- maxAge: number;
319
- maxArgs: number;
320
- maxSize: number;
321
- onCacheAdd: import("moize").OnCacheOperation<(projectId: string) => import("./users/CloudUsersResource.ts").CloudUsersResource>;
322
- onCacheChange: import("moize").OnCacheOperation<(projectId: string) => import("./users/CloudUsersResource.ts").CloudUsersResource>;
323
- onCacheHit: import("moize").OnCacheOperation<(projectId: string) => import("./users/CloudUsersResource.ts").CloudUsersResource>;
324
- onExpire: import("moize").OnExpire;
325
- profileName: string;
326
- serializer: import("moize").Serialize;
327
- transformArgs: import("moize").TransformKey;
328
- updateCacheForKey: import("moize").UpdateCacheForKey;
329
- updateExpire: boolean;
330
- }> & Partial<{
331
- isDeepEqual: boolean;
332
- isPromise: boolean;
333
- isReact: boolean;
334
- isSerialized: boolean;
335
- isShallowEqual: boolean;
336
- matchesArg: import("moize").IsEqual;
337
- matchesKey: import("moize").IsMatchingKey;
338
- maxAge: number;
339
- maxArgs: number;
340
- maxSize: number;
341
- onCacheAdd: import("moize").OnCacheOperation<import("moize").Moizeable>;
342
- onCacheChange: import("moize").OnCacheOperation<import("moize").Moizeable>;
343
- onCacheHit: import("moize").OnCacheOperation<import("moize").Moizeable>;
344
- onExpire: import("moize").OnExpire;
345
- profileName: string;
346
- serializer: import("moize").Serialize;
347
- transformArgs: import("moize").TransformKey;
348
- updateCacheForKey: import("moize").UpdateCacheForKey;
349
- updateExpire: boolean;
350
- }>>;
351
- };
1
+ export * from "./Dremio.ts";
352
2
  export * from "../common/sharedExports.ts";
353
3
  export * from "./credentials/index.ts";
354
4
  export * from "./interfaces.ts";
@@ -13,39 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { createRequest } from "../common/createRequest.js";
17
- import { Resources } from "./resources.js";
18
- const getSonarResourceConfig = (config) => (projectId) => {
19
- const request = createRequest(config);
20
- return {
21
- logger: config.logger,
22
- origin: config.origin,
23
- request,
24
- sonarV2Request: (path, init) => {
25
- if (!projectId) {
26
- throw new Error("projectId is required");
27
- }
28
- return request(new URL(`/ui/projects/${projectId}/${path}`, config.origin.replace("api", "app")).toString(), init);
29
- },
30
- sonarV3Request: (path, init) => {
31
- if (!projectId) {
32
- throw new Error("projectId is required");
33
- }
34
- return request(`/v0/projects/${projectId}/${path}`, init);
35
- },
36
- v3Request: (path, init) => request(`/v0/${path}`, init),
37
- };
38
- };
39
- export const Dremio = (config) => {
40
- const sonarResourceConfig = getSonarResourceConfig(config);
41
- return {
42
- ...Resources(sonarResourceConfig),
43
- _request: createRequest(config),
44
- _sonarResourceConfig: sonarResourceConfig,
45
- _sonarV2Request: (projectId) => sonarResourceConfig(projectId).sonarV2Request,
46
- _sonarV3Request: (projectId) => sonarResourceConfig(projectId).sonarV3Request,
47
- };
48
- };
16
+ export * from "./Dremio.js";
49
17
  export * from "../common/sharedExports.js";
50
18
  export * from "./credentials/index.js";
51
19
  export * from "./interfaces.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cloud/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAQ3D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,sBAAsB,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,CAAC,SAAkB,EAAE,EAAE;IACxE,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACtC,OAAO;QACL,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,MAAM,EAAE,MAAM,CAAC,MAAM;QACrB,OAAO;QACP,cAAc,EAAE,CAAC,IAAY,EAAE,IAAkB,EAAE,EAAE;YACnD,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;YAC3C,CAAC;YACD,OAAO,OAAO,CACZ,IAAI,GAAG,CACL,gBAAgB,SAAS,IAAI,IAAI,EAAE,EACnC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CACpC,CAAC,QAAQ,EAAE,EACZ,IAAI,CACL,CAAC;QACJ,CAAC;QACD,cAAc,EAAE,CAAC,IAAY,EAAE,IAAkB,EAAE,EAAE;YACnD,IAAI,CAAC,SAAS,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;YAC3C,CAAC;YACD,OAAO,OAAO,CAAC,gBAAgB,SAAS,IAAI,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;QAC5D,CAAC;QACD,SAAS,EAAE,CAAC,IAAY,EAAE,IAAkB,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,EAAE,IAAI,CAAC;KACV,CAAC;AACxE,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,MAAc,EAAE,EAAE;IACvC,MAAM,mBAAmB,GAAG,sBAAsB,CAAC,MAAM,CAAC,CAAC;IAC3D,OAAO;QACL,GAAG,SAAS,CAAC,mBAAmB,CAAC;QACjC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC;QAC/B,oBAAoB,EAAE,mBAAmB;QACzC,eAAe,EAAE,CAAC,SAAiB,EAAE,EAAE,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,cAAc;QACrF,eAAe,EAAE,CAAC,SAAiB,EAAE,EAAE,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC,cAAc;KACtF,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createRequest } from \"../common/createRequest.ts\";\nimport type {\n Config,\n ResourceConfig,\n SonarV2Config,\n SonarV3Config,\n V3Config,\n} from \"../common/Config.ts\";\nimport { Resources } from \"./resources.ts\";\n\nconst getSonarResourceConfig = (config: Config) => (projectId?: string) => {\n const request = createRequest(config);\n return {\n logger: config.logger,\n origin: config.origin,\n request,\n sonarV2Request: (path: string, init?: RequestInit) => {\n if (!projectId) {\n throw new Error(\"projectId is required\");\n }\n return request(\n new URL(\n `/ui/projects/${projectId}/${path}`,\n config.origin.replace(\"api\", \"app\"),\n ).toString(),\n init,\n );\n },\n sonarV3Request: (path: string, init?: RequestInit) => {\n if (!projectId) {\n throw new Error(\"projectId is required\");\n }\n return request(`/v0/projects/${projectId}/${path}`, init);\n },\n v3Request: (path: string, init?: RequestInit) => request(`/v0/${path}`, init),\n } satisfies ResourceConfig & SonarV2Config & SonarV3Config & V3Config;\n};\n\nexport const Dremio = (config: Config) => {\n const sonarResourceConfig = getSonarResourceConfig(config);\n return {\n ...Resources(sonarResourceConfig),\n _request: createRequest(config),\n _sonarResourceConfig: sonarResourceConfig,\n _sonarV2Request: (projectId: string) => sonarResourceConfig(projectId).sonarV2Request,\n _sonarV3Request: (projectId: string) => sonarResourceConfig(projectId).sonarV3Request,\n };\n};\n\nexport * from \"../common/sharedExports.ts\";\nexport * from \"./credentials/index.ts\";\nexport * from \"./interfaces.ts\";\nexport * from \"./oauth/oauth.ts\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cloud/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from \"./Dremio.ts\";\nexport * from \"../common/sharedExports.ts\";\nexport * from \"./credentials/index.ts\";\nexport * from \"./interfaces.ts\";\nexport * from \"./oauth/oauth.ts\";\n"]}