@dremio/js-sdk 0.11.0 → 0.12.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 (31) hide show
  1. package/dist/cloud/arctic/ArcticResource.d.ts +1 -1
  2. package/dist/cloud/arctic/ArcticResource.js +1 -1
  3. package/dist/cloud/arctic/ArcticResource.js.map +1 -1
  4. package/dist/cloud/engines/EnginesResource.d.ts +1 -1
  5. package/dist/cloud/engines/EnginesResource.js +1 -1
  6. package/dist/cloud/engines/EnginesResource.js.map +1 -1
  7. package/dist/cloud/index.d.ts +1 -0
  8. package/dist/cloud/interfaces.d.ts +2 -1
  9. package/dist/cloud/interfaces.js.map +1 -1
  10. package/dist/cloud/oauth/OAuthApplicationsResource.d.ts +1 -1
  11. package/dist/cloud/oauth/OAuthApplicationsResource.js +1 -1
  12. package/dist/cloud/oauth/OAuthApplicationsResource.js.map +1 -1
  13. package/dist/cloud/organizations/Organization.d.ts +13 -0
  14. package/dist/cloud/organizations/Organization.js +46 -0
  15. package/dist/cloud/organizations/Organization.js.map +1 -0
  16. package/dist/cloud/organizations/OrganizationsResource.d.ts +8 -0
  17. package/dist/cloud/organizations/OrganizationsResource.js +28 -0
  18. package/dist/cloud/organizations/OrganizationsResource.js.map +1 -0
  19. package/dist/cloud/organizations/organizationEntityToProperties.d.ts +34 -0
  20. package/dist/cloud/organizations/organizationEntityToProperties.js +27 -0
  21. package/dist/cloud/organizations/organizationEntityToProperties.js.map +1 -0
  22. package/dist/cloud/projects/ProjectsResource.d.ts +1 -1
  23. package/dist/cloud/projects/ProjectsResource.js +1 -1
  24. package/dist/cloud/projects/ProjectsResource.js.map +1 -1
  25. package/dist/cloud/resources.d.ts +2 -0
  26. package/dist/cloud/resources.js +2 -0
  27. package/dist/cloud/resources.js.map +1 -1
  28. package/dist/enterprise/engines/EnginesResource.d.ts +1 -1
  29. package/dist/enterprise/engines/EnginesResource.js +1 -1
  30. package/dist/enterprise/engines/EnginesResource.js.map +1 -1
  31. package/package.json +1 -1
@@ -10,7 +10,7 @@ export declare class ArcticResource {
10
10
  */
11
11
  _createFromEntity(entity: ArcticCatalogEntity): ArcticCatalog;
12
12
  list(): {
13
- data({ signal }?: SignalParam): AsyncGenerator<ArcticCatalog[], void, any>;
13
+ data({ signal }?: SignalParam): AsyncGenerator<ArcticCatalog, void, unknown>;
14
14
  };
15
15
  retrieve(id: string, { signal }?: SignalParam): Promise<import("ts-results-es").Result<ArcticCatalog, import("../index.ts").HttpError>>;
16
16
  }
@@ -33,7 +33,7 @@ export class ArcticResource {
33
33
  .map((response) => response.data.map((entity) => this._createFromEntity(entity))).promise;
34
34
  return {
35
35
  async *data({ signal } = {}) {
36
- yield* await l({ signal });
36
+ yield* (await l({ signal })).unwrap();
37
37
  },
38
38
  };
39
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ArcticResource.js","sourceRoot":"","sources":["../../../src/cloud/arctic/ArcticResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,aAAa,EACb,+BAA+B,GAEhC,MAAM,oBAAoB,CAAC;AAE5B,MAAM,OAAO,cAAc;IAChB,OAAO,CAAgB;IAEhC,YAAY,MAAqB;QAC/B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;;OAGG;IACH,iBAAiB,CAAC,MAA2B;QAC3C,OAAO,IAAI,aAAa,CAAC,+BAA+B,CAAC,MAAM,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,IAAI;QACF,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,KAAkB,EAAE,EAAE,EAAE,CACzC,IAAI,CAAC,OAAO;aACT,cAAc,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,CAAC;aAC7C,GAAG,CACF,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,IAAI,EAKN,CACL;aACA,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC9F,OAAO;YACL,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,KAAkB,EAAE;gBACtC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;YAC7B,CAAC;SACF,CAAC;IACJ,CAAC;IAED,QAAQ,CAAC,EAAU,EAAE,EAAE,MAAM,KAAkB,EAAE;QAC/C,OAAO,IAAI,CAAC,OAAO;aAChB,cAAc,CAAC,mBAAmB,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC;aACnD,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAkC,CAAC;aACxD,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IAC7D,CAAC;CACF","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 { SonarV3Config } from \"../../common/Config.ts\";\nimport type { SignalParam } from \"../../common/Params.ts\";\nimport {\n ArcticCatalog,\n arcticCatalogEntityToProperties,\n type ArcticCatalogEntity,\n} from \"./ArcticCatalog.ts\";\n\nexport class ArcticResource {\n readonly #config: SonarV3Config;\n\n constructor(config: SonarV3Config) {\n this.#config = config;\n }\n\n /**\n * @hidden\n * @internal\n */\n _createFromEntity(entity: ArcticCatalogEntity) {\n return new ArcticCatalog(arcticCatalogEntityToProperties(entity));\n }\n\n list() {\n const l = ({ signal }: SignalParam = {}) =>\n this.#config\n .sonarV3Request(\"arctic/catalogs\", { signal })\n .map(\n (res) =>\n res.json() as Promise<{\n data: ArcticCatalogEntity[];\n nextPageToken: string | null;\n previousPageToken: string | null;\n totalResults: number;\n }>,\n )\n .map((response) => response.data.map((entity) => this._createFromEntity(entity))).promise;\n return {\n async *data({ signal }: SignalParam = {}) {\n yield* await l({ signal });\n },\n };\n }\n\n retrieve(id: string, { signal }: SignalParam = {}) {\n return this.#config\n .sonarV3Request(`arctic/catalogs/${id}`, { signal })\n .map((res) => res.json() as Promise<ArcticCatalogEntity>)\n .map((entity) => this._createFromEntity(entity)).promise;\n }\n}\n"]}
1
+ {"version":3,"file":"ArcticResource.js","sourceRoot":"","sources":["../../../src/cloud/arctic/ArcticResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,aAAa,EACb,+BAA+B,GAEhC,MAAM,oBAAoB,CAAC;AAE5B,MAAM,OAAO,cAAc;IAChB,OAAO,CAAgB;IAEhC,YAAY,MAAqB;QAC/B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED;;;OAGG;IACH,iBAAiB,CAAC,MAA2B;QAC3C,OAAO,IAAI,aAAa,CAAC,+BAA+B,CAAC,MAAM,CAAC,CAAC,CAAC;IACpE,CAAC;IAED,IAAI;QACF,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,KAAkB,EAAE,EAAE,EAAE,CACzC,IAAI,CAAC,OAAO;aACT,cAAc,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,CAAC;aAC7C,GAAG,CACF,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,IAAI,EAKN,CACL;aACA,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QAC9F,OAAO;YACL,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,KAAkB,EAAE;gBACtC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;YACxC,CAAC;SACF,CAAC;IACJ,CAAC;IAED,QAAQ,CAAC,EAAU,EAAE,EAAE,MAAM,KAAkB,EAAE;QAC/C,OAAO,IAAI,CAAC,OAAO;aAChB,cAAc,CAAC,mBAAmB,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC;aACnD,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAkC,CAAC;aACxD,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IAC7D,CAAC;CACF","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 { SonarV3Config } from \"../../common/Config.ts\";\nimport type { SignalParam } from \"../../common/Params.ts\";\nimport {\n ArcticCatalog,\n arcticCatalogEntityToProperties,\n type ArcticCatalogEntity,\n} from \"./ArcticCatalog.ts\";\n\nexport class ArcticResource {\n readonly #config: SonarV3Config;\n\n constructor(config: SonarV3Config) {\n this.#config = config;\n }\n\n /**\n * @hidden\n * @internal\n */\n _createFromEntity(entity: ArcticCatalogEntity) {\n return new ArcticCatalog(arcticCatalogEntityToProperties(entity));\n }\n\n list() {\n const l = ({ signal }: SignalParam = {}) =>\n this.#config\n .sonarV3Request(\"arctic/catalogs\", { signal })\n .map(\n (res) =>\n res.json() as Promise<{\n data: ArcticCatalogEntity[];\n nextPageToken: string | null;\n previousPageToken: string | null;\n totalResults: number;\n }>,\n )\n .map((response) => response.data.map((entity) => this._createFromEntity(entity))).promise;\n return {\n async *data({ signal }: SignalParam = {}) {\n yield* (await l({ signal })).unwrap();\n },\n };\n }\n\n retrieve(id: string, { signal }: SignalParam = {}) {\n return this.#config\n .sonarV3Request(`arctic/catalogs/${id}`, { signal })\n .map((res) => res.json() as Promise<ArcticCatalogEntity>)\n .map((entity) => this._createFromEntity(entity)).promise;\n }\n}\n"]}
@@ -6,7 +6,7 @@ export declare class EnginesResource {
6
6
  constructor(config: ResourceConfig & SonarV3Config);
7
7
  _createFromEntity(properties: unknown): Engine;
8
8
  list(): {
9
- data({ signal }?: SignalParam): AsyncGenerator<Engine[], void, any>;
9
+ data({ signal }?: SignalParam): AsyncGenerator<Engine, void, unknown>;
10
10
  };
11
11
  retrieve(id: string): Promise<import("ts-results-es").Result<Engine, import("../index.ts").HttpError>>;
12
12
  }
