@juzi/wechaty-grpc 1.0.3 → 1.0.6

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 (46) hide show
  1. package/dist/cjs/out/wechaty/puppet/base_pb.d.ts +36 -0
  2. package/dist/cjs/out/wechaty/puppet/base_pb.js +275 -0
  3. package/dist/cjs/out/wechaty/puppet/message_pb.d.ts +51 -8
  4. package/dist/cjs/out/wechaty/puppet/message_pb.js +315 -8
  5. package/dist/cjs/out/wechaty/puppet.openapi.yaml +50 -4
  6. package/dist/cjs/out/wechaty/puppet.swagger.json +76 -5
  7. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  8. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +66 -0
  9. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +38 -0
  10. package/dist/cjs/out/wechaty/puppet_pb_service.js +80 -0
  11. package/dist/cjs/proto/wechaty/puppet/base.proto +7 -0
  12. package/dist/cjs/proto/wechaty/puppet/message.proto +18 -8
  13. package/dist/cjs/proto/wechaty/puppet.proto +12 -0
  14. package/dist/cjs/src/package-json.js +1 -1
  15. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  16. package/dist/cjs/tests/puppet-server-impl.js +10 -0
  17. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  18. package/dist/esm/out/wechaty/puppet/base_pb.d.ts +36 -0
  19. package/dist/esm/out/wechaty/puppet/base_pb.js +275 -0
  20. package/dist/esm/out/wechaty/puppet/message_pb.d.ts +51 -8
  21. package/dist/esm/out/wechaty/puppet/message_pb.js +315 -8
  22. package/dist/esm/out/wechaty/puppet.openapi.yaml +50 -4
  23. package/dist/esm/out/wechaty/puppet.swagger.json +76 -5
  24. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  25. package/dist/esm/out/wechaty/puppet_grpc_pb.js +66 -0
  26. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +38 -0
  27. package/dist/esm/out/wechaty/puppet_pb_service.js +80 -0
  28. package/dist/esm/proto/wechaty/puppet/base.proto +7 -0
  29. package/dist/esm/proto/wechaty/puppet/message.proto +18 -8
  30. package/dist/esm/proto/wechaty/puppet.proto +12 -0
  31. package/dist/esm/src/package-json.js +1 -1
  32. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  33. package/dist/esm/tests/puppet-server-impl.js +10 -0
  34. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  35. package/out/wechaty/puppet/base_pb.d.ts +36 -0
  36. package/out/wechaty/puppet/base_pb.js +275 -0
  37. package/out/wechaty/puppet/message_pb.d.ts +51 -8
  38. package/out/wechaty/puppet/message_pb.js +315 -8
  39. package/out/wechaty/puppet.openapi.yaml +50 -4
  40. package/out/wechaty/puppet.swagger.json +76 -5
  41. package/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  42. package/out/wechaty/puppet_grpc_pb.js +66 -0
  43. package/out/wechaty/puppet_pb_service.d.ts +38 -0
  44. package/out/wechaty/puppet_pb_service.js +80 -0
  45. package/package.json +1 -1
  46. package/src/package-json.ts +1 -1
