api.fluff4.me 1.0.505 → 1.0.506

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.
Files changed (3) hide show
  1. package/index.d.ts +17 -16
  2. package/openapi.json +128 -115
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -41,6 +41,7 @@ export interface AuthorSelf {
41
41
  patreon_patron?: Authorisation | null
42
42
  works?: Work[] | null
43
43
  settings?: string | null
44
+ roles?: Role[] | null
44
45
  }
45
46
 
46
47
  export interface TextBody {
@@ -88,6 +89,16 @@ export interface Work {
88
89
  global_tags?: string[] | null
89
90
  }
90
91
 
92
+ export interface Role {
93
+ name: string
94
+ description?: string | null
95
+ level: string
96
+ created_time?: string | null
97
+ privileges: Privilege[]
98
+ }
99
+
100
+ export type Privilege = "PrivilegeGrant" | "PrivilegeRevoke" | "RoleCreate" | "RoleEdit" | "RoleDelete" | "RoleReorder" | "RoleGrant" | "RoleRevoke" | "WorkViewPrivate" | "PrivilegeViewAuthor" | "RoleViewAll" | "TagGlobalCreate" | "TagGlobalDelete" | "TagGlobalUpdate" | "TagCategoryCreate" | "TagCategoryUpdate" | "TagCategoryDelete" | "TagCustomCreate" | "TagCustomUpdate" | "TagCustomDelete" | "TagPromote" | "TagDemote" | "TagAliasAdd" | "TagAliasRemove" | "TagRelationshipAdd" | "TagRelationshipRemove"
101
+
91
102
  export interface AuthDeleteBody {
92
103
  id: string
93
104
  }
@@ -348,22 +359,12 @@ export interface Privileges {
348
359
  privileges: Privilege[]
349
360
  }
350
361
 
351
- export type Privilege = "PrivilegeGrant" | "PrivilegeRevoke" | "RoleCreate" | "RoleEdit" | "RoleDelete" | "RoleReorder" | "RoleGrant" | "RoleRevoke" | "WorkViewPrivate" | "PrivilegeViewAuthor" | "RoleViewAll" | "TagGlobalCreate" | "TagGlobalDelete" | "TagGlobalUpdate" | "TagCategoryCreate" | "TagCategoryUpdate" | "TagCategoryDelete" | "TagCustomCreate" | "TagCustomUpdate" | "TagCustomDelete" | "TagPromote" | "TagDemote" | "TagAliasAdd" | "TagAliasRemove" | "TagRelationshipAdd" | "TagRelationshipRemove"
352
-
353
362
  export interface RoleCreateBody {
354
363
  name: string
355
364
  description?: string | null
356
365
  below?: string | null
357
366
  }
358
367
 
359
- export interface Role {
360
- name: string
361
- description?: string | null
362
- level: string
363
- created_time?: string | null
364
- privileges: Privilege[]
365
- }
366
-
367
368
  export interface RoleUpdateBody {
368
369
  name?: string | null
369
370
  description?: string | null
@@ -1077,12 +1078,6 @@ export interface Paths {
1077
1078
  search?: undefined
1078
1079
  response: void | ErrorResponse
1079
1080
  },
1080
- "/role/get": {
1081
- method: "get"
1082
- body?: undefined
1083
- search?: undefined
1084
- response: Response<Role[]> | ErrorResponse
1085
- },
1086
1081
  "/role/revoke/{role}/{author}": {
1087
1082
  method: "post"
1088
1083
  body?: undefined
@@ -1095,6 +1090,12 @@ export interface Paths {
1095
1090
  search?: undefined
1096
1091
  response: void | ErrorResponse
1097
1092
  },
1093
+ "/roles/get": {
1094
+ method: "get"
1095
+ body?: undefined
1096
+ search?: undefined
1097
+ response: Response<Role[]> | ErrorResponse
1098
+ },
1098
1099
  "/comment/add/{under}": {
1099
1100
  method: "post"
1100
1101
  body: CommentCreateBody
package/openapi.json CHANGED
@@ -168,6 +168,19 @@
168
168
  "type": "null"
169
169
  }
170
170
  ]
171
+ },
172
+ "roles": {
173
+ "anyOf": [
174
+ {
175
+ "type": "array",
176
+ "items": {
177
+ "$ref": "#/components/schema/Role"
178
+ }
179
+ },
180
+ {
181
+ "type": "null"
182
+ }
183
+ ]
171
184
  }
172
185
  },
