quickblox-react-ui-kit 0.5.1-beta.1 → 0.5.1-join-dialog-off.1

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 (95) hide show
  1. package/dist/CommonTypes/BaseViewModel.d.ts +2 -0
  2. package/dist/CommonTypes/BaseViewModel.d.ts.map +1 -1
  3. package/dist/CommonTypes/CommonTypes.d.ts +1 -0
  4. package/dist/CommonTypes/CommonTypes.d.ts.map +1 -1
  5. package/dist/Data/Stubs.d.ts.map +1 -1
  6. package/dist/Data/dto/dialog/RemoteDialogDTO.d.ts +1 -0
  7. package/dist/Data/dto/dialog/RemoteDialogDTO.d.ts.map +1 -1
  8. package/dist/Data/mapper/DialogRemoteDTOMapper.d.ts.map +1 -1
  9. package/dist/Data/repository/DialogsRepository.d.ts +3 -0
  10. package/dist/Data/repository/DialogsRepository.d.ts.map +1 -1
  11. package/dist/Data/source/remote/IRemoteDataSource.d.ts +3 -0
  12. package/dist/Data/source/remote/IRemoteDataSource.d.ts.map +1 -1
  13. package/dist/Data/source/remote/Mapper/DialogDTOMapper.d.ts.map +1 -1
  14. package/dist/Data/source/remote/RemoteDataSource.d.ts +3 -0
  15. package/dist/Data/source/remote/RemoteDataSource.d.ts.map +1 -1
  16. package/dist/Domain/repository/IDialogsRepository.d.ts +3 -0
  17. package/dist/Domain/repository/IDialogsRepository.d.ts.map +1 -1
  18. package/dist/Domain/use_cases/CreateDialogWithAutoJoinUseCase.d.ts +13 -0
  19. package/dist/Domain/use_cases/CreateDialogWithAutoJoinUseCase.d.ts.map +1 -0
  20. package/dist/Domain/use_cases/JoinFromTheDialogUseCase.d.ts +11 -0
  21. package/dist/Domain/use_cases/JoinFromTheDialogUseCase.d.ts.map +1 -0
  22. package/dist/Domain/use_cases/UnJoinFromTheDialogUseCase.d.ts +11 -0
  23. package/dist/Domain/use_cases/UnJoinFromTheDialogUseCase.d.ts.map +1 -0
  24. package/dist/Presentation/Views/Dialog/useDialogViewModel.d.ts.map +1 -1
  25. package/dist/Presentation/Views/DialogInfo/DialogInfo.d.ts.map +1 -1
  26. package/dist/Presentation/Views/DialogList/DialogListViewModel.d.ts +4 -1
  27. package/dist/Presentation/Views/DialogList/DialogListViewModel.d.ts.map +1 -1
  28. package/dist/Presentation/Views/DialogList/useDialogListViewModel.d.ts.map +1 -1
  29. package/dist/Presentation/Views/EditDialog/EditDialog.d.ts.map +1 -1
  30. package/dist/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.d.ts.map +1 -1
  31. package/dist/QBconfig.d.ts.map +1 -1
  32. package/dist/index-ui.js +438 -90
  33. package/dist/qb-api-calls/index.d.ts +2 -0
  34. package/dist/qb-api-calls/index.d.ts.map +1 -1
  35. package/package.json +2 -2
  36. package/src/CommonTypes/BaseViewModel.ts +4 -0
  37. package/src/CommonTypes/CommonTypes.ts +1 -0
  38. package/src/Data/Stubs.ts +20 -10
  39. package/src/Data/dto/dialog/RemoteDialogDTO.ts +4 -0
  40. package/src/Data/mapper/DialogRemoteDTOMapper.ts +6 -0
  41. package/src/Data/repository/DialogsRepository.ts +57 -0
  42. package/src/Data/source/remote/IRemoteDataSource.ts +10 -0
  43. package/src/Data/source/remote/Mapper/DialogDTOMapper.ts +13 -0
  44. package/src/Data/source/remote/RemoteDataSource.ts +163 -65
  45. package/src/Domain/repository/IDialogsRepository.ts +10 -0
  46. package/src/Domain/use_cases/CreateDialogWithAutoJoinUseCase.ts +77 -0
  47. package/src/Domain/use_cases/JoinFromTheDialogUseCase.ts +61 -0
  48. package/src/Domain/use_cases/UnJoinFromTheDialogUseCase.ts +61 -0
  49. package/src/Presentation/Views/Dialog/useDialogViewModel.ts +46 -4
  50. package/src/Presentation/Views/DialogInfo/DialogInfo.tsx +36 -1
  51. package/src/Presentation/Views/DialogList/DialogListViewModel.ts +4 -1
  52. package/src/Presentation/Views/DialogList/useDialogListViewModel.ts +141 -12
  53. package/src/Presentation/Views/EditDialog/EditDialog.scss +18 -0
  54. package/src/Presentation/Views/EditDialog/EditDialog.tsx +10 -1
  55. package/src/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.tsx +25 -10
  56. package/src/Presentation/layouts/Desktop/DesktopLayout.scss +7 -0
  57. package/src/Presentation/ui-components/Header/Header.scss +7 -0
  58. package/src/QBconfig.ts +2 -0
  59. package/src/qb-api-calls/index.ts +88 -42
  60. package/storybook-static/{217.07d5c7a3.iframe.bundle.js → 217.f067a49f.iframe.bundle.js} +3 -3
  61. package/storybook-static/{217.07d5c7a3.iframe.bundle.js.map → 217.f067a49f.iframe.bundle.js.map} +1 -1
  62. package/storybook-static/{363.a2d33b79.iframe.bundle.js → 363.f6fcc1b9.iframe.bundle.js} +2 -2
  63. package/storybook-static/844.be4346f2.iframe.bundle.js +95 -0
  64. package/storybook-static/844.be4346f2.iframe.bundle.js.map +1 -0
  65. package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.46997cb0.iframe.bundle.js +2 -0
  66. package/storybook-static/Presentation-ui-components-Header-Header-stories.a4edfcc6.iframe.bundle.js +2 -0
  67. package/storybook-static/{Presentation-ui-components-MessageInput-MessageInput-stories.9b4b2514.iframe.bundle.js → Presentation-ui-components-MessageInput-MessageInput-stories.2af0de55.iframe.bundle.js} +1 -1
  68. package/storybook-static/docs-Introduction-mdx.46ed11c4.iframe.bundle.js +1 -0
  69. package/storybook-static/docs-Styling-mdx.3a86be03.iframe.bundle.js +1 -0
  70. package/storybook-static/iframe.html +2 -2
  71. package/storybook-static/project.json +1 -1
  72. package/storybook-static/{runtime~main.940703c6.iframe.bundle.js → runtime~main.ebabbef9.iframe.bundle.js} +1 -1
  73. package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +1 -1
  74. package/storybook-static/sb-addons/essentials-controls-2/manager-bundle.js +8 -8
  75. package/storybook-static/sb-addons/essentials-docs-4/manager-bundle.js +4 -4
  76. package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js +1 -1
  77. package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js +1 -1
  78. package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +1 -1
  79. package/storybook-static/sb-addons/interactions-11/manager-bundle.js +1 -1
  80. package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +1 -1
  81. package/storybook-static/sb-manager/globals-module-info.js +1 -0
  82. package/storybook-static/sb-manager/globals-runtime.js +10372 -9836
  83. package/storybook-static/sb-manager/runtime.js +119 -119
  84. package/webpack.app.config.js +3 -3
  85. package/storybook-static/844.e8bfd664.iframe.bundle.js +0 -95
  86. package/storybook-static/844.e8bfd664.iframe.bundle.js.map +0 -1
  87. package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.a724643f.iframe.bundle.js +0 -2
  88. package/storybook-static/Presentation-ui-components-Header-Header-stories.978f0af5.iframe.bundle.js +0 -2
  89. package/storybook-static/docs-Introduction-mdx.5addfa61.iframe.bundle.js +0 -1
  90. package/storybook-static/docs-Styling-mdx.9f4235f1.iframe.bundle.js +0 -1
  91. /package/storybook-static/{217.07d5c7a3.iframe.bundle.js.LICENSE.txt → 217.f067a49f.iframe.bundle.js.LICENSE.txt} +0 -0
  92. /package/storybook-static/{363.a2d33b79.iframe.bundle.js.LICENSE.txt → 363.f6fcc1b9.iframe.bundle.js.LICENSE.txt} +0 -0
  93. /package/storybook-static/{844.e8bfd664.iframe.bundle.js.LICENSE.txt → 844.be4346f2.iframe.bundle.js.LICENSE.txt} +0 -0
  94. /package/storybook-static/{Presentation-ui-components-DialogWindow-DialogWindow-stories.a724643f.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-DialogWindow-DialogWindow-stories.46997cb0.iframe.bundle.js.LICENSE.txt} +0 -0
  95. /package/storybook-static/{Presentation-ui-components-Header-Header-stories.978f0af5.iframe.bundle.js.LICENSE.txt → Presentation-ui-components-Header-Header-stories.a4edfcc6.iframe.bundle.js.LICENSE.txt} +0 -0
