@juzi/wechaty-grpc 1.0.25 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/cjs/out/protoc-gen-openapiv2/options/openapiv2_pb.d.ts +13 -0
  2. package/dist/cjs/out/protoc-gen-openapiv2/options/openapiv2_pb.js +118 -2
  3. package/dist/cjs/out/wechaty/puppet/base_pb.d.ts +3 -2
  4. package/dist/cjs/out/wechaty/puppet/base_pb.js +3 -2
  5. package/dist/cjs/out/wechaty/puppet/conversation_grpc_pb.js +1 -0
  6. package/dist/cjs/out/wechaty/puppet/conversation_pb.d.ts +41 -0
  7. package/dist/cjs/out/wechaty/puppet/conversation_pb.js +293 -0
  8. package/dist/cjs/out/wechaty/puppet/conversation_pb_service.d.ts +3 -0
  9. package/dist/cjs/out/wechaty/puppet/conversation_pb_service.js +3 -0
  10. package/dist/cjs/out/wechaty/puppet.openapi.yaml +35 -1
  11. package/dist/cjs/out/wechaty/puppet.swagger.json +50 -1
  12. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +18 -0
  13. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +38 -0
  14. package/dist/cjs/out/wechaty/puppet_pb.d.ts +1 -0
  15. package/dist/cjs/out/wechaty/puppet_pb.js +2 -0
  16. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +20 -0
  17. package/dist/cjs/out/wechaty/puppet_pb_service.js +41 -0
  18. package/dist/cjs/proto/wechaty/puppet/base.proto +3 -2
  19. package/dist/cjs/proto/wechaty/puppet/conversation.proto +12 -0
  20. package/dist/cjs/proto/wechaty/puppet.proto +13 -0
  21. package/dist/cjs/src/package-json.js +1 -1
  22. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  23. package/dist/cjs/tests/puppet-server-impl.js +5 -0
  24. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  25. package/dist/esm/out/protoc-gen-openapiv2/options/openapiv2_pb.d.ts +13 -0
  26. package/dist/esm/out/protoc-gen-openapiv2/options/openapiv2_pb.js +118 -2
  27. package/dist/esm/out/wechaty/puppet/base_pb.d.ts +3 -2
  28. package/dist/esm/out/wechaty/puppet/base_pb.js +3 -2
  29. package/dist/esm/out/wechaty/puppet/conversation_grpc_pb.js +1 -0
  30. package/dist/esm/out/wechaty/puppet/conversation_pb.d.ts +41 -0
  31. package/dist/esm/out/wechaty/puppet/conversation_pb.js +293 -0
  32. package/dist/esm/out/wechaty/puppet/conversation_pb_service.d.ts +3 -0
  33. package/dist/esm/out/wechaty/puppet/conversation_pb_service.js +3 -0
  34. package/dist/esm/out/wechaty/puppet.openapi.yaml +35 -1
  35. package/dist/esm/out/wechaty/puppet.swagger.json +50 -1
  36. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +18 -0
  37. package/dist/esm/out/wechaty/puppet_grpc_pb.js +38 -0
  38. package/dist/esm/out/wechaty/puppet_pb.d.ts +1 -0
  39. package/dist/esm/out/wechaty/puppet_pb.js +2 -0
  40. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +20 -0
  41. package/dist/esm/out/wechaty/puppet_pb_service.js +41 -0
  42. package/dist/esm/proto/wechaty/puppet/base.proto +3 -2
  43. package/dist/esm/proto/wechaty/puppet/conversation.proto +12 -0
  44. package/dist/esm/proto/wechaty/puppet.proto +13 -0
  45. package/dist/esm/src/package-json.js +1 -1
  46. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  47. package/dist/esm/tests/puppet-server-impl.js +5 -0
  48. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  49. package/out/protoc-gen-openapiv2/options/openapiv2_pb.d.ts +13 -0
  50. package/out/protoc-gen-openapiv2/options/openapiv2_pb.js +118 -2
  51. package/out/wechaty/puppet/base_pb.d.ts +3 -2
  52. package/out/wechaty/puppet/base_pb.js +3 -2
  53. package/out/wechaty/puppet/conversation_grpc_pb.js +1 -0
  54. package/out/wechaty/puppet/conversation_pb.d.ts +41 -0
  55. package/out/wechaty/puppet/conversation_pb.js +293 -0
  56. package/out/wechaty/puppet/conversation_pb_service.d.ts +3 -0
  57. package/out/wechaty/puppet/conversation_pb_service.js +3 -0
  58. package/out/wechaty/puppet.openapi.yaml +35 -1
  59. package/out/wechaty/puppet.swagger.json +50 -1
  60. package/out/wechaty/puppet_grpc_pb.d.ts +18 -0
  61. package/out/wechaty/puppet_grpc_pb.js +38 -0
  62. package/out/wechaty/puppet_pb.d.ts +1 -0
  63. package/out/wechaty/puppet_pb.js +2 -0
  64. package/out/wechaty/puppet_pb_service.d.ts +20 -0
  65. package/out/wechaty/puppet_pb_service.js +41 -0
  66. package/package.json +1 -1
  67. package/src/package-json.ts +1 -1
