@openmeter/sdk 1.0.0-beta-30b7a9c5b75f → 1.0.0-beta-89ca80a99dcf

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.
@@ -113,36 +113,152 @@ export declare class NotificationRules {
113
113
  * @param signal - An optional abort signal
114
114
  * @returns The created rule
115
115
  */
116
- create(rule: NotificationRuleCreateRequest, options?: RequestOptions): Promise<{
117
- readonly createdAt: Date;
118
- readonly updatedAt: Date;
119
- readonly deletedAt?: Date;
120
- readonly id: string;
121
- type: "entitlements.balance.threshold";
122
- name: string;
123
- disabled?: boolean;
124
- channels: import("./schemas.cjs").components["schemas"]["NotificationChannelMeta"][];
125
- thresholds: import("./schemas.cjs").components["schemas"]["NotificationRuleBalanceThresholdValue"][];
126
- features?: import("./schemas.cjs").components["schemas"]["FeatureMeta"][];
127
- }>;
116
+ create(rule: NotificationRuleCreateRequest, options?: RequestOptions): Promise<import("openapi-typescript-helpers").SuccessResponse<{
117
+ 201: {
118
+ headers: {
119
+ [name: string]: unknown;
120
+ };
121
+ content: {
122
+ "application/json": import("./schemas.cjs").components["schemas"]["NotificationRule"];
123
+ };
124
+ };
125
+ 400: {
126
+ headers: {
127
+ [name: string]: unknown;
128
+ };
129
+ content: {
130
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["BadRequestProblemResponse"];
131
+ };
132
+ };
133
+ 401: {
134
+ headers: {
135
+ [name: string]: unknown;
136
+ };
137
+ content: {
138
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["UnauthorizedProblemResponse"];
139
+ };
140
+ };
141
+ 403: {
142
+ headers: {
143
+ [name: string]: unknown;
144
+ };
145
+ content: {
146
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["ForbiddenProblemResponse"];
147
+ };
148
+ };
149
+ 412: {
150
+ headers: {
151
+ [name: string]: unknown;
152
+ };
153
+ content: {
154
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["PreconditionFailedProblemResponse"];
155
+ };
156
+ };
157
+ 500: {
158
+ headers: {
159
+ [name: string]: unknown;
160
+ };
161
+ content: {
162
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["InternalServerErrorProblemResponse"];
163
+ };
164
+ };
165
+ 503: {
166
+ headers: {
167
+ [name: string]: unknown;
168
+ };
169
+ content: {
170
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["ServiceUnavailableProblemResponse"];
171
+ };
172
+ };
173
+ default: {
174
+ headers: {
175
+ [name: string]: unknown;
176
+ };
177
+ content: {
178
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["UnexpectedProblemResponse"];
179
+ };
180
+ };
181
+ }, `${string}/${string}`>>;
128
182
  /**
129
183
  * Get a notification rule by ID
130
184
  * @param id - The ID of the notification rule
131
185
  * @param signal - An optional abort signal
132
186
  * @returns The notification rule
133
187
  */
134
- get(id: operations['getNotificationRule']['parameters']['path']['ruleId'], options?: RequestOptions): Promise<{
135
- readonly createdAt: Date;
136
- readonly updatedAt: Date;
137
- readonly deletedAt?: Date;
138
- readonly id: string;
139
- type: "entitlements.balance.threshold";
140
- name: string;
141
- disabled?: boolean;
142
- channels: import("./schemas.cjs").components["schemas"]["NotificationChannelMeta"][];
143
- thresholds: import("./schemas.cjs").components["schemas"]["NotificationRuleBalanceThresholdValue"][];
144
- features?: import("./schemas.cjs").components["schemas"]["FeatureMeta"][];
145
- }>;
188
+ get(id: operations['getNotificationRule']['parameters']['path']['ruleId'], options?: RequestOptions): Promise<import("openapi-typescript-helpers").SuccessResponse<{
189
+ 200: {
190
+ headers: {
191
+ [name: string]: unknown;
192
+ };
193
+ content: {
194
+ "application/json": import("./schemas.cjs").components["schemas"]["NotificationRule"];
195
+ };
196
+ };
197
+ 400: {
198
+ headers: {
199
+ [name: string]: unknown;
200
+ };
201
+ content: {
202
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["BadRequestProblemResponse"];
203
+ };
204
+ };
205
+ 401: {
206
+ headers: {
207
+ [name: string]: unknown;
208
+ };
209
+ content: {
210
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["UnauthorizedProblemResponse"];
211
+ };
212
+ };
213
+ 403: {
214
+ headers: {
215
+ [name: string]: unknown;
216
+ };
217
+ content: {
218
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["ForbiddenProblemResponse"];
219
+ };
220
+ };
221
+ 404: {
222
+ headers: {
223
+ [name: string]: unknown;
224
+ };
225
+ content: {
226
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["NotFoundProblemResponse"];
227
+ };
228
+ };
229
+ 412: {
230
+ headers: {
231
+ [name: string]: unknown;
232
+ };
233
+ content: {
234
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["PreconditionFailedProblemResponse"];
235
+ };
236
+ };
237
+ 500: {
238
+ headers: {
239
+ [name: string]: unknown;
240
+ };
241
+ content: {
242
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["InternalServerErrorProblemResponse"];
243
+ };
244
+ };
245
+ 503: {
246
+ headers: {
247
+ [name: string]: unknown;
248
+ };
249
+ content: {
250
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["ServiceUnavailableProblemResponse"];
251
+ };
252
+ };
253
+ default: {
254
+ headers: {
255
+ [name: string]: unknown;
256
+ };
257
+ content: {
258
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["UnexpectedProblemResponse"];
259
+ };
260
+ };
261
+ }, `${string}/${string}`>>;
146
262
  /**
147
263
  * Update a notification rule
148
264
  * @param id - The ID of the notification rule
@@ -150,18 +266,80 @@ export declare class NotificationRules {
150
266
  * @param signal - An optional abort signal
151
267
  * @returns The updated rule
152
268
  */
153
- update(id: operations['updateNotificationRule']['parameters']['path']['ruleId'], rule: NotificationRuleCreateRequest, options?: RequestOptions): Promise<{
154
- readonly createdAt: Date;
155
- readonly updatedAt: Date;
156
- readonly deletedAt?: Date;
157
- readonly id: string;
158
- type: "entitlements.balance.threshold";
159
- name: string;
160
- disabled?: boolean;
161
- channels: import("./schemas.cjs").components["schemas"]["NotificationChannelMeta"][];
162
- thresholds: import("./schemas.cjs").components["schemas"]["NotificationRuleBalanceThresholdValue"][];
163
- features?: import("./schemas.cjs").components["schemas"]["FeatureMeta"][];
164
- }>;
269
+ update(id: operations['updateNotificationRule']['parameters']['path']['ruleId'], rule: NotificationRuleCreateRequest, options?: RequestOptions): Promise<import("openapi-typescript-helpers").SuccessResponse<{
270
+ 200: {
271
+ headers: {
272
+ [name: string]: unknown;
273
+ };
274
+ content: {
275
+ "application/json": import("./schemas.cjs").components["schemas"]["NotificationRule"];
276
+ };
277
+ };
278
+ 400: {
279
+ headers: {
280
+ [name: string]: unknown;
281
+ };
282
+ content: {
283
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["BadRequestProblemResponse"];
284
+ };
285
+ };
286
+ 401: {
287
+ headers: {
288
+ [name: string]: unknown;
289
+ };
290
+ content: {
291
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["UnauthorizedProblemResponse"];
292
+ };
293
+ };
294
+ 403: {
295
+ headers: {
296
+ [name: string]: unknown;
297
+ };
298
+ content: {
299
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["ForbiddenProblemResponse"];
300
+ };
301
+ };
302
+ 404: {
303
+ headers: {
304
+ [name: string]: unknown;
305
+ };
306
+ content: {
307
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["NotFoundProblemResponse"];
308
+ };
309
+ };
310
+ 412: {
311
+ headers: {
312
+ [name: string]: unknown;
313
+ };
314
+ content: {
315
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["PreconditionFailedProblemResponse"];
316
+ };
317
+ };
318
+ 500: {
319
+ headers: {
320
+ [name: string]: unknown;
321
+ };
322
+ content: {
323
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["InternalServerErrorProblemResponse"];
324
+ };
325
+ };
326
+ 503: {
327
+ headers: {
328
+ [name: string]: unknown;
329
+ };
330
+ content: {
331
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["ServiceUnavailableProblemResponse"];
332
+ };
333
+ };
334
+ default: {
335
+ headers: {
336
+ [name: string]: unknown;
337
+ };
338
+ content: {
339
+ "application/problem+json": import("./schemas.cjs").components["schemas"]["UnexpectedProblemResponse"];
340
+ };
341
+ };
342
+ }, `${string}/${string}`>>;
165
343
  /**
166
344
  * List notification rules
167
345
  * @param query - The query parameters