@@ -45,6 +45,8 @@ goog.exportSymbol('proto.wechaty.puppet.MessageMiniProgramRequest', null, global
45
45
  goog.exportSymbol('proto.wechaty.puppet.MessageMiniProgramResponse', null, global);
46
46
  goog.exportSymbol('proto.wechaty.puppet.MessagePayloadRequest', null, global);
47
47
  goog.exportSymbol('proto.wechaty.puppet.MessagePayloadResponse', null, global);
48
+ goog.exportSymbol('proto.wechaty.puppet.MessagePreviewRequest', null, global);
49
+ goog.exportSymbol('proto.wechaty.puppet.MessagePreviewResponse', null, global);
48
50
  goog.exportSymbol('proto.wechaty.puppet.MessageRecallRequest', null, global);
49
51
  goog.exportSymbol('proto.wechaty.puppet.MessageRecallResponse', null, global);
50
52
  goog.exportSymbol('proto.wechaty.puppet.MessageSendChannelRequest', null, global);
@@ -778,6 +780,48 @@ if (goog.DEBUG && !COMPILED) {
778
780
  */
779
781
  proto.wechaty.puppet.MessageSendChannelResponse.displayName = 'proto.wechaty.puppet.MessageSendChannelResponse';
780
782
  }
783
+ /**
784
+ * Generated by JsPbCodeGenerator.
785
+ * @param {Array=} opt_data Optional initial data array, typically from a
786
+ * server response, or constructed directly in Javascript. The array is used
787
+ * in place and becomes part of the constructed object. It is not cloned.
788
+ * If no data is provided, the constructed object will be empty, but still
789
+ * valid.
790
+ * @extends {jspb.Message}
791
+ * @constructor
792
+ */
793
+ proto.wechaty.puppet.MessagePreviewRequest = function(opt_data) {
794
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
795
+ };
796
+ goog.inherits(proto.wechaty.puppet.MessagePreviewRequest, jspb.Message);
797
+ if (goog.DEBUG && !COMPILED) {
798
+ /**
799
+ * @public
800
+ * @override
801
+ */
802
+ proto.wechaty.puppet.MessagePreviewRequest.displayName = 'proto.wechaty.puppet.MessagePreviewRequest';
803
+ }
804
+ /**
805
+ * Generated by JsPbCodeGenerator.
806
+ * @param {Array=} opt_data Optional initial data array, typically from a
807
+ * server response, or constructed directly in Javascript. The array is used
808
+ * in place and becomes part of the constructed object. It is not cloned.
809
+ * If no data is provided, the constructed object will be empty, but still
810
+ * valid.
811
+ * @extends {jspb.Message}
812
+ * @constructor
813
+ */
814
+ proto.wechaty.puppet.MessagePreviewResponse = function(opt_data) {
815
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
816
+ };
817
+ goog.inherits(proto.wechaty.puppet.MessagePreviewResponse, jspb.Message);
818
+ if (goog.DEBUG && !COMPILED) {
819
+ /**
820
+ * @public
821
+ * @override
822
+ */
823
+ proto.wechaty.puppet.MessagePreviewResponse.displayName = 'proto.wechaty.puppet.MessagePreviewResponse';
824
+ }
781
825
 
782
826
 
783
827
 
@@ -6531,6 +6575,266 @@ proto.wechaty.puppet.MessageSendChannelResponse.prototype.setId = function(value
6531
6575
  };
6532
6576
 
6533
6577
 
6578
+
6579
+
6580
+
6581
+ if (jspb.Message.GENERATE_TO_OBJECT) {
6582
+ /**
6583
+ * Creates an object representation of this proto.
6584
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
6585
+ * Optional fields that are not set will be set to undefined.
6586
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
6587
+ * For the list of reserved names please see:
6588
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
6589
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
6590
+ * JSPB instance for transitional soy proto support:
6591
+ * http://goto/soy-param-migration
6592
+ * @return {!Object}
6593
+ */
6594
+ proto.wechaty.puppet.MessagePreviewRequest.prototype.toObject = function(opt_includeInstance) {
6595
+ return proto.wechaty.puppet.MessagePreviewRequest.toObject(opt_includeInstance, this);
6596
+ };
6597
+
6598
+
6599
+ /**
6600
+ * Static version of the {@see toObject} method.
6601
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
6602
+ * the JSPB instance for transitional soy proto support:
6603
+ * http://goto/soy-param-migration
6604
+ * @param {!proto.wechaty.puppet.MessagePreviewRequest} msg The msg instance to transform.
6605
+ * @return {!Object}
6606
+ * @suppress {unusedLocalVariables} f is only used for nested messages
6607
+ */
6608
+ proto.wechaty.puppet.MessagePreviewRequest.toObject = function(includeInstance, msg) {
6609
+ var f, obj = {
6610
+ id: jspb.Message.getFieldWithDefault(msg, 1, "")
6611
+ };
6612
+
6613
+ if (includeInstance) {
6614
+ obj.$jspbMessageInstance = msg;
6615
+ }
6616
+ return obj;
6617
+ };
6618
+ }
6619
+
6620
+
6621
+ /**
6622
+ * Deserializes binary data (in protobuf wire format).
6623
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
6624
+ * @return {!proto.wechaty.puppet.MessagePreviewRequest}
6625
+ */
6626
+ proto.wechaty.puppet.MessagePreviewRequest.deserializeBinary = function(bytes) {
6627
+ var reader = new jspb.BinaryReader(bytes);
6628
+ var msg = new proto.wechaty.puppet.MessagePreviewRequest;
6629
+ return proto.wechaty.puppet.MessagePreviewRequest.deserializeBinaryFromReader(msg, reader);
6630
+ };
6631
+
6632
+
6633
+ /**
6634
+ * Deserializes binary data (in protobuf wire format) from the
6635
+ * given reader into the given message object.
6636
+ * @param {!proto.wechaty.puppet.MessagePreviewRequest} msg The message object to deserialize into.
6637
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
6638
+ * @return {!proto.wechaty.puppet.MessagePreviewRequest}
6639
+ */
6640
+ proto.wechaty.puppet.MessagePreviewRequest.deserializeBinaryFromReader = function(msg, reader) {
6641
+ while (reader.nextField()) {
6642
+ if (reader.isEndGroup()) {
6643
+ break;
6644
+ }
6645
+ var field = reader.getFieldNumber();
6646
+ switch (field) {
6647
+ case 1:
6648
+ var value = /** @type {string} */ (reader.readString());
6649
+ msg.setId(value);
6650
+ break;
6651
+ default:
6652
+ reader.skipField();
6653
+ break;
6654
+ }
6655
+ }
6656
+ return msg;
6657
+ };
6658
+
6659
+
6660
+ /**
6661
+ * Serializes the message to binary data (in protobuf wire format).
6662
+ * @return {!Uint8Array}
6663
+ */
6664
+ proto.wechaty.puppet.MessagePreviewRequest.prototype.serializeBinary = function() {
6665
+ var writer = new jspb.BinaryWriter();
6666
+ proto.wechaty.puppet.MessagePreviewRequest.serializeBinaryToWriter(this, writer);
6667
+ return writer.getResultBuffer();
6668
+ };
6669
+
6670
+
6671
+ /**
6672
+ * Serializes the given message to binary data (in protobuf wire
6673
+ * format), writing to the given BinaryWriter.
6674
+ * @param {!proto.wechaty.puppet.MessagePreviewRequest} message
6675
+ * @param {!jspb.BinaryWriter} writer
6676
+ * @suppress {unusedLocalVariables} f is only used for nested messages
6677
+ */
6678
+ proto.wechaty.puppet.MessagePreviewRequest.serializeBinaryToWriter = function(message, writer) {
6679
+ var f = undefined;
6680
+ f = message.getId();
6681
+ if (f.length > 0) {
6682
+ writer.writeString(
6683
+ 1,
6684
+ f
6685
+ );
6686
+ }
6687
+ };
6688
+
6689
+
6690
+ /**
6691
+ * optional string id = 1;
6692
+ * @return {string}
6693
+ */
6694
+ proto.wechaty.puppet.MessagePreviewRequest.prototype.getId = function() {
6695
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
6696
+ };
6697
+
6698
+
6699
+ /**
6700
+ * @param {string} value
6701
+ * @return {!proto.wechaty.puppet.MessagePreviewRequest} returns this
6702
+ */
6703
+ proto.wechaty.puppet.MessagePreviewRequest.prototype.setId = function(value) {
6704
+ return jspb.Message.setProto3StringField(this, 1, value);
6705
+ };
6706
+
6707
+
6708
+
6709
+
6710
+
6711
+ if (jspb.Message.GENERATE_TO_OBJECT) {
6712
+ /**
6713
+ * Creates an object representation of this proto.
6714
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
6715
+ * Optional fields that are not set will be set to undefined.
6716
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
6717
+ * For the list of reserved names please see:
6718
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
6719
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
6720
+ * JSPB instance for transitional soy proto support:
6721
+ * http://goto/soy-param-migration
6722
+ * @return {!Object}
6723
+ */
6724
+ proto.wechaty.puppet.MessagePreviewResponse.prototype.toObject = function(opt_includeInstance) {
6725
+ return proto.wechaty.puppet.MessagePreviewResponse.toObject(opt_includeInstance, this);
6726
+ };
6727
+
6728
+
6729
+ /**
6730
+ * Static version of the {@see toObject} method.
6731
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
6732
+ * the JSPB instance for transitional soy proto support:
6733
+ * http://goto/soy-param-migration
6734
+ * @param {!proto.wechaty.puppet.MessagePreviewResponse} msg The msg instance to transform.
6735
+ * @return {!Object}
6736
+ * @suppress {unusedLocalVariables} f is only used for nested messages
6737
+ */
6738
+ proto.wechaty.puppet.MessagePreviewResponse.toObject = function(includeInstance, msg) {
6739
+ var f, obj = {
6740
+ fileBox: jspb.Message.getFieldWithDefault(msg, 1, "")
6741
+ };
6742
+
6743
+ if (includeInstance) {
6744
+ obj.$jspbMessageInstance = msg;
6745
+ }
6746
+ return obj;
6747
+ };
6748
+ }
6749
+
6750
+
6751
+ /**
6752
+ * Deserializes binary data (in protobuf wire format).
6753
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
6754
+ * @return {!proto.wechaty.puppet.MessagePreviewResponse}
6755
+ */
6756
+ proto.wechaty.puppet.MessagePreviewResponse.deserializeBinary = function(bytes) {
6757
+ var reader = new jspb.BinaryReader(bytes);
6758
+ var msg = new proto.wechaty.puppet.MessagePreviewResponse;
6759
+ return proto.wechaty.puppet.MessagePreviewResponse.deserializeBinaryFromReader(msg, reader);
6760
+ };
6761
+
6762
+
6763
+ /**
6764
+ * Deserializes binary data (in protobuf wire format) from the
6765
+ * given reader into the given message object.
6766
+ * @param {!proto.wechaty.puppet.MessagePreviewResponse} msg The message object to deserialize into.
6767
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
6768
+ * @return {!proto.wechaty.puppet.MessagePreviewResponse}
6769
+ */
6770
+ proto.wechaty.puppet.MessagePreviewResponse.deserializeBinaryFromReader = function(msg, reader) {
6771
+ while (reader.nextField()) {
6772
+ if (reader.isEndGroup()) {
6773
+ break;
6774
+ }
6775
+ var field = reader.getFieldNumber();
6776
+ switch (field) {
6777
+ case 1:
6778
+ var value = /** @type {string} */ (reader.readString());
6779
+ msg.setFileBox(value);
6780
+ break;
6781
+ default:
6782
+ reader.skipField();
6783
+ break;
6784
+ }
6785
+ }
6786
+ return msg;
6787
+ };
6788
+
6789
+
6790
+ /**
6791
+ * Serializes the message to binary data (in protobuf wire format).
6792
+ * @return {!Uint8Array}
6793
+ */
6794
+ proto.wechaty.puppet.MessagePreviewResponse.prototype.serializeBinary = function() {
6795
+ var writer = new jspb.BinaryWriter();
6796
+ proto.wechaty.puppet.MessagePreviewResponse.serializeBinaryToWriter(this, writer);
6797
+ return writer.getResultBuffer();
6798
+ };
6799
+
6800
+
6801
+ /**
6802
+ * Serializes the given message to binary data (in protobuf wire
6803
+ * format), writing to the given BinaryWriter.
6804
+ * @param {!proto.wechaty.puppet.MessagePreviewResponse} message
6805
+ * @param {!jspb.BinaryWriter} writer
6806
+ * @suppress {unusedLocalVariables} f is only used for nested messages
6807
+ */
6808
+ proto.wechaty.puppet.MessagePreviewResponse.serializeBinaryToWriter = function(message, writer) {
6809
+ var f = undefined;
6810
+ f = message.getFileBox();
6811
+ if (f.length > 0) {
6812
+ writer.writeString(
6813
+ 1,
6814
+ f
6815
+ );
6816
+ }
6817
+ };
6818
+
6819
+
6820
+ /**
6821
+ * optional string file_box = 1;
6822
+ * @return {string}
6823
+ */
6824
+ proto.wechaty.puppet.MessagePreviewResponse.prototype.getFileBox = function() {
6825
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
6826
+ };
6827
+
6828
+
6829
+ /**
6830
+ * @param {string} value
6831
+ * @return {!proto.wechaty.puppet.MessagePreviewResponse} returns this
6832
+ */
6833
+ proto.wechaty.puppet.MessagePreviewResponse.prototype.setFileBox = function(value) {
6834
+ return jspb.Message.setProto3StringField(this, 1, value);
6835
+ };
6836
+
6837
+
6534
6838
  /**
6535
6839
  * @enum {number}
6536
6840
  */
@@ -6539,18 +6843,21 @@ proto.wechaty.puppet.MessageType = {
6539
6843
  MESSAGE_TYPE_ATTACHMENT: 1,
6540
6844
  MESSAGE_TYPE_AUDIO: 2,
6541
6845
  MESSAGE_TYPE_CONTACT: 3,
6542
- MESSAGE_TYPE_EMOTICON: 4,
6543
- MESSAGE_TYPE_IMAGE: 5,
6544
- MESSAGE_TYPE_TEXT: 6,
6545
- MESSAGE_TYPE_VIDEO: 7,
6546
- MESSAGE_TYPE_CHAT_HISTORY: 8,
6547
- MESSAGE_TYPE_LOCATION: 9,
6548
- MESSAGE_TYPE_MINI_PROGRAM: 10,
6846
+ MESSAGE_TYPE_CHAT_HISTORY: 4,
6847
+ MESSAGE_TYPE_EMOTCION: 5,
6848
+ MESSAGE_TYPE_IMAGE: 6,
6849
+ MESSAGE_TYPE_TEXT: 7,
6850
+ MESSAGE_TYPE_LOCATION: 8,
6851
+ MESSAGE_TYPE_MINI_PROGRAM: 9,
6852
+ MESSAGE_TYPE_GROUP_NOTE: 10,
6549
6853
  MESSAGE_TYPE_TRANSFER: 11,
6550
6854
  MESSAGE_TYPE_RED_ENVELOPE: 12,
6551
6855
  MESSAGE_TYPE_RECALLED: 13,
6552
6856
  MESSAGE_TYPE_URL: 14,
6553
- MESSAGE_TYPE_CHANNEL: 15
6857
+ MESSAGE_TYPE_VIDEO: 15,
6858
+ MESSAGE_TYPE_POST: 16,
6859
+ MESSAGE_TYPE_CHANNEL: 17,
6860
+ MESSAGE_TYPE_SYSTEM: 18
6554
6861
  };
6555
6862
 
6556
6863
  goog.object.extend(exports, proto.wechaty.puppet);
@@ -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.3
12
+ version: 1.0.6
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: 'https://github.com/wechaty/openapi'
@@ -598,6 +598,20 @@ paths:
598
598
  $ref: '#/definitions/puppetUrlLinkPayload'
599
599
  tags:
600
600
  - Puppet
601
+ /currentUser:
602
+ get:
603
+ operationId: Puppet_CurrentUser
604
+ responses:
605
+ '200':
606
+ description: A successful response.
607
+ schema:
608
+ $ref: '#/definitions/puppetCurrentUserResponse'
609
+ default:
610
+ description: An unexpected error response.
611
+ schema:
612
+ $ref: '#/definitions/rpcStatus'
613
+ tags:
614
+ - Puppet
601
615
  /ding:
602
616
  post:
603
617
  operationId: Puppet_Ding
@@ -976,6 +990,25 @@ paths:
976
990
  type: string
977
991
  tags:
978
992
  - Puppet
993
+ '/message/{id}/preview':
994
+ get:
995
+ operationId: Puppet_MessagePreview
996
+ responses:
997
+ '200':
998
+ description: A successful response.
999
+ schema:
1000
+ $ref: '#/definitions/puppetMessagePreviewResponse'
1001
+ default:
1002
+ description: An unexpected error response.
1003
+ schema:
1004
+ $ref: '#/definitions/rpcStatus'
1005
+ parameters:
1006
+ - name: id
1007
+ in: path
1008
+ required: true
1009
+ type: string
1010
+ tags:
1011
+ - Puppet
979
1012
  '/message/{id}/recall':
980
1013
  put:
981
1014
  operationId: Puppet_MessageRecall
@@ -1809,6 +1842,11 @@ definitions:
1809
1842
  - CONTACT_TYPE_OFFICIAL
1810
1843
  - CONTACT_TYPE_CORPORATION
1811
1844
  default: CONTACT_TYPE_UNSPECIFIED
1845
+ puppetCurrentUserResponse:
1846
+ type: object
1847
+ properties:
1848
+ userId:
1849
+ type: string
1812
1850
  puppetDingRequest:
1813
1851
  type: object
1814
1852
  properties:
@@ -2094,6 +2132,11 @@ definitions:
2094
2132
  format: date-time
2095
2133
  quoteId:
2096
2134
  type: string
2135
+ puppetMessagePreviewResponse:
2136
+ type: object
2137
+ properties:
2138
+ fileBox:
2139
+ type: string
2097
2140
  puppetMessageRecallResponse:
2098
2141
  type: object
2099
2142
  properties:
@@ -2211,18 +2254,21 @@ definitions:
2211
2254
  - MESSAGE_TYPE_ATTACHMENT
2212
2255
  - MESSAGE_TYPE_AUDIO
2213
2256
  - MESSAGE_TYPE_CONTACT
2214
- - MESSAGE_TYPE_EMOTICON
2257
+ - MESSAGE_TYPE_CHAT_HISTORY
2258
+ - MESSAGE_TYPE_EMOTCION
2215
2259
  - MESSAGE_TYPE_IMAGE
2216
2260
  - MESSAGE_TYPE_TEXT
2217
- - MESSAGE_TYPE_VIDEO
2218
- - MESSAGE_TYPE_CHAT_HISTORY
2219
2261
  - MESSAGE_TYPE_LOCATION
2220
2262
  - MESSAGE_TYPE_MINI_PROGRAM
2263
+ - MESSAGE_TYPE_GROUP_NOTE
2221
2264
  - MESSAGE_TYPE_TRANSFER
2222
2265
  - MESSAGE_TYPE_RED_ENVELOPE
2223
2266
  - MESSAGE_TYPE_RECALLED
2224
2267
  - MESSAGE_TYPE_URL
2268
+ - MESSAGE_TYPE_VIDEO
2269
+ - MESSAGE_TYPE_POST
2225
2270
  - MESSAGE_TYPE_CHANNEL
2271
+ - MESSAGE_TYPE_SYSTEM
2226
2272
  default: MESSAGE_TYPE_UNSPECIFIED
2227
2273
  puppetMessageUrlResponse:
2228
2274
  type: object
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "Wechaty Puppet Service OpenAPI Specification",
5
5
  "description": "Wechaty is a Conversational RPA SDK for chatbot makers. With only 6 lines of code, you can create a bot on the most popular IMs like WeChat, Whatsapp, WeCom, Gitter, etc.\n\nWechaty Puppet Service is the RESTful API for Wechaty API, which is build on top of the Wechaty Puppet Abstraction and the gRPC proto definition.",
6
- "version": "1.0.3",
6
+ "version": "1.0.6",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -890,6 +890,28 @@
890
890
  ]