173
186
  "required": [
@@ -399,6 +412,81 @@
399
412
  "view_count"
400
413
  ]
401
414
  },
415
+ "Role": {
416
+ "type": "object",
417
+ "properties": {
418
+ "name": {
419
+ "type": "string",
420
+ "maxLength": 32
421
+ },
422
+ "description": {
423
+ "anyOf": [
424
+ {
425
+ "type": "string",
426
+ "maxLength": 541
427
+ },
428
+ {
429
+ "type": "null"
430
+ }
431
+ ]
432
+ },
433
+ "level": {
434
+ "type": "string"
435
+ },
436
+ "created_time": {
437
+ "anyOf": [
438
+ {
439
+ "type": "string"
440
+ },
441
+ {
442
+ "type": "null"
443
+ }
444
+ ]
445
+ },
446
+ "privileges": {
447
+ "type": "array",
448
+ "items": {
449
+ "$ref": "#/components/schema/Privilege"
450
+ }
451
+ }
452
+ },
453
+ "required": [
454
+ "name",
455
+ "level",
456
+ "privileges"
457
+ ]
458
+ },
459
+ "Privilege": {
460
+ "type": "string",
461
+ "enum": [
462
+ "PrivilegeGrant",
463
+ "PrivilegeRevoke",
464
+ "RoleCreate",
465
+ "RoleEdit",
466
+ "RoleDelete",
467
+ "RoleReorder",
468
+ "RoleGrant",
469
+ "RoleRevoke",
470
+ "WorkViewPrivate",
471
+ "PrivilegeViewAuthor",
472
+ "RoleViewAll",
473
+ "TagGlobalCreate",
474
+ "TagGlobalDelete",
475
+ "TagGlobalUpdate",
476
+ "TagCategoryCreate",
477
+ "TagCategoryUpdate",
478
+ "TagCategoryDelete",
479
+ "TagCustomCreate",
480
+ "TagCustomUpdate",
481
+ "TagCustomDelete",
482
+ "TagPromote",
483
+ "TagDemote",
484
+ "TagAliasAdd",
485
+ "TagAliasRemove",
486
+ "TagRelationshipAdd",
487
+ "TagRelationshipRemove"
488
+ ]
489
+ },
402
490
  "AuthDeleteBody": {
403
491
  "type": "object",
404
492
  "properties": {
@@ -2006,37 +2094,6 @@
2006
2094
  "privileges"
2007
2095
  ]
2008
2096
  },
2009
- "Privilege": {
2010
- "type": "string",
2011
- "enum": [
2012
- "PrivilegeGrant",
2013
- "PrivilegeRevoke",
2014
- "RoleCreate",
2015
- "RoleEdit",
2016
- "RoleDelete",
2017
- "RoleReorder",
2018
- "RoleGrant",
2019
- "RoleRevoke",
2020
- "WorkViewPrivate",
2021
- "PrivilegeViewAuthor",
2022
- "RoleViewAll",
2023
- "TagGlobalCreate",
2024
- "TagGlobalDelete",
2025
- "TagGlobalUpdate",
2026
- "TagCategoryCreate",
2027
- "TagCategoryUpdate",
2028
- "TagCategoryDelete",
2029
- "TagCustomCreate",
2030
- "TagCustomUpdate",
2031
- "TagCustomDelete",
2032
- "TagPromote",
2033
- "TagDemote",
2034
- "TagAliasAdd",
2035
- "TagAliasRemove",
2036
- "TagRelationshipAdd",
2037
- "TagRelationshipRemove"
2038
- ]
2039
- },
2040
2097
  "RoleCreateBody": {
2041
2098
  "type": "object",
2042
2099
  "properties": {
@@ -2070,50 +2127,6 @@
2070
2127
  "name"
2071
2128
  ]
2072
2129
  },