@@ -30,7 +30,7 @@ export class EnginesResource {
30
30
  .map((engines) => engines.map((entity) => this._createFromEntity(entity))).promise;
31
31
  return {
32
32
  async *data({ signal } = {}) {
33
- yield* await l({ signal });
33
+ yield* (await l({ signal })).unwrap();
34
34
  },
35
35
  };
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EnginesResource.js","sourceRoot":"","sources":["../../../src/cloud/engines/EnginesResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAGtD,MAAM,OAAO,eAAe;IACjB,OAAO,CAAiC;IAEjD,YAAY,MAAsC;QAChD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,iBAAiB,CAAC,UAAmB;QACnC,OAAO,IAAI,MAAM,CAAC,wBAAwB,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACxE,CAAC;IAED,IAAI;QACF,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,KAAkB,EAAE,EAAE,EAAE,CACzC,IAAI,CAAC,OAAO;aACT,cAAc,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC;aACrC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAwB,CAAC;aAC9C,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QACvF,OAAO;YACL,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,KAAkB,EAAE;gBACtC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;YAC7B,CAAC;SACF,CAAC;IACJ,CAAC;IAED,QAAQ,CAAC,EAAU;QACjB,OAAO,IAAI,CAAC,OAAO;aAChB,cAAc,CAAC,WAAW,EAAE,EAAE,CAAC;aAC/B,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;aACxB,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IAC7D,CAAC;CACF","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 { ResourceConfig, SonarV3Config } from \"../../common/Config.ts\";\nimport { Engine } from \"./Engine.ts\";\nimport { engineEntityToProperties } from \"./utils.ts\";\nimport type { SignalParam } from \"../../common/Params.ts\";\n\nexport class EnginesResource {\n readonly #config: ResourceConfig & SonarV3Config;\n\n constructor(config: ResourceConfig & SonarV3Config) {\n this.#config = config;\n }\n\n _createFromEntity(properties: unknown) {\n return new Engine(engineEntityToProperties(properties), this.#config);\n }\n\n list() {\n const l = ({ signal }: SignalParam = {}) =>\n this.#config\n .sonarV3Request(\"engines\", { signal })\n .map((res) => res.json() as Promise<unknown[]>)\n .map((engines) => engines.map((entity) => this._createFromEntity(entity))).promise;\n return {\n async *data({ signal }: SignalParam = {}) {\n yield* await l({ signal });\n },\n };\n }\n\n retrieve(id: string) {\n return this.#config\n .sonarV3Request(`engines/${id}`)\n .map((res) => res.json())\n .map((entity) => this._createFromEntity(entity)).promise;\n }\n}\n"]}
1
+ {"version":3,"file":"EnginesResource.js","sourceRoot":"","sources":["../../../src/cloud/engines/EnginesResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAGtD,MAAM,OAAO,eAAe;IACjB,OAAO,CAAiC;IAEjD,YAAY,MAAsC;QAChD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,iBAAiB,CAAC,UAAmB;QACnC,OAAO,IAAI,MAAM,CAAC,wBAAwB,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACxE,CAAC;IAED,IAAI;QACF,MAAM,CAAC,GAAG,CAAC,EAAE,MAAM,KAAkB,EAAE,EAAE,EAAE,CACzC,IAAI,CAAC,OAAO;aACT,cAAc,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC;aACrC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAwB,CAAC;aAC9C,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QACvF,OAAO;YACL,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,KAAkB,EAAE;gBACtC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;YACxC,CAAC;SACF,CAAC;IACJ,CAAC;IAED,QAAQ,CAAC,EAAU;QACjB,OAAO,IAAI,CAAC,OAAO;aAChB,cAAc,CAAC,WAAW,EAAE,EAAE,CAAC;aAC/B,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;aACxB,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IAC7D,CAAC;CACF","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 { ResourceConfig, SonarV3Config } from \"../../common/Config.ts\";\nimport { Engine } from \"./Engine.ts\";\nimport { engineEntityToProperties } from \"./utils.ts\";\nimport type { SignalParam } from \"../../common/Params.ts\";\n\nexport class EnginesResource {\n readonly #config: ResourceConfig & SonarV3Config;\n\n constructor(config: ResourceConfig & SonarV3Config) {\n this.#config = config;\n }\n\n _createFromEntity(properties: unknown) {\n return new Engine(engineEntityToProperties(properties), this.#config);\n }\n\n list() {\n const l = ({ signal }: SignalParam = {}) =>\n this.#config\n .sonarV3Request(\"engines\", { signal })\n .map((res) => res.json() as Promise<unknown[]>)\n .map((engines) => engines.map((entity) => this._createFromEntity(entity))).promise;\n return {\n async *data({ signal }: SignalParam = {}) {\n yield* (await l({ signal })).unwrap();\n },\n };\n }\n\n retrieve(id: string) {\n return this.#config\n .sonarV3Request(`engines/${id}`)\n .map((res) => res.json())\n .map((entity) => this._createFromEntity(entity)).promise;\n }\n}\n"]}
@@ -180,6 +180,7 @@ export declare const Dremio: (config: Config) => {
180
180
  updateExpire: boolean;
181
181
  }>>;
182
182
  oauthApplications: import("./oauth/OAuthApplicationsResource.ts").OAuthApplicationsResource;
183
+ organizations: import("./organizations/OrganizationsResource.ts").OrganizationsResource;
183
184
  projects: import("./projects/ProjectsResource.ts").ProjectsResource;
