@dakkitor/api-contracts 1.1.29 → 1.1.30

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.
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Project: Internal Recruitment Platform API
3
+ * File: abilities.contract.ts
4
+ *
5
+ * Description: Exports CASL ability definitions for each user role.
6
+ * These are the single source of truth for role-based permissions.
7
+ */
8
+ export interface AbilityRule {
9
+ action: string;
10
+ subject: string;
11
+ fields?: string[];
12
+ conditions?: Record<string, unknown>;
13
+ inverted?: boolean;
14
+ }
15
+ export declare const AdminAbilities: AbilityRule[];
16
+ export declare const FirstAgentAbilities: AbilityRule[];
17
+ export declare const SecondAgentAbilities: AbilityRule[];
18
+ export declare const RoleAbilities: {
19
+ readonly ADMIN: AbilityRule[];
20
+ readonly FIRST_AGENT: AbilityRule[];
21
+ readonly SECOND_AGENT: AbilityRule[];
22
+ };
23
+ export type RoleAbilitiesType = typeof RoleAbilities;
24
+ //# sourceMappingURL=abilities.contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"abilities.contract.d.ts","sourceRoot":"","sources":["../../contracts/abilities/abilities.contract.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,cAAc,EAAE,WAAW,EAAoC,CAAC;AAC7E,eAAO,MAAM,mBAAmB,EAAE,WAAW,EACP,CAAC;AACvC,eAAO,MAAM,oBAAoB,EAAE,WAAW,EACP,CAAC;AAExC,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,OAAO,aAAa,CAAC"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ /**
3
+ * Project: Internal Recruitment Platform API
4
+ * File: abilities.contract.ts
5
+ *
6
+ * Description: Exports CASL ability definitions for each user role.
7
+ * These are the single source of truth for role-based permissions.
8
+ */
9
+ var __importDefault = (this && this.__importDefault) || function (mod) {
10
+ return (mod && mod.__esModule) ? mod : { "default": mod };
11
+ };
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.RoleAbilities = exports.SecondAgentAbilities = exports.FirstAgentAbilities = exports.AdminAbilities = void 0;
14
+ const admin_abilities_json_1 = __importDefault(require("./admin.abilities.json"));
15
+ const first_agent_abilities_json_1 = __importDefault(require("./first-agent.abilities.json"));
16
+ const second_agent_abilities_json_1 = __importDefault(require("./second-agent.abilities.json"));
17
+ exports.AdminAbilities = admin_abilities_json_1.default;
18
+ exports.FirstAgentAbilities = first_agent_abilities_json_1.default;
19
+ exports.SecondAgentAbilities = second_agent_abilities_json_1.default;
20
+ exports.RoleAbilities = {
21
+ ADMIN: exports.AdminAbilities,
22
+ FIRST_AGENT: exports.FirstAgentAbilities,
23
+ SECOND_AGENT: exports.SecondAgentAbilities,
24
+ };
@@ -0,0 +1,22 @@
1
+ [
2
+ {
3
+ "action": "manage",
4
+ "subject": "all"
5
+ },
6
+ {
7
+ "action": "update",
8
+ "subject": "User",
9
+ "conditions": {
10
+ "id": "{{ id }}"
11
+ },
12
+ "inverted": true
13
+ },
14
+ {
15
+ "action": "delete",
16
+ "subject": "User",
17
+ "conditions": {
18
+ "id": "{{ id }}"
19
+ },
20
+ "inverted": true
21
+ }
22
+ ]
@@ -0,0 +1,573 @@
1
+ [
2
+ {
3
+ "action": "read",
4
+ "subject": "User",
5
+ "conditions": {
6
+ "roles": {
7
+ "$in": [
8
+ "FIRST_AGENT",
9
+ "SECOND_AGENT"
10
+ ]
11
+ }
12
+ }
13
+ },
14
+ {
15
+ "action": "update",
16
+ "subject": "User",
17
+ "fields": [
18
+ "password"
19
+ ],
20
+ "conditions": {
21
+ "id": "{{ id }}"
22
+ }
23
+ },
24
+ {
25
+ "action": "read",
26
+ "subject": "Qualification"
27
+ },
28
+ {
29
+ "action": "read",
30
+ "subject": "QualificationType"
31
+ },
32
+ {
33
+ "action": "read",
34
+ "subject": "Trade"
35
+ },
36
+ {
37
+ "action": "read",
38
+ "subject": "Company",
39
+ "fields": [
40
+ "id",
41
+ "name",
42
+ "updatedAt",
43
+ "createdAt"
44
+ ]
45
+ },
46
+ {
47
+ "action": "create",
48
+ "subject": "Location",
49
+ "fields": [
50
+ "address",
51
+ "postcode"
52
+ ]
53
+ },
54
+ {
55
+ "action": "update",
56
+ "subject": "Job",
57
+ "fields": [
58
+ "description",
59
+ "location",
60
+ "location.address",
61
+ "location.postcode",
62
+ "pay",
63
+ "pay.*",
64
+ "numberOfPositions",
65
+ "workHours",
66
+ "status",
67
+ "tradeId",
68
+ "jobQualifications",
69
+ "jobQualifications[*].*"
70
+ ]
71
+ },
72
+ {
73
+ "action": "create",
74
+ "subject": "Job"
75
+ },
76
+ {
77
+ "action": "read",
78
+ "subject": "FilterJobSchema",
79
+ "fields": [
80
+ "tradeId",
81
+ "status",
82
+ "postcode",
83
+ "distance",
84
+ "pay",
85
+ "pay.*",
86
+ "createdAt",
87
+ "createdAt.*",
88
+ "sortBy",
89
+ "sortOrder",
90
+ "page",
91
+ "limit"
92
+ ]
93
+ },
94
+ {
95
+ "action": "read",
96
+ "subject": "Job",
97
+ "fields": [
98
+ "id",
99
+ "description",
100
+ "location",
101
+ "location.*",
102
+ "tradeId",
103
+ "pay",
104
+ "pay.*",
105
+ "jobQualifications",
106
+ "jobQualifications[*].*",
107
+ "currentCollaboration",
108
+ "currentCollaboration.company.*",
109
+ "currentCollaboration.client.*",
110
+ "currentCollaboration.userId",
111
+ "numberOfPositions",
112
+ "workHours",
113
+ "status",
114
+ "startDate",
115
+ "endDate",
116
+ "createdAt",
117
+ "updatedAt"
118
+ ],
119
+ "conditions": {
120
+ "currentCollaboration.userId": "{{ id }}"
121
+ }
122
+ },
123
+ {
124
+ "action": "create",
125
+ "subject": "Collaboration",
126
+ "fields": [
127
+ "client",
128
+ "client.id",
129
+ "company",
130
+ "company.id"
131
+ ]
132
+ },
133
+ {
134
+ "action": "read",
135
+ "subject": "Collaboration",
136
+ "fields": [
137
+ "id",
138
+ "company",
139
+ "company.*",
140
+ "client",
141
+ "client.*",
142
+ "userId",
143
+ "status",
144
+ "createdAt",
145
+ "updatedAt"
146
+ ],
147
+ "conditions": {
148
+ "userId": "{{ id }}"
149
+ }
150
+ },
151
+ {
152
+ "action": "update",
153
+ "subject": "Collaboration",
154
+ "fields": [
155
+ "id",
156
+ "company",
157
+ "company.id"
158
+ ],
159
+ "conditions": {
160
+ "userId": "{{ id }}"
161
+ }
162
+ },
163
+ {
164
+ "action": "read",
165
+ "subject": "Client",
166
+ "fields": [
167
+ "id",
168
+ "name",
169
+ "crn",
170
+ "govLink",
171
+ "director",
172
+ "blacklistReason",
173
+ "status",
174
+ "createdAt",
175
+ "updatedAt",
176
+ "version",
177
+ "agentClientLinks",
178
+ "agentClientLinks.agentId"
179
+ ],
180
+ "conditions": {
181
+ "agentClientLinks.agentId": "{{ id }}"
182
+ }
183
+ },
184
+ {
185
+ "action": "create",
186
+ "subject": "Client"
187
+ },
188
+ {
189
+ "action": "read",
190
+ "subject": "AgentClientLink",
191
+ "conditions": {
192
+ "agentId": "{{ id }}"
193
+ }
194
+ },
195
+ {
196
+ "action": "update",
197
+ "subject": "Client",
198
+ "fields": [
199
+ "name",
200
+ "director",
201
+ "blacklistReason",
202
+ "status"
203
+ ],
204
+ "conditions": {
205
+ "agentClientLinks.agentId": "{{ id }}"
206
+ }
207
+ },
208
+ {
209
+ "action": "read",
210
+ "subject": "ClientContact",
211
+ "fields": [
212
+ "id",
213
+ "clientId",
214
+ "client",
215
+ "client.*",
216
+ "name",
217
+ "position",
218
+ "phone",
219
+ "email",
220
+ "source",
221
+ "createdById",
222
+ "createdAt",
223
+ "updatedAt"
224
+ ],
225
+ "conditions": {
226
+ "createdById": "{{ id }}"
227
+ }
228
+ },
229
+ {
230
+ "action": "update",
231
+ "subject": "ClientContact",
232
+ "fields": [
233
+ "name",
234
+ "position",
235
+ "phone",
236
+ "email",
237
+ "source"
238
+ ],
239
+ "conditions": {
240
+ "createdById": "{{ id }}"
241
+ }
242
+ },
243
+ {
244
+ "action": "create",
245
+ "subject": "ClientContact"
246
+ },
247
+ {
248
+ "action": "read",
249
+ "subject": "CollaborationChecking",
250
+ "fields": [
251
+ "id",
252
+ "collaborationId",
253
+ "collaboration",
254
+ "collaboration.client.*",
255
+ "collaboration.company.*",
256
+ "urgency",
257
+ "decision",
258
+ "decisionTimestamp",
259
+ "decisionComment",
260
+ "isTermsAndConditionsConfirmed",
261
+ "termsAndConditionsConfirmedTimestamp",
262
+ "emailType",
263
+ "email",
264
+ "introductionEmailSent",
265
+ "introductionEmailTimestamp",
266
+ "collaborationEmailSent",
267
+ "collaborationEmailTimestamp",
268
+ "createdAt",
269
+ "updatedAt"
270
+ ],
271
+ "conditions": {
272
+ "collaboration.userId": "{{ id }}"
273
+ }
274
+ },
275
+ {
276
+ "action": "create",
277
+ "subject": "CollaborationChecking",
278
+ "fields": [
279
+ "collaboration.id",
280
+ "clientContact.id",
281
+ "urgency",
282
+ "emailType",
283
+ "email"
284
+ ],
285
+ "conditions": {
286
+ "collaboration.userId": "{{ id }}"
287
+ }
288
+ },
289
+ {
290
+ "action": "update",
291
+ "subject": "CollaborationChecking",
292
+ "fields": [
293
+ "urgency",
294
+ "emailType"
295
+ ],
296
+ "conditions": {
297
+ "collaboration.userId": "{{ id }}"
298
+ }
299
+ },
300
+ {
301
+ "action": "update",
302
+ "subject": "Active",
303
+ "fields": [
304
+ "statusFa"
305
+ ],
306
+ "conditions": {
307
+ "booking.job.currentCollaboration.userId": "{{ id }}"
308
+ }
309
+ },
310
+ {
311
+ "action": "read",
312
+ "subject": "Active",
313
+ "fields": [
314
+ "id",
315
+ "statusFa",
316
+ "statusFaUpdatedAt",
317
+ "hoursWorked",
318
+ "hoursWorkedUpdatedAt",
319
+ "date",
320
+ "booking",
321
+ "booking.id",
322
+ "booking.job.currentCollaboration.userId",
323
+ "booking.job.currentCollaboration.company.*",
324
+ "booking.job.currentCollaboration.client.*",
325
+ "booking.job.location.*",
326
+ "booking.job.pay.*",
327
+ "booking.job.jobQualifications[*].*",
328
+ "booking.job.*",
329
+ "booking.worker",
330
+ "booking.worker.firstName",
331
+ "booking.worker.lastName",
332
+ "booking.status",
333
+ "booking.pay.rate",
334
+ "booking.pay.unit",
335
+ "booking.createdAt",
336
+ "booking.updatedAt",
337
+ "booking.startDate",
338
+ "booking.endDate",
339
+ "booking.user.*",
340
+ "booking.statusUpdatedAt",
341
+ "createdAt",
342
+ "updatedAt"
343
+ ],
344
+ "conditions": {
345
+ "booking.job.currentCollaboration.userId": "{{ id }}"
346
+ }
347
+ },
348
+ {
349
+ "action": "read",
350
+ "subject": "Booking",
351
+ "fields": [
352
+ "id",
353
+ "job",
354
+ "job.currentCollaboration.userId",
355
+ "job.currentCollaboration.company.*",
356
+ "job.currentCollaboration.client.*",
357
+ "job.location.*",
358
+ "job.pay.*",
359
+ "job.jobQualifications[*].*",
360
+ "job.*",
361
+ "worker",
362
+ "worker.firstName",
363
+ "worker.lastName",
364
+ "status",
365
+ "pay",
366
+ "pay.rate",
367
+ "pay.unit",
368
+ "createdAt",
369
+ "updatedAt",
370
+ "startDate",
371
+ "endDate",
372
+ "user",
373
+ "user.*",
374
+ "statusUpdatedAt"
375
+ ],
376
+ "conditions": {
377
+ "job.currentCollaboration.userId": "{{ id }}"
378
+ }
379
+ },
380
+ {
381
+ "action": "read",
382
+ "subject": "File",
383
+ "conditions": {
384
+ "userId": "{{ id }}"
385
+ }
386
+ },
387
+ {
388
+ "action": "read",
389
+ "subject": "FilterBookingSchema",
390
+ "fields": [
391
+ "workerName",
392
+ "job",
393
+ "job.*",
394
+ "createdAt",
395
+ "createdAt.*",
396
+ "startDate",
397
+ "startDate.*",
398
+ "endDate",
399
+ "endDate.*",
400
+ "sortBy",
401
+ "sortOrder",
402
+ "status",
403
+ "clientId",
404
+ "companyId",
405
+ "agentName",
406
+ "page",
407
+ "limit"
408
+ ]
409
+ },
410
+ {
411
+ "action": "read",
412
+ "subject": "FilterActiveSchema",
413
+ "fields": [
414
+ "bookingId",
415
+ "date",
416
+ "date.*",
417
+ "pay",
418
+ "pay.*",
419
+ "status",
420
+ "status.*",
421
+ "createdAt",
422
+ "createdAt.*",
423
+ "sortBy",
424
+ "sortOrder",
425
+ "page",
426
+ "limit"
427
+ ]
428
+ },
429
+ {
430
+ "action": "read",
431
+ "subject": "FilterUserSchema",
432
+ "fields": [
433
+ "name",
434
+ "email",
435
+ "phone",
436
+ "roles",
437
+ "roles.*",
438
+ "sortBy",
439
+ "sortOrder",
440
+ "page",
441
+ "limit"
442
+ ]
443
+ },
444
+ {
445
+ "action": "read",
446
+ "subject": "FilterCompanySchema",
447
+ "fields": [
448
+ "name",
449
+ "sortBy",
450
+ "sortOrder",
451
+ "page",
452
+ "limit"
453
+ ]
454
+ },
455
+ {
456
+ "action": "read",
457
+ "subject": "FilterClientSchema",
458
+ "fields": [
459
+ "name",
460
+ "status",
461
+ "director",
462
+ "createdAt",
463
+ "createdAt.*",
464
+ "sortBy",
465
+ "sortOrder",
466
+ "page",
467
+ "limit"
468
+ ]
469
+ },
470
+ {
471
+ "action": "read",
472
+ "subject": "FilterAgentClientLinkSchema",
473
+ "fields": [
474
+ "clientId",
475
+ "agentId",
476
+ "linkType",
477
+ "sortBy",
478
+ "sortOrder",
479
+ "page",
480
+ "limit"
481
+ ]
482
+ },
483
+ {
484
+ "action": "read",
485
+ "subject": "FilterClientContactSchema",
486
+ "fields": [
487
+ "name",
488
+ "email",
489
+ "phone",
490
+ "clientId",
491
+ "createdById",
492
+ "position",
493
+ "source",
494
+ "sortBy",
495
+ "sortOrder",
496
+ "page",
497
+ "limit"
498
+ ]
499
+ },
500
+ {
501
+ "action": "read",
502
+ "subject": "FilterCollaborationSchema",
503
+ "fields": [
504
+ "companyId",
505
+ "clientId",
506
+ "userId",
507
+ "status",
508
+ "sortBy",
509
+ "sortOrder",
510
+ "page",
511
+ "limit"
512
+ ]
513
+ },
514
+ {
515
+ "action": "read",
516
+ "subject": "FilterCollaborationCheckingSchema",
517
+ "fields": [
518
+ "companyId",
519
+ "clientId",
520
+ "urgency",
521
+ "decision",
522
+ "createdById",
523
+ "sortBy",
524
+ "sortOrder",
525
+ "page",
526
+ "limit"
527
+ ]
528
+ },
529
+ {
530
+ "action": "read",
531
+ "subject": "FilterCallHistorySchema",
532
+ "fields": [
533
+ "assignmentId",
534
+ "rating",
535
+ "callType",
536
+ "callDateFrom",
537
+ "callDateTo",
538
+ "sortBy",
539
+ "sortOrder",
540
+ "page",
541
+ "limit"
542
+ ]
543
+ },
544
+ {
545
+ "action": "read",
546
+ "subject": "FilterLocationSchema",
547
+ "fields": [
548
+ "page",
549
+ "limit"
550
+ ]
551
+ },
552
+ {
553
+ "action": "read",
554
+ "subject": "LeadAssignment",
555
+ "conditions": {
556
+ "agentId": "{{ id }}"
557
+ }
558
+ },
559
+ {
560
+ "action": "update",
561
+ "subject": "LeadAssignment",
562
+ "conditions": {
563
+ "agentId": "{{ id }}"
564
+ }
565
+ },
566
+ {
567
+ "action": "read",
568
+ "subject": "CallHistory",
569
+ "conditions": {
570
+ "assignment.agentId": "{{ id }}"
571
+ }
572
+ }
573
+ ]
@@ -0,0 +1,311 @@
1
+ [
2
+ {
3
+ "action": "update",
4
+ "subject": "User",
5
+ "fields": [
6
+ "password"
7
+ ],
8
+ "conditions": {
9
+ "id": "{{ id }}"
10
+ }
11
+ },
12
+ {
13
+ "action": "read",
14
+ "subject": "User"
15
+ },
16
+ {
17
+ "action": "read",
18
+ "subject": "Qualification"
19
+ },
20
+ {
21
+ "action": "read",
22
+ "subject": "QualificationType"
23
+ },
24
+ {
25
+ "action": "read",
26
+ "subject": "Trade"
27
+ },
28
+ {
29
+ "action": "update",
30
+ "subject": "Worker",
31
+ "conditions": {
32
+ "createdByUserId": "{{ id }}"
33
+ }
34
+ },
35
+ {
36
+ "action": "read",
37
+ "subject": "FilterWorkerSchema",
38
+ "fields": [
39
+ "name",
40
+ "email",
41
+ "phone",
42
+ "englishLevel",
43
+ "nationality",
44
+ "postcode",
45
+ "distance",
46
+ "qualificationFilters",
47
+ "qualificationFilters.*",
48
+ "availability",
49
+ "tradeFilters",
50
+ "tradeFilters.*",
51
+ "sortBy",
52
+ "sortOrder",
53
+ "page",
54
+ "limit"
55
+ ]
56
+ },
57
+ {
58
+ "action": "read",
59
+ "subject": "Worker",
60
+ "conditions": {
61
+ "createdByUserId": "{{ id }}"
62
+ }
63
+ },
64
+ {
65
+ "action": "read",
66
+ "subject": "Worker",
67
+ "fields": [
68
+ "createdBy"
69
+ ],
70
+ "inverted": true
71
+ },
72
+ {
73
+ "action": "create",
74
+ "subject": "Worker"
75
+ },
76
+ {
77
+ "action": "manage",
78
+ "subject": "Location"
79
+ },
80
+ {
81
+ "action": "read",
82
+ "subject": "Job",
83
+ "fields": [
84
+ "id",
85
+ "description",
86
+ "location",
87
+ "location.*",
88
+ "tradeId",
89
+ "pay",
90
+ "pay.rate",
91
+ "pay.rateUnit",
92
+ "pay.rateMax",
93
+ "jobQualifications",
94
+ "jobQualifications[*].qualificationId",
95
+ "jobQualifications[*].qualificationTypeId",
96
+ "currentCollaboration",
97
+ "currentCollaboration.user.*",
98
+ "numberOfPositions",
99
+ "workHours",
100
+ "status",
101
+ "startDate",
102
+ "endDate",
103
+ "createdAt",
104
+ "updatedAt"
105
+ ]
106
+ },
107
+ {
108
+ "action": "create",
109
+ "subject": "Booking"
110
+ },
111
+ {
112
+ "action": "read",
113
+ "subject": "Booking",
114
+ "fields": [
115
+ "id",
116
+ "worker",
117
+ "worker.*",
118
+ "worker.phoneNumbers",
119
+ "worker.phoneNumbers[*].*",
120
+ "status",
121
+ "pay",
122
+ "pay.rate",
123
+ "pay.unit",
124
+ "createdAt",
125
+ "updatedAt",
126
+ "startDate",
127
+ "endDate",
128
+ "userId",
129
+ "statusUpdatedAt",
130
+ "job",
131
+ "job.id",
132
+ "job.description",
133
+ "job.location",
134
+ "job.location.*",
135
+ "job.tradeId",
136
+ "job.pay",
137
+ "job.pay.rate",
138
+ "job.pay.rateUnit",
139
+ "job.pay.rateMax",
140
+ "job.jobQualifications",
141
+ "job.jobQualifications[*].qualificationId",
142
+ "job.jobQualifications[*].qualificationTypeId",
143
+ "job.currentCollaboration",
144
+ "job.currentCollaboration.user.*",
145
+ "job.numberOfPositions",
146
+ "job.workHours",
147
+ "job.status",
148
+ "job.startDate",
149
+ "job.endDate",
150
+ "job.createdAt",
151
+ "job.updatedAt",
152
+ "userId"
153
+ ],
154
+ "conditions": {
155
+ "userId": "{{ id }}"
156
+ }
157
+ },
158
+ {
159
+ "action": "update",
160
+ "subject": "Booking",
161
+ "conditions": {
162
+ "userId": "{{ id }}"
163
+ }
164
+ },
165
+ {
166
+ "action": "read",
167
+ "subject": "Active",
168
+ "fields": [
169
+ "id",
170
+ "statusSa",
171
+ "statusSaUpdatedAt",
172
+ "hoursWorked",
173
+ "hoursWorkedUpdatedAt",
174
+ "date",
175
+ "comment",
176
+ "pay",
177
+ "pay.*",
178
+ "booking",
179
+ "booking.id",
180
+ "booking.job.currentCollaboration",
181
+ "booking.job.currentCollaboration.user.*",
182
+ "booking.job.location.*",
183
+ "booking.job.pay",
184
+ "booking.job.pay.rate",
185
+ "booking.job.pay.rateUnit",
186
+ "booking.job.jobQualifications[*].*",
187
+ "booking.job.*",
188
+ "booking.worker",
189
+ "booking.worker.firstName",
190
+ "booking.worker.lastName",
191
+ "booking.status",
192
+ "booking.pay.rate",
193
+ "booking.pay.unit",
194
+ "booking.createdAt",
195
+ "booking.updatedAt",
196
+ "booking.startDate",
197
+ "booking.endDate",
198
+ "booking.user.*",
199
+ "booking.statusUpdatedAt",
200
+ "createdAt",
201
+ "updatedAt"
202
+ ],
203
+ "conditions": {
204
+ "booking.userId": "{{ id }}"
205
+ }
206
+ },
207
+ {
208
+ "action": "update",
209
+ "subject": "Active",
210
+ "fields": [
211
+ "statusSa",
212
+ "comment",
213
+ "hoursWorked"
214
+ ],
215
+ "conditions": {
216
+ "booking.userId": "{{ id }}"
217
+ }
218
+ },
219
+ {
220
+ "action": "read",
221
+ "subject": "File",
222
+ "conditions": {
223
+ "userId": "{{ id }}"
224
+ }
225
+ },
226
+ {
227
+ "action": "create",
228
+ "subject": "File"
229
+ },
230
+ {
231
+ "action": "read",
232
+ "subject": "FilterBookingSchema",
233
+ "fields": [
234
+ "workerName",
235
+ "job",
236
+ "job.*",
237
+ "createdAt",
238
+ "createdAt.*",
239
+ "startDate",
240
+ "startDate.*",
241
+ "endDate",
242
+ "endDate.*",
243
+ "sortBy",
244
+ "sortOrder",
245
+ "status",
246
+ "agentName",
247
+ "page",
248
+ "limit"
249
+ ]
250
+ },
251
+ {
252
+ "action": "read",
253
+ "subject": "FilterActiveSchema",
254
+ "fields": [
255
+ "bookingId",
256
+ "date",
257
+ "date.*",
258
+ "pay",
259
+ "pay.*",
260
+ "status",
261
+ "status.*",
262
+ "createdAt",
263
+ "createdAt.*",
264
+ "sortBy",
265
+ "sortOrder",
266
+ "page",
267
+ "limit"
268
+ ]
269
+ },
270
+ {
271
+ "action": "read",
272
+ "subject": "FilterJobSchema",
273
+ "fields": [
274
+ "tradeId",
275
+ "status",
276
+ "postcode",
277
+ "distance",
278
+ "pay",
279
+ "pay.*",
280
+ "createdAt",
281
+ "createdAt.*",
282
+ "sortBy",
283
+ "sortOrder",
284
+ "page",
285
+ "limit"
286
+ ]
287
+ },
288
+ {
289
+ "action": "read",
290
+ "subject": "FilterUserSchema",
291
+ "fields": [
292
+ "name",
293
+ "email",
294
+ "phone",
295
+ "roles",
296
+ "roles.*",
297
+ "sortBy",
298
+ "sortOrder",
299
+ "page",
300
+ "limit"
301
+ ]
302
+ },
303
+ {
304
+ "action": "read",
305
+ "subject": "FilterLocationSchema",
306
+ "fields": [
307
+ "page",
308
+ "limit"
309
+ ]
310
+ }
311
+ ]
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './abilities/abilities.contract';
1
2
  export * from './actives/actives.contract';
