forked from acacode/swagger-typescript-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
route-types.ts
216 lines (212 loc) · 7.17 KB
/
route-types.ts
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
/* eslint-disable */
/* tslint:disable */
/*
* ---------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
* ## ##
* ## AUTHOR: acacode ##
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
* ---------------------------------------------------------------
*/
import { AuthentiqID, Claims, PushToken } from "./data-contracts";
export namespace key {
/**
* @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.
* @tags key, delete
* @name KeyRevokeNosecret
* @request DELETE:/key
*/
export namespace KeyRevokeNosecret {
export type RequestParams = {};
export type RequestQuery = { email: string; phone: string; code?: string };
export type RequestBody = never;
export type RequestHeaders = {};
export type ResponseBody = { status?: string };
}
/**
* @description Register a new ID `JWT(sub, devtoken)` v5: `JWT(sub, pk, devtoken, ...)` See: https://github.com/skion/authentiq/wiki/JWT-Examples
* @tags key, post
* @name KeyRegister
* @request POST:/key
*/
export namespace KeyRegister {
export type RequestParams = {};
export type RequestQuery = {};
export type RequestBody = AuthentiqID;
export type RequestHeaders = {};
export type ResponseBody = { secret?: string; status?: string };
}
/**
* @description Revoke an Identity (Key) with a revocation secret
* @tags key, delete
* @name KeyRevoke
* @request DELETE:/key/{PK}
*/
export namespace KeyRevoke {
export type RequestParams = { pk: string };
export type RequestQuery = { secret: string };
export type RequestBody = never;
export type RequestHeaders = {};
export type ResponseBody = { status?: string };
}
/**
* @description Get public details of an Authentiq ID.
* @tags key, get
* @name GetKey
* @request GET:/key/{PK}
*/
export namespace GetKey {
export type RequestParams = { pk: string };
export type RequestQuery = {};
export type RequestBody = never;
export type RequestHeaders = {};
export type ResponseBody = { since?: string; status?: string; sub?: string };
}
/**
* @description HEAD info on Authentiq ID
* @tags key, head
* @name HeadKey
* @request HEAD:/key/{PK}
*/
export namespace HeadKey {
export type RequestParams = { pk: string };
export type RequestQuery = {};
export type RequestBody = never;
export type RequestHeaders = {};
export type ResponseBody = void;
}
/**
* @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
* @tags key, post
* @name KeyUpdate
* @request POST:/key/{PK}
*/
export namespace KeyUpdate {
export type RequestParams = { pk: string };
export type RequestQuery = {};
export type RequestBody = AuthentiqID;
export type RequestHeaders = {};
export type ResponseBody = { status?: string };
}
/**
* @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
* @tags key, put
* @name KeyBind
* @request PUT:/key/{PK}
*/
export namespace KeyBind {
export type RequestParams = { pk: string };
export type RequestQuery = {};
export type RequestBody = AuthentiqID;
export type RequestHeaders = {};
export type ResponseBody = { status?: string };
}
}
export namespace login {
/**
* @description push sign-in request See: https://github.com/skion/authentiq/wiki/JWT-Examples
* @tags login, post
* @name PushLoginRequest
* @request POST:/login
*/
export namespace PushLoginRequest {
export type RequestParams = {};
export type RequestQuery = { callback: string };
export type RequestBody = PushToken;
export type RequestHeaders = {};
export type ResponseBody = { status?: string };
}
/**
* @description Get a current key register
* @tags key, get
* @name KeyRegister
* @request GET:/login
*/
export namespace KeyRegister {
export type RequestParams = {};
export type RequestQuery = {};
export type RequestBody = never;
export type RequestHeaders = {};
export type ResponseBody = { secret?: string; status?: string };
}
}
export namespace scope {
/**
* @description scope verification request See: https://github.com/skion/authentiq/wiki/JWT-Examples
* @tags scope, post
* @name SignRequest
* @request POST:/scope
*/
export namespace SignRequest {
export type RequestParams = {};
export type RequestQuery = { test?: number };
export type RequestBody = Claims;
export type RequestHeaders = {};
export type ResponseBody = { job?: string; status?: string };
}
/**
* @description delete a verification job
* @tags scope, delete
* @name SignDelete
* @request DELETE:/scope/{job}
*/
export namespace SignDelete {
export type RequestParams = { job: string };
export type RequestQuery = {};
export type RequestBody = never;
export type RequestHeaders = {};
export type ResponseBody = { status?: string };
}
/**
* @description get the status / current content of a verification job
* @tags scope, get
* @name SignRetrieve
* @request GET:/scope/{job}
*/
export namespace SignRetrieve {
export type RequestParams = { job: string };
export type RequestQuery = {};
export type RequestBody = never;
export type RequestHeaders = {};
export type ResponseBody = { exp?: number; field?: string; sub?: string };
}
/**
* @description HEAD to get the status of a verification job
* @tags scope, head
* @name SignRetrieveHead
* @request HEAD:/scope/{job}
*/
export namespace SignRetrieveHead {
export type RequestParams = { job: string };
export type RequestQuery = {};
export type RequestBody = never;
export type RequestHeaders = {};
export type ResponseBody = void;
}
/**
* @description this is a scope confirmation
* @tags scope, post
* @name SignConfirm
* @request POST:/scope/{job}
*/
export namespace SignConfirm {
export type RequestParams = { job: string };
export type RequestQuery = {};
export type RequestBody = never;
export type RequestHeaders = {};
export type ResponseBody = { status?: string };
}
/**
* @description authority updates a JWT with its signature See: https://github.com/skion/authentiq/wiki/JWT-Examples
* @tags scope, put
* @name SignUpdate
* @request PUT:/scope/{job}
*/
export namespace SignUpdate {
export type RequestParams = { job: string };
export type RequestQuery = {};
export type RequestBody = never;
export type RequestHeaders = {};
export type ResponseBody = { jwt?: string; status?: string };
}
}