@databricks/sdk-secrets 0.0.0-dev → 0.1.0-dev.1
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/LICENSE +203 -0
- package/dist/v1/client.d.ts +297 -0
- package/dist/v1/client.d.ts.map +1 -0
- package/dist/v1/client.js +604 -0
- package/dist/v1/client.js.map +1 -0
- package/dist/v1/index.d.ts +4 -0
- package/dist/v1/index.d.ts.map +1 -0
- package/dist/v1/index.js +4 -0
- package/dist/v1/index.js.map +1 -0
- package/dist/v1/model.d.ts +189 -0
- package/dist/v1/model.d.ts.map +1 -0
- package/dist/v1/model.js +206 -0
- package/dist/v1/model.js.map +1 -0
- package/dist/v1/transport.d.ts +5 -0
- package/dist/v1/transport.d.ts.map +1 -0
- package/dist/v1/transport.js +57 -0
- package/dist/v1/transport.js.map +1 -0
- package/dist/v1/utils.d.ts +22 -0
- package/dist/v1/utils.d.ts.map +1 -0
- package/dist/v1/utils.js +113 -0
- package/dist/v1/utils.js.map +1 -0
- package/package.json +38 -4
- package/src/v1/client.ts +713 -0
- package/src/v1/index.ts +33 -0
- package/src/v1/model.ts +413 -0
- package/src/v1/transport.ts +73 -0
- package/src/v1/utils.ts +156 -0
- package/README.md +0 -1
- package/index.js +0 -1
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** The ACL permission levels for Secret ACLs applied to secret scopes. */
|
|
3
|
+
export declare enum AclPermission {
|
|
4
|
+
/** Allowed to perform read operations (get, list) on secrets in this scope. */
|
|
5
|
+
READ = "READ",
|
|
6
|
+
/** Allowed to read and write secrets to this secret scope. */
|
|
7
|
+
WRITE = "WRITE",
|
|
8
|
+
/** Allowed to read/write ACLs, and read/write secrets to this secret scope. */
|
|
9
|
+
MANAGE = "MANAGE"
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* The types of secret scope backends in the Secret Manager. Azure KeyVault backed secret scopes
|
|
13
|
+
* will be supported in a later release.
|
|
14
|
+
*/
|
|
15
|
+
export declare enum ScopeBackendType {
|
|
16
|
+
/**
|
|
17
|
+
* A secret scope in which secrets are stored in Databrick managed storage
|
|
18
|
+
* and encrypted with a cloud-based specific encryption key.
|
|
19
|
+
*/
|
|
20
|
+
DATABRICKS = "DATABRICKS",
|
|
21
|
+
/**
|
|
22
|
+
* A customer Azure KeyVault backed secret scope. Reading secrets from this scope will directly
|
|
23
|
+
* read secrets from the customer vault. Only scope and secret ACL metadata are stored in Databricks.
|
|
24
|
+
*/
|
|
25
|
+
AZURE_KEYVAULT = "AZURE_KEYVAULT"
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* An item representing an ACL rule applied to the given principal (user or group)
|
|
29
|
+
* on the associated scope point.
|
|
30
|
+
*/
|
|
31
|
+
export interface AclItem {
|
|
32
|
+
/** The principal in which the permission is applied. */
|
|
33
|
+
principal?: string | undefined;
|
|
34
|
+
/** The permission level applied to the principal. */
|
|
35
|
+
permission?: AclPermission | undefined;
|
|
36
|
+
}
|
|
37
|
+
/** The metadata of the Azure KeyVault for a secret scope of type `AZURE_KEYVAULT` */
|
|
38
|
+
export interface AzureKeyVaultSecretScopeMetadata {
|
|
39
|
+
/** The resource id of the azure KeyVault that user wants to associate the scope with. */
|
|
40
|
+
resourceId?: string | undefined;
|
|
41
|
+
/** The DNS of the KeyVault */
|
|
42
|
+
dnsName?: string | undefined;
|
|
43
|
+
}
|
|
44
|
+
export interface CreateScopeRequest {
|
|
45
|
+
/** Scope name requested by the user. Scope names are unique. */
|
|
46
|
+
scope?: string | undefined;
|
|
47
|
+
/** The principal that is initially granted ``MANAGE`` permission to the created scope. */
|
|
48
|
+
initialManagePrincipal?: string | undefined;
|
|
49
|
+
/** The backend type the scope will be created with. If not specified, will default to ``DATABRICKS`` */
|
|
50
|
+
scopeBackendType?: ScopeBackendType | undefined;
|
|
51
|
+
/** The metadata for the secret scope if the type is ``AZURE_KEYVAULT`` */
|
|
52
|
+
backendAzureKeyvault?: AzureKeyVaultSecretScopeMetadata | undefined;
|
|
53
|
+
}
|
|
54
|
+
export interface CreateScopeRequest_Response {
|
|
55
|
+
}
|
|
56
|
+
export interface DeleteAclRequest {
|
|
57
|
+
/** The name of the scope to remove permissions from. */
|
|
58
|
+
scope?: string | undefined;
|
|
59
|
+
/** The principal to remove an existing ACL from. */
|
|
60
|
+
principal?: string | undefined;
|
|
61
|
+
}
|
|
62
|
+
export interface DeleteAclRequest_Response {
|
|
63
|
+
}
|
|
64
|
+
export interface DeleteScopeRequest {
|
|
65
|
+
/** Name of the scope to delete. */
|
|
66
|
+
scope?: string | undefined;
|
|
67
|
+
}
|
|
68
|
+
export interface DeleteScopeRequest_Response {
|
|
69
|
+
}
|
|
70
|
+
export interface DeleteSecretRequest {
|
|
71
|
+
/** The name of the scope that contains the secret to delete. */
|
|
72
|
+
scope?: string | undefined;
|
|
73
|
+
/** Name of the secret to delete. */
|
|
74
|
+
key?: string | undefined;
|
|
75
|
+
}
|
|
76
|
+
export interface DeleteSecretRequest_Response {
|
|
77
|
+
}
|
|
78
|
+
export interface GetAclRequest {
|
|
79
|
+
/** The name of the scope to fetch ACL information from. */
|
|
80
|
+
scope?: string | undefined;
|
|
81
|
+
/** The principal to fetch ACL information for. */
|
|
82
|
+
principal?: string | undefined;
|
|
83
|
+
}
|
|
84
|
+
export interface GetSecretRequest {
|
|
85
|
+
/** The name of the scope that contains the secret. */
|
|
86
|
+
scope?: string | undefined;
|
|
87
|
+
/** Name of the secret to fetch value information. */
|
|
88
|
+
key?: string | undefined;
|
|
89
|
+
}
|
|
90
|
+
export interface GetSecretRequest_Response {
|
|
91
|
+
/** A unique name to identify the secret. */
|
|
92
|
+
key?: string | undefined;
|
|
93
|
+
/** The value of the secret in its byte representation. */
|
|
94
|
+
value?: Uint8Array | undefined;
|
|
95
|
+
}
|
|
96
|
+
export interface ListAclsRequest {
|
|
97
|
+
/** The name of the scope to fetch ACL information from. */
|
|
98
|
+
scope?: string | undefined;
|
|
99
|
+
}
|
|
100
|
+
export interface ListAclsRequest_Response {
|
|
101
|
+
/** The associated ACLs rule applied to principals in the given scope. */
|
|
102
|
+
items?: AclItem[] | undefined;
|
|
103
|
+
}
|
|
104
|
+
export interface ListScopesRequest {
|
|
105
|
+
}
|
|
106
|
+
export interface ListScopesRequest_Response {
|
|
107
|
+
/** The available secret scopes. */
|
|
108
|
+
scopes?: SecretScope[] | undefined;
|
|
109
|
+
}
|
|
110
|
+
export interface ListSecretsRequest {
|
|
111
|
+
/** The name of the scope to list secrets within. */
|
|
112
|
+
scope?: string | undefined;
|
|
113
|
+
}
|
|
114
|
+
export interface ListSecretsRequest_Response {
|
|
115
|
+
/** Metadata information of all secrets contained within the given scope. */
|
|
116
|
+
secrets?: SecretMetadata[] | undefined;
|
|
117
|
+
}
|
|
118
|
+
export interface PutAclRequest {
|
|
119
|
+
/** The name of the scope to apply permissions to. */
|
|
120
|
+
scope?: string | undefined;
|
|
121
|
+
/** The principal in which the permission is applied. */
|
|
122
|
+
principal?: string | undefined;
|
|
123
|
+
/** The permission level applied to the principal. */
|
|
124
|
+
permission?: AclPermission | undefined;
|
|
125
|
+
}
|
|
126
|
+
export interface PutAclRequest_Response {
|
|
127
|
+
}
|
|
128
|
+
export interface PutSecretRequest {
|
|
129
|
+
/** The name of the scope to which the secret will be associated with. */
|
|
130
|
+
scope?: string | undefined;
|
|
131
|
+
/** A unique name to identify the secret. */
|
|
132
|
+
key?: string | undefined;
|
|
133
|
+
value?: {
|
|
134
|
+
$case: 'stringValue';
|
|
135
|
+
/** If specified, note that the value will be stored in UTF-8 (MB4) form. */
|
|
136
|
+
stringValue: string;
|
|
137
|
+
} | {
|
|
138
|
+
$case: 'bytesValue';
|
|
139
|
+
/** If specified, value will be stored as bytes. */
|
|
140
|
+
bytesValue: Uint8Array;
|
|
141
|
+
} | undefined;
|
|
142
|
+
}
|
|
143
|
+
export interface PutSecretRequest_Response {
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The metadata about a secret. Returned when listing secrets. Does not contain the
|
|
147
|
+
* actual secret value.
|
|
148
|
+
*/
|
|
149
|
+
export interface SecretMetadata {
|
|
150
|
+
/** A unique name to identify the secret. */
|
|
151
|
+
key?: string | undefined;
|
|
152
|
+
/** The last updated timestamp (in milliseconds) for the secret. */
|
|
153
|
+
lastUpdatedTimestamp?: bigint | undefined;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* An organizational resource for storing secrets. Secret scopes can be
|
|
157
|
+
* different types (Databricks-managed, Azure KeyVault backed, etc), and ACLs
|
|
158
|
+
* can be applied to control permissions for all secrets within a scope.
|
|
159
|
+
*/
|
|
160
|
+
export interface SecretScope {
|
|
161
|
+
/** A unique name to identify the secret scope. */
|
|
162
|
+
name?: string | undefined;
|
|
163
|
+
/** The type of secret scope backend. */
|
|
164
|
+
backendType?: ScopeBackendType | undefined;
|
|
165
|
+
/** The metadata for the secret scope if the type is ``AZURE_KEYVAULT`` */
|
|
166
|
+
keyvaultMetadata?: AzureKeyVaultSecretScopeMetadata | undefined;
|
|
167
|
+
}
|
|
168
|
+
export declare const unmarshalAclItemSchema: z.ZodType<AclItem>;
|
|
169
|
+
export declare const unmarshalAzureKeyVaultSecretScopeMetadataSchema: z.ZodType<AzureKeyVaultSecretScopeMetadata>;
|
|
170
|
+
export declare const unmarshalCreateScopeRequest_ResponseSchema: z.ZodType<CreateScopeRequest_Response>;
|
|
171
|
+
export declare const unmarshalDeleteAclRequest_ResponseSchema: z.ZodType<DeleteAclRequest_Response>;
|
|
172
|
+
export declare const unmarshalDeleteScopeRequest_ResponseSchema: z.ZodType<DeleteScopeRequest_Response>;
|
|
173
|
+
export declare const unmarshalDeleteSecretRequest_ResponseSchema: z.ZodType<DeleteSecretRequest_Response>;
|
|
174
|
+
export declare const unmarshalGetSecretRequest_ResponseSchema: z.ZodType<GetSecretRequest_Response>;
|
|
175
|
+
export declare const unmarshalListAclsRequest_ResponseSchema: z.ZodType<ListAclsRequest_Response>;
|
|
176
|
+
export declare const unmarshalListScopesRequest_ResponseSchema: z.ZodType<ListScopesRequest_Response>;
|
|
177
|
+
export declare const unmarshalListSecretsRequest_ResponseSchema: z.ZodType<ListSecretsRequest_Response>;
|
|
178
|
+
export declare const unmarshalPutAclRequest_ResponseSchema: z.ZodType<PutAclRequest_Response>;
|
|
179
|
+
export declare const unmarshalPutSecretRequest_ResponseSchema: z.ZodType<PutSecretRequest_Response>;
|
|
180
|
+
export declare const unmarshalSecretMetadataSchema: z.ZodType<SecretMetadata>;
|
|
181
|
+
export declare const unmarshalSecretScopeSchema: z.ZodType<SecretScope>;
|
|
182
|
+
export declare const marshalAzureKeyVaultSecretScopeMetadataSchema: z.ZodType;
|
|
183
|
+
export declare const marshalCreateScopeRequestSchema: z.ZodType;
|
|
184
|
+
export declare const marshalDeleteAclRequestSchema: z.ZodType;
|
|
185
|
+
export declare const marshalDeleteScopeRequestSchema: z.ZodType;
|
|
186
|
+
export declare const marshalDeleteSecretRequestSchema: z.ZodType;
|
|
187
|
+
export declare const marshalPutAclRequestSchema: z.ZodType;
|
|
188
|
+
export declare const marshalPutSecretRequestSchema: z.ZodType;
|
|
189
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/v1/model.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,0EAA0E;AAC1E,oBAAY,aAAa;IACvB,+EAA+E;IAC/E,IAAI,SAAS;IACb,8DAA8D;IAC9D,KAAK,UAAU;IACf,+EAA+E;IAC/E,MAAM,WAAW;CAClB;AAED;;;GAGG;AACH,oBAAY,gBAAgB;IAC1B;;;OAGG;IACH,UAAU,eAAe;IACzB;;;OAGG;IACH,cAAc,mBAAmB;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,OAAO;IACtB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,GAAG,S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AAC,yBAAyB,CAYnF,CAAC;AAGR,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAAC,wBAAwB,CAOjF,CAAC;AAGR,eAAO,MAAM,yCAAyC,EAAE,CAAC,CAAC,OAAO,CAAC,0BAA0B,CAOrF,CAAC;AAGR,eAAO,MAAM,0CAA0C,EAAE,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAOvF,CAAC;AAGR,eAAO,MAAM,qCAAqC,EAAE,CAAC,CAAC,OAAO,CAAC,sBAAsB,CACtE,CAAC;AAGf,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,OAAO,CAAC,yBAAyB,CAC5E,CAAC;AAEf,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAW/D,CAAC;AAEN,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,CAYzD,CAAC;AAEN,eAAO,MAAM,6CAA6C,EAAE,CAAC,CAAC,OAQzD,CAAC;AAEN,eAAO,MAAM,+BAA+B,EAAE,CAAC,CAAC,OAc3C,CAAC;AAEN,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,OAQzC,CAAC;AAEN,eAAO,MAAM,+BAA+B,EAAE,CAAC,CAAC,OAM3C,CAAC;AAEN,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAQ5C,CAAC;AAEN,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAUtC,CAAC;AAEN,eAAO,MAAM,6BAA6B,EAAE,CAAC,CAAC,OAyBzC,CAAC"}
|
package/dist/v1/model.js
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
/** The ACL permission levels for Secret ACLs applied to secret scopes. */
|
|
4
|
+
export var AclPermission;
|
|
5
|
+
(function (AclPermission) {
|
|
6
|
+
/** Allowed to perform read operations (get, list) on secrets in this scope. */
|
|
7
|
+
AclPermission["READ"] = "READ";
|
|
8
|
+
/** Allowed to read and write secrets to this secret scope. */
|
|
9
|
+
AclPermission["WRITE"] = "WRITE";
|
|
10
|
+
/** Allowed to read/write ACLs, and read/write secrets to this secret scope. */
|
|
11
|
+
AclPermission["MANAGE"] = "MANAGE";
|
|
12
|
+
})(AclPermission || (AclPermission = {}));
|
|
13
|
+
/**
|
|
14
|
+
* The types of secret scope backends in the Secret Manager. Azure KeyVault backed secret scopes
|
|
15
|
+
* will be supported in a later release.
|
|
16
|
+
*/
|
|
17
|
+
export var ScopeBackendType;
|
|
18
|
+
(function (ScopeBackendType) {
|
|
19
|
+
/**
|
|
20
|
+
* A secret scope in which secrets are stored in Databrick managed storage
|
|
21
|
+
* and encrypted with a cloud-based specific encryption key.
|
|
22
|
+
*/
|
|
23
|
+
ScopeBackendType["DATABRICKS"] = "DATABRICKS";
|
|
24
|
+
/**
|
|
25
|
+
* A customer Azure KeyVault backed secret scope. Reading secrets from this scope will directly
|
|
26
|
+
* read secrets from the customer vault. Only scope and secret ACL metadata are stored in Databricks.
|
|
27
|
+
*/
|
|
28
|
+
ScopeBackendType["AZURE_KEYVAULT"] = "AZURE_KEYVAULT";
|
|
29
|
+
})(ScopeBackendType || (ScopeBackendType = {}));
|
|
30
|
+
export const unmarshalAclItemSchema = z
|
|
31
|
+
.object({
|
|
32
|
+
principal: z.string().optional(),
|
|
33
|
+
permission: z.enum(AclPermission).optional(),
|
|
34
|
+
})
|
|
35
|
+
.transform(d => ({
|
|
36
|
+
principal: d.principal,
|
|
37
|
+
permission: d.permission,
|
|
38
|
+
}));
|
|
39
|
+
export const unmarshalAzureKeyVaultSecretScopeMetadataSchema = z
|
|
40
|
+
.object({
|
|
41
|
+
resource_id: z.string().optional(),
|
|
42
|
+
dns_name: z.string().optional(),
|
|
43
|
+
})
|
|
44
|
+
.transform(d => ({
|
|
45
|
+
resourceId: d.resource_id,
|
|
46
|
+
dnsName: d.dns_name,
|
|
47
|
+
}));
|
|
48
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
49
|
+
export const unmarshalCreateScopeRequest_ResponseSchema = z.object({});
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
51
|
+
export const unmarshalDeleteAclRequest_ResponseSchema = z.object({});
|
|
52
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
53
|
+
export const unmarshalDeleteScopeRequest_ResponseSchema = z.object({});
|
|
54
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
55
|
+
export const unmarshalDeleteSecretRequest_ResponseSchema = z.object({});
|
|
56
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
57
|
+
export const unmarshalGetSecretRequest_ResponseSchema = z
|
|
58
|
+
.object({
|
|
59
|
+
key: z.string().optional(),
|
|
60
|
+
value: z
|
|
61
|
+
.string()
|
|
62
|
+
.transform(s => Uint8Array.from(atob(s), c => c.charCodeAt(0)))
|
|
63
|
+
.optional(),
|
|
64
|
+
})
|
|
65
|
+
.transform(d => ({
|
|
66
|
+
key: d.key,
|
|
67
|
+
value: d.value,
|
|
68
|
+
}));
|
|
69
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
70
|
+
export const unmarshalListAclsRequest_ResponseSchema = z
|
|
71
|
+
.object({
|
|
72
|
+
items: z.array(z.lazy(() => unmarshalAclItemSchema)).optional(),
|
|
73
|
+
})
|
|
74
|
+
.transform(d => ({
|
|
75
|
+
items: d.items,
|
|
76
|
+
}));
|
|
77
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
78
|
+
export const unmarshalListScopesRequest_ResponseSchema = z
|
|
79
|
+
.object({
|
|
80
|
+
scopes: z.array(z.lazy(() => unmarshalSecretScopeSchema)).optional(),
|
|
81
|
+
})
|
|
82
|
+
.transform(d => ({
|
|
83
|
+
scopes: d.scopes,
|
|
84
|
+
}));
|
|
85
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
86
|
+
export const unmarshalListSecretsRequest_ResponseSchema = z
|
|
87
|
+
.object({
|
|
88
|
+
secrets: z.array(z.lazy(() => unmarshalSecretMetadataSchema)).optional(),
|
|
89
|
+
})
|
|
90
|
+
.transform(d => ({
|
|
91
|
+
secrets: d.secrets,
|
|
92
|
+
}));
|
|
93
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
94
|
+
export const unmarshalPutAclRequest_ResponseSchema = z.object({});
|
|
95
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
96
|
+
export const unmarshalPutSecretRequest_ResponseSchema = z.object({});
|
|
97
|
+
export const unmarshalSecretMetadataSchema = z
|
|
98
|
+
.object({
|
|
99
|
+
key: z.string().optional(),
|
|
100
|
+
last_updated_timestamp: z
|
|
101
|
+
.union([z.number(), z.bigint()])
|
|
102
|
+
.transform(v => BigInt(v))
|
|
103
|
+
.optional(),
|
|
104
|
+
})
|
|
105
|
+
.transform(d => ({
|
|
106
|
+
key: d.key,
|
|
107
|
+
lastUpdatedTimestamp: d.last_updated_timestamp,
|
|
108
|
+
}));
|
|
109
|
+
export const unmarshalSecretScopeSchema = z
|
|
110
|
+
.object({
|
|
111
|
+
name: z.string().optional(),
|
|
112
|
+
backend_type: z.enum(ScopeBackendType).optional(),
|
|
113
|
+
keyvault_metadata: z
|
|
114
|
+
.lazy(() => unmarshalAzureKeyVaultSecretScopeMetadataSchema)
|
|
115
|
+
.optional(),
|
|
116
|
+
})
|
|
117
|
+
.transform(d => ({
|
|
118
|
+
name: d.name,
|
|
119
|
+
backendType: d.backend_type,
|
|
120
|
+
keyvaultMetadata: d.keyvault_metadata,
|
|
121
|
+
}));
|
|
122
|
+
export const marshalAzureKeyVaultSecretScopeMetadataSchema = z
|
|
123
|
+
.object({
|
|
124
|
+
resourceId: z.string().optional(),
|
|
125
|
+
dnsName: z.string().optional(),
|
|
126
|
+
})
|
|
127
|
+
.transform(d => ({
|
|
128
|
+
resource_id: d.resourceId,
|
|
129
|
+
dns_name: d.dnsName,
|
|
130
|
+
}));
|
|
131
|
+
export const marshalCreateScopeRequestSchema = z
|
|
132
|
+
.object({
|
|
133
|
+
scope: z.string().optional(),
|
|
134
|
+
initialManagePrincipal: z.string().optional(),
|
|
135
|
+
scopeBackendType: z.enum(ScopeBackendType).optional(),
|
|
136
|
+
backendAzureKeyvault: z
|
|
137
|
+
.lazy(() => marshalAzureKeyVaultSecretScopeMetadataSchema)
|
|
138
|
+
.optional(),
|
|
139
|
+
})
|
|
140
|
+
.transform(d => ({
|
|
141
|
+
scope: d.scope,
|
|
142
|
+
initial_manage_principal: d.initialManagePrincipal,
|
|
143
|
+
scope_backend_type: d.scopeBackendType,
|
|
144
|
+
backend_azure_keyvault: d.backendAzureKeyvault,
|
|
145
|
+
}));
|
|
146
|
+
export const marshalDeleteAclRequestSchema = z
|
|
147
|
+
.object({
|
|
148
|
+
scope: z.string().optional(),
|
|
149
|
+
principal: z.string().optional(),
|
|
150
|
+
})
|
|
151
|
+
.transform(d => ({
|
|
152
|
+
scope: d.scope,
|
|
153
|
+
principal: d.principal,
|
|
154
|
+
}));
|
|
155
|
+
export const marshalDeleteScopeRequestSchema = z
|
|
156
|
+
.object({
|
|
157
|
+
scope: z.string().optional(),
|
|
158
|
+
})
|
|
159
|
+
.transform(d => ({
|
|
160
|
+
scope: d.scope,
|
|
161
|
+
}));
|
|
162
|
+
export const marshalDeleteSecretRequestSchema = z
|
|
163
|
+
.object({
|
|
164
|
+
scope: z.string().optional(),
|
|
165
|
+
key: z.string().optional(),
|
|
166
|
+
})
|
|
167
|
+
.transform(d => ({
|
|
168
|
+
scope: d.scope,
|
|
169
|
+
key: d.key,
|
|
170
|
+
}));
|
|
171
|
+
export const marshalPutAclRequestSchema = z
|
|
172
|
+
.object({
|
|
173
|
+
scope: z.string().optional(),
|
|
174
|
+
principal: z.string().optional(),
|
|
175
|
+
permission: z.enum(AclPermission).optional(),
|
|
176
|
+
})
|
|
177
|
+
.transform(d => ({
|
|
178
|
+
scope: d.scope,
|
|
179
|
+
principal: d.principal,
|
|
180
|
+
permission: d.permission,
|
|
181
|
+
}));
|
|
182
|
+
export const marshalPutSecretRequestSchema = z
|
|
183
|
+
.object({
|
|
184
|
+
scope: z.string().optional(),
|
|
185
|
+
key: z.string().optional(),
|
|
186
|
+
value: z
|
|
187
|
+
.discriminatedUnion('$case', [
|
|
188
|
+
z.object({ $case: z.literal('stringValue'), stringValue: z.string() }),
|
|
189
|
+
z.object({
|
|
190
|
+
$case: z.literal('bytesValue'),
|
|
191
|
+
bytesValue: z
|
|
192
|
+
.any()
|
|
193
|
+
.transform((d) => btoa(Array.from(d, b => String.fromCharCode(b)).join(''))),
|
|
194
|
+
}),
|
|
195
|
+
])
|
|
196
|
+
.optional(),
|
|
197
|
+
})
|
|
198
|
+
.transform(d => ({
|
|
199
|
+
scope: d.scope,
|
|
200
|
+
key: d.key,
|
|
201
|
+
...(d.value?.$case === 'stringValue' && {
|
|
202
|
+
string_value: d.value.stringValue,
|
|
203
|
+
}),
|
|
204
|
+
...(d.value?.$case === 'bytesValue' && { bytes_value: d.value.bytesValue }),
|
|
205
|
+
}));
|
|
206
|
+
//# sourceMappingURL=model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/v1/model.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAE/E,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAEtB,0EAA0E;AAC1E,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACvB,+EAA+E;IAC/E,8BAAa,CAAA;IACb,8DAA8D;IAC9D,gCAAe,CAAA;IACf,+EAA+E;IAC/E,kCAAiB,CAAA;AACnB,CAAC,EAPW,aAAa,KAAb,aAAa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|
|
|
1
|
+
import type { HttpClient } from '@databricks/sdk-core/http';
|
|
2
|
+
import type { ClientOptions } from '@databricks/sdk-options/client';
|
|
3
|
+
/** Creates a new HTTP client with the given options. */
|
|
4
|
+
export declare function newHttpClient(options?: ClientOptions): HttpClient;
|
|
5
|
+
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/v1/transport.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,UAAU,EAGX,MAAM,2BAA2B,CAAC;AAEnC,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,gCAAgC,CAAC;AAElE,wDAAwD;AACxD,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,UAAU,CAwBjE"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
|
+
import { defaultCredentials } from '@databricks/sdk-auth/credentials';
|
|
3
|
+
import { newFetchHttpClient } from '@databricks/sdk-core/http';
|
|
4
|
+
/** Creates a new HTTP client with the given options. */
|
|
5
|
+
export function newHttpClient(options) {
|
|
6
|
+
const opts = options ?? {};
|
|
7
|
+
// If an HTTP client is provided, use it as-is. Throw if other options are
|
|
8
|
+
// also set, since they would be silently ignored.
|
|
9
|
+
if (opts.httpClient !== undefined) {
|
|
10
|
+
if (opts.credentials !== undefined || opts.timeout !== undefined) {
|
|
11
|
+
throw new Error('httpClient cannot be combined with credentials or timeout');
|
|
12
|
+
}
|
|
13
|
+
return opts.httpClient;
|
|
14
|
+
}
|
|
15
|
+
const credentials = opts.credentials ?? defaultCredentials();
|
|
16
|
+
const base = newFetchHttpClient();
|
|
17
|
+
let client = new AuthHttpClient(base, credentials);
|
|
18
|
+
if (opts.timeout !== undefined) {
|
|
19
|
+
client = new TimeoutHttpClient(client, opts.timeout);
|
|
20
|
+
}
|
|
21
|
+
return client;
|
|
22
|
+
}
|
|
23
|
+
/** Wraps an HttpClient and adds authentication headers to requests. */
|
|
24
|
+
class AuthHttpClient {
|
|
25
|
+
base;
|
|
26
|
+
credentials;
|
|
27
|
+
constructor(base, credentials) {
|
|
28
|
+
this.base = base;
|
|
29
|
+
this.credentials = credentials;
|
|
30
|
+
}
|
|
31
|
+
async send(request) {
|
|
32
|
+
const authHeaders = await this.credentials.authHeaders();
|
|
33
|
+
// Do not modify the original request.
|
|
34
|
+
const headers = new Headers(request.headers);
|
|
35
|
+
for (const h of authHeaders) {
|
|
36
|
+
headers.set(h.key, h.value);
|
|
37
|
+
}
|
|
38
|
+
return this.base.send({ ...request, headers });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
/** Wraps an HttpClient and applies a default timeout to requests. */
|
|
42
|
+
class TimeoutHttpClient {
|
|
43
|
+
base;
|
|
44
|
+
timeout;
|
|
45
|
+
constructor(base, timeout) {
|
|
46
|
+
this.base = base;
|
|
47
|
+
this.timeout = timeout;
|
|
48
|
+
}
|
|
49
|
+
async send(request) {
|
|
50
|
+
const timeoutSignal = AbortSignal.timeout(this.timeout);
|
|
51
|
+
const signal = request.signal !== undefined
|
|
52
|
+
? AbortSignal.any([request.signal, timeoutSignal])
|
|
53
|
+
: timeoutSignal;
|
|
54
|
+
return this.base.send({ ...request, signal });
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=transport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.js","sourceRoot":"","sources":["../../src/v1/transport.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAG/E,OAAO,EAAC,kBAAkB,EAAC,MAAM,kCAAkC,CAAC;AAMpE,OAAO,EAAC,kBAAkB,EAAC,MAAM,2BAA2B,CAAC;AAG7D,wDAAwD;AACxD,MAAM,UAAU,aAAa,CAAC,OAAuB;IACnD,MAAM,IAAI,GAAG,OAAO,IAAI,EAAE,CAAC;IAE3B,0EAA0E;IAC1E,kD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C;CACF;AAED,qEAAqE;AACrE,MAAM,iBAAiB;IAEF;IACA;IAFnB,YACmB,IAAgB,EAChB,OAAe;QADf,SAAI,GAAJ,IAAI,CAAY;QAChB,YAAO,GAAP,OAAO,CAAQ;IAC/B,CAAC;IAEJ,KAAK,CAAC,IAAI,CAAC,OAAoB;QAC7B,MAAM,aAAa,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxD,MAAM,MAAM,GACV,OAAO,CAAC,MAAM,KAAK,SAAS;YAC1B,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;YAClD,CAAC,CAAC,aAAa,CAAC;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAC,GAAG,OAAO,EAAE,MAAM,EAAC,CAAC,CAAC;IAC9C,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Call } from '@databricks/sdk-core/api';
|
|
2
|
+
import type { HttpClient, HttpRequest } from '@databricks/sdk-core/http';
|
|
3
|
+
import type { Logger } from '@databricks/sdk-core/logger';
|
|
4
|
+
import type { CallOptions } from '@databricks/sdk-options/call';
|
|
5
|
+
import type { z } from 'zod';
|
|
6
|
+
export interface HttpCallOptions {
|
|
7
|
+
readonly request: HttpRequest;
|
|
8
|
+
readonly httpClient: HttpClient;
|
|
9
|
+
readonly logger: Logger;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Translates public CallOptions to the internal Options shape accepted by
|
|
13
|
+
* execute(). Even though the shapes match today, this isolates the public
|
|
14
|
+
* API from the executor's internal type so they can diverge.
|
|
15
|
+
*/
|
|
16
|
+
export declare function executeCall(call: Call, options?: CallOptions): Promise<void>;
|
|
17
|
+
export declare function executeHttpCall(opts: HttpCallOptions): Promise<Uint8Array>;
|
|
18
|
+
export declare function buildHttpRequest(method: string, url: string, headers: Headers, signal?: AbortSignal, body?: string | ReadableStream<Uint8Array>): HttpRequest;
|
|
19
|
+
export declare function parseResponse<T>(body: Uint8Array, schema: z.ZodType<T>): T;
|
|
20
|
+
export declare function marshalRequest(data: unknown, schema: z.ZodType): string;
|
|
21
|
+
export declare function flattenQueryParams(prefix: string, value: unknown, params: URLSearchParams): void;
|
|
22
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/v1/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAU,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EAEZ,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,6BAA6B,CAAC;AACxD,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAE9D,OAAO,KAAK,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAO3B,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAC/B,IAAI,EAAE,IAAI,EACV,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,IAAI,CAAC,CASf;AA2BD,wBAAsB,eAAe,CACnC,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,UAAU,CAAC,CA2BrB;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,OAAO,EAChB,MAAM,CAAC,EAAE,WAAW,EACpB,IAAI,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC,UAAU,CAAC,GACzC,WAAW,CASb;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAI1E;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,MAAM,CAEvE;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,eAAe,GACtB,IAAI,CAuBN"}
|
package/dist/v1/utils.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
|
|
2
|
+
import { execute } from '@databricks/sdk-core/api';
|
|
3
|
+
import { ApiError } from '@databricks/sdk-core/apierror';
|
|
4
|
+
import JSONBig from 'json-bigint';
|
|
5
|
+
// JSON codec that preserves int64 precision. On the way in, large integer
|
|
6
|
+
// literals come back as bigint instead of being rounded to JS Number. On the
|
|
7
|
+
// way out, bigint values are emitted as raw JSON number digits.
|
|
8
|
+
const jsonBigint = JSONBig({ useNativeBigInt: true });
|
|
9
|
+
/**
|
|
10
|
+
* Translates public CallOptions to the internal Options shape accepted by
|
|
11
|
+
* execute(). Even though the shapes match today, this isolates the public
|
|
12
|
+
* API from the executor's internal type so they can diverge.
|
|
13
|
+
*/
|
|
14
|
+
export async function executeCall(call, options) {
|
|
15
|
+
const opts = {
|
|
16
|
+
...(options?.retrier !== undefined && { retrier: options.retrier }),
|
|
17
|
+
...(options?.rateLimiter !== undefined && {
|
|
18
|
+
rateLimiter: options.rateLimiter,
|
|
19
|
+
}),
|
|
20
|
+
...(options?.timeout !== undefined && { timeout: options.timeout }),
|
|
21
|
+
};
|
|
22
|
+
return execute(options?.signal, call, opts);
|
|
23
|
+
}
|
|
24
|
+
async function readAll(body) {
|
|
25
|
+
if (body === null) {
|
|
26
|
+
return new Uint8Array(0);
|
|
27
|
+
}
|
|
28
|
+
const reader = body.getReader();
|
|
29
|
+
const chunks = [];
|
|
30
|
+
for (;;) {
|
|
31
|
+
const { done, value } = await reader.read();
|
|
32
|
+
if (done) {
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
chunks.push(value);
|
|
36
|
+
}
|
|
37
|
+
const totalLength = chunks.reduce((acc, chunk) => acc + chunk.length, 0);
|
|
38
|
+
const result = new Uint8Array(totalLength);
|
|
39
|
+
let offset = 0;
|
|
40
|
+
for (const chunk of chunks) {
|
|
41
|
+
result.set(chunk, offset);
|
|
42
|
+
offset += chunk.length;
|
|
43
|
+
}
|
|
44
|
+
return result;
|
|
45
|
+
}
|
|
46
|
+
export async function executeHttpCall(opts) {
|
|
47
|
+
opts.logger.debug('HTTP request', {
|
|
48
|
+
method: opts.request.method,
|
|
49
|
+
url: opts.request.url,
|
|
50
|
+
});
|
|
51
|
+
let resp;
|
|
52
|
+
try {
|
|
53
|
+
resp = await opts.httpClient.send(opts.request);
|
|
54
|
+
}
|
|
55
|
+
catch (e) {
|
|
56
|
+
opts.logger.debug('HTTP request failed');
|
|
57
|
+
throw e;
|
|
58
|
+
}
|
|
59
|
+
const body = await readAll(resp.body);
|
|
60
|
+
opts.logger.debug('HTTP response', {
|
|
61
|
+
statusCode: resp.statusCode,
|
|
62
|
+
body: new TextDecoder().decode(body),
|
|
63
|
+
});
|
|
64
|
+
const apiErr = ApiError.fromHttpError(resp.statusCode, resp.headers, body);
|
|
65
|
+
if (apiErr !== undefined) {
|
|
66
|
+
throw apiErr;
|
|
67
|
+
}
|
|
68
|
+
return body;
|
|
69
|
+
}
|
|
70
|
+
export function buildHttpRequest(method, url, headers, signal, body) {
|
|
71
|
+
const req = { url, method, headers };
|
|
72
|
+
if (body !== undefined) {
|
|
73
|
+
req.body = body;
|
|
74
|
+
}
|
|
75
|
+
if (signal !== undefined) {
|
|
76
|
+
req.signal = signal;
|
|
77
|
+
}
|
|
78
|
+
return req;
|
|
79
|
+
}
|
|
80
|
+
export function parseResponse(body, schema) {
|
|
81
|
+
const text = new TextDecoder().decode(body);
|
|
82
|
+
const parsed = jsonBigint.parse(text);
|
|
83
|
+
return schema.parse(parsed);
|
|
84
|
+
}
|
|
85
|
+
export function marshalRequest(data, schema) {
|
|
86
|
+
return jsonBigint.stringify(schema.parse(data));
|
|
87
|
+
}
|
|
88
|
+
export function flattenQueryParams(prefix, value, params) {
|
|
89
|
+
if (value === null || value === undefined) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (Array.isArray(value)) {
|
|
93
|
+
// arrays of objects are not yet supported
|
|
94
|
+
for (const item of value) {
|
|
95
|
+
params.append(prefix, String(item));
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else if (typeof value === 'object') {
|
|
99
|
+
for (const [key, val] of Object.entries(value)) {
|
|
100
|
+
flattenQueryParams(`${prefix}.${key}`, val, params);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
else if (typeof value === 'string' ||
|
|
104
|
+
typeof value === 'number' ||
|
|
105
|
+
typeof value === 'boolean' ||
|
|
106
|
+
typeof value === 'bigint') {
|
|
107
|
+
params.append(prefix, String(value));
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
throw new Error(`Unsupported query parameter type: ${typeof value}`);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/v1/utils.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAG/E,OAAO,EAAC,OAAO,EAAC,MAAM,0BAA0B,CAAC;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAQvD,OAAO,OAAO,MAAM,aAAa,CAAC;AAGlC,0EAA0E;AAC1E,6EAA6E;AAC7E,gEAAgE;AAChE,MAAM,UAAU,GAAG,OAAO,CAAC,EAAC,eAAe,EAAE,IAAI,EAAC,CAAC,CAAC;AAQpD;;;;GAIG;AACH,MAAM,CAA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