@databricks/sdk-uc-entitytagassignments 0.27.0 → 0.35.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/package.js +7 -0
- package/dist/package.js.map +1 -0
- package/dist/v1/client.d.ts +57 -53
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +179 -217
- package/dist/v1/client.js.map +1 -1
- package/dist/v1/index.d.ts +3 -8
- package/dist/v1/index.js +4 -8
- package/dist/v1/model.d.ts +63 -61
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +58 -71
- package/dist/v1/model.js.map +1 -1
- package/dist/v1/transport.d.ts +21 -17
- package/dist/v1/transport.d.ts.map +1 -1
- package/dist/v1/transport.js +60 -69
- package/dist/v1/transport.js.map +1 -1
- package/dist/v1/utils.d.ts +18 -14
- package/dist/v1/utils.d.ts.map +1 -1
- package/dist/v1/utils.js +76 -103
- package/dist/v1/utils.js.map +1 -1
- package/package.json +5 -5
- package/dist/v1/index.d.ts.map +0 -1
- package/dist/v1/index.js.map +0 -1
package/dist/v1/index.d.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export { EntityTagAssignmentsClient } from './client';
|
|
5
|
-
export { TagAssignmentSourceType } from './model';
|
|
6
|
-
export type { CreateEntityTagAssignmentRequest, DeleteEntityTagAssignmentRequest, EntityTagAssignment, GetEntityTagAssignmentRequest, ListEntityTagAssignmentsRequest, ListEntityTagAssignmentsResponse, UpdateEntityTagAssignmentRequest, } from './model';
|
|
7
|
-
export { entityTagAssignmentFieldMask } from './model';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
import { CreateEntityTagAssignmentRequest, DeleteEntityTagAssignmentRequest, EntityTagAssignment, GetEntityTagAssignmentRequest, ListEntityTagAssignmentsRequest, ListEntityTagAssignmentsResponse, TagAssignmentSourceType, UpdateEntityTagAssignmentRequest, entityTagAssignmentFieldMask } from "./model.js";
|
|
2
|
+
import { EntityTagAssignmentsClient } from "./client.js";
|
|
3
|
+
export { type CreateEntityTagAssignmentRequest, type DeleteEntityTagAssignmentRequest, type EntityTagAssignment, EntityTagAssignmentsClient, type GetEntityTagAssignmentRequest, type ListEntityTagAssignmentsRequest, type ListEntityTagAssignmentsResponse, TagAssignmentSourceType, type UpdateEntityTagAssignmentRequest, entityTagAssignmentFieldMask };
|
package/dist/v1/index.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { EntityTagAssignmentsClient } from './client';
|
|
6
|
-
export { TagAssignmentSourceType } from './model';
|
|
7
|
-
export { entityTagAssignmentFieldMask } from './model';
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import { TagAssignmentSourceType, entityTagAssignmentFieldMask } from "./model.js";
|
|
2
|
+
import { EntityTagAssignmentsClient } from "./client.js";
|
|
3
|
+
|
|
4
|
+
export { EntityTagAssignmentsClient, TagAssignmentSourceType, entityTagAssignmentFieldMask };
|
package/dist/v1/model.d.ts
CHANGED
|
@@ -1,77 +1,79 @@
|
|
|
1
|
-
import { Temporal } from
|
|
2
|
-
import { FieldMask } from
|
|
3
|
-
import { z } from
|
|
1
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
2
|
+
import { FieldMask } from "@databricks/sdk-core/wkt";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region src/v1/model.d.ts
|
|
4
6
|
/** Enum representing the source type of a tag assignment */
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/** Automatically assigned by Data Classification */
|
|
9
|
-
readonly TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION: "TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION";
|
|
7
|
+
declare const TagAssignmentSourceType: {
|
|
8
|
+
/** Includes (but not limited to) tags manually assigned by users */readonly TAG_ASSIGNMENT_SOURCE_TYPE_UNSPECIFIED: "TAG_ASSIGNMENT_SOURCE_TYPE_UNSPECIFIED"; /** Automatically assigned by Data Classification */
|
|
9
|
+
readonly TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION: "TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION";
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type TagAssignmentSourceType = (typeof TagAssignmentSourceType)[keyof typeof TagAssignmentSourceType] | (string & {});
|
|
12
12
|
/** Request to create a new entity tag assignment */
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
interface CreateEntityTagAssignmentRequest {
|
|
14
|
+
tagAssignment?: EntityTagAssignment | undefined;
|
|
15
15
|
}
|
|
16
16
|
/** Request to delete an entity tag assignment */
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
interface DeleteEntityTagAssignmentRequest {
|
|
18
|
+
/** The fully qualified name of the entity to which the tag is assigned */
|
|
19
|
+
entityName?: string | undefined;
|
|
20
|
+
/** Required. The key of the tag to delete */
|
|
21
|
+
tagKey?: string | undefined;
|
|
22
|
+
/** The type of the entity to which the tag is assigned. */
|
|
23
|
+
entityType?: string | undefined;
|
|
24
24
|
}
|
|
25
25
|
/** Represents a tag assignment to an entity */
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
interface EntityTagAssignment {
|
|
27
|
+
/** The fully qualified name of the entity to which the tag is assigned */
|
|
28
|
+
entityName?: string | undefined;
|
|
29
|
+
/** The key of the tag */
|
|
30
|
+
tagKey?: string | undefined;
|
|
31
|
+
/** The value of the tag */
|
|
32
|
+
tagValue?: string | undefined;
|
|
33
|
+
/** The type of the entity to which the tag is assigned. */
|
|
34
|
+
entityType?: string | undefined;
|
|
35
|
+
/** The timestamp when the tag assignment was last updated */
|
|
36
|
+
updateTime?: Temporal.Instant | undefined;
|
|
37
|
+
/** The user or principal who updated the tag assignment */
|
|
38
|
+
updatedBy?: string | undefined;
|
|
39
|
+
/** The source type of the tag assignment, e.g., user-assigned or system-assigned */
|
|
40
|
+
sourceType?: TagAssignmentSourceType | undefined;
|
|
41
41
|
}
|
|
42
42
|
/** Request to get an entity tag assignment */
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
interface GetEntityTagAssignmentRequest {
|
|
44
|
+
/** The fully qualified name of the entity to which the tag is assigned */
|
|
45
|
+
entityName?: string | undefined;
|
|
46
|
+
/** Required. The key of the tag */
|
|
47
|
+
tagKey?: string | undefined;
|
|
48
|
+
/** The type of the entity to which the tag is assigned. */
|
|
49
|
+
entityType?: string | undefined;
|
|
50
50
|
}
|
|
51
51
|
/** Request to list entity tag assignments */
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
52
|
+
interface ListEntityTagAssignmentsRequest {
|
|
53
|
+
/** The fully qualified name of the entity to which the tag is assigned */
|
|
54
|
+
entityName?: string | undefined;
|
|
55
|
+
/** Optional. Maximum number of tag assignments to return in a single page */
|
|
56
|
+
maxResults?: number | undefined;
|
|
57
|
+
/** Optional. Pagination token to retrieve the next page of results */
|
|
58
|
+
pageToken?: string | undefined;
|
|
59
|
+
/** The type of the entity to which the tag is assigned. */
|
|
60
|
+
entityType?: string | undefined;
|
|
61
61
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
interface ListEntityTagAssignmentsResponse {
|
|
63
|
+
/** The list of tag assignments */
|
|
64
|
+
tagAssignments?: EntityTagAssignment[] | undefined;
|
|
65
|
+
/** Optional. Pagination token for retrieving the next page of results */
|
|
66
|
+
nextPageToken?: string | undefined;
|
|
67
67
|
}
|
|
68
68
|
/** Request to update an entity tag assignment */
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
interface UpdateEntityTagAssignmentRequest {
|
|
70
|
+
tagAssignment?: EntityTagAssignment | undefined;
|
|
71
|
+
updateMask?: FieldMask<EntityTagAssignment> | undefined;
|
|
72
72
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
declare const unmarshalEntityTagAssignmentSchema: z.ZodType<EntityTagAssignment>;
|
|
74
|
+
declare const unmarshalListEntityTagAssignmentsResponseSchema: z.ZodType<ListEntityTagAssignmentsResponse>;
|
|
75
|
+
declare const marshalEntityTagAssignmentSchema: z.ZodType;
|
|
76
|
+
declare function entityTagAssignmentFieldMask(...paths: string[]): FieldMask<EntityTagAssignment>;
|
|
77
|
+
//#endregion
|
|
78
|
+
export { CreateEntityTagAssignmentRequest, DeleteEntityTagAssignmentRequest, EntityTagAssignment, GetEntityTagAssignmentRequest, ListEntityTagAssignmentsRequest, ListEntityTagAssignmentsResponse, TagAssignmentSourceType, UpdateEntityTagAssignmentRequest, entityTagAssignmentFieldMask, marshalEntityTagAssignmentSchema, unmarshalEntityTagAssignmentSchema, unmarshalListEntityTagAssignmentsResponseSchema };
|
|
77
79
|
//# sourceMappingURL=model.d.ts.map
|
package/dist/v1/model.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","
|
|
1
|
+
{"version":3,"file":"model.d.ts","names":[],"sources":["../../src/v1/model.ts"],"mappings":";;;;;;cASa,uBAAA;EAAA,6EAOH,sCAAA;WAAA,qDAAA;AAAA;AAAA,KACE,uBAAA,WACA,uBAAA,eAAsC,uBAAA;;UAIjC,gCAAA;EACf,aAAA,GAAgB,mBAAA;AAAA;AADlB;AAAA,UAKiB,gCAAA;;EAEf,UAAA;EANmC;EAQnC,MAAA;EAJ+C;EAM/C,UAAA;AAAA;;UAIe,mBAAA;EAJf;EAMA,UAAA;EANU;EAQV,MAAA;EAJkC;EAMlC,QAAA;EAQoC;EANpC,UAAA;EAJA;EAMA,UAAA,GAAa,QAAA,CAAS,OAAA;EAFtB;EAIA,SAAA;EAFa;EAIb,UAAA,GAAa,uBAAA;AAAA;;UAIE,6BAAA;EAJqB;EAMpC,UAAA;EAFe;EAIf,MAAA;;EAEA,UAAA;AAAA;;UAIe,+BAAA;EAJL;EAMV,UAAA;EAFe;EAIf,UAAA;;EAEA,SAAA;EAJA;EAMA,UAAA;AAAA;AAAA,UAGe,gCAAA;EAHL;EAKV,cAAA,GAAiB,mBAAA;EAFF;EAIf,aAAA;AAAA;;UAIe,gCAAA;EACf,aAAA,GAAgB,mBAAA;EAChB,UAAA,GAAa,SAAA,CAAU,mBAAA;AAAA;AAAA,cAGZ,kCAAA,EAAoC,CAAA,CAAE,OAAA,CAAQ,mBAAA;AAAA,cAwB9C,+CAAA,EAAiD,CAAA,CAAE,OAAA,CAAQ,gCAAA;AAAA,cAa3D,gCAAA,EAAkC,CAAA,CAAE,OAAA;AAAA,iBAiCjC,4BAAA,CAAA,GACX,KAAA,aACF,SAAA,CAAU,mBAAA"}
|
package/dist/v1/model.js
CHANGED
|
@@ -1,80 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { Temporal } from "@js-temporal/polyfill";
|
|
2
|
+
import { FieldMask } from "@databricks/sdk-core/wkt";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region src/v1/model.ts
|
|
5
6
|
/** Enum representing the source type of a tag assignment */
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
TAG_ASSIGNMENT_SOURCE_TYPE_UNSPECIFIED: '',
|
|
10
|
-
/** Automatically assigned by Data Classification */
|
|
11
|
-
TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION: 'TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION',
|
|
7
|
+
const TagAssignmentSourceType = {
|
|
8
|
+
TAG_ASSIGNMENT_SOURCE_TYPE_UNSPECIFIED: "TAG_ASSIGNMENT_SOURCE_TYPE_UNSPECIFIED",
|
|
9
|
+
TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION: "TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION"
|
|
12
10
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
tagValue: d.tag_value,
|
|
30
|
-
entityType: d.entity_type,
|
|
31
|
-
updateTime: d.update_time,
|
|
32
|
-
updatedBy: d.updated_by,
|
|
33
|
-
sourceType: d.source_type,
|
|
11
|
+
const unmarshalEntityTagAssignmentSchema = z.object({
|
|
12
|
+
entity_name: z.string().optional(),
|
|
13
|
+
tag_key: z.string().optional(),
|
|
14
|
+
tag_value: z.string().optional(),
|
|
15
|
+
entity_type: z.string().optional(),
|
|
16
|
+
update_time: z.string().transform((s) => Temporal.Instant.from(s)).optional(),
|
|
17
|
+
updated_by: z.string().optional(),
|
|
18
|
+
source_type: z.string().optional()
|
|
19
|
+
}).transform((d) => ({
|
|
20
|
+
entityName: d.entity_name,
|
|
21
|
+
tagKey: d.tag_key,
|
|
22
|
+
tagValue: d.tag_value,
|
|
23
|
+
entityType: d.entity_type,
|
|
24
|
+
updateTime: d.update_time,
|
|
25
|
+
updatedBy: d.updated_by,
|
|
26
|
+
sourceType: d.source_type
|
|
34
27
|
}));
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
})
|
|
42
|
-
.transform(d => ({
|
|
43
|
-
tagAssignments: d.tag_assignments,
|
|
44
|
-
nextPageToken: d.next_page_token,
|
|
28
|
+
const unmarshalListEntityTagAssignmentsResponseSchema = z.object({
|
|
29
|
+
tag_assignments: z.array(z.lazy(() => unmarshalEntityTagAssignmentSchema)).optional(),
|
|
30
|
+
next_page_token: z.string().optional()
|
|
31
|
+
}).transform((d) => ({
|
|
32
|
+
tagAssignments: d.tag_assignments,
|
|
33
|
+
nextPageToken: d.next_page_token
|
|
45
34
|
}));
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
tag_value: d.tagValue,
|
|
63
|
-
entity_type: d.entityType,
|
|
64
|
-
update_time: d.updateTime,
|
|
65
|
-
updated_by: d.updatedBy,
|
|
66
|
-
source_type: d.sourceType,
|
|
35
|
+
const marshalEntityTagAssignmentSchema = z.object({
|
|
36
|
+
entityName: z.string().optional(),
|
|
37
|
+
tagKey: z.string().optional(),
|
|
38
|
+
tagValue: z.string().optional(),
|
|
39
|
+
entityType: z.string().optional(),
|
|
40
|
+
updateTime: z.any().transform((d) => d.toString()).optional(),
|
|
41
|
+
updatedBy: z.string().optional(),
|
|
42
|
+
sourceType: z.string().optional()
|
|
43
|
+
}).transform((d) => ({
|
|
44
|
+
entity_name: d.entityName,
|
|
45
|
+
tag_key: d.tagKey,
|
|
46
|
+
tag_value: d.tagValue,
|
|
47
|
+
entity_type: d.entityType,
|
|
48
|
+
update_time: d.updateTime,
|
|
49
|
+
updated_by: d.updatedBy,
|
|
50
|
+
source_type: d.sourceType
|
|
67
51
|
}));
|
|
68
52
|
const entityTagAssignmentFieldMaskSchema = {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
53
|
+
entityName: { wire: "entity_name" },
|
|
54
|
+
entityType: { wire: "entity_type" },
|
|
55
|
+
sourceType: { wire: "source_type" },
|
|
56
|
+
tagKey: { wire: "tag_key" },
|
|
57
|
+
tagValue: { wire: "tag_value" },
|
|
58
|
+
updateTime: { wire: "update_time" },
|
|
59
|
+
updatedBy: { wire: "updated_by" }
|
|
76
60
|
};
|
|
77
|
-
|
|
78
|
-
|
|
61
|
+
function entityTagAssignmentFieldMask(...paths) {
|
|
62
|
+
return FieldMask.build(paths, entityTagAssignmentFieldMaskSchema);
|
|
79
63
|
}
|
|
64
|
+
|
|
65
|
+
//#endregion
|
|
66
|
+
export { TagAssignmentSourceType, entityTagAssignmentFieldMask, marshalEntityTagAssignmentSchema, unmarshalEntityTagAssignmentSchema, unmarshalListEntityTagAssignmentsResponseSchema };
|
|
80
67
|
//# sourceMappingURL=model.js.map
|
package/dist/v1/model.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","
|
|
1
|
+
{"version":3,"file":"model.js","names":[],"sources":["../../src/v1/model.ts"],"sourcesContent":["// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.\n\nimport {Temporal} from '@js-temporal/polyfill';\nimport {FieldMask} from '@databricks/sdk-core/wkt';\nimport type {FieldMaskSchema} from '@databricks/sdk-core/wkt';\nimport {z} from 'zod';\n\n/** Enum representing the source type of a tag assignment */\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.\nexport const TagAssignmentSourceType = {\n /** Includes (but not limited to) tags manually assigned by users */\n TAG_ASSIGNMENT_SOURCE_TYPE_UNSPECIFIED:\n 'TAG_ASSIGNMENT_SOURCE_TYPE_UNSPECIFIED',\n /** Automatically assigned by Data Classification */\n TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION:\n 'TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION',\n} as const;\nexport type TagAssignmentSourceType =\n | (typeof TagAssignmentSourceType)[keyof typeof TagAssignmentSourceType]\n | (string & {});\n\n/** Request to create a new entity tag assignment */\nexport interface CreateEntityTagAssignmentRequest {\n tagAssignment?: EntityTagAssignment | undefined;\n}\n\n/** Request to delete an entity tag assignment */\nexport interface DeleteEntityTagAssignmentRequest {\n /** The fully qualified name of the entity to which the tag is assigned */\n entityName?: string | undefined;\n /** Required. The key of the tag to delete */\n tagKey?: string | undefined;\n /** The type of the entity to which the tag is assigned. */\n entityType?: string | undefined;\n}\n\n/** Represents a tag assignment to an entity */\nexport interface EntityTagAssignment {\n /** The fully qualified name of the entity to which the tag is assigned */\n entityName?: string | undefined;\n /** The key of the tag */\n tagKey?: string | undefined;\n /** The value of the tag */\n tagValue?: string | undefined;\n /** The type of the entity to which the tag is assigned. */\n entityType?: string | undefined;\n /** The timestamp when the tag assignment was last updated */\n updateTime?: Temporal.Instant | undefined;\n /** The user or principal who updated the tag assignment */\n updatedBy?: string | undefined;\n /** The source type of the tag assignment, e.g., user-assigned or system-assigned */\n sourceType?: TagAssignmentSourceType | undefined;\n}\n\n/** Request to get an entity tag assignment */\nexport interface GetEntityTagAssignmentRequest {\n /** The fully qualified name of the entity to which the tag is assigned */\n entityName?: string | undefined;\n /** Required. The key of the tag */\n tagKey?: string | undefined;\n /** The type of the entity to which the tag is assigned. */\n entityType?: string | undefined;\n}\n\n/** Request to list entity tag assignments */\nexport interface ListEntityTagAssignmentsRequest {\n /** The fully qualified name of the entity to which the tag is assigned */\n entityName?: string | undefined;\n /** Optional. Maximum number of tag assignments to return in a single page */\n maxResults?: number | undefined;\n /** Optional. Pagination token to retrieve the next page of results */\n pageToken?: string | undefined;\n /** The type of the entity to which the tag is assigned. */\n entityType?: string | undefined;\n}\n\nexport interface ListEntityTagAssignmentsResponse {\n /** The list of tag assignments */\n tagAssignments?: EntityTagAssignment[] | undefined;\n /** Optional. Pagination token for retrieving the next page of results */\n nextPageToken?: string | undefined;\n}\n\n/** Request to update an entity tag assignment */\nexport interface UpdateEntityTagAssignmentRequest {\n tagAssignment?: EntityTagAssignment | undefined;\n updateMask?: FieldMask<EntityTagAssignment> | undefined;\n}\n\nexport const unmarshalEntityTagAssignmentSchema: z.ZodType<EntityTagAssignment> =\n z\n .object({\n entity_name: z.string().optional(),\n tag_key: z.string().optional(),\n tag_value: z.string().optional(),\n entity_type: z.string().optional(),\n update_time: z\n .string()\n .transform(s => Temporal.Instant.from(s))\n .optional(),\n updated_by: z.string().optional(),\n source_type: z.string().optional(),\n })\n .transform(d => ({\n entityName: d.entity_name,\n tagKey: d.tag_key,\n tagValue: d.tag_value,\n entityType: d.entity_type,\n updateTime: d.update_time,\n updatedBy: d.updated_by,\n sourceType: d.source_type,\n }));\n\nexport const unmarshalListEntityTagAssignmentsResponseSchema: z.ZodType<ListEntityTagAssignmentsResponse> =\n z\n .object({\n tag_assignments: z\n .array(z.lazy(() => unmarshalEntityTagAssignmentSchema))\n .optional(),\n next_page_token: z.string().optional(),\n })\n .transform(d => ({\n tagAssignments: d.tag_assignments,\n nextPageToken: d.next_page_token,\n }));\n\nexport const marshalEntityTagAssignmentSchema: z.ZodType = z\n .object({\n entityName: z.string().optional(),\n tagKey: z.string().optional(),\n tagValue: z.string().optional(),\n entityType: z.string().optional(),\n updateTime: z\n .any()\n .transform((d: Temporal.Instant) => d.toString())\n .optional(),\n updatedBy: z.string().optional(),\n sourceType: z.string().optional(),\n })\n .transform(d => ({\n entity_name: d.entityName,\n tag_key: d.tagKey,\n tag_value: d.tagValue,\n entity_type: d.entityType,\n update_time: d.updateTime,\n updated_by: d.updatedBy,\n source_type: d.sourceType,\n }));\n\nconst entityTagAssignmentFieldMaskSchema: FieldMaskSchema = {\n entityName: {wire: 'entity_name'},\n entityType: {wire: 'entity_type'},\n sourceType: {wire: 'source_type'},\n tagKey: {wire: 'tag_key'},\n tagValue: {wire: 'tag_value'},\n updateTime: {wire: 'update_time'},\n updatedBy: {wire: 'updated_by'},\n};\n\nexport function entityTagAssignmentFieldMask(\n ...paths: string[]\n): FieldMask<EntityTagAssignment> {\n return FieldMask.build<EntityTagAssignment>(\n paths,\n entityTagAssignmentFieldMaskSchema\n );\n}\n"],"mappings":";;;;;;AASA,MAAa,0BAA0B;CAErC,wCACE;CAEF,uDACE;CACH;AAyED,MAAa,qCACX,EACG,OAAO;CACN,aAAa,EAAE,QAAQ,CAAC,UAAU;CAClC,SAAS,EAAE,QAAQ,CAAC,UAAU;CAC9B,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,aAAa,EAAE,QAAQ,CAAC,UAAU;CAClC,aAAa,EACV,QAAQ,CACR,WAAU,MAAK,SAAS,QAAQ,KAAK,EAAE,CAAC,CACxC,UAAU;CACb,YAAY,EAAE,QAAQ,CAAC,UAAU;CACjC,aAAa,EAAE,QAAQ,CAAC,UAAU;CACnC,CAAC,CACD,WAAU,OAAM;CACf,YAAY,EAAE;CACd,QAAQ,EAAE;CACV,UAAU,EAAE;CACZ,YAAY,EAAE;CACd,YAAY,EAAE;CACd,WAAW,EAAE;CACb,YAAY,EAAE;CACf,EAAE;AAEP,MAAa,kDACX,EACG,OAAO;CACN,iBAAiB,EACd,MAAM,EAAE,WAAW,mCAAmC,CAAC,CACvD,UAAU;CACb,iBAAiB,EAAE,QAAQ,CAAC,UAAU;CACvC,CAAC,CACD,WAAU,OAAM;CACf,gBAAgB,EAAE;CAClB,eAAe,EAAE;CAClB,EAAE;AAEP,MAAa,mCAA8C,EACxD,OAAO;CACN,YAAY,EAAE,QAAQ,CAAC,UAAU;CACjC,QAAQ,EAAE,QAAQ,CAAC,UAAU;CAC7B,UAAU,EAAE,QAAQ,CAAC,UAAU;CAC/B,YAAY,EAAE,QAAQ,CAAC,UAAU;CACjC,YAAY,EACT,KAAK,CACL,WAAW,MAAwB,EAAE,UAAU,CAAC,CAChD,UAAU;CACb,WAAW,EAAE,QAAQ,CAAC,UAAU;CAChC,YAAY,EAAE,QAAQ,CAAC,UAAU;CAClC,CAAC,CACD,WAAU,OAAM;CACf,aAAa,EAAE;CACf,SAAS,EAAE;CACX,WAAW,EAAE;CACb,aAAa,EAAE;CACf,aAAa,EAAE;CACf,YAAY,EAAE;CACd,aAAa,EAAE;CAChB,EAAE;AAEL,MAAM,qCAAsD;CAC1D,YAAY,EAAC,MAAM,eAAc;CACjC,YAAY,EAAC,MAAM,eAAc;CACjC,YAAY,EAAC,MAAM,eAAc;CACjC,QAAQ,EAAC,MAAM,WAAU;CACzB,UAAU,EAAC,MAAM,aAAY;CAC7B,YAAY,EAAC,MAAM,eAAc;CACjC,WAAW,EAAC,MAAM,cAAa;CAChC;AAED,SAAgB,6BACd,GAAG,OAC6B;AAChC,QAAO,UAAU,MACf,OACA,mCACD"}
|
package/dist/v1/transport.d.ts
CHANGED
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { HttpClient } from "@databricks/sdk-core/http";
|
|
2
|
+
import { ClientOptions } from "@databricks/sdk-options/client";
|
|
3
|
+
|
|
4
|
+
//#region src/v1/transport.d.ts
|
|
3
5
|
/**
|
|
4
6
|
* The configuration a client needs to issue requests, resolved from
|
|
5
7
|
* {@link ClientOptions} and a configuration profile.
|
|
6
8
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
interface ResolvedClientConfig {
|
|
10
|
+
/** Host with any trailing slash removed. */
|
|
11
|
+
host: string;
|
|
12
|
+
/**
|
|
13
|
+
* Default account ID for account-level paths that contain an account_id
|
|
14
|
+
* segment. A request's own accountId still wins.
|
|
15
|
+
*/
|
|
16
|
+
accountId?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Workspace ID used to route workspace-level calls on unified hosts (SPOG).
|
|
19
|
+
*/
|
|
20
|
+
workspaceId?: string;
|
|
21
|
+
/** HTTP client with authentication, and any configured timeout, applied. */
|
|
22
|
+
httpClient: HttpClient;
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* Resolves {@link ClientOptions} into a {@link ResolvedClientConfig}.
|
|
@@ -29,5 +31,7 @@ export interface ResolvedClientConfig {
|
|
|
29
31
|
*
|
|
30
32
|
* @throws if host is neither provided nor present in the resolved profile.
|
|
31
33
|
*/
|
|
32
|
-
|
|
34
|
+
declare function resolveClientConfig(options: ClientOptions): Promise<ResolvedClientConfig>;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { ResolvedClientConfig, resolveClientConfig };
|
|
33
37
|
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","
|
|
1
|
+
{"version":3,"file":"transport.d.ts","names":[],"sources":["../../src/v1/transport.ts"],"mappings":";;;;;;AAkBA;;UAAiB,oBAAA;EAgBO;EAdtB,IAAA;EAMA;;;;EAAA,SAAA;EAQsB;AAaxB;;EAhBE,WAAA;EAiBS;EAdT,UAAA,EAAY,UAAA;AAAA;;;;;;;;;;;iBAaQ,mBAAA,CACpB,OAAA,EAAS,aAAA,GACR,OAAA,CAAQ,oBAAA"}
|
package/dist/v1/transport.js
CHANGED
|
@@ -1,74 +1,65 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { defaultCredentials } from "@databricks/sdk-auth/credentials";
|
|
2
|
+
import { newFetchHttpClient } from "@databricks/sdk-core/http";
|
|
3
|
+
import { resolve } from "@databricks/sdk-core/profiles";
|
|
4
|
+
|
|
5
|
+
//#region src/v1/transport.ts
|
|
5
6
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
httpClient = new TimeoutHttpClient(httpClient, options.timeout);
|
|
30
|
-
}
|
|
31
|
-
const accountId = options.accountId ?? profile.accountId;
|
|
32
|
-
const workspaceId = options.workspaceId ?? profile.workspaceId;
|
|
33
|
-
return {
|
|
34
|
-
host: host.replace(/\/$/, ''),
|
|
35
|
-
httpClient,
|
|
36
|
-
...(accountId !== undefined && { accountId }),
|
|
37
|
-
...(workspaceId !== undefined && { workspaceId }),
|
|
38
|
-
};
|
|
7
|
+
* Resolves {@link ClientOptions} into a {@link ResolvedClientConfig}.
|
|
8
|
+
*
|
|
9
|
+
* A configuration profile is always resolved from the config file and
|
|
10
|
+
* environment variables (per options.profileOptions); it supplies host,
|
|
11
|
+
* accountId, workspaceId, and credentials wherever the caller did not set them
|
|
12
|
+
* explicitly. Explicit options always take precedence.
|
|
13
|
+
*
|
|
14
|
+
* @throws if host is neither provided nor present in the resolved profile.
|
|
15
|
+
*/
|
|
16
|
+
async function resolveClientConfig(options) {
|
|
17
|
+
const profile = await resolve(options.profileOptions);
|
|
18
|
+
const host = options.host ?? profile.host;
|
|
19
|
+
if (host === void 0) throw new Error("Host is required.");
|
|
20
|
+
let httpClient = new AuthHttpClient(options.httpClient ?? newFetchHttpClient(), options.credentials ?? defaultCredentials({ profile }));
|
|
21
|
+
if (options.timeout !== void 0) httpClient = new TimeoutHttpClient(httpClient, options.timeout);
|
|
22
|
+
const accountId = options.accountId ?? profile.accountId;
|
|
23
|
+
const workspaceId = options.workspaceId ?? profile.workspaceId;
|
|
24
|
+
return {
|
|
25
|
+
host: host.replace(/\/$/, ""),
|
|
26
|
+
httpClient,
|
|
27
|
+
...accountId !== void 0 && { accountId },
|
|
28
|
+
...workspaceId !== void 0 && { workspaceId }
|
|
29
|
+
};
|
|
39
30
|
}
|
|
40
31
|
/** Wraps an HttpClient and adds authentication headers to requests. */
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
}
|
|
32
|
+
var AuthHttpClient = class {
|
|
33
|
+
constructor(base, credentials) {
|
|
34
|
+
this.base = base;
|
|
35
|
+
this.credentials = credentials;
|
|
36
|
+
}
|
|
37
|
+
async send(request) {
|
|
38
|
+
const authHeaders = await this.credentials.authHeaders();
|
|
39
|
+
const headers = new Headers(request.headers);
|
|
40
|
+
for (const h of authHeaders) headers.set(h.key, h.value);
|
|
41
|
+
return this.base.send({
|
|
42
|
+
...request,
|
|
43
|
+
headers
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
};
|
|
58
47
|
/** Wraps an HttpClient and applies a default timeout to requests. */
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
48
|
+
var TimeoutHttpClient = class {
|
|
49
|
+
constructor(base, timeout) {
|
|
50
|
+
this.base = base;
|
|
51
|
+
this.timeout = timeout;
|
|
52
|
+
}
|
|
53
|
+
async send(request) {
|
|
54
|
+
const timeoutSignal = AbortSignal.timeout(this.timeout);
|
|
55
|
+
const signal = request.signal !== void 0 ? AbortSignal.any([request.signal, timeoutSignal]) : timeoutSignal;
|
|
56
|
+
return this.base.send({
|
|
57
|
+
...request,
|
|
58
|
+
signal
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
//#endregion
|
|
64
|
+
export { resolveClientConfig };
|
|
74
65
|
//# sourceMappingURL=transport.js.map
|
package/dist/v1/transport.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.js","
|
|
1
|
+
{"version":3,"file":"transport.js","names":[],"sources":["../../src/v1/transport.ts"],"sourcesContent":["// Code generated from API definition by Databricks SDK Generator. DO NOT EDIT.\n\nimport type {Credentials} from '@databricks/sdk-auth';\nimport {defaultCredentials} from '@databricks/sdk-auth/credentials';\nimport type {\n HttpClient,\n HttpRequest,\n HttpResponse,\n} from '@databricks/sdk-core/http';\nimport {newFetchHttpClient} from '@databricks/sdk-core/http';\nimport type {Profile} from '@databricks/sdk-core/profiles';\nimport {resolve} from '@databricks/sdk-core/profiles';\nimport type {ClientOptions} from '@databricks/sdk-options/client';\n\n/**\n * The configuration a client needs to issue requests, resolved from\n * {@link ClientOptions} and a configuration profile.\n */\nexport interface ResolvedClientConfig {\n /** Host with any trailing slash removed. */\n host: string;\n\n /**\n * Default account ID for account-level paths that contain an account_id\n * segment. A request's own accountId still wins.\n */\n accountId?: string;\n\n /**\n * Workspace ID used to route workspace-level calls on unified hosts (SPOG).\n */\n workspaceId?: string;\n\n /** HTTP client with authentication, and any configured timeout, applied. */\n httpClient: HttpClient;\n}\n\n/**\n * Resolves {@link ClientOptions} into a {@link ResolvedClientConfig}.\n *\n * A configuration profile is always resolved from the config file and\n * environment variables (per options.profileOptions); it supplies host,\n * accountId, workspaceId, and credentials wherever the caller did not set them\n * explicitly. Explicit options always take precedence.\n *\n * @throws if host is neither provided nor present in the resolved profile.\n */\nexport async function resolveClientConfig(\n options: ClientOptions\n): Promise<ResolvedClientConfig> {\n const profile: Profile = await resolve(options.profileOptions);\n\n const host = options.host ?? profile.host;\n if (host === undefined) {\n throw new Error('Host is required.');\n }\n\n // The provided httpClient (or the default fetch client) is the base wire;\n // authentication and the optional timeout are layered on top of it. The\n // default credential chain reuses the profile resolved above so that the\n // same profileOptions govern host and authentication alike.\n const base = options.httpClient ?? newFetchHttpClient();\n const credentials = options.credentials ?? defaultCredentials({profile});\n let httpClient: HttpClient = new AuthHttpClient(base, credentials);\n if (options.timeout !== undefined) {\n httpClient = new TimeoutHttpClient(httpClient, options.timeout);\n }\n\n const accountId = options.accountId ?? profile.accountId;\n const workspaceId = options.workspaceId ?? profile.workspaceId;\n\n return {\n host: host.replace(/\\/$/, ''),\n httpClient,\n ...(accountId !== undefined && {accountId}),\n ...(workspaceId !== undefined && {workspaceId}),\n };\n}\n\n/** Wraps an HttpClient and adds authentication headers to requests. */\nclass AuthHttpClient implements HttpClient {\n constructor(\n private readonly base: HttpClient,\n private readonly credentials: Credentials\n ) {}\n\n async send(request: HttpRequest): Promise<HttpResponse> {\n const authHeaders = await this.credentials.authHeaders();\n // Do not modify the original request.\n const headers = new Headers(request.headers);\n for (const h of authHeaders) {\n headers.set(h.key, h.value);\n }\n return this.base.send({...request, headers});\n }\n}\n\n/** Wraps an HttpClient and applies a default timeout to requests. */\nclass TimeoutHttpClient implements HttpClient {\n constructor(\n private readonly base: HttpClient,\n private readonly timeout: number\n ) {}\n\n async send(request: HttpRequest): Promise<HttpResponse> {\n const timeoutSignal = AbortSignal.timeout(this.timeout);\n const signal =\n request.signal !== undefined\n ? AbortSignal.any([request.signal, timeoutSignal])\n : timeoutSignal;\n return this.base.send({...request, signal});\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AA+CA,eAAsB,oBACpB,SAC+B;CAC/B,MAAM,UAAmB,MAAM,QAAQ,QAAQ,eAAe;CAE9D,MAAM,OAAO,QAAQ,QAAQ,QAAQ;AACrC,KAAI,SAAS,OACX,OAAM,IAAI,MAAM,oBAAoB;CAStC,IAAI,aAAyB,IAAI,eAFpB,QAAQ,cAAc,oBAAoB,EACnC,QAAQ,eAAe,mBAAmB,EAAC,SAAQ,CAAC,CACN;AAClE,KAAI,QAAQ,YAAY,OACtB,cAAa,IAAI,kBAAkB,YAAY,QAAQ,QAAQ;CAGjE,MAAM,YAAY,QAAQ,aAAa,QAAQ;CAC/C,MAAM,cAAc,QAAQ,eAAe,QAAQ;AAEnD,QAAO;EACL,MAAM,KAAK,QAAQ,OAAO,GAAG;EAC7B;EACA,GAAI,cAAc,UAAa,EAAC,WAAU;EAC1C,GAAI,gBAAgB,UAAa,EAAC,aAAY;EAC/C;;;AAIH,IAAM,iBAAN,MAA2C;CACzC,YACE,AAAiB,MACjB,AAAiB,aACjB;EAFiB;EACA;;CAGnB,MAAM,KAAK,SAA6C;EACtD,MAAM,cAAc,MAAM,KAAK,YAAY,aAAa;EAExD,MAAM,UAAU,IAAI,QAAQ,QAAQ,QAAQ;AAC5C,OAAK,MAAM,KAAK,YACd,SAAQ,IAAI,EAAE,KAAK,EAAE,MAAM;AAE7B,SAAO,KAAK,KAAK,KAAK;GAAC,GAAG;GAAS;GAAQ,CAAC;;;;AAKhD,IAAM,oBAAN,MAA8C;CAC5C,YACE,AAAiB,MACjB,AAAiB,SACjB;EAFiB;EACA;;CAGnB,MAAM,KAAK,SAA6C;EACtD,MAAM,gBAAgB,YAAY,QAAQ,KAAK,QAAQ;EACvD,MAAM,SACJ,QAAQ,WAAW,SACf,YAAY,IAAI,CAAC,QAAQ,QAAQ,cAAc,CAAC,GAChD;AACN,SAAO,KAAK,KAAK,KAAK;GAAC,GAAG;GAAS;GAAO,CAAC"}
|