@@ -402,7 +402,7 @@ if (goog.DEBUG && !COMPILED) {
402
402
  * @private {!Array<number>}
403
403
  * @const
404
404
  */
405
- proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.repeatedFields_ = [5,6,7,12];
405
+ proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.repeatedFields_ = [5,6,7,12,13];
406
406
 
407
407
 
408
408
 
@@ -446,6 +446,8 @@ proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.toObject = function(incl
446
446
  securityDefinitions: (f = msg.getSecurityDefinitions()) && proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions.toObject(includeInstance, f),
447
447
  securityList: jspb.Message.toObjectList(msg.getSecurityList(),
448
448
  proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.toObject, includeInstance),
449
+ tagsList: jspb.Message.toObjectList(msg.getTagsList(),
450
+ proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.toObject, includeInstance),
449
451
  externalDocs: (f = msg.getExternalDocs()) && proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.toObject(includeInstance, f),
450
452
  extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : []
451
453
  };
@@ -531,6 +533,11 @@ proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.deserializeBinaryFromRea
531
533
  reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.deserializeBinaryFromReader);
532
534
  msg.addSecurity(value);
533
535
  break;
536
+ case 13:
537
+ var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.Tag;
538
+ reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.deserializeBinaryFromReader);
539
+ msg.addTags(value);
540
+ break;
534
541
  case 14:
535
542
  var value = new proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation;
536
543
  reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinaryFromReader);
@@ -641,6 +648,14 @@ proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.serializeBinaryToWriter
641
648
  proto.grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement.serializeBinaryToWriter
642
649
  );
643
650
  }
651
+ f = message.getTagsList();
652
+ if (f.length > 0) {
653
+ writer.writeRepeatedMessage(
654
+ 13,
655
+ f,
656
+ proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.serializeBinaryToWriter
657
+ );
658
+ }
644
659
  f = message.getExternalDocs();
645
660
  if (f != null) {
646
661
  writer.writeMessage(
@@ -955,6 +970,44 @@ proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearSecurityL
955
970
  };
956
971
 
957
972
 
973
+ /**
974
+ * repeated Tag tags = 13;
975
+ * @return {!Array<!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag>}
976
+ */
977
+ proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.getTagsList = function() {
978
+ return /** @type{!Array<!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag>} */ (
979
+ jspb.Message.getRepeatedWrapperField(this, proto.grpc.gateway.protoc_gen_openapiv2.options.Tag, 13));
980
+ };
981
+
982
+
983
+ /**
984
+ * @param {!Array<!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag>} value
985
+ * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this
986
+ */
987
+ proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.setTagsList = function(value) {
988
+ return jspb.Message.setRepeatedWrapperField(this, 13, value);
989
+ };
990
+
991
+
992
+ /**
993
+ * @param {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag=} opt_value
994
+ * @param {number=} opt_index
995
+ * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag}
996
+ */
997
+ proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.addTags = function(opt_value, opt_index) {
998
+ return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.grpc.gateway.protoc_gen_openapiv2.options.Tag, opt_index);
999
+ };
1000
+
1001
+
1002
+ /**
1003
+ * Clears the list making it empty but non-null.
1004
+ * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger} returns this
1005
+ */
1006
+ proto.grpc.gateway.protoc_gen_openapiv2.options.Swagger.prototype.clearTagsList = function() {
1007
+ return this.setTagsList([]);
1008
+ };
1009
+
1010
+
958
1011
  /**
959
1012
  * optional ExternalDocumentation external_docs = 14;
960
1013
  * @return {?proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation}
@@ -4461,8 +4514,10 @@ proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.toObject = functio
4461
4514
  */
