@wireapp/core 30.5.1 → 30.5.2
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/CHANGELOG.md +8 -0
- package/package.json +3 -3
- package/src/main/Account.d.ts +0 -204
- package/src/main/Account.js +0 -439
- package/src/main/CoreError.d.ts +0 -9
- package/src/main/CoreError.js +0 -26
- package/src/main/account/AccountService.d.ts +0 -7
- package/src/main/account/AccountService.js +0 -33
- package/src/main/account/AccountService.js.map +0 -1
- package/src/main/account/index.d.ts +0 -1
- package/src/main/account/index.js +0 -32
- package/src/main/account/index.js.map +0 -1
- package/src/main/auth/LoginSanitizer.d.ts +0 -5
- package/src/main/auth/LoginSanitizer.js +0 -41
- package/src/main/auth/index.d.ts +0 -1
- package/src/main/auth/index.js +0 -32
- package/src/main/broadcast/AvailabilityType.d.ts +0 -2
- package/src/main/broadcast/AvailabilityType.js +0 -21
- package/src/main/broadcast/BroadcastService.d.ts +0 -24
- package/src/main/broadcast/BroadcastService.js +0 -74
- package/src/main/broadcast/index.d.ts +0 -2
- package/src/main/broadcast/index.js +0 -33
- package/src/main/client/ClientBackendRepository.d.ts +0 -11
- package/src/main/client/ClientBackendRepository.js +0 -43
- package/src/main/client/ClientDatabaseRepository.d.ts +0 -27
- package/src/main/client/ClientDatabaseRepository.js +0 -85
- package/src/main/client/ClientInfo.d.ts +0 -8
- package/src/main/client/ClientInfo.js +0 -21
- package/src/main/client/ClientService.d.ts +0 -48
- package/src/main/client/ClientService.js +0 -118
- package/src/main/client/index.d.ts +0 -4
- package/src/main/client/index.js +0 -35
- package/src/main/connection/ConnectionService.d.ts +0 -11
- package/src/main/connection/ConnectionService.js +0 -45
- package/src/main/connection/index.d.ts +0 -1
- package/src/main/connection/index.js +0 -32
- package/src/main/conversation/AbortReason.d.ts +0 -2
- package/src/main/conversation/AbortReason.js +0 -21
- package/src/main/conversation/AssetService/AssetService.d.ts +0 -62
- package/src/main/conversation/AssetService/AssetService.js +0 -88
- package/src/main/conversation/AssetService/index.d.ts +0 -1
- package/src/main/conversation/AssetService/index.js +0 -32
- package/src/main/conversation/AssetTransferState.d.ts +0 -4
- package/src/main/conversation/AssetTransferState.js +0 -27
- package/src/main/conversation/ClientActionType.d.ts +0 -1
- package/src/main/conversation/ClientActionType.js +0 -24
- package/src/main/conversation/ConversationMapper/ConversationMapper.d.ts +0 -6
- package/src/main/conversation/ConversationMapper/ConversationMapper.js +0 -57
- package/src/main/conversation/ConversationMapper/index.d.ts +0 -1
- package/src/main/conversation/ConversationMapper/index.js +0 -32
- package/src/main/conversation/ConversationService/ConversationService.d.ts +0 -162
- package/src/main/conversation/ConversationService/ConversationService.js +0 -900
- package/src/main/conversation/ConversationService/ConversationService.types.d.ts +0 -108
- package/src/main/conversation/ConversationService/ConversationService.types.js +0 -28
- package/src/main/conversation/ConversationService/index.d.ts +0 -2
- package/src/main/conversation/ConversationService/index.js +0 -33
- package/src/main/conversation/GenericMessageType.d.ts +0 -25
- package/src/main/conversation/GenericMessageType.js +0 -49
- package/src/main/conversation/MessageTimer/MessageTimer.d.ts +0 -10
- package/src/main/conversation/MessageTimer/MessageTimer.js +0 -54
- package/src/main/conversation/MessageTimer/index.d.ts +0 -1
- package/src/main/conversation/MessageTimer/index.js +0 -32
- package/src/main/conversation/ReactionType.d.ts +0 -4
- package/src/main/conversation/ReactionType.js +0 -27
- package/src/main/conversation/content/AssetContent.d.ts +0 -42
- package/src/main/conversation/content/AssetContent.js +0 -21
- package/src/main/conversation/content/ButtonActionConfirmationContent.d.ts +0 -2
- package/src/main/conversation/content/ButtonActionConfirmationContent.js +0 -21
- package/src/main/conversation/content/ButtonActionContent.d.ts +0 -2
- package/src/main/conversation/content/ButtonActionContent.js +0 -21
- package/src/main/conversation/content/CallingContent.d.ts +0 -1
- package/src/main/conversation/content/CallingContent.js +0 -21
- package/src/main/conversation/content/ClearedContent.d.ts +0 -2
- package/src/main/conversation/content/ClearedContent.js +0 -21
- package/src/main/conversation/content/ClientActionContent.d.ts +0 -2
- package/src/main/conversation/content/ClientActionContent.js +0 -21
- package/src/main/conversation/content/ClientAddContent.d.ts +0 -4
- package/src/main/conversation/content/ClientAddContent.js +0 -21
- package/src/main/conversation/content/ClientRemoveContent.d.ts +0 -6
- package/src/main/conversation/content/ClientRemoveContent.js +0 -21
- package/src/main/conversation/content/CompositeContent.d.ts +0 -2
- package/src/main/conversation/content/CompositeContent.js +0 -21
- package/src/main/conversation/content/ConfirmationContent.d.ts +0 -2
- package/src/main/conversation/content/ConfirmationContent.js +0 -21
- package/src/main/conversation/content/ContentType.d.ts +0 -21
- package/src/main/conversation/content/ContentType.js +0 -94
- package/src/main/conversation/content/ConversationContent.d.ts +0 -3
- package/src/main/conversation/content/ConversationContent.js +0 -21
- package/src/main/conversation/content/DeletedContent.d.ts +0 -2
- package/src/main/conversation/content/DeletedContent.js +0 -21
- package/src/main/conversation/content/EditedTextContent.d.ts +0 -11
- package/src/main/conversation/content/EditedTextContent.js +0 -21
- package/src/main/conversation/content/FileContent.d.ts +0 -13
- package/src/main/conversation/content/FileContent.js +0 -21
- package/src/main/conversation/content/HiddenContent.d.ts +0 -2
- package/src/main/conversation/content/HiddenContent.js +0 -21
- package/src/main/conversation/content/ImageContent.d.ts +0 -7
- package/src/main/conversation/content/ImageContent.js +0 -21
- package/src/main/conversation/content/KnockContent.d.ts +0 -2
- package/src/main/conversation/content/KnockContent.js +0 -21
- package/src/main/conversation/content/LinkPreviewContent.d.ts +0 -10
- package/src/main/conversation/content/LinkPreviewContent.js +0 -21
- package/src/main/conversation/content/LocationContent.d.ts +0 -9
- package/src/main/conversation/content/LocationContent.js +0 -21
- package/src/main/conversation/content/MentionContent.d.ts +0 -2
- package/src/main/conversation/content/MentionContent.js +0 -21
- package/src/main/conversation/content/QuoteContent.d.ts +0 -7
- package/src/main/conversation/content/QuoteContent.js +0 -21
- package/src/main/conversation/content/ReactionContent.d.ts +0 -7
- package/src/main/conversation/content/ReactionContent.js +0 -21
- package/src/main/conversation/content/TextContent.d.ts +0 -9
- package/src/main/conversation/content/TextContent.js +0 -21
- package/src/main/conversation/content/TweetContent.d.ts +0 -2
- package/src/main/conversation/content/TweetContent.js +0 -21
- package/src/main/conversation/content/index.d.ts +0 -28
- package/src/main/conversation/content/index.js +0 -72
- package/src/main/conversation/index.d.ts +0 -9
- package/src/main/conversation/index.js +0 -40
- package/src/main/conversation/message/CompositeContentBuilder.d.ts +0 -14
- package/src/main/conversation/message/CompositeContentBuilder.js +0 -54
- package/src/main/conversation/message/Message.d.ts +0 -4
- package/src/main/conversation/message/Message.js +0 -21
- package/src/main/conversation/message/MessageBuilder.d.ts +0 -87
- package/src/main/conversation/message/MessageBuilder.js +0 -119
- package/src/main/conversation/message/MessageService.d.ts +0 -67
- package/src/main/conversation/message/MessageService.js +0 -293
- package/src/main/conversation/message/MessageToProtoMapper.d.ts +0 -7
- package/src/main/conversation/message/MessageToProtoMapper.js +0 -99
- package/src/main/conversation/message/OtrMessage.d.ts +0 -80
- package/src/main/conversation/message/OtrMessage.js +0 -21
- package/src/main/conversation/message/PayloadBundle.d.ts +0 -76
- package/src/main/conversation/message/PayloadBundle.js +0 -81
- package/src/main/conversation/message/TeamMessage.d.ts +0 -31
- package/src/main/conversation/message/TeamMessage.js +0 -21
- package/src/main/conversation/message/TextContentBuilder.d.ts +0 -13
- package/src/main/conversation/message/TextContentBuilder.js +0 -75
- package/src/main/conversation/message/UserClientsUtil.d.ts +0 -22
- package/src/main/conversation/message/UserClientsUtil.js +0 -38
- package/src/main/conversation/message/UserMessage.d.ts +0 -43
- package/src/main/conversation/message/UserMessage.js +0 -21
- package/src/main/cryptography/AssetCryptography/EncryptedAsset.d.ts +0 -11
- package/src/main/cryptography/AssetCryptography/EncryptedAsset.js +0 -21
- package/src/main/cryptography/AssetCryptography/crypto.browser.d.ts +0 -2
- package/src/main/cryptography/AssetCryptography/crypto.browser.js +0 -46
- package/src/main/cryptography/AssetCryptography/crypto.node.d.ts +0 -2
- package/src/main/cryptography/AssetCryptography/crypto.node.js +0 -68
- package/src/main/cryptography/AssetCryptography/index.d.ts +0 -8
- package/src/main/cryptography/AssetCryptography/index.js +0 -53
- package/src/main/cryptography/AssetCryptography/interfaces.d.ts +0 -9
- package/src/main/cryptography/AssetCryptography/interfaces.js +0 -21
- package/src/main/cryptography/CryptographyDatabaseRepository.d.ts +0 -17
- package/src/main/cryptography/CryptographyDatabaseRepository.js +0 -45
- package/src/main/cryptography/CryptographyService.d.ts +0 -52
- package/src/main/cryptography/CryptographyService.js +0 -205
- package/src/main/cryptography/GenericMessageMapper.d.ts +0 -6
- package/src/main/cryptography/GenericMessageMapper.js +0 -160
- package/src/main/cryptography/MessageHashService.d.ts +0 -16
- package/src/main/cryptography/MessageHashService.js +0 -114
- package/src/main/cryptography/SessionPayloadBundle.d.ts +0 -4
- package/src/main/cryptography/SessionPayloadBundle.js +0 -21
- package/src/main/cryptography/index.d.ts +0 -4
- package/src/main/cryptography/index.js +0 -35
- package/src/main/giphy/GiphyService.d.ts +0 -9
- package/src/main/giphy/GiphyService.js +0 -37
- package/src/main/giphy/index.d.ts +0 -1
- package/src/main/giphy/index.js +0 -32
- package/src/main/index.d.ts +0 -17
- package/src/main/index.js +0 -55
- package/src/main/linkPreview/LinkPreviewService.d.ts +0 -7
- package/src/main/linkPreview/LinkPreviewService.js +0 -52
- package/src/main/linkPreview/index.d.ts +0 -1
- package/src/main/linkPreview/index.js +0 -32
- package/src/main/mls/MLSService/MLSService.d.ts +0 -26
- package/src/main/mls/MLSService/MLSService.js +0 -131
- package/src/main/mls/index.d.ts +0 -1
- package/src/main/mls/index.js +0 -32
- package/src/main/mls/types.d.ts +0 -22
- package/src/main/mls/types.js +0 -21
- package/src/main/notification/NotificationBackendRepository.d.ts +0 -11
- package/src/main/notification/NotificationBackendRepository.js +0 -34
- package/src/main/notification/NotificationDatabaseRepository.d.ts +0 -66
- package/src/main/notification/NotificationDatabaseRepository.js +0 -136
- package/src/main/notification/NotificationService.d.ts +0 -131
- package/src/main/notification/NotificationService.js +0 -468
- package/src/main/notification/index.d.ts +0 -1
- package/src/main/notification/index.js +0 -32
- package/src/main/notification/types.d.ts +0 -20
- package/src/main/notification/types.js +0 -21
- package/src/main/self/SelfService.d.ts +0 -13
- package/src/main/self/SelfService.js +0 -55
- package/src/main/self/index.d.ts +0 -1
- package/src/main/self/index.js +0 -32
- package/src/main/team/TeamService.d.ts +0 -15
- package/src/main/team/TeamService.js +0 -55
- package/src/main/team/index.d.ts +0 -1
- package/src/main/team/index.js +0 -32
- package/src/main/test/CryptographyHelper.d.ts +0 -4
- package/src/main/test/CryptographyHelper.js +0 -65
- package/src/main/test/PayloadHelper.d.ts +0 -3
- package/src/main/test/PayloadHelper.js +0 -66
- package/src/main/user/UserMapper.d.ts +0 -5
- package/src/main/user/UserMapper.js +0 -88
- package/src/main/user/UserService.d.ts +0 -25
- package/src/main/user/UserService.js +0 -81
- package/src/main/user/index.d.ts +0 -1
- package/src/main/user/index.js +0 -32
- package/src/main/util/LowPrecisionTaskScheduler/LowPrecisionTaskScheduler.d.ts +0 -21
- package/src/main/util/LowPrecisionTaskScheduler/LowPrecisionTaskScheduler.js +0 -62
- package/src/main/util/TaskScheduler/TaskScheduler.d.ts +0 -10
- package/src/main/util/TaskScheduler/TaskScheduler.js +0 -70
- package/src/main/util/TypePredicateUtil.d.ts +0 -7
- package/src/main/util/TypePredicateUtil.js +0 -55
- package/src/main/util/encryptedStore.d.ts +0 -45
- package/src/main/util/encryptedStore.js +0 -116
- package/src/main/util/index.d.ts +0 -1
- package/src/main/util/index.js +0 -32
- package/src/main/util/mapQualifiedUserClientIdsToFullyQualifiedClientIds.d.ts +0 -8
- package/src/main/util/mapQualifiedUserClientIdsToFullyQualifiedClientIds.js +0 -32
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { APIClient } from '@wireapp/api-client';
|
|
2
|
-
import type { Self } from '@wireapp/api-client/src/self/';
|
|
3
|
-
export declare class SelfService {
|
|
4
|
-
private readonly apiClient;
|
|
5
|
-
constructor(apiClient: APIClient);
|
|
6
|
-
checkUsername(username: string): Promise<boolean>;
|
|
7
|
-
checkUsernames(usernames: string[]): Promise<string[]>;
|
|
8
|
-
getName(): Promise<string>;
|
|
9
|
-
getSelf(): Promise<Self>;
|
|
10
|
-
getUsername(): Promise<string | undefined>;
|
|
11
|
-
setName(name: string): Promise<void>;
|
|
12
|
-
setUsername(username: string): Promise<void>;
|
|
13
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.SelfService = void 0;
|
|
22
|
-
class SelfService {
|
|
23
|
-
constructor(apiClient) {
|
|
24
|
-
this.apiClient = apiClient;
|
|
25
|
-
}
|
|
26
|
-
async checkUsername(username) {
|
|
27
|
-
const [availableUsername] = await this.checkUsernames([username]);
|
|
28
|
-
return !!availableUsername;
|
|
29
|
-
}
|
|
30
|
-
checkUsernames(usernames) {
|
|
31
|
-
return this.apiClient.api.user.postHandles({
|
|
32
|
-
handles: usernames,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
async getName() {
|
|
36
|
-
const { name } = await this.apiClient.api.self.getName();
|
|
37
|
-
return name;
|
|
38
|
-
}
|
|
39
|
-
async getSelf() {
|
|
40
|
-
const selfData = await this.apiClient.api.self.getSelf();
|
|
41
|
-
return selfData;
|
|
42
|
-
}
|
|
43
|
-
async getUsername() {
|
|
44
|
-
const { handle } = await this.getSelf();
|
|
45
|
-
return handle;
|
|
46
|
-
}
|
|
47
|
-
setName(name) {
|
|
48
|
-
return this.apiClient.api.self.putSelf({ name });
|
|
49
|
-
}
|
|
50
|
-
setUsername(username) {
|
|
51
|
-
return this.apiClient.api.self.putHandle({ handle: username });
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
exports.SelfService = SelfService;
|
|
55
|
-
//# sourceMappingURL=SelfService.js.map
|
package/src/main/self/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './SelfService';
|
package/src/main/self/index.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
23
|
-
}) : (function(o, m, k, k2) {
|
|
24
|
-
if (k2 === undefined) k2 = k;
|
|
25
|
-
o[k2] = m[k];
|
|
26
|
-
}));
|
|
27
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
28
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
29
|
-
};
|
|
30
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
__exportStar(require("./SelfService"), exports);
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { APIClient } from '@wireapp/api-client';
|
|
2
|
-
import type { MemberData, Members, NewTeamData, TeamChunkData, TeamData, UpdateTeamData } from '@wireapp/api-client/src/team/';
|
|
3
|
-
export declare class TeamService {
|
|
4
|
-
private readonly apiClient;
|
|
5
|
-
constructor(apiClient: APIClient);
|
|
6
|
-
addMember(teamId: string, memberData: MemberData): Promise<void>;
|
|
7
|
-
createTeam(teamData: NewTeamData): Promise<void>;
|
|
8
|
-
deleteTeam(teamId: string, password: string): Promise<void>;
|
|
9
|
-
getAllMembers(teamId: string): Promise<Members>;
|
|
10
|
-
getTeam(teamId: string): Promise<TeamData>;
|
|
11
|
-
getTeams(): Promise<TeamChunkData>;
|
|
12
|
-
removeMember(teamId: string, userId: string, password: string): Promise<void>;
|
|
13
|
-
updateMember(teamId: string, memberData: MemberData): Promise<void>;
|
|
14
|
-
updateTeam(teamId: string, teamData: UpdateTeamData): Promise<void>;
|
|
15
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.TeamService = void 0;
|
|
22
|
-
class TeamService {
|
|
23
|
-
constructor(apiClient) {
|
|
24
|
-
this.apiClient = apiClient;
|
|
25
|
-
}
|
|
26
|
-
addMember(teamId, memberData) {
|
|
27
|
-
return this.apiClient.api.teams.member.postMembers(teamId, memberData);
|
|
28
|
-
}
|
|
29
|
-
createTeam(teamData) {
|
|
30
|
-
return this.apiClient.api.teams.team.postTeam(teamData);
|
|
31
|
-
}
|
|
32
|
-
deleteTeam(teamId, password) {
|
|
33
|
-
return this.apiClient.api.teams.team.deleteTeam(teamId, password);
|
|
34
|
-
}
|
|
35
|
-
getAllMembers(teamId) {
|
|
36
|
-
return this.apiClient.api.teams.member.getAllMembers(teamId);
|
|
37
|
-
}
|
|
38
|
-
getTeam(teamId) {
|
|
39
|
-
return this.apiClient.api.teams.team.getTeam(teamId);
|
|
40
|
-
}
|
|
41
|
-
getTeams() {
|
|
42
|
-
return this.apiClient.api.teams.team.getTeams();
|
|
43
|
-
}
|
|
44
|
-
removeMember(teamId, userId, password) {
|
|
45
|
-
return this.apiClient.api.teams.member.deleteMember(teamId, userId, password);
|
|
46
|
-
}
|
|
47
|
-
updateMember(teamId, memberData) {
|
|
48
|
-
return this.apiClient.api.teams.member.putMembers(teamId, memberData);
|
|
49
|
-
}
|
|
50
|
-
updateTeam(teamId, teamData) {
|
|
51
|
-
return this.apiClient.api.teams.team.putTeam(teamId, teamData);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
exports.TeamService = TeamService;
|
|
55
|
-
//# sourceMappingURL=TeamService.js.map
|
package/src/main/team/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './TeamService';
|
package/src/main/team/index.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
23
|
-
}) : (function(o, m, k, k2) {
|
|
24
|
-
if (k2 === undefined) k2 = k;
|
|
25
|
-
o[k2] = m[k];
|
|
26
|
-
}));
|
|
27
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
28
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
29
|
-
};
|
|
30
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
__exportStar(require("./TeamService"), exports);
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { keys } from '@wireapp/proteus';
|
|
2
|
-
import type { CryptographyService } from '../cryptography';
|
|
3
|
-
export declare function createEncodedCipherText(receiver: keys.IdentityKeyPair, preKey: keys.PreKey, text: string): Promise<string>;
|
|
4
|
-
export declare function getPlainText(cryptographyService: CryptographyService, encodedPreKeyMessage: string, sessionId?: string): Promise<string | void>;
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
23
|
-
}) : (function(o, m, k, k2) {
|
|
24
|
-
if (k2 === undefined) k2 = k;
|
|
25
|
-
o[k2] = m[k];
|
|
26
|
-
}));
|
|
27
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
28
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
29
|
-
}) : function(o, v) {
|
|
30
|
-
o["default"] = v;
|
|
31
|
-
});
|
|
32
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
33
|
-
if (mod && mod.__esModule) return mod;
|
|
34
|
-
var result = {};
|
|
35
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
36
|
-
__setModuleDefault(result, mod);
|
|
37
|
-
return result;
|
|
38
|
-
};
|
|
39
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.getPlainText = exports.createEncodedCipherText = void 0;
|
|
41
|
-
const cryptobox_1 = require("@wireapp/cryptobox");
|
|
42
|
-
const proteus_1 = require("@wireapp/proteus");
|
|
43
|
-
const bazinga64 = __importStar(require("bazinga64"));
|
|
44
|
-
const StoreHelper = require('./StoreHelper');
|
|
45
|
-
async function createEncodedCipherText(receiver, preKey, text) {
|
|
46
|
-
await (0, proteus_1.init)();
|
|
47
|
-
const senderEngine = await StoreHelper.createMemoryEngine();
|
|
48
|
-
const sender = new cryptobox_1.Cryptobox(senderEngine, 1);
|
|
49
|
-
await sender.create();
|
|
50
|
-
const sessionId = `from-${sender['identity'].public_key.fingerprint()}-to-${preKey.key_pair.public_key.fingerprint()}`;
|
|
51
|
-
const alicePublicKey = receiver.public_key;
|
|
52
|
-
const publicPreKeyBundle = new proteus_1.keys.PreKeyBundle(alicePublicKey, preKey);
|
|
53
|
-
const encryptedPreKeyMessage = await sender.encrypt(sessionId, text, publicPreKeyBundle.serialise());
|
|
54
|
-
return bazinga64.Encoder.toBase64(encryptedPreKeyMessage).asString;
|
|
55
|
-
}
|
|
56
|
-
exports.createEncodedCipherText = createEncodedCipherText;
|
|
57
|
-
async function getPlainText(cryptographyService, encodedPreKeyMessage, sessionId = `temp-${Date.now()}`) {
|
|
58
|
-
try {
|
|
59
|
-
const decryptedMessage = await cryptographyService.decrypt(sessionId, encodedPreKeyMessage);
|
|
60
|
-
return Buffer.from(decryptedMessage).toString('utf8');
|
|
61
|
-
}
|
|
62
|
-
catch (error) { }
|
|
63
|
-
}
|
|
64
|
-
exports.getPlainText = getPlainText;
|
|
65
|
-
//# sourceMappingURL=CryptographyHelper.js.map
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
21
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
22
|
-
};
|
|
23
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.mockUserPayload = exports.getUrlParameter = exports.getUUID = void 0;
|
|
25
|
-
const faker = require("faker");
|
|
26
|
-
const uuidjs_1 = __importDefault(require("uuidjs"));
|
|
27
|
-
function getUUID() {
|
|
28
|
-
return uuidjs_1.default.genV4().toString();
|
|
29
|
-
}
|
|
30
|
-
exports.getUUID = getUUID;
|
|
31
|
-
function getUrlParameter(url, parameter) {
|
|
32
|
-
if (typeof window === 'undefined') {
|
|
33
|
-
return require('url').parse(url, true).query[parameter];
|
|
34
|
-
}
|
|
35
|
-
return new URL(url).searchParams.get(parameter);
|
|
36
|
-
}
|
|
37
|
-
exports.getUrlParameter = getUrlParameter;
|
|
38
|
-
function mockUserPayload(userId) {
|
|
39
|
-
return {
|
|
40
|
-
accent_id: 3,
|
|
41
|
-
assets: [],
|
|
42
|
-
id: userId,
|
|
43
|
-
locale: 'en',
|
|
44
|
-
name: faker.name.findName(),
|
|
45
|
-
picture: [
|
|
46
|
-
{
|
|
47
|
-
content_length: 263345,
|
|
48
|
-
content_type: 'image/jpeg',
|
|
49
|
-
data: null,
|
|
50
|
-
id: getUUID(),
|
|
51
|
-
info: {
|
|
52
|
-
correlation_id: getUUID(),
|
|
53
|
-
height: 960,
|
|
54
|
-
nonce: getUUID(),
|
|
55
|
-
original_height: 960,
|
|
56
|
-
original_width: 1280,
|
|
57
|
-
public: true,
|
|
58
|
-
tag: 'medium',
|
|
59
|
-
width: 1280,
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
],
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
exports.mockUserPayload = mockUserPayload;
|
|
66
|
-
//# sourceMappingURL=PayloadHelper.js.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { UserEvent } from '@wireapp/api-client/src/event';
|
|
2
|
-
import { PayloadBundle, PayloadBundleSource } from '../conversation';
|
|
3
|
-
export declare class UserMapper {
|
|
4
|
-
static mapUserEvent(event: UserEvent, selfUserId: string, source: PayloadBundleSource): PayloadBundle | undefined;
|
|
5
|
-
}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2019 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.UserMapper = void 0;
|
|
22
|
-
const event_1 = require("@wireapp/api-client/src/event");
|
|
23
|
-
const conversation_1 = require("../conversation");
|
|
24
|
-
const MessageBuilder_1 = require("../conversation/message/MessageBuilder");
|
|
25
|
-
class UserMapper {
|
|
26
|
-
static mapUserEvent(event, selfUserId, source) {
|
|
27
|
-
switch (event.type) {
|
|
28
|
-
case event_1.USER_EVENT.CONNECTION: {
|
|
29
|
-
const { connection, user } = event;
|
|
30
|
-
return {
|
|
31
|
-
content: { connection, user },
|
|
32
|
-
conversation: connection.conversation,
|
|
33
|
-
from: connection.from,
|
|
34
|
-
id: MessageBuilder_1.MessageBuilder.createId(),
|
|
35
|
-
messageTimer: 0,
|
|
36
|
-
source,
|
|
37
|
-
state: conversation_1.PayloadBundleState.INCOMING,
|
|
38
|
-
timestamp: new Date(connection.last_update).getTime(),
|
|
39
|
-
type: conversation_1.PayloadBundleType.CONNECTION_REQUEST,
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
case event_1.USER_EVENT.CLIENT_ADD: {
|
|
43
|
-
const { client } = event;
|
|
44
|
-
return {
|
|
45
|
-
content: { client },
|
|
46
|
-
conversation: selfUserId,
|
|
47
|
-
from: selfUserId,
|
|
48
|
-
id: MessageBuilder_1.MessageBuilder.createId(),
|
|
49
|
-
messageTimer: 0,
|
|
50
|
-
source,
|
|
51
|
-
state: conversation_1.PayloadBundleState.INCOMING,
|
|
52
|
-
timestamp: new Date().getTime(),
|
|
53
|
-
type: conversation_1.PayloadBundleType.CLIENT_ADD,
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
case event_1.USER_EVENT.UPDATE: {
|
|
57
|
-
const { user } = event;
|
|
58
|
-
return {
|
|
59
|
-
content: { user },
|
|
60
|
-
conversation: selfUserId,
|
|
61
|
-
from: selfUserId,
|
|
62
|
-
id: MessageBuilder_1.MessageBuilder.createId(),
|
|
63
|
-
source,
|
|
64
|
-
state: conversation_1.PayloadBundleState.INCOMING,
|
|
65
|
-
timestamp: new Date().getTime(),
|
|
66
|
-
type: conversation_1.PayloadBundleType.USER_UPDATE,
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
case event_1.USER_EVENT.CLIENT_REMOVE: {
|
|
70
|
-
const { client } = event;
|
|
71
|
-
return {
|
|
72
|
-
content: { client },
|
|
73
|
-
conversation: selfUserId,
|
|
74
|
-
from: selfUserId,
|
|
75
|
-
id: MessageBuilder_1.MessageBuilder.createId(),
|
|
76
|
-
messageTimer: 0,
|
|
77
|
-
source,
|
|
78
|
-
state: conversation_1.PayloadBundleState.INCOMING,
|
|
79
|
-
timestamp: new Date().getTime(),
|
|
80
|
-
type: conversation_1.PayloadBundleType.CLIENT_REMOVE,
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
return undefined;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
exports.UserMapper = UserMapper;
|
|
88
|
-
//# sourceMappingURL=UserMapper.js.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { APIClient } from '@wireapp/api-client';
|
|
2
|
-
import type { QualifiedId, User } from '@wireapp/api-client/src/user/';
|
|
3
|
-
import type { AvailabilityType, BroadcastService } from '../broadcast/';
|
|
4
|
-
import { ConnectionService } from '../connection';
|
|
5
|
-
import { ConversationService } from '../conversation';
|
|
6
|
-
export declare class UserService {
|
|
7
|
-
private readonly apiClient;
|
|
8
|
-
private readonly broadcastService;
|
|
9
|
-
private readonly connectionService;
|
|
10
|
-
private readonly conversationService;
|
|
11
|
-
constructor(apiClient: APIClient, broadcastService: BroadcastService, conversationService: ConversationService, connectionService: ConnectionService);
|
|
12
|
-
getUser(userId: string | QualifiedId): Promise<User>;
|
|
13
|
-
getUsers(userIds: string[] | QualifiedId[]): Promise<User[]>;
|
|
14
|
-
/**
|
|
15
|
-
* Sends a availability update to members of the same team
|
|
16
|
-
* @param teamId
|
|
17
|
-
* @param type
|
|
18
|
-
* @param options.sendAll=false will broadcast the message to all the members of the team (instead of just direct connections). Should be avoided in a big team
|
|
19
|
-
* @param options.sendAsProtobuf=false
|
|
20
|
-
*/
|
|
21
|
-
setAvailability(teamId: string, type: AvailabilityType, { sendAll, sendAsProtobuf }?: {
|
|
22
|
-
sendAll?: boolean | undefined;
|
|
23
|
-
sendAsProtobuf?: boolean | undefined;
|
|
24
|
-
}): Promise<void>;
|
|
25
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
21
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
22
|
-
};
|
|
23
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
-
exports.UserService = void 0;
|
|
25
|
-
const protocol_messaging_1 = require("@wireapp/protocol-messaging");
|
|
26
|
-
const uuidjs_1 = __importDefault(require("uuidjs"));
|
|
27
|
-
const TypePredicateUtil_1 = require("../util/TypePredicateUtil");
|
|
28
|
-
const connection_1 = require("@wireapp/api-client/src/connection");
|
|
29
|
-
class UserService {
|
|
30
|
-
constructor(apiClient, broadcastService, conversationService, connectionService) {
|
|
31
|
-
this.apiClient = apiClient;
|
|
32
|
-
this.broadcastService = broadcastService;
|
|
33
|
-
this.connectionService = connectionService;
|
|
34
|
-
this.conversationService = conversationService;
|
|
35
|
-
}
|
|
36
|
-
getUser(userId) {
|
|
37
|
-
return this.apiClient.api.user.getUser(userId);
|
|
38
|
-
}
|
|
39
|
-
async getUsers(userIds) {
|
|
40
|
-
if (!userIds.length) {
|
|
41
|
-
return [];
|
|
42
|
-
}
|
|
43
|
-
return (0, TypePredicateUtil_1.isQualifiedIdArray)(userIds)
|
|
44
|
-
? this.apiClient.api.user.postListUsers({ qualified_ids: userIds })
|
|
45
|
-
: this.apiClient.api.user.getUsers({ ids: userIds });
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Sends a availability update to members of the same team
|
|
49
|
-
* @param teamId
|
|
50
|
-
* @param type
|
|
51
|
-
* @param options.sendAll=false will broadcast the message to all the members of the team (instead of just direct connections). Should be avoided in a big team
|
|
52
|
-
* @param options.sendAsProtobuf=false
|
|
53
|
-
*/
|
|
54
|
-
async setAvailability(teamId, type, { sendAll = false, sendAsProtobuf = false } = {}) {
|
|
55
|
-
// Get pre-key bundles for members of your own team
|
|
56
|
-
const preKeyBundlesFromTeam = await this.broadcastService.getPreKeyBundlesFromTeam(teamId, false, !sendAll);
|
|
57
|
-
// Get pre-key bundles for all of your other 1:1 connections
|
|
58
|
-
const connections = await this.connectionService.getConnections();
|
|
59
|
-
const acceptedConnections = connections.filter(connection => connection.status === connection_1.ConnectionStatus.ACCEPTED);
|
|
60
|
-
const preKeyBundlePromises = acceptedConnections.map(connection => {
|
|
61
|
-
const mappedConnection = {
|
|
62
|
-
userId: connection.to,
|
|
63
|
-
conversationId: connection.conversation,
|
|
64
|
-
};
|
|
65
|
-
return this.conversationService.getPreKeyBundleMap(mappedConnection.conversationId, [mappedConnection.userId]);
|
|
66
|
-
});
|
|
67
|
-
const preKeyBundlesFromConnections = await Promise.all(preKeyBundlePromises);
|
|
68
|
-
// Merge pre-key bundles
|
|
69
|
-
const allPreKeyBundles = preKeyBundlesFromConnections.reduce((accumulator, preKeyBundleMap) => {
|
|
70
|
-
return Object.assign(Object.assign({}, accumulator), preKeyBundleMap);
|
|
71
|
-
}, preKeyBundlesFromTeam);
|
|
72
|
-
const genericMessage = protocol_messaging_1.GenericMessage.create({
|
|
73
|
-
availability: new protocol_messaging_1.Availability({ type }),
|
|
74
|
-
messageId: uuidjs_1.default.genV4().toString(),
|
|
75
|
-
});
|
|
76
|
-
// Broadcast availability status to your team members & external 1:1 connections
|
|
77
|
-
await this.broadcastService.broadcastGenericMessage(genericMessage, allPreKeyBundles, sendAsProtobuf);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
exports.UserService = UserService;
|
|
81
|
-
//# sourceMappingURL=UserService.js.map
|
package/src/main/user/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './UserService';
|
package/src/main/user/index.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Wire
|
|
4
|
-
* Copyright (C) 2018 Wire Swiss GmbH
|
|
5
|
-
*
|
|
6
|
-
* This program is free software: you can redistribute it and/or modify
|
|
7
|
-
* it under the terms of the GNU General Public License as published by
|
|
8
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
-
* (at your option) any later version.
|
|
10
|
-
*
|
|
11
|
-
* This program is distributed in the hope that it will be useful,
|
|
12
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
-
* GNU General Public License for more details.
|
|
15
|
-
*
|
|
16
|
-
* You should have received a copy of the GNU General Public License
|
|
17
|
-
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
-
*
|
|
19
|
-
*/
|
|
20
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
-
if (k2 === undefined) k2 = k;
|
|
22
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
23
|
-
}) : (function(o, m, k, k2) {
|
|
24
|
-
if (k2 === undefined) k2 = k;
|
|
25
|
-
o[k2] = m[k];
|
|
26
|
-
}));
|
|
27
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
28
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
29
|
-
};
|
|
30
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
__exportStar(require("./UserService"), exports);
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
interface IntervalTask {
|
|
2
|
-
key: string;
|
|
3
|
-
firingDate: number;
|
|
4
|
-
task: () => Promise<any>;
|
|
5
|
-
}
|
|
6
|
-
interface ScheduleLowPrecisionTaskParams extends IntervalTask {
|
|
7
|
-
intervalDelay: number;
|
|
8
|
-
}
|
|
9
|
-
interface CancelLowPrecisionTaskParams {
|
|
10
|
-
key: string;
|
|
11
|
-
intervalDelay: number;
|
|
12
|
-
}
|
|
13
|
-
interface CancelLowPrecisionTaskParams {
|
|
14
|
-
key: string;
|
|
15
|
-
intervalDelay: number;
|
|
16
|
-
}
|
|
17
|
-
export declare const LowPrecisionTaskScheduler: {
|
|
18
|
-
addTask: ({ key, firingDate, task, intervalDelay }: ScheduleLowPrecisionTaskParams) => void;
|
|
19
|
-
cancelTask: ({ intervalDelay, key }: CancelLowPrecisionTaskParams) => void;
|
|
20
|
-
};
|
|
21
|
-
export {};
|