@databricks/sdk-secrets 0.1.0-dev.1 → 0.1.0-dev.3

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/src/v1/model.ts CHANGED
@@ -59,8 +59,8 @@ export interface CreateScopeRequest {
59
59
  backendAzureKeyvault?: AzureKeyVaultSecretScopeMetadata | undefined;
60
60
  }
61
61
 
62
- // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
63
- export interface CreateScopeRequest_Response {}
62
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
63
+ export interface CreateScopeResponse {}
64
64
 
65
65
  export interface DeleteAclRequest {
66
66
  /** The name of the scope to remove permissions from. */
@@ -69,16 +69,16 @@ export interface DeleteAclRequest {
69
69
  principal?: string | undefined;
70
70
  }
71
71
 
72
- // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
73
- export interface DeleteAclRequest_Response {}
72
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
73
+ export interface DeleteAclResponse {}
74
74
 
75
75
  export interface DeleteScopeRequest {
76
76
  /** Name of the scope to delete. */
77
77
  scope?: string | undefined;
78
78
  }
79
79
 
80
- // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
81
- export interface DeleteScopeRequest_Response {}
80
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
81
+ export interface DeleteScopeResponse {}
82
82
 
83
83
  export interface DeleteSecretRequest {
84
84
  /** The name of the scope that contains the secret to delete. */
@@ -87,8 +87,8 @@ export interface DeleteSecretRequest {
87
87
  key?: string | undefined;
88
88
  }
89
89
 
90
- // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
91
- export interface DeleteSecretRequest_Response {}
90
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
91
+ export interface DeleteSecretResponse {}
92
92
 
93
93
  export interface GetAclRequest {
94
94
  /** The name of the scope to fetch ACL information from. */
@@ -104,8 +104,7 @@ export interface GetSecretRequest {
104
104
  key?: string | undefined;
105
105
  }
106
106
 
107
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
108
- export interface GetSecretRequest_Response {
107
+ export interface GetSecretResponse {
109
108
  /** A unique name to identify the secret. */
110
109
  key?: string | undefined;
111
110
  /** The value of the secret in its byte representation. */
@@ -117,8 +116,7 @@ export interface ListAclsRequest {
117
116
  scope?: string | undefined;
118
117
  }
119
118
 
120
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
121
- export interface ListAclsRequest_Response {
119
+ export interface ListAclsResponse {
122
120
  /** The associated ACLs rule applied to principals in the given scope. */
123
121
  items?: AclItem[] | undefined;
124
122
  }
@@ -126,8 +124,7 @@ export interface ListAclsRequest_Response {
126
124
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
127
125
  export interface ListScopesRequest {}
128
126
 
129
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
130
- export interface ListScopesRequest_Response {
127
+ export interface ListScopesResponse {
131
128
  /** The available secret scopes. */
132
129
  scopes?: SecretScope[] | undefined;
133
130
  }
@@ -137,8 +134,7 @@ export interface ListSecretsRequest {
137
134
  scope?: string | undefined;
138
135
  }
139
136
 
140
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
141
- export interface ListSecretsRequest_Response {
137
+ export interface ListSecretsResponse {
142
138
  /** Metadata information of all secrets contained within the given scope. */
143
139
  secrets?: SecretMetadata[] | undefined;
144
140
  }
@@ -152,8 +148,8 @@ export interface PutAclRequest {
152
148
  permission?: AclPermission | undefined;
153
149
  }
154
150
 
155
- // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
156
- export interface PutAclRequest_Response {}
151
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
152
+ export interface PutAclResponse {}
157
153
 
158
154
  export interface PutSecretRequest {
159
155
  /** The name of the scope to which the secret will be associated with. */
@@ -174,8 +170,8 @@ export interface PutSecretRequest {
174
170
  | undefined;
175
171
  }
176
172
 
177
- // eslint-disable-next-line @typescript-eslint/naming-convention, @typescript-eslint/no-empty-object-type -- Proto-style nested message name.
178
- export interface PutSecretRequest_Response {}
173
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
174
+ export interface PutSecretResponse {}
179
175
 
180
176
  /**
181
177
  * The metadata about a secret. Returned when listing secrets. Does not contain the
@@ -223,49 +219,40 @@ export const unmarshalAzureKeyVaultSecretScopeMetadataSchema: z.ZodType<AzureKey
223
219
  dnsName: d.dns_name,
224
220
  }));
225
221
 
226
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
227
- export const unmarshalCreateScopeRequest_ResponseSchema: z.ZodType<CreateScopeRequest_Response> =
222
+ export const unmarshalCreateScopeResponseSchema: z.ZodType<CreateScopeResponse> =
228
223
  z.object({});
229
224
 
230
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
231
- export const unmarshalDeleteAclRequest_ResponseSchema: z.ZodType<DeleteAclRequest_Response> =
225
+ export const unmarshalDeleteAclResponseSchema: z.ZodType<DeleteAclResponse> =
232
226
  z.object({});
233
227
 
234
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
235
- export const unmarshalDeleteScopeRequest_ResponseSchema: z.ZodType<DeleteScopeRequest_Response> =
228
+ export const unmarshalDeleteScopeResponseSchema: z.ZodType<DeleteScopeResponse> =
236
229
  z.object({});
237
230
 
238
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
239
- export const unmarshalDeleteSecretRequest_ResponseSchema: z.ZodType<DeleteSecretRequest_Response> =
231
+ export const unmarshalDeleteSecretResponseSchema: z.ZodType<DeleteSecretResponse> =
240
232
  z.object({});
241
233
 
242
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
243
- export const unmarshalGetSecretRequest_ResponseSchema: z.ZodType<GetSecretRequest_Response> =
244
- z
245
- .object({
246
- key: z.string().optional(),
247
- value: z
248
- .string()
249
- .transform(s => Uint8Array.from(atob(s), c => c.charCodeAt(0)))
250
- .optional(),
251
- })
252
- .transform(d => ({
253
- key: d.key,
254
- value: d.value,
255
- }));
234
+ export const unmarshalGetSecretResponseSchema: z.ZodType<GetSecretResponse> = z
235
+ .object({
236
+ key: z.string().optional(),
237
+ value: z
238
+ .string()
239
+ .transform(s => Uint8Array.from(atob(s), c => c.charCodeAt(0)))
240
+ .optional(),
241
+ })
242
+ .transform(d => ({
243
+ key: d.key,
244
+ value: d.value,
245
+ }));
256
246
 
257
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
258
- export const unmarshalListAclsRequest_ResponseSchema: z.ZodType<ListAclsRequest_Response> =
259
- z
260
- .object({
261
- items: z.array(z.lazy(() => unmarshalAclItemSchema)).optional(),
262
- })
263
- .transform(d => ({
264
- items: d.items,
265
- }));
247
+ export const unmarshalListAclsResponseSchema: z.ZodType<ListAclsResponse> = z
248
+ .object({
249
+ items: z.array(z.lazy(() => unmarshalAclItemSchema)).optional(),
250
+ })
251
+ .transform(d => ({
252
+ items: d.items,
253
+ }));
266
254
 
267
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
268
- export const unmarshalListScopesRequest_ResponseSchema: z.ZodType<ListScopesRequest_Response> =
255
+ export const unmarshalListScopesResponseSchema: z.ZodType<ListScopesResponse> =
269
256
  z
270
257
  .object({
271
258
  scopes: z.array(z.lazy(() => unmarshalSecretScopeSchema)).optional(),
@@ -274,8 +261,7 @@ export const unmarshalListScopesRequest_ResponseSchema: z.ZodType<ListScopesRequ
274
261
  scopes: d.scopes,
275
262
  }));
276
263
 
277
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
278
- export const unmarshalListSecretsRequest_ResponseSchema: z.ZodType<ListSecretsRequest_Response> =
264
+ export const unmarshalListSecretsResponseSchema: z.ZodType<ListSecretsResponse> =
279
265
  z
280
266
  .object({
281
267
  secrets: z.array(z.lazy(() => unmarshalSecretMetadataSchema)).optional(),
@@ -284,12 +270,10 @@ export const unmarshalListSecretsRequest_ResponseSchema: z.ZodType<ListSecretsRe
284
270
  secrets: d.secrets,
285
271
  }));
286
272
 
287
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
288
- export const unmarshalPutAclRequest_ResponseSchema: z.ZodType<PutAclRequest_Response> =
273
+ export const unmarshalPutAclResponseSchema: z.ZodType<PutAclResponse> =
289
274
  z.object({});
290
275
 
291
- // eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
292
- export const unmarshalPutSecretRequest_ResponseSchema: z.ZodType<PutSecretRequest_Response> =
276
+ export const unmarshalPutSecretResponseSchema: z.ZodType<PutSecretResponse> =
293
277
  z.object({});
294
278
 
295
279
  export const unmarshalSecretMetadataSchema: z.ZodType<SecretMetadata> = z
package/src/v1/utils.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.
2
2
 
3
- import type {Call, Options} from '@databricks/sdk-core/api';
4
- import {execute} from '@databricks/sdk-core/api';
3
+ import type {Options} from '@databricks/sdk-core/ops';
4
+ import {execute} from '@databricks/sdk-core/ops';
5
5
  import {ApiError} from '@databricks/sdk-core/apierror';
6
6
  import type {
7
7
  HttpClient,
@@ -30,7 +30,7 @@ export interface HttpCallOptions {
30
30
  * API from the executor's internal type so they can diverge.
31
31
  */
32
32
  export async function executeCall(
33
- call: Call,
33
+ call: (signal?: AbortSignal) => Promise<void>,
34
34
  options?: CallOptions
35
35
  ): Promise<void> {
36
36
  const opts: Options = {