4462
4515
  proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.toObject = function(includeInstance, msg) {
4463
4516
  var f, obj = {
4517
+ name: jspb.Message.getFieldWithDefault(msg, 1, ""),
4464
4518
  description: jspb.Message.getFieldWithDefault(msg, 2, ""),
4465
- externalDocs: (f = msg.getExternalDocs()) && proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.toObject(includeInstance, f)
4519
+ externalDocs: (f = msg.getExternalDocs()) && proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.toObject(includeInstance, f),
4520
+ extensionsMap: (f = msg.getExtensionsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : []
4466
4521
  };
4467
4522
 
4468
4523
  if (includeInstance) {
@@ -4499,6 +4554,10 @@ proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.deserializeBinaryFromReader
4499
4554
  }
4500
4555
  var field = reader.getFieldNumber();
4501
4556
  switch (field) {
4557
+ case 1:
4558
+ var value = /** @type {string} */ (reader.readString());
4559
+ msg.setName(value);
4560
+ break;
4502
4561
  case 2:
4503
4562
  var value = /** @type {string} */ (reader.readString());
4504
4563
  msg.setDescription(value);
@@ -4508,6 +4567,12 @@ proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.deserializeBinaryFromReader
4508
4567
  reader.readMessage(value,proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.deserializeBinaryFromReader);
4509
4568
  msg.setExternalDocs(value);
4510
4569
  break;
4570
+ case 4:
4571
+ var value = msg.getExtensionsMap();
4572
+ reader.readMessage(value, function(message, reader) {
4573
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value());
4574
+ });
4575
+ break;
4511
4576
  default:
4512
4577
  reader.skipField();
4513
4578
  break;
@@ -4537,6 +4602,13 @@ proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.serializeBinary =
4537
4602
  */
4538
4603
  proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.serializeBinaryToWriter = function(message, writer) {
4539
4604
  var f = undefined;
4605
+ f = message.getName();
4606
+ if (f.length > 0) {
4607
+ writer.writeString(
4608
+ 1,
4609
+ f
4610
+ );
4611
+ }
4540
4612
  f = message.getDescription();
4541
4613
  if (f.length > 0) {
4542
4614
  writer.writeString(
@@ -4552,6 +4624,28 @@ proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.serializeBinaryToWriter = fu
4552
4624
  proto.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation.serializeBinaryToWriter
4553
4625
  );
4554
4626
  }
4627
+ f = message.getExtensionsMap(true);
4628
+ if (f && f.getLength() > 0) {
4629
+ f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter);
4630
+ }
4631
+ };
4632
+
4633
+
4634
+ /**
4635
+ * optional string name = 1;
4636
+ * @return {string}
4637
+ */
4638
+ proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.getName = function() {
4639
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
4640
+ };
4641
+
4642
+
4643
+ /**
4644
+ * @param {string} value
4645
+ * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} returns this
4646
+ */
4647
+ proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.setName = function(value) {
4648
+ return jspb.Message.setProto3StringField(this, 1, value);
4555
4649
  };
4556
4650
 
4557
4651
 
@@ -4610,6 +4704,28 @@ proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.hasExternalDocs =
4610
4704
  };
4611
4705
 
4612
4706
 
