@kne/fastify-account 1.0.0-alpha.14 → 1.0.0-alpha.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,7 +22,7 @@ npm i --save @kne/fastify-account
22
22
  ### API
23
23
 
24
24
  ---
25
- title: "@kne/fastify-account v1.0.0-alpha.13"
25
+ title: "@kne/fastify-account v1.0.0-alpha.15"
26
26
  language_tabs:
27
27
  - shell: Shell
28
28
  - http: HTTP
@@ -42,7 +42,7 @@ headingLevel: 2
42
42
 
43
43
  <!-- Generator: Widdershins v4.0.1 -->
44
44
 
45
- <h1 id="-kne-fastify-account">@kne/fastify-account v1.0.0-alpha.13</h1>
45
+ <h1 id="-kne-fastify-account">@kne/fastify-account v1.0.0-alpha.15</h1>
46
46
 
47
47
  > Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
48
48
 
@@ -50,26 +50,11 @@ fastify的用户管理账号等实现
50
50
 
51
51
  <h1 id="-kne-fastify-account-default">Default</h1>
52
52
 
53
- ## post__api_v1_account_admin_addUser
54
-
55
- `POST /api/v1/account/admin/addUser`
56
-
57
- > Body parameter
58
-
59
- ```json
60
- {
61
- "type": "object",
62
- "properties": {}
63
- }
64
- ```
53
+ ## post__api_v1_account_admin_parsePermissionList
65
54
 
66
- <h3 id="post__api_v1_account_admin_adduser-parameters">Parameters</h3>
67
-
68
- |Name|In|Type|Required|Description|
69
- |---|---|---|---|---|
70
- |body|body|object|false|none|
55
+ `POST /api/v1/account/admin/parsePermissionList`
71
56
 
72
- <h3 id="post__api_v1_account_admin_adduser-responses">Responses</h3>
57
+ <h3 id="post__api_v1_account_admin_parsepermissionlist-responses">Responses</h3>
73
58
 
74
59
  |Status|Meaning|Description|Schema|
75
60
  |---|---|---|---|
@@ -79,18 +64,20 @@ fastify的用户管理账号等实现
79
64
  This operation does not require authentication
80
65
  </aside>
81
66
 
82
- ## get__api_v1_account_admin_getAllUserList
67
+ ## get__api_v1_account_admin_getRoleList
83
68
 
84
- `GET /api/v1/account/admin/getAllUserList`
69
+ `GET /api/v1/account/admin/getRoleList`
85
70
 
86
- <h3 id="get__api_v1_account_admin_getalluserlist-parameters">Parameters</h3>
71
+ <h3 id="get__api_v1_account_admin_getrolelist-parameters">Parameters</h3>
87
72
 
88
73
  |Name|In|Type|Required|Description|
89
74
  |---|---|---|---|---|
75
+ |tenantId|query|string|true|none|
90
76
  |perPage|query|number|false|none|
91
77
  |currentPage|query|number|false|none|
78
+ |filter|query|object|false|none|
92
79
 
93
- <h3 id="get__api_v1_account_admin_getalluserlist-responses">Responses</h3>
80
+ <h3 id="get__api_v1_account_admin_getrolelist-responses">Responses</h3>
94
81
 
95
82
  |Status|Meaning|Description|Schema|
96
83
  |---|---|---|---|
@@ -100,9 +87,9 @@ This operation does not require authentication
100
87
  This operation does not require authentication
101
88
  </aside>
102
89
 
103
- ## post__api_v1_account_admin_resetUserPassword
90
+ ## post__api_v1_account_admin_addRole
104
91
 
105
- `POST /api/v1/account/admin/resetUserPassword`
92
+ `POST /api/v1/account/admin/addRole`
106
93
 
107
94
  > Body parameter
108
95
 
@@ -110,29 +97,33 @@ This operation does not require authentication
110
97
  {
111
98
  "type": "object",
112
99
  "required": [
113
- "userId",
114
- "password"
100
+ "tenantId",
101
+ "name"
115
102
  ],
116
103
  "properties": {
117
- "password": {
104
+ "tenantId": {
118
105
  "type": "string"
119
106
  },
120
- "userId": {
107
+ "name": {
108
+ "type": "string"
109
+ },
110
+ "description": {
121
111
  "type": "string"
122
112
  }
123
113
  }
124
114
  }
125
115
  ```
126
116
 
127
- <h3 id="post__api_v1_account_admin_resetuserpassword-parameters">Parameters</h3>
117
+ <h3 id="post__api_v1_account_admin_addrole-parameters">Parameters</h3>
128
118
 
129
119
  |Name|In|Type|Required|Description|
130
120
  |---|---|---|---|---|
131
121
  |body|body|object|true|none|
132
- password|body|string|true|none|
133
- userId|body|string|true|none|
122
+ tenantId|body|string|true|none|
123
+ name|body|string|true|none|
124
+ |» description|body|string|false|none|
134
125
 
135
- <h3 id="post__api_v1_account_admin_resetuserpassword-responses">Responses</h3>
126
+ <h3 id="post__api_v1_account_admin_addrole-responses">Responses</h3>
136
127
 
137
128
  |Status|Meaning|Description|Schema|
138
129
  |---|---|---|---|
@@ -142,9 +133,9 @@ This operation does not require authentication
142
133
  This operation does not require authentication
143
134
  </aside>
144
135
 
145
- ## post__api_v1_account_admin_saveUser
136
+ ## post__api_v1_account_admin_saveRole
146
137
 
147
- `POST /api/v1/account/admin/saveUser`
138
+ `POST /api/v1/account/admin/saveRole`
148
139
 
149
140
  > Body parameter
150
141
 
@@ -152,22 +143,14 @@ This operation does not require authentication
152
143
  {
153
144
  "type": "object",
154
145
  "required": [
146
+ "name",
155
147
  "id"
156
148
  ],
157
149
  "properties": {
158
150
  "id": {
159
- "type": "string"
160
- },
161
- "avatar": {
162
- "type": "string"
163
- },
164
- "nickname": {
165
- "type": "string"
166
- },
167
- "phone": {
168
- "type": "string"
151
+ "type": "number"
169
152
  },
170
- "email": {
153
+ "name": {
171
154
  "type": "string"
172
155
  },
173
156
  "description": {
@@ -177,19 +160,16 @@ This operation does not require authentication
177
160
  }
178
161
  ```
179
162
 
180
- <h3 id="post__api_v1_account_admin_saveuser-parameters">Parameters</h3>
163
+ <h3 id="post__api_v1_account_admin_saverole-parameters">Parameters</h3>
181
164
 
182
165
  |Name|In|Type|Required|Description|
183
166
  |---|---|---|---|---|
184
167
  |body|body|object|true|none|
185
- |» id|body|string|true|none|
186
- avatar|body|string|false|none|
187
- |» nickname|body|string|false|none|
188
- |» phone|body|string|false|none|
189
- |» email|body|string|false|none|
168
+ |» id|body|number|true|none|
169
+ name|body|string|true|none|
190
170
  |» description|body|string|false|none|
191
171
 
192
- <h3 id="post__api_v1_account_admin_saveuser-responses">Responses</h3>
172
+ <h3 id="post__api_v1_account_admin_saverole-responses">Responses</h3>
193
173
 
194
174
  |Status|Meaning|Description|Schema|
195
175
  |---|---|---|---|
@@ -199,9 +179,9 @@ This operation does not require authentication
199
179
  This operation does not require authentication
200
180
  </aside>
201
181
 
202
- ## post__api_v1_account_admin_closeUser
182
+ ## post__api_v1_account_admin_removeRole
203
183
 
204
- `POST /api/v1/account/admin/closeUser`
184
+ `POST /api/v1/account/admin/removeRole`
205
185
 
206
186
  > Body parameter
207
187
 
@@ -213,20 +193,20 @@ This operation does not require authentication
213
193
  ],
214
194
  "properties": {
215
195
  "id": {
216
- "type": "string"
196
+ "type": "number"
217
197
  }
218
198
  }
219
199
  }
220
200
  ```
221
201
 
222
- <h3 id="post__api_v1_account_admin_closeuser-parameters">Parameters</h3>
202
+ <h3 id="post__api_v1_account_admin_removerole-parameters">Parameters</h3>
223
203
 
224
204
  |Name|In|Type|Required|Description|
225
205
  |---|---|---|---|---|
226
206
  |body|body|object|true|none|
227
- |» id|body|string|true|none|
207
+ |» id|body|number|true|none|
228
208
 
229
- <h3 id="post__api_v1_account_admin_closeuser-responses">Responses</h3>
209
+ <h3 id="post__api_v1_account_admin_removerole-responses">Responses</h3>
230
210
 
231
211
  |Status|Meaning|Description|Schema|
232
212
  |---|---|---|---|
@@ -236,34 +216,55 @@ This operation does not require authentication
236
216
  This operation does not require authentication
237
217
  </aside>
238
218
 
239
- ## post__api_v1_account_admin_openUser
219
+ ## get__api_v1_account_admin_getRolePermissionList
240
220
 
241
- `POST /api/v1/account/admin/openUser`
221
+ `GET /api/v1/account/admin/getRolePermissionList`
242
222
 
243
- > Body parameter
223
+ <h3 id="get__api_v1_account_admin_getrolepermissionlist-parameters">Parameters</h3>
244
224
 
245
- ```json
246
- {
247
- "type": "object",
248
- "required": [
249
- "id"
250
- ],
251
- "properties": {
252
- "id": {
253
- "type": "string"
254
- }
255
- }
256
- }
257
- ```
225
+ |Name|In|Type|Required|Description|
226
+ |---|---|---|---|---|
227
+ |id|query|number|true|none|
258
228
 
259
- <h3 id="post__api_v1_account_admin_openuser-parameters">Parameters</h3>
229
+ <h3 id="get__api_v1_account_admin_getrolepermissionlist-responses">Responses</h3>
230
+
231
+ |Status|Meaning|Description|Schema|
232
+ |---|---|---|---|
233
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
234
+
235
+ <aside class="success">
236
+ This operation does not require authentication
237
+ </aside>
238
+
239
+ ## post__api_v1_account_admin_saveRolePermissionList
240
+
241
+ `POST /api/v1/account/admin/saveRolePermissionList`
242
+
243
+ <h3 id="post__api_v1_account_admin_saverolepermissionlist-responses">Responses</h3>
244
+
245
+ |Status|Meaning|Description|Schema|
246
+ |---|---|---|---|
247
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
248
+
249
+ <aside class="success">
250
+ This operation does not require authentication
251
+ </aside>
252
+
253
+ ## get__api_v1_account_admin_getAllTenantList
254
+
255
+ `GET /api/v1/account/admin/getAllTenantList`
256
+
257
+ <h3 id="get__api_v1_account_admin_getalltenantlist-parameters">Parameters</h3>
260
258
 
261
259
  |Name|In|Type|Required|Description|
262
260
  |---|---|---|---|---|
263
- |body|body|object|true|none|
264
- |» id|body|string|true|none|
261
+ |name|query|string|false|none|
262
+ |serviceStartTime|query|string(date-time)|false|none|
263
+ |serviceEndTime|query|string(date-time)|false|none|
264
+ |perPage|query|number|false|none|
265
+ |currentPage|query|number|false|none|
265
266
 
266
- <h3 id="post__api_v1_account_admin_openuser-responses">Responses</h3>
267
+ <h3 id="get__api_v1_account_admin_getalltenantlist-responses">Responses</h3>
267
268
 
268
269
  |Status|Meaning|Description|Schema|
269
270
  |---|---|---|---|
@@ -273,9 +274,29 @@ This operation does not require authentication
273
274
  This operation does not require authentication
274
275
  </aside>
275
276
 
276
- ## post__api_v1_account_admin_saveApplication
277
+ ## get__api_v1_account_admin_getTenantInfo
277
278
 
278
- `POST /api/v1/account/admin/saveApplication`
279
+ `GET /api/v1/account/admin/getTenantInfo`
280
+
281
+ <h3 id="get__api_v1_account_admin_gettenantinfo-parameters">Parameters</h3>
282
+
283
+ |Name|In|Type|Required|Description|
284
+ |---|---|---|---|---|
285
+ |id|query|string|false|none|
286
+
287
+ <h3 id="get__api_v1_account_admin_gettenantinfo-responses">Responses</h3>
288
+
289
+ |Status|Meaning|Description|Schema|
290
+ |---|---|---|---|
291
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
292
+
293
+ <aside class="success">
294
+ This operation does not require authentication
295
+ </aside>
296
+
297
+ ## post__api_v1_account_admin_addTenant
298
+
299
+ `POST /api/v1/account/admin/addTenant`
279
300
 
280
301
  > Body parameter
281
302
 
@@ -283,46 +304,41 @@ This operation does not require authentication
283
304
  {
284
305
  "type": "object",
285
306
  "required": [
286
- "id",
287
307
  "name",
288
- "code"
308
+ "accountNumber",
309
+ "serviceStartTime",
310
+ "serviceEndTime"
289
311
  ],
290
312
  "properties": {
291
- "id": {
292
- "type": "string"
293
- },
294
- "url": {
295
- "type": "string"
296
- },
297
313
  "name": {
298
314
  "type": "string"
299
315
  },
300
- "avatar": {
301
- "type": "string"
316
+ "accountNumber": {
317
+ "type": "number"
302
318
  },
303
- "code": {
304
- "type": "string"
319
+ "serviceStartTime": {
320
+ "type": "string",
321
+ "format": "date-time"
305
322
  },
306
- "description": {
307
- "type": "string"
323
+ "serviceEndTime": {
324
+ "type": "string",
325
+ "format": "date-time"
308
326
  }
309
327
  }
310
328
  }
311
329
  ```
312
330
 
313
- <h3 id="post__api_v1_account_admin_saveapplication-parameters">Parameters</h3>
331
+ <h3 id="post__api_v1_account_admin_addtenant-parameters">Parameters</h3>
314
332
 
315
333
  |Name|In|Type|Required|Description|
316
334
  |---|---|---|---|---|
317
335
  |body|body|object|true|none|
318
- |» id|body|string|true|none|
319
- |» url|body|string|false|none|
320
336
  |» name|body|string|true|none|
321
- avatar|body|string|false|none|
322
- code|body|string|true|none|
323
- description|body|string|false|none|
337
+ accountNumber|body|number|true|none|
338
+ serviceStartTime|body|string(date-time)|true|none|
339
+ serviceEndTime|body|string(date-time)|true|none|
324
340
 
325
- <h3 id="post__api_v1_account_admin_saveapplication-responses">Responses</h3>
341
+ <h3 id="post__api_v1_account_admin_addtenant-responses">Responses</h3>
326
342
 
327
343
  |Status|Meaning|Description|Schema|
328
344
  |---|---|---|---|
@@ -332,9 +348,9 @@ This operation does not require authentication
332
348
  This operation does not require authentication
333
349
  </aside>
334
350
 
335
- ## post__api_v1_account_admin_deleteApplication
351
+ ## post__api_v1_account_admin_saveTenant
336
352
 
337
- `POST /api/v1/account/admin/deleteApplication`
353
+ `POST /api/v1/account/admin/saveTenant`
338
354
 
339
355
  > Body parameter
340
356
 
@@ -342,24 +358,46 @@ This operation does not require authentication
342
358
  {
343
359
  "type": "object",
344
360
  "required": [
345
- "id"
361
+ "id",
362
+ "name",
363
+ "accountNumber",
364
+ "serviceStartTime",
365
+ "serviceEndTime"
346
366
  ],
347
367
  "properties": {
348
368
  "id": {
349
369
  "type": "string"
370
+ },
371
+ "name": {
372
+ "type": "string"
373
+ },
374
+ "accountNumber": {
375
+ "type": "number"
376
+ },
377
+ "serviceStartTime": {
378
+ "type": "string",
379
+ "format": "date-time"
380
+ },
381
+ "serviceEndTime": {
382
+ "type": "string",
383
+ "format": "date-time"
350
384
  }
351
385
  }
352
386
  }
