@edsis/angular 21.1.2 → 21.1.4

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 (29) hide show
  1. package/fesm2022/edsis-angular-auth.mjs +333 -98
  2. package/fesm2022/edsis-angular-auth.mjs.map +1 -1
  3. package/fesm2022/edsis-angular-sdk-access.mjs +1103 -1104
  4. package/fesm2022/edsis-angular-sdk-access.mjs.map +1 -1
  5. package/fesm2022/edsis-angular-sdk-approval.mjs +1016 -1017
  6. package/fesm2022/edsis-angular-sdk-approval.mjs.map +1 -1
  7. package/fesm2022/edsis-angular-sdk-auth.mjs +120 -121
  8. package/fesm2022/edsis-angular-sdk-auth.mjs.map +1 -1
  9. package/fesm2022/edsis-angular-sdk-employee.mjs +112 -113
  10. package/fesm2022/edsis-angular-sdk-employee.mjs.map +1 -1
  11. package/fesm2022/edsis-angular-sdk-health.mjs +41 -42
  12. package/fesm2022/edsis-angular-sdk-health.mjs.map +1 -1
  13. package/fesm2022/edsis-angular-sdk-shared.mjs +9 -9
  14. package/fesm2022/edsis-angular-sdk-storage.mjs +131 -132
  15. package/fesm2022/edsis-angular-sdk-storage.mjs.map +1 -1
  16. package/fesm2022/edsis-angular-sdk-user.mjs +204 -205
  17. package/fesm2022/edsis-angular-sdk-user.mjs.map +1 -1
  18. package/fesm2022/edsis-angular-sdk.mjs +6679 -24
  19. package/fesm2022/edsis-angular-sdk.mjs.map +1 -1
  20. package/package.json +1 -1
  21. package/types/edsis-angular-auth.d.ts +5 -4
  22. package/types/edsis-angular-sdk-access.d.ts +11 -12
  23. package/types/edsis-angular-sdk-approval.d.ts +11 -12
  24. package/types/edsis-angular-sdk-auth.d.ts +3 -4
  25. package/types/edsis-angular-sdk-employee.d.ts +3 -4
  26. package/types/edsis-angular-sdk-health.d.ts +3 -4
  27. package/types/edsis-angular-sdk-storage.d.ts +5 -6
  28. package/types/edsis-angular-sdk-user.d.ts +3 -4
  29. package/types/edsis-angular-sdk.d.ts +1918 -17
@@ -1,603 +1,514 @@
1
- import { RequestBuilder, BaseService } from '@edsis/angular/sdk/shared';
2
- export * from '@edsis/angular/sdk/shared';
3
1
  import { HttpResponse } from '@angular/common/http';
4
2
  import * as i0 from '@angular/core';
5
3
  import { Injectable } from '@angular/core';
6
4
  import { filter, map } from 'rxjs/operators';
5
+ import { RequestBuilder, BaseService } from '@edsis/angular/sdk/shared';
7
6
 
8
7
  /* eslint-disable */
9
8
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
10
- function createPermission(http, rootUrl, params, context) {
11
- const rb = new RequestBuilder(rootUrl, createPermission.PATH, 'post');
12
- if (params) {
13
- rb.body(params.body, 'application/json');
14
- }
15
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
16
- }
17
- createPermission.PATH = '/v1/access/permission';
18
-
19
- /* eslint-disable */
20
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
21
- function deletePermissionByID(http, rootUrl, params, context) {
22
- const rb = new RequestBuilder(rootUrl, deletePermissionByID.PATH, 'delete');
23
- if (params) {
24
- rb.path('id', params.id);
25
- }
26
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
27
- }
28
- deletePermissionByID.PATH = '/v1/access/permission/{id}';
29
-
30
- /* eslint-disable */
31
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
32
- function getPermissionByID(http, rootUrl, params, context) {
33
- const rb = new RequestBuilder(rootUrl, getPermissionByID.PATH, 'get');
34
- if (params) {
35
- rb.path('id', params.id);
36
- }
37
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
38
- }
39
- getPermissionByID.PATH = '/v1/access/permission/{id}';
40
-
41
- /* eslint-disable */
42
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
43
- function listPermissions(http, rootUrl, params, context) {
44
- const rb = new RequestBuilder(rootUrl, listPermissions.PATH, 'get');
45
- if (params) {
46
- rb.query('page', params.page);
47
- rb.query('limit', params.limit);
48
- rb.query('sort', params.sort);
49
- rb.query('order', params.order);
50
- rb.query('search', params.search);
51
- rb.query('namespace', params.namespace);
52
- rb.query('resource', params.resource);
53
- rb.query('action', params.action);
54
- rb.query('scope', params.scope);
55
- }
56
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
57
- }
58
- listPermissions.PATH = '/v1/access/permission';
59
-
60
- /* eslint-disable */
61
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
62
- function patchPermissionByID(http, rootUrl, params, context) {
63
- const rb = new RequestBuilder(rootUrl, patchPermissionByID.PATH, 'patch');
64
- if (params) {
65
- rb.path('id', params.id);
66
- rb.body(params.body, 'application/json');
67
- }
68
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
69
- }
70
- patchPermissionByID.PATH = '/v1/access/permission/{id}';
9
+ const permissionOperationRules = {
10
+ createPermission: {
11
+ method: 'POST',
12
+ path: '/v1/access/permission',
13
+ tags: ['Permission'],
14
+ summary: 'Create permission',
15
+ description: 'Creates a permission master record from `namespace`, `resource`, `action`, and optional `scope` segments.',
16
+ requiredPermissions: ['access:permission:create'],
17
+ authorizationNotes: [],
18
+ securitySchemes: ['callerAuth'],
19
+ pathParams: {},
20
+ queryParams: {},
21
+ bodySchema: 'CreatePermissionRequest',
22
+ responseSchemas: {
23
+ '201': 'PermissionResponse',
24
+ '400': 'ErrorResponse',
25
+ '401': 'UnauthorizedCaller',
26
+ '409': 'ErrorResponse',
27
+ '429': 'TooManyRequests',
28
+ '500': 'InternalServerError',
29
+ },
30
+ },
31
+ deletePermissionByID: {
32
+ method: 'DELETE',
33
+ path: '/v1/access/permission/{id}',
34
+ tags: ['Permission'],
35
+ summary: 'Delete permission',
36
+ description: 'Deletes a permission master record and invalidates effective permission cache.',
37
+ requiredPermissions: ['access:permission:delete'],
38
+ authorizationNotes: [],
39
+ securitySchemes: ['callerAuth'],
40
+ pathParams: {
41
+ id: {
42
+ required: true,
43
+ type: 'string',
44
+ format: 'uuid',
45
+ },
46
+ },
47
+ queryParams: {},
48
+ responseSchemas: {
49
+ '200': 'AccessMutationAckResponse',
50
+ '400': 'ErrorResponse',
51
+ '401': 'UnauthorizedCaller',
52
+ '404': 'ResourceNotFound',
53
+ '429': 'TooManyRequests',
54
+ '500': 'InternalServerError',
55
+ },
56
+ },
57
+ getPermissionByID: {
58
+ method: 'GET',
59
+ path: '/v1/access/permission/{id}',
60
+ tags: ['Permission'],
61
+ summary: 'Get permission detail',
62
+ description: 'Returns one permission master record by identifier.',
63
+ requiredPermissions: ['access:permission:read'],
64
+ authorizationNotes: [],
65
+ securitySchemes: ['callerAuth'],
66
+ pathParams: {
67
+ id: {
68
+ required: true,
69
+ type: 'string',
70
+ format: 'uuid',
71
+ },
72
+ },
73
+ queryParams: {},
74
+ responseSchemas: {
75
+ '200': 'PermissionResponse',
76
+ '400': 'ErrorResponse',
77
+ '401': 'UnauthorizedCaller',
78
+ '404': 'ResourceNotFound',
79
+ '429': 'TooManyRequests',
80
+ '500': 'InternalServerError',
81
+ },
82
+ },
83
+ listPermissions: {
84
+ method: 'GET',
85
+ path: '/v1/access/permission',
86
+ tags: ['Permission'],
87
+ summary: 'List permissions',
88
+ description: 'Returns a paginated permission master list, optionally filtered by namespace, resource, action, and scope using the `namespace:resource:action[:scope]` naming rule.',
89
+ requiredPermissions: ['access:permission:list'],
90
+ authorizationNotes: [],
91
+ securitySchemes: ['callerAuth'],
92
+ pathParams: {},
93
+ queryParams: {
94
+ page: {
95
+ required: false,
96
+ type: 'integer',
97
+ minimum: 1,
98
+ },
99
+ limit: {
100
+ required: false,
101
+ type: 'integer',
102
+ minimum: 1,
103
+ maximum: 100,
104
+ },
105
+ sort: {
106
+ required: false,
107
+ type: 'string',
108
+ enumValues: ['created_at', 'name', 'code', 'resource', 'action', 'updated_at'],
109
+ },
110
+ order: {
111
+ required: false,
112
+ type: 'string',
113
+ enumValues: ['asc', 'desc'],
114
+ },
115
+ search: {
116
+ required: false,
117
+ type: 'string',
118
+ },
119
+ namespace: {
120
+ required: false,
121
+ type: 'string',
122
+ },
123
+ resource: {
124
+ required: false,
125
+ type: 'string',
126
+ },
127
+ action: {
128
+ required: false,
129
+ type: 'string',
130
+ },
131
+ scope: {
132
+ required: false,
133
+ type: 'string',
134
+ },
135
+ },
136
+ responseSchemas: {
137
+ '200': 'PermissionListResponse',
138
+ '401': 'UnauthorizedCaller',
139
+ '429': 'TooManyRequests',
140
+ '500': 'InternalServerError',
141
+ },
142
+ },
143
+ patchPermissionByID: {
144
+ method: 'PATCH',
145
+ path: '/v1/access/permission/{id}',
146
+ tags: ['Permission'],
147
+ summary: 'Update permission',
148
+ description: 'Partially updates a permission master record.',
149
+ requiredPermissions: ['access:permission:update'],
150
+ authorizationNotes: [],
151
+ securitySchemes: ['callerAuth'],
152
+ pathParams: {
153
+ id: {
154
+ required: true,
155
+ type: 'string',
156
+ format: 'uuid',
157
+ },
158
+ },
159
+ queryParams: {},
160
+ bodySchema: 'UpdatePermissionRequest',
161
+ responseSchemas: {
162
+ '200': 'PermissionResponse',
163
+ '400': 'ErrorResponse',
164
+ '401': 'UnauthorizedCaller',
165
+ '404': 'ResourceNotFound',
166
+ '409': 'ErrorResponse',
167
+ '429': 'TooManyRequests',
168
+ '500': 'InternalServerError',
169
+ },
170
+ },
171
+ };
71
172
 
72
173
  /* eslint-disable */