4707
+ /**
4708
+ * map<string, google.protobuf.Value> extensions = 4;
4709
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
4710
+ * empty, instead returning `undefined`
4711
+ * @return {!jspb.Map<string,!proto.google.protobuf.Value>}
4712
+ */
4713
+ proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.getExtensionsMap = function(opt_noLazyCreate) {
4714
+ return /** @type {!jspb.Map<string,!proto.google.protobuf.Value>} */ (
4715
+ jspb.Message.getMapField(this, 4, opt_noLazyCreate,
4716
+ proto.google.protobuf.Value));
4717
+ };
4718
+
4719
+
4720
+ /**
4721
+ * Clears values from the map. The map will be non-null.
4722
+ * @return {!proto.grpc.gateway.protoc_gen_openapiv2.options.Tag} returns this
4723
+ */
4724
+ proto.grpc.gateway.protoc_gen_openapiv2.options.Tag.prototype.clearExtensionsMap = function() {
4725
+ this.getExtensionsMap().clear();
4726
+ return this;};
4727
+
4728
+
4613
4729
 
4614
4730
 
4615
4731
 
@@ -254,8 +254,9 @@ export interface PayloadTypeMap {
254
254
  PAYLOAD_TYPE_ROOM: 3;
255
255
  PAYLOAD_TYPE_ROOM_MEMBER: 4;
256
256
  PAYLOAD_TYPE_FRIENDSHIP: 5;
257
- PAYLOAD_TYPE_TAG: 6;
258
- PAYLOAD_TYPE_TAG_GROUP: 7;
257
+ PAYLOAD_TYPE_POST: 6;
258
+ PAYLOAD_TYPE_TAG: 7;
259
+ PAYLOAD_TYPE_TAG_GROUP: 8;
259
260
  }
260
261
 
261
262
  export const PayloadType: PayloadTypeMap;
@@ -1894,8 +1894,9 @@ proto.wechaty.puppet.PayloadType = {
1894
1894
  PAYLOAD_TYPE_ROOM: 3,
1895
1895
  PAYLOAD_TYPE_ROOM_MEMBER: 4,
1896
1896
  PAYLOAD_TYPE_FRIENDSHIP: 5,
1897
- PAYLOAD_TYPE_TAG: 6,
1898
- PAYLOAD_TYPE_TAG_GROUP: 7
1897
+ PAYLOAD_TYPE_POST: 6,
1898
+ PAYLOAD_TYPE_TAG: 7,
1899
+ PAYLOAD_TYPE_TAG_GROUP: 8
1899
1900
  };
1900
1901
 
1901
1902
  goog.object.extend(exports, proto.wechaty.puppet);
