@scaleway/sdk-billing 2.17.0 → 2.18.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,331 +1,333 @@
1
- import type { Money } from '@scaleway/sdk-client';
1
+ import { Money } from "@scaleway/sdk-client";
2
+ //#region src/v2/types.gen.d.ts
2
3
  export type BudgetAlertNotificationType = 'unknown_type' | 'sms' | 'email' | 'webhook';
3
4
  export type ListElectronicAddressesRequestOrderBy = 'starts_at_asc' | 'starts_at_desc';
4
5
  export interface BudgetAlertNotification {
5
- /**
6
- * Alert notification's ID.
7
- */
8
- id: string;
9
- /**
10
- * The creation date of the alert notification.
11
- */
12
- createdAt?: Date;
13
- /**
14
- * The last modification date of the alert notification.
15
- */
16
- updatedAt?: Date;
17
- /**
18
- * Kind of notification.
19
- */
20
- type: BudgetAlertNotificationType;
21
- /**
22
- * List of recipients for this alert.
23
- */
24
- recipients: string[];
6
+ /**
7
+ * Alert notification's ID.
8
+ */
9
+ id: string;
10
+ /**
11
+ * The creation date of the alert notification.
12
+ */
13
+ createdAt?: Date;
14
+ /**
15
+ * The last modification date of the alert notification.
16
+ */
17
+ updatedAt?: Date;
18
+ /**
19
+ * Kind of notification.
20
+ */
21
+ type: BudgetAlertNotificationType;
22
+ /**
23
+ * List of recipients for this alert.
24
+ */
25
+ recipients: string[];
25
26
  }
26
27
  export interface BudgetAlert {
27
- /**
28
- * Alert's ID.
29
- */
30
- id: string;
31
- /**
32
- * The creation date of the alert.
33
- */
34
- createdAt?: Date;
35
- /**
36
- * The last modification date of the alert.
37
- */
38
- updatedAt?: Date;
39
- /**
40
- * Percentage threshold of the budget's limit for which the alert is triggered.
41
- */
42
- threshold: number;
43
- /**
44
- * Notifications to send when the alert is triggered.
45
- */
46
- notifications: BudgetAlertNotification[];
28
+ /**
29
+ * Alert's ID.
30
+ */
31
+ id: string;
32
+ /**
33
+ * The creation date of the alert.
34
+ */
35
+ createdAt?: Date;
36
+ /**
37
+ * The last modification date of the alert.
38
+ */
39
+ updatedAt?: Date;
40
+ /**
41
+ * Percentage threshold of the budget's limit for which the alert is triggered.
42
+ */
43
+ threshold: number;
44
+ /**
45
+ * Notifications to send when the alert is triggered.
46
+ */
47
+ notifications: BudgetAlertNotification[];
47
48
  }
48
49
  export interface Budget {
49
- /**
50
- * Budget's ID.
51
- */
52
- id: string;
53
- /**
54
- * The creation date of the budget.
55
- */
56
- createdAt?: Date;
57
- /**
58
- * The last modification date of the budget.
59
- */
60
- updatedAt?: Date;
61
- /**
62
- * The organization ID of the budget.
63
- */
64
- organizationId: string;
65
- /**
66
- * Whether the budget is enabled or not.
67
- */
68
- enabled: boolean;
69
- /**
70
- * Cost limit for this budget.
71
- */
72
- consumptionLimit?: Money;
73
- /**
74
- * Alerts defined for this budget.
75
- */
76
- alerts: BudgetAlert[];
50
+ /**
51
+ * Budget's ID.
52
+ */
53
+ id: string;
54
+ /**
55
+ * The creation date of the budget.
56
+ */
57
+ createdAt?: Date;
58
+ /**
59
+ * The last modification date of the budget.
60
+ */
61
+ updatedAt?: Date;
62
+ /**
63
+ * The organization ID of the budget.
64
+ */
65
+ organizationId: string;
66
+ /**
67
+ * Whether the budget is enabled or not.
68
+ */
69
+ enabled: boolean;
70
+ /**
71
+ * Cost limit for this budget expressed in the embedded currency code.
72
+ */
73
+ consumptionLimit?: Money;
74
+ /**
75
+ * Alerts defined for this budget.
76
+ */
77
+ alerts: BudgetAlert[];
77
78
  }
