@dakkitor/api-contracts 1.1.130 → 1.1.132

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 (67) hide show
  1. package/dist/abilities/abilities.contract.d.ts +19 -13
  2. package/dist/abilities/abilities.contract.js +33 -18
  3. package/dist/abilities/first-agent.abilities.json +640 -628
  4. package/dist/abilities/second-agent.abilities.json +374 -374
  5. package/dist/abilities/team-leads.json +1 -4
  6. package/dist/actives/actives.contract.d.ts +6313 -6313
  7. package/dist/actives/actives.contract.js +92 -92
  8. package/dist/agent-client-links/agent-client-links.contract.d.ts +511 -511
  9. package/dist/auth/auth.contract.d.ts +16 -16
  10. package/dist/bookings/bookings.contract.d.ts +23378 -23378
  11. package/dist/call-history/call-history.contract.d.ts +707 -659
  12. package/dist/call-history/call-history.contract.d.ts.map +1 -1
  13. package/dist/call-history/call-history.contract.js +28 -4
  14. package/dist/client-contacts/client-contacts.contract.d.ts +159 -159
  15. package/dist/clients/clients.contract.d.ts +72 -72
  16. package/dist/collaboration-checkings/collaboration-checkings.contract.d.ts +1330 -1330
  17. package/dist/collaborations/collaborations.contract.d.ts +1198 -1198
  18. package/dist/common/call-rating.schema.d.ts +12 -12
  19. package/dist/common/call-rating.schema.js +48 -40
  20. package/dist/common/common-schemas.d.ts +4 -4
  21. package/dist/common/common-schemas.d.ts.map +1 -1
  22. package/dist/common/common-schemas.js +1 -2
  23. package/dist/common/error-schemas.d.ts +11 -5
  24. package/dist/common/error-schemas.js +11 -8
  25. package/dist/common/openapi-metadata.d.ts +54 -44
  26. package/dist/common/openapi-metadata.js +135 -129
  27. package/dist/common/pagination-query.schema.d.ts +11 -5
  28. package/dist/common/pagination-query.schema.js +11 -8
  29. package/dist/companies/companies.contract.d.ts +40 -40
  30. package/dist/cron-executions/cron-executions.contract.d.ts +14 -14
  31. package/dist/curated-workers/curated-workers.contract.d.ts +211 -211
  32. package/dist/dashboards/agent-daily-metrics.contract.d.ts +798 -616
  33. package/dist/dashboards/agent-daily-metrics.contract.js +100 -89
  34. package/dist/dashboards/dashboard-widgets.contract.d.ts +75 -75
  35. package/dist/dashboards/dashboard-widgets.contract.js +89 -89
  36. package/dist/dashboards/dashboard.contract.d.ts +305 -215
  37. package/dist/files/files.contract.d.ts +1544 -1177
  38. package/dist/files/files.contract.js +177 -162
  39. package/dist/health/health.contract.d.ts +191 -144
  40. package/dist/health/health.contract.js +53 -40
  41. package/dist/index.d.ts +68 -65
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +3 -0
  44. package/dist/jobs/jobs.contract.d.ts +2553 -2553
  45. package/dist/jobs/jobs.contract.js +150 -150
  46. package/dist/lead-assignments/lead-assignments.contract.d.ts +587 -587
  47. package/dist/lead-distribution/agent-lead-distribution.contract.d.ts +239 -239
  48. package/dist/lead-distribution/lead-distribution-config.contract.d.ts +25 -25
  49. package/dist/leads/leads.contract.d.ts +198 -140
  50. package/dist/leads/leads.contract.d.ts.map +1 -1
  51. package/dist/leads/leads.contract.js +10 -0
  52. package/dist/locations/locations.contract.d.ts +7 -7
  53. package/dist/monitoring/monitoring.contract.d.ts +13 -13
  54. package/dist/monitoring/monitoring.contract.js +37 -37
  55. package/dist/own-research/own-research.contract.d.ts +2137 -0
  56. package/dist/own-research/own-research.contract.d.ts.map +1 -0
  57. package/dist/own-research/own-research.contract.js +221 -0
  58. package/dist/postcodes/postcodes.contract.d.ts +24 -24
  59. package/dist/qualifications/qualifications.contract.d.ts +1898 -1387
  60. package/dist/qualifications/qualifications.contract.js +193 -171
  61. package/dist/trades/trades.contract.d.ts +991 -763
  62. package/dist/trades/trades.contract.js +111 -89
  63. package/dist/users/users.contract.d.ts +202 -202
  64. package/dist/users/users.contract.js +121 -121
  65. package/dist/workers/workers.contract.d.ts +710 -710
  66. package/dist/workers/workers.contract.js +150 -150
  67. package/package.json +1 -1