73
174
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
74
- class PermissionService extends BaseService {
75
- /** Create permission (POST /v1/access/permission) */
76
- createPermission$Response(params, context) {
77
- return createPermission(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
78
- }
79
- /** Create permission (POST /v1/access/permission) */
80
- createPermission(params, context) {
81
- return this.createPermission$Response(params, context).pipe(map((r) => r.body));
82
- }
83
- /** Delete permission (DELETE /v1/access/permission/{id}) */
84
- deletePermissionByID$Response(params, context) {
85
- return deletePermissionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
86
- }
87
- /** Delete permission (DELETE /v1/access/permission/{id}) */
88
- deletePermissionByID(params, context) {
89
- return this.deletePermissionByID$Response(params, context).pipe(map((r) => r.body));
90
- }
91
- /** Get permission detail (GET /v1/access/permission/{id}) */
92
- getPermissionByID$Response(params, context) {
93
- return getPermissionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
94
- }
95
- /** Get permission detail (GET /v1/access/permission/{id}) */
96
- getPermissionByID(params, context) {
97
- return this.getPermissionByID$Response(params, context).pipe(map((r) => r.body));
98
- }
99
- /** List permissions (GET /v1/access/permission) */
100
- listPermissions$Response(params, context) {
101
- return listPermissions(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
102
- }
103
- /** List permissions (GET /v1/access/permission) */
104
- listPermissions(params, context) {
105
- return this.listPermissions$Response(params, context).pipe(map((r) => r.body));
106
- }
107
- /** Update permission (PATCH /v1/access/permission/{id}) */
108
- patchPermissionByID$Response(params, context) {
109
- return patchPermissionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
110
- }
111
- /** Update permission (PATCH /v1/access/permission/{id}) */
112
- patchPermissionByID(params, context) {
113
- return this.patchPermissionByID$Response(params, context).pipe(map((r) => r.body));
114
- }
115
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: PermissionService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
116
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: PermissionService, providedIn: 'root' });
117
- }
118
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: PermissionService, decorators: [{
119
- type: Injectable,
120
- args: [{ providedIn: 'root' }]
121
- }] });
122
-
123
- /* eslint-disable */
124
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
125
- function createPermissionUser(http, rootUrl, params, context) {
126
- const rb = new RequestBuilder(rootUrl, createPermissionUser.PATH, 'post');
127
- if (params) {
128
- rb.body(params.body, 'application/json');
129
- }
130
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
131
- }
132
- createPermissionUser.PATH = '/v1/access/permission-user';
133
-
134
- /* eslint-disable */
135
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
136
- function deletePermissionUserByID(http, rootUrl, params, context) {
137
- const rb = new RequestBuilder(rootUrl, deletePermissionUserByID.PATH, 'delete');
138
- if (params) {
139
- rb.path('id', params.id);
140
- }
141
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
142
- }
143
- deletePermissionUserByID.PATH = '/v1/access/permission-user/{id}';
144
-
145
- /* eslint-disable */
146
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
147
- function getPermissionUserByID(http, rootUrl, params, context) {
148
- const rb = new RequestBuilder(rootUrl, getPermissionUserByID.PATH, 'get');
149
- if (params) {
150
- rb.path('id', params.id);
151
- }
152
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
153
- }
154
- getPermissionUserByID.PATH = '/v1/access/permission-user/{id}';
155
-
156
- /* eslint-disable */
157
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
158
- function listPermissionUsers(http, rootUrl, params, context) {
159
- const rb = new RequestBuilder(rootUrl, listPermissionUsers.PATH, 'get');
160
- if (params) {
161
- rb.query('page', params.page);
162
- rb.query('limit', params.limit);
163
- rb.query('sort', params.sort);
164
- rb.query('order', params.order);
165
- rb.query('permission_id', params.permission_id);
166
- rb.query('user_id', params.user_id);
167
- }
168
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
169
- }
170
- listPermissionUsers.PATH = '/v1/access/permission-user';
171
-
172
- /* eslint-disable */
173
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
174
- function patchPermissionUserByID(http, rootUrl, params, context) {
175
- const rb = new RequestBuilder(rootUrl, patchPermissionUserByID.PATH, 'patch');
176
- if (params) {
177
- rb.path('id', params.id);
178
- rb.body(params.body, 'application/json');
179
- }
180
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
181
- }
182
- patchPermissionUserByID.PATH = '/v1/access/permission-user/{id}';
183
-
184
- /* eslint-disable */
185
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
186
- class PermissionUserService extends BaseService {
187
- /** Create permission-user relation (POST /v1/access/permission-user) */
188
- createPermissionUser$Response(params, context) {
189
- return createPermissionUser(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
190
- }
191
- /** Create permission-user relation (POST /v1/access/permission-user) */
192
- createPermissionUser(params, context) {
193
- return this.createPermissionUser$Response(params, context).pipe(map((r) => r.body));
194
- }
195
- /** Delete permission-user relation (DELETE /v1/access/permission-user/{id}) */
196
- deletePermissionUserByID$Response(params, context) {
197
- return deletePermissionUserByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
198
- }
199
- /** Delete permission-user relation (DELETE /v1/access/permission-user/{id}) */
200
- deletePermissionUserByID(params, context) {
201
- return this.deletePermissionUserByID$Response(params, context).pipe(map((r) => r.body));
202
- }
203
- /** Get permission-user detail (GET /v1/access/permission-user/{id}) */
204
- getPermissionUserByID$Response(params, context) {
205
- return getPermissionUserByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
206
- }
207
- /** Get permission-user detail (GET /v1/access/permission-user/{id}) */
208
- getPermissionUserByID(params, context) {
209
- return this.getPermissionUserByID$Response(params, context).pipe(map((r) => r.body));
210
- }
211
- /** List permission-user relations (GET /v1/access/permission-user) */
212
- listPermissionUsers$Response(params, context) {
213
- return listPermissionUsers(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
214
- }
215
- /** List permission-user relations (GET /v1/access/permission-user) */
216
- listPermissionUsers(params, context) {
217
- return this.listPermissionUsers$Response(params, context).pipe(map((r) => r.body));
218
- }
219
- /** Update permission-user relation (PATCH /v1/access/permission-user/{id}) */
220
- patchPermissionUserByID$Response(params, context) {
221
- return patchPermissionUserByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
222
- }
223
- /** Update permission-user relation (PATCH /v1/access/permission-user/{id}) */
224
- patchPermissionUserByID(params, context) {
225
- return this.patchPermissionUserByID$Response(params, context).pipe(map((r) => r.body));
226
- }
227
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: PermissionUserService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
228
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: PermissionUserService, providedIn: 'root' });
229
- }
230
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: PermissionUserService, decorators: [{
231
- type: Injectable,
232
- args: [{ providedIn: 'root' }]
233
- }] });
234
-
235
- /* eslint-disable */
236
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
237
- function createRole(http, rootUrl, params, context) {
238
- const rb = new RequestBuilder(rootUrl, createRole.PATH, 'post');
239
- if (params) {
240
- rb.body(params.body, 'application/json');
241
- }
242
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
243
- }
244
- createRole.PATH = '/v1/access/role';
245
-
246
- /* eslint-disable */
247
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
248
- function deleteRoleByID(http, rootUrl, params, context) {
249
- const rb = new RequestBuilder(rootUrl, deleteRoleByID.PATH, 'delete');
250
- if (params) {
251
- rb.path('id', params.id);
252
- }
253
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
254
- }
255
- deleteRoleByID.PATH = '/v1/access/role/{id}';
256
-
257
- /* eslint-disable */
258
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
259
- function getRoleByID(http, rootUrl, params, context) {
260
- const rb = new RequestBuilder(rootUrl, getRoleByID.PATH, 'get');
261
- if (params) {
262
- rb.path('id', params.id);
263
- }
264
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
265
- }
266
- getRoleByID.PATH = '/v1/access/role/{id}';
267
-
268
- /* eslint-disable */
269
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
270
- function listRoles(http, rootUrl, params, context) {
271
- const rb = new RequestBuilder(rootUrl, listRoles.PATH, 'get');
272
- if (params) {
273
- rb.query('page', params.page);
274
- rb.query('limit', params.limit);
275
- rb.query('sort', params.sort);
276
- rb.query('order', params.order);
277
- rb.query('search', params.search);
278
- }
279
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
280
- }
281
- listRoles.PATH = '/v1/access/role';
282
-
283
- /* eslint-disable */
284
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
285
- function patchRoleByID(http, rootUrl, params, context) {
286
- const rb = new RequestBuilder(rootUrl, patchRoleByID.PATH, 'patch');
287
- if (params) {
288
- rb.path('id', params.id);
289
- rb.body(params.body, 'application/json');
290
- }
291
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
292
- }
293
- patchRoleByID.PATH = '/v1/access/role/{id}';
294
-
295
- /* eslint-disable */
296
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
297
- class RoleService extends BaseService {
298
- /** Create role (POST /v1/access/role) */
299
- createRole$Response(params, context) {
300
- return createRole(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
301
- }
302
- /** Create role (POST /v1/access/role) */
303
- createRole(params, context) {
304
- return this.createRole$Response(params, context).pipe(map((r) => r.body));
305
- }
306
- /** Delete role (DELETE /v1/access/role/{id}) */
307
- deleteRoleByID$Response(params, context) {
308
- return deleteRoleByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
309
- }
310
- /** Delete role (DELETE /v1/access/role/{id}) */
311
- deleteRoleByID(params, context) {
312
- return this.deleteRoleByID$Response(params, context).pipe(map((r) => r.body));
313
- }
314
- /** Get role detail (GET /v1/access/role/{id}) */
315
- getRoleByID$Response(params, context) {
316
- return getRoleByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
317
- }
318
- /** Get role detail (GET /v1/access/role/{id}) */
319
- getRoleByID(params, context) {
320
- return this.getRoleByID$Response(params, context).pipe(map((r) => r.body));
321
- }
322
- /** List roles (GET /v1/access/role) */
323
- listRoles$Response(params, context) {
324
- return listRoles(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
325
- }
326
- /** List roles (GET /v1/access/role) */
327
- listRoles(params, context) {
328
- return this.listRoles$Response(params, context).pipe(map((r) => r.body));
329
- }
330
- /** Update role (PATCH /v1/access/role/{id}) */
331
- patchRoleByID$Response(params, context) {
332
- return patchRoleByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
333
- }
334
- /** Update role (PATCH /v1/access/role/{id}) */
335
- patchRoleByID(params, context) {
336
- return this.patchRoleByID$Response(params, context).pipe(map((r) => r.body));
337
- }
338
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: RoleService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
339
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: RoleService, providedIn: 'root' });
340
- }
341
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: RoleService, decorators: [{
342
- type: Injectable,
343
- args: [{ providedIn: 'root' }]
344
- }] });
345
-
346
- /* eslint-disable */
347
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
348
- function createRolePermission(http, rootUrl, params, context) {
349
- const rb = new RequestBuilder(rootUrl, createRolePermission.PATH, 'post');
350
- if (params) {
351
- rb.body(params.body, 'application/json');
352
- }
353
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
354
- }
355
- createRolePermission.PATH = '/v1/access/role-permission';
356
-
357
- /* eslint-disable */
358
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
359
- function deleteRolePermissionByID(http, rootUrl, params, context) {
360
- const rb = new RequestBuilder(rootUrl, deleteRolePermissionByID.PATH, 'delete');
361
- if (params) {
362
- rb.path('id', params.id);
363
- }
364
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
365
- }
366
- deleteRolePermissionByID.PATH = '/v1/access/role-permission/{id}';
367
-
368
- /* eslint-disable */
369
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
370
- function getRolePermissionByID(http, rootUrl, params, context) {
371
- const rb = new RequestBuilder(rootUrl, getRolePermissionByID.PATH, 'get');
372
- if (params) {
373
- rb.path('id', params.id);
374
- }
375
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
376
- }
377
- getRolePermissionByID.PATH = '/v1/access/role-permission/{id}';
378
-
379
- /* eslint-disable */
380
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
381
- function listRolePermissions(http, rootUrl, params, context) {
382
- const rb = new RequestBuilder(rootUrl, listRolePermissions.PATH, 'get');
383
- if (params) {
384
- rb.query('page', params.page);
385
- rb.query('limit', params.limit);
386
- rb.query('sort', params.sort);
387
- rb.query('order', params.order);
388
- rb.query('role_id', params.role_id);
389
- rb.query('permission_id', params.permission_id);
390
- }
391
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
392
- }
393
- listRolePermissions.PATH = '/v1/access/role-permission';
394
-
395
- /* eslint-disable */
396
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
397
- function patchRolePermissionByID(http, rootUrl, params, context) {
398
- const rb = new RequestBuilder(rootUrl, patchRolePermissionByID.PATH, 'patch');
399
- if (params) {
400
- rb.path('id', params.id);
401
- rb.body(params.body, 'application/json');
402
- }
403
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
404
- }
405
- patchRolePermissionByID.PATH = '/v1/access/role-permission/{id}';
406
-
407
- /* eslint-disable */
408
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
409
- class RolePermissionService extends BaseService {
410
- /** Create role-permission relation (POST /v1/access/role-permission) */
411
- createRolePermission$Response(params, context) {
412
- return createRolePermission(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
413
- }
414
- /** Create role-permission relation (POST /v1/access/role-permission) */
415
- createRolePermission(params, context) {
416
- return this.createRolePermission$Response(params, context).pipe(map((r) => r.body));
417
- }
418
- /** Delete role-permission relation (DELETE /v1/access/role-permission/{id}) */
419
- deleteRolePermissionByID$Response(params, context) {
420
- return deleteRolePermissionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
421
- }
422
- /** Delete role-permission relation (DELETE /v1/access/role-permission/{id}) */
423
- deleteRolePermissionByID(params, context) {
424
- return this.deleteRolePermissionByID$Response(params, context).pipe(map((r) => r.body));
425
- }
426
- /** Get role-permission detail (GET /v1/access/role-permission/{id}) */
427
- getRolePermissionByID$Response(params, context) {
428
- return getRolePermissionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
429
- }
430
- /** Get role-permission detail (GET /v1/access/role-permission/{id}) */
431
- getRolePermissionByID(params, context) {
432
- return this.getRolePermissionByID$Response(params, context).pipe(map((r) => r.body));
433
- }
434
- /** List role-permission relations (GET /v1/access/role-permission) */
435
- listRolePermissions$Response(params, context) {
436
- return listRolePermissions(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
437
- }
438
- /** List role-permission relations (GET /v1/access/role-permission) */
439
- listRolePermissions(params, context) {
440
- return this.listRolePermissions$Response(params, context).pipe(map((r) => r.body));
441
- }
442
- /** Update role-permission relation (PATCH /v1/access/role-permission/{id}) */
443
- patchRolePermissionByID$Response(params, context) {
444
- return patchRolePermissionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
445
- }
446
- /** Update role-permission relation (PATCH /v1/access/role-permission/{id}) */
447
- patchRolePermissionByID(params, context) {
448
- return this.patchRolePermissionByID$Response(params, context).pipe(map((r) => r.body));
449
- }
450
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: RolePermissionService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
451
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: RolePermissionService, providedIn: 'root' });
452
- }
453
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: RolePermissionService, decorators: [{
454
- type: Injectable,
455
- args: [{ providedIn: 'root' }]
456
- }] });
457
-
458
- /* eslint-disable */
459
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
460
- function createRoleUser(http, rootUrl, params, context) {
461
- const rb = new RequestBuilder(rootUrl, createRoleUser.PATH, 'post');
462
- if (params) {
463
- rb.body(params.body, 'application/json');
464
- }
465
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
466
- }
467
- createRoleUser.PATH = '/v1/access/role-user';
468
-
469
- /* eslint-disable */
470
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
471
- function deleteRoleUserByID(http, rootUrl, params, context) {
472
- const rb = new RequestBuilder(rootUrl, deleteRoleUserByID.PATH, 'delete');
473
- if (params) {
474
- rb.path('id', params.id);
475
- }
476
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
477
- }
478
- deleteRoleUserByID.PATH = '/v1/access/role-user/{id}';
479
-
480
- /* eslint-disable */
481
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
482
- function getRoleUserByID(http, rootUrl, params, context) {
483
- const rb = new RequestBuilder(rootUrl, getRoleUserByID.PATH, 'get');
484
- if (params) {
485
- rb.path('id', params.id);
486
- }
487
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
488
- }
489
- getRoleUserByID.PATH = '/v1/access/role-user/{id}';
490
-
491
- /* eslint-disable */
492
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
493
- function listRoleUsers(http, rootUrl, params, context) {
494
- const rb = new RequestBuilder(rootUrl, listRoleUsers.PATH, 'get');
495
- if (params) {
496
- rb.query('page', params.page);
497
- rb.query('limit', params.limit);
498
- rb.query('sort', params.sort);
499
- rb.query('order', params.order);
500
- rb.query('role_id', params.role_id);
501
- rb.query('user_id', params.user_id);
502
- }
503
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
504
- }
505
- listRoleUsers.PATH = '/v1/access/role-user';
506
-
507
- /* eslint-disable */
508
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
509
- function patchRoleUserByID(http, rootUrl, params, context) {
510
- const rb = new RequestBuilder(rootUrl, patchRoleUserByID.PATH, 'patch');
511
- if (params) {
512
- rb.path('id', params.id);
513
- rb.body(params.body, 'application/json');
514
- }
515
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
516
- }
517
- patchRoleUserByID.PATH = '/v1/access/role-user/{id}';
175
+ const permissionUserOperationRules = {
176
+ createPermissionUser: {
177
+ method: 'POST',
178
+ path: '/v1/access/permission-user',
179
+ tags: ['Permission User'],
180
+ summary: 'Create permission-user relation',
181
+ description: 'Assigns a direct permission to a user through the CRUD relation table.',
182
+ requiredPermissions: ['access:permission_user:create'],
183
+ authorizationNotes: [],
184
+ securitySchemes: ['callerAuth'],
185
+ pathParams: {},
186
+ queryParams: {},
187
+ bodySchema: 'CreatePermissionUserRequest',
188
+ responseSchemas: {
189
+ '201': 'PermissionUserResponse',
190
+ '400': 'ErrorResponse',
191
+ '401': 'UnauthorizedCaller',
192
+ '404': 'ResourceNotFound',
193
+ '409': 'ErrorResponse',
194
+ '429': 'TooManyRequests',
195
+ '500': 'InternalServerError',
196
+ },
197
+ },
198
+ deletePermissionUserByID: {
199
+ method: 'DELETE',
200
+ path: '/v1/access/permission-user/{id}',
201
+ tags: ['Permission User'],
202
+ summary: 'Delete permission-user relation',
203
+ description: 'Removes one permission-user relation row.',
204
+ requiredPermissions: ['access:permission_user:delete'],
205
+ authorizationNotes: [],
206
+ securitySchemes: ['callerAuth'],
207
+ pathParams: {
208
+ id: {
209
+ required: true,
210
+ type: 'string',
211
+ format: 'uuid',
212
+ },
213
+ },
214
+ queryParams: {},
215
+ responseSchemas: {
216
+ '200': 'AccessMutationAckResponse',
217
+ '400': 'ErrorResponse',
218
+ '401': 'UnauthorizedCaller',
219
+ '404': 'ResourceNotFound',
220
+ '429': 'TooManyRequests',
221
+ '500': 'InternalServerError',
222
+ },
223
+ },
224
+ getPermissionUserByID: {
225
+ method: 'GET',
226
+ path: '/v1/access/permission-user/{id}',
227
+ tags: ['Permission User'],
228
+ summary: 'Get permission-user detail',
229
+ description: 'Returns one permission-user relation by identifier.',
230
+ requiredPermissions: ['access:permission_user:read'],
231
+ authorizationNotes: [],
232
+ securitySchemes: ['callerAuth'],
233
+ pathParams: {
234
+ id: {
235
+ required: true,
236
+ type: 'string',
237
+ format: 'uuid',
238
+ },
239
+ },
240
+ queryParams: {},
241
+ responseSchemas: {
242
+ '200': 'PermissionUserResponse',
243
+ '400': 'ErrorResponse',
244
+ '401': 'UnauthorizedCaller',
245
+ '404': 'ResourceNotFound',
246
+ '429': 'TooManyRequests',
247
+ '500': 'InternalServerError',
248
+ },
249
+ },
250
+ listPermissionUsers: {
251
+ method: 'GET',
252
+ path: '/v1/access/permission-user',
253
+ tags: ['Permission User'],
254
+ summary: 'List permission-user relations',
255
+ description: 'Returns a paginated direct permission relation list for users.',
256
+ requiredPermissions: ['access:permission_user:list'],
257
+ authorizationNotes: [],
258
+ securitySchemes: ['callerAuth'],
259
+ pathParams: {},
260
+ queryParams: {
261
+ page: {
262
+ required: false,
263
+ type: 'integer',
264
+ minimum: 1,
265
+ },
266
+ limit: {
267
+ required: false,
268
+ type: 'integer',
269
+ minimum: 1,
270
+ maximum: 100,
271
+ },
272
+ sort: {
273
+ required: false,
274
+ type: 'string',
275
+ enumValues: ['created_at', 'permission_id', 'user_id'],
276
+ },
277
+ order: {
278
+ required: false,
279
+ type: 'string',
280
+ enumValues: ['asc', 'desc'],
281
+ },
282
+ permission_id: {
283
+ required: false,
284
+ type: 'string',
285
+ format: 'uuid',
286
+ },
287
+ user_id: {
288
+ required: false,
289
+ type: 'string',
290
+ format: 'uuid',
291
+ },
292
+ },
293
+ responseSchemas: {
294
+ '200': 'PermissionUserListResponse',
295
+ '401': 'UnauthorizedCaller',
296
+ '429': 'TooManyRequests',
297
+ '500': 'InternalServerError',
298
+ },
299
+ },
300
+ patchPermissionUserByID: {
301
+ method: 'PATCH',
302
+ path: '/v1/access/permission-user/{id}',
303
+ tags: ['Permission User'],
304
+ summary: 'Update permission-user relation',
305
+ description: 'Corrects one permission-user relation row.',
306
+ requiredPermissions: ['access:permission_user:update'],
307
+ authorizationNotes: [],
308
+ securitySchemes: ['callerAuth'],
309
+ pathParams: {
310
+ id: {
311
+ required: true,
312
+ type: 'string',
313
+ format: 'uuid',
314
+ },
315
+ },
316
+ queryParams: {},
317
+ bodySchema: 'UpdatePermissionUserRequest',
318
+ responseSchemas: {
319
+ '200': 'PermissionUserResponse',
320
+ '400': 'ErrorResponse',
321
+ '401': 'UnauthorizedCaller',
322
+ '404': 'ResourceNotFound',
323
+ '409': 'ErrorResponse',
324
+ '429': 'TooManyRequests',
325
+ '500': 'InternalServerError',
326
+ },
327
+ },
328
+ };
518
329
 
