@openmeter/client 1.0.0-beta-ba497d78b3b6 → 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 +11 -0
- 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/notifications.d.ts +46 -0
- package/dist/models/operations/notifications.js +2 -0
- package/dist/models/schemas.d.ts +515 -6
- package/dist/models/schemas.js +294 -20
- package/dist/models/types.d.ts +252 -3
- package/dist/sdk/internal.d.ts +58 -1
- package/dist/sdk/internal.js +73 -0
- package/dist/sdk/notifications.d.ts +58 -0
- package/dist/sdk/notifications.js +72 -0
- package/package.json +1 -1
package/dist/sdk/internal.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ import type { ListChargesRequest, ListChargesResponse } from '../models/operatio
|
|
|
9
9
|
import type { ListCurrenciesRequest, ListCurrenciesResponse, CreateCustomCurrencyRequest, CreateCustomCurrencyResponse, GetCustomCurrencyRequest, GetCustomCurrencyResponse, ListCostBasesRequest, ListCostBasesResponse, CreateCostBasisRequest, CreateCostBasisResponse } from '../models/operations/currencies.js';
|
|
10
10
|
import type { ListPlanAddonsRequest, ListPlanAddonsResponse } from '../models/operations/planAddons.js';
|
|
11
11
|
import type { QueryEntitlementAccessRequest, QueryEntitlementAccessResponse } from '../models/operations/entitlementAccess.js';
|
|
12
|
-
import type {
|
|
12
|
+
import type { ListNotificationChannelsRequest, ListNotificationChannelsResponse, CreateNotificationChannelRequest, CreateNotificationChannelResponse, GetNotificationChannelRequest, GetNotificationChannelResponse, UpdateNotificationChannelRequest, UpdateNotificationChannelResponse, DeleteNotificationChannelRequest, DeleteNotificationChannelResponse } from '../models/operations/notifications.js';
|
|
13
|
+
import type { AppCatalogItem, Charge, CostBasis, Currency, Entitlement, Invoice, NotificationChannel, PlanAddon } from '../models/types.js';
|
|
13
14
|
/**
|
|
14
15
|
* Operations marked internal in the API definition. They are not part of
|
|
15
16
|
* the customer surface: they may require additional permissions, and they
|
|
@@ -36,6 +37,8 @@ export declare class Internal {
|
|
|
36
37
|
get planAddons(): InternalPlanAddons;
|
|
37
38
|
private _entitlementAccess?;
|
|
38
39
|
get entitlementAccess(): InternalEntitlementAccess;
|
|
40
|
+
private _notifications?;
|
|
41
|
+
get notifications(): InternalNotifications;
|
|
39
42
|
}
|
|
40
43
|
export declare class InternalCustomers {
|
|
41
44
|
private readonly _client;
|
|
@@ -613,3 +616,57 @@ export declare class InternalEntitlementAccess {
|
|
|
613
616
|
*/
|
|
614
617
|
query(request: QueryEntitlementAccessRequest, options?: RequestOptions): Promise<QueryEntitlementAccessResponse>;
|
|
615
618
|
}
|
|
619
|
+
export declare class InternalNotifications {
|
|
620
|
+
private readonly _client;
|
|
621
|
+
constructor(_client: Client);
|
|
622
|
+
/**
|
|
623
|
+
* List notification channels
|
|
624
|
+
*
|
|
625
|
+
* List all notification channels.
|
|
626
|
+
*
|
|
627
|
+
* GET /openmeter/notification/channels
|
|
628
|
+
*/
|
|
629
|
+
listChannels(request?: ListNotificationChannelsRequest, options?: RequestOptions): Promise<ListNotificationChannelsResponse>;
|
|
630
|
+
/**
|
|
631
|
+
* List notification channels
|
|
632
|
+
*
|
|
633
|
+
* List all notification channels.
|
|
634
|
+
*
|
|
635
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
636
|
+
*
|
|
637
|
+
* GET /openmeter/notification/channels
|
|
638
|
+
*/
|
|
639
|
+
listChannelsAll(request?: ListNotificationChannelsRequest, options?: RequestOptions): AsyncIterable<NotificationChannel>;
|
|
640
|
+
/**
|
|
641
|
+
* Create notification channel
|
|
642
|
+
*
|
|
643
|
+
* Create a notification channel.
|
|
644
|
+
*
|
|
645
|
+
* POST /openmeter/notification/channels
|
|
646
|
+
*/
|
|
647
|
+
createChannel(request: CreateNotificationChannelRequest, options?: RequestOptions): Promise<CreateNotificationChannelResponse>;
|
|
648
|
+
/**
|
|
649
|
+
* Get notification channel
|
|
650
|
+
*
|
|
651
|
+
* Get a notification channel by id.
|
|
652
|
+
*
|
|
653
|
+
* GET /openmeter/notification/channels/{notificationChannelId}
|
|
654
|
+
*/
|
|
655
|
+
getChannel(request: GetNotificationChannelRequest, options?: RequestOptions): Promise<GetNotificationChannelResponse>;
|
|
656
|
+
/**
|
|
657
|
+
* Update notification channel
|
|
658
|
+
*
|
|
659
|
+
* Update a notification channel by id.
|
|
660
|
+
*
|
|
661
|
+
* PUT /openmeter/notification/channels/{notificationChannelId}
|
|
662
|
+
*/
|
|
663
|
+
updateChannel(request: UpdateNotificationChannelRequest, options?: RequestOptions): Promise<UpdateNotificationChannelResponse>;
|
|
664
|
+
/**
|
|
665
|
+
* Delete notification channel
|
|
666
|
+
*
|
|
667
|
+
* Delete a notification channel by id.
|
|
668
|
+
*
|
|
669
|
+
* DELETE /openmeter/notification/channels/{notificationChannelId}
|
|
670
|
+
*/
|
|
671
|
+
deleteChannel(request: DeleteNotificationChannelRequest, options?: RequestOptions): Promise<DeleteNotificationChannelResponse>;
|
|
672
|
+
}
|
package/dist/sdk/internal.js
CHANGED
|
@@ -10,6 +10,7 @@ import { listCharges } from '../funcs/charges.js';
|
|
|
10
10
|
import { listCurrencies, createCustomCurrency, getCustomCurrency, listCostBases, createCostBasis, } from '../funcs/currencies.js';
|
|
11
11
|
import { listPlanAddons } from '../funcs/planAddons.js';
|
|
12
12
|
import { queryEntitlementAccess } from '../funcs/entitlementAccess.js';
|
|
13
|
+
import { listNotificationChannels, createNotificationChannel, getNotificationChannel, updateNotificationChannel, deleteNotificationChannel, } from '../funcs/notifications.js';
|
|
13
14
|
/**
|
|
14
15
|
* Operations marked internal in the API definition. They are not part of
|
|
15
16
|
* the customer surface: they may require additional permissions, and they
|
|
@@ -56,6 +57,10 @@ export class Internal {
|
|
|
56
57
|
get entitlementAccess() {
|
|
57
58
|
return (this._entitlementAccess ??= new InternalEntitlementAccess(this._client));
|
|
58
59
|
}
|
|
60
|
+
_notifications;
|
|
61
|
+
get notifications() {
|
|
62
|
+
return (this._notifications ??= new InternalNotifications(this._client));
|
|
63
|
+
}
|
|
59
64
|
}
|
|
60
65
|
export class InternalCustomers {
|
|
61
66
|
_client;
|
|
@@ -761,3 +766,71 @@ export class InternalEntitlementAccess {
|
|
|
761
766
|
return unwrap(await queryEntitlementAccess(this._client, request, options));
|
|
762
767
|
}
|
|
763
768
|
}
|
|
769
|
+
export class InternalNotifications {
|
|
770
|
+
_client;
|
|
771
|
+
constructor(_client) {
|
|
772
|
+
this._client = _client;
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* List notification channels
|
|
776
|
+
*
|
|
777
|
+
* List all notification channels.
|
|
778
|
+
*
|
|
779
|
+
* GET /openmeter/notification/channels
|
|
780
|
+
*/
|
|
781
|
+
async listChannels(request, options) {
|
|
782
|
+
return unwrap(await listNotificationChannels(this._client, request, options));
|
|
783
|
+
}
|
|
784
|
+
/**
|
|
785
|
+
* List notification channels
|
|
786
|
+
*
|
|
787
|
+
* List all notification channels.
|
|
788
|
+
*
|
|
789
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
790
|
+
*
|
|
791
|
+
* GET /openmeter/notification/channels
|
|
792
|
+
*/
|
|
793
|
+
listChannelsAll(request, options) {
|
|
794
|
+
return paginatePages((req, opts) => listNotificationChannels(this._client, req, opts), request ?? {}, options);
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* Create notification channel
|
|
798
|
+
*
|
|
799
|
+
* Create a notification channel.
|
|
800
|
+
*
|
|
801
|
+
* POST /openmeter/notification/channels
|
|
802
|
+
*/
|
|
803
|
+
async createChannel(request, options) {
|
|
804
|
+
return unwrap(await createNotificationChannel(this._client, request, options));
|
|
805
|
+
}
|
|
806
|
+
/**
|
|
807
|
+
* Get notification channel
|
|
808
|
+
*
|
|
809
|
+
* Get a notification channel by id.
|
|
810
|
+
*
|
|
811
|
+
* GET /openmeter/notification/channels/{notificationChannelId}
|
|
812
|
+
*/
|
|
813
|
+
async getChannel(request, options) {
|
|
814
|
+
return unwrap(await getNotificationChannel(this._client, request, options));
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* Update notification channel
|
|
818
|
+
*
|
|
819
|
+
* Update a notification channel by id.
|
|
820
|
+
*
|
|
821
|
+
* PUT /openmeter/notification/channels/{notificationChannelId}
|
|
822
|
+
*/
|
|
823
|
+
async updateChannel(request, options) {
|
|
824
|
+
return unwrap(await updateNotificationChannel(this._client, request, options));
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Delete notification channel
|
|
828
|
+
*
|
|
829
|
+
* Delete a notification channel by id.
|
|
830
|
+
*
|
|
831
|
+
* DELETE /openmeter/notification/channels/{notificationChannelId}
|
|
832
|
+
*/
|
|
833
|
+
async deleteChannel(request, options) {
|
|
834
|
+
return unwrap(await deleteNotificationChannel(this._client, request, options));
|
|
835
|
+
}
|
|
836
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type Client } from '../core.js';
|
|
2
|
+
import { type RequestOptions } from '../lib/types.js';
|
|
3
|
+
import type { ListNotificationChannelsRequest, ListNotificationChannelsResponse, CreateNotificationChannelRequest, CreateNotificationChannelResponse, GetNotificationChannelRequest, GetNotificationChannelResponse, UpdateNotificationChannelRequest, UpdateNotificationChannelResponse, DeleteNotificationChannelRequest, DeleteNotificationChannelResponse } from '../models/operations/notifications.js';
|
|
4
|
+
import type { NotificationChannel } from '../models/types.js';
|
|
5
|
+
export declare class Notifications {
|
|
6
|
+
private readonly _client;
|
|
7
|
+
constructor(_client: Client);
|
|
8
|
+
/**
|
|
9
|
+
* List notification channels
|
|
10
|
+
*
|
|
11
|
+
* List all notification channels.
|
|
12
|
+
*
|
|
13
|
+
* GET /openmeter/notification/channels
|
|
14
|
+
*/
|
|
15
|
+
listChannels(request?: ListNotificationChannelsRequest, options?: RequestOptions): Promise<ListNotificationChannelsResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* List notification channels
|
|
18
|
+
*
|
|
19
|
+
* List all notification channels.
|
|
20
|
+
*
|
|
21
|
+
* Iterates every item across all pages, fetching more as the returned iterable is consumed.
|
|
22
|
+
*
|
|
23
|
+
* GET /openmeter/notification/channels
|
|
24
|
+
*/
|
|
25
|
+
listChannelsAll(request?: ListNotificationChannelsRequest, options?: RequestOptions): AsyncIterable<NotificationChannel>;
|
|
26
|
+
/**
|
|
27
|
+
* Create notification channel
|
|
28
|
+
*
|
|
29
|
+
* Create a notification channel.
|
|
30
|
+
*
|
|
31
|
+
* POST /openmeter/notification/channels
|
|
32
|
+
*/
|
|
33
|
+
createChannel(request: CreateNotificationChannelRequest, options?: RequestOptions): Promise<CreateNotificationChannelResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* Get notification channel
|
|
36
|
+
*
|
|
37
|
+
* Get a notification channel by id.
|
|
38
|
+
*
|
|
39
|
+
* GET /openmeter/notification/channels/{notificationChannelId}
|
|
40
|
+
*/
|
|
41
|
+
getChannel(request: GetNotificationChannelRequest, options?: RequestOptions): Promise<GetNotificationChannelResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* Update notification channel
|
|
44
|
+
*
|
|
45
|
+
* Update a notification channel by id.
|
|
46
|
+
*
|
|
47
|
+
* PUT /openmeter/notification/channels/{notificationChannelId}
|
|
48
|
+
*/
|
|
49
|
+
updateChannel(request: UpdateNotificationChannelRequest, options?: RequestOptions): Promise<UpdateNotificationChannelResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Delete notification channel
|
|
52
|
+
*
|
|
53
|
+
* Delete a notification channel by id.
|
|
54
|
+
*
|
|
55
|
+
* DELETE /openmeter/notification/channels/{notificationChannelId}
|
|
56
|
+
*/
|
|
57
|
+
deleteChannel(request: DeleteNotificationChannelRequest, options?: RequestOptions): Promise<DeleteNotificationChannelResponse>;
|
|
58
|
+
}
|
|
@@ -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
|
+
}
|