@wireapp/protocol-messaging 1.51.0 → 1.52.0

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/package.json CHANGED
@@ -27,5 +27,5 @@
27
27
  "preversion": "git checkout master && git pull && yarn && yarn dist && yarn test",
28
28
  "test": "tsc --noEmit"
29
29
  },
30
- "version": "1.51.0"
30
+ "version": "1.52.0"
31
31
  }
@@ -34,6 +34,7 @@ message GenericMessage {
34
34
  ClientAction clientAction = 9;
35
35
  Calling calling = 10;
36
36
  Asset asset = 11;
37
+ Multipart multipart = 27;
37
38
  MessageHide hidden = 12;
38
39
  Location location = 13;
39
40
  MessageDelete deleted = 14;
@@ -217,7 +218,6 @@ message MessageEdit {
217
218
  oneof content {
218
219
  Text text = 2;
219
220
  Composite composite = 3;
220
- // Reply can also be edited, but the edit will only affect the Text part
221
221
  }
222
222
  }
223
223
 
@@ -261,6 +261,63 @@ message ImageAsset {
261
261
  optional bytes sha256 = 11; // sha256 of ciphertext
262
262
  }
263
263
 
264
+ // Attachment can attach different kind of assets to a Multipart message
265
+ message Attachment {
266
+ oneof content {
267
+ Asset asset = 1;
268
+ CellAsset cell_asset = 2;
269
+ }
270
+ }
271
+
272
+ // Multipart message combines optional text with multiple attachments
273
+ message Multipart {
274
+ optional Text text = 1;
275
+ repeated Attachment attachments = 2;
276
+
277
+ // Standard flags for all message types
278
+ optional bool expects_read_confirmation = 3 [default = false];
279
+ optional LegalHoldStatus legal_hold_status = 4 [default = UNKNOWN];
280
+ }
281
+
282
+ // CellAsset represents a file uploaded to a conversation cell
283
+ message CellAsset {
284
+
285
+ // Required pydio backend reference
286
+ required string uuid = 1;
287
+ // known mime_type
288
+ required string content_type = 2;
289
+
290
+ // Fields below are used for optimistic display: they could have changed since first posting
291
+
292
+ // Path contains full path including name (last path part)
293
+ optional string initial_name = 3;
294
+ // Size of the file
295
+ optional int64 initial_size = 4;
296
+
297
+ message ImageMetaData {
298
+ required int32 width = 1;
299
+ required int32 height = 2;
300
+ }
301
+
302
+ message VideoMetaData {
303
+ optional int32 width = 1;
304
+ optional int32 height = 2;
305
+ optional uint64 duration_in_millis = 3;
306
+ }
307
+
308
+ message AudioMetaData {
309
+ optional uint64 duration_in_millis = 1;
310
+ optional bytes normalized_loudness = 2;
311
+ }
312
+
313
+ oneof initial_meta_data {
314
+ ImageMetaData image = 5;
315
+ VideoMetaData video = 6;
316
+ AudioMetaData audio = 7;
317
+ }
318
+
319
+ }
320
+
264
321
  message Asset {
265
322
  message Original {
266
323
  required string mime_type = 1;
package/web/messages.d.ts CHANGED
@@ -11,6 +11,7 @@ export interface IGenericMessage {
11
11
  clientAction?: (ClientAction|null);
12
12
  calling?: (ICalling|null);
13
13
  asset?: (IAsset|null);
14
+ multipart?: (IMultipart|null);
14
15
  hidden?: (IMessageHide|null);
15
16
  location?: (ILocation|null);
16
17
  deleted?: (IMessageDelete|null);
@@ -40,6 +41,7 @@ export class GenericMessage implements IGenericMessage {
40
41
  public clientAction?: (ClientAction|null);
41
42
  public calling?: (ICalling|null);
42
43
  public asset?: (IAsset|null);
44
+ public multipart?: (IMultipart|null);
43
45
  public hidden?: (IMessageHide|null);
44
46
  public location?: (ILocation|null);
45
47
  public deleted?: (IMessageDelete|null);
@@ -55,7 +57,7 @@ export class GenericMessage implements IGenericMessage {
55
57
  public inCallEmoji?: (IInCallEmoji|null);
56
58
  public inCallHandRaise?: (IInCallHandRaise|null);
57
59
  public unknownStrategy: GenericMessage.UnknownStrategy;
58
- public content?: ("text"|"image"|"knock"|"lastRead"|"cleared"|"external"|"clientAction"|"calling"|"asset"|"hidden"|"location"|"deleted"|"edited"|"confirmation"|"reaction"|"ephemeral"|"availability"|"composite"|"buttonAction"|"buttonActionConfirmation"|"dataTransfer"|"inCallEmoji"|"inCallHandRaise");
60
+ public content?: ("text"|"image"|"knock"|"lastRead"|"cleared"|"external"|"clientAction"|"calling"|"asset"|"multipart"|"hidden"|"location"|"deleted"|"edited"|"confirmation"|"reaction"|"ephemeral"|"availability"|"composite"|"buttonAction"|"buttonActionConfirmation"|"dataTransfer"|"inCallEmoji"|"inCallHandRaise");
59
61
  public static create(properties?: IGenericMessage): GenericMessage;
60
62
  public static encode(message: IGenericMessage, writer?: $protobuf.Writer): $protobuf.Writer;
61
63
  public static encodeDelimited(message: IGenericMessage, writer?: $protobuf.Writer): $protobuf.Writer;
@@ -680,6 +682,153 @@ export class ImageAsset implements IImageAsset {
680
682
  public static getTypeUrl(typeUrlPrefix?: string): string;
681
683
  }
682
684
 
685
+ export interface IAttachment {
686
+ asset?: (IAsset|null);
687
+ cellAsset?: (ICellAsset|null);
688
+ }
689
+
690
+ export class Attachment implements IAttachment {
691
+ constructor(properties?: IAttachment);
692
+ public asset?: (IAsset|null);
693
+ public cellAsset?: (ICellAsset|null);
694
+ public content?: ("asset"|"cellAsset");
695
+ public static create(properties?: IAttachment): Attachment;
696
+ public static encode(message: IAttachment, writer?: $protobuf.Writer): $protobuf.Writer;
697
+ public static encodeDelimited(message: IAttachment, writer?: $protobuf.Writer): $protobuf.Writer;
698
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Attachment;
699
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Attachment;
700
+ public static verify(message: { [k: string]: any }): (string|null);
701
+ public static fromObject(object: { [k: string]: any }): Attachment;
702
+ public static toObject(message: Attachment, options?: $protobuf.IConversionOptions): { [k: string]: any };
703
+ public toJSON(): { [k: string]: any };
704
+ public static getTypeUrl(typeUrlPrefix?: string): string;
705
+ }
706
+
707
+ export interface IMultipart {
708
+ text?: (IText|null);
709
+ attachments?: (IAttachment[]|null);
710
+ expectsReadConfirmation?: (boolean|null);
711
+ legalHoldStatus?: (LegalHoldStatus|null);
712
+ }
713
+
714
+ export class Multipart implements IMultipart {
715
+ constructor(properties?: IMultipart);
716
+ public text?: (IText|null);
717
+ public attachments: IAttachment[];
718
+ public expectsReadConfirmation: boolean;
719
+ public legalHoldStatus: LegalHoldStatus;
720
+ public static create(properties?: IMultipart): Multipart;
721
+ public static encode(message: IMultipart, writer?: $protobuf.Writer): $protobuf.Writer;
722
+ public static encodeDelimited(message: IMultipart, writer?: $protobuf.Writer): $protobuf.Writer;
723
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): Multipart;
724
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): Multipart;
725
+ public static verify(message: { [k: string]: any }): (string|null);
726
+ public static fromObject(object: { [k: string]: any }): Multipart;
727
+ public static toObject(message: Multipart, options?: $protobuf.IConversionOptions): { [k: string]: any };
728
+ public toJSON(): { [k: string]: any };
729
+ public static getTypeUrl(typeUrlPrefix?: string): string;
730
+ }
731
+
732
+ export interface ICellAsset {
733
+ uuid: string;
734
+ contentType: string;
735
+ initialName?: (string|null);
736
+ initialSize?: (number|Long|null);
737
+ image?: (CellAsset.IImageMetaData|null);
738
+ video?: (CellAsset.IVideoMetaData|null);
739
+ audio?: (CellAsset.IAudioMetaData|null);
740
+ }
741
+
742
+ export class CellAsset implements ICellAsset {
743
+ constructor(properties?: ICellAsset);
744
+ public uuid: string;
745
+ public contentType: string;
746
+ public initialName: string;
747
+ public initialSize: (number|Long);
748
+ public image?: (CellAsset.IImageMetaData|null);
749
+ public video?: (CellAsset.IVideoMetaData|null);
750
+ public audio?: (CellAsset.IAudioMetaData|null);
751
+ public initialMetaData?: ("image"|"video"|"audio");
752
+ public static create(properties?: ICellAsset): CellAsset;
753
+ public static encode(message: ICellAsset, writer?: $protobuf.Writer): $protobuf.Writer;
754
+ public static encodeDelimited(message: ICellAsset, writer?: $protobuf.Writer): $protobuf.Writer;
755
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): CellAsset;
756
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): CellAsset;
757
+ public static verify(message: { [k: string]: any }): (string|null);
758
+ public static fromObject(object: { [k: string]: any }): CellAsset;
759
+ public static toObject(message: CellAsset, options?: $protobuf.IConversionOptions): { [k: string]: any };
760
+ public toJSON(): { [k: string]: any };
761
+ public static getTypeUrl(typeUrlPrefix?: string): string;
762
+ }
763
+
764
+ export namespace CellAsset {
765
+
766
+ interface IImageMetaData {
767
+ width: number;
768
+ height: number;
769
+ }
770
+
771
+ class ImageMetaData implements IImageMetaData {
772
+ constructor(properties?: CellAsset.IImageMetaData);
773
+ public width: number;
774
+ public height: number;
775
+ public static create(properties?: CellAsset.IImageMetaData): CellAsset.ImageMetaData;
776
+ public static encode(message: CellAsset.IImageMetaData, writer?: $protobuf.Writer): $protobuf.Writer;
777
+ public static encodeDelimited(message: CellAsset.IImageMetaData, writer?: $protobuf.Writer): $protobuf.Writer;
778
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): CellAsset.ImageMetaData;
779
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): CellAsset.ImageMetaData;
780
+ public static verify(message: { [k: string]: any }): (string|null);
781
+ public static fromObject(object: { [k: string]: any }): CellAsset.ImageMetaData;
782
+ public static toObject(message: CellAsset.ImageMetaData, options?: $protobuf.IConversionOptions): { [k: string]: any };
783
+ public toJSON(): { [k: string]: any };
784
+ public static getTypeUrl(typeUrlPrefix?: string): string;
785
+ }
786
+
787
+ interface IVideoMetaData {
788
+ width?: (number|null);
789
+ height?: (number|null);
790
+ durationInMillis?: (number|Long|null);
791
+ }
792
+
793
+ class VideoMetaData implements IVideoMetaData {
794
+ constructor(properties?: CellAsset.IVideoMetaData);
795
+ public width: number;
796
+ public height: number;
797
+ public durationInMillis: (number|Long);
798
+ public static create(properties?: CellAsset.IVideoMetaData): CellAsset.VideoMetaData;
799
+ public static encode(message: CellAsset.IVideoMetaData, writer?: $protobuf.Writer): $protobuf.Writer;
800
+ public static encodeDelimited(message: CellAsset.IVideoMetaData, writer?: $protobuf.Writer): $protobuf.Writer;
801
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): CellAsset.VideoMetaData;
802
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): CellAsset.VideoMetaData;
803
+ public static verify(message: { [k: string]: any }): (string|null);
804
+ public static fromObject(object: { [k: string]: any }): CellAsset.VideoMetaData;
805
+ public static toObject(message: CellAsset.VideoMetaData, options?: $protobuf.IConversionOptions): { [k: string]: any };
806
+ public toJSON(): { [k: string]: any };
807
+ public static getTypeUrl(typeUrlPrefix?: string): string;
808
+ }
809
+
810
+ interface IAudioMetaData {
811
+ durationInMillis?: (number|Long|null);
812
+ normalizedLoudness?: (Uint8Array|null);
813
+ }
814
+
815
+ class AudioMetaData implements IAudioMetaData {
816
+ constructor(properties?: CellAsset.IAudioMetaData);
817
+ public durationInMillis: (number|Long);
818
+ public normalizedLoudness: Uint8Array;
819
+ public static create(properties?: CellAsset.IAudioMetaData): CellAsset.AudioMetaData;
820
+ public static encode(message: CellAsset.IAudioMetaData, writer?: $protobuf.Writer): $protobuf.Writer;
821
+ public static encodeDelimited(message: CellAsset.IAudioMetaData, writer?: $protobuf.Writer): $protobuf.Writer;
822
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): CellAsset.AudioMetaData;
823
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): CellAsset.AudioMetaData;
824
+ public static verify(message: { [k: string]: any }): (string|null);
825
+ public static fromObject(object: { [k: string]: any }): CellAsset.AudioMetaData;
826
+ public static toObject(message: CellAsset.AudioMetaData, options?: $protobuf.IConversionOptions): { [k: string]: any };
827
+ public toJSON(): { [k: string]: any };
828
+ public static getTypeUrl(typeUrlPrefix?: string): string;
829
+ }
830
+ }
831
+
683
832
  export interface IAsset {
684
833
  original?: (Asset.IOriginal|null);
685
834
  notUploaded?: (Asset.NotUploaded|null);