@@ -1,633 +1,645 @@
1
1
  [
2
- {
3
- "action": "read",
4
- "subject": "User"
5
- },
6
- {
7
- "action": "update",
8
- "subject": "User",
9
- "fields": [
10
- "password"
11
- ],
12
- "conditions": {
13
- "id": "{{ id }}"
14
- }
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": "read",
30
- "subject": "Company",
31
- "fields": [
32
- "id",
33
- "name",
34
- "updatedAt",
35
- "createdAt"
36
- ]
37
- },
38
- {
39
- "action": "create",
40
- "subject": "Location",
41
- "fields": [
42
- "address",
43
- "postcode"
44
- ]
45
- },
46
- {
47
- "action": "update",
48
- "subject": "Job",
49
- "fields": [
50
- "description",
51
- "location",
52
- "location.address",
53
- "location.postcode",
54
- "pay",
55
- "pay.*",
56
- "numberOfPositions",
57
- "workHours",
58
- "status",
59
- "tradeId",
60
- "jobQualifications",
61
- "jobQualifications[*].*",
62
- "currentCollaboration",
63
- "currentCollaboration.id"
64
- ],
65
- "conditions": {
66
- "$or": [
67
- {
68
- "currentCollaboration.userId": "{{ id }}"
69
- },
70
- {
71
- "createdById": "{{ id }}"
72
- }
73
- ]
74
- }
75
- },
76
- {
77
- "action": "create",
78
- "subject": "Job"
79
- },
80
- {
81
- "action": "read",
82
- "subject": "FilterJobSchema",
83
- "fields": [
84
- "tradeId",
85
- "qualificationFilters",
86
- "qualificationFilters.*",
87
- "status",
88
- "userId",
89
- "clientId",
90
- "companyId",
91
- "postcode",
92
- "distance",
93
- "pay",
94
- "pay.*",
95
- "createdAt",
96
- "createdAt.*",
97
- "sortBy",
98
- "sortOrder",
99
- "page",
100
- "limit"
101
- ]
102
- },
103
- {
104
- "action": "read",
105
- "subject": "Job",
106
- "fields": [
107
- "id",
108
- "description",
109
- "location",
110
- "location.*",
111
- "tradeId",
112
- "pay",
113
- "pay.*",
114
- "jobQualifications",
115
- "jobQualifications[*].*",
116
- "currentCollaboration",
117
- "currentCollaboration.id",
118
- "currentCollaboration.company.*",
119
- "currentCollaboration.client.*",
120
- "currentCollaboration.userId",
121
- "numberOfPositions",
122
- "workHours",
123
- "status",
124
- "startDate",
125
- "endDate",
126
- "createdAt",
127
- "updatedAt",
128
- "createdById"
129
- ],
130
- "conditions": {
131
- "$or": [
132
- {
133
- "currentCollaboration.userId": "{{ id }}"
134
- },
135
- {
136
- "createdById": "{{ id }}"
137
- }
138
- ]
139
- }
140
- },
141
- {
142
- "action": "create",
143
- "subject": "Collaboration",
144
- "fields": [
145
- "client",
146
- "client.id",
147
- "company",
148
- "company.id"
149
- ]
150
- },
151
- {
152
- "action": "read",
153
- "subject": "Collaboration",
154
- "fields": [
155
- "id",
156
- "company",
157
- "company.*",
158
- "client",
159
- "client.*",
160
- "userId",
161
- "status",
162
- "createdAt",
163
- "updatedAt"
164
- ],
165
- "conditions": {
166
- "userId": "{{ id }}"
167
- }
168
- },
169
- {
170
- "action": "read",
171
- "subject": "Client",
172
- "fields": [
173
- "id",
174
- "name",
175
- "crn",
176
- "govLink",
177
- "director",
178
- "blacklistReason",
179
- "status",
180
- "createdAt",
181
- "updatedAt",
182
- "version",
183
- "agentClientLinks",
184
- "agentClientLinks.agentId"
185
- ],
186
- "conditions": {
187
- "agentClientLinks.agentId": "{{ id }}"
188
- }
189
- },
190
- {
191
- "action": "create",
192
- "subject": "Client"
193
- },
194
- {
195
- "action": "read",
196
- "subject": "AgentClientLink",
197
- "conditions": {
198
- "agentId": "{{ id }}"
199
- }
200
- },
201
- {
202
- "action": "update",
203
- "subject": "Client",
204
- "fields": [
205
- "name",
206
- "director",
207
- "blacklistReason",
208
- "status"
209
- ],
210
- "conditions": {
211
- "agentClientLinks.agentId": "{{ id }}"
212
- }
213
- },
214
- {
215
- "action": "read",
216
- "subject": "ClientContact",
217
- "fields": [
218
- "id",
219
- "clientId",
220
- "client",
221
- "client.*",
222
- "name",
223
- "position",
224
- "phone",
225
- "email",
226
- "source",
227
- "createdById",
228
- "createdAt",
229
- "updatedAt"
230
- ],
231
- "conditions": {
232
- "createdById": "{{ id }}"
233
- }
234
- },
235
- {
236
- "action": "update",
237
- "subject": "ClientContact",
238
- "fields": [
239
- "name",
240
- "position",
241
- "phone",
242
- "email",
243
- "source"
244
- ],
245
- "conditions": {
246
- "createdById": "{{ id }}"
247
- }
248
- },
249
- {
250
- "action": "create",
251
- "subject": "ClientContact"
252
- },
253
- {
254
- "action": "read",
255
- "subject": "CollaborationChecking",
256
- "fields": [
257
- "id",
258
- "collaborationId",
259
- "collaboration",
260
- "collaboration.client.*",
261
- "collaboration.company.*",
262
- "urgency",
263
- "decision",
264
- "decisionTimestamp",
265
- "decisionComment",
266
- "isTermsAndConditionsConfirmed",
267
- "termsAndConditionsConfirmedTimestamp",
268
- "emailType",
269
- "email",
270
- "introductionEmailSent",
271
- "introductionEmailTimestamp",
272
- "collaborationEmailSent",
273
- "collaborationEmailTimestamp",
274
- "createdAt",
275
- "updatedAt"
276
- ],
277
- "conditions": {
278
- "collaboration.userId": "{{ id }}"
279
- }
280
- },
281
- {
282
- "action": "create",
283
- "subject": "CollaborationChecking",
284
- "fields": [
285
- "collaboration.id",
286
- "clientContact.id",
287
- "urgency",
288
- "emailType",
289
- "email"
290
- ],
291
- "conditions": {
292
- "collaboration.userId": "{{ id }}"
293
- }
294
- },
295
- {
296
- "action": "update",
297
- "subject": "CollaborationChecking",
298
- "fields": [
299
- "urgency",
300
- "emailType"
301
- ],
302
- "conditions": {
303
- "collaboration.userId": "{{ id }}"
304
- }
305
- },
306
- {
307
- "action": "update",
308
- "subject": "Active",
309
- "fields": [
310
- "statusFa",
311
- "pay.receivedRate"
312
- ],
313
- "conditions": {
314
- "booking.job.currentCollaboration.userId": "{{ id }}"
315
- }
316
- },
317
- {
318
- "action": "read",
319
- "subject": "Active",
320
- "fields": [
321
- "id",
322
- "statusFa",
323
- "statusFaUpdatedAt",
324
- "hoursWorked",
325
- "hoursWorkedUpdatedAt",
326
- "pay",
327
- "pay.*",
328
- "date",
329
- "booking",
330
- "booking.id",
331
- "booking.job.currentCollaboration.userId",
332
- "booking.job.currentCollaboration.company.*",
333
- "booking.job.currentCollaboration.client.*",
334
- "booking.job.location.*",
335
- "booking.job.pay.*",
336
- "booking.job.jobQualifications[*].*",
337
- "booking.job.*",
338
- "booking.worker",
339
- "booking.worker.firstName",
340
- "booking.worker.lastName",
341
- "booking.status",
342
- "booking.pay.rate",
343
- "booking.pay.unit",
344
- "booking.createdAt",
345
- "booking.updatedAt",
346
- "booking.startDate",
347
- "booking.endDate",
348
- "booking.user.*",
349
- "booking.statusUpdatedAt",
350
- "createdAt",
351
- "updatedAt"
352
- ],
353
- "conditions": {
354
- "booking.job.currentCollaboration.userId": "{{ id }}"
355
- }
356
- },
357
- {
358
- "action": "read",
359
- "subject": "Booking",
360
- "fields": [
361
- "id",
362
- "job",
363
- "job.currentCollaboration.userId",
364
- "job.currentCollaboration.company.*",
365
- "job.currentCollaboration.client.*",
366
- "job.location.*",
367
- "job.pay.*",
368
- "job.jobQualifications[*].*",
369
- "job.*",
370
- "worker",
371
- "worker.firstName",
372
- "worker.lastName",
373
- "status",
374
- "pay",
375
- "pay.rate",
376
- "pay.unit",
377
- "createdAt",
378
- "updatedAt",
379
- "startDate",
380
- "endDate",
381
- "user",
382
- "user.*",
383
- "statusUpdatedAt"
384
- ],
385
- "conditions": {
386
- "job.currentCollaboration.userId": "{{ id }}"
387
- }
388
- },
389
- {
390
- "action": "read",
391
- "subject": "File",
392
- "conditions": {
393
- "userId": "{{ id }}"
394
- }
395
- },
396
- {
397
- "action": "read",
398
- "subject": "FilterBookingSchema",
399
- "fields": [
400
- "workerName",
401
- "job",
402
- "job.*",
403
- "createdAt",
404
- "createdAt.*",
405
- "startDate",
406
- "startDate.*",
407
- "endDate",
408
- "endDate.*",
409
- "sortBy",
410
- "sortOrder",
411
- "status",
412
- "clientId",
413
- "companyId",
414
- "agentId",
415
- "page",
416
- "limit"
417
- ]
418
- },
419
- {
420
- "action": "read",
421
- "subject": "FilterActiveSchema",
422
- "fields": [
423
- "workerName",
424
- "agentId",
425
- "job",
426
- "job.clientId",
427
- "job.companyId",
428
- "job.tradeId",
429
- "bookingId",
430
- "date",
431
- "date.*",
432
- "pay",
433
- "pay.*",
434
- "status",
435
- "status.status",
436
- "sortBy",
437
- "sortOrder",
438
- "page",
439
- "limit"
440
- ]
441
- },
442
- {
443
- "action": "read",
444
- "subject": "FilterUserSchema",
445
- "fields": [
446
- "name",
447
- "email",
448
- "phone",
449
- "roles",
450
- "roles.*",
451
- "sortBy",
452
- "sortOrder",
453
- "page",
454
- "limit"
455
- ]
456
- },
457
- {
458
- "action": "read",
459
- "subject": "FilterCompanySchema",
460
- "fields": [
461
- "name",
462
- "sortBy",
463
- "sortOrder",
464
- "page",
465
- "limit"
466
- ]
467
- },
468
- {
469
- "action": "read",
470
- "subject": "FilterClientSchema",
471
- "fields": [
472
- "name",
473
- "status",
474
- "director",
475
- "createdAt",
476
- "createdAt.*",
477
- "sortBy",
478
- "sortOrder",
479
- "page",
480
- "limit"
481
- ]
482
- },
483
- {
484
- "action": "read",
485
- "subject": "FilterAgentClientLinkSchema",
486
- "fields": [
487
- "clientId",
488
- "agentId",
489
- "linkType",
490
- "sortBy",
491
- "sortOrder",
492
- "page",
493
- "limit"
494
- ]
495
- },
496
- {
497
- "action": "read",
498
- "subject": "FilterClientContactSchema",
499
- "fields": [
500
- "name",
501
- "email",
502
- "phone",
503
- "clientId",
504
- "position",
505
- "source",
506
- "sortBy",
507
- "sortOrder",
508
- "page",
509
- "limit"
510
- ]
511
- },
512
- {
513
- "action": "read",
514
- "subject": "FilterCollaborationSchema",
515
- "fields": [
516
- "companyId",
517
- "clientId",
518
- "userId",
519
- "status",
520
- "sortBy",
521
- "sortOrder",
522
- "page",
523
- "limit"
524
- ]
525
- },
526
- {
527
- "action": "read",
528
- "subject": "FilterCollaborationCheckingSchema",
529
- "fields": [
530
- "companyId",
531
- "clientId",
532
- "urgency",
533
- "decision",
534
- "createdById",
535
- "sortBy",
536
- "sortOrder",
537
- "page",
538
- "limit"
539
- ]
540
- },
541
- {
542
- "action": "read",
543
- "subject": "FilterCallHistorySchema",
544
- "fields": [
545
- "assignmentId",
546
- "rating",
547
- "callType",
548
- "callDate",
549
- "callDate.*",
550
- "sortBy",
551
- "sortOrder",
552
- "page",
553
- "limit"
554
- ]
555
- },
556
- {
557
- "action": "read",
558
- "subject": "FilterLocationSchema",
559
- "fields": [
560
- "page",
561
- "limit"
562
- ]
563
- },
564
- {
565
- "action": "read",
566
- "subject": "LeadAssignment",
567
- "conditions": {
568
- "agentId": "{{ id }}"
569
- }
570
- },
571
- {
572
- "action": "update",
573
- "subject": "LeadAssignment",
574
- "conditions": {
575
- "agentId": "{{ id }}"
576
- }
577
- },
578
- {
579
- "action": "read",
580
- "subject": "CallHistory",
581
- "fields": [
582
- "id",
583
- "assignmentId",
584
- "leadId",
585
- "agentId",
586
- "assignment",
587
- "assignment.id",
588
- "assignment.leadId",
589
- "assignment.lead",
590
- "assignment.lead.*",
591
- "assignment.agentId",
592
- "assignment.assignedAt",
593
- "assignment.status",
594
- "assignment.companyId",
595
- "assignment.company",
596
- "assignment.company.*",
597
- "assignment.createdAt",
598
- "assignment.updatedAt",
599
- "callDate",
600
- "callType",
601
- "rating",
602
- "notes",
603
- "createdAt",
604
- "updatedAt"
605
- ],
606
- "conditions": {
607
- "assignment.agentId": "{{ id }}"
2
+ {
3
+ "action": "read",
4
+ "subject": "User"
5
+ },
6
+ {
7
+ "action": "update",
8
+ "subject": "User",
9
+ "fields": ["password"],
10
+ "conditions": {
11
+ "id": "{{ id }}"
12
+ }
13
+ },
14
+ {
15
+ "action": "read",
16
+ "subject": "Qualification"
17
+ },
18
+ {
19
+ "action": "read",
20
+ "subject": "QualificationType"
21
+ },
22
+ {
23
+ "action": "read",
24
+ "subject": "Trade"
25
+ },
26
+ {
27
+ "action": "read",
28
+ "subject": "Company",
29
+ "fields": ["id", "name", "updatedAt", "createdAt"]
30
+ },
31
+ {
32
+ "action": "create",
33
+ "subject": "Location",
34
+ "fields": ["address", "postcode"]
35
+ },
36
+ {
37
+ "action": "update",
38
+ "subject": "Job",
39
+ "fields": [
40
+ "description",
41
+ "location",
42
+ "location.address",
43
+ "location.postcode",
44
+ "pay",
45
+ "pay.*",
46
+ "numberOfPositions",
47
+ "workHours",
48
+ "status",
49
+ "tradeId",
50
+ "jobQualifications",
51
+ "jobQualifications[*].*",
52
+ "currentCollaboration",
53
+ "currentCollaboration.id"
54
+ ],
55
+ "conditions": {
56
+ "$or": [
57
+ {
58
+ "currentCollaboration.userId": "{{ id }}"
59
+ },
60
+ {
61
+ "createdById": "{{ id }}"
608
62
  }
609
- },
610
- {
611
- "action": "update",
612
- "subject": "CallHistory",
613
- "fields": [
614
- "rating",
615
- "notes"
616
- ],
617
- "conditions": {
618
- "assignment.agentId": "{{ id }}"
63
+ ]
64
+ }
65
+ },
66
+ {
67
+ "action": "create",
68
+ "subject": "Job"
69
+ },
70
+ {
71
+ "action": "read",
72
+ "subject": "FilterJobSchema",
73
+ "fields": [
74
+ "tradeId",
75
+ "qualificationFilters",
76
+ "qualificationFilters.*",
77
+ "status",
78
+ "userId",
79
+ "clientId",
80
+ "companyId",
81
+ "postcode",
82
+ "distance",
83
+ "pay",
84
+ "pay.*",
85
+ "createdAt",
86
+ "createdAt.*",
87
+ "sortBy",
88
+ "sortOrder",
89
+ "page",
90
+ "limit"
91
+ ]
92
+ },
93
+ {
94
+ "action": "read",
95
+ "subject": "Job",
96
+ "fields": [
97
+ "id",
98
+ "description",
99
+ "location",
100
+ "location.*",
101
+ "tradeId",
102
+ "pay",
103
+ "pay.*",
104
+ "jobQualifications",
105
+ "jobQualifications[*].*",
106
+ "currentCollaboration",
107
+ "currentCollaboration.id",
108
+ "currentCollaboration.company.*",
109
+ "currentCollaboration.client.*",
110
+ "currentCollaboration.userId",
111
+ "numberOfPositions",
112
+ "workHours",
113
+ "status",
114
+ "startDate",
115
+ "endDate",
116
+ "createdAt",
117
+ "updatedAt",
118
+ "createdById"
119
+ ],
120
+ "conditions": {
121
+ "$or": [
122
+ {
123
+ "currentCollaboration.userId": "{{ id }}"
124
+ },
125
+ {
126
+ "createdById": "{{ id }}"
619
127
  }
620
- },
621
- {
622
- "action": "read",
623
- "subject": "FirstAgentTutorials"
624
- },
625
- {
626
- "action": "read",
627
- "subject": "FaDashboardWidgets"
628
- },
629
- {
630
- "action": "read",
631
- "subject": "DashboardTrends"
128
+ ]
129
+ }
130
+ },
131
+ {
132
+ "action": "create",
133
+ "subject": "Collaboration",
134
+ "fields": ["client", "client.id", "company", "company.id"]
135
+ },
136
+ {
137
+ "action": "read",
138
+ "subject": "Collaboration",
139
+ "fields": [
140
+ "id",
141
+ "company",
142
+ "company.*",
143
+ "client",
144
+ "client.*",
145
+ "userId",
146
+ "status",
147
+ "createdAt",
148
+ "updatedAt"
149
+ ],
150
+ "conditions": {
151
+ "userId": "{{ id }}"
152
+ }
153
+ },
154
+ {
155
+ "action": "read",
156
+ "subject": "Client",
157
+ "fields": [
158
+ "id",
159
+ "name",
160
+ "crn",
161
+ "govLink",
162
+ "director",
163
+ "blacklistReason",
164
+ "status",
165
+ "createdAt",
166
+ "updatedAt",
167
+ "version",
168
+ "agentClientLinks",
169
+ "agentClientLinks.agentId"
170
+ ],
171
+ "conditions": {
172
+ "agentClientLinks.agentId": "{{ id }}"
173
+ }
174
+ },
175
+ {
176
+ "action": "create",
177
+ "subject": "Client"
178
+ },
179
+ {
180
+ "action": "read",
181
+ "subject": "AgentClientLink",
182
+ "conditions": {
183
+ "agentId": "{{ id }}"
184
+ }
185
+ },
186
+ {
187
+ "action": "update",
188
+ "subject": "Client",
189
+ "fields": ["name", "director", "blacklistReason", "status"],
190
+ "conditions": {
191
+ "agentClientLinks.agentId": "{{ id }}"
192
+ }
193
+ },
194
+ {
195
+ "action": "read",
196
+ "subject": "ClientContact",
197
+ "fields": [
198
+ "id",
199
+ "clientId",
200
+ "client",
201
+ "client.*",
202
+ "name",
203
+ "position",
204
+ "phone",
205
+ "email",
206
+ "source",
207
+ "createdById",
208
+ "createdAt",
209
+ "updatedAt"
210
+ ],
211
+ "conditions": {
212
+ "createdById": "{{ id }}"
213
+ }
214
+ },
215
+ {
216
+ "action": "update",
217
+ "subject": "ClientContact",
218
+ "fields": ["name", "position", "phone", "email", "source"],
219
+ "conditions": {
220
+ "createdById": "{{ id }}"
221
+ }
222
+ },
223
+ {
224
+ "action": "create",
225
+ "subject": "ClientContact"
226
+ },
227
+ {
228
+ "action": "read",
229
+ "subject": "CollaborationChecking",
230
+ "fields": [
231
+ "id",
232
+ "collaborationId",
233
+ "collaboration",
234
+ "collaboration.client.*",
235
+ "collaboration.company.*",
236
+ "urgency",
237
+ "decision",
238
+ "decisionTimestamp",
239
+ "decisionComment",
240
+ "isTermsAndConditionsConfirmed",
241
+ "termsAndConditionsConfirmedTimestamp",
242
+ "emailType",
243
+ "email",
244
+ "introductionEmailSent",
245
+ "introductionEmailTimestamp",
246
+ "collaborationEmailSent",
247
+ "collaborationEmailTimestamp",
248
+ "createdAt",
249
+ "updatedAt"
250
+ ],
251
+ "conditions": {
252
+ "collaboration.userId": "{{ id }}"
253
+ }
254
+ },
255
+ {
256
+ "action": "create",
257
+ "subject": "CollaborationChecking",
258
+ "fields": [
259
+ "collaboration.id",
260
+ "clientContact.id",
261
+ "urgency",
262
+ "emailType",
263
+ "email"
264
+ ],
265
+ "conditions": {
266
+ "collaboration.userId": "{{ id }}"
267
+ }
268
+ },
269
+ {
270
+ "action": "update",
271
+ "subject": "CollaborationChecking",
272
+ "fields": ["urgency", "emailType"],
273
+ "conditions": {
274
+ "collaboration.userId": "{{ id }}"
275
+ }
276
+ },
277
+ {
278
+ "action": "update",
279
+ "subject": "Active",
280
+ "fields": ["statusFa", "pay.receivedRate"],
281
+ "conditions": {
282
+ "booking.job.currentCollaboration.userId": "{{ id }}"
283
+ }
284
+ },
285
+ {
286
+ "action": "read",
287
+ "subject": "Active",
288
+ "fields": [
289
+ "id",
290
+ "statusFa",
291
+ "statusFaUpdatedAt",
292
+ "hoursWorked",
293
+ "hoursWorkedUpdatedAt",
294
+ "pay",
295
+ "pay.*",
296
+ "date",
297
+ "booking",
298
+ "booking.id",
299
+ "booking.job.currentCollaboration.userId",
300
+ "booking.job.currentCollaboration.company.*",
301
+ "booking.job.currentCollaboration.client.*",
302
+ "booking.job.location.*",
303
+ "booking.job.pay.*",
304
+ "booking.job.jobQualifications[*].*",
305
+ "booking.job.*",
306
+ "booking.worker",
307
+ "booking.worker.firstName",
308
+ "booking.worker.lastName",
309
+ "booking.status",
310
+ "booking.pay.rate",
311
+ "booking.pay.unit",
312
+ "booking.createdAt",
313
+ "booking.updatedAt",
314
+ "booking.startDate",
315
+ "booking.endDate",
316
+ "booking.user.*",
317
+ "booking.statusUpdatedAt",
318
+ "createdAt",
319
+ "updatedAt"
320
+ ],
321
+ "conditions": {
322
+ "booking.job.currentCollaboration.userId": "{{ id }}"
323
+ }
324
+ },
325
+ {
326
+ "action": "read",
327
+ "subject": "Booking",
328
+ "fields": [
329
+ "id",
330
+ "job",
331
+ "job.currentCollaboration.userId",
332
+ "job.currentCollaboration.company.*",
333
+ "job.currentCollaboration.client.*",
334
+ "job.location.*",
335
+ "job.pay.*",
336
+ "job.jobQualifications[*].*",
337
+ "job.*",
338
+ "worker",
339
+ "worker.firstName",
340
+ "worker.lastName",
341
+ "status",
342
+ "pay",
343
+ "pay.rate",
344
+ "pay.unit",
345
+ "createdAt",
346
+ "updatedAt",
347
+ "startDate",
348
+ "endDate",
349
+ "user",
350
+ "user.*",
351
+ "statusUpdatedAt"
352
+ ],
353
+ "conditions": {
354
+ "job.currentCollaboration.userId": "{{ id }}"
355
+ }
356
+ },
357
+ {
358
+ "action": "read",
359
+ "subject": "File",
360
+ "conditions": {
361
+ "userId": "{{ id }}"
362
+ }
363
+ },
364
+ {
365
+ "action": "read",
366
+ "subject": "FilterBookingSchema",
367
+ "fields": [
368
+ "workerName",
369
+ "job",
370
+ "job.*",
371
+ "createdAt",
372
+ "createdAt.*",
373
+ "startDate",
374
+ "startDate.*",
375
+ "endDate",
376
+ "endDate.*",
377
+ "sortBy",
378
+ "sortOrder",
379
+ "status",
380
+ "clientId",
381
+ "companyId",
382
+ "agentId",
383
+ "page",
384
+ "limit"
385
+ ]
386
+ },
387
+ {
388
+ "action": "read",
389
+ "subject": "FilterActiveSchema",
390
+ "fields": [
391
+ "workerName",
392
+ "agentId",
393
+ "job",
394
+ "job.clientId",
395
+ "job.companyId",
396
+ "job.tradeId",
397
+ "bookingId",
398
+ "date",
399
+ "date.*",
400
+ "pay",
401
+ "pay.*",
402
+ "status",
403
+ "status.status",
404
+ "sortBy",
405
+ "sortOrder",
406
+ "page",
407
+ "limit"
408
+ ]
409
+ },
410
+ {
411
+ "action": "read",
412
+ "subject": "FilterUserSchema",
413
+ "fields": [
414
+ "name",
415
+ "email",
416
+ "phone",
417
+ "roles",
418
+ "roles.*",
419
+ "sortBy",
420
+ "sortOrder",
421
+ "page",
422
+ "limit"
423
+ ]
424
+ },
425
+ {
426
+ "action": "read",
427
+ "subject": "FilterCompanySchema",
428
+ "fields": ["name", "sortBy", "sortOrder", "page", "limit"]
429
+ },
430
+ {
431
+ "action": "read",
432
+ "subject": "FilterClientSchema",
433
+ "fields": [
434
+ "name",
435
+ "status",
436
+ "director",
437
+ "createdAt",
438
+ "createdAt.*",
439
+ "sortBy",
440
+ "sortOrder",
441
+ "page",
442
+ "limit"
443
+ ]
444
+ },
445
+ {
446
+ "action": "read",
447
+ "subject": "FilterAgentClientLinkSchema",
448
+ "fields": [
449
+ "clientId",
450
+ "agentId",
451
+ "linkType",
452
+ "sortBy",
453
+ "sortOrder",
454
+ "page",
455
+ "limit"
456
+ ]
457
+ },
458
+ {
459
+ "action": "read",
460
+ "subject": "FilterClientContactSchema",
461
+ "fields": [
462
+ "name",
463
+ "email",
464
+ "phone",
465
+ "clientId",
466
+ "position",
467
+ "source",
468
+ "sortBy",
469
+ "sortOrder",
470
+ "page",
471
+ "limit"
472
+ ]
473
+ },
474
+ {
475
+ "action": "read",
476
+ "subject": "FilterCollaborationSchema",
477
+ "fields": [
478
+ "companyId",
479
+ "clientId",
480
+ "userId",
481
+ "status",
482
+ "sortBy",
483
+ "sortOrder",
484
+ "page",
485
+ "limit"
486
+ ]
487
+ },
488
+ {
489
+ "action": "read",
490
+ "subject": "FilterCollaborationCheckingSchema",
491
+ "fields": [
492
+ "companyId",
493
+ "clientId",
494
+ "urgency",
495
+ "decision",
496
+ "createdById",
497
+ "sortBy",
498
+ "sortOrder",
499
+ "page",
500
+ "limit"
501
+ ]
502
+ },
503
+ {
504
+ "action": "read",
505
+ "subject": "FilterCallHistorySchema",
506
+ "fields": [
507
+ "assignmentId",
508
+ "rating",
509
+ "callType",
510
+ "callDate",
511
+ "callDate.*",
512
+ "sortBy",
513
+ "sortOrder",
514
+ "page",
515
+ "limit"
516
+ ]
517
+ },
518
+ {
519
+ "action": "read",
520
+ "subject": "FilterLocationSchema",
521
+ "fields": ["page", "limit"]
522
+ },
523
+ {
524
+ "action": "read",
525
+ "subject": "LeadAssignment",
526
+ "conditions": {
527
+ "agentId": "{{ id }}"
528
+ }
529
+ },
530
+ {
531
+ "action": "update",
532
+ "subject": "LeadAssignment",
533
+ "conditions": {
534
+ "agentId": "{{ id }}"
535
+ }
536
+ },
537
+ {
538
+ "action": "read",
539
+ "subject": "CallHistory",
540
+ "fields": [
541
+ "id",
542
+ "assignmentId",
543
+ "leadId",
544
+ "agentId",
545
+ "assignment",
546
+ "assignment.id",
547
+ "assignment.leadId",
548
+ "assignment.lead",
549
+ "assignment.lead.*",
550
+ "assignment.agentId",
551
+ "assignment.assignedAt",
552
+ "assignment.status",
553
+ "assignment.companyId",
554
+ "assignment.company",
555
+ "assignment.company.*",
556
+ "assignment.createdAt",
557
+ "assignment.updatedAt",
558
+ "callDate",
559
+ "callType",
560
+ "rating",
561
+ "notes",
562
+ "createdAt",
563
+ "updatedAt"
564
+ ],
565
+ "conditions": {
566
+ "assignment.agentId": "{{ id }}"
567
+ }
568
+ },
569
+ {
570
+ "action": "update",
571
+ "subject": "CallHistory",
572
+ "fields": ["rating", "notes"],
573
+ "conditions": {
574
+ "assignment.agentId": "{{ id }}"
575
+ }
576
+ },
577
+ {
578
+ "action": "read",
579
+ "subject": "FirstAgentTutorials"
580
+ },
581
+ {
582
+ "action": "read",
583
+ "subject": "FaDashboardWidgets"
584
+ },
585
+ {
586
+ "action": "read",
587
+ "subject": "DashboardTrends"
588
+ },
589
+ {
590
+ "action": "read",
591
+ "subject": "Lead",
592
+ "fields": ["id", "name", "phoneNumber", "status", "lastCalledAt"],
593
+ "conditions": {
594
+ "assignments.agentId": "{{ id }}",
595
+ "assignments.status": "ACTIVE"
596
+ }
597
+ },
598
+ {
599
+ "action": "read",
600
+ "subject": "FilterLeadSchema",
601
+ "fields": [
602
+ "name",
603
+ "phoneNumber",
604
+ "status",
605
+ "lastCalledAt",
606
+ "sortBy",
607
+ "sortOrder",
608
+ "page",
609
+ "limit"
610
+ ]
611
+ },
612
+ {
613
+ "action": "read",
614
+ "subject": "OwnResearchLead",
615
+ "fields": [
616
+ "id",
617
+ "name",
618
+ "phoneNumber",
619
+ "status",
620
+ "source",
621
+ "callCount",
622
+ "lastCalledAt",
623
+ "createdAt",
624
+ "updatedAt"
625
+ ],
626
+ "conditions": {
627
+ "agentId": "{{ id }}"
632
628
  }
629
+ },
630
+ {
631
+ "action": "read",
632
+ "subject": "FilterOwnResearchLeadSchema",
633
+ "fields": [
634
+ "name",
635
+ "phoneNumber",
636
+ "status",
637
+ "minTotalCalls",
638
+ "lastCalledAt",
639
+ "sortBy",
640
+ "sortOrder",
641
+ "page",
642
+ "limit"
643
+ ]
644
+ }
633
645
  ]