@dremio/js-sdk 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cloud/interfaces.d.ts +3 -2
- package/dist/cloud/interfaces.js +2 -0
- package/dist/cloud/interfaces.js.map +1 -1
- package/dist/cloud/organizations/Organization.d.ts +145 -10
- package/dist/cloud/organizations/Organization.js +92 -9
- package/dist/cloud/organizations/Organization.js.map +1 -1
- package/dist/cloud/organizations/OrganizationsResource.d.ts +7 -5
- package/dist/cloud/organizations/OrganizationsResource.js +9 -4
- package/dist/cloud/organizations/OrganizationsResource.js.map +1 -1
- package/package.json +4 -2
- package/dist/cloud/organizations/organizationEntityToProperties.d.ts +0 -34
- package/dist/cloud/organizations/organizationEntityToProperties.js +0 -27
- package/dist/cloud/organizations/organizationEntityToProperties.js.map +0 -1
|
@@ -2,7 +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
|
|
5
|
+
import { Organization } from "./organizations/Organization.ts";
|
|
6
6
|
import type { Job, Reflection } from "../oss/interfaces.ts";
|
|
7
7
|
import type { EnterpriseScript } from "../enterprise/scripts/EnterpriseScript.ts";
|
|
8
8
|
import type { ReflectionSummary } from "../enterprise/reflections/ReflectionSummary.ts";
|
|
@@ -10,7 +10,8 @@ import type { Role } from "../enterprise/roles/Role.ts";
|
|
|
10
10
|
import type { BranchHeadVersionReference, BareCommitVersionReference, TagVersionReference, VersionReference } from "../oss/catalog/VersionReference.ts";
|
|
11
11
|
import type { JobResultsSchema } from "../oss/jobs/utils/JobResultsResponse.ts";
|
|
12
12
|
export type { ArcticCatalog, CloudUser, Engine, Project };
|
|
13
|
-
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, };
|
|
14
|
+
export { Organization };
|
|
14
15
|
export * from "../enterprise/catalog/CatalogObjects/index.ts";
|
|
15
16
|
export * from "../enterprise/catalog/CatalogReferences/index.ts";
|
|
16
17
|
export * from "../enterprise/catalog/catalogSearch/CatalogSearchResult.ts";
|
package/dist/cloud/interfaces.js
CHANGED
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { Organization } from "./organizations/Organization.js";
|
|
17
|
+
export { Organization };
|
|
16
18
|
export * from "../enterprise/catalog/CatalogObjects/index.js";
|
|
17
19
|
export * from "../enterprise/catalog/CatalogReferences/index.js";
|
|
18
20
|
export * from "../enterprise/catalog/catalogSearch/CatalogSearchResult.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/cloud/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../src/cloud/interfaces.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAMH,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AA0B/D,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,cAAc,+CAA+C,CAAC;AAC9D,cAAc,kDAAkD,CAAC;AACjE,cAAc,4DAA4D,CAAC;AAC3E,cAAc,+BAA+B,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 { 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};\nexport { Organization };\nexport * from \"../enterprise/catalog/CatalogObjects/index.ts\";\nexport * from \"../enterprise/catalog/CatalogReferences/index.ts\";\nexport * from \"../enterprise/catalog/catalogSearch/CatalogSearchResult.ts\";\nexport * from \"../enterprise/grants/Grant.ts\";\n"]}
|
|
@@ -1,13 +1,148 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from "zod/mini";
|
|
2
|
+
import { Temporal } from "temporal-polyfill";
|
|
3
|
+
import type { V2Config } from "../../common/Config.ts";
|
|
4
|
+
export declare const organizationPropertiesCodec: z.ZodMiniCodec<z.ZodMiniObject<{
|
|
5
|
+
auditDestinationCloudType: z.ZodMiniEnum<{
|
|
6
|
+
AWS: "AWS";
|
|
7
|
+
AZURE: "AZURE";
|
|
8
|
+
}>;
|
|
9
|
+
auditDestinationCredentials: z.ZodMiniObject<{
|
|
10
|
+
accessKeyId: z.ZodMiniString<string>;
|
|
11
|
+
secretAccessKey: z.ZodMiniString<string>;
|
|
12
|
+
type: z.ZodMiniEnum<{
|
|
13
|
+
ACCESS_KEY: "ACCESS_KEY";
|
|
14
|
+
AZURE_ACTIVE_DIRECTORY: "AZURE_ACTIVE_DIRECTORY";
|
|
15
|
+
IAM_ROLE: "IAM_ROLE";
|
|
16
|
+
}>;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
auditDestinationPath: z.ZodMiniString<string>;
|
|
19
|
+
cloudTags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
20
|
+
key: z.ZodMiniString<string>;
|
|
21
|
+
value: z.ZodMiniString<string>;
|
|
22
|
+
}, z.core.$strip>>>;
|
|
23
|
+
createdAt: z.ZodMiniString<string>;
|
|
24
|
+
createdBy: z.ZodMiniString<string>;
|
|
25
|
+
defaultProjectId: z.ZodMiniString<string>;
|
|
26
|
+
id: z.ZodMiniString<string>;
|
|
27
|
+
isCreatedWithCFT: z.ZodMiniBoolean<boolean>;
|
|
28
|
+
modifiedAt: z.ZodMiniString<string>;
|
|
29
|
+
modifiedBy: z.ZodMiniString<string>;
|
|
30
|
+
name: z.ZodMiniString<string>;
|
|
31
|
+
state: z.ZodMiniEnum<{
|
|
32
|
+
FAILED: "FAILED";
|
|
33
|
+
INVALID: "INVALID";
|
|
34
|
+
ACTIVE: "ACTIVE";
|
|
35
|
+
DELETED: "DELETED";
|
|
36
|
+
CFT_STARTED: "CFT_STARTED";
|
|
37
|
+
CFT_COMPLETE: "CFT_COMPLETE";
|
|
38
|
+
COMMISSIONING: "COMMISSIONING";
|
|
39
|
+
MARK_ROLLBACK: "MARK_ROLLBACK";
|
|
40
|
+
FIRST_CLOUD_ADDED: "FIRST_CLOUD_ADDED";
|
|
41
|
+
ROLLBACK_COMPLETED: "ROLLBACK_COMPLETED";
|
|
42
|
+
CFT_FINISH_TIMEOUT: "CFT_FINISH_TIMEOUT";
|
|
43
|
+
}>;
|
|
44
|
+
}, z.core.$strip>, z.ZodMiniObject<{
|
|
45
|
+
id: z.ZodMiniString<string>;
|
|
46
|
+
state: z.ZodMiniEnum<{
|
|
47
|
+
FAILED: "FAILED";
|
|
48
|
+
INVALID: "INVALID";
|
|
49
|
+
ACTIVE: "ACTIVE";
|
|
50
|
+
DELETED: "DELETED";
|
|
51
|
+
CFT_STARTED: "CFT_STARTED";
|
|
52
|
+
CFT_COMPLETE: "CFT_COMPLETE";
|
|
53
|
+
COMMISSIONING: "COMMISSIONING";
|
|
54
|
+
MARK_ROLLBACK: "MARK_ROLLBACK";
|
|
55
|
+
FIRST_CLOUD_ADDED: "FIRST_CLOUD_ADDED";
|
|
56
|
+
ROLLBACK_COMPLETED: "ROLLBACK_COMPLETED";
|
|
57
|
+
CFT_FINISH_TIMEOUT: "CFT_FINISH_TIMEOUT";
|
|
58
|
+
}>;
|
|
59
|
+
createdBy: z.ZodMiniString<string>;
|
|
60
|
+
modifiedBy: z.ZodMiniString<string>;
|
|
61
|
+
auditDestinationCloudType: z.ZodMiniEnum<{
|
|
62
|
+
AWS: "AWS";
|
|
63
|
+
AZURE: "AZURE";
|
|
64
|
+
}>;
|
|
65
|
+
auditDestinationCredentials: z.ZodMiniObject<{
|
|
66
|
+
accessKeyId: z.ZodMiniString<string>;
|
|
67
|
+
secretAccessKey: z.ZodMiniString<string>;
|
|
68
|
+
type: z.ZodMiniEnum<{
|
|
69
|
+
ACCESS_KEY: "ACCESS_KEY";
|
|
70
|
+
AZURE_ACTIVE_DIRECTORY: "AZURE_ACTIVE_DIRECTORY";
|
|
71
|
+
IAM_ROLE: "IAM_ROLE";
|
|
72
|
+
}>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
auditDestinationPath: z.ZodMiniString<string>;
|
|
75
|
+
defaultProjectId: z.ZodMiniString<string>;
|
|
76
|
+
_isCreatedWithCFT: z.ZodMiniBoolean<boolean>;
|
|
77
|
+
cloudTags: z.ZodMiniArray<z.ZodMiniObject<{
|
|
78
|
+
key: z.ZodMiniString<string>;
|
|
79
|
+
value: z.ZodMiniString<string>;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
createdAt: z.ZodMiniCustom<Temporal.Instant, Temporal.Instant>;
|
|
82
|
+
modifiedAt: z.ZodMiniCustom<Temporal.Instant, Temporal.Instant>;
|
|
83
|
+
name: z.ZodMiniString<string>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
type OrganizationProperties = z.output<typeof organizationPropertiesCodec>;
|
|
2
86
|
export declare class Organization implements OrganizationProperties {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
87
|
+
#private;
|
|
88
|
+
readonly auditDestinationCloudType: OrganizationProperties["auditDestinationCloudType"];
|
|
89
|
+
readonly auditDestinationCredentials: OrganizationProperties["auditDestinationCredentials"];
|
|
90
|
+
readonly auditDestinationPath: OrganizationProperties["auditDestinationPath"];
|
|
91
|
+
readonly cloudTags: OrganizationProperties["cloudTags"];
|
|
92
|
+
readonly createdAt: OrganizationProperties["createdAt"];
|
|
93
|
+
readonly createdBy: OrganizationProperties["createdBy"];
|
|
94
|
+
readonly defaultProjectId: OrganizationProperties["defaultProjectId"];
|
|
95
|
+
readonly id: OrganizationProperties["id"];
|
|
96
|
+
readonly modifiedAt: OrganizationProperties["modifiedAt"];
|
|
97
|
+
readonly modifiedBy: OrganizationProperties["modifiedBy"];
|
|
98
|
+
readonly name: OrganizationProperties["name"];
|
|
99
|
+
readonly state: OrganizationProperties["state"];
|
|
100
|
+
/**
|
|
101
|
+
* @hidden
|
|
102
|
+
*/
|
|
103
|
+
readonly _isCreatedWithCFT: OrganizationProperties["_isCreatedWithCFT"];
|
|
104
|
+
constructor(config: V2Config, properties: OrganizationProperties);
|
|
12
105
|
get settled(): boolean;
|
|
106
|
+
static schema: z.ZodMiniObject<{
|
|
107
|
+
id: z.ZodMiniString<string>;
|
|
108
|
+
state: z.ZodMiniEnum<{
|
|
109
|
+
FAILED: "FAILED";
|
|
110
|
+
INVALID: "INVALID";
|
|
111
|
+
ACTIVE: "ACTIVE";
|
|
112
|
+
DELETED: "DELETED";
|
|
113
|
+
CFT_STARTED: "CFT_STARTED";
|
|
114
|
+
CFT_COMPLETE: "CFT_COMPLETE";
|
|
115
|
+
COMMISSIONING: "COMMISSIONING";
|
|
116
|
+
MARK_ROLLBACK: "MARK_ROLLBACK";
|
|
117
|
+
FIRST_CLOUD_ADDED: "FIRST_CLOUD_ADDED";
|
|
118
|
+
ROLLBACK_COMPLETED: "ROLLBACK_COMPLETED";
|
|
119
|
+
CFT_FINISH_TIMEOUT: "CFT_FINISH_TIMEOUT";
|
|
120
|
+
}>;
|
|
121
|
+
createdBy: z.ZodMiniString<string>;
|
|
122
|
+
modifiedBy: z.ZodMiniString<string>;
|
|
123
|
+
auditDestinationCloudType: z.ZodMiniEnum<{
|
|
124
|
+
AWS: "AWS";
|
|
125
|
+
AZURE: "AZURE";
|
|
126
|
+
}>;
|
|
127
|
+
auditDestinationCredentials: z.ZodMiniObject<{
|
|
128
|
+
accessKeyId: z.ZodMiniString<string>;
|
|
129
|
+
secretAccessKey: z.ZodMiniString<string>;
|
|
130
|
+
type: z.ZodMiniEnum<{
|
|
131
|
+
ACCESS_KEY: "ACCESS_KEY";
|
|
132
|
+
AZURE_ACTIVE_DIRECTORY: "AZURE_ACTIVE_DIRECTORY";
|
|
133
|
+
IAM_ROLE: "IAM_ROLE";
|
|
134
|
+
}>;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
auditDestinationPath: z.ZodMiniString<string>;
|
|
137
|
+
defaultProjectId: z.ZodMiniString<string>;
|
|
138
|
+
_isCreatedWithCFT: z.ZodMiniBoolean<boolean>;
|
|
139
|
+
cloudTags: z.ZodMiniArray<z.ZodMiniObject<{
|
|
140
|
+
key: z.ZodMiniString<string>;
|
|
141
|
+
value: z.ZodMiniString<string>;
|
|
142
|
+
}, z.core.$strip>>;
|
|
143
|
+
createdAt: z.ZodMiniCustom<Temporal.Instant, Temporal.Instant>;
|
|
144
|
+
modifiedAt: z.ZodMiniCustom<Temporal.Instant, Temporal.Instant>;
|
|
145
|
+
name: z.ZodMiniString<string>;
|
|
146
|
+
}, z.core.$strip>;
|
|
13
147
|
}
|
|
148
|
+
export {};
|
|
@@ -13,7 +13,81 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import * as z from "zod/mini";
|
|
17
|
+
import { Temporal } from "temporal-polyfill";
|
|
18
|
+
const organizationPropertiesInSchema = z.object({
|
|
19
|
+
auditDestinationCloudType: z.enum(["AWS", "AZURE"]),
|
|
20
|
+
auditDestinationCredentials: z.object({
|
|
21
|
+
accessKeyId: z.string(),
|
|
22
|
+
secretAccessKey: z.string(),
|
|
23
|
+
type: z.enum(["ACCESS_KEY", "AZURE_ACTIVE_DIRECTORY", "IAM_ROLE"]),
|
|
24
|
+
}),
|
|
25
|
+
auditDestinationPath: z.string(),
|
|
26
|
+
cloudTags: z.optional(z.array(z.object({
|
|
27
|
+
key: z.string(),
|
|
28
|
+
value: z.string(),
|
|
29
|
+
}))),
|
|
30
|
+
createdAt: z.string(),
|
|
31
|
+
createdBy: z.string(),
|
|
32
|
+
defaultProjectId: z.string(),
|
|
33
|
+
id: z.string(),
|
|
34
|
+
isCreatedWithCFT: z.boolean(),
|
|
35
|
+
modifiedAt: z.string(),
|
|
36
|
+
modifiedBy: z.string(),
|
|
37
|
+
name: z.string(),
|
|
38
|
+
state: z.enum([
|
|
39
|
+
"ACTIVE",
|
|
40
|
+
"FAILED",
|
|
41
|
+
"DELETED",
|
|
42
|
+
"INVALID",
|
|
43
|
+
"CFT_STARTED",
|
|
44
|
+
"CFT_COMPLETE",
|
|
45
|
+
"COMMISSIONING",
|
|
46
|
+
"MARK_ROLLBACK",
|
|
47
|
+
"FIRST_CLOUD_ADDED",
|
|
48
|
+
"ROLLBACK_COMPLETED",
|
|
49
|
+
"CFT_FINISH_TIMEOUT",
|
|
50
|
+
]),
|
|
51
|
+
});
|
|
52
|
+
export const organizationPropertiesCodec = z.codec(organizationPropertiesInSchema, z.extend(z.omit(organizationPropertiesInSchema, {
|
|
53
|
+
cloudTags: true,
|
|
54
|
+
createdAt: true,
|
|
55
|
+
isCreatedWithCFT: true,
|
|
56
|
+
modifiedAt: true,
|
|
57
|
+
name: true,
|
|
58
|
+
}), {
|
|
59
|
+
_isCreatedWithCFT: z.boolean(),
|
|
60
|
+
cloudTags: z.array(z.object({
|
|
61
|
+
key: z.string(),
|
|
62
|
+
value: z.string(),
|
|
63
|
+
})),
|
|
64
|
+
createdAt: z.instanceof(Temporal.Instant),
|
|
65
|
+
modifiedAt: z.instanceof(Temporal.Instant),
|
|
66
|
+
name: z.string(),
|
|
67
|
+
}), {
|
|
68
|
+
decode(v) {
|
|
69
|
+
return {
|
|
70
|
+
...v,
|
|
71
|
+
_isCreatedWithCFT: v.isCreatedWithCFT,
|
|
72
|
+
cloudTags: v.cloudTags ?? [],
|
|
73
|
+
createdAt: Temporal.Instant.from(new Date(v.createdAt).toISOString()),
|
|
74
|
+
modifiedAt: Temporal.Instant.from(new Date(v.modifiedAt).toISOString()),
|
|
75
|
+
};
|
|
76
|
+
},
|
|
77
|
+
encode(v) {
|
|
78
|
+
return {
|
|
79
|
+
...v,
|
|
80
|
+
createdAt: Temporal.Instant.toString(),
|
|
81
|
+
isCreatedWithCFT: v._isCreatedWithCFT,
|
|
82
|
+
modifiedAt: Temporal.Instant.toString(),
|
|
83
|
+
};
|
|
84
|
+
},
|
|
85
|
+
});
|
|
16
86
|
export class Organization {
|
|
87
|
+
auditDestinationCloudType;
|
|
88
|
+
auditDestinationCredentials;
|
|
89
|
+
auditDestinationPath;
|
|
90
|
+
cloudTags;
|
|
17
91
|
createdAt;
|
|
18
92
|
createdBy;
|
|
19
93
|
defaultProjectId;
|
|
@@ -22,25 +96,34 @@ export class Organization {
|
|
|
22
96
|
modifiedBy;
|
|
23
97
|
name;
|
|
24
98
|
state;
|
|
25
|
-
|
|
99
|
+
/**
|
|
100
|
+
* @hidden
|
|
101
|
+
*/
|
|
102
|
+
_isCreatedWithCFT;
|
|
103
|
+
// eslint-disable-next-line no-unused-private-class-members
|
|
104
|
+
#config;
|
|
105
|
+
constructor(config, properties) {
|
|
106
|
+
this.auditDestinationCloudType = properties.auditDestinationCloudType;
|
|
107
|
+
this.auditDestinationCredentials = properties.auditDestinationCredentials;
|
|
108
|
+
this.auditDestinationPath = properties.auditDestinationPath;
|
|
109
|
+
this.cloudTags = properties.cloudTags;
|
|
26
110
|
this.createdAt = properties.createdAt;
|
|
27
111
|
this.createdBy = properties.createdBy;
|
|
28
112
|
this.defaultProjectId = properties.defaultProjectId;
|
|
29
113
|
this.id = properties.id;
|
|
114
|
+
this._isCreatedWithCFT = properties._isCreatedWithCFT;
|
|
30
115
|
this.modifiedAt = properties.modifiedAt;
|
|
31
116
|
this.modifiedBy = properties.modifiedBy;
|
|
32
117
|
this.name = properties.name;
|
|
33
118
|
this.state = properties.state;
|
|
119
|
+
this.#config = config;
|
|
34
120
|
}
|
|
35
121
|
get settled() {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
case "INVALID":
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
|
-
return false;
|
|
122
|
+
return (this.state === "ACTIVE" ||
|
|
123
|
+
this.state === "DELETED" ||
|
|
124
|
+
this.state === "FAILED" ||
|
|
125
|
+
this.state === "INVALID");
|
|
44
126
|
}
|
|
127
|
+
static schema = organizationPropertiesCodec.def.out;
|
|
45
128
|
}
|
|
46
129
|
//# sourceMappingURL=Organization.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Organization.js","sourceRoot":"","sources":["../../../src/cloud/organizations/Organization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"Organization.js","sourceRoot":"","sources":["../../../src/cloud/organizations/Organization.ts"],"names":[],"mappings":"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","sourcesContent":["/*\n * Copyright (C) 2024-2025 Dremio Corporation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as z from \"zod/mini\";\nimport { Temporal } from \"temporal-polyfill\";\nimport type { V2Config } from \"../../common/Config.ts\";\n\nconst organizationPropertiesInSchema = z.object({\n auditDestinationCloudType: z.enum([\"AWS\", \"AZURE\"]),\n auditDestinationCredentials: z.object({\n accessKeyId: z.string(),\n secretAccessKey: z.string(),\n type: z.enum([\"ACCESS_KEY\", \"AZURE_ACTIVE_DIRECTORY\", \"IAM_ROLE\"]),\n }),\n auditDestinationPath: z.string(),\n cloudTags: z.optional(\n z.array(\n z.object({\n key: z.string(),\n value: z.string(),\n }),\n ),\n ),\n createdAt: z.string(),\n createdBy: z.string(),\n defaultProjectId: z.string(),\n id: z.string(),\n isCreatedWithCFT: z.boolean(),\n modifiedAt: z.string(),\n modifiedBy: z.string(),\n name: z.string(),\n state: z.enum([\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});\n\nexport const organizationPropertiesCodec = z.codec(\n organizationPropertiesInSchema,\n z.extend(\n z.omit(organizationPropertiesInSchema, {\n cloudTags: true,\n createdAt: true,\n isCreatedWithCFT: true,\n modifiedAt: true,\n name: true,\n }),\n {\n _isCreatedWithCFT: z.boolean(),\n cloudTags: z.array(\n z.object({\n key: z.string(),\n value: z.string(),\n }),\n ),\n createdAt: z.instanceof(Temporal.Instant),\n modifiedAt: z.instanceof(Temporal.Instant),\n name: z.string(),\n },\n ),\n {\n decode(v) {\n return {\n ...v,\n _isCreatedWithCFT: v.isCreatedWithCFT,\n cloudTags: v.cloudTags ?? [],\n createdAt: Temporal.Instant.from(new Date(v.createdAt).toISOString()),\n modifiedAt: Temporal.Instant.from(new Date(v.modifiedAt).toISOString()),\n };\n },\n encode(v) {\n return {\n ...v,\n createdAt: Temporal.Instant.toString(),\n isCreatedWithCFT: v._isCreatedWithCFT,\n modifiedAt: Temporal.Instant.toString(),\n };\n },\n },\n);\n\ntype OrganizationProperties = z.output<typeof organizationPropertiesCodec>;\n\nexport class Organization implements OrganizationProperties {\n readonly auditDestinationCloudType: OrganizationProperties[\"auditDestinationCloudType\"];\n readonly auditDestinationCredentials: OrganizationProperties[\"auditDestinationCredentials\"];\n readonly auditDestinationPath: OrganizationProperties[\"auditDestinationPath\"];\n readonly cloudTags: OrganizationProperties[\"cloudTags\"];\n readonly createdAt: OrganizationProperties[\"createdAt\"];\n readonly createdBy: OrganizationProperties[\"createdBy\"];\n readonly defaultProjectId: OrganizationProperties[\"defaultProjectId\"];\n readonly id: OrganizationProperties[\"id\"];\n readonly modifiedAt: OrganizationProperties[\"modifiedAt\"];\n readonly modifiedBy: OrganizationProperties[\"modifiedBy\"];\n readonly name: OrganizationProperties[\"name\"];\n readonly state: OrganizationProperties[\"state\"];\n\n /**\n * @hidden\n */\n readonly _isCreatedWithCFT: OrganizationProperties[\"_isCreatedWithCFT\"];\n\n // eslint-disable-next-line no-unused-private-class-members\n readonly #config: V2Config;\n\n constructor(config: V2Config, properties: OrganizationProperties) {\n this.auditDestinationCloudType = properties.auditDestinationCloudType;\n this.auditDestinationCredentials = properties.auditDestinationCredentials;\n this.auditDestinationPath = properties.auditDestinationPath;\n this.cloudTags = properties.cloudTags;\n this.createdAt = properties.createdAt;\n this.createdBy = properties.createdBy;\n this.defaultProjectId = properties.defaultProjectId;\n this.id = properties.id;\n this._isCreatedWithCFT = properties._isCreatedWithCFT;\n this.modifiedAt = properties.modifiedAt;\n this.modifiedBy = properties.modifiedBy;\n this.name = properties.name;\n this.state = properties.state;\n\n this.#config = config;\n }\n\n get settled(): boolean {\n return (\n this.state === \"ACTIVE\" ||\n this.state === \"DELETED\" ||\n this.state === \"FAILED\" ||\n this.state === \"INVALID\"\n );\n }\n\n static schema = organizationPropertiesCodec.def.out;\n}\n"]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import * as z from "zod/mini";
|
|
2
|
+
import type { ResourceConfig, V2Config } from "../../common/Config.ts";
|
|
3
|
+
import { Organization, organizationPropertiesCodec } from "./Organization.ts";
|
|
4
|
+
import type { SignalParam } from "../../common/Params.ts";
|
|
4
5
|
export declare class OrganizationsResource {
|
|
5
6
|
#private;
|
|
6
|
-
constructor(config: ResourceConfig &
|
|
7
|
-
|
|
7
|
+
constructor(config: ResourceConfig & V2Config);
|
|
8
|
+
retrieve({ signal }?: SignalParam): import("ts-results-es").AsyncResult<Organization, import("../index.ts").HttpError>;
|
|
9
|
+
_organizationFromEntity(entity: z.input<typeof organizationPropertiesCodec>): Organization;
|
|
8
10
|
}
|
|
@@ -13,16 +13,21 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
16
|
+
import * as z from "zod/mini";
|
|
17
|
+
import { Organization, organizationPropertiesCodec } from "./Organization.js";
|
|
18
18
|
export class OrganizationsResource {
|
|
19
|
-
// eslint-disable-next-line no-unused-private-class-members
|
|
20
19
|
#config;
|
|
21
20
|
constructor(config) {
|
|
22
21
|
this.#config = config;
|
|
23
22
|
}
|
|
23
|
+
retrieve({ signal } = {}) {
|
|
24
|
+
return this.#config
|
|
25
|
+
.v2Request("organizations", { headers: { Accept: "application/json" }, signal })
|
|
26
|
+
.map((res) => res.json())
|
|
27
|
+
.map((entity) => this._organizationFromEntity(entity));
|
|
28
|
+
}
|
|
24
29
|
_organizationFromEntity(entity) {
|
|
25
|
-
return new Organization(
|
|
30
|
+
return new Organization(this.#config, z.decode(organizationPropertiesCodec, entity));
|
|
26
31
|
}
|
|
27
32
|
}
|
|
28
33
|
//# sourceMappingURL=OrganizationsResource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrganizationsResource.js","sourceRoot":"","sources":["../../../src/cloud/organizations/OrganizationsResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"OrganizationsResource.js","sourceRoot":"","sources":["../../../src/cloud/organizations/OrganizationsResource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,OAAO,EAAE,YAAY,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAC;AAG9E,MAAM,OAAO,qBAAqB;IACvB,OAAO,CAA4B;IAE5C,YAAY,MAAiC;QAC3C,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IACxB,CAAC;IAED,QAAQ,CAAC,EAAE,MAAM,KAAkB,EAAE;QACnC,OAAO,IAAI,CAAC,OAAO;aAChB,SAAS,CAAC,eAAe,EAAE,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,kBAAkB,EAAE,EAAE,MAAM,EAAE,CAAC;aAC/E,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAA0D,CAAC;aAChF,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3D,CAAC;IAED,uBAAuB,CAAC,MAAmD;QACzE,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,2BAA2B,EAAE,MAAM,CAAC,CAAC,CAAC;IACvF,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 { ResourceConfig, V2Config } from \"../../common/Config.ts\";\nimport { Organization, organizationPropertiesCodec } from \"./Organization.ts\";\nimport type { SignalParam } from \"../../common/Params.ts\";\n\nexport class OrganizationsResource {\n readonly #config: ResourceConfig & V2Config;\n\n constructor(config: ResourceConfig & V2Config) {\n this.#config = config;\n }\n\n retrieve({ signal }: SignalParam = {}) {\n return this.#config\n .v2Request(\"organizations\", { headers: { Accept: \"application/json\" }, signal })\n .map((res) => res.json() as Promise<z.input<typeof organizationPropertiesCodec>>)\n .map((entity) => this._organizationFromEntity(entity));\n }\n\n _organizationFromEntity(entity: z.input<typeof organizationPropertiesCodec>) {\n return new Organization(this.#config, z.decode(organizationPropertiesCodec, entity));\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dremio/js-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "JavaScript library for the Dremio API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dremio",
|
|
@@ -34,10 +34,12 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"eventsource-parser": "^3.0.1",
|
|
36
36
|
"moize": "^6",
|
|
37
|
+
"nanoid": "^5",
|
|
37
38
|
"parse-ms": "^4",
|
|
38
39
|
"rxjs": "^7",
|
|
39
40
|
"temporal-polyfill": "^0.3.0",
|
|
40
|
-
"ts-results-es": "^5.0.1"
|
|
41
|
+
"ts-results-es": "^5.0.1",
|
|
42
|
+
"zod": "^4"
|
|
41
43
|
},
|
|
42
44
|
"devDependencies": {
|
|
43
45
|
"@eslint/compat": "^1.3.1",
|
|
@@ -1,34 +0,0 @@
|
|
|
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: "FAILED" | "INVALID" | "ACTIVE" | "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
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
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(new Date(entity.createdAt).toISOString()),
|
|
19
|
-
createdBy: entity.createdBy,
|
|
20
|
-
defaultProjectId: entity.defaultProjectId,
|
|
21
|
-
id: entity.id,
|
|
22
|
-
modifiedAt: Temporal.Instant.from(new Date(entity.modifiedAt).toISOString()),
|
|
23
|
-
modifiedBy: entity.modifiedBy,
|
|
24
|
-
name: entity.name,
|
|
25
|
-
state: entity.state,
|
|
26
|
-
});
|
|
27
|
-
//# sourceMappingURL=organizationEntityToProperties.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;IAC1E,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,IAAI,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;IAC5E,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(new Date(entity.createdAt).toISOString()),\n createdBy: entity.createdBy,\n defaultProjectId: entity.defaultProjectId,\n id: entity.id,\n modifiedAt: Temporal.Instant.from(new Date(entity.modifiedAt).toISOString()),\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"]}
|