File size: 2,107 Bytes
1477a90 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | // Code generated by @openmeter/typespec-typescript. DO NOT EDIT.
import { z } from 'zod'
import * as schemas from '../schemas.js'
import type { AcceptDateStrings } from '../../lib/wire.js'
import type {
CostBasis,
CostBasisPagePaginatedResponse,
CreateCostBasisRequest as CreateCostBasisRequestBody,
CreateCurrencyCustomRequest,
CurrencyCustom,
CurrencyPagePaginatedResponse,
ListCostBasesParamsFilter,
ListCurrenciesParamsFilter,
SortQueryInput,
} from '../types.js'
export interface ListCurrenciesQuery {
/** Determines which page of the collection to retrieve. */
page?: { size?: number; number?: number }
/**
* Sort currencies returned in the response. Supported sort attributes are:
*
* - `code` (default)
* - `name`
*
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
* suffix is used to specify a descending order.
*/
sort?: SortQueryInput
/**
* Filter currencies returned in the response.
*
* To filter currencies by type add the following query param: filter[type]=custom
*/
filter?: ListCurrenciesParamsFilter
}
export type ListCurrenciesRequest = AcceptDateStrings<ListCurrenciesQuery>
export type ListCurrenciesResponse = CurrencyPagePaginatedResponse
export type CreateCustomCurrencyRequest =
AcceptDateStrings<CreateCurrencyCustomRequest>
export type CreateCustomCurrencyResponse = CurrencyCustom
export interface ListCostBasesQuery {
/**
* Filter cost bases returned in the response.
*
* To filter cost bases by fiat currency code add the following query param:
* filter[fiat_code]=USD
*/
filter?: ListCostBasesParamsFilter
/** Determines which page of the collection to retrieve. */
page?: { size?: number; number?: number }
}
export type ListCostBasesRequest = AcceptDateStrings<
ListCostBasesQuery & { currencyId: string }
>
export type ListCostBasesResponse = CostBasisPagePaginatedResponse
export type CreateCostBasisRequest = AcceptDateStrings<{
currencyId: string
body: CreateCostBasisRequestBody
}>
export type CreateCostBasisResponse = CostBasis
|