|
| 1 | +/* generated using openapi-typescript-codegen -- do no edit */ |
| 2 | +/* istanbul ignore file */ |
| 3 | +/* tslint:disable */ |
| 4 | +/* eslint-disable */ |
| 5 | +import type { CancelablePromise } from '../core/CancelablePromise'; |
| 6 | +import type { BaseHttpRequest } from '../core/BaseHttpRequest'; |
| 7 | + |
| 8 | +export class WalletCredentialsService { |
| 9 | + |
| 10 | + constructor(public readonly httpRequest: BaseHttpRequest) {} |
| 11 | + |
| 12 | + /** |
| 13 | + * Create wallet credentials |
| 14 | + * Create a new set of wallet credentials. |
| 15 | + * @param requestBody |
| 16 | + * @returns any Default Response |
| 17 | + * @throws ApiError |
| 18 | + */ |
| 19 | + public createWalletCredential( |
| 20 | + requestBody: { |
| 21 | + label: string; |
| 22 | + type: 'circle'; |
| 23 | + /** |
| 24 | + * 32-byte hex string. If not provided, a random one will be generated. |
| 25 | + */ |
| 26 | + entitySecret?: string; |
| 27 | + /** |
| 28 | + * Whether this credential should be set as the default for its type. Only one credential can be default per type. |
| 29 | + */ |
| 30 | + isDefault?: boolean; |
| 31 | + }, |
| 32 | + ): CancelablePromise<{ |
| 33 | + result: { |
| 34 | + id: string; |
| 35 | + type: string; |
| 36 | + label: string; |
| 37 | + isDefault: (boolean | null); |
| 38 | + createdAt: string; |
| 39 | + updatedAt: string; |
| 40 | + }; |
| 41 | + }> { |
| 42 | + return this.httpRequest.request({ |
| 43 | + method: 'POST', |
| 44 | + url: '/wallet-credentials', |
| 45 | + body: requestBody, |
| 46 | + mediaType: 'application/json', |
| 47 | + errors: { |
| 48 | + 400: `Bad Request`, |
| 49 | + 404: `Not Found`, |
| 50 | + 500: `Internal Server Error`, |
| 51 | + }, |
| 52 | + }); |
| 53 | + } |
| 54 | + |
| 55 | + /** |
| 56 | + * Get all wallet credentials |
| 57 | + * Get all wallet credentials with pagination. |
| 58 | + * @param page Specify the page number. |
| 59 | + * @param limit Specify the number of results to return per page. |
| 60 | + * @returns any Default Response |
| 61 | + * @throws ApiError |
| 62 | + */ |
| 63 | + public getAllWalletCredentials( |
| 64 | + page: number = 1, |
| 65 | + limit: number = 100, |
| 66 | + ): CancelablePromise<{ |
| 67 | + result: Array<{ |
| 68 | + id: string; |
| 69 | + type: string; |
| 70 | + label: (string | null); |
| 71 | + isDefault: (boolean | null); |
| 72 | + createdAt: string; |
| 73 | + updatedAt: string; |
| 74 | + }>; |
| 75 | + }> { |
| 76 | + return this.httpRequest.request({ |
| 77 | + method: 'GET', |
| 78 | + url: '/wallet-credentials', |
| 79 | + query: { |
| 80 | + 'page': page, |
| 81 | + 'limit': limit, |
| 82 | + }, |
| 83 | + errors: { |
| 84 | + 400: `Bad Request`, |
| 85 | + 404: `Not Found`, |
| 86 | + 500: `Internal Server Error`, |
| 87 | + }, |
| 88 | + }); |
| 89 | + } |
| 90 | + |
| 91 | + /** |
| 92 | + * Get wallet credential |
| 93 | + * Get a wallet credential by ID. |
| 94 | + * @param id The ID of the wallet credential to get. |
| 95 | + * @returns any Default Response |
| 96 | + * @throws ApiError |
| 97 | + */ |
| 98 | + public getWalletCredential( |
| 99 | + id: string, |
| 100 | + ): CancelablePromise<{ |
| 101 | + result: { |
| 102 | + id: string; |
| 103 | + type: string; |
| 104 | + label: (string | null); |
| 105 | + isDefault: boolean; |
| 106 | + createdAt: string; |
| 107 | + updatedAt: string; |
| 108 | + deletedAt: (string | null); |
| 109 | + }; |
| 110 | + }> { |
| 111 | + return this.httpRequest.request({ |
| 112 | + method: 'GET', |
| 113 | + url: '/wallet-credentials/{id}', |
| 114 | + path: { |
| 115 | + 'id': id, |
| 116 | + }, |
| 117 | + errors: { |
| 118 | + 400: `Bad Request`, |
| 119 | + 404: `Not Found`, |
| 120 | + 500: `Internal Server Error`, |
| 121 | + }, |
| 122 | + }); |
| 123 | + } |
| 124 | + |
| 125 | +} |
0 commit comments