519
330
  /* eslint-disable */
520
331
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
521
- class RoleUserService extends BaseService {
522
- /** Create role-user relation (POST /v1/access/role-user) */
523
- createRoleUser$Response(params, context) {
524
- return createRoleUser(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
525
- }
526
- /** Create role-user relation (POST /v1/access/role-user) */
527
- createRoleUser(params, context) {
528
- return this.createRoleUser$Response(params, context).pipe(map((r) => r.body));
529
- }
530
- /** Delete role-user relation (DELETE /v1/access/role-user/{id}) */
531
- deleteRoleUserByID$Response(params, context) {
532
- return deleteRoleUserByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
533
- }
534
- /** Delete role-user relation (DELETE /v1/access/role-user/{id}) */
535
- deleteRoleUserByID(params, context) {
536
- return this.deleteRoleUserByID$Response(params, context).pipe(map((r) => r.body));
537
- }
538
- /** Get role-user detail (GET /v1/access/role-user/{id}) */
539
- getRoleUserByID$Response(params, context) {
540
- return getRoleUserByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
541
- }
542
- /** Get role-user detail (GET /v1/access/role-user/{id}) */
543
- getRoleUserByID(params, context) {
544
- return this.getRoleUserByID$Response(params, context).pipe(map((r) => r.body));
545
- }
546
- /** List role-user relations (GET /v1/access/role-user) */
547
- listRoleUsers$Response(params, context) {
548
- return listRoleUsers(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
549
- }
550
- /** List role-user relations (GET /v1/access/role-user) */
551
- listRoleUsers(params, context) {
552
- return this.listRoleUsers$Response(params, context).pipe(map((r) => r.body));
553
- }
554
- /** Update role-user relation (PATCH /v1/access/role-user/{id}) */
555
- patchRoleUserByID$Response(params, context) {
556
- return patchRoleUserByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
557
- }
558
- /** Update role-user relation (PATCH /v1/access/role-user/{id}) */
559
- patchRoleUserByID(params, context) {
560
- return this.patchRoleUserByID$Response(params, context).pipe(map((r) => r.body));
561
- }
562
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: RoleUserService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
563
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: RoleUserService, providedIn: 'root' });
564
- }
565
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: RoleUserService, decorators: [{
566
- type: Injectable,
567
- args: [{ providedIn: 'root' }]
568
- }] });
332
+ const roleOperationRules = {
333
+ createRole: {
334
+ method: 'POST',
335
+ path: '/v1/access/role',
336
+ tags: ['Role'],
337
+ summary: 'Create role',
338
+ description: 'Creates a new role master record.',
339
+ requiredPermissions: ['access:role:create'],
340
+ authorizationNotes: [],
341
+ securitySchemes: ['callerAuth'],
342
+ pathParams: {},
343
+ queryParams: {},
344
+ bodySchema: 'CreateRoleRequest',
345
+ responseSchemas: {
346
+ '201': 'RoleResponse',
347
+ '400': 'ErrorResponse',
348
+ '401': 'UnauthorizedCaller',
349
+ '409': 'ErrorResponse',
350
+ '429': 'TooManyRequests',
351
+ '500': 'InternalServerError',
352
+ },
353
+ },
354
+ deleteRoleByID: {
355
+ method: 'DELETE',
356
+ path: '/v1/access/role/{id}',
357
+ tags: ['Role'],
358
+ summary: 'Delete role',
359
+ description: 'Deletes a role master record when it is not a protected seeded role.',
360
+ requiredPermissions: ['access:role:delete'],
361
+ authorizationNotes: [],
362
+ securitySchemes: ['callerAuth'],
363
+ pathParams: {
364
+ id: {
365
+ required: true,
366
+ type: 'string',
367
+ format: 'uuid',
368
+ },
369
+ },
370
+ queryParams: {},
371
+ responseSchemas: {
372
+ '200': 'AccessMutationAckResponse',
373
+ '400': 'ErrorResponse',
374
+ '401': 'UnauthorizedCaller',
375
+ '404': 'ResourceNotFound',
376
+ '429': 'TooManyRequests',
377
+ '500': 'InternalServerError',
378
+ },
379
+ },
380
+ getRoleByID: {
381
+ method: 'GET',
382
+ path: '/v1/access/role/{id}',
383
+ tags: ['Role'],
384
+ summary: 'Get role detail',
385
+ description: 'Returns one role master record by identifier.',
386
+ requiredPermissions: ['access:role:read'],
387
+ authorizationNotes: [],
388
+ securitySchemes: ['callerAuth'],
389
+ pathParams: {
390
+ id: {
391
+ required: true,
392
+ type: 'string',
393
+ format: 'uuid',
394
+ },
395
+ },
396
+ queryParams: {},
397
+ responseSchemas: {
398
+ '200': 'RoleResponse',
399
+ '400': 'ErrorResponse',
400
+ '401': 'UnauthorizedCaller',
401
+ '404': 'ResourceNotFound',
402
+ '429': 'TooManyRequests',
403
+ '500': 'InternalServerError',
404
+ },
405
+ },
406
+ listRoles: {
407
+ method: 'GET',
408
+ path: '/v1/access/role',
409
+ tags: ['Role'],
410
+ summary: 'List roles',
411
+ description: 'Returns a paginated role master list from access-service.',
412
+ requiredPermissions: ['access:role:list'],
413
+ authorizationNotes: [],
414
+ securitySchemes: ['callerAuth'],
415
+ pathParams: {},
416
+ queryParams: {
417
+ page: {
418
+ required: false,
419
+ type: 'integer',
420
+ minimum: 1,
421
+ },
422
+ limit: {
423
+ required: false,
424
+ type: 'integer',
425
+ minimum: 1,
426
+ maximum: 100,
427
+ },
428
+ sort: {
429
+ required: false,
430
+ type: 'string',
431
+ enumValues: ['created_at', 'name', 'code', 'updated_at'],
432
+ },
433
+ order: {
434
+ required: false,
435
+ type: 'string',
436
+ enumValues: ['asc', 'desc'],
437
+ },
438
+ search: {
439
+ required: false,
440
+ type: 'string',
441
+ },
442
+ },
443
+ responseSchemas: {
444
+ '200': 'RoleListResponse',
445
+ '401': 'UnauthorizedCaller',
446
+ '429': 'TooManyRequests',
447
+ '500': 'InternalServerError',
448
+ },
449
+ },
450
+ patchRoleByID: {
451
+ method: 'PATCH',
452
+ path: '/v1/access/role/{id}',
453
+ tags: ['Role'],
454
+ summary: 'Update role',
455
+ description: 'Partially updates a role master record.',
456
+ requiredPermissions: ['access:role:update'],
457
+ authorizationNotes: [],
458
+ securitySchemes: ['callerAuth'],
459
+ pathParams: {
460
+ id: {
461
+ required: true,
462
+ type: 'string',
463
+ format: 'uuid',
464
+ },
465
+ },
466
+ queryParams: {},
467
+ bodySchema: 'UpdateRoleRequest',
468
+ responseSchemas: {
469
+ '200': 'RoleResponse',
470
+ '400': 'ErrorResponse',
471
+ '401': 'UnauthorizedCaller',
472
+ '404': 'ResourceNotFound',
473
+ '409': 'ErrorResponse',
474
+ '429': 'TooManyRequests',
475
+ '500': 'InternalServerError',
476
+ },
477
+ },
478
+ };
569
479
 
