@ibiliaze/global-vars 1.178.0 → 1.180.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/checkout.d.ts +1 -1
- package/dist/flows.d.ts +16 -16
- package/dist/flows.js +16 -16
- package/dist/globals.d.ts +2 -2
- package/dist/globals.js +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/ticketops/inputsDefault.d.ts +43 -75
- package/dist/ticketops/pages.d.ts +13 -26
- package/dist/ticketops/pages.js +11 -20
- package/dist/ticketops/roles/customer.d.ts +185 -0
- package/dist/ticketops/roles/customer.js +117 -0
- package/dist/ticketops/roles/event.d.ts +3 -52
- package/dist/ticketops/roles/event.js +3 -30
- package/dist/ticketops/roles/job.d.ts +1 -1
- package/dist/ticketops/roles/sale.d.ts +3 -3
- package/dist/ticketops/roles/sale.js +3 -3
- package/dist/ticketops/roles/seat.d.ts +3 -3
- package/dist/ticketops/roles/seat.js +3 -3
- package/dist/ticketops/roles/user.d.ts +17 -21
- package/dist/ticketops/roles/user.js +7 -11
- package/dist/ticketops/roles.d.ts +498 -762
- package/dist/ticketops/roles.js +6 -9
- package/package.json +2 -2
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import type { CustomerBase } from '../inputsDefault';
|
|
2
|
+
export declare const customerRoleDefs: <TId, TDate>() => readonly [{
|
|
3
|
+
readonly method: "post";
|
|
4
|
+
readonly path: "/customer";
|
|
5
|
+
readonly role: "postCustomer";
|
|
6
|
+
readonly name: "Register customer";
|
|
7
|
+
readonly response_201: {
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
readonly response_500: {
|
|
11
|
+
message: string;
|
|
12
|
+
error: string;
|
|
13
|
+
};
|
|
14
|
+
}, {
|
|
15
|
+
readonly method: "post";
|
|
16
|
+
readonly path: "/customer/admin";
|
|
17
|
+
readonly role: "postCustomerAdmin";
|
|
18
|
+
readonly name: "Create customer as admin";
|
|
19
|
+
readonly response_201: {
|
|
20
|
+
customer: CustomerBase<TId, TDate>;
|
|
21
|
+
message: string;
|
|
22
|
+
};
|
|
23
|
+
readonly response_500: {
|
|
24
|
+
message: string;
|
|
25
|
+
error: string;
|
|
26
|
+
};
|
|
27
|
+
}, {
|
|
28
|
+
readonly method: "post";
|
|
29
|
+
readonly path: "/customer/token";
|
|
30
|
+
readonly role: "postCustomerToken";
|
|
31
|
+
readonly name: "Customer login (token)";
|
|
32
|
+
readonly response_200: {
|
|
33
|
+
customer: CustomerBase<TId, TDate>;
|
|
34
|
+
message: string;
|
|
35
|
+
};
|
|
36
|
+
readonly response_401: {
|
|
37
|
+
message: string;
|
|
38
|
+
error: string;
|
|
39
|
+
};
|
|
40
|
+
}, {
|
|
41
|
+
readonly method: "post";
|
|
42
|
+
readonly path: "/customer/logout";
|
|
43
|
+
readonly role: "postCustomerLogout";
|
|
44
|
+
readonly name: "Customer logout";
|
|
45
|
+
readonly response_200: {
|
|
46
|
+
customer: CustomerBase<TId, TDate>;
|
|
47
|
+
message: string;
|
|
48
|
+
};
|
|
49
|
+
readonly response_500: {
|
|
50
|
+
message: string;
|
|
51
|
+
error: string;
|
|
52
|
+
};
|
|
53
|
+
}, {
|
|
54
|
+
readonly method: "post";
|
|
55
|
+
readonly path: "/customer/logout/all";
|
|
56
|
+
readonly role: "postCustomerLogoutAll";
|
|
57
|
+
readonly name: "Customer logout all sessions";
|
|
58
|
+
readonly response_200: {
|
|
59
|
+
customer: CustomerBase<TId, TDate>;
|
|
60
|
+
message: string;
|
|
61
|
+
};
|
|
62
|
+
readonly response_500: {
|
|
63
|
+
message: string;
|
|
64
|
+
error: string;
|
|
65
|
+
};
|
|
66
|
+
}, {
|
|
67
|
+
readonly method: "post";
|
|
68
|
+
readonly path: "/customer/logout/:id";
|
|
69
|
+
readonly role: "postCustomerLogoutById";
|
|
70
|
+
readonly name: "Customer logout by session id";
|
|
71
|
+
readonly response_200: {
|
|
72
|
+
customer: CustomerBase<TId, TDate>;
|
|
73
|
+
message: string;
|
|
74
|
+
};
|
|
75
|
+
readonly response_500: {
|
|
76
|
+
message: string;
|
|
77
|
+
error: string;
|
|
78
|
+
};
|
|
79
|
+
}, {
|
|
80
|
+
readonly method: "get";
|
|
81
|
+
readonly path: "/customer";
|
|
82
|
+
readonly role: "getCustomer";
|
|
83
|
+
readonly name: "Get current customer";
|
|
84
|
+
readonly response_200: {
|
|
85
|
+
customer: CustomerBase<TId, TDate>;
|
|
86
|
+
};
|
|
87
|
+
readonly response_500: {
|
|
88
|
+
message: string;
|
|
89
|
+
error: string;
|
|
90
|
+
};
|
|
91
|
+
}, {
|
|
92
|
+
readonly method: "get";
|
|
93
|
+
readonly path: "/customer/exists/:email";
|
|
94
|
+
readonly role: "getCustomerExistsByEmail";
|
|
95
|
+
readonly name: "Check customer 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
|
+
};
|
|
104
|
+
}, {
|
|
105
|
+
readonly method: "get";
|
|
106
|
+
readonly path: "/customer/all";
|
|
107
|
+
readonly role: "getCustomers";
|
|
108
|
+
readonly name: "Get customers";
|
|
109
|
+
readonly response_200: {
|
|
110
|
+
customers: CustomerBase<TId, TDate>[];
|
|
111
|
+
count: number;
|
|
112
|
+
};
|
|
113
|
+
readonly response_500: {
|
|
114
|
+
message: string;
|
|
115
|
+
error: string;
|
|
116
|
+
};
|
|
117
|
+
}, {
|
|
118
|
+
readonly method: "put";
|
|
119
|
+
readonly path: "/customer/account";
|
|
120
|
+
readonly role: "putCustomerAccount";
|
|
121
|
+
readonly name: "Update own customer account";
|
|
122
|
+
readonly response_200: {
|
|
123
|
+
customer: CustomerBase<TId, TDate>;
|
|
124
|
+
message: string;
|
|
125
|
+
};
|
|
126
|
+
readonly response_404: {
|
|
127
|
+
customer: CustomerBase<TId, TDate> | null;
|
|
128
|
+
message: string;
|
|
129
|
+
};
|
|
130
|
+
readonly response_500: {
|
|
131
|
+
message: string;
|
|
132
|
+
error: string;
|
|
133
|
+
};
|
|
134
|
+
}, {
|
|
135
|
+
readonly method: "put";
|
|
136
|
+
readonly path: "/customer/:id";
|
|
137
|
+
readonly role: "putCustomerById";
|
|
138
|
+
readonly name: "Update customer by ID";
|
|
139
|
+
readonly response_200: {
|
|
140
|
+
customer: CustomerBase<TId, TDate>;
|
|
141
|
+
message: string;
|
|
142
|
+
};
|
|
143
|
+
readonly response_404: {
|
|
144
|
+
customer: CustomerBase<TId, TDate> | null;
|
|
145
|
+
message: string;
|
|
146
|
+
};
|
|
147
|
+
readonly response_500: {
|
|
148
|
+
message: string;
|
|
149
|
+
error: string;
|
|
150
|
+
};
|
|
151
|
+
}, {
|
|
152
|
+
readonly method: "put";
|
|
153
|
+
readonly path: "/customer/password";
|
|
154
|
+
readonly role: "putCustomerPassword";
|
|
155
|
+
readonly name: "Update customer password";
|
|
156
|
+
readonly response_200: {
|
|
157
|
+
customer: CustomerBase<TId, TDate>;
|
|
158
|
+
message: string;
|
|
159
|
+
};
|
|
160
|
+
readonly response_404: {
|
|
161
|
+
customer: CustomerBase<TId, TDate> | null;
|
|
162
|
+
message: string;
|
|
163
|
+
};
|
|
164
|
+
readonly response_500: {
|
|
165
|
+
message: string;
|
|
166
|
+
error: string;
|
|
167
|
+
};
|
|
168
|
+
}, {
|
|
169
|
+
readonly method: "delete";
|
|
170
|
+
readonly path: "/customer/:id";
|
|
171
|
+
readonly role: "deleteCustomerById";
|
|
172
|
+
readonly name: "Delete customer by ID";
|
|
173
|
+
readonly response_200: {
|
|
174
|
+
customer: CustomerBase<TId, TDate>;
|
|
175
|
+
message: string;
|
|
176
|
+
};
|
|
177
|
+
readonly response_404: {
|
|
178
|
+
customer: CustomerBase<TId, TDate> | null;
|
|
179
|
+
message: string;
|
|
180
|
+
};
|
|
181
|
+
readonly response_500: {
|
|
182
|
+
message: string;
|
|
183
|
+
error: string;
|
|
184
|
+
};
|
|
185
|
+
}];
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.customerRoleDefs = void 0;
|
|
4
|
+
const customerRoleDefs = () => {
|
|
5
|
+
return [
|
|
6
|
+
{
|
|
7
|
+
method: 'post',
|
|
8
|
+
path: '/customer',
|
|
9
|
+
role: 'postCustomer',
|
|
10
|
+
name: 'Register customer',
|
|
11
|
+
response_201: {},
|
|
12
|
+
response_500: {},
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
method: 'post',
|
|
16
|
+
path: '/customer/admin',
|
|
17
|
+
role: 'postCustomerAdmin',
|
|
18
|
+
name: 'Create customer as admin',
|
|
19
|
+
response_201: {},
|
|
20
|
+
response_500: {},
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
method: 'post',
|
|
24
|
+
path: '/customer/token',
|
|
25
|
+
role: 'postCustomerToken',
|
|
26
|
+
name: 'Customer login (token)',
|
|
27
|
+
response_200: {},
|
|
28
|
+
response_401: {},
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
method: 'post',
|
|
32
|
+
path: '/customer/logout',
|
|
33
|
+
role: 'postCustomerLogout',
|
|
34
|
+
name: 'Customer logout',
|
|
35
|
+
response_200: {},
|
|
36
|
+
response_500: {},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
method: 'post',
|
|
40
|
+
path: '/customer/logout/all',
|
|
41
|
+
role: 'postCustomerLogoutAll',
|
|
42
|
+
name: 'Customer logout all sessions',
|
|
43
|
+
response_200: {},
|
|
44
|
+
response_500: {},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
method: 'post',
|
|
48
|
+
path: '/customer/logout/:id',
|
|
49
|
+
role: 'postCustomerLogoutById',
|
|
50
|
+
name: 'Customer logout by session id',
|
|
51
|
+
response_200: {},
|
|
52
|
+
response_500: {},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
method: 'get',
|
|
56
|
+
path: '/customer',
|
|
57
|
+
role: 'getCustomer',
|
|
58
|
+
name: 'Get current customer',
|
|
59
|
+
response_200: {},
|
|
60
|
+
response_500: {},
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
method: 'get',
|
|
64
|
+
path: '/customer/exists/:email',
|
|
65
|
+
role: 'getCustomerExistsByEmail',
|
|
66
|
+
name: 'Check customer email exists',
|
|
67
|
+
response_200: {},
|
|
68
|
+
response_409: {},
|
|
69
|
+
response_500: {},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
method: 'get',
|
|
73
|
+
path: '/customer/all',
|
|
74
|
+
role: 'getCustomers',
|
|
75
|
+
name: 'Get customers',
|
|
76
|
+
response_200: {},
|
|
77
|
+
response_500: {},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
method: 'put',
|
|
81
|
+
path: '/customer/account',
|
|
82
|
+
role: 'putCustomerAccount',
|
|
83
|
+
name: 'Update own customer account',
|
|
84
|
+
response_200: {},
|
|
85
|
+
response_404: {},
|
|
86
|
+
response_500: {},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
method: 'put',
|
|
90
|
+
path: '/customer/:id',
|
|
91
|
+
role: 'putCustomerById',
|
|
92
|
+
name: 'Update customer by ID',
|
|
93
|
+
response_200: {},
|
|
94
|
+
response_404: {},
|
|
95
|
+
response_500: {},
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
method: 'put',
|
|
99
|
+
path: '/customer/password',
|
|
100
|
+
role: 'putCustomerPassword',
|
|
101
|
+
name: 'Update customer password',
|
|
102
|
+
response_200: {},
|
|
103
|
+
response_404: {},
|
|
104
|
+
response_500: {},
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
method: 'delete',
|
|
108
|
+
path: '/customer/:id',
|
|
109
|
+
role: 'deleteCustomerById',
|
|
110
|
+
name: 'Delete customer by ID',
|
|
111
|
+
response_200: {},
|
|
112
|
+
response_404: {},
|
|
113
|
+
response_500: {},
|
|
114
|
+
},
|
|
115
|
+
];
|
|
116
|
+
};
|
|
117
|
+
exports.customerRoleDefs = customerRoleDefs;
|
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
import type { EventBase } from '../inputsDefault';
|
|
2
2
|
export declare const eventRoleDefs: <TId, TDate>() => readonly [{
|
|
3
|
-
readonly method: "post";
|
|
4
|
-
readonly path: "/event/book";
|
|
5
|
-
readonly role: "postEventBook";
|
|
6
|
-
readonly name: "Book event";
|
|
7
|
-
readonly response_201: {
|
|
8
|
-
event: EventBase<TId, TDate>;
|
|
9
|
-
url: string;
|
|
10
|
-
message: string;
|
|
11
|
-
};
|
|
12
|
-
readonly response_400: {
|
|
13
|
-
message: string;
|
|
14
|
-
};
|
|
15
|
-
readonly response_500: {
|
|
16
|
-
message: string;
|
|
17
|
-
error: string;
|
|
18
|
-
};
|
|
19
|
-
}, {
|
|
20
3
|
readonly method: "post";
|
|
21
4
|
readonly path: "/event";
|
|
22
5
|
readonly role: "postEvent";
|
|
@@ -31,27 +14,11 @@ export declare const eventRoleDefs: <TId, TDate>() => readonly [{
|
|
|
31
14
|
};
|
|
32
15
|
}, {
|
|
33
16
|
readonly method: "post";
|
|
34
|
-
readonly path: "/
|
|
35
|
-
readonly role: "
|
|
36
|
-
readonly name: "Create
|
|
17
|
+
readonly path: "/event/occupancies/:id";
|
|
18
|
+
readonly role: "postEventOccupanciesById";
|
|
19
|
+
readonly name: "Create event seats";
|
|
37
20
|
readonly response_201: {
|
|
38
|
-
events: EventBase<TId, TDate>[];
|
|
39
|
-
message: string;
|
|
40
|
-
};
|
|
41
|
-
readonly response_500: {
|
|
42
|
-
message: string;
|
|
43
|
-
error: string;
|
|
44
|
-
};
|
|
45
|
-
}, {
|
|
46
|
-
readonly method: "post";
|
|
47
|
-
readonly path: "/event/book/cancel";
|
|
48
|
-
readonly role: "postEventBookCancel";
|
|
49
|
-
readonly name: "Request booking cancel";
|
|
50
|
-
readonly response_200: {
|
|
51
|
-
message: string;
|
|
52
21
|
event: EventBase<TId, TDate>;
|
|
53
|
-
};
|
|
54
|
-
readonly response_404: {
|
|
55
22
|
message: string;
|
|
56
23
|
};
|
|
57
24
|
readonly response_500: {
|
|
@@ -67,9 +34,6 @@ export declare const eventRoleDefs: <TId, TDate>() => readonly [{
|
|
|
67
34
|
events: EventBase<TId, TDate>[];
|
|
68
35
|
count: number;
|
|
69
36
|
};
|
|
70
|
-
readonly response_404: {
|
|
71
|
-
message: string;
|
|
72
|
-
};
|
|
73
37
|
readonly response_500: {
|
|
74
38
|
message: string;
|
|
75
39
|
error: string;
|
|
@@ -102,19 +66,6 @@ export declare const eventRoleDefs: <TId, TDate>() => readonly [{
|
|
|
102
66
|
message: string;
|
|
103
67
|
error: string;
|
|
104
68
|
};
|
|
105
|
-
}, {
|
|
106
|
-
readonly method: "delete";
|
|
107
|
-
readonly path: "/events";
|
|
108
|
-
readonly role: "deleteEvents";
|
|
109
|
-
readonly name: "Delete many events";
|
|
110
|
-
readonly response_200: {
|
|
111
|
-
deletedCount: number;
|
|
112
|
-
message: string;
|
|
113
|
-
};
|
|
114
|
-
readonly response_500: {
|
|
115
|
-
message: string;
|
|
116
|
-
error: string;
|
|
117
|
-
};
|
|
118
69
|
}, {
|
|
119
70
|
readonly method: "delete";
|
|
120
71
|
readonly path: "/event/:id";
|
|
@@ -3,15 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.eventRoleDefs = void 0;
|
|
4
4
|
const eventRoleDefs = () => {
|
|
5
5
|
return [
|
|
6
|
-
{
|
|
7
|
-
method: 'post',
|
|
8
|
-
path: '/event/book',
|
|
9
|
-
role: 'postEventBook',
|
|
10
|
-
name: 'Book event',
|
|
11
|
-
response_201: {},
|
|
12
|
-
response_400: {},
|
|
13
|
-
response_500: {},
|
|
14
|
-
},
|
|
15
6
|
{
|
|
16
7
|
method: 'post',
|
|
17
8
|
path: '/event',
|
|
@@ -22,28 +13,18 @@ const eventRoleDefs = () => {
|
|
|
22
13
|
},
|
|
23
14
|
{
|
|
24
15
|
method: 'post',
|
|
25
|
-
path: '/
|
|
26
|
-
role: '
|
|
27
|
-
name: 'Create
|
|
16
|
+
path: '/event/occupancies/:id',
|
|
17
|
+
role: 'postEventOccupanciesById',
|
|
18
|
+
name: 'Create event seats',
|
|
28
19
|
response_201: {},
|
|
29
20
|
response_500: {},
|
|
30
21
|
},
|
|
31
|
-
{
|
|
32
|
-
method: 'post',
|
|
33
|
-
path: '/event/book/cancel',
|
|
34
|
-
role: 'postEventBookCancel',
|
|
35
|
-
name: 'Request booking cancel',
|
|
36
|
-
response_200: {},
|
|
37
|
-
response_404: {},
|
|
38
|
-
response_500: {},
|
|
39
|
-
},
|
|
40
22
|
{
|
|
41
23
|
method: 'get',
|
|
42
24
|
path: '/event',
|
|
43
25
|
role: 'getEvents',
|
|
44
26
|
name: 'Get events',
|
|
45
27
|
response_200: {},
|
|
46
|
-
response_404: {},
|
|
47
28
|
response_500: {},
|
|
48
29
|
},
|
|
49
30
|
{
|
|
@@ -63,14 +44,6 @@ const eventRoleDefs = () => {
|
|
|
63
44
|
response_404: {},
|
|
64
45
|
response_500: {},
|
|
65
46
|
},
|
|
66
|
-
{
|
|
67
|
-
method: 'delete',
|
|
68
|
-
path: '/events',
|
|
69
|
-
role: 'deleteEvents',
|
|
70
|
-
name: 'Delete many events',
|
|
71
|
-
response_200: {},
|
|
72
|
-
response_500: {},
|
|
73
|
-
},
|
|
74
47
|
{
|
|
75
48
|
method: 'delete',
|
|
76
49
|
path: '/event/:id',
|
|
@@ -32,7 +32,7 @@ export declare const jobRoleDefs: <TId, TDate>() => readonly [{
|
|
|
32
32
|
readonly role: "postJobStartById";
|
|
33
33
|
readonly name: "Run job by ID";
|
|
34
34
|
readonly response_201: {
|
|
35
|
-
job: JobAttributes<AgendaJobData<TId
|
|
35
|
+
job: JobAttributes<AgendaJobData<TId>>;
|
|
36
36
|
message: string;
|
|
37
37
|
};
|
|
38
38
|
readonly response_404: {
|
|
@@ -14,9 +14,9 @@ export declare const saleRoleDefs: <TId, TDate>() => readonly [{
|
|
|
14
14
|
};
|
|
15
15
|
}, {
|
|
16
16
|
readonly method: "get";
|
|
17
|
-
readonly path: "/sale/
|
|
18
|
-
readonly role: "
|
|
19
|
-
readonly name: "Get sales for
|
|
17
|
+
readonly path: "/sale/customer";
|
|
18
|
+
readonly role: "getSalesCustomer";
|
|
19
|
+
readonly name: "Get sales for customer";
|
|
20
20
|
readonly response_200: {
|
|
21
21
|
sales: SaleBase<TId, TDate>[];
|
|
22
22
|
count: number;
|
|
@@ -13,9 +13,9 @@ const saleRoleDefs = () => {
|
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
method: 'get',
|
|
16
|
-
path: '/sale/
|
|
17
|
-
role: '
|
|
18
|
-
name: 'Get sales for
|
|
16
|
+
path: '/sale/customer',
|
|
17
|
+
role: 'getSalesCustomer',
|
|
18
|
+
name: 'Get sales for customer',
|
|
19
19
|
response_200: {},
|
|
20
20
|
response_500: {},
|
|
21
21
|
},
|
|
@@ -30,9 +30,9 @@ export declare const occupanceRoleDefs: <TId, TDate>() => readonly [{
|
|
|
30
30
|
};
|
|
31
31
|
}, {
|
|
32
32
|
readonly method: "get";
|
|
33
|
-
readonly path: "/occupance/
|
|
34
|
-
readonly role: "
|
|
35
|
-
readonly name: "Get occupancies for
|
|
33
|
+
readonly path: "/occupance/customer";
|
|
34
|
+
readonly role: "getOccupanciesCustomer";
|
|
35
|
+
readonly name: "Get occupancies for customer";
|
|
36
36
|
readonly response_200: {
|
|
37
37
|
occupancies: FlatOccupanceWithSeat<TId, TDate>[];
|
|
38
38
|
count: number;
|
|
@@ -22,9 +22,9 @@ const occupanceRoleDefs = () => {
|
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
method: 'get',
|
|
25
|
-
path: '/occupance/
|
|
26
|
-
role: '
|
|
27
|
-
name: 'Get occupancies for
|
|
25
|
+
path: '/occupance/customer',
|
|
26
|
+
role: 'getOccupanciesCustomer',
|
|
27
|
+
name: 'Get occupancies for customer',
|
|
28
28
|
response_200: {},
|
|
29
29
|
response_500: {},
|
|
30
30
|
},
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
import type { UserBase } from '../inputsDefault';
|
|
1
|
+
import type { UserBase, UserTypeWithPopulatedRolesBase } from '../inputsDefault';
|
|
2
2
|
export declare const userRoleDefs: <TId, TDate>() => readonly [{
|
|
3
3
|
readonly method: "post";
|
|
4
|
-
readonly path: "/user";
|
|
5
|
-
readonly role: "
|
|
6
|
-
readonly name: "
|
|
4
|
+
readonly path: "/user/admin";
|
|
5
|
+
readonly role: "postUserAdmin";
|
|
6
|
+
readonly name: "Create user as root";
|
|
7
7
|
readonly response_201: {
|
|
8
|
+
user: UserBase<TId, TDate>;
|
|
8
9
|
message: string;
|
|
9
10
|
};
|
|
10
|
-
readonly
|
|
11
|
+
readonly response_400: {
|
|
11
12
|
message: string;
|
|
12
|
-
error: string;
|
|
13
13
|
};
|
|
14
|
-
|
|
15
|
-
readonly method: "post";
|
|
16
|
-
readonly path: "/user/admin";
|
|
17
|
-
readonly role: "postUserAdmin";
|
|
18
|
-
readonly name: "Create user as admin";
|
|
19
|
-
readonly response_201: {
|
|
20
|
-
user: UserBase<TId, TDate>;
|
|
14
|
+
readonly response_401: {
|
|
21
15
|
message: string;
|
|
22
16
|
};
|
|
23
17
|
readonly response_500: {
|
|
@@ -35,6 +29,9 @@ export declare const userRoleDefs: <TId, TDate>() => readonly [{
|
|
|
35
29
|
};
|
|
36
30
|
readonly response_401: {
|
|
37
31
|
message: string;
|
|
32
|
+
};
|
|
33
|
+
readonly response_500: {
|
|
34
|
+
message: string;
|
|
38
35
|
error: string;
|
|
39
36
|
};
|
|
40
37
|
}, {
|
|
@@ -72,6 +69,9 @@ export declare const userRoleDefs: <TId, TDate>() => readonly [{
|
|
|
72
69
|
user: UserBase<TId, TDate>;
|
|
73
70
|
message: string;
|
|
74
71
|
};
|
|
72
|
+
readonly response_404: {
|
|
73
|
+
message: string;
|
|
74
|
+
};
|
|
75
75
|
readonly response_500: {
|
|
76
76
|
message: string;
|
|
77
77
|
error: string;
|
|
@@ -82,7 +82,7 @@ export declare const userRoleDefs: <TId, TDate>() => readonly [{
|
|
|
82
82
|
readonly role: "getUser";
|
|
83
83
|
readonly name: "Get current user";
|
|
84
84
|
readonly response_200: {
|
|
85
|
-
user:
|
|
85
|
+
user: UserTypeWithPopulatedRolesBase<TId, TDate>;
|
|
86
86
|
};
|
|
87
87
|
readonly response_500: {
|
|
88
88
|
message: string;
|
|
@@ -104,11 +104,11 @@ export declare const userRoleDefs: <TId, TDate>() => readonly [{
|
|
|
104
104
|
}, {
|
|
105
105
|
readonly method: "get";
|
|
106
106
|
readonly path: "/user/all";
|
|
107
|
-
readonly role: "
|
|
108
|
-
readonly name: "Get
|
|
107
|
+
readonly role: "getUserAll";
|
|
108
|
+
readonly name: "Get all user";
|
|
109
109
|
readonly response_200: {
|
|
110
110
|
users: UserBase<TId, TDate>[];
|
|
111
|
-
count
|
|
111
|
+
count?: number;
|
|
112
112
|
};
|
|
113
113
|
readonly response_500: {
|
|
114
114
|
message: string;
|
|
@@ -124,7 +124,6 @@ export declare const userRoleDefs: <TId, TDate>() => readonly [{
|
|
|
124
124
|
message: string;
|
|
125
125
|
};
|
|
126
126
|
readonly response_404: {
|
|
127
|
-
user: UserBase<TId, TDate> | null;
|
|
128
127
|
message: string;
|
|
129
128
|
};
|
|
130
129
|
readonly response_500: {
|
|
@@ -141,7 +140,6 @@ export declare const userRoleDefs: <TId, TDate>() => readonly [{
|
|
|
141
140
|
message: string;
|
|
142
141
|
};
|
|
143
142
|
readonly response_404: {
|
|
144
|
-
user: UserBase<TId, TDate> | null;
|
|
145
143
|
message: string;
|
|
146
144
|
};
|
|
147
145
|
readonly response_500: {
|
|
@@ -158,7 +156,6 @@ export declare const userRoleDefs: <TId, TDate>() => readonly [{
|
|
|
158
156
|
message: string;
|
|
159
157
|
};
|
|
160
158
|
readonly response_404: {
|
|
161
|
-
user: UserBase<TId, TDate> | null;
|
|
162
159
|
message: string;
|
|
163
160
|
};
|
|
164
161
|
readonly response_500: {
|
|
@@ -175,7 +172,6 @@ export declare const userRoleDefs: <TId, TDate>() => readonly [{
|
|
|
175
172
|
message: string;
|
|
176
173
|
};
|
|
177
174
|
readonly response_404: {
|
|
178
|
-
user: UserBase<TId, TDate> | null;
|
|
179
175
|
message: string;
|
|
180
176
|
};
|
|
181
177
|
readonly response_500: {
|
|
@@ -3,20 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.userRoleDefs = void 0;
|
|
4
4
|
const userRoleDefs = () => {
|
|
5
5
|
return [
|
|
6
|
-
{
|
|
7
|
-
method: 'post',
|
|
8
|
-
path: '/user',
|
|
9
|
-
role: 'postUser',
|
|
10
|
-
name: 'Register user',
|
|
11
|
-
response_201: {},
|
|
12
|
-
response_500: {},
|
|
13
|
-
},
|
|
14
6
|
{
|
|
15
7
|
method: 'post',
|
|
16
8
|
path: '/user/admin',
|
|
17
9
|
role: 'postUserAdmin',
|
|
18
|
-
name: 'Create user as
|
|
10
|
+
name: 'Create user as root',
|
|
19
11
|
response_201: {},
|
|
12
|
+
response_400: {},
|
|
13
|
+
response_401: {},
|
|
20
14
|
response_500: {},
|
|
21
15
|
},
|
|
22
16
|
{
|
|
@@ -26,6 +20,7 @@ const userRoleDefs = () => {
|
|
|
26
20
|
name: 'User login (token)',
|
|
27
21
|
response_200: {},
|
|
28
22
|
response_401: {},
|
|
23
|
+
response_500: {},
|
|
29
24
|
},
|
|
30
25
|
{
|
|
31
26
|
method: 'post',
|
|
@@ -49,6 +44,7 @@ const userRoleDefs = () => {
|
|
|
49
44
|
role: 'postUserLogoutById',
|
|
50
45
|
name: 'User logout by session id',
|
|
51
46
|
response_200: {},
|
|
47
|
+
response_404: {},
|
|
52
48
|
response_500: {},
|
|
53
49
|
},
|
|
54
50
|
{
|
|
@@ -71,8 +67,8 @@ const userRoleDefs = () => {
|
|
|
71
67
|
{
|
|
72
68
|
method: 'get',
|
|
73
69
|
path: '/user/all',
|
|
74
|
-
role: '
|
|
75
|
-
name: 'Get
|
|
70
|
+
role: 'getUserAll',
|
|
71
|
+
name: 'Get all user',
|
|
76
72
|
response_200: {},
|
|
77
73
|
response_500: {},
|
|
78
74
|
},
|