Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/generated/client/sdk.gen.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// This file is auto-generated by @hey-api/openapi-ts

import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch';
import type { ListQuotesData, ListQuotesResponse, ListPendingQuotesData, ListPendingQuotesResponse, AdminLookupQuoteData, AdminLookupQuoteResponse, AdminUpdateQuoteData, AdminUpdateQuoteResponse, ResolveOfferData, EnquireQuoteData, EnquireQuoteResponse, LookupQuoteData, LookupQuoteResponse, ActivateKeysetData, ActivateKeysetResponse, DebitData, CreditData, ECashBalance, OnChainBalanceData, OnChainData, KeysetInfoData, KeySetInfo} from './types.gen';
import type { ListQuotesData, ListQuotesResponse, ListPendingQuotesData, ListPendingQuotesResponse, AdminLookupQuoteData, AdminLookupQuoteResponse, AdminUpdateQuoteData, AdminUpdateQuoteResponse, ResolveOfferData, EnquireQuoteData, EnquireQuoteResponse, LookupQuoteData, LookupQuoteResponse, ActivateKeysetData, ActivateKeysetResponse, DebitData, CreditData, ECashBalance, OnChainBalanceData, OnChainData, KeysetInfoData, KeySetInfo, RequestToMintData, RequestToMintResponseInfo} from './types.gen';

import { client as _heyApiClient } from './client.gen';

export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = ClientOptions<TData, ThrowOnError> & {
Expand Down Expand Up @@ -136,3 +137,18 @@
...options
});
};

/**
* --------------------------- RequestMint
*/

export const requestToMint = <ThrowOnError extends boolean = false>(options: Options<RequestToMintData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).post<RequestToMintResponseInfo, unknown, ThrowOnError>({
url: '/v1/admin/treasury/debit/request_to_mint_from_ebill',
...options,
headers: {
'Content-Type': 'application/json',
...options?.headers
}
});
};

Check warning on line 154 in src/generated/client/sdk.gen.ts

View check run for this annotation

Codecov / codecov/patch

src/generated/client/sdk.gen.ts#L145-L154

Added lines #L145 - L154 were not covered by tests
33 changes: 33 additions & 0 deletions src/generated/client/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,3 +496,36 @@ export type KeysetInfoData = {
query?: never;
url: '/v1/admin/keysets/{keyset_id}';
};

/**
* Request Mint
*/

// pub struct RequestToMintFromEBillRequest {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed

// pub ebill_id: String,
// pub amount: Amount,
// }

export type RequestToMintRequest = {
ebill_id: string;
amount: number;
};

export type RequestToMintResponseInfo = {
request_id: string;
request: string;
};

export type RequestToMintResponse = {
/**
* Successful response
*/
200: RequestToMintResponseInfo;
};

export type RequestToMintData = {
body?: RequestToMintRequest;
path?: never;
query?: never;
url: '/v1/admin/treasury/debit/request_to_mint_from_ebill'
};
Loading
Loading