@telos-dev-team/dealernode-permissions 1.0.3

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,784 @@
1
+ export const PERMISSIONS = {
2
+ // ============================================
3
+ // GLOBAL
4
+ // ============================================
5
+ GLOBAL: {
6
+ PERMISSIONS: {
7
+ MANAGE: 'global.permissions.manage',
8
+ },
9
+ },
10
+
11
+ // ============================================
12
+ // USER
13
+ // ============================================
14
+ USER: {
15
+ OPERATIONS: {
16
+ VIEW: 'user.operations.view',
17
+ CREATE: 'user.operations.create',
18
+ },
19
+ DEALER: {
20
+ OPERATIONS: {
21
+ VIEW: 'user.dealer.operations.view',
22
+ ASSIGN: 'user.dealer.operations.assign',
23
+ UPDATE: 'user.dealer.operations.update',
24
+ UNASSIGN: 'user.dealer.operations.unassign',
25
+ },
26
+ ACTOR_TYPE: {
27
+ VIEW: 'user.dealer.actor_type.view',
28
+ ASSIGN: 'user.dealer.actor_type.assign',
29
+ DELETE: 'user.dealer.actor_type.delete',
30
+ },
31
+ },
32
+ },
33
+
34
+ // ============================================
35
+ // COMMISSION
36
+ // ============================================
37
+ COMMISSION: {
38
+ OPERATIONS: {
39
+ VIEW: 'commission.operations.view',
40
+ CREATE: 'commission.operations.create',
41
+ UPDATE: 'commission.operations.update',
42
+ DELETE: 'commission.operations.delete',
43
+ APPROVE: 'commission.operations.approve',
44
+ REVERT_APPROVE: 'commission.operations.revert_approve',
45
+ PAY: 'commission.operations.pay',
46
+ REVERT_PAY: 'commission.operations.revert-pay',
47
+ },
48
+ DEAL_COMMISSION: {
49
+ OPERATIONS: {
50
+ VIEW: 'commission.deal_commission.operations.view',
51
+ CREATE: 'commission.deal_commission.operations.create',
52
+ UPDATE: 'commission.deal_commission.operations.update',
53
+ DELETE: 'commission.deal_commission.operations.delete',
54
+ },
55
+ },
56
+ CAR_COMMISSION: {
57
+ OPERATIONS: {
58
+ VIEW: 'commission.car_commission.operations.view',
59
+ CREATE: 'commission.car_commission.operations.create',
60
+ UPDATE: 'commission.car_commission.operations.update',
61
+ DELETE: 'commission.car_commission.operations.delete',
62
+ },
63
+ },
64
+ EXTRA_COMMISSION: {
65
+ OPERATIONS: {
66
+ VIEW: 'commission.extra_commission.operations.view',
67
+ CREATE: 'commission.extra_commission.operations.create',
68
+ UPDATE: 'commission.extra_commission.operations.update',
69
+ DELETE: 'commission.extra_commission.operations.delete',
70
+ },
71
+ },
72
+ SALARY: {
73
+ OPERATIONS: {
74
+ VIEW: 'commission.salary.operations.view',
75
+ CREATE: 'commission.salary.operations.create',
76
+ UPDATE: 'commission.salary.operations.update',
77
+ DELETE: 'commission.salary.operations.delete',
78
+ },
79
+ },
80
+ SALARYS_CHEDULE: {
81
+ OPERATIONS: {
82
+ VIEW: 'commission.salary_schedule.operations.view',
83
+ CREATE: 'commission.salary_schedule.operations.create',
84
+ UPDATE: 'commission.salary_schedule.operations.update',
85
+ DELETE: 'commission.salary_schedule.operations.delete',
86
+ },
87
+ },
88
+ USER_DEALER_SALARY: {
89
+ OPERATIONS: {
90
+ VIEW: 'commission.user_dealer_salary.operations.view',
91
+ CREATE: 'commission.user_dealer_salary.operations.create',
92
+ UPDATE: 'commission.user_dealer_salary.operations.update',
93
+ DELETE: 'commission.user_dealer_salary.operations.delete',
94
+ },
95
+ },
96
+ CATEGORY: {
97
+ VIEW: 'commission.category.view',
98
+ CREATE: 'commission.category.create',
99
+ UPDATE: 'commission.category.update',
100
+ DELETE: 'commission.category.delete',
101
+ },
102
+ },
103
+
104
+ // ============================================
105
+ // DEALER
106
+ // ============================================
107
+ DEALER: {
108
+ OPERATIONS: {
109
+ VIEW: 'dealer.operations.view',
110
+ CREATE: 'dealer.operations.create',
111
+ UPDATE: 'dealer.operations.update',
112
+ DELETE: 'dealer.operations.delete',
113
+ },
114
+ ONBOARDING: {
115
+ SUBMIT: 'dealer.onboarding.submit',
116
+ APPROVE: 'dealer.onboarding.approve',
117
+ REJECT: 'dealer.onboarding.reject',
118
+ ACTIVATE: 'dealer.onboarding.activate',
119
+ REVERT: 'dealer.onboarding.revert',
120
+ },
121
+ LICENSE: {
122
+ VIEW: 'dealer.license.view',
123
+ CREATE: 'dealer.license.create',
124
+ UPDATE: 'dealer.license.update',
125
+ DELETE: 'dealer.license.delete',
126
+ },
127
+ },
128
+
129
+ // ============================================
130
+ // CLIENT
131
+ // ============================================
132
+ CLIENT: {
133
+ OPERATIONS: {
134
+ VIEW: 'client.operations.view',
135
+ CREATE: 'client.operations.create',
136
+ UPDATE: 'client.operations.update',
137
+ DELETE: 'client.operations.delete',
138
+ },
139
+ },
140
+
141
+ // ============================================
142
+ // BANK
143
+ // ============================================
144
+ BANK: {
145
+ OPERATIONS: {
146
+ VIEW: 'bank.operations.view',
147
+ CREATE: 'bank.operations.create',
148
+ UPDATE: 'bank.operations.update',
149
+ DELETE: 'bank.operations.delete',
150
+ },
151
+ },
152
+
153
+ // ============================================
154
+ // AGENCY
155
+ // ============================================
156
+ AGENCY: {
157
+ OPERATIONS: {
158
+ VIEW: 'agency.operations.view',
159
+ CREATE: 'agency.operations.create',
160
+ UPDATE: 'agency.operations.update',
161
+ DELETE: 'agency.operations.delete',
162
+ },
163
+ },
164
+
165
+ // ============================================
166
+ // PLATE ORIGIN
167
+ // ============================================
168
+ PLATE_ORIGIN: {
169
+ OPERATIONS: {
170
+ VIEW: 'plate-origin.operations.view',
171
+ CREATE: 'plate-origin.operations.create',
172
+ UPDATE: 'plate-origin.operations.update',
173
+ DELETE: 'plate-origin.operations.delete',
174
+ },
175
+ },
176
+
177
+ // ============================================
178
+ // ARBITRATION
179
+ // ============================================
180
+ ARBITRATION: {
181
+ OPERATIONS: {
182
+ VIEW: 'arbitration.operations.view',
183
+ CREATE: 'arbitration.operations.create',
184
+ UPDATE: 'arbitration.operations.update',
185
+ DELETE: 'arbitration.operations.delete',
186
+ },
187
+ },
188
+
189
+ // ============================================
190
+ // DEAL
191
+ // ============================================
192
+ DEAL: {
193
+ OPERATIONS: {
194
+ VIEW: 'deal.operations.view',
195
+ VIEW_MY_DEALS: 'deal.operations.view_my_deals',
196
+ },
197
+ FILES: {
198
+ UPLOAD: 'deal.files.upload',
199
+ DOWNLOAD: 'deal.files.download',
200
+ DELETE: 'deal.files.delete',
201
+ },
202
+ PLATE: {
203
+ OPERATIONS: {
204
+ VIEW: 'deal.plate.operations.view',
205
+ VIEW_MY_PLATES: 'deal.plate.operations.view_my_plates',
206
+ CREATE: 'deal.plate.operations.create',
207
+ UPDATE: 'deal.plate.operations.update',
208
+ DELETE: 'deal.plate.operations.delete',
209
+ PAY: 'deal.plate.operations.pay',
210
+ CANCEL: 'deal.plate.operations.cancel',
211
+ },
212
+ },
213
+ PICKUP_PAYMENT: {
214
+ OPERATIONS: {
215
+ VIEW: 'deal.pickup_payment.operations.view',
216
+ PAY: 'deal.pickup_payment.operations.pay',
217
+ CANCEL: 'deal.pickup_payment.operations.cancel',
218
+ },
219
+ },
220
+ FINANCED: {
221
+ OPERATIONS: {
222
+ VIEW: 'deal.financed.operations.view',
223
+ VIEW_MY_DEALS: 'deal.financed.operations.view_my_deals',
224
+ CREATE: 'deal.financed.operations.create',
225
+ UPDATE: 'deal.financed.operations.update',
226
+ VALIDATE: 'deal.financed.operations.validate',
227
+ REVERT_VALIDATE: 'deal.financed.operations.revert_validate',
228
+ APPROVE: 'deal.financed.operations.approve',
229
+ REVERT_APPROVE: 'deal.financed.operations.revert_approve',
230
+ FUND: 'deal.financed.operations.fund',
231
+ REVERT_FUND: 'deal.financed.operations.revert_fund',
232
+ UPDATE_FUNDING_DATE: 'deal.financed.operations.update_funding_date',
233
+ DELETE: 'deal.financed.operations.delete',
234
+ TO_DEAD_DEAL: 'deal.financed.operations.to_dead_deal',
235
+ REVERT_TO_DEAD_DEAL: 'deal.financed.operations.revert_to_dead_deal',
236
+ TO_BUY_BACK: 'deal.financed.operations.to_buy_back',
237
+ REVERT_TO_BUY_BACK: 'deal.financed.operations.revert_to_buy_back',
238
+ TO_UNWIND: 'deal.financed.operations.to_unwind',
239
+ REVERT_TO_UNWIND: 'deal.financed.operations.revert_to_unwind',
240
+ REFRESH: 'deal.financed.operations.refresh',
241
+ },
242
+ },
243
+ SPOT: {
244
+ OPERATIONS: {
245
+ VIEW: 'deal.spot.operations.view',
246
+ VIEW_MY_DEALS: 'deal.spot.operations.view_my_deals',
247
+ CREATE: 'deal.spot.operations.create',
248
+ UPDATE: 'deal.spot.operations.update',
249
+ APPROVE: 'deal.spot.operations.approve',
250
+ REVERT_APPROVE: 'deal.spot.operations.revert_approve',
251
+ TO_FINANCED: 'deal.spot.operations.to_financed',
252
+ REVERT_TO_FINANCED: 'deal.spot.operations.revert_to_financed',
253
+ TO_CASH: 'deal.spot.operations.to_cash',
254
+ REVERT_TO_CASH: 'deal.spot.operations.revert_to_cash',
255
+ TO_BHPH: 'deal.spot.operations.to_bhph',
256
+ REVERT_TO_BHPH: 'deal.spot.operations.revert_to_bhph',
257
+ DELETE: 'deal.spot.operations.delete',
258
+ TO_DEAD_DEAL: 'deal.spot.operations.to_dead_deal',
259
+ REVERT_TO_DEAD_DEAL: 'deal.spot.operations.revert_to_dead_deal',
260
+ REFRESH: 'deal.spot.operations.refresh',
261
+ },
262
+ },
263
+ CASH: {
264
+ OPERATIONS: {
265
+ VIEW: 'deal.cash.operations.view',
266
+ VIEW_MY_DEALS: 'deal.cash.operations.view_my_deals',
267
+ CREATE: 'deal.cash.operations.create',
268
+ UPDATE: 'deal.cash.operations.update',
269
+ VALIDATE: 'deal.cash.operations.validate',
270
+ REVERT_VALIDATE: 'deal.cash.operations.revert_validate',
271
+ APPROVE: 'deal.cash.operations.approve',
272
+ REVERT_APPROVE: 'deal.cash.operations.revert_approve',
273
+ DELETE: 'deal.cash.operations.delete',
274
+ TO_DEAD_DEAL: 'deal.cash.operations.to_dead_deal',
275
+ REVERT_TO_DEAD_DEAL: 'deal.cash.operations.revert_to_dead_deal',
276
+ REFRESH: 'deal.cash.operations.refresh',
277
+ },
278
+ },
279
+ BHPH: {
280
+ OPERATIONS: {
281
+ VIEW: 'deal.bhph.operations.view',
282
+ VIEW_MY_DEALS: 'deal.bhph.operations.view_my_deals',
283
+ CREATE: 'deal.bhph.operations.create',
284
+ UPDATE: 'deal.bhph.operations.update',
285
+ VALIDATE: 'deal.bhph.operations.validate',
286
+ REVERT_VALIDATE: 'deal.bhph.operations.revert_validate',
287
+ APPROVE: 'deal.bhph.operations.approve',
288
+ REVERT_APPROVE: 'deal.bhph.operations.revert_approve',
289
+ DELETE: 'deal.bhph.operations.delete',
290
+ TO_DEAD_DEAL: 'deal.bhph.operations.to_dead_deal',
291
+ REVERT_TO_DEAD_DEAL: 'deal.bhph.operations.revert_to_dead_deal',
292
+ REFRESH: 'deal.bhph.operations.refresh',
293
+ },
294
+ PAYMENTS: {
295
+ VIEW: 'deal.bhph.payments.view',
296
+ PAY: 'deal.bhph.payments.pay',
297
+ CANCEL: 'deal.bhph.payments.cancel',
298
+ },
299
+ },
300
+ GPS: {
301
+ OPERATIONS: {
302
+ VIEW: 'deal.gps.operations.view',
303
+ CREATE: 'deal.gps.operations.create',
304
+ },
305
+ },
306
+ TRADE: {
307
+ OPERATIONS: {
308
+ VIEW: 'deal.trade.operations.view',
309
+ CREATE: 'deal.trade.operations.create',
310
+ },
311
+ },
312
+ RESOURCES: {
313
+ EXTRA: {
314
+ VIEW: 'deal.resources.extra.view',
315
+ CREATE: 'deal.resources.extra.create',
316
+ UPDATE: 'deal.resources.extra.update',
317
+ DELETE: 'deal.resources.extra.delete',
318
+ },
319
+ ACTOR_TYPE: {
320
+ VIEW: 'deal.resources.actor_type.view',
321
+ CREATE: 'deal.resources.actor_type.create',
322
+ UPDATE: 'deal.resources.actor_type.update',
323
+ DELETE: 'deal.resources.actor_type.delete',
324
+ },
325
+ },
326
+ WORKFLOW: {
327
+ OPERATIONS: {
328
+ CREATE: 'deal.workflow.operation.create',
329
+ VIEW: 'deal.workflow.operation.view',
330
+ DELETE: 'deal.workflow.operation.delete',
331
+ },
332
+ },
333
+ },
334
+
335
+ // ============================================
336
+ // FAIL DEAL
337
+ // ============================================
338
+ FAIL_DEAL: {
339
+ UNWIND: {
340
+ OPERATIONS: {
341
+ VIEW: 'fail_deal.unwind.operations.view',
342
+ VIEW_MY_DEALS: 'fail_deal.unwind.operations.view_my_deals',
343
+ PAY: 'fail_deal.unwind.operations.pay',
344
+ REVERT_PAY: 'fail_deal.unwind.operations.revert_pay',
345
+ DELETE: 'fail_deal.unwind.operations.delete',
346
+ UPDATE: 'fail_deal.unwind.operations.update',
347
+ ARRIVE: 'fail_deal.unwind.operations.arrive',
348
+ REVERT_ARRIVE: 'fail_deal.unwind.operations.revert_arrive',
349
+ TO_REPO: 'fail_deal.unwind.operations.to_repo',
350
+ REFRESH: 'fail_deal.unwind.operations.refresh',
351
+ },
352
+ FILES: {
353
+ UPLOAD: 'fail_deal.unwind.files.upload',
354
+ DOWNLOAD: 'fail_deal.unwind.files.download',
355
+ DELETE: 'fail_deal.unwind.files.delete',
356
+ },
357
+ RESOURCES: {
358
+ EXTRA: {
359
+ VIEW: 'fail_deal.unwind.resources.extra.view',
360
+ CREATE: 'fail_deal.unwind.resources.extra.create',
361
+ UPDATE: 'fail_deal.unwind.resources.extra.update',
362
+ DELETE: 'fail_deal.unwind.resources.extra.delete',
363
+ },
364
+ },
365
+ },
366
+ DEAD_DEAL: {
367
+ RESOURCES: {
368
+ EXTRA: {
369
+ VIEW: 'fail_deal.dead_deal.resources.extra.view',
370
+ CREATE: 'fail_deal.dead_deal.resources.extra.create',
371
+ UPDATE: 'fail_deal.dead_deal.resources.extra.update',
372
+ DELETE: 'fail_deal.dead_deal.resources.extra.delete',
373
+ },
374
+ },
375
+ OPERATIONS: {
376
+ DELETE: 'fail_deal.dead_deal.operations.delete',
377
+ VIEW: 'fail_deal.dead_deal.operations.view',
378
+ VIEW_MY_DEALS: 'fail_deal.dead_deal.operations.view_my_deals',
379
+ UPDATE: 'fail_deal.dead_deal.operations.update',
380
+ ARRIVE: 'fail_deal.dead_deal.operations.arrive',
381
+ REVERT_ARRIVE: 'fail_deal.dead_deal.operations.revert_arrive',
382
+ TO_REPO: 'fail_deal.dead_deal.operations.to_repo',
383
+ REFRESH: 'fail_deal.dead_deal.operations.refresh',
384
+ },
385
+ },
386
+ BUY_BACK: {
387
+ OPERATIONS: {
388
+ PAY: 'fail_deal.buy_back.operations.pay',
389
+ VIEW_MY_DEALS: 'fail_deal.buy_back.operations.view_my_deals',
390
+ REVERT_PAY: 'fail_deal.buy_back.operations.revert_pay',
391
+ DELETE: 'fail_deal.buy_back.operations.delete',
392
+ VIEW: 'fail_deal.buy_back.operations.view',
393
+ UPDATE: 'fail_deal.buy_back.operations.update',
394
+ ARRIVE: 'fail_deal.buy_back.operations.arrive',
395
+ REVERT_ARRIVE: 'fail_deal.buy_back.operations.revert_arrive',
396
+ TO_REPO: 'fail_deal.buy_back.operations.to_repo',
397
+ REFRESH: 'fail_deal.buy_back.operations.refresh',
398
+ },
399
+ RESOURCES: {
400
+ EXTRA: {
401
+ VIEW: 'fail_deal.buy_back.resources.extra.view',
402
+ CREATE: 'fail_deal.buy_back.resources.extra.create',
403
+ UPDATE: 'fail_deal.buy_back.resources.extra.update',
404
+ DELETE: 'fail_deal.buy_back.resources.extra.delete',
405
+ },
406
+ },
407
+ },
408
+ },
409
+
410
+ // ============================================
411
+ // PAYMENT
412
+ // ============================================
413
+ PAYMENT: {
414
+ CONNECTED_ACCOUNT: {
415
+ VIEW: 'payment.connected-account.view',
416
+ CREATE: 'payment.connected-account.create',
417
+ SYNC: 'payment.connected-account.sync',
418
+ },
419
+ CUSTOMER: {
420
+ VIEW: 'payment.customer.view',
421
+ CREATE: 'payment.customer.create',
422
+ },
423
+ PAYMENT_INTENT: {
424
+ VIEW: 'payment.payment-intent.view',
425
+ CREATE: 'payment.payment-intent.create',
426
+ CONFIRM: 'payment.payment-intent.confirm',
427
+ CANCEL: 'payment.payment-intent.cancel',
428
+ SYNC: 'payment.payment-intent.sync',
429
+ },
430
+ PAYMENT_METHOD: {
431
+ VIEW: 'payment.payment-method.view',
432
+ ATTACH: 'payment.payment-method.attach',
433
+ DELETE: 'payment.payment-method.delete',
434
+ },
435
+ PAYMENT_LINK: {
436
+ VIEW: 'payment.payment-link.view',
437
+ CREATE: 'payment.payment-link.create',
438
+ },
439
+ SCHEDULE: {
440
+ VIEW: 'payment.schedule.view',
441
+ CREATE: 'payment.schedule.create',
442
+ DELETE: 'payment.schedule.delete',
443
+ },
444
+ SUBSCRIPTION: {
445
+ VIEW: 'payment.subscription.view',
446
+ CREATE: 'payment.subscription.create',
447
+ DELETE: 'payment.subscription.delete',
448
+ },
449
+ DISPUTE: {
450
+ VIEW: 'payment.dispute.view',
451
+ MANAGE: 'payment.dispute.manage',
452
+ },
453
+ REFUND: {
454
+ VIEW: 'payment.refund.view',
455
+ MANAGE: 'payment.refund.manage',
456
+ },
457
+ TERMINAL: {
458
+ LOCATION: {
459
+ VIEW: 'payment.terminal.location.view',
460
+ CREATE: 'payment.terminal.location.create',
461
+ },
462
+ READER: {
463
+ VIEW: 'payment.terminal.reader.view',
464
+ CREATE: 'payment.terminal.reader.create',
465
+ DELETE: 'payment.terminal.reader.delete',
466
+ },
467
+ PAYMENT: {
468
+ VIEW: 'payment.terminal.payment.view',
469
+ PROCESS: 'payment.terminal.payment.process',
470
+ },
471
+ },
472
+ },
473
+
474
+ // ============================================
475
+ // CAR
476
+ // ============================================
477
+ CAR: {
478
+ OPERATIONS: {
479
+ VIEW: 'car.operations.view',
480
+ },
481
+ INVENTORY: {
482
+ OPERATIONS: {
483
+ VIEW: 'car.inventory.operations.view',
484
+ VIEW_OPERATIONS: 'car.inventory.operations.view_operations',
485
+ CREATE: 'car.inventory.operations.create',
486
+ UPDATE: 'car.inventory.operations.update',
487
+ DELETE: 'car.inventory.operations.delete',
488
+ RESTORE: 'car.inventory.operations.restore',
489
+ VALIDATE_VIN: 'car.inventory.operations.validate_vin',
490
+ },
491
+ FILES: {
492
+ UPLOAD: 'car.inventory.files.upload',
493
+ DOWNLOAD: 'car.inventory.files.download',
494
+ DELETE: 'car.inventory.files.delete',
495
+ },
496
+ },
497
+ EXTRA: {
498
+ OPERATIONS: {
499
+ CREATE: 'car.extra.operations.create',
500
+ },
501
+ },
502
+ GPS: {
503
+ OPERATIONS: {
504
+ VIEW: 'car.gps.operations.view',
505
+ CREATE: 'car.gps.operations.create',
506
+ },
507
+ },
508
+ WORKSHOP: {
509
+ OPERATIONS: {
510
+ CREATE: 'car.workshop.operations.create',
511
+ UPDATE: 'car.workshop.operations.update',
512
+ DELETE: 'car.workshop.operations.delete',
513
+ },
514
+ COSTS: {
515
+ CREATE: 'car.workshop.costs.create',
516
+ UPDATE: 'car.workshop.costs.update',
517
+ DELETE: 'car.workshop.costs.delete',
518
+ },
519
+ COST_TEMPLATES: {
520
+ CREATE: 'car.workshop.cost_templates.create',
521
+ UPDATE: 'car.workshop.cost_templates.update',
522
+ DELETE: 'car.workshop.cost_templates.delete',
523
+ },
524
+ },
525
+ TRADE: {
526
+ OPERATIONS: {
527
+ VIEW: 'car.trade.operations.view',
528
+ CREATE: 'car.trade.operations.create',
529
+ DELETE: 'car.trade.operations.delete',
530
+ TRANSFORM: 'car.trade.operations.transform',
531
+ },
532
+ },
533
+ DRAFT: {
534
+ OPERATIONS: {
535
+ VIEW: 'car.draft.operations.view',
536
+ CREATE: 'car.draft.operations.create',
537
+ UPDATE: 'car.draft.operations.update',
538
+ DELETE: 'car.draft.operations.delete',
539
+ PUBLISH: 'car.draft.operations.publish',
540
+ },
541
+ },
542
+ TRANSIT: {
543
+ OPERATIONS: {
544
+ CREATE: 'car.transit.operations.create',
545
+ UPDATE: 'car.transit.operations.update',
546
+ DELETE: 'car.transit.operations.delete',
547
+ ARRIVE: 'car.transit.operations.arrive',
548
+ VIEW: 'car.transit.operations.view',
549
+ },
550
+ COSTS: {
551
+ CREATE: 'car.transit.costs.create',
552
+ UPDATE: 'car.transit.costs.update',
553
+ DELETE: 'car.transit.costs.delete',
554
+ },
555
+ COST_TEMPLATES: {
556
+ CREATE: 'car.transit.cost_templates.create',
557
+ UPDATE: 'car.transit.cost_templates.update',
558
+ DELETE: 'car.transit.cost_templates.delete',
559
+ },
560
+ },
561
+ RESOURCES: {
562
+ BRAND: {
563
+ VIEW: 'car.resources.brand.view',
564
+ CREATE: 'car.resources.brand.create',
565
+ UPDATE: 'car.resources.brand.update',
566
+ DELETE: 'car.resources.brand.delete',
567
+ },
568
+ MODEL: {
569
+ VIEW: 'car.resources.model.view',
570
+ CREATE: 'car.resources.model.create',
571
+ UPDATE: 'car.resources.model.update',
572
+ DELETE: 'car.resources.model.delete',
573
+ },
574
+ TRIM: {
575
+ VIEW: 'car.resources.trim.view',
576
+ CREATE: 'car.resources.trim.create',
577
+ UPDATE: 'car.resources.trim.update',
578
+ DELETE: 'car.resources.trim.delete',
579
+ },
580
+ STYLE: {
581
+ VIEW: 'car.resources.style.view',
582
+ CREATE: 'car.resources.style.create',
583
+ UPDATE: 'car.resources.style.update',
584
+ DELETE: 'car.resources.style.delete',
585
+ },
586
+ TITLE: {
587
+ VIEW: 'car.resources.title.view',
588
+ CREATE: 'car.resources.title.create',
589
+ UPDATE: 'car.resources.title.update',
590
+ DELETE: 'car.resources.title.delete',
591
+ },
592
+ FUEL_TYPE: {
593
+ VIEW: 'car.resources.fuel_type.view',
594
+ CREATE: 'car.resources.fuel_type.create',
595
+ UPDATE: 'car.resources.fuel_type.update',
596
+ DELETE: 'car.resources.fuel_type.delete',
597
+ },
598
+ COLOR: {
599
+ VIEW: 'car.resources.color.view',
600
+ CREATE: 'car.resources.color.create',
601
+ UPDATE: 'car.resources.color.update',
602
+ DELETE: 'car.resources.color.delete',
603
+ },
604
+ FLOOR: {
605
+ VIEW: 'car.resources.floor.view',
606
+ CREATE: 'car.resources.floor.create',
607
+ UPDATE: 'car.resources.floor.update',
608
+ DELETE: 'car.resources.floor.delete',
609
+ },
610
+ PURCHASE_SOURCE: {
611
+ VIEW: 'car.resources.purchase_source.view',
612
+ CREATE: 'car.resources.purchase_source.create',
613
+ UPDATE: 'car.resources.purchase_source.update',
614
+ DELETE: 'car.resources.purchase_source.delete',
615
+ },
616
+ EXTRA: {
617
+ VIEW: 'car.resources.extra.view',
618
+ CREATE: 'car.resources.extra.create',
619
+ UPDATE: 'car.resources.extra.update',
620
+ DELETE: 'car.resources.extra.delete',
621
+ },
622
+ },
623
+ },
624
+
625
+ // ============================================
626
+ // INVITATION
627
+ // ============================================
628
+ INVITATION: {
629
+ OPERATIONS: {
630
+ VIEW: 'invitation.operations.view',
631
+ CREATE: 'invitation.operations.create',
632
+ REVOKE: 'invitation.operations.revoke',
633
+ },
634
+ },
635
+
636
+ // ============================================
637
+ // WORKFLOW
638
+ // ============================================
639
+ WORKFLOW: {
640
+ OPERATIONS: {
641
+ VIEW: 'workflow.operations.view',
642
+ CREATE: 'workflow.operations.create',
643
+ UPDATE: 'workflow.operations.update',
644
+ DELETE: 'workflow.operations.delete',
645
+ COPY: 'workflow.operations.copy',
646
+ },
647
+ },
648
+
649
+ // ============================================
650
+ // WHOLESALE
651
+ // ============================================
652
+ WHOLESALE: {
653
+ OPERATIONS: {
654
+ VIEW: 'wholesale.operations.view',
655
+ CREATE: 'wholesale.operations.create',
656
+ UPDATE: 'wholesale.operations.update',
657
+ DELETE: 'wholesale.operations.delete',
658
+ PAY: 'wholesale.operations.pay',
659
+ CANCEL: 'wholesale.operations.cancel',
660
+ },
661
+ TARGET: {
662
+ VIEW: 'wholesale.target.view',
663
+ CREATE: 'wholesale.target.create',
664
+ UPDATE: 'wholesale.target.update',
665
+ DELETE: 'wholesale.target.delete',
666
+ },
667
+ INVITATION: {
668
+ ACCEPT: 'wholesale.invitation.accept',
669
+ REVERT_ACCEPT: 'wholesale.invitation.revert_accept',
670
+ REJECT: 'wholesale.invitation.reject',
671
+ REVERT_REJECT: 'wholesale.invitation.revert_reject',
672
+ DELETE: 'wholesale.invitation.delete',
673
+ },
674
+ MANUAL: {
675
+ OPERATIONS: {
676
+ VIEW: 'manual_wholesale.operations.view',
677
+ CREATE: 'manual_wholesale.operations.create',
678
+ UPDATE: 'manual_wholesale.operations.update',
679
+ DELETE: 'manual_wholesale.operations.delete',
680
+ APPROVE: 'manual_wholesale.operations.approve',
681
+ },
682
+ },
683
+ AUTOMATIC: {
684
+ OPERATIONS: {
685
+ VIEW: 'automatic_wholesale.operations.view',
686
+ UPDATE: 'automatic_wholesale.operations.update',
687
+ },
688
+ },
689
+ },
690
+
691
+ // ============================================
692
+ // DEALER RELATIONSHIP
693
+ // ============================================
694
+ DEALER_RELATIONSHIP: {
695
+ OPERATIONS: {
696
+ VIEW: 'dealer_relationship.operations.view',
697
+ CREATE: 'dealer_relationship.operations.create',
698
+ APPROVE: 'dealer_relationship.operations.approve',
699
+ REJECT: 'dealer_relationship.operations.reject',
700
+ REVOKE: 'dealer_relationship.operations.revoke',
701
+ SUSPEND: 'dealer_relationship.operations.suspend',
702
+ REACTIVATE: 'dealer_relationship.operations.reactivate',
703
+ },
704
+ RESOURCE: {
705
+ VIEW_INVENTORY: 'dealer_relationship.resource.view_inventory',
706
+ TRANSFER_CAR: 'dealer_relationship.resource.transfer_car',
707
+ CREATE_WHOLESALE_DEAL:
708
+ 'dealer_relationship.resource.create_wholesale_deal',
709
+ VIEW_SHARED_DEALS: 'dealer_relationship.resource.view_shared_deals',
710
+ },
711
+ PERMISSION: {
712
+ REQUEST: 'dealer_relationship.permission.request',
713
+ APPROVE: 'dealer_relationship.permission.approve',
714
+ REJECT: 'dealer_relationship.permission.reject',
715
+ REVOKE: 'dealer_relationship.permission.revoke',
716
+ },
717
+ },
718
+
719
+ // ============================================
720
+ // DEALER GROUP
721
+ // ============================================
722
+ DEALER_GROUP: {
723
+ OPERATIONS: {
724
+ VIEW: 'dealer_group.operations.view',
725
+ CREATE: 'dealer_group.operations.create',
726
+ UPDATE: 'dealer_group.operations.update',
727
+ DELETE: 'dealer_group.operations.delete',
728
+ },
729
+ MEMBERS: {
730
+ INVITE: 'dealer_group.members.invite',
731
+ REQUEST_JOIN: 'dealer_group.members.request_join',
732
+ ACCEPT: 'dealer_group.members.accept',
733
+ REJECT: 'dealer_group.members.reject',
734
+ REMOVE: 'dealer_group.members.remove',
735
+ },
736
+ },
737
+
738
+ // ============================================
739
+ // ANALYTICS
740
+ // ============================================
741
+ ANALYTICS: {
742
+ METADATA: {
743
+ VIEW: 'analytics.metadata.view',
744
+ },
745
+ REPORTS: {
746
+ VIEW: 'analytics.reports.view',
747
+ CREATE: 'analytics.reports.create',
748
+ UPDATE: 'analytics.reports.update',
749
+ DELETE: 'analytics.reports.delete',
750
+ EXECUTE: 'analytics.reports.execute',
751
+ },
752
+ TEMPLATES: {
753
+ VIEW: 'analytics.templates.view',
754
+ CREATE: 'analytics.templates.create',
755
+ UPDATE: 'analytics.templates.update',
756
+ DELETE: 'analytics.templates.delete',
757
+ },
758
+ },
759
+
760
+ // ============================================
761
+ // AUTHORIZATION
762
+ // ============================================
763
+ AUTHORIZATION: {
764
+ ROLE: {
765
+ VIEW: 'authorization.role.view',
766
+ CREATE: 'authorization.role.create',
767
+ UPDATE: 'authorization.role.update',
768
+ DELETE: 'authorization.role.delete',
769
+ ASSIGN: 'authorization.role.assign',
770
+ UNASSIGN: 'authorization.role.unassign',
771
+ },
772
+ PERMISSION: {
773
+ VIEW: 'authorization.permission.view',
774
+ CREATE: 'authorization.permission.create',
775
+ },
776
+ USER_DEALER_PERMISSION: {
777
+ VIEW: 'authorization.user_dealer_permission.view',
778
+ ASSIGN: 'authorization.user_dealer_permission.assign',
779
+ DELETE: 'authorization.user_dealer_permission.delete',
780
+ },
781
+ },
782
+ } as const;
783
+
784
+ export type Permission = typeof PERMISSIONS;