@@ -0,0 +1 @@
1
+ // GENERATED CODE -- NO SERVICES IN PROTO
@@ -0,0 +1,41 @@
1
+ // package: wechaty.puppet
2
+ // file: wechaty/puppet/conversation.proto
3
+
4
+ import * as jspb from "google-protobuf";
5
+
6
+ export class ConversationReadRequest extends jspb.Message {
7
+ getConversationId(): string;
8
+ setConversationId(value: string): void;
9
+
10
+ serializeBinary(): Uint8Array;
11
+ toObject(includeInstance?: boolean): ConversationReadRequest.AsObject;
12
+ static toObject(includeInstance: boolean, msg: ConversationReadRequest): ConversationReadRequest.AsObject;
13
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
14
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
15
+ static serializeBinaryToWriter(message: ConversationReadRequest, writer: jspb.BinaryWriter): void;
16
+ static deserializeBinary(bytes: Uint8Array): ConversationReadRequest;
17
+ static deserializeBinaryFromReader(message: ConversationReadRequest, reader: jspb.BinaryReader): ConversationReadRequest;
18
+ }
19
+
20
+ export namespace ConversationReadRequest {
21
+ export type AsObject = {
22
+ conversationId: string,
23
+ }
24
+ }
25
+
26
+ export class ConversationReadResponse extends jspb.Message {
27
+ serializeBinary(): Uint8Array;
28
+ toObject(includeInstance?: boolean): ConversationReadResponse.AsObject;
29
+ static toObject(includeInstance: boolean, msg: ConversationReadResponse): ConversationReadResponse.AsObject;
30
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
31
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
32
+ static serializeBinaryToWriter(message: ConversationReadResponse, writer: jspb.BinaryWriter): void;
33
+ static deserializeBinary(bytes: Uint8Array): ConversationReadResponse;
34
+ static deserializeBinaryFromReader(message: ConversationReadResponse, reader: jspb.BinaryReader): ConversationReadResponse;
35
+ }
36
+
37
+ export namespace ConversationReadResponse {
38
+ export type AsObject = {
39
+ }
40
+ }
41
+
@@ -0,0 +1,293 @@
1
+ // source: wechaty/puppet/conversation.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
17
+
18
+ goog.exportSymbol('proto.wechaty.puppet.ConversationReadRequest', null, global);
19
+ goog.exportSymbol('proto.wechaty.puppet.ConversationReadResponse', null, global);
20
+ /**
21
+ * Generated by JsPbCodeGenerator.
22
+ * @param {Array=} opt_data Optional initial data array, typically from a
23
+ * server response, or constructed directly in Javascript. The array is used
24
+ * in place and becomes part of the constructed object. It is not cloned.
25
+ * If no data is provided, the constructed object will be empty, but still
26
+ * valid.
27
+ * @extends {jspb.Message}
28
+ * @constructor
29
+ */
30
+ proto.wechaty.puppet.ConversationReadRequest = function(opt_data) {
31
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
32
+ };
33
+ goog.inherits(proto.wechaty.puppet.ConversationReadRequest, jspb.Message);
34
+ if (goog.DEBUG && !COMPILED) {
35
+ /**
36
+ * @public
37
+ * @override
38
+ */
39
+ proto.wechaty.puppet.ConversationReadRequest.displayName = 'proto.wechaty.puppet.ConversationReadRequest';
40
+ }
41
+ /**
42
+ * Generated by JsPbCodeGenerator.
43
+ * @param {Array=} opt_data Optional initial data array, typically from a
44
+ * server response, or constructed directly in Javascript. The array is used
45
+ * in place and becomes part of the constructed object. It is not cloned.
46
+ * If no data is provided, the constructed object will be empty, but still
47
+ * valid.
48
+ * @extends {jspb.Message}
49
+ * @constructor
50
+ */
51
+ proto.wechaty.puppet.ConversationReadResponse = function(opt_data) {
52
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
53
+ };
54
+ goog.inherits(proto.wechaty.puppet.ConversationReadResponse, jspb.Message);
55
+ if (goog.DEBUG && !COMPILED) {
56
+ /**
57
+ * @public
58
+ * @override
59
+ */
60
+ proto.wechaty.puppet.ConversationReadResponse.displayName = 'proto.wechaty.puppet.ConversationReadResponse';
61
+ }
62
+
63
+
64
+
65
+ if (jspb.Message.GENERATE_TO_OBJECT) {
66
+ /**
67
+ * Creates an object representation of this proto.
68
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
69
+ * Optional fields that are not set will be set to undefined.
70
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
71
+ * For the list of reserved names please see:
72
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
73
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
74
+ * JSPB instance for transitional soy proto support:
75
+ * http://goto/soy-param-migration
76
+ * @return {!Object}
77
+ */
78
+ proto.wechaty.puppet.ConversationReadRequest.prototype.toObject = function(opt_includeInstance) {
79
+ return proto.wechaty.puppet.ConversationReadRequest.toObject(opt_includeInstance, this);
80
+ };
81
+
82
+
83
+ /**
84
+ * Static version of the {@see toObject} method.
85
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
86
+ * the JSPB instance for transitional soy proto support:
87
+ * http://goto/soy-param-migration
88
+ * @param {!proto.wechaty.puppet.ConversationReadRequest} msg The msg instance to transform.
89
+ * @return {!Object}
90
+ * @suppress {unusedLocalVariables} f is only used for nested messages
91
+ */
92
+ proto.wechaty.puppet.ConversationReadRequest.toObject = function(includeInstance, msg) {
93
+ var f, obj = {
94
+ conversationId: jspb.Message.getFieldWithDefault(msg, 1, "")
95
+ };
96
+
97
+ if (includeInstance) {
98
+ obj.$jspbMessageInstance = msg;
99
+ }
100
+ return obj;
101
+ };
102
+ }
103
+
104
+
105
+ /**
106
+ * Deserializes binary data (in protobuf wire format).
107
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
108
+ * @return {!proto.wechaty.puppet.ConversationReadRequest}
109
+ */
110
+ proto.wechaty.puppet.ConversationReadRequest.deserializeBinary = function(bytes) {
111
+ var reader = new jspb.BinaryReader(bytes);
112
+ var msg = new proto.wechaty.puppet.ConversationReadRequest;
113
+ return proto.wechaty.puppet.ConversationReadRequest.deserializeBinaryFromReader(msg, reader);
114
+ };
115
+
116
+
117
+ /**
118
+ * Deserializes binary data (in protobuf wire format) from the
119
+ * given reader into the given message object.
120
+ * @param {!proto.wechaty.puppet.ConversationReadRequest} msg The message object to deserialize into.
121
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
122
+ * @return {!proto.wechaty.puppet.ConversationReadRequest}
123
+ */
124
+ proto.wechaty.puppet.ConversationReadRequest.deserializeBinaryFromReader = function(msg, reader) {
125
+ while (reader.nextField()) {
126
+ if (reader.isEndGroup()) {
127
+ break;
128
+ }
129
+ var field = reader.getFieldNumber();
130
+ switch (field) {
131
+ case 1:
132
+ var value = /** @type {string} */ (reader.readString());
133
+ msg.setConversationId(value);
134
+ break;
135
+ default:
136
+ reader.skipField();
137
+ break;
138
+ }
139
+ }
140
+ return msg;
141
+ };
142
+
143
+
144
+ /**
145
+ * Serializes the message to binary data (in protobuf wire format).
146
+ * @return {!Uint8Array}
147
+ */
148
+ proto.wechaty.puppet.ConversationReadRequest.prototype.serializeBinary = function() {
149
+ var writer = new jspb.BinaryWriter();
150
+ proto.wechaty.puppet.ConversationReadRequest.serializeBinaryToWriter(this, writer);
151
+ return writer.getResultBuffer();
152
+ };
153
+
154
+
155
+ /**
156
+ * Serializes the given message to binary data (in protobuf wire
157
+ * format), writing to the given BinaryWriter.
158
+ * @param {!proto.wechaty.puppet.ConversationReadRequest} message
159
+ * @param {!jspb.BinaryWriter} writer
160
+ * @suppress {unusedLocalVariables} f is only used for nested messages
161
+ */
162
+ proto.wechaty.puppet.ConversationReadRequest.serializeBinaryToWriter = function(message, writer) {
163
+ var f = undefined;
164
+ f = message.getConversationId();
165
+ if (f.length > 0) {
166
+ writer.writeString(
167
+ 1,
168
+ f
169
+ );
170
+ }
171
+ };
172
+
173
+
174
+ /**
175
+ * optional string conversation_id = 1;
176
+ * @return {string}
177
+ */
178
+ proto.wechaty.puppet.ConversationReadRequest.prototype.getConversationId = function() {
179
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
180
+ };
181
+
182
+
183
+ /**
184
+ * @param {string} value
185
+ * @return {!proto.wechaty.puppet.ConversationReadRequest} returns this
186
+ */
187
+ proto.wechaty.puppet.ConversationReadRequest.prototype.setConversationId = function(value) {
188
+ return jspb.Message.setProto3StringField(this, 1, value);
189
+ };
190
+
191
+
192
+
193
+
194
+
195
+ if (jspb.Message.GENERATE_TO_OBJECT) {
196
+ /**
197
+ * Creates an object representation of this proto.
198
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
199
+ * Optional fields that are not set will be set to undefined.
200
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
201
+ * For the list of reserved names please see:
202
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
203
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
204
+ * JSPB instance for transitional soy proto support:
205
+ * http://goto/soy-param-migration
206
+ * @return {!Object}
207
+ */
208
+ proto.wechaty.puppet.ConversationReadResponse.prototype.toObject = function(opt_includeInstance) {
209
+ return proto.wechaty.puppet.ConversationReadResponse.toObject(opt_includeInstance, this);
210
+ };
211
+
212
+
213
+ /**
214
+ * Static version of the {@see toObject} method.
215
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
216
+ * the JSPB instance for transitional soy proto support:
217
+ * http://goto/soy-param-migration
218
+ * @param {!proto.wechaty.puppet.ConversationReadResponse} msg The msg instance to transform.
219
+ * @return {!Object}
220
+ * @suppress {unusedLocalVariables} f is only used for nested messages
221
+ */
222
+ proto.wechaty.puppet.ConversationReadResponse.toObject = function(includeInstance, msg) {
223
+ var f, obj = {
224
+
225
+ };
226
+
227
+ if (includeInstance) {
228
+ obj.$jspbMessageInstance = msg;
229
+ }
230
+ return obj;
231
+ };
232
+ }
233
+
234
+
235
+ /**
236
+ * Deserializes binary data (in protobuf wire format).
237
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
238
+ * @return {!proto.wechaty.puppet.ConversationReadResponse}
239
+ */
240
+ proto.wechaty.puppet.ConversationReadResponse.deserializeBinary = function(bytes) {
241
+ var reader = new jspb.BinaryReader(bytes);
242
+ var msg = new proto.wechaty.puppet.ConversationReadResponse;
243
+ return proto.wechaty.puppet.ConversationReadResponse.deserializeBinaryFromReader(msg, reader);
244
+ };
245
+
246
+
247
+ /**
248
+ * Deserializes binary data (in protobuf wire format) from the
249
+ * given reader into the given message object.
250
+ * @param {!proto.wechaty.puppet.ConversationReadResponse} msg The message object to deserialize into.
251
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
252
+ * @return {!proto.wechaty.puppet.ConversationReadResponse}
253
+ */
254
+ proto.wechaty.puppet.ConversationReadResponse.deserializeBinaryFromReader = function(msg, reader) {
255
+ while (reader.nextField()) {
256
+ if (reader.isEndGroup()) {
257
+ break;
258
+ }
259
+ var field = reader.getFieldNumber();
260
+ switch (field) {
261
+ default:
262
+ reader.skipField();
263
+ break;
264
+ }
265
+ }
266
+ return msg;
267
+ };
268
+
269
+
270
+ /**
271
+ * Serializes the message to binary data (in protobuf wire format).
272
+ * @return {!Uint8Array}
273
+ */
274
+ proto.wechaty.puppet.ConversationReadResponse.prototype.serializeBinary = function() {
275
+ var writer = new jspb.BinaryWriter();
276
+ proto.wechaty.puppet.ConversationReadResponse.serializeBinaryToWriter(this, writer);
277
+ return writer.getResultBuffer();
278
+ };
279
+
280
+
281
+ /**
282
+ * Serializes the given message to binary data (in protobuf wire
283
+ * format), writing to the given BinaryWriter.
284
+ * @param {!proto.wechaty.puppet.ConversationReadResponse} message
285
+ * @param {!jspb.BinaryWriter} writer
286
+ * @suppress {unusedLocalVariables} f is only used for nested messages
287
+ */
288
+ proto.wechaty.puppet.ConversationReadResponse.serializeBinaryToWriter = function(message, writer) {
289
+ var f = undefined;
290
+ };
291
+
292
+
293
+ goog.object.extend(exports, proto.wechaty.puppet);
@@ -0,0 +1,3 @@
1
+ // package: wechaty.puppet
2
+ // file: wechaty/puppet/conversation.proto
3
+
@@ -0,0 +1,3 @@
1
+ // package: wechaty.puppet
2
+ // file: wechaty/puppet/conversation.proto
3
+
@@ -9,7 +9,7 @@ info:
9
9
 
