@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,591 +1,446 @@
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 createApprovalActor(http, rootUrl, params, context) {
11
- const rb = new RequestBuilder(rootUrl, createApprovalActor.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
- createApprovalActor.PATH = '/v1/approval/actor';
18
-
19
- /* eslint-disable */
20
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
21
- function deleteApprovalActorByID(http, rootUrl, params, context) {
22
- const rb = new RequestBuilder(rootUrl, deleteApprovalActorByID.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
- deleteApprovalActorByID.PATH = '/v1/approval/actor/{id}';
29
-
30
- /* eslint-disable */
31
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
32
- function getApprovalActorByID(http, rootUrl, params, context) {
33
- const rb = new RequestBuilder(rootUrl, getApprovalActorByID.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
- getApprovalActorByID.PATH = '/v1/approval/actor/{id}';
40
-
41
- /* eslint-disable */
42
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
43
- function listApprovalActors(http, rootUrl, params, context) {
44
- const rb = new RequestBuilder(rootUrl, listApprovalActors.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('stage_id', params.stage_id);
51
- }
52
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
53
- }
54
- listApprovalActors.PATH = '/v1/approval/actor';
55
-
56
- /* eslint-disable */
57
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
58
- function patchApprovalActorByID(http, rootUrl, params, context) {
59
- const rb = new RequestBuilder(rootUrl, patchApprovalActorByID.PATH, 'patch');
60
- if (params) {
61
- rb.path('id', params.id);
62
- rb.body(params.body, 'application/json');
63
- }
64
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
65
- }
66
- patchApprovalActorByID.PATH = '/v1/approval/actor/{id}';
67
-
68
- /* eslint-disable */
69
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
70
- class ApprovalActorService extends BaseService {
71
- /** Create approval actor (POST /v1/approval/actor) */
72
- createApprovalActor$Response(params, context) {
73
- return createApprovalActor(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
74
- }
75
- /** Create approval actor (POST /v1/approval/actor) */
76
- createApprovalActor(params, context) {
77
- return this.createApprovalActor$Response(params, context).pipe(map((r) => r.body));
78
- }
79
- /** Delete approval actor (DELETE /v1/approval/actor/{id}) */
80
- deleteApprovalActorByID$Response(params, context) {
81
- return deleteApprovalActorByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
82
- }
83
- /** Delete approval actor (DELETE /v1/approval/actor/{id}) */
84
- deleteApprovalActorByID(params, context) {
85
- return this.deleteApprovalActorByID$Response(params, context).pipe(map((r) => r.body));
86
- }
87
- /** Get approval actor detail (GET /v1/approval/actor/{id}) */
88
- getApprovalActorByID$Response(params, context) {
89
- return getApprovalActorByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
90
- }
91
- /** Get approval actor detail (GET /v1/approval/actor/{id}) */
92
- getApprovalActorByID(params, context) {
93
- return this.getApprovalActorByID$Response(params, context).pipe(map((r) => r.body));
94
- }
95
- /** List approval actors (GET /v1/approval/actor) */
96
- listApprovalActors$Response(params, context) {
97
- return listApprovalActors(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
98
- }
99
- /** List approval actors (GET /v1/approval/actor) */
100
- listApprovalActors(params, context) {
101
- return this.listApprovalActors$Response(params, context).pipe(map((r) => r.body));
102
- }
103
- /** Update approval actor (PATCH /v1/approval/actor/{id}) */
104
- patchApprovalActorByID$Response(params, context) {
105
- return patchApprovalActorByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
106
- }
107
- /** Update approval actor (PATCH /v1/approval/actor/{id}) */
108
- patchApprovalActorByID(params, context) {
109
- return this.patchApprovalActorByID$Response(params, context).pipe(map((r) => r.body));
110
- }
111
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ApprovalActorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
112
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ApprovalActorService, providedIn: 'root' });
113
- }
114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ApprovalActorService, decorators: [{
115
- type: Injectable,
116
- args: [{ providedIn: 'root' }]
117
- }] });
9
+ const approvalActorOperationRules = {
10
+ createApprovalActor: {
11
+ method: 'POST',
12
+ path: '/v1/approval/actor',
13
+ tags: ['Approval Actor'],
14
+ summary: 'Create approval actor',
15
+ requiredPermissions: ['approval:actor:create'],
16
+ authorizationNotes: [],
17
+ securitySchemes: ['callerAuth'],
18
+ pathParams: {},
19
+ queryParams: {},
20
+ bodySchema: 'CreateActorRequest',
21
+ responseSchemas: {
22
+ '201': 'ActorResponse',
23
+ '401': 'UnauthorizedCaller',
24
+ '422': 'BusinessRuleViolation',
25
+ '429': 'TooManyRequests',
26
+ '500': 'InternalServerError',
27
+ },
28
+ },
29
+ deleteApprovalActorByID: {
30
+ method: 'DELETE',
31
+ path: '/v1/approval/actor/{id}',
32
+ tags: ['Approval Actor'],
33
+ summary: 'Delete approval actor',
34
+ requiredPermissions: ['approval:actor:delete'],
35
+ authorizationNotes: [],
36
+ securitySchemes: ['callerAuth'],
37
+ pathParams: {
38
+ id: {
39
+ required: true,
40
+ type: 'string',
41
+ format: 'uuid',
42
+ },
43
+ },
44
+ queryParams: {},
45
+ responseSchemas: {
46
+ '200': 'ApprovalMutationAckResponse',
47
+ '401': 'UnauthorizedCaller',
48
+ '404': 'ResourceNotFound',
49
+ '429': 'TooManyRequests',
50
+ '500': 'InternalServerError',
51
+ },
52
+ },
53
+ getApprovalActorByID: {
54
+ method: 'GET',
55
+ path: '/v1/approval/actor/{id}',
56
+ tags: ['Approval Actor'],
57
+ summary: 'Get approval actor detail',
58
+ requiredPermissions: ['approval:actor:read'],
59
+ authorizationNotes: [],
60
+ securitySchemes: ['callerAuth'],
61
+ pathParams: {
62
+ id: {
63
+ required: true,
64
+ type: 'string',
65
+ format: 'uuid',
66
+ },
67
+ },
68
+ queryParams: {},
69
+ responseSchemas: {
70
+ '200': 'ActorResponse',
71
+ '401': 'UnauthorizedCaller',
72
+ '404': 'ResourceNotFound',
73
+ '429': 'TooManyRequests',
74
+ '500': 'InternalServerError',
75
+ },
76
+ },
77
+ listApprovalActors: {
78
+ method: 'GET',
79
+ path: '/v1/approval/actor',
80
+ tags: ['Approval Actor'],
81
+ summary: 'List approval actors',
82
+ requiredPermissions: ['approval:actor:list'],
83
+ authorizationNotes: [],
84
+ securitySchemes: ['callerAuth'],
85
+ pathParams: {},
86
+ queryParams: {
87
+ page: {
88
+ required: false,
89
+ type: 'integer',
90
+ minimum: 1,
91
+ },
92
+ limit: {
93
+ required: false,
94
+ type: 'integer',
95
+ minimum: 1,
96
+ maximum: 100,
97
+ },
98
+ sort: {
99
+ required: false,
100
+ type: 'string',
101
+ enumValues: ['created_at', 'type', 'ref_id', 'updated_at'],
102
+ },
103
+ order: {
104
+ required: false,
105
+ type: 'string',
106
+ enumValues: ['asc', 'desc'],
107
+ },
108
+ stage_id: {
109
+ required: false,
110
+ type: 'string',
111
+ format: 'uuid',
112
+ },
113
+ },
114
+ responseSchemas: {
115
+ '200': 'ActorListResponse',
116
+ '401': 'UnauthorizedCaller',
117
+ '429': 'TooManyRequests',
118
+ '500': 'InternalServerError',
119
+ },
120
+ },
121
+ patchApprovalActorByID: {
122
+ method: 'PATCH',
123
+ path: '/v1/approval/actor/{id}',
124
+ tags: ['Approval Actor'],
125
+ summary: 'Update approval actor',
126
+ requiredPermissions: ['approval:actor:update'],
127
+ authorizationNotes: [],
128
+ securitySchemes: ['callerAuth'],
129
+ pathParams: {
130
+ id: {
131
+ required: true,
132
+ type: 'string',
133
+ format: 'uuid',
134
+ },
135
+ },
136
+ queryParams: {},
137
+ bodySchema: 'UpdateActorRequest',
138
+ responseSchemas: {
139
+ '200': 'ActorResponse',
140
+ '401': 'UnauthorizedCaller',
141
+ '404': 'ResourceNotFound',
142
+ '422': 'BusinessRuleViolation',
143
+ '429': 'TooManyRequests',
144
+ '500': 'InternalServerError',
145
+ },
146
+ },
147
+ };
118
148
 
119
149
  /* eslint-disable */
120
150
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
121
- function createApprovalDefinition(http, rootUrl, params, context) {
122
- const rb = new RequestBuilder(rootUrl, createApprovalDefinition.PATH, 'post');
123
- if (params) {
124
- rb.body(params.body, 'application/json');
125
- }
126
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
127
- }
128
- createApprovalDefinition.PATH = '/v1/approval/definition';
129
-
130
- /* eslint-disable */
131
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
132
- function deleteApprovalDefinitionByID(http, rootUrl, params, context) {
133
- const rb = new RequestBuilder(rootUrl, deleteApprovalDefinitionByID.PATH, 'delete');
134
- if (params) {
135
- rb.path('id', params.id);
136
- }
137
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
138
- }
139
- deleteApprovalDefinitionByID.PATH = '/v1/approval/definition/{id}';
140
-
141
- /* eslint-disable */
142
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
143
- function getApprovalDefinitionByID(http, rootUrl, params, context) {
144
- const rb = new RequestBuilder(rootUrl, getApprovalDefinitionByID.PATH, 'get');
145
- if (params) {
146
- rb.path('id', params.id);
147
- }
148
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
149
- }
150
- getApprovalDefinitionByID.PATH = '/v1/approval/definition/{id}';
151
-
152
- /* eslint-disable */
153
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
154
- function listApprovalDefinitions(http, rootUrl, params, context) {
155
- const rb = new RequestBuilder(rootUrl, listApprovalDefinitions.PATH, 'get');
156
- if (params) {
157
- rb.query('page', params.page);
158
- rb.query('limit', params.limit);
159
- rb.query('sort', params.sort);
160
- rb.query('order', params.order);
161
- rb.query('search', params.search);
162
- }
163
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
164
- }
165
- listApprovalDefinitions.PATH = '/v1/approval/definition';
166
-
167
- /* eslint-disable */
168
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
169
- function patchApprovalDefinitionByID(http, rootUrl, params, context) {
170
- const rb = new RequestBuilder(rootUrl, patchApprovalDefinitionByID.PATH, 'patch');
171
- if (params) {
172
- rb.path('id', params.id);
173
- rb.body(params.body, 'application/json');
174
- }
175
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
176
- }
177
- patchApprovalDefinitionByID.PATH = '/v1/approval/definition/{id}';
178
-
179
- /* eslint-disable */
180
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
181
- class ApprovalDefinitionService extends BaseService {
182
- /** Create approval definition (POST /v1/approval/definition) */
183
- createApprovalDefinition$Response(params, context) {
184
- return createApprovalDefinition(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
185
- }
186
- /** Create approval definition (POST /v1/approval/definition) */
187
- createApprovalDefinition(params, context) {
188
- return this.createApprovalDefinition$Response(params, context).pipe(map((r) => r.body));
189
- }
190
- /** Delete approval definition (DELETE /v1/approval/definition/{id}) */
191
- deleteApprovalDefinitionByID$Response(params, context) {
192
- return deleteApprovalDefinitionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
193
- }
194
- /** Delete approval definition (DELETE /v1/approval/definition/{id}) */
195
- deleteApprovalDefinitionByID(params, context) {
196
- return this.deleteApprovalDefinitionByID$Response(params, context).pipe(map((r) => r.body));
197
- }
198
- /** Get approval definition detail (GET /v1/approval/definition/{id}) */
199
- getApprovalDefinitionByID$Response(params, context) {
200
- return getApprovalDefinitionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
201
- }
202
- /** Get approval definition detail (GET /v1/approval/definition/{id}) */
203
- getApprovalDefinitionByID(params, context) {
204
- return this.getApprovalDefinitionByID$Response(params, context).pipe(map((r) => r.body));
205
- }
206
- /** List approval definitions (GET /v1/approval/definition) */
207
- listApprovalDefinitions$Response(params, context) {
208
- return listApprovalDefinitions(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
209
- }
210
- /** List approval definitions (GET /v1/approval/definition) */
211
- listApprovalDefinitions(params, context) {
212
- return this.listApprovalDefinitions$Response(params, context).pipe(map((r) => r.body));
213
- }
214
- /** Update approval definition (PATCH /v1/approval/definition/{id}) */
215
- patchApprovalDefinitionByID$Response(params, context) {
216
- return patchApprovalDefinitionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
217
- }
218
- /** Update approval definition (PATCH /v1/approval/definition/{id}) */
219
- patchApprovalDefinitionByID(params, context) {
220
- return this.patchApprovalDefinitionByID$Response(params, context).pipe(map((r) => r.body));
221
- }
222
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ApprovalDefinitionService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
223
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ApprovalDefinitionService, providedIn: 'root' });
224
- }
225
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ApprovalDefinitionService, decorators: [{
226
- type: Injectable,
227
- args: [{ providedIn: 'root' }]
228
- }] });
229
-
230
- /* eslint-disable */
231
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
232
- function approveApprovalStep(http, rootUrl, params, context) {
233
- const rb = new RequestBuilder(rootUrl, approveApprovalStep.PATH, 'post');
234
- if (params) {
235
- rb.body(params.body, 'application/json');
236
- }
237
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
238
- }
239
- approveApprovalStep.PATH = '/v1/approval/approve';
240
-
241
- /* eslint-disable */
242
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
243
- function getApprovalInstanceByID(http, rootUrl, params, context) {
244
- const rb = new RequestBuilder(rootUrl, getApprovalInstanceByID.PATH, 'get');
245
- if (params) {
246
- rb.path('id', params.id);
247
- }
248
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
249
- }
250
- getApprovalInstanceByID.PATH = '/v1/approval/instance/{id}';
251
-
252
- /* eslint-disable */
253
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
254
- function listPendingApprovalItems(http, rootUrl, params, context) {
255
- const rb = new RequestBuilder(rootUrl, listPendingApprovalItems.PATH, 'get');
256
- if (params) {
257
- rb.query('page', params.page);
258
- rb.query('limit', params.limit);
259
- rb.query('sort', params.sort);
260
- rb.query('order', params.order);
261
- }
262
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
263
- }
264
- listPendingApprovalItems.PATH = '/v1/approval/pending';
265
-
266
- /* eslint-disable */
267
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
268
- function rejectApprovalStep(http, rootUrl, params, context) {
269
- const rb = new RequestBuilder(rootUrl, rejectApprovalStep.PATH, 'post');
270
- if (params) {
271
- rb.body(params.body, 'application/json');
272
- }
273
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
274
- }
275
- rejectApprovalStep.PATH = '/v1/approval/reject';
276
-
277
- /* eslint-disable */
278
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
279
- function submitApprovalWorkflow(http, rootUrl, params, context) {
280
- const rb = new RequestBuilder(rootUrl, submitApprovalWorkflow.PATH, 'post');
281
- if (params) {
282
- rb.body(params.body, 'application/json');
283
- }
284
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
285
- }
286
- submitApprovalWorkflow.PATH = '/v1/approval/submit';
287
-
288
- /* eslint-disable */
289
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
290
- class ApprovalInstanceService extends BaseService {
291
- /** Approve current approval step (POST /v1/approval/approve) */
292
- approveApprovalStep$Response(params, context) {
293
- return approveApprovalStep(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
294
- }
295
- /** Approve current approval step (POST /v1/approval/approve) */
296
- approveApprovalStep(params, context) {
297
- return this.approveApprovalStep$Response(params, context).pipe(map((r) => r.body));
298
- }
299
- /** Get approval instance detail (GET /v1/approval/instance/{id}) */
300
- getApprovalInstanceByID$Response(params, context) {
301
- return getApprovalInstanceByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
302
- }
303
- /** Get approval instance detail (GET /v1/approval/instance/{id}) */
304
- getApprovalInstanceByID(params, context) {
305
- return this.getApprovalInstanceByID$Response(params, context).pipe(map((r) => r.body));
306
- }
307
- /** List pending approvals for current actor (GET /v1/approval/pending) */
308
- listPendingApprovalItems$Response(params, context) {
309
- return listPendingApprovalItems(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
310
- }
311
- /** List pending approvals for current actor (GET /v1/approval/pending) */
312
- listPendingApprovalItems(params, context) {
313
- return this.listPendingApprovalItems$Response(params, context).pipe(map((r) => r.body));
314
- }
315
- /** Reject current approval step (POST /v1/approval/reject) */
316
- rejectApprovalStep$Response(params, context) {
317
- return rejectApprovalStep(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
318
- }
319
- /** Reject current approval step (POST /v1/approval/reject) */
320
- rejectApprovalStep(params, context) {
321
- return this.rejectApprovalStep$Response(params, context).pipe(map((r) => r.body));
322
- }
323
- /** Submit record into approval workflow (POST /v1/approval/submit) */
324
- submitApprovalWorkflow$Response(params, context) {
325
- return submitApprovalWorkflow(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
326
- }
327
- /** Submit record into approval workflow (POST /v1/approval/submit) */
328
- submitApprovalWorkflow(params, context) {
329
- return this.submitApprovalWorkflow$Response(params, context).pipe(map((r) => r.body));
330
- }
331
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ApprovalInstanceService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
332
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ApprovalInstanceService, providedIn: 'root' });
333
- }
334
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ApprovalInstanceService, decorators: [{
335
- type: Injectable,
336
- args: [{ providedIn: 'root' }]
337
- }] });
338
-
339
- /* eslint-disable */
340
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
341
- function createApprovalStage(http, rootUrl, params, context) {
342
- const rb = new RequestBuilder(rootUrl, createApprovalStage.PATH, 'post');
343
- if (params) {
344
- rb.body(params.body, 'application/json');
345
- }
346
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
347
- }
348
- createApprovalStage.PATH = '/v1/approval/stage';
349
-
350
- /* eslint-disable */
351
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
352
- function deleteApprovalStageByID(http, rootUrl, params, context) {
353
- const rb = new RequestBuilder(rootUrl, deleteApprovalStageByID.PATH, 'delete');
354
- if (params) {
355
- rb.path('id', params.id);
356
- }
357
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
358
- }
359
- deleteApprovalStageByID.PATH = '/v1/approval/stage/{id}';
360
-
361
- /* eslint-disable */
362
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
363
- function getApprovalStageByID(http, rootUrl, params, context) {
364
- const rb = new RequestBuilder(rootUrl, getApprovalStageByID.PATH, 'get');
365
- if (params) {
366
- rb.path('id', params.id);
367
- }
368
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
369
- }
370
- getApprovalStageByID.PATH = '/v1/approval/stage/{id}';
371
-
372
- /* eslint-disable */
373
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
374
- function listApprovalStages(http, rootUrl, params, context) {
375
- const rb = new RequestBuilder(rootUrl, listApprovalStages.PATH, 'get');
376
- if (params) {
377
- rb.query('page', params.page);
378
- rb.query('limit', params.limit);
379
- rb.query('sort', params.sort);
380
- rb.query('order', params.order);
381
- rb.query('definition_id', params.definition_id);
382
- }
383
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
384
- }
385
- listApprovalStages.PATH = '/v1/approval/stage';
386
-
387
- /* eslint-disable */
388
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
389
- function patchApprovalStageByID(http, rootUrl, params, context) {
390
- const rb = new RequestBuilder(rootUrl, patchApprovalStageByID.PATH, 'patch');
391
- if (params) {
392
- rb.path('id', params.id);
393
- rb.body(params.body, 'application/json');
394
- }
395
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
396
- }
397
- patchApprovalStageByID.PATH = '/v1/approval/stage/{id}';
398
-
399
- /* eslint-disable */
400
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
401
- class ApprovalStageService extends BaseService {
402
- /** Create approval stage (POST /v1/approval/stage) */
403
- createApprovalStage$Response(params, context) {
404
- return createApprovalStage(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
405
- }
406
- /** Create approval stage (POST /v1/approval/stage) */
407
- createApprovalStage(params, context) {
408
- return this.createApprovalStage$Response(params, context).pipe(map((r) => r.body));
409
- }
410
- /** Delete approval stage (DELETE /v1/approval/stage/{id}) */
411
- deleteApprovalStageByID$Response(params, context) {
412
- return deleteApprovalStageByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
413
- }
414
- /** Delete approval stage (DELETE /v1/approval/stage/{id}) */
415
- deleteApprovalStageByID(params, context) {
416
- return this.deleteApprovalStageByID$Response(params, context).pipe(map((r) => r.body));
417
- }
418
- /** Get approval stage detail (GET /v1/approval/stage/{id}) */
419
- getApprovalStageByID$Response(params, context) {
420
- return getApprovalStageByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
421
- }
422
- /** Get approval stage detail (GET /v1/approval/stage/{id}) */
423
- getApprovalStageByID(params, context) {
424
- return this.getApprovalStageByID$Response(params, context).pipe(map((r) => r.body));
425
- }
426
- /** List approval stages (GET /v1/approval/stage) */
427
- listApprovalStages$Response(params, context) {
428
- return listApprovalStages(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
429
- }
430
- /** List approval stages (GET /v1/approval/stage) */
431
- listApprovalStages(params, context) {
432
- return this.listApprovalStages$Response(params, context).pipe(map((r) => r.body));
433
- }
434
- /** Update approval stage (PATCH /v1/approval/stage/{id}) */
435
- patchApprovalStageByID$Response(params, context) {
436
- return patchApprovalStageByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
437
- }
438
- /** Update approval stage (PATCH /v1/approval/stage/{id}) */
439
- patchApprovalStageByID(params, context) {
440
- return this.patchApprovalStageByID$Response(params, context).pipe(map((r) => r.body));
441
- }
442
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ApprovalStageService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
443
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ApprovalStageService, providedIn: 'root' });
444
- }
445
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ApprovalStageService, decorators: [{
446
- type: Injectable,
447
- args: [{ providedIn: 'root' }]
448
- }] });
449
-
450
- /* eslint-disable */
451
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
452
- function createApprovalTransition(http, rootUrl, params, context) {
453
- const rb = new RequestBuilder(rootUrl, createApprovalTransition.PATH, 'post');
454
- if (params) {
455
- rb.body(params.body, 'application/json');
456
- }
457
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
458
- }
459
- createApprovalTransition.PATH = '/v1/approval/transition';
460
-
461
- /* eslint-disable */
462
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
463
- function deleteApprovalTransitionByID(http, rootUrl, params, context) {
464
- const rb = new RequestBuilder(rootUrl, deleteApprovalTransitionByID.PATH, 'delete');
465
- if (params) {
466
- rb.path('id', params.id);
467
- }
468
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
469
- }
470
- deleteApprovalTransitionByID.PATH = '/v1/approval/transition/{id}';
471
-
472
- /* eslint-disable */
473
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
474
- function getApprovalTransitionByID(http, rootUrl, params, context) {
475
- const rb = new RequestBuilder(rootUrl, getApprovalTransitionByID.PATH, 'get');
476
- if (params) {
477
- rb.path('id', params.id);
478
- }
479
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
480
- }
481
- getApprovalTransitionByID.PATH = '/v1/approval/transition/{id}';
482
-
483
- /* eslint-disable */
484
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
485
- function listApprovalTransitions(http, rootUrl, params, context) {
486
- const rb = new RequestBuilder(rootUrl, listApprovalTransitions.PATH, 'get');
487
- if (params) {
488
- rb.query('page', params.page);
489
- rb.query('limit', params.limit);
490
- rb.query('sort', params.sort);
491
- rb.query('order', params.order);
492
- rb.query('definition_id', params.definition_id);
493
- }
494
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
495
- }
496
- listApprovalTransitions.PATH = '/v1/approval/transition';
497
-
498
- /* eslint-disable */
499
- /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
500
- function patchApprovalTransitionByID(http, rootUrl, params, context) {
501
- const rb = new RequestBuilder(rootUrl, patchApprovalTransitionByID.PATH, 'patch');
502
- if (params) {
503
- rb.path('id', params.id);
504
- rb.body(params.body, 'application/json');
505
- }
506
- return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
507
- }
508
- patchApprovalTransitionByID.PATH = '/v1/approval/transition/{id}';
151
+ const approvalDefinitionOperationRules = {
152
+ createApprovalDefinition: {
153
+ method: 'POST',
154
+ path: '/v1/approval/definition',
155
+ tags: ['Approval Definition'],
156
+ summary: 'Create approval definition',
157
+ description: 'Creates an approval definition with optional nested transitions, stages, and actors.',
158
+ requiredPermissions: ['approval:definition:create'],
159
+ authorizationNotes: [],
160
+ securitySchemes: ['callerAuth'],
161
+ pathParams: {},
162
+ queryParams: {},
163
+ bodySchema: 'CreateDefinitionRequest',
164
+ responseSchemas: {
165
+ '201': 'DefinitionResponse',
166
+ '400': 'ErrorResponse',
167
+ '401': 'UnauthorizedCaller',
168
+ '429': 'TooManyRequests',
169
+ '500': 'InternalServerError',
170
+ },
171
+ },
172
+ deleteApprovalDefinitionByID: {
173
+ method: 'DELETE',
174
+ path: '/v1/approval/definition/{id}',
175
+ tags: ['Approval Definition'],
176
+ summary: 'Delete approval definition',
177
+ requiredPermissions: ['approval:definition:delete'],
178
+ authorizationNotes: [],
179
+ securitySchemes: ['callerAuth'],
180
+ pathParams: {
181
+ id: {
182
+ required: true,
183
+ type: 'string',
184
+ format: 'uuid',
185
+ },
186
+ },
187
+ queryParams: {},
188
+ responseSchemas: {
189
+ '200': 'ApprovalMutationAckResponse',
190
+ '401': 'UnauthorizedCaller',
191
+ '404': 'ResourceNotFound',
192
+ '429': 'TooManyRequests',
193
+ '500': 'InternalServerError',
194
+ },
195
+ },
196
+ getApprovalDefinitionByID: {
197
+ method: 'GET',
198
+ path: '/v1/approval/definition/{id}',
199
+ tags: ['Approval Definition'],
200
+ summary: 'Get approval definition detail',
201
+ requiredPermissions: ['approval:definition:read'],
202
+ authorizationNotes: [],
203
+ securitySchemes: ['callerAuth'],
204
+ pathParams: {
205
+ id: {
206
+ required: true,
207
+ type: 'string',
208
+ format: 'uuid',
209
+ },
210
+ },
211
+ queryParams: {},
212
+ responseSchemas: {
213
+ '200': 'DefinitionResponse',
214
+ '401': 'UnauthorizedCaller',
215
+ '404': 'ResourceNotFound',
216
+ '429': 'TooManyRequests',
217
+ '500': 'InternalServerError',
218
+ },
219
+ },
220
+ listApprovalDefinitions: {
221
+ method: 'GET',
222
+ path: '/v1/approval/definition',
223
+ tags: ['Approval Definition'],
224
+ summary: 'List approval definitions',
225
+ description: 'Returns paginated approval definition master data.',
226
+ requiredPermissions: ['approval:definition:list'],
227
+ authorizationNotes: [],
228
+ securitySchemes: ['callerAuth'],
229
+ pathParams: {},
230
+ queryParams: {
231
+ page: {
232
+ required: false,
233
+ type: 'integer',
234
+ minimum: 1,
235
+ },
236
+ limit: {
237
+ required: false,
238
+ type: 'integer',
239
+ minimum: 1,
240
+ maximum: 100,
241
+ },
242
+ sort: {
243
+ required: false,
244
+ type: 'string',
245
+ enumValues: ['created_at', 'code', 'table_name', 'updated_at'],
246
+ },
247
+ order: {
248
+ required: false,
249
+ type: 'string',
250
+ enumValues: ['asc', 'desc'],
251
+ },
252
+ search: {
253
+ required: false,
254
+ type: 'string',
255
+ },
256
+ },
257
+ responseSchemas: {
258
+ '200': 'DefinitionListResponse',
259
+ '401': 'UnauthorizedCaller',
260
+ '429': 'TooManyRequests',
261
+ '500': 'InternalServerError',
262
+ },
263
+ },
264
+ patchApprovalDefinitionByID: {
265
+ method: 'PATCH',
266
+ path: '/v1/approval/definition/{id}',
267
+ tags: ['Approval Definition'],
268
+ summary: 'Update approval definition',
269
+ requiredPermissions: ['approval:definition:update'],
270
+ authorizationNotes: [],
271
+ securitySchemes: ['callerAuth'],
272
+ pathParams: {
273
+ id: {
274
+ required: true,
275
+ type: 'string',
276
+ format: 'uuid',
277
+ },
278
+ },
279
+ queryParams: {},
280
+ bodySchema: 'UpdateDefinitionRequest',
281
+ responseSchemas: {
282
+ '200': 'DefinitionResponse',
283
+ '401': 'UnauthorizedCaller',
284
+ '404': 'ResourceNotFound',
285
+ '429': 'TooManyRequests',
286
+ '500': 'InternalServerError',
287
+ },
288
+ },
289
+ };
509
290
 
