@databricks/sdk-notificationdestinations 0.51.1 → 0.51.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/dist/package.js CHANGED
@@ -1,6 +1,6 @@
1
1
  //#region package.json
2
2
  var name = "@databricks/sdk-notificationdestinations";
3
- var version = "0.51.1";
3
+ var version = "0.51.3";
4
4
 
5
5
  //#endregion
6
6
  export { name, version };
@@ -1,3 +1,3 @@
1
- import { Config, CreateNotificationDestinationRequest, DeleteNotificationDestinationRequest, DestinationType, EmailConfig, Empty, GenericWebhookConfig, GetNotificationDestinationRequest, ListNotificationDestinationsRequest, ListNotificationDestinationsResponse, ListNotificationDestinationsResult, MicrosoftTeamsConfig, NotificationDestination, PagerdutyConfig, SlackConfig, UpdateNotificationDestinationRequest } from "./model.js";
1
+ import { Config, CreateNotificationDestinationRequest, DatabricksAppSlackConfig, DatabricksAppTeamsConfig, DeleteNotificationDestinationRequest, DestinationType, EmailConfig, Empty, GenericWebhookConfig, GetNotificationDestinationRequest, ListNotificationDestinationsRequest, ListNotificationDestinationsResponse, ListNotificationDestinationsResult, MicrosoftTeamsConfig, NotificationDestination, PagerdutyConfig, SlackConfig, UpdateNotificationDestinationRequest } from "./model.js";
2
2
  import { NotificationDestinationsClient } from "./client.js";
3
- export { type Config, type CreateNotificationDestinationRequest, type DeleteNotificationDestinationRequest, DestinationType, type EmailConfig, type Empty, type GenericWebhookConfig, type GetNotificationDestinationRequest, type ListNotificationDestinationsRequest, type ListNotificationDestinationsResponse, type ListNotificationDestinationsResult, type MicrosoftTeamsConfig, type NotificationDestination, NotificationDestinationsClient, type PagerdutyConfig, type SlackConfig, type UpdateNotificationDestinationRequest };
3
+ export { type Config, type CreateNotificationDestinationRequest, type DatabricksAppSlackConfig, type DatabricksAppTeamsConfig, type DeleteNotificationDestinationRequest, DestinationType, type EmailConfig, type Empty, type GenericWebhookConfig, type GetNotificationDestinationRequest, type ListNotificationDestinationsRequest, type ListNotificationDestinationsResponse, type ListNotificationDestinationsResult, type MicrosoftTeamsConfig, type NotificationDestination, NotificationDestinationsClient, type PagerdutyConfig, type SlackConfig, type UpdateNotificationDestinationRequest };
@@ -7,6 +7,8 @@ declare const DestinationType: {
7
7
  readonly WEBHOOK: "WEBHOOK";
8
8
  readonly PAGERDUTY: "PAGERDUTY";
9
9
  readonly MICROSOFT_TEAMS: "MICROSOFT_TEAMS";
10
+ readonly DATABRICKS_APP_SLACK: "DATABRICKS_APP_SLACK";
11
+ readonly DATABRICKS_APP_TEAMS: "DATABRICKS_APP_TEAMS";
10
12
  };
11
13
  type DestinationType = (typeof DestinationType)[keyof typeof DestinationType] | (string & {});
12
14
  interface Config {
@@ -25,6 +27,12 @@ interface Config {
25
27
  } | {
26
28
  $case: 'microsoftTeams';
27
29
  microsoftTeams: MicrosoftTeamsConfig;
30
+ } | {
31
+ $case: 'databricksAppSlack';
32
+ databricksAppSlack: DatabricksAppSlackConfig;
33
+ } | {
34
+ $case: 'databricksAppTeams';
35
+ databricksAppTeams: DatabricksAppTeamsConfig;
28
36
  } | undefined;
29
37
  }