891
891
  }
892
892
  },
893
+ "/currentUser": {
894
+ "get": {
895
+ "operationId": "Puppet_CurrentUser",
896
+ "responses": {
897
+ "200": {
898
+ "description": "A successful response.",
899
+ "schema": {
900
+ "$ref": "#/definitions/puppetCurrentUserResponse"
901
+ }
902
+ },
903
+ "default": {
904
+ "description": "An unexpected error response.",
905
+ "schema": {
906
+ "$ref": "#/definitions/rpcStatus"
907
+ }
908
+ }
909
+ },
910
+ "tags": [
911
+ "Puppet"
912
+ ]
913
+ }
914
+ },
893
915
  "/ding": {
894
916
  "post": {
895
917
  "operationId": "Puppet_Ding",
@@ -1445,6 +1467,36 @@
1445
1467
  ]
1446
1468
  }
1447
1469
  },
1470
+ "/message/{id}/preview": {
1471
+ "get": {
1472
+ "operationId": "Puppet_MessagePreview",
1473
+ "responses": {
1474
+ "200": {
1475
+ "description": "A successful response.",
1476
+ "schema": {
1477
+ "$ref": "#/definitions/puppetMessagePreviewResponse"
1478
+ }
1479
+ },
1480
+ "default": {
1481
+ "description": "An unexpected error response.",
1482
+ "schema": {
1483
+ "$ref": "#/definitions/rpcStatus"
1484
+ }
1485
+ }
1486
+ },
1487
+ "parameters": [
1488
+ {
1489
+ "name": "id",
1490
+ "in": "path",
1491
+ "required": true,
1492
+ "type": "string"
1493
+ }
1494
+ ],
1495
+ "tags": [
1496
+ "Puppet"
1497
+ ]
1498
+ }
1499
+ },
1448
1500
  "/message/{id}/recall": {
1449
1501
  "put": {
1450
1502
  "operationId": "Puppet_MessageRecall",
@@ -2693,6 +2745,14 @@
2693
2745
  ],
2694
2746
  "default": "CONTACT_TYPE_UNSPECIFIED"
2695
2747
  },