2073
- "Role": {
2074
- "type": "object",
2075
- "properties": {
2076
- "name": {
2077
- "type": "string",
2078
- "maxLength": 32
2079
- },
2080
- "description": {
2081
- "anyOf": [
2082
- {
2083
- "type": "string",
2084
- "maxLength": 541
2085
- },
2086
- {
2087
- "type": "null"
2088
- }
2089
- ]
2090
- },
2091
- "level": {
2092
- "type": "string"
2093
- },
2094
- "created_time": {
2095
- "anyOf": [
2096
- {
2097
- "type": "string"
2098
- },
2099
- {
2100
- "type": "null"
2101
- }
2102
- ]
2103
- },
2104
- "privileges": {
2105
- "type": "array",
2106
- "items": {
2107
- "$ref": "#/components/schema/Privilege"
2108
- }
2109
- }
2110
- },
2111
- "required": [
2112
- "name",
2113
- "level",
2114
- "privileges"
2115
- ]
2116
- },
2117
2130
  "RoleUpdateBody": {
2118
2131
  "type": "object",
2119
2132
  "properties": {
@@ -6523,46 +6536,6 @@
6523
6536
  }
6524
6537
  }
6525
6538
  },
6526
- "/role/get": {
6527
- "get": {
6528
- "responses": {
6529
- "200": {
6530
- "description": "200 response",
6531
- "content": {
6532
- "application/json": {
6533
- "schema": {
6534
- "type": "object",
6535
- "properties": {
6536
- "data": {
6537
- "type": "array",
6538
- "items": {
6539
- "$ref": "#/components/schema/Role"
6540
- }
6541
- }
6542
- },
6543
- "required": [
6544
- "data"
6545
- ]
6546
- }
6547
- }
6548
- }
6549
- },
6550
- "304": {
6551
- "description": "304 response"
6552
- },
6553
- "default": {
6554
- "description": "Error",
6555
- "content": {
6556
- "application/json": {
6557
- "schema": {
6558
- "$ref": "#/components/schemas/ErrorResponse"
6559
- }
6560
- }
6561
- }
6562
- }
6563
- }
6564
- }
6565
- },
6566
6539
  "/role/revoke/{role}/{author}": {
6567
6540
  "parameters": [
6568
6541
  {
@@ -6620,6 +6593,46 @@
6620
6593
  }
6621
6594
  }
6622
6595
  },
6596
+ "/roles/get": {
6597
+ "get": {
6598
+ "responses": {
6599
+ "200": {
6600
+ "description": "200 response",
6601
+ "content": {
6602
+ "application/json": {
6603
+ "schema": {
6604
+ "type": "object",
6605
+ "properties": {
6606
+ "data": {
6607
+ "type": "array",
6608
+ "items": {
6609
+ "$ref": "#/components/schema/Role"
6610
+ }
6611
+ }
6612
+ },
6613
+ "required": [
6614
+ "data"
6615
+ ]
6616
+ }
6617
+ }
6618
+ }
6619
+ },
6620
+ "304": {
6621
+ "description": "304 response"
6622
+ },
6623
+ "default": {
6624
+ "description": "Error",
6625
+ "content": {
6626
+ "application/json": {
6627
+ "schema": {
6628
+ "$ref": "#/components/schemas/ErrorResponse"
6629
+ }
6630
+ }
6631
+ }
6632
+ }
6633
+ }
6634
+ }
6635
+ },
6623
6636
  "/comment/add/{under}": {
6624
6637
  "parameters": [
6625
6638
  {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "api.fluff4.me",
3
- "version": "1.0.505",
3
+ "version": "1.0.506",
4
4
  "types": "index.d.ts"
5
5
  }