30
38
  interface CreateNotificationDestinationRequest {
@@ -33,6 +41,38 @@ interface CreateNotificationDestinationRequest {
33
41
  /** The configuration for the notification destination. Must wrap EXACTLY one of the nested configs. */
34
42
  config?: Config | undefined;
35
43
  }
44
+ /**
45
+ * Slack channel reached through the Databricks app. The app must already be installed in the
46
+ * Slack workspace and connected to this Databricks workspace.
47
+ */
48
+ interface DatabricksAppSlackConfig {
49
+ /** [Input-Only] Slack workspace (team) ID the Databricks app is installed in. */
50
+ teamId?: string | undefined;
51
+ /** [Output-Only] Whether team ID is set. */
52
+ teamIdSet?: boolean | undefined;
53
+ /** [Input-Only] Slack channel ID notifications are posted to. */
54
+ channelId?: string | undefined;
55
+ /** [Output-Only] Whether channel ID is set. */
56
+ channelIdSet?: boolean | undefined;
57
+ }
58
+ /**
59
+ * Microsoft Teams channel reached through the Databricks app. The app must already be installed in
60
+ * the Microsoft 365 tenant and connected to this Databricks workspace.
61
+ */
62
+ interface DatabricksAppTeamsConfig {
63
+ /** [Input-Only] Microsoft Entra tenant ID of the Microsoft 365 tenant the app is installed in. */
64
+ tenantId?: string | undefined;
65
+ /** [Output-Only] Whether tenant ID is set. */
66
+ tenantIdSet?: boolean | undefined;
67
+ /** [Input-Only] Microsoft Entra group ID of the team that owns the channel. */
68
+ teamId?: string | undefined;
69
+ /** [Output-Only] Whether team ID is set. */
70
+ teamIdSet?: boolean | undefined;
71
+ /** [Input-Only] Teams channel ID notifications are posted to. */
72
+ channelId?: string | undefined;
73
+ /** [Output-Only] Whether channel ID is set. */
74
+ channelIdSet?: boolean | undefined;
75
+ }
36
76
  interface DeleteNotificationDestinationRequest {
37
77
  id?: string | undefined;
38
78
  }
@@ -138,6 +178,8 @@ interface UpdateNotificationDestinationRequest {
138
178
  config?: Config | undefined;
139
179
  }
140
180
  declare const unmarshalConfigSchema: z.ZodType<Config>;
181
+ declare const unmarshalDatabricksAppSlackConfigSchema: z.ZodType<DatabricksAppSlackConfig>;
182
+ declare const unmarshalDatabricksAppTeamsConfigSchema: z.ZodType<DatabricksAppTeamsConfig>;
141
183
  declare const unmarshalEmailConfigSchema: z.ZodType<EmailConfig>;
142
184
  declare const unmarshalEmptySchema: z.ZodType<Empty>;
143
185
  declare const unmarshalGenericWebhookConfigSchema: z.ZodType<GenericWebhookConfig>;
@@ -149,6 +191,8 @@ declare const unmarshalPagerdutyConfigSchema: z.ZodType<PagerdutyConfig>;
149
191
  declare const unmarshalSlackConfigSchema: z.ZodType<SlackConfig>;
150
192
  declare const marshalConfigSchema: z.ZodType;
151
193
  declare const marshalCreateNotificationDestinationRequestSchema: z.ZodType;
194
+ declare const marshalDatabricksAppSlackConfigSchema: z.ZodType;
195
+ declare const marshalDatabricksAppTeamsConfigSchema: z.ZodType;
152
196
  declare const marshalEmailConfigSchema: z.ZodType;
153
197
  declare const marshalGenericWebhookConfigSchema: z.ZodType;
154
198
  declare const marshalMicrosoftTeamsConfigSchema: z.ZodType;
@@ -156,5 +200,5 @@ declare const marshalPagerdutyConfigSchema: z.ZodType;
156
200
  declare const marshalSlackConfigSchema: z.ZodType;
157
201
  declare const marshalUpdateNotificationDestinationRequestSchema: z.ZodType;
158
202
  //#endregion
159
- export { Config, CreateNotificationDestinationRequest, DeleteNotificationDestinationRequest, DestinationType, EmailConfig, Empty, GenericWebhookConfig, GetNotificationDestinationRequest, ListNotificationDestinationsRequest, ListNotificationDestinationsResponse, ListNotificationDestinationsResult, MicrosoftTeamsConfig, NotificationDestination, PagerdutyConfig, SlackConfig, UpdateNotificationDestinationRequest, marshalConfigSchema, marshalCreateNotificationDestinationRequestSchema, marshalEmailConfigSchema, marshalGenericWebhookConfigSchema, marshalMicrosoftTeamsConfigSchema, marshalPagerdutyConfigSchema, marshalSlackConfigSchema, marshalUpdateNotificationDestinationRequestSchema, unmarshalConfigSchema, unmarshalEmailConfigSchema, unmarshalEmptySchema, unmarshalGenericWebhookConfigSchema, unmarshalListNotificationDestinationsResponseSchema, unmarshalListNotificationDestinationsResultSchema, unmarshalMicrosoftTeamsConfigSchema, unmarshalNotificationDestinationSchema, unmarshalPagerdutyConfigSchema, unmarshalSlackConfigSchema };
203
+ export { Config, CreateNotificationDestinationRequest, DatabricksAppSlackConfig, DatabricksAppTeamsConfig, DeleteNotificationDestinationRequest, DestinationType, EmailConfig, Empty, GenericWebhookConfig, GetNotificationDestinationRequest, ListNotificationDestinationsRequest, ListNotificationDestinationsResponse, ListNotificationDestinationsResult, MicrosoftTeamsConfig, NotificationDestination, PagerdutyConfig, SlackConfig, UpdateNotificationDestinationRequest, marshalConfigSchema, marshalCreateNotificationDestinationRequestSchema, marshalDatabricksAppSlackConfigSchema, marshalDatabricksAppTeamsConfigSchema, marshalEmailConfigSchema, marshalGenericWebhookConfigSchema, marshalMicrosoftTeamsConfigSchema, marshalPagerdutyConfigSchema, marshalSlackConfigSchema, marshalUpdateNotificationDestinationRequestSchema, unmarshalConfigSchema, unmarshalDatabricksAppSlackConfigSchema, unmarshalDatabricksAppTeamsConfigSchema, unmarshalEmailConfigSchema, unmarshalEmptySchema, unmarshalGenericWebhookConfigSchema, unmarshalListNotificationDestinationsResponseSchema, unmarshalListNotificationDestinationsResultSchema, unmarshalMicrosoftTeamsConfigSchema, unmarshalNotificationDestinationSchema, unmarshalPagerdutyConfigSchema, unmarshalSlackConfigSchema };
160
204
  //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","names":[],"sources":["../../src/v1/model.ts"],"mappings":";;;cAKa,eAAA;EAAA;;;;;;KAOD,eAAA,WACA,eAAA,eAA8B,eAAA;AAAA,UAGzB,MAAA;EACf,MAAA;IACK,KAAA;IAAgB,KAAA,EAAO,WAAA;EAAA;IACvB,KAAA;IAAgB,KAAA,EAAO,WAAA;EAAA;IACvB,KAAA;IAAyB,cAAA,EAAgB,oBAAA;EAAA;IACzC,KAAA;IAAoB,SAAA,EAAW,eAAA;EAAA;IAC/B,KAAA;IAAyB,cAAA,EAAgB,oBAAA;EAAA;AAAA;AAAA,UAI/B,oCAAA;EAJmD;EAMlE,WAAA;EAVK;EAYL,MAAA,GAAS,MAAA;AAAA;AAAA,UAGM,oCAAA;EACf,EAAA;AAAA;AAAA,UAGe,WAAA;EAjBe;EAmB9B,SAAA;AAAA;AAAA,UAIe,KAAA;AAAA,UAEA,oBAAA;EAvBe;EAyB9B,GAAA;EAzBkE;EA2BlE,MAAA;EAvBe;EAyBf,QAAA;;EAEA,WAAA;EAzBA;EA2BA,QAAA;EAzBS;EA2BT,WAAA;AAAA;AAAA,UAGe,iCAAA;EACf,EAAA;AAAA;AAAA,UAGe,mCAAA;EACf,SAAA;EACA,QAAA;AAAA;AAAA,UAGe,oCAAA;EACf,OAAA,GAAU,kCAAA;EA/BD;EAiCT,aAAA;AAAA;AAAA,UAGe,kCAAA;EAhCK;EAkCpB,EAAA;EAhCe;EAkCf,WAAA;;EAEA,eAAA,GAAkB,eAA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Type = {
6
6
  EMAIL: "EMAIL",
7
7
  WEBHOOK: "WEBHOOK",
8
8
  PAGERDUTY: "PAGERDUTY",
9
- MICROSOFT_TEAMS: "MICROSOFT_TEAMS"
9
+ MICROSOFT_TEAMS: "MICROSOFT_TEAMS",
10
+ DATABRICKS_APP_SLACK: "DATABRICKS_APP_SLACK",
11
+ DATABRICKS_APP_TEAMS: "DATABRICKS_APP_TEAMS"
10
12
  };