510
291
  /* eslint-disable */
511
292
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
512
- class ApprovalTransitionService extends BaseService {
513
- /** Create approval transition (POST /v1/approval/transition) */
514
- createApprovalTransition$Response(params, context) {
515
- return createApprovalTransition(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
516
- }
517
- /** Create approval transition (POST /v1/approval/transition) */
518
- createApprovalTransition(params, context) {
519
- return this.createApprovalTransition$Response(params, context).pipe(map((r) => r.body));
520
- }
521
- /** Delete approval transition (DELETE /v1/approval/transition/{id}) */
522
- deleteApprovalTransitionByID$Response(params, context) {
523
- return deleteApprovalTransitionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
524
- }
525
- /** Delete approval transition (DELETE /v1/approval/transition/{id}) */
526
- deleteApprovalTransitionByID(params, context) {
527
- return this.deleteApprovalTransitionByID$Response(params, context).pipe(map((r) => r.body));
528
- }
529
- /** Get approval transition detail (GET /v1/approval/transition/{id}) */
530
- getApprovalTransitionByID$Response(params, context) {
531
- return getApprovalTransitionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
532
- }
533
- /** Get approval transition detail (GET /v1/approval/transition/{id}) */
534
- getApprovalTransitionByID(params, context) {
535
- return this.getApprovalTransitionByID$Response(params, context).pipe(map((r) => r.body));
536
- }
537
- /** List approval transitions (GET /v1/approval/transition) */
538
- listApprovalTransitions$Response(params, context) {
539
- return listApprovalTransitions(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
540
- }
541
- /** List approval transitions (GET /v1/approval/transition) */
542
- listApprovalTransitions(params, context) {
543
- return this.listApprovalTransitions$Response(params, context).pipe(map((r) => r.body));
544
- }
545
- /** Update approval transition (PATCH /v1/approval/transition/{id}) */
546
- patchApprovalTransitionByID$Response(params, context) {
547
- return patchApprovalTransitionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
548
- }
549
- /** Update approval transition (PATCH /v1/approval/transition/{id}) */
550
- patchApprovalTransitionByID(params, context) {
551
- return this.patchApprovalTransitionByID$Response(params, context).pipe(map((r) => r.body));
552
- }
553
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ApprovalTransitionService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
554
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ApprovalTransitionService, providedIn: 'root' });
555
- }
556
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: ApprovalTransitionService, decorators: [{
557
- type: Injectable,
558
- args: [{ providedIn: 'root' }]
559
- }] });
293
+ const approvalInstanceOperationRules = {
294
+ approveApprovalStep: {
295
+ method: 'POST',
296
+ path: '/v1/approval/approve',
297
+ tags: ['Approval Instance'],
298
+ summary: 'Approve current approval step',
299
+ requiredPermissions: ['approval:instance:approve'],
300
+ authorizationNotes: [],
301
+ securitySchemes: ['callerAuth'],
302
+ pathParams: {},
303
+ queryParams: {},
304
+ bodySchema: 'ApproveRequest',
305
+ responseSchemas: {
306
+ '200': 'WorkflowActionResponse',
307
+ '401': 'UnauthorizedCaller',
308
+ '422': 'BusinessRuleViolation',
309
+ '429': 'TooManyRequests',
310
+ '500': 'InternalServerError',
311
+ },
312
+ },
313
+ getApprovalInstanceByID: {
314
+ method: 'GET',
315
+ path: '/v1/approval/instance/{id}',
316
+ tags: ['Approval Instance'],
317
+ summary: 'Get approval instance detail',
318
+ requiredPermissions: ['approval:instance:read'],
319
+ authorizationNotes: [],
320
+ securitySchemes: ['callerAuth'],
321
+ pathParams: {
322
+ id: {
323
+ required: true,
324
+ type: 'string',
325
+ format: 'uuid',
326
+ },
327
+ },
328
+ queryParams: {},
329
+ responseSchemas: {
330
+ '200': 'InstanceDetailResponse',
331
+ '401': 'UnauthorizedCaller',
332
+ '404': 'ResourceNotFound',
333
+ '429': 'TooManyRequests',
334
+ '500': 'InternalServerError',
335
+ },
336
+ },
337
+ listPendingApprovalItems: {
338
+ method: 'GET',
339
+ path: '/v1/approval/pending',
340
+ tags: ['Approval Instance'],
341
+ summary: 'List pending approvals for current actor',
342
+ requiredPermissions: ['approval:instance:pending'],
343
+ authorizationNotes: [],
344
+ securitySchemes: ['callerAuth'],
345
+ pathParams: {},
346
+ queryParams: {
347
+ page: {
348
+ required: false,
349
+ type: 'integer',
350
+ minimum: 1,
351
+ },
352
+ limit: {
353
+ required: false,
354
+ type: 'integer',
355
+ minimum: 1,
356
+ maximum: 100,
357
+ },
358
+ sort: {
359
+ required: false,
360
+ type: 'string',
361
+ enumValues: ['created_at', 'updated_at', 'table_name', 'record_id', 'current_stage'],
362
+ },
363
+ order: {
364
+ required: false,
365
+ type: 'string',
366
+ enumValues: ['asc', 'desc'],
367
+ },
368
+ },
369
+ responseSchemas: {
370
+ '200': 'PendingListResponse',
371
+ '401': 'UnauthorizedCaller',
372
+ '429': 'TooManyRequests',
373
+ '500': 'InternalServerError',
374
+ },
375
+ },
376
+ rejectApprovalStep: {
377
+ method: 'POST',
378
+ path: '/v1/approval/reject',
379
+ tags: ['Approval Instance'],
380
+ summary: 'Reject current approval step',
381
+ requiredPermissions: ['approval:instance:reject'],
382
+ authorizationNotes: [],
383
+ securitySchemes: ['callerAuth'],
384
+ pathParams: {},
385
+ queryParams: {},
386
+ bodySchema: 'RejectRequest',
387
+ responseSchemas: {
388
+ '200': 'WorkflowActionResponse',
389
+ '401': 'UnauthorizedCaller',
390
+ '422': 'BusinessRuleViolation',
391
+ '429': 'TooManyRequests',
392
+ '500': 'InternalServerError',
393
+ },
394
+ },
395
+ submitApprovalWorkflow: {
396
+ method: 'POST',
397
+ path: '/v1/approval/submit',
398
+ tags: ['Approval Instance'],
399
+ summary: 'Submit record into approval workflow',
400
+ description: 'Resolves one approval definition, chooses the valid transition from current status, and creates a pending approval instance with generated steps.',
401
+ requiredPermissions: ['approval:instance:submit'],
402
+ authorizationNotes: [],
403
+ securitySchemes: ['callerAuth'],
404
+ pathParams: {},
405
+ queryParams: {},
406
+ bodySchema: 'SubmitRequest',
407
+ responseSchemas: {
408
+ '201': 'WorkflowActionResponse',
409
+ '401': 'UnauthorizedCaller',
410
+ '422': 'BusinessRuleViolation',
411
+ '429': 'TooManyRequests',
412
+ '500': 'InternalServerError',
413
+ },
414
+ },
415
+ };
560
416
 
