@dremio/js-sdk 0.53.0 → 0.55.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.
@@ -13,6 +13,7 @@ import { OAuthApplicationsResource } from "./oauth/OAuthApplicationsResource.ts"
13
13
  import { CloudsResource } from "./clouds/CloudsResource.js";
14
14
  import { UsersResource } from "./users/UsersResource.js";
15
15
  import { EngineRulesResource } from "./engineRules/EngineRulesResource.ts";
16
+ import { RolesResource as CloudRolesResource } from "./roles/RolesResource.js";
16
17
  import { AIResource } from "../cloud/ai/AIResource.js";
17
18
  export declare class Dremio {
18
19
  #private;
@@ -29,6 +30,7 @@ export declare class Dremio {
29
30
  readonly roles: (projectId: string) => RolesResource;
30
31
  readonly scripts: (projectId: string) => EnterpriseScriptsResource;
31
32
  readonly sql: (projectId: string) => SqlResource;
33
+ readonly _roles: CloudRolesResource;
32
34
  readonly _users: UsersResource;
33
35
  readonly users: (projectId: string) => CloudUsersResource;
34
36
  constructor(config: Config);
@@ -29,6 +29,7 @@ import { OAuthApplicationsResource } from "./oauth/OAuthApplicationsResource.js"
29
29
  import { CloudsResource } from "./clouds/CloudsResource.js";
30
30
  import { UsersResource } from "./users/UsersResource.js";
31
31
  import { EngineRulesResource } from "./engineRules/EngineRulesResource.js";
32
+ import { RolesResource as CloudRolesResource } from "./roles/RolesResource.js";
32
33
  import { AIResource } from "../cloud/ai/AIResource.js";
33
34
  export class Dremio {
34
35
  ai;
@@ -44,6 +45,7 @@ export class Dremio {
44
45
  roles;
45
46
  scripts;
46
47
  sql;
48
+ _roles;
47
49
  _users;
48
50
  users;
49
51
  #resourceConfig;
@@ -62,6 +64,7 @@ export class Dremio {
62
64
  this.roles = moize.default((projectId) => new RolesResource(this.#resourceConfig(projectId)));
63
65
  this.scripts = moize.default((projectId) => new EnterpriseScriptsResource(this.#resourceConfig(projectId)));
64
66
  this.sql = moize.default((projectId) => new SqlResource(this.#resourceConfig(projectId)));
67
+ this._roles = new CloudRolesResource(this.#resourceConfig());
65
68
  this._users = new UsersResource(this.#resourceConfig());
66
69
  this.users = moize.default((projectId) => new CloudUsersResource(this.#resourceConfig(projectId)));
67
70
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Dremio.js","sourceRoot":"","sources":["../../src/cloud/Dremio.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,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,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,MAAM,OAAO,MAAM;IACR,EAAE,CAAqC;IACvC,MAAM,CAAwC;IAC9C,OAAO,CAAmD;IAC1D,MAAM,CAAiB;IACvB,OAAO,CAAyC;IA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,IAAI,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CACzE,CAAC;QACF,IAAI,CAAC,iBAAiB,GAAG,IAAI,yBAAyB,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;QAC/E,IAAI,CAAC,aAAa,GAAG,IAAI,qBAAqB,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;QACvE,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;QAC7D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,OAAO,CACxB,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAC1E,CAAC;QACF,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAC1B,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,yBAAyB,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CACtF,CAAC;QACF,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,OAAO,CACtB,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CACxE,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;QACxD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,OAAO,CACxB,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAC/E,CAAC;IACJ,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,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 moize from \"moize\";\nimport type { Config } from \"../common/Config.ts\";\nimport { EnterpriseCatalogResource } from \"./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 { ArcticResource } from \"./arctic/ArcticResource.js\";\nimport { EnginesResource } from \"./engines/EnginesResource.js\";\nimport { getResourceConfig } from \"./getResourceConfig.js\";\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\";\nimport { CloudsResource } from \"./clouds/CloudsResource.js\";\nimport { UsersResource } from \"./users/UsersResource.js\";\nimport { EngineRulesResource } from \"./engineRules/EngineRulesResource.ts\";\nimport { AIResource } from \"../cloud/ai/AIResource.js\";\n\nexport class Dremio {\n readonly ai: (projectId?: string) => AIResource;\n readonly arctic: (projectId: string) => ArcticResource;\n readonly catalog: (projectId: string) => EnterpriseCatalogResource;\n readonly clouds: CloudsResource;\n readonly engines: (projectId: string) => EnginesResource;\n readonly engineRules: (projectId: string) => EngineRulesResource;\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: UsersResource;\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 = (projectId) => new AIResource(this.#resourceConfig(projectId));\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.clouds = new CloudsResource(this.#resourceConfig());\n this.engines = moize.default(\n (projectId: string) => new EnginesResource(this.#resourceConfig(projectId)),\n );\n this.engineRules = moize.default(\n (projectId: string) => new EngineRulesResource(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 = new UsersResource(this.#resourceConfig());\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
+ {"version":3,"file":"Dremio.js","sourceRoot":"","sources":["../../src/cloud/Dremio.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAA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,CAAC,CAAC;QAC7D,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,OAAO,CACxB,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAC1E,CAAC;QACF,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,CAC1B,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,yBAAyB,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CACtF,CAAC;QACF,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,OAAO,CACtB,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CACxE,CAAC;QACF,IAAI,CAAC,MAAM,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;QAC7D,IAAI,CAAC,MAAM,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;QACxD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,OAAO,CACxB,CAAC,SAAiB,EAAE,EAAE,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC,CAC/E,CAAC;IACJ,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,eAAe,CAAC;IAC9B,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 moize from \"moize\";\nimport type { Config } from \"../common/Config.ts\";\nimport { EnterpriseCatalogResource } from \"./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 { ArcticResource } from \"./arctic/ArcticResource.js\";\nimport { EnginesResource } from \"./engines/EnginesResource.js\";\nimport { getResourceConfig } from \"./getResourceConfig.js\";\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\";\nimport { CloudsResource } from \"./clouds/CloudsResource.js\";\nimport { UsersResource } from \"./users/UsersResource.js\";\nimport { EngineRulesResource } from \"./engineRules/EngineRulesResource.ts\";\nimport { RolesResource as CloudRolesResource } from \"./roles/RolesResource.js\";\nimport { AIResource } from \"../cloud/ai/AIResource.js\";\n\nexport class Dremio {\n readonly ai: (projectId?: string) => AIResource;\n readonly arctic: (projectId: string) => ArcticResource;\n readonly catalog: (projectId: string) => EnterpriseCatalogResource;\n readonly clouds: CloudsResource;\n readonly engines: (projectId: string) => EnginesResource;\n readonly engineRules: (projectId: string) => EngineRulesResource;\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 _roles: CloudRolesResource;\n readonly _users: UsersResource;\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 = (projectId) => new AIResource(this.#resourceConfig(projectId));\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.clouds = new CloudsResource(this.#resourceConfig());\n this.engines = moize.default(\n (projectId: string) => new EnginesResource(this.#resourceConfig(projectId)),\n );\n this.engineRules = moize.default(\n (projectId: string) => new EngineRulesResource(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._roles = new CloudRolesResource(this.#resourceConfig());\n this._users = new UsersResource(this.#resourceConfig());\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"]}
@@ -0,0 +1,19 @@
1
+ export type RoleType = "INTERNAL" | "EXTERNAL" | "SYSTEM";
2
+ export type RoleMemberType = "USER" | "ROLE";
3
+ export type RoleContent = {
4
+ id: string;
5
+ name: string;
6
+ type: RoleType;
7
+ description?: string;
8
+ };
9
+ export type RoleMemberContent = {
10
+ id: string;
11
+ type: RoleMemberType;
12
+ };
13
+ export declare class Role implements RoleContent {
14
+ readonly id: string;
15
+ readonly name: string;
16
+ readonly type: RoleType;
17
+ readonly description?: string;
18
+ constructor(properties: RoleContent);
19
+ }
@@ -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
+ export class Role {
17
+ id;
18
+ name;
19
+ type;
20
+ description;
21
+ constructor(properties) {
22
+ this.id = properties.id;
23
+ this.name = properties.name;
24
+ this.type = properties.type;
25
+ this.description = properties.description;
26
+ }
27
+ }
28
+ //# sourceMappingURL=Role.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Role.js","sourceRoot":"","sources":["../../../src/cloud/roles/Role.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiBH,MAAM,OAAO,IAAI;IACN,EAAE,CAAS;IACX,IAAI,CAAS;IACb,IAAI,CAAW;IACf,WAAW,CAAU;IAE9B,YAAY,UAAuB;QACjC,IAAI,CAAC,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;IAC5C,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\nexport type RoleType = \"INTERNAL\" | \"EXTERNAL\" | \"SYSTEM\";\nexport type RoleMemberType = \"USER\" | \"ROLE\";\n\nexport type RoleContent = {\n id: string;\n name: string;\n type: RoleType;\n description?: string;\n};\n\nexport type RoleMemberContent = {\n id: string;\n type: RoleMemberType;\n};\n\nexport class Role implements RoleContent {\n readonly id: string;\n readonly name: string;\n readonly type: RoleType;\n readonly description?: string;\n\n constructor(properties: RoleContent) {\n this.id = properties.id;\n this.name = properties.name;\n this.type = properties.type;\n this.description = properties.description;\n }\n}\n"]}
@@ -0,0 +1,73 @@
1
+ import type { V3Config } from "../../common/Config.ts";
2
+ import type { SignalParam } from "../../common/Params.ts";
3
+ import { Role, type RoleContent, type RoleMemberContent } from "./Role.ts";
4
+ type PaginatedRoleMemberListResponse = {
5
+ data: RoleMemberContent[];
6
+ nextPageToken?: string;
7
+ totalResults: number;
8
+ };
9
+ type PatchParentRolesParams = {
10
+ addRoles?: string[];
11
+ removeRoles?: string[];
12
+ };
13
+ type PatchParentRolesResponse = {
14
+ addedRoles?: string[];
15
+ removedRoles?: string[];
16
+ };
17
+ type PatchMembersParams = {
18
+ addRoles?: string[];
19
+ removeRoles?: string[];
20
+ addUsers?: string[];
21
+ removeUsers?: string[];
22
+ };
23
+ type PatchMembersResponse = {
24
+ addedRoles?: string[];
25
+ removedRoles?: string[];
26
+ addedUsers?: string[];
27
+ removedUsers?: string[];
28
+ };
29
+ export declare class RolesResource {
30
+ #private;
31
+ constructor(config: V3Config);
32
+ list(params?: {
33
+ filter?: string;
34
+ maxResults?: number;
35
+ orderBy?: string;
36
+ }): {
37
+ data({ signal }?: SignalParam): AsyncGenerator<Role, void, unknown>;
38
+ getPage: ({ pageToken, signal }?: {
39
+ pageToken?: string;
40
+ } & SignalParam) => import("ts-results-es").AsyncResult<{
41
+ data: Role[];
42
+ nextPageToken?: string;
43
+ totalResults: number;
44
+ }, import("../index.ts").HttpError>;
45
+ };
46
+ create(params: {
47
+ name: string;
48
+ description?: string;
49
+ }, { signal }?: SignalParam): import("ts-results-es").AsyncResult<Role, import("../index.ts").HttpError>;
50
+ retrieveById(id: string, { signal }?: SignalParam): import("ts-results-es").AsyncResult<Role, import("../index.ts").HttpError>;
51
+ retrieveByName(name: string, { signal }?: SignalParam): import("ts-results-es").AsyncResult<Role, import("../index.ts").HttpError>;
52
+ update(params: RoleContent, { signal }?: SignalParam): import("ts-results-es").AsyncResult<Role, import("../index.ts").HttpError>;
53
+ delete(id: string, { signal }?: SignalParam): import("ts-results-es").AsyncResult<Response, import("../index.ts").HttpError>;
54
+ listParentRoles(roleId: string, params?: {
55
+ maxResults?: number;
56
+ pageToken?: string;
57
+ }, { signal }?: SignalParam): import("ts-results-es").AsyncResult<{
58
+ data: Role[];
59
+ nextPageToken?: string;
60
+ totalResults: number;
61
+ }, import("../index.ts").HttpError>;
62
+ addParentRole(roleId: string, parentRoleId: string, { signal }?: SignalParam): import("ts-results-es").AsyncResult<Response, import("../index.ts").HttpError>;
63
+ patchParentRoles(roleId: string, params: PatchParentRolesParams, { signal }?: SignalParam): import("ts-results-es").AsyncResult<PatchParentRolesResponse, import("../index.ts").HttpError>;
64
+ removeParentRole(roleId: string, parentRoleId: string, { signal }?: SignalParam): import("ts-results-es").AsyncResult<Response, import("../index.ts").HttpError>;
65
+ listMembers(roleId: string, params?: {
66
+ maxResults?: number;
67
+ pageToken?: string;
68
+ }, { signal }?: SignalParam): import("ts-results-es").AsyncResult<PaginatedRoleMemberListResponse, import("../index.ts").HttpError>;
69
+ addMember(roleId: string, params: RoleMemberContent, { signal }?: SignalParam): import("ts-results-es").AsyncResult<Response, import("../index.ts").HttpError>;
70
+ patchMembers(roleId: string, params: PatchMembersParams, { signal }?: SignalParam): import("ts-results-es").AsyncResult<PatchMembersResponse, import("../index.ts").HttpError>;
71
+ removeMember(roleId: string, memberId: string, { signal }?: SignalParam): import("ts-results-es").AsyncResult<Response, import("../index.ts").HttpError>;
72
+ }
73
+ export {};
@@ -0,0 +1,204 @@
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 { Role } from "./Role.js";
17
+ export class RolesResource {
18
+ #config;
19
+ constructor(config) {
20
+ this.#config = config;
21
+ }
22
+ list(params) {
23
+ const buildQuery = (extra) => {
24
+ const query = new URLSearchParams();
25
+ if (params?.filter)
26
+ query.set("filter", params.filter);
27
+ if (params?.maxResults)
28
+ query.set("maxResults", String(params.maxResults));
29
+ if (params?.orderBy)
30
+ query.set("orderBy", params.orderBy);
31
+ if (extra?.pageToken)
32
+ query.set("pageToken", extra.pageToken);
33
+ return query;
34
+ };
35
+ const getPage = ({ pageToken, signal } = {}) => this.#config
36
+ .v3Request(`roles?${buildQuery({ pageToken })}`, {
37
+ headers: { Accept: "application/json" },
38
+ signal,
39
+ })
40
+ .map((res) => res.json())
41
+ .map((page) => ({
42
+ ...page,
43
+ data: page.data.map((entity) => new Role(entity)),
44
+ }));
45
+ return {
46
+ async *data({ signal } = {}) {
47
+ const firstPageResult = await getPage({ signal }).promise;
48
+ if (firstPageResult.isErr()) {
49
+ throw firstPageResult.error;
50
+ }
51
+ let currentPage = firstPageResult.value;
52
+ yield* currentPage.data;
53
+ while (currentPage.nextPageToken) {
54
+ currentPage = await getPage({
55
+ pageToken: currentPage.nextPageToken,
56
+ signal,
57
+ }).promise.then((result) => result.unwrap());
58
+ yield* currentPage.data;
59
+ }
60
+ },
61
+ getPage,
62
+ };
63
+ }
64
+ create(params, { signal } = {}) {
65
+ return this.#config
66
+ .v3Request("roles", {
67
+ body: JSON.stringify(params),
68
+ headers: {
69
+ Accept: "application/json",
70
+ "Content-Type": "application/json",
71
+ },
72
+ method: "POST",
73
+ signal,
74
+ })
75
+ .map((res) => res.json())
76
+ .map((entity) => new Role(entity));
77
+ }
78
+ retrieveById(id, { signal } = {}) {
79
+ return this.#config
80
+ .v3Request(`roles/${id}`, {
81
+ headers: { Accept: "application/json" },
82
+ signal,
83
+ })
84
+ .map((res) => res.json())
85
+ .map((entity) => new Role(entity));
86
+ }
87
+ retrieveByName(name, { signal } = {}) {
88
+ return this.#config
89
+ .v3Request(`roles/names/${name}`, {
90
+ headers: { Accept: "application/json" },
91
+ signal,
92
+ })
93
+ .map((res) => res.json())
94
+ .map((entity) => new Role(entity));
95
+ }
96
+ update(params, { signal } = {}) {
97
+ return this.#config
98
+ .v3Request(`roles/${params.id}`, {
99
+ body: JSON.stringify(params),
100
+ headers: {
101
+ Accept: "application/json",
102
+ "Content-Type": "application/json",
103
+ },
104
+ method: "PUT",
105
+ signal,
106
+ })
107
+ .map((res) => res.json())
108
+ .map((entity) => new Role(entity));
109
+ }
110
+ delete(id, { signal } = {}) {
111
+ return this.#config.v3Request(`roles/${id}`, {
112
+ method: "DELETE",
113
+ signal,
114
+ });
115
+ }
116
+ listParentRoles(roleId, params, { signal } = {}) {
117
+ const query = new URLSearchParams();
118
+ if (params?.maxResults)
119
+ query.set("maxResults", String(params.maxResults));
120
+ if (params?.pageToken)
121
+ query.set("pageToken", params.pageToken);
122
+ return this.#config
123
+ .v3Request(`roles/${roleId}/parent-roles?${query}`, {
124
+ headers: { Accept: "application/json" },
125
+ signal,
126
+ })
127
+ .map((res) => res.json())
128
+ .map((page) => ({ ...page, data: page.data.map((entity) => new Role(entity)) }));
129
+ }
130
+ addParentRole(roleId, parentRoleId, { signal } = {}) {
131
+ return this.#config.v3Request(`roles/${roleId}/parent-roles`, {
132
+ body: JSON.stringify({ id: parentRoleId }),
133
+ headers: {
134
+ Accept: "application/json",
135
+ "Content-Type": "application/json",
136
+ },
137
+ method: "POST",
138
+ signal,
139
+ });
140
+ }
141
+ patchParentRoles(roleId, params, { signal } = {}) {
142
+ return this.#config
143
+ .v3Request(`roles/${roleId}/parent-roles`, {
144
+ body: JSON.stringify(params),
145
+ headers: {
146
+ Accept: "application/json",
147
+ "Content-Type": "application/json",
148
+ },
149
+ method: "PATCH",
150
+ signal,
151
+ })
152
+ .map((res) => res.json());
153
+ }
154
+ removeParentRole(roleId, parentRoleId, { signal } = {}) {
155
+ return this.#config.v3Request(`roles/${roleId}/parent-roles/${parentRoleId}`, {
156
+ method: "DELETE",
157
+ signal,
158
+ });
159
+ }
160
+ listMembers(roleId, params, { signal } = {}) {
161
+ const query = new URLSearchParams();
162
+ if (params?.maxResults)
163
+ query.set("maxResults", String(params.maxResults));
164
+ if (params?.pageToken)
165
+ query.set("pageToken", params.pageToken);
166
+ return this.#config
167
+ .v3Request(`roles/${roleId}/members?${query}`, {
168
+ headers: { Accept: "application/json" },
169
+ signal,
170
+ })
171
+ .map((res) => res.json());
172
+ }
173
+ addMember(roleId, params, { signal } = {}) {
174
+ return this.#config.v3Request(`roles/${roleId}/members`, {
175
+ body: JSON.stringify(params),
176
+ headers: {
177
+ Accept: "application/json",
178
+ "Content-Type": "application/json",
179
+ },
180
+ method: "POST",
181
+ signal,
182
+ });
183
+ }
184
+ patchMembers(roleId, params, { signal } = {}) {
185
+ return this.#config
186
+ .v3Request(`roles/${roleId}/members`, {
187
+ body: JSON.stringify(params),
188
+ headers: {
189
+ Accept: "application/json",
190
+ "Content-Type": "application/json",
191
+ },
192
+ method: "PATCH",
193
+ signal,
194
+ })
195
+ .map((res) => res.json());
196
+ }
197
+ removeMember(roleId, memberId, { signal } = {}) {
198
+ return this.#config.v3Request(`roles/${roleId}/members/${memberId}`, {
199
+ method: "DELETE",
200
+ signal,
201
+ });
202
+ }
203
+ }
204
+ //# sourceMappingURL=RolesResource.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RolesResource.js","sourceRoot":"","s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AC;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 { V3Config } from \"../../common/Config.ts\";\nimport type { SignalParam } from \"../../common/Params.ts\";\nimport { Role, type RoleContent, type RoleMemberContent } from \"./Role.ts\";\n\ntype PaginatedRoleListResponse = {\n data: RoleContent[];\n nextPageToken?: string;\n totalResults: number;\n};\n\ntype PaginatedRoleMemberListResponse = {\n data: RoleMemberContent[];\n nextPageToken?: string;\n totalResults: number;\n};\n\ntype PatchParentRolesParams = {\n addRoles?: string[];\n removeRoles?: string[];\n};\n\ntype PatchParentRolesResponse = {\n addedRoles?: string[];\n removedRoles?: string[];\n};\n\ntype PatchMembersParams = {\n addRoles?: string[];\n removeRoles?: string[];\n addUsers?: string[];\n removeUsers?: string[];\n};\n\ntype PatchMembersResponse = {\n addedRoles?: string[];\n removedRoles?: string[];\n addedUsers?: string[];\n removedUsers?: string[];\n};\n\nexport class RolesResource {\n #config: V3Config;\n\n constructor(config: V3Config) {\n this.#config = config;\n }\n\n list(params?: { filter?: string; maxResults?: number; orderBy?: string }) {\n const buildQuery = (extra?: { pageToken?: string }) => {\n const query = new URLSearchParams();\n if (params?.filter) query.set(\"filter\", params.filter);\n if (params?.maxResults) query.set(\"maxResults\", String(params.maxResults));\n if (params?.orderBy) query.set(\"orderBy\", params.orderBy);\n if (extra?.pageToken) query.set(\"pageToken\", extra.pageToken);\n return query;\n };\n\n const getPage = ({ pageToken, signal }: { pageToken?: string } & SignalParam = {}) =>\n this.#config\n .v3Request(`roles?${buildQuery({ pageToken })}`, {\n headers: { Accept: \"application/json\" },\n signal,\n })\n .map((res) => res.json() as Promise<PaginatedRoleListResponse>)\n .map((page) => ({\n ...page,\n data: page.data.map((entity) => new Role(entity)),\n }));\n\n return {\n async *data({ signal }: SignalParam = {}) {\n const firstPageResult = await getPage({ signal }).promise;\n if (firstPageResult.isErr()) {\n throw firstPageResult.error;\n }\n let currentPage = firstPageResult.value;\n yield* currentPage.data;\n while (currentPage.nextPageToken) {\n currentPage = await getPage({\n pageToken: currentPage.nextPageToken,\n signal,\n }).promise.then((result) => result.unwrap());\n yield* currentPage.data;\n }\n },\n getPage,\n };\n }\n\n create(params: { name: string; description?: string }, { signal }: SignalParam = {}) {\n return this.#config\n .v3Request(\"roles\", {\n body: JSON.stringify(params),\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: \"POST\",\n signal,\n })\n .map((res) => res.json() as Promise<RoleContent>)\n .map((entity) => new Role(entity));\n }\n\n retrieveById(id: string, { signal }: SignalParam = {}) {\n return this.#config\n .v3Request(`roles/${id}`, {\n headers: { Accept: \"application/json\" },\n signal,\n })\n .map((res) => res.json() as Promise<RoleContent>)\n .map((entity) => new Role(entity));\n }\n\n retrieveByName(name: string, { signal }: SignalParam = {}) {\n return this.#config\n .v3Request(`roles/names/${name}`, {\n headers: { Accept: \"application/json\" },\n signal,\n })\n .map((res) => res.json() as Promise<RoleContent>)\n .map((entity) => new Role(entity));\n }\n\n update(params: RoleContent, { signal }: SignalParam = {}) {\n return this.#config\n .v3Request(`roles/${params.id}`, {\n body: JSON.stringify(params),\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: \"PUT\",\n signal,\n })\n .map((res) => res.json() as Promise<RoleContent>)\n .map((entity) => new Role(entity));\n }\n\n delete(id: string, { signal }: SignalParam = {}) {\n return this.#config.v3Request(`roles/${id}`, {\n method: \"DELETE\",\n signal,\n });\n }\n\n listParentRoles(\n roleId: string,\n params?: { maxResults?: number; pageToken?: string },\n { signal }: SignalParam = {},\n ) {\n const query = new URLSearchParams();\n if (params?.maxResults) query.set(\"maxResults\", String(params.maxResults));\n if (params?.pageToken) query.set(\"pageToken\", params.pageToken);\n\n return this.#config\n .v3Request(`roles/${roleId}/parent-roles?${query}`, {\n headers: { Accept: \"application/json\" },\n signal,\n })\n .map((res) => res.json() as Promise<PaginatedRoleListResponse>)\n .map((page) => ({ ...page, data: page.data.map((entity) => new Role(entity)) }));\n }\n\n addParentRole(roleId: string, parentRoleId: string, { signal }: SignalParam = {}) {\n return this.#config.v3Request(`roles/${roleId}/parent-roles`, {\n body: JSON.stringify({ id: parentRoleId }),\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: \"POST\",\n signal,\n });\n }\n\n patchParentRoles(roleId: string, params: PatchParentRolesParams, { signal }: SignalParam = {}) {\n return this.#config\n .v3Request(`roles/${roleId}/parent-roles`, {\n body: JSON.stringify(params),\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: \"PATCH\",\n signal,\n })\n .map((res) => res.json() as Promise<PatchParentRolesResponse>);\n }\n\n removeParentRole(roleId: string, parentRoleId: string, { signal }: SignalParam = {}) {\n return this.#config.v3Request(`roles/${roleId}/parent-roles/${parentRoleId}`, {\n method: \"DELETE\",\n signal,\n });\n }\n\n listMembers(\n roleId: string,\n params?: { maxResults?: number; pageToken?: string },\n { signal }: SignalParam = {},\n ) {\n const query = new URLSearchParams();\n if (params?.maxResults) query.set(\"maxResults\", String(params.maxResults));\n if (params?.pageToken) query.set(\"pageToken\", params.pageToken);\n\n return this.#config\n .v3Request(`roles/${roleId}/members?${query}`, {\n headers: { Accept: \"application/json\" },\n signal,\n })\n .map((res) => res.json() as Promise<PaginatedRoleMemberListResponse>);\n }\n\n addMember(roleId: string, params: RoleMemberContent, { signal }: SignalParam = {}) {\n return this.#config.v3Request(`roles/${roleId}/members`, {\n body: JSON.stringify(params),\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: \"POST\",\n signal,\n });\n }\n\n patchMembers(roleId: string, params: PatchMembersParams, { signal }: SignalParam = {}) {\n return this.#config\n .v3Request(`roles/${roleId}/members`, {\n body: JSON.stringify(params),\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n },\n method: \"PATCH\",\n signal,\n })\n .map((res) => res.json() as Promise<PatchMembersResponse>);\n }\n\n removeMember(roleId: string, memberId: string, { signal }: SignalParam = {}) {\n return this.#config.v3Request(`roles/${roleId}/members/${memberId}`, {\n method: \"DELETE\",\n signal,\n });\n }\n}\n"]}
@@ -3,11 +3,13 @@ import type { userPropertiesCodec } from "./userPropertiesCodec.ts";
3
3
  import type { V3Config } from "../../common/Config.ts";
4
4
  export declare class User implements z.output<typeof userPropertiesCodec> {
5
5
  #private;
6
+ readonly description: string | null;
6
7
  readonly email: string | null;
7
8
  readonly familyName: string | null;
8
9
  readonly givenName: string | null;
9
10
  readonly id: string;
10
11
  readonly identityType: z.output<typeof userPropertiesCodec>["identityType"];
12
+ readonly oauthClientId: string | null;
11
13
  readonly status: z.output<typeof userPropertiesCodec>["status"];
12
14
  readonly username: string;
13
15
  constructor(config: V3Config, properties: z.output<typeof userPropertiesCodec>);
@@ -17,20 +17,24 @@ import * as z from "zod/mini";
17
17
  export class User {
18
18
  // eslint-disable-next-line no-unused-private-class-members
19
19
  #config;
20
+ description;
20
21
  email;
21
22
  familyName;
22
23
  givenName;
23
24
  id;
24
25
  identityType;
26
+ oauthClientId;
25
27
  status;
26
28
  username;
27
29
  constructor(config, properties) {
28
30
  this.#config = config;
31
+ this.description = properties.description;
29
32
  this.email = properties.email;
30
33
  this.familyName = properties.familyName;
31
34
  this.givenName = properties.givenName;
32
35
  this.id = properties.id;
33
36
  this.identityType = properties.identityType;
37
+ this.oauthClientId = properties.oauthClientId;
34
38
  this.status = properties.status;
35
39
  this.username = properties.username;
36
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"User.js","sourceRoot":"","sources":["../../../src/cloud/users/User.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IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACtC,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC9D,CAAC;QAED,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACtC,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 * as z from \"zod/mini\";\nimport type { userPropertiesCodec } from \"./userPropertiesCodec.ts\";\nimport type { V3Config } from \"../../common/Config.ts\";\n\nexport class User implements z.output<typeof userPropertiesCodec> {\n // eslint-disable-next-line no-unused-private-class-members\n readonly #config: V3Config;\n readonly email: string | null;\n readonly familyName: string | null;\n readonly givenName: string | null;\n readonly id: string;\n readonly identityType: z.output<typeof userPropertiesCodec>[\"identityType\"];\n readonly status: z.output<typeof userPropertiesCodec>[\"status\"];\n readonly username: string;\n\n constructor(config: V3Config, properties: z.output<typeof userPropertiesCodec>) {\n this.#config = config;\n this.email = properties.email;\n this.familyName = properties.familyName;\n this.givenName = properties.givenName;\n this.id = properties.id;\n this.identityType = properties.identityType;\n this.status = properties.status;\n this.username = properties.username;\n }\n\n get displayName(): string {\n if (this.givenName || this.familyName) {\n return [this.givenName, this.familyName].filter(Boolean).join(\" \");\n }\n\n if (this.username) {\n return this.username;\n }\n\n if (this.email) {\n return this.email;\n }\n\n return this.id;\n }\n\n get initials(): string {\n if (this.givenName && this.familyName) {\n return this.givenName.charAt(0) + this.familyName.charAt(0);\n }\n\n return this.displayName.slice(0, 2);\n }\n}\n"]}
1
+ {"version":3,"file":"User.js","sourceRoot":"","sources":["../../../src/cloud/users/User.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAI9B,MAAM,OAAO,IAAI;IACf,2DAA2D;IAClD,OAAO,CAAW;IAClB,WAAW,CAAgB;IAC3B,KAAK,CAAgB;IACrB,UAAU,CAAgB;IAC1B,SAAS,CAAgB;IACzB,EAAE,CAAS;IACX,YAAY,CAAuD;IACnE,aAAa,CAAgB;IAC7B,MAAM,CAAiD;IACvD,QAAQ,CAAS;IAE1B,YAAY,MAAgB,EAAE,UAAgD;QAC5E,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QAC1C,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QAC9B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;QACxC,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,CAAC;QACtC,IAAI,CAAC,EAAE,GAAG,UAAU,CAAC,EAAE,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC;QAC5C,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC,aAAa,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;IACtC,CAAC;IAED,IAAI,WAAW;QACb,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACtC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACrE,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,IAAI,CAAC,QAAQ,CAAC;QACvB,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,IAAI,CAAC,KAAK,CAAC;QACpB,CAAC;QAED,OAAO,IAAI,CAAC,EAAE,CAAC;IACjB,CAAC;IAED,IAAI,QAAQ;QACV,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACtC,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC9D,CAAC;QAED,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACtC,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 * as z from \"zod/mini\";\nimport type { userPropertiesCodec } from \"./userPropertiesCodec.ts\";\nimport type { V3Config } from \"../../common/Config.ts\";\n\nexport class User implements z.output<typeof userPropertiesCodec> {\n // eslint-disable-next-line no-unused-private-class-members\n readonly #config: V3Config;\n readonly description: string | null;\n readonly email: string | null;\n readonly familyName: string | null;\n readonly givenName: string | null;\n readonly id: string;\n readonly identityType: z.output<typeof userPropertiesCodec>[\"identityType\"];\n readonly oauthClientId: string | null;\n readonly status: z.output<typeof userPropertiesCodec>[\"status\"];\n readonly username: string;\n\n constructor(config: V3Config, properties: z.output<typeof userPropertiesCodec>) {\n this.#config = config;\n this.description = properties.description;\n this.email = properties.email;\n this.familyName = properties.familyName;\n this.givenName = properties.givenName;\n this.id = properties.id;\n this.identityType = properties.identityType;\n this.oauthClientId = properties.oauthClientId;\n this.status = properties.status;\n this.username = properties.username;\n }\n\n get displayName(): string {\n if (this.givenName || this.familyName) {\n return [this.givenName, this.familyName].filter(Boolean).join(\" \");\n }\n\n if (this.username) {\n return this.username;\n }\n\n if (this.email) {\n return this.email;\n }\n\n return this.id;\n }\n\n get initials(): string {\n if (this.givenName && this.familyName) {\n return this.givenName.charAt(0) + this.familyName.charAt(0);\n }\n\n return this.displayName.slice(0, 2);\n }\n}\n"]}
@@ -5,6 +5,7 @@ export declare const identityTypeSchema: z.ZodMiniEnum<{
5
5
  }>;
6
6
  export declare const userPropertiesCodec: z.ZodMiniCodec<z.ZodMiniObject<{
7
7
  active: z.ZodMiniBoolean<boolean>;
8
+ description: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
8
9
  firstName: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
9
10
  id: z.ZodMiniString<string>;
10
11
  identityType: z.ZodMiniOptional<z.ZodMiniEnum<{
@@ -13,7 +14,9 @@ export declare const userPropertiesCodec: z.ZodMiniCodec<z.ZodMiniObject<{
13
14
  }>>;
14
15
  lastName: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
15
16
  name: z.ZodMiniString<string>;
17
+ oauthClientId: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
16
18
  }, z.core.$strip>, z.ZodMiniObject<{
19
+ description: z.ZodMiniNullable<z.ZodMiniString<string>>;
17
20
  email: z.ZodMiniNullable<z.ZodMiniString<string>>;
18
21
  familyName: z.ZodMiniNullable<z.ZodMiniString<string>>;
19
22
  givenName: z.ZodMiniNullable<z.ZodMiniString<string>>;
@@ -22,6 +25,7 @@ export declare const userPropertiesCodec: z.ZodMiniCodec<z.ZodMiniObject<{
22
25
  REGULAR_USER: "REGULAR_USER";
23
26
  SERVICE_USER: "SERVICE_USER";
24
27
  }>>;
28
+ oauthClientId: z.ZodMiniNullable<z.ZodMiniString<string>>;
25
29
  status: z.ZodMiniEnum<{
26
30
  ACTIVE: "ACTIVE";
27
31
  INACTIVE: "INACTIVE";
@@ -17,28 +17,34 @@ import * as z from "zod/mini";
17
17
  export const identityTypeSchema = z.enum(["REGULAR_USER", "SERVICE_USER"]);
18
18
  const userPropertiesInSchema = z.object({
19
19
  active: z.boolean(),
20
+ description: z.optional(z.nullable(z.string())),
20
21
  firstName: z.optional(z.nullable(z.string())),
21
22
  id: z.string().check(z.minLength(1)),
22
23
  identityType: z.optional(identityTypeSchema),
23
24
  lastName: z.optional(z.nullable(z.string())),
24
25
  name: z.string(),
26
+ oauthClientId: z.optional(z.nullable(z.string())),
25
27
  });
26
28
  export const userPropertiesCodec = z.codec(userPropertiesInSchema, z.object({
29
+ description: z.nullable(z.string()),
27
30
  email: z.nullable(z.string()),
28
31
  familyName: z.nullable(z.string().check(z.trim())),
29
32
  givenName: z.nullable(z.string().check(z.trim())),
30
33
  id: z.string().check(z.minLength(1)),
31
34
  identityType: z.optional(identityTypeSchema),
35
+ oauthClientId: z.nullable(z.string()),
32
36
  status: z.enum(["ACTIVE", "INACTIVE"]),
33
37
  username: z.string().check(z.trim(), z.minLength(1)),
34
38
  }), {
35
39
  decode(v) {
36
40
  return {
41
+ description: v.description || null,
37
42
  email: v.name || null,
38
43
  familyName: v.lastName || null,
39
44
  givenName: v.firstName || null,
40
45
  id: v.id,
41
46
  identityType: v.identityType,
47
+ oauthClientId: v.oauthClientId || null,
42
48
  status: v.active ? "ACTIVE" : "INACTIVE",
43
49
  username: v.name,
44
50
  };
@@ -46,11 +52,13 @@ export const userPropertiesCodec = z.codec(userPropertiesInSchema, z.object({
46
52
  encode(v) {
47
53
  return {
48
54
  active: v.status === "ACTIVE",
55
+ description: v.description || undefined,
49
56
  firstName: v.givenName || undefined,
50
57
  id: v.id,
51
58
  identityType: v.identityType,
52
59
  lastName: v.familyName || undefined,
53
60
  name: v.username,
61
+ oauthClientId: v.oauthClientId || undefined,
54
62
  };
55
63
  },
56
64
  });
@@ -1 +1 @@
1
- {"version":3,"file":"userPropertiesCodec.js","sourceRoot":"","sources":["../../../src/cloud/users/userPropertiesCodec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC;AAE3E,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE;IACnB,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7C,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACpC,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IAC5C,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CACxC,sBAAsB,EACtB,CAAC,CAAC,MAAM,CAAC;IACP,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7B,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,E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;IACJ,CAAC;CACF,CACF,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 * as z from \"zod/mini\";\n\nexport const identityTypeSchema = z.enum([\"REGULAR_USER\", \"SERVICE_USER\"]);\n\nconst userPropertiesInSchema = z.object({\n active: z.boolean(),\n firstName: z.optional(z.nullable(z.string())),\n id: z.string().check(z.minLength(1)),\n identityType: z.optional(identityTypeSchema),\n lastName: z.optional(z.nullable(z.string())),\n name: z.string(),\n});\n\nexport const userPropertiesCodec = z.codec(\n userPropertiesInSchema,\n z.object({\n email: z.nullable(z.string()),\n familyName: z.nullable(z.string().check(z.trim())),\n givenName: z.nullable(z.string().check(z.trim())),\n id: z.string().check(z.minLength(1)),\n identityType: z.optional(identityTypeSchema),\n status: z.enum([\"ACTIVE\", \"INACTIVE\"]),\n username: z.string().check(z.trim(), z.minLength(1)),\n }),\n {\n decode(v) {\n return {\n email: v.name || null,\n familyName: v.lastName || null,\n givenName: v.firstName || null,\n id: v.id,\n identityType: v.identityType,\n status: v.active ? (\"ACTIVE\" as const) : (\"INACTIVE\" as const),\n username: v.name,\n };\n },\n encode(v) {\n return {\n active: v.status === \"ACTIVE\",\n firstName: v.givenName || undefined,\n id: v.id,\n identityType: v.identityType,\n lastName: v.familyName || undefined,\n name: v.username,\n };\n },\n },\n);\n"]}
1
+ {"version":3,"file":"userPropertiesCodec.js","sourceRoot":"","sources":["../../../src/cloud/users/userPropertiesCodec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,CAAC,MAA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AC,CAAC,SAAS,IAAI,SAAS;YACnC,EAAE,EAAE,CAAC,CAAC,EAAE;YACR,YAAY,EAAE,CAAC,CAAC,YAAY;YAC5B,QAAQ,EAAE,CAAC,CAAC,UAAU,IAAI,SAAS;YACnC,IAAI,EAAE,CAAC,CAAC,QAAQ;YAChB,aAAa,EAAE,CAAC,CAAC,aAAa,IAAI,SAAS;SAC5C,CAAC;IACJ,CAAC;CACF,CACF,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 * as z from \"zod/mini\";\n\nexport const identityTypeSchema = z.enum([\"REGULAR_USER\", \"SERVICE_USER\"]);\n\nconst userPropertiesInSchema = z.object({\n active: z.boolean(),\n description: z.optional(z.nullable(z.string())),\n firstName: z.optional(z.nullable(z.string())),\n id: z.string().check(z.minLength(1)),\n identityType: z.optional(identityTypeSchema),\n lastName: z.optional(z.nullable(z.string())),\n name: z.string(),\n oauthClientId: z.optional(z.nullable(z.string())),\n});\n\nexport const userPropertiesCodec = z.codec(\n userPropertiesInSchema,\n z.object({\n description: z.nullable(z.string()),\n email: z.nullable(z.string()),\n familyName: z.nullable(z.string().check(z.trim())),\n givenName: z.nullable(z.string().check(z.trim())),\n id: z.string().check(z.minLength(1)),\n identityType: z.optional(identityTypeSchema),\n oauthClientId: z.nullable(z.string()),\n status: z.enum([\"ACTIVE\", \"INACTIVE\"]),\n username: z.string().check(z.trim(), z.minLength(1)),\n }),\n {\n decode(v) {\n return {\n description: v.description || null,\n email: v.name || null,\n familyName: v.lastName || null,\n givenName: v.firstName || null,\n id: v.id,\n identityType: v.identityType,\n oauthClientId: v.oauthClientId || null,\n status: v.active ? (\"ACTIVE\" as const) : (\"INACTIVE\" as const),\n username: v.name,\n };\n },\n encode(v) {\n return {\n active: v.status === \"ACTIVE\",\n description: v.description || undefined,\n firstName: v.givenName || undefined,\n id: v.id,\n identityType: v.identityType,\n lastName: v.familyName || undefined,\n name: v.username,\n oauthClientId: v.oauthClientId || undefined,\n };\n },\n },\n);\n"]}
@@ -13,6 +13,7 @@ export declare class UserChatMessage {
13
13
  id: string;
14
14
  prompt: Omit<{
15
15
  text: string;
16
+ acceptTaskNames?: string[] | undefined;
16
17
  approvals?: {
17
18
  allToolsAllowed: boolean;
18
19
  approvalNonce: string;
@@ -21,9 +22,10 @@ export declare class UserChatMessage {
21
22
  arguments: Record<string, unknown>;
22
23
  executionId: string;
23
24
  name: string;
25
+ allowInConversation?: boolean | undefined;
26
+ catalogPath?: string[] | undefined;
24
27
  }[];
25
28
  } | undefined;
26
- acceptTaskNames?: string[] | undefined;
27
29
  context?: string | undefined;
28
30
  skillIds?: string[] | undefined;
29
31
  }, "text"> | undefined;
@@ -31,17 +33,19 @@ export declare class UserChatMessage {
31
33
  static new(content: UserChatMessage["content"], prompt?: UserChatMessage["prompt"]): UserChatMessage;
32
34
  }
33
35
  export declare const createConversationPromptSchema: z.ZodMiniObject<{
36
+ acceptTaskNames: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
34
37
  approvals: z.ZodMiniOptional<z.ZodMiniObject<{
35
38
  allToolsAllowed: z.ZodMiniBoolean<boolean>;
36
39
  approvalNonce: z.ZodMiniString<string>;
37
40
  toolDecisions: z.ZodMiniArray<z.ZodMiniObject<{
41
+ allowInConversation: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
38
42
  approved: z.ZodMiniBoolean<boolean>;
39
43
  arguments: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
44
+ catalogPath: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
40
45
  executionId: z.ZodMiniString<string>;
41
46
  name: z.ZodMiniString<string>;
42
47
  }, z.core.$strip>>;
43
48
  }, z.core.$strip>>;
44
- acceptTaskNames: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
45
49
  context: z.ZodMiniOptional<z.ZodMiniString<string>>;
46
50
  skillIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
47
51
  text: z.ZodMiniString<string>;
@@ -43,17 +43,19 @@ export class UserChatMessage {
43
43
  }
44
44
  }
45
45
  export const createConversationPromptSchema = z.strictObject({
46
+ acceptTaskNames: z.optional(z.array(z.string())),
46
47
  approvals: z.optional(z.object({
47
48
  allToolsAllowed: z.boolean(),
48
49
  approvalNonce: z.string(),
49
50
  toolDecisions: z.array(z.object({
51
+ allowInConversation: z.optional(z.boolean()),
50
52
  approved: z.boolean(),
51
53
  arguments: z.record(z.string(), z.unknown()),
54
+ catalogPath: z.optional(z.array(z.string())),
52
55
  executionId: z.string(),
53
56
  name: z.string(),
54
57
  })),
55
58
  })),
56
- acceptTaskNames: z.optional(z.array(z.string())),
57
59
  context: z.optional(z.string()),
58
60
  skillIds: z.optional(z.array(z.string())),
59
61
  text: z.string(),
@@ -1 +1 @@
1
- {"version":3,"file":"UserChatMessage.js","sourceRoot":"","sources":["../../../../src/enterprise/ai/chat/UserChatMessage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,MAAM,OAAO,eAAe;IACjB,SAAS,CAAyB;IAClC,OAAO,CAAS;IAChB,EAAE,CAAS;IACX,MAAM,CAAgE;IAE/E,YACE,EAAyB,EACzB,SAAuC,EACvC,OAAmC,EACnC,MAAkC;QAElC,IAAI,CAAC,EAAE,G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C,CACH;KACF,CAAC,CACH;IACD,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IAChD,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC/B,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,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 { nanoid } from \"nanoid/non-secure\";\nimport { Temporal } from \"temporal-polyfill\";\nimport * as z from \"zod/mini\";\n\nexport class UserChatMessage {\n readonly createdAt: Temporal.ZonedDateTime;\n readonly content: string;\n readonly id: string;\n readonly prompt?: Omit<z.infer<typeof createConversationPromptSchema>, \"text\">;\n\n constructor(\n id: UserChatMessage[\"id\"],\n createdAt: UserChatMessage[\"createdAt\"],\n content: UserChatMessage[\"content\"],\n prompt?: UserChatMessage[\"prompt\"],\n ) {\n this.id = id;\n this.createdAt = createdAt;\n this.content = content;\n this.prompt = prompt;\n }\n\n withPrompt(prompt: UserChatMessage[\"prompt\"]) {\n return new UserChatMessage(this.id, this.createdAt, this.content, prompt);\n }\n\n toJSON() {\n return {\n content: this.content,\n createdAt: this.createdAt.toString(),\n id: this.id,\n prompt: this.prompt,\n };\n }\n\n static new(content: UserChatMessage[\"content\"], prompt?: UserChatMessage[\"prompt\"]) {\n return new UserChatMessage(nanoid(), Temporal.Now.zonedDateTimeISO(), content, prompt);\n }\n}\n\nexport const createConversationPromptSchema = z.strictObject({\n approvals: z.optional(\n z.object({\n allToolsAllowed: z.boolean(),\n approvalNonce: z.string(),\n toolDecisions: z.array(\n z.object({\n approved: z.boolean(),\n arguments: z.record(z.string(), z.unknown()),\n executionId: z.string(),\n name: z.string(),\n }),\n ),\n }),\n ),\n acceptTaskNames: z.optional(z.array(z.string())),\n context: z.optional(z.string()),\n skillIds: z.optional(z.array(z.string())),\n text: z.string(),\n});\n"]}
1
+ {"version":3,"file":"UserChatMessage.js","sourceRoot":"","sources":["../../../../src/enterprise/ai/chat/UserChatMessage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,MAAM,OAAO,eAAe;IACjB,SAAS,CAAyB;IAClC,OAAO,CAAS;IAChB,EAAE,CAAS;IACX,MAAM,CAAgE;IAE/E,YACE,EAAyB,EACzB,SAAuC,EACvC,OAAmC,EACnC,MAAkC;QAElC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,UAAU,CAAC,MAAiC;QAC1C,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC5E,CAAC;IAED,MAAM;QACJ,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ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,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,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 { nanoid } from \"nanoid/non-secure\";\nimport { Temporal } from \"temporal-polyfill\";\nimport * as z from \"zod/mini\";\n\nexport class UserChatMessage {\n readonly createdAt: Temporal.ZonedDateTime;\n readonly content: string;\n readonly id: string;\n readonly prompt?: Omit<z.infer<typeof createConversationPromptSchema>, \"text\">;\n\n constructor(\n id: UserChatMessage[\"id\"],\n createdAt: UserChatMessage[\"createdAt\"],\n content: UserChatMessage[\"content\"],\n prompt?: UserChatMessage[\"prompt\"],\n ) {\n this.id = id;\n this.createdAt = createdAt;\n this.content = content;\n this.prompt = prompt;\n }\n\n withPrompt(prompt: UserChatMessage[\"prompt\"]) {\n return new UserChatMessage(this.id, this.createdAt, this.content, prompt);\n }\n\n toJSON() {\n return {\n content: this.content,\n createdAt: this.createdAt.toString(),\n id: this.id,\n prompt: this.prompt,\n };\n }\n\n static new(content: UserChatMessage[\"content\"], prompt?: UserChatMessage[\"prompt\"]) {\n return new UserChatMessage(nanoid(), Temporal.Now.zonedDateTimeISO(), content, prompt);\n }\n}\n\nexport const createConversationPromptSchema = z.strictObject({\n acceptTaskNames: z.optional(z.array(z.string())),\n approvals: z.optional(\n z.object({\n allToolsAllowed: z.boolean(),\n approvalNonce: z.string(),\n toolDecisions: z.array(\n z.object({\n allowInConversation: z.optional(z.boolean()),\n approved: z.boolean(),\n arguments: z.record(z.string(), z.unknown()),\n catalogPath: z.optional(z.array(z.string())),\n executionId: z.string(),\n name: z.string(),\n }),\n ),\n }),\n ),\n context: z.optional(z.string()),\n skillIds: z.optional(z.array(z.string())),\n text: z.string(),\n});\n"]}
@@ -2,12 +2,12 @@ import { Temporal } from "temporal-polyfill";
2
2
  import * as z from "zod/mini";
3
3
  export declare const conversationPropertiesCodec: z.ZodMiniCodec<z.ZodMiniObject<{
4
4
  conversationId: z.ZodMiniString<string>;
5
- createdAt: z.iso.ZodMiniISODateTime;
5
+ createdAt: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
6
6
  currentRunId: z.ZodMiniOptional<z.ZodMiniString<string>>;
7
7
  modelName: z.ZodMiniOptional<z.ZodMiniString<string>>;
8
8
  modelProviderId: z.ZodMiniOptional<z.ZodMiniString<string>>;
9
- modifiedAt: z.iso.ZodMiniISODateTime;
10
- tag: z.ZodMiniString<string>;
9
+ modifiedAt: z.ZodMiniOptional<z.iso.ZodMiniISODateTime>;
10
+ tag: z.ZodMiniOptional<z.ZodMiniString<string>>;
11
11
  title: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
12
12
  }, z.core.$strip>, z.ZodMiniObject<{
13
13
  createdAt: z.ZodMiniCustom<Temporal.Instant, Temporal.Instant>;
@@ -17,12 +17,12 @@ import { Temporal } from "temporal-polyfill";
17
17
  import * as z from "zod/mini";
18
18
  export const conversationPropertiesCodec = z.codec(z.object({
19
19
  conversationId: z.string(),
20
- createdAt: z.iso.datetime(),
20
+ createdAt: z.optional(z.iso.datetime()),
21
21
  currentRunId: z.optional(z.string()),
22
22
  modelName: z.optional(z.string()),
23
23
  modelProviderId: z.optional(z.string()),
24
- modifiedAt: z.iso.datetime(),
25
- tag: z.string(),
24
+ modifiedAt: z.optional(z.iso.datetime()),
25
+ tag: z.optional(z.string()),
26
26
  title: z.optional(z.nullable(z.string())),
27
27
  }), z.object({
28
28
  createdAt: z.instanceof(Temporal.Instant),
@@ -35,14 +35,15 @@ export const conversationPropertiesCodec = z.codec(z.object({
35
35
  title: z.nullable(z.string()),
36
36
  }), {
37
37
  decode(v) {
38
+ const now = Temporal.Now.instant();
38
39
  return {
39
- createdAt: Temporal.Instant.from(v.createdAt),
40
+ createdAt: v.createdAt ? Temporal.Instant.from(v.createdAt) : now,
40
41
  currentRunId: v.currentRunId || null,
41
42
  id: v.conversationId,
42
43
  modelName: v.modelName || null,
43
44
  modelProviderId: v.modelProviderId || null,
44
- modifiedAt: Temporal.Instant.from(v.modifiedAt),
45
- tag: v.tag,
45
+ modifiedAt: v.modifiedAt ? Temporal.Instant.from(v.modifiedAt) : now,
46
+ tag: v.tag || "",
46
47
  title: v.title || null,
47
48
  };
48
49
  },
@@ -1 +1 @@
1
- {"version":3,"file":"conversationPropertiesCodec.js","sourceRoot":"","sources":["../../../../src/enterprise/ai/conversations/conversationPropertiesCodec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAChD,CAAC,CAAC,MAAM,CAAC;IACP,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;IAC3B,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACvC,UAAU,EAAE,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE;IAC5B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,KA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AAE,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE;YACjC,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,SAAS;YACzC,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,SAAS;YACnC,eAAe,EAAE,CAAC,CAAC,eAAe,IAAI,SAAS;YAC/C,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE;YACnC,GAAG,EAAE,CAAC,CAAC,GAAG;YACV,KAAK,EAAE,CAAC,CAAC,KAAK;SACf,CAAC;IACJ,CAAC;CACF,CACF,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\";\nimport * as z from \"zod/mini\";\n\nexport const conversationPropertiesCodec = z.codec(\n z.object({\n conversationId: z.string(),\n createdAt: z.iso.datetime(),\n currentRunId: z.optional(z.string()),\n modelName: z.optional(z.string()),\n modelProviderId: z.optional(z.string()),\n modifiedAt: z.iso.datetime(),\n tag: z.string(),\n title: z.optional(z.nullable(z.string())),\n }),\n z.object({\n createdAt: z.instanceof(Temporal.Instant),\n currentRunId: z.nullable(z.string()),\n id: z.string(),\n modelName: z.nullable(z.string()),\n modelProviderId: z.nullable(z.string()),\n modifiedAt: z.instanceof(Temporal.Instant),\n tag: z.string(),\n title: z.nullable(z.string()),\n }),\n {\n decode(v) {\n return {\n createdAt: Temporal.Instant.from(v.createdAt),\n currentRunId: v.currentRunId || null,\n id: v.conversationId,\n modelName: v.modelName || null,\n modelProviderId: v.modelProviderId || null,\n modifiedAt: Temporal.Instant.from(v.modifiedAt),\n tag: v.tag,\n title: v.title || null,\n };\n },\n encode(v) {\n return {\n conversationId: v.id,\n createdAt: v.createdAt.toString(),\n currentRunId: v.currentRunId || undefined,\n modelName: v.modelName || undefined,\n modelProviderId: v.modelProviderId || undefined,\n modifiedAt: v.modifiedAt.toString(),\n tag: v.tag,\n title: v.title,\n };\n },\n },\n);\n\nexport type ConversationEntity = z.input<typeof conversationPropertiesCodec>;\n"]}
1
+ {"version":3,"file":"conversationPropertiesCodec.js","sourceRoot":"","sources":["../../../../src/enterprise/ai/conversations/conversationPropertiesCodec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAChD,CAAC,CAAC,MAAM,CAAC;IACP,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACvC,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpC,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,eAAe,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACvC,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;IACxC,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC3B,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;CAC1C,CAAC,EACF,CAAC,CAAC,MAA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AC,CAAC;QACN,OAAO;YACL,cAAc,EAAE,CAAC,CAAC,EAAE;YACpB,SAAS,EAAE,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE;YACjC,YAAY,EAAE,CAAC,CAAC,YAAY,IAAI,SAAS;YACzC,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,SAAS;YACnC,eAAe,EAAE,CAAC,CAAC,eAAe,IAAI,SAAS;YAC/C,UAAU,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE;YACnC,GAAG,EAAE,CAAC,CAAC,GAAG;YACV,KAAK,EAAE,CAAC,CAAC,KAAK;SACf,CAAC;IACJ,CAAC;CACF,CACF,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\";\nimport * as z from \"zod/mini\";\n\nexport const conversationPropertiesCodec = z.codec(\n z.object({\n conversationId: z.string(),\n createdAt: z.optional(z.iso.datetime()),\n currentRunId: z.optional(z.string()),\n modelName: z.optional(z.string()),\n modelProviderId: z.optional(z.string()),\n modifiedAt: z.optional(z.iso.datetime()),\n tag: z.optional(z.string()),\n title: z.optional(z.nullable(z.string())),\n }),\n z.object({\n createdAt: z.instanceof(Temporal.Instant),\n currentRunId: z.nullable(z.string()),\n id: z.string(),\n modelName: z.nullable(z.string()),\n modelProviderId: z.nullable(z.string()),\n modifiedAt: z.instanceof(Temporal.Instant),\n tag: z.string(),\n title: z.nullable(z.string()),\n }),\n {\n decode(v) {\n const now = Temporal.Now.instant();\n return {\n createdAt: v.createdAt ? Temporal.Instant.from(v.createdAt) : now,\n currentRunId: v.currentRunId || null,\n id: v.conversationId,\n modelName: v.modelName || null,\n modelProviderId: v.modelProviderId || null,\n modifiedAt: v.modifiedAt ? Temporal.Instant.from(v.modifiedAt) : now,\n tag: v.tag || \"\",\n title: v.title || null,\n };\n },\n encode(v) {\n return {\n conversationId: v.id,\n createdAt: v.createdAt.toString(),\n currentRunId: v.currentRunId || undefined,\n modelName: v.modelName || undefined,\n modelProviderId: v.modelProviderId || undefined,\n modifiedAt: v.modifiedAt.toString(),\n tag: v.tag,\n title: v.title,\n };\n },\n },\n);\n\nexport type ConversationEntity = z.input<typeof conversationPropertiesCodec>;\n"]}
@@ -19,17 +19,19 @@ export declare const createConversationCodec: z.ZodMiniCodec<z.ZodMiniObject<{
19
19
  modelName: z.ZodMiniOptional<z.ZodMiniString<string>>;
20
20
  modelProviderId: z.ZodMiniOptional<z.ZodMiniString<string>>;
21
21
  prompt: z.ZodMiniObject<{
22
+ acceptTaskNames: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
22
23
  approvals: z.ZodMiniOptional<z.ZodMiniObject<{
23
24
  allToolsAllowed: z.ZodMiniBoolean<boolean>;
24
25
  approvalNonce: z.ZodMiniString<string>;
25
26
  toolDecisions: z.ZodMiniArray<z.ZodMiniObject<{
27
+ allowInConversation: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
26
28
  approved: z.ZodMiniBoolean<boolean>;
27
29
  arguments: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniUnknown>;
30
+ catalogPath: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
28
31
  executionId: z.ZodMiniString<string>;
29
32
  name: z.ZodMiniString<string>;
30
33
  }, z.core.$strip>>;
31
34
  }, z.core.$strip>>;
32
- acceptTaskNames: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
33
35
  context: z.ZodMiniOptional<z.ZodMiniString<string>>;
34
36
  skillIds: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
35
37
  text: z.ZodMiniString<string>;
@@ -16068,28 +16068,34 @@ var DremioCloud = (() => {
16068
16068
  var identityTypeSchema = _enum(["REGULAR_USER", "SERVICE_USER"]);
16069
16069
  var userPropertiesInSchema = object({
16070
16070
  active: boolean2(),
16071
+ description: optional(nullable(string2())),
16071
16072
  firstName: optional(nullable(string2())),
16072
16073
  id: string2().check(_minLength(1)),
16073
16074
  identityType: optional(identityTypeSchema),
16074
16075
  lastName: optional(nullable(string2())),
16075
- name: string2()
16076
+ name: string2(),
16077
+ oauthClientId: optional(nullable(string2()))
16076
16078
  });
16077
16079
  var userPropertiesCodec = codec(userPropertiesInSchema, object({
16080
+ description: nullable(string2()),
16078
16081
  email: nullable(string2()),
16079
16082
  familyName: nullable(string2().check(_trim())),
16080
16083
  givenName: nullable(string2().check(_trim())),
16081
16084
  id: string2().check(_minLength(1)),
16082
16085
  identityType: optional(identityTypeSchema),
16086
+ oauthClientId: nullable(string2()),
16083
16087
  status: _enum(["ACTIVE", "INACTIVE"]),
16084
16088
  username: string2().check(_trim(), _minLength(1))
16085
16089
  }), {
16086
16090
  decode(v2) {
16087
16091
  return {
16092
+ description: v2.description || null,
16088
16093
  email: v2.name || null,
16089
16094
  familyName: v2.lastName || null,
16090
16095
  givenName: v2.firstName || null,
16091
16096
  id: v2.id,
16092
16097
  identityType: v2.identityType,
16098
+ oauthClientId: v2.oauthClientId || null,
16093
16099
  status: v2.active ? "ACTIVE" : "INACTIVE",
16094
16100
  username: v2.name
16095
16101
  };
@@ -16097,11 +16103,13 @@ var DremioCloud = (() => {
16097
16103
  encode(v2) {
16098
16104
  return {
16099
16105
  active: v2.status === "ACTIVE",
16106
+ description: v2.description || void 0,
16100
16107
  firstName: v2.givenName || void 0,
16101
16108
  id: v2.id,
16102
16109
  identityType: v2.identityType,
16103
16110
  lastName: v2.familyName || void 0,
16104
- name: v2.username
16111
+ name: v2.username,
16112
+ oauthClientId: v2.oauthClientId || void 0
16105
16113
  };
16106
16114
  }
16107
16115
  });
@@ -16110,20 +16118,24 @@ var DremioCloud = (() => {
16110
16118
  var User2 = class {
16111
16119
  // eslint-disable-next-line no-unused-private-class-members
16112
16120
  #config;
16121
+ description;
16113
16122
  email;
16114
16123
  familyName;
16115
16124
  givenName;
16116
16125
  id;
16117
16126
  identityType;
16127
+ oauthClientId;
16118
16128
  status;
16119
16129
  username;
16120
16130
  constructor(config3, properties) {
16121
16131
  this.#config = config3;
16132
+ this.description = properties.description;
16122
16133
  this.email = properties.email;
16123
16134
  this.familyName = properties.familyName;
16124
16135
  this.givenName = properties.givenName;
16125
16136
  this.id = properties.id;
16126
16137
  this.identityType = properties.identityType;
16138
+ this.oauthClientId = properties.oauthClientId;
16127
16139
  this.status = properties.status;
16128
16140
  this.username = properties.username;
16129
16141
  }
@@ -16349,6 +16361,185 @@ var DremioCloud = (() => {
16349
16361
  }
16350
16362
  };
16351
16363
 
16364
+ // dist/cloud/roles/Role.js
16365
+ var Role2 = class {
16366
+ id;
16367
+ name;
16368
+ type;
16369
+ description;
16370
+ constructor(properties) {
16371
+ this.id = properties.id;
16372
+ this.name = properties.name;
16373
+ this.type = properties.type;
16374
+ this.description = properties.description;
16375
+ }
16376
+ };
16377
+
16378
+ // dist/cloud/roles/RolesResource.js
16379
+ var RolesResource2 = class {
16380
+ #config;
16381
+ constructor(config3) {
16382
+ this.#config = config3;
16383
+ }
16384
+ list(params) {
16385
+ const buildQuery = (extra) => {
16386
+ const query = new URLSearchParams();
16387
+ if (params?.filter)
16388
+ query.set("filter", params.filter);
16389
+ if (params?.maxResults)
16390
+ query.set("maxResults", String(params.maxResults));
16391
+ if (params?.orderBy)
16392
+ query.set("orderBy", params.orderBy);
16393
+ if (extra?.pageToken)
16394
+ query.set("pageToken", extra.pageToken);
16395
+ return query;
16396
+ };
16397
+ const getPage = ({ pageToken, signal } = {}) => this.#config.v3Request(`roles?${buildQuery({ pageToken })}`, {
16398
+ headers: { Accept: "application/json" },
16399
+ signal
16400
+ }).map((res) => res.json()).map((page) => ({
16401
+ ...page,
16402
+ data: page.data.map((entity) => new Role2(entity))
16403
+ }));
16404
+ return {
16405
+ async *data({ signal } = {}) {
16406
+ const firstPageResult = await getPage({ signal }).promise;
16407
+ if (firstPageResult.isErr()) {
16408
+ throw firstPageResult.error;
16409
+ }
16410
+ let currentPage = firstPageResult.value;
16411
+ yield* currentPage.data;
16412
+ while (currentPage.nextPageToken) {
16413
+ currentPage = await getPage({
16414
+ pageToken: currentPage.nextPageToken,
16415
+ signal
16416
+ }).promise.then((result) => result.unwrap());
16417
+ yield* currentPage.data;
16418
+ }
16419
+ },
16420
+ getPage
16421
+ };
16422
+ }
16423
+ create(params, { signal } = {}) {
16424
+ return this.#config.v3Request("roles", {
16425
+ body: JSON.stringify(params),
16426
+ headers: {
16427
+ Accept: "application/json",
16428
+ "Content-Type": "application/json"
16429
+ },
16430
+ method: "POST",
16431
+ signal
16432
+ }).map((res) => res.json()).map((entity) => new Role2(entity));
16433
+ }
16434
+ retrieveById(id, { signal } = {}) {
16435
+ return this.#config.v3Request(`roles/${id}`, {
16436
+ headers: { Accept: "application/json" },
16437
+ signal
16438
+ }).map((res) => res.json()).map((entity) => new Role2(entity));
16439
+ }
16440
+ retrieveByName(name, { signal } = {}) {
16441
+ return this.#config.v3Request(`roles/names/${name}`, {
16442
+ headers: { Accept: "application/json" },
16443
+ signal
16444
+ }).map((res) => res.json()).map((entity) => new Role2(entity));
16445
+ }
16446
+ update(params, { signal } = {}) {
16447
+ return this.#config.v3Request(`roles/${params.id}`, {
16448
+ body: JSON.stringify(params),
16449
+ headers: {
16450
+ Accept: "application/json",
16451
+ "Content-Type": "application/json"
16452
+ },
16453
+ method: "PUT",
16454
+ signal
16455
+ }).map((res) => res.json()).map((entity) => new Role2(entity));
16456
+ }
16457
+ delete(id, { signal } = {}) {
16458
+ return this.#config.v3Request(`roles/${id}`, {
16459
+ method: "DELETE",
16460
+ signal
16461
+ });
16462
+ }
16463
+ listParentRoles(roleId, params, { signal } = {}) {
16464
+ const query = new URLSearchParams();
16465
+ if (params?.maxResults)
16466
+ query.set("maxResults", String(params.maxResults));
16467
+ if (params?.pageToken)
16468
+ query.set("pageToken", params.pageToken);
16469
+ return this.#config.v3Request(`roles/${roleId}/parent-roles?${query}`, {
16470
+ headers: { Accept: "application/json" },
16471
+ signal
16472
+ }).map((res) => res.json()).map((page) => ({ ...page, data: page.data.map((entity) => new Role2(entity)) }));
16473
+ }
16474
+ addParentRole(roleId, parentRoleId, { signal } = {}) {
16475
+ return this.#config.v3Request(`roles/${roleId}/parent-roles`, {
16476
+ body: JSON.stringify({ id: parentRoleId }),
16477
+ headers: {
16478
+ Accept: "application/json",
16479
+ "Content-Type": "application/json"
16480
+ },
16481
+ method: "POST",
16482
+ signal
16483
+ });
16484
+ }
16485
+ patchParentRoles(roleId, params, { signal } = {}) {
16486
+ return this.#config.v3Request(`roles/${roleId}/parent-roles`, {
16487
+ body: JSON.stringify(params),
16488
+ headers: {
16489
+ Accept: "application/json",
16490
+ "Content-Type": "application/json"
16491
+ },
16492
+ method: "PATCH",
16493
+ signal
16494
+ }).map((res) => res.json());
16495
+ }
16496
+ removeParentRole(roleId, parentRoleId, { signal } = {}) {
16497
+ return this.#config.v3Request(`roles/${roleId}/parent-roles/${parentRoleId}`, {
16498
+ method: "DELETE",
16499
+ signal
16500
+ });
16501
+ }
16502
+ listMembers(roleId, params, { signal } = {}) {
16503
+ const query = new URLSearchParams();
16504
+ if (params?.maxResults)
16505
+ query.set("maxResults", String(params.maxResults));
16506
+ if (params?.pageToken)
16507
+ query.set("pageToken", params.pageToken);
16508
+ return this.#config.v3Request(`roles/${roleId}/members?${query}`, {
16509
+ headers: { Accept: "application/json" },
16510
+ signal
16511
+ }).map((res) => res.json());
16512
+ }
16513
+ addMember(roleId, params, { signal } = {}) {
16514
+ return this.#config.v3Request(`roles/${roleId}/members`, {
16515
+ body: JSON.stringify(params),
16516
+ headers: {
16517
+ Accept: "application/json",
16518
+ "Content-Type": "application/json"
16519
+ },
16520
+ method: "POST",
16521
+ signal
16522
+ });
16523
+ }
16524
+ patchMembers(roleId, params, { signal } = {}) {
16525
+ return this.#config.v3Request(`roles/${roleId}/members`, {
16526
+ body: JSON.stringify(params),
16527
+ headers: {
16528
+ Accept: "application/json",
16529
+ "Content-Type": "application/json"
16530
+ },
16531
+ method: "PATCH",
16532
+ signal
16533
+ }).map((res) => res.json());
16534
+ }
16535
+ removeMember(roleId, memberId, { signal } = {}) {
16536
+ return this.#config.v3Request(`roles/${roleId}/members/${memberId}`, {
16537
+ method: "DELETE",
16538
+ signal
16539
+ });
16540
+ }
16541
+ };
16542
+
16352
16543
  // dist/enterprise/ai/chat/ChatSession.js
16353
16544
  var chatSessionInputSchema = object({
16354
16545
  id: string2(),
@@ -17276,17 +17467,19 @@ var DremioCloud = (() => {
17276
17467
  }
17277
17468
  };
17278
17469
  var createConversationPromptSchema = strictObject({
17470
+ acceptTaskNames: optional(array(string2())),
17279
17471
  approvals: optional(object({
17280
17472
  allToolsAllowed: boolean2(),
17281
17473
  approvalNonce: string2(),
17282
17474
  toolDecisions: array(object({
17475
+ allowInConversation: optional(boolean2()),
17283
17476
  approved: boolean2(),
17284
17477
  arguments: record(string2(), unknown()),
17478
+ catalogPath: optional(array(string2())),
17285
17479
  executionId: string2(),
17286
17480
  name: string2()
17287
17481
  }))
17288
17482
  })),
17289
- acceptTaskNames: optional(array(string2())),
17290
17483
  context: optional(string2()),
17291
17484
  skillIds: optional(array(string2())),
17292
17485
  text: string2()
@@ -17684,12 +17877,12 @@ var DremioCloud = (() => {
17684
17877
  // dist/enterprise/ai/conversations/conversationPropertiesCodec.js
17685
17878
  var conversationPropertiesCodec = codec(object({
17686
17879
  conversationId: string2(),
17687
- createdAt: iso_exports.datetime(),
17880
+ createdAt: optional(iso_exports.datetime()),
17688
17881
  currentRunId: optional(string2()),
17689
17882
  modelName: optional(string2()),
17690
17883
  modelProviderId: optional(string2()),
17691
- modifiedAt: iso_exports.datetime(),
17692
- tag: string2(),
17884
+ modifiedAt: optional(iso_exports.datetime()),
17885
+ tag: optional(string2()),
17693
17886
  title: optional(nullable(string2()))
17694
17887
  }), object({
17695
17888
  createdAt: _instanceof(Xn.Instant),
@@ -17702,14 +17895,15 @@ var DremioCloud = (() => {
17702
17895
  title: nullable(string2())
17703
17896
  }), {
17704
17897
  decode(v2) {
17898
+ const now = Xn.Now.instant();
17705
17899
  return {
17706
- createdAt: Xn.Instant.from(v2.createdAt),
17900
+ createdAt: v2.createdAt ? Xn.Instant.from(v2.createdAt) : now,
17707
17901
  currentRunId: v2.currentRunId || null,
17708
17902
  id: v2.conversationId,
17709
17903
  modelName: v2.modelName || null,
17710
17904
  modelProviderId: v2.modelProviderId || null,
17711
- modifiedAt: Xn.Instant.from(v2.modifiedAt),
17712
- tag: v2.tag,
17905
+ modifiedAt: v2.modifiedAt ? Xn.Instant.from(v2.modifiedAt) : now,
17906
+ tag: v2.tag || "",
17713
17907
  title: v2.title || null
17714
17908
  };
17715
17909
  },
@@ -23119,6 +23313,7 @@ ${err.message}`);
23119
23313
  roles;
23120
23314
  scripts;
23121
23315
  sql;
23316
+ _roles;
23122
23317
  _users;
23123
23318
  users;
23124
23319
  #resourceConfig;
@@ -23137,6 +23332,7 @@ ${err.message}`);
23137
23332
  this.roles = import_moize2.default.default((projectId) => new RolesResource(this.#resourceConfig(projectId)));
23138
23333
  this.scripts = import_moize2.default.default((projectId) => new EnterpriseScriptsResource(this.#resourceConfig(projectId)));
23139
23334
  this.sql = import_moize2.default.default((projectId) => new SqlResource(this.#resourceConfig(projectId)));
23335
+ this._roles = new RolesResource2(this.#resourceConfig());
23140
23336
  this._users = new UsersResource(this.#resourceConfig());
23141
23337
  this.users = import_moize2.default.default((projectId) => new CloudUsersResource(this.#resourceConfig(projectId)));
23142
23338
  }
@@ -16412,12 +16412,12 @@ var DremioEnterprise = (() => {
16412
16412
  // dist/enterprise/ai/conversations/conversationPropertiesCodec.js
16413
16413
  var conversationPropertiesCodec = codec(object({
16414
16414
  conversationId: string2(),
16415
- createdAt: iso_exports.datetime(),
16415
+ createdAt: optional(iso_exports.datetime()),
16416
16416
  currentRunId: optional(string2()),
16417
16417
  modelName: optional(string2()),
16418
16418
  modelProviderId: optional(string2()),
16419
- modifiedAt: iso_exports.datetime(),
16420
- tag: string2(),
16419
+ modifiedAt: optional(iso_exports.datetime()),
16420
+ tag: optional(string2()),
16421
16421
  title: optional(nullable(string2()))
16422
16422
  }), object({
16423
16423
  createdAt: _instanceof(Xn.Instant),
@@ -16430,14 +16430,15 @@ var DremioEnterprise = (() => {
16430
16430
  title: nullable(string2())
16431
16431
  }), {
16432
16432
  decode(v2) {
16433
+ const now = Xn.Now.instant();
16433
16434
  return {
16434
- createdAt: Xn.Instant.from(v2.createdAt),
16435
+ createdAt: v2.createdAt ? Xn.Instant.from(v2.createdAt) : now,
16435
16436
  currentRunId: v2.currentRunId || null,
16436
16437
  id: v2.conversationId,
16437
16438
  modelName: v2.modelName || null,
16438
16439
  modelProviderId: v2.modelProviderId || null,
16439
- modifiedAt: Xn.Instant.from(v2.modifiedAt),
16440
- tag: v2.tag,
16440
+ modifiedAt: v2.modifiedAt ? Xn.Instant.from(v2.modifiedAt) : now,
16441
+ tag: v2.tag || "",
16441
16442
  title: v2.title || null
16442
16443
  };
16443
16444
  },
@@ -16483,17 +16484,19 @@ var DremioEnterprise = (() => {
16483
16484
  }
16484
16485
  };
16485
16486
  var createConversationPromptSchema = strictObject({
16487
+ acceptTaskNames: optional(array(string2())),
16486
16488
  approvals: optional(object({
16487
16489
  allToolsAllowed: boolean2(),
16488
16490
  approvalNonce: string2(),
16489
16491
  toolDecisions: array(object({
16492
+ allowInConversation: optional(boolean2()),
16490
16493
  approved: boolean2(),
16491
16494
  arguments: record(string2(), unknown()),
16495
+ catalogPath: optional(array(string2())),
16492
16496
  executionId: string2(),
16493
16497
  name: string2()
16494
16498
  }))
16495
16499
  })),
16496
- acceptTaskNames: optional(array(string2())),
16497
16500
  context: optional(string2()),
16498
16501
  skillIds: optional(array(string2())),
16499
16502
  text: string2()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dremio/js-sdk",
3
- "version": "0.53.0",
3
+ "version": "0.55.0",
4
4
  "description": "JavaScript library for the Dremio API",
5
5
  "keywords": [
6
6
  "dremio",