184
185
  roles: import("moize").Moized<(projectId: string) => import("../enterprise/roles/RolesResource.ts").RolesResource, Partial<{
185
186
  isDeepEqual: boolean;
@@ -2,6 +2,7 @@ import type { ArcticCatalog } from "./arctic/ArcticCatalog.ts";
2
2
  import type { CloudUser } from "./users/CloudUser.ts";
3
3
  import type { Engine } from "./engines/Engine.ts";
4
4
  import type { Project } from "./projects/Project.ts";
5
+ import type { Organization } from "./organizations/Organization.ts";
5
6
  import type { Job, Reflection } from "../oss/interfaces.ts";
6
7
  import type { EnterpriseScript } from "../enterprise/scripts/EnterpriseScript.ts";
7
8
  import type { ReflectionSummary } from "../enterprise/reflections/ReflectionSummary.ts";
@@ -9,6 +10,6 @@ import type { Role } from "../enterprise/roles/Role.ts";
9
10
  import type { BranchHeadVersionReference, BareCommitVersionReference, TagVersionReference, VersionReference } from "../oss/catalog/VersionReference.ts";
10
11
  import type { JobResultsSchema } from "../oss/jobs/utils/JobResultsResponse.ts";
11
12
  export type { ArcticCatalog, CloudUser, Engine, Project };
12
- export type { Job, JobResultsSchema, Reflection, EnterpriseScript, ReflectionSummary, Role, BranchHeadVersionReference, BareCommitVersionReference, TagVersionReference, VersionReference, };
13
+ export type { Job, JobResultsSchema, Reflection, EnterpriseScript, ReflectionSummary, Role, BranchHeadVersionReference, BareCommitVersionReference, TagVersionReference, VersionReference, Organization, };
13
14
  export * from "../enterprise/catalog/CatalogObjects/index.ts";
14
15
  export * from "../enterprise/catalog/CatalogReferences/index.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/cloud/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAgCH,cAAc,+CAA+C,CAAC;AAC9D,cAAc,kDAAkD,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 { ArcticCatalog } from \"./arctic/ArcticCatalog.ts\";\nimport type { CloudUser } from \"./users/CloudUser.ts\";\nimport type { Engine } from \"./engines/Engine.ts\";\nimport type { Project } from \"./projects/Project.ts\";\n\nimport type { Job, Reflection } from \"../oss/interfaces.ts\";\nimport type { EnterpriseScript } from \"../enterprise/scripts/EnterpriseScript.ts\";\nimport type { ReflectionSummary } from \"../enterprise/reflections/ReflectionSummary.ts\";\nimport type { Role } from \"../enterprise/roles/Role.ts\";\nimport type {\n BranchHeadVersionReference,\n BareCommitVersionReference,\n TagVersionReference,\n VersionReference,\n} from \"../oss/catalog/VersionReference.ts\";\nimport type { JobResultsSchema } from \"../oss/jobs/utils/JobResultsResponse.ts\";\n\nexport type { ArcticCatalog, CloudUser, Engine, Project };\nexport type {\n Job,\n JobResultsSchema,\n Reflection,\n EnterpriseScript,\n ReflectionSummary,\n Role,\n BranchHeadVersionReference,\n BareCommitVersionReference,\n TagVersionReference,\n VersionReference,\n};\nexport * from \"../enterprise/catalog/CatalogObjects/index.ts\";\nexport * from \"../enterprise/catalog/CatalogReferences/index.ts\";\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/cloud/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiCH,cAAc,+CAA+C,CAAC;AAC9D,cAAc,kDAAkD,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 { ArcticCatalog } from \"./arctic/ArcticCatalog.ts\";\nimport type { CloudUser } from \"./users/CloudUser.ts\";\nimport type { Engine } from \"./engines/Engine.ts\";\nimport type { Project } from \"./projects/Project.ts\";\nimport type { Organization } from \"./organizations/Organization.ts\";\nimport type { Job, Reflection } from \"../oss/interfaces.ts\";\nimport type { EnterpriseScript } from \"../enterprise/scripts/EnterpriseScript.ts\";\nimport type { ReflectionSummary } from \"../enterprise/reflections/ReflectionSummary.ts\";\nimport type { Role } from \"../enterprise/roles/Role.ts\";\nimport type {\n BranchHeadVersionReference,\n BareCommitVersionReference,\n TagVersionReference,\n VersionReference,\n} from \"../oss/catalog/VersionReference.ts\";\nimport type { JobResultsSchema } from \"../oss/jobs/utils/JobResultsResponse.ts\";\n\nexport type { ArcticCatalog, CloudUser, Engine, Project };\nexport type {\n Job,\n JobResultsSchema,\n Reflection,\n EnterpriseScript,\n ReflectionSummary,\n Role,\n BranchHeadVersionReference,\n BareCommitVersionReference,\n TagVersionReference,\n VersionReference,\n Organization,\n};\nexport * from \"../enterprise/catalog/CatalogObjects/index.ts\";\nexport * from \"../enterprise/catalog/CatalogReferences/index.ts\";\n"]}
@@ -10,7 +10,7 @@ export declare class OAuthApplicationsResource {
10
10
  type: OAuthApplicationDetails["type"];
11
11
  }): Promise<import("ts-results-es").Result<string, import("../index.ts").HttpError>>;
12
12
  list(): {
13
- data({ signal }?: SignalParam): AsyncGenerator<OAuthApplication[], void, any>;
13
+ data({ signal }?: SignalParam): AsyncGenerator<OAuthApplication, void, unknown>;
14
14
  };
15
15
  retrieve(id: string, { signal }?: SignalParam): Promise<import("ts-results-es").Result<OAuthApplicationDetails, import("../index.ts").HttpError>>;
16
16
  }
