@openmeter/client 1.0.0-beta.229 → 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 +49 -30
- package/dist/funcs/addons.js +111 -28
- package/dist/funcs/apps.js +37 -8
- package/dist/funcs/billing.js +79 -16
- package/dist/funcs/currencies.js +82 -22
- package/dist/funcs/customers.d.ts +3 -1
- package/dist/funcs/customers.js +390 -91
- 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 +99 -27
- package/dist/funcs/governance.js +27 -9
- 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 +77 -23
- package/dist/funcs/meters.d.ts +2 -1
- package/dist/funcs/meters.js +118 -27
- package/dist/funcs/planAddons.js +103 -28
- package/dist/funcs/plans.js +113 -24
- package/dist/funcs/subscriptions.d.ts +2 -1
- package/dist/funcs/subscriptions.js +178 -39
- package/dist/funcs/tax.js +78 -21
- package/dist/index.d.ts +5 -1
- package/dist/index.js +2 -0
- package/dist/lib/config.d.ts +9 -0
- 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 +83 -32
- 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 +27210 -3012
- package/dist/models/schemas.js +6212 -492
- package/dist/models/types.d.ts +4240 -977
- package/dist/sdk/customers.d.ts +3 -1
- package/dist/sdk/customers.js +7 -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,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;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
2
|
+
import type { CreateSubscriptionAddonRequest as CreateSubscriptionAddonRequestBody, ListSubscriptionsParamsFilter, SortQueryInput, Subscription, SubscriptionAddon, SubscriptionAddonPagePaginatedResponse, SubscriptionCancelInput, SubscriptionChange, SubscriptionChangeResponse, SubscriptionCreate, SubscriptionPagePaginatedResponse } from '../types.js';
|
|
3
|
+
export type CreateSubscriptionRequest = AcceptDateStrings<SubscriptionCreate>;
|
|
3
4
|
export type CreateSubscriptionResponse = Subscription;
|
|
4
5
|
export interface ListSubscriptionsQuery {
|
|
5
6
|
/** Determines which page of the collection to retrieve. */
|
|
@@ -7,42 +8,67 @@ export interface ListSubscriptionsQuery {
|
|
|
7
8
|
size?: number;
|
|
8
9
|
number?: number;
|
|
9
10
|
};
|
|
10
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Sort subscriptions returned in the response. Supported sort attributes are:
|
|
13
|
+
*
|
|
14
|
+
* - `id`
|
|
15
|
+
* - `active_from` (default)
|
|
16
|
+
* - `active_to`
|
|
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
|
+
*/
|
|
11
21
|
sort?: SortQueryInput;
|
|
12
22
|
/** Filter subscriptions. */
|
|
13
23
|
filter?: ListSubscriptionsParamsFilter;
|
|
14
24
|
}
|
|
15
|
-
export type ListSubscriptionsRequest = ListSubscriptionsQuery
|
|
25
|
+
export type ListSubscriptionsRequest = AcceptDateStrings<ListSubscriptionsQuery>;
|
|
16
26
|
export type ListSubscriptionsResponse = SubscriptionPagePaginatedResponse;
|
|
17
27
|
export type GetSubscriptionRequest = {
|
|
18
28
|
subscriptionId: string;
|
|
19
29
|
};
|
|
20
30
|
export type GetSubscriptionResponse = Subscription;
|
|
21
|
-
export type CancelSubscriptionRequest = {
|
|
31
|
+
export type CancelSubscriptionRequest = AcceptDateStrings<{
|
|
22
32
|
subscriptionId: string;
|
|
23
33
|
body: SubscriptionCancelInput;
|
|
24
|
-
}
|
|
34
|
+
}>;
|
|
25
35
|
export type CancelSubscriptionResponse = Subscription;
|
|
26
36
|
export type UnscheduleCancelationRequest = {
|
|
27
37
|
subscriptionId: string;
|
|
28
38
|
};
|
|
29
39
|
export type UnscheduleCancelationResponse = Subscription;
|
|
30
|
-
export type ChangeSubscriptionRequest = {
|
|
40
|
+
export type ChangeSubscriptionRequest = AcceptDateStrings<{
|
|
31
41
|
subscriptionId: string;
|
|
32
42
|
body: SubscriptionChange;
|
|
33
|
-
}
|
|
43
|
+
}>;
|
|
34
44
|
export type ChangeSubscriptionResponse = SubscriptionChangeResponse;
|
|
45
|
+
export type CreateSubscriptionAddonRequest = AcceptDateStrings<{
|
|
46
|
+
subscriptionId: string;
|
|
47
|
+
body: CreateSubscriptionAddonRequestBody;
|
|
48
|
+
}>;
|
|
49
|
+
export type CreateSubscriptionAddonResponse = SubscriptionAddon;
|
|
35
50
|
export interface ListSubscriptionAddonsQuery {
|
|
36
51
|
/** Determines which page of the collection to retrieve. */
|
|
37
52
|
page?: {
|
|
38
53
|
size?: number;
|
|
39
54
|
number?: number;
|
|
40
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Sort subscription addons returned in the response. Supported sort attributes
|
|
58
|
+
* are:
|
|
59
|
+
*
|
|
60
|
+
* - `id`
|
|
61
|
+
* - `created_at` (default)
|
|
62
|
+
* - `updated_at`
|
|
63
|
+
*
|
|
64
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
65
|
+
* suffix is used to specify a descending order.
|
|
66
|
+
*/
|
|
41
67
|
sort?: SortQueryInput;
|
|
42
68
|
}
|
|
43
|
-
export type ListSubscriptionAddonsRequest = ListSubscriptionAddonsQuery & {
|
|
69
|
+
export type ListSubscriptionAddonsRequest = AcceptDateStrings<ListSubscriptionAddonsQuery & {
|
|
44
70
|
subscriptionId: string;
|
|
45
|
-
}
|
|
71
|
+
}>;
|
|
46
72
|
export type ListSubscriptionAddonsResponse = SubscriptionAddonPagePaginatedResponse;
|
|
47
73
|
export type GetSubscriptionAddonRequest = {
|
|
48
74
|
subscriptionId: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { AcceptDateStrings } from '../../lib/wire.js';
|
|
1
2
|
import type { CreateTaxCodeRequest as CreateTaxCodeRequestBody, TaxCode, TaxCodePagePaginatedResponse, UpsertTaxCodeRequest as UpsertTaxCodeRequestBody } from '../types.js';
|
|
2
|
-
export type CreateTaxCodeRequest = CreateTaxCodeRequestBody
|
|
3
|
+
export type CreateTaxCodeRequest = AcceptDateStrings<CreateTaxCodeRequestBody>;
|
|
3
4
|
export type CreateTaxCodeResponse = TaxCode;
|
|
4
5
|
export type GetTaxCodeRequest = {
|
|
5
6
|
taxCodeId: string;
|
|
@@ -12,14 +13,14 @@ export interface ListTaxCodesQuery {
|
|
|
12
13
|
number?: number;
|
|
13
14
|
};
|
|
14
15
|
/** Include deleted tax codes in the response. */
|
|
15
|
-
|
|
16
|
+
includeDeleted?: boolean;
|
|
16
17
|
}
|
|
17
|
-
export type ListTaxCodesRequest = ListTaxCodesQuery
|
|
18
|
+
export type ListTaxCodesRequest = AcceptDateStrings<ListTaxCodesQuery>;
|
|
18
19
|
export type ListTaxCodesResponse = TaxCodePagePaginatedResponse;
|
|
19
|
-
export type UpsertTaxCodeRequest = {
|
|
20
|
+
export type UpsertTaxCodeRequest = AcceptDateStrings<{
|
|
20
21
|
taxCodeId: string;
|
|
21
22
|
body: UpsertTaxCodeRequestBody;
|
|
22
|
-
}
|
|
23
|
+
}>;
|
|
23
24
|
export type UpsertTaxCodeResponse = TaxCode;
|
|
24
25
|
export type DeleteTaxCodeRequest = {
|
|
25
26
|
taxCodeId: string;
|