78
79
  export interface ElectronicAddress {
79
- /**
80
- * The id of the electronic address.
81
- */
82
- id: string;
83
- /**
84
- * The start date of the electronic address.
85
- */
86
- startsAt?: Date;
87
- /**
88
- * The stop date of the electronic address.
89
- */
90
- stopsAt?: Date;
91
- /**
92
- * The creation date of the electronic address.
93
- */
94
- createdAt?: Date;
95
- /**
96
- * The last modification date of the electronic address.
97
- */
98
- updatedAt?: Date;
99
- /**
100
- * The organization ID of the electronic address.
101
- */
102
- organizationId: string;
103
- /**
104
- * Current value of electronic address.
105
- */
106
- value: string;
80
+ /**
81
+ * The id of the electronic address.
82
+ */
83
+ id: string;
84
+ /**
85
+ * The start date of the electronic address.
86
+ */
87
+ startsAt?: Date;
88
+ /**
89
+ * The stop date of the electronic address.
90
+ */
91
+ stopsAt?: Date;
92
+ /**
93
+ * The creation date of the electronic address.
94
+ */
95
+ createdAt?: Date;
96
+ /**
97
+ * The last modification date of the electronic address.
98
+ */
99
+ updatedAt?: Date;
100
+ /**
101
+ * The organization ID of the electronic address.
102
+ */
103
+ organizationId: string;
104
+ /**
105
+ * Current value of electronic address.
106
+ */
107
+ value: string;
107
108
  }
108
109
  export type CreateBudgetAlertNotificationRequest = {
109
- /**
110
- * The ID of the budget alert to create notification for.
111
- */
112
- budgetAlertId: string;
113
- /**
114
- * List of phone numbers to receive sms notifications.
115
- *
116
- * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
117
- */
118
- smsPhoneNumbers?: string[];
119
- /**
120
- * List of email addresses to receive email notifications.
121
- *
122
- * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
123
- */
124
- emailAddresses?: string[];
125
- /**
126
- * List of webhook url to receive webhook notifications.
127
- *
128
- * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
129
- */
130
- webhookUrls?: string[];
110
+ /**
111
+ * The ID of the budget alert to create notification for.
112
+ */
113
+ budgetAlertId: string;
114
+ /**
115
+ * List of phone numbers to receive sms notifications.
116
+ *
117
+ * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
118
+ */
119
+ smsPhoneNumbers?: string[];
120
+ /**
121
+ * List of email addresses to receive email notifications.
122
+ *
123
+ * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
124
+ */
125
+ emailAddresses?: string[];
126
+ /**
127
+ * List of webhook url to receive webhook notifications.
128
+ *
129
+ * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
130
+ */
131
+ webhookUrls?: string[];
131
132
  };
132
133
  export type CreateBudgetAlertRequest = {
133
- /**
134
- * The ID of the budget to create alert for.
135
- */
136
- budgetId: string;
137
- /**
138
- * Threshold above which the alert is sent.
139
- */
140
- threshold: number;
134
+ /**
135
+ * The ID of the budget to create alert for.
136
+ */
137
+ budgetId: string;
138
+ /**
139
+ * Threshold above which the alert is sent.
140
+ */
141
+ threshold: number;
141
142
  };
142
143
  export type CreateBudgetRequest = {
143
- /**
144
- * The Organization ID of the budget.
145
- */
146
- organizationId?: string;
147
- /**
148
- * Cost limit for the budget.
149
- */
150
- consumptionLimit: number;
151
- /**
152
- * Whether the budget is enabled or not.
153
- */
154
- enabled: boolean;
144
+ /**
145
+ * The Organization ID of the budget.
146
+ */
147
+ organizationId?: string;
148
+ /**
149
+ * Cost limit for the budget expressed in the invoiced currency (no cents allowed).
150
+ */
151
+ consumptionLimit: number;
152
+ /**
153
+ * Whether the budget is enabled or not.
154
+ */
155
+ enabled: boolean;
155
156
  };
156
157
  export type DeleteBudgetAlertNotificationRequest = {
157
- /**
158
- * The ID of the budget alert notification to delete.
159
- */
160
- budgetAlertNotificationId: string;
158
+ /**
159
+ * The ID of the budget alert notification to delete.
160
+ */
161
+ budgetAlertNotificationId: string;
161
162
  };
162
163
  export type DeleteBudgetAlertRequest = {
163
- /**
164
- * The ID of the budget alert to delete.
165
- */
166
- budgetAlertId: string;
164
+ /**
165
+ * The ID of the budget alert to delete.
166
+ */
167
+ budgetAlertId: string;
167
168
  };
