@openmeter/client 1.0.0-beta-ba497d78b3b6 → 1.0.0-beta-081c456ce358
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 +23 -11
- package/dist/funcs/customers.d.ts +16 -1
- package/dist/funcs/customers.js +52 -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/customers.d.ts +6 -0
- package/dist/models/operations/notifications.d.ts +46 -0
- package/dist/models/operations/notifications.js +2 -0
- package/dist/models/schemas.d.ts +799 -6
- package/dist/models/schemas.js +306 -20
- package/dist/models/types.d.ts +252 -3
- package/dist/sdk/internal.d.ts +74 -2
- package/dist/sdk/internal.js +91 -1
- package/dist/sdk/notifications.d.ts +58 -0
- package/dist/sdk/notifications.js +72 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,6 +44,7 @@ TypeSpec definitions and ships fully-typed request and response models.
|
|
|
44
44
|
- [Internal Currencies](#internal-currencies)
|
|
45
45
|
- [Internal PlanAddons](#internal-planaddons)
|
|
46
46
|
- [Internal EntitlementAccess](#internal-entitlementaccess)
|
|
47
|
+
- [Internal Notifications](#internal-notifications)
|
|
47
48
|
- [Runtime Validation (validate option)](#runtime-validation-validate-option)
|
|
48
49
|
- [Zod Schemas (./zod export)](#zod-schemas-zod-export)
|
|
49
50
|
- [Error Handling](#error-handling)
|
|
@@ -421,17 +422,18 @@ they can change or be removed without notice or semver consideration.
|
|
|
421
422
|
|
|
422
423
|
### Internal Customers
|
|
423
424
|
|
|
424
|
-
| Method | HTTP
|
|
425
|
-
| --------------------------------------------------- |
|
|
426
|
-
| `client.internal.customers.entitlements.create` | `POST /openmeter/customers/{customerId}/entitlements`
|
|
427
|
-
| `client.internal.customers.entitlements.
|
|
428
|
-
| `client.internal.customers.entitlements.
|
|
429
|
-
| `client.internal.customers.entitlements.
|
|
430
|
-
| `client.internal.customers.entitlements.
|
|
431
|
-
| `client.internal.customers.entitlements.
|
|
432
|
-
| `client.internal.customers.
|
|
433
|
-
| `client.internal.customers.
|
|
434
|
-
| `client.internal.customers.charges.
|
|
425
|
+
| Method | HTTP | Description |
|
|
426
|
+
| --------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
427
|
+
| `client.internal.customers.entitlements.create` | `POST /openmeter/customers/{customerId}/entitlements` | Create an entitlement for the customer. A customer can have only one active entitlement per feature. The feature must be compatible with the entitlement type. Entitlements cannot be modified after creation, only deleted. |
|
|
428
|
+
| `client.internal.customers.entitlements.override` | `PUT /openmeter/customers/{customerId}/entitlements/{entitlementId}/override` | Override an entitlement of the customer with a new one. The referenced entitlement ends and the new one starts at the same instant, so access continues without a gap. Both must belong to the same feature. Use this for upgrades and downgrades. Fails if the referenced entitlement does not exist, is deleted, or is no longer active. |
|
|
429
|
+
| `client.internal.customers.entitlements.getHistory` | `GET /openmeter/customers/{customerId}/entitlements/{entitlementId}/history` | Get the balance and usage history of a metered entitlement. The queried range may span multiple usage periods. `windowed_history` groups usage into windows of the requested size and reports the balance at the start of each window. `burndown_history` lists the periods in which grants were consumed in a fixed order, together with the usage taken from each grant. |
|
|
430
|
+
| `client.internal.customers.entitlements.get` | `GET /openmeter/customers/{customerId}/entitlements/{entitlementId}` | Get an entitlement of the customer by ID. For checking entitlement access, use the entitlement access endpoints instead. |
|
|
431
|
+
| `client.internal.customers.entitlements.list` | `GET /openmeter/customers/{customerId}/entitlements` | List the entitlements of the customer that are active at the time of the request. For checking entitlement access, use the entitlement access endpoints instead. |
|
|
432
|
+
| `client.internal.customers.entitlements.resetUsage` | `POST /openmeter/customers/{customerId}/entitlements/{entitlementId}/reset` | Reset the usage of a metered entitlement. The reset starts a new usage period: usage is zeroed and grants roll over according to their rollover settings. Usage is reset automatically at the end of each usage period. Use this operation to reset it earlier, for example to align the entitlement with the customer's billing period. The usage period anchor can be moved at the same time. |
|
|
433
|
+
| `client.internal.customers.entitlements.delete` | `DELETE /openmeter/customers/{customerId}/entitlements/{entitlementId}` | Deletes the entitlement and revokes access to its feature. A customer can hold only one active entitlement per feature, so migrating a feature requires deleting the previous entitlement first. Deletion sets the `deleted_at` timestamp instead of removing history. Access and status queries for earlier points in time still treat the entitlement as active, so access changes are never retroactive. |
|
|
434
|
+
| `client.internal.customers.credits.grants.void` | `POST /openmeter/customers/{customerId}/credits/grants/{creditGrantId}/void` | Void a credit grant, forfeiting the remaining unused balance. Voiding is a forward-looking, irreversible operation. Credits already consumed by usage remain unaffected — only the remaining balance is forfeited. The grant reads as `voided` status afterwards. Payment state is not adjusted when `payment_adjustment` is `none`, so invoice-backed or externally collected payments may still collect the original amount. Only `active` grants can be voided; voiding a pending, expired, or fully consumed grant returns a conflict. Retrying a successful void is an idempotent success. |
|
|
435
|
+
| `client.internal.customers.charges.list` | `GET /openmeter/customers/{customerId}/charges` | List customer charges. Returns the customer's charges that are represented as either flat fee or usage-based charges. |
|
|
436
|
+
| `client.internal.customers.charges.create` | `POST /openmeter/customers/{customerId}/charges` | Create customer charge. |
|
|
435
437
|
|
|
436
438
|
### Internal Entitlements
|
|
437
439
|
|
|
@@ -502,6 +504,16 @@ they can change or be removed without notice or semver consideration.
|
|
|
502
504
|
| ----------------------------------------- | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
503
505
|
| `client.internal.entitlementAccess.query` | `POST /openmeter/entitlement-access/query` | Query feature access for a list of customers. The endpoint resolves each provided identifier to a customer and returns the access status for the requested features, plus optional credit balance availability. _Designed to be called on a fixed refresh interval and the query response is intended to be cached._ |
|
|
504
506
|
|
|
507
|
+
### Internal Notifications
|
|
508
|
+
|
|
509
|
+
| Method | HTTP | Description |
|
|
510
|
+
| --------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------ |
|
|
511
|
+
| `client.internal.notifications.listChannels` | `GET /openmeter/notification/channels` | List all notification channels. |
|
|
512
|
+
| `client.internal.notifications.createChannel` | `POST /openmeter/notification/channels` | Create a notification channel. |
|
|
513
|
+
| `client.internal.notifications.getChannel` | `GET /openmeter/notification/channels/{notificationChannelId}` | Get a notification channel by id. |
|
|
514
|
+
| `client.internal.notifications.updateChannel` | `PUT /openmeter/notification/channels/{notificationChannelId}` | Update a notification channel by id. |
|
|
515
|
+
| `client.internal.notifications.deleteChannel` | `DELETE /openmeter/notification/channels/{notificationChannelId}` | Delete a notification channel by id. |
|
|
516
|
+
|
|
505
517
|
## Runtime Validation (validate option)
|
|
506
518
|
|
|
507
519
|
`validate` is off by default. The SDK's normal request/response mapping
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Client } from '../core.js';
|
|
2
2
|
import { type Result, type RequestOptions } from '../lib/types.js';
|
|
3
|
-
import type { CreateCustomerRequest, CreateCustomerResponse, GetCustomerRequest, GetCustomerResponse, ListCustomersRequest, ListCustomersResponse, UpsertCustomerRequest, UpsertCustomerResponse, DeleteCustomerRequest, DeleteCustomerResponse, GetCustomerBillingRequest, GetCustomerBillingResponse, UpdateCustomerBillingRequest, UpdateCustomerBillingResponse, UpdateCustomerBillingAppDataRequest, UpdateCustomerBillingAppDataResponse, CreateCustomerStripeCheckoutSessionRequest, CreateCustomerStripeCheckoutSessionResponse, CreateCustomerStripePortalSessionRequest, CreateCustomerStripePortalSessionResponse, CreateCustomerEntitlementRequest, CreateCustomerEntitlementResponse, GetCustomerEntitlementHistoryRequest, GetCustomerEntitlementHistoryResponse, GetCustomerEntitlementRequest, GetCustomerEntitlementResponse, ListCustomerEntitlementsRequest, ListCustomerEntitlementsResponse, ResetCustomerEntitlementUsageRequest, ResetCustomerEntitlementUsageResponse, DeleteCustomerEntitlementRequest, DeleteCustomerEntitlementResponse, CreateCreditGrantRequest, CreateCreditGrantResponse, GetCreditGrantRequest, GetCreditGrantResponse, ListCreditGrantsRequest, ListCreditGrantsResponse, GetCustomerCreditBalanceRequest, GetCustomerCreditBalanceResponse, CreateCreditAdjustmentRequest, CreateCreditAdjustmentResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, UpdateCreditGrantExternalSettlementRequest, UpdateCreditGrantExternalSettlementResponse, ListCreditTransactionsRequest, ListCreditTransactionsResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
|
|
3
|
+
import type { CreateCustomerRequest, CreateCustomerResponse, GetCustomerRequest, GetCustomerResponse, ListCustomersRequest, ListCustomersResponse, UpsertCustomerRequest, UpsertCustomerResponse, DeleteCustomerRequest, DeleteCustomerResponse, GetCustomerBillingRequest, GetCustomerBillingResponse, UpdateCustomerBillingRequest, UpdateCustomerBillingResponse, UpdateCustomerBillingAppDataRequest, UpdateCustomerBillingAppDataResponse, CreateCustomerStripeCheckoutSessionRequest, CreateCustomerStripeCheckoutSessionResponse, CreateCustomerStripePortalSessionRequest, CreateCustomerStripePortalSessionResponse, CreateCustomerEntitlementRequest, CreateCustomerEntitlementResponse, OverrideCustomerEntitlementRequest, OverrideCustomerEntitlementResponse, GetCustomerEntitlementHistoryRequest, GetCustomerEntitlementHistoryResponse, GetCustomerEntitlementRequest, GetCustomerEntitlementResponse, ListCustomerEntitlementsRequest, ListCustomerEntitlementsResponse, ResetCustomerEntitlementUsageRequest, ResetCustomerEntitlementUsageResponse, DeleteCustomerEntitlementRequest, DeleteCustomerEntitlementResponse, CreateCreditGrantRequest, CreateCreditGrantResponse, GetCreditGrantRequest, GetCreditGrantResponse, ListCreditGrantsRequest, ListCreditGrantsResponse, GetCustomerCreditBalanceRequest, GetCustomerCreditBalanceResponse, CreateCreditAdjustmentRequest, CreateCreditAdjustmentResponse, VoidCreditGrantRequest, VoidCreditGrantResponse, UpdateCreditGrantExternalSettlementRequest, UpdateCreditGrantExternalSettlementResponse, ListCreditTransactionsRequest, ListCreditTransactionsResponse, ListCustomerChargesRequest, ListCustomerChargesResponse, CreateCustomerChargesRequest, CreateCustomerChargesResponse } from '../models/operations/customers.js';
|
|
4
4
|
/**
|
|
5
5
|
* Create customer
|
|
6
6
|
*
|
|
@@ -92,6 +92,21 @@ export declare function createCustomerStripePortalSession(client: Client, req: C
|
|
|
92
92
|
* POST /openmeter/customers/{customerId}/entitlements
|
|
93
93
|
*/
|
|
94
94
|
export declare function createCustomerEntitlement(client: Client, req: CreateCustomerEntitlementRequest, options?: RequestOptions): Promise<Result<CreateCustomerEntitlementResponse>>;
|
|
95
|
+
/**
|
|
96
|
+
* Override customer entitlement
|
|
97
|
+
*
|
|
98
|
+
* Override an entitlement of the customer with a new one.
|
|
99
|
+
*
|
|
100
|
+
* The referenced entitlement ends and the new one starts at the same instant, so
|
|
101
|
+
* access continues without a gap. Both must belong to the same feature. Use this
|
|
102
|
+
* for upgrades and downgrades.
|
|
103
|
+
*
|
|
104
|
+
* Fails if the referenced entitlement does not exist, is deleted, or is no longer
|
|
105
|
+
* active.
|
|
106
|
+
*
|
|
107
|
+
* PUT /openmeter/customers/{customerId}/entitlements/{entitlementId}/override
|
|
108
|
+
*/
|
|
109
|
+
export declare function overrideCustomerEntitlement(client: Client, req: OverrideCustomerEntitlementRequest, options?: RequestOptions): Promise<Result<OverrideCustomerEntitlementResponse>>;
|
|
95
110
|
/**
|
|
96
111
|
* Get customer entitlement history
|
|
97
112
|
*
|
package/dist/funcs/customers.js
CHANGED
|
@@ -394,6 +394,58 @@ export function createCustomerEntitlement(client, req, options) {
|
|
|
394
394
|
});
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
|
+
/**
|
|
398
|
+
* Override customer entitlement
|
|
399
|
+
*
|
|
400
|
+
* Override an entitlement of the customer with a new one.
|
|
401
|
+
*
|
|
402
|
+
* The referenced entitlement ends and the new one starts at the same instant, so
|
|
403
|
+
* access continues without a gap. Both must belong to the same feature. Use this
|
|
404
|
+
* for upgrades and downgrades.
|
|
405
|
+
*
|
|
406
|
+
* Fails if the referenced entitlement does not exist, is deleted, or is no longer
|
|
407
|
+
* active.
|
|
408
|
+
*
|
|
409
|
+
* PUT /openmeter/customers/{customerId}/entitlements/{entitlementId}/override
|
|
410
|
+
*/
|
|
411
|
+
export function overrideCustomerEntitlement(client, req, options) {
|
|
412
|
+
return request(() => {
|
|
413
|
+
const pathParamsInput = {
|
|
414
|
+
customerId: req.customerId,
|
|
415
|
+
entitlementId: req.entitlementId,
|
|
416
|
+
};
|
|
417
|
+
const pathParams = client._options.validate
|
|
418
|
+
? toPathWire(pathParamsInput, schemas.overrideCustomerEntitlementPathParams)
|
|
419
|
+
: pathParamsInput;
|
|
420
|
+
if (client._options.validate) {
|
|
421
|
+
assertValid(schemas.overrideCustomerEntitlementPathParamsWire, pathParams);
|
|
422
|
+
}
|
|
423
|
+
const path = `openmeter/customers/${(() => {
|
|
424
|
+
if (pathParams.customerId === undefined) {
|
|
425
|
+
throw new Error('missing path parameter: customerId');
|
|
426
|
+
}
|
|
427
|
+
return encodeURIComponent(String(pathParams.customerId));
|
|
428
|
+
})()}/entitlements/${(() => {
|
|
429
|
+
if (pathParams.entitlementId === undefined) {
|
|
430
|
+
throw new Error('missing path parameter: entitlementId');
|
|
431
|
+
}
|
|
432
|
+
return encodeURIComponent(String(pathParams.entitlementId));
|
|
433
|
+
})()}/override`;
|
|
434
|
+
const body = toWire(req.body, schemas.overrideCustomerEntitlementBody);
|
|
435
|
+
if (client._options.validate) {
|
|
436
|
+
assertValid(schemas.overrideCustomerEntitlementBodyWire, body);
|
|
437
|
+
}
|
|
438
|
+
return http(client)
|
|
439
|
+
.put(path, { ...options, json: body })
|
|
440
|
+
.json()
|
|
441
|
+
.then((data) => {
|
|
442
|
+
if (client._options.validate) {
|
|
443
|
+
assertValid(schemas.overrideCustomerEntitlementResponseWire, data);
|
|
444
|
+
}
|
|
445
|
+
return fromWire(data, schemas.overrideCustomerEntitlementResponse);
|
|
446
|
+
});
|
|
447
|
+
});
|
|
448
|
+
}
|
|
397
449
|
/**
|
|
398
450
|
* Get customer entitlement history
|
|
399
451
|
*
|
package/dist/funcs/index.d.ts
CHANGED
package/dist/funcs/index.js
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type Client } from '../core.js';
|
|
2
|
+
import { type Result, 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
|
+
/**
|
|
5
|
+
* List notification channels
|
|
6
|
+
*
|
|
7
|
+
* List all notification channels.
|
|
8
|
+
*
|
|
9
|
+
* GET /openmeter/notification/channels
|
|
10
|
+
*/
|
|
11
|
+
export declare function listNotificationChannels(client: Client, req?: ListNotificationChannelsRequest, options?: RequestOptions): Promise<Result<ListNotificationChannelsResponse>>;
|
|
12
|
+
/**
|
|
13
|
+
* Create notification channel
|
|
14
|
+
*
|
|
15
|
+
* Create a notification channel.
|
|
16
|
+
*
|
|
17
|
+
* POST /openmeter/notification/channels
|
|
18
|
+
*/
|
|
19
|
+
export declare function createNotificationChannel(client: Client, req: CreateNotificationChannelRequest, options?: RequestOptions): Promise<Result<CreateNotificationChannelResponse>>;
|
|
20
|
+
/**
|
|
21
|
+
* Get notification channel
|
|
22
|
+
*
|
|
23
|
+
* Get a notification channel by id.
|
|
24
|
+
*
|
|
25
|
+
* GET /openmeter/notification/channels/{notificationChannelId}
|
|
26
|
+
*/
|
|
27
|
+
export declare function getNotificationChannel(client: Client, req: GetNotificationChannelRequest, options?: RequestOptions): Promise<Result<GetNotificationChannelResponse>>;
|
|
28
|
+
/**
|
|
29
|
+
* Update notification channel
|
|
30
|
+
*
|
|
31
|
+
* Update a notification channel by id.
|
|
32
|
+
*
|
|
33
|
+
* PUT /openmeter/notification/channels/{notificationChannelId}
|
|
34
|
+
*/
|
|
35
|
+
export declare function updateNotificationChannel(client: Client, req: UpdateNotificationChannelRequest, options?: RequestOptions): Promise<Result<UpdateNotificationChannelResponse>>;
|
|
36
|
+
/**
|
|
37
|
+
* Delete notification channel
|
|
38
|
+
*
|
|
39
|
+
* Delete a notification channel by id.
|
|
40
|
+
*
|
|
41
|
+
* DELETE /openmeter/notification/channels/{notificationChannelId}
|
|
42
|
+
*/
|
|
43
|
+
export declare function deleteNotificationChannel(client: Client, req: DeleteNotificationChannelRequest, options?: RequestOptions): Promise<Result<DeleteNotificationChannelResponse>>;
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
// Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
|
|
2
|
+
import { http } from '../core.js';
|
|
3
|
+
import { request } from '../lib/request.js';
|
|
4
|
+
import { toURLSearchParams, encodeSort } from '../lib/encodings.js';
|
|
5
|
+
import { toWire, toPathWire, fromWire, assertValid, toSnakeCase, } from '../lib/wire.js';
|
|
6
|
+
import * as schemas from '../models/schemas.js';
|
|
7
|
+
/**
|
|
8
|
+
* List notification channels
|
|
9
|
+
*
|
|
10
|
+
* List all notification channels.
|
|
11
|
+
*
|
|
12
|
+
* GET /openmeter/notification/channels
|
|
13
|
+
*/
|
|
14
|
+
export function listNotificationChannels(client, req = {}, options) {
|
|
15
|
+
return request(() => {
|
|
16
|
+
if (client._options.validate && req.sort !== undefined) {
|
|
17
|
+
assertValid(schemas.listNotificationChannelsQueryParams.shape.sort, req.sort);
|
|
18
|
+
}
|
|
19
|
+
const query = toWire({
|
|
20
|
+
page: req.page,
|
|
21
|
+
sort: encodeSort(req.sort, toSnakeCase),
|
|
22
|
+
filter: req.filter,
|
|
23
|
+
}, schemas.listNotificationChannelsQueryParams);
|
|
24
|
+
if (client._options.validate) {
|
|
25
|
+
assertValid(schemas.listNotificationChannelsQueryParamsWire, query);
|
|
26
|
+
}
|
|
27
|
+
const searchParams = toURLSearchParams(query);
|
|
28
|
+
return http(client)
|
|
29
|
+
.get('openmeter/notification/channels', { ...options, searchParams })
|
|
30
|
+
.json()
|
|
31
|
+
.then((data) => {
|
|
32
|
+
if (client._options.validate) {
|
|
33
|
+
assertValid(schemas.listNotificationChannelsResponseWire, data);
|
|
34
|
+
}
|
|
35
|
+
return fromWire(data, schemas.listNotificationChannelsResponse);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Create notification channel
|
|
41
|
+
*
|
|
42
|
+
* Create a notification channel.
|
|
43
|
+
*
|
|
44
|
+
* POST /openmeter/notification/channels
|
|
45
|
+
*/
|
|
46
|
+
export function createNotificationChannel(client, req, options) {
|
|
47
|
+
return request(() => {
|
|
48
|
+
const body = toWire(req, schemas.createNotificationChannelBody);
|
|
49
|
+
if (client._options.validate) {
|
|
50
|
+
assertValid(schemas.createNotificationChannelBodyWire, body);
|
|
51
|
+
}
|
|
52
|
+
return http(client)
|
|
53
|
+
.post('openmeter/notification/channels', { ...options, json: body })
|
|
54
|
+
.json()
|
|
55
|
+
.then((data) => {
|
|
56
|
+
if (client._options.validate) {
|
|
57
|
+
assertValid(schemas.createNotificationChannelResponseWire, data);
|
|
58
|
+
}
|
|
59
|
+
return fromWire(data, schemas.createNotificationChannelResponse);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Get notification channel
|
|
65
|
+
*
|
|
66
|
+
* Get a notification channel by id.
|
|
67
|
+
*
|
|
68
|
+
* GET /openmeter/notification/channels/{notificationChannelId}
|
|
69
|
+
*/
|
|
70
|
+
export function getNotificationChannel(client, req, options) {
|
|
71
|
+
return request(() => {
|
|
72
|
+
const pathParamsInput = {
|
|
73
|
+
notificationChannelId: req.notificationChannelId,
|
|
74
|
+
};
|
|
75
|
+
const pathParams = client._options.validate
|
|
76
|
+
? toPathWire(pathParamsInput, schemas.getNotificationChannelPathParams)
|
|
77
|
+
: pathParamsInput;
|
|
78
|
+
if (client._options.validate) {
|
|
79
|
+
assertValid(schemas.getNotificationChannelPathParamsWire, pathParams);
|
|
80
|
+
}
|
|
81
|
+
const path = `openmeter/notification/channels/${(() => {
|
|
82
|
+
if (pathParams.notificationChannelId === undefined) {
|
|
83
|
+
throw new Error('missing path parameter: notificationChannelId');
|
|
84
|
+
}
|
|
85
|
+
return encodeURIComponent(String(pathParams.notificationChannelId));
|
|
86
|
+
})()}`;
|
|
87
|
+
return http(client)
|
|
88
|
+
.get(path, options)
|
|
89
|
+
.json()
|
|
90
|
+
.then((data) => {
|
|
91
|
+
if (client._options.validate) {
|
|
92
|
+
assertValid(schemas.getNotificationChannelResponseWire, data);
|
|
93
|
+
}
|
|
94
|
+
return fromWire(data, schemas.getNotificationChannelResponse);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Update notification channel
|
|
100
|
+
*
|
|
101
|
+
* Update a notification channel by id.
|
|
102
|
+
*
|
|
103
|
+
* PUT /openmeter/notification/channels/{notificationChannelId}
|
|
104
|
+
*/
|
|
105
|
+
export function updateNotificationChannel(client, req, options) {
|
|
106
|
+
return request(() => {
|
|
107
|
+
const pathParamsInput = {
|
|
108
|
+
notificationChannelId: req.notificationChannelId,
|
|
109
|
+
};
|
|
110
|
+
const pathParams = client._options.validate
|
|
111
|
+
? toPathWire(pathParamsInput, schemas.updateNotificationChannelPathParams)
|
|
112
|
+
: pathParamsInput;
|
|
113
|
+
if (client._options.validate) {
|
|
114
|
+
assertValid(schemas.updateNotificationChannelPathParamsWire, pathParams);
|
|
115
|
+
}
|
|
116
|
+
const path = `openmeter/notification/channels/${(() => {
|
|
117
|
+
if (pathParams.notificationChannelId === undefined) {
|
|
118
|
+
throw new Error('missing path parameter: notificationChannelId');
|
|
119
|
+
}
|
|
120
|
+
return encodeURIComponent(String(pathParams.notificationChannelId));
|
|
121
|
+
})()}`;
|
|
122
|
+
const body = toWire(req.body, schemas.updateNotificationChannelBody);
|
|
123
|
+
if (client._options.validate) {
|
|
124
|
+
assertValid(schemas.updateNotificationChannelBodyWire, body);
|
|
125
|
+
}
|
|
126
|
+
return http(client)
|
|
127
|
+
.put(path, { ...options, json: body })
|
|
128
|
+
.json()
|
|
129
|
+
.then((data) => {
|
|
130
|
+
if (client._options.validate) {
|
|
131
|
+
assertValid(schemas.updateNotificationChannelResponseWire, data);
|
|
132
|
+
}
|
|
133
|
+
return fromWire(data, schemas.updateNotificationChannelResponse);
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Delete notification channel
|
|
139
|
+
*
|
|
140
|
+
* Delete a notification channel by id.
|
|
141
|
+
*
|
|
142
|
+
* DELETE /openmeter/notification/channels/{notificationChannelId}
|
|
143
|
+
*/
|
|
144
|
+
export function deleteNotificationChannel(client, req, options) {
|
|
145
|
+
return request(async () => {
|
|
146
|
+
const pathParamsInput = {
|
|
147
|
+
notificationChannelId: req.notificationChannelId,
|
|
148
|
+
};
|
|
149
|
+
const pathParams = client._options.validate
|
|
150
|
+
? toPathWire(pathParamsInput, schemas.deleteNotificationChannelPathParams)
|
|
151
|
+
: pathParamsInput;
|
|
152
|
+
if (client._options.validate) {
|
|
153
|
+
assertValid(schemas.deleteNotificationChannelPathParamsWire, pathParams);
|
|
154
|
+
}
|
|
155
|
+
const path = `openmeter/notification/channels/${(() => {
|
|
156
|
+
if (pathParams.notificationChannelId === undefined) {
|
|
157
|
+
throw new Error('missing path parameter: notificationChannelId');
|
|
158
|
+
}
|
|
159
|
+
return encodeURIComponent(String(pathParams.notificationChannelId));
|
|
160
|
+
})()}`;
|
|
161
|
+
await http(client).delete(path, options);
|
|
162
|
+
});
|
|
163
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -42,4 +42,5 @@ export type * from './models/operations/addons.js';
|
|
|
42
42
|
export type * from './models/operations/planAddons.js';
|
|
43
43
|
export type * from './models/operations/defaults.js';
|
|
44
44
|
export type * from './models/operations/entitlementAccess.js';
|
|
45
|
-
export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, CreateVersionFilter, VersionFilter, PriceFree, RateCardStaticEntitlement, RateCardBooleanEntitlement, TaxConfigStripe, TaxConfigExternalInvoicing, InvoiceExternalReferences, InvoiceAvailableActionDetails, InvoiceWorkflowInvoicingSettings, WorkflowPaymentChargeAutomaticallySettings, WorkflowPaymentSendInvoiceSettings, ChargeFlatFeeDiscounts, SubscriptionEditRemoveItem, SubscriptionEditUnscheduleEdit, UpdateLabels, InstallAppStripeWithApiKey, InstallAppSandbox, InstallAppExternalInvoicing, WorkflowCollectionAlignmentSubscription, InvoiceLineExternalReferences, UpdateBillingInvoiceWorkflowInvoicingSettings, UpdateBillingWorkflowPaymentChargeAutomaticallySettings, UpdateBillingWorkflowPaymentSendInvoiceSettings, UpdatePriceFree, LlmCostProvider, LlmCostModel, ProductCatalogValidationError, EntitlementAccessQueryRequestCustomers, EntitlementAccessQueryRequestFeatures, QueryFilterInteger, QueryFilterFloat, QueryFilterBoolean, PagePaginationQuery, PublicLabels, SystemAccountAccessToken, PersonalAccessToken, KonnectAccessToken, AppCustomerDataStripe, AppCustomerDataExternalInvoicing, CreateChargeCostBasisDynamic, ChargeCostBasisDynamic, CurrencyFiat, ListCostBasesParamsFilter, CreateCurrencyCustomRequest, EntitlementAccessValue, EntitlementIssueAfterReset, EntitlementBurndownBalance, EntitlementBurndownGrantBalances, CreateChargeCostBasisManual, ChargeCostBasisManual, PriceFlat, PriceUnit, SpendCommitments, RateCardDiscounts, Totals, ChargeRealizationDetailedLineCreditApplied, ChargeRealizationAmountDiscount, FeatureManualUnitCost, FeatureLlmUnitCostPricing, InvoiceLineCreditsApplied, InvoiceUsageQuantityDetail, UpdatePriceFlat, UpdatePriceUnit, UpdateDiscounts, LlmCostModelPricing, FiatCurrencyAmount, QueryFilterNumeric, CursorPaginationQuery, ListMetersParamsFilter, ListLlmCostPricesParamsFilter, LabelsFieldFilter, CustomerReference, ProfileReference, FeatureReference, EntitlementGrantUsage, CreateChargeCostBasisPinned, CreateResourceReference, ChargeCostBasisPinned, TaxCodeReference, CreditGrantInvoiceReference, CurrencyCustomReference, SubscriptionCostBasisPin, SubscriptionReference, AppReference, ChargeRealizationInvoiceReference, AddonReference, ChargeReference, UpdateResourceReference, BillingCustomerReference, ChargeFeature, Event, MeterQueryRow, AppStripeCreateCustomerPortalSessionResult, ClosedPeriod, ChargeResolvedCostBasis, SubscriptionAddonTimelineSegment, UpdateClosedPeriod, CostBasis, FeatureCostQueryRow, Resource, ResourceImmutable, QueryFilterDateTime, CursorMeta, InvalidParameterStandard, InvalidParameterMinimumLength, InvalidParameterMaximumLength, InvalidParameterChoiceItem, InvalidParameterDependentItem, Unauthorized, Forbidden, NotFound, Gone, Conflict, PayloadTooLarge, UnsupportedMediaType, UnprocessableContent, TooManyRequests, Internal, NotImplemented, NotAvailable, SubscriptionPlanReference, UpsertPlanAddonRequest, ResourceWithKey, Meter, PaginatedMeta, QueryFilterStringMapItem, CustomerKeyReference, CustomerUsageAttribution, UpdateCustomerUsageAttribution, Address, UpdateAddress, AppStripeCreateCheckoutSessionCustomerUpdate, AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement, AppStripeCreateCheckoutSessionTaxIdCollection, AppStripeCreateCheckoutSessionResult, CustomerStripeCreateCustomerPortalSessionRequest, RecurringPeriodInput, RecurringPeriod, RateCardMeteredEntitlement, SubscriptionPhaseCreate, SubscriptionEditStretchPhase, GetCreditBalanceParamsFilter, ListPlansParamsFilter, CreateCreditGrantPlanFilter, CreditGrantPlanFilter, ListCreditGrantsParamsFilter, ValidationIssue, SubscriptionProRatingConfig, RateCardProrationConfiguration, UnitConfig, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, InvoiceAvailableActions, ChargeRealizationPayment, SubscriptionEditRemovePhase, TaxCodeAppMapping, AppCapability, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, ListCreditTransactionsParamsFilter, CurrencyAmount, EntitlementAccessResult, PriceTier, ChargeTotals, FeatureLlmUnitCost, UpdatePriceTier, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListCustomerEntitlementsParamsFilter, ListEntitlementsParamsFilter, ListSubscriptionsParamsFilter, ListAppsParamsFilter, ListBillingProfilesParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, ListPlanAddonsParamsFilter, CreateTaxCodeConfig, TaxCodeConfig, TaxConfig, OrganizationDefaultTaxCodes, CreditBalance, CreditTransaction, InvoiceWorkflowAppsReferences, ProfileAppReferences, PlanAddon, UpdateTaxCodeConfig, ListEventsParamsFilter, ListCustomerChargesParamsFilter, ListInvoicesParamsFilter, ListChargesParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, EntitlementHistoryWindow, EntitlementBurndownSegment, ChargeRealizationDetailedLineFlatFee, ChargeRealizationDetailedLineUsageBased, CurrencyCustom, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, EntitlementGrantCreateRequest, CreateEntitlementStaticRequest, CreateEntitlementBooleanRequest, EntitlementMetered, EntitlementStatic, EntitlementBoolean, WorkflowCollectionAlignmentAnchored, SubscriptionEditAddPhase, CreateCreditGrantFilters, CreditGrantFilters, SubscriptionBase, InvoiceStatusDetails, InvoiceWorkflow, SubscriptionCancel, SubscriptionMigrate, SubscriptionAddonUpdate, TaxCode, AppCatalogItem, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, EntitlementFeatureAccess, CustomerData, UpsertCustomerBillingDataRequest, ChargeFlatFeeSystemIntent, ListCustomerEntitlementAccessResponseData, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreateCreditGrantPurchase, CreditGrantPurchase, CreateChargeFlatFeeRequest, WorkflowTaxSettings, CreditBalances, CreditTransactionPaginatedResponse, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, EntitlementHistory, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Supplier, Party, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, CreateEntitlementMeteredRequest, InvoiceWorkflowSettings, TaxCodePagePaginatedResponse, AppStripe, AppSandbox, AppExternalInvoicing, AppCatalogItemPagePaginatedResponse, InstalledAppStripe, InstalledAppSandbox, InstalledAppExternalInvoicing, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, EntitlementAccessQueryResult, Feature, CreditGrant, CurrencyPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, EntitlementPagePaginatedResponse, WorkflowCollectionSettings, ChargeRealizationInvoice, EntitlementAccessQueryResponse, RateCard, InvoiceLineRateCard, ChargeUsageBasedSystemIntent, CreateChargeUsageBasedRequest, FeaturePagePaginatedResponse, UpdateInvoiceLineRateCard, CreditGrantPagePaginatedResponse, Workflow, AppPagePaginatedResponse, ProfileApps, SubscriptionItem, PlanPhase, SubscriptionEditAddItem, SubscriptionAddonRateCard, Addon, UpsertAddonRequest, InvoiceStandardLine, UpdateInvoiceStandardLine, Profile, UpsertBillingProfileRequest, ChargeRealization, SubscriptionPhase, SubscriptionCustomPlan, Plan, UpsertPlanRequest, SubscriptionAddon, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, Subscription, SubscriptionCreate, SubscriptionChange, PlanPagePaginatedResponse, SubscriptionEdit, SubscriptionAddonPagePaginatedResponse, InvoiceStandard, UpdateInvoiceStandardRequest, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, SubscriptionMigrateResponse, ChargeFlatFee, ChargeUsageBased, InvoicePagePaginatedResponse, ChargePagePaginatedResponse, StringFieldFilter, MeterAggregation, MeterQueryGranularity, EntitlementHistoryWindowSize, StringFieldFilterExact, PricePaymentTerm, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, EntitlementMeasureUsageFrom, WorkflowPaymentSettings, SubscriptionCreateTiming, SubscriptionEditTiming, UpdateBillingWorkflowPaymentSettings, CreateChargeCostBasis, ChargeCostBasis, InvalidParameter, RateCardEntitlement, FeatureUnitCost, ChargeRealizationDetailedLine, Currency, CustomerOrReference, Entitlement, WorkflowCollectionAlignment, Price, PriceUsageBased, UpdatePrice, CreateEntitlementRequest, App, BillingInstallAppResponse, FeatureOrReference, ChargeRealizationInvoiceOrReference, CreateChargeRequest, SubscriptionEditOperation, InvoiceLine, UpdateInvoiceLine, SubscriptionOrReference, Invoice, Charge, SortQueryInput, BaseErrorInput, InvoiceWorkflowInvoicingSettingsInput, WorkflowPaymentSendInvoiceSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EntitlementIssueAfterResetInput, EventInput, ResetCustomerEntitlementUsageRequestInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, RateCardMeteredEntitlementInput, VoidCreditGrantRequestInput, UnitConfigInput, WorkflowInvoicingSettingsInput, EntitlementAccessQueryRequestInput, IngestedEventInput, EntitlementMeteredInput, SubscriptionBaseInput, InvoiceWorkflowInput, SubscriptionCancelInput, SubscriptionMigrateInput, UpdateBillingInvoiceWorkflowInput, CreateCreditGrantPurchaseInput, CreditGrantPurchaseInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, CreateEntitlementMeteredRequestInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreateCreditGrantRequestInput, CreditGrantInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, EntitlementPagePaginatedResponseInput, WorkflowCollectionSettingsInput, ChargeRealizationInvoiceInput, RateCardInput, InvoiceLineRateCardInput, ChargeUsageBasedSystemIntentInput, CreateChargeUsageBasedRequestInput, CreditGrantPagePaginatedResponseInput, WorkflowInput, SubscriptionItemInput, PlanPhaseInput, SubscriptionEditAddItemInput, SubscriptionAddonRateCardInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, InvoiceStandardLineInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, ChargeRealizationInput, SubscriptionPhaseInput, SubscriptionCustomPlanInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, SubscriptionAddonInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, SubscriptionInput, SubscriptionCreateInput, SubscriptionChangeInput, PlanPagePaginatedResponseInput, SubscriptionEditInput, SubscriptionAddonPagePaginatedResponseInput, InvoiceStandardInput, UpdateInvoiceStandardRequestInput, SubscriptionPagePaginatedResponseInput, SubscriptionChangeResponseInput, SubscriptionMigrateResponseInput, ChargeFlatFeeInput, ChargeUsageBasedInput, InvoicePagePaginatedResponseInput, ChargePagePaginatedResponseInput, WorkflowPaymentSettingsInput, UpdateBillingWorkflowPaymentSettingsInput, RateCardEntitlementInput, EntitlementInput, CreateEntitlementRequestInput, ChargeRealizationInvoiceOrReferenceInput, CreateChargeRequestInput, SubscriptionEditOperationInput, InvoiceLineInput, SubscriptionOrReferenceInput, InvoiceInput, UpdateInvoiceRequestInput, ChargeInput, } from './models/types.js';
|
|
45
|
+
export type * from './models/operations/notifications.js';
|
|
46
|
+
export type { Labels, CursorPaginationQueryPage, SortQuery, IngestedEventValidationError, CursorMetaPage, BaseError, PageMeta, QueryFilterString, AppStripeCheckoutSessionCustomTextParams, AppStripeCreateCustomerPortalSessionOptions, CreateLabels, CreateVersionFilter, VersionFilter, PriceFree, RateCardStaticEntitlement, RateCardBooleanEntitlement, TaxConfigStripe, TaxConfigExternalInvoicing, InvoiceExternalReferences, InvoiceAvailableActionDetails, InvoiceWorkflowInvoicingSettings, WorkflowPaymentChargeAutomaticallySettings, WorkflowPaymentSendInvoiceSettings, ChargeFlatFeeDiscounts, SubscriptionEditRemoveItem, SubscriptionEditUnscheduleEdit, UpdateLabels, InstallAppStripeWithApiKey, InstallAppSandbox, InstallAppExternalInvoicing, WorkflowCollectionAlignmentSubscription, InvoiceLineExternalReferences, UpdateBillingInvoiceWorkflowInvoicingSettings, UpdateBillingWorkflowPaymentChargeAutomaticallySettings, UpdateBillingWorkflowPaymentSendInvoiceSettings, UpdatePriceFree, LlmCostProvider, LlmCostModel, ProductCatalogValidationError, EntitlementAccessQueryRequestCustomers, EntitlementAccessQueryRequestFeatures, QueryFilterInteger, QueryFilterFloat, QueryFilterBoolean, PagePaginationQuery, PublicLabels, SystemAccountAccessToken, PersonalAccessToken, KonnectAccessToken, AppCustomerDataStripe, AppCustomerDataExternalInvoicing, CreateChargeCostBasisDynamic, ChargeCostBasisDynamic, CurrencyFiat, ListCostBasesParamsFilter, CreateCurrencyCustomRequest, EntitlementAccessValue, EntitlementIssueAfterReset, EntitlementBurndownBalance, EntitlementBurndownGrantBalances, CreateChargeCostBasisManual, ChargeCostBasisManual, PriceFlat, PriceUnit, SpendCommitments, RateCardDiscounts, Totals, ChargeRealizationDetailedLineCreditApplied, ChargeRealizationAmountDiscount, FeatureManualUnitCost, FeatureLlmUnitCostPricing, InvoiceLineCreditsApplied, InvoiceUsageQuantityDetail, UpdatePriceFlat, UpdatePriceUnit, UpdateDiscounts, LlmCostModelPricing, FiatCurrencyAmount, QueryFilterNumeric, CursorPaginationQuery, ListMetersParamsFilter, ListLlmCostPricesParamsFilter, LabelsFieldFilter, CustomerReference, ProfileReference, FeatureReference, EntitlementGrantUsage, CreateChargeCostBasisPinned, CreateResourceReference, ChargeCostBasisPinned, TaxCodeReference, CreditGrantInvoiceReference, CurrencyCustomReference, SubscriptionCostBasisPin, SubscriptionReference, AppReference, ChargeRealizationInvoiceReference, AddonReference, ChargeReference, UpdateResourceReference, BillingCustomerReference, ChargeFeature, Event, MeterQueryRow, AppStripeCreateCustomerPortalSessionResult, ClosedPeriod, ChargeResolvedCostBasis, SubscriptionAddonTimelineSegment, UpdateClosedPeriod, CostBasis, FeatureCostQueryRow, Resource, ResourceImmutable, QueryFilterDateTime, CursorMeta, InvalidParameterStandard, InvalidParameterMinimumLength, InvalidParameterMaximumLength, InvalidParameterChoiceItem, InvalidParameterDependentItem, Unauthorized, Forbidden, NotFound, Gone, Conflict, PayloadTooLarge, UnsupportedMediaType, UnprocessableContent, TooManyRequests, Internal, NotImplemented, NotAvailable, SubscriptionPlanReference, UpsertPlanAddonRequest, ResourceWithKey, Meter, PaginatedMeta, QueryFilterStringMapItem, CustomerKeyReference, CustomerUsageAttribution, UpdateCustomerUsageAttribution, Address, UpdateAddress, AppStripeCreateCheckoutSessionCustomerUpdate, AppStripeCreateCheckoutSessionConsentCollectionPaymentMethodReuseAgreement, AppStripeCreateCheckoutSessionTaxIdCollection, AppStripeCreateCheckoutSessionResult, CustomerStripeCreateCustomerPortalSessionRequest, RecurringPeriodInput, RecurringPeriod, RateCardMeteredEntitlement, SubscriptionPhaseCreate, SubscriptionEditStretchPhase, GetCreditBalanceParamsFilter, ListPlansParamsFilter, CreateCreditGrantPlanFilter, CreditGrantPlanFilter, ListCreditGrantsParamsFilter, ValidationIssue, SubscriptionProRatingConfig, RateCardProrationConfiguration, UnitConfig, PartyTaxIdentity, UpdateBillingPartyTaxIdentity, InvoiceAvailableActions, ChargeRealizationPayment, SubscriptionEditRemovePhase, TaxCodeAppMapping, AppCapability, UpdateAppStripeRequest, UpdateAppSandboxRequest, UpdateAppExternalInvoicingRequest, WorkflowInvoicingSettings, InvoiceLineAmountDiscount, InvoiceLineUsageDiscount, InvoiceLineBaseDiscount, ListCurrenciesParamsFilter, EntitlementAccessQueryRequest, EntitlementFeatureAccessReason, EntitlementAccessQueryError, NotificationChannel, AppCustomerData, UpsertAppCustomerDataRequest, CreditAdjustment, ListCreditTransactionsParamsFilter, CurrencyAmount, EntitlementAccessResult, PriceTier, ChargeTotals, FeatureLlmUnitCost, UpdatePriceTier, LlmCostPrice, LlmCostOverrideCreate, ListCustomersParamsFilter, ListCustomerEntitlementsParamsFilter, ListEntitlementsParamsFilter, ListSubscriptionsParamsFilter, ListAppsParamsFilter, ListBillingProfilesParamsFilter, ListFeatureParamsFilter, ListAddonsParamsFilter, ListPlanAddonsParamsFilter, CreateTaxCodeConfig, TaxCodeConfig, TaxConfig, OrganizationDefaultTaxCodes, CreditBalance, CreditTransaction, InvoiceWorkflowAppsReferences, ProfileAppReferences, PlanAddon, UpdateTaxCodeConfig, ListEventsParamsFilter, ListCustomerChargesParamsFilter, ListInvoicesParamsFilter, ListChargesParamsFilter, ListNotificationChannelsParamsFilter, ResourceFilters, FieldFilters, IngestedEvent, MeterQueryResult, EntitlementHistoryWindow, EntitlementBurndownSegment, ChargeRealizationDetailedLineFlatFee, ChargeRealizationDetailedLineUsageBased, CurrencyCustom, FeatureCostQueryResult, MeterPagePaginatedResponse, CostBasisPagePaginatedResponse, MeterQueryFilters, FeatureMeterReference, Customer, PartyAddresses, InvoiceCustomer, UpdateBillingPartyAddresses, UpdateInvoiceCustomer, AppStripeCreateCheckoutSessionConsentCollection, EntitlementGrantCreateRequest, CreateEntitlementStaticRequest, CreateEntitlementBooleanRequest, EntitlementMetered, EntitlementStatic, EntitlementBoolean, WorkflowCollectionAlignmentAnchored, SubscriptionEditAddPhase, CreateCreditGrantFilters, CreditGrantFilters, SubscriptionBase, InvoiceStatusDetails, InvoiceWorkflow, SubscriptionCancel, SubscriptionMigrate, SubscriptionAddonUpdate, TaxCode, AppCatalogItem, InvoiceLineDiscounts, UpdateBillingInvoiceWorkflow, EntitlementFeatureAccess, NotificationChannelPagePaginatedResponse, CustomerData, UpsertCustomerBillingDataRequest, ChargeFlatFeeSystemIntent, ListCustomerEntitlementAccessResponseData, PriceGraduated, PriceVolume, UpdatePriceGraduated, UpdatePriceVolume, PricePagePaginatedResponse, CreateCreditGrantPurchase, CreditGrantPurchase, CreateChargeFlatFeeRequest, WorkflowTaxSettings, CreditBalances, CreditTransactionPaginatedResponse, PlanAddonPagePaginatedResponse, IngestedEventPaginatedResponse, EntitlementHistory, InvalidParameters, MeterQueryRequest, CustomerPagePaginatedResponse, Supplier, Party, UpdateSupplier, AppStripeCreateCheckoutSessionRequestOptions, CreateEntitlementMeteredRequest, InvoiceWorkflowSettings, TaxCodePagePaginatedResponse, AppStripe, AppSandbox, AppExternalInvoicing, AppCatalogItemPagePaginatedResponse, InstalledAppStripe, InstalledAppSandbox, InstalledAppExternalInvoicing, InvoiceDetailedLine, UpdateInvoiceWorkflowSettings, EntitlementAccessQueryResult, Feature, CreditGrant, CurrencyPagePaginatedResponse, BadRequest, InvoiceBase, CustomerStripeCreateCheckoutSessionRequest, EntitlementPagePaginatedResponse, WorkflowCollectionSettings, ChargeRealizationInvoice, EntitlementAccessQueryResponse, RateCard, InvoiceLineRateCard, ChargeUsageBasedSystemIntent, CreateChargeUsageBasedRequest, FeaturePagePaginatedResponse, UpdateInvoiceLineRateCard, CreditGrantPagePaginatedResponse, Workflow, AppPagePaginatedResponse, ProfileApps, SubscriptionItem, PlanPhase, SubscriptionEditAddItem, SubscriptionAddonRateCard, Addon, UpsertAddonRequest, InvoiceStandardLine, UpdateInvoiceStandardLine, Profile, UpsertBillingProfileRequest, ChargeRealization, SubscriptionPhase, SubscriptionCustomPlan, Plan, UpsertPlanRequest, SubscriptionAddon, AddonPagePaginatedResponse, ProfilePagePaginatedResponse, Subscription, SubscriptionCreate, SubscriptionChange, PlanPagePaginatedResponse, SubscriptionEdit, SubscriptionAddonPagePaginatedResponse, InvoiceStandard, UpdateInvoiceStandardRequest, SubscriptionPagePaginatedResponse, SubscriptionChangeResponse, SubscriptionMigrateResponse, ChargeFlatFee, ChargeUsageBased, InvoicePagePaginatedResponse, ChargePagePaginatedResponse, StringFieldFilter, MeterAggregation, MeterQueryGranularity, EntitlementHistoryWindowSize, StringFieldFilterExact, PricePaymentTerm, BooleanFieldFilter, BillingCurrencyCode, CreateCurrencyCode, UlidFieldFilter, DateTimeFieldFilter, EntitlementMeasureUsageFrom, WorkflowPaymentSettings, SubscriptionCreateTiming, SubscriptionEditTiming, UpdateBillingWorkflowPaymentSettings, CreateChargeCostBasis, ChargeCostBasis, InvalidParameter, RateCardEntitlement, FeatureUnitCost, ChargeRealizationDetailedLine, Currency, CustomerOrReference, Entitlement, WorkflowCollectionAlignment, Price, PriceUsageBased, UpdatePrice, CreateEntitlementRequest, App, BillingInstallAppResponse, FeatureOrReference, ChargeRealizationInvoiceOrReference, CreateChargeRequest, SubscriptionEditOperation, InvoiceLine, UpdateInvoiceLine, SubscriptionOrReference, Invoice, Charge, SortQueryInput, BaseErrorInput, InvoiceWorkflowInvoicingSettingsInput, WorkflowPaymentSendInvoiceSettingsInput, UpdateBillingInvoiceWorkflowInvoicingSettingsInput, UpdateBillingWorkflowPaymentSendInvoiceSettingsInput, EntitlementIssueAfterResetInput, EventInput, ResetCustomerEntitlementUsageRequestInput, UnauthorizedInput, ForbiddenInput, NotFoundInput, GoneInput, ConflictInput, PayloadTooLargeInput, UnsupportedMediaTypeInput, UnprocessableContentInput, TooManyRequestsInput, InternalInput, NotImplementedInput, NotAvailableInput, AppStripeCreateCheckoutSessionCustomerUpdateInput, AppStripeCreateCheckoutSessionTaxIdCollectionInput, RateCardMeteredEntitlementInput, VoidCreditGrantRequestInput, UnitConfigInput, WorkflowInvoicingSettingsInput, EntitlementAccessQueryRequestInput, NotificationChannelInput, CreateNotificationChannelRequestInput, UpdateNotificationChannelRequestInput, IngestedEventInput, EntitlementMeteredInput, SubscriptionBaseInput, InvoiceWorkflowInput, SubscriptionCancelInput, SubscriptionMigrateInput, UpdateBillingInvoiceWorkflowInput, NotificationChannelPagePaginatedResponseInput, CreateCreditGrantPurchaseInput, CreditGrantPurchaseInput, WorkflowTaxSettingsInput, IngestedEventPaginatedResponseInput, MeterQueryRequestInput, AppStripeCreateCheckoutSessionRequestOptionsInput, CreateEntitlementMeteredRequestInput, InvoiceWorkflowSettingsInput, InvoiceDetailedLineInput, UpdateInvoiceWorkflowSettingsInput, CreateCreditGrantRequestInput, CreditGrantInput, BadRequestInput, CustomerStripeCreateCheckoutSessionRequestInput, EntitlementPagePaginatedResponseInput, WorkflowCollectionSettingsInput, ChargeRealizationInvoiceInput, RateCardInput, InvoiceLineRateCardInput, ChargeUsageBasedSystemIntentInput, CreateChargeUsageBasedRequestInput, CreditGrantPagePaginatedResponseInput, WorkflowInput, SubscriptionItemInput, PlanPhaseInput, SubscriptionEditAddItemInput, SubscriptionAddonRateCardInput, AddonInput, CreateAddonRequestInput, UpsertAddonRequestInput, InvoiceStandardLineInput, ProfileInput, CreateBillingProfileRequestInput, UpsertBillingProfileRequestInput, ChargeRealizationInput, SubscriptionPhaseInput, SubscriptionCustomPlanInput, PlanInput, CreatePlanRequestInput, UpsertPlanRequestInput, SubscriptionAddonInput, AddonPagePaginatedResponseInput, ProfilePagePaginatedResponseInput, SubscriptionInput, SubscriptionCreateInput, SubscriptionChangeInput, PlanPagePaginatedResponseInput, SubscriptionEditInput, SubscriptionAddonPagePaginatedResponseInput, InvoiceStandardInput, UpdateInvoiceStandardRequestInput, SubscriptionPagePaginatedResponseInput, SubscriptionChangeResponseInput, SubscriptionMigrateResponseInput, ChargeFlatFeeInput, ChargeUsageBasedInput, InvoicePagePaginatedResponseInput, ChargePagePaginatedResponseInput, WorkflowPaymentSettingsInput, UpdateBillingWorkflowPaymentSettingsInput, RateCardEntitlementInput, EntitlementInput, CreateEntitlementRequestInput, ChargeRealizationInvoiceOrReferenceInput, CreateChargeRequestInput, SubscriptionEditOperationInput, InvoiceLineInput, SubscriptionOrReferenceInput, InvoiceInput, UpdateInvoiceRequestInput, ChargeInput, } from './models/types.js';
|
package/dist/lib/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.0-beta-
|
|
1
|
+
export declare const SDK_VERSION = "1.0.0-beta-081c456ce358";
|
package/dist/lib/version.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
// The committed value is a dev placeholder. The publish flow
|
|
3
3
|
// (`make -C api/spec publish-aip-sdk`) stamps the real release version here
|
|
4
4
|
// before `pnpm publish`, after `pnpm version` updates package.json.
|
|
5
|
-
export const SDK_VERSION = '1.0.0-beta-
|
|
5
|
+
export const SDK_VERSION = '1.0.0-beta-081c456ce358';
|
|
@@ -70,6 +70,12 @@ export type CreateCustomerEntitlementRequest = AcceptDateStrings<{
|
|
|
70
70
|
body: CreateEntitlementRequestInput;
|
|
71
71
|
}>;
|
|
72
72
|
export type CreateCustomerEntitlementResponse = Entitlement;
|
|
73
|
+
export type OverrideCustomerEntitlementRequest = AcceptDateStrings<{
|
|
74
|
+
customerId: string;
|
|
75
|
+
entitlementId: string;
|
|
76
|
+
body: CreateEntitlementRequestInput;
|
|
77
|
+
}>;
|
|
78
|
+
export type OverrideCustomerEntitlementResponse = Entitlement;
|
|
73
79
|
export interface GetCustomerEntitlementHistoryQuery {
|
|
74
80
|
/**
|
|
75
81
|
* The start of the queried range. Defaults to the last reset. Truncated to the
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
+
import type { CreateNotificationChannelRequestInput, ListNotificationChannelsParamsFilter, NotificationChannel, NotificationChannelPagePaginatedResponse, SortQueryInput, UpdateNotificationChannelRequestInput } from '../types.js';
|
|
3
|
+
export interface ListNotificationChannelsQuery {
|
|
4
|
+
/** Determines which page of the collection to retrieve. */
|
|
5
|
+
page?: {
|
|
6
|
+
size?: number;
|
|
7
|
+
number?: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Sort notification channels returned in the response. Supported sort attributes
|
|
11
|
+
* are:
|
|
12
|
+
*
|
|
13
|
+
* - `id` (default)
|
|
14
|
+
* - `type`
|
|
15
|
+
* - `created_at`
|
|
16
|
+
* - `updated_at`
|
|
17
|
+
*
|
|
18
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
19
|
+
* suffix is used to specify a descending order.
|
|
20
|
+
*/
|
|
21
|
+
sort?: SortQueryInput;
|
|
22
|
+
/**
|
|
23
|
+
* Filter notification channels returned in the response.
|
|
24
|
+
*
|
|
25
|
+
* To filter notification channels by type add the following query param:
|
|
26
|
+
* filter[type]=webhook
|
|
27
|
+
*/
|
|
28
|
+
filter?: ListNotificationChannelsParamsFilter;
|
|
29
|
+
}
|
|
30
|
+
export type ListNotificationChannelsRequest = AcceptDateStrings<ListNotificationChannelsQuery>;
|
|
31
|
+
export type ListNotificationChannelsResponse = NotificationChannelPagePaginatedResponse;
|
|
32
|
+
export type CreateNotificationChannelRequest = AcceptDateStrings<CreateNotificationChannelRequestInput>;
|
|
33
|
+
export type CreateNotificationChannelResponse = NotificationChannel;
|
|
34
|
+
export type GetNotificationChannelRequest = {
|
|
35
|
+
notificationChannelId: string;
|
|
36
|
+
};
|
|
37
|
+
export type GetNotificationChannelResponse = NotificationChannel;
|
|
38
|
+
export type UpdateNotificationChannelRequest = AcceptDateStrings<{
|
|
39
|
+
notificationChannelId: string;
|
|
40
|
+
body: UpdateNotificationChannelRequestInput;
|
|
41
|
+
}>;
|
|
42
|
+
export type UpdateNotificationChannelResponse = NotificationChannel;
|
|
43
|
+
export type DeleteNotificationChannelRequest = {
|
|
44
|
+
notificationChannelId: string;
|
|
45
|
+
};
|
|
46
|
+
export type DeleteNotificationChannelResponse = void;
|