353
387
  ```
354
388
 
355
- <h3 id="post__api_v1_account_admin_deleteapplication-parameters">Parameters</h3>
389
+ <h3 id="post__api_v1_account_admin_savetenant-parameters">Parameters</h3>
356
390
 
357
391
  |Name|In|Type|Required|Description|
358
392
  |---|---|---|---|---|
359
393
  |body|body|object|true|none|
360
394
  |» id|body|string|true|none|
395
+ |» name|body|string|true|none|
396
+ |» accountNumber|body|number|true|none|
397
+ |» serviceStartTime|body|string(date-time)|true|none|
398
+ |» serviceEndTime|body|string(date-time)|true|none|
361
399
 
362
- <h3 id="post__api_v1_account_admin_deleteapplication-responses">Responses</h3>
400
+ <h3 id="post__api_v1_account_admin_savetenant-responses">Responses</h3>
363
401
 
364
402
  |Status|Meaning|Description|Schema|
365
403
  |---|---|---|---|
@@ -369,17 +407,31 @@ This operation does not require authentication
369
407
  This operation does not require authentication
370
408
  </aside>
371
409
 
372
- ## get__api_v1_account_admin_getApplicationList
410
+ ## post__api_v1_account_admin_tenant_addOrg
373
411
 
374
- `GET /api/v1/account/admin/getApplicationList`
412
+ `POST /api/v1/account/admin/tenant/addOrg`
375
413
 
376
- <h3 id="get__api_v1_account_admin_getapplicationlist-parameters">Parameters</h3>
414
+ <h3 id="post__api_v1_account_admin_tenant_addorg-responses">Responses</h3>
377
415
 
378
- |Name|In|Type|Required|Description|
379
- |---|---|---|---|---|
380
- |tenantId|query|string|false|none|
416
+ |Status|Meaning|Description|Schema|
417
+ |---|---|---|---|
418
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
381
419
 
382
- <h3 id="get__api_v1_account_admin_getapplicationlist-responses">Responses</h3>
420
+ <aside class="success">
421
+ This operation does not require authentication
422
+ </aside>
423
+
424
+ ## get__api_v1_account_admin_tenant_orgList
425
+
426
+ `GET /api/v1/account/admin/tenant/orgList`
427
+
428
+ <h3 id="get__api_v1_account_admin_tenant_orglist-parameters">Parameters</h3>
429
+
430
+ |Name|In|Type|Required|Description|
431
+ |---|---|---|---|---|
432
+ |id|query|string|false|none|
433
+
434
+ <h3 id="get__api_v1_account_admin_tenant_orglist-responses">Responses</h3>
383
435
 
384
436
  |Status|Meaning|Description|Schema|
385
437
  |---|---|---|---|
@@ -389,64 +441,25 @@ This operation does not require authentication
389
441
  This operation does not require authentication
390
442
  </aside>
391
443
 
392
- ## post__api_v1_account_admin_addPermission
444
+ ## post__api_v1_account_admin_tenant_editOrg
393
445
 
394
- `POST /api/v1/account/admin/addPermission`
446
+ `POST /api/v1/account/admin/tenant/editOrg`
395
447
 
396
- > Body parameter
448
+ <h3 id="post__api_v1_account_admin_tenant_editorg-responses">Responses</h3>
397
449
 
398
- ```json
399
- {
400
- "type": "object",
401
- "required": [
402
- "applicationId",
403
- "name",
404
- "code"
405
- ],
406
- "properties": {
407
- "applicationId": {
408
- "type": "string"
409
- },
410
- "name": {
411
- "type": "string"
412
- },
413
- "code": {
414
- "type": "string"
415
- },
416
- "type": {
417
- "type": "number"
418
- },
419
- "isModule": {
420
- "type": "number"
421
- },
422
- "isMust": {
423
- "type": "number"
424
- },
425
- "pid": {
426
- "type": "number"
427
- },
428
- "description": {
429
- "type": "string"
430
- }
431
- }
432
- }
433
- ```
450
+ |Status|Meaning|Description|Schema|
451
+ |---|---|---|---|
452
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
434
453
 
435
- <h3 id="post__api_v1_account_admin_addpermission-parameters">Parameters</h3>
454
+ <aside class="success">
455
+ This operation does not require authentication
456
+ </aside>
436
457
 
437
- |Name|In|Type|Required|Description|
438
- |---|---|---|---|---|
439
- |body|body|object|true|none|
440
- |» applicationId|body|string|true|none|
441
- |» name|body|string|true|none|
442
- |» code|body|string|true|none|
443
- |» type|body|number|false|none|
444
- |» isModule|body|number|false|none|
445
- |» isMust|body|number|false|none|
446
- |» pid|body|number|false|none|
447
- |» description|body|string|false|none|
458
+ ## post__api_v1_account_admin_tenant_removeOrg
448
459
 
449
- <h3 id="post__api_v1_account_admin_addpermission-responses">Responses</h3>
460
+ `POST /api/v1/account/admin/tenant/removeOrg`
461
+
462
+ <h3 id="post__api_v1_account_admin_tenant_removeorg-responses">Responses</h3>
450
463
 
451
464
  |Status|Meaning|Description|Schema|
452
465
  |---|---|---|---|
@@ -456,18 +469,20 @@ This operation does not require authentication
456
469
  This operation does not require authentication
457
470
  </aside>
458
471
 
459
- ## get__api_v1_account_admin_getPermissionList
472
+ ## get__api_v1_account_admin_getTenantUserList
460
473
 
461
- `GET /api/v1/account/admin/getPermissionList`
474
+ `GET /api/v1/account/admin/getTenantUserList`
462
475
 
463
- <h3 id="get__api_v1_account_admin_getpermissionlist-parameters">Parameters</h3>
476
+ <h3 id="get__api_v1_account_admin_gettenantuserlist-parameters">Parameters</h3>
464
477
 
465
478
  |Name|In|Type|Required|Description|
466
479
  |---|---|---|---|---|
467
- |applicationId|query|string|true|none|
468
480
  |tenantId|query|string|false|none|
481
+ |filter|query|object|false|none|
482
+ |currentPage|query|number|false|none|
483
+ |perPage|query|number|false|none|
469
484
 
470
- <h3 id="get__api_v1_account_admin_getpermissionlist-responses">Responses</h3>
485
+ <h3 id="get__api_v1_account_admin_gettenantuserlist-responses">Responses</h3>
471
486
 
472
487
  |Status|Meaning|Description|Schema|
473
488
  |---|---|---|---|
@@ -477,9 +492,9 @@ This operation does not require authentication
477
492
  This operation does not require authentication
478
493
  </aside>
479
494
 
480
- ## post__api_v1_account_admin_deletePermission
495
+ ## post__api_v1_account_admin_addTenantUser
481
496
 
482
- `POST /api/v1/account/admin/deletePermission`
497
+ `POST /api/v1/account/admin/addTenantUser`
483
498
 
484
499
  > Body parameter
485
500
 
@@ -487,24 +502,66 @@ This operation does not require authentication
487
502
  {
488
503
  "type": "object",
489
504
  "required": [
490
- "id"
505
+ "tenantId",
506
+ "userId",
507
+ "name"
491
508
  ],
492
509
  "properties": {
493
- "id": {
510
+ "tenantId": {
511
+ "type": "string"
512
+ },
513
+ "roleIds": {
514
+ "type": "array",
515
+ "items": {
516
+ "type": "number"
517
+ },
518
+ "default": []
519
+ },
520
+ "orgIds": {
521
+ "type": "array",
522
+ "items": {
523
+ "type": "number"
524
+ },
525
+ "default": []
526
+ },
527
+ "userId": {
528
+ "type": "string"
529
+ },
530
+ "name": {
531
+ "type": "string"
532
+ },
533
+ "avatar": {
534
+ "type": "string"
535
+ },
536
+ "phone": {
537
+ "type": "string"
538
+ },
539
+ "email": {
540
+ "type": "string"
541
+ },
542
+ "description": {
494
543
  "type": "string"
495
544
  }
496
545
  }
497
546
  }
498
547
  ```
499
548
 
500
- <h3 id="post__api_v1_account_admin_deletepermission-parameters">Parameters</h3>
549
+ <h3 id="post__api_v1_account_admin_addtenantuser-parameters">Parameters</h3>
501
550
 
502
551
  |Name|In|Type|Required|Description|
503
552
  |---|---|---|---|---|
504
553
  |body|body|object|true|none|
505
- id|body|string|true|none|
554
+ tenantId|body|string|true|none|
555
+ |» roleIds|body|[number]|false|none|
556
+ |» orgIds|body|[number]|false|none|
557
+ |» userId|body|string|true|none|
558
+ |» name|body|string|true|none|
559
+ |» avatar|body|string|false|none|
560
+ |» phone|body|string|false|none|
561
+ |» email|body|string|false|none|
562
+ |» description|body|string|false|none|
506
563
 
507
- <h3 id="post__api_v1_account_admin_deletepermission-responses">Responses</h3>
564
+ <h3 id="post__api_v1_account_admin_addtenantuser-responses">Responses</h3>
508
565
 
509
566
  |Status|Meaning|Description|Schema|
510
567
  |---|---|---|---|
@@ -514,9 +571,9 @@ This operation does not require authentication
514
571
  This operation does not require authentication
515
572
  </aside>
516
573
 
517
- ## post__api_v1_account_admin_savePermission
574
+ ## post__api_v1_account_admin_saveTenantUser
518
575
 
519
- `POST /api/v1/account/admin/savePermission`
576
+ `POST /api/v1/account/admin/saveTenantUser`
520
577
 
521
578
  > Body parameter
522
579
 