168
169
  export type DeleteBudgetRequest = {
169
- /**
170
- * The ID of the budget to delete.
171
- */
172
- budgetId: string;
170
+ /**
171
+ * The ID of the budget to delete.
172
+ */
173
+ budgetId: string;
173
174
  };
174
175
  export type ElectronicBillingApiCreateElectronicAddressRequest = {
175
- /**
176
- * The Organization ID to set electronic address.
177
- */
178
- organizationId?: string;
179
- /**
180
- * Electronic address to set.
181
- */
182
- value: string;
183
- /**
184
- * When electronic address should be active.
185
- */
186
- startsAt?: Date;
187
- /**
188
- * When electronic address should stop being active.
189
- */
190
- stopsAt?: Date;
176
+ /**
177
+ * The Organization ID to set electronic address.
178
+ */
179
+ organizationId?: string;
180
+ /**
181
+ * Electronic address to set.
182
+ */
183
+ value: string;
184
+ /**
185
+ * When electronic address should be active.
186
+ */
187
+ startsAt?: Date;
188
+ /**
189
+ * When electronic address should stop being active.
190
+ */
191
+ stopsAt?: Date;
191
192
  };
192
193
  export type ElectronicBillingApiDeleteElectronicAddressRequest = {
193
- /**
194
- * The ID of the electronic address to delete.
195
- */
196
- electronicAddressId: string;
194
+ /**
195
+ * The ID of the electronic address to delete.
196
+ */
197
+ electronicAddressId: string;
197
198
  };
198
199
  export type ElectronicBillingApiGetElectronicAddressRequest = {
199
- /**
200
- * The ID of the electronic address we want to retrieve.
201
- */
202
- electronicAddressId: string;
200
+ /**
201
+ * The ID of the electronic address we want to retrieve.
202
+ */
203
+ electronicAddressId: string;
203
204
  };
204
205
  export type ElectronicBillingApiListElectronicAddressesRequest = {
205
- /**
206
- * Page number to return, from the paginated results.
207
- */
208
- page?: number;
209
- /**
210
- * Number of Electronic Address to return per page.
211
- */
212
- pageSize?: number;
213
- /**
214
- * Sort order of Electronic address in the response.
215
- */
216
- orderBy?: ListElectronicAddressesRequestOrderBy;
217
- /**
218
- * The Organization ID to set electronic address.
219
- */
220
- organizationId?: string;
221
- /**
222
- * Filter services where electronic address start_date is greater or equal to starts_after.
223
- */
224
- startsAfter?: Date;
225
- /**
226
- * Filter services where electronic address stop_date is before stops_before.
227
- */
228
- stopsBefore?: Date;
206
+ /**
207
+ * Page number to return, from the paginated results.
208
+ */
209
+ page?: number;
210
+ /**
211
+ * Number of Electronic Address to return per page.
212
+ */
213
+ pageSize?: number;
214
+ /**
215
+ * Sort order of Electronic address in the response.
216
+ */
217
+ orderBy?: ListElectronicAddressesRequestOrderBy;
218
+ /**
219
+ * The Organization ID to set electronic address.
220
+ */
221
+ organizationId?: string;
222
+ /**
223
+ * Filter services where electronic address start_date is greater or equal to starts_after.
224
+ */
225
+ startsAfter?: Date;
226
+ /**
227
+ * Filter services where electronic address stop_date is before stops_before.
228
+ */
229
+ stopsBefore?: Date;
229
230
  };
230
231
  export type ElectronicBillingApiUpdateElectronicAddressRequest = {
231
- /**
232
- * The ID of the electronic address we want to update.
233
- */
234
- electronicAddressId: string;
235
- /**
236
- * Electronic address to set.
237
- */
238
- value?: string;
239
- /**
240
- * When electronic address should stop being active.
241
- */
242
- stopsAt?: Date;
232
+ /**
233
+ * The ID of the electronic address we want to update.
234
+ */
235
+ electronicAddressId: string;
236
+ /**
237
+ * Electronic address to set.
238
+ */
239
+ value?: string;
240
+ /**
241
+ * When electronic address should stop being active.
242
+ */
243
+ stopsAt?: Date;
243
244
  };
244
245
  export type GetBudgetRequest = {
245
- /**
246
- * The ID of the budget.
247
- */
248
- budgetId: string;
246
+ /**
247
+ * The ID of the budget.
248
+ */
249
+ budgetId: string;
249
250
  };