10
10
  Wechaty Puppet Service is the RESTful API for Wechaty API, which is build on
11
11
  top of the Wechaty Puppet Abstraction and the gRPC proto definition.
12
- version: 1.0.25
12
+ version: 1.0.27
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: 'https://github.com/wechaty/openapi'
@@ -310,11 +310,38 @@ paths:
310
310
  - PAYLOAD_TYPE_ROOM
311
311
  - PAYLOAD_TYPE_ROOM_MEMBER
312
312
  - PAYLOAD_TYPE_FRIENDSHIP
313
+ - PAYLOAD_TYPE_POST
313
314
  - PAYLOAD_TYPE_TAG
314
315
  - PAYLOAD_TYPE_TAG_GROUP
315
316
  pattern: PAYLOADTYPECONTACT
316
317
  tags:
317
318
  - Puppet
319
+ '/conversation/{conversationId}/read':
320
+ put:
321
+ summary: '*'
322
+ description: Conversation
323
+ operationId: Puppet_ConversationRead
324
+ responses:
325
+ '200':
326
+ description: A successful response.
327
+ schema:
328
+ $ref: '#/definitions/puppetConversationReadResponse'
329
+ default:
330
+ description: An unexpected error response.
331
+ schema:
332
+ $ref: '#/definitions/rpcStatus'
333
+ parameters:
334
+ - name: conversationId
335
+ in: path
336
+ required: true
337
+ type: string
338
+ - name: body
339
+ in: body
340
+ required: true
341
+ schema:
342
+ type: object
343
+ tags:
344
+ - Puppet
318
345
  '/conversations/{conversationId}/channel':