@@ -48,7 +48,7 @@ export class OAuthApplicationsResource {
48
48
  .map((oauthApplications) => oauthApplications.map((properties) => new OAuthApplication(properties, this.#config))).promise;
49
49
  return {
50
50
  async *data({ signal } = {}) {
51
- yield* await l({ signal });
51
+ yield* (await l({ signal })).unwrap();
52
52
  },
53
53
  };
54
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"OAuthApplicationsResource.js","sourceRoot":"","sources":["../../../src/cloud/oauth/OAuthApplicationsResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EACL,gBAAgB,EAChB,uBAAuB,GAExB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,OAAO,yBAAyB;IAC3B,OAAO,CAAiB;IAEjC,YAAY,MAAsB;QAChC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,MAAM,CAAC,MAIN;QACC,O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AO;YACL,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,KAAkB,EAAE;gBACtC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;YAC7B,CAAC;SACF,CAAC;IACJ,CAAC;IAED,QAAQ,CAAC,EAAU,EAAE,EAAE,MAAM,KAAkB,EAAE;QAC/C,OAAO,IAAI,CAAC,OAAO;aAChB,OAAO,CACN,IAAI,GAAG,CACL,0BAA0B,EAAE,EAAE,EAC9B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAC1C,CAAC,QAAQ,EAAE,EACZ;YACE,OAAO,EAAE;gBACP,MAAM,EAAE,kBAAkB;aAC3B;YACD,MAAM;SACP,CACF;aACA,GAAG,CACF,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,IAAI,EAMP,CACJ;aACA,GAAG,CACF,CAAC,MAAM,EAAE,EAAE,CACT,IAAI,uBAAuB,CACzB;YACE,GAAG,MAAM;YACT,YAAY,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC;SAC3C,EACD,IAAI,CAAC,OAAO,CACb,CACJ,CAAC,OAAO,CAAC;IACd,CAAC;CACF","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 { ResourceConfig } from \"../../common/Config.ts\";\nimport type { SignalParam } from \"../../common/Params.ts\";\nimport {\n OAuthApplication,\n OAuthApplicationDetails,\n type OAuthApplicationProperties,\n} from \"./OAuthApplication.ts\";\n\nexport class OAuthApplicationsResource {\n readonly #config: ResourceConfig;\n\n constructor(config: ResourceConfig) {\n this.#config = config;\n }\n\n create(params: {\n name: OAuthApplicationDetails[\"name\"];\n redirectUris: OAuthApplicationDetails[\"redirectUris\"];\n type: OAuthApplicationDetails[\"type\"];\n }) {\n return this.#config\n .request(\n new URL(\"/ui/oauth-applications\", this.#config.origin.replace(\"api\", \"app\")).toString(),\n {\n body: JSON.stringify({\n ...params,\n redirectUris: Array.from(params.redirectUris),\n }),\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n keepalive: true,\n method: \"POST\",\n },\n )\n .map((res) => res.json() as Promise<{ id: string }>)\n .map((result) => result.id).promise;\n }\n\n list() {\n const l = ({ signal }: SignalParam = {}) =>\n this.#config\n .request(\n new URL(\"/ui/oauth-applications\", this.#config.origin.replace(\"api\", \"app\")).toString(),\n {\n headers: {\n Accept: \"application/json\",\n },\n signal,\n },\n )\n .map((res) => res.json() as Promise<OAuthApplicationProperties[]>)\n .map((oauthApplications) =>\n oauthApplications.map((properties) => new OAuthApplication(properties, this.#config)),\n ).promise;\n return {\n async *data({ signal }: SignalParam = {}) {\n yield* await l({ signal });\n },\n };\n }\n\n retrieve(id: string, { signal }: SignalParam = {}) {\n return this.#config\n .request(\n new URL(\n `/ui/oauth-applications/${id}`,\n this.#config.origin.replace(\"api\", \"app\"),\n ).toString(),\n {\n headers: {\n Accept: \"application/json\",\n },\n signal,\n },\n )\n .map(\n (res) =>\n res.json() as Promise<\n OAuthApplicationProperties & {\n clientId: string;\n redirectUris: string[];\n type: OAuthApplicationDetails[\"type\"];\n }\n >,\n )\n .map(\n (entity) =>\n new OAuthApplicationDetails(\n {\n ...entity,\n redirectUris: new Set(entity.redirectUris),\n },\n this.#config,\n ),\n ).promise;\n }\n}\n"]}
1
+ {"version":3,"file":"OAuthApplicationsResource.js","sourceRoot":"","sources":["../../../src/cloud/oauth/OAuthApplicationsResource.ts"],"names":[],"mappings":"AAAA;;;;;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C,GAAG,CAAC,IAAI,EAA2C,CAAC;aACjE,GAAG,CAAC,CAAC,iBAAiB,EAAE,EAAE,CACzB,iBAAiB,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,IAAI,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CACtF,CAAC,OAAO,CAAC;QACd,OAAO;YACL,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,KAAkB,EAAE;gBACtC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;YACxC,CAAC;SACF,CAAC;IACJ,CAAC;IAED,QAAQ,CAAC,EAAU,EAAE,EAAE,MAAM,KAAkB,EAAE;QAC/C,OAAO,IAAI,CAAC,OAAO;aAChB,OAAO,CACN,IAAI,GAAG,CACL,0BAA0B,EAAE,EAAE,EAC9B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAC1C,CAAC,QAAQ,EAAE,EACZ;YACE,OAAO,EAAE;gBACP,MAAM,EAAE,kBAAkB;aAC3B;YACD,MAAM;SACP,CACF;aACA,GAAG,CACF,CAAC,GAAG,EAAE,EAAE,CACN,GAAG,CAAC,IAAI,EAMP,CACJ;aACA,GAAG,CACF,CAAC,MAAM,EAAE,EAAE,CACT,IAAI,uBAAuB,CACzB;YACE,GAAG,MAAM;YACT,YAAY,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC;SAC3C,EACD,IAAI,CAAC,OAAO,CACb,CACJ,CAAC,OAAO,CAAC;IACd,CAAC;CACF","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 { ResourceConfig } from \"../../common/Config.ts\";\nimport type { SignalParam } from \"../../common/Params.ts\";\nimport {\n OAuthApplication,\n OAuthApplicationDetails,\n type OAuthApplicationProperties,\n} from \"./OAuthApplication.ts\";\n\nexport class OAuthApplicationsResource {\n readonly #config: ResourceConfig;\n\n constructor(config: ResourceConfig) {\n this.#config = config;\n }\n\n create(params: {\n name: OAuthApplicationDetails[\"name\"];\n redirectUris: OAuthApplicationDetails[\"redirectUris\"];\n type: OAuthApplicationDetails[\"type\"];\n }) {\n return this.#config\n .request(\n new URL(\"/ui/oauth-applications\", this.#config.origin.replace(\"api\", \"app\")).toString(),\n {\n body: JSON.stringify({\n ...params,\n redirectUris: Array.from(params.redirectUris),\n }),\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n keepalive: true,\n method: \"POST\",\n },\n )\n .map((res) => res.json() as Promise<{ id: string }>)\n .map((result) => result.id).promise;\n }\n\n list() {\n const l = ({ signal }: SignalParam = {}) =>\n this.#config\n .request(\n new URL(\"/ui/oauth-applications\", this.#config.origin.replace(\"api\", \"app\")).toString(),\n {\n headers: {\n Accept: \"application/json\",\n },\n signal,\n },\n )\n .map((res) => res.json() as Promise<OAuthApplicationProperties[]>)\n .map((oauthApplications) =>\n oauthApplications.map((properties) => new OAuthApplication(properties, this.#config)),\n ).promise;\n return {\n async *data({ signal }: SignalParam = {}) {\n yield* (await l({ signal })).unwrap();\n },\n };\n }\n\n retrieve(id: string, { signal }: SignalParam = {}) {\n return this.#config\n .request(\n new URL(\n `/ui/oauth-applications/${id}`,\n this.#config.origin.replace(\"api\", \"app\"),\n ).toString(),\n {\n headers: {\n Accept: \"application/json\",\n },\n signal,\n },\n )\n .map(\n (res) =>\n res.json() as Promise<\n OAuthApplicationProperties & {\n clientId: string;\n redirectUris: string[];\n type: OAuthApplicationDetails[\"type\"];\n }\n >,\n )\n .map(\n (entity) =>\n new OAuthApplicationDetails(\n {\n ...entity,\n redirectUris: new Set(entity.redirectUris),\n },\n this.#config,\n ),\n ).promise;\n }\n}\n"]}
@@ -0,0 +1,13 @@
1
+ import type { OrganizationProperties } from "./organizationEntityToProperties.ts";
2
+ export declare class Organization implements OrganizationProperties {
3
+ createdAt: OrganizationProperties["createdAt"];
4
+ createdBy: OrganizationProperties["createdBy"];
5
+ defaultProjectId: OrganizationProperties["defaultProjectId"];
6
+ id: OrganizationProperties["id"];
7
+ modifiedAt: OrganizationProperties["modifiedAt"];
8
+ modifiedBy: OrganizationProperties["modifiedBy"];
9
+ name: OrganizationProperties["name"];
10
+ state: OrganizationProperties["state"];
11
+ constructor(properties: OrganizationProperties);
12
+ get settled(): boolean;
13
+ }
@@ -0,0 +1,46 @@
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
+ export class Organization {
17
+ createdAt;
18
+ createdBy;
19
+ defaultProjectId;
20
+ id;
21
+ modifiedAt;
22
+ modifiedBy;
23
+ name;
24
+ state;
25
+ constructor(properties) {
26
+ this.createdAt = properties.createdAt;
27
+ this.createdBy = properties.createdBy;
28
+ this.defaultProjectId = properties.defaultProjectId;
29
+ this.id = properties.id;
30
+ this.modifiedAt = properties.modifiedAt;
31
+ this.modifiedBy = properties.modifiedBy;
32
+ this.name = properties.name;
33
+ this.state = properties.state;
34
+ }
35
+ get settled() {
36
+ switch (this.state) {
37
+ case "ACTIVE":
38
+ case "DELETED":
39
+ case "FAILED":
40
+ case "INVALID":
41
+ return true;
42
+ }
43
+ return false;
44
+ }
45
+ }
46
+ //# sourceMappingURL=Organization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Organization.js","sourceRoot":"","sources":["../../../src/cloud/organizations/Organization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,OAAO,YAAY;IACvB,SAAS,CAAsC;IAC/C,SAAS,CAAsC;IAC/C,gBAAgB,CAA6C;IAC7D,EAAE,CAA+B;IACjC,UAAU,CAAuC;IACjD,UAAU,CAAuC;IACjD,IAAI,CAAiC;IACrC,KAAK,CAAkC;IAEvC,YAAY,UAAkC;QAC5C,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC,gBAAgB,CAAC;QACpD,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;IAED,IAAI,OAAO;QACT,QAAQ,IAAI,CAAC,KAAK,EAAE,CAAC;YACnB,KAAK,QAAQ,CAAC;YACd,KAAK,SAAS,CAAC;YACf,KAAK,QAAQ,CAAC;YACd,KAAK,SAAS;gBACZ,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;CACF","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 { OrganizationProperties } from \"./organizationEntityToProperties.ts\";\n\nexport class Organization implements OrganizationProperties {\n createdAt: OrganizationProperties[\"createdAt\"];\n createdBy: OrganizationProperties[\"createdBy\"];\n defaultProjectId: OrganizationProperties[\"defaultProjectId\"];\n id: OrganizationProperties[\"id\"];\n modifiedAt: OrganizationProperties[\"modifiedAt\"];\n modifiedBy: OrganizationProperties[\"modifiedBy\"];\n name: OrganizationProperties[\"name\"];\n state: OrganizationProperties[\"state\"];\n\n constructor(properties: OrganizationProperties) {\n this.createdAt = properties.createdAt;\n this.createdBy = properties.createdBy;\n this.defaultProjectId = properties.defaultProjectId;\n this.id = properties.id;\n this.modifiedAt = properties.modifiedAt;\n this.modifiedBy = properties.modifiedBy;\n this.name = properties.name;\n this.state = properties.state;\n }\n\n get settled() {\n switch (this.state) {\n case \"ACTIVE\":\n case \"DELETED\":\n case \"FAILED\":\n case \"INVALID\":\n return true;\n }\n return false;\n }\n}\n"]}
@@ -0,0 +1,8 @@
1
+ import type { ResourceConfig, V3Config } from "../../common/Config.ts";
2
+ import { Organization } from "./Organization.ts";
3
+ import { type OrganizationEntity } from "./organizationEntityToProperties.ts";
4
+ export declare class OrganizationsResource {
5
+ #private;
6
+ constructor(config: ResourceConfig & V3Config);
7
+ _organizationFromEntity(entity: OrganizationEntity): Organization;
8
+ }
@@ -0,0 +1,28 @@
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 { Organization } from "./Organization.js";
17
+ import { organizationEntityToProperties, } from "./organizationEntityToProperties.js";
18
+ export class OrganizationsResource {
19
+ // eslint-disable-next-line no-unused-private-class-members
20
+ #config;
21
+ constructor(config) {
22
+ this.#config = config;
23
+ }
24
+ _organizationFromEntity(entity) {
25
+ return new Organization(organizationEntityToProperties(entity));
26
+ }
27
+ }
28
+ //# sourceMappingURL=OrganizationsResource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrganizationsResource.js","sourceRoot":"","sources":["../../../src/cloud/organizations/OrganizationsResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,8BAA8B,GAE/B,MAAM,qCAAqC,CAAC;AAE7C,MAAM,OAAO,qBAAqB;IAChC,2DAA2D;IAClD,OAAO,CAA4B;IAE5C,YAAY,MAAiC;QAC3C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,uBAAuB,CAAC,MAA0B;QAChD,OAAO,IAAI,YAAY,CAAC,8BAA8B,CAAC,MAAM,CAAC,CAAC,CAAC;IAClE,CAAC;CACF","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 { ResourceConfig, V3Config } from \"../../common/Config.ts\";\nimport { Organization } from \"./Organization.ts\";\nimport {\n organizationEntityToProperties,\n type OrganizationEntity,\n} from \"./organizationEntityToProperties.ts\";\n\nexport class OrganizationsResource {\n // eslint-disable-next-line no-unused-private-class-members\n readonly #config: ResourceConfig & V3Config;\n\n constructor(config: ResourceConfig & V3Config) {\n this.#config = config;\n }\n\n _organizationFromEntity(entity: OrganizationEntity) {\n return new Organization(organizationEntityToProperties(entity));\n }\n}\n"]}
@@ -0,0 +1,34 @@
1
+ import { Temporal } from "temporal-polyfill";
2
+ export declare const organizationEntityToProperties: (entity: OrganizationEntity) => {
3
+ createdAt: Temporal.Instant;
4
+ createdBy: string;
5
+ defaultProjectId: string;
6
+ id: string;
7
+ modifiedAt: Temporal.Instant;
8
+ modifiedBy: string;
9
+ name: string;
10
+ state: "ACTIVE" | "FAILED" | "INVALID" | "DELETED" | "CFT_STARTED" | "CFT_COMPLETE" | "COMMISSIONING" | "MARK_ROLLBACK" | "FIRST_CLOUD_ADDED" | "ROLLBACK_COMPLETED" | "CFT_FINISH_TIMEOUT";
11
+ };
12
+ export type OrganizationProperties = ReturnType<typeof organizationEntityToProperties>;
13
+ export type OrganizationEntity = {
14
+ auditDestinationCloudType: "AWS" | "AZURE";
15
+ auditDestinationCredentials: {
16
+ accessKeyId: string;
17
+ secretAccessKey: string;
18
+ type: "ACCESS_KEY" | "AZURE_ACTIVE_DIRECTORY" | "IAM_ROLE";
19
+ };
20
+ auditDestinationPath: string;
21
+ cloudTags: {
22
+ key: string;
23
+ value: string;
24
+ }[];
25
+ createdAt: string;
26
+ createdBy: string;
27
+ defaultProjectId: string;
28
+ id: string;
29
+ isCreatedWithCFT: boolean;
30
+ modifiedAt: string;
31
+ modifiedBy: string;
32
+ name: string;
33
+ state: "ACTIVE" | "FAILED" | "DELETED" | "INVALID" | "CFT_STARTED" | "CFT_COMPLETE" | "COMMISSIONING" | "MARK_ROLLBACK" | "FIRST_CLOUD_ADDED" | "ROLLBACK_COMPLETED" | "CFT_FINISH_TIMEOUT";
34
+ };
@@ -0,0 +1,27 @@
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 { Temporal } from "temporal-polyfill";
17
+ export const organizationEntityToProperties = (entity) => ({
18
+ createdAt: Temporal.Instant.from(entity.createdAt),
19
+ createdBy: entity.createdBy,
20
+ defaultProjectId: entity.defaultProjectId,
21
+ id: entity.id,
22
+ modifiedAt: Temporal.Instant.from(entity.modifiedAt),
23
+ modifiedBy: entity.modifiedBy,
24
+ name: entity.name,
25
+ state: entity.state,
26
+ });
27
+ //# sourceMappingURL=organizationEntityToProperties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizationEntityToProperties.js","sourceRoot":"","sources":["../../../src/cloud/organizations/organizationEntityToProperties.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,MAA0B,EAAE,EAAE,CAAC,CAAC;IAC7E,SAAS,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;IAClD,SAAS,EAAE,MAAM,CAAC,SAAS;IAC3B,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;IACzC,EAAE,EAAE,MAAM,CAAC,EAAE;IACb,UAAU,EAAE,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;IACpD,UAAU,EAAE,MAAM,CAAC,UAAU;IAC7B,IAAI,EAAE,MAAM,CAAC,IAAI;IACjB,KAAK,EAAE,MAAM,CAAC,KAAK;CACpB,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 { Temporal } from \"temporal-polyfill\";\n\nexport const organizationEntityToProperties = (entity: OrganizationEntity) => ({\n createdAt: Temporal.Instant.from(entity.createdAt),\n createdBy: entity.createdBy,\n defaultProjectId: entity.defaultProjectId,\n id: entity.id,\n modifiedAt: Temporal.Instant.from(entity.modifiedAt),\n modifiedBy: entity.modifiedBy,\n name: entity.name,\n state: entity.state,\n});\n\nexport type OrganizationProperties = ReturnType<typeof organizationEntityToProperties>;\n\nexport type OrganizationEntity = {\n auditDestinationCloudType: \"AWS\" | \"AZURE\";\n auditDestinationCredentials: {\n accessKeyId: string;\n secretAccessKey: string;\n type: \"ACCESS_KEY\" | \"AZURE_ACTIVE_DIRECTORY\" | \"IAM_ROLE\";\n };\n auditDestinationPath: string;\n cloudTags: { key: string; value: string }[];\n createdAt: string;\n createdBy: string;\n defaultProjectId: string;\n id: string;\n isCreatedWithCFT: boolean;\n modifiedAt: string;\n modifiedBy: string;\n name: string;\n state:\n | \"ACTIVE\"\n | \"FAILED\"\n | \"DELETED\"\n | \"INVALID\"\n | \"CFT_STARTED\"\n | \"CFT_COMPLETE\"\n | \"COMMISSIONING\"\n | \"MARK_ROLLBACK\"\n | \"FIRST_CLOUD_ADDED\"\n | \"ROLLBACK_COMPLETED\"\n | \"CFT_FINISH_TIMEOUT\";\n};\n"]}
@@ -8,7 +8,7 @@ export declare class ProjectsResource {
8
8
  activate(id: string): Promise<import("ts-results-es").Result<undefined, import("../index.ts").HttpError>>;
9
9
  delete(id: string): Promise<import("ts-results-es").Result<undefined, import("../index.ts").HttpError>>;
10
10
  list(): {
11
- data({ signal }?: SignalParam): AsyncGenerator<Project[], void, any>;
11
+ data({ signal }?: SignalParam): AsyncGenerator<Project, void, unknown>;
12
12
  };
13
13
  observe(id: string): import("rxjs").Observable<Project>;
14
14
  retrieve(id: string, { signal }?: SignalParam): Promise<import("ts-results-es").Result<Project, import("../index.ts").HttpError>>;
@@ -45,7 +45,7 @@ export class ProjectsResource {
45
45
  .map((projects) => projects.map((entity) => this._createFromEntity(entity))).promise;
46
46
  return {
47
47
  async *data({ signal } = {}) {
48
- yield* await l({ signal });
48
+ yield* (await l({ signal })).unwrap();
49
49
  },
50
50
  };
51
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ProjectsResource.js","sourceRoot":"","sources":["../../../src/cloud/projects/ProjectsResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE/C,MAAM,OAAO,gBAAgB;IAClB,OAAO,CAA4B;IAE5C,YAAY,MAAiC;QAC3C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,iBAAiB,CAAC,UAAmB;QACnC,OAAO,IAAI,OAAO,CAAC,yBAAyB,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC;IAClE,CAAC;IAED,QAAQ,CAAC,EAAU;QACjB,OAAO,IAAI,CAAC,OAAO;aAChB,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C,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAChE,CACF,EACD,KAAK,EAAE,CACR,CAAC;IACJ,CAAC;IAED,QAAQ,CAAC,EAAU,EAAE,EAAE,MAAM,KAAkB,EAAE;QAC/C,OAAO,IAAI,CAAC,OAAO;aAChB,SAAS,CAAC,YAAY,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC;aACvC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;aACxB,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IAC7D,CAAC;CACF","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 { ResourceConfig, V3Config } from \"../../common/Config.ts\";\nimport { Project } from \"./Project.ts\";\nimport { projectEntityToProperties } from \"./utils.ts\";\nimport type { SignalParam } from \"../../common/Params.ts\";\nimport { fromAbortable } from \"../../common/fromAbortable.ts\";\nimport { share, switchMap, timer } from \"rxjs\";\n\nexport class ProjectsResource {\n readonly #config: ResourceConfig & V3Config;\n\n constructor(config: ResourceConfig & V3Config) {\n this.#config = config;\n }\n\n _createFromEntity(properties: unknown) {\n return new Project(projectEntityToProperties(properties), this);\n }\n\n activate(id: string) {\n return this.#config\n .v3Request(`projects/${id}/activate`, {\n keepalive: true,\n method: \"PUT\",\n })\n .map(() => undefined).promise;\n }\n\n delete(id: string) {\n return this.#config\n .v3Request(`projects/${id}`, { keepalive: true, method: \"DELETE\" })\n .map(() => undefined).promise;\n }\n\n list() {\n const l = ({ signal }: SignalParam = {}) =>\n this.#config\n .v3Request(\"projects\", { signal })\n .map((res) => res.json() as Promise<unknown[]>)\n .map((projects) => projects.map((entity) => this._createFromEntity(entity))).promise;\n return {\n async *data({ signal }: SignalParam = {}) {\n yield* await l({ signal });\n },\n };\n }\n\n observe(id: string) {\n return timer(0, 5000).pipe(\n switchMap(() =>\n fromAbortable(({ signal }) =>\n this.retrieve(id, { signal }).then((result) => result.unwrap()),\n ),\n ),\n share(),\n );\n }\n\n retrieve(id: string, { signal }: SignalParam = {}) {\n return this.#config\n .v3Request(`projects/${id}`, { signal })\n .map((res) => res.json())\n .map((entity) => this._createFromEntity(entity)).promise;\n }\n}\n"]}
1
+ {"version":3,"file":"ProjectsResource.js","sourceRoot":"","sources":["../../../src/cloud/projects/ProjectsResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE/C,MAAM,OAAO,gBAAgB;IAClB,OAAO,CAA4B;IAE5C,YAAY,MAAiC;QAC3C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,iBAAiB,CAAC,UAAmB;QACnC,OAAO,IAAI,OAAO,CAAC,yBAAyB,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,CAAC;IAClE,CAAC;IAED,QAAQ,CAAC,EAAU;QACjB,OAAO,IAAI,CAAC,OAAO;aAChB,SAAS,CAAC,YAAY,EAAE,WAAW,EAAE;YACpC,SAAS,EAAE,IAAI;YACf,MAAM,EAAE,KAAK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AC,MAAM,EAAE,CAAC,CAChE,CACF,EACD,KAAK,EAAE,CACR,CAAC;IACJ,CAAC;IAED,QAAQ,CAAC,EAAU,EAAE,EAAE,MAAM,KAAkB,EAAE;QAC/C,OAAO,IAAI,CAAC,OAAO;aAChB,SAAS,CAAC,YAAY,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC;aACvC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;aACxB,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;IAC7D,CAAC;CACF","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 { ResourceConfig, V3Config } from \"../../common/Config.ts\";\nimport { Project } from \"./Project.ts\";\nimport { projectEntityToProperties } from \"./utils.ts\";\nimport type { SignalParam } from \"../../common/Params.ts\";\nimport { fromAbortable } from \"../../common/fromAbortable.ts\";\nimport { share, switchMap, timer } from \"rxjs\";\n\nexport class ProjectsResource {\n readonly #config: ResourceConfig & V3Config;\n\n constructor(config: ResourceConfig & V3Config) {\n this.#config = config;\n }\n\n _createFromEntity(properties: unknown) {\n return new Project(projectEntityToProperties(properties), this);\n }\n\n activate(id: string) {\n return this.#config\n .v3Request(`projects/${id}/activate`, {\n keepalive: true,\n method: \"PUT\",\n })\n .map(() => undefined).promise;\n }\n\n delete(id: string) {\n return this.#config\n .v3Request(`projects/${id}`, { keepalive: true, method: \"DELETE\" })\n .map(() => undefined).promise;\n }\n\n list() {\n const l = ({ signal }: SignalParam = {}) =>\n this.#config\n .v3Request(\"projects\", { signal })\n .map((res) => res.json() as Promise<unknown[]>)\n .map((projects) => projects.map((entity) => this._createFromEntity(entity))).promise;\n return {\n async *data({ signal }: SignalParam = {}) {\n yield* (await l({ signal })).unwrap();\n },\n };\n }\n\n observe(id: string) {\n return timer(0, 5000).pipe(\n switchMap(() =>\n fromAbortable(({ signal }) =>\n this.retrieve(id, { signal }).then((result) => result.unwrap()),\n ),\n ),\n share(),\n );\n }\n\n retrieve(id: string, { signal }: SignalParam = {}) {\n return this.#config\n .v3Request(`projects/${id}`, { signal })\n .map((res) => res.json())\n .map((entity) => this._createFromEntity(entity)).promise;\n }\n}\n"]}
@@ -10,6 +10,7 @@ import { JobsResource } from "../oss/jobs/JobsResource.ts";
10
10
  import moize from "moize";
11
11
  import { OAuthApplicationsResource } from "./oauth/OAuthApplicationsResource.ts";
12
12
  import { AiResource } from "./ai/AiResource.ts";
13
+ import { OrganizationsResource } from "./organizations/OrganizationsResource.ts";
13
14
  /**
14
15
  * @internal
15
16
  * @hidden
@@ -181,6 +182,7 @@ export declare const Resources: (config: (projectId?: string) => ResourceConfig
181
182
  updateExpire: boolean;
182
183
  }>>;
183
184
  oauthApplications: OAuthApplicationsResource;
185
+ organizations: OrganizationsResource;
184
186
  projects: ProjectsResource;
185
187
  roles: moize.Moized<(projectId: string) => RolesResource, Partial<{
186
188
  isDeepEqual: boolean;
@@ -24,6 +24,7 @@ import { JobsResource } from "../oss/jobs/JobsResource.js";
24
24
  import moize from "moize";
25
25
  import { OAuthApplicationsResource } from "./oauth/OAuthApplicationsResource.js";
26
26
  import { AiResource } from "./ai/AiResource.js";
27
+ import { OrganizationsResource } from "./organizations/OrganizationsResource.js";
27
28
  /**
28
29
  * @internal
29
30
  * @hidden
@@ -35,6 +36,7 @@ export const Resources = (config) => ({
35
36
  engines: moize.default((projectId) => new EnginesResource(config(projectId))),
36
37
  jobs: moize.default((projectId) => new JobsResource(config(projectId))),
37
38
  oauthApplications: new OAuthApplicationsResource(config()),
39
+ organizations: new OrganizationsResource(config()),
38
40
  projects: new ProjectsResource(config()),
39
41
  roles: moize.default((projectId) => new RolesResource(config(projectId))),
40
42
  scripts: moize.default((projectId) => new EnterpriseScriptsResource(config(projectId))),
@@ -1 +1 @@
1
- {"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/cloud/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CACvB,MAAyE,EACzE,EAAE,CAAC,CAAC;IACJ,EAAE,EAAE,IAAI,UAAU,CAAC,MAAM,EAAE,CAAC;IAC5B,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,cAAc,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IACnF,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,yBAAyB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/F,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,eAAe,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IACrF,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/E,iBAAiB,EAAE,IAAI,yBAAyB,CAAC,MAAM,EAAE,CAAC;IAC1D,QAAQ,EAAE,IAAI,gBAAgB,CAAC,MAAM,EAAE,CAAC;IACxC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IACjF,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,yBAAyB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/F,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,kBAAkB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;CACvF,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 { ResourceConfig, SonarV3Config, V3Config } from \"../common/Config.ts\";\nimport { ArcticResource } from \"./arctic/ArcticResource.ts\";\nimport { EnterpriseCatalogResource } from \"../enterprise/catalog/EnterpriseCatalogResource.ts\";\nimport { RolesResource } from \"../enterprise/roles/RolesResource.ts\";\nimport { EnterpriseScriptsResource } from \"../enterprise/scripts/EnterpriseScriptsResource.ts\";\nimport { EnginesResource } from \"./engines/EnginesResource.ts\";\nimport { ProjectsResource } from \"./projects/ProjectsResource.ts\";\nimport { CloudUsersResource } from \"./users/CloudUsersResource.ts\";\nimport { JobsResource } from \"../oss/jobs/JobsResource.ts\";\nimport moize from \"moize\";\nimport { OAuthApplicationsResource } from \"./oauth/OAuthApplicationsResource.ts\";\nimport { AiResource } from \"./ai/AiResource.ts\";\n\n/**\n * @internal\n * @hidden\n */\nexport const Resources = (\n config: (projectId?: string) => ResourceConfig & SonarV3Config & V3Config,\n) => ({\n ai: new AiResource(config()),\n arctic: moize.default((projectId: string) => new ArcticResource(config(projectId))),\n catalog: moize.default((projectId: string) => new EnterpriseCatalogResource(config(projectId))),\n engines: moize.default((projectId: string) => new EnginesResource(config(projectId))),\n jobs: moize.default((projectId: string) => new JobsResource(config(projectId))),\n oauthApplications: new OAuthApplicationsResource(config()),\n projects: new ProjectsResource(config()),\n roles: moize.default((projectId: string) => new RolesResource(config(projectId))),\n scripts: moize.default((projectId: string) => new EnterpriseScriptsResource(config(projectId))),\n users: moize.default((projectId: string) => new CloudUsersResource(config(projectId))),\n});\n"]}
1
+ {"version":3,"file":"resources.js","sourceRoot":"","sources":["../../src/cloud/resources.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAA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,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IACjF,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,yBAAyB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IAC/F,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,kBAAkB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;CACvF,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 { ResourceConfig, SonarV3Config, V3Config } from \"../common/Config.ts\";\nimport { ArcticResource } from \"./arctic/ArcticResource.ts\";\nimport { EnterpriseCatalogResource } from \"../enterprise/catalog/EnterpriseCatalogResource.ts\";\nimport { RolesResource } from \"../enterprise/roles/RolesResource.ts\";\nimport { EnterpriseScriptsResource } from \"../enterprise/scripts/EnterpriseScriptsResource.ts\";\nimport { EnginesResource } from \"./engines/EnginesResource.ts\";\nimport { ProjectsResource } from \"./projects/ProjectsResource.ts\";\nimport { CloudUsersResource } from \"./users/CloudUsersResource.ts\";\nimport { JobsResource } from \"../oss/jobs/JobsResource.ts\";\nimport moize from \"moize\";\nimport { OAuthApplicationsResource } from \"./oauth/OAuthApplicationsResource.ts\";\nimport { AiResource } from \"./ai/AiResource.ts\";\nimport { OrganizationsResource } from \"./organizations/OrganizationsResource.ts\";\n\n/**\n * @internal\n * @hidden\n */\nexport const Resources = (\n config: (projectId?: string) => ResourceConfig & SonarV3Config & V3Config,\n) => ({\n ai: new AiResource(config()),\n arctic: moize.default((projectId: string) => new ArcticResource(config(projectId))),\n catalog: moize.default((projectId: string) => new EnterpriseCatalogResource(config(projectId))),\n engines: moize.default((projectId: string) => new EnginesResource(config(projectId))),\n jobs: moize.default((projectId: string) => new JobsResource(config(projectId))),\n oauthApplications: new OAuthApplicationsResource(config()),\n organizations: new OrganizationsResource(config()),\n projects: new ProjectsResource(config()),\n roles: moize.default((projectId: string) => new RolesResource(config(projectId))),\n scripts: moize.default((projectId: string) => new EnterpriseScriptsResource(config(projectId))),\n users: moize.default((projectId: string) => new CloudUsersResource(config(projectId))),\n});\n"]}
@@ -5,7 +5,7 @@ export declare class EnginesResource {
5
5
  #private;
6
6
  constructor(config: ResourceConfig & SonarV3Config);
7
7
  list(): {
8
- data({ signal }?: SignalParam): AsyncGenerator<Engine[], void, any>;
8
+ data({ signal }?: SignalParam): AsyncGenerator<Engine, void, unknown>;
9
9
  };
10
10
  retrieve(id: string, { signal }?: SignalParam): Promise<import("ts-results-es").Result<Engine, import("../index.ts").HttpError>>;
11
11
  }
@@ -26,7 +26,7 @@ export class EnginesResource {
26
26
  .map((res) => res.data.map((entity) => new Engine(entity, this.#config))).promise;
27
27
  return {
28
28
  async *data({ signal } = {}) {
29
- yield* await getPage({ signal });
29
+ yield* (await getPage({ signal })).unwrap();
30
30
  },
31
31
  };
32
32
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EnginesResource.js","sourceRoot":"","sources":["../../../src/enterprise/engines/EnginesResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAC;AAExD,MAAM,OAAO,eAAe;IACjB,OAAO,CAAiC;IAEjD,YAAY,MAAsC;QAChD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,IAAI;QACF,MAAM,OAAO,GAAG,CAAC,EAAE,MAAM,KAAkB,EAAE,EAAE,EAAE,CAC/C,IAAI,CAAC,OAAO;aACT,cAAc,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,EAAE,MAAM,EAAE,CAAC;aAC9E,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAuC,CAAC;aAC7D,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QACtF,OAAO;YACL,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,KAAkB,EAAE;gBACtC,KAAK,CAAC,CAAC,MAAM,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;YACnC,CAAC;SACF,CAAC;IACJ,CAAC;IAED,QAAQ,CAAC,EAAU,EAAE,EAAE,MAAM,KAAkB,EAAE;QAC/C,OAAO,IAAI,CAAC,OAAO;aAChB,cAAc,CAAC,WAAW,EAAE,EAAE,EAAE;YAC/B,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE;YACvC,MAAM;SACP,CAAC;aACD,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAA2B,CAAC;aACjD,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAC/D,CAAC;CACF","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 { ResourceConfig, SonarV3Config } from \"../../common/Config.ts\";\nimport type { SignalParam } from \"../../common/Params.ts\";\nimport { Engine, type EngineEntity } from \"./Engine.ts\";\n\nexport class EnginesResource {\n readonly #config: ResourceConfig & SonarV3Config;\n\n constructor(config: ResourceConfig & SonarV3Config) {\n this.#config = config;\n }\n\n list() {\n const getPage = ({ signal }: SignalParam = {}) =>\n this.#config\n .sonarV3Request(\"engines\", { headers: { Accept: \"application/json\" }, signal })\n .map((res) => res.json() as Promise<{ data: EngineEntity[] }>)\n .map((res) => res.data.map((entity) => new Engine(entity, this.#config))).promise;\n return {\n async *data({ signal }: SignalParam = {}) {\n yield* await getPage({ signal });\n },\n };\n }\n\n retrieve(id: string, { signal }: SignalParam = {}) {\n return this.#config\n .sonarV3Request(`engines/${id}`, {\n headers: { Accept: \"application/json\" },\n signal,\n })\n .map((res) => res.json() as Promise<EngineEntity>)\n .map((entity) => new Engine(entity, this.#config)).promise;\n }\n}\n"]}
1
+ {"version":3,"file":"EnginesResource.js","sourceRoot":"","sources":["../../../src/enterprise/engines/EnginesResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,MAAM,EAAqB,MAAM,aAAa,CAAC;AAExD,MAAM,OAAO,eAAe;IACjB,OAAO,CAAiC;IAEjD,YAAY,MAAsC;QAChD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,IAAI;QACF,MAAM,OAAO,GAAG,CAAC,EAAE,MAAM,KAAkB,EAAE,EAAE,EAAE,CAC/C,IAAI,CAAC,OAAO;aACT,cAAc,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,EAAE,MAAM,EAAE,CAAC;aAC9E,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAuC,CAAC;aAC7D,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;QACtF,OAAO;YACL,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,KAAkB,EAAE;gBACtC,KAAK,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;YAC9C,CAAC;SACF,CAAC;IACJ,CAAC;IAED,QAAQ,CAAC,EAAU,EAAE,EAAE,MAAM,KAAkB,EAAE;QAC/C,OAAO,IAAI,CAAC,OAAO;aAChB,cAAc,CAAC,WAAW,EAAE,EAAE,EAAE;YAC/B,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE;YACvC,MAAM;SACP,CAAC;aACD,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAA2B,CAAC;aACjD,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAC/D,CAAC;CACF","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 { ResourceConfig, SonarV3Config } from \"../../common/Config.ts\";\nimport type { SignalParam } from \"../../common/Params.ts\";\nimport { Engine, type EngineEntity } from \"./Engine.ts\";\n\nexport class EnginesResource {\n readonly #config: ResourceConfig & SonarV3Config;\n\n constructor(config: ResourceConfig & SonarV3Config) {\n this.#config = config;\n }\n\n list() {\n const getPage = ({ signal }: SignalParam = {}) =>\n this.#config\n .sonarV3Request(\"engines\", { headers: { Accept: \"application/json\" }, signal })\n .map((res) => res.json() as Promise<{ data: EngineEntity[] }>)\n .map((res) => res.data.map((entity) => new Engine(entity, this.#config))).promise;\n return {\n async *data({ signal }: SignalParam = {}) {\n yield* (await getPage({ signal })).unwrap();\n },\n };\n }\n\n retrieve(id: string, { signal }: SignalParam = {}) {\n return this.#config\n .sonarV3Request(`engines/${id}`, {\n headers: { Accept: \"application/json\" },\n signal,\n })\n .map((res) => res.json() as Promise<EngineEntity>)\n .map((entity) => new Engine(entity, this.#config)).promise;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dremio/js-sdk",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "JavaScript library for the Dremio API",
5
5
  "keywords": [
6
6
  "dremio",