@wireapp/api-client 23.1.0 → 23.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/conversation/ConversationAPI/ConversationAPI.d.ts +1 -15
- package/lib/conversation/ConversationAPI/ConversationAPI.d.ts.map +1 -1
- package/lib/conversation/ConversationAPI/ConversationAPI.js +0 -41
- package/lib/conversation/index.d.ts +0 -1
- package/lib/conversation/index.d.ts.map +1 -1
- package/lib/conversation/index.js +0 -1
- package/package.json +2 -2
- package/lib/conversation/ClientMismatch.d.ts +0 -8
- package/lib/conversation/ClientMismatch.d.ts.map +0 -1
- package/lib/conversation/ClientMismatch.js +0 -20
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proteus as ProtobufOTR } from '@wireapp/protocol-messaging/web/otr';
|
|
2
|
-
import {
|
|
2
|
+
import { Conversation, ConversationCode, ConversationRolesList, Conversations, Invite, Member, MessageSendingStatus, NewConversation, RemoteConversations } from '..';
|
|
3
3
|
import { BackendFeatures } from '../../APIClient';
|
|
4
4
|
import { ConversationAccessUpdateEvent, ConversationCodeDeleteEvent, ConversationCodeUpdateEvent, ConversationEvent, ConversationMemberJoinEvent, ConversationMemberLeaveEvent, ConversationMessageTimerUpdateEvent, ConversationReceiptModeUpdateEvent, ConversationRenameEvent } from '../../event';
|
|
5
5
|
import { HttpClient } from '../../http';
|
|
@@ -223,20 +223,6 @@ export declare class ConversationAPI {
|
|
|
223
223
|
* @see https://nginz-https.anta.wire.link/api/swagger-ui/#/default/post_conversations__cnv_domain___cnv__proteus_messages
|
|
224
224
|
*/
|
|
225
225
|
postOTRMessage(conversationId: string, domain: string, messageData: ProtobufOTR.QualifiedNewOtrMessage): Promise<MessageSendingStatus>;
|
|
226
|
-
/**
|
|
227
|
-
* Post an encrypted message to a conversation.
|
|
228
|
-
* @param sendingClientId The sender's client ID
|
|
229
|
-
* @param conversationId The conversation ID
|
|
230
|
-
* @param messageData The message content
|
|
231
|
-
* @param ignoreMissing Whether to report missing clients or not:
|
|
232
|
-
* `false`: Report about all missing clients
|
|
233
|
-
* `true`: Ignore all missing clients and force sending.
|
|
234
|
-
* Array: User IDs specifying which user IDs are allowed to have
|
|
235
|
-
* missing clients
|
|
236
|
-
* `undefined`: Default to setting of `report_missing` in `NewOTRMessage`
|
|
237
|
-
* @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/postOtrMessage
|
|
238
|
-
*/
|
|
239
|
-
postOTRProtobufMessage(sendingClientId: string, conversationId: string, messageData: ProtobufOTR.NewOtrMessage, ignoreMissing?: boolean | string[]): Promise<ClientMismatch>;
|
|
240
226
|
/**
|
|
241
227
|
* Post an encrypted message to a conversation.
|
|
242
228
|
* @param messageData Mls message payload in TLS format. Please refer to the MLS specification for details.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConversationAPI.d.ts","sourceRoot":"","sources":["../../../src/conversation/ConversationAPI/ConversationAPI.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,qCAAqC,CAAC;AAG3E,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"ConversationAPI.d.ts","sourceRoot":"","sources":["../../../src/conversation/ConversationAPI/ConversationAPI.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,qCAAqC,CAAC;AAG3E,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,aAAa,EAEb,MAAM,EACN,MAAM,EACN,oBAAoB,EACpB,eAAe,EAEf,mBAAmB,EACpB,MAAM,IAAI,CAAC;AACZ,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC3B,2BAA2B,EAC3B,iBAAiB,EACjB,2BAA2B,EAC3B,4BAA4B,EAC5B,mCAAmC,EACnC,kCAAkC,EAClC,uBAAuB,EACxB,MAAM,aAAa,C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AAC,GAChD,OAAO,CAAC,IAAI,CAAC;CASjB"}
|
|
@@ -23,7 +23,6 @@ const ArrayUtil_1 = require("@wireapp/commons/lib/util/ArrayUtil");
|
|
|
23
23
|
const otr_1 = require("@wireapp/protocol-messaging/web/otr");
|
|
24
24
|
const __1 = require("..");
|
|
25
25
|
const http_1 = require("../../http");
|
|
26
|
-
const validation_1 = require("../../validation");
|
|
27
26
|
const ConversationError_1 = require("../ConversationError");
|
|
28
27
|
class ConversationAPI {
|
|
29
28
|
constructor(client, backendFeatures) {
|
|
@@ -535,46 +534,6 @@ class ConversationAPI {
|
|
|
535
534
|
const response = await this.client.sendProtocolBuffer(config, true);
|
|
536
535
|
return response.data;
|
|
537
536
|
}
|
|
538
|
-
/**
|
|
539
|
-
* Post an encrypted message to a conversation.
|
|
540
|
-
* @param sendingClientId The sender's client ID
|
|
541
|
-
* @param conversationId The conversation ID
|
|
542
|
-
* @param messageData The message content
|
|
543
|
-
* @param ignoreMissing Whether to report missing clients or not:
|
|
544
|
-
* `false`: Report about all missing clients
|
|
545
|
-
* `true`: Ignore all missing clients and force sending.
|
|
546
|
-
* Array: User IDs specifying which user IDs are allowed to have
|
|
547
|
-
* missing clients
|
|
548
|
-
* `undefined`: Default to setting of `report_missing` in `NewOTRMessage`
|
|
549
|
-
* @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/postOtrMessage
|
|
550
|
-
*/
|
|
551
|
-
async postOTRProtobufMessage(sendingClientId, conversationId, messageData, ignoreMissing) {
|
|
552
|
-
if (!sendingClientId) {
|
|
553
|
-
throw new validation_1.ValidationError('Unable to send OTR message without client ID.');
|
|
554
|
-
}
|
|
555
|
-
const config = {
|
|
556
|
-
/*
|
|
557
|
-
* We need to slice the content of what protobuf has generated in order for Axios to send the correct buffer (see https://github.com/axios/axios/issues/4068)
|
|
558
|
-
* FIXME: The `slice` can be removed as soon as Axios publishes a version with the dataview issue fixed.
|
|
559
|
-
*/
|
|
560
|
-
data: otr_1.proteus.NewOtrMessage.encode(messageData).finish().slice(),
|
|
561
|
-
method: 'post',
|
|
562
|
-
url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.OTR}/${ConversationAPI.URL.MESSAGES}`,
|
|
563
|
-
};
|
|
564
|
-
if (typeof ignoreMissing !== 'undefined') {
|
|
565
|
-
const ignore_missing = Array.isArray(ignoreMissing) ? ignoreMissing.join(',') : ignoreMissing;
|
|
566
|
-
config.params = { ignore_missing };
|
|
567
|
-
// `ignore_missing` takes precedence on the server so we can remove
|
|
568
|
-
// `report_missing` to save some bandwidth.
|
|
569
|
-
messageData.reportMissing = [];
|
|
570
|
-
}
|
|
571
|
-
else if (typeof messageData.reportMissing === 'undefined' || !messageData.reportMissing.length) {
|
|
572
|
-
// both `ignore_missing` and `report_missing` are undefined
|
|
573
|
-
config.params = { ignore_missing: !!messageData.blob };
|
|
574
|
-
}
|
|
575
|
-
const response = await this.client.sendProtocolBuffer(config, true);
|
|
576
|
-
return response.data;
|
|
577
|
-
}
|
|
578
537
|
/**
|
|
579
538
|
* Post an encrypted message to a conversation.
|
|
580
539
|
* @param messageData Mls message payload in TLS format. Please refer to the MLS specification for details.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/conversation/index.ts"],"names":[],"mappings":"AAmBA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/conversation/index.ts"],"names":[],"mappings":"AAmBA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC"}
|
|
@@ -32,7 +32,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
32
32
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
__exportStar(require("./ClientMismatch"), exports);
|
|
36
35
|
__exportStar(require("./Conversation"), exports);
|
|
37
36
|
__exportStar(require("./ConversationAPI"), exports);
|
|
38
37
|
__exportStar(require("./ConversationCode"), exports);
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ClientMismatch.d.ts","sourceRoot":"","sources":["../../src/conversation/ClientMismatch.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,WAAW,EAAC,MAAM,IAAI,CAAC;AAE/B,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,WAAW,CAAC;IACrB,OAAO,EAAE,WAAW,CAAC;IACrB,SAAS,EAAE,WAAW,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -1,20 +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 });
|