@dremio/js-sdk 0.31.4 → 0.31.5

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.
@@ -27,7 +27,7 @@ export declare class Project implements ProjectInterface {
27
27
  update(properties: z.output<typeof projectUpdateSchema>): AsyncResult<Project, HttpError | z.core.util.SafeParseResult<z.output<typeof projectUpdateSchema>>["error"]>;
28
28
  get settled(): boolean;
29
29
  static updateSchema: z.ZodMiniObject<{
30
- credentials: z.ZodMiniOptional<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
30
+ credentials: z.ZodMiniOptional<z.ZodMiniOptional<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
31
31
  accessKeyId: z.ZodMiniString<string>;
32
32
  secretAccessKey: z.ZodMiniOptional<z.ZodMiniString<string>>;
33
33
  type: z.ZodMiniLiteral<"ACCESS_KEY">;
@@ -43,7 +43,7 @@ export declare class Project implements ProjectInterface {
43
43
  clientSecret: z.ZodMiniString<string>;
44
44
  tenantId: z.ZodMiniString<string>;
45
45
  type: z.ZodMiniLiteral<"AZURE_STORAGE_CLIENT_CREDENTIALS">;
46
- }, z.core.$strip>], "type">>;
46
+ }, z.core.$strip>], "type">>>;
47
47
  name: z.ZodMiniOptional<z.ZodMiniString<string>>;
48
48
  }, z.core.$strip>;
49
49
  }
@@ -7,7 +7,7 @@ export declare const projectPropertiesCodec: z.ZodMiniCodec<z.ZodMiniObject<{
7
7
  }>;
8
8
  createdAt: z.ZodMiniString<string>;
9
9
  createdBy: z.ZodMiniString<string>;
10
- credentials: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
10
+ credentials: z.ZodMiniOptional<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
11
11
  accessKeyId: z.ZodMiniString<string>;
12
12
  secretAccessKey: z.ZodMiniOptional<z.ZodMiniString<string>>;
13
13
  type: z.ZodMiniLiteral<"ACCESS_KEY">;
@@ -23,7 +23,7 @@ export declare const projectPropertiesCodec: z.ZodMiniCodec<z.ZodMiniObject<{
23
23
  clientSecret: z.ZodMiniString<string>;
24
24
  tenantId: z.ZodMiniString<string>;
25
25
  type: z.ZodMiniLiteral<"AZURE_STORAGE_CLIENT_CREDENTIALS">;
26
- }, z.core.$strip>], "type">;
26
+ }, z.core.$strip>], "type">>;
27
27
  id: z.ZodMiniString<string>;
28
28
  jdbcConnectionString: z.ZodMiniOptional<z.ZodMiniString<string>>;
29
29
  lastStateError: z.ZodMiniOptional<z.ZodMiniObject<{
@@ -72,7 +72,7 @@ export declare const projectPropertiesCodec: z.ZodMiniCodec<z.ZodMiniObject<{
72
72
  AWS: "AWS";
73
73
  AZURE: "AZURE";
74
74
  }>;
75
- credentials: z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
75
+ credentials: z.ZodMiniOptional<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
76
76
  accessKeyId: z.ZodMiniString<string>;
77
77
  secretAccessKey: z.ZodMiniOptional<z.ZodMiniString<string>>;
78
78
  type: z.ZodMiniLiteral<"ACCESS_KEY">;
@@ -88,7 +88,7 @@ export declare const projectPropertiesCodec: z.ZodMiniCodec<z.ZodMiniObject<{
88
88
  clientSecret: z.ZodMiniString<string>;
89
89
  tenantId: z.ZodMiniString<string>;
90
90
  type: z.ZodMiniLiteral<"AZURE_STORAGE_CLIENT_CREDENTIALS">;
91
- }, z.core.$strip>], "type">;
91
+ }, z.core.$strip>], "type">>;
92
92
  jdbcConnectionString: z.ZodMiniOptional<z.ZodMiniString<string>>;
93
93
  lastStateError: z.ZodMiniOptional<z.ZodMiniObject<{
94
94
  error: z.ZodMiniString<string>;
@@ -101,7 +101,7 @@ export declare const projectPropertiesCodec: z.ZodMiniCodec<z.ZodMiniObject<{
101
101
  modifiedAt: z.ZodMiniCustom<Date, Date>;
102
102
  }, z.core.$strip>>;
103
103
  export declare const projectUpdateSchema: z.ZodMiniObject<{
104
- credentials: z.ZodMiniOptional<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
104
+ credentials: z.ZodMiniOptional<z.ZodMiniOptional<z.ZodMiniDiscriminatedUnion<[z.ZodMiniObject<{
105
105
  accessKeyId: z.ZodMiniString<string>;
106
106
  secretAccessKey: z.ZodMiniOptional<z.ZodMiniString<string>>;
107
107
  type: z.ZodMiniLiteral<"ACCESS_KEY">;
@@ -117,6 +117,6 @@ export declare const projectUpdateSchema: z.ZodMiniObject<{
117
117
  clientSecret: z.ZodMiniString<string>;
118
118
  tenantId: z.ZodMiniString<string>;
119
119
  type: z.ZodMiniLiteral<"AZURE_STORAGE_CLIENT_CREDENTIALS">;
120
- }, z.core.$strip>], "type">>;
120
+ }, z.core.$strip>], "type">>>;
121
121
  name: z.ZodMiniOptional<z.ZodMiniString<string>>;
122
122
  }, z.core.$strip>;