250
251
  export type ListBudgetsRequest = {
251
- /**
252
- * Filter by organization ID.
253
- */
254
- organizationId?: string;
255
- /**
256
- * Page number.
257
- */
258
- page?: number;
259
- /**
260
- * Positive integer to select the number of items to return.
261
- */
262
- pageSize?: number;
252
+ /**
253
+ * Filter by organization ID.
254
+ */
255
+ organizationId?: string;
256
+ /**
257
+ * Page number.
258
+ */
259
+ page?: number;
260
+ /**
261
+ * Positive integer to select the number of items to return.
262
+ */
263
+ pageSize?: number;
263
264
  };
264
265
  export interface ListBudgetsResponse {
265
- /**
266
- * Detailed budget list.
267
- */
268
- budgets: Budget[];
269
- /**
270
- * Total number of items.
271
- */
272
- totalCount: number;
266
+ /**
267
+ * Detailed budget list.
268
+ */
269
+ budgets: Budget[];
270
+ /**
271
+ * Total number of items.
272
+ */
273
+ totalCount: number;
273
274
  }
274
275
  export interface ListElectronicAddressesResponse {
275
- /**
276
- * List of electronic addresses.
277
- */
278
- electronicAddresses: ElectronicAddress[];
279
- /**
280
- * Total Number of returned electronic addresses.
281
- */
282
- totalCount: number;
276
+ /**
277
+ * List of electronic addresses.
278
+ */
279
+ electronicAddresses: ElectronicAddress[];
280
+ /**
281
+ * Total Number of returned electronic addresses.
282
+ */
283
+ totalCount: number;
283
284
  }
284
285
  export type UpdateBudgetAlertNotificationRequest = {
285
- /**
286
- * The ID of the budget alert notification to update.
287
- */
288
- budgetAlertNotificationId: string;
289
- /**
290
- * List of phone numbers to receive sms notifications.
291
- *
292
- * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
293
- */
294
- smsPhoneNumbers?: string[];
295
- /**
296
- * List of email addresses to receive email notifications.
297
- *
298
- * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
299
- */
300
- emailAddresses?: string[];
301
- /**
302
- * List of webhook url to receive webhook notifications.
303
- *
304
- * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
305
- */
306
- webhookUrls?: string[];
286
+ /**
287
+ * The ID of the budget alert notification to update.
288
+ */
289
+ budgetAlertNotificationId: string;
290
+ /**
291
+ * List of phone numbers to receive sms notifications.
292
+ *
293
+ * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
294
+ */
295
+ smsPhoneNumbers?: string[];
296
+ /**
297
+ * List of email addresses to receive email notifications.
298
+ *
299
+ * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
300
+ */
301
+ emailAddresses?: string[];
302
+ /**
303
+ * List of webhook url to receive webhook notifications.
304
+ *
305
+ * One-of ('recipientType'): at most one of 'smsPhoneNumbers', 'emailAddresses', 'webhookUrls' could be set.
306
+ */
307
+ webhookUrls?: string[];
307
308
  };
308
309
  export type UpdateBudgetAlertRequest = {
309
- /**
310
- * The ID of the budget alert to update.
311
- */
312
- budgetAlertId: string;
313
- /**
314
- * Threshold above which the alert is sent.
315
- */
316
- threshold: number;
310
+ /**
311
+ * The ID of the budget alert to update.
312
+ */
313
+ budgetAlertId: string;
314
+ /**
315
+ * Threshold above which the alert is sent.
316
+ */
317
+ threshold: number;
317
318
  };
318
319
  export type UpdateBudgetRequest = {
319
- /**
320
- * The ID of the budget to update.
321
- */
322
- budgetId: string;
323
- /**
324
- * Cost limit for the budget.
325
- */
326
- consumptionLimit?: number;
327
- /**
328
- * Whether the budget will be enabled or not.
329
- */
330
- enabled?: boolean;
320
+ /**
321
+ * The ID of the budget to update.
322
+ */
323
+ budgetId: string;
324
+ /**
325
+ * Cost limit for the budget expressed in the invoiced currency (no cents allowed).
326
+ */
327
+ consumptionLimit?: number;
328
+ /**
329
+ * Whether the budget will be enabled or not.
330
+ */
331
+ enabled?: boolean;
331
332
  };
333
+ //#endregion