570
480
  /* eslint-disable */
571
481
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
572
- const permissionOperationRules = {
573
- createPermission: {
482
+ const rolePermissionOperationRules = {
483
+ createRolePermission: {
574
484
  method: 'POST',
575
- path: '/v1/access/permission',
576
- tags: ['Permission'],
577
- summary: 'Create permission',
578
- description: 'Creates a permission master record from `namespace`, `resource`, `action`, and optional `scope` segments.',
579
- requiredPermissions: ['access:permission:create'],
485
+ path: '/v1/access/role-permission',
486
+ tags: ['Role Permission'],
487
+ summary: 'Create role-permission relation',
488
+ description: 'Assigns a permission master record to a role master record.',
489
+ requiredPermissions: ['access:role_permission:create'],
580
490
  authorizationNotes: [],
581
491
  securitySchemes: ['callerAuth'],
582
492
  pathParams: {},
583
493
  queryParams: {},
584
- bodySchema: 'CreatePermissionRequest',
494
+ bodySchema: 'CreateRolePermissionRequest',
585
495
  responseSchemas: {
586
- '201': 'PermissionResponse',
496
+ '201': 'RolePermissionResponse',
587
497
  '400': 'ErrorResponse',
588
498
  '401': 'UnauthorizedCaller',
499
+ '404': 'ResourceNotFound',
589
500
  '409': 'ErrorResponse',
590
501
  '429': 'TooManyRequests',
591
502
  '500': 'InternalServerError',
592
503
  },
593
504
  },
594
- deletePermissionByID: {
505
+ deleteRolePermissionByID: {
595
506
  method: 'DELETE',
596
- path: '/v1/access/permission/{id}',
597
- tags: ['Permission'],
598
- summary: 'Delete permission',
599
- description: 'Deletes a permission master record and invalidates effective permission cache.',
600
- requiredPermissions: ['access:permission:delete'],
507
+ path: '/v1/access/role-permission/{id}',
508
+ tags: ['Role Permission'],
509
+ summary: 'Delete role-permission relation',
510
+ description: 'Removes one role-permission relation row.',
511
+ requiredPermissions: ['access:role_permission:delete'],
601
512
  authorizationNotes: [],
602
513
  securitySchemes: ['callerAuth'],
603
514
  pathParams: {
@@ -617,13 +528,13 @@ const permissionOperationRules = {
617
528
  '500': 'InternalServerError',
618
529
  },
619
530
  },
620
- getPermissionByID: {
531
+ getRolePermissionByID: {
621
532
  method: 'GET',
622
- path: '/v1/access/permission/{id}',
623
- tags: ['Permission'],
624
- summary: 'Get permission detail',
625
- description: 'Returns one permission master record by identifier.',
626
- requiredPermissions: ['access:permission:read'],
533
+ path: '/v1/access/role-permission/{id}',
534
+ tags: ['Role Permission'],
535
+ summary: 'Get role-permission detail',
536
+ description: 'Returns one role-permission relation by identifier.',
537
+ requiredPermissions: ['access:role_permission:read'],
627
538
  authorizationNotes: [],
628
539
  securitySchemes: ['callerAuth'],
629
540
  pathParams: {
@@ -635,7 +546,7 @@ const permissionOperationRules = {
635
546
  },
636
547
  queryParams: {},
637
548
  responseSchemas: {
638
- '200': 'PermissionResponse',
549
+ '200': 'RolePermissionResponse',
639
550
  '400': 'ErrorResponse',
640
551
  '401': 'UnauthorizedCaller',
641
552
  '404': 'ResourceNotFound',
@@ -643,13 +554,13 @@ const permissionOperationRules = {
643
554
  '500': 'InternalServerError',
644
555
  },
645
556
  },
646
- listPermissions: {
557
+ listRolePermissions: {
647
558
  method: 'GET',
648
- path: '/v1/access/permission',
649
- tags: ['Permission'],
650
- summary: 'List permissions',
651
- description: 'Returns a paginated permission master list, optionally filtered by namespace, resource, action, and scope using the `namespace:resource:action[:scope]` naming rule.',
652
- requiredPermissions: ['access:permission:list'],
559
+ path: '/v1/access/role-permission',
560
+ tags: ['Role Permission'],
561
+ summary: 'List role-permission relations',
562
+ description: 'Returns a paginated role-permission relation list.',
563
+ requiredPermissions: ['access:role_permission:list'],
653
564
  authorizationNotes: [],
654
565
  securitySchemes: ['callerAuth'],
655
566
  pathParams: {},
@@ -668,48 +579,38 @@ const permissionOperationRules = {
668
579
  sort: {
669
580
  required: false,
670
581
  type: 'string',
671
- enumValues: ['created_at', 'name', 'code', 'resource', 'action', 'updated_at'],
582
+ enumValues: ['created_at', 'role_id', 'permission_id'],
672
583
  },
673
584
  order: {
674
585
  required: false,
675
586
  type: 'string',
676
587
  enumValues: ['asc', 'desc'],
677
588
  },
678
- search: {
679
- required: false,
680
- type: 'string',
681
- },
682
- namespace: {
683
- required: false,
684
- type: 'string',
685
- },
686
- resource: {
687
- required: false,
688
- type: 'string',
689
- },
690
- action: {
589
+ role_id: {
691
590
  required: false,
692
591
  type: 'string',
592
+ format: 'uuid',
693
593
  },
694
- scope: {
594
+ permission_id: {
695
595
  required: false,
696
596
  type: 'string',
597
+ format: 'uuid',
697
598
  },
698
599
  },
699
600
  responseSchemas: {
700
- '200': 'PermissionListResponse',
601
+ '200': 'RolePermissionListResponse',
701
602
  '401': 'UnauthorizedCaller',
702
603
  '429': 'TooManyRequests',
703
604
  '500': 'InternalServerError',
704
605
  },
705
606
  },
706
- patchPermissionByID: {
607
+ patchRolePermissionByID: {
707
608
  method: 'PATCH',
708
- path: '/v1/access/permission/{id}',
709
- tags: ['Permission'],
710
- summary: 'Update permission',
711
- description: 'Partially updates a permission master record.',
712
- requiredPermissions: ['access:permission:update'],
609
+ path: '/v1/access/role-permission/{id}',
610
+ tags: ['Role Permission'],
611
+ summary: 'Update role-permission relation',
612
+ description: 'Corrects one role-permission relation row.',
613
+ requiredPermissions: ['access:role_permission:update'],
713
614
  authorizationNotes: [],
714
615
  securitySchemes: ['callerAuth'],
715
616
  pathParams: {
@@ -720,9 +621,9 @@ const permissionOperationRules = {
720
621
  },
721
622
  },
722
623
  queryParams: {},
723
- bodySchema: 'UpdatePermissionRequest',
624
+ bodySchema: 'UpdateRolePermissionRequest',
724
625
  responseSchemas: {
725
- '200': 'PermissionResponse',
626
+ '200': 'RolePermissionResponse',
726
627
  '400': 'ErrorResponse',
727
628
  '401': 'UnauthorizedCaller',
728
629
  '404': 'ResourceNotFound',
@@ -735,21 +636,21 @@ const permissionOperationRules = {
735
636
 
736
637
  /* eslint-disable */
737
638
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
738
- const permissionUserOperationRules = {
739
- createPermissionUser: {
639
+ const roleUserOperationRules = {
640
+ createRoleUser: {
740
641
  method: 'POST',
741
- path: '/v1/access/permission-user',
742
- tags: ['Permission User'],
743
- summary: 'Create permission-user relation',
744
- description: 'Assigns a direct permission to a user through the CRUD relation table.',
745
- requiredPermissions: ['access:permission_user:create'],
642
+ path: '/v1/access/role-user',
643
+ tags: ['Role User'],
644
+ summary: 'Create role-user relation',
645
+ description: 'Assigns a role to a user through the CRUD relation table.',
646
+ requiredPermissions: ['access:role_user:create'],
746
647
  authorizationNotes: [],
747
648
  securitySchemes: ['callerAuth'],
748
649
  pathParams: {},
749
650
  queryParams: {},
750
- bodySchema: 'CreatePermissionUserRequest',
651
+ bodySchema: 'CreateRoleUserRequest',
751
652
  responseSchemas: {
752
- '201': 'PermissionUserResponse',
653
+ '201': 'RoleUserResponse',
753
654
  '400': 'ErrorResponse',
754
655
  '401': 'UnauthorizedCaller',
755
656
  '404': 'ResourceNotFound',
@@ -758,13 +659,13 @@ const permissionUserOperationRules = {
758
659
  '500': 'InternalServerError',
759
660
  },
760
661
  },
761
- deletePermissionUserByID: {
662
+ deleteRoleUserByID: {
762
663
  method: 'DELETE',
763
- path: '/v1/access/permission-user/{id}',
764
- tags: ['Permission User'],
765
- summary: 'Delete permission-user relation',
766
- description: 'Removes one permission-user relation row.',
767
- requiredPermissions: ['access:permission_user:delete'],
664
+ path: '/v1/access/role-user/{id}',
665
+ tags: ['Role User'],
666
+ summary: 'Delete role-user relation',
667
+ description: 'Removes one role-user relation row.',
668
+ requiredPermissions: ['access:role_user:delete'],
768
669
  authorizationNotes: [],
769
670
  securitySchemes: ['callerAuth'],
770
671
  pathParams: {
@@ -784,13 +685,13 @@ const permissionUserOperationRules = {
784
685
  '500': 'InternalServerError',
785
686
  },
786
687
  },
787
- getPermissionUserByID: {
688
+ getRoleUserByID: {
788
689
  method: 'GET',
789
- path: '/v1/access/permission-user/{id}',
790
- tags: ['Permission User'],
791
- summary: 'Get permission-user detail',
792
- description: 'Returns one permission-user relation by identifier.',
793
- requiredPermissions: ['access:permission_user:read'],
690
+ path: '/v1/access/role-user/{id}',
691
+ tags: ['Role User'],
692
+ summary: 'Get role-user detail',
693
+ description: 'Returns one role-user relation by identifier.',
694
+ requiredPermissions: ['access:role_user:read'],
794
695
  authorizationNotes: [],
795
696
  securitySchemes: ['callerAuth'],
796
697
  pathParams: {
@@ -802,21 +703,21 @@ const permissionUserOperationRules = {
802
703
  },
803
704
  queryParams: {},
804
705
  responseSchemas: {
805
- '200': 'PermissionUserResponse',
706
+ '200': 'RoleUserResponse',
806
707
  '400': 'ErrorResponse',
807
708
  '401': 'UnauthorizedCaller',
808
709
  '404': 'ResourceNotFound',
809
710
  '429': 'TooManyRequests',
810
711
  '500': 'InternalServerError',
811
- },
812
- },
813
- listPermissionUsers: {
814
- method: 'GET',
815
- path: '/v1/access/permission-user',
816
- tags: ['Permission User'],
817
- summary: 'List permission-user relations',
818
- description: 'Returns a paginated direct permission relation list for users.',
819
- requiredPermissions: ['access:permission_user:list'],
712
+ },
713
+ },
714
+ listRoleUsers: {
715
+ method: 'GET',
716
+ path: '/v1/access/role-user',
717
+ tags: ['Role User'],
718
+ summary: 'List role-user relations',
719
+ description: 'Returns a paginated role-user relation list.',
720
+ requiredPermissions: ['access:role_user:list'],
820
721
  authorizationNotes: [],
821
722
  securitySchemes: ['callerAuth'],
822
723
  pathParams: {},
@@ -835,14 +736,14 @@ const permissionUserOperationRules = {
835
736
  sort: {
836
737
  required: false,
837
738
  type: 'string',
838
- enumValues: ['created_at', 'permission_id', 'user_id'],
739
+ enumValues: ['created_at', 'role_id', 'user_id'],
839
740
  },
840
741
  order: {
841
742
  required: false,
842
743
  type: 'string',
843
744
  enumValues: ['asc', 'desc'],
844
745
  },
845
- permission_id: {
746
+ role_id: {
846
747
  required: false,
847
748
  type: 'string',
848
749
  format: 'uuid',
@@ -854,19 +755,19 @@ const permissionUserOperationRules = {
854
755
  },
855
756
  },
856
757
  responseSchemas: {
857
- '200': 'PermissionUserListResponse',
758
+ '200': 'RoleUserListResponse',
858
759
  '401': 'UnauthorizedCaller',
859
760
  '429': 'TooManyRequests',
860
761
  '500': 'InternalServerError',
861
762
  },
862
763
  },
863
- patchPermissionUserByID: {
764
+ patchRoleUserByID: {
864
765
  method: 'PATCH',
865
- path: '/v1/access/permission-user/{id}',
866
- tags: ['Permission User'],
867
- summary: 'Update permission-user relation',
868
- description: 'Corrects one permission-user relation row.',
869
- requiredPermissions: ['access:permission_user:update'],
766
+ path: '/v1/access/role-user/{id}',
767
+ tags: ['Role User'],
768
+ summary: 'Update role-user relation',
769
+ description: 'Corrects one role-user relation row.',
770
+ requiredPermissions: ['access:role_user:update'],
870
771
  authorizationNotes: [],
871
772
  securitySchemes: ['callerAuth'],
872
773
  pathParams: {
@@ -877,9 +778,9 @@ const permissionUserOperationRules = {
877
778
  },
878
779
  },
879
780
  queryParams: {},
880
- bodySchema: 'UpdatePermissionUserRequest',
781
+ bodySchema: 'UpdateRoleUserRequest',
881
782
  responseSchemas: {
882
- '200': 'PermissionUserResponse',
783
+ '200': 'RoleUserResponse',
883
784
  '400': 'ErrorResponse',
884
785
  '401': 'UnauthorizedCaller',
885
786
  '404': 'ResourceNotFound',
@@ -892,467 +793,565 @@ const permissionUserOperationRules = {
892
793
 
893
794
  /* eslint-disable */
894
795
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
895
- const roleOperationRules = {
896
- createRole: {
897
- method: 'POST',
898
- path: '/v1/access/role',
899
- tags: ['Role'],
900
- summary: 'Create role',
901
- description: 'Creates a new role master record.',
902
- requiredPermissions: ['access:role:create'],
903
- authorizationNotes: [],
904
- securitySchemes: ['callerAuth'],
905
- pathParams: {},
906
- queryParams: {},
907
- bodySchema: 'CreateRoleRequest',
908
- responseSchemas: {
909
- '201': 'RoleResponse',
910
- '400': 'ErrorResponse',
911
- '401': 'UnauthorizedCaller',
912
- '409': 'ErrorResponse',
913
- '429': 'TooManyRequests',
914
- '500': 'InternalServerError',
915
- },
916
- },
917
- deleteRoleByID: {
918
- method: 'DELETE',
919
- path: '/v1/access/role/{id}',
920
- tags: ['Role'],
921
- summary: 'Delete role',
922
- description: 'Deletes a role master record when it is not a protected seeded role.',
923
- requiredPermissions: ['access:role:delete'],
924
- authorizationNotes: [],
925
- securitySchemes: ['callerAuth'],
926
- pathParams: {
927
- id: {
928
- required: true,
929
- type: 'string',
930
- format: 'uuid',
931
- },
932
- },
933
- queryParams: {},
934
- responseSchemas: {
935
- '200': 'AccessMutationAckResponse',
936
- '400': 'ErrorResponse',
937
- '401': 'UnauthorizedCaller',
938
- '404': 'ResourceNotFound',
939
- '429': 'TooManyRequests',
940
- '500': 'InternalServerError',
941
- },
942
- },
943
- getRoleByID: {
944
- method: 'GET',
945
- path: '/v1/access/role/{id}',
946
- tags: ['Role'],
947
- summary: 'Get role detail',
948
- description: 'Returns one role master record by identifier.',
949
- requiredPermissions: ['access:role:read'],
950
- authorizationNotes: [],
951
- securitySchemes: ['callerAuth'],
952
- pathParams: {
953
- id: {
954
- required: true,
955
- type: 'string',
956
- format: 'uuid',
957
- },
958
- },
959
- queryParams: {},
960
- responseSchemas: {
961
- '200': 'RoleResponse',
962
- '400': 'ErrorResponse',
963
- '401': 'UnauthorizedCaller',
964
- '404': 'ResourceNotFound',
965
- '429': 'TooManyRequests',
966
- '500': 'InternalServerError',
967
- },
968
- },
969
- listRoles: {
970
- method: 'GET',
971
- path: '/v1/access/role',
972
- tags: ['Role'],
973
- summary: 'List roles',
974
- description: 'Returns a paginated role master list from access-service.',
975
- requiredPermissions: ['access:role:list'],
976
- authorizationNotes: [],
977
- securitySchemes: ['callerAuth'],
978
- pathParams: {},
979
- queryParams: {
980
- page: {
981
- required: false,
982
- type: 'integer',
983
- minimum: 1,
984
- },
985
- limit: {
986
- required: false,
987
- type: 'integer',
988
- minimum: 1,
989
- maximum: 100,
990
- },
991
- sort: {
992
- required: false,
993
- type: 'string',
994
- enumValues: ['created_at', 'name', 'code', 'updated_at'],
995
- },
996
- order: {
997
- required: false,
998
- type: 'string',
999
- enumValues: ['asc', 'desc'],
1000
- },
1001
- search: {
1002
- required: false,
1003
- type: 'string',
1004
- },
1005
- },
1006
- responseSchemas: {
1007
- '200': 'RoleListResponse',
1008
- '401': 'UnauthorizedCaller',
1009
- '429': 'TooManyRequests',
1010
- '500': 'InternalServerError',
1011
- },
1012
- },
1013
- patchRoleByID: {
1014
- method: 'PATCH',
1015
- path: '/v1/access/role/{id}',
1016
- tags: ['Role'],
1017
- summary: 'Update role',
1018
- description: 'Partially updates a role master record.',
1019
- requiredPermissions: ['access:role:update'],
1020
- authorizationNotes: [],
1021
- securitySchemes: ['callerAuth'],
1022
- pathParams: {
1023
- id: {
1024
- required: true,
1025
- type: 'string',
1026
- format: 'uuid',
1027
- },
1028
- },
1029
- queryParams: {},
1030
- bodySchema: 'UpdateRoleRequest',
1031
- responseSchemas: {
1032
- '200': 'RoleResponse',
1033
- '400': 'ErrorResponse',
1034
- '401': 'UnauthorizedCaller',
1035
- '404': 'ResourceNotFound',
1036
- '409': 'ErrorResponse',
1037
- '429': 'TooManyRequests',
1038
- '500': 'InternalServerError',
1039
- },
1040
- },
1041
- };
796
+ function createPermission(http, rootUrl, params, context) {
797
+ const rb = new RequestBuilder(rootUrl, createPermission.PATH, 'post');
798
+ if (params) {
799
+ rb.body(params.body, 'application/json');
800
+ }
801
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
802
+ }
803
+ createPermission.PATH = '/v1/access/permission';
804
+
805
+ /* eslint-disable */
806
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
807
+ function deletePermissionByID(http, rootUrl, params, context) {
808
+ const rb = new RequestBuilder(rootUrl, deletePermissionByID.PATH, 'delete');
809
+ if (params) {
810
+ rb.path('id', params.id);
811
+ }
812
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
813
+ }
814
+ deletePermissionByID.PATH = '/v1/access/permission/{id}';
815
+
816
+ /* eslint-disable */
817
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
818
+ function getPermissionByID(http, rootUrl, params, context) {
819
+ const rb = new RequestBuilder(rootUrl, getPermissionByID.PATH, 'get');
820
+ if (params) {
821
+ rb.path('id', params.id);
822
+ }
823
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
824
+ }
825
+ getPermissionByID.PATH = '/v1/access/permission/{id}';
826
+
827
+ /* eslint-disable */
828
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
829
+ function listPermissions(http, rootUrl, params, context) {
830
+ const rb = new RequestBuilder(rootUrl, listPermissions.PATH, 'get');
831
+ if (params) {
832
+ rb.query('page', params.page);
833
+ rb.query('limit', params.limit);
834
+ rb.query('sort', params.sort);
835
+ rb.query('order', params.order);
836
+ rb.query('search', params.search);
837
+ rb.query('namespace', params.namespace);
838
+ rb.query('resource', params.resource);
839
+ rb.query('action', params.action);
840
+ rb.query('scope', params.scope);
841
+ }
842
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
843
+ }
844
+ listPermissions.PATH = '/v1/access/permission';
845
+
846
+ /* eslint-disable */
847
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
848
+ function patchPermissionByID(http, rootUrl, params, context) {
849
+ const rb = new RequestBuilder(rootUrl, patchPermissionByID.PATH, 'patch');
850
+ if (params) {
851
+ rb.path('id', params.id);
852
+ rb.body(params.body, 'application/json');
853
+ }
854
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
855
+ }
856
+ patchPermissionByID.PATH = '/v1/access/permission/{id}';
857
+
858
+ /* eslint-disable */
859
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
860
+ class PermissionService extends BaseService {
861
+ /** Create permission (POST /v1/access/permission) */
862
+ createPermission$Response(params, context) {
863
+ return createPermission(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
864
+ }
865
+ /** Create permission (POST /v1/access/permission) */
866
+ createPermission(params, context) {
867
+ return this.createPermission$Response(params, context).pipe(map((r) => r.body));
868
+ }
869
+ /** Delete permission (DELETE /v1/access/permission/{id}) */
870
+ deletePermissionByID$Response(params, context) {
871
+ return deletePermissionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
872
+ }
873
+ /** Delete permission (DELETE /v1/access/permission/{id}) */
874
+ deletePermissionByID(params, context) {
875
+ return this.deletePermissionByID$Response(params, context).pipe(map((r) => r.body));
876
+ }
877
+ /** Get permission detail (GET /v1/access/permission/{id}) */
878
+ getPermissionByID$Response(params, context) {
879
+ return getPermissionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
880
+ }
881
+ /** Get permission detail (GET /v1/access/permission/{id}) */
882
+ getPermissionByID(params, context) {
883
+ return this.getPermissionByID$Response(params, context).pipe(map((r) => r.body));
884
+ }
885
+ /** List permissions (GET /v1/access/permission) */
886
+ listPermissions$Response(params, context) {
887
+ return listPermissions(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
888
+ }
889
+ /** List permissions (GET /v1/access/permission) */
890
+ listPermissions(params, context) {
891
+ return this.listPermissions$Response(params, context).pipe(map((r) => r.body));
892
+ }
893
+ /** Update permission (PATCH /v1/access/permission/{id}) */
894
+ patchPermissionByID$Response(params, context) {
895
+ return patchPermissionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
896
+ }
897
+ /** Update permission (PATCH /v1/access/permission/{id}) */
898
+ patchPermissionByID(params, context) {
899
+ return this.patchPermissionByID$Response(params, context).pipe(map((r) => r.body));
900
+ }
901
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: PermissionService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
902
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: PermissionService, providedIn: 'root' });
903
+ }
904
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: PermissionService, decorators: [{
905
+ type: Injectable,
906
+ args: [{ providedIn: 'root' }]
907
+ }] });
908
+
909
+ /* eslint-disable */
910
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
911
+ function createPermissionUser(http, rootUrl, params, context) {
912
+ const rb = new RequestBuilder(rootUrl, createPermissionUser.PATH, 'post');
913
+ if (params) {
914
+ rb.body(params.body, 'application/json');
915
+ }
916
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
917
+ }
918
+ createPermissionUser.PATH = '/v1/access/permission-user';
919
+
920
+ /* eslint-disable */
921
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
922
+ function deletePermissionUserByID(http, rootUrl, params, context) {
923
+ const rb = new RequestBuilder(rootUrl, deletePermissionUserByID.PATH, 'delete');
924
+ if (params) {
925
+ rb.path('id', params.id);
926
+ }
927
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
928
+ }
929
+ deletePermissionUserByID.PATH = '/v1/access/permission-user/{id}';
930
+
931
+ /* eslint-disable */
932
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
933
+ function getPermissionUserByID(http, rootUrl, params, context) {
934
+ const rb = new RequestBuilder(rootUrl, getPermissionUserByID.PATH, 'get');
935
+ if (params) {
936
+ rb.path('id', params.id);
937
+ }
938
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
939
+ }
940
+ getPermissionUserByID.PATH = '/v1/access/permission-user/{id}';
941
+
942
+ /* eslint-disable */
943
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
944
+ function listPermissionUsers(http, rootUrl, params, context) {
945
+ const rb = new RequestBuilder(rootUrl, listPermissionUsers.PATH, 'get');
946
+ if (params) {
947
+ rb.query('page', params.page);
948
+ rb.query('limit', params.limit);
949
+ rb.query('sort', params.sort);
950
+ rb.query('order', params.order);
951
+ rb.query('permission_id', params.permission_id);
952
+ rb.query('user_id', params.user_id);
953
+ }
954
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
955
+ }
956
+ listPermissionUsers.PATH = '/v1/access/permission-user';
957
+
958
+ /* eslint-disable */
959
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
960
+ function patchPermissionUserByID(http, rootUrl, params, context) {
961
+ const rb = new RequestBuilder(rootUrl, patchPermissionUserByID.PATH, 'patch');
962
+ if (params) {
963
+ rb.path('id', params.id);
964
+ rb.body(params.body, 'application/json');
965
+ }
966
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
967
+ }
968
+ patchPermissionUserByID.PATH = '/v1/access/permission-user/{id}';
969
+
970
+ /* eslint-disable */
971
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
972
+ class PermissionUserService extends BaseService {
973
+ /** Create permission-user relation (POST /v1/access/permission-user) */
974
+ createPermissionUser$Response(params, context) {
975
+ return createPermissionUser(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
976
+ }
977
+ /** Create permission-user relation (POST /v1/access/permission-user) */
978
+ createPermissionUser(params, context) {
979
+ return this.createPermissionUser$Response(params, context).pipe(map((r) => r.body));
980
+ }
981
+ /** Delete permission-user relation (DELETE /v1/access/permission-user/{id}) */
982
+ deletePermissionUserByID$Response(params, context) {
983
+ return deletePermissionUserByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
984
+ }
985
+ /** Delete permission-user relation (DELETE /v1/access/permission-user/{id}) */
986
+ deletePermissionUserByID(params, context) {
987
+ return this.deletePermissionUserByID$Response(params, context).pipe(map((r) => r.body));
988
+ }
989
+ /** Get permission-user detail (GET /v1/access/permission-user/{id}) */
990
+ getPermissionUserByID$Response(params, context) {
991
+ return getPermissionUserByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
992
+ }
993
+ /** Get permission-user detail (GET /v1/access/permission-user/{id}) */
994
+ getPermissionUserByID(params, context) {
995
+ return this.getPermissionUserByID$Response(params, context).pipe(map((r) => r.body));
996
+ }
997
+ /** List permission-user relations (GET /v1/access/permission-user) */
998
+ listPermissionUsers$Response(params, context) {
999
+ return listPermissionUsers(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1000
+ }
1001
+ /** List permission-user relations (GET /v1/access/permission-user) */
1002
+ listPermissionUsers(params, context) {
1003
+ return this.listPermissionUsers$Response(params, context).pipe(map((r) => r.body));
1004
+ }
1005
+ /** Update permission-user relation (PATCH /v1/access/permission-user/{id}) */
1006
+ patchPermissionUserByID$Response(params, context) {
1007
+ return patchPermissionUserByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1008
+ }
1009
+ /** Update permission-user relation (PATCH /v1/access/permission-user/{id}) */
1010
+ patchPermissionUserByID(params, context) {
1011
+ return this.patchPermissionUserByID$Response(params, context).pipe(map((r) => r.body));
1012
+ }
1013
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: PermissionUserService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1014
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: PermissionUserService, providedIn: 'root' });
1015
+ }
1016
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: PermissionUserService, decorators: [{
1017
+ type: Injectable,
1018
+ args: [{ providedIn: 'root' }]
1019
+ }] });
1020
+
1021
+ /* eslint-disable */
1022
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1023
+ function createRole(http, rootUrl, params, context) {
1024
+ const rb = new RequestBuilder(rootUrl, createRole.PATH, 'post');
1025
+ if (params) {
1026
+ rb.body(params.body, 'application/json');
1027
+ }
1028
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1029
+ }
1030
+ createRole.PATH = '/v1/access/role';
1031
+
1032
+ /* eslint-disable */
1033
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1034
+ function deleteRoleByID(http, rootUrl, params, context) {
1035
+ const rb = new RequestBuilder(rootUrl, deleteRoleByID.PATH, 'delete');
1036
+ if (params) {
1037
+ rb.path('id', params.id);
1038
+ }
1039
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1040
+ }
1041
+ deleteRoleByID.PATH = '/v1/access/role/{id}';
1042
+
1043
+ /* eslint-disable */
1044
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1045
+ function getRoleByID(http, rootUrl, params, context) {
1046
+ const rb = new RequestBuilder(rootUrl, getRoleByID.PATH, 'get');
1047
+ if (params) {
1048
+ rb.path('id', params.id);
1049
+ }
1050
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1051
+ }
1052
+ getRoleByID.PATH = '/v1/access/role/{id}';
1053
+
1054
+ /* eslint-disable */
1055
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1056
+ function listRoles(http, rootUrl, params, context) {
1057
+ const rb = new RequestBuilder(rootUrl, listRoles.PATH, 'get');
1058
+ if (params) {
1059
+ rb.query('page', params.page);
1060
+ rb.query('limit', params.limit);
1061
+ rb.query('sort', params.sort);
1062
+ rb.query('order', params.order);
1063
+ rb.query('search', params.search);
1064
+ }
1065
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1066
+ }
1067
+ listRoles.PATH = '/v1/access/role';
1068
+
1069
+ /* eslint-disable */
1070
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1071
+ function patchRoleByID(http, rootUrl, params, context) {
1072
+ const rb = new RequestBuilder(rootUrl, patchRoleByID.PATH, 'patch');
1073
+ if (params) {
1074
+ rb.path('id', params.id);
1075
+ rb.body(params.body, 'application/json');
1076
+ }
1077
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1078
+ }
1079
+ patchRoleByID.PATH = '/v1/access/role/{id}';
1080
+
1081
+ /* eslint-disable */
1082
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1083
+ class RoleService extends BaseService {
1084
+ /** Create role (POST /v1/access/role) */
1085
+ createRole$Response(params, context) {
1086
+ return createRole(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1087
+ }
1088
+ /** Create role (POST /v1/access/role) */
1089
+ createRole(params, context) {
1090
+ return this.createRole$Response(params, context).pipe(map((r) => r.body));
1091
+ }
1092
+ /** Delete role (DELETE /v1/access/role/{id}) */
1093
+ deleteRoleByID$Response(params, context) {
1094
+ return deleteRoleByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1095
+ }
1096
+ /** Delete role (DELETE /v1/access/role/{id}) */
1097
+ deleteRoleByID(params, context) {
1098
+ return this.deleteRoleByID$Response(params, context).pipe(map((r) => r.body));
1099
+ }
1100
+ /** Get role detail (GET /v1/access/role/{id}) */
1101
+ getRoleByID$Response(params, context) {
1102
+ return getRoleByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1103
+ }
1104
+ /** Get role detail (GET /v1/access/role/{id}) */
1105
+ getRoleByID(params, context) {
1106
+ return this.getRoleByID$Response(params, context).pipe(map((r) => r.body));
1107
+ }
1108
+ /** List roles (GET /v1/access/role) */
1109
+ listRoles$Response(params, context) {
1110
+ return listRoles(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1111
+ }
1112
+ /** List roles (GET /v1/access/role) */
1113
+ listRoles(params, context) {
1114
+ return this.listRoles$Response(params, context).pipe(map((r) => r.body));
1115
+ }
1116
+ /** Update role (PATCH /v1/access/role/{id}) */
1117
+ patchRoleByID$Response(params, context) {
1118
+ return patchRoleByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1119
+ }
1120
+ /** Update role (PATCH /v1/access/role/{id}) */
1121
+ patchRoleByID(params, context) {
1122
+ return this.patchRoleByID$Response(params, context).pipe(map((r) => r.body));
1123
+ }
1124
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: RoleService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1125
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: RoleService, providedIn: 'root' });
1126
+ }
1127
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: RoleService, decorators: [{
1128
+ type: Injectable,
1129
+ args: [{ providedIn: 'root' }]
1130
+ }] });
1131
+
1132
+ /* eslint-disable */
1133
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1134
+ function createRolePermission(http, rootUrl, params, context) {
1135
+ const rb = new RequestBuilder(rootUrl, createRolePermission.PATH, 'post');
1136
+ if (params) {
1137
+ rb.body(params.body, 'application/json');
1138
+ }
1139
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1140
+ }
1141
+ createRolePermission.PATH = '/v1/access/role-permission';
1042
1142
 
1043
1143
  /* eslint-disable */
1044
1144
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1045
- const rolePermissionOperationRules = {
1046
- createRolePermission: {
1047
- method: 'POST',
1048
- path: '/v1/access/role-permission',
1049
- tags: ['Role Permission'],
1050
- summary: 'Create role-permission relation',
1051
- description: 'Assigns a permission master record to a role master record.',
1052
- requiredPermissions: ['access:role_permission:create'],
1053
- authorizationNotes: [],
1054
- securitySchemes: ['callerAuth'],
1055
- pathParams: {},
1056
- queryParams: {},
1057
- bodySchema: 'CreateRolePermissionRequest',
1058
- responseSchemas: {
1059
- '201': 'RolePermissionResponse',
1060
- '400': 'ErrorResponse',
1061
- '401': 'UnauthorizedCaller',
1062
- '404': 'ResourceNotFound',
1063
- '409': 'ErrorResponse',
1064
- '429': 'TooManyRequests',
1065
- '500': 'InternalServerError',
1066
- },
1067
- },
1068
- deleteRolePermissionByID: {
1069
- method: 'DELETE',
1070
- path: '/v1/access/role-permission/{id}',
1071
- tags: ['Role Permission'],
1072
- summary: 'Delete role-permission relation',
1073
- description: 'Removes one role-permission relation row.',
1074
- requiredPermissions: ['access:role_permission:delete'],
1075
- authorizationNotes: [],
1076
- securitySchemes: ['callerAuth'],
1077
- pathParams: {
1078
- id: {
1079
- required: true,
1080
- type: 'string',
1081
- format: 'uuid',
1082
- },
1083
- },
1084
- queryParams: {},
1085
- responseSchemas: {
1086
- '200': 'AccessMutationAckResponse',
1087
- '400': 'ErrorResponse',
1088
- '401': 'UnauthorizedCaller',
1089
- '404': 'ResourceNotFound',
1090
- '429': 'TooManyRequests',
1091
- '500': 'InternalServerError',
1092
- },
1093
- },
1094
- getRolePermissionByID: {
1095
- method: 'GET',
1096
- path: '/v1/access/role-permission/{id}',
1097
- tags: ['Role Permission'],
1098
- summary: 'Get role-permission detail',
1099
- description: 'Returns one role-permission relation by identifier.',
1100
- requiredPermissions: ['access:role_permission:read'],
1101
- authorizationNotes: [],
1102
- securitySchemes: ['callerAuth'],
1103
- pathParams: {
1104
- id: {
1105
- required: true,
1106
- type: 'string',
1107
- format: 'uuid',
1108
- },
1109
- },
1110
- queryParams: {},
1111
- responseSchemas: {
1112
- '200': 'RolePermissionResponse',
1113
- '400': 'ErrorResponse',
1114
- '401': 'UnauthorizedCaller',
1115
- '404': 'ResourceNotFound',
1116
- '429': 'TooManyRequests',
1117
- '500': 'InternalServerError',
1118
- },
1119
- },
1120
- listRolePermissions: {
1121
- method: 'GET',
1122
- path: '/v1/access/role-permission',
1123
- tags: ['Role Permission'],
1124
- summary: 'List role-permission relations',
1125
- description: 'Returns a paginated role-permission relation list.',
1126
- requiredPermissions: ['access:role_permission:list'],
1127
- authorizationNotes: [],
1128
- securitySchemes: ['callerAuth'],
1129
- pathParams: {},
1130
- queryParams: {
1131
- page: {
1132
- required: false,
1133
- type: 'integer',
1134
- minimum: 1,
1135
- },
1136
- limit: {
1137
- required: false,
1138
- type: 'integer',
1139
- minimum: 1,
1140
- maximum: 100,
1141
- },
1142
- sort: {
1143
- required: false,
1144
- type: 'string',
1145
- enumValues: ['created_at', 'role_id', 'permission_id'],
1146
- },
1147
- order: {
1148
- required: false,
1149
- type: 'string',
1150
- enumValues: ['asc', 'desc'],
1151
- },
1152
- role_id: {
1153
- required: false,
1154
- type: 'string',
1155
- format: 'uuid',
1156
- },
1157
- permission_id: {
1158
- required: false,
1159
- type: 'string',
1160
- format: 'uuid',
1161
- },
1162
- },
1163
- responseSchemas: {
1164
- '200': 'RolePermissionListResponse',
1165
- '401': 'UnauthorizedCaller',
1166
- '429': 'TooManyRequests',
1167
- '500': 'InternalServerError',
1168
- },
1169
- },
1170
- patchRolePermissionByID: {
1171
- method: 'PATCH',
1172
- path: '/v1/access/role-permission/{id}',
1173
- tags: ['Role Permission'],
1174
- summary: 'Update role-permission relation',
1175
- description: 'Corrects one role-permission relation row.',
1176
- requiredPermissions: ['access:role_permission:update'],
1177
- authorizationNotes: [],
1178
- securitySchemes: ['callerAuth'],
1179
- pathParams: {
1180
- id: {
1181
- required: true,
1182
- type: 'string',
1183
- format: 'uuid',
1184
- },
1185
- },
1186
- queryParams: {},
1187
- bodySchema: 'UpdateRolePermissionRequest',
1188
- responseSchemas: {
1189
- '200': 'RolePermissionResponse',
1190
- '400': 'ErrorResponse',
1191
- '401': 'UnauthorizedCaller',
1192
- '404': 'ResourceNotFound',
1193
- '409': 'ErrorResponse',
1194
- '429': 'TooManyRequests',
1195
- '500': 'InternalServerError',
1196
- },
1197
- },
1198
- };
1145
+ function deleteRolePermissionByID(http, rootUrl, params, context) {
1146
+ const rb = new RequestBuilder(rootUrl, deleteRolePermissionByID.PATH, 'delete');
1147
+ if (params) {
1148
+ rb.path('id', params.id);
1149
+ }
1150
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1151
+ }
1152
+ deleteRolePermissionByID.PATH = '/v1/access/role-permission/{id}';
1153
+
1154
+ /* eslint-disable */
1155
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1156
+ function getRolePermissionByID(http, rootUrl, params, context) {
1157
+ const rb = new RequestBuilder(rootUrl, getRolePermissionByID.PATH, 'get');
1158
+ if (params) {
1159
+ rb.path('id', params.id);
1160
+ }
1161
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1162
+ }
1163
+ getRolePermissionByID.PATH = '/v1/access/role-permission/{id}';
1164
+
1165
+ /* eslint-disable */
1166
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1167
+ function listRolePermissions(http, rootUrl, params, context) {
1168
+ const rb = new RequestBuilder(rootUrl, listRolePermissions.PATH, 'get');
1169
+ if (params) {
1170
+ rb.query('page', params.page);
1171
+ rb.query('limit', params.limit);
1172
+ rb.query('sort', params.sort);
1173
+ rb.query('order', params.order);
1174
+ rb.query('role_id', params.role_id);
1175
+ rb.query('permission_id', params.permission_id);
1176
+ }
1177
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1178
+ }
1179
+ listRolePermissions.PATH = '/v1/access/role-permission';
1180
+
1181
+ /* eslint-disable */
1182
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1183
+ function patchRolePermissionByID(http, rootUrl, params, context) {
1184
+ const rb = new RequestBuilder(rootUrl, patchRolePermissionByID.PATH, 'patch');
1185
+ if (params) {
1186
+ rb.path('id', params.id);
1187
+ rb.body(params.body, 'application/json');
1188
+ }
1189
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1190
+ }
1191
+ patchRolePermissionByID.PATH = '/v1/access/role-permission/{id}';
1192
+
1193
+ /* eslint-disable */
1194
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1195
+ class RolePermissionService extends BaseService {
1196
+ /** Create role-permission relation (POST /v1/access/role-permission) */
1197
+ createRolePermission$Response(params, context) {
1198
+ return createRolePermission(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1199
+ }
1200
+ /** Create role-permission relation (POST /v1/access/role-permission) */
1201
+ createRolePermission(params, context) {
1202
+ return this.createRolePermission$Response(params, context).pipe(map((r) => r.body));
1203
+ }
1204
+ /** Delete role-permission relation (DELETE /v1/access/role-permission/{id}) */
1205
+ deleteRolePermissionByID$Response(params, context) {
1206
+ return deleteRolePermissionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1207
+ }
1208
+ /** Delete role-permission relation (DELETE /v1/access/role-permission/{id}) */
1209
+ deleteRolePermissionByID(params, context) {
1210
+ return this.deleteRolePermissionByID$Response(params, context).pipe(map((r) => r.body));
1211
+ }
1212
+ /** Get role-permission detail (GET /v1/access/role-permission/{id}) */
1213
+ getRolePermissionByID$Response(params, context) {
1214
+ return getRolePermissionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1215
+ }
1216
+ /** Get role-permission detail (GET /v1/access/role-permission/{id}) */
1217
+ getRolePermissionByID(params, context) {
1218
+ return this.getRolePermissionByID$Response(params, context).pipe(map((r) => r.body));
1219
+ }
1220
+ /** List role-permission relations (GET /v1/access/role-permission) */
1221
+ listRolePermissions$Response(params, context) {
1222
+ return listRolePermissions(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1223
+ }
1224
+ /** List role-permission relations (GET /v1/access/role-permission) */
1225
+ listRolePermissions(params, context) {
1226
+ return this.listRolePermissions$Response(params, context).pipe(map((r) => r.body));
1227
+ }
1228
+ /** Update role-permission relation (PATCH /v1/access/role-permission/{id}) */
1229
+ patchRolePermissionByID$Response(params, context) {
1230
+ return patchRolePermissionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1231
+ }
1232
+ /** Update role-permission relation (PATCH /v1/access/role-permission/{id}) */
1233
+ patchRolePermissionByID(params, context) {
1234
+ return this.patchRolePermissionByID$Response(params, context).pipe(map((r) => r.body));
1235
+ }
1236
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: RolePermissionService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1237
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: RolePermissionService, providedIn: 'root' });
1238
+ }
1239
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: RolePermissionService, decorators: [{
1240
+ type: Injectable,
1241
+ args: [{ providedIn: 'root' }]
1242
+ }] });
1243
+
1244
+ /* eslint-disable */
1245
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1246
+ function createRoleUser(http, rootUrl, params, context) {
1247
+ const rb = new RequestBuilder(rootUrl, createRoleUser.PATH, 'post');
1248
+ if (params) {
1249
+ rb.body(params.body, 'application/json');
1250
+ }
1251
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1252
+ }
1253
+ createRoleUser.PATH = '/v1/access/role-user';
1199
1254
 
1200
1255
  /* eslint-disable */
1201
1256
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1202
- const roleUserOperationRules = {
1203
- createRoleUser: {
1204
- method: 'POST',
1205
- path: '/v1/access/role-user',
1206
- tags: ['Role User'],
1207
- summary: 'Create role-user relation',
1208
- description: 'Assigns a role to a user through the CRUD relation table.',
1209
- requiredPermissions: ['access:role_user:create'],
1210
- authorizationNotes: [],
1211
- securitySchemes: ['callerAuth'],
1212
- pathParams: {},
1213
- queryParams: {},
1214
- bodySchema: 'CreateRoleUserRequest',
1215
- responseSchemas: {
1216
- '201': 'RoleUserResponse',
1217
- '400': 'ErrorResponse',
1218
- '401': 'UnauthorizedCaller',
1219
- '404': 'ResourceNotFound',
1220
- '409': 'ErrorResponse',
1221
- '429': 'TooManyRequests',
1222
- '500': 'InternalServerError',
1223
- },
1224
- },
1225
- deleteRoleUserByID: {
1226
- method: 'DELETE',
1227
- path: '/v1/access/role-user/{id}',
1228
- tags: ['Role User'],
1229
- summary: 'Delete role-user relation',
1230
- description: 'Removes one role-user relation row.',
1231
- requiredPermissions: ['access:role_user:delete'],
1232
- authorizationNotes: [],
1233
- securitySchemes: ['callerAuth'],
1234
- pathParams: {
1235
- id: {
1236
- required: true,
1237
- type: 'string',
1238
- format: 'uuid',
1239
- },
1240
- },
1241
- queryParams: {},
1242
- responseSchemas: {
1243
- '200': 'AccessMutationAckResponse',
1244
- '400': 'ErrorResponse',
1245
- '401': 'UnauthorizedCaller',
1246
- '404': 'ResourceNotFound',
1247
- '429': 'TooManyRequests',
1248
- '500': 'InternalServerError',
1249
- },
1250
- },
1251
- getRoleUserByID: {
1252
- method: 'GET',
1253
- path: '/v1/access/role-user/{id}',
1254
- tags: ['Role User'],
1255
- summary: 'Get role-user detail',
1256
- description: 'Returns one role-user relation by identifier.',
1257
- requiredPermissions: ['access:role_user:read'],
1258
- authorizationNotes: [],
1259
- securitySchemes: ['callerAuth'],
1260
- pathParams: {
1261
- id: {
1262
- required: true,
1263
- type: 'string',
1264
- format: 'uuid',
1265
- },
1266
- },
1267
- queryParams: {},
1268
- responseSchemas: {
1269
- '200': 'RoleUserResponse',
1270
- '400': 'ErrorResponse',
1271
- '401': 'UnauthorizedCaller',
1272
- '404': 'ResourceNotFound',
1273
- '429': 'TooManyRequests',
1274
- '500': 'InternalServerError',
1275
- },
1276
- },
1277
- listRoleUsers: {
1278
- method: 'GET',
1279
- path: '/v1/access/role-user',
1280
- tags: ['Role User'],
1281
- summary: 'List role-user relations',
1282
- description: 'Returns a paginated role-user relation list.',
1283
- requiredPermissions: ['access:role_user:list'],
1284
- authorizationNotes: [],
1285
- securitySchemes: ['callerAuth'],
1286
- pathParams: {},
1287
- queryParams: {
1288
- page: {
1289
- required: false,
1290
- type: 'integer',
1291
- minimum: 1,
1292
- },
1293
- limit: {
1294
- required: false,
1295
- type: 'integer',
1296
- minimum: 1,
1297
- maximum: 100,
1298
- },
1299
- sort: {
1300
- required: false,
1301
- type: 'string',
1302
- enumValues: ['created_at', 'role_id', 'user_id'],
1303
- },
1304
- order: {
1305
- required: false,
1306
- type: 'string',
1307
- enumValues: ['asc', 'desc'],
1308
- },
1309
- role_id: {
1310
- required: false,
1311
- type: 'string',
1312
- format: 'uuid',
1313
- },
1314
- user_id: {
1315
- required: false,
1316
- type: 'string',
1317
- format: 'uuid',
1318
- },
1319
- },
1320
- responseSchemas: {
1321
- '200': 'RoleUserListResponse',
1322
- '401': 'UnauthorizedCaller',
1323
- '429': 'TooManyRequests',
1324
- '500': 'InternalServerError',
1325
- },
1326
- },
1327
- patchRoleUserByID: {
1328
- method: 'PATCH',
1329
- path: '/v1/access/role-user/{id}',
1330
- tags: ['Role User'],
1331
- summary: 'Update role-user relation',
1332
- description: 'Corrects one role-user relation row.',
1333
- requiredPermissions: ['access:role_user:update'],
1334
- authorizationNotes: [],
1335
- securitySchemes: ['callerAuth'],
1336
- pathParams: {
1337
- id: {
1338
- required: true,
1339
- type: 'string',
1340
- format: 'uuid',
1341
- },
1342
- },
1343
- queryParams: {},
1344
- bodySchema: 'UpdateRoleUserRequest',
1345
- responseSchemas: {
1346
- '200': 'RoleUserResponse',
1347
- '400': 'ErrorResponse',
1348
- '401': 'UnauthorizedCaller',
1349
- '404': 'ResourceNotFound',
1350
- '409': 'ErrorResponse',
1351
- '429': 'TooManyRequests',
1352
- '500': 'InternalServerError',
1353
- },
1354
- },
1355
- };
1257
+ function deleteRoleUserByID(http, rootUrl, params, context) {
1258
+ const rb = new RequestBuilder(rootUrl, deleteRoleUserByID.PATH, 'delete');
1259
+ if (params) {
1260
+ rb.path('id', params.id);
1261
+ }
1262
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1263
+ }
1264
+ deleteRoleUserByID.PATH = '/v1/access/role-user/{id}';
1265
+
1266
+ /* eslint-disable */
1267
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1268
+ function getRoleUserByID(http, rootUrl, params, context) {
1269
+ const rb = new RequestBuilder(rootUrl, getRoleUserByID.PATH, 'get');
1270
+ if (params) {
1271
+ rb.path('id', params.id);
1272
+ }
1273
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1274
+ }
1275
+ getRoleUserByID.PATH = '/v1/access/role-user/{id}';
1276
+
1277
+ /* eslint-disable */
1278
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1279
+ function listRoleUsers(http, rootUrl, params, context) {
1280
+ const rb = new RequestBuilder(rootUrl, listRoleUsers.PATH, 'get');
1281
+ if (params) {
1282
+ rb.query('page', params.page);
1283
+ rb.query('limit', params.limit);
1284
+ rb.query('sort', params.sort);
1285
+ rb.query('order', params.order);
1286
+ rb.query('role_id', params.role_id);
1287
+ rb.query('user_id', params.user_id);
1288
+ }
1289
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1290
+ }
1291
+ listRoleUsers.PATH = '/v1/access/role-user';
1292
+
1293
+ /* eslint-disable */
1294
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1295
+ function patchRoleUserByID(http, rootUrl, params, context) {
1296
+ const rb = new RequestBuilder(rootUrl, patchRoleUserByID.PATH, 'patch');
1297
+ if (params) {
1298
+ rb.path('id', params.id);
1299
+ rb.body(params.body, 'application/json');
1300
+ }
1301
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1302
+ }
1303
+ patchRoleUserByID.PATH = '/v1/access/role-user/{id}';
1304
+
1305
+ /* eslint-disable */
1306
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1307
+ class RoleUserService extends BaseService {
1308
+ /** Create role-user relation (POST /v1/access/role-user) */
1309
+ createRoleUser$Response(params, context) {
1310
+ return createRoleUser(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1311
+ }
1312
+ /** Create role-user relation (POST /v1/access/role-user) */
1313
+ createRoleUser(params, context) {
1314
+ return this.createRoleUser$Response(params, context).pipe(map((r) => r.body));
1315
+ }
1316
+ /** Delete role-user relation (DELETE /v1/access/role-user/{id}) */
1317
+ deleteRoleUserByID$Response(params, context) {
1318
+ return deleteRoleUserByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1319
+ }
1320
+ /** Delete role-user relation (DELETE /v1/access/role-user/{id}) */
1321
+ deleteRoleUserByID(params, context) {
1322
+ return this.deleteRoleUserByID$Response(params, context).pipe(map((r) => r.body));
1323
+ }
1324
+ /** Get role-user detail (GET /v1/access/role-user/{id}) */
1325
+ getRoleUserByID$Response(params, context) {
1326
+ return getRoleUserByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1327
+ }
1328
+ /** Get role-user detail (GET /v1/access/role-user/{id}) */
1329
+ getRoleUserByID(params, context) {
1330
+ return this.getRoleUserByID$Response(params, context).pipe(map((r) => r.body));
1331
+ }
1332
+ /** List role-user relations (GET /v1/access/role-user) */
1333
+ listRoleUsers$Response(params, context) {
1334
+ return listRoleUsers(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1335
+ }
1336
+ /** List role-user relations (GET /v1/access/role-user) */
1337
+ listRoleUsers(params, context) {
1338
+ return this.listRoleUsers$Response(params, context).pipe(map((r) => r.body));
1339
+ }
1340
+ /** Update role-user relation (PATCH /v1/access/role-user/{id}) */
1341
+ patchRoleUserByID$Response(params, context) {
1342
+ return patchRoleUserByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1343
+ }
1344
+ /** Update role-user relation (PATCH /v1/access/role-user/{id}) */
1345
+ patchRoleUserByID(params, context) {
1346
+ return this.patchRoleUserByID$Response(params, context).pipe(map((r) => r.body));
1347
+ }
1348
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: RoleUserService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1349
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: RoleUserService, providedIn: 'root' });
1350
+ }
1351
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: RoleUserService, decorators: [{
1352
+ type: Injectable,
1353
+ args: [{ providedIn: 'root' }]
1354
+ }] });
1356
1355
 
1357
1356
  /* eslint-disable */
1358
1357
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */