@dremio/js-sdk 0.6.0 → 0.7.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/dist/common/Config.d.ts +7 -0
- package/dist/common/Config.js.map +1 -1
- package/dist/enterprise/index.d.ts +2 -0
- package/dist/enterprise/index.js +2 -0
- package/dist/enterprise/index.js.map +1 -1
- package/dist/enterprise/resources.d.ts +2 -2
- package/dist/enterprise/resources.js.map +1 -1
- package/package.json +1 -1
package/dist/common/Config.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.js","sourceRoot":"","sources":["../../src/common/Config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG","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 { CredentialProvider } from \"./CredentialProvider.ts\";\n\nexport type RequestFn = (input: string, init?: RequestInit) => Promise<Response>;\n\nexport type Config = {\n /**\n * Custom `fetch` provider\n * @default globalThis.fetch\n */\n fetch?: RequestFn;\n\n /**\n * Dremio API base origin\n */\n origin: string;\n\n logger?: {\n debug: typeof console.debug;\n error: typeof console.error;\n info: typeof console.info;\n warn: typeof console.warn;\n };\n\n /**\n * Provides credentials to Dremio for all authenticated API requests.\n * Required unless using a custom `fetch` provider with its own credentials provision\n */\n credentials?: CredentialProvider;\n};\n\n/**\n * @hidden\n * @internal\n */\nexport type ResourceConfig = {\n logger?: Config[\"logger\"];\n origin: Config[\"origin\"];\n request: RequestFn;\n};\n\n/**\n * @hidden\n * @internal\n */\nexport type SonarV2Config = {\n sonarV2Request: RequestFn;\n};\n\n/**\n * @hidden\n * @internal\n */\nexport type SonarV3Config = {\n sonarV3Request: RequestFn;\n};\n\n/**\n * @hidden\n * @internal\n */\nexport type V3Config = {\n v3Request: RequestFn;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Config.js","sourceRoot":"","sources":["../../src/common/Config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG","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 { CredentialProvider } from \"./CredentialProvider.ts\";\n\nexport type RequestFn = (input: string, init?: RequestInit) => Promise<Response>;\n\nexport type Config = {\n /**\n * Custom `fetch` provider\n * @default globalThis.fetch\n */\n fetch?: RequestFn;\n\n /**\n * Dremio API base origin\n */\n origin: string;\n\n logger?: {\n debug: typeof console.debug;\n error: typeof console.error;\n info: typeof console.info;\n warn: typeof console.warn;\n };\n\n /**\n * Provides credentials to Dremio for all authenticated API requests.\n * Required unless using a custom `fetch` provider with its own credentials provision\n */\n credentials?: CredentialProvider;\n};\n\n/**\n * @hidden\n * @internal\n */\nexport type ResourceConfig = {\n logger?: Config[\"logger\"];\n origin: Config[\"origin\"];\n request: RequestFn;\n};\n\n/**\n * @hidden\n * @internal\n */\nexport type SonarV2Config = {\n sonarV2Request: RequestFn;\n};\n\n/**\n * @hidden\n * @internal\n */\nexport type SonarV3Config = {\n sonarV3Request: RequestFn;\n};\n\n/**\n * @hidden\n * @internal\n */\nexport type SonarV4Config = {\n sonarV4Request: RequestFn;\n};\n\n/**\n * @hidden\n * @internal\n */\nexport type V3Config = {\n v3Request: RequestFn;\n};\n"]}
|
|
@@ -13,10 +13,12 @@ export declare const Dremio: (config: Config) => {
|
|
|
13
13
|
request: import("../common/Config.ts").RequestFn;
|
|
14
14
|
sonarV2Request: (path: string, init: RequestInit | undefined) => Promise<Response>;
|
|
15
15
|
sonarV3Request: (path: string, init: RequestInit | undefined) => Promise<Response>;
|
|
16
|
+
sonarV4Request: (path: string, init: RequestInit | undefined) => Promise<Response>;
|
|
16
17
|
v3Request: (path: string, init: RequestInit | undefined) => Promise<Response>;
|
|
17
18
|
};
|
|
18
19
|
_sonarV2Request: (path: string, init: RequestInit | undefined) => Promise<Response>;
|
|
19
20
|
_sonarV3Request: (path: string, init: RequestInit | undefined) => Promise<Response>;
|
|
21
|
+
_sonarV4Request: (path: string, init: RequestInit | undefined) => Promise<Response>;
|
|
20
22
|
catalog: {
|
|
21
23
|
_catalogReferenceFromEntity: (entity: unknown) => import("./interfaces.ts").EnterpriseCatalogReference;
|
|
22
24
|
list: () => {
|
package/dist/enterprise/index.js
CHANGED
|
@@ -23,6 +23,7 @@ const getSonarResourceConfig = (config) => {
|
|
|
23
23
|
request,
|
|
24
24
|
sonarV2Request: (path, init) => request(`/apiv2/${path}`, init),
|
|
25
25
|
sonarV3Request: (path, init) => request(`/api/v3/${path}`, init),
|
|
26
|
+
sonarV4Request: (path, init) => request(`/api/v4/${path}`, init),
|
|
26
27
|
v3Request: (path, init) => request(`/api/v3/${path}`, init),
|
|
27
28
|
};
|
|
28
29
|
};
|
|
@@ -34,6 +35,7 @@ export const Dremio = (config) => {
|
|
|
34
35
|
_sonarResourceConfig: sonarResourceConfig,
|
|
35
36
|
_sonarV2Request: sonarResourceConfig.sonarV2Request,
|
|
36
37
|
_sonarV3Request: sonarResourceConfig.sonarV3Request,
|
|
38
|
+
_sonarV4Request: sonarResourceConfig.sonarV4Request,
|
|
37
39
|
};
|
|
38
40
|
};
|
|
39
41
|
export * from "../common/sharedExports.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enterprise/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enterprise/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAS3D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,sBAAsB,GAAG,CAAC,MAAc,EAAE,EAAE;IAChD,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,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,UAAU,IAAI,EAAE,EAAE,IAAI,CAAC;QAC/D,cAAc,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,IAAI,EAAE,EAAE,IAAI,CAAC;QAChE,cAAc,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,IAAI,EAAE,EAAE,IAAI,CAAC;QAChE,SAAS,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,IAAI,EAAE,EAAE,IAAI,CAAC;KACwB,CAAC;AACxF,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,mBAAmB,CAAC,OAAO;QACrC,oBAAoB,EAAE,mBAAmB;QACzC,eAAe,EAAE,mBAAmB,CAAC,cAAc;QACnD,eAAe,EAAE,mBAAmB,CAAC,cAAc;QACnD,eAAe,EAAE,mBAAmB,CAAC,cAAc;KACpD,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,SAAS,IAAI,UAAU,EAAE,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 SonarV4Config,\n V3Config,\n} from \"../common/Config.ts\";\nimport { Resources } from \"./resources.ts\";\n\nconst getSonarResourceConfig = (config: Config) => {\n const request = createRequest(config);\n return {\n logger: config.logger,\n origin: config.origin,\n request,\n sonarV2Request: (path, init) => request(`/apiv2/${path}`, init),\n sonarV3Request: (path, init) => request(`/api/v3/${path}`, init),\n sonarV4Request: (path, init) => request(`/api/v4/${path}`, init),\n v3Request: (path, init) => request(`/api/v3/${path}`, init),\n } satisfies ResourceConfig & SonarV2Config & SonarV3Config & SonarV4Config & V3Config;\n};\n\nexport const Dremio = (config: Config) => {\n const sonarResourceConfig = getSonarResourceConfig(config);\n return {\n ...Resources(sonarResourceConfig),\n _request: sonarResourceConfig.request,\n _sonarResourceConfig: sonarResourceConfig,\n _sonarV2Request: sonarResourceConfig.sonarV2Request,\n _sonarV3Request: sonarResourceConfig.sonarV3Request,\n _sonarV4Request: sonarResourceConfig.sonarV4Request,\n };\n};\n\nexport * from \"../common/sharedExports.ts\";\nexport * from \"./credentials/index.ts\";\nexport * from \"./interfaces.ts\";\nexport { Resources as _Resources };\n"]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ResourceConfig, SonarV2Config, SonarV3Config, V3Config } from "../common/Config.ts";
|
|
1
|
+
import type { ResourceConfig, SonarV2Config, SonarV3Config, SonarV4Config, V3Config } from "../common/Config.ts";
|
|
2
2
|
import { EnginesResource } from "./engines/EnginesResource.ts";
|
|
3
3
|
/**
|
|
4
4
|
* @internal
|
|
5
5
|
* @hidden
|
|
6
6
|
*/
|
|
7
|
-
export declare const Resources: (config: ResourceConfig & SonarV2Config & SonarV3Config & V3Config) => {
|
|
7
|
+
export declare const Resources: (config: ResourceConfig & SonarV2Config & SonarV3Config & SonarV4Config & V3Config) => {
|
|
8
8
|
catalog: {
|
|
9
9
|
_catalogReferenceFromEntity: (entity: unknown) => import("./interfaces.ts").EnterpriseCatalogReference;
|
|
10
10
|
list: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/enterprise/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/enterprise/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,MAAiF,EACjF,EAAE,CAAC,CAAC;IACJ,GAAG,kBAAkB,CAAC,MAAM,CAAC;IAC7B,OAAO,EAAE,yBAAyB,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,IAAI,eAAe,CAAC,MAAM,CAAC;IACpC,IAAI,EAAE,YAAY,CAAC,MAAM,CAAC;IAC1B,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC;IAC5B,OAAO,EAAE,yBAAyB,CAAC,MAAM,CAAC;IAC1C,KAAK,EAAE,uBAAuB,CAAC,MAAM,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 type {\n ResourceConfig,\n SonarV2Config,\n SonarV3Config,\n SonarV4Config,\n V3Config,\n} from \"../common/Config.ts\";\nimport { JobsResource } from \"../oss/jobs/JobsResource.ts\";\nimport { Resources as CommunityResources } from \"../oss/resources.ts\";\nimport { EnterpriseCatalogResource } from \"./catalog/EnterpriseCatalogResource.ts\";\nimport { RolesResource } from \"./roles/RolesResource.ts\";\nimport { EnterpriseScriptsResource } from \"./scripts/EnterpriseScriptsResource.ts\";\nimport { EnterpriseUsersResource } from \"./users/EnterpriseUsersResource.ts\";\nimport { EnginesResource } from \"./engines/EnginesResource.ts\";\n\n/**\n * @internal\n * @hidden\n */\nexport const Resources = (\n config: ResourceConfig & SonarV2Config & SonarV3Config & SonarV4Config & V3Config,\n) => ({\n ...CommunityResources(config),\n catalog: EnterpriseCatalogResource(config),\n engines: new EnginesResource(config),\n jobs: JobsResource(config),\n roles: RolesResource(config),\n scripts: EnterpriseScriptsResource(config),\n users: EnterpriseUsersResource(config),\n});\n"]}
|