@ibiliaze/global-vars 1.138.0 → 1.140.0
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/dist/ticketops/roles/account.d.ts +0 -3
- package/dist/ticketops/roles/admin.d.ts +11 -12
- package/dist/ticketops/roles/admin.js +130 -127
- package/dist/ticketops/roles/blog.d.ts +7 -9
- package/dist/ticketops/roles/blog.js +52 -49
- package/dist/ticketops/roles/campaign.d.ts +18 -12
- package/dist/ticketops/roles/campaign.js +84 -81
- package/dist/ticketops/roles/category.d.ts +47 -1
- package/dist/ticketops/roles/category.js +52 -7
- package/dist/ticketops/roles/checkout.d.ts +16 -0
- package/dist/ticketops/roles/checkout.js +4 -0
- package/dist/ticketops/roles/email.d.ts +26 -0
- package/dist/ticketops/roles/email.js +26 -3
- package/dist/ticketops/roles/event.d.ts +85 -1
- package/dist/ticketops/roles/event.js +81 -11
- package/dist/ticketops/roles/fail.d.ts +41 -1
- package/dist/ticketops/roles/fail.js +40 -6
- package/dist/ticketops/roles/file.d.ts +32 -0
- package/dist/ticketops/roles/file.js +9 -0
- package/dist/ticketops/roles/fixture.d.ts +47 -1
- package/dist/ticketops/roles/fixture.js +47 -7
- package/dist/ticketops/roles/flow.d.ts +54 -1
- package/dist/ticketops/roles/flow.js +55 -8
- package/dist/ticketops/roles/group.d.ts +47 -1
- package/dist/ticketops/roles/group.js +47 -7
- package/dist/ticketops/roles/job.d.ts +80 -1
- package/dist/ticketops/roles/job.js +73 -10
- package/dist/ticketops/roles/log.d.ts +28 -1
- package/dist/ticketops/roles/log.js +30 -5
- package/dist/ticketops/roles/notification.d.ts +56 -1
- package/dist/ticketops/roles/notification.js +55 -8
- package/dist/ticketops/roles/page.d.ts +55 -1
- package/dist/ticketops/roles/page.js +56 -8
- package/dist/ticketops/roles/product.d.ts +47 -1
- package/dist/ticketops/roles/product.js +47 -7
- package/dist/ticketops/roles/prospect.d.ts +86 -1
- package/dist/ticketops/roles/prospect.js +82 -11
- package/dist/ticketops/roles/report.d.ts +47 -1
- package/dist/ticketops/roles/report.js +47 -7
- package/dist/ticketops/roles/review.d.ts +62 -1
- package/dist/ticketops/roles/review.js +63 -9
- package/dist/ticketops/roles/role.d.ts +43 -1
- package/dist/ticketops/roles/role.js +46 -7
- package/dist/ticketops/roles/sale.d.ts +74 -1
- package/dist/ticketops/roles/sale.js +64 -14
- package/dist/ticketops/roles/season.d.ts +43 -1
- package/dist/ticketops/roles/season.js +46 -7
- package/dist/ticketops/roles/seat.d.ts +299 -1
- package/dist/ticketops/roles/seat.js +126 -40
- package/dist/ticketops/roles/section.d.ts +47 -1
- package/dist/ticketops/roles/section.js +47 -7
- package/dist/ticketops/roles/staff.d.ts +121 -1
- package/dist/ticketops/roles/staff.js +110 -14
- package/dist/ticketops/roles/user.d.ts +120 -1
- package/dist/ticketops/roles/user.js +114 -20
- package/dist/ticketops/roles.d.ts +3192 -74
- package/dist/ticketops/roles.js +48 -48
- package/package.json +2 -2
|
@@ -1,61 +1,181 @@
|
|
|
1
|
-
|
|
1
|
+
import type { StaffBase } from '../inputsDefault';
|
|
2
|
+
export declare const staffRoleDefs: <TId, TDate>() => readonly [{
|
|
2
3
|
readonly method: "post";
|
|
3
4
|
readonly path: "/staff/admin";
|
|
4
5
|
readonly role: "postStaffAdmin";
|
|
5
6
|
readonly name: "Create staff as root";
|
|
7
|
+
readonly response_201: {
|
|
8
|
+
staff: StaffBase<TId, TDate>;
|
|
9
|
+
message: string;
|
|
10
|
+
};
|
|
11
|
+
readonly response_400: {
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
readonly response_401: {
|
|
15
|
+
message: string;
|
|
16
|
+
};
|
|
17
|
+
readonly response_500: {
|
|
18
|
+
message: string;
|
|
19
|
+
error: string;
|
|
20
|
+
};
|
|
6
21
|
}, {
|
|
7
22
|
readonly method: "post";
|
|
8
23
|
readonly path: "/staff/token";
|
|
9
24
|
readonly role: "postStaffToken";
|
|
10
25
|
readonly name: "Staff login (token)";
|
|
26
|
+
readonly response_200: {
|
|
27
|
+
staff: StaffBase<TId, TDate>;
|
|
28
|
+
message: string;
|
|
29
|
+
};
|
|
30
|
+
readonly response_401: {
|
|
31
|
+
message: string;
|
|
32
|
+
};
|
|
33
|
+
readonly response_500: {
|
|
34
|
+
message: string;
|
|
35
|
+
error: string;
|
|
36
|
+
};
|
|
11
37
|
}, {
|
|
12
38
|
readonly method: "post";
|
|
13
39
|
readonly path: "/staff/logout";
|
|
14
40
|
readonly role: "postStaffLogout";
|
|
15
41
|
readonly name: "Staff logout";
|
|
42
|
+
readonly response_200: {
|
|
43
|
+
staff: StaffBase<TId, TDate>;
|
|
44
|
+
message: string;
|
|
45
|
+
};
|
|
46
|
+
readonly response_500: {
|
|
47
|
+
message: string;
|
|
48
|
+
error: string;
|
|
49
|
+
};
|
|
16
50
|
}, {
|
|
17
51
|
readonly method: "post";
|
|
18
52
|
readonly path: "/staff/logout/all";
|
|
19
53
|
readonly role: "postStaffLogoutAll";
|
|
20
54
|
readonly name: "Staff logout all sessions";
|
|
55
|
+
readonly response_200: {
|
|
56
|
+
staff: StaffBase<TId, TDate>;
|
|
57
|
+
message: string;
|
|
58
|
+
};
|
|
59
|
+
readonly response_500: {
|
|
60
|
+
message: string;
|
|
61
|
+
error: string;
|
|
62
|
+
};
|
|
21
63
|
}, {
|
|
22
64
|
readonly method: "post";
|
|
23
65
|
readonly path: "/staff/logout/:id";
|
|
24
66
|
readonly role: "postStaffLogoutById";
|
|
25
67
|
readonly name: "Staff logout by session id";
|
|
68
|
+
readonly response_200: {
|
|
69
|
+
staff: StaffBase<TId, TDate>;
|
|
70
|
+
message: string;
|
|
71
|
+
};
|
|
72
|
+
readonly response_404: {
|
|
73
|
+
message: string;
|
|
74
|
+
};
|
|
75
|
+
readonly response_500: {
|
|
76
|
+
message: string;
|
|
77
|
+
error: string;
|
|
78
|
+
};
|
|
26
79
|
}, {
|
|
27
80
|
readonly method: "get";
|
|
28
81
|
readonly path: "/staff";
|
|
29
82
|
readonly role: "getStaff";
|
|
30
83
|
readonly name: "Get current staff";
|
|
84
|
+
readonly response_200: {
|
|
85
|
+
staff: StaffBase<TId, TDate>;
|
|
86
|
+
};
|
|
87
|
+
readonly response_500: {
|
|
88
|
+
message: string;
|
|
89
|
+
error: string;
|
|
90
|
+
};
|
|
31
91
|
}, {
|
|
32
92
|
readonly method: "get";
|
|
33
93
|
readonly path: "/staff/exists/:email";
|
|
34
94
|
readonly role: "getStaffExistsByEmail";
|
|
35
95
|
readonly name: "Check staff email exists";
|
|
96
|
+
readonly response_200: Record<string, never>;
|
|
97
|
+
readonly response_409: {
|
|
98
|
+
message: string;
|
|
99
|
+
};
|
|
100
|
+
readonly response_500: {
|
|
101
|
+
message: string;
|
|
102
|
+
error: string;
|
|
103
|
+
};
|
|
36
104
|
}, {
|
|
37
105
|
readonly method: "get";
|
|
38
106
|
readonly path: "/staff/all";
|
|
39
107
|
readonly role: "getStaffAll";
|
|
40
108
|
readonly name: "Get all staff";
|
|
109
|
+
readonly response_200: {
|
|
110
|
+
staff: StaffBase<TId, TDate>[];
|
|
111
|
+
count?: number;
|
|
112
|
+
};
|
|
113
|
+
readonly response_500: {
|
|
114
|
+
message: string;
|
|
115
|
+
error: string;
|
|
116
|
+
};
|
|
41
117
|
}, {
|
|
42
118
|
readonly method: "put";
|
|
43
119
|
readonly path: "/staff/account";
|
|
44
120
|
readonly role: "putStaffAccount";
|
|
45
121
|
readonly name: "Update own staff account";
|
|
122
|
+
readonly response_200: {
|
|
123
|
+
staff: StaffBase<TId, TDate>;
|
|
124
|
+
message: string;
|
|
125
|
+
};
|
|
126
|
+
readonly response_404: {
|
|
127
|
+
message: string;
|
|
128
|
+
};
|
|
129
|
+
readonly response_500: {
|
|
130
|
+
message: string;
|
|
131
|
+
error: string;
|
|
132
|
+
};
|
|
46
133
|
}, {
|
|
47
134
|
readonly method: "put";
|
|
48
135
|
readonly path: "/staff/:id";
|
|
49
136
|
readonly role: "putStaffById";
|
|
50
137
|
readonly name: "Update staff by ID";
|
|
138
|
+
readonly response_200: {
|
|
139
|
+
staff: StaffBase<TId, TDate>;
|
|
140
|
+
message: string;
|
|
141
|
+
};
|
|
142
|
+
readonly response_404: {
|
|
143
|
+
message: string;
|
|
144
|
+
};
|
|
145
|
+
readonly response_500: {
|
|
146
|
+
message: string;
|
|
147
|
+
error: string;
|
|
148
|
+
};
|
|
51
149
|
}, {
|
|
52
150
|
readonly method: "put";
|
|
53
151
|
readonly path: "/staff/password";
|
|
54
152
|
readonly role: "putStaffPassword";
|
|
55
153
|
readonly name: "Update staff password";
|
|
154
|
+
readonly response_200: {
|
|
155
|
+
staff: StaffBase<TId, TDate>;
|
|
156
|
+
message: string;
|
|
157
|
+
};
|
|
158
|
+
readonly response_404: {
|
|
159
|
+
message: string;
|
|
160
|
+
};
|
|
161
|
+
readonly response_500: {
|
|
162
|
+
message: string;
|
|
163
|
+
error: string;
|
|
164
|
+
};
|
|
56
165
|
}, {
|
|
57
166
|
readonly method: "delete";
|
|
58
167
|
readonly path: "/staff/:id";
|
|
59
168
|
readonly role: "deleteStaffById";
|
|
60
169
|
readonly name: "Delete staff by ID";
|
|
170
|
+
readonly response_200: {
|
|
171
|
+
staff: StaffBase<TId, TDate>;
|
|
172
|
+
message: string;
|
|
173
|
+
};
|
|
174
|
+
readonly response_404: {
|
|
175
|
+
message: string;
|
|
176
|
+
};
|
|
177
|
+
readonly response_500: {
|
|
178
|
+
message: string;
|
|
179
|
+
error: string;
|
|
180
|
+
};
|
|
61
181
|
}];
|
|
@@ -1,17 +1,113 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.staffRoleDefs = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
4
|
+
const staffRoleDefs = () => {
|
|
5
|
+
return [
|
|
6
|
+
{
|
|
7
|
+
method: 'post',
|
|
8
|
+
path: '/staff/admin',
|
|
9
|
+
role: 'postStaffAdmin',
|
|
10
|
+
name: 'Create staff as root',
|
|
11
|
+
response_201: {},
|
|
12
|
+
response_400: {},
|
|
13
|
+
response_401: {},
|
|
14
|
+
response_500: {},
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
method: 'post',
|
|
18
|
+
path: '/staff/token',
|
|
19
|
+
role: 'postStaffToken',
|
|
20
|
+
name: 'Staff login (token)',
|
|
21
|
+
response_200: {},
|
|
22
|
+
response_401: {},
|
|
23
|
+
response_500: {},
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
method: 'post',
|
|
27
|
+
path: '/staff/logout',
|
|
28
|
+
role: 'postStaffLogout',
|
|
29
|
+
name: 'Staff logout',
|
|
30
|
+
response_200: {},
|
|
31
|
+
response_500: {},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
method: 'post',
|
|
35
|
+
path: '/staff/logout/all',
|
|
36
|
+
role: 'postStaffLogoutAll',
|
|
37
|
+
name: 'Staff logout all sessions',
|
|
38
|
+
response_200: {},
|
|
39
|
+
response_500: {},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
method: 'post',
|
|
43
|
+
path: '/staff/logout/:id',
|
|
44
|
+
role: 'postStaffLogoutById',
|
|
45
|
+
name: 'Staff logout by session id',
|
|
46
|
+
response_200: {},
|
|
47
|
+
response_404: {},
|
|
48
|
+
response_500: {},
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
method: 'get',
|
|
52
|
+
path: '/staff',
|
|
53
|
+
role: 'getStaff',
|
|
54
|
+
name: 'Get current staff',
|
|
55
|
+
response_200: {},
|
|
56
|
+
response_500: {},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
method: 'get',
|
|
60
|
+
path: '/staff/exists/:email',
|
|
61
|
+
role: 'getStaffExistsByEmail',
|
|
62
|
+
name: 'Check staff email exists',
|
|
63
|
+
response_200: {},
|
|
64
|
+
response_409: {},
|
|
65
|
+
response_500: {},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
method: 'get',
|
|
69
|
+
path: '/staff/all',
|
|
70
|
+
role: 'getStaffAll',
|
|
71
|
+
name: 'Get all staff',
|
|
72
|
+
response_200: {},
|
|
73
|
+
response_500: {},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
method: 'put',
|
|
77
|
+
path: '/staff/account',
|
|
78
|
+
role: 'putStaffAccount',
|
|
79
|
+
name: 'Update own staff account',
|
|
80
|
+
response_200: {},
|
|
81
|
+
response_404: {},
|
|
82
|
+
response_500: {},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
method: 'put',
|
|
86
|
+
path: '/staff/:id',
|
|
87
|
+
role: 'putStaffById',
|
|
88
|
+
name: 'Update staff by ID',
|
|
89
|
+
response_200: {},
|
|
90
|
+
response_404: {},
|
|
91
|
+
response_500: {},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
method: 'put',
|
|
95
|
+
path: '/staff/password',
|
|
96
|
+
role: 'putStaffPassword',
|
|
97
|
+
name: 'Update staff password',
|
|
98
|
+
response_200: {},
|
|
99
|
+
response_404: {},
|
|
100
|
+
response_500: {},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
method: 'delete',
|
|
104
|
+
path: '/staff/:id',
|
|
105
|
+
role: 'deleteStaffById',
|
|
106
|
+
name: 'Delete staff by ID',
|
|
107
|
+
response_200: {},
|
|
108
|
+
response_404: {},
|
|
109
|
+
response_500: {},
|
|
110
|
+
},
|
|
111
|
+
];
|
|
112
|
+
};
|
|
113
|
+
exports.staffRoleDefs = staffRoleDefs;
|
|
@@ -1,66 +1,185 @@
|
|
|
1
|
-
|
|
1
|
+
import type { UserBase } from '../inputsDefault';
|
|
2
|
+
export declare const userRoleDefs: <TId, TDate>() => readonly [{
|
|
2
3
|
readonly method: "post";
|
|
3
4
|
readonly path: "/user";
|
|
4
5
|
readonly role: "postUser";
|
|
5
6
|
readonly name: "Register user";
|
|
7
|
+
readonly response_201: {
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
readonly response_500: {
|
|
11
|
+
message: string;
|
|
12
|
+
error: string;
|
|
13
|
+
};
|
|
6
14
|
}, {
|
|
7
15
|
readonly method: "post";
|
|
8
16
|
readonly path: "/user/admin";
|
|
9
17
|
readonly role: "postUserAdmin";
|
|
10
18
|
readonly name: "Create user as admin";
|
|
19
|
+
readonly response_201: {
|
|
20
|
+
user: UserBase<TId, TDate>;
|
|
21
|
+
message: string;
|
|
22
|
+
};
|
|
23
|
+
readonly response_500: {
|
|
24
|
+
message: string;
|
|
25
|
+
error: string;
|
|
26
|
+
};
|
|
11
27
|
}, {
|
|
12
28
|
readonly method: "post";
|
|
13
29
|
readonly path: "/user/token";
|
|
14
30
|
readonly role: "postUserToken";
|
|
15
31
|
readonly name: "User login (token)";
|
|
32
|
+
readonly response_200: {
|
|
33
|
+
user: UserBase<TId, TDate>;
|
|
34
|
+
message: string;
|
|
35
|
+
};
|
|
36
|
+
readonly response_401: {
|
|
37
|
+
message: string;
|
|
38
|
+
error: string;
|
|
39
|
+
};
|
|
16
40
|
}, {
|
|
17
41
|
readonly method: "post";
|
|
18
42
|
readonly path: "/user/logout";
|
|
19
43
|
readonly role: "postUserLogout";
|
|
20
44
|
readonly name: "User logout";
|
|
45
|
+
readonly response_200: {
|
|
46
|
+
user: UserBase<TId, TDate>;
|
|
47
|
+
message: string;
|
|
48
|
+
};
|
|
49
|
+
readonly response_500: {
|
|
50
|
+
message: string;
|
|
51
|
+
error: string;
|
|
52
|
+
};
|
|
21
53
|
}, {
|
|
22
54
|
readonly method: "post";
|
|
23
55
|
readonly path: "/user/logout/all";
|
|
24
56
|
readonly role: "postUserLogoutAll";
|
|
25
57
|
readonly name: "User logout all sessions";
|
|
58
|
+
readonly response_200: {
|
|
59
|
+
user: UserBase<TId, TDate>;
|
|
60
|
+
message: string;
|
|
61
|
+
};
|
|
62
|
+
readonly response_500: {
|
|
63
|
+
message: string;
|
|
64
|
+
error: string;
|
|
65
|
+
};
|
|
26
66
|
}, {
|
|
27
67
|
readonly method: "post";
|
|
28
68
|
readonly path: "/user/logout/:id";
|
|
29
69
|
readonly role: "postUserLogoutById";
|
|
30
70
|
readonly name: "User logout by session id";
|
|
71
|
+
readonly response_200: {
|
|
72
|
+
user: UserBase<TId, TDate>;
|
|
73
|
+
message: string;
|
|
74
|
+
};
|
|
75
|
+
readonly response_500: {
|
|
76
|
+
message: string;
|
|
77
|
+
error: string;
|
|
78
|
+
};
|
|
31
79
|
}, {
|
|
32
80
|
readonly method: "get";
|
|
33
81
|
readonly path: "/user";
|
|
34
82
|
readonly role: "getUser";
|
|
35
83
|
readonly name: "Get current user";
|
|
84
|
+
readonly response_200: {
|
|
85
|
+
user: UserBase<TId, TDate>;
|
|
86
|
+
};
|
|
87
|
+
readonly response_500: {
|
|
88
|
+
message: string;
|
|
89
|
+
error: string;
|
|
90
|
+
};
|
|
36
91
|
}, {
|
|
37
92
|
readonly method: "get";
|
|
38
93
|
readonly path: "/user/exists/:email";
|
|
39
94
|
readonly role: "getUserExistsByEmail";
|
|
40
95
|
readonly name: "Check user email exists";
|
|
96
|
+
readonly response_200: Record<string, never>;
|
|
97
|
+
readonly response_409: {
|
|
98
|
+
message: string;
|
|
99
|
+
};
|
|
100
|
+
readonly response_500: {
|
|
101
|
+
message: string;
|
|
102
|
+
error: string;
|
|
103
|
+
};
|
|
41
104
|
}, {
|
|
42
105
|
readonly method: "get";
|
|
43
106
|
readonly path: "/user/all";
|
|
44
107
|
readonly role: "getUsers";
|
|
45
108
|
readonly name: "Get users";
|
|
109
|
+
readonly response_200: {
|
|
110
|
+
users: UserBase<TId, TDate>[];
|
|
111
|
+
count: number;
|
|
112
|
+
};
|
|
113
|
+
readonly response_500: {
|
|
114
|
+
message: string;
|
|
115
|
+
error: string;
|
|
116
|
+
};
|
|
46
117
|
}, {
|
|
47
118
|
readonly method: "put";
|
|
48
119
|
readonly path: "/user/account";
|
|
49
120
|
readonly role: "putUserAccount";
|
|
50
121
|
readonly name: "Update own user account";
|
|
122
|
+
readonly response_200: {
|
|
123
|
+
user: UserBase<TId, TDate>;
|
|
124
|
+
message: string;
|
|
125
|
+
};
|
|
126
|
+
readonly response_404: {
|
|
127
|
+
user: UserBase<TId, TDate> | null;
|
|
128
|
+
message: string;
|
|
129
|
+
};
|
|
130
|
+
readonly response_500: {
|
|
131
|
+
message: string;
|
|
132
|
+
error: string;
|
|
133
|
+
};
|
|
51
134
|
}, {
|
|
52
135
|
readonly method: "put";
|
|
53
136
|
readonly path: "/user/:id";
|
|
54
137
|
readonly role: "putUserById";
|
|
55
138
|
readonly name: "Update user by ID";
|
|
139
|
+
readonly response_200: {
|
|
140
|
+
user: UserBase<TId, TDate>;
|
|
141
|
+
message: string;
|
|
142
|
+
};
|
|
143
|
+
readonly response_404: {
|
|
144
|
+
user: UserBase<TId, TDate> | null;
|
|
145
|
+
message: string;
|
|
146
|
+
};
|
|
147
|
+
readonly response_500: {
|
|
148
|
+
message: string;
|
|
149
|
+
error: string;
|
|
150
|
+
};
|
|
56
151
|
}, {
|
|
57
152
|
readonly method: "put";
|
|
58
153
|
readonly path: "/user/password";
|
|
59
154
|
readonly role: "putUserPassword";
|
|
60
155
|
readonly name: "Update user password";
|
|
156
|
+
readonly response_200: {
|
|
157
|
+
user: UserBase<TId, TDate>;
|
|
158
|
+
message: string;
|
|
159
|
+
};
|
|
160
|
+
readonly response_404: {
|
|
161
|
+
user: UserBase<TId, TDate> | null;
|
|
162
|
+
message: string;
|
|
163
|
+
};
|
|
164
|
+
readonly response_500: {
|
|
165
|
+
message: string;
|
|
166
|
+
error: string;
|
|
167
|
+
};
|
|
61
168
|
}, {
|
|
62
169
|
readonly method: "delete";
|
|
63
170
|
readonly path: "/user/:id";
|
|
64
171
|
readonly role: "deleteUserById";
|
|
65
172
|
readonly name: "Delete user by ID";
|
|
173
|
+
readonly response_200: {
|
|
174
|
+
user: UserBase<TId, TDate>;
|
|
175
|
+
message: string;
|
|
176
|
+
};
|
|
177
|
+
readonly response_404: {
|
|
178
|
+
user: UserBase<TId, TDate> | null;
|
|
179
|
+
message: string;
|
|
180
|
+
};
|
|
181
|
+
readonly response_500: {
|
|
182
|
+
message: string;
|
|
183
|
+
error: string;
|
|
184
|
+
};
|
|
66
185
|
}];
|
|
@@ -1,23 +1,117 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.userRoleDefs = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
4
|
+
const userRoleDefs = () => {
|
|
5
|
+
return [
|
|
6
|
+
{
|
|
7
|
+
method: 'post',
|
|
8
|
+
path: '/user',
|
|
9
|
+
role: 'postUser',
|
|
10
|
+
name: 'Register user',
|
|
11
|
+
response_201: {},
|
|
12
|
+
response_500: {},
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
method: 'post',
|
|
16
|
+
path: '/user/admin',
|
|
17
|
+
role: 'postUserAdmin',
|
|
18
|
+
name: 'Create user as admin',
|
|
19
|
+
response_201: {},
|
|
20
|
+
response_500: {},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
method: 'post',
|
|
24
|
+
path: '/user/token',
|
|
25
|
+
role: 'postUserToken',
|
|
26
|
+
name: 'User login (token)',
|
|
27
|
+
response_200: {},
|
|
28
|
+
response_401: {},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
method: 'post',
|
|
32
|
+
path: '/user/logout',
|
|
33
|
+
role: 'postUserLogout',
|
|
34
|
+
name: 'User logout',
|
|
35
|
+
response_200: {},
|
|
36
|
+
response_500: {},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
method: 'post',
|
|
40
|
+
path: '/user/logout/all',
|
|
41
|
+
role: 'postUserLogoutAll',
|
|
42
|
+
name: 'User logout all sessions',
|
|
43
|
+
response_200: {},
|
|
44
|
+
response_500: {},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
method: 'post',
|
|
48
|
+
path: '/user/logout/:id',
|
|
49
|
+
role: 'postUserLogoutById',
|
|
50
|
+
name: 'User logout by session id',
|
|
51
|
+
response_200: {},
|
|
52
|
+
response_500: {},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
method: 'get',
|
|
56
|
+
path: '/user',
|
|
57
|
+
role: 'getUser',
|
|
58
|
+
name: 'Get current user',
|
|
59
|
+
response_200: {},
|
|
60
|
+
response_500: {},
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
method: 'get',
|
|
64
|
+
path: '/user/exists/:email',
|
|
65
|
+
role: 'getUserExistsByEmail',
|
|
66
|
+
name: 'Check user email exists',
|
|
67
|
+
response_200: {},
|
|
68
|
+
response_409: {},
|
|
69
|
+
response_500: {},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
method: 'get',
|
|
73
|
+
path: '/user/all',
|
|
74
|
+
role: 'getUsers',
|
|
75
|
+
name: 'Get users',
|
|
76
|
+
response_200: {},
|
|
77
|
+
response_500: {},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
method: 'put',
|
|
81
|
+
path: '/user/account',
|
|
82
|
+
role: 'putUserAccount',
|
|
83
|
+
name: 'Update own user account',
|
|
84
|
+
response_200: {},
|
|
85
|
+
response_404: {},
|
|
86
|
+
response_500: {},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
method: 'put',
|
|
90
|
+
path: '/user/:id',
|
|
91
|
+
role: 'putUserById',
|
|
92
|
+
name: 'Update user by ID',
|
|
93
|
+
response_200: {},
|
|
94
|
+
response_404: {},
|
|
95
|
+
response_500: {},
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
method: 'put',
|
|
99
|
+
path: '/user/password',
|
|
100
|
+
role: 'putUserPassword',
|
|
101
|
+
name: 'Update user password',
|
|
102
|
+
response_200: {},
|
|
103
|
+
response_404: {},
|
|
104
|
+
response_500: {},
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
method: 'delete',
|
|
108
|
+
path: '/user/:id',
|
|
109
|
+
role: 'deleteUserById',
|
|
110
|
+
name: 'Delete user by ID',
|
|
111
|
+
response_200: {},
|
|
112
|
+
response_404: {},
|
|
113
|
+
response_500: {},
|
|
114
|
+
},
|
|
115
|
+
];
|
|
116
|
+
};
|
|
117
|
+
exports.userRoleDefs = userRoleDefs;
|