2748
+ "puppetCurrentUserResponse": {
2749
+ "type": "object",
2750
+ "properties": {
2751
+ "userId": {
2752
+ "type": "string"
2753
+ }
2754
+ }
2755
+ },
2696
2756
  "puppetDingRequest": {
2697
2757
  "type": "object",
2698
2758
  "properties": {
@@ -3056,6 +3116,14 @@
3056
3116
  }
3057
3117
  }
3058
3118
  },
3119
+ "puppetMessagePreviewResponse": {
3120
+ "type": "object",
3121
+ "properties": {
3122
+ "fileBox": {
3123
+ "type": "string"
3124
+ }
3125
+ }
3126
+ },
3059
3127
  "puppetMessageRecallResponse": {
3060
3128
  "type": "object",
3061
3129
  "properties": {
@@ -3183,18 +3251,21 @@
3183
3251
  "MESSAGE_TYPE_ATTACHMENT",
3184
3252
  "MESSAGE_TYPE_AUDIO",
3185
3253
  "MESSAGE_TYPE_CONTACT",
3186
- "MESSAGE_TYPE_EMOTICON",
3254
+ "MESSAGE_TYPE_CHAT_HISTORY",
3255
+ "MESSAGE_TYPE_EMOTCION",
3187
3256
  "MESSAGE_TYPE_IMAGE",
3188
3257
  "MESSAGE_TYPE_TEXT",
3189
- "MESSAGE_TYPE_VIDEO",
3190
- "MESSAGE_TYPE_CHAT_HISTORY",
3191
3258
  "MESSAGE_TYPE_LOCATION",
3192
3259
  "MESSAGE_TYPE_MINI_PROGRAM",
3260
+ "MESSAGE_TYPE_GROUP_NOTE",
3193
3261
  "MESSAGE_TYPE_TRANSFER",
3194
3262
  "MESSAGE_TYPE_RED_ENVELOPE",
3195
3263
  "MESSAGE_TYPE_RECALLED",
3196
3264
  "MESSAGE_TYPE_URL",
3197
- "MESSAGE_TYPE_CHANNEL"
3265
+ "MESSAGE_TYPE_VIDEO",
3266
+ "MESSAGE_TYPE_POST",
3267
+ "MESSAGE_TYPE_CHANNEL",
3268
+ "MESSAGE_TYPE_SYSTEM"
3198
3269
  ],
3199
3270
  "default": "MESSAGE_TYPE_UNSPECIFIED"
3200
3271
  },