Skip to content

Commit

Permalink
feat: currencies endpoint v2
Browse files Browse the repository at this point in the history
  • Loading branch information
turip committed Jan 21, 2025
1 parent 0512c10 commit 12e84f6
Show file tree
Hide file tree
Showing 16 changed files with 3,030 additions and 2,603 deletions.
1,559 changes: 779 additions & 780 deletions api/api.gen.go

Large diffs are not rendered by default.

1,696 changes: 932 additions & 764 deletions api/client/go/client.gen.go

Large diffs are not rendered by default.

128 changes: 112 additions & 16 deletions api/client/node/schemas/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,26 @@ export interface paths {
patch?: never
trace?: never
}
'/api/v1/info/currencies': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
/**
* List supported currencies
* @description List all supported currencies.
*/
get: operations['listCurrencies']
put?: never
post?: never
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
'/api/v1/marketplace/listings': {
parameters: {
query?: never
Expand Down Expand Up @@ -2343,6 +2363,20 @@ export interface components {
*/
readonly url: string
} & WithRequired<components['schemas']['InvoiceGenericDocumentRef'], 'type'>
/** @description Currency describes a currency supported by OpenMeter. */
Currency: {
/** @description The currency ISO code. */
code: components['schemas']['CurrencyCode']
/** @description The currency name. */
name: string
/** @description The currency symbol. */
symbol: string
/**
* Format: uint32
* @description Subunit of the currency.
*/
subunits: number
}
/**
* @description Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code.
* Custom three-letter currency codes are also supported for convenience.
Expand Down Expand Up @@ -6067,11 +6101,7 @@ export interface components {
* Price
* @description The price of the rate card.
* When null, the feature or service is free.
* @example {
* "type": "flat",
* "amount": "100",
* "paymentTerm": "in_arrears"
* }
* @example {}
*/
price: components['schemas']['FlatPriceWithPaymentTerm'] | null
}
Expand Down Expand Up @@ -6597,9 +6627,7 @@ export interface components {
* @example Customer Name
*/
displayName?: string | null
/** @example {
* "hubspotId": "123456"
* } */
/** @example {} */
metadata?: {
[key: string]: unknown
} | null
Expand Down Expand Up @@ -6642,9 +6670,7 @@ export interface components {
* @example Customer Name
*/
displayName?: string | null
/** @example {
* "hubspotId": "123456"
* } */
/** @example {} */
metadata?: {
[key: string]: unknown
} | null
Expand Down Expand Up @@ -6917,11 +6943,7 @@ export interface components {
* Price
* @description The price of the rate card.
* When null, the feature or service is free.
* @example {
* "type": "flat",
* "amount": "100",
* "paymentTerm": "in_arrears"
* }
* @example {}
*/
price:
| (components['schemas']['FlatPriceWithPaymentTerm'] | null)
Expand Down Expand Up @@ -11749,6 +11771,80 @@ export interface operations {
}
}
}
listCurrencies: {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
requestBody?: never
responses: {
/** @description The request has succeeded. */
200: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['Currency'][]
}
}
/** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
400: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['BadRequestProblemResponse']
}
}
/** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
401: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['UnauthorizedProblemResponse']
}
}
/** @description The server understood the request but refuses to authorize it. */
403: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['ForbiddenProblemResponse']
}
}
/** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
500: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['InternalServerErrorProblemResponse']
}
}
/** @description The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. */
503: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse']
}
}
/** @description An unexpected error response. */
default: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['UnexpectedProblemResponse']
}
}
}
}
listMarketplaceListings: {
parameters: {
query?: {
Expand Down
128 changes: 112 additions & 16 deletions api/client/web/src/client/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,26 @@ export interface paths {
patch?: never
trace?: never
}
'/api/v1/info/currencies': {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
/**
* List supported currencies
* @description List all supported currencies.
*/
get: operations['listCurrencies']
put?: never
post?: never
delete?: never
options?: never
head?: never
patch?: never
trace?: never
}
'/api/v1/marketplace/listings': {
parameters: {
query?: never
Expand Down Expand Up @@ -2343,6 +2363,20 @@ export interface components {
*/
readonly url: string
} & WithRequired<components['schemas']['InvoiceGenericDocumentRef'], 'type'>
/** @description Currency describes a currency supported by OpenMeter. */
Currency: {
/** @description The currency ISO code. */
code: components['schemas']['CurrencyCode']
/** @description The currency name. */
name: string
/** @description The currency symbol. */
symbol: string
/**
* Format: uint32
* @description Subunit of the currency.
*/
subunits: number
}
/**
* @description Three-letter [ISO4217](https://www.iso.org/iso-4217-currency-codes.html) currency code.
* Custom three-letter currency codes are also supported for convenience.
Expand Down Expand Up @@ -6070,11 +6104,7 @@ export interface components {
* Price
* @description The price of the rate card.
* When null, the feature or service is free.
* @example {
* "type": "flat",
* "amount": "100",
* "paymentTerm": "in_arrears"
* }
* @example {}
*/
price: components['schemas']['FlatPriceWithPaymentTerm'] | null
}
Expand Down Expand Up @@ -6606,9 +6636,7 @@ export interface components {
* @example Customer Name
*/
displayName?: string | null
/** @example {
* "hubspotId": "123456"
* } */
/** @example {} */
metadata?: {
[key: string]: unknown
} | null
Expand Down Expand Up @@ -6651,9 +6679,7 @@ export interface components {
* @example Customer Name
*/
displayName?: string | null
/** @example {
* "hubspotId": "123456"
* } */
/** @example {} */
metadata?: {
[key: string]: unknown
} | null
Expand Down Expand Up @@ -6926,11 +6952,7 @@ export interface components {
* Price
* @description The price of the rate card.
* When null, the feature or service is free.
* @example {
* "type": "flat",
* "amount": "100",
* "paymentTerm": "in_arrears"
* }
* @example {}
*/
price:
| (components['schemas']['FlatPriceWithPaymentTerm'] | null)
Expand Down Expand Up @@ -11758,6 +11780,80 @@ export interface operations {
}
}
}
listCurrencies: {
parameters: {
query?: never
header?: never
path?: never
cookie?: never
}
requestBody?: never
responses: {
/** @description The request has succeeded. */
200: {
headers: {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['Currency'][]
}
}
/** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
400: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['BadRequestProblemResponse']
}
}
/** @description The request has not been applied because it lacks valid authentication credentials for the target resource. */
401: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['UnauthorizedProblemResponse']
}
}
/** @description The server understood the request but refuses to authorize it. */
403: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['ForbiddenProblemResponse']
}
}
/** @description The server encountered an unexpected condition that prevented it from fulfilling the request. */
500: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['InternalServerErrorProblemResponse']
}
}
/** @description The server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay. */
503: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['ServiceUnavailableProblemResponse']
}
}
/** @description An unexpected error response. */
default: {
headers: {
[name: string]: unknown
}
content: {
'application/problem+json': components['schemas']['UnexpectedProblemResponse']
}
}
}
}
listMarketplaceListings: {
parameters: {
query?: {
Expand Down
Loading

0 comments on commit 12e84f6

Please sign in to comment.