319
346
  post:
320
347
  operationId: Puppet_MessageSendChannel
@@ -771,6 +798,7 @@ paths:
771
798
  - PAYLOAD_TYPE_ROOM
772
799
  - PAYLOAD_TYPE_ROOM_MEMBER
773
800
  - PAYLOAD_TYPE_FRIENDSHIP
801
+ - PAYLOAD_TYPE_POST
774
802
  - PAYLOAD_TYPE_TAG
775
803
  - PAYLOAD_TYPE_TAG_GROUP
776
804
  pattern: PAYLOADTYPEFRIENDSHIP
@@ -875,6 +903,7 @@ paths:
875
903
  - PAYLOAD_TYPE_ROOM
876
904
  - PAYLOAD_TYPE_ROOM_MEMBER
877
905
  - PAYLOAD_TYPE_FRIENDSHIP
906
+ - PAYLOAD_TYPE_POST
878
907
  - PAYLOAD_TYPE_TAG
879
908
  - PAYLOAD_TYPE_TAG_GROUP
880
909
  pattern: PAYLOADTYPEMESSAGE
@@ -1376,6 +1405,7 @@ paths:
1376
1405
  - PAYLOAD_TYPE_ROOM
1377
1406
  - PAYLOAD_TYPE_ROOM_MEMBER