@@ -44,6 +44,8 @@ export declare function QBGetDialogs(filters: Dictionary<any>): Promise<QBGetDia
44
44
  export declare function QBGetDialogById(id: string): Promise<QBGetDialogResult | undefined>;
45
45
  export declare function QBCreatePrivateDialog(userId: QBUser['id'], dialogName?: string, data?: Dictionary<unknown>): Promise<QBUIKitChatDialog>;
46
46
  export declare function QBCreateGroupDialog(userIds: Array<QBUser['id']>, dialogName?: string, data?: Dictionary<unknown>): Promise<QBUIKitChatDialog>;
47
+ export declare function QBCreatePrivateDialogWithAutojoinFalse(userId: QBUser['id'], dialogName?: string, data?: Dictionary<unknown>): Promise<QBUIKitChatDialog>;
48
+ export declare function QBCreateGroupDialogWithAutojoinFalse(userIds: Array<QBUser['id']>, dialogName?: string, data?: Dictionary<unknown>): Promise<QBUIKitChatDialog>;
47
49
  export declare function QBUpdateDialog(dialogId: QBUIKitChatDialog['_id'], data: Dictionary<unknown>): Promise<QBUIKitChatDialog>;
48
50
  export declare function QBJoinGroupDialog(dialogId: QBUIKitChatDialog['_id']): Promise<unknown>;