@@ -19,7 +19,7 @@ const sharedProjectPropertiesInSchema = z.object({
19
19
  cloudType: z.enum(["AWS", "AZURE"]),
20
20
  createdAt: z.string(),
21
21
  createdBy: z.string(),
22
- credentials: z.discriminatedUnion("type", [
22
+ credentials: z.optional(z.discriminatedUnion("type", [
23
23
  z.object({
24
24
  accessKeyId: z.string(),
25
25
  secretAccessKey: z.optional(z.string()),
@@ -39,7 +39,7 @@ const sharedProjectPropertiesInSchema = z.object({
39
39
  tenantId: z.string(),
40
40
  type: z.literal("AZURE_STORAGE_CLIENT_CREDENTIALS"),
41
41
  }),
42
- ]),
42
+ ])),
43
43
  id: z.string(),
44
44
  jdbcConnectionString: z.optional(z.string()),
45
45
  lastStateError: z.optional(z.object({ error: z.string(), timestamp: z.number() })),
@@ -1 +1 @@
1
- {"version":3,"file":"projectPropertiesCodec.js","sourceRoot":"","sources":["../../../src/cloud/projects/projectPropertiesCodec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,CAAC,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F,MAAM,sBAAsB,GAAG;IAC7B,QAAQ;IACR,KAAK;IACL,OAAO;IACP,QAAQ;IACR,MAAM;IACN,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,QAAQ;CACA,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\nconst sharedProjectPropertiesInSchema = z.object({\n cloudId: z.string(),\n cloudType: z.enum([\"AWS\", \"AZURE\"]),\n createdAt: z.string(),\n createdBy: z.string(),\n credentials: z.discriminatedUnion(\"type\", [\n z.object({\n accessKeyId: z.string(),\n secretAccessKey: z.optional(z.string()),\n type: z.literal(\"ACCESS_KEY\"),\n }),\n z.object({\n externalId: z.string(),\n externalIdSignature: z.optional(z.string()),\n instanceProfileArn: z.optional(z.nullable(z.string())),\n roleArn: z.string(),\n type: z.literal(\"IAM_ROLE\"),\n }),\n z.object({\n accountName: z.string(),\n clientId: z.string(),\n clientSecret: z.string(),\n tenantId: z.string(),\n type: z.literal(\"AZURE_STORAGE_CLIENT_CREDENTIALS\"),\n }),\n ]),\n id: z.string(),\n jdbcConnectionString: z.optional(z.string()),\n lastStateError: z.optional(z.object({ error: z.string(), timestamp: z.number() })),\n modifiedAt: z.string(),\n modifiedBy: z.string(),\n name: z.string(),\n numberOfEngines: z.number().check(z.int(), z.minimum(0)),\n primaryCatalog: z.optional(z.string()),\n projectStore: z.optional(z.string()),\n state: z.enum([\n \"ACTIVATING\",\n \"ACTIVE\",\n \"ARCHIVED\",\n \"ARCHIVING\",\n \"CREATING\",\n \"DEACTIVATING\",\n \"INACTIVE\",\n \"RESTORING\",\n ]),\n type: z.enum([\"QUERY_ENGINE\"]),\n});\n\nexport const projectPropertiesCodec = z.codec(\n sharedProjectPropertiesInSchema,\n z.extend(z.omit(sharedProjectPropertiesInSchema, { createdAt: true, modifiedAt: true }), {\n createdAt: z.instanceof(Date),\n modifiedAt: z.instanceof(Date),\n }),\n {\n decode(v) {\n const { createdAt, modifiedAt, ...rest } = v;\n return {\n ...rest,\n createdAt: new Date(createdAt),\n modifiedAt: new Date(modifiedAt),\n };\n },\n encode(v) {\n const { createdAt, modifiedAt, ...rest } = v;\n return {\n ...rest,\n createdAt: createdAt.toString(),\n modifiedAt: modifiedAt.toString(),\n };\n },\n },\n);\n\nexport const projectUpdateSchema = z.partial(\n z.extend(z.pick(projectPropertiesCodec.def.in, { credentials: true }), {\n name: z.string().check(\n z.minLength(6, \"Project name must be at least 6 characters\"),\n z.maxLength(30, \"Project name must be at most 30 characters\"),\n z.regex(\n /^[a-z][a-z0-9-]*[a-z0-9]$/,\n \"Project name must start with a letter, contain only lowercase letters, numbers, and hyphens, and cannot end with a hyphen\",\n ),\n z.superRefine((val, ctx) => {\n const foundWord = projectDisallowedWords.find((word) => val.includes(word));\n if (foundWord) {\n ctx.addIssue({\n code: \"custom\",\n input: val,\n message: `Project name cannot contain the word \"${foundWord}\"`,\n });\n }\n }),\n ),\n }),\n);\n\nconst projectDisallowedWords = [\n \"dremio\",\n \"ssl\",\n \"admin\",\n \"system\",\n \"null\",\n \"undefined\",\n \"static\",\n \"assets\",\n \"login\",\n \"logout\",\n] as const;\n"]}
1
+ {"version":3,"file":"projectPropertiesCodec.js","sourceRoot":"","sources":["../../../src/cloud/projects/projectPropertiesCodec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,CAAC,MAAM,UAAU,CAAC;AAE9B,MAAM,+BAA+B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,CAAC,CA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ACH;CACF,CAAC,CACH,CAAC;AAEF,MAAM,sBAAsB,GAAG;IAC7B,QAAQ;IACR,KAAK;IACL,OAAO;IACP,QAAQ;IACR,MAAM;IACN,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,QAAQ;CACA,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\nconst sharedProjectPropertiesInSchema = z.object({\n cloudId: z.string(),\n cloudType: z.enum([\"AWS\", \"AZURE\"]),\n createdAt: z.string(),\n createdBy: z.string(),\n credentials: z.optional(\n z.discriminatedUnion(\"type\", [\n z.object({\n accessKeyId: z.string(),\n secretAccessKey: z.optional(z.string()),\n type: z.literal(\"ACCESS_KEY\"),\n }),\n z.object({\n externalId: z.string(),\n externalIdSignature: z.optional(z.string()),\n instanceProfileArn: z.optional(z.nullable(z.string())),\n roleArn: z.string(),\n type: z.literal(\"IAM_ROLE\"),\n }),\n z.object({\n accountName: z.string(),\n clientId: z.string(),\n clientSecret: z.string(),\n tenantId: z.string(),\n type: z.literal(\"AZURE_STORAGE_CLIENT_CREDENTIALS\"),\n }),\n ]),\n ),\n id: z.string(),\n jdbcConnectionString: z.optional(z.string()),\n lastStateError: z.optional(z.object({ error: z.string(), timestamp: z.number() })),\n modifiedAt: z.string(),\n modifiedBy: z.string(),\n name: z.string(),\n numberOfEngines: z.number().check(z.int(), z.minimum(0)),\n primaryCatalog: z.optional(z.string()),\n projectStore: z.optional(z.string()),\n state: z.enum([\n \"ACTIVATING\",\n \"ACTIVE\",\n \"ARCHIVED\",\n \"ARCHIVING\",\n \"CREATING\",\n \"DEACTIVATING\",\n \"INACTIVE\",\n \"RESTORING\",\n ]),\n type: z.enum([\"QUERY_ENGINE\"]),\n});\n\nexport const projectPropertiesCodec = z.codec(\n sharedProjectPropertiesInSchema,\n z.extend(z.omit(sharedProjectPropertiesInSchema, { createdAt: true, modifiedAt: true }), {\n createdAt: z.instanceof(Date),\n modifiedAt: z.instanceof(Date),\n }),\n {\n decode(v) {\n const { createdAt, modifiedAt, ...rest } = v;\n return {\n ...rest,\n createdAt: new Date(createdAt),\n modifiedAt: new Date(modifiedAt),\n };\n },\n encode(v) {\n const { createdAt, modifiedAt, ...rest } = v;\n return {\n ...rest,\n createdAt: createdAt.toString(),\n modifiedAt: modifiedAt.toString(),\n };\n },\n },\n);\n\nexport const projectUpdateSchema = z.partial(\n z.extend(z.pick(projectPropertiesCodec.def.in, { credentials: true }), {\n name: z.string().check(\n z.minLength(6, \"Project name must be at least 6 characters\"),\n z.maxLength(30, \"Project name must be at most 30 characters\"),\n z.regex(\n /^[a-z][a-z0-9-]*[a-z0-9]$/,\n \"Project name must start with a letter, contain only lowercase letters, numbers, and hyphens, and cannot end with a hyphen\",\n ),\n z.superRefine((val, ctx) => {\n const foundWord = projectDisallowedWords.find((word) => val.includes(word));\n if (foundWord) {\n ctx.addIssue({\n code: \"custom\",\n input: val,\n message: `Project name cannot contain the word \"${foundWord}\"`,\n });\n }\n }),\n ),\n }),\n);\n\nconst projectDisallowedWords = [\n \"dremio\",\n \"ssl\",\n \"admin\",\n \"system\",\n \"null\",\n \"undefined\",\n \"static\",\n \"assets\",\n \"login\",\n \"logout\",\n] as const;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dremio/js-sdk",
3
- "version": "0.31.4",
3
+ "version": "0.31.5",
4
4
  "description": "JavaScript library for the Dremio API",
5
5
  "keywords": [
6
6
  "dremio",