1378
1407
  - PAYLOAD_TYPE_FRIENDSHIP
1408
+ - PAYLOAD_TYPE_POST
1379
1409
  - PAYLOAD_TYPE_TAG
1380
1410
  - PAYLOAD_TYPE_TAG_GROUP
1381
1411
  pattern: PAYLOADTYPEROOMMEMBER
@@ -1409,6 +1439,7 @@ paths:
1409
1439
  - PAYLOAD_TYPE_ROOM
1410
1440
  - PAYLOAD_TYPE_ROOM_MEMBER
1411
1441
  - PAYLOAD_TYPE_FRIENDSHIP
1442
+ - PAYLOAD_TYPE_POST
1412
1443
  - PAYLOAD_TYPE_TAG
1413
1444
  - PAYLOAD_TYPE_TAG_GROUP
1414
1445
  pattern: PAYLOADTYPEROOM
@@ -2145,6 +2176,8 @@ definitions:
2145
2176
  - CONTACT_TYPE_OFFICIAL
2146
2177
  - CONTACT_TYPE_CORPORATION
2147
2178
  default: CONTACT_TYPE_UNSPECIFIED
2179
+ puppetConversationReadResponse:
2180
+ type: object
2148
2181
  puppetCurrentUserResponse:
2149
2182
  type: object
2150
2183
  properties:
@@ -2650,6 +2683,7 @@ definitions:
2650
2683
  - PAYLOAD_TYPE_ROOM
2651
2684
  - PAYLOAD_TYPE_ROOM_MEMBER
2652
2685
  - PAYLOAD_TYPE_FRIENDSHIP
2686
+ - PAYLOAD_TYPE_POST
2653
2687
  - PAYLOAD_TYPE_TAG
2654
2688
  - PAYLOAD_TYPE_TAG_GROUP
2655
2689
  default: PAYLOAD_TYPE_UNSPECIFIED