|
| 1 | +/* eslint-disable */ |
| 2 | +/* tslint:disable */ |
| 3 | +/* |
| 4 | + * --------------------------------------------------------------- |
| 5 | + * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ## |
| 6 | + * ## ## |
| 7 | + * ## AUTHOR: acacode ## |
| 8 | + * ## SOURCE: https://github.com/acacode/swagger-typescript-api ## |
| 9 | + * --------------------------------------------------------------- |
| 10 | + */ |
| 11 | + |
| 12 | +import { AuthentiqID, Error } from "./data-contracts"; |
| 13 | +import { HttpClient, HttpResponse, RequestParams } from "./http-client"; |
| 14 | +export declare class Key<SecurityDataType = unknown> { |
| 15 | + http: HttpClient<SecurityDataType>; |
| 16 | + constructor(http: HttpClient<SecurityDataType>); |
| 17 | + /** |
| 18 | + * @description Revoke an Authentiq ID using email & phone. If called with `email` and `phone` only, a verification code will be sent by email. Do a second call adding `code` to complete the revocation. |
| 19 | + * |
| 20 | + * @tags key, delete |
| 21 | + * @name KeyRevokeNosecret |
| 22 | + * @request DELETE:/key |
| 23 | + */ |
| 24 | + keyRevokeNosecret: ( |
| 25 | + query: { |
| 26 | + /** primary email associated to Key (ID) */ |
| 27 | + email: string; |
| 28 | + /** primary phone number, international representation */ |
| 29 | + phone: string; |
| 30 | + /** verification code sent by email */ |
| 31 | + code?: string; |
| 32 | + }, |
| 33 | + params?: RequestParams, |
| 34 | + ) => Promise< |
| 35 | + HttpResponse< |
| 36 | + { |
| 37 | + /** pending or done */ |
| 38 | + status?: string; |
| 39 | + }, |
| 40 | + Error |
| 41 | + > |
| 42 | + >; |
| 43 | + /** |
| 44 | + * @description Register a new ID `JWT(sub, devtoken)` v5: `JWT(sub, pk, devtoken, ...)` See: https://github.com/skion/authentiq/wiki/JWT-Examples |
| 45 | + * |
| 46 | + * @tags key, post |
| 47 | + * @name KeyRegister |
| 48 | + * @request POST:/key |
| 49 | + */ |
| 50 | + keyRegister: ( |
| 51 | + body: AuthentiqID, |
| 52 | + params?: RequestParams, |
| 53 | + ) => Promise< |
| 54 | + HttpResponse< |
| 55 | + { |
| 56 | + /** revoke key */ |
| 57 | + secret?: string; |
| 58 | + /** registered */ |
| 59 | + status?: string; |
| 60 | + }, |
| 61 | + Error |
| 62 | + > |
| 63 | + >; |
| 64 | + /** |
| 65 | + * @description Revoke an Identity (Key) with a revocation secret |
| 66 | + * |
| 67 | + * @tags key, delete |
| 68 | + * @name KeyRevoke |
| 69 | + * @request DELETE:/key/{PK} |
| 70 | + */ |
| 71 | + keyRevoke: ( |
| 72 | + pk: string, |
| 73 | + query: { |
| 74 | + /** revokation secret */ |
| 75 | + secret: string; |
| 76 | + }, |
| 77 | + params?: RequestParams, |
| 78 | + ) => Promise< |
| 79 | + HttpResponse< |
| 80 | + { |
| 81 | + /** done */ |
| 82 | + status?: string; |
| 83 | + }, |
| 84 | + Error |
| 85 | + > |
| 86 | + >; |
| 87 | + /** |
| 88 | + * @description Get public details of an Authentiq ID. |
| 89 | + * |
| 90 | + * @tags key, get |
| 91 | + * @name GetKey |
| 92 | + * @request GET:/key/{PK} |
| 93 | + */ |
| 94 | + getKey: ( |
| 95 | + pk: string, |
| 96 | + params?: RequestParams, |
| 97 | + ) => Promise< |
| 98 | + HttpResponse< |
| 99 | + { |
| 100 | + /** @format date-time */ |
| 101 | + since?: string; |
| 102 | + status?: string; |
| 103 | + /** base64safe encoded public signing key */ |
| 104 | + sub?: string; |
| 105 | + }, |
| 106 | + Error |
| 107 | + > |
| 108 | + >; |
| 109 | + /** |
| 110 | + * @description HEAD info on Authentiq ID |
| 111 | + * |
| 112 | + * @tags key, head |
| 113 | + * @name HeadKey |
| 114 | + * @request HEAD:/key/{PK} |
| 115 | + */ |
| 116 | + headKey: (pk: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>; |
| 117 | + /** |
| 118 | + * @description update properties of an Authentiq ID. (not operational in v4; use PUT for now) v5: POST issuer-signed email & phone scopes in a self-signed JWT See: https://github.com/skion/authentiq/wiki/JWT-Examples |
| 119 | + * |
| 120 | + * @tags key, post |
| 121 | + * @name KeyUpdate |
| 122 | + * @request POST:/key/{PK} |
| 123 | + */ |
| 124 | + keyUpdate: ( |
| 125 | + pk: string, |
| 126 | + body: AuthentiqID, |
| 127 | + params?: RequestParams, |
| 128 | + ) => Promise< |
| 129 | + HttpResponse< |
| 130 | + { |
| 131 | + /** confirmed */ |
| 132 | + status?: string; |
| 133 | + }, |
| 134 | + Error |
| 135 | + > |
| 136 | + >; |
| 137 | + /** |
| 138 | + * @description Update Authentiq ID by replacing the object. v4: `JWT(sub,email,phone)` to bind email/phone hash; v5: POST issuer-signed email & phone scopes and PUT to update registration `JWT(sub, pk, devtoken, ...)` See: https://github.com/skion/authentiq/wiki/JWT-Examples |
| 139 | + * |
| 140 | + * @tags key, put |
| 141 | + * @name KeyBind |
| 142 | + * @request PUT:/key/{PK} |
| 143 | + */ |
| 144 | + keyBind: ( |
| 145 | + pk: string, |
| 146 | + body: AuthentiqID, |
| 147 | + params?: RequestParams, |
| 148 | + ) => Promise< |
| 149 | + HttpResponse< |
| 150 | + { |
| 151 | + /** confirmed */ |
| 152 | + status?: string; |
| 153 | + }, |
| 154 | + Error |
| 155 | + > |
| 156 | + >; |
| 157 | +} |
0 commit comments