@dakkitor/api-contracts 1.1.102 → 1.1.103

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.
@@ -16,12 +16,14 @@ export declare const AdminAbilities: AbilityRule[];
16
16
  export declare const KpiAbilities: AbilityRule[];
17
17
  export declare const FirstAgentAbilities: AbilityRule[];
18
18
  export declare const SecondAgentAbilities: AbilityRule[];
19
+ export declare const TeamLeadAbilities: AbilityRule[];
19
20
  export declare const BotAbilities: AbilityRule[];
20
21
  export declare const RoleAbilities: {
21
22
  readonly ADMIN: AbilityRule[];
22
23
  readonly KPI: AbilityRule[];
23
24
  readonly FIRST_AGENT: AbilityRule[];
24
25
  readonly SECOND_AGENT: AbilityRule[];
26
+ readonly TEAM_LEAD: AbilityRule[];
25
27
  readonly BOT: AbilityRule[];
26
28
  };
27
29
  export type RoleAbilitiesType = typeof RoleAbilities;
@@ -1 +1 @@
1
- {"version":3,"file":"abilities.contract.d.ts","sourceRoot":"","sources":["../../contracts/abilities/abilities.contract.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,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,YAAY,EAAE,WAAW,EAAkC,CAAC;AACzE,eAAO,MAAM,mBAAmB,EAAE,WAAW,EACP,CAAC;AACvC,eAAO,MAAM,oBAAoB,EAAE,WAAW,EACP,CAAC;AACxC,eAAO,MAAM,YAAY,EAAE,WAAW,EAAkC,CAAC;AAEzE,eAAO,MAAM,aAAa;;;;;;CAMhB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,OAAO,aAAa,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,eAAe,GACvB,oBAAoB,GACpB,oBAAoB,GACpB,iBAAiB,GACjB,sBAAsB,GACtB,qBAAqB,GACrB,sBAAsB,CAAC"}
1
+ {"version":3,"file":"abilities.contract.d.ts","sourceRoot":"","sources":["../../contracts/abilities/abilities.contract.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,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,YAAY,EAAE,WAAW,EAAkC,CAAC;AACzE,eAAO,MAAM,mBAAmB,EAAE,WAAW,EACP,CAAC;AACvC,eAAO,MAAM,oBAAoB,EAAE,WAAW,EACP,CAAC;AACxC,eAAO,MAAM,iBAAiB,EAAE,WAAW,EACP,CAAC;AACrC,eAAO,MAAM,YAAY,EAAE,WAAW,EAAkC,CAAC;AAEzE,eAAO,MAAM,aAAa;;;;;;;CAOhB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,OAAO,aAAa,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,eAAe,GACvB,oBAAoB,GACpB,oBAAoB,GACpB,iBAAiB,GACjB,sBAAsB,GACtB,qBAAqB,GACrB,sBAAsB,CAAC"}
@@ -10,21 +10,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
10
10
  return (mod && mod.__esModule) ? mod : { "default": mod };
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.RoleAbilities = exports.BotAbilities = exports.SecondAgentAbilities = exports.FirstAgentAbilities = exports.KpiAbilities = exports.AdminAbilities = void 0;
13
+ exports.RoleAbilities = exports.BotAbilities = exports.TeamLeadAbilities = exports.SecondAgentAbilities = exports.FirstAgentAbilities = exports.KpiAbilities = exports.AdminAbilities = void 0;
14
14
  const admin_abilities_json_1 = __importDefault(require("./admin.abilities.json"));
15
15
  const bot_abilities_json_1 = __importDefault(require("./bot.abilities.json"));
16
16
  const first_agent_abilities_json_1 = __importDefault(require("./first-agent.abilities.json"));
17
17
  const kpi_abilities_json_1 = __importDefault(require("./kpi.abilities.json"));
18
18
  const second_agent_abilities_json_1 = __importDefault(require("./second-agent.abilities.json"));
19
+ const team_leads_json_1 = __importDefault(require("./team-leads.json"));
19
20
  exports.AdminAbilities = admin_abilities_json_1.default;
20
21
  exports.KpiAbilities = kpi_abilities_json_1.default;
21
22
  exports.FirstAgentAbilities = first_agent_abilities_json_1.default;
22
23
  exports.SecondAgentAbilities = second_agent_abilities_json_1.default;
24
+ exports.TeamLeadAbilities = team_leads_json_1.default;
23
25
  exports.BotAbilities = bot_abilities_json_1.default;
24
26
  exports.RoleAbilities = {
25
27
  ADMIN: exports.AdminAbilities,
26
28
  KPI: exports.KpiAbilities,
27
29
  FIRST_AGENT: exports.FirstAgentAbilities,
28
30
  SECOND_AGENT: exports.SecondAgentAbilities,
31
+ TEAM_LEAD: exports.TeamLeadAbilities,
29
32
  BOT: exports.BotAbilities,
30
33
  };
@@ -0,0 +1,370 @@
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
+ "hasTools",
50
+ "hasPpe",
51
+ "tradeFilters",
52
+ "tradeFilters.*",
53
+ "sortBy",
54
+ "sortOrder",
55
+ "location",
56
+ "location.*",
57
+ "page",
58
+ "limit"
59
+ ]
60
+ },
61
+ {
62
+ "action": "read",
63
+ "subject": "Worker",
64
+ "conditions": {
65
+ "createdByUserId": "{{ id }}"
66
+ }
67
+ },
68
+ {
69
+ "action": "read",
70
+ "subject": "Worker",
71
+ "fields": [
72
+ "createdBy"
73
+ ],
74
+ "inverted": true
75
+ },
76
+ {
77
+ "action": "create",
78
+ "subject": "Worker"
79
+ },
80
+ {
81
+ "action": "manage",
82
+ "subject": "Location"
83
+ },
84
+ {
85
+ "action": "read",
86
+ "subject": "Job",
87
+ "fields": [
88
+ "id",
89
+ "description",
90
+ "location",
91
+ "location.*",
92
+ "tradeId",
93
+ "pay",
94
+ "pay.rate",
95
+ "pay.rateUnit",
96
+ "pay.rateMax",
97
+ "jobQualifications",
98
+ "jobQualifications[*].*",
99
+ "currentCollaboration",
100
+ "currentCollaboration.userId",
101
+ "currentCollaboration.user.*",
102
+ "numberOfPositions",
103
+ "workHours",
104
+ "status",
105
+ "startDate",
106
+ "endDate",
107
+ "createdAt",
108
+ "updatedAt"
109
+ ],
110
+ "conditions": {
111
+ "status": {
112
+ "$ne": "DRAFT"
113
+ }
114
+ }
115
+ },
116
+ {
117
+ "action": "create",
118
+ "subject": "Booking"
119
+ },
120
+ {
121
+ "action": "create",
122
+ "subject": "Schema:BookingItem",
123
+ "fields": [
124
+ "worker",
125
+ "worker.id",
126
+ "startDate",
127
+ "endDate",
128
+ "pay",
129
+ "pay.rate",
130
+ "pay.unit",
131
+ "status"
132
+ ]
133
+ },
134
+ {
135
+ "action": "read",
136
+ "subject": "Booking",
137
+ "fields": [
138
+ "id",
139
+ "worker",
140
+ "worker.*",
141
+ "worker.phoneNumbers",
142
+ "worker.phoneNumbers[*].*",
143
+ "status",
144
+ "pay",
145
+ "pay.rate",
146
+ "pay.rateUnit",
147
+ "pay.rateMax",
148
+ "createdAt",
149
+ "updatedAt",
150
+ "startDate",
151
+ "endDate",
152
+ "userId",
153
+ "statusUpdatedAt",
154
+ "job",
155
+ "job.id",
156
+ "job.description",
157
+ "job.location",
158
+ "job.location.*",
159
+ "job.tradeId",
160
+ "job.pay",
161
+ "job.pay.rate",
162
+ "job.pay.rateUnit",
163
+ "job.pay.rateMax",
164
+ "job.jobQualifications",
165
+ "job.jobQualifications[*].*",
166
+ "job.currentCollaboration",
167
+ "job.currentCollaboration.userId",
168
+ "job.currentCollaboration.user.*",
169
+ "job.numberOfPositions",
170
+ "job.workHours",
171
+ "job.status",
172
+ "job.startDate",
173
+ "job.endDate",
174
+ "job.createdAt",
175
+ "job.updatedAt",
176
+ "userId"
177
+ ],
178
+ "conditions": {
179
+ "userId": "{{ id }}"
180
+ }
181
+ },
182
+ {
183
+ "action": "update",
184
+ "subject": "Booking",
185
+ "conditions": {
186
+ "userId": "{{ id }}"
187
+ }
188
+ },
189
+ {
190
+ "action": "read",
191
+ "subject": "Active",
192
+ "fields": [
193
+ "id",
194
+ "statusSa",
195
+ "statusSaUpdatedAt",
196
+ "hoursWorked",
197
+ "hoursWorkedUpdatedAt",
198
+ "date",
199
+ "comment",
200
+ "pay",
201
+ "pay.rate",
202
+ "pay.unit",
203
+ "booking",
204
+ "booking.id",
205
+ "booking.userId",
206
+ "booking.job",
207
+ "booking.job.currentCollaboration",
208
+ "booking.job.currentCollaboration.userId",
209
+ "booking.job.currentCollaboration.user.*",
210
+ "booking.job.location.*",
211
+ "booking.job.pay",
212
+ "booking.job.pay.rate",
213
+ "booking.job.pay.rateUnit",
214
+ "booking.job.jobQualifications[*].*",
215
+ "booking.job.id",
216
+ "booking.job.description",
217
+ "booking.job.tradeId",
218
+ "booking.job.numberOfPositions",
219
+ "booking.job.workHours",
220
+ "booking.job.status",
221
+ "booking.job.startDate",
222
+ "booking.job.endDate",
223
+ "booking.job.createdAt",
224
+ "booking.job.updatedAt",
225
+ "booking.worker",
226
+ "booking.worker.*",
227
+ "booking.worker.phoneNumbers",
228
+ "booking.worker.phoneNumbers[*].*",
229
+ "booking.status",
230
+ "booking.pay.rate",
231
+ "booking.pay.unit",
232
+ "booking.createdAt",
233
+ "booking.updatedAt",
234
+ "booking.startDate",
235
+ "booking.endDate",
236
+ "booking.statusUpdatedAt",
237
+ "createdAt",
238
+ "updatedAt"
239
+ ],
240
+ "conditions": {
241
+ "booking.userId": "{{ id }}"
242
+ }
243
+ },
244
+ {
245
+ "action": "update",
246
+ "subject": "Active",
247
+ "fields": [
248
+ "statusSa",
249
+ "comment",
250
+ "hoursWorked",
251
+ "pay",
252
+ "pay.rate",
253
+ "pay.unit"
254
+ ],
255
+ "conditions": {
256
+ "booking.userId": "{{ id }}"
257
+ }
258
+ },
259
+ {
260
+ "action": "read",
261
+ "subject": "File",
262
+ "conditions": {
263
+ "userId": "{{ id }}"
264
+ }
265
+ },
266
+ {
267
+ "action": "create",
268
+ "subject": "File"
269
+ },
270
+ {
271
+ "action": "read",
272
+ "subject": "FilterBookingSchema",
273
+ "fields": [
274
+ "workerName",
275
+ "job",
276
+ "job.userId",
277
+ "job.tradeId",
278
+ "createdAt",
279
+ "createdAt.*",
280
+ "startDate",
281
+ "startDate.*",
282
+ "endDate",
283
+ "endDate.*",
284
+ "sortBy",
285
+ "sortOrder",
286
+ "status",
287
+ "agentId",
288
+ "page",
289
+ "limit"
290
+ ]
291
+ },
292
+ {
293
+ "action": "read",
294
+ "subject": "FilterActiveSchema",
295
+ "fields": [
296
+ "workerName",
297
+ "agentId",
298
+ "job",
299
+ "job.userId",
300
+ "job.tradeId",
301
+ "bookingId",
302
+ "date",
303
+ "date.*",
304
+ "pay",
305
+ "pay.*",
306
+ "status",
307
+ "status.status",
308
+ "sortBy",
309
+ "sortOrder",
310
+ "page",
311
+ "limit"
312
+ ]
313
+ },
314
+ {
315
+ "action": "read",
316
+ "subject": "FilterJobSchema",
317
+ "fields": [
318
+ "tradeId",
319
+ "qualificationFilters",
320
+ "qualificationFilters.*",
321
+ "status",
322
+ "userId",
323
+ "postcode",
324
+ "distance",
325
+ "pay",
326
+ "pay.*",
327
+ "createdAt",
328
+ "createdAt.*",
329
+ "sortBy",
330
+ "sortOrder",
331
+ "page",
332
+ "limit"
333
+ ]
334
+ },
335
+ {
336
+ "action": "read",
337
+ "subject": "FilterUserSchema",
338
+ "fields": [
339
+ "name",
340
+ "email",
341
+ "phone",
342
+ "roles",
343
+ "roles.*",
344
+ "sortBy",
345
+ "sortOrder",
346
+ "page",
347
+ "limit"
348
+ ]
349
+ },
350
+ {
351
+ "action": "read",
352
+ "subject": "FilterLocationSchema",
353
+ "fields": [
354
+ "page",
355
+ "limit"
356
+ ]
357
+ },
358
+ {
359
+ "action": "read",
360
+ "subject": "SecondAgentTutorials"
361
+ },
362
+ {
363
+ "action": "read",
364
+ "subject": "SaDashboardWidgets"
365
+ },
366
+ {
367
+ "action": "read",
368
+ "subject": "DashboardTrends"
369
+ }
370
+ ]