49
51
  export declare function QBDeleteDialog(dialogIds: Array<QBUIKitChatDialog['_id']>): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/qb-api-calls/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EACT,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,MAAM,EACN,wBAAwB,EAExB,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,qBAAqB,EACrB,SAAS,EACT,eAAe,EACf,MAAM,EACN,kBAAkB,EAClB,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAEL,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACd,MAAM,4BAA4B,CAAC;AAEpC,MAAM,MAAM,YAAY,GAAG;IACzB,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,GAA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AAW,CAAC,CAAA;CAAE,mBAQrD;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,qBAAqB,QAKlE;AAED,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,qBAAqB,QAKvE;AAED,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,eAAe,EACxB,MAAM,EAAE,aAAa,oCAWtB;AAED,wBAAgB,cAAc,CAC5B,oBAAoB,EAAE,MAAM,EAC5B,eAAe,EAAE,MAAM,EACvB,OAAO,EAAE,aAAa,6BAoBvB;AAED,wBAAgB,WAAW,CACzB,oBAAoB,EAAE,MAAM,EAC5B,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,6BAoBrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quickblox-react-ui-kit",
3
- "version": "0.5.1-beta.1",
3
+ "version": "0.5.1-join-dialog-off.1",
4
4
  "main": "dist/index-ui.js",
5
5
  "types": "dist/index-ui.d.ts",
6
6
  "license": "MIT",
@@ -12,7 +12,7 @@
12
12
  "qb-ai-core": "^0.1.3",
13
13
  "qb-ai-rephrase": "^0.1.2",
14
14
  "qb-ai-translate": "^0.1.2",
15
- "quickblox": "^2.19.3-beta.4",
15
+ "quickblox": "^2.20.0",
16
16
  "media-recorder-js": "^2.1.0",
17
17
  "react": "^19.0.0",
18
18
  "react-dom": "^19.0.0",
@@ -29,6 +29,7 @@ export type FunctionTypeViewModelToVoid<TResult> = (
29
29
  export type EditDialogParams = {
30
30
  dialogTitle: string;
31
31
  dialogAvatar: File | string | null;
32
+ disableAutoJoin: boolean;
32
33
  };
33
34
 
34
35
  export type ForwardMessagesParams = {
@@ -67,6 +68,9 @@ export type FunctionTypeEditDialogParamsToVoid = (
67
68
  export type FunctionTypeDialogEntityToDialogEntity = (
68
69
  entity: GroupDialogEntity,
69
70
  ) => Promise<DialogEntity>;
71
+ export type FunctionTypeDialogEntityWithAutoJoinToDialogEntity = (
72
+ entity: GroupDialogEntity, disableAutoJoin: boolean
73
+ ) => Promise<DialogEntity>;
70
74
  export type FunctionTypeDialogEntityToBoolean = (
71
75
  entity: GroupDialogEntity,
72
76
  ) => Promise<boolean>;
@@ -189,6 +189,7 @@ export interface QBUIKitChatDialog extends QBChatDialog {
189
189
  };
190
190
  new_occupants_ids?: number[]; // TODO: EXTENDS TYPE AND SWITCH TO THIS NEW TYPE
191
191
  joined?: boolean; // TODO: EXTENDS TYPE AND SWITCH TO THIS NEW TYPE
192
+ is_join_required: number | undefined | null;
192
193
  }
193
194
 
194
195
  export interface QBUIKitChatNewMessage extends QBChatNewMessage {
package/src/Data/Stubs.ts CHANGED
@@ -131,12 +131,12 @@ export class Stubs {
131
131
  id: '10231',
132
132
  type: FileType.image,
133
133
  uid: '10231',
134
- url: 'https://files.readme.io/00b5563-small-qb-logo-docs-white-9px.png',
134
+ url: 'https://via.placeholder.com/600/92c952',
135
135
  file: {
136
136
  id: '10231',
137
137
  uid: '',
138
138
  type: FileType.image,
139
- url: 'https://files.readme.io/00b5563-small-qb-logo-docs-white-9px.png',
139
+ url: 'https://via.placeholder.com/600/92c952',
140
140
  },
141
141
  };
142
142
  const photoAttachments: ChatMessageAttachmentEntity[] = [photo];
@@ -194,8 +194,8 @@ export class Stubs {
194
194
  '103',
195
195
  i % 9 === 0
196
196
  ? `${
197
- i + 1
198
- } very very very long test text message for dialog 103. The text message with huge text: bla-bla-bla long long long long, bla-bla-bla, very very very long test text message for dialog 103. very very very long test text message for dialog 103. etc`
197
+ i + 1
198
+ } very very very long test text message for dialog 103. The text message with huge text: bla-bla-bla long long long long, bla-bla-bla, very very very long test text message for dialog 103. very very very long test text message for dialog 103. etc`
199
199
  : `${i + 1} test message for dialog 103`,
200
200
  '31.03.2023',
201
201
  Date.now(),
@@ -267,12 +267,12 @@ export class Stubs {
267
267
  id: '10231',
268
268
  type: FileType.image,
269
269
  uid: '10231',
270
- url: 'https://cdn-ikpjoif.nitrocdn.com/WZsqFPiehrtwFaaeJNQAQZrkRMgaTuyL/assets/images/optimized/rev-83f47e6/quickblox.com/wp-content/themes/QuickbloxTheme2021/img/chat-api-feature-rich-sdk.jpg',
270
+ url: 'https://via.placeholder.com/600/92c952',
271
271
  file: {
272
272
  id: '10231',
273
273
  uid: '',
274
274
  type: FileType.image,
275
- url: 'https://cdn-ikpjoif.nitrocdn.com/WZsqFPiehrtwFaaeJNQAQZrkRMgaTuyL/assets/images/optimized/rev-83f47e6/quickblox.com/wp-content/themes/QuickbloxTheme2021/img/chat-api-feature-rich-sdk.jpg',
275
+ url: 'https://via.placeholder.com/600/92c952',
276
276
  },
277
277
  };
278
278
  const photoAttachments: ChatMessageAttachmentEntity[] = [photo];
@@ -345,8 +345,8 @@ export class Stubs {
345
345
  '103',
346
346
  i % 3 === 0
347
347
  ? `${
348
- i + 1
349
- } very very very long test text message for dialog 103. The text message with huge text: bla-bla-bla long long long long, bla-bla-bla, very very very long test text message for dialog 103. very very very long test text message for dialog 103. etc`
348
+ i + 1
349
+ } very very very long test text message for dialog 103. The text message with huge text: bla-bla-bla long long long long, bla-bla-bla, very very very long test text message for dialog 103. very very very long test text message for dialog 103. etc`
350
350
  : `${i + 1} test message for dialog 103`,
351
351
  '31.03.2023',
352
352
  Date.now(),
@@ -607,6 +607,7 @@ export class Stubs {
607
607
  lastMessageId: '',
608
608
  unreadMessageCount: 0,
609
609
  updatedAt: '',
610
+ is_join_required: undefined,
610
611
  },
611
612
  {
612
613
  id: '2',
@@ -622,6 +623,7 @@ export class Stubs {
622
623
  lastMessageId: '',
623
624
  unreadMessageCount: 0,
624
625
  updatedAt: '',
626
+ is_join_required: undefined,
625
627
  },
626
628
  {
627
629
  id: '3',
@@ -637,6 +639,7 @@ export class Stubs {
637
639
  lastMessageId: '',
638
640
  unreadMessageCount: 0,
639
641
  updatedAt: '',
642
+ is_join_required: undefined,
640
643
  },
641
644
  {
642
645
  id: '4',
@@ -652,6 +655,7 @@ export class Stubs {
652
655
  lastMessageId: '',
653
656
  unreadMessageCount: 0,
654
657
  updatedAt: '',
658
+ is_join_required: undefined,
655
659
  },
656
660
  {
657
661
  id: '5',
@@ -667,6 +671,7 @@ export class Stubs {
667
671
  lastMessageId: '',
668
672
  unreadMessageCount: 0,
669
673
  updatedAt: '',
674
+ is_join_required: undefined,
670
675
  },
671
676
  {
672
677
  id: '6',
@@ -682,6 +687,7 @@ export class Stubs {
682
687
  lastMessageId: '',
683
688
  unreadMessageCount: 0,
684
689
  updatedAt: '',
690
+ is_join_required: undefined,
685
691
  },
686
692
  {
687
693
  id: '7',
@@ -697,6 +703,7 @@ export class Stubs {
697
703
  lastMessageId: '',
698
704
  unreadMessageCount: 0,
699
705
  updatedAt: '',
706
+ is_join_required: undefined,
700
707
  },
701
708
  ];
702
709
 
@@ -720,6 +727,7 @@ export class Stubs {
720
727
  updated_at: '02.03.2023',
721
728
  user_id: 0,
722
729
  xmpp_room_jid: null,
730
+ is_join_required: undefined,
723
731
  };
724
732
 
725
733
  return qbDialog;
@@ -742,6 +750,7 @@ export class Stubs {
742
750
  updated_at: '02.03.2023',
743
751
  user_id: 0,
744
752
  xmpp_room_jid: null,
753
+ is_join_required: undefined,
745
754
  };
746
755
 
747
756
  return qbDialog;
@@ -764,6 +773,7 @@ export class Stubs {
764
773
  updated_at: '02.03.2023',
765
774
  user_id: 0,
766
775
  xmpp_room_jid: null,
776
+ is_join_required: undefined,
767
777
  };
768
778
 
769
779
  return qbDialog;
@@ -1029,12 +1039,12 @@ export class Stubs {
1029
1039
  id: '10231',
1030
1040
  type: FileType.image,
1031
1041
  uid: '10231',
1032
- url: 'https://files.readme.io/00b5563-small-qb-logo-docs-white-9px.png',
1042
+ url: 'https://via.placeholder.com/600/92c952',
1033
1043
  file: {
1034
1044
  id: '10231',
1035
1045
  uid: '',
1036
1046
  type: FileType.image,
1037
- url: 'https://files.readme.io/00b5563-small-qb-logo-docs-white-9px.png',
1047
+ url: 'https://via.placeholder.com/600/92c952',
1038
1048
  },
1039
1049
  };
1040
1050
  const photoAttachments: ChatMessageAttachmentEntity[] = [photo];
@@ -29,6 +29,8 @@ export class RemoteDialogDTO {
29
29
 
30
30
  public photo: string;
31
31
 
32
+ public is_join_required: number | undefined | null;
33
+
32
34
  constructor() {
33
35
  this.id = '';
34
36
  this.type = 0;
@@ -54,5 +56,7 @@ export class RemoteDialogDTO {
54
56
  this.name = '';
55
57
 
56
58
  this.photo = '';
59
+
60
+ this.is_join_required = undefined;
57
61
  }
58
62
  }
@@ -667,6 +667,12 @@ export class DialogRemoteDTOMapper implements IMapper {
667
667
 
668
668
  return updatedAt !== undefined;
669
669
  },
670
+ is_join_required(v: unknown): v is RemoteDialogDTO['is_join_required'] {
671
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
672
+ const { is_join_required } = v as RemoteDialogDTO;
673
+
674
+ return true;
675
+ },
670
676
  };
671
677
 
672
678
  if (!dtoValidator.id(data))
@@ -131,6 +131,34 @@ export default class DialogsRepository implements IDialogsRepository {
131
131
  }
132
132
  }
133
133
 
134
+ async createDialogWithAutojoinInRemote(entity: DialogEntity): Promise<DialogEntity> {
135
+ console.log(
136
+ 'call createDialogInRemote in Repository with param: ',
137
+ JSON.stringify(entity),
138
+ );
139
+ const remoteDialogDTO: RemoteDialogDTO =
140
+ await this.dialogRemoteDTOMapper.fromEntity(entity);
141
+
142
+ console.log('have remoteDialogDTO: ', JSON.stringify(remoteDialogDTO));
143
+
144
+ try {
145
+ const resultDTO: RemoteDialogDTO =
146
+ await this.remoteDataSource.createDialogWithAutojoin(remoteDialogDTO);
147
+ const resultEntity: DialogEntity =
148
+ await this.dialogRemoteDTOMapper.toEntity(resultDTO);
149
+
150
+ console.log(
151
+ 'have result entity in createDialogInRemote:',
152
+ JSON.stringify(resultEntity),
153
+ );
154
+
155
+ return Promise.resolve(resultEntity);
156
+ } catch (e) {
157
+ return Promise.reject(e);
158
+ }
159
+ }
160
+
161
+
134
162
  async updateDialogInLocal(entity: DialogEntity): Promise<DialogEntity> {
135
163
  try {
136
164
  const dto: LocalDialogDTO = await this.dialogLocalDTOMapper.fromEntity(
@@ -373,4 +401,33 @@ export default class DialogsRepository implements IDialogsRepository {
373
401
  return Promise.reject(e);
374
402
  }
375
403
  }
404
+
405
+ async unjoinUsersFromDialog(
406
+ dialogId: string,
407
+ ): Promise<boolean> {
408
+ const dialogDTO: RemoteDialogDTO = new RemoteDialogDTO();
409
+
410
+ dialogDTO.id = dialogId;
411
+
412
+ await this.remoteDataSource.unjoinUsersFromDialog(
413
+ dialogDTO,
414
+ );
415
+
416
+ return Promise.resolve(true);
417
+ }
418
+
419
+ async joinUsersFromDialog(
420
+ dialogId: string,
421
+ ): Promise<boolean> {
422
+ const dialogDTO: RemoteDialogDTO = new RemoteDialogDTO();
423
+
424
+ dialogDTO.id = dialogId;
425
+
426
+
427
+ await this.remoteDataSource.joinDialog(
428
+ dialogDTO,
429
+ );
430
+
431
+ return Promise.resolve(true);
432
+ }
376
433
  }
@@ -52,6 +52,8 @@ export interface IRemoteDataSource extends IRemoteMessaging<RemoteMessageDTO> {
52
52
  эксепшны с диаграмы: коннекш фейлд, нет авторизации, запрещен доступ, некоректные данные
53
53
  */
54
54
  createDialog(dto: RemoteDialogDTO): Promise<RemoteDialogDTO>;
55
+
56
+ createDialogWithAutojoin(dto: RemoteDialogDTO): Promise<RemoteDialogDTO>;
55
57
  /*
56
58
  негативный тест - нет такого диалога
57
59
  */
@@ -78,6 +80,14 @@ export interface IRemoteDataSource extends IRemoteMessaging<RemoteMessageDTO> {
78
80
  usersDTO: Array<RemoteUserDTO>,
79
81
  ): Promise<void>;
80
82
 
83
+ unjoinUsersFromDialog(
84
+ dialogDto: RemoteDialogDTO,
85
+ ): Promise<void>;
86
+
87
+ joinDialog(
88
+ dialogDto: RemoteDialogDTO,
89
+ ): Promise<void>;
90
+
81
91
  getUser(dto: RemoteUserDTO): Promise<RemoteUserDTO>;
82
92
 
83
93
  getUsers(dto: RemoteUsersDTO): Promise<RemoteUsersDTO>;
@@ -51,6 +51,7 @@ export class DialogDTOMapper implements IDTOMapper {
51
51
  updated_at: dialogDTO.updatedAt,
52
52
  user_id: parseInt(dialogDTO.ownerId, 10),
53
53
  xmpp_room_jid: null,
54
+ is_join_required: dialogDTO.is_join_required,
54
55
  };
55
56
 
56
57
  return Promise.resolve(dialog as TResult);
@@ -272,6 +273,12 @@ export class DialogDTOMapper implements IDTOMapper {
272
273
 
273
274
  return updatedAt !== undefined && updatedAt !== null;
274
275
  },
276
+ is_join_required(v: unknown): v is RemoteDialogDTO['is_join_required'] {
277
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
278
+ const { is_join_required } = v as RemoteDialogDTO;
279
+
280
+ return true;
281
+ },
275
282
  };
276
283
 
277
284
  if (!dialogDTOValidator.id(dto))
@@ -429,6 +436,12 @@ export class DialogDTOMapper implements IDTOMapper {
429
436
 
430
437
  return xmpp_room_jid !== undefined && xmpp_room_jid !== null;
431
438
  },
439
+ is_join_required(v: unknown): v is RemoteDialogDTO['is_join_required'] {
440
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
441
+ const { is_join_required } = v as RemoteDialogDTO;
442
+
443
+ return true;
444
+ },
432
445
  };
433
446
 
434
447
  if (!qbDialogValidator._id(qbDialog))