@@ -524,20 +581,38 @@ This operation does not require authentication
524
581
  {
525
582
  "type": "object",
526
583
  "required": [
527
- "id"
584
+ "tenantId",
585
+ "name"
528
586
  ],
529
587
  "properties": {
530
- "id": {
588
+ "tenantId": {
531
589
  "type": "string"
532
590
  },
591
+ "roleIds": {
592
+ "type": "array",
593
+ "items": {
594
+ "type": "number"
595
+ },
596
+ "default": []
597
+ },
598
+ "orgIds": {
599
+ "type": "array",
600
+ "items": {
601
+ "type": "number"
602
+ },
603
+ "default": []
604
+ },
533
605
  "name": {
534
606
  "type": "string"
535
607
  },
536
- "type": {
537
- "type": "number"
608
+ "avatar": {
609
+ "type": "string"
538
610
  },
539
- "isMust": {
540
- "type": "number"
611
+ "phone": {
612
+ "type": "string"
613
+ },
614
+ "email": {
615
+ "type": "string"
541
616
  },
542
617
  "description": {
543
618
  "type": "string"
@@ -546,18 +621,21 @@ This operation does not require authentication
546
621
  }
547
622
  ```
548
623
 
549
- <h3 id="post__api_v1_account_admin_savepermission-parameters">Parameters</h3>
624
+ <h3 id="post__api_v1_account_admin_savetenantuser-parameters">Parameters</h3>
550
625
 
551
626
  |Name|In|Type|Required|Description|
552
627
  |---|---|---|---|---|
553
628
  |body|body|object|true|none|
554
- id|body|string|true|none|
555
- name|body|string|false|none|
556
- type|body|number|false|none|
557
- isMust|body|number|false|none|
629
+ tenantId|body|string|true|none|
630
+ roleIds|body|[number]|false|none|
631
+ orgIds|body|[number]|false|none|
632
+ name|body|string|true|none|
633
+ |» avatar|body|string|false|none|
634
+ |» phone|body|string|false|none|
635
+ |» email|body|string|false|none|
558
636
  |» description|body|string|false|none|
559
637
 
560
- <h3 id="post__api_v1_account_admin_savepermission-responses">Responses</h3>
638
+ <h3 id="post__api_v1_account_admin_savetenantuser-responses">Responses</h3>
561
639
 
562
640
  |Status|Meaning|Description|Schema|
563
641
  |---|---|---|---|
@@ -567,9 +645,9 @@ This operation does not require authentication
567
645
  This operation does not require authentication
568
646
  </aside>
569
647
 
570
- ## post__api_v1_account_admin_saveTenantPermissionList
648
+ ## post__api_v1_account_admin_deleteTenantUser
571
649
 
572
- `POST /api/v1/account/admin/saveTenantPermissionList`
650
+ `POST /api/v1/account/admin/deleteTenantUser`
573
651
 
574
652
  > Body parameter
575
653
 
@@ -578,39 +656,28 @@ This operation does not require authentication
578
656
  "type": "object",
579
657
  "required": [
580
658
  "tenantId",
581
- "applications",
582
- "permissions"
659
+ "tenantUserId"
583
660
  ],
584
661
  "properties": {
585
662
  "tenantId": {
586
663
  "type": "string"
587
664
  },
588
- "applications": {
589
- "type": "array",
590
- "items": {
591
- "type": "string"
592
- }
593
- },
594
- "permissions": {
595
- "type": "array",
596
- "items": {
597
- "type": "number"
598
- }
665
+ "tenantUserId": {
666
+ "type": "string"
599
667
  }
600
668
  }
601
669
  }
602
670
  ```
603
671
 
604
- <h3 id="post__api_v1_account_admin_savetenantpermissionlist-parameters">Parameters</h3>
672
+ <h3 id="post__api_v1_account_admin_deletetenantuser-parameters">Parameters</h3>
605
673
 
606
674
  |Name|In|Type|Required|Description|
607
675
  |---|---|---|---|---|
608
676
  |body|body|object|true|none|
609
677
  |» tenantId|body|string|true|none|
610
- applications|body|[string]|true|none|
611
- |» permissions|body|[number]|true|none|
678
+ tenantUserId|body|string|true|none|
612
679
 
613
- <h3 id="post__api_v1_account_admin_savetenantpermissionlist-responses">Responses</h3>
680
+ <h3 id="post__api_v1_account_admin_deletetenantuser-responses">Responses</h3>
614
681
 
615
682
  |Status|Meaning|Description|Schema|
616
683
  |---|---|---|---|
@@ -620,17 +687,34 @@ This operation does not require authentication
620
687
  This operation does not require authentication
621
688
  </aside>
622
689
 
623
- ## get__api_v1_account_admin_getTenantPermissionList
690
+ ## post__api_v1_account_admin_closeTenant
624
691
 
625
- `GET /api/v1/account/admin/getTenantPermissionList`
692
+ `POST /api/v1/account/admin/closeTenant`
626
693
 
627
- <h3 id="get__api_v1_account_admin_gettenantpermissionlist-parameters">Parameters</h3>
694
+ > Body parameter
695
+
696
+ ```json
697
+ {
698
+ "type": "object",
699
+ "required": [
700
+ "tenantId"
701
+ ],
702
+ "properties": {
703
+ "tenantId": {
704
+ "type": "string"
705
+ }
706
+ }
707
+ }
708
+ ```
709
+
710
+ <h3 id="post__api_v1_account_admin_closetenant-parameters">Parameters</h3>
628
711
 
629
712
  |Name|In|Type|Required|Description|
630
713
  |---|---|---|---|---|
631
- |tenantId|query|string|true|none|
714
+ |body|body|object|true|none|
715
+ |» tenantId|body|string|true|none|
632
716
 
633
- <h3 id="get__api_v1_account_admin_gettenantpermissionlist-responses">Responses</h3>
717
+ <h3 id="post__api_v1_account_admin_closetenant-responses">Responses</h3>
634
718
 
635
719
  |Status|Meaning|Description|Schema|
636
720
  |---|---|---|---|
@@ -640,20 +724,34 @@ This operation does not require authentication
640
724
  This operation does not require authentication
641
725
  </aside>
642
726
 
643
- ## get__api_v1_account_admin_getRoleList
727
+ ## post__api_v1_account_admin_openTenant
644
728
 
645
- `GET /api/v1/account/admin/getRoleList`
729
+ `POST /api/v1/account/admin/openTenant`
646
730
 
647
- <h3 id="get__api_v1_account_admin_getrolelist-parameters">Parameters</h3>
731
+ > Body parameter
732
+
733
+ ```json
734
+ {
735
+ "type": "object",
736
+ "required": [
737
+ "tenantId"
738
+ ],
739
+ "properties": {
740
+ "tenantId": {
741
+ "type": "string"
742
+ }
743
+ }
744
+ }
745
+ ```
746
+
747
+ <h3 id="post__api_v1_account_admin_opentenant-parameters">Parameters</h3>
648
748
 
649
749
  |Name|In|Type|Required|Description|
650
750
  |---|---|---|---|---|
651
- |tenantId|query|string|true|none|
652
- |perPage|query|number|false|none|
653
- |currentPage|query|number|false|none|
654
- |filter|query|object|false|none|
751
+ |body|body|object|true|none|
752
+ |» tenantId|body|string|true|none|
655
753
 
656
- <h3 id="get__api_v1_account_admin_getrolelist-responses">Responses</h3>
754
+ <h3 id="post__api_v1_account_admin_opentenant-responses">Responses</h3>
657
755
 
658
756
  |Status|Meaning|Description|Schema|
659
757
  |---|---|---|---|
@@ -663,9 +761,9 @@ This operation does not require authentication
663
761
  This operation does not require authentication
664
762
  </aside>
665
763
 
666
- ## post__api_v1_account_admin_addRole
764
+ ## post__api_v1_account_admin_closeTenantUser
667
765
 
668
- `POST /api/v1/account/admin/addRole`
766
+ `POST /api/v1/account/admin/closeTenantUser`
669
767
 
670
768
  > Body parameter
671
769
 
@@ -674,32 +772,70 @@ This operation does not require authentication
674
772
  "type": "object",
675
773
  "required": [
676
774
  "tenantId",
677
- "name"
775
+ "tenantUserId"
678
776
  ],
679
777
  "properties": {
680
778
  "tenantId": {
681
779
  "type": "string"
682
780
  },
683
- "name": {
781
+ "tenantUserId": {
782
+ "type": "string"
783
+ }
784
+ }
785
+ }
786
+ ```
787
+
788
+ <h3 id="post__api_v1_account_admin_closetenantuser-parameters">Parameters</h3>
789
+
790
+ |Name|In|Type|Required|Description|
791
+ |---|---|---|---|---|
792
+ |body|body|object|true|none|
793
+ |» tenantId|body|string|true|none|
794
+ |» tenantUserId|body|string|true|none|
795
+
796
+ <h3 id="post__api_v1_account_admin_closetenantuser-responses">Responses</h3>
797
+
798
+ |Status|Meaning|Description|Schema|
799
+ |---|---|---|---|
800
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
801
+
802
+ <aside class="success">
803
+ This operation does not require authentication
804
+ </aside>
805
+
806
+ ## post__api_v1_account_admin_openTenantUser
807
+
808
+ `POST /api/v1/account/admin/openTenantUser`
809
+
810
+ > Body parameter
811
+
812
+ ```json
813
+ {
814
+ "type": "object",
815
+ "required": [
816
+ "tenantId",
817
+ "tenantUserId"
818
+ ],
819
+ "properties": {
820
+ "tenantId": {
684
821
  "type": "string"
685
822
  },
686
- "description": {
823
+ "tenantUserId": {
687
824
  "type": "string"
688
825
  }
689
826
  }
690
827
  }
691
828
  ```
692
829
 
693
- <h3 id="post__api_v1_account_admin_addrole-parameters">Parameters</h3>
830
+ <h3 id="post__api_v1_account_admin_opentenantuser-parameters">Parameters</h3>
694
831
 
695
832
  |Name|In|Type|Required|Description|
696
833
  |---|---|---|---|---|
697
834
  |body|body|object|true|none|
698
835
  |» tenantId|body|string|true|none|
699
- name|body|string|true|none|
700
- |» description|body|string|false|none|
836
+ tenantUserId|body|string|true|none|
701
837
 
702
- <h3 id="post__api_v1_account_admin_addrole-responses">Responses</h3>
838
+ <h3 id="post__api_v1_account_admin_opentenantuser-responses">Responses</h3>
703
839
 
704
840
  |Status|Meaning|Description|Schema|
705
841
  |---|---|---|---|
@@ -709,9 +845,29 @@ This operation does not require authentication
709
845
  This operation does not require authentication
710
846
  </aside>
711
847
 
712
- ## post__api_v1_account_admin_saveRole
848
+ ## get__api_v1_account_admin_getInviteList
713
849
 
714
- `POST /api/v1/account/admin/saveRole`
850
+ `GET /api/v1/account/admin/getInviteList`
851
+
852
+ <h3 id="get__api_v1_account_admin_getinvitelist-parameters">Parameters</h3>
853
+
854
+ |Name|In|Type|Required|Description|
855
+ |---|---|---|---|---|
856
+ |tenantId|query|string|true|none|
857
+
858
+ <h3 id="get__api_v1_account_admin_getinvitelist-responses">Responses</h3>
859
+
860
+ |Status|Meaning|Description|Schema|
861
+ |---|---|---|---|
862
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
863
+
864
+ <aside class="success">
865
+ This operation does not require authentication
866
+ </aside>
867
+
868
+ ## post__api_v1_account_admin_addInviteToken
869
+
870
+ `POST /api/v1/account/admin/addInviteToken`
715
871
 
716
872
  > Body parameter
717
873
 
@@ -719,33 +875,46 @@ This operation does not require authentication
719
875
  {
720
876
  "type": "object",
721
877
  "required": [
722
- "name",
723
- "id"
878
+ "tenantId"
724
879
  ],
725
880
  "properties": {
726
- "id": {
727
- "type": "number"
728
- },
729
- "name": {
881
+ "tenantId": {
730
882
  "type": "string"
731
883
  },
732
- "description": {
733
- "type": "string"
884
+ "info": {
885
+ "type": "object",
886
+ "properties": {
887
+ "roleIds": {
888
+ "type": "array",
889
+ "items": {
890
+ "type": "number"
891
+ },
892
+ "default": []
893
+ },
894
+ "orgIds": {
895
+ "type": "array",
896
+ "items": {
897
+ "type": "number"
898
+ },
899
+ "default": []
900
+ }
901
+ }
734
902
  }
735
903
  }
736
904
  }
737
905
  ```
738
906
 
739
- <h3 id="post__api_v1_account_admin_saverole-parameters">Parameters</h3>
907
+ <h3 id="post__api_v1_account_admin_addinvitetoken-parameters">Parameters</h3>
740
908
 
741
909
  |Name|In|Type|Required|Description|
742
910
  |---|---|---|---|---|
743
911
  |body|body|object|true|none|
744
- id|body|number|true|none|
745
- name|body|string|true|none|
746
- description|body|string|false|none|
912
+ tenantId|body|string|true|none|
913
+ info|body|object|false|none|
914
+ |»» roleIds|body|[number]|false|none|
915
+ |»» orgIds|body|[number]|false|none|
747
916
 
748
- <h3 id="post__api_v1_account_admin_saverole-responses">Responses</h3>
917
+ <h3 id="post__api_v1_account_admin_addinvitetoken-responses">Responses</h3>
749
918
 
750
919
  |Status|Meaning|Description|Schema|
751
920
  |---|---|---|---|
@@ -755,9 +924,9 @@ This operation does not require authentication
755
924
  This operation does not require authentication
756
925
  </aside>
757
926
 
758
- ## post__api_v1_account_admin_removeRole
927
+ ## post__api_v1_account_admin_deleteInviteToken
759
928
 
760
- `POST /api/v1/account/admin/removeRole`
929
+ `POST /api/v1/account/admin/deleteInviteToken`
761
930
 
762
931
  > Body parameter
763
932
 
@@ -775,14 +944,14 @@ This operation does not require authentication
775
944
  }
776
945
  ```
777
946
 
778
- <h3 id="post__api_v1_account_admin_removerole-parameters">Parameters</h3>
947
+ <h3 id="post__api_v1_account_admin_deleteinvitetoken-parameters">Parameters</h3>
779
948
 
780
949
  |Name|In|Type|Required|Description|
781
950
  |---|---|---|---|---|
782
951
  |body|body|object|true|none|
783
952
  |» id|body|number|true|none|
784
953
 
785
- <h3 id="post__api_v1_account_admin_removerole-responses">Responses</h3>
954
+ <h3 id="post__api_v1_account_admin_deleteinvitetoken-responses">Responses</h3>
786
955
 
787
956
  |Status|Meaning|Description|Schema|
788
957
  |---|---|---|---|
@@ -792,17 +961,11 @@ This operation does not require authentication
792
961
  This operation does not require authentication
793
962
  </aside>
794
963
 
795
- ## get__api_v1_account_admin_getRolePermissionList
796
-
797
- `GET /api/v1/account/admin/getRolePermissionList`
798
-
799
- <h3 id="get__api_v1_account_admin_getrolepermissionlist-parameters">Parameters</h3>
964
+ ## get__api_v1_account_tenant_getUserTenant
800
965
 
801
- |Name|In|Type|Required|Description|
802
- |---|---|---|---|---|
803
- |id|query|number|true|none|
966
+ `GET /api/v1/account/tenant/getUserTenant`
804
967
 
805
- <h3 id="get__api_v1_account_admin_getrolepermissionlist-responses">Responses</h3>
968
+ <h3 id="get__api_v1_account_tenant_getusertenant-responses">Responses</h3>
806
969
 
807
970
  |Status|Meaning|Description|Schema|
808
971
  |---|---|---|---|
@@ -812,11 +975,11 @@ This operation does not require authentication
812
975
  This operation does not require authentication
813
976
  </aside>
814
977
 
815
- ## post__api_v1_account_admin_saveRolePermissionList
978
+ ## get__api_v1_account_tenant_getTenantUserInfo
816
979
 
817
- `POST /api/v1/account/admin/saveRolePermissionList`
980
+ `GET /api/v1/account/tenant/getTenantUserInfo`
818
981
 
819
- <h3 id="post__api_v1_account_admin_saverolepermissionlist-responses">Responses</h3>
982
+ <h3 id="get__api_v1_account_tenant_gettenantuserinfo-responses">Responses</h3>
820
983
 
821
984
  |Status|Meaning|Description|Schema|
822
985
  |---|---|---|---|
@@ -826,21 +989,19 @@ This operation does not require authentication
826
989
  This operation does not require authentication
827
990
  </aside>
828
991
 
829
- ## get__api_v1_account_admin_getAllTenantList
992
+ ## get__api_v1_account_tenant_getTenantUserList
830
993
 
831
- `GET /api/v1/account/admin/getAllTenantList`
994
+ `GET /api/v1/account/tenant/getTenantUserList`
832
995
 
833
- <h3 id="get__api_v1_account_admin_getalltenantlist-parameters">Parameters</h3>
996
+ <h3 id="get__api_v1_account_tenant_gettenantuserlist-parameters">Parameters</h3>
834
997
 
835
998
  |Name|In|Type|Required|Description|
836
999
  |---|---|---|---|---|
837
- |name|query|string|false|none|
838
- |serviceStartTime|query|string(date-time)|false|none|
839
- |serviceEndTime|query|string(date-time)|false|none|
840
- |perPage|query|number|false|none|
1000
+ |filter|query|object|false|none|
841
1001
  |currentPage|query|number|false|none|
1002
+ |perPage|query|number|false|none|
842
1003
 
843
- <h3 id="get__api_v1_account_admin_getalltenantlist-responses">Responses</h3>
1004
+ <h3 id="get__api_v1_account_tenant_gettenantuserlist-responses">Responses</h3>
844
1005
 
845
1006
  |Status|Meaning|Description|Schema|
846
1007
  |---|---|---|---|
@@ -850,17 +1011,25 @@ This operation does not require authentication
850
1011
  This operation does not require authentication
851
1012
  </aside>
852
1013
 
853
- ## get__api_v1_account_admin_getTenantInfo
1014
+ ## get__api_v1_account_tenant_orgList
854
1015
 
855
- `GET /api/v1/account/admin/getTenantInfo`
1016
+ `GET /api/v1/account/tenant/orgList`
856
1017
 
857
- <h3 id="get__api_v1_account_admin_gettenantinfo-parameters">Parameters</h3>
1018
+ <h3 id="get__api_v1_account_tenant_orglist-responses">Responses</h3>
858
1019
 
859
- |Name|In|Type|Required|Description|
860
- |---|---|---|---|---|
861
- |id|query|string|false|none|
1020
+ |Status|Meaning|Description|Schema|
1021
+ |---|---|---|---|
1022
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
862
1023
 
863
- <h3 id="get__api_v1_account_admin_gettenantinfo-responses">Responses</h3>
1024
+ <aside class="success">
1025
+ This operation does not require authentication
1026
+ </aside>
1027
+
1028
+ ## get__api_v1_account_getUserInfo
1029
+
1030
+ `GET /api/v1/account/getUserInfo`
1031
+
1032
+ <h3 id="get__api_v1_account_getuserinfo-responses">Responses</h3>
864
1033
 
865
1034
  |Status|Meaning|Description|Schema|
866
1035
  |---|---|---|---|
@@ -870,9 +1039,9 @@ This operation does not require authentication
870
1039
  This operation does not require authentication
871
1040
  </aside>
872
1041
 
873
- ## post__api_v1_account_admin_addTenant
1042
+ ## post__api_v1_account_setCurrentTenantId
874
1043
 
875
- `POST /api/v1/account/admin/addTenant`
1044
+ `POST /api/v1/account/setCurrentTenantId`
876
1045
 
877
1046
  > Body parameter
878
1047
 
@@ -880,41 +1049,24 @@ This operation does not require authentication
880
1049
  {
881
1050
  "type": "object",
882
1051
  "required": [
883
- "name",
884
- "accountNumber",
885
- "serviceStartTime",
886
- "serviceEndTime"
1052
+ "tenantId"
887
1053
  ],
888
1054
  "properties": {
889
- "name": {
1055
+ "tenantId": {
890
1056
  "type": "string"
891
- },
892
- "accountNumber": {
893
- "type": "number"
894
- },
895
- "serviceStartTime": {
896
- "type": "string",
897
- "format": "date-time"
898
- },
899
- "serviceEndTime": {
900
- "type": "string",
901
- "format": "date-time"
902
1057
  }
903
1058
  }
904
1059
  }
905
1060
  ```
906
1061
 
907
- <h3 id="post__api_v1_account_admin_addtenant-parameters">Parameters</h3>
1062
+ <h3 id="post__api_v1_account_setcurrenttenantid-parameters">Parameters</h3>
908
1063
 
909
1064
  |Name|In|Type|Required|Description|
910
1065
  |---|---|---|---|---|
911
1066
  |body|body|object|true|none|
912
- name|body|string|true|none|
913
- |» accountNumber|body|number|true|none|
914
- |» serviceStartTime|body|string(date-time)|true|none|
915
- |» serviceEndTime|body|string(date-time)|true|none|
1067
+ tenantId|body|string|true|none|
916
1068
 
917
- <h3 id="post__api_v1_account_admin_addtenant-responses">Responses</h3>
1069
+ <h3 id="post__api_v1_account_setcurrenttenantid-responses">Responses</h3>
918
1070
 
919
1071
  |Status|Meaning|Description|Schema|
920
1072
  |---|---|---|---|
@@ -924,9 +1076,13 @@ This operation does not require authentication
924
1076
  This operation does not require authentication
925
1077
  </aside>
926
1078
 
927
- ## post__api_v1_account_admin_saveTenant
1079
+ <h1 id="-kne-fastify-account--">账号</h1>
928
1080
 
929
- `POST /api/v1/account/admin/saveTenant`
1081
+ ## post__api_v1_account_sendEmailCode
1082
+
1083
+ `POST /api/v1/account/sendEmailCode`
1084
+
1085
+ *发送邮箱验证码*
930
1086
 
931
1087
  > Body parameter
932
1088
 
@@ -934,143 +1090,127 @@ This operation does not require authentication
934
1090
  {
935
1091
  "type": "object",
936
1092
  "required": [
937
- "id",
938
- "name",
939
- "accountNumber",
940
- "serviceStartTime",
941
- "serviceEndTime"
1093
+ "email"
942
1094
  ],
943
1095
  "properties": {
944
- "id": {
945
- "type": "string"
946
- },
947
- "name": {
948
- "type": "string"
949
- },
950
- "accountNumber": {
951
- "type": "number"
952
- },
953
- "serviceStartTime": {
954
- "type": "string",
955
- "format": "date-time"
956
- },
957
- "serviceEndTime": {
1096
+ "email": {
958
1097
  "type": "string",
959
- "format": "date-time"
1098
+ "description": "邮箱"
960
1099
  }
961
1100
  }
962
1101
  }
963
1102
  ```
964
1103
 
965
- <h3 id="post__api_v1_account_admin_savetenant-parameters">Parameters</h3>
1104
+ <h3 id="post__api_v1_account_sendemailcode-parameters">Parameters</h3>
966
1105
 
967
1106
  |Name|In|Type|Required|Description|
968
1107
  |---|---|---|---|---|
969
1108
  |body|body|object|true|none|
970
- id|body|string|true|none|
971
- |» name|body|string|true|none|
972
- |» accountNumber|body|number|true|none|
973
- |» serviceStartTime|body|string(date-time)|true|none|
974
- |» serviceEndTime|body|string(date-time)|true|none|
975
-
976
- <h3 id="post__api_v1_account_admin_savetenant-responses">Responses</h3>
977
-
978
- |Status|Meaning|Description|Schema|
979
- |---|---|---|---|
980
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
1109
+ email|body|string|true|邮箱|
981
1110
 
982
- <aside class="success">
983
- This operation does not require authentication
984
- </aside>
1111
+ > Example responses
985
1112
 
986
- ## post__api_v1_account_admin_tenant_addOrg
1113
+ > 200 Response
987
1114
 
988
- `POST /api/v1/account/admin/tenant/addOrg`
1115
+ ```json
1116
+ {
1117
+ "type": "object",
1118
+ "properties": {
1119
+ "code": {
1120
+ "type": "string",
1121
+ "description": "验证码"
1122
+ }
1123
+ }
1124
+ }
1125
+ ```
989
1126
 
990
- <h3 id="post__api_v1_account_admin_tenant_addorg-responses">Responses</h3>
1127
+ <h3 id="post__api_v1_account_sendemailcode-responses">Responses</h3>
991
1128
 
992
1129
  |Status|Meaning|Description|Schema|
993
1130
  |---|---|---|---|
994
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
995
-
996
- <aside class="success">
997
- This operation does not require authentication
998
- </aside>
999
-
1000
- ## get__api_v1_account_admin_tenant_orgList
1131
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|Inline|
1001
1132
 
1002
- `GET /api/v1/account/admin/tenant/orgList`
1133
+ <h3 id="post__api_v1_account_sendemailcode-responseschema">Response Schema</h3>
1003
1134
 
1004
- <h3 id="get__api_v1_account_admin_tenant_orglist-parameters">Parameters</h3>
1135
+ Status Code **200**
1005
1136
 
1006
- |Name|In|Type|Required|Description|
1137
+ |Name|Type|Required|Restrictions|Description|
1007
1138
  |---|---|---|---|---|
1008
- |id|query|string|false|none|
1009
-
1010
- <h3 id="get__api_v1_account_admin_tenant_orglist-responses">Responses</h3>
1011
-
1012
- |Status|Meaning|Description|Schema|
1013
- |---|---|---|---|
1014
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
1139
+ |» code|string|false|none|验证码|
1015
1140
 
1016
1141
  <aside class="success">
1017
1142
  This operation does not require authentication
1018
1143
  </aside>
1019
1144
 
1020
- ## post__api_v1_account_admin_tenant_editOrg
1021
-
1022
- `POST /api/v1/account/admin/tenant/editOrg`
1145
+ ## post__api_v1_account_sendSMSCode
1023
1146
 
1024
- <h3 id="post__api_v1_account_admin_tenant_editorg-responses">Responses</h3>
1147
+ `POST /api/v1/account/sendSMSCode`
1025
1148
 
1026
- |Status|Meaning|Description|Schema|
1027
- |---|---|---|---|
1028
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
1149
+ *发送短信验证码*
1029
1150
 
1030
- <aside class="success">
1031
- This operation does not require authentication
1032
- </aside>
1151
+ > Body parameter
1033
1152
 
1034
- ## post__api_v1_account_admin_tenant_removeOrg
1153
+ ```json
1154
+ {
1155
+ "type": "object",
1156
+ "required": [
1157
+ "phone"
1158
+ ],
1159
+ "properties": {
1160
+ "phone": {
1161
+ "type": "string",
1162
+ "description": "电话"
1163
+ }
1164
+ }
1165
+ }
1166
+ ```
1035
1167
 
1036
- `POST /api/v1/account/admin/tenant/removeOrg`
1168
+ <h3 id="post__api_v1_account_sendsmscode-parameters">Parameters</h3>
1037
1169
 
1038
- <h3 id="post__api_v1_account_admin_tenant_removeorg-responses">Responses</h3>
1170
+ |Name|In|Type|Required|Description|
1171
+ |---|---|---|---|---|
1172
+ |body|body|object|true|none|
1173
+ |» phone|body|string|true|电话|
1039
1174
 
1040
- |Status|Meaning|Description|Schema|
1041
- |---|---|---|---|
1042
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
1175
+ > Example responses
1043
1176
 
1044
- <aside class="success">
1045
- This operation does not require authentication
1046
- </aside>
1177
+ > 200 Response
1047
1178
 
1048
- ## get__api_v1_account_admin_getTenantUserList
1179
+ ```json
1180
+ {
1181
+ "type": "object",
1182
+ "properties": {
1183
+ "code": {
1184
+ "type": "string",
1185
+ "description": "验证码"
1186
+ }
1187
+ }
1188
+ }
1189
+ ```
1049
1190
 
1050
- `GET /api/v1/account/admin/getTenantUserList`
1191
+ <h3 id="post__api_v1_account_sendsmscode-responses">Responses</h3>
1051
1192
 
1052
- <h3 id="get__api_v1_account_admin_gettenantuserlist-parameters">Parameters</h3>
1193
+ |Status|Meaning|Description|Schema|
1194
+ |---|---|---|---|
1195
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|Inline|
1053
1196
 
1054
- |Name|In|Type|Required|Description|
1055
- |---|---|---|---|---|
1056
- |tenantId|query|string|false|none|
1057
- |filter|query|object|false|none|
1058
- |currentPage|query|number|false|none|
1059
- |perPage|query|number|false|none|
1197
+ <h3 id="post__api_v1_account_sendsmscode-responseschema">Response Schema</h3>
1060
1198
 
1061
- <h3 id="get__api_v1_account_admin_gettenantuserlist-responses">Responses</h3>
1199
+ Status Code **200**
1062
1200
 
1063
- |Status|Meaning|Description|Schema|
1064
- |---|---|---|---|
1065
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
1201
+ |Name|Type|Required|Restrictions|Description|
1202
+ |---|---|---|---|---|
1203
+ |» code|string|false|none|验证码|
1066
1204
 
1067
1205
  <aside class="success">
1068
1206
  This operation does not require authentication
1069
1207
  </aside>
1070
1208
 
1071
- ## post__api_v1_account_admin_addTenantUser
1209
+ ## post__api_v1_account_validateCode
1072
1210
 
1073
- `POST /api/v1/account/admin/addTenantUser`
1211
+ `POST /api/v1/account/validateCode`
1212
+
1213
+ *验证码验证*
1074
1214
 
1075
1215
  > Body parameter
1076
1216
 
@@ -1078,231 +1218,281 @@ This operation does not require authentication
1078
1218
  {
1079
1219
  "type": "object",
1080
1220
  "required": [
1081
- "tenantId",
1082
- "userId",
1083
- "name"
1221
+ "name",
1222
+ "type",
1223
+ "code"
1084
1224
  ],
1085
1225
  "properties": {
1086
- "tenantId": {
1087
- "type": "string"
1088
- },
1089
- "roleIds": {
1090
- "type": "array",
1091
- "items": {
1092
- "type": "number"
1093
- },
1094
- "default": []
1095
- },
1096
- "orgIds": {
1097
- "type": "array",
1098
- "items": {
1099
- "type": "number"
1100
- },
1101
- "default": []
1102
- },
1103
- "userId": {
1104
- "type": "string"
1105
- },
1106
1226
  "name": {
1107
- "type": "string"
1108
- },
1109
- "avatar": {
1110
- "type": "string"
1111
- },
1112
- "phone": {
1113
- "type": "string"
1227
+ "type": "string",
1228
+ "description": "被验证的账号,手机或邮箱"
1114
1229
  },
1115
- "email": {
1116
- "type": "string"
1230
+ "type": {
1231
+ "type": "number",
1232
+ "description": "0:手机注册,1:邮箱注册,2:手机登录,3:邮箱登录,4:验证租户管理员"
1117
1233
  },
1118
- "description": {
1119
- "type": "string"
1234
+ "code": {
1235
+ "type": "string",
1236
+ "description": "接受到的验证码"
1120
1237
  }
1121
1238
  }
1122
1239
  }
1123
1240
  ```
1124
1241
 
1125
- <h3 id="post__api_v1_account_admin_addtenantuser-parameters">Parameters</h3>
1242
+ <h3 id="post__api_v1_account_validatecode-parameters">Parameters</h3>
1126
1243
 
1127
1244
  |Name|In|Type|Required|Description|
1128
1245
  |---|---|---|---|---|
1129
1246
  |body|body|object|true|none|
1130
- tenantId|body|string|true|none|
1131
- roleIds|body|[number]|false|none|
1132
- orgIds|body|[number]|false|none|
1133
- |» userId|body|string|true|none|
1134
- |» name|body|string|true|none|
1135
- |» avatar|body|string|false|none|
1136
- |» phone|body|string|false|none|
1137
- |» email|body|string|false|none|
1138
- |» description|body|string|false|none|
1247
+ name|body|string|true|被验证的账号,手机或邮箱|
1248
+ type|body|number|true|0:手机注册,1:邮箱注册,2:手机登录,3:邮箱登录,4:验证租户管理员|
1249
+ code|body|string|true|接受到的验证码|
1139
1250
 
1140
- <h3 id="post__api_v1_account_admin_addtenantuser-responses">Responses</h3>
1251
+ > Example responses
1252
+
1253
+ > 200 Response
1254
+
1255
+ ```json
1256
+ {
1257
+ "type": "object",
1258
+ "properties": {}
1259
+ }
1260
+ ```
1261
+
1262
+ <h3 id="post__api_v1_account_validatecode-responses">Responses</h3>
1141
1263
 
1142
1264
  |Status|Meaning|Description|Schema|
1143
1265
  |---|---|---|---|
1144
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
1266
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|Inline|
1267
+
1268
+ <h3 id="post__api_v1_account_validatecode-responseschema">Response Schema</h3>
1145
1269
 
1146
1270
  <aside class="success">
1147
1271
  This operation does not require authentication
1148
1272
  </aside>
1149
1273
 
1150
- ## post__api_v1_account_admin_saveTenantUser
1274
+ ## post__api_v1_account_accountIsExists
1151
1275
 
1152
- `POST /api/v1/account/admin/saveTenantUser`
1276
+ `POST /api/v1/account/accountIsExists`
1277
+
1278
+ *账号是否已存在*
1153
1279
 
1154
1280
  > Body parameter
1155
1281
 
1156
1282
  ```json
1157
1283
  {
1158
- "type": "object",
1159
- "required": [
1160
- "tenantId",
1161
- "name"
1162
- ],
1163
- "properties": {
1164
- "tenantId": {
1165
- "type": "string"
1166
- },
1167
- "roleIds": {
1168
- "type": "array",
1169
- "items": {
1170
- "type": "number"
1171
- },
1172
- "default": []
1173
- },
1174
- "orgIds": {
1175
- "type": "array",
1176
- "items": {
1177
- "type": "number"
1178
- },
1179
- "default": []
1180
- },
1181
- "name": {
1182
- "type": "string"
1183
- },
1184
- "avatar": {
1185
- "type": "string"
1186
- },
1187
- "phone": {
1188
- "type": "string"
1189
- },
1190
- "email": {
1191
- "type": "string"
1284
+ "oneOf": [
1285
+ {
1286
+ "type": "object",
1287
+ "required": [
1288
+ "phone"
1289
+ ],
1290
+ "properties": {
1291
+ "phone": {
1292
+ "type": "string",
1293
+ "description": "电话"
1294
+ }
1295
+ }
1192
1296
  },
1193
- "description": {
1194
- "type": "string"
1297
+ {
1298
+ "type": "object",
1299
+ "required": [
1300
+ "email"
1301
+ ],
1302
+ "properties": {
1303
+ "email": {
1304
+ "type": "string",
1305
+ "description": "邮箱"
1306
+ }
1307
+ }
1195
1308
  }
1196
- }
1309
+ ]
1197
1310
  }
1198
1311
  ```
1199
1312
 
1200
- <h3 id="post__api_v1_account_admin_savetenantuser-parameters">Parameters</h3>
1313
+ <h3 id="post__api_v1_account_accountisexists-parameters">Parameters</h3>
1201
1314
 
1202
1315
  |Name|In|Type|Required|Description|
1203
1316
  |---|---|---|---|---|
1204
- |body|body|object|true|none|
1205
- |» tenantId|body|string|true|none|
1206
- |» roleIds|body|[number]|false|none|
1207
- |» orgIds|body|[number]|false|none|
1208
- |» name|body|string|true|none|
1209
- |» avatar|body|string|false|none|
1210
- |» phone|body|string|false|none|
1211
- |» email|body|string|false|none|
1212
- |» description|body|string|false|none|
1213
-
1214
- <h3 id="post__api_v1_account_admin_savetenantuser-responses">Responses</h3>
1215
-
1216
- |Status|Meaning|Description|Schema|
1217
- |---|---|---|---|
1218
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
1219
-
1220
- <aside class="success">
1221
- This operation does not require authentication
1222
- </aside>
1223
-
1224
- ## post__api_v1_account_admin_deleteTenantUser
1317
+ |body|body|any|false|none|
1225
1318
 
1226
- `POST /api/v1/account/admin/deleteTenantUser`
1319
+ > Example responses
1227
1320
 
1228
- > Body parameter
1321
+ > 200 Response
1229
1322
 
1230
1323
  ```json
1231
1324
  {
1232
1325
  "type": "object",
1233
- "required": [
1234
- "tenantId",
1235
- "tenantUserId"
1236
- ],
1237
1326
  "properties": {
1238
- "tenantId": {
1239
- "type": "string"
1240
- },
1241
- "tenantUserId": {
1242
- "type": "string"
1327
+ "isExists": {
1328
+ "type": "boolean",
1329
+ "description": "true已存在,false不存在"
1243
1330
  }
1244
1331
  }
1245
1332
  }
1246
1333
  ```
1247
1334
 
1248
- <h3 id="post__api_v1_account_admin_deletetenantuser-parameters">Parameters</h3>
1249
-
1250
- |Name|In|Type|Required|Description|
1251
- |---|---|---|---|---|
1252
- |body|body|object|true|none|
1253
- |» tenantId|body|string|true|none|
1254
- |» tenantUserId|body|string|true|none|
1255
-
1256
- <h3 id="post__api_v1_account_admin_deletetenantuser-responses">Responses</h3>
1335
+ <h3 id="post__api_v1_account_accountisexists-responses">Responses</h3>
1257
1336
 
1258
1337
  |Status|Meaning|Description|Schema|
1259
1338
  |---|---|---|---|
1260
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
1339
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|Inline|
1340
+
1341
+ <h3 id="post__api_v1_account_accountisexists-responseschema">Response Schema</h3>
1342
+
1343
+ Status Code **200**
1344
+
1345
+ |Name|Type|Required|Restrictions|Description|
1346
+ |---|---|---|---|---|
1347
+ |» isExists|boolean|false|none|true已存在,false不存在|
1261
1348
 
1262
1349
  <aside class="success">
1263
1350
  This operation does not require authentication
1264
1351
  </aside>
1265
1352
 
1266
- ## post__api_v1_account_admin_closeTenant
1353
+ ## post__api_v1_account_register
1267
1354
 
1268
- `POST /api/v1/account/admin/closeTenant`
1355
+ `POST /api/v1/account/register`
1356
+
1357
+ *注册账号*
1269
1358
 
1270
1359
  > Body parameter
1271
1360
 
1272
1361
  ```json
1273
1362
  {
1274
- "type": "object",
1275
- "required": [
1276
- "tenantId"
1277
- ],
1278
- "properties": {
1279
- "tenantId": {
1280
- "type": "string"
1363
+ "oneOf": [
1364
+ {
1365
+ "type": "object",
1366
+ "required": [
1367
+ "phone",
1368
+ "password",
1369
+ "code"
1370
+ ],
1371
+ "properties": {
1372
+ "avatar": {
1373
+ "type": "string",
1374
+ "description": "头像图片id"
1375
+ },
1376
+ "phone": {
1377
+ "type": "string",
1378
+ "description": "电话"
1379
+ },
1380
+ "code": {
1381
+ "type": "string",
1382
+ "description": "验证码"
1383
+ },
1384
+ "password": {
1385
+ "type": "string",
1386
+ "description": "密码(需要md5加密)"
1387
+ },
1388
+ "invitationCode": {
1389
+ "type": "string",
1390
+ "description": "邀请码,用来默认加入租户"
1391
+ },
1392
+ "nickname": {
1393
+ "type": "string",
1394
+ "description": "昵称"
1395
+ },
1396
+ "gender": {
1397
+ "type": "string",
1398
+ "description": "性别"
1399
+ },
1400
+ "birthday": {
1401
+ "type": "string",
1402
+ "format": "date",
1403
+ "description": "出生日期"
1404
+ },
1405
+ "description": {
1406
+ "type": "string",
1407
+ "description": "个人简介"
1408
+ }
1409
+ }
1410
+ },
1411
+ {
1412
+ "type": "object",
1413
+ "required": [
1414
+ "email",
1415
+ "password",
1416
+ "code"
1417
+ ],
1418
+ "properties": {
1419
+ "avatar": {
1420
+ "type": "string",
1421
+ "description": "头像图片id"
1422
+ },
1423
+ "email": {
1424
+ "type": "string",
1425
+ "description": "邮箱"
1426
+ },
1427
+ "code": {
1428
+ "type": "string",
1429
+ "description": "验证码"
1430
+ },
1431
+ "password": {
1432
+ "type": "string",
1433
+ "description": "密码(需要md5加密)"
1434
+ },
1435
+ "invitationCode": {
1436
+ "type": "string",
1437
+ "description": "邀请码,用来默认加入租户"
1438
+ },
1439
+ "nickname": {
1440
+ "type": "string",
1441
+ "description": "昵称"
1442
+ },
1443
+ "gender": {
1444
+ "type": "string",
1445
+ "description": "性别"
1446
+ },
1447
+ "birthday": {
1448
+ "type": "string",
1449
+ "format": "date",
1450
+ "description": "出生日期"
1451
+ },
1452
+ "description": {
1453
+ "type": "string",
1454
+ "description": "个人简介"
1455
+ }
1456
+ }
1281
1457
  }
1282
- }
1458
+ ]
1283
1459
  }
1284
1460
  ```
1285
1461
 
1286
- <h3 id="post__api_v1_account_admin_closetenant-parameters">Parameters</h3>
1462
+ <h3 id="post__api_v1_account_register-parameters">Parameters</h3>
1287
1463
 
1288
1464
  |Name|In|Type|Required|Description|
1289
1465
  |---|---|---|---|---|
1290
- |body|body|object|true|none|
1291
- |» tenantId|body|string|true|none|
1466
+ |body|body|any|false|none|
1292
1467
 
1293
- <h3 id="post__api_v1_account_admin_closetenant-responses">Responses</h3>
1468
+ > Example responses
1469
+
1470
+ > 200 Response
1471
+
1472
+ ```json
1473
+ {
1474
+ "type": "object",
1475
+ "properties": {}
1476
+ }
1477
+ ```
1478
+
1479
+ <h3 id="post__api_v1_account_register-responses">Responses</h3>
1294
1480
 
1295
1481
  |Status|Meaning|Description|Schema|
1296
1482
  |---|---|---|---|
1297
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
1483
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|Inline|
1484
+
1485
+ <h3 id="post__api_v1_account_register-responseschema">Response Schema</h3>
1298
1486
 
1299
1487
  <aside class="success">
1300
1488
  This operation does not require authentication
1301
1489
  </aside>
1302
1490
 
1303
- ## post__api_v1_account_admin_openTenant
1491
+ ## post__api_v1_account_login
1304
1492
 
1305
- `POST /api/v1/account/admin/openTenant`
1493
+ `POST /api/v1/account/login`
1494
+
1495
+ *登录*
1306
1496
 
1307
1497
  > Body parameter
1308
1498
 
@@ -1310,24 +1500,80 @@ This operation does not require authentication
1310
1500
  {
1311
1501
  "type": "object",
1312
1502
  "required": [
1313
- "tenantId"
1503
+ "username",
1504
+ "password"
1314
1505
  ],
1315
1506
  "properties": {
1316
- "tenantId": {
1317
- "type": "string"
1507
+ "username": {
1508
+ "type": "string",
1509
+ "description": "用户名"
1510
+ },
1511
+ "password": {
1512
+ "type": "string",
1513
+ "description": "密码"
1318
1514
  }
1319
1515
  }
1320
1516
  }
1321
1517
  ```
1322
1518
 
1323
- <h3 id="post__api_v1_account_admin_opentenant-parameters">Parameters</h3>
1519
+ <h3 id="post__api_v1_account_login-parameters">Parameters</h3>
1324
1520
 
1325
1521
  |Name|In|Type|Required|Description|
1326
1522
  |---|---|---|---|---|
1327
1523
  |body|body|object|true|none|
1328
- tenantId|body|string|true|none|
1524
+ username|body|string|true|用户名|
1525
+ |» password|body|string|true|密码|
1329
1526
 
1330
- <h3 id="post__api_v1_account_admin_opentenant-responses">Responses</h3>
1527
+ > Example responses
1528
+
1529
+ > 200 Response
1530
+
1531
+ ```json
1532
+ {
1533
+ "type": "object",
1534
+ "properties": {
1535
+ "token": {
1536
+ "type": "string",
1537
+ "description": "用户token"
1538
+ },
1539
+ "currentTenantId": {
1540
+ "type": "string",
1541
+ "description": "当前租户id"
1542
+ }
1543
+ }
1544
+ }
1545
+ ```
1546
+
1547
+ <h3 id="post__api_v1_account_login-responses">Responses</h3>
1548
+
1549
+ |Status|Meaning|Description|Schema|
1550
+ |---|---|---|---|
1551
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|Inline|
1552
+
1553
+ <h3 id="post__api_v1_account_login-responseschema">Response Schema</h3>
1554
+
1555
+ Status Code **200**
1556
+
1557
+ |Name|Type|Required|Restrictions|Description|
1558
+ |---|---|---|---|---|
1559
+ |» token|string|false|none|用户token|
1560
+ |» currentTenantId|string|false|none|当前租户id|
1561
+
1562
+ <aside class="success">
1563
+ This operation does not require authentication
1564
+ </aside>
1565
+
1566
+ <h1 id="-kne-fastify-account--">管理后台</h1>
1567
+
1568
+ ## post__api_v1_account_initSuperAdmin
1569
+
1570
+ `POST /api/v1/account/initSuperAdmin`
1571
+
1572
+ *初始化用户为管理员*
1573
+
1574
+ 用于系统初始化时,设置第一个用户,只能使用一次,其他用户由该用户创建
1575
+
1576
+ <h3 id="post__api_v1_account_initsuperadmin-responses">Responses</h3>
1331
1577
 
1332
1578
  |Status|Meaning|Description|Schema|
1333
1579
  |---|---|---|---|
@@ -1337,9 +1583,98 @@ This operation does not require authentication
1337
1583
  This operation does not require authentication
1338
1584
  </aside>
1339
1585
 
1340
- ## post__api_v1_account_admin_closeTenantUser
1586
+ ## get__api_v1_account_admin_getSuperAdminInfo
1341
1587
 
1342
- `POST /api/v1/account/admin/closeTenantUser`
1588
+ `GET /api/v1/account/admin/getSuperAdminInfo`
1589
+
1590
+ *获取管理员信息*
1591
+
1592
+ > Example responses
1593
+
1594
+ > 200 Response
1595
+
1596
+ ```json
1597
+ {
1598
+ "type": "object",
1599
+ "properties": {
1600
+ "userInfo": {
1601
+ "type": "object",
1602
+ "properties": {
1603
+ "id": {
1604
+ "type": "string",
1605
+ "description": "用户id"
1606
+ },
1607
+ "nickname": {
1608
+ "type": "string",
1609
+ "description": "用户昵称"
1610
+ },
1611
+ "email": {
1612
+ "type": "string",
1613
+ "description": "邮箱"
1614
+ },
1615
+ "phone": {
1616
+ "type": "string",
1617
+ "description": "电话"
1618
+ },
1619
+ "gender": {
1620
+ "type": "string",
1621
+ "description": "性别"
1622
+ },
1623
+ "birthday": {
1624
+ "type": "string",
1625
+ "format": "date",
1626
+ "description": "出生日期"
1627
+ },
1628
+ "description": {
1629
+ "type": "string",
1630
+ "description": "个人简介"
1631
+ },
1632
+ "currentTenantId": {
1633
+ "type": "string",
1634
+ "description": "当前租户ID"
1635
+ },
1636
+ "status": {
1637
+ "type": "number",
1638
+ "description": "状态"
1639
+ }
1640
+ }
1641
+ }
1642
+ }
1643
+ }
1644
+ ```
1645
+
1646
+ <h3 id="get__api_v1_account_admin_getsuperadmininfo-responses">Responses</h3>
1647
+
1648
+ |Status|Meaning|Description|Schema|
1649
+ |---|---|---|---|
1650
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|Inline|
1651
+
1652
+ <h3 id="get__api_v1_account_admin_getsuperadmininfo-responseschema">Response Schema</h3>
1653
+
1654
+ Status Code **200**
1655
+
1656
+ |Name|Type|Required|Restrictions|Description|
1657
+ |---|---|---|---|---|
1658
+ |» userInfo|object|false|none|none|
1659
+ |»» id|string|false|none|用户id|
1660
+ |»» nickname|string|false|none|用户昵称|
1661
+ |»» email|string|false|none|邮箱|
1662
+ |»» phone|string|false|none|电话|
1663
+ |»» gender|string|false|none|性别|
1664
+ |»» birthday|string(date)|false|none|出生日期|
1665
+ |»» description|string|false|none|个人简介|
1666
+ |»» currentTenantId|string|false|none|当前租户ID|
1667
+ |»» status|number|false|none|状态|
1668
+
1669
+ <aside class="success">
1670
+ This operation does not require authentication
1671
+ </aside>
1672
+
1673
+ ## post__api_v1_account_admin_setSuperAdmin
1674
+
1675
+ `POST /api/v1/account/admin/setSuperAdmin`
1676
+
1677
+ *设置用户为超级管理员*
1343
1678
 
1344
1679
  > Body parameter
1345
1680
 
@@ -1347,29 +1682,31 @@ This operation does not require authentication
1347
1682
  {
1348
1683
  "type": "object",
1349
1684
  "required": [
1350
- "tenantId",
1351
- "tenantUserId"
1685
+ "status",
1686
+ "userId"
1352
1687
  ],
1353
1688
  "properties": {
1354
- "tenantId": {
1355
- "type": "string"
1689
+ "status": {
1690
+ "type": "boolean",
1691
+ "description": "true:将用户设置为超级管理员,false:取消用户超级管理员"
1356
1692
  },
1357
- "tenantUserId": {
1358
- "type": "string"
1693
+ "userId": {
1694
+ "type": "string",
1695
+ "description": "用户ID"
1359
1696
  }
1360
1697
  }
1361
1698
  }
1362
1699
  ```
1363
1700
 
1364
- <h3 id="post__api_v1_account_admin_closetenantuser-parameters">Parameters</h3>
1701
+ <h3 id="post__api_v1_account_admin_setsuperadmin-parameters">Parameters</h3>
1365
1702
 
1366
1703
  |Name|In|Type|Required|Description|
1367
1704
  |---|---|---|---|---|
1368
1705
  |body|body|object|true|none|
1369
- tenantId|body|string|true|none|
1370
- tenantUserId|body|string|true|none|
1706
+ status|body|boolean|true|true:将用户设置为超级管理员,false:取消用户超级管理员|
1707
+ userId|body|string|true|用户ID|
1371
1708
 
1372
- <h3 id="post__api_v1_account_admin_closetenantuser-responses">Responses</h3>
1709
+ <h3 id="post__api_v1_account_admin_setsuperadmin-responses">Responses</h3>
1373
1710
 
1374
1711
  |Status|Meaning|Description|Schema|
1375
1712
  |---|---|---|---|
@@ -1379,39 +1716,28 @@ This operation does not require authentication
1379
1716
  This operation does not require authentication
1380
1717
  </aside>
1381
1718
 
1382
- ## post__api_v1_account_admin_openTenantUser
1719
+ ## post__api_v1_account_admin_addUser
1383
1720
 
1384
- `POST /api/v1/account/admin/openTenantUser`
1721
+ `POST /api/v1/account/admin/addUser`
1722
+
1723
+ *添加用户*
1385
1724
 
1386
1725
  > Body parameter
1387
1726
 
1388
1727
  ```json
1389
1728
  {
1390
1729
  "type": "object",
1391
- "required": [
1392
- "tenantId",
1393
- "tenantUserId"
1394
- ],
1395
- "properties": {
1396
- "tenantId": {
1397
- "type": "string"
1398
- },
1399
- "tenantUserId": {
1400
- "type": "string"
1401
- }
1402
- }
1730
+ "properties": {}
1403
1731
  }
1404
1732
  ```
1405
1733
 
1406
- <h3 id="post__api_v1_account_admin_opentenantuser-parameters">Parameters</h3>
1734
+ <h3 id="post__api_v1_account_admin_adduser-parameters">Parameters</h3>
1407
1735
 
1408
1736
  |Name|In|Type|Required|Description|
1409
1737
  |---|---|---|---|---|
1410
- |body|body|object|true|none|
1411
- |» tenantId|body|string|true|none|
1412
- |» tenantUserId|body|string|true|none|
1738
+ |body|body|object|false|none|
1413
1739
 
1414
- <h3 id="post__api_v1_account_admin_opentenantuser-responses">Responses</h3>
1740
+ <h3 id="post__api_v1_account_admin_adduser-responses">Responses</h3>
1415
1741
 
1416
1742
  |Status|Meaning|Description|Schema|
1417
1743
  |---|---|---|---|
@@ -1421,17 +1747,20 @@ This operation does not require authentication
1421
1747
  This operation does not require authentication
1422
1748
  </aside>
1423
1749
 
1424
- ## get__api_v1_account_admin_getInviteList
1750
+ ## get__api_v1_account_admin_getAllUserList
1425
1751
 
1426
- `GET /api/v1/account/admin/getInviteList`
1752
+ `GET /api/v1/account/admin/getAllUserList`
1427
1753
 
1428
- <h3 id="get__api_v1_account_admin_getinvitelist-parameters">Parameters</h3>
1754
+ *获取用户列表*
1755
+
1756
+ <h3 id="get__api_v1_account_admin_getalluserlist-parameters">Parameters</h3>
1429
1757
 
1430
1758
  |Name|In|Type|Required|Description|
1431
1759
  |---|---|---|---|---|
1432
- |tenantId|query|string|true|none|
1760
+ |perPage|query|number|false|none|
1761
+ |currentPage|query|number|false|none|
1433
1762
 
1434
- <h3 id="get__api_v1_account_admin_getinvitelist-responses">Responses</h3>
1763
+ <h3 id="get__api_v1_account_admin_getalluserlist-responses">Responses</h3>
1435
1764
 
1436
1765
  |Status|Meaning|Description|Schema|
1437
1766
  |---|---|---|---|
@@ -1441,9 +1770,11 @@ This operation does not require authentication
1441
1770
  This operation does not require authentication
1442
1771
  </aside>
1443
1772
 
1444
- ## post__api_v1_account_admin_addInviteToken
1773
+ ## post__api_v1_account_admin_resetUserPassword
1445
1774
 
1446
- `POST /api/v1/account/admin/addInviteToken`
1775
+ `POST /api/v1/account/admin/resetUserPassword`
1776
+
1777
+ *重置用户账号密码*
1447
1778
 
1448
1779
  > Body parameter
1449
1780
 
@@ -1451,46 +1782,29 @@ This operation does not require authentication
1451
1782
  {
1452
1783
  "type": "object",
1453
1784
  "required": [
1454
- "tenantId"
1785
+ "userId",
1786
+ "password"
1455
1787
  ],
1456
1788
  "properties": {
1457
- "tenantId": {
1789
+ "password": {
1458
1790
  "type": "string"
1459
1791
  },
1460
- "info": {
1461
- "type": "object",
1462
- "properties": {
1463
- "roleIds": {
1464
- "type": "array",
1465
- "items": {
1466
- "type": "number"
1467
- },
1468
- "default": []
1469
- },
1470
- "orgIds": {
1471
- "type": "array",
1472
- "items": {
1473
- "type": "number"
1474
- },
1475
- "default": []
1476
- }
1477
- }
1792
+ "userId": {
1793
+ "type": "string"
1478
1794
  }
1479
1795
  }
1480
1796
  }
1481
1797
  ```
1482
1798
 
1483
- <h3 id="post__api_v1_account_admin_addinvitetoken-parameters">Parameters</h3>
1799
+ <h3 id="post__api_v1_account_admin_resetuserpassword-parameters">Parameters</h3>
1484
1800
 
1485
1801
  |Name|In|Type|Required|Description|
1486
1802
  |---|---|---|---|---|
1487
1803
  |body|body|object|true|none|
1488
- tenantId|body|string|true|none|
1489
- info|body|object|false|none|
1490
- |»» roleIds|body|[number]|false|none|
1491
- |»» orgIds|body|[number]|false|none|
1804
+ password|body|string|true|none|
1805
+ userId|body|string|true|none|
1492
1806
 
1493
- <h3 id="post__api_v1_account_admin_addinvitetoken-responses">Responses</h3>
1807
+ <h3 id="post__api_v1_account_admin_resetuserpassword-responses">Responses</h3>
1494
1808
 
1495
1809
  |Status|Meaning|Description|Schema|
1496
1810
  |---|---|---|---|
@@ -1500,9 +1814,11 @@ This operation does not require authentication
1500
1814
  This operation does not require authentication
1501
1815
  </aside>
1502
1816
 
1503
- ## post__api_v1_account_admin_deleteInviteToken
1817
+ ## post__api_v1_account_admin_saveUser
1504
1818
 
1505
- `POST /api/v1/account/admin/deleteInviteToken`
1819
+ `POST /api/v1/account/admin/saveUser`
1820
+
1821
+ *修改用户信息*
1506
1822
 
1507
1823
  > Body parameter
1508
1824
 
@@ -1514,20 +1830,40 @@ This operation does not require authentication
1514
1830
  ],
1515
1831
  "properties": {
1516
1832
  "id": {
1517
- "type": "number"
1518
- }
1519
- }
1520
- }
1521
- ```
1522
-
1523
- <h3 id="post__api_v1_account_admin_deleteinvitetoken-parameters">Parameters</h3>
1833
+ "type": "string"
1834
+ },
1835
+ "avatar": {
1836
+ "type": "string"
1837
+ },
1838
+ "nickname": {
1839
+ "type": "string"
1840
+ },
1841
+ "phone": {
1842
+ "type": "string"
1843
+ },
1844
+ "email": {
1845
+ "type": "string"
1846
+ },
1847
+ "description": {
1848
+ "type": "string"
1849
+ }
1850
+ }
1851
+ }
1852
+ ```
1853
+
1854
+ <h3 id="post__api_v1_account_admin_saveuser-parameters">Parameters</h3>
1524
1855
 
1525
1856
  |Name|In|Type|Required|Description|
1526
1857
  |---|---|---|---|---|
1527
1858
  |body|body|object|true|none|
1528
- |» id|body|number|true|none|
1859
+ |» id|body|string|true|none|
1860
+ |» avatar|body|string|false|none|
1861
+ |» nickname|body|string|false|none|
1862
+ |» phone|body|string|false|none|
1863
+ |» email|body|string|false|none|
1864
+ |» description|body|string|false|none|
1529
1865
 
1530
- <h3 id="post__api_v1_account_admin_deleteinvitetoken-responses">Responses</h3>
1866
+ <h3 id="post__api_v1_account_admin_saveuser-responses">Responses</h3>
1531
1867
 
1532
1868
  |Status|Meaning|Description|Schema|
1533
1869
  |---|---|---|---|
@@ -1537,25 +1873,36 @@ This operation does not require authentication
1537
1873
  This operation does not require authentication
1538
1874
  </aside>
1539
1875
 
1540
- ## get__api_v1_account_tenant_getUserTenant
1876
+ ## post__api_v1_account_admin_closeUser
1541
1877
 
1542
- `GET /api/v1/account/tenant/getUserTenant`
1878
+ `POST /api/v1/account/admin/closeUser`
1543
1879
 
1544
- <h3 id="get__api_v1_account_tenant_getusertenant-responses">Responses</h3>
1880
+ *关闭用户*
1545
1881
 
1546
- |Status|Meaning|Description|Schema|
1547
- |---|---|---|---|
1548
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
1882
+ > Body parameter
1549
1883
 
1550
- <aside class="success">
1551
- This operation does not require authentication
1552
- </aside>
1884
+ ```json
1885
+ {
1886
+ "type": "object",
1887
+ "required": [
1888
+ "id"
1889
+ ],
1890
+ "properties": {
1891
+ "id": {
1892
+ "type": "string"
1893
+ }
1894
+ }
1895
+ }
1896
+ ```
1553
1897
 
1554
- ## get__api_v1_account_tenant_getTenantUserInfo
1898
+ <h3 id="post__api_v1_account_admin_closeuser-parameters">Parameters</h3>
1555
1899
 
1556
- `GET /api/v1/account/tenant/getTenantUserInfo`
1900
+ |Name|In|Type|Required|Description|
1901
+ |---|---|---|---|---|
1902
+ |body|body|object|true|none|
1903
+ |» id|body|string|true|none|
1557
1904
 
1558
- <h3 id="get__api_v1_account_tenant_gettenantuserinfo-responses">Responses</h3>
1905
+ <h3 id="post__api_v1_account_admin_closeuser-responses">Responses</h3>
1559
1906
 
1560
1907
  |Status|Meaning|Description|Schema|
1561
1908
  |---|---|---|---|
@@ -1565,19 +1912,36 @@ This operation does not require authentication
1565
1912
  This operation does not require authentication
1566
1913
  </aside>
1567
1914
 
1568
- ## get__api_v1_account_tenant_getTenantUserList
1915
+ ## post__api_v1_account_admin_openUser
1569
1916
 
1570
- `GET /api/v1/account/tenant/getTenantUserList`
1917
+ `POST /api/v1/account/admin/openUser`
1571
1918
 
1572
- <h3 id="get__api_v1_account_tenant_gettenantuserlist-parameters">Parameters</h3>
1919
+ *将用户设置为正常*
1920
+
1921
+ > Body parameter
1922
+
1923
+ ```json
1924
+ {
1925
+ "type": "object",
1926
+ "required": [
1927
+ "id"
1928
+ ],
1929
+ "properties": {
1930
+ "id": {
1931
+ "type": "string"
1932
+ }
1933
+ }
1934
+ }
1935
+ ```
1936
+
1937
+ <h3 id="post__api_v1_account_admin_openuser-parameters">Parameters</h3>
1573
1938
 
1574
1939
  |Name|In|Type|Required|Description|
1575
1940
  |---|---|---|---|---|
1576
- |filter|query|object|false|none|
1577
- |currentPage|query|number|false|none|
1578
- |perPage|query|number|false|none|
1941
+ |body|body|object|true|none|
1942
+ |» id|body|string|true|none|
1579
1943
 
1580
- <h3 id="get__api_v1_account_tenant_gettenantuserlist-responses">Responses</h3>
1944
+ <h3 id="post__api_v1_account_admin_openuser-responses">Responses</h3>
1581
1945
 
1582
1946
  |Status|Meaning|Description|Schema|
1583
1947
  |---|---|---|---|
@@ -1587,25 +1951,55 @@ This operation does not require authentication
1587
1951
  This operation does not require authentication
1588
1952
  </aside>
1589
1953
 
1590
- ## get__api_v1_account_tenant_orgList
1954
+ <h1 id="-kne-fastify-account--">管理后台-权限</h1>
1591
1955
 
1592
- `GET /api/v1/account/tenant/orgList`
1956
+ ## post__api_v1_account_admin_addApplication
1593
1957
 
1594
- <h3 id="get__api_v1_account_tenant_orglist-responses">Responses</h3>
1958
+ `POST /api/v1/account/admin/addApplication`
1595
1959
 
1596
- |Status|Meaning|Description|Schema|
1597
- |---|---|---|---|
1598
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
1960
+ *添加应用*
1599
1961
 
1600
- <aside class="success">
1601
- This operation does not require authentication
1602
- </aside>
1962
+ > Body parameter
1603
1963
 
1604
- ## get__api_v1_account_getUserInfo
1964
+ ```json
1965
+ {
1966
+ "type": "object",
1967
+ "required": [
1968
+ "name",
1969
+ "code"
1970
+ ],
1971
+ "properties": {
1972
+ "name": {
1973
+ "type": "string"
1974
+ },
1975
+ "url": {
1976
+ "type": "string"
1977
+ },
1978
+ "avatar": {
1979
+ "type": "string"
1980
+ },
1981
+ "code": {
1982
+ "type": "string"
1983
+ },
1984
+ "description": {
1985
+ "type": "string"
1986
+ }
1987
+ }
1988
+ }
1989
+ ```
1605
1990
 
1606
- `GET /api/v1/account/getUserInfo`
1991
+ <h3 id="post__api_v1_account_admin_addapplication-parameters">Parameters</h3>
1607
1992
 
1608
- <h3 id="get__api_v1_account_getuserinfo-responses">Responses</h3>
1993
+ |Name|In|Type|Required|Description|
1994
+ |---|---|---|---|---|
1995
+ |body|body|object|true|none|
1996
+ |» name|body|string|true|none|
1997
+ |» url|body|string|false|none|
1998
+ |» avatar|body|string|false|none|
1999
+ |» code|body|string|true|none|
2000
+ |» description|body|string|false|none|
2001
+
2002
+ <h3 id="post__api_v1_account_admin_addapplication-responses">Responses</h3>
1609
2003
 
1610
2004
  |Status|Meaning|Description|Schema|
1611
2005
  |---|---|---|---|
@@ -1615,9 +2009,11 @@ This operation does not require authentication
1615
2009
  This operation does not require authentication
1616
2010
  </aside>
1617
2011
 
1618
- ## post__api_v1_account_setCurrentTenantId
2012
+ ## post__api_v1_account_admin_saveApplication
1619
2013
 
1620
- `POST /api/v1/account/setCurrentTenantId`
2014
+ `POST /api/v1/account/admin/saveApplication`
2015
+
2016
+ *修改应用*
1621
2017
 
1622
2018
  > Body parameter
1623
2019
 
@@ -1625,24 +2021,46 @@ This operation does not require authentication
1625
2021
  {
1626
2022
  "type": "object",
1627
2023
  "required": [
1628
- "tenantId"
2024
+ "id",
2025
+ "name",
2026
+ "code"
1629
2027
  ],
1630
2028
  "properties": {
1631
- "tenantId": {
2029
+ "id": {
2030
+ "type": "string"
2031
+ },
2032
+ "url": {
2033
+ "type": "string"
2034
+ },
2035
+ "name": {
2036
+ "type": "string"
2037
+ },
2038
+ "avatar": {
2039
+ "type": "string"
2040
+ },
2041
+ "code": {
2042
+ "type": "string"
2043
+ },
2044
+ "description": {
1632
2045
  "type": "string"
1633
2046
  }
1634
2047
  }
1635
2048
  }
1636
2049
  ```
1637
2050
 
1638
- <h3 id="post__api_v1_account_setcurrenttenantid-parameters">Parameters</h3>
2051
+ <h3 id="post__api_v1_account_admin_saveapplication-parameters">Parameters</h3>
1639
2052
 
1640
2053
  |Name|In|Type|Required|Description|
1641
2054
  |---|---|---|---|---|
1642
2055
  |body|body|object|true|none|
1643
- tenantId|body|string|true|none|
2056
+ id|body|string|true|none|
2057
+ |» url|body|string|false|none|
2058
+ |» name|body|string|true|none|
2059
+ |» avatar|body|string|false|none|
2060
+ |» code|body|string|true|none|
2061
+ |» description|body|string|false|none|
1644
2062
 
1645
- <h3 id="post__api_v1_account_setcurrenttenantid-responses">Responses</h3>
2063
+ <h3 id="post__api_v1_account_admin_saveapplication-responses">Responses</h3>
1646
2064
 
1647
2065
  |Status|Meaning|Description|Schema|
1648
2066
  |---|---|---|---|
@@ -1652,13 +2070,11 @@ This operation does not require authentication
1652
2070
  This operation does not require authentication
1653
2071
  </aside>
1654
2072
 
1655
- <h1 id="-kne-fastify-account--">账号</h1>
1656
-
1657
- ## post__api_v1_account_sendEmailCode
2073
+ ## post__api_v1_account_admin_deleteApplication
1658
2074
 
1659
- `POST /api/v1/account/sendEmailCode`
2075
+ `POST /api/v1/account/admin/deleteApplication`
1660
2076
 
1661
- *发送邮箱验证码*
2077
+ *删除应用*
1662
2078
 
1663
2079
  > Body parameter
1664
2080
 
@@ -1666,63 +2082,60 @@ This operation does not require authentication
1666
2082
  {
1667
2083
  "type": "object",
1668
2084
  "required": [
1669
- "email"
2085
+ "id"
1670
2086
  ],
1671
2087
  "properties": {
1672
- "email": {
1673
- "type": "string",
1674
- "description": "邮箱"
2088
+ "id": {
2089
+ "type": "string"
1675
2090
  }
1676
2091
  }
1677
2092
  }
1678
2093
  ```
1679
2094
 
1680
- <h3 id="post__api_v1_account_sendemailcode-parameters">Parameters</h3>
2095
+ <h3 id="post__api_v1_account_admin_deleteapplication-parameters">Parameters</h3>
1681
2096
 
1682
2097
  |Name|In|Type|Required|Description|
1683
2098
  |---|---|---|---|---|
1684
2099
  |body|body|object|true|none|
1685
- email|body|string|true|邮箱|
2100
+ id|body|string|true|none|
1686
2101
 
1687
- > Example responses
2102
+ <h3 id="post__api_v1_account_admin_deleteapplication-responses">Responses</h3>
1688
2103
 
1689
- > 200 Response
2104
+ |Status|Meaning|Description|Schema|
2105
+ |---|---|---|---|
2106
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
1690
2107
 
1691
- ```json
1692
- {
1693
- "type": "object",
1694
- "properties": {
1695
- "code": {
1696
- "type": "string",
1697
- "description": "验证码"
1698
- }
1699
- }
1700
- }
1701
- ```
2108
+ <aside class="success">
2109
+ This operation does not require authentication
2110
+ </aside>
1702
2111
 
1703
- <h3 id="post__api_v1_account_sendemailcode-responses">Responses</h3>
2112
+ ## get__api_v1_account_admin_getApplicationList
1704
2113
 
1705
- |Status|Meaning|Description|Schema|
1706
- |---|---|---|---|
1707
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|Inline|
2114
+ `GET /api/v1/account/admin/getApplicationList`
1708
2115
 
1709
- <h3 id="post__api_v1_account_sendemailcode-responseschema">Response Schema</h3>
2116
+ *获取应用列表*
1710
2117
 
1711
- Status Code **200**
2118
+ <h3 id="get__api_v1_account_admin_getapplicationlist-parameters">Parameters</h3>
1712
2119
 
1713
- |Name|Type|Required|Restrictions|Description|
2120
+ |Name|In|Type|Required|Description|
1714
2121
  |---|---|---|---|---|
1715
- |» code|string|false|none|验证码|
2122
+ |tenantId|query|string|false|none|
2123
+
2124
+ <h3 id="get__api_v1_account_admin_getapplicationlist-responses">Responses</h3>
2125
+
2126
+ |Status|Meaning|Description|Schema|
2127
+ |---|---|---|---|
2128
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
1716
2129
 
1717
2130
  <aside class="success">
1718
2131
  This operation does not require authentication
1719
2132
  </aside>
1720
2133
 
1721
- ## post__api_v1_account_sendSMSCode
2134
+ ## post__api_v1_account_admin_addPermission
1722
2135
 
1723
- `POST /api/v1/account/sendSMSCode`
2136
+ `POST /api/v1/account/admin/addPermission`
1724
2137
 
1725
- *发送短信验证码*
2138
+ *添加应用权限*
1726
2139
 
1727
2140
  > Body parameter
1728
2141
 
@@ -1730,167 +2143,75 @@ This operation does not require authentication
1730
2143
  {
1731
2144
  "type": "object",
1732
2145
  "required": [
1733
- "phone"
1734
- ],
1735
- "properties": {
1736
- "phone": {
1737
- "type": "string",
1738
- "description": "电话"
1739
- }
1740
- }
1741
- }
1742
- ```
1743
-
1744
- <h3 id="post__api_v1_account_sendsmscode-parameters">Parameters</h3>
1745
-
1746
- |Name|In|Type|Required|Description|
1747
- |---|---|---|---|---|
1748
- |body|body|object|true|none|
1749
- |» phone|body|string|true|电话|
1750
-
1751
- > Example responses
1752
-
1753
- > 200 Response
1754
-
1755
- ```json
1756
- {
1757
- "type": "object",
1758
- "properties": {
1759
- "code": {
1760
- "type": "string",
1761
- "description": "验证码"
1762
- }
1763
- }
1764
- }
1765
- ```
1766
-
1767
- <h3 id="post__api_v1_account_sendsmscode-responses">Responses</h3>
1768
-
1769
- |Status|Meaning|Description|Schema|
1770
- |---|---|---|---|
1771
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|Inline|
1772
-
1773
- <h3 id="post__api_v1_account_sendsmscode-responseschema">Response Schema</h3>
1774
-
1775
- Status Code **200**
1776
-
1777
- |Name|Type|Required|Restrictions|Description|
1778
- |---|---|---|---|---|
1779
- |» code|string|false|none|验证码|
1780
-
1781
- <aside class="success">
1782
- This operation does not require authentication
1783
- </aside>
1784
-
1785
- ## post__api_v1_account_validateCode
1786
-
1787
- `POST /api/v1/account/validateCode`
1788
-
1789
- *验证码验证*
1790
-
1791
- > Body parameter
1792
-
1793
- ```json
1794
- {
1795
- "type": "object",
1796
- "required": [
1797
- "name",
1798
- "type",
1799
- "code"
2146
+ "applicationId",
2147
+ "name",
2148
+ "code"
1800
2149
  ],
1801
2150
  "properties": {
2151
+ "applicationId": {
2152
+ "type": "string"
2153
+ },
1802
2154
  "name": {
1803
- "type": "string",
1804
- "description": "被验证的账号,手机或邮箱"
2155
+ "type": "string"
2156
+ },
2157
+ "code": {
2158
+ "type": "string"
1805
2159
  },
1806
2160
  "type": {
1807
- "type": "number",
1808
- "description": "0:手机注册,1:邮箱注册,2:手机登录,3:邮箱登录,4:验证租户管理员"
2161
+ "type": "number"
1809
2162
  },
1810
- "code": {
1811
- "type": "string",
1812
- "description": "接受到的验证码"
2163
+ "isModule": {
2164
+ "type": "number"
2165
+ },
2166
+ "isMust": {
2167
+ "type": "number"
2168
+ },
2169
+ "pid": {
2170
+ "type": "number"
2171
+ },
2172
+ "description": {
2173
+ "type": "string"
1813
2174
  }
1814
2175
  }
1815
2176
  }
1816
2177
  ```
1817
2178
 
1818
- <h3 id="post__api_v1_account_validatecode-parameters">Parameters</h3>
2179
+ <h3 id="post__api_v1_account_admin_addpermission-parameters">Parameters</h3>
1819
2180
 
1820
2181
  |Name|In|Type|Required|Description|
1821
2182
  |---|---|---|---|---|
1822
2183
  |body|body|object|true|none|
1823
- name|body|string|true|被验证的账号,手机或邮箱|
1824
- type|body|number|true|0:手机注册,1:邮箱注册,2:手机登录,3:邮箱登录,4:验证租户管理员|
1825
- |» code|body|string|true|接受到的验证码|
1826
-
1827
- > Example responses
1828
-
1829
- > 200 Response
1830
-
1831
- ```json
1832
- {
1833
- "type": "object",
1834
- "properties": {}
1835
- }
1836
- ```
2184
+ applicationId|body|string|true|none|
2185
+ name|body|string|true|none|
2186
+ |» code|body|string|true|none|
2187
+ |» type|body|number|false|none|
2188
+ isModule|body|number|false|none|
2189
+ |» isMust|body|number|false|none|
2190
+ pid|body|number|false|none|
2191
+ |» description|body|string|false|none|
1837
2192
 
1838
- <h3 id="post__api_v1_account_validatecode-responses">Responses</h3>
2193
+ <h3 id="post__api_v1_account_admin_addpermission-responses">Responses</h3>
1839
2194
 
1840
2195
  |Status|Meaning|Description|Schema|
1841
2196
  |---|---|---|---|
1842
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|Inline|
1843
-
1844
- <h3 id="post__api_v1_account_validatecode-responseschema">Response Schema</h3>
2197
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
1845
2198
 
1846
2199
  <aside class="success">
1847
2200
  This operation does not require authentication
1848
2201
  </aside>
1849
2202
 
1850
- ## post__api_v1_account_accountIsExists
1851
-
1852
- `POST /api/v1/account/accountIsExists`
1853
-
1854
- *账号是否已存在*
2203
+ ## get__api_v1_account_admin_getPermissionList
1855
2204
 
1856
- > Body parameter
2205
+ `GET /api/v1/account/admin/getPermissionList`
1857
2206
 
1858
- ```json
1859
- {
1860
- "oneOf": [
1861
- {
1862
- "type": "object",
1863
- "required": [
1864
- "phone"
1865
- ],
1866
- "properties": {
1867
- "phone": {
1868
- "type": "string",
1869
- "description": "电话"
1870
- }
1871
- }
1872
- },
1873
- {
1874
- "type": "object",
1875
- "required": [
1876
- "email"
1877
- ],
1878
- "properties": {
1879
- "email": {
1880
- "type": "string",
1881
- "description": "邮箱"
1882
- }
1883
- }
1884
- }
1885
- ]
1886
- }
1887
- ```
2207
+ *获取应用权限列表*
1888
2208
 
1889
- <h3 id="post__api_v1_account_accountisexists-parameters">Parameters</h3>
2209
+ <h3 id="get__api_v1_account_admin_getpermissionlist-parameters">Parameters</h3>
1890
2210
 
1891
2211
  |Name|In|Type|Required|Description|
1892
2212
  |---|---|---|---|---|
1893
- |body|body|any|false|none|
2213
+ |applicationId|query|string|true|none|
2214
+ |tenantId|query|string|false|none|
1894
2215
 
1895
2216
  > Example responses
1896
2217
 
@@ -1898,177 +2219,92 @@ This operation does not require authentication
1898
2219
 
1899
2220
  ```json
1900
2221
  {
1901
- "type": "object",
1902
- "properties": {
1903
- "isExists": {
1904
- "type": "boolean",
1905
- "description": "true已存在,false不存在"
1906
- }
1907
- }
1908
- }
1909
- ```
1910
-
1911
- <h3 id="post__api_v1_account_accountisexists-responses">Responses</h3>
1912
-
1913
- |Status|Meaning|Description|Schema|
1914
- |---|---|---|---|
1915
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|Inline|
1916
-
1917
- <h3 id="post__api_v1_account_accountisexists-responseschema">Response Schema</h3>
1918
-
1919
- Status Code **200**
1920
-
1921
- |Name|Type|Required|Restrictions|Description|
1922
- |---|---|---|---|---|
1923
- isExists|boolean|false|none|true已存在,false不存在|
1924
-
1925
- <aside class="success">
1926
- This operation does not require authentication
1927
- </aside>
1928
-
1929
- ## post__api_v1_account_register
1930
-
1931
- `POST /api/v1/account/register`
1932
-
1933
- *注册账号*
1934
-
1935
- > Body parameter
1936
-
1937
- ```json
1938
- {
1939
- "oneOf": [
1940
- {
1941
- "type": "object",
1942
- "required": [
1943
- "phone",
1944
- "password",
1945
- "code"
1946
- ],
1947
- "properties": {
1948
- "avatar": {
1949
- "type": "string",
1950
- "description": "头像图片id"
1951
- },
1952
- "phone": {
1953
- "type": "string",
1954
- "description": "电话"
1955
- },
1956
- "code": {
1957
- "type": "string",
1958
- "description": "验证码"
1959
- },
1960
- "password": {
1961
- "type": "string",
1962
- "description": "密码(需要md5加密)"
1963
- },
1964
- "invitationCode": {
1965
- "type": "string",
1966
- "description": "邀请码,用来默认加入租户"
1967
- },
1968
- "nickname": {
1969
- "type": "string",
1970
- "description": "昵称"
1971
- },
1972
- "gender": {
1973
- "type": "string",
1974
- "description": "性别"
1975
- },
1976
- "birthday": {
1977
- "type": "string",
1978
- "format": "date",
1979
- "description": "出生日期"
1980
- },
1981
- "description": {
1982
- "type": "string",
1983
- "description": "个人简介"
1984
- }
1985
- }
1986
- },
1987
- {
1988
- "type": "object",
1989
- "required": [
1990
- "email",
1991
- "password",
1992
- "code"
1993
- ],
1994
- "properties": {
1995
- "avatar": {
1996
- "type": "string",
1997
- "description": "头像图片id"
1998
- },
1999
- "email": {
2000
- "type": "string",
2001
- "description": "邮箱"
2002
- },
2003
- "code": {
2004
- "type": "string",
2005
- "description": "验证码"
2006
- },
2007
- "password": {
2008
- "type": "string",
2009
- "description": "密码(需要md5加密)"
2010
- },
2011
- "invitationCode": {
2012
- "type": "string",
2013
- "description": "邀请码,用来默认加入租户"
2014
- },
2015
- "nickname": {
2016
- "type": "string",
2017
- "description": "昵称"
2018
- },
2019
- "gender": {
2020
- "type": "string",
2021
- "description": "性别"
2022
- },
2023
- "birthday": {
2024
- "type": "string",
2025
- "format": "date",
2026
- "description": "出生日期"
2027
- },
2028
- "description": {
2029
- "type": "string",
2030
- "description": "个人简介"
2222
+ "type": "array",
2223
+ "items": {
2224
+ "type": "object",
2225
+ "properties": {
2226
+ "id": {
2227
+ "type": "number"
2228
+ },
2229
+ "code": {
2230
+ "type": "string"
2231
+ },
2232
+ "name": {
2233
+ "type": "string"
2234
+ },
2235
+ "isModule": {
2236
+ "type": "number"
2237
+ },
2238
+ "isMust": {
2239
+ "type": "number"
2240
+ },
2241
+ "type": {
2242
+ "type": "number"
2243
+ },
2244
+ "pid": {
2245
+ "type": "number"
2246
+ },
2247
+ "paths": {
2248
+ "type": "array",
2249
+ "items": {
2250
+ "type": "number"
2031
2251
  }
2252
+ },
2253
+ "description": {
2254
+ "type": "string"
2255
+ },
2256
+ "status": {
2257
+ "type": "number"
2258
+ },
2259
+ "createdAt": {
2260
+ "type": "string"
2261
+ },
2262
+ "updatedAt": {
2263
+ "type": "string"
2264
+ },
2265
+ "deletedAt": {
2266
+ "type": "string"
2032
2267
  }
2033
2268
  }
2034
- ]
2035
- }
2036
- ```
2037
-
2038
- <h3 id="post__api_v1_account_register-parameters">Parameters</h3>
2039
-
2040
- |Name|In|Type|Required|Description|
2041
- |---|---|---|---|---|
2042
- |body|body|any|false|none|
2043
-
2044
- > Example responses
2045
-
2046
- > 200 Response
2047
-
2048
- ```json
2049
- {
2050
- "type": "object",
2051
- "properties": {}
2269
+ }
2052
2270
  }
2053
2271
  ```
2054
2272
 
2055
- <h3 id="post__api_v1_account_register-responses">Responses</h3>
2273
+ <h3 id="get__api_v1_account_admin_getpermissionlist-responses">Responses</h3>
2056
2274
 
2057
2275
  |Status|Meaning|Description|Schema|
2058
2276
  |---|---|---|---|
2059
2277
  |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|Inline|
2060
2278
 
2061
- <h3 id="post__api_v1_account_register-responseschema">Response Schema</h3>
2279
+ <h3 id="get__api_v1_account_admin_getpermissionlist-responseschema">Response Schema</h3>
2280
+
2281
+ Status Code **200**
2282
+
2283
+ |Name|Type|Required|Restrictions|Description|
2284
+ |---|---|---|---|---|
2285
+ |» id|number|false|none|none|
2286
+ |» code|string|false|none|none|
2287
+ |» name|string|false|none|none|
2288
+ |» isModule|number|false|none|none|
2289
+ |» isMust|number|false|none|none|
2290
+ |» type|number|false|none|none|
2291
+ |» pid|number|false|none|none|
2292
+ |» paths|[number]|false|none|none|
2293
+ |» description|string|false|none|none|
2294
+ |» status|number|false|none|none|
2295
+ |» createdAt|string|false|none|none|
2296
+ |» updatedAt|string|false|none|none|
2297
+ |» deletedAt|string|false|none|none|
2062
2298
 
2063
2299
  <aside class="success">
2064
2300
  This operation does not require authentication
2065
2301
  </aside>
2066
2302
 
2067
- ## post__api_v1_account_login
2303
+ ## post__api_v1_account_admin_exportPermissionList
2068
2304
 
2069
- `POST /api/v1/account/login`
2305
+ `POST /api/v1/account/admin/exportPermissionList`
2070
2306
 
2071
- *登录*
2307
+ *导出应用权限列表*
2072
2308
 
2073
2309
  > Body parameter
2074
2310
 
@@ -2076,29 +2312,29 @@ This operation does not require authentication
2076
2312
  {
2077
2313
  "type": "object",
2078
2314
  "required": [
2079
- "username",
2080
- "password"
2315
+ "applicationIds"
2081
2316
  ],
2082
2317
  "properties": {
2083
- "username": {
2084
- "type": "string",
2085
- "description": "用户名"
2318
+ "applicationIds": {
2319
+ "type": "array",
2320
+ "items": {
2321
+ "type": "string"
2322
+ }
2086
2323
  },
2087
- "password": {
2088
- "type": "string",
2089
- "description": "密码"
2324
+ "tenantId": {
2325
+ "type": "string"
2090
2326
  }
2091
2327
  }
2092
2328
  }
2093
2329
  ```
2094
2330
 
2095
- <h3 id="post__api_v1_account_login-parameters">Parameters</h3>
2331
+ <h3 id="post__api_v1_account_admin_exportpermissionlist-parameters">Parameters</h3>
2096
2332
 
2097
2333
  |Name|In|Type|Required|Description|
2098
2334
  |---|---|---|---|---|
2099
2335
  |body|body|object|true|none|
2100
- username|body|string|true|用户名|
2101
- password|body|string|true|密码|
2336
+ applicationIds|body|[string]|true|none|
2337
+ tenantId|body|string|false|none|
2102
2338
 
2103
2339
  > Example responses
2104
2340
 
@@ -2106,151 +2342,141 @@ This operation does not require authentication
2106
2342
 
2107
2343
  ```json
2108
2344
  {
2109
- "type": "object",
2110
- "properties": {
2111
- "token": {
2112
- "type": "string",
2113
- "description": "用户token"
2114
- },
2115
- "currentTenantId": {
2116
- "type": "string",
2117
- "description": "当前租户id"
2345
+ "type": "array",
2346
+ "items": {
2347
+ "type": "object",
2348
+ "properties": {
2349
+ "code": {
2350
+ "type": "string"
2351
+ },
2352
+ "name": {
2353
+ "type": "string"
2354
+ },
2355
+ "url": {
2356
+ "type": "string"
2357
+ },
2358
+ "description": {
2359
+ "type": "string"
2360
+ },
2361
+ "status": {
2362
+ "type": "number"
2363
+ },
2364
+ "permissions": {
2365
+ "type": "array",
2366
+ "items": {
2367
+ "type": "object",
2368
+ "properties": {
2369
+ "id": {
2370
+ "type": "number"
2371
+ },
2372
+ "code": {
2373
+ "type": "string"
2374
+ },
2375
+ "name": {
2376
+ "type": "string"
2377
+ },
2378
+ "isModule": {
2379
+ "type": "number"
2380
+ },
2381
+ "isMust": {
2382
+ "type": "number"
2383
+ },
2384
+ "type": {
2385
+ "type": "number"
2386
+ },
2387
+ "pid": {
2388
+ "type": "number"
2389
+ },
2390
+ "description": {
2391
+ "type": "string"
2392
+ },
2393
+ "status": {
2394
+ "type": "number"
2395
+ }
2396
+ }
2397
+ }
2398
+ }
2118
2399
  }
2119
2400
  }
2120
2401
  }
2121
2402
  ```
2122
2403
 
2123
- <h3 id="post__api_v1_account_login-responses">Responses</h3>
2404
+ <h3 id="post__api_v1_account_admin_exportpermissionlist-responses">Responses</h3>
2124
2405
 
2125
2406
  |Status|Meaning|Description|Schema|
2126
2407
  |---|---|---|---|
2127
2408
  |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|Inline|
2128
2409
 
2129
- <h3 id="post__api_v1_account_login-responseschema">Response Schema</h3>
2410
+ <h3 id="post__api_v1_account_admin_exportpermissionlist-responseschema">Response Schema</h3>
2130
2411
 
2131
2412
  Status Code **200**
2132
2413
 
2133
2414
  |Name|Type|Required|Restrictions|Description|
2134
2415
  |---|---|---|---|---|
2135
- token|string|false|none|用户token|
2136
- currentTenantId|string|false|none|当前租户id|
2137
-
2138
- <aside class="success">
2139
- This operation does not require authentication
2140
- </aside>
2141
-
2142
- <h1 id="-kne-fastify-account--">管理后台</h1>
2143
-
2144
- ## post__api_v1_account_initSuperAdmin
2145
-
2146
- `POST /api/v1/account/initSuperAdmin`
2147
-
2148
- *初始化用户为管理员*
2149
-
2150
- 用于系统初始化时,设置第一个用户,只能使用一次,其他用户由该用户创建
2151
-
2152
- <h3 id="post__api_v1_account_initsuperadmin-responses">Responses</h3>
2153
-
2154
- |Status|Meaning|Description|Schema|
2155
- |---|---|---|---|
2156
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
2416
+ code|string|false|none|none|
2417
+ name|string|false|none|none|
2418
+ |» url|string|false|none|none|
2419
+ description|string|false|none|none|
2420
+ status|number|false|none|none|
2421
+ |» permissions|[object]|false|none|none|
2422
+ |»» id|number|false|none|none|
2423
+ |»» code|string|false|none|none|
2424
+ |»» name|string|false|none|none|
2425
+ |»» isModule|number|false|none|none|
2426
+ |»» isMust|number|false|none|none|
2427
+ |»» type|number|false|none|none|
2428
+ |»» pid|number|false|none|none|
2429
+ |»» description|string|false|none|none|
2430
+ |»» status|number|false|none|none|
2157
2431
 
2158
2432
  <aside class="success">
2159
2433
  This operation does not require authentication
2160
2434
  </aside>
2161
2435
 
2162
- ## get__api_v1_account_admin_getSuperAdminInfo
2163
-
2164
- `GET /api/v1/account/admin/getSuperAdminInfo`
2436
+ ## post__api_v1_account_admin_deletePermission
2165
2437
 
2166
- *获取管理员信息*
2438
+ `POST /api/v1/account/admin/deletePermission`
2167
2439
 
2168
- > Example responses
2440
+ *删除应用权限*
2169
2441
 
2170
- > 200 Response
2442
+ > Body parameter
2171
2443
 
2172
2444
  ```json
2173
2445
  {
2174
2446
  "type": "object",
2447
+ "required": [
2448
+ "id"
2449
+ ],
2175
2450
  "properties": {
2176
- "userInfo": {
2177
- "type": "object",
2178
- "properties": {
2179
- "id": {
2180
- "type": "string",
2181
- "description": "用户id"
2182
- },
2183
- "nickname": {
2184
- "type": "string",
2185
- "description": "用户昵称"
2186
- },
2187
- "email": {
2188
- "type": "string",
2189
- "description": "邮箱"
2190
- },
2191
- "phone": {
2192
- "type": "string",
2193
- "description": "电话"
2194
- },
2195
- "gender": {
2196
- "type": "string",
2197
- "description": "性别"
2198
- },
2199
- "birthday": {
2200
- "type": "string",
2201
- "format": "date",
2202
- "description": "出生日期"
2203
- },
2204
- "description": {
2205
- "type": "string",
2206
- "description": "个人简介"
2207
- },
2208
- "currentTenantId": {
2209
- "type": "string",
2210
- "description": "当前租户ID"
2211
- },
2212
- "status": {
2213
- "type": "number",
2214
- "description": "状态"
2215
- }
2216
- }
2451
+ "id": {
2452
+ "type": "string"
2217
2453
  }
2218
2454
  }
2219
2455
  }
2220
2456
  ```
2221
2457
 
2222
- <h3 id="get__api_v1_account_admin_getsuperadmininfo-responses">Responses</h3>
2223
-
2224
- |Status|Meaning|Description|Schema|
2225
- |---|---|---|---|
2226
- |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|Inline|
2458
+ <h3 id="post__api_v1_account_admin_deletepermission-parameters">Parameters</h3>
2227
2459
 
2228
- <h3 id="get__api_v1_account_admin_getsuperadmininfo-responseschema">Response Schema</h3>
2460
+ |Name|In|Type|Required|Description|
2461
+ |---|---|---|---|---|
2462
+ |body|body|object|true|none|
2463
+ |» id|body|string|true|none|
2229
2464
 
2230
- Status Code **200**
2465
+ <h3 id="post__api_v1_account_admin_deletepermission-responses">Responses</h3>
2231
2466
 
2232
- |Name|Type|Required|Restrictions|Description|
2233
- |---|---|---|---|---|
2234
- |» userInfo|object|false|none|none|
2235
- |»» id|string|false|none|用户id|
2236
- |»» nickname|string|false|none|用户昵称|
2237
- |»» email|string|false|none|邮箱|
2238
- |»» phone|string|false|none|电话|
2239
- |»» gender|string|false|none|性别|
2240
- |»» birthday|string(date)|false|none|出生日期|
2241
- |»» description|string|false|none|个人简介|
2242
- |»» currentTenantId|string|false|none|当前租户ID|
2243
- |»» status|number|false|none|状态|
2467
+ |Status|Meaning|Description|Schema|
2468
+ |---|---|---|---|
2469
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
2244
2470
 
2245
2471
  <aside class="success">
2246
2472
  This operation does not require authentication
2247
2473
  </aside>
2248
2474
 
2249
- ## post__api_v1_account_admin_setSuperAdmin
2475
+ ## post__api_v1_account_admin_savePermission
2250
2476
 
2251
- `POST /api/v1/account/admin/setSuperAdmin`
2477
+ `POST /api/v1/account/admin/savePermission`
2252
2478
 
2253
- *设置用户为超级管理员*
2479
+ *修改应用权限*
2254
2480
 
2255
2481
  > Body parameter
2256
2482
 
@@ -2258,31 +2484,40 @@ This operation does not require authentication
2258
2484
  {
2259
2485
  "type": "object",
2260
2486
  "required": [
2261
- "status",
2262
- "userId"
2487
+ "id"
2263
2488
  ],
2264
2489
  "properties": {
2265
- "status": {
2266
- "type": "boolean",
2267
- "description": "true:将用户设置为超级管理员,false:取消用户超级管理员"
2490
+ "id": {
2491
+ "type": "string"
2268
2492
  },
2269
- "userId": {
2270
- "type": "string",
2271
- "description": "用户ID"
2493
+ "name": {
2494
+ "type": "string"
2495
+ },
2496
+ "type": {
2497
+ "type": "number"
2498
+ },
2499
+ "isMust": {
2500
+ "type": "number"
2501
+ },
2502
+ "description": {
2503
+ "type": "string"
2272
2504
  }
2273
2505
  }
2274
2506
  }
2275
2507
  ```
2276
2508
 
2277
- <h3 id="post__api_v1_account_admin_setsuperadmin-parameters">Parameters</h3>
2509
+ <h3 id="post__api_v1_account_admin_savepermission-parameters">Parameters</h3>
2278
2510
 
2279
2511
  |Name|In|Type|Required|Description|
2280
2512
  |---|---|---|---|---|
2281
2513
  |body|body|object|true|none|
2282
- status|body|boolean|true|true:将用户设置为超级管理员,false:取消用户超级管理员|
2283
- userId|body|string|true|用户ID|
2514
+ id|body|string|true|none|
2515
+ name|body|string|false|none|
2516
+ |» type|body|number|false|none|
2517
+ |» isMust|body|number|false|none|
2518
+ |» description|body|string|false|none|
2284
2519
 
2285
- <h3 id="post__api_v1_account_admin_setsuperadmin-responses">Responses</h3>
2520
+ <h3 id="post__api_v1_account_admin_savepermission-responses">Responses</h3>
2286
2521
 
2287
2522
  |Status|Meaning|Description|Schema|
2288
2523
  |---|---|---|---|
@@ -2292,13 +2527,33 @@ This operation does not require authentication
2292
2527
  This operation does not require authentication
2293
2528
  </aside>
2294
2529
 
2295
- <h1 id="-kne-fastify-account--">管理后台-权限</h1>
2530
+ ## get__api_v1_account_admin_getTenantPermissionList
2296
2531
 
2297
- ## post__api_v1_account_admin_addApplication
2532
+ `GET /api/v1/account/admin/getTenantPermissionList`
2298
2533
 
2299
- `POST /api/v1/account/admin/addApplication`
2534
+ *获取租户应用权限配置*
2300
2535
 
2301
- *添加应用*
2536
+ <h3 id="get__api_v1_account_admin_gettenantpermissionlist-parameters">Parameters</h3>
2537
+
2538
+ |Name|In|Type|Required|Description|
2539
+ |---|---|---|---|---|
2540
+ |tenantId|query|string|true|none|
2541
+
2542
+ <h3 id="get__api_v1_account_admin_gettenantpermissionlist-responses">Responses</h3>
2543
+
2544
+ |Status|Meaning|Description|Schema|
2545
+ |---|---|---|---|
2546
+ |200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Default Response|None|
2547
+
2548
+ <aside class="success">
2549
+ This operation does not require authentication
2550
+ </aside>
2551
+
2552
+ ## post__api_v1_account_admin_saveTenantPermissionList
2553
+
2554
+ `POST /api/v1/account/admin/saveTenantPermissionList`
2555
+
2556
+ *修改租户应用权限配置*
2302
2557
 
2303
2558
  > Body parameter
2304
2559
 
@@ -2306,41 +2561,40 @@ This operation does not require authentication
2306
2561
  {
2307
2562
  "type": "object",
2308
2563
  "required": [
2309
- "name",
2310
- "code"
2564
+ "tenantId",
2565
+ "applications",
2566
+ "permissions"
2311
2567
  ],
2312
2568
  "properties": {
2313
- "name": {
2314
- "type": "string"
2315
- },
2316
- "url": {
2317
- "type": "string"
2318
- },
2319
- "avatar": {
2569
+ "tenantId": {
2320
2570
  "type": "string"
2321
2571
  },
2322
- "code": {
2323
- "type": "string"
2572
+ "applications": {
2573
+ "type": "array",
2574
+ "items": {
2575
+ "type": "string"
2576
+ }
2324
2577
  },
2325
- "description": {
2326
- "type": "string"
2578
+ "permissions": {
2579
+ "type": "array",
2580
+ "items": {
2581
+ "type": "number"
2582
+ }
2327
2583
  }
2328
2584
  }
2329
2585
  }
2330
2586
  ```
2331
2587
 
2332
- <h3 id="post__api_v1_account_admin_addapplication-parameters">Parameters</h3>
2588
+ <h3 id="post__api_v1_account_admin_savetenantpermissionlist-parameters">Parameters</h3>
2333
2589
 
2334
2590
  |Name|In|Type|Required|Description|
2335
2591
  |---|---|---|---|---|
2336
2592
  |body|body|object|true|none|
2337
- name|body|string|true|none|
2338
- url|body|string|false|none|
2339
- avatar|body|string|false|none|
2340
- |» code|body|string|true|none|
2341
- |» description|body|string|false|none|
2593
+ tenantId|body|string|true|none|
2594
+ applications|body|[string]|true|none|
2595
+ permissions|body|[number]|true|none|
2342
2596
 
2343
- <h3 id="post__api_v1_account_admin_addapplication-responses">Responses</h3>
2597
+ <h3 id="post__api_v1_account_admin_savetenantpermissionlist-responses">Responses</h3>
2344
2598
 
2345
2599
  |Status|Meaning|Description|Schema|
2346
2600
  |---|---|---|---|