11
13
  const unmarshalConfigSchema = z.object({
12
14
  slack: z.lazy(() => unmarshalSlackConfigSchema).optional(),
13
15
  email: z.lazy(() => unmarshalEmailConfigSchema).optional(),
14
16
  generic_webhook: z.lazy(() => unmarshalGenericWebhookConfigSchema).optional(),
15
17
  pagerduty: z.lazy(() => unmarshalPagerdutyConfigSchema).optional(),
16
- microsoft_teams: z.lazy(() => unmarshalMicrosoftTeamsConfigSchema).optional()
18
+ microsoft_teams: z.lazy(() => unmarshalMicrosoftTeamsConfigSchema).optional(),
19
+ databricks_app_slack: z.lazy(() => unmarshalDatabricksAppSlackConfigSchema).optional(),
20
+ databricks_app_teams: z.lazy(() => unmarshalDatabricksAppTeamsConfigSchema).optional()
17
21
  }).transform((d) => ({ config: d.slack !== void 0 ? {
18
22
  $case: "slack",
19
23
  slack: d.slack
@@ -29,7 +33,39 @@ const unmarshalConfigSchema = z.object({
29
33
  } : d.microsoft_teams !== void 0 ? {
30
34
  $case: "microsoftTeams",
31
35
  microsoftTeams: d.microsoft_teams
36
+ } : d.databricks_app_slack !== void 0 ? {
37
+ $case: "databricksAppSlack",
38
+ databricksAppSlack: d.databricks_app_slack
39
+ } : d.databricks_app_teams !== void 0 ? {
40
+ $case: "databricksAppTeams",
41
+ databricksAppTeams: d.databricks_app_teams
32
42
  } : void 0 }));
43
+ const unmarshalDatabricksAppSlackConfigSchema = z.object({
44
+ team_id: z.string().optional(),
45
+ team_id_set: z.boolean().optional(),
46
+ channel_id: z.string().optional(),
47
+ channel_id_set: z.boolean().optional()
48
+ }).transform((d) => ({
49
+ teamId: d.team_id,
50
+ teamIdSet: d.team_id_set,
51
+ channelId: d.channel_id,
52
+ channelIdSet: d.channel_id_set
53
+ }));
54
+ const unmarshalDatabricksAppTeamsConfigSchema = z.object({
55
+ tenant_id: z.string().optional(),
56
+ tenant_id_set: z.boolean().optional(),
57
+ team_id: z.string().optional(),
58
+ team_id_set: z.boolean().optional(),
59
+ channel_id: z.string().optional(),
60
+ channel_id_set: z.boolean().optional()
61
+ }).transform((d) => ({
62
+ tenantId: d.tenant_id,
63
+ tenantIdSet: d.tenant_id_set,
64
+ teamId: d.team_id,
65
+ teamIdSet: d.team_id_set,
66
+ channelId: d.channel_id,
67
+ channelIdSet: d.channel_id_set
68
+ }));
33
69
  const unmarshalEmailConfigSchema = z.object({ addresses: z.array(z.string()).optional() }).transform((d) => ({ addresses: d.addresses }));
34
70
  const unmarshalEmptySchema = z.object({});
35
71
  const unmarshalGenericWebhookConfigSchema = z.object({
@@ -141,13 +177,23 @@ const marshalConfigSchema = z.object({ config: z.discriminatedUnion("$case", [
141
177
  z.object({
142
178
  $case: z.literal("microsoftTeams"),
143
179
  microsoftTeams: z.lazy(() => marshalMicrosoftTeamsConfigSchema)
180
+ }),
181
+ z.object({
182
+ $case: z.literal("databricksAppSlack"),
183
+ databricksAppSlack: z.lazy(() => marshalDatabricksAppSlackConfigSchema)
184
+ }),
185
+ z.object({
186
+ $case: z.literal("databricksAppTeams"),
187
+ databricksAppTeams: z.lazy(() => marshalDatabricksAppTeamsConfigSchema)
144
188
  })
145
189
  ]).optional() }).transform((d) => ({
146
190
  ...d.config?.$case === "slack" && { slack: d.config.slack },
147
191
  ...d.config?.$case === "email" && { email: d.config.email },
148
192
  ...d.config?.$case === "genericWebhook" && { generic_webhook: d.config.genericWebhook },
149
193
  ...d.config?.$case === "pagerduty" && { pagerduty: d.config.pagerduty },
150
- ...d.config?.$case === "microsoftTeams" && { microsoft_teams: d.config.microsoftTeams }
194
+ ...d.config?.$case === "microsoftTeams" && { microsoft_teams: d.config.microsoftTeams },
195
+ ...d.config?.$case === "databricksAppSlack" && { databricks_app_slack: d.config.databricksAppSlack },
196
+ ...d.config?.$case === "databricksAppTeams" && { databricks_app_teams: d.config.databricksAppTeams }
151
197
  }));
152
198
  const marshalCreateNotificationDestinationRequestSchema = z.object({
153
199
  displayName: z.string().optional(),
@@ -156,6 +202,32 @@ const marshalCreateNotificationDestinationRequestSchema = z.object({
156
202
  display_name: d.displayName,
157
203
  config: d.config
158
204
  }));
205
+ const marshalDatabricksAppSlackConfigSchema = z.object({
206
+ teamId: z.string().optional(),
207
+ teamIdSet: z.boolean().optional(),
208
+ channelId: z.string().optional(),
209
+ channelIdSet: z.boolean().optional()
210
+ }).transform((d) => ({
211
+ team_id: d.teamId,
212
+ team_id_set: d.teamIdSet,
213
+ channel_id: d.channelId,
214
+ channel_id_set: d.channelIdSet
215
+ }));
216
+ const marshalDatabricksAppTeamsConfigSchema = z.object({
217
+ tenantId: z.string().optional(),
218
+ tenantIdSet: z.boolean().optional(),
219
+ teamId: z.string().optional(),
220
+ teamIdSet: z.boolean().optional(),
221
+ channelId: z.string().optional(),
222
+ channelIdSet: z.boolean().optional()
223
+ }).transform((d) => ({
224
+ tenant_id: d.tenantId,
225
+ tenant_id_set: d.tenantIdSet,
226
+ team_id: d.teamId,
227
+ team_id_set: d.teamIdSet,
228
+ channel_id: d.channelId,
229
+ channel_id_set: d.channelIdSet
230
+ }));
159
231
  const marshalEmailConfigSchema = z.object({ addresses: z.array(z.string()).optional() }).transform((d) => ({ addresses: d.addresses }));
160
232
  const marshalGenericWebhookConfigSchema = z.object({
161
233
  url: z.string().optional(),
@@ -228,5 +300,5 @@ const marshalUpdateNotificationDestinationRequestSchema = z.object({
228
300
  }));
229
301
 
230
302
  //#endregion
231
- export { DestinationType, marshalConfigSchema, marshalCreateNotificationDestinationRequestSchema, marshalEmailConfigSchema, marshalGenericWebhookConfigSchema, marshalMicrosoftTeamsConfigSchema, marshalPagerdutyConfigSchema, marshalSlackConfigSchema, marshalUpdateNotificationDestinationRequestSchema, unmarshalConfigSchema, unmarshalEmailConfigSchema, unmarshalEmptySchema, unmarshalGenericWebhookConfigSchema, unmarshalListNotificationDestinationsResponseSchema, unmarshalListNotificationDestinationsResultSchema, unmarshalMicrosoftTeamsConfigSchema, unmarshalNotificationDestinationSchema, unmarshalPagerdutyConfigSchema, unmarshalSlackConfigSchema };
303
+ export { DestinationType, marshalConfigSchema, marshalCreateNotificationDestinationRequestSchema, marshalDatabricksAppSlackConfigSchema, marshalDatabricksAppTeamsConfigSchema, marshalEmailConfigSchema, marshalGenericWebhookConfigSchema, marshalMicrosoftTeamsConfigSchema, marshalPagerdutyConfigSchema, marshalSlackConfigSchema, marshalUpdateNotificationDestinationRequestSchema, unmarshalConfigSchema, unmarshalDatabricksAppSlackConfigSchema, unmarshalDatabricksAppTeamsConfigSchema, unmarshalEmailConfigSchema, unmarshalEmptySchema, unmarshalGenericWebhookConfigSchema, unmarshalListNotificationDestinationsResponseSchema, unmarshalListNotificationDestinationsResultSchema, unmarshalMicrosoftTeamsConfigSchema, unmarshalNotificationDestinationSchema, unmarshalPagerdutyConfigSchema, unmarshalSlackConfigSchema };
232
304
  //# sourceMappingURL=model.js.map
@@ -1 +1 @@
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 {z} from 'zod';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.\nexport const DestinationType = {\n SLACK: 'SLACK',\n EMAIL: 'EMAIL',\n WEBHOOK: 'WEBHOOK',\n PAGERDUTY: 'PAGERDUTY',\n MICROSOFT_TEAMS: 'MICROSOFT_TEAMS',\n} as const;\nexport type DestinationType =\n | (typeof DestinationType)[keyof typeof DestinationType]\n | (string & {});\n\nexport interface Config {\n config?:\n | {$case: 'slack'; slack: SlackConfig}\n | {$case: 'email'; email: EmailConfig}\n | {$case: 'genericWebhook'; genericWebhook: GenericWebhookConfig}\n | {$case: 'pagerduty'; pagerduty: PagerdutyConfig}\n | {$case: 'microsoftTeams'; microsoftTeams: MicrosoftTeamsConfig}\n | undefined;\n}\n\nexport interface CreateNotificationDestinationRequest {\n /** The display name for the notification destination. */\n displayName?: string | undefined;\n /** The configuration for the notification destination. Must wrap EXACTLY one of the nested configs. */\n config?: Config | undefined;\n}\n\nexport interface DeleteNotificationDestinationRequest {\n id?: string | undefined;\n}\n\nexport interface EmailConfig {\n /** Email addresses to notify. */\n addresses?: string[] | undefined;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface Empty {}\n\nexport interface GenericWebhookConfig {\n /** [Input-Only] URL for webhook. */\n url?: string | undefined;\n /** [Output-Only] Whether URL is set. */\n urlSet?: boolean | undefined;\n /** [Input-Only][Optional] Username for webhook. */\n username?: string | undefined;\n /** [Output-Only] Whether username is set. */\n usernameSet?: boolean | undefined;\n /** [Input-Only][Optional] Password for webhook. */\n password?: string | undefined;\n /** [Output-Only] Whether password is set. */\n passwordSet?: boolean | undefined;\n}\n\nexport interface GetNotificationDestinationRequest {\n id?: string | undefined;\n}\n\nexport interface ListNotificationDestinationsRequest {\n pageToken?: string | undefined;\n pageSize?: bigint | undefined;\n}\n\nexport interface ListNotificationDestinationsResponse {\n results?: ListNotificationDestinationsResult[] | undefined;\n /** Page token for next of results. */\n nextPageToken?: string | undefined;\n}\n\nexport interface ListNotificationDestinationsResult {\n /** UUID identifying notification destination. */\n id?: string | undefined;\n /** The display name for the notification destination. */\n displayName?: string | undefined;\n /** [Output-only] The type of the notification destination. The type can not be changed once set. */\n destinationType?: DestinationType | undefined;\n /** The configuration for the notification destination. Will be exactly one of the nested configs. Only returns for users with workspace admin permissions. */\n config?: Config | undefined;\n}\n\nexport interface MicrosoftTeamsConfig {\n /** [Input-Only] URL for Microsoft Teams webhook. */\n url?: string | undefined;\n /** [Output-Only] Whether URL is set. */\n urlSet?: boolean | undefined;\n /** [Input-Only] App ID for Microsoft Teams App. */\n appId?: string | undefined;\n /** [Output-Only] Whether App ID is set. */\n appIdSet?: boolean | undefined;\n /** [Input-Only] Secret for Microsoft Teams App authentication. */\n authSecret?: string | undefined;\n /** [Output-Only] Whether secret is set. */\n authSecretSet?: boolean | undefined;\n /** [Input-Only] Channel URL for Microsoft Teams App. */\n channelUrl?: string | undefined;\n /** [Output-Only] Whether Channel URL is set. */\n channelUrlSet?: boolean | undefined;\n /** [Input-Only] Tenant ID for Microsoft Teams App. */\n tenantId?: string | undefined;\n /** [Output-Only] Whether Tenant ID is set. */\n tenantIdSet?: boolean | undefined;\n}\n\nexport interface NotificationDestination {\n /** UUID identifying notification destination. */\n id?: string | undefined;\n /** The display name for the notification destination. */\n displayName?: string | undefined;\n /** [Output-only] The type of the notification destination. The type can not be changed once set. */\n destinationType?: DestinationType | undefined;\n /** The configuration for the notification destination. Will be exactly one of the nested configs. Only returns for users with workspace admin permissions. */\n config?: Config | undefined;\n}\n\nexport interface PagerdutyConfig {\n /** [Input-Only] Integration key for PagerDuty. */\n integrationKey?: string | undefined;\n /** [Output-Only] Whether integration key is set. */\n integrationKeySet?: boolean | undefined;\n}\n\nexport interface SlackConfig {\n /** [Input-Only] URL for Slack destination. */\n url?: string | undefined;\n /** [Output-Only] Whether URL is set. */\n urlSet?: boolean | undefined;\n /** [Input-Only] OAuth token for Slack authentication. */\n oauthToken?: string | undefined;\n /** [Output-Only] Whether OAuth token is set. */\n oauthTokenSet?: boolean | undefined;\n /** [Input-Only] Slack channel ID for notifications. */\n channelId?: string | undefined;\n /** [Output-Only] Whether channel ID is set. */\n channelIdSet?: boolean | undefined;\n}\n\nexport interface UpdateNotificationDestinationRequest {\n /** UUID identifying notification destination. */\n id?: string | undefined;\n /** The display name for the notification destination. */\n displayName?: string | undefined;\n /** The configuration for the notification destination. Must wrap EXACTLY one of the nested configs. */\n config?: Config | undefined;\n}\n\nexport const unmarshalConfigSchema: z.ZodType<Config> = z\n .object({\n slack: z.lazy(() => unmarshalSlackConfigSchema).optional(),\n email: z.lazy(() => unmarshalEmailConfigSchema).optional(),\n generic_webhook: z\n .lazy(() => unmarshalGenericWebhookConfigSchema)\n .optional(),\n pagerduty: z.lazy(() => unmarshalPagerdutyConfigSchema).optional(),\n microsoft_teams: z\n .lazy(() => unmarshalMicrosoftTeamsConfigSchema)\n .optional(),\n })\n .transform(d => ({\n config:\n d.slack !== undefined\n ? {$case: 'slack' as const, slack: d.slack}\n : d.email !== undefined\n ? {$case: 'email' as const, email: d.email}\n : d.generic_webhook !== undefined\n ? {\n $case: 'genericWebhook' as const,\n genericWebhook: d.generic_webhook,\n }\n : d.pagerduty !== undefined\n ? {$case: 'pagerduty' as const, pagerduty: d.pagerduty}\n : d.microsoft_teams !== undefined\n ? {\n $case: 'microsoftTeams' as const,\n microsoftTeams: d.microsoft_teams,\n }\n : undefined,\n }));\n\nexport const unmarshalEmailConfigSchema: z.ZodType<EmailConfig> = z\n .object({\n addresses: z.array(z.string()).optional(),\n })\n .transform(d => ({\n addresses: d.addresses,\n }));\n\nexport const unmarshalEmptySchema: z.ZodType<Empty> = z.object({});\n\nexport const unmarshalGenericWebhookConfigSchema: z.ZodType<GenericWebhookConfig> =\n z\n .object({\n url: z.string().optional(),\n url_set: z.boolean().optional(),\n username: z.string().optional(),\n username_set: z.boolean().optional(),\n password: z.string().optional(),\n password_set: z.boolean().optional(),\n })\n .transform(d => ({\n url: d.url,\n urlSet: d.url_set,\n username: d.username,\n usernameSet: d.username_set,\n password: d.password,\n passwordSet: d.password_set,\n }));\n\nexport const unmarshalListNotificationDestinationsResponseSchema: z.ZodType<ListNotificationDestinationsResponse> =\n z\n .object({\n results: z\n .array(z.lazy(() => unmarshalListNotificationDestinationsResultSchema))\n .optional(),\n next_page_token: z.string().optional(),\n })\n .transform(d => ({\n results: d.results,\n nextPageToken: d.next_page_token,\n }));\n\nexport const unmarshalListNotificationDestinationsResultSchema: z.ZodType<ListNotificationDestinationsResult> =\n z\n .object({\n id: z.string().optional(),\n display_name: z.string().optional(),\n destination_type: z.string().optional(),\n config: z.lazy(() => unmarshalConfigSchema).optional(),\n })\n .transform(d => ({\n id: d.id,\n displayName: d.display_name,\n destinationType: d.destination_type,\n config: d.config,\n }));\n\nexport const unmarshalMicrosoftTeamsConfigSchema: z.ZodType<MicrosoftTeamsConfig> =\n z\n .object({\n url: z.string().optional(),\n url_set: z.boolean().optional(),\n app_id: z.string().optional(),\n app_id_set: z.boolean().optional(),\n auth_secret: z.string().optional(),\n auth_secret_set: z.boolean().optional(),\n channel_url: z.string().optional(),\n channel_url_set: z.boolean().optional(),\n tenant_id: z.string().optional(),\n tenant_id_set: z.boolean().optional(),\n })\n .transform(d => ({\n url: d.url,\n urlSet: d.url_set,\n appId: d.app_id,\n appIdSet: d.app_id_set,\n authSecret: d.auth_secret,\n authSecretSet: d.auth_secret_set,\n channelUrl: d.channel_url,\n channelUrlSet: d.channel_url_set,\n tenantId: d.tenant_id,\n tenantIdSet: d.tenant_id_set,\n }));\n\nexport const unmarshalNotificationDestinationSchema: z.ZodType<NotificationDestination> =\n z\n .object({\n id: z.string().optional(),\n display_name: z.string().optional(),\n destination_type: z.string().optional(),\n config: z.lazy(() => unmarshalConfigSchema).optional(),\n })\n .transform(d => ({\n id: d.id,\n displayName: d.display_name,\n destinationType: d.destination_type,\n config: d.config,\n }));\n\nexport const unmarshalPagerdutyConfigSchema: z.ZodType<PagerdutyConfig> = z\n .object({\n integration_key: z.string().optional(),\n integration_key_set: z.boolean().optional(),\n })\n .transform(d => ({\n integrationKey: d.integration_key,\n integrationKeySet: d.integration_key_set,\n }));\n\nexport const unmarshalSlackConfigSchema: z.ZodType<SlackConfig> = z\n .object({\n url: z.string().optional(),\n url_set: z.boolean().optional(),\n oauth_token: z.string().optional(),\n oauth_token_set: z.boolean().optional(),\n channel_id: z.string().optional(),\n channel_id_set: z.boolean().optional(),\n })\n .transform(d => ({\n url: d.url,\n urlSet: d.url_set,\n oauthToken: d.oauth_token,\n oauthTokenSet: d.oauth_token_set,\n channelId: d.channel_id,\n channelIdSet: d.channel_id_set,\n }));\n\nexport const marshalConfigSchema: z.ZodType = z\n .object({\n config: z\n .discriminatedUnion('$case', [\n z.object({\n $case: z.literal('slack'),\n slack: z.lazy(() => marshalSlackConfigSchema),\n }),\n z.object({\n $case: z.literal('email'),\n email: z.lazy(() => marshalEmailConfigSchema),\n }),\n z.object({\n $case: z.literal('genericWebhook'),\n genericWebhook: z.lazy(() => marshalGenericWebhookConfigSchema),\n }),\n z.object({\n $case: z.literal('pagerduty'),\n pagerduty: z.lazy(() => marshalPagerdutyConfigSchema),\n }),\n z.object({\n $case: z.literal('microsoftTeams'),\n microsoftTeams: z.lazy(() => marshalMicrosoftTeamsConfigSchema),\n }),\n ])\n .optional(),\n })\n .transform(d => ({\n ...(d.config?.$case === 'slack' && {slack: d.config.slack}),\n ...(d.config?.$case === 'email' && {email: d.config.email}),\n ...(d.config?.$case === 'genericWebhook' && {\n generic_webhook: d.config.genericWebhook,\n }),\n ...(d.config?.$case === 'pagerduty' && {pagerduty: d.config.pagerduty}),\n ...(d.config?.$case === 'microsoftTeams' && {\n microsoft_teams: d.config.microsoftTeams,\n }),\n }));\n\nexport const marshalCreateNotificationDestinationRequestSchema: z.ZodType = z\n .object({\n displayName: z.string().optional(),\n config: z.lazy(() => marshalConfigSchema).optional(),\n })\n .transform(d => ({\n display_name: d.displayName,\n config: d.config,\n }));\n\nexport const marshalEmailConfigSchema: z.ZodType = z\n .object({\n addresses: z.array(z.string()).optional(),\n })\n .transform(d => ({\n addresses: d.addresses,\n }));\n\nexport const marshalGenericWebhookConfigSchema: z.ZodType = z\n .object({\n url: z.string().optional(),\n urlSet: z.boolean().optional(),\n username: z.string().optional(),\n usernameSet: z.boolean().optional(),\n password: z.string().optional(),\n passwordSet: z.boolean().optional(),\n })\n .transform(d => ({\n url: d.url,\n url_set: d.urlSet,\n username: d.username,\n username_set: d.usernameSet,\n password: d.password,\n password_set: d.passwordSet,\n }));\n\nexport const marshalMicrosoftTeamsConfigSchema: z.ZodType = z\n .object({\n url: z.string().optional(),\n urlSet: z.boolean().optional(),\n appId: z.string().optional(),\n appIdSet: z.boolean().optional(),\n authSecret: z.string().optional(),\n authSecretSet: z.boolean().optional(),\n channelUrl: z.string().optional(),\n channelUrlSet: z.boolean().optional(),\n tenantId: z.string().optional(),\n tenantIdSet: z.boolean().optional(),\n })\n .transform(d => ({\n url: d.url,\n url_set: d.urlSet,\n app_id: d.appId,\n app_id_set: d.appIdSet,\n auth_secret: d.authSecret,\n auth_secret_set: d.authSecretSet,\n channel_url: d.channelUrl,\n channel_url_set: d.channelUrlSet,\n tenant_id: d.tenantId,\n tenant_id_set: d.tenantIdSet,\n }));\n\nexport const marshalPagerdutyConfigSchema: z.ZodType = z\n .object({\n integrationKey: z.string().optional(),\n integrationKeySet: z.boolean().optional(),\n })\n .transform(d => ({\n integration_key: d.integrationKey,\n integration_key_set: d.integrationKeySet,\n }));\n\nexport const marshalSlackConfigSchema: z.ZodType = z\n .object({\n url: z.string().optional(),\n urlSet: z.boolean().optional(),\n oauthToken: z.string().optional(),\n oauthTokenSet: z.boolean().optional(),\n channelId: z.string().optional(),\n channelIdSet: z.boolean().optional(),\n })\n .transform(d => ({\n url: d.url,\n url_set: d.urlSet,\n oauth_token: d.oauthToken,\n oauth_token_set: d.oauthTokenSet,\n channel_id: d.channelId,\n channel_id_set: d.channelIdSet,\n }));\n\nexport const marshalUpdateNotificationDestinationRequestSchema: z.ZodType = z\n .object({\n id: z.string().optional(),\n displayName: z.string().optional(),\n config: z.lazy(() => marshalConfigSchema).optional(),\n })\n .transform(d => ({\n id: d.id,\n display_name: d.displayName,\n config: d.config,\n }));\n"],"mappings":";;;AAKA,MAAa,kBAAkB;CAC7B,OAAO;CACP,OAAO;CACP,SAAS;CACT,WAAW;CACX,iBAAiB;CAClB;AA4ID,MAAa,wBAA2C,EACrD,OAAO;CACN,OAAO,EAAE,WAAW,2BAA2B,CAAC,UAAU;CAC1D,OAAO,EAAE,WAAW,2BAA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AC,UAAU;CACrD,CAAC,CACD,WAAU,OAAM;CACf,IAAI,EAAE;CACN,cAAc,EAAE;CAChB,QAAQ,EAAE;CACX,EAAE"}
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 {z} from 'zod';\n\n// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.\nexport const DestinationType = {\n SLACK: 'SLACK',\n EMAIL: 'EMAIL',\n WEBHOOK: 'WEBHOOK',\n PAGERDUTY: 'PAGERDUTY',\n MICROSOFT_TEAMS: 'MICROSOFT_TEAMS',\n DATABRICKS_APP_SLACK: 'DATABRICKS_APP_SLACK',\n DATABRICKS_APP_TEAMS: 'DATABRICKS_APP_TEAMS',\n} as const;\nexport type DestinationType =\n | (typeof DestinationType)[keyof typeof DestinationType]\n | (string & {});\n\nexport interface Config {\n config?:\n | {$case: 'slack'; slack: SlackConfig}\n | {$case: 'email'; email: EmailConfig}\n | {$case: 'genericWebhook'; genericWebhook: GenericWebhookConfig}\n | {$case: 'pagerduty'; pagerduty: PagerdutyConfig}\n | {$case: 'microsoftTeams'; microsoftTeams: MicrosoftTeamsConfig}\n | {\n $case: 'databricksAppSlack';\n databricksAppSlack: DatabricksAppSlackConfig;\n }\n | {\n $case: 'databricksAppTeams';\n databricksAppTeams: DatabricksAppTeamsConfig;\n }\n | undefined;\n}\n\nexport interface CreateNotificationDestinationRequest {\n /** The display name for the notification destination. */\n displayName?: string | undefined;\n /** The configuration for the notification destination. Must wrap EXACTLY one of the nested configs. */\n config?: Config | undefined;\n}\n\n/**\n * Slack channel reached through the Databricks app. The app must already be installed in the\n * Slack workspace and connected to this Databricks workspace.\n */\nexport interface DatabricksAppSlackConfig {\n /** [Input-Only] Slack workspace (team) ID the Databricks app is installed in. */\n teamId?: string | undefined;\n /** [Output-Only] Whether team ID is set. */\n teamIdSet?: boolean | undefined;\n /** [Input-Only] Slack channel ID notifications are posted to. */\n channelId?: string | undefined;\n /** [Output-Only] Whether channel ID is set. */\n channelIdSet?: boolean | undefined;\n}\n\n/**\n * Microsoft Teams channel reached through the Databricks app. The app must already be installed in\n * the Microsoft 365 tenant and connected to this Databricks workspace.\n */\nexport interface DatabricksAppTeamsConfig {\n /** [Input-Only] Microsoft Entra tenant ID of the Microsoft 365 tenant the app is installed in. */\n tenantId?: string | undefined;\n /** [Output-Only] Whether tenant ID is set. */\n tenantIdSet?: boolean | undefined;\n /** [Input-Only] Microsoft Entra group ID of the team that owns the channel. */\n teamId?: string | undefined;\n /** [Output-Only] Whether team ID is set. */\n teamIdSet?: boolean | undefined;\n /** [Input-Only] Teams channel ID notifications are posted to. */\n channelId?: string | undefined;\n /** [Output-Only] Whether channel ID is set. */\n channelIdSet?: boolean | undefined;\n}\n\nexport interface DeleteNotificationDestinationRequest {\n id?: string | undefined;\n}\n\nexport interface EmailConfig {\n /** Email addresses to notify. */\n addresses?: string[] | undefined;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface Empty {}\n\nexport interface GenericWebhookConfig {\n /** [Input-Only] URL for webhook. */\n url?: string | undefined;\n /** [Output-Only] Whether URL is set. */\n urlSet?: boolean | undefined;\n /** [Input-Only][Optional] Username for webhook. */\n username?: string | undefined;\n /** [Output-Only] Whether username is set. */\n usernameSet?: boolean | undefined;\n /** [Input-Only][Optional] Password for webhook. */\n password?: string | undefined;\n /** [Output-Only] Whether password is set. */\n passwordSet?: boolean | undefined;\n}\n\nexport interface GetNotificationDestinationRequest {\n id?: string | undefined;\n}\n\nexport interface ListNotificationDestinationsRequest {\n pageToken?: string | undefined;\n pageSize?: bigint | undefined;\n}\n\nexport interface ListNotificationDestinationsResponse {\n results?: ListNotificationDestinationsResult[] | undefined;\n /** Page token for next of results. */\n nextPageToken?: string | undefined;\n}\n\nexport interface ListNotificationDestinationsResult {\n /** UUID identifying notification destination. */\n id?: string | undefined;\n /** The display name for the notification destination. */\n displayName?: string | undefined;\n /** [Output-only] The type of the notification destination. The type can not be changed once set. */\n destinationType?: DestinationType | undefined;\n /** The configuration for the notification destination. Will be exactly one of the nested configs. Only returns for users with workspace admin permissions. */\n config?: Config | undefined;\n}\n\nexport interface MicrosoftTeamsConfig {\n /** [Input-Only] URL for Microsoft Teams webhook. */\n url?: string | undefined;\n /** [Output-Only] Whether URL is set. */\n urlSet?: boolean | undefined;\n /** [Input-Only] App ID for Microsoft Teams App. */\n appId?: string | undefined;\n /** [Output-Only] Whether App ID is set. */\n appIdSet?: boolean | undefined;\n /** [Input-Only] Secret for Microsoft Teams App authentication. */\n authSecret?: string | undefined;\n /** [Output-Only] Whether secret is set. */\n authSecretSet?: boolean | undefined;\n /** [Input-Only] Channel URL for Microsoft Teams App. */\n channelUrl?: string | undefined;\n /** [Output-Only] Whether Channel URL is set. */\n channelUrlSet?: boolean | undefined;\n /** [Input-Only] Tenant ID for Microsoft Teams App. */\n tenantId?: string | undefined;\n /** [Output-Only] Whether Tenant ID is set. */\n tenantIdSet?: boolean | undefined;\n}\n\nexport interface NotificationDestination {\n /** UUID identifying notification destination. */\n id?: string | undefined;\n /** The display name for the notification destination. */\n displayName?: string | undefined;\n /** [Output-only] The type of the notification destination. The type can not be changed once set. */\n destinationType?: DestinationType | undefined;\n /** The configuration for the notification destination. Will be exactly one of the nested configs. Only returns for users with workspace admin permissions. */\n config?: Config | undefined;\n}\n\nexport interface PagerdutyConfig {\n /** [Input-Only] Integration key for PagerDuty. */\n integrationKey?: string | undefined;\n /** [Output-Only] Whether integration key is set. */\n integrationKeySet?: boolean | undefined;\n}\n\nexport interface SlackConfig {\n /** [Input-Only] URL for Slack destination. */\n url?: string | undefined;\n /** [Output-Only] Whether URL is set. */\n urlSet?: boolean | undefined;\n /** [Input-Only] OAuth token for Slack authentication. */\n oauthToken?: string | undefined;\n /** [Output-Only] Whether OAuth token is set. */\n oauthTokenSet?: boolean | undefined;\n /** [Input-Only] Slack channel ID for notifications. */\n channelId?: string | undefined;\n /** [Output-Only] Whether channel ID is set. */\n channelIdSet?: boolean | undefined;\n}\n\nexport interface UpdateNotificationDestinationRequest {\n /** UUID identifying notification destination. */\n id?: string | undefined;\n /** The display name for the notification destination. */\n displayName?: string | undefined;\n /** The configuration for the notification destination. Must wrap EXACTLY one of the nested configs. */\n config?: Config | undefined;\n}\n\nexport const unmarshalConfigSchema: z.ZodType<Config> = z\n .object({\n slack: z.lazy(() => unmarshalSlackConfigSchema).optional(),\n email: z.lazy(() => unmarshalEmailConfigSchema).optional(),\n generic_webhook: z\n .lazy(() => unmarshalGenericWebhookConfigSchema)\n .optional(),\n pagerduty: z.lazy(() => unmarshalPagerdutyConfigSchema).optional(),\n microsoft_teams: z\n .lazy(() => unmarshalMicrosoftTeamsConfigSchema)\n .optional(),\n databricks_app_slack: z\n .lazy(() => unmarshalDatabricksAppSlackConfigSchema)\n .optional(),\n databricks_app_teams: z\n .lazy(() => unmarshalDatabricksAppTeamsConfigSchema)\n .optional(),\n })\n .transform(d => ({\n config:\n d.slack !== undefined\n ? {$case: 'slack' as const, slack: d.slack}\n : d.email !== undefined\n ? {$case: 'email' as const, email: d.email}\n : d.generic_webhook !== undefined\n ? {\n $case: 'genericWebhook' as const,\n genericWebhook: d.generic_webhook,\n }\n : d.pagerduty !== undefined\n ? {$case: 'pagerduty' as const, pagerduty: d.pagerduty}\n : d.microsoft_teams !== undefined\n ? {\n $case: 'microsoftTeams' as const,\n microsoftTeams: d.microsoft_teams,\n }\n : d.databricks_app_slack !== undefined\n ? {\n $case: 'databricksAppSlack' as const,\n databricksAppSlack: d.databricks_app_slack,\n }\n : d.databricks_app_teams !== undefined\n ? {\n $case: 'databricksAppTeams' as const,\n databricksAppTeams: d.databricks_app_teams,\n }\n : undefined,\n }));\n\nexport const unmarshalDatabricksAppSlackConfigSchema: z.ZodType<DatabricksAppSlackConfig> =\n z\n .object({\n team_id: z.string().optional(),\n team_id_set: z.boolean().optional(),\n channel_id: z.string().optional(),\n channel_id_set: z.boolean().optional(),\n })\n .transform(d => ({\n teamId: d.team_id,\n teamIdSet: d.team_id_set,\n channelId: d.channel_id,\n channelIdSet: d.channel_id_set,\n }));\n\nexport const unmarshalDatabricksAppTeamsConfigSchema: z.ZodType<DatabricksAppTeamsConfig> =\n z\n .object({\n tenant_id: z.string().optional(),\n tenant_id_set: z.boolean().optional(),\n team_id: z.string().optional(),\n team_id_set: z.boolean().optional(),\n channel_id: z.string().optional(),\n channel_id_set: z.boolean().optional(),\n })\n .transform(d => ({\n tenantId: d.tenant_id,\n tenantIdSet: d.tenant_id_set,\n teamId: d.team_id,\n teamIdSet: d.team_id_set,\n channelId: d.channel_id,\n channelIdSet: d.channel_id_set,\n }));\n\nexport const unmarshalEmailConfigSchema: z.ZodType<EmailConfig> = z\n .object({\n addresses: z.array(z.string()).optional(),\n })\n .transform(d => ({\n addresses: d.addresses,\n }));\n\nexport const unmarshalEmptySchema: z.ZodType<Empty> = z.object({});\n\nexport const unmarshalGenericWebhookConfigSchema: z.ZodType<GenericWebhookConfig> =\n z\n .object({\n url: z.string().optional(),\n url_set: z.boolean().optional(),\n username: z.string().optional(),\n username_set: z.boolean().optional(),\n password: z.string().optional(),\n password_set: z.boolean().optional(),\n })\n .transform(d => ({\n url: d.url,\n urlSet: d.url_set,\n username: d.username,\n usernameSet: d.username_set,\n password: d.password,\n passwordSet: d.password_set,\n }));\n\nexport const unmarshalListNotificationDestinationsResponseSchema: z.ZodType<ListNotificationDestinationsResponse> =\n z\n .object({\n results: z\n .array(z.lazy(() => unmarshalListNotificationDestinationsResultSchema))\n .optional(),\n next_page_token: z.string().optional(),\n })\n .transform(d => ({\n results: d.results,\n nextPageToken: d.next_page_token,\n }));\n\nexport const unmarshalListNotificationDestinationsResultSchema: z.ZodType<ListNotificationDestinationsResult> =\n z\n .object({\n id: z.string().optional(),\n display_name: z.string().optional(),\n destination_type: z.string().optional(),\n config: z.lazy(() => unmarshalConfigSchema).optional(),\n })\n .transform(d => ({\n id: d.id,\n displayName: d.display_name,\n destinationType: d.destination_type,\n config: d.config,\n }));\n\nexport const unmarshalMicrosoftTeamsConfigSchema: z.ZodType<MicrosoftTeamsConfig> =\n z\n .object({\n url: z.string().optional(),\n url_set: z.boolean().optional(),\n app_id: z.string().optional(),\n app_id_set: z.boolean().optional(),\n auth_secret: z.string().optional(),\n auth_secret_set: z.boolean().optional(),\n channel_url: z.string().optional(),\n channel_url_set: z.boolean().optional(),\n tenant_id: z.string().optional(),\n tenant_id_set: z.boolean().optional(),\n })\n .transform(d => ({\n url: d.url,\n urlSet: d.url_set,\n appId: d.app_id,\n appIdSet: d.app_id_set,\n authSecret: d.auth_secret,\n authSecretSet: d.auth_secret_set,\n channelUrl: d.channel_url,\n channelUrlSet: d.channel_url_set,\n tenantId: d.tenant_id,\n tenantIdSet: d.tenant_id_set,\n }));\n\nexport const unmarshalNotificationDestinationSchema: z.ZodType<NotificationDestination> =\n z\n .object({\n id: z.string().optional(),\n display_name: z.string().optional(),\n destination_type: z.string().optional(),\n config: z.lazy(() => unmarshalConfigSchema).optional(),\n })\n .transform(d => ({\n id: d.id,\n displayName: d.display_name,\n destinationType: d.destination_type,\n config: d.config,\n }));\n\nexport const unmarshalPagerdutyConfigSchema: z.ZodType<PagerdutyConfig> = z\n .object({\n integration_key: z.string().optional(),\n integration_key_set: z.boolean().optional(),\n })\n .transform(d => ({\n integrationKey: d.integration_key,\n integrationKeySet: d.integration_key_set,\n }));\n\nexport const unmarshalSlackConfigSchema: z.ZodType<SlackConfig> = z\n .object({\n url: z.string().optional(),\n url_set: z.boolean().optional(),\n oauth_token: z.string().optional(),\n oauth_token_set: z.boolean().optional(),\n channel_id: z.string().optional(),\n channel_id_set: z.boolean().optional(),\n })\n .transform(d => ({\n url: d.url,\n urlSet: d.url_set,\n oauthToken: d.oauth_token,\n oauthTokenSet: d.oauth_token_set,\n channelId: d.channel_id,\n channelIdSet: d.channel_id_set,\n }));\n\nexport const marshalConfigSchema: z.ZodType = z\n .object({\n config: z\n .discriminatedUnion('$case', [\n z.object({\n $case: z.literal('slack'),\n slack: z.lazy(() => marshalSlackConfigSchema),\n }),\n z.object({\n $case: z.literal('email'),\n email: z.lazy(() => marshalEmailConfigSchema),\n }),\n z.object({\n $case: z.literal('genericWebhook'),\n genericWebhook: z.lazy(() => marshalGenericWebhookConfigSchema),\n }),\n z.object({\n $case: z.literal('pagerduty'),\n pagerduty: z.lazy(() => marshalPagerdutyConfigSchema),\n }),\n z.object({\n $case: z.literal('microsoftTeams'),\n microsoftTeams: z.lazy(() => marshalMicrosoftTeamsConfigSchema),\n }),\n z.object({\n $case: z.literal('databricksAppSlack'),\n databricksAppSlack: z.lazy(\n () => marshalDatabricksAppSlackConfigSchema\n ),\n }),\n z.object({\n $case: z.literal('databricksAppTeams'),\n databricksAppTeams: z.lazy(\n () => marshalDatabricksAppTeamsConfigSchema\n ),\n }),\n ])\n .optional(),\n })\n .transform(d => ({\n ...(d.config?.$case === 'slack' && {slack: d.config.slack}),\n ...(d.config?.$case === 'email' && {email: d.config.email}),\n ...(d.config?.$case === 'genericWebhook' && {\n generic_webhook: d.config.genericWebhook,\n }),\n ...(d.config?.$case === 'pagerduty' && {pagerduty: d.config.pagerduty}),\n ...(d.config?.$case === 'microsoftTeams' && {\n microsoft_teams: d.config.microsoftTeams,\n }),\n ...(d.config?.$case === 'databricksAppSlack' && {\n databricks_app_slack: d.config.databricksAppSlack,\n }),\n ...(d.config?.$case === 'databricksAppTeams' && {\n databricks_app_teams: d.config.databricksAppTeams,\n }),\n }));\n\nexport const marshalCreateNotificationDestinationRequestSchema: z.ZodType = z\n .object({\n displayName: z.string().optional(),\n config: z.lazy(() => marshalConfigSchema).optional(),\n })\n .transform(d => ({\n display_name: d.displayName,\n config: d.config,\n }));\n\nexport const marshalDatabricksAppSlackConfigSchema: z.ZodType = z\n .object({\n teamId: z.string().optional(),\n teamIdSet: z.boolean().optional(),\n channelId: z.string().optional(),\n channelIdSet: z.boolean().optional(),\n })\n .transform(d => ({\n team_id: d.teamId,\n team_id_set: d.teamIdSet,\n channel_id: d.channelId,\n channel_id_set: d.channelIdSet,\n }));\n\nexport const marshalDatabricksAppTeamsConfigSchema: z.ZodType = z\n .object({\n tenantId: z.string().optional(),\n tenantIdSet: z.boolean().optional(),\n teamId: z.string().optional(),\n teamIdSet: z.boolean().optional(),\n channelId: z.string().optional(),\n channelIdSet: z.boolean().optional(),\n })\n .transform(d => ({\n tenant_id: d.tenantId,\n tenant_id_set: d.tenantIdSet,\n team_id: d.teamId,\n team_id_set: d.teamIdSet,\n channel_id: d.channelId,\n channel_id_set: d.channelIdSet,\n }));\n\nexport const marshalEmailConfigSchema: z.ZodType = z\n .object({\n addresses: z.array(z.string()).optional(),\n })\n .transform(d => ({\n addresses: d.addresses,\n }));\n\nexport const marshalGenericWebhookConfigSchema: z.ZodType = z\n .object({\n url: z.string().optional(),\n urlSet: z.boolean().optional(),\n username: z.string().optional(),\n usernameSet: z.boolean().optional(),\n password: z.string().optional(),\n passwordSet: z.boolean().optional(),\n })\n .transform(d => ({\n url: d.url,\n url_set: d.urlSet,\n username: d.username,\n username_set: d.usernameSet,\n password: d.password,\n password_set: d.passwordSet,\n }));\n\nexport const marshalMicrosoftTeamsConfigSchema: z.ZodType = z\n .object({\n url: z.string().optional(),\n urlSet: z.boolean().optional(),\n appId: z.string().optional(),\n appIdSet: z.boolean().optional(),\n authSecret: z.string().optional(),\n authSecretSet: z.boolean().optional(),\n channelUrl: z.string().optional(),\n channelUrlSet: z.boolean().optional(),\n tenantId: z.string().optional(),\n tenantIdSet: z.boolean().optional(),\n })\n .transform(d => ({\n url: d.url,\n url_set: d.urlSet,\n app_id: d.appId,\n app_id_set: d.appIdSet,\n auth_secret: d.authSecret,\n auth_secret_set: d.authSecretSet,\n channel_url: d.channelUrl,\n channel_url_set: d.channelUrlSet,\n tenant_id: d.tenantId,\n tenant_id_set: d.tenantIdSet,\n }));\n\nexport const marshalPagerdutyConfigSchema: z.ZodType = z\n .object({\n integrationKey: z.string().optional(),\n integrationKeySet: z.boolean().optional(),\n })\n .transform(d => ({\n integration_key: d.integrationKey,\n integration_key_set: d.integrationKeySet,\n }));\n\nexport const marshalSlackConfigSchema: z.ZodType = z\n .object({\n url: z.string().optional(),\n urlSet: z.boolean().optional(),\n oauthToken: z.string().optional(),\n oauthTokenSet: z.boolean().optional(),\n channelId: z.string().optional(),\n channelIdSet: z.boolean().optional(),\n })\n .transform(d => ({\n url: d.url,\n url_set: d.urlSet,\n oauth_token: d.oauthToken,\n oauth_token_set: d.oauthTokenSet,\n channel_id: d.channelId,\n channel_id_set: d.channelIdSet,\n }));\n\nexport const marshalUpdateNotificationDestinationRequestSchema: z.ZodType = z\n .object({\n id: z.string().optional(),\n displayName: z.string().optional(),\n config: z.lazy(() => marshalConfigSchema).optional(),\n })\n .transform(d => ({\n id: d.id,\n display_name: d.displayName,\n config: d.config,\n }));\n"],"mappings":";;;AAKA,MAAa,kBAAkB;CAC7B,OAAO;CACP,OAAO;CACP,SAAS;CACT,WAAW;CACX,iBAAiB;CACjB,sBAAsB;CACtB,sBAAsB;CACvB;AAsLD,MAAa,wBAA2C,EACrD,OAAO;CACN,OAAO,EAAE,WAAW,2BAA2B,CAAC,UAAU;CAC1D,OAAO,EAAE,WAAW,2BAA2B,CAAC,UAAU;CAC1D,iBAAiB,EACd,WAAW,oCAAoC,CAC/C,UAAU;CACb,WAAW,EAAE,WAAW,+BAA+B,CAAC,UAAU;CAClE,iBAAiB,EACd,WAAW,oCAAoC,CAC/C,UAAU;CACb,sBAAsB,EACnB,WAAW,wCAAwC,CACnD,UAAU;CACb,sBAAsB,EACnB,WAAW,wCAAwC,CACnD,UAAU;CACd,CAAC,CACD,WAAU,OAAM,EACf,QACE,EAAE,UAAU,SACR;CAAC,OAAO;CAAkB,OAAO,EAAE;CAAM,GACzC,EAAE,UAAU,SACV;CAAC,OAAO;CAAkB,OAAO,EAAE;CAAM,GACzC,EAAE,oBAAoB,SACpB;CACE,OAAO;CACP,gBAAgB,EAAE;CACnB,GACD,EAAE,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Aa,EAAE;CACf,iBAAiB,EAAE;CACnB,YAAY,EAAE;CACd,gBAAgB,EAAE;CACnB,EAAE;AAEL,MAAa,oDAA+D,EACzE,OAAO;CACN,IAAI,EAAE,QAAQ,CAAC,UAAU;CACzB,aAAa,EAAE,QAAQ,CAAC,UAAU;CAClC,QAAQ,EAAE,WAAW,oBAAoB,CAAC,UAAU;CACrD,CAAC,CACD,WAAU,OAAM;CACf,IAAI,EAAE;CACN,cAAc,EAAE;CAChB,QAAQ,EAAE;CACX,EAAE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databricks/sdk-notificationdestinations",
3
- "version": "0.51.1",
3
+ "version": "0.51.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "exports": {
@@ -33,9 +33,9 @@
33
33
  "directory": "packages/notificationdestinations"
34
34
  },
35
35
  "dependencies": {
36
- "@databricks/sdk-auth": ">=0.52.0 <1.0.0",
37
- "@databricks/sdk-core": ">=0.51.1 <1.0.0",
38
- "@databricks/sdk-options": ">=0.51.1 <1.0.0",
36
+ "@databricks/sdk-auth": ">=0.53.0 <1.0.0",
37
+ "@databricks/sdk-core": ">=0.51.2 <1.0.0",
38
+ "@databricks/sdk-options": ">=0.51.2 <1.0.0",
39
39
  "@js-temporal/polyfill": "^0.5.0",
40
40
  "json-bigint": "^1.0.0",
41
41
  "zod": "^4.3.6"