@openmeter/client 1.0.0-beta-c47c2033c9a7 → 1.0.0-beta-9b0450f0db89
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/README.md +16 -3
- package/dist/funcs/entitlements.d.ts +20 -1
- package/dist/funcs/entitlements.js +72 -2
- package/dist/funcs/index.d.ts +1 -0
- package/dist/funcs/index.js +1 -0
- package/dist/funcs/notifications.d.ts +43 -0
- package/dist/funcs/notifications.js +163 -0
- package/dist/index.d.ts +2 -1
- package/dist/lib/version.d.ts +1 -1
- package/dist/lib/version.js +1 -1
- package/dist/models/operations/entitlements.d.ts +31 -1
- package/dist/models/operations/notifications.d.ts +46 -0
- package/dist/models/operations/notifications.js +2 -0
- package/dist/models/schemas.d.ts +968 -6
- package/dist/models/schemas.js +359 -20
- package/dist/models/types.d.ts +263 -3
- package/dist/sdk/internal.d.ts +90 -2
- package/dist/sdk/internal.js +111 -1
- package/dist/sdk/notifications.d.ts +58 -0
- package/dist/sdk/notifications.js +72 -0
- package/package.json +1 -1
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
|
|
2
|
+
import { unwrap } from '../lib/types.js';
|
|
3
|
+
import { paginatePages } from '../lib/paginate.js';
|
|
4
|
+
import { listNotificationChannels, createNotificationChannel, getNotificationChannel, updateNotificationChannel, deleteNotificationChannel, } from '../funcs/notifications.js';
|
|
5
|
+
export class Notifications {
|
|
6
|
+
_client;
|
|
7
|
+
constructor(_client) {
|
|
8
|
+
this._client = _client;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* List notification channels
|
|
12
|
+
*
|
|
13
|
+
* List all notification channels.
|
|
14
|
+
*
|
|
15
|
+
* GET /openmeter/notification/channels
|
|
16
|
+
*/
|
|
17
|
+
async listChannels(request, options) {
|
|
18
|
+
return unwrap(await listNotificationChannels(this._client, request, options));
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* List notification channels
|
|
22
|
+
*
|
|
23
|
+
* List all notification channels.
|
|
24
|
+
*
|
|
25
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
26
|
+
*
|
|
27
|
+
* GET /openmeter/notification/channels
|
|
28
|
+
*/
|
|
29
|
+
listChannelsAll(request, options) {
|
|
30
|
+
return paginatePages((req, opts) => listNotificationChannels(this._client, req, opts), request ?? {}, options);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Create notification channel
|
|
34
|
+
*
|
|
35
|
+
* Create a notification channel.
|
|
36
|
+
*
|
|
37
|
+
* POST /openmeter/notification/channels
|
|
38
|
+
*/
|
|
39
|
+
async createChannel(request, options) {
|
|
40
|
+
return unwrap(await createNotificationChannel(this._client, request, options));
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Get notification channel
|
|
44
|
+
*
|
|
45
|
+
* Get a notification channel by id.
|
|
46
|
+
*
|
|
47
|
+
* GET /openmeter/notification/channels/{notificationChannelId}
|
|
48
|
+
*/
|
|
49
|
+
async getChannel(request, options) {
|
|
50
|
+
return unwrap(await getNotificationChannel(this._client, request, options));
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Update notification channel
|
|
54
|
+
*
|
|
55
|
+
* Update a notification channel by id.
|
|
56
|
+
*
|
|
57
|
+
* PUT /openmeter/notification/channels/{notificationChannelId}
|
|
58
|
+
*/
|
|
59
|
+
async updateChannel(request, options) {
|
|
60
|
+
return unwrap(await updateNotificationChannel(this._client, request, options));
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Delete notification channel
|
|
64
|
+
*
|
|
65
|
+
* Delete a notification channel by id.
|
|
66
|
+
*
|
|
67
|
+
* DELETE /openmeter/notification/channels/{notificationChannelId}
|
|
68
|
+
*/
|
|
69
|
+
async deleteChannel(request, options) {
|
|
70
|
+
return unwrap(await deleteNotificationChannel(this._client, request, options));
|
|
71
|
+
}
|
|
72
|
+
}
|