561
417
  /* eslint-disable */
562
418
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
563
- const approvalActorOperationRules = {
564
- createApprovalActor: {
419
+ const approvalStageOperationRules = {
420
+ createApprovalStage: {
565
421
  method: 'POST',
566
- path: '/v1/approval/actor',
567
- tags: ['Approval Actor'],
568
- summary: 'Create approval actor',
569
- requiredPermissions: ['approval:actor:create'],
422
+ path: '/v1/approval/stage',
423
+ tags: ['Approval Stage'],
424
+ summary: 'Create approval stage',
425
+ requiredPermissions: ['approval:stage:create'],
570
426
  authorizationNotes: [],
571
427
  securitySchemes: ['callerAuth'],
572
428
  pathParams: {},
573
429
  queryParams: {},
574
- bodySchema: 'CreateActorRequest',
430
+ bodySchema: 'CreateStageRequest',
575
431
  responseSchemas: {
576
- '201': 'ActorResponse',
432
+ '201': 'StageResponse',
577
433
  '401': 'UnauthorizedCaller',
578
- '422': 'BusinessRuleViolation',
579
434
  '429': 'TooManyRequests',
580
435
  '500': 'InternalServerError',
581
436
  },
582
437
  },
583
- deleteApprovalActorByID: {
438
+ deleteApprovalStageByID: {
584
439
  method: 'DELETE',
585
- path: '/v1/approval/actor/{id}',
586
- tags: ['Approval Actor'],
587
- summary: 'Delete approval actor',
588
- requiredPermissions: ['approval:actor:delete'],
440
+ path: '/v1/approval/stage/{id}',
441
+ tags: ['Approval Stage'],
442
+ summary: 'Delete approval stage',
443
+ requiredPermissions: ['approval:stage:delete'],
589
444
  authorizationNotes: [],
590
445
  securitySchemes: ['callerAuth'],
591
446
  pathParams: {
@@ -604,12 +459,12 @@ const approvalActorOperationRules = {
604
459
  '500': 'InternalServerError',
605
460
  },
606
461
  },
607
- getApprovalActorByID: {
462
+ getApprovalStageByID: {
608
463
  method: 'GET',
609
- path: '/v1/approval/actor/{id}',
610
- tags: ['Approval Actor'],
611
- summary: 'Get approval actor detail',
612
- requiredPermissions: ['approval:actor:read'],
464
+ path: '/v1/approval/stage/{id}',
465
+ tags: ['Approval Stage'],
466
+ summary: 'Get approval stage detail',
467
+ requiredPermissions: ['approval:stage:read'],
613
468
  authorizationNotes: [],
614
469
  securitySchemes: ['callerAuth'],
615
470
  pathParams: {
@@ -621,19 +476,19 @@ const approvalActorOperationRules = {
621
476
  },
622
477
  queryParams: {},
623
478
  responseSchemas: {
624
- '200': 'ActorResponse',
479
+ '200': 'StageDetailResponse',
625
480
  '401': 'UnauthorizedCaller',
626
481
  '404': 'ResourceNotFound',
627
482
  '429': 'TooManyRequests',
628
483
  '500': 'InternalServerError',
629
484
  },
630
485
  },
631
- listApprovalActors: {
632
- method: 'GET',
633
- path: '/v1/approval/actor',
634
- tags: ['Approval Actor'],
635
- summary: 'List approval actors',
636
- requiredPermissions: ['approval:actor:list'],
486
+ listApprovalStages: {
487
+ method: 'GET',
488
+ path: '/v1/approval/stage',
489
+ tags: ['Approval Stage'],
490
+ summary: 'List approval stages',
491
+ requiredPermissions: ['approval:stage:list'],
637
492
  authorizationNotes: [],
638
493
  securitySchemes: ['callerAuth'],
639
494
  pathParams: {},
@@ -652,32 +507,32 @@ const approvalActorOperationRules = {
652
507
  sort: {
653
508
  required: false,
654
509
  type: 'string',
655
- enumValues: ['created_at', 'type', 'ref_id', 'updated_at'],
510
+ enumValues: ['created_at', 'level', 'name', 'updated_at'],
656
511
  },
657
512
  order: {
658
513
  required: false,
659
514
  type: 'string',
660
515
  enumValues: ['asc', 'desc'],
661
516
  },
662
- stage_id: {
517
+ definition_id: {
663
518
  required: false,
664
519
  type: 'string',
665
520
  format: 'uuid',
666
521
  },
667
522
  },
668
523
  responseSchemas: {
669
- '200': 'ActorListResponse',
524
+ '200': 'StageListResponse',
670
525
  '401': 'UnauthorizedCaller',
671
526
  '429': 'TooManyRequests',
672
527
  '500': 'InternalServerError',
673
528
  },
674
529
  },
675
- patchApprovalActorByID: {
530
+ patchApprovalStageByID: {
676
531
  method: 'PATCH',
677
- path: '/v1/approval/actor/{id}',
678
- tags: ['Approval Actor'],
679
- summary: 'Update approval actor',
680
- requiredPermissions: ['approval:actor:update'],
532
+ path: '/v1/approval/stage/{id}',
533
+ tags: ['Approval Stage'],
534
+ summary: 'Update approval stage',
535
+ requiredPermissions: ['approval:stage:update'],
681
536
  authorizationNotes: [],
682
537
  securitySchemes: ['callerAuth'],
683
538
  pathParams: {
@@ -688,12 +543,11 @@ const approvalActorOperationRules = {
688
543
  },
689
544
  },
690
545
  queryParams: {},
691
- bodySchema: 'UpdateActorRequest',
546
+ bodySchema: 'UpdateStageRequest',
692
547
  responseSchemas: {
693
- '200': 'ActorResponse',
548
+ '200': 'StageResponse',
694
549
  '401': 'UnauthorizedCaller',
695
550
  '404': 'ResourceNotFound',
696
- '422': 'BusinessRuleViolation',
697
551
  '429': 'TooManyRequests',
698
552
  '500': 'InternalServerError',
699
553
  },
@@ -702,33 +556,31 @@ const approvalActorOperationRules = {
702
556
 
703
557
  /* eslint-disable */
704
558
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
705
- const approvalDefinitionOperationRules = {
706
- createApprovalDefinition: {
559
+ const approvalTransitionOperationRules = {
560
+ createApprovalTransition: {
707
561
  method: 'POST',
708
- path: '/v1/approval/definition',
709
- tags: ['Approval Definition'],
710
- summary: 'Create approval definition',
711
- description: 'Creates an approval definition with optional nested transitions, stages, and actors.',
712
- requiredPermissions: ['approval:definition:create'],
562
+ path: '/v1/approval/transition',
563
+ tags: ['Approval Transition'],
564
+ summary: 'Create approval transition',
565
+ requiredPermissions: ['approval:transition:create'],
713
566
  authorizationNotes: [],
714
567
  securitySchemes: ['callerAuth'],
715
568
  pathParams: {},
716
569
  queryParams: {},
717
- bodySchema: 'CreateDefinitionRequest',
570
+ bodySchema: 'CreateTransitionRequest',
718
571
  responseSchemas: {
719
- '201': 'DefinitionResponse',
720
- '400': 'ErrorResponse',
572
+ '201': 'TransitionResponse',
721
573
  '401': 'UnauthorizedCaller',
722
574
  '429': 'TooManyRequests',
723
575
  '500': 'InternalServerError',
724
576
  },
725
577
  },
726
- deleteApprovalDefinitionByID: {
578
+ deleteApprovalTransitionByID: {
727
579
  method: 'DELETE',
728
- path: '/v1/approval/definition/{id}',
729
- tags: ['Approval Definition'],
730
- summary: 'Delete approval definition',
731
- requiredPermissions: ['approval:definition:delete'],
580
+ path: '/v1/approval/transition/{id}',
581
+ tags: ['Approval Transition'],
582
+ summary: 'Delete approval transition',
583
+ requiredPermissions: ['approval:transition:delete'],
732
584
  authorizationNotes: [],
733
585
  securitySchemes: ['callerAuth'],
734
586
  pathParams: {
@@ -747,12 +599,12 @@ const approvalDefinitionOperationRules = {
747
599
  '500': 'InternalServerError',
748
600
  },
749
601
  },
750
- getApprovalDefinitionByID: {
602
+ getApprovalTransitionByID: {
751
603
  method: 'GET',
752
- path: '/v1/approval/definition/{id}',
753
- tags: ['Approval Definition'],
754
- summary: 'Get approval definition detail',
755
- requiredPermissions: ['approval:definition:read'],
604
+ path: '/v1/approval/transition/{id}',
605
+ tags: ['Approval Transition'],
606
+ summary: 'Get approval transition detail',
607
+ requiredPermissions: ['approval:transition:read'],
756
608
  authorizationNotes: [],
757
609
  securitySchemes: ['callerAuth'],
758
610
  pathParams: {
@@ -764,20 +616,19 @@ const approvalDefinitionOperationRules = {
764
616
  },
765
617
  queryParams: {},
766
618
  responseSchemas: {
767
- '200': 'DefinitionResponse',
619
+ '200': 'TransitionResponse',
768
620
  '401': 'UnauthorizedCaller',
769
621
  '404': 'ResourceNotFound',
770
622
  '429': 'TooManyRequests',
771
623
  '500': 'InternalServerError',
772
624
  },
773
625
  },
774
- listApprovalDefinitions: {
626
+ listApprovalTransitions: {
775
627
  method: 'GET',
776
- path: '/v1/approval/definition',
777
- tags: ['Approval Definition'],
778
- summary: 'List approval definitions',
779
- description: 'Returns paginated approval definition master data.',
780
- requiredPermissions: ['approval:definition:list'],
628
+ path: '/v1/approval/transition',
629
+ tags: ['Approval Transition'],
630
+ summary: 'List approval transitions',
631
+ requiredPermissions: ['approval:transition:list'],
781
632
  authorizationNotes: [],
782
633
  securitySchemes: ['callerAuth'],
783
634
  pathParams: {},
@@ -796,31 +647,32 @@ const approvalDefinitionOperationRules = {
796
647
  sort: {
797
648
  required: false,
798
649
  type: 'string',
799
- enumValues: ['created_at', 'code', 'table_name', 'updated_at'],
650
+ enumValues: ['created_at', 'from_status', 'to_status', 'updated_at'],
800
651
  },
801
652
  order: {
802
653
  required: false,
803
654
  type: 'string',
804
655
  enumValues: ['asc', 'desc'],
805
656
  },
806
- search: {
657
+ definition_id: {
807
658
  required: false,
808
659
  type: 'string',
660
+ format: 'uuid',
809
661
  },
810
662
  },
811
663
  responseSchemas: {
812
- '200': 'DefinitionListResponse',
664
+ '200': 'TransitionListResponse',
813
665
  '401': 'UnauthorizedCaller',
814
666
  '429': 'TooManyRequests',
815
667
  '500': 'InternalServerError',
816
668
  },
817
669
  },
818
- patchApprovalDefinitionByID: {
670
+ patchApprovalTransitionByID: {
819
671
  method: 'PATCH',
820
- path: '/v1/approval/definition/{id}',
821
- tags: ['Approval Definition'],
822
- summary: 'Update approval definition',
823
- requiredPermissions: ['approval:definition:update'],
672
+ path: '/v1/approval/transition/{id}',
673
+ tags: ['Approval Transition'],
674
+ summary: 'Update approval transition',
675
+ requiredPermissions: ['approval:transition:update'],
824
676
  authorizationNotes: [],
825
677
  securitySchemes: ['callerAuth'],
826
678
  pathParams: {
@@ -831,9 +683,9 @@ const approvalDefinitionOperationRules = {
831
683
  },
832
684
  },
833
685
  queryParams: {},
834
- bodySchema: 'UpdateDefinitionRequest',
686
+ bodySchema: 'UpdateTransitionRequest',
835
687
  responseSchemas: {
836
- '200': 'DefinitionResponse',
688
+ '200': 'TransitionResponse',
837
689
  '401': 'UnauthorizedCaller',
838
690
  '404': 'ResourceNotFound',
839
691
  '429': 'TooManyRequests',
@@ -844,409 +696,556 @@ const approvalDefinitionOperationRules = {
844
696
 
845
697
  /* eslint-disable */
846
698
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
847
- const approvalInstanceOperationRules = {
848
- approveApprovalStep: {
849
- method: 'POST',
850
- path: '/v1/approval/approve',
851
- tags: ['Approval Instance'],
852
- summary: 'Approve current approval step',
853
- requiredPermissions: ['approval:instance:approve'],
854
- authorizationNotes: [],
855
- securitySchemes: ['callerAuth'],
856
- pathParams: {},
857
- queryParams: {},
858
- bodySchema: 'ApproveRequest',
859
- responseSchemas: {
860
- '200': 'WorkflowActionResponse',
861
- '401': 'UnauthorizedCaller',
862
- '422': 'BusinessRuleViolation',
863
- '429': 'TooManyRequests',
864
- '500': 'InternalServerError',
865
- },
866
- },
867
- getApprovalInstanceByID: {
868
- method: 'GET',
869
- path: '/v1/approval/instance/{id}',
870
- tags: ['Approval Instance'],
871
- summary: 'Get approval instance detail',
872
- requiredPermissions: ['approval:instance:read'],
873
- authorizationNotes: [],
874
- securitySchemes: ['callerAuth'],
875
- pathParams: {
876
- id: {
877
- required: true,
878
- type: 'string',
879
- format: 'uuid',
880
- },
881
- },
882
- queryParams: {},
883
- responseSchemas: {
884
- '200': 'InstanceDetailResponse',
885
- '401': 'UnauthorizedCaller',
886
- '404': 'ResourceNotFound',
887
- '429': 'TooManyRequests',
888
- '500': 'InternalServerError',
889
- },
890
- },
891
- listPendingApprovalItems: {
892
- method: 'GET',
893
- path: '/v1/approval/pending',
894
- tags: ['Approval Instance'],
895
- summary: 'List pending approvals for current actor',
896
- requiredPermissions: ['approval:instance:pending'],
897
- authorizationNotes: [],
898
- securitySchemes: ['callerAuth'],
899
- pathParams: {},
900
- queryParams: {
901
- page: {
902
- required: false,
903
- type: 'integer',
904
- minimum: 1,
905
- },
906
- limit: {
907
- required: false,
908
- type: 'integer',
909
- minimum: 1,
910
- maximum: 100,
911
- },
912
- sort: {
913
- required: false,
914
- type: 'string',
915
- enumValues: ['created_at', 'updated_at', 'table_name', 'record_id', 'current_stage'],
916
- },
917
- order: {
918
- required: false,
919
- type: 'string',
920
- enumValues: ['asc', 'desc'],
921
- },
922
- },
923
- responseSchemas: {
924
- '200': 'PendingListResponse',
925
- '401': 'UnauthorizedCaller',
926
- '429': 'TooManyRequests',
927
- '500': 'InternalServerError',
928
- },
929
- },
930
- rejectApprovalStep: {
931
- method: 'POST',
932
- path: '/v1/approval/reject',
933
- tags: ['Approval Instance'],
934
- summary: 'Reject current approval step',
935
- requiredPermissions: ['approval:instance:reject'],
936
- authorizationNotes: [],
937
- securitySchemes: ['callerAuth'],
938
- pathParams: {},
939
- queryParams: {},
940
- bodySchema: 'RejectRequest',
941
- responseSchemas: {
942
- '200': 'WorkflowActionResponse',
943
- '401': 'UnauthorizedCaller',
944
- '422': 'BusinessRuleViolation',
945
- '429': 'TooManyRequests',
946
- '500': 'InternalServerError',
947
- },
948
- },
949
- submitApprovalWorkflow: {
950
- method: 'POST',
951
- path: '/v1/approval/submit',
952
- tags: ['Approval Instance'],
953
- summary: 'Submit record into approval workflow',
954
- description: 'Resolves one approval definition, chooses the valid transition from current status, and creates a pending approval instance with generated steps.',
955
- requiredPermissions: ['approval:instance:submit'],
956
- authorizationNotes: [],
957
- securitySchemes: ['callerAuth'],
958
- pathParams: {},
959
- queryParams: {},
960
- bodySchema: 'SubmitRequest',
961
- responseSchemas: {
962
- '201': 'WorkflowActionResponse',
963
- '401': 'UnauthorizedCaller',
964
- '422': 'BusinessRuleViolation',
965
- '429': 'TooManyRequests',
966
- '500': 'InternalServerError',
967
- },
968
- },
969
- };
699
+ function createApprovalActor(http, rootUrl, params, context) {
700
+ const rb = new RequestBuilder(rootUrl, createApprovalActor.PATH, 'post');
701
+ if (params) {
702
+ rb.body(params.body, 'application/json');
703
+ }
704
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
705
+ }
706
+ createApprovalActor.PATH = '/v1/approval/actor';
707
+
708
+ /* eslint-disable */
709
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
710
+ function deleteApprovalActorByID(http, rootUrl, params, context) {
711
+ const rb = new RequestBuilder(rootUrl, deleteApprovalActorByID.PATH, 'delete');
712
+ if (params) {
713
+ rb.path('id', params.id);
714
+ }
715
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
716
+ }
717
+ deleteApprovalActorByID.PATH = '/v1/approval/actor/{id}';
718
+
719
+ /* eslint-disable */
720
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
721
+ function getApprovalActorByID(http, rootUrl, params, context) {
722
+ const rb = new RequestBuilder(rootUrl, getApprovalActorByID.PATH, 'get');
723
+ if (params) {
724
+ rb.path('id', params.id);
725
+ }
726
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
727
+ }
728
+ getApprovalActorByID.PATH = '/v1/approval/actor/{id}';
729
+
730
+ /* eslint-disable */
731
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
732
+ function listApprovalActors(http, rootUrl, params, context) {
733
+ const rb = new RequestBuilder(rootUrl, listApprovalActors.PATH, 'get');
734
+ if (params) {
735
+ rb.query('page', params.page);
736
+ rb.query('limit', params.limit);
737
+ rb.query('sort', params.sort);
738
+ rb.query('order', params.order);
739
+ rb.query('stage_id', params.stage_id);
740
+ }
741
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
742
+ }
743
+ listApprovalActors.PATH = '/v1/approval/actor';
744
+
745
+ /* eslint-disable */
746
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
747
+ function patchApprovalActorByID(http, rootUrl, params, context) {
748
+ const rb = new RequestBuilder(rootUrl, patchApprovalActorByID.PATH, 'patch');
749
+ if (params) {
750
+ rb.path('id', params.id);
751
+ rb.body(params.body, 'application/json');
752
+ }
753
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
754
+ }
755
+ patchApprovalActorByID.PATH = '/v1/approval/actor/{id}';
756
+
757
+ /* eslint-disable */
758
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
759
+ class ApprovalActorService extends BaseService {
760
+ /** Create approval actor (POST /v1/approval/actor) */
761
+ createApprovalActor$Response(params, context) {
762
+ return createApprovalActor(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
763
+ }
764
+ /** Create approval actor (POST /v1/approval/actor) */
765
+ createApprovalActor(params, context) {
766
+ return this.createApprovalActor$Response(params, context).pipe(map((r) => r.body));
767
+ }
768
+ /** Delete approval actor (DELETE /v1/approval/actor/{id}) */
769
+ deleteApprovalActorByID$Response(params, context) {
770
+ return deleteApprovalActorByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
771
+ }
772
+ /** Delete approval actor (DELETE /v1/approval/actor/{id}) */
773
+ deleteApprovalActorByID(params, context) {
774
+ return this.deleteApprovalActorByID$Response(params, context).pipe(map((r) => r.body));
775
+ }
776
+ /** Get approval actor detail (GET /v1/approval/actor/{id}) */
777
+ getApprovalActorByID$Response(params, context) {
778
+ return getApprovalActorByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
779
+ }
780
+ /** Get approval actor detail (GET /v1/approval/actor/{id}) */
781
+ getApprovalActorByID(params, context) {
782
+ return this.getApprovalActorByID$Response(params, context).pipe(map((r) => r.body));
783
+ }
784
+ /** List approval actors (GET /v1/approval/actor) */
785
+ listApprovalActors$Response(params, context) {
786
+ return listApprovalActors(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
787
+ }
788
+ /** List approval actors (GET /v1/approval/actor) */
789
+ listApprovalActors(params, context) {
790
+ return this.listApprovalActors$Response(params, context).pipe(map((r) => r.body));
791
+ }
792
+ /** Update approval actor (PATCH /v1/approval/actor/{id}) */
793
+ patchApprovalActorByID$Response(params, context) {
794
+ return patchApprovalActorByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
795
+ }
796
+ /** Update approval actor (PATCH /v1/approval/actor/{id}) */
797
+ patchApprovalActorByID(params, context) {
798
+ return this.patchApprovalActorByID$Response(params, context).pipe(map((r) => r.body));
799
+ }
800
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ApprovalActorService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
801
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ApprovalActorService, providedIn: 'root' });
802
+ }
803
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ApprovalActorService, decorators: [{
804
+ type: Injectable,
805
+ args: [{ providedIn: 'root' }]
806
+ }] });
807
+
808
+ /* eslint-disable */
809
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
810
+ function createApprovalDefinition(http, rootUrl, params, context) {
811
+ const rb = new RequestBuilder(rootUrl, createApprovalDefinition.PATH, 'post');
812
+ if (params) {
813
+ rb.body(params.body, 'application/json');
814
+ }
815
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
816
+ }
817
+ createApprovalDefinition.PATH = '/v1/approval/definition';
818
+
819
+ /* eslint-disable */
820
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
821
+ function deleteApprovalDefinitionByID(http, rootUrl, params, context) {
822
+ const rb = new RequestBuilder(rootUrl, deleteApprovalDefinitionByID.PATH, 'delete');
823
+ if (params) {
824
+ rb.path('id', params.id);
825
+ }
826
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
827
+ }
828
+ deleteApprovalDefinitionByID.PATH = '/v1/approval/definition/{id}';
829
+
830
+ /* eslint-disable */
831
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
832
+ function getApprovalDefinitionByID(http, rootUrl, params, context) {
833
+ const rb = new RequestBuilder(rootUrl, getApprovalDefinitionByID.PATH, 'get');
834
+ if (params) {
835
+ rb.path('id', params.id);
836
+ }
837
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
838
+ }
839
+ getApprovalDefinitionByID.PATH = '/v1/approval/definition/{id}';
840
+
841
+ /* eslint-disable */
842
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
843
+ function listApprovalDefinitions(http, rootUrl, params, context) {
844
+ const rb = new RequestBuilder(rootUrl, listApprovalDefinitions.PATH, 'get');
845
+ if (params) {
846
+ rb.query('page', params.page);
847
+ rb.query('limit', params.limit);
848
+ rb.query('sort', params.sort);
849
+ rb.query('order', params.order);
850
+ rb.query('search', params.search);
851
+ }
852
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
853
+ }
854
+ listApprovalDefinitions.PATH = '/v1/approval/definition';
855
+
856
+ /* eslint-disable */
857
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
858
+ function patchApprovalDefinitionByID(http, rootUrl, params, context) {
859
+ const rb = new RequestBuilder(rootUrl, patchApprovalDefinitionByID.PATH, 'patch');
860
+ if (params) {
861
+ rb.path('id', params.id);
862
+ rb.body(params.body, 'application/json');
863
+ }
864
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
865
+ }
866
+ patchApprovalDefinitionByID.PATH = '/v1/approval/definition/{id}';
867
+
868
+ /* eslint-disable */
869
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
870
+ class ApprovalDefinitionService extends BaseService {
871
+ /** Create approval definition (POST /v1/approval/definition) */
872
+ createApprovalDefinition$Response(params, context) {
873
+ return createApprovalDefinition(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
874
+ }
875
+ /** Create approval definition (POST /v1/approval/definition) */
876
+ createApprovalDefinition(params, context) {
877
+ return this.createApprovalDefinition$Response(params, context).pipe(map((r) => r.body));
878
+ }
879
+ /** Delete approval definition (DELETE /v1/approval/definition/{id}) */
880
+ deleteApprovalDefinitionByID$Response(params, context) {
881
+ return deleteApprovalDefinitionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
882
+ }
883
+ /** Delete approval definition (DELETE /v1/approval/definition/{id}) */
884
+ deleteApprovalDefinitionByID(params, context) {
885
+ return this.deleteApprovalDefinitionByID$Response(params, context).pipe(map((r) => r.body));
886
+ }
887
+ /** Get approval definition detail (GET /v1/approval/definition/{id}) */
888
+ getApprovalDefinitionByID$Response(params, context) {
889
+ return getApprovalDefinitionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
890
+ }
891
+ /** Get approval definition detail (GET /v1/approval/definition/{id}) */
892
+ getApprovalDefinitionByID(params, context) {
893
+ return this.getApprovalDefinitionByID$Response(params, context).pipe(map((r) => r.body));
894
+ }
895
+ /** List approval definitions (GET /v1/approval/definition) */
896
+ listApprovalDefinitions$Response(params, context) {
897
+ return listApprovalDefinitions(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
898
+ }
899
+ /** List approval definitions (GET /v1/approval/definition) */
900
+ listApprovalDefinitions(params, context) {
901
+ return this.listApprovalDefinitions$Response(params, context).pipe(map((r) => r.body));
902
+ }
903
+ /** Update approval definition (PATCH /v1/approval/definition/{id}) */
904
+ patchApprovalDefinitionByID$Response(params, context) {
905
+ return patchApprovalDefinitionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
906
+ }
907
+ /** Update approval definition (PATCH /v1/approval/definition/{id}) */
908
+ patchApprovalDefinitionByID(params, context) {
909
+ return this.patchApprovalDefinitionByID$Response(params, context).pipe(map((r) => r.body));
910
+ }
911
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ApprovalDefinitionService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
912
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ApprovalDefinitionService, providedIn: 'root' });
913
+ }
914
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ApprovalDefinitionService, decorators: [{
915
+ type: Injectable,
916
+ args: [{ providedIn: 'root' }]
917
+ }] });
918
+
919
+ /* eslint-disable */
920
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
921
+ function approveApprovalStep(http, rootUrl, params, context) {
922
+ const rb = new RequestBuilder(rootUrl, approveApprovalStep.PATH, 'post');
923
+ if (params) {
924
+ rb.body(params.body, 'application/json');
925
+ }
926
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
927
+ }
928
+ approveApprovalStep.PATH = '/v1/approval/approve';
929
+
930
+ /* eslint-disable */
931
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
932
+ function getApprovalInstanceByID(http, rootUrl, params, context) {
933
+ const rb = new RequestBuilder(rootUrl, getApprovalInstanceByID.PATH, 'get');
934
+ if (params) {
935
+ rb.path('id', params.id);
936
+ }
937
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
938
+ }
939
+ getApprovalInstanceByID.PATH = '/v1/approval/instance/{id}';
940
+
941
+ /* eslint-disable */
942
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
943
+ function listPendingApprovalItems(http, rootUrl, params, context) {
944
+ const rb = new RequestBuilder(rootUrl, listPendingApprovalItems.PATH, 'get');
945
+ if (params) {
946
+ rb.query('page', params.page);
947
+ rb.query('limit', params.limit);
948
+ rb.query('sort', params.sort);
949
+ rb.query('order', params.order);
950
+ }
951
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
952
+ }
953
+ listPendingApprovalItems.PATH = '/v1/approval/pending';
954
+
955
+ /* eslint-disable */
956
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
957
+ function rejectApprovalStep(http, rootUrl, params, context) {
958
+ const rb = new RequestBuilder(rootUrl, rejectApprovalStep.PATH, 'post');
959
+ if (params) {
960
+ rb.body(params.body, 'application/json');
961
+ }
962
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
963
+ }
964
+ rejectApprovalStep.PATH = '/v1/approval/reject';
965
+
966
+ /* eslint-disable */
967
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
968
+ function submitApprovalWorkflow(http, rootUrl, params, context) {
969
+ const rb = new RequestBuilder(rootUrl, submitApprovalWorkflow.PATH, 'post');
970
+ if (params) {
971
+ rb.body(params.body, 'application/json');
972
+ }
973
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
974
+ }
975
+ submitApprovalWorkflow.PATH = '/v1/approval/submit';
976
+
977
+ /* eslint-disable */
978
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
979
+ class ApprovalInstanceService extends BaseService {
980
+ /** Approve current approval step (POST /v1/approval/approve) */
981
+ approveApprovalStep$Response(params, context) {
982
+ return approveApprovalStep(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
983
+ }
984
+ /** Approve current approval step (POST /v1/approval/approve) */
985
+ approveApprovalStep(params, context) {
986
+ return this.approveApprovalStep$Response(params, context).pipe(map((r) => r.body));
987
+ }
988
+ /** Get approval instance detail (GET /v1/approval/instance/{id}) */
989
+ getApprovalInstanceByID$Response(params, context) {
990
+ return getApprovalInstanceByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
991
+ }
992
+ /** Get approval instance detail (GET /v1/approval/instance/{id}) */
993
+ getApprovalInstanceByID(params, context) {
994
+ return this.getApprovalInstanceByID$Response(params, context).pipe(map((r) => r.body));
995
+ }
996
+ /** List pending approvals for current actor (GET /v1/approval/pending) */
997
+ listPendingApprovalItems$Response(params, context) {
998
+ return listPendingApprovalItems(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
999
+ }
1000
+ /** List pending approvals for current actor (GET /v1/approval/pending) */
1001
+ listPendingApprovalItems(params, context) {
1002
+ return this.listPendingApprovalItems$Response(params, context).pipe(map((r) => r.body));
1003
+ }
1004
+ /** Reject current approval step (POST /v1/approval/reject) */
1005
+ rejectApprovalStep$Response(params, context) {
1006
+ return rejectApprovalStep(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1007
+ }
1008
+ /** Reject current approval step (POST /v1/approval/reject) */
1009
+ rejectApprovalStep(params, context) {
1010
+ return this.rejectApprovalStep$Response(params, context).pipe(map((r) => r.body));
1011
+ }
1012
+ /** Submit record into approval workflow (POST /v1/approval/submit) */
1013
+ submitApprovalWorkflow$Response(params, context) {
1014
+ return submitApprovalWorkflow(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1015
+ }
1016
+ /** Submit record into approval workflow (POST /v1/approval/submit) */
1017
+ submitApprovalWorkflow(params, context) {
1018
+ return this.submitApprovalWorkflow$Response(params, context).pipe(map((r) => r.body));
1019
+ }
1020
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ApprovalInstanceService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1021
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ApprovalInstanceService, providedIn: 'root' });
1022
+ }
1023
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ApprovalInstanceService, decorators: [{
1024
+ type: Injectable,
1025
+ args: [{ providedIn: 'root' }]
1026
+ }] });
970
1027
 
971
1028
  /* eslint-disable */
972
1029
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
973
- const approvalStageOperationRules = {
974
- createApprovalStage: {
975
- method: 'POST',
976
- path: '/v1/approval/stage',
977
- tags: ['Approval Stage'],
978
- summary: 'Create approval stage',
979
- requiredPermissions: ['approval:stage:create'],
980
- authorizationNotes: [],
981
- securitySchemes: ['callerAuth'],
982
- pathParams: {},
983
- queryParams: {},
984
- bodySchema: 'CreateStageRequest',
985
- responseSchemas: {
986
- '201': 'StageResponse',
987
- '401': 'UnauthorizedCaller',
988
- '429': 'TooManyRequests',
989
- '500': 'InternalServerError',
990
- },
991
- },
992
- deleteApprovalStageByID: {
993
- method: 'DELETE',
994
- path: '/v1/approval/stage/{id}',
995
- tags: ['Approval Stage'],
996
- summary: 'Delete approval stage',
997
- requiredPermissions: ['approval:stage:delete'],
998
- authorizationNotes: [],
999
- securitySchemes: ['callerAuth'],
1000
- pathParams: {
1001
- id: {
1002
- required: true,
1003
- type: 'string',
1004
- format: 'uuid',
1005
- },
1006
- },
1007
- queryParams: {},
1008
- responseSchemas: {
1009
- '200': 'ApprovalMutationAckResponse',
1010
- '401': 'UnauthorizedCaller',
1011
- '404': 'ResourceNotFound',
1012
- '429': 'TooManyRequests',
1013
- '500': 'InternalServerError',
1014
- },
1015
- },
1016
- getApprovalStageByID: {
1017
- method: 'GET',
1018
- path: '/v1/approval/stage/{id}',
1019
- tags: ['Approval Stage'],
1020
- summary: 'Get approval stage detail',
1021
- requiredPermissions: ['approval:stage:read'],
1022
- authorizationNotes: [],
1023
- securitySchemes: ['callerAuth'],
1024
- pathParams: {
1025
- id: {
1026
- required: true,
1027
- type: 'string',
1028
- format: 'uuid',
1029
- },
1030
- },
1031
- queryParams: {},
1032
- responseSchemas: {
1033
- '200': 'StageDetailResponse',
1034
- '401': 'UnauthorizedCaller',
1035
- '404': 'ResourceNotFound',
1036
- '429': 'TooManyRequests',
1037
- '500': 'InternalServerError',
1038
- },
1039
- },
1040
- listApprovalStages: {
1041
- method: 'GET',
1042
- path: '/v1/approval/stage',
1043
- tags: ['Approval Stage'],
1044
- summary: 'List approval stages',
1045
- requiredPermissions: ['approval:stage:list'],
1046
- authorizationNotes: [],
1047
- securitySchemes: ['callerAuth'],
1048
- pathParams: {},
1049
- queryParams: {
1050
- page: {
1051
- required: false,
1052
- type: 'integer',
1053
- minimum: 1,
1054
- },
1055
- limit: {
1056
- required: false,
1057
- type: 'integer',
1058
- minimum: 1,
1059
- maximum: 100,
1060
- },
1061
- sort: {
1062
- required: false,
1063
- type: 'string',
1064
- enumValues: ['created_at', 'level', 'name', 'updated_at'],
1065
- },
1066
- order: {
1067
- required: false,
1068
- type: 'string',
1069
- enumValues: ['asc', 'desc'],
1070
- },
1071
- definition_id: {
1072
- required: false,
1073
- type: 'string',
1074
- format: 'uuid',
1075
- },
1076
- },
1077
- responseSchemas: {
1078
- '200': 'StageListResponse',
1079
- '401': 'UnauthorizedCaller',
1080
- '429': 'TooManyRequests',
1081
- '500': 'InternalServerError',
1082
- },
1083
- },
1084
- patchApprovalStageByID: {
1085
- method: 'PATCH',
1086
- path: '/v1/approval/stage/{id}',
1087
- tags: ['Approval Stage'],
1088
- summary: 'Update approval stage',
1089
- requiredPermissions: ['approval:stage:update'],
1090
- authorizationNotes: [],
1091
- securitySchemes: ['callerAuth'],
1092
- pathParams: {
1093
- id: {
1094
- required: true,
1095
- type: 'string',
1096
- format: 'uuid',
1097
- },
1098
- },
1099
- queryParams: {},
1100
- bodySchema: 'UpdateStageRequest',
1101
- responseSchemas: {
1102
- '200': 'StageResponse',
1103
- '401': 'UnauthorizedCaller',
1104
- '404': 'ResourceNotFound',
1105
- '429': 'TooManyRequests',
1106
- '500': 'InternalServerError',
1107
- },
1108
- },
1109
- };
1030
+ function createApprovalStage(http, rootUrl, params, context) {
1031
+ const rb = new RequestBuilder(rootUrl, createApprovalStage.PATH, 'post');
1032
+ if (params) {
1033
+ rb.body(params.body, 'application/json');
1034
+ }
1035
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1036
+ }
1037
+ createApprovalStage.PATH = '/v1/approval/stage';
1038
+
1039
+ /* eslint-disable */
1040
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1041
+ function deleteApprovalStageByID(http, rootUrl, params, context) {
1042
+ const rb = new RequestBuilder(rootUrl, deleteApprovalStageByID.PATH, 'delete');
1043
+ if (params) {
1044
+ rb.path('id', params.id);
1045
+ }
1046
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1047
+ }
1048
+ deleteApprovalStageByID.PATH = '/v1/approval/stage/{id}';
1049
+
1050
+ /* eslint-disable */
1051
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1052
+ function getApprovalStageByID(http, rootUrl, params, context) {
1053
+ const rb = new RequestBuilder(rootUrl, getApprovalStageByID.PATH, 'get');
1054
+ if (params) {
1055
+ rb.path('id', params.id);
1056
+ }
1057
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1058
+ }
1059
+ getApprovalStageByID.PATH = '/v1/approval/stage/{id}';
1060
+
1061
+ /* eslint-disable */
1062
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1063
+ function listApprovalStages(http, rootUrl, params, context) {
1064
+ const rb = new RequestBuilder(rootUrl, listApprovalStages.PATH, 'get');
1065
+ if (params) {
1066
+ rb.query('page', params.page);
1067
+ rb.query('limit', params.limit);
1068
+ rb.query('sort', params.sort);
1069
+ rb.query('order', params.order);
1070
+ rb.query('definition_id', params.definition_id);
1071
+ }
1072
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1073
+ }
1074
+ listApprovalStages.PATH = '/v1/approval/stage';
1075
+
1076
+ /* eslint-disable */
1077
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1078
+ function patchApprovalStageByID(http, rootUrl, params, context) {
1079
+ const rb = new RequestBuilder(rootUrl, patchApprovalStageByID.PATH, 'patch');
1080
+ if (params) {
1081
+ rb.path('id', params.id);
1082
+ rb.body(params.body, 'application/json');
1083
+ }
1084
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1085
+ }
1086
+ patchApprovalStageByID.PATH = '/v1/approval/stage/{id}';
1087
+
1088
+ /* eslint-disable */
1089
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1090
+ class ApprovalStageService extends BaseService {
1091
+ /** Create approval stage (POST /v1/approval/stage) */
1092
+ createApprovalStage$Response(params, context) {
1093
+ return createApprovalStage(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1094
+ }
1095
+ /** Create approval stage (POST /v1/approval/stage) */
1096
+ createApprovalStage(params, context) {
1097
+ return this.createApprovalStage$Response(params, context).pipe(map((r) => r.body));
1098
+ }
1099
+ /** Delete approval stage (DELETE /v1/approval/stage/{id}) */
1100
+ deleteApprovalStageByID$Response(params, context) {
1101
+ return deleteApprovalStageByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1102
+ }
1103
+ /** Delete approval stage (DELETE /v1/approval/stage/{id}) */
1104
+ deleteApprovalStageByID(params, context) {
1105
+ return this.deleteApprovalStageByID$Response(params, context).pipe(map((r) => r.body));
1106
+ }
1107
+ /** Get approval stage detail (GET /v1/approval/stage/{id}) */
1108
+ getApprovalStageByID$Response(params, context) {
1109
+ return getApprovalStageByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1110
+ }
1111
+ /** Get approval stage detail (GET /v1/approval/stage/{id}) */
1112
+ getApprovalStageByID(params, context) {
1113
+ return this.getApprovalStageByID$Response(params, context).pipe(map((r) => r.body));
1114
+ }
1115
+ /** List approval stages (GET /v1/approval/stage) */
1116
+ listApprovalStages$Response(params, context) {
1117
+ return listApprovalStages(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1118
+ }
1119
+ /** List approval stages (GET /v1/approval/stage) */
1120
+ listApprovalStages(params, context) {
1121
+ return this.listApprovalStages$Response(params, context).pipe(map((r) => r.body));
1122
+ }
1123
+ /** Update approval stage (PATCH /v1/approval/stage/{id}) */
1124
+ patchApprovalStageByID$Response(params, context) {
1125
+ return patchApprovalStageByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1126
+ }
1127
+ /** Update approval stage (PATCH /v1/approval/stage/{id}) */
1128
+ patchApprovalStageByID(params, context) {
1129
+ return this.patchApprovalStageByID$Response(params, context).pipe(map((r) => r.body));
1130
+ }
1131
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ApprovalStageService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1132
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ApprovalStageService, providedIn: 'root' });
1133
+ }
1134
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ApprovalStageService, decorators: [{
1135
+ type: Injectable,
1136
+ args: [{ providedIn: 'root' }]
1137
+ }] });
1110
1138
 
1111
1139
  /* eslint-disable */
1112
1140
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1113
- const approvalTransitionOperationRules = {
1114
- createApprovalTransition: {
1115
- method: 'POST',
1116
- path: '/v1/approval/transition',
1117
- tags: ['Approval Transition'],
1118
- summary: 'Create approval transition',
1119
- requiredPermissions: ['approval:transition:create'],
1120
- authorizationNotes: [],
1121
- securitySchemes: ['callerAuth'],
1122
- pathParams: {},
1123
- queryParams: {},
1124
- bodySchema: 'CreateTransitionRequest',
1125
- responseSchemas: {
1126
- '201': 'TransitionResponse',
1127
- '401': 'UnauthorizedCaller',
1128
- '429': 'TooManyRequests',
1129
- '500': 'InternalServerError',
1130
- },
1131
- },
1132
- deleteApprovalTransitionByID: {
1133
- method: 'DELETE',
1134
- path: '/v1/approval/transition/{id}',
1135
- tags: ['Approval Transition'],
1136
- summary: 'Delete approval transition',
1137
- requiredPermissions: ['approval:transition:delete'],
1138
- authorizationNotes: [],
1139
- securitySchemes: ['callerAuth'],
1140
- pathParams: {
1141
- id: {
1142
- required: true,
1143
- type: 'string',
1144
- format: 'uuid',
1145
- },
1146
- },
1147
- queryParams: {},
1148
- responseSchemas: {
1149
- '200': 'ApprovalMutationAckResponse',
1150
- '401': 'UnauthorizedCaller',
1151
- '404': 'ResourceNotFound',
1152
- '429': 'TooManyRequests',
1153
- '500': 'InternalServerError',
1154
- },
1155
- },
1156
- getApprovalTransitionByID: {
1157
- method: 'GET',
1158
- path: '/v1/approval/transition/{id}',
1159
- tags: ['Approval Transition'],
1160
- summary: 'Get approval transition detail',
1161
- requiredPermissions: ['approval:transition:read'],
1162
- authorizationNotes: [],
1163
- securitySchemes: ['callerAuth'],
1164
- pathParams: {
1165
- id: {
1166
- required: true,
1167
- type: 'string',
1168
- format: 'uuid',
1169
- },
1170
- },
1171
- queryParams: {},
1172
- responseSchemas: {
1173
- '200': 'TransitionResponse',
1174
- '401': 'UnauthorizedCaller',
1175
- '404': 'ResourceNotFound',
1176
- '429': 'TooManyRequests',
1177
- '500': 'InternalServerError',
1178
- },
1179
- },
1180
- listApprovalTransitions: {
1181
- method: 'GET',
1182
- path: '/v1/approval/transition',
1183
- tags: ['Approval Transition'],
1184
- summary: 'List approval transitions',
1185
- requiredPermissions: ['approval:transition:list'],
1186
- authorizationNotes: [],
1187
- securitySchemes: ['callerAuth'],
1188
- pathParams: {},
1189
- queryParams: {
1190
- page: {
1191
- required: false,
1192
- type: 'integer',
1193
- minimum: 1,
1194
- },
1195
- limit: {
1196
- required: false,
1197
- type: 'integer',
1198
- minimum: 1,
1199
- maximum: 100,
1200
- },
1201
- sort: {
1202
- required: false,
1203
- type: 'string',
1204
- enumValues: ['created_at', 'from_status', 'to_status', 'updated_at'],
1205
- },
1206
- order: {
1207
- required: false,
1208
- type: 'string',
1209
- enumValues: ['asc', 'desc'],
1210
- },
1211
- definition_id: {
1212
- required: false,
1213
- type: 'string',
1214
- format: 'uuid',
1215
- },
1216
- },
1217
- responseSchemas: {
1218
- '200': 'TransitionListResponse',
1219
- '401': 'UnauthorizedCaller',
1220
- '429': 'TooManyRequests',
1221
- '500': 'InternalServerError',
1222
- },
1223
- },
1224
- patchApprovalTransitionByID: {
1225
- method: 'PATCH',
1226
- path: '/v1/approval/transition/{id}',
1227
- tags: ['Approval Transition'],
1228
- summary: 'Update approval transition',
1229
- requiredPermissions: ['approval:transition:update'],
1230
- authorizationNotes: [],
1231
- securitySchemes: ['callerAuth'],
1232
- pathParams: {
1233
- id: {
1234
- required: true,
1235
- type: 'string',
1236
- format: 'uuid',
1237
- },
1238
- },
1239
- queryParams: {},
1240
- bodySchema: 'UpdateTransitionRequest',
1241
- responseSchemas: {
1242
- '200': 'TransitionResponse',
1243
- '401': 'UnauthorizedCaller',
1244
- '404': 'ResourceNotFound',
1245
- '429': 'TooManyRequests',
1246
- '500': 'InternalServerError',
1247
- },
1248
- },
1249
- };
1141
+ function createApprovalTransition(http, rootUrl, params, context) {
1142
+ const rb = new RequestBuilder(rootUrl, createApprovalTransition.PATH, 'post');
1143
+ if (params) {
1144
+ rb.body(params.body, 'application/json');
1145
+ }
1146
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1147
+ }
1148
+ createApprovalTransition.PATH = '/v1/approval/transition';
1149
+
1150
+ /* eslint-disable */
1151
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1152
+ function deleteApprovalTransitionByID(http, rootUrl, params, context) {
1153
+ const rb = new RequestBuilder(rootUrl, deleteApprovalTransitionByID.PATH, 'delete');
1154
+ if (params) {
1155
+ rb.path('id', params.id);
1156
+ }
1157
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1158
+ }
1159
+ deleteApprovalTransitionByID.PATH = '/v1/approval/transition/{id}';
1160
+
1161
+ /* eslint-disable */
1162
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1163
+ function getApprovalTransitionByID(http, rootUrl, params, context) {
1164
+ const rb = new RequestBuilder(rootUrl, getApprovalTransitionByID.PATH, 'get');
1165
+ if (params) {
1166
+ rb.path('id', params.id);
1167
+ }
1168
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1169
+ }
1170
+ getApprovalTransitionByID.PATH = '/v1/approval/transition/{id}';
1171
+
1172
+ /* eslint-disable */
1173
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1174
+ function listApprovalTransitions(http, rootUrl, params, context) {
1175
+ const rb = new RequestBuilder(rootUrl, listApprovalTransitions.PATH, 'get');
1176
+ if (params) {
1177
+ rb.query('page', params.page);
1178
+ rb.query('limit', params.limit);
1179
+ rb.query('sort', params.sort);
1180
+ rb.query('order', params.order);
1181
+ rb.query('definition_id', params.definition_id);
1182
+ }
1183
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1184
+ }
1185
+ listApprovalTransitions.PATH = '/v1/approval/transition';
1186
+
1187
+ /* eslint-disable */
1188
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1189
+ function patchApprovalTransitionByID(http, rootUrl, params, context) {
1190
+ const rb = new RequestBuilder(rootUrl, patchApprovalTransitionByID.PATH, 'patch');
1191
+ if (params) {
1192
+ rb.path('id', params.id);
1193
+ rb.body(params.body, 'application/json');
1194
+ }
1195
+ return http.request(rb.build({ responseType: 'json', accept: 'application/json', context })).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1196
+ }
1197
+ patchApprovalTransitionByID.PATH = '/v1/approval/transition/{id}';
1198
+
1199
+ /* eslint-disable */
1200
+ /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */
1201
+ class ApprovalTransitionService extends BaseService {
1202
+ /** Create approval transition (POST /v1/approval/transition) */
1203
+ createApprovalTransition$Response(params, context) {
1204
+ return createApprovalTransition(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1205
+ }
1206
+ /** Create approval transition (POST /v1/approval/transition) */
1207
+ createApprovalTransition(params, context) {
1208
+ return this.createApprovalTransition$Response(params, context).pipe(map((r) => r.body));
1209
+ }
1210
+ /** Delete approval transition (DELETE /v1/approval/transition/{id}) */
1211
+ deleteApprovalTransitionByID$Response(params, context) {
1212
+ return deleteApprovalTransitionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1213
+ }
1214
+ /** Delete approval transition (DELETE /v1/approval/transition/{id}) */
1215
+ deleteApprovalTransitionByID(params, context) {
1216
+ return this.deleteApprovalTransitionByID$Response(params, context).pipe(map((r) => r.body));
1217
+ }
1218
+ /** Get approval transition detail (GET /v1/approval/transition/{id}) */
1219
+ getApprovalTransitionByID$Response(params, context) {
1220
+ return getApprovalTransitionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1221
+ }
1222
+ /** Get approval transition detail (GET /v1/approval/transition/{id}) */
1223
+ getApprovalTransitionByID(params, context) {
1224
+ return this.getApprovalTransitionByID$Response(params, context).pipe(map((r) => r.body));
1225
+ }
1226
+ /** List approval transitions (GET /v1/approval/transition) */
1227
+ listApprovalTransitions$Response(params, context) {
1228
+ return listApprovalTransitions(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1229
+ }
1230
+ /** List approval transitions (GET /v1/approval/transition) */
1231
+ listApprovalTransitions(params, context) {
1232
+ return this.listApprovalTransitions$Response(params, context).pipe(map((r) => r.body));
1233
+ }
1234
+ /** Update approval transition (PATCH /v1/approval/transition/{id}) */
1235
+ patchApprovalTransitionByID$Response(params, context) {
1236
+ return patchApprovalTransitionByID(this.http, this.rootUrl, params, context).pipe(filter((r) => r instanceof HttpResponse), map((r) => r));
1237
+ }
1238
+ /** Update approval transition (PATCH /v1/approval/transition/{id}) */
1239
+ patchApprovalTransitionByID(params, context) {
1240
+ return this.patchApprovalTransitionByID$Response(params, context).pipe(map((r) => r.body));
1241
+ }
1242
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ApprovalTransitionService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
1243
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ApprovalTransitionService, providedIn: 'root' });
1244
+ }
1245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.13", ngImport: i0, type: ApprovalTransitionService, decorators: [{
1246
+ type: Injectable,
1247
+ args: [{ providedIn: 'root' }]
1248
+ }] });
1250
1249
 
1251
1250
  /* eslint-disable */
1252
1251
  /* Auto-generated by @ojiepermana/angular/generator/api. DO NOT EDIT. */