@openmeter/client 1.0.0-beta.228 → 1.0.0-beta.230
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 +130 -111
- package/dist/funcs/addons.js +115 -28
- package/dist/funcs/apps.js +37 -10
- package/dist/funcs/billing.js +79 -18
- package/dist/funcs/currencies.js +82 -22
- package/dist/funcs/customers.d.ts +3 -1
- package/dist/funcs/customers.js +396 -83
- package/dist/funcs/defaults.js +24 -4
- package/dist/funcs/entitlements.js +19 -5
- package/dist/funcs/events.js +26 -8
- package/dist/funcs/features.js +102 -24
- package/dist/funcs/governance.js +27 -5
- package/dist/funcs/index.d.ts +1 -0
- package/dist/funcs/index.js +1 -0
- package/dist/funcs/invoices.d.ts +8 -0
- package/dist/funcs/invoices.js +81 -0
- package/dist/funcs/llmCost.js +78 -22
- package/dist/funcs/meters.d.ts +2 -1
- package/dist/funcs/meters.js +121 -24
- package/dist/funcs/planAddons.js +106 -20
- package/dist/funcs/plans.js +115 -28
- package/dist/funcs/subscriptions.d.ts +2 -1
- package/dist/funcs/subscriptions.js +182 -38
- package/dist/funcs/tax.js +80 -19
- package/dist/index.d.ts +5 -1
- package/dist/index.js +2 -0
- package/dist/lib/config.d.ts +9 -0
- package/dist/lib/config.js +1 -7
- package/dist/lib/encodings.d.ts +1 -1
- package/dist/lib/encodings.js +5 -4
- package/dist/lib/wire.d.ts +18 -0
- package/dist/lib/wire.js +312 -0
- package/dist/models/operations/addons.d.ts +17 -5
- package/dist/models/operations/apps.d.ts +2 -1
- package/dist/models/operations/billing.d.ts +5 -4
- package/dist/models/operations/currencies.d.ts +27 -9
- package/dist/models/operations/customers.d.ts +84 -33
- package/dist/models/operations/defaults.d.ts +2 -1
- package/dist/models/operations/events.d.ts +20 -4
- package/dist/models/operations/features.d.ts +24 -8
- package/dist/models/operations/governance.d.ts +3 -2
- package/dist/models/operations/invoices.d.ts +48 -0
- package/dist/models/operations/invoices.js +2 -0
- package/dist/models/operations/llmCost.d.ts +16 -4
- package/dist/models/operations/meters.d.ts +29 -8
- package/dist/models/operations/planAddons.d.ts +7 -6
- package/dist/models/operations/plans.d.ts +14 -5
- package/dist/models/operations/subscriptions.d.ts +36 -10
- package/dist/models/operations/tax.d.ts +6 -5
- package/dist/models/schemas.d.ts +27219 -3021
- package/dist/models/schemas.js +7079 -1362
- package/dist/models/types.d.ts +4309 -1046
- package/dist/sdk/apps.js +1 -1
- package/dist/sdk/customers.d.ts +3 -1
- package/dist/sdk/customers.js +7 -1
- package/dist/sdk/entitlements.js +1 -1
- package/dist/sdk/events.js +1 -1
- package/dist/sdk/governance.js +1 -1
- package/dist/sdk/invoices.d.ts +12 -0
- package/dist/sdk/invoices.js +21 -0
- package/dist/sdk/meters.d.ts +2 -1
- package/dist/sdk/meters.js +4 -1
- package/dist/sdk/sdk.d.ts +3 -0
- package/dist/sdk/sdk.js +5 -0
- package/dist/sdk/subscriptions.d.ts +2 -1
- package/dist/sdk/subscriptions.js +4 -1
- package/package.json +4 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
1
2
|
import type { CreateBillingProfileRequestInput, Profile, ProfilePagePaginatedResponse, UpsertBillingProfileRequestInput } from '../types.js';
|
|
2
3
|
export interface ListBillingProfilesQuery {
|
|
3
4
|
/** Determines which page of the collection to retrieve. */
|
|
@@ -6,18 +7,18 @@ export interface ListBillingProfilesQuery {
|
|
|
6
7
|
number?: number;
|
|
7
8
|
};
|
|
8
9
|
}
|
|
9
|
-
export type ListBillingProfilesRequest = ListBillingProfilesQuery
|
|
10
|
+
export type ListBillingProfilesRequest = AcceptDateStrings<ListBillingProfilesQuery>;
|
|
10
11
|
export type ListBillingProfilesResponse = ProfilePagePaginatedResponse;
|
|
11
|
-
export type CreateBillingProfileRequest = CreateBillingProfileRequestInput
|
|
12
|
+
export type CreateBillingProfileRequest = AcceptDateStrings<CreateBillingProfileRequestInput>;
|
|
12
13
|
export type CreateBillingProfileResponse = Profile;
|
|
13
14
|
export type GetBillingProfileRequest = {
|
|
14
15
|
id: string;
|
|
15
16
|
};
|
|
16
17
|
export type GetBillingProfileResponse = Profile;
|
|
17
|
-
export type UpdateBillingProfileRequest = {
|
|
18
|
+
export type UpdateBillingProfileRequest = AcceptDateStrings<{
|
|
18
19
|
id: string;
|
|
19
20
|
body: UpsertBillingProfileRequestInput;
|
|
20
|
-
}
|
|
21
|
+
}>;
|
|
21
22
|
export type UpdateBillingProfileResponse = Profile;
|
|
22
23
|
export type DeleteBillingProfileRequest = {
|
|
23
24
|
id: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
1
2
|
import type { CostBasis, CostBasisPagePaginatedResponse, CreateCostBasisRequest as CreateCostBasisRequestBody, CreateCurrencyCustomRequest, CurrencyCustom, CurrencyPagePaginatedResponse, ListCostBasesParamsFilter, ListCurrenciesParamsFilter, SortQueryInput } from '../types.js';
|
|
2
3
|
export interface ListCurrenciesQuery {
|
|
3
4
|
/** Determines which page of the collection to retrieve. */
|
|
@@ -5,17 +6,34 @@ export interface ListCurrenciesQuery {
|
|
|
5
6
|
size?: number;
|
|
6
7
|
number?: number;
|
|
7
8
|
};
|
|
8
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Sort currencies returned in the response. Supported sort attributes are:
|
|
11
|
+
*
|
|
12
|
+
* - `code` (default)
|
|
13
|
+
* - `name`
|
|
14
|
+
*
|
|
15
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
16
|
+
* suffix is used to specify a descending order.
|
|
17
|
+
*/
|
|
9
18
|
sort?: SortQueryInput;
|
|
10
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Filter currencies returned in the response.
|
|
21
|
+
*
|
|
22
|
+
* To filter currencies by type add the following query param: filter[type]=custom
|
|
23
|
+
*/
|
|
11
24
|
filter?: ListCurrenciesParamsFilter;
|
|
12
25
|
}
|
|
13
|
-
export type ListCurrenciesRequest = ListCurrenciesQuery
|
|
26
|
+
export type ListCurrenciesRequest = AcceptDateStrings<ListCurrenciesQuery>;
|
|
14
27
|
export type ListCurrenciesResponse = CurrencyPagePaginatedResponse;
|
|
15
|
-
export type CreateCustomCurrencyRequest = CreateCurrencyCustomRequest
|
|
28
|
+
export type CreateCustomCurrencyRequest = AcceptDateStrings<CreateCurrencyCustomRequest>;
|
|
16
29
|
export type CreateCustomCurrencyResponse = CurrencyCustom;
|
|
17
30
|
export interface ListCostBasesQuery {
|
|
18
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Filter cost bases returned in the response.
|
|
33
|
+
*
|
|
34
|
+
* To filter cost bases by fiat currency code add the following query param:
|
|
35
|
+
* filter[fiat_code]=USD
|
|
36
|
+
*/
|
|
19
37
|
filter?: ListCostBasesParamsFilter;
|
|
20
38
|
/** Determines which page of the collection to retrieve. */
|
|
21
39
|
page?: {
|
|
@@ -23,13 +41,13 @@ export interface ListCostBasesQuery {
|
|
|
23
41
|
number?: number;
|
|
24
42
|
};
|
|
25
43
|
}
|
|
26
|
-
export type ListCostBasesRequest = ListCostBasesQuery & {
|
|
44
|
+
export type ListCostBasesRequest = AcceptDateStrings<ListCostBasesQuery & {
|
|
27
45
|
currencyId: string;
|
|
28
|
-
}
|
|
46
|
+
}>;
|
|
29
47
|
export type ListCostBasesResponse = CostBasisPagePaginatedResponse;
|
|
30
|
-
export type CreateCostBasisRequest = {
|
|
48
|
+
export type CreateCostBasisRequest = AcceptDateStrings<{
|
|
31
49
|
currencyId: string;
|
|
32
50
|
body: CreateCostBasisRequestBody;
|
|
33
|
-
}
|
|
51
|
+
}>;
|
|
34
52
|
export type CreateCostBasisResponse = CostBasis;
|
|
35
53
|
//# sourceMappingURL=currencies.d.ts.map
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import * as schemas from '../schemas.js';
|
|
3
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
4
|
+
import type { AppCustomerData, AppStripeCreateCheckoutSessionResult, AppStripeCreateCustomerPortalSessionResult, ChargePagePaginatedResponse, CreateChargeFlatFeeRequest, CreateChargeUsageBasedRequest, CreateCreditAdjustmentRequest as CreateCreditAdjustmentRequestBody, CreateCreditGrantRequestInput, CreateCustomerRequest as CreateCustomerRequestBody, CreditAdjustment, CreditBalances, CreditGrant, CreditGrantPagePaginatedResponse, CreditTransactionPaginatedResponse, CursorPaginationQueryPage, Customer, CustomerData, CustomerPagePaginatedResponse, CustomerStripeCreateCheckoutSessionRequestInput, CustomerStripeCreateCustomerPortalSessionRequest, GetCreditBalanceParamsFilter, ListChargesParamsFilter, ListCreditGrantsParamsFilter, ListCreditTransactionsParamsFilter, ListCustomersParamsFilter, SortQueryInput, UpdateCreditGrantExternalSettlementRequest as UpdateCreditGrantExternalSettlementRequestBody, UpsertAppCustomerDataRequest, UpsertCustomerBillingDataRequest, UpsertCustomerRequest as UpsertCustomerRequestBody } from '../types.js';
|
|
5
|
+
export type CreateCustomerRequest = AcceptDateStrings<CreateCustomerRequestBody>;
|
|
3
6
|
export type CreateCustomerResponse = Customer;
|
|
4
7
|
export type GetCustomerRequest = {
|
|
5
8
|
customerId: string;
|
|
@@ -11,17 +14,30 @@ export interface ListCustomersQuery {
|
|
|
11
14
|
size?: number;
|
|
12
15
|
number?: number;
|
|
13
16
|
};
|
|
14
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Sort customers returned in the response. Supported sort attributes are:
|
|
19
|
+
*
|
|
20
|
+
* - `id`
|
|
21
|
+
* - `name` (default)
|
|
22
|
+
* - `created_at`
|
|
23
|
+
*
|
|
24
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
25
|
+
* suffix is used to specify a descending order.
|
|
26
|
+
*/
|
|
15
27
|
sort?: SortQueryInput;
|
|
16
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Filter customers returned in the response.
|
|
30
|
+
*
|
|
31
|
+
* To filter customers by key add the following query param: filter[key]=my-db-id
|
|
32
|
+
*/
|
|
17
33
|
filter?: ListCustomersParamsFilter;
|
|
18
34
|
}
|
|
19
|
-
export type ListCustomersRequest = ListCustomersQuery
|
|
35
|
+
export type ListCustomersRequest = AcceptDateStrings<ListCustomersQuery>;
|
|
20
36
|
export type ListCustomersResponse = CustomerPagePaginatedResponse;
|
|
21
|
-
export type UpsertCustomerRequest = {
|
|
37
|
+
export type UpsertCustomerRequest = AcceptDateStrings<{
|
|
22
38
|
customerId: string;
|
|
23
39
|
body: UpsertCustomerRequestBody;
|
|
24
|
-
}
|
|
40
|
+
}>;
|
|
25
41
|
export type UpsertCustomerResponse = Customer;
|
|
26
42
|
export type DeleteCustomerRequest = {
|
|
27
43
|
customerId: string;
|
|
@@ -31,30 +47,30 @@ export type GetCustomerBillingRequest = {
|
|
|
31
47
|
customerId: string;
|
|
32
48
|
};
|
|
33
49
|
export type GetCustomerBillingResponse = CustomerData;
|
|
34
|
-
export type UpdateCustomerBillingRequest = {
|
|
50
|
+
export type UpdateCustomerBillingRequest = AcceptDateStrings<{
|
|
35
51
|
customerId: string;
|
|
36
52
|
body: UpsertCustomerBillingDataRequest;
|
|
37
|
-
}
|
|
53
|
+
}>;
|
|
38
54
|
export type UpdateCustomerBillingResponse = CustomerData;
|
|
39
|
-
export type UpdateCustomerBillingAppDataRequest = {
|
|
55
|
+
export type UpdateCustomerBillingAppDataRequest = AcceptDateStrings<{
|
|
40
56
|
customerId: string;
|
|
41
57
|
body: UpsertAppCustomerDataRequest;
|
|
42
|
-
}
|
|
58
|
+
}>;
|
|
43
59
|
export type UpdateCustomerBillingAppDataResponse = AppCustomerData;
|
|
44
|
-
export type CreateCustomerStripeCheckoutSessionRequest = {
|
|
60
|
+
export type CreateCustomerStripeCheckoutSessionRequest = AcceptDateStrings<{
|
|
45
61
|
customerId: string;
|
|
46
62
|
body: CustomerStripeCreateCheckoutSessionRequestInput;
|
|
47
|
-
}
|
|
63
|
+
}>;
|
|
48
64
|
export type CreateCustomerStripeCheckoutSessionResponse = AppStripeCreateCheckoutSessionResult;
|
|
49
|
-
export type CreateCustomerStripePortalSessionRequest = {
|
|
65
|
+
export type CreateCustomerStripePortalSessionRequest = AcceptDateStrings<{
|
|
50
66
|
customerId: string;
|
|
51
67
|
body: CustomerStripeCreateCustomerPortalSessionRequest;
|
|
52
|
-
}
|
|
68
|
+
}>;
|
|
53
69
|
export type CreateCustomerStripePortalSessionResponse = AppStripeCreateCustomerPortalSessionResult;
|
|
54
|
-
export type CreateCreditGrantRequest = {
|
|
70
|
+
export type CreateCreditGrantRequest = AcceptDateStrings<{
|
|
55
71
|
customerId: string;
|
|
56
72
|
body: CreateCreditGrantRequestInput;
|
|
57
|
-
}
|
|
73
|
+
}>;
|
|
58
74
|
export type CreateCreditGrantResponse = CreditGrant;
|
|
59
75
|
export type GetCreditGrantRequest = {
|
|
60
76
|
customerId: string;
|
|
@@ -70,32 +86,42 @@ export interface ListCreditGrantsQuery {
|
|
|
70
86
|
/** Filter credit grants returned in the response. */
|
|
71
87
|
filter?: ListCreditGrantsParamsFilter;
|
|
72
88
|
}
|
|
73
|
-
export type ListCreditGrantsRequest = ListCreditGrantsQuery & {
|
|
89
|
+
export type ListCreditGrantsRequest = AcceptDateStrings<ListCreditGrantsQuery & {
|
|
74
90
|
customerId: string;
|
|
75
|
-
}
|
|
91
|
+
}>;
|
|
76
92
|
export type ListCreditGrantsResponse = CreditGrantPagePaginatedResponse;
|
|
77
93
|
export interface GetCustomerCreditBalanceQuery {
|
|
78
|
-
/**
|
|
79
|
-
|
|
94
|
+
/**
|
|
95
|
+
* Return the credit balance as of this timestamp.
|
|
96
|
+
*
|
|
97
|
+
* Defaults to the current time.
|
|
98
|
+
*/
|
|
99
|
+
timestamp?: Date;
|
|
80
100
|
filter?: GetCreditBalanceParamsFilter;
|
|
81
101
|
}
|
|
82
|
-
export type GetCustomerCreditBalanceRequest = GetCustomerCreditBalanceQuery & {
|
|
102
|
+
export type GetCustomerCreditBalanceRequest = AcceptDateStrings<GetCustomerCreditBalanceQuery & {
|
|
83
103
|
customerId: string;
|
|
84
|
-
}
|
|
104
|
+
}>;
|
|
85
105
|
export type GetCustomerCreditBalanceResponse = CreditBalances;
|
|
86
|
-
export type CreateCreditAdjustmentRequest = {
|
|
106
|
+
export type CreateCreditAdjustmentRequest = AcceptDateStrings<{
|
|
87
107
|
customerId: string;
|
|
88
108
|
body: CreateCreditAdjustmentRequestBody;
|
|
89
|
-
}
|
|
109
|
+
}>;
|
|
90
110
|
export type CreateCreditAdjustmentResponse = CreditAdjustment;
|
|
111
|
+
export type UpdateCreditGrantExternalSettlementRequest = AcceptDateStrings<{
|
|
112
|
+
customerId: string;
|
|
113
|
+
creditGrantId: string;
|
|
114
|
+
body: UpdateCreditGrantExternalSettlementRequestBody;
|
|
115
|
+
}>;
|
|
116
|
+
export type UpdateCreditGrantExternalSettlementResponse = CreditGrant;
|
|
91
117
|
export interface ListCreditTransactionsQuery {
|
|
92
118
|
page?: CursorPaginationQueryPage;
|
|
93
119
|
/** Filter credit transactions returned in the response. */
|
|
94
120
|
filter?: ListCreditTransactionsParamsFilter;
|
|
95
121
|
}
|
|
96
|
-
export type ListCreditTransactionsRequest = ListCreditTransactionsQuery & {
|
|
122
|
+
export type ListCreditTransactionsRequest = AcceptDateStrings<ListCreditTransactionsQuery & {
|
|
97
123
|
customerId: string;
|
|
98
|
-
}
|
|
124
|
+
}>;
|
|
99
125
|
export type ListCreditTransactionsResponse = CreditTransactionPaginatedResponse;
|
|
100
126
|
export interface ListCustomerChargesQuery {
|
|
101
127
|
/** Determines which page of the collection to retrieve. */
|
|
@@ -103,15 +129,40 @@ export interface ListCustomerChargesQuery {
|
|
|
103
129
|
size?: number;
|
|
104
130
|
number?: number;
|
|
105
131
|
};
|
|
106
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* Sort charges returned in the response.
|
|
134
|
+
*
|
|
135
|
+
* Supported sort attributes are:
|
|
136
|
+
*
|
|
137
|
+
* - `id`
|
|
138
|
+
* - `created_at`
|
|
139
|
+
* - `service_period.from`
|
|
140
|
+
* - `billing_period.from`
|
|
141
|
+
*/
|
|
107
142
|
sort?: SortQueryInput;
|
|
108
|
-
/**
|
|
143
|
+
/**
|
|
144
|
+
* Filter charges.
|
|
145
|
+
*
|
|
146
|
+
* To filter charges by status add the following query param:
|
|
147
|
+
* `filter[status][oeq]=created,active`
|
|
148
|
+
*/
|
|
109
149
|
filter?: ListChargesParamsFilter;
|
|
110
|
-
/**
|
|
111
|
-
|
|
150
|
+
/**
|
|
151
|
+
* Expand full objects for referenced entities.
|
|
152
|
+
*
|
|
153
|
+
* Supported values are:
|
|
154
|
+
*
|
|
155
|
+
* - `real_time_usage`: Expand the charge's real-time usage.
|
|
156
|
+
*/
|
|
157
|
+
expand?: 'real_time_usage'[];
|
|
112
158
|
}
|
|
113
|
-
export type ListCustomerChargesRequest = ListCustomerChargesQuery & {
|
|
159
|
+
export type ListCustomerChargesRequest = AcceptDateStrings<ListCustomerChargesQuery & {
|
|
114
160
|
customerId: string;
|
|
115
|
-
}
|
|
161
|
+
}>;
|
|
116
162
|
export type ListCustomerChargesResponse = ChargePagePaginatedResponse;
|
|
163
|
+
export type CreateCustomerChargesRequest = AcceptDateStrings<{
|
|
164
|
+
customerId: string;
|
|
165
|
+
body: CreateChargeFlatFeeRequest | CreateChargeUsageBasedRequest;
|
|
166
|
+
}>;
|
|
167
|
+
export type CreateCustomerChargesResponse = z.output<typeof schemas.createCustomerChargesResponse>;
|
|
117
168
|
//# sourceMappingURL=customers.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
1
2
|
import type { OrganizationDefaultTaxCodes, UpdateOrganizationDefaultTaxCodesRequest as UpdateOrganizationDefaultTaxCodesRequestBody } from '../types.js';
|
|
2
3
|
export type GetOrganizationDefaultTaxCodesRequest = Record<string, never>;
|
|
3
4
|
export type GetOrganizationDefaultTaxCodesResponse = OrganizationDefaultTaxCodes;
|
|
4
|
-
export type UpdateOrganizationDefaultTaxCodesRequest = UpdateOrganizationDefaultTaxCodesRequestBody
|
|
5
|
+
export type UpdateOrganizationDefaultTaxCodesRequest = AcceptDateStrings<UpdateOrganizationDefaultTaxCodesRequestBody>;
|
|
5
6
|
export type UpdateOrganizationDefaultTaxCodesResponse = OrganizationDefaultTaxCodes;
|
|
6
7
|
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -1,13 +1,29 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
1
2
|
import type { CursorPaginationQueryPage, EventInput, IngestedEventPaginatedResponse, ListEventsParamsFilter, SortQueryInput } from '../types.js';
|
|
2
3
|
export interface ListMeteringEventsQuery {
|
|
3
4
|
page?: CursorPaginationQueryPage;
|
|
4
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Filter events returned in the response.
|
|
7
|
+
*
|
|
8
|
+
* To filter events by subject add the following query param:
|
|
9
|
+
* filter[subject][eq]=customer-1
|
|
10
|
+
*/
|
|
5
11
|
filter?: ListEventsParamsFilter;
|
|
6
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Sort events returned in the response. Supported sort attributes are:
|
|
14
|
+
*
|
|
15
|
+
* - `time` (default)
|
|
16
|
+
* - `ingested_at`
|
|
17
|
+
* - `stored_at`
|
|
18
|
+
*
|
|
19
|
+
* When omitted, events are sorted by `time desc` (most recent first). When a sort
|
|
20
|
+
* field is provided without a suffix, it sorts descending. Append the `asc` suffix
|
|
21
|
+
* to sort ascending, or the `desc` suffix to sort descending.
|
|
22
|
+
*/
|
|
7
23
|
sort?: SortQueryInput;
|
|
8
24
|
}
|
|
9
|
-
export type ListMeteringEventsRequest = ListMeteringEventsQuery
|
|
25
|
+
export type ListMeteringEventsRequest = AcceptDateStrings<ListMeteringEventsQuery>;
|
|
10
26
|
export type ListMeteringEventsResponse = IngestedEventPaginatedResponse;
|
|
11
|
-
export type IngestMeteringEventsRequest = EventInput | EventInput[]
|
|
27
|
+
export type IngestMeteringEventsRequest = AcceptDateStrings<EventInput | EventInput[]>;
|
|
12
28
|
export type IngestMeteringEventsResponse = void;
|
|
13
29
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
1
2
|
import type { CreateFeatureRequest as CreateFeatureRequestBody, Feature, FeatureCostQueryResult, FeaturePagePaginatedResponse, ListFeatureParamsFilter, MeterQueryRequestInput, SortQueryInput, UpdateFeatureRequest as UpdateFeatureRequestBody } from '../types.js';
|
|
2
3
|
export interface ListFeaturesQuery {
|
|
3
4
|
/** Determines which page of the collection to retrieve. */
|
|
@@ -5,31 +6,46 @@ export interface ListFeaturesQuery {
|
|
|
5
6
|
size?: number;
|
|
6
7
|
number?: number;
|
|
7
8
|
};
|
|
8
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Sort features returned in the response. Supported sort attributes are:
|
|
11
|
+
*
|
|
12
|
+
* - `key`
|
|
13
|
+
* - `name`
|
|
14
|
+
* - `created_at` (default)
|
|
15
|
+
* - `updated_at`
|
|
16
|
+
*
|
|
17
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
18
|
+
* suffix is used to specify a descending order.
|
|
19
|
+
*/
|
|
9
20
|
sort?: SortQueryInput;
|
|
10
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Filter features returned in the response.
|
|
23
|
+
*
|
|
24
|
+
* To filter features by meter_id add the following query param:
|
|
25
|
+
* filter[meter_id][oeq]=<id>
|
|
26
|
+
*/
|
|
11
27
|
filter?: ListFeatureParamsFilter;
|
|
12
28
|
}
|
|
13
|
-
export type ListFeaturesRequest = ListFeaturesQuery
|
|
29
|
+
export type ListFeaturesRequest = AcceptDateStrings<ListFeaturesQuery>;
|
|
14
30
|
export type ListFeaturesResponse = FeaturePagePaginatedResponse;
|
|
15
|
-
export type CreateFeatureRequest = CreateFeatureRequestBody
|
|
31
|
+
export type CreateFeatureRequest = AcceptDateStrings<CreateFeatureRequestBody>;
|
|
16
32
|
export type CreateFeatureResponse = Feature;
|
|
17
33
|
export type GetFeatureRequest = {
|
|
18
34
|
featureId: string;
|
|
19
35
|
};
|
|
20
36
|
export type GetFeatureResponse = Feature;
|
|
21
|
-
export type UpdateFeatureRequest = {
|
|
37
|
+
export type UpdateFeatureRequest = AcceptDateStrings<{
|
|
22
38
|
featureId: string;
|
|
23
39
|
body: UpdateFeatureRequestBody;
|
|
24
|
-
}
|
|
40
|
+
}>;
|
|
25
41
|
export type UpdateFeatureResponse = Feature;
|
|
26
42
|
export type DeleteFeatureRequest = {
|
|
27
43
|
featureId: string;
|
|
28
44
|
};
|
|
29
45
|
export type DeleteFeatureResponse = void;
|
|
30
|
-
export type QueryFeatureCostRequest = {
|
|
46
|
+
export type QueryFeatureCostRequest = AcceptDateStrings<{
|
|
31
47
|
featureId: string;
|
|
32
48
|
body: MeterQueryRequestInput;
|
|
33
|
-
}
|
|
49
|
+
}>;
|
|
34
50
|
export type QueryFeatureCostResponse = FeatureCostQueryResult;
|
|
35
51
|
//# sourceMappingURL=features.d.ts.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
1
2
|
import type { CursorPaginationQueryPage, GovernanceQueryRequestInput, GovernanceQueryResponse } from '../types.js';
|
|
2
3
|
export interface QueryGovernanceAccessQuery {
|
|
3
4
|
page?: CursorPaginationQueryPage;
|
|
4
5
|
}
|
|
5
|
-
export type QueryGovernanceAccessRequest = {
|
|
6
|
+
export type QueryGovernanceAccessRequest = AcceptDateStrings<{
|
|
6
7
|
body: GovernanceQueryRequestInput;
|
|
7
|
-
} & QueryGovernanceAccessQuery
|
|
8
|
+
} & QueryGovernanceAccessQuery>;
|
|
8
9
|
export type QueryGovernanceAccessResponse = GovernanceQueryResponse;
|
|
9
10
|
//# sourceMappingURL=governance.d.ts.map
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import * as schemas from '../schemas.js';
|
|
3
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
4
|
+
import type { InvoicePagePaginatedResponse, ListInvoicesParamsFilter, SortQueryInput, UpdateInvoiceStandardRequestInput } from '../types.js';
|
|
5
|
+
export interface ListInvoicesQuery {
|
|
6
|
+
/** Determines which page of the collection to retrieve. */
|
|
7
|
+
page?: {
|
|
8
|
+
size?: number;
|
|
9
|
+
number?: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Sort invoices returned in the response. Supported sort attributes:
|
|
13
|
+
*
|
|
14
|
+
* - `issued_at`
|
|
15
|
+
* - `created_at` (default)
|
|
16
|
+
* - `service_period_start`
|
|
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 invoices returned in the response.
|
|
24
|
+
*
|
|
25
|
+
* Examples:
|
|
26
|
+
*
|
|
27
|
+
* - `filter[status][oeq]=draft,issued`
|
|
28
|
+
* - `filter[customer_id]=01KPDB8K...`
|
|
29
|
+
* - `filter[issued_at][gte]=2024-01-01T00:00:00Z`
|
|
30
|
+
*/
|
|
31
|
+
filter?: ListInvoicesParamsFilter;
|
|
32
|
+
}
|
|
33
|
+
export type ListInvoicesRequest = AcceptDateStrings<ListInvoicesQuery>;
|
|
34
|
+
export type ListInvoicesResponse = InvoicePagePaginatedResponse;
|
|
35
|
+
export type GetInvoiceRequest = {
|
|
36
|
+
invoiceId: string;
|
|
37
|
+
};
|
|
38
|
+
export type GetInvoiceResponse = z.output<typeof schemas.getInvoiceResponse>;
|
|
39
|
+
export type UpdateInvoiceRequest = AcceptDateStrings<{
|
|
40
|
+
invoiceId: string;
|
|
41
|
+
body: UpdateInvoiceStandardRequestInput;
|
|
42
|
+
}>;
|
|
43
|
+
export type UpdateInvoiceResponse = z.output<typeof schemas.updateInvoiceResponse>;
|
|
44
|
+
export type DeleteInvoiceRequest = {
|
|
45
|
+
invoiceId: string;
|
|
46
|
+
};
|
|
47
|
+
export type DeleteInvoiceResponse = void;
|
|
48
|
+
//# sourceMappingURL=invoices.d.ts.map
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
1
2
|
import type { ListLlmCostPricesParamsFilter, LlmCostOverrideCreate, LlmCostPrice, PricePagePaginatedResponse, SortQueryInput } from '../types.js';
|
|
2
3
|
export interface ListLlmCostPricesQuery {
|
|
3
4
|
/** Filter prices. */
|
|
4
5
|
filter?: ListLlmCostPricesParamsFilter;
|
|
5
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Sort prices returned in the response. Supported sort attributes are:
|
|
8
|
+
*
|
|
9
|
+
* - `id`
|
|
10
|
+
* - `provider.id`
|
|
11
|
+
* - `model.id` (default)
|
|
12
|
+
* - `effective_from`
|
|
13
|
+
* - `effective_to`
|
|
14
|
+
*
|
|
15
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
16
|
+
* suffix is used to specify a descending order.
|
|
17
|
+
*/
|
|
6
18
|
sort?: SortQueryInput;
|
|
7
19
|
/** Determines which page of the collection to retrieve. */
|
|
8
20
|
page?: {
|
|
@@ -10,7 +22,7 @@ export interface ListLlmCostPricesQuery {
|
|
|
10
22
|
number?: number;
|
|
11
23
|
};
|
|
12
24
|
}
|
|
13
|
-
export type ListLlmCostPricesRequest = ListLlmCostPricesQuery
|
|
25
|
+
export type ListLlmCostPricesRequest = AcceptDateStrings<ListLlmCostPricesQuery>;
|
|
14
26
|
export type ListLlmCostPricesResponse = PricePagePaginatedResponse;
|
|
15
27
|
export type GetLlmCostPriceRequest = {
|
|
16
28
|
priceId: string;
|
|
@@ -24,9 +36,9 @@ export interface ListLlmCostOverridesQuery {
|
|
|
24
36
|
number?: number;
|
|
25
37
|
};
|
|
26
38
|
}
|
|
27
|
-
export type ListLlmCostOverridesRequest = ListLlmCostOverridesQuery
|
|
39
|
+
export type ListLlmCostOverridesRequest = AcceptDateStrings<ListLlmCostOverridesQuery>;
|
|
28
40
|
export type ListLlmCostOverridesResponse = PricePagePaginatedResponse;
|
|
29
|
-
export type CreateLlmCostOverrideRequest = LlmCostOverrideCreate
|
|
41
|
+
export type CreateLlmCostOverrideRequest = AcceptDateStrings<LlmCostOverrideCreate>;
|
|
30
42
|
export type CreateLlmCostOverrideResponse = LlmCostPrice;
|
|
31
43
|
export type DeleteLlmCostOverrideRequest = {
|
|
32
44
|
priceId: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
1
2
|
import type { CreateMeterRequest as CreateMeterRequestBody, ListMetersParamsFilter, Meter, MeterPagePaginatedResponse, MeterQueryRequestInput, MeterQueryResult, SortQueryInput, UpdateMeterRequest as UpdateMeterRequestBody } from '../types.js';
|
|
2
|
-
export type CreateMeterRequest = CreateMeterRequestBody
|
|
3
|
+
export type CreateMeterRequest = AcceptDateStrings<CreateMeterRequestBody>;
|
|
3
4
|
export type CreateMeterResponse = Meter;
|
|
4
5
|
export type GetMeterRequest = {
|
|
5
6
|
meterId: string;
|
|
@@ -11,25 +12,45 @@ export interface ListMetersQuery {
|
|
|
11
12
|
size?: number;
|
|
12
13
|
number?: number;
|
|
13
14
|
};
|
|
14
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Sort meters returned in the response. Supported sort attributes are:
|
|
17
|
+
*
|
|
18
|
+
* - `key`
|
|
19
|
+
* - `name`
|
|
20
|
+
* - `aggregation`
|
|
21
|
+
* - `created_at` (default)
|
|
22
|
+
* - `updated_at`
|
|
23
|
+
*
|
|
24
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
25
|
+
* suffix is used to specify a descending order.
|
|
26
|
+
*/
|
|
15
27
|
sort?: SortQueryInput;
|
|
16
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Filter meters returned in the response.
|
|
30
|
+
*
|
|
31
|
+
* To filter meters by key add the following query param: filter[key]=my-meter-key
|
|
32
|
+
*/
|
|
17
33
|
filter?: ListMetersParamsFilter;
|
|
18
34
|
}
|
|
19
|
-
export type ListMetersRequest = ListMetersQuery
|
|
35
|
+
export type ListMetersRequest = AcceptDateStrings<ListMetersQuery>;
|
|
20
36
|
export type ListMetersResponse = MeterPagePaginatedResponse;
|
|
21
|
-
export type UpdateMeterRequest = {
|
|
37
|
+
export type UpdateMeterRequest = AcceptDateStrings<{
|
|
22
38
|
meterId: string;
|
|
23
39
|
body: UpdateMeterRequestBody;
|
|
24
|
-
}
|
|
40
|
+
}>;
|
|
25
41
|
export type UpdateMeterResponse = Meter;
|
|
26
42
|
export type DeleteMeterRequest = {
|
|
27
43
|
meterId: string;
|
|
28
44
|
};
|
|
29
45
|
export type DeleteMeterResponse = void;
|
|
30
|
-
export type QueryMeterRequest = {
|
|
46
|
+
export type QueryMeterRequest = AcceptDateStrings<{
|
|
31
47
|
meterId: string;
|
|
32
48
|
body: MeterQueryRequestInput;
|
|
33
|
-
}
|
|
49
|
+
}>;
|
|
34
50
|
export type QueryMeterResponse = MeterQueryResult;
|
|
51
|
+
export type QueryMeterCsvRequest = AcceptDateStrings<{
|
|
52
|
+
meterId: string;
|
|
53
|
+
body: MeterQueryRequestInput;
|
|
54
|
+
}>;
|
|
55
|
+
export type QueryMeterCsvResponse = string;
|
|
35
56
|
//# sourceMappingURL=meters.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
1
2
|
import type { CreatePlanAddonRequest as CreatePlanAddonRequestBody, PlanAddon, PlanAddonPagePaginatedResponse, UpsertPlanAddonRequest } from '../types.js';
|
|
2
3
|
export interface ListPlanAddonsQuery {
|
|
3
4
|
/** Determines which page of the collection to retrieve. */
|
|
@@ -6,25 +7,25 @@ export interface ListPlanAddonsQuery {
|
|
|
6
7
|
number?: number;
|
|
7
8
|
};
|
|
8
9
|
}
|
|
9
|
-
export type ListPlanAddonsRequest = ListPlanAddonsQuery & {
|
|
10
|
+
export type ListPlanAddonsRequest = AcceptDateStrings<ListPlanAddonsQuery & {
|
|
10
11
|
planId: string;
|
|
11
|
-
}
|
|
12
|
+
}>;
|
|
12
13
|
export type ListPlanAddonsResponse = PlanAddonPagePaginatedResponse;
|
|
13
|
-
export type CreatePlanAddonRequest = {
|
|
14
|
+
export type CreatePlanAddonRequest = AcceptDateStrings<{
|
|
14
15
|
planId: string;
|
|
15
16
|
body: CreatePlanAddonRequestBody;
|
|
16
|
-
}
|
|
17
|
+
}>;
|
|
17
18
|
export type CreatePlanAddonResponse = PlanAddon;
|
|
18
19
|
export type GetPlanAddonRequest = {
|
|
19
20
|
planId: string;
|
|
20
21
|
planAddonId: string;
|
|
21
22
|
};
|
|
22
23
|
export type GetPlanAddonResponse = PlanAddon;
|
|
23
|
-
export type UpdatePlanAddonRequest = {
|
|
24
|
+
export type UpdatePlanAddonRequest = AcceptDateStrings<{
|
|
24
25
|
planId: string;
|
|
25
26
|
planAddonId: string;
|
|
26
27
|
body: UpsertPlanAddonRequest;
|
|
27
|
-
}
|
|
28
|
+
}>;
|
|
28
29
|
export type UpdatePlanAddonResponse = PlanAddon;
|
|
29
30
|
export type DeletePlanAddonRequest = {
|
|
30
31
|
planId: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
1
2
|
import type { CreatePlanRequestInput, ListPlansParamsFilter, Plan, PlanPagePaginatedResponse, SortQueryInput, UpsertPlanRequestInput } from '../types.js';
|
|
2
3
|
export interface ListPlansQuery {
|
|
3
4
|
/** Determines which page of the collection to retrieve. */
|
|
@@ -5,19 +6,27 @@ export interface ListPlansQuery {
|
|
|
5
6
|
size?: number;
|
|
6
7
|
number?: number;
|
|
7
8
|
};
|
|
8
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Sort plans returned in the response. Supported sort attributes are:
|
|
11
|
+
*
|
|
12
|
+
* - `id`
|
|
13
|
+
* - `key`
|
|
14
|
+
* - `version`
|
|
15
|
+
* - `created_at` (default)
|
|
16
|
+
* - `updated_at`
|
|
17
|
+
*/
|
|
9
18
|
sort?: SortQueryInput;
|
|
10
19
|
/** Filter plans returned in the response. */
|
|
11
20
|
filter?: ListPlansParamsFilter;
|
|
12
21
|
}
|
|
13
|
-
export type ListPlansRequest = ListPlansQuery
|
|
22
|
+
export type ListPlansRequest = AcceptDateStrings<ListPlansQuery>;
|
|
14
23
|
export type ListPlansResponse = PlanPagePaginatedResponse;
|
|
15
|
-
export type CreatePlanRequest = CreatePlanRequestInput
|
|
24
|
+
export type CreatePlanRequest = AcceptDateStrings<CreatePlanRequestInput>;
|
|
16
25
|
export type CreatePlanResponse = Plan;
|
|
17
|
-
export type UpdatePlanRequest = {
|
|
26
|
+
export type UpdatePlanRequest = AcceptDateStrings<{
|
|
18
27
|
planId: string;
|
|
19
28
|
body: UpsertPlanRequestInput;
|
|
20
|
-
}
|
|
29
|
+
}>;
|
|
21
30
|
export type UpdatePlanResponse = Plan;
|
|
22
31
|
export type GetPlanRequest = {
|
|
23
32
|
planId: string;
|