2
3
  export * from './agent-client-links/agent-client-links.contract';
3
4
  export * from './auth/auth.contract';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../contracts/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kDAAkD,CAAC;AACjE,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sCAAsC,CAAC;AACrD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4DAA4D,CAAC;AAC3E,cAAc,0CAA0C,CAAC;AACzD,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8CAA8C,CAAC;AAC7D,cAAc,sDAAsD,CAAC;AACrE,cAAc,uDAAuD,CAAC;AACtE,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0CAA0C,CAAC;AACzD,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAG3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,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AAC;IACxC,OAAO,EAAE,OAAO,qBAAqB,CAAC;IACtC,cAAc,EAAE,OAAO,4BAA4B,CAAC;IACpD,sBAAsB,EAAE,OAAO,8BAA8B,CAAC;IAC9D,SAAS,EAAE,OAAO,uBAAuB,CAAC;IAC1C,cAAc,EAAE,OAAO,sBAAsB,CAAC;IAC9C,KAAK,EAAE,OAAO,aAAa,CAAC;IAC5B,OAAO,EAAE,OAAO,qBAAqB,CAAC;IACtC,cAAc,EAAE,OAAO,4BAA4B,CAAC;IACpD,IAAI,EAAE,OAAO,kBAAkB,CAAC;IAChC,KAAK,EAAE,OAAO,mBAAmB,CAAC;IAClC,SAAS,EAAE,OAAO,iBAAiB,CAAC;IACpC,SAAS,EAAE,OAAO,iBAAiB,CAAC;IACpC,cAAc,EAAE,OAAO,sBAAsB,CAAC;IAC9C,MAAM,EAAE,OAAO,cAAc,CAAC;IAC9B,IAAI,EAAE,OAAO,YAAY,CAAC;IAC1B,iBAAiB,EAAE,OAAO,yBAAyB,CAAC;IACpD,cAAc,EAAE,OAAO,sBAAsB,CAAC;IAC9C,MAAM,EAAE,OAAO,cAAc,CAAC;IAC9B,KAAK,EAAE,OAAO,aAAa,CAAC;IAC5B,eAAe,EAAE,OAAO,uBAAuB,CAAC;IAChD,qBAAqB,EAAE,OAAO,6BAA6B,CAAC;IAC5D,uBAAuB,EAAE,OAAO,8BAA8B,CAAC;CAChE,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,iBA2B9B,CAAC"}
package/dist/index.js CHANGED
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.apiContractRouter = void 0;
18
+ __exportStar(require("./abilities/abilities.contract"), exports);
18
19
  __exportStar(require("./actives/actives.contract"), exports);
19
20
  __exportStar(require("./agent-client-links/agent-client-links.contract"), exports);
20
21
  __exportStar(require("./auth/auth.contract"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dakkitor/api-contracts",
3
- "version": "1.1.29",
3
+ "version": "1.1.30",
4
4
  "description": "TypeScript API contracts using ts-rest and Zod",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",