@kumori/aurora-backend-handler 1.1.106 → 1.1.108

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.
@@ -6,7 +6,7 @@ import {
6
6
  getWebSocketStatus,
7
7
  makeGlobalWebSocketRequest,
8
8
  } from "../websocket-manager";
9
- import { getWuiErrorCode, Link, Notification, Service } from "@kumori/aurora-interfaces";
9
+ import { errors, Link, Notification, Service } from "@kumori/aurora-interfaces";
10
10
  import { Revision } from "@kumori/aurora-interfaces/interfaces/revision-interface";
11
11
  let pendingLinks = new Map<string, Link[]>();
12
12
  /**
@@ -349,10 +349,10 @@ export const linkPendingServices = async (service: Service, token: string) => {
349
349
 
350
350
  const notification: Notification = {
351
351
  type: "success",
352
- subtype: "service-linked",
352
+ subtype: errors.service.linked.subtype,
353
353
  date: Date.now().toString(),
354
354
  status: "unread",
355
- notificationType: "regular",
355
+ callToAction: false,
356
356
  data: {
357
357
  service: service.name,
358
358
  tenant: service.tenant,
@@ -364,14 +364,14 @@ export const linkPendingServices = async (service: Service, token: string) => {
364
364
  } catch (linkErr) {
365
365
  const notification: Notification = {
366
366
  type: "error",
367
- subtype: getWuiErrorCode("service", "linkService", (linkErr as any).error.code) ?? "error-service-link",
367
+ subtype: errors.service.linkError.subtype,
368
368
  date: Date.now().toString(),
369
369
  info_content: {
370
370
  code: (linkErr as any).error.code,
371
371
  message: (linkErr as any).error.content,
372
372
  },
373
373
  status: "unread",
374
- notificationType: "regular",
374
+ callToAction: false,
375
375
  data: {
376
376
  service: service.name,
377
377
  tenant: service.tenant,
@@ -612,10 +612,10 @@ export const updateService = async (
612
612
 
613
613
  const updateNotification: Notification = {
614
614
  type: "success",
615
- subtype: "service-updated",
615
+ subtype: errors.service.updated.subtype,
616
616
  date: Date.now().toString(),
617
617
  status: "unread",
618
- notificationType: "regular",
618
+ callToAction: false,
619
619
  data: {
620
620
  service: data.name,
621
621
  tenant: data.tenant,
@@ -629,14 +629,14 @@ export const updateService = async (
629
629
  console.error("Error updating service configuration via WebSocket:", err);
630
630
  const notification: Notification = {
631
631
  type: "error",
632
- subtype: getWuiErrorCode("service", "updateRevision", (err as any).error.code) ?? "service-update-error",
632
+ subtype: errors.service.updateError.subtype,
633
633
  date: Date.now().toString(),
634
634
  info_content: {
635
635
  code: (err as any).error.code,
636
636
  message: (err as any).error.content,
637
637
  },
638
638
  status: "unread",
639
- notificationType: "regular",
639
+ callToAction: false,
640
640
  data: {
641
641
  service: data.name,
642
642
  tenant: data.tenant,
@@ -670,10 +670,10 @@ export const unlinkServices = async (service: Service, token: string) => {
670
670
 
671
671
  const unlinkNotification: Notification = {
672
672
  type: "success",
673
- subtype: "service-unlinking",
673
+ subtype: errors.service.unlinking.subtype,
674
674
  date: Date.now().toString(),
675
675
  status: "unread",
676
- notificationType: "regular",
676
+ callToAction: false,
677
677
  data: {
678
678
  service: service.name,
679
679
  tenant: service.tenant,
@@ -686,14 +686,14 @@ export const unlinkServices = async (service: Service, token: string) => {
686
686
 
687
687
  const notification: Notification = {
688
688
  type: "error",
689
- subtype: getWuiErrorCode("service", "unlinkService", (unlinkErr as any).error.code) ?? "service-unlink-error",
689
+ subtype: errors.service.unlinkError.subtype,
690
690
  date: Date.now().toString(),
691
691
  info_content: {
692
692
  code: (unlinkErr as any).error.code,
693
693
  message: (unlinkErr as any).error.content,
694
694
  },
695
695
  status: "unread",
696
- notificationType: "regular",
696
+ callToAction: false,
697
697
  data: {
698
698
  service: service.name,
699
699
  tenant: service.tenant,
@@ -735,7 +735,7 @@ export const updateServiceLinks = async (link: Link, token: string) => {
735
735
  // subtype: "service-unlinked",
736
736
  // date: Date.now().toString(),
737
737
  // status: "unread",
738
- // notificationType: "regular",
738
+ // callToAction: false,
739
739
  // data: {
740
740
  // service: link.origin,
741
741
  // tenant: link.tenant,
@@ -748,14 +748,14 @@ export const updateServiceLinks = async (link: Link, token: string) => {
748
748
 
749
749
  const notification: Notification = {
750
750
  type: "error",
751
- subtype: getWuiErrorCode("service", "unlinkService", (unlinkErr as any).error.code) ?? "service-unlink-error",
751
+ subtype: errors.service.unlinkError.subtype,
752
752
  date: Date.now().toString(),
753
753
  info_content: {
754
754
  code: (unlinkErr as any).error.code,
755
755
  message: (unlinkErr as any).error.content,
756
756
  },
757
757
  status: "unread",
758
- notificationType: "regular",
758
+ callToAction: false,
759
759
  data: {
760
760
  service: link.origin,
761
761
  tenant: link.tenant,
@@ -779,10 +779,10 @@ export const updateServiceLinks = async (link: Link, token: string) => {
779
779
 
780
780
  const notification: Notification = {
781
781
  type: "success",
782
- subtype: "service-linked",
782
+ subtype: errors.service.linked.subtype,
783
783
  date: Date.now().toString(),
784
784
  status: "unread",
785
- notificationType: "regular",
785
+ callToAction: false,
786
786
  data: {
787
787
  service: link.origin,
788
788
  tenant: link.tenant,
@@ -794,14 +794,14 @@ export const updateServiceLinks = async (link: Link, token: string) => {
794
794
  } catch (linkErr) {
795
795
  const notification: Notification = {
796
796
  type: "error",
797
- subtype: getWuiErrorCode("service", "linkService", (linkErr as any).error.code) ?? "error-service-link",
797
+ subtype: errors.service.linkError.subtype,
798
798
  date: Date.now().toString(),
799
799
  info_content: {
800
800
  code: (linkErr as any).error.code,
801
801
  message: (linkErr as any).error.content,
802
802
  },
803
803
  status: "unread",
804
- notificationType: "regular",
804
+ callToAction: false,
805
805
  data: {
806
806
  service: link.origin,
807
807
  tenant: link.tenant,
@@ -835,10 +835,10 @@ export const changeRevision = async (data: Service, token: string) => {
835
835
  );
836
836
  const notification: Notification = {
837
837
  type: "success",
838
- subtype: "revision-updated",
838
+ subtype: errors.deployment.revisionUpdated.subtype,
839
839
  date: Date.now().toString(),
840
840
  status: "unread",
841
- notificationType: "regular",
841
+ callToAction: false,
842
842
  data: {
843
843
  service: data,
844
844
  },
@@ -848,14 +848,14 @@ export const changeRevision = async (data: Service, token: string) => {
848
848
  } catch (error) {
849
849
  const notification: Notification = {
850
850
  type: "error",
851
- subtype: getWuiErrorCode("service", "updateRevision", (error as any).error.code) ?? "error-revision-update",
851
+ subtype: errors.deployment.revisionUpdateError.subtype,
852
852
  date: Date.now().toString(),
853
853
  info_content: {
854
854
  code: (error as any).error.code,
855
855
  message: (error as any).error.content,
856
856
  },
857
857
  status: "unread",
858
- notificationType: "regular",
858
+ callToAction: false,
859
859
  data: {
860
860
  service: data,
861
861
  },
@@ -894,10 +894,10 @@ export async function restartInstance(
894
894
  );
895
895
  const notification: Notification = {
896
896
  type: "success",
897
- subtype: "instance-restarted",
897
+ subtype: errors.deployment.instanceRestarted.subtype,
898
898
  date: Date.now().toString(),
899
899
  status: "unread",
900
- notificationType: "regular",
900
+ callToAction: false,
901
901
  data: {
902
902
  service: service,
903
903
  },
@@ -907,14 +907,14 @@ export async function restartInstance(
907
907
  } catch (error) {
908
908
  const notification: Notification = {
909
909
  type: "error",
910
- subtype: getWuiErrorCode("service", "restart", (error as any).error.code) ?? "error-instance-update",
910
+ subtype: errors.deployment.instanceUpdateError.subtype,
911
911
  date: Date.now().toString(),
912
912
  info_content: {
913
913
  code: (error as any).error.code,
914
914
  message: (error as any).error.content,
915
915
  },
916
916
  status: "unread",
917
- notificationType: "regular",
917
+ callToAction: false,
918
918
  data: {
919
919
  service: service,
920
920
  },
@@ -1,4 +1,4 @@
1
- import { getWuiErrorCode, Notification, Registry, Tenant, tenantRole } from "@kumori/aurora-interfaces";
1
+ import { errors, Notification, Registry, Tenant, tenantRole } from "@kumori/aurora-interfaces";
2
2
  import { eventHelper } from "../backend-handler";
3
3
  import { environment } from "../environment";
4
4
  import {
@@ -91,10 +91,10 @@ export const createTenant = async (tenant: Tenant, security: Security) => {
91
91
  eventHelper.tenant.publish.created(updatedTenant);
92
92
  const tenantCreatedNotification: Notification = {
93
93
  type: "success",
94
- subtype: "tenant-created",
94
+ subtype: errors.tenant.created.subtype,
95
95
  date: Date.now().toString(),
96
96
  status: "unread",
97
- notificationType: "regular",
97
+ callToAction: false,
98
98
  data: {
99
99
  tenant: tenant.name,
100
100
  },
@@ -112,14 +112,14 @@ export const createTenant = async (tenant: Tenant, security: Security) => {
112
112
  extractWsErrorInfo(error);
113
113
  const tenantCreationErrorNotification: Notification = {
114
114
  type: "error",
115
- subtype: getWuiErrorCode("tenant", "createTenant", contentMessage) ?? "tenant-creation-error",
115
+ subtype: errors.tenant.creationError.subtype,
116
116
  info_content: {
117
117
  code: contentMessage,
118
118
  message: errorContent,
119
119
  },
120
120
  date: Date.now().toString(),
121
121
  status: "unread",
122
- notificationType: "regular",
122
+ callToAction: false,
123
123
  data: {
124
124
  tenant: tenant.name,
125
125
  },
@@ -154,7 +154,7 @@ export const deleteTenant = async (tenant: Tenant, security: string) => {
154
154
  // subtype: "tenant-deleted",
155
155
  // date: Date.now().toString(),
156
156
  // status: "unread",
157
- // notificationType: "regular",
157
+ // callToAction: false,
158
158
  // };
159
159
  // eventHelper.notification.publish.creation(tenantDeletedNotification);
160
160
  return response;
@@ -164,14 +164,14 @@ export const deleteTenant = async (tenant: Tenant, security: string) => {
164
164
  extractWsErrorInfo(err);
165
165
  const tenantDeletionErrorNotification: Notification = {
166
166
  type: "error",
167
- subtype: getWuiErrorCode("tenant", "deleteTenant", contentMessage) ?? "tenant-deletion-error",
167
+ subtype: errors.tenant.deletionError.subtype,
168
168
  info_content: {
169
169
  code: contentMessage,
170
170
  message: errorContent,
171
171
  },
172
172
  date: Date.now().toString(),
173
173
  status: "unread",
174
- notificationType: "regular",
174
+ callToAction: false,
175
175
  data: {
176
176
  tenant: tenant.name,
177
177
  },
@@ -227,10 +227,10 @@ export const updateTenant = async (tenant: Tenant, security: string) => {
227
227
  eventHelper.tenant.publish.updated(updatedTenant);
228
228
  const tenantCreatedNotification: Notification = {
229
229
  type: "success",
230
- subtype: "tenant-updated",
230
+ subtype: errors.tenant.updated.subtype,
231
231
  date: Date.now().toString(),
232
232
  status: "unread",
233
- notificationType: "regular",
233
+ callToAction: false,
234
234
  data: {
235
235
  tenant: tenant.name,
236
236
  },
@@ -245,14 +245,14 @@ export const updateTenant = async (tenant: Tenant, security: string) => {
245
245
  eventHelper.tenant.publish.updateError(tenantWithoutPlan as Tenant);
246
246
  const tenantUpdateErrorNotification: Notification = {
247
247
  type: "error",
248
- subtype: getWuiErrorCode("tenant", "updateTenant", contentMessage) ?? "tenant-update-error",
248
+ subtype: errors.tenant.updateError.subtype,
249
249
  info_content: {
250
250
  code: contentMessage,
251
251
  message: errorContent,
252
252
  },
253
253
  date: Date.now().toString(),
254
254
  status: "unread",
255
- notificationType: "regular",
255
+ callToAction: false,
256
256
  data: {
257
257
  tenant: tenant.name,
258
258
  },
@@ -313,10 +313,10 @@ export const createTenantHTTP = async (tenant: Tenant) => {
313
313
  eventHelper.tenant.publish.created(updatedTenant);
314
314
  const tenantCreatedNotification: Notification = {
315
315
  type: "success",
316
- subtype: "tenant-created",
316
+ subtype: errors.tenant.created.subtype,
317
317
  date: Date.now().toString(),
318
318
  status: "unread",
319
- notificationType: "regular",
319
+ callToAction: false,
320
320
  data: {
321
321
  tenant: tenant.name,
322
322
  },
@@ -345,14 +345,14 @@ export const createTenantHTTP = async (tenant: Tenant) => {
345
345
 
346
346
  const tenantCreationErrorNotification: Notification = {
347
347
  type: "error",
348
- subtype: getWuiErrorCode("tenant", "createTenant", errorCode) ?? "tenant-creation-error",
348
+ subtype: errors.tenant.creationError.subtype,
349
349
  info_content: {
350
350
  code: errorCode,
351
351
  message: errorMessage,
352
352
  },
353
353
  date: Date.now().toString(),
354
354
  status: "unread",
355
- notificationType: "regular",
355
+ callToAction: false,
356
356
  data: {
357
357
  tenant: tenant.name,
358
358
  },
@@ -376,10 +376,10 @@ export const deleteTenantHTTP = async (tenant: Tenant) => {
376
376
  if (response.ok) {
377
377
  const tenantDeletedNotification: Notification = {
378
378
  type: "success",
379
- subtype: "tenant-deleting",
379
+ subtype: errors.tenant.deleting.subtype,
380
380
  date: Date.now().toString(),
381
381
  status: "unread",
382
- notificationType: "regular",
382
+ callToAction: false,
383
383
  data: {
384
384
  tenant: tenant.name,
385
385
  },
@@ -405,14 +405,14 @@ export const deleteTenantHTTP = async (tenant: Tenant) => {
405
405
 
406
406
  const tenantDeletionErrorNotification: Notification = {
407
407
  type: "error",
408
- subtype: getWuiErrorCode("tenant", "deleteTenant", errorCode) ?? "tenant-deletion-error",
408
+ subtype: errors.tenant.deletionError.subtype,
409
409
  info_content: {
410
410
  code: errorCode,
411
411
  message: errorMessage,
412
412
  },
413
413
  date: Date.now().toString(),
414
414
  status: "unread",
415
- notificationType: "regular",
415
+ callToAction: false,
416
416
  data: {
417
417
  tenant: tenant.name,
418
418
  },
@@ -465,10 +465,10 @@ export const updateTenantHTTP = async (tenant: Tenant) => {
465
465
  eventHelper.tenant.publish.updated(updatedTenant);
466
466
  const tenantCreatedNotification: Notification = {
467
467
  type: "success",
468
- subtype: "tenant-updated",
468
+ subtype: errors.tenant.updated.subtype,
469
469
  date: Date.now().toString(),
470
470
  status: "unread",
471
- notificationType: "regular",
471
+ callToAction: false,
472
472
  data: {
473
473
  tenant: tenant.name,
474
474
  },
@@ -496,14 +496,14 @@ export const updateTenantHTTP = async (tenant: Tenant) => {
496
496
 
497
497
  const tenantUpdateErrorNotification: Notification = {
498
498
  type: "error",
499
- subtype: getWuiErrorCode("tenant", "updateTenant", errorCode) ?? "tenant-update-error",
499
+ subtype: errors.tenant.updateError.subtype,
500
500
  info_content: {
501
501
  code: errorCode,
502
502
  message: errorMessage,
503
503
  },
504
504
  date: Date.now().toString(),
505
505
  status: "unread",
506
- notificationType: "regular",
506
+ callToAction: false,
507
507
  data: {
508
508
  tenant: tenant.name,
509
509
  },
@@ -546,10 +546,10 @@ export const createRegistry = async (
546
546
 
547
547
  const dregistryCreatedNotification: Notification = {
548
548
  type: "success",
549
- subtype: "registry-created",
549
+ subtype: errors.registry.created.subtype,
550
550
  date: Date.now().toString(),
551
551
  status: "unread",
552
- notificationType: "regular",
552
+ callToAction: false,
553
553
  data: {
554
554
  registry: registry.name,
555
555
  tenant: tenant.name,
@@ -571,14 +571,14 @@ export const createRegistry = async (
571
571
 
572
572
  const dregistryCreationErrorNotification: Notification = {
573
573
  type: "error",
574
- subtype: getWuiErrorCode("registry", "createDRegistry", contentMessage) ?? "registry-creation-error",
574
+ subtype: errors.registry.creationError.subtype,
575
575
  info_content: {
576
576
  code: contentMessage,
577
577
  message: errorContent,
578
578
  },
579
579
  date: Date.now().toString(),
580
580
  status: "unread",
581
- notificationType: "regular",
581
+ callToAction: false,
582
582
  data: {
583
583
  tenant: tenant.name,
584
584
  },
@@ -632,10 +632,10 @@ export const updateRegistry = async (
632
632
  );
633
633
  const dregistryUpdatedNotification: Notification = {
634
634
  type: "success",
635
- subtype: "registry-updated",
635
+ subtype: errors.registry.updated.subtype,
636
636
  date: Date.now().toString(),
637
637
  status: "unread",
638
- notificationType: "regular",
638
+ callToAction: false,
639
639
  data: {
640
640
  registry: registry.name,
641
641
  tenant: tenant.name,
@@ -659,14 +659,14 @@ export const updateRegistry = async (
659
659
 
660
660
  const dregistryUpdateErrorNotification: Notification = {
661
661
  type: "error",
662
- subtype: getWuiErrorCode("registry", "updateDRegistry", contentMessage) ?? "registry-update-error",
662
+ subtype: errors.registry.updateError.subtype,
663
663
  info_content: {
664
664
  code: contentMessage,
665
665
  message: errorContent,
666
666
  },
667
667
  date: Date.now().toString(),
668
668
  status: "unread",
669
- notificationType: "regular",
669
+ callToAction: false,
670
670
  data: {
671
671
  tenant: tenant.name,
672
672
  },
@@ -702,10 +702,10 @@ export const deleteRegistry = async (
702
702
 
703
703
  const dregistryDeletedNotification: Notification = {
704
704
  type: "success",
705
- subtype: "registry-deleted",
705
+ subtype: errors.registry.deleted.subtype,
706
706
  date: Date.now().toString(),
707
707
  status: "unread",
708
- notificationType: "regular",
708
+ callToAction: false,
709
709
  data: {
710
710
  registry: registry.name,
711
711
  tenant: tenant.name,
@@ -728,14 +728,14 @@ export const deleteRegistry = async (
728
728
 
729
729
  const dregistryDeletionErrorNotification: Notification = {
730
730
  type: "error",
731
- subtype: getWuiErrorCode("registry", "deleteDRegistry", contentMessage) ?? "registry-deletion-error",
731
+ subtype: errors.registry.deletionError.subtype,
732
732
  info_content: {
733
733
  code: contentMessage,
734
734
  message: errorContent,
735
735
  },
736
736
  date: Date.now().toString(),
737
737
  status: "unread",
738
- notificationType: "regular",
738
+ callToAction: false,
739
739
  data: {
740
740
  tenant: tenant.name,
741
741
  },
@@ -772,10 +772,10 @@ export const inviteUser = async (
772
772
  );
773
773
  const tenantInvitedNotification: Notification = {
774
774
  type: "success",
775
- subtype: "tenant-user-invited",
775
+ subtype: errors.tenant.userInvited.subtype,
776
776
  date: Date.now().toString(),
777
777
  status: "unread",
778
- notificationType: "regular",
778
+ callToAction: false,
779
779
  data: {
780
780
  tenant: tenant,
781
781
  email: email,
@@ -798,14 +798,14 @@ export const inviteUser = async (
798
798
  extractWsErrorInfo(error);
799
799
  const tenantInviteErrorNotification: Notification = {
800
800
  type: "error",
801
- subtype: getWuiErrorCode("tenant", "proposeUser", contentMessage) ?? "tenant-user-invite-error",
801
+ subtype: errors.tenant.userInviteError.subtype,
802
802
  info_content: {
803
803
  code: contentMessage,
804
804
  message: errorContent,
805
805
  },
806
806
  date: Date.now().toString(),
807
807
  status: "unread",
808
- notificationType: "regular",
808
+ callToAction: false,
809
809
  data: {
810
810
  tenant: tenant,
811
811
  email: email,
@@ -839,10 +839,10 @@ export const removeUser = async (
839
839
  );
840
840
  const tenantUserRemovedNotification: Notification = {
841
841
  type: "success",
842
- subtype: "tenant-user-removed",
842
+ subtype: errors.tenant.userRemoved.subtype,
843
843
  date: Date.now().toString(),
844
844
  status: "unread",
845
- notificationType: "regular",
845
+ callToAction: false,
846
846
  data: {
847
847
  tenant: tenant,
848
848
  user: userId,
@@ -862,14 +862,14 @@ export const removeUser = async (
862
862
  extractWsErrorInfo(error);
863
863
  const tenantUserRemovedErrorNotification: Notification = {
864
864
  type: "error",
865
- subtype: getWuiErrorCode("tenant", "excludeUser", contentMessage) ?? "tenant-user-removed-error",
865
+ subtype: errors.tenant.userRemovedError.subtype,
866
866
  info_content: {
867
867
  code: contentMessage,
868
868
  message: errorContent,
869
869
  },
870
870
  date: Date.now().toString(),
871
871
  status: "unread",
872
- notificationType: "regular",
872
+ callToAction: false,
873
873
  data: {
874
874
  tenant: tenant,
875
875
  user: userId,
@@ -905,10 +905,10 @@ export const updateUserRole = async (
905
905
  );
906
906
  const tenantUserUpdatedNotification: Notification = {
907
907
  type: "success",
908
- subtype: "user-role-updated",
908
+ subtype: errors.tenant.roleUpdated.subtype,
909
909
  date: Date.now().toString(),
910
910
  status: "unread",
911
- notificationType: "regular",
911
+ callToAction: false,
912
912
  data: {
913
913
  tenant: tenant,
914
914
  user: userId,
@@ -930,14 +930,14 @@ export const updateUserRole = async (
930
930
  extractWsErrorInfo(error);
931
931
  const tenantUserUpdatedErrorNotification: Notification = {
932
932
  type: "error",
933
- subtype: getWuiErrorCode("tenant", "modifyUserRole", contentMessage) ?? "user-role-updated-error",
933
+ subtype: errors.tenant.roleUpdateError.subtype,
934
934
  info_content: {
935
935
  code: contentMessage,
936
936
  message: errorContent,
937
937
  },
938
938
  date: Date.now().toString(),
939
939
  status: "unread",
940
- notificationType: "regular",
940
+ callToAction: false,
941
941
  data: {
942
942
  tenant: tenant,
943
943
  user: userId,
@@ -965,10 +965,10 @@ export const acceptInvite = async (tenant: string, security: string) => {
965
965
  );
966
966
  const tenantInviteAcceptedNotification: Notification = {
967
967
  type: "success",
968
- subtype: "tenant-invite-accepted",
968
+ subtype: errors.tenant.inviteAccepted.subtype,
969
969
  date: Date.now().toString(),
970
970
  status: "unread",
971
- notificationType: "regular",
971
+ callToAction: false,
972
972
  data: {
973
973
  tenant: tenant,
974
974
  },
@@ -986,14 +986,14 @@ export const acceptInvite = async (tenant: string, security: string) => {
986
986
  extractWsErrorInfo(error);
987
987
  const tenantInviteAcceptedErrorNotification: Notification = {
988
988
  type: "error",
989
- subtype: getWuiErrorCode("tenant", "acceptProposalUser", contentMessage) ?? "tenant-invite-accepted-error",
989
+ subtype: errors.tenant.inviteAcceptError.subtype,
990
990
  info_content: {
991
991
  code: contentMessage,
992
992
  message: errorContent,
993
993
  },
994
994
  date: Date.now().toString(),
995
995
  status: "unread",
996
- notificationType: "regular",
996
+ callToAction: false,
997
997
  data: {
998
998
  tenant: tenant,
999
999
  },
@@ -1020,10 +1020,10 @@ export const rejectInvite = async (tenant: string, security: string, leave: bool
1020
1020
  if(leave){
1021
1021
  const tenantInviteRejectedNotification: Notification = {
1022
1022
  type: "success",
1023
- subtype: "tenant-leave",
1023
+ subtype: errors.tenant.leave.subtype,
1024
1024
  date: Date.now().toString(),
1025
1025
  status: "unread",
1026
- notificationType: "regular",
1026
+ callToAction: false,
1027
1027
  data: {
1028
1028
  tenant: tenant,
1029
1029
  },
@@ -1033,10 +1033,10 @@ export const rejectInvite = async (tenant: string, security: string, leave: bool
1033
1033
  else{
1034
1034
  const tenantInviteRejectedNotification: Notification = {
1035
1035
  type: "success",
1036
- subtype: "tenant-invite-rejected",
1036
+ subtype: errors.tenant.inviteRejected.subtype,
1037
1037
  date: Date.now().toString(),
1038
1038
  status: "unread",
1039
- notificationType: "regular",
1039
+ callToAction: false,
1040
1040
  data: {
1041
1041
  tenant: tenant,
1042
1042
  },
@@ -1056,14 +1056,14 @@ export const rejectInvite = async (tenant: string, security: string, leave: bool
1056
1056
  extractWsErrorInfo(error);
1057
1057
  const tenantInviteRejectedErrorNotification: Notification = {
1058
1058
  type: "error",
1059
- subtype: getWuiErrorCode("tenant", "rejectProposalUser", contentMessage) ?? "tenant-invite-rejected-error",
1059
+ subtype: errors.tenant.inviteRejectError.subtype,
1060
1060
  info_content: {
1061
1061
  code: contentMessage,
1062
1062
  message: errorContent,
1063
1063
  },
1064
1064
  date: Date.now().toString(),
1065
1065
  status: "unread",
1066
- notificationType: "regular",
1066
+ callToAction: false,
1067
1067
  data: {
1068
1068
  tenant: tenant,
1069
1069
  },
@@ -1109,10 +1109,10 @@ export const createToken = async (
1109
1109
 
1110
1110
  const tenantTokenCreatedNotification: Notification = {
1111
1111
  type: "success",
1112
- subtype: "token-created",
1112
+ subtype: errors.user.tokenCreated.subtype,
1113
1113
  date: Date.now().toString(),
1114
1114
  status: "unread",
1115
- notificationType: "regular",
1115
+ callToAction: false,
1116
1116
  data: {
1117
1117
  tenant: tenantName,
1118
1118
  tokenName: tokenDescription,