@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.
@@ -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
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmeter/client",
3
- "version": "1.0.0-beta-c47c2033c9a7",
3
+ "version": "1.0.0-beta-9b0450f0db89",
4
4
  "description": "Official TypeScript SDK for the OpenMeter API — usage metering and billing",
5
5
  "keywords": [
6
6
  "openmeter",