@databricks/sdk-budgets 0.34.0 → 0.36.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 +25 -21
- package/dist/v1/client.d.ts.map +1 -1
- package/dist/v1/client.js +146 -179
- package/dist/v1/client.js.map +1 -1
- package/dist/v1/index.d.ts +3 -7
- package/dist/v1/index.js +4 -7
- package/dist/v1/model.d.ts +222 -223
- package/dist/v1/model.d.ts.map +1 -1
- package/dist/v1/model.js +224 -354
- 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/model.js
CHANGED
|
@@ -1,361 +1,231 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/v1/model.ts
|
|
3
4
|
/** Type of action that a budget alert executes when its threshold is crossed. */
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Blocks further usage when the alert threshold is reached. Supported only on
|
|
9
|
-
* AI Gateway budgets. No `target` is required for this action type.
|
|
10
|
-
*/
|
|
11
|
-
BLOCK_USAGE: 'BLOCK_USAGE',
|
|
12
|
-
};
|
|
13
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
|
|
14
|
-
export const AlertConfigurationQuantityType = {
|
|
15
|
-
LIST_PRICE_DOLLARS_USD: 'LIST_PRICE_DOLLARS_USD',
|
|
5
|
+
const ActionConfigurationType = {
|
|
6
|
+
EMAIL_NOTIFICATION: "EMAIL_NOTIFICATION",
|
|
7
|
+
BLOCK_USAGE: "BLOCK_USAGE"
|
|
16
8
|
};
|
|
9
|
+
const AlertConfigurationQuantityType = { LIST_PRICE_DOLLARS_USD: "LIST_PRICE_DOLLARS_USD" };
|
|
17
10
|
/** Evaluation scope for an alert configuration. */
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
ALERT_CONFIGURATION_SCOPE_TYPE_SHARED: 'ALERT_CONFIGURATION_SCOPE_TYPE_SHARED',
|
|
22
|
-
/** Alert evaluates spend per individual user identity. */
|
|
23
|
-
ALERT_CONFIGURATION_SCOPE_TYPE_PER_USER: 'ALERT_CONFIGURATION_SCOPE_TYPE_PER_USER',
|
|
24
|
-
};
|
|
25
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
|
|
26
|
-
export const AlertConfigurationTimePeriod = {
|
|
27
|
-
MONTH: 'MONTH',
|
|
28
|
-
};
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
|
|
30
|
-
export const AlertConfigurationTriggerType = {
|
|
31
|
-
CUMULATIVE_SPENDING_EXCEEDED: 'CUMULATIVE_SPENDING_EXCEEDED',
|
|
11
|
+
const AlertConfigurationScopeType = {
|
|
12
|
+
ALERT_CONFIGURATION_SCOPE_TYPE_SHARED: "ALERT_CONFIGURATION_SCOPE_TYPE_SHARED",
|
|
13
|
+
ALERT_CONFIGURATION_SCOPE_TYPE_PER_USER: "ALERT_CONFIGURATION_SCOPE_TYPE_PER_USER"
|
|
32
14
|
};
|
|
15
|
+
const AlertConfigurationTimePeriod = { MONTH: "MONTH" };
|
|
16
|
+
const AlertConfigurationTriggerType = { CUMULATIVE_SPENDING_EXCEEDED: "CUMULATIVE_SPENDING_EXCEEDED" };
|
|
33
17
|
/**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
BUDGET_RESOURCE_TYPE_ALL_RESOURCES: 'BUDGET_RESOURCE_TYPE_ALL_RESOURCES',
|
|
41
|
-
/** The budget applies only to Unity AI Gateway spending. */
|
|
42
|
-
BUDGET_RESOURCE_TYPE_UNITY_AI_GATEWAY: 'BUDGET_RESOURCE_TYPE_UNITY_AI_GATEWAY',
|
|
43
|
-
};
|
|
44
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention -- Enum-style const object.
|
|
45
|
-
export const BudgetConfigurationFilter_Operator = {
|
|
46
|
-
IN: 'IN',
|
|
18
|
+
* Resource scope for a budget configuration. Determines whether the budget tracks all
|
|
19
|
+
* resources or a specific resource.
|
|
20
|
+
*/
|
|
21
|
+
const BudgetResourceType = {
|
|
22
|
+
BUDGET_RESOURCE_TYPE_ALL_RESOURCES: "BUDGET_RESOURCE_TYPE_ALL_RESOURCES",
|
|
23
|
+
BUDGET_RESOURCE_TYPE_UNITY_AI_GATEWAY: "BUDGET_RESOURCE_TYPE_UNITY_AI_GATEWAY"
|
|
47
24
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
})
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
}));
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
}
|
|
254
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
255
|
-
export const marshalBudgetConfigurationFilter_ClauseSchema = z
|
|
256
|
-
.object({
|
|
257
|
-
operator: z.string().optional(),
|
|
258
|
-
values: z.array(z.string()).optional(),
|
|
259
|
-
})
|
|
260
|
-
.transform(d => ({
|
|
261
|
-
operator: d.operator,
|
|
262
|
-
values: d.values,
|
|
263
|
-
}));
|
|
264
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
265
|
-
export const marshalBudgetConfigurationFilter_TagClauseSchema = z
|
|
266
|
-
.object({
|
|
267
|
-
key: z.string().optional(),
|
|
268
|
-
value: z
|
|
269
|
-
.lazy(() => marshalBudgetConfigurationFilter_ClauseSchema)
|
|
270
|
-
.optional(),
|
|
271
|
-
})
|
|
272
|
-
.transform(d => ({
|
|
273
|
-
key: d.key,
|
|
274
|
-
value: d.value,
|
|
275
|
-
}));
|
|
276
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention -- Proto-style nested message name.
|
|
277
|
-
export const marshalBudgetConfigurationFilter_WorkspaceIdClauseSchema = z
|
|
278
|
-
.object({
|
|
279
|
-
operator: z.string().optional(),
|
|
280
|
-
values: z.array(z.bigint()).optional(),
|
|
281
|
-
})
|
|
282
|
-
.transform(d => ({
|
|
283
|
-
operator: d.operator,
|
|
284
|
-
values: d.values,
|
|
285
|
-
}));
|
|
286
|
-
export const marshalCreateBudgetConfigurationBudgetSchema = z
|
|
287
|
-
.object({
|
|
288
|
-
budgetConfigurationId: z.string().optional(),
|
|
289
|
-
accountId: z.string().optional(),
|
|
290
|
-
createTime: z.bigint().optional(),
|
|
291
|
-
updateTime: z.bigint().optional(),
|
|
292
|
-
alertConfigurations: z
|
|
293
|
-
.array(z.lazy(() => marshalAlertConfigurationSchema))
|
|
294
|
-
.optional(),
|
|
295
|
-
filter: z.lazy(() => marshalBudgetConfigurationFilterSchema).optional(),
|
|
296
|
-
displayName: z.string().optional(),
|
|
297
|
-
resourceType: z.string().optional(),
|
|
298
|
-
})
|
|
299
|
-
.transform(d => ({
|
|
300
|
-
budget_configuration_id: d.budgetConfigurationId,
|
|
301
|
-
account_id: d.accountId,
|
|
302
|
-
create_time: d.createTime,
|
|
303
|
-
update_time: d.updateTime,
|
|
304
|
-
alert_configurations: d.alertConfigurations,
|
|
305
|
-
filter: d.filter,
|
|
306
|
-
display_name: d.displayName,
|
|
307
|
-
resource_type: d.resourceType,
|
|
308
|
-
}));
|
|
309
|
-
export const marshalCreateBudgetConfigurationRequestSchema = z
|
|
310
|
-
.object({
|
|
311
|
-
budget: z
|
|
312
|
-
.lazy(() => marshalCreateBudgetConfigurationBudgetSchema)
|
|
313
|
-
.optional(),
|
|
314
|
-
})
|
|
315
|
-
.transform(d => ({
|
|
316
|
-
budget: d.budget,
|
|
317
|
-
}));
|
|
318
|
-
export const marshalPrincipalOverrideSchema = z
|
|
319
|
-
.object({
|
|
320
|
-
principalId: z.bigint().optional(),
|
|
321
|
-
overrideThreshold: z.string().optional(),
|
|
322
|
-
})
|
|
323
|
-
.transform(d => ({
|
|
324
|
-
principal_id: d.principalId,
|
|
325
|
-
override_threshold: d.overrideThreshold,
|
|
326
|
-
}));
|
|
327
|
-
export const marshalUpdateBudgetConfigurationBudgetSchema = z
|
|
328
|
-
.object({
|
|
329
|
-
budgetConfigurationId: z.string().optional(),
|
|
330
|
-
accountId: z.string().optional(),
|
|
331
|
-
createTime: z.bigint().optional(),
|
|
332
|
-
updateTime: z.bigint().optional(),
|
|
333
|
-
alertConfigurations: z
|
|
334
|
-
.array(z.lazy(() => marshalAlertConfigurationSchema))
|
|
335
|
-
.optional(),
|
|
336
|
-
filter: z.lazy(() => marshalBudgetConfigurationFilterSchema).optional(),
|
|
337
|
-
displayName: z.string().optional(),
|
|
338
|
-
resourceType: z.string().optional(),
|
|
339
|
-
})
|
|
340
|
-
.transform(d => ({
|
|
341
|
-
budget_configuration_id: d.budgetConfigurationId,
|
|
342
|
-
account_id: d.accountId,
|
|
343
|
-
create_time: d.createTime,
|
|
344
|
-
update_time: d.updateTime,
|
|
345
|
-
alert_configurations: d.alertConfigurations,
|
|
346
|
-
filter: d.filter,
|
|
347
|
-
display_name: d.displayName,
|
|
348
|
-
resource_type: d.resourceType,
|
|
349
|
-
}));
|
|
350
|
-
export const marshalUpdateBudgetConfigurationRequestSchema = z
|
|
351
|
-
.object({
|
|
352
|
-
budgetId: z.string().optional(),
|
|
353
|
-
budget: z
|
|
354
|
-
.lazy(() => marshalUpdateBudgetConfigurationBudgetSchema)
|
|
355
|
-
.optional(),
|
|
356
|
-
})
|
|
357
|
-
.transform(d => ({
|
|
358
|
-
budget_id: d.budgetId,
|
|
359
|
-
budget: d.budget,
|
|
360
|
-
}));
|
|
25
|
+
const BudgetConfigurationFilter_Operator = { IN: "IN" };
|
|
26
|
+
const unmarshalActionConfigurationSchema = z.object({
|
|
27
|
+
action_configuration_id: z.string().optional(),
|
|
28
|
+
action_type: z.string().optional(),
|
|
29
|
+
target: z.string().optional()
|
|
30
|
+
}).transform((d) => ({
|
|
31
|
+
actionConfigurationId: d.action_configuration_id,
|
|
32
|
+
actionType: d.action_type,
|
|
33
|
+
target: d.target
|
|
34
|
+
}));
|
|
35
|
+
const unmarshalAlertConfigurationSchema = z.object({
|
|
36
|
+
alert_configuration_id: z.string().optional(),
|
|
37
|
+
time_period: z.string().optional(),
|
|
38
|
+
trigger_type: z.string().optional(),
|
|
39
|
+
quantity_type: z.string().optional(),
|
|
40
|
+
quantity_threshold: z.string().optional(),
|
|
41
|
+
action_configurations: z.array(z.lazy(() => unmarshalActionConfigurationSchema)).optional(),
|
|
42
|
+
scope_type: z.string().optional(),
|
|
43
|
+
principal_overrides: z.array(z.lazy(() => unmarshalPrincipalOverrideSchema)).optional()
|
|
44
|
+
}).transform((d) => ({
|
|
45
|
+
alertConfigurationId: d.alert_configuration_id,
|
|
46
|
+
timePeriod: d.time_period,
|
|
47
|
+
triggerType: d.trigger_type,
|
|
48
|
+
quantityType: d.quantity_type,
|
|
49
|
+
quantityThreshold: d.quantity_threshold,
|
|
50
|
+
actionConfigurations: d.action_configurations,
|
|
51
|
+
scopeType: d.scope_type,
|
|
52
|
+
principalOverrides: d.principal_overrides
|
|
53
|
+
}));
|
|
54
|
+
const unmarshalBudgetConfigurationSchema = z.object({
|
|
55
|
+
budget_configuration_id: z.string().optional(),
|
|
56
|
+
account_id: z.string().optional(),
|
|
57
|
+
create_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
|
|
58
|
+
update_time: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
|
|
59
|
+
alert_configurations: z.array(z.lazy(() => unmarshalAlertConfigurationSchema)).optional(),
|
|
60
|
+
filter: z.lazy(() => unmarshalBudgetConfigurationFilterSchema).optional(),
|
|
61
|
+
display_name: z.string().optional(),
|
|
62
|
+
resource_type: z.string().optional()
|
|
63
|
+
}).transform((d) => ({
|
|
64
|
+
budgetConfigurationId: d.budget_configuration_id,
|
|
65
|
+
accountId: d.account_id,
|
|
66
|
+
createTime: d.create_time,
|
|
67
|
+
updateTime: d.update_time,
|
|
68
|
+
alertConfigurations: d.alert_configurations,
|
|
69
|
+
filter: d.filter,
|
|
70
|
+
displayName: d.display_name,
|
|
71
|
+
resourceType: d.resource_type
|
|
72
|
+
}));
|
|
73
|
+
const unmarshalBudgetConfigurationFilterSchema = z.object({
|
|
74
|
+
workspace_id: z.lazy(() => unmarshalBudgetConfigurationFilter_WorkspaceIdClauseSchema).optional(),
|
|
75
|
+
tags: z.array(z.lazy(() => unmarshalBudgetConfigurationFilter_TagClauseSchema)).optional()
|
|
76
|
+
}).transform((d) => ({
|
|
77
|
+
workspaceId: d.workspace_id,
|
|
78
|
+
tags: d.tags
|
|
79
|
+
}));
|
|
80
|
+
const unmarshalBudgetConfigurationFilter_ClauseSchema = z.object({
|
|
81
|
+
operator: z.string().optional(),
|
|
82
|
+
values: z.array(z.string()).optional()
|
|
83
|
+
}).transform((d) => ({
|
|
84
|
+
operator: d.operator,
|
|
85
|
+
values: d.values
|
|
86
|
+
}));
|
|
87
|
+
const unmarshalBudgetConfigurationFilter_TagClauseSchema = z.object({
|
|
88
|
+
key: z.string().optional(),
|
|
89
|
+
value: z.lazy(() => unmarshalBudgetConfigurationFilter_ClauseSchema).optional()
|
|
90
|
+
}).transform((d) => ({
|
|
91
|
+
key: d.key,
|
|
92
|
+
value: d.value
|
|
93
|
+
}));
|
|
94
|
+
const unmarshalBudgetConfigurationFilter_WorkspaceIdClauseSchema = z.object({
|
|
95
|
+
operator: z.string().optional(),
|
|
96
|
+
values: z.array(z.union([z.number(), z.bigint()]).transform((v) => BigInt(v))).optional()
|
|
97
|
+
}).transform((d) => ({
|
|
98
|
+
operator: d.operator,
|
|
99
|
+
values: d.values
|
|
100
|
+
}));
|
|
101
|
+
const unmarshalCreateBudgetConfigurationResponseSchema = z.object({ budget: z.lazy(() => unmarshalBudgetConfigurationSchema).optional() }).transform((d) => ({ budget: d.budget }));
|
|
102
|
+
const unmarshalDeleteBudgetConfigurationResponseSchema = z.object({});
|
|
103
|
+
const unmarshalGetBudgetConfigurationResponseSchema = z.object({ budget: z.lazy(() => unmarshalBudgetConfigurationSchema).optional() }).transform((d) => ({ budget: d.budget }));
|
|
104
|
+
const unmarshalListBudgetConfigurationsResponseSchema = z.object({
|
|
105
|
+
budgets: z.array(z.lazy(() => unmarshalBudgetConfigurationSchema)).optional(),
|
|
106
|
+
next_page_token: z.string().optional()
|
|
107
|
+
}).transform((d) => ({
|
|
108
|
+
budgets: d.budgets,
|
|
109
|
+
nextPageToken: d.next_page_token
|
|
110
|
+
}));
|
|
111
|
+
const unmarshalPrincipalOverrideSchema = z.object({
|
|
112
|
+
principal_id: z.union([z.number(), z.bigint()]).transform((v) => BigInt(v)).optional(),
|
|
113
|
+
override_threshold: z.string().optional()
|
|
114
|
+
}).transform((d) => ({
|
|
115
|
+
principalId: d.principal_id,
|
|
116
|
+
overrideThreshold: d.override_threshold
|
|
117
|
+
}));
|
|
118
|
+
const unmarshalUpdateBudgetConfigurationResponseSchema = z.object({ budget: z.lazy(() => unmarshalBudgetConfigurationSchema).optional() }).transform((d) => ({ budget: d.budget }));
|
|
119
|
+
const marshalActionConfigurationSchema = z.object({
|
|
120
|
+
actionConfigurationId: z.string().optional(),
|
|
121
|
+
actionType: z.string().optional(),
|
|
122
|
+
target: z.string().optional()
|
|
123
|
+
}).transform((d) => ({
|
|
124
|
+
action_configuration_id: d.actionConfigurationId,
|
|
125
|
+
action_type: d.actionType,
|
|
126
|
+
target: d.target
|
|
127
|
+
}));
|
|
128
|
+
const marshalAlertConfigurationSchema = z.object({
|
|
129
|
+
alertConfigurationId: z.string().optional(),
|
|
130
|
+
timePeriod: z.string().optional(),
|
|
131
|
+
triggerType: z.string().optional(),
|
|
132
|
+
quantityType: z.string().optional(),
|
|
133
|
+
quantityThreshold: z.string().optional(),
|
|
134
|
+
actionConfigurations: z.array(z.lazy(() => marshalActionConfigurationSchema)).optional(),
|
|
135
|
+
scopeType: z.string().optional(),
|
|
136
|
+
principalOverrides: z.array(z.lazy(() => marshalPrincipalOverrideSchema)).optional()
|
|
137
|
+
}).transform((d) => ({
|
|
138
|
+
alert_configuration_id: d.alertConfigurationId,
|
|
139
|
+
time_period: d.timePeriod,
|
|
140
|
+
trigger_type: d.triggerType,
|
|
141
|
+
quantity_type: d.quantityType,
|
|
142
|
+
quantity_threshold: d.quantityThreshold,
|
|
143
|
+
action_configurations: d.actionConfigurations,
|
|
144
|
+
scope_type: d.scopeType,
|
|
145
|
+
principal_overrides: d.principalOverrides
|
|
146
|
+
}));
|
|
147
|
+
const marshalBudgetConfigurationFilterSchema = z.object({
|
|
148
|
+
workspaceId: z.lazy(() => marshalBudgetConfigurationFilter_WorkspaceIdClauseSchema).optional(),
|
|
149
|
+
tags: z.array(z.lazy(() => marshalBudgetConfigurationFilter_TagClauseSchema)).optional()
|
|
150
|
+
}).transform((d) => ({
|
|
151
|
+
workspace_id: d.workspaceId,
|
|
152
|
+
tags: d.tags
|
|
153
|
+
}));
|
|
154
|
+
const marshalBudgetConfigurationFilter_ClauseSchema = z.object({
|
|
155
|
+
operator: z.string().optional(),
|
|
156
|
+
values: z.array(z.string()).optional()
|
|
157
|
+
}).transform((d) => ({
|
|
158
|
+
operator: d.operator,
|
|
159
|
+
values: d.values
|
|
160
|
+
}));
|
|
161
|
+
const marshalBudgetConfigurationFilter_TagClauseSchema = z.object({
|
|
162
|
+
key: z.string().optional(),
|
|
163
|
+
value: z.lazy(() => marshalBudgetConfigurationFilter_ClauseSchema).optional()
|
|
164
|
+
}).transform((d) => ({
|
|
165
|
+
key: d.key,
|
|
166
|
+
value: d.value
|
|
167
|
+
}));
|
|
168
|
+
const marshalBudgetConfigurationFilter_WorkspaceIdClauseSchema = z.object({
|
|
169
|
+
operator: z.string().optional(),
|
|
170
|
+
values: z.array(z.bigint()).optional()
|
|
171
|
+
}).transform((d) => ({
|
|
172
|
+
operator: d.operator,
|
|
173
|
+
values: d.values
|
|
174
|
+
}));
|
|
175
|
+
const marshalCreateBudgetConfigurationBudgetSchema = z.object({
|
|
176
|
+
budgetConfigurationId: z.string().optional(),
|
|
177
|
+
accountId: z.string().optional(),
|
|
178
|
+
createTime: z.bigint().optional(),
|
|
179
|
+
updateTime: z.bigint().optional(),
|
|
180
|
+
alertConfigurations: z.array(z.lazy(() => marshalAlertConfigurationSchema)).optional(),
|
|
181
|
+
filter: z.lazy(() => marshalBudgetConfigurationFilterSchema).optional(),
|
|
182
|
+
displayName: z.string().optional(),
|
|
183
|
+
resourceType: z.string().optional()
|
|
184
|
+
}).transform((d) => ({
|
|
185
|
+
budget_configuration_id: d.budgetConfigurationId,
|
|
186
|
+
account_id: d.accountId,
|
|
187
|
+
create_time: d.createTime,
|
|
188
|
+
update_time: d.updateTime,
|
|
189
|
+
alert_configurations: d.alertConfigurations,
|
|
190
|
+
filter: d.filter,
|
|
191
|
+
display_name: d.displayName,
|
|
192
|
+
resource_type: d.resourceType
|
|
193
|
+
}));
|
|
194
|
+
const marshalCreateBudgetConfigurationRequestSchema = z.object({ budget: z.lazy(() => marshalCreateBudgetConfigurationBudgetSchema).optional() }).transform((d) => ({ budget: d.budget }));
|
|
195
|
+
const marshalPrincipalOverrideSchema = z.object({
|
|
196
|
+
principalId: z.bigint().optional(),
|
|
197
|
+
overrideThreshold: z.string().optional()
|
|
198
|
+
}).transform((d) => ({
|
|
199
|
+
principal_id: d.principalId,
|
|
200
|
+
override_threshold: d.overrideThreshold
|
|
201
|
+
}));
|
|
202
|
+
const marshalUpdateBudgetConfigurationBudgetSchema = z.object({
|
|
203
|
+
budgetConfigurationId: z.string().optional(),
|
|
204
|
+
accountId: z.string().optional(),
|
|
205
|
+
createTime: z.bigint().optional(),
|
|
206
|
+
updateTime: z.bigint().optional(),
|
|
207
|
+
alertConfigurations: z.array(z.lazy(() => marshalAlertConfigurationSchema)).optional(),
|
|
208
|
+
filter: z.lazy(() => marshalBudgetConfigurationFilterSchema).optional(),
|
|
209
|
+
displayName: z.string().optional(),
|
|
210
|
+
resourceType: z.string().optional()
|
|
211
|
+
}).transform((d) => ({
|
|
212
|
+
budget_configuration_id: d.budgetConfigurationId,
|
|
213
|
+
account_id: d.accountId,
|
|
214
|
+
create_time: d.createTime,
|
|
215
|
+
update_time: d.updateTime,
|
|
216
|
+
alert_configurations: d.alertConfigurations,
|
|
217
|
+
filter: d.filter,
|
|
218
|
+
display_name: d.displayName,
|
|
219
|
+
resource_type: d.resourceType
|
|
220
|
+
}));
|
|
221
|
+
const marshalUpdateBudgetConfigurationRequestSchema = z.object({
|
|
222
|
+
budgetId: z.string().optional(),
|
|
223
|
+
budget: z.lazy(() => marshalUpdateBudgetConfigurationBudgetSchema).optional()
|
|
224
|
+
}).transform((d) => ({
|
|
225
|
+
budget_id: d.budgetId,
|
|
226
|
+
budget: d.budget
|
|
227
|
+
}));
|
|
228
|
+
|
|
229
|
+
//#endregion
|
|
230
|
+
export { ActionConfigurationType, AlertConfigurationQuantityType, AlertConfigurationScopeType, AlertConfigurationTimePeriod, AlertConfigurationTriggerType, BudgetConfigurationFilter_Operator, BudgetResourceType, marshalActionConfigurationSchema, marshalAlertConfigurationSchema, marshalBudgetConfigurationFilterSchema, marshalBudgetConfigurationFilter_ClauseSchema, marshalBudgetConfigurationFilter_TagClauseSchema, marshalBudgetConfigurationFilter_WorkspaceIdClauseSchema, marshalCreateBudgetConfigurationBudgetSchema, marshalCreateBudgetConfigurationRequestSchema, marshalPrincipalOverrideSchema, marshalUpdateBudgetConfigurationBudgetSchema, marshalUpdateBudgetConfigurationRequestSchema, unmarshalActionConfigurationSchema, unmarshalAlertConfigurationSchema, unmarshalBudgetConfigurationFilterSchema, unmarshalBudgetConfigurationFilter_ClauseSchema, unmarshalBudgetConfigurationFilter_TagClauseSchema, unmarshalBudgetConfigurationFilter_WorkspaceIdClauseSchema, unmarshalBudgetConfigurationSchema, unmarshalCreateBudgetConfigurationResponseSchema, unmarshalDeleteBudgetConfigurationResponseSchema, unmarshalGetBudgetConfigurationResponseSchema, unmarshalListBudgetConfigurationsResponseSchema, unmarshalPrincipalOverrideSchema, unmarshalUpdateBudgetConfigurationResponseSchema };
|
|
361
231
|
//# sourceMappingURL=model.js.map
|