@wireapp/wire-apps-js-sdk 0.0.1-alpha
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.
- package/LICENSE +674 -0
- package/README.md +141 -0
- package/build/WireAppSdk.d.ts +31 -0
- package/build/WireAppSdk.d.ts.map +1 -0
- package/build/WireAppSdk.js +159 -0
- package/build/WireAppSdk.js.map +1 -0
- package/build/api/AssetsApiClient.d.ts +12 -0
- package/build/api/AssetsApiClient.d.ts.map +1 -0
- package/build/api/AssetsApiClient.js +67 -0
- package/build/api/AssetsApiClient.js.map +1 -0
- package/build/api/AssetsTransferService.d.ts +12 -0
- package/build/api/AssetsTransferService.d.ts.map +1 -0
- package/build/api/AssetsTransferService.js +80 -0
- package/build/api/AssetsTransferService.js.map +1 -0
- package/build/api/ClientsApiClient.d.ts +13 -0
- package/build/api/ClientsApiClient.d.ts.map +1 -0
- package/build/api/ClientsApiClient.js +59 -0
- package/build/api/ClientsApiClient.js.map +1 -0
- package/build/api/ClientsService.d.ts +10 -0
- package/build/api/ClientsService.d.ts.map +1 -0
- package/build/api/ClientsService.js +45 -0
- package/build/api/ClientsService.js.map +1 -0
- package/build/api/ConversationService.d.ts +83 -0
- package/build/api/ConversationService.d.ts.map +1 -0
- package/build/api/ConversationService.js +534 -0
- package/build/api/ConversationService.js.map +1 -0
- package/build/api/ConversationsApiClient.d.ts +23 -0
- package/build/api/ConversationsApiClient.d.ts.map +1 -0
- package/build/api/ConversationsApiClient.js +113 -0
- package/build/api/ConversationsApiClient.js.map +1 -0
- package/build/api/FeatureConfigsApiClient.d.ts +9 -0
- package/build/api/FeatureConfigsApiClient.d.ts.map +1 -0
- package/build/api/FeatureConfigsApiClient.js +43 -0
- package/build/api/FeatureConfigsApiClient.js.map +1 -0
- package/build/api/FeatureConfigsService.d.ts +8 -0
- package/build/api/FeatureConfigsService.d.ts.map +1 -0
- package/build/api/FeatureConfigsService.js +45 -0
- package/build/api/FeatureConfigsService.js.map +1 -0
- package/build/api/MlsApiClient.d.ts +23 -0
- package/build/api/MlsApiClient.d.ts.map +1 -0
- package/build/api/MlsApiClient.js +77 -0
- package/build/api/MlsApiClient.js.map +1 -0
- package/build/api/MlsService.d.ts +17 -0
- package/build/api/MlsService.d.ts.map +1 -0
- package/build/api/MlsService.js +87 -0
- package/build/api/MlsService.js.map +1 -0
- package/build/api/NotificationsApiClient.d.ts +17 -0
- package/build/api/NotificationsApiClient.d.ts.map +1 -0
- package/build/api/NotificationsApiClient.js +60 -0
- package/build/api/NotificationsApiClient.js.map +1 -0
- package/build/api/OneToOneConversationsApiClient.d.ts +11 -0
- package/build/api/OneToOneConversationsApiClient.d.ts.map +1 -0
- package/build/api/OneToOneConversationsApiClient.js +45 -0
- package/build/api/OneToOneConversationsApiClient.js.map +1 -0
- package/build/api/SearchApiClient.d.ts +9 -0
- package/build/api/SearchApiClient.d.ts.map +1 -0
- package/build/api/SearchApiClient.js +61 -0
- package/build/api/SearchApiClient.js.map +1 -0
- package/build/api/TeamsApiClient.d.ts +11 -0
- package/build/api/TeamsApiClient.d.ts.map +1 -0
- package/build/api/TeamsApiClient.js +47 -0
- package/build/api/TeamsApiClient.js.map +1 -0
- package/build/api/UserService.d.ts +28 -0
- package/build/api/UserService.d.ts.map +1 -0
- package/build/api/UserService.js +90 -0
- package/build/api/UserService.js.map +1 -0
- package/build/api/UsersApiClient.d.ts +12 -0
- package/build/api/UsersApiClient.d.ts.map +1 -0
- package/build/api/UsersApiClient.js +63 -0
- package/build/api/UsersApiClient.js.map +1 -0
- package/build/api/model/AddMembersToConversationResult.d.ts +6 -0
- package/build/api/model/AddMembersToConversationResult.d.ts.map +1 -0
- package/build/api/model/AddMembersToConversationResult.js +17 -0
- package/build/api/model/AddMembersToConversationResult.js.map +1 -0
- package/build/api/model/ConversationIdsPaginationConfig.d.ts +5 -0
- package/build/api/model/ConversationIdsPaginationConfig.d.ts.map +1 -0
- package/build/api/model/ConversationIdsPaginationConfig.js +17 -0
- package/build/api/model/ConversationIdsPaginationConfig.js.map +1 -0
- package/build/api/model/ConversationMemberOtherResponse.d.ts +7 -0
- package/build/api/model/ConversationMemberOtherResponse.d.ts.map +1 -0
- package/build/api/model/ConversationMemberOtherResponse.js +17 -0
- package/build/api/model/ConversationMemberOtherResponse.js.map +1 -0
- package/build/api/model/ConversationMemberSelfResponse.d.ts +7 -0
- package/build/api/model/ConversationMemberSelfResponse.d.ts.map +1 -0
- package/build/api/model/ConversationMemberSelfResponse.js +17 -0
- package/build/api/model/ConversationMemberSelfResponse.js.map +1 -0
- package/build/api/model/ConversationMembersResponse.d.ts +7 -0
- package/build/api/model/ConversationMembersResponse.d.ts.map +1 -0
- package/build/api/model/ConversationMembersResponse.js +17 -0
- package/build/api/model/ConversationMembersResponse.js.map +1 -0
- package/build/api/model/ConversationTeamInfo.d.ts +5 -0
- package/build/api/model/ConversationTeamInfo.d.ts.map +1 -0
- package/build/api/model/ConversationTeamInfo.js +17 -0
- package/build/api/model/ConversationTeamInfo.js.map +1 -0
- package/build/api/model/RemoveMembersFromConversationResult.d.ts +5 -0
- package/build/api/model/RemoveMembersFromConversationResult.d.ts.map +1 -0
- package/build/api/model/RemoveMembersFromConversationResult.js +17 -0
- package/build/api/model/RemoveMembersFromConversationResult.js.map +1 -0
- package/build/api/model/UserClientResponse.d.ts +4 -0
- package/build/api/model/UserClientResponse.d.ts.map +1 -0
- package/build/api/model/UserClientResponse.js +17 -0
- package/build/api/model/UserClientResponse.js.map +1 -0
- package/build/api/model/UserResponse.d.ts +12 -0
- package/build/api/model/UserResponse.d.ts.map +1 -0
- package/build/api/model/UserResponse.js +17 -0
- package/build/api/model/UserResponse.js.map +1 -0
- package/build/api/model/asset/AssetUploadData.d.ts +5 -0
- package/build/api/model/asset/AssetUploadData.d.ts.map +1 -0
- package/build/api/model/asset/AssetUploadData.js +17 -0
- package/build/api/model/asset/AssetUploadData.js.map +1 -0
- package/build/api/model/asset/AssetUploadResponse.d.ts +7 -0
- package/build/api/model/asset/AssetUploadResponse.d.ts.map +1 -0
- package/build/api/model/asset/AssetUploadResponse.js +17 -0
- package/build/api/model/asset/AssetUploadResponse.js.map +1 -0
- package/build/api/request/CapabilitiesRequest.d.ts +4 -0
- package/build/api/request/CapabilitiesRequest.d.ts.map +1 -0
- package/build/api/request/CapabilitiesRequest.js +20 -0
- package/build/api/request/CapabilitiesRequest.js.map +1 -0
- package/build/api/request/ClientUpdateRequest.d.ts +5 -0
- package/build/api/request/ClientUpdateRequest.d.ts.map +1 -0
- package/build/api/request/ClientUpdateRequest.js +17 -0
- package/build/api/request/ClientUpdateRequest.js.map +1 -0
- package/build/api/request/ConversationIdsRequest.d.ts +5 -0
- package/build/api/request/ConversationIdsRequest.d.ts.map +1 -0
- package/build/api/request/ConversationIdsRequest.js +17 -0
- package/build/api/request/ConversationIdsRequest.js.map +1 -0
- package/build/api/request/CreateConversationRequest.d.ts +30 -0
- package/build/api/request/CreateConversationRequest.d.ts.map +1 -0
- package/build/api/request/CreateConversationRequest.js +57 -0
- package/build/api/request/CreateConversationRequest.js.map +1 -0
- package/build/api/request/MlsKeyPackagesRequest.d.ts +4 -0
- package/build/api/request/MlsKeyPackagesRequest.d.ts.map +1 -0
- package/build/api/request/MlsKeyPackagesRequest.js +17 -0
- package/build/api/request/MlsKeyPackagesRequest.js.map +1 -0
- package/build/api/request/PreKeyRequest.d.ts +6 -0
- package/build/api/request/PreKeyRequest.d.ts.map +1 -0
- package/build/api/request/PreKeyRequest.js +24 -0
- package/build/api/request/PreKeyRequest.js.map +1 -0
- package/build/api/request/RegisterClientRequest.d.ts +14 -0
- package/build/api/request/RegisterClientRequest.d.ts.map +1 -0
- package/build/api/request/RegisterClientRequest.js +36 -0
- package/build/api/request/RegisterClientRequest.js.map +1 -0
- package/build/api/response/AccessResponse.d.ts +7 -0
- package/build/api/response/AccessResponse.d.ts.map +1 -0
- package/build/api/response/AccessResponse.js +17 -0
- package/build/api/response/AccessResponse.js.map +1 -0
- package/build/api/response/ClaimedKeyPackageList.d.ts +14 -0
- package/build/api/response/ClaimedKeyPackageList.d.ts.map +1 -0
- package/build/api/response/ClaimedKeyPackageList.js +17 -0
- package/build/api/response/ClaimedKeyPackageList.js.map +1 -0
- package/build/api/response/ConversationIdsResponse.d.ts +7 -0
- package/build/api/response/ConversationIdsResponse.d.ts.map +1 -0
- package/build/api/response/ConversationIdsResponse.js +17 -0
- package/build/api/response/ConversationIdsResponse.js.map +1 -0
- package/build/api/response/ConversationResponse.d.ts +16 -0
- package/build/api/response/ConversationResponse.d.ts.map +1 -0
- package/build/api/response/ConversationResponse.js +17 -0
- package/build/api/response/ConversationResponse.js.map +1 -0
- package/build/api/response/ConversationsResponse.d.ts +8 -0
- package/build/api/response/ConversationsResponse.d.ts.map +1 -0
- package/build/api/response/ConversationsResponse.js +17 -0
- package/build/api/response/ConversationsResponse.js.map +1 -0
- package/build/api/response/EventResponse.d.ts +7 -0
- package/build/api/response/EventResponse.d.ts.map +1 -0
- package/build/api/response/EventResponse.js +17 -0
- package/build/api/response/EventResponse.js.map +1 -0
- package/build/api/response/FeatureConfigsResponse.d.ts +19 -0
- package/build/api/response/FeatureConfigsResponse.d.ts.map +1 -0
- package/build/api/response/FeatureConfigsResponse.js +17 -0
- package/build/api/response/FeatureConfigsResponse.js.map +1 -0
- package/build/api/response/MlsPublicKeysResponse.d.ts +7 -0
- package/build/api/response/MlsPublicKeysResponse.d.ts.map +1 -0
- package/build/api/response/MlsPublicKeysResponse.js +42 -0
- package/build/api/response/MlsPublicKeysResponse.js.map +1 -0
- package/build/api/response/NotificationsResponse.d.ts +7 -0
- package/build/api/response/NotificationsResponse.d.ts.map +1 -0
- package/build/api/response/NotificationsResponse.js +17 -0
- package/build/api/response/NotificationsResponse.js.map +1 -0
- package/build/api/response/OneToOneConversationResponse.d.ts +7 -0
- package/build/api/response/OneToOneConversationResponse.d.ts.map +1 -0
- package/build/api/response/OneToOneConversationResponse.js +17 -0
- package/build/api/response/OneToOneConversationResponse.js.map +1 -0
- package/build/api/response/RegisterClientResponse.d.ts +4 -0
- package/build/api/response/RegisterClientResponse.d.ts.map +1 -0
- package/build/api/response/RegisterClientResponse.js +17 -0
- package/build/api/response/RegisterClientResponse.js.map +1 -0
- package/build/api/response/SearchContactsResponse.d.ts +15 -0
- package/build/api/response/SearchContactsResponse.d.ts.map +1 -0
- package/build/api/response/SearchContactsResponse.js +17 -0
- package/build/api/response/SearchContactsResponse.js.map +1 -0
- package/build/core/CoreCryptoClient.d.ts +48 -0
- package/build/core/CoreCryptoClient.d.ts.map +1 -0
- package/build/core/CoreCryptoClient.js +219 -0
- package/build/core/CoreCryptoClient.js.map +1 -0
- package/build/core/CoreCryptoMlsTransport.d.ts +19 -0
- package/build/core/CoreCryptoMlsTransport.d.ts.map +1 -0
- package/build/core/CoreCryptoMlsTransport.js +64 -0
- package/build/core/CoreCryptoMlsTransport.js.map +1 -0
- package/build/core/CoreCryptoService.d.ts +59 -0
- package/build/core/CoreCryptoService.d.ts.map +1 -0
- package/build/core/CoreCryptoService.js +233 -0
- package/build/core/CoreCryptoService.js.map +1 -0
- package/build/core/HttpClient.d.ts +47 -0
- package/build/core/HttpClient.d.ts.map +1 -0
- package/build/core/HttpClient.js +258 -0
- package/build/core/HttpClient.js.map +1 -0
- package/build/core/HttpRetryHelper.d.ts +16 -0
- package/build/core/HttpRetryHelper.d.ts.map +1 -0
- package/build/core/HttpRetryHelper.js +49 -0
- package/build/core/HttpRetryHelper.js.map +1 -0
- package/build/core/HttpRetryPolicy.d.ts +7 -0
- package/build/core/HttpRetryPolicy.d.ts.map +1 -0
- package/build/core/HttpRetryPolicy.js +29 -0
- package/build/core/HttpRetryPolicy.js.map +1 -0
- package/build/core/WebSocketClient.d.ts +37 -0
- package/build/core/WebSocketClient.d.ts.map +1 -0
- package/build/core/WebSocketClient.js +244 -0
- package/build/core/WebSocketClient.js.map +1 -0
- package/build/core/WireApplicationManager.d.ts +39 -0
- package/build/core/WireApplicationManager.d.ts.map +1 -0
- package/build/core/WireApplicationManager.js +142 -0
- package/build/core/WireApplicationManager.js.map +1 -0
- package/build/core/WireEventsHandler.d.ts +33 -0
- package/build/core/WireEventsHandler.d.ts.map +1 -0
- package/build/core/WireEventsHandler.js +78 -0
- package/build/core/WireEventsHandler.js.map +1 -0
- package/build/core/event/DeleteConversationEventProcessor.d.ts +13 -0
- package/build/core/event/DeleteConversationEventProcessor.d.ts.map +1 -0
- package/build/core/event/DeleteConversationEventProcessor.js +58 -0
- package/build/core/event/DeleteConversationEventProcessor.js.map +1 -0
- package/build/core/event/EventProcessor.d.ts +6 -0
- package/build/core/event/EventProcessor.d.ts.map +1 -0
- package/build/core/event/EventProcessor.js +17 -0
- package/build/core/event/EventProcessor.js.map +1 -0
- package/build/core/event/EventRouter.d.ts +10 -0
- package/build/core/event/EventRouter.d.ts.map +1 -0
- package/build/core/event/EventRouter.js +58 -0
- package/build/core/event/EventRouter.js.map +1 -0
- package/build/core/event/MemberJoinEventProcessor.d.ts +13 -0
- package/build/core/event/MemberJoinEventProcessor.d.ts.map +1 -0
- package/build/core/event/MemberJoinEventProcessor.js +63 -0
- package/build/core/event/MemberJoinEventProcessor.js.map +1 -0
- package/build/core/event/MemberLeaveEventProcessor.d.ts +13 -0
- package/build/core/event/MemberLeaveEventProcessor.d.ts.map +1 -0
- package/build/core/event/MemberLeaveEventProcessor.js +58 -0
- package/build/core/event/MemberLeaveEventProcessor.js.map +1 -0
- package/build/core/event/MemberUpdateEventProcessor.d.ts +11 -0
- package/build/core/event/MemberUpdateEventProcessor.d.ts.map +1 -0
- package/build/core/event/MemberUpdateEventProcessor.js +50 -0
- package/build/core/event/MemberUpdateEventProcessor.js.map +1 -0
- package/build/core/event/MlsMessageEventProcessor.d.ts +18 -0
- package/build/core/event/MlsMessageEventProcessor.d.ts.map +1 -0
- package/build/core/event/MlsMessageEventProcessor.js +134 -0
- package/build/core/event/MlsMessageEventProcessor.js.map +1 -0
- package/build/core/event/MlsResetEventProcessor.d.ts +11 -0
- package/build/core/event/MlsResetEventProcessor.d.ts.map +1 -0
- package/build/core/event/MlsResetEventProcessor.js +48 -0
- package/build/core/event/MlsResetEventProcessor.js.map +1 -0
- package/build/core/event/MlsWelcomeEventProcessor.d.ts +18 -0
- package/build/core/event/MlsWelcomeEventProcessor.d.ts.map +1 -0
- package/build/core/event/MlsWelcomeEventProcessor.js +77 -0
- package/build/core/event/MlsWelcomeEventProcessor.js.map +1 -0
- package/build/core/event/NewConversationEventProcessor.d.ts +11 -0
- package/build/core/event/NewConversationEventProcessor.d.ts.map +1 -0
- package/build/core/event/NewConversationEventProcessor.js +49 -0
- package/build/core/event/NewConversationEventProcessor.js.map +1 -0
- package/build/core/event/processors.index.d.ts +9 -0
- package/build/core/event/processors.index.d.ts.map +1 -0
- package/build/core/event/processors.index.js +24 -0
- package/build/core/event/processors.index.js.map +1 -0
- package/build/db/AppPropertiesRepository.d.ts +16 -0
- package/build/db/AppPropertiesRepository.d.ts.map +1 -0
- package/build/db/AppPropertiesRepository.js +64 -0
- package/build/db/AppPropertiesRepository.js.map +1 -0
- package/build/db/ConversationMemberRepository.d.ts +23 -0
- package/build/db/ConversationMemberRepository.d.ts.map +1 -0
- package/build/db/ConversationMemberRepository.js +125 -0
- package/build/db/ConversationMemberRepository.js.map +1 -0
- package/build/db/ConversationRepository.d.ts +17 -0
- package/build/db/ConversationRepository.d.ts.map +1 -0
- package/build/db/ConversationRepository.js +100 -0
- package/build/db/ConversationRepository.js.map +1 -0
- package/build/db/DatabaseService.d.ts +12 -0
- package/build/db/DatabaseService.d.ts.map +1 -0
- package/build/db/DatabaseService.js +73 -0
- package/build/db/DatabaseService.js.map +1 -0
- package/build/db/migrations/0000_pink_lord_tyger.sql +27 -0
- package/build/db/migrations/0001_steady_selene.sql +16 -0
- package/build/db/migrations/meta/0000_snapshot.json +194 -0
- package/build/db/migrations/meta/0001_snapshot.json +197 -0
- package/build/db/migrations/meta/_journal.json +20 -0
- package/build/db/model/AppEntity.d.ts +5 -0
- package/build/db/model/AppEntity.d.ts.map +1 -0
- package/build/db/model/AppEntity.js +17 -0
- package/build/db/model/AppEntity.js.map +1 -0
- package/build/db/model/ConversationEntity.d.ts +11 -0
- package/build/db/model/ConversationEntity.d.ts.map +1 -0
- package/build/db/model/ConversationEntity.js +17 -0
- package/build/db/model/ConversationEntity.js.map +1 -0
- package/build/db/model/ConversationMemberEntity.d.ts +9 -0
- package/build/db/model/ConversationMemberEntity.d.ts.map +1 -0
- package/build/db/model/ConversationMemberEntity.js +17 -0
- package/build/db/model/ConversationMemberEntity.js.map +1 -0
- package/build/db/relations.d.ts +7 -0
- package/build/db/relations.d.ts.map +1 -0
- package/build/db/relations.js +12 -0
- package/build/db/relations.js.map +1 -0
- package/build/db/schema.d.ts +324 -0
- package/build/db/schema.d.ts.map +1 -0
- package/build/db/schema.js +34 -0
- package/build/db/schema.js.map +1 -0
- package/build/generated/messages.d.ts +5517 -0
- package/build/generated/messages.d.ts.map +1 -0
- package/build/generated/messages.js +14470 -0
- package/build/generated/messages.js.map +1 -0
- package/build/generated/package.json +3 -0
- package/build/index.d.ts +14 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +34 -0
- package/build/index.js.map +1 -0
- package/build/mappers/PreKeyMapper.d.ts +4 -0
- package/build/mappers/PreKeyMapper.d.ts.map +1 -0
- package/build/mappers/PreKeyMapper.js +22 -0
- package/build/mappers/PreKeyMapper.js.map +1 -0
- package/build/mappers/conversation/ConversationMapper.d.ts +6 -0
- package/build/mappers/conversation/ConversationMapper.d.ts.map +1 -0
- package/build/mappers/conversation/ConversationMapper.js +27 -0
- package/build/mappers/conversation/ConversationMapper.js.map +1 -0
- package/build/mappers/conversation/ConversationMemberMapper.d.ts +6 -0
- package/build/mappers/conversation/ConversationMemberMapper.d.ts.map +1 -0
- package/build/mappers/conversation/ConversationMemberMapper.js +25 -0
- package/build/mappers/conversation/ConversationMemberMapper.js.map +1 -0
- package/build/mappers/protobuf/EncryptionAlgorithmMapper.d.ts +7 -0
- package/build/mappers/protobuf/EncryptionAlgorithmMapper.d.ts.map +1 -0
- package/build/mappers/protobuf/EncryptionAlgorithmMapper.js +35 -0
- package/build/mappers/protobuf/EncryptionAlgorithmMapper.js.map +1 -0
- package/build/mappers/protobuf/MessageContentEncoder.d.ts +9 -0
- package/build/mappers/protobuf/MessageContentEncoder.d.ts.map +1 -0
- package/build/mappers/protobuf/MessageContentEncoder.js +85 -0
- package/build/mappers/protobuf/MessageContentEncoder.js.map +1 -0
- package/build/mappers/protobuf/MessageLinkPreviewMapper.d.ts +7 -0
- package/build/mappers/protobuf/MessageLinkPreviewMapper.d.ts.map +1 -0
- package/build/mappers/protobuf/MessageLinkPreviewMapper.js +79 -0
- package/build/mappers/protobuf/MessageLinkPreviewMapper.js.map +1 -0
- package/build/mappers/protobuf/MessageMentionMapper.d.ts +7 -0
- package/build/mappers/protobuf/MessageMentionMapper.d.ts.map +1 -0
- package/build/mappers/protobuf/MessageMentionMapper.js +39 -0
- package/build/mappers/protobuf/MessageMentionMapper.js.map +1 -0
- package/build/mappers/protobuf/ProtobufDeserializer.d.ts +12 -0
- package/build/mappers/protobuf/ProtobufDeserializer.d.ts.map +1 -0
- package/build/mappers/protobuf/ProtobufDeserializer.js +343 -0
- package/build/mappers/protobuf/ProtobufDeserializer.js.map +1 -0
- package/build/mappers/protobuf/ProtobufSerializer.d.ts +15 -0
- package/build/mappers/protobuf/ProtobufSerializer.d.ts.map +1 -0
- package/build/mappers/protobuf/ProtobufSerializer.js +331 -0
- package/build/mappers/protobuf/ProtobufSerializer.js.map +1 -0
- package/build/model/Asset.d.ts +9 -0
- package/build/model/Asset.d.ts.map +1 -0
- package/build/model/Asset.js +17 -0
- package/build/model/Asset.js.map +1 -0
- package/build/model/ClaimedKeyPackagesResult.d.ts +7 -0
- package/build/model/ClaimedKeyPackagesResult.d.ts.map +1 -0
- package/build/model/ClaimedKeyPackagesResult.js +17 -0
- package/build/model/ClaimedKeyPackagesResult.js.map +1 -0
- package/build/model/CryptoClientId.d.ts +8 -0
- package/build/model/CryptoClientId.d.ts.map +1 -0
- package/build/model/CryptoClientId.js +29 -0
- package/build/model/CryptoClientId.js.map +1 -0
- package/build/model/CryptoProtocol.d.ts +6 -0
- package/build/model/CryptoProtocol.d.ts.map +1 -0
- package/build/model/CryptoProtocol.js +22 -0
- package/build/model/CryptoProtocol.js.map +1 -0
- package/build/model/EventContentDTO.d.ts +84 -0
- package/build/model/EventContentDTO.d.ts.map +1 -0
- package/build/model/EventContentDTO.js +17 -0
- package/build/model/EventContentDTO.js.map +1 -0
- package/build/model/MlsPublicKeys.d.ts +7 -0
- package/build/model/MlsPublicKeys.d.ts.map +1 -0
- package/build/model/MlsPublicKeys.js +17 -0
- package/build/model/MlsPublicKeys.js.map +1 -0
- package/build/model/PreKeyCrypto.d.ts +6 -0
- package/build/model/PreKeyCrypto.d.ts.map +1 -0
- package/build/model/PreKeyCrypto.js +24 -0
- package/build/model/PreKeyCrypto.js.map +1 -0
- package/build/model/QualifiedId.d.ts +17 -0
- package/build/model/QualifiedId.d.ts.map +1 -0
- package/build/model/QualifiedId.js +43 -0
- package/build/model/QualifiedId.js.map +1 -0
- package/build/model/TeamId.d.ts +6 -0
- package/build/model/TeamId.d.ts.map +1 -0
- package/build/model/TeamId.js +26 -0
- package/build/model/TeamId.js.map +1 -0
- package/build/model/WireMessage.d.ts +336 -0
- package/build/model/WireMessage.d.ts.map +1 -0
- package/build/model/WireMessage.js +270 -0
- package/build/model/WireMessage.js.map +1 -0
- package/build/model/WireUser.d.ts +12 -0
- package/build/model/WireUser.d.ts.map +1 -0
- package/build/model/WireUser.js +32 -0
- package/build/model/WireUser.js.map +1 -0
- package/build/model/conversation/ChannelAddPermissionType.d.ts +7 -0
- package/build/model/conversation/ChannelAddPermissionType.d.ts.map +1 -0
- package/build/model/conversation/ChannelAddPermissionType.js +23 -0
- package/build/model/conversation/ChannelAddPermissionType.js.map +1 -0
- package/build/model/conversation/Conversation.d.ts +9 -0
- package/build/model/conversation/Conversation.d.ts.map +1 -0
- package/build/model/conversation/Conversation.js +17 -0
- package/build/model/conversation/Conversation.js.map +1 -0
- package/build/model/conversation/ConversationAccess.d.ts +8 -0
- package/build/model/conversation/ConversationAccess.d.ts.map +1 -0
- package/build/model/conversation/ConversationAccess.js +24 -0
- package/build/model/conversation/ConversationAccess.js.map +1 -0
- package/build/model/conversation/ConversationAccessRole.d.ts +8 -0
- package/build/model/conversation/ConversationAccessRole.d.ts.map +1 -0
- package/build/model/conversation/ConversationAccessRole.js +24 -0
- package/build/model/conversation/ConversationAccessRole.js.map +1 -0
- package/build/model/conversation/ConversationMember.d.ts +7 -0
- package/build/model/conversation/ConversationMember.d.ts.map +1 -0
- package/build/model/conversation/ConversationMember.js +17 -0
- package/build/model/conversation/ConversationMember.js.map +1 -0
- package/build/model/conversation/ConversationRole.d.ts +6 -0
- package/build/model/conversation/ConversationRole.d.ts.map +1 -0
- package/build/model/conversation/ConversationRole.js +29 -0
- package/build/model/conversation/ConversationRole.js.map +1 -0
- package/build/model/conversation/ConversationType.d.ts +6 -0
- package/build/model/conversation/ConversationType.d.ts.map +1 -0
- package/build/model/conversation/ConversationType.js +22 -0
- package/build/model/conversation/ConversationType.js.map +1 -0
- package/build/model/conversation/GroupConversationType.d.ts +5 -0
- package/build/model/conversation/GroupConversationType.d.ts.map +1 -0
- package/build/model/conversation/GroupConversationType.js +21 -0
- package/build/model/conversation/GroupConversationType.js.map +1 -0
- package/build/model/conversation/ReceiptMode.d.ts +5 -0
- package/build/model/conversation/ReceiptMode.d.ts.map +1 -0
- package/build/model/conversation/ReceiptMode.js +21 -0
- package/build/model/conversation/ReceiptMode.js.map +1 -0
- package/build/model/exception/CoreCryptoMlsException.d.ts +5 -0
- package/build/model/exception/CoreCryptoMlsException.d.ts.map +1 -0
- package/build/model/exception/CoreCryptoMlsException.js +25 -0
- package/build/model/exception/CoreCryptoMlsException.js.map +1 -0
- package/build/model/exception/MlsException.d.ts +5 -0
- package/build/model/exception/MlsException.d.ts.map +1 -0
- package/build/model/exception/MlsException.js +25 -0
- package/build/model/exception/MlsException.js.map +1 -0
- package/build/model/exception/WireApiError.d.ts +6 -0
- package/build/model/exception/WireApiError.d.ts.map +1 -0
- package/build/model/exception/WireApiError.js +17 -0
- package/build/model/exception/WireApiError.js.map +1 -0
- package/build/model/exception/WireApiException.d.ts +8 -0
- package/build/model/exception/WireApiException.d.ts.map +1 -0
- package/build/model/exception/WireApiException.js +29 -0
- package/build/model/exception/WireApiException.js.map +1 -0
- package/build/model/protobuf/MessageEncryptionAlgorithm.d.ts +5 -0
- package/build/model/protobuf/MessageEncryptionAlgorithm.d.ts.map +1 -0
- package/build/model/protobuf/MessageEncryptionAlgorithm.js +21 -0
- package/build/model/protobuf/MessageEncryptionAlgorithm.js.map +1 -0
- package/build/service/AppProperties.d.ts +25 -0
- package/build/service/AppProperties.d.ts.map +1 -0
- package/build/service/AppProperties.js +105 -0
- package/build/service/AppProperties.js.map +1 -0
- package/build/service/MlsFallbackStrategy.d.ts +11 -0
- package/build/service/MlsFallbackStrategy.d.ts.map +1 -0
- package/build/service/MlsFallbackStrategy.js +57 -0
- package/build/service/MlsFallbackStrategy.js.map +1 -0
- package/build/service/NotificationsService.d.ts +14 -0
- package/build/service/NotificationsService.d.ts.map +1 -0
- package/build/service/NotificationsService.js +71 -0
- package/build/service/NotificationsService.js.map +1 -0
- package/build/utils/AESUtils.d.ts +11 -0
- package/build/utils/AESUtils.d.ts.map +1 -0
- package/build/utils/AESUtils.js +47 -0
- package/build/utils/AESUtils.js.map +1 -0
- package/build/utils/BufferUtils.d.ts +2 -0
- package/build/utils/BufferUtils.d.ts.map +1 -0
- package/build/utils/BufferUtils.js +17 -0
- package/build/utils/BufferUtils.js.map +1 -0
- package/build/utils/DependencyInjectionTokens.d.ts +8 -0
- package/build/utils/DependencyInjectionTokens.d.ts.map +1 -0
- package/build/utils/DependencyInjectionTokens.js +23 -0
- package/build/utils/DependencyInjectionTokens.js.map +1 -0
- package/build/utils/HashUtils.d.ts +5 -0
- package/build/utils/HashUtils.d.ts.map +1 -0
- package/build/utils/HashUtils.js +25 -0
- package/build/utils/HashUtils.js.map +1 -0
- package/build/utils/ObfuscateUtil.d.ts +3 -0
- package/build/utils/ObfuscateUtil.d.ts.map +1 -0
- package/build/utils/ObfuscateUtil.js +30 -0
- package/build/utils/ObfuscateUtil.js.map +1 -0
- package/build/utils/StoragePaths.d.ts +4 -0
- package/build/utils/StoragePaths.d.ts.map +1 -0
- package/build/utils/StoragePaths.js +22 -0
- package/build/utils/StoragePaths.js.map +1 -0
- package/build/utils/logger/ConsoleLogger.d.ts +12 -0
- package/build/utils/logger/ConsoleLogger.d.ts.map +1 -0
- package/build/utils/logger/ConsoleLogger.js +31 -0
- package/build/utils/logger/ConsoleLogger.js.map +1 -0
- package/build/utils/logger/LogLevel.d.ts +7 -0
- package/build/utils/logger/LogLevel.d.ts.map +1 -0
- package/build/utils/logger/LogLevel.js +8 -0
- package/build/utils/logger/LogLevel.js.map +1 -0
- package/build/utils/logger/Logger.d.ts +27 -0
- package/build/utils/logger/Logger.d.ts.map +1 -0
- package/build/utils/logger/Logger.js +2 -0
- package/build/utils/logger/Logger.js.map +1 -0
- package/build/utils/logger/LoggerFactory.d.ts +7 -0
- package/build/utils/logger/LoggerFactory.d.ts.map +1 -0
- package/build/utils/logger/LoggerFactory.js +19 -0
- package/build/utils/logger/LoggerFactory.js.map +1 -0
- package/package.json +105 -0
- package/src/WireAppSdk.ts +224 -0
- package/src/api/AssetsApiClient.ts +77 -0
- package/src/api/AssetsTransferService.ts +96 -0
- package/src/api/ClientsApiClient.ts +71 -0
- package/src/api/ClientsService.ts +40 -0
- package/src/api/ConversationService.ts +654 -0
- package/src/api/ConversationsApiClient.ts +141 -0
- package/src/api/FeatureConfigsApiClient.ts +31 -0
- package/src/api/FeatureConfigsService.ts +33 -0
- package/src/api/MlsApiClient.ts +81 -0
- package/src/api/MlsService.ts +99 -0
- package/src/api/NotificationsApiClient.ts +58 -0
- package/src/api/OneToOneConversationsApiClient.ts +39 -0
- package/src/api/SearchApiClient.ts +58 -0
- package/src/api/TeamsApiClient.ts +40 -0
- package/src/api/UserService.ts +111 -0
- package/src/api/UsersApiClient.ts +61 -0
- package/src/api/model/AddMembersToConversationResult.ts +22 -0
- package/src/api/model/ConversationIdsPaginationConfig.ts +20 -0
- package/src/api/model/ConversationMemberOtherResponse.ts +23 -0
- package/src/api/model/ConversationMemberSelfResponse.ts +23 -0
- package/src/api/model/ConversationMembersResponse.ts +23 -0
- package/src/api/model/ConversationTeamInfo.ts +20 -0
- package/src/api/model/RemoveMembersFromConversationResult.ts +21 -0
- package/src/api/model/UserClientResponse.ts +19 -0
- package/src/api/model/UserResponse.ts +28 -0
- package/src/api/model/asset/AssetUploadData.ts +20 -0
- package/src/api/model/asset/AssetUploadResponse.ts +22 -0
- package/src/api/request/CapabilitiesRequest.ts +19 -0
- package/src/api/request/ClientUpdateRequest.ts +21 -0
- package/src/api/request/ConversationIdsRequest.ts +21 -0
- package/src/api/request/CreateConversationRequest.ts +86 -0
- package/src/api/request/MlsKeyPackagesRequest.ts +19 -0
- package/src/api/request/PreKeyRequest.ts +28 -0
- package/src/api/request/RegisterClientRequest.ts +46 -0
- package/src/api/response/AccessResponse.ts +22 -0
- package/src/api/response/ClaimedKeyPackageList.ts +30 -0
- package/src/api/response/ConversationIdsResponse.ts +23 -0
- package/src/api/response/ConversationResponse.ts +32 -0
- package/src/api/response/ConversationsResponse.ts +24 -0
- package/src/api/response/EventResponse.ts +23 -0
- package/src/api/response/FeatureConfigsResponse.ts +37 -0
- package/src/api/response/MlsPublicKeysResponse.ts +58 -0
- package/src/api/response/NotificationsResponse.ts +23 -0
- package/src/api/response/OneToOneConversationResponse.ts +24 -0
- package/src/api/response/RegisterClientResponse.ts +19 -0
- package/src/api/response/SearchContactsResponse.ts +32 -0
- package/src/core/CoreCryptoClient.ts +361 -0
- package/src/core/CoreCryptoMlsTransport.ts +58 -0
- package/src/core/CoreCryptoService.ts +276 -0
- package/src/core/HttpClient.ts +363 -0
- package/src/core/HttpRetryHelper.ts +57 -0
- package/src/core/HttpRetryPolicy.ts +40 -0
- package/src/core/WebSocketClient.ts +245 -0
- package/src/core/WireApplicationManager.ts +162 -0
- package/src/core/WireEventsHandler.ts +118 -0
- package/src/core/event/DeleteConversationEventProcessor.ts +47 -0
- package/src/core/event/EventProcessor.ts +22 -0
- package/src/core/event/EventRouter.ts +54 -0
- package/src/core/event/MemberJoinEventProcessor.ts +54 -0
- package/src/core/event/MemberLeaveEventProcessor.ts +47 -0
- package/src/core/event/MemberUpdateEventProcessor.ts +44 -0
- package/src/core/event/MlsMessageEventProcessor.ts +124 -0
- package/src/core/event/MlsResetEventProcessor.ts +42 -0
- package/src/core/event/MlsWelcomeEventProcessor.ts +68 -0
- package/src/core/event/NewConversationEventProcessor.ts +42 -0
- package/src/core/event/processors.index.ts +24 -0
- package/src/db/AppPropertiesRepository.ts +62 -0
- package/src/db/ConversationMemberRepository.ts +163 -0
- package/src/db/ConversationRepository.ts +119 -0
- package/src/db/DatabaseService.ts +69 -0
- package/src/db/migrations/0000_pink_lord_tyger.sql +27 -0
- package/src/db/migrations/0001_steady_selene.sql +16 -0
- package/src/db/migrations/meta/0000_snapshot.json +194 -0
- package/src/db/migrations/meta/0001_snapshot.json +197 -0
- package/src/db/migrations/meta/_journal.json +20 -0
- package/src/db/model/AppEntity.ts +20 -0
- package/src/db/model/ConversationEntity.ts +27 -0
- package/src/db/model/ConversationMemberEntity.ts +24 -0
- package/src/db/relations.ts +13 -0
- package/src/db/schema.ts +38 -0
- package/src/index.ts +67 -0
- package/src/mappers/PreKeyMapper.ts +25 -0
- package/src/mappers/conversation/ConversationMapper.ts +30 -0
- package/src/mappers/conversation/ConversationMemberMapper.ts +30 -0
- package/src/mappers/protobuf/EncryptionAlgorithmMapper.ts +39 -0
- package/src/mappers/protobuf/MessageContentEncoder.ts +121 -0
- package/src/mappers/protobuf/MessageLinkPreviewMapper.ts +89 -0
- package/src/mappers/protobuf/MessageMentionMapper.ts +43 -0
- package/src/mappers/protobuf/ProtobufDeserializer.ts +470 -0
- package/src/mappers/protobuf/ProtobufSerializer.ts +449 -0
- package/src/model/Asset.ts +26 -0
- package/src/model/ClaimedKeyPackagesResult.ts +23 -0
- package/src/model/CryptoClientId.ts +40 -0
- package/src/model/CryptoProtocol.ts +21 -0
- package/src/model/EventContentDTO.ts +123 -0
- package/src/model/MlsPublicKeys.ts +22 -0
- package/src/model/PreKeyCrypto.ts +25 -0
- package/src/model/QualifiedId.ts +45 -0
- package/src/model/TeamId.ts +25 -0
- package/src/model/WireMessage.ts +632 -0
- package/src/model/WireUser.ts +30 -0
- package/src/model/conversation/ChannelAddPermissionType.ts +23 -0
- package/src/model/conversation/Conversation.ts +25 -0
- package/src/model/conversation/ConversationAccess.ts +24 -0
- package/src/model/conversation/ConversationAccessRole.ts +24 -0
- package/src/model/conversation/ConversationMember.ts +23 -0
- package/src/model/conversation/ConversationRole.ts +30 -0
- package/src/model/conversation/ConversationType.ts +21 -0
- package/src/model/conversation/GroupConversationType.ts +21 -0
- package/src/model/conversation/ReceiptMode.ts +21 -0
- package/src/model/exception/CoreCryptoMlsException.ts +26 -0
- package/src/model/exception/MlsException.ts +26 -0
- package/src/model/exception/WireApiError.ts +21 -0
- package/src/model/exception/WireApiException.ts +33 -0
- package/src/model/protobuf/MessageEncryptionAlgorithm.ts +17 -0
- package/src/proto/messages.proto +383 -0
- package/src/service/AppProperties.ts +110 -0
- package/src/service/MlsFallbackStrategy.ts +52 -0
- package/src/service/NotificationsService.ts +65 -0
- package/src/utils/AESUtils.ts +62 -0
- package/src/utils/BufferUtils.ts +18 -0
- package/src/utils/DependencyInjectionTokens.ts +25 -0
- package/src/utils/HashUtils.ts +27 -0
- package/src/utils/ObfuscateUtil.ts +31 -0
- package/src/utils/StoragePaths.ts +23 -0
- package/src/utils/logger/ConsoleLogger.ts +35 -0
- package/src/utils/logger/LogLevel.ts +6 -0
- package/src/utils/logger/Logger.ts +29 -0
- package/src/utils/logger/LoggerFactory.ts +27 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2026 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {singleton} from "tsyringe";
|
|
18
|
+
import {UsersApiClient} from "./UsersApiClient.js";
|
|
19
|
+
import {SearchApiClient} from "./SearchApiClient.js";
|
|
20
|
+
import {QualifiedId} from "../model/QualifiedId.js";
|
|
21
|
+
import type {UserResponse} from "./model/UserResponse.js";
|
|
22
|
+
import {LoggerFactory} from "../utils/logger/LoggerFactory.js";
|
|
23
|
+
import {CryptoClientId} from "../model/CryptoClientId.js";
|
|
24
|
+
import {WireUser} from "../model/WireUser.js";
|
|
25
|
+
import {TeamId} from "../model/TeamId.js";
|
|
26
|
+
import type {ContactDocument} from "./response/SearchContactsResponse.js";
|
|
27
|
+
|
|
28
|
+
@singleton()
|
|
29
|
+
export class UserService {
|
|
30
|
+
private logger = LoggerFactory.getLogger(this.constructor.name)
|
|
31
|
+
|
|
32
|
+
constructor(
|
|
33
|
+
private usersApiClient: UsersApiClient,
|
|
34
|
+
private searchApiClient: SearchApiClient,
|
|
35
|
+
) {
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async getUser(userQualifiedId: QualifiedId): Promise<WireUser> {
|
|
39
|
+
const response = await this.usersApiClient.getUser(userQualifiedId.id, userQualifiedId.domain);
|
|
40
|
+
return this.mapUserResponseToWireUser(response);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Searches for users matching the given query on the specified domain.
|
|
45
|
+
*
|
|
46
|
+
* Fields not present in the search response (email) are set to undefined.
|
|
47
|
+
*
|
|
48
|
+
* @param query The search string to match against user names and handles.
|
|
49
|
+
* @param domain The domain to restrict the search to.
|
|
50
|
+
* @param numberOfResults The maximum number of results to return,
|
|
51
|
+
* or undefined to use the backend default.
|
|
52
|
+
* @returns A list of WireUser objects matching the query.
|
|
53
|
+
*/
|
|
54
|
+
async searchUsers(
|
|
55
|
+
query: string,
|
|
56
|
+
domain: string,
|
|
57
|
+
numberOfResults?: number
|
|
58
|
+
): Promise<WireUser[]> {
|
|
59
|
+
this.logger.info(`Searching users with query: ${query} on domain: ${domain}`);
|
|
60
|
+
const response = await this.searchApiClient.searchUsers(query, domain, numberOfResults);
|
|
61
|
+
return response.documents.map(doc => this.mapContactDocumentToWireUser(doc));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
private mapUserResponseToWireUser(userResponse: UserResponse): WireUser {
|
|
65
|
+
return new WireUser(
|
|
66
|
+
new QualifiedId(userResponse.qualified_id.id, userResponse.qualified_id.domain),
|
|
67
|
+
userResponse.name,
|
|
68
|
+
userResponse.deleted,
|
|
69
|
+
userResponse.email,
|
|
70
|
+
userResponse.handle,
|
|
71
|
+
userResponse.team ? new TeamId(userResponse.team) : undefined,
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
private mapContactDocumentToWireUser(doc: ContactDocument): WireUser {
|
|
76
|
+
return new WireUser(
|
|
77
|
+
new QualifiedId(doc.qualified_id.id, doc.qualified_id.domain),
|
|
78
|
+
doc.name,
|
|
79
|
+
false,
|
|
80
|
+
undefined,
|
|
81
|
+
doc.handle ?? undefined,
|
|
82
|
+
doc.team ? new TeamId(doc.team) : undefined,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
async getUsersClientIds(userIds: QualifiedId[]): Promise<Map<string, CryptoClientId[]>> {
|
|
87
|
+
this.logger.info(`Retrieving clients for ${userIds.length} users.`);
|
|
88
|
+
if (userIds.length === 0) return new Map();
|
|
89
|
+
|
|
90
|
+
const usersToClients = await this.usersApiClient.getClientsByUserIds(userIds);
|
|
91
|
+
|
|
92
|
+
return new Map(
|
|
93
|
+
userIds.flatMap(qualifiedUserId => {
|
|
94
|
+
const key = QualifiedId.toKey(qualifiedUserId);
|
|
95
|
+
const userClientResponses = usersToClients.get(key);
|
|
96
|
+
|
|
97
|
+
if (!userClientResponses?.length) {
|
|
98
|
+
this.logger.warn(`User has no clients returned from API. userId: ${qualifiedUserId}`);
|
|
99
|
+
return [];
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const clientIds = userClientResponses.map(({id}) =>
|
|
103
|
+
CryptoClientId.create(qualifiedUserId.id, id, qualifiedUserId.domain)
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
return [[key, clientIds]] as const;
|
|
107
|
+
})
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {HttpClient} from "../core/HttpClient.js";
|
|
18
|
+
import type {UserResponse} from "./model/UserResponse.js";
|
|
19
|
+
import {singleton} from "tsyringe";
|
|
20
|
+
import type {UserClientResponse} from "./model/UserClientResponse.js";
|
|
21
|
+
import {QualifiedId} from "../model/QualifiedId.js";
|
|
22
|
+
|
|
23
|
+
@singleton()
|
|
24
|
+
export class UsersApiClient {
|
|
25
|
+
constructor(private httpClient: HttpClient) {
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
private readonly basePath = "users";
|
|
29
|
+
|
|
30
|
+
async getUser(userId: string, userDomain: string): Promise<UserResponse> {
|
|
31
|
+
const path = `${this.basePath}/${userDomain}/${userId}`
|
|
32
|
+
return await this.httpClient.getRequest<UserResponse>(path)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async getClientsByUserIds(userIds: QualifiedId[]): Promise<Map<string, UserClientResponse[]>> {
|
|
36
|
+
const path = `${this.basePath}/list-clients`;
|
|
37
|
+
const response = await this.httpClient
|
|
38
|
+
.postRequest<{ qualified_user_map: Record<string, Record<string, UserClientResponse[]>> }>(
|
|
39
|
+
path,
|
|
40
|
+
{qualified_users: userIds}
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
const result = new Map<string, UserClientResponse[]>();
|
|
44
|
+
|
|
45
|
+
for (const domain of Object.keys(response.qualified_user_map)) {
|
|
46
|
+
const usersInDomain = response.qualified_user_map[domain];
|
|
47
|
+
if (!usersInDomain) continue;
|
|
48
|
+
|
|
49
|
+
for (const userId of Object.keys(usersInDomain)) {
|
|
50
|
+
const clients = usersInDomain[userId];
|
|
51
|
+
if (!clients) continue;
|
|
52
|
+
|
|
53
|
+
const key = QualifiedId.toKey(new QualifiedId(userId, domain));
|
|
54
|
+
result.set(key, clients);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return result;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2026 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type {QualifiedId} from "../../model/QualifiedId.js";
|
|
18
|
+
|
|
19
|
+
export interface AddMembersToConversationResult {
|
|
20
|
+
membersAdded: QualifiedId[]
|
|
21
|
+
membersFailedToAdd: QualifiedId[]
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2026 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export interface ConversationIdsPaginationConfig {
|
|
18
|
+
paging_state?: string | null
|
|
19
|
+
size: number
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type { ConversationRole } from "../../model/conversation/ConversationRole.js";
|
|
18
|
+
import type { QualifiedId } from "../../model/QualifiedId.js";
|
|
19
|
+
|
|
20
|
+
export interface ConversationMemberOtherResponse {
|
|
21
|
+
qualified_id: QualifiedId
|
|
22
|
+
conversation_role: ConversationRole
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type { ConversationRole } from "../../model/conversation/ConversationRole.js";
|
|
18
|
+
import type { QualifiedId } from "../../model/QualifiedId.js";
|
|
19
|
+
|
|
20
|
+
export interface ConversationMemberSelfResponse {
|
|
21
|
+
qualified_id: QualifiedId
|
|
22
|
+
conversation_role: ConversationRole
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type { ConversationMemberOtherResponse } from "./ConversationMemberOtherResponse.js";
|
|
18
|
+
import type {ConversationMemberSelfResponse} from "./ConversationMemberSelfResponse.js";
|
|
19
|
+
|
|
20
|
+
export interface ConversationMembersResponse {
|
|
21
|
+
others: ConversationMemberOtherResponse[],
|
|
22
|
+
self: ConversationMemberSelfResponse
|
|
23
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2026 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export interface ConversationTeamInfo {
|
|
18
|
+
managed: boolean
|
|
19
|
+
teamid: string
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2026 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type {QualifiedId} from "../../model/QualifiedId.js";
|
|
18
|
+
|
|
19
|
+
export interface RemoveMembersFromConversationResult {
|
|
20
|
+
membersRemoved: QualifiedId[]
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export interface UserClientResponse {
|
|
18
|
+
id: string
|
|
19
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type { CryptoProtocol } from "../../model/CryptoProtocol.js"
|
|
18
|
+
import type { QualifiedId } from "../../model/QualifiedId.js"
|
|
19
|
+
|
|
20
|
+
export interface UserResponse {
|
|
21
|
+
qualified_id: QualifiedId
|
|
22
|
+
team?: string
|
|
23
|
+
email?: string
|
|
24
|
+
name: string
|
|
25
|
+
handle?: string
|
|
26
|
+
supported_protocols: CryptoProtocol[]
|
|
27
|
+
deleted: boolean
|
|
28
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export interface AssetUploadData {
|
|
18
|
+
retention?: string;
|
|
19
|
+
public?: boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export interface AssetUploadResponse {
|
|
18
|
+
key: string,
|
|
19
|
+
domain: string,
|
|
20
|
+
expires?: string,
|
|
21
|
+
token?: string
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export enum CapabilitiesRequest {
|
|
18
|
+
LEGALHOLD_IMPLICIT_CONSENT = "legalhold-implicit-consent"
|
|
19
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type { MlsPublicKeys } from "../../model/MlsPublicKeys.js";
|
|
18
|
+
|
|
19
|
+
export interface ClientUpdateRequest {
|
|
20
|
+
mls_public_keys: MlsPublicKeys
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2026 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type {QualifiedId} from "../../model/QualifiedId.js"
|
|
18
|
+
|
|
19
|
+
export interface ConversationIdsRequest {
|
|
20
|
+
qualified_ids: QualifiedId[]
|
|
21
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2026 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import type {QualifiedId} from "../../model/QualifiedId.js"
|
|
18
|
+
import {CryptoProtocol} from "../../model/CryptoProtocol.js"
|
|
19
|
+
import {ConversationAccess} from "../../model/conversation/ConversationAccess.js"
|
|
20
|
+
import {ConversationAccessRole} from "../../model/conversation/ConversationAccessRole.js"
|
|
21
|
+
import {GroupConversationType} from "../../model/conversation/GroupConversationType.js"
|
|
22
|
+
import {ChannelAddPermissionType} from "../../model/conversation/ChannelAddPermissionType.js"
|
|
23
|
+
import {ReceiptMode} from "../../model/conversation/ReceiptMode.js"
|
|
24
|
+
import type {ConversationTeamInfo} from "../model/ConversationTeamInfo.js"
|
|
25
|
+
import type {TeamId} from "../../model/TeamId.js"
|
|
26
|
+
|
|
27
|
+
export const DEFAULT_MEMBER_ROLE = "wire_member"
|
|
28
|
+
|
|
29
|
+
export const DEFAULT_ACCESS_LIST: ConversationAccess[] = [
|
|
30
|
+
ConversationAccess.INVITE,
|
|
31
|
+
ConversationAccess.CODE
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
export const DEFAULT_ACCESS_ROLE_LIST: ConversationAccessRole[] = [
|
|
35
|
+
ConversationAccessRole.GUEST,
|
|
36
|
+
ConversationAccessRole.NON_TEAM_MEMBER,
|
|
37
|
+
ConversationAccessRole.TEAM_MEMBER,
|
|
38
|
+
ConversationAccessRole.SERVICE
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
export interface CreateConversationRequest {
|
|
42
|
+
qualified_users: QualifiedId[]
|
|
43
|
+
name: string | null
|
|
44
|
+
access: ConversationAccess[]
|
|
45
|
+
access_role: ConversationAccessRole[]
|
|
46
|
+
group_conv_type: GroupConversationType | null
|
|
47
|
+
add_permission: ChannelAddPermissionType
|
|
48
|
+
team: ConversationTeamInfo | null
|
|
49
|
+
message_timer: number | null
|
|
50
|
+
receipt_mode: ReceiptMode
|
|
51
|
+
conversation_role: string
|
|
52
|
+
protocol: CryptoProtocol
|
|
53
|
+
cells: boolean
|
|
54
|
+
skip_creator: boolean
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function createGroupConversationRequest(name: string, teamId: TeamId): CreateConversationRequest {
|
|
58
|
+
return createBaseConversationRequest(name, teamId, {group_conv_type: GroupConversationType.REGULAR_GROUP})
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function createChannelConversationRequest(name: string, teamId: TeamId): CreateConversationRequest {
|
|
62
|
+
return createBaseConversationRequest(name, teamId, {group_conv_type: GroupConversationType.CHANNEL})
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function createBaseConversationRequest(
|
|
66
|
+
name: string,
|
|
67
|
+
teamId: TeamId,
|
|
68
|
+
overrides: Partial<CreateConversationRequest> = {}
|
|
69
|
+
): CreateConversationRequest {
|
|
70
|
+
return {
|
|
71
|
+
qualified_users: [],
|
|
72
|
+
name,
|
|
73
|
+
access: DEFAULT_ACCESS_LIST,
|
|
74
|
+
access_role: DEFAULT_ACCESS_ROLE_LIST,
|
|
75
|
+
group_conv_type: null,
|
|
76
|
+
add_permission: ChannelAddPermissionType.ADMINS,
|
|
77
|
+
team: {managed: false, teamid: teamId.value},
|
|
78
|
+
message_timer: null,
|
|
79
|
+
receipt_mode: ReceiptMode.DISABLED,
|
|
80
|
+
conversation_role: DEFAULT_MEMBER_ROLE,
|
|
81
|
+
protocol: CryptoProtocol.MLS,
|
|
82
|
+
cells: false,
|
|
83
|
+
skip_creator: false,
|
|
84
|
+
...overrides
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export interface MlsKeyPackagesRequest {
|
|
18
|
+
key_packages: string[]
|
|
19
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Wire
|
|
3
|
+
* Copyright (C) 2025 Wire Swiss GmbH
|
|
4
|
+
*
|
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
|
6
|
+
* it under the terms of the GNU General Public License as published by
|
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
* (at your option) any later version.
|
|
9
|
+
* This program is distributed in the hope that it will be useful,
|
|
10
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
* GNU General Public License for more details.
|
|
13
|
+
* You should have received a copy of the GNU General Public License
|
|
14
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export class PreKeyRequest {
|
|
18
|
+
id: number
|
|
19
|
+
key: string
|
|
20
|
+
|
|
21
|
+
constructor(
|
|
22
|
+
id: number,
|
|
23
|
+
key: string
|
|
24
|
+
) {
|
|
25
|
+
this.id = id
|
|
26
|
+
this.key = key
|
|
27
|
+
}
|
|
28
|
+
}
|