@juzi/wechaty-grpc 1.0.85 → 1.0.86

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 (38) hide show
  1. package/dist/cjs/out/wechaty/puppet/message_pb.d.ts +46 -0
  2. package/dist/cjs/out/wechaty/puppet/message_pb.js +355 -0
  3. package/dist/cjs/out/wechaty/puppet.openapi.yaml +37 -1
  4. package/dist/cjs/out/wechaty/puppet.swagger.json +57 -1
  5. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +17 -0
  6. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +33 -0
  7. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +19 -0
  8. package/dist/cjs/out/wechaty/puppet_pb_service.js +40 -0
  9. package/dist/cjs/proto/wechaty/puppet/message.proto +9 -0
  10. package/dist/cjs/proto/wechaty/puppet.proto +6 -1
  11. package/dist/cjs/src/package-json.js +1 -1
  12. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  13. package/dist/cjs/tests/puppet-server-impl.js +5 -0
  14. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  15. package/dist/esm/out/wechaty/puppet/message_pb.d.ts +46 -0
  16. package/dist/esm/out/wechaty/puppet/message_pb.js +355 -0
  17. package/dist/esm/out/wechaty/puppet.openapi.yaml +37 -1
  18. package/dist/esm/out/wechaty/puppet.swagger.json +57 -1
  19. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +17 -0
  20. package/dist/esm/out/wechaty/puppet_grpc_pb.js +33 -0
  21. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +19 -0
  22. package/dist/esm/out/wechaty/puppet_pb_service.js +40 -0
  23. package/dist/esm/proto/wechaty/puppet/message.proto +9 -0
  24. package/dist/esm/proto/wechaty/puppet.proto +6 -1
  25. package/dist/esm/src/package-json.js +1 -1
  26. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  27. package/dist/esm/tests/puppet-server-impl.js +5 -0
  28. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  29. package/out/wechaty/puppet/message_pb.d.ts +46 -0
  30. package/out/wechaty/puppet/message_pb.js +355 -0
  31. package/out/wechaty/puppet.openapi.yaml +37 -1
  32. package/out/wechaty/puppet.swagger.json +57 -1
  33. package/out/wechaty/puppet_grpc_pb.d.ts +17 -0
  34. package/out/wechaty/puppet_grpc_pb.js +33 -0
  35. package/out/wechaty/puppet_pb_service.d.ts +19 -0
  36. package/out/wechaty/puppet_pb_service.js +40 -0
  37. package/package.json +1 -1
  38. package/src/package-json.ts +1 -1
@@ -777,6 +777,52 @@ export namespace MessageSendUrlResponse {
777
777
  }
778
778
  }
779
779
 
780
+ export class MessageSendPostRequest extends jspb.Message {
781
+ getConversationId(): string;
782
+ setConversationId(value: string): void;
783
+
784
+ hasContent(): boolean;
785
+ clearContent(): void;
786
+ getContent(): wechaty_puppet_post_pb.PostPayloadClient | undefined;
787
+ setContent(value?: wechaty_puppet_post_pb.PostPayloadClient): void;
788
+
789
+ serializeBinary(): Uint8Array;
790
+ toObject(includeInstance?: boolean): MessageSendPostRequest.AsObject;
791
+ static toObject(includeInstance: boolean, msg: MessageSendPostRequest): MessageSendPostRequest.AsObject;
792
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
793
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
794
+ static serializeBinaryToWriter(message: MessageSendPostRequest, writer: jspb.BinaryWriter): void;
795
+ static deserializeBinary(bytes: Uint8Array): MessageSendPostRequest;
796
+ static deserializeBinaryFromReader(message: MessageSendPostRequest, reader: jspb.BinaryReader): MessageSendPostRequest;
797
+ }
798
+
799
+ export namespace MessageSendPostRequest {
800
+ export type AsObject = {
801
+ conversationId: string,
802
+ content?: wechaty_puppet_post_pb.PostPayloadClient.AsObject,
803
+ }
804
+ }
805
+
806
+ export class MessageSendPostResponse extends jspb.Message {
807
+ getId(): string;
808
+ setId(value: string): void;
809
+
810
+ serializeBinary(): Uint8Array;
811
+ toObject(includeInstance?: boolean): MessageSendPostResponse.AsObject;
812
+ static toObject(includeInstance: boolean, msg: MessageSendPostResponse): MessageSendPostResponse.AsObject;
813
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
814
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
815
+ static serializeBinaryToWriter(message: MessageSendPostResponse, writer: jspb.BinaryWriter): void;
816
+ static deserializeBinary(bytes: Uint8Array): MessageSendPostResponse;
817
+ static deserializeBinaryFromReader(message: MessageSendPostResponse, reader: jspb.BinaryReader): MessageSendPostResponse;
818
+ }
819
+
820
+ export namespace MessageSendPostResponse {
821
+ export type AsObject = {
822
+ id: string,
823
+ }
824
+ }
825
+
780
826
  export class MessageRecallRequest extends jspb.Message {
781
827
  getId(): string;
782
828
  setId(value: string): void;
@@ -78,6 +78,8 @@ goog.exportSymbol('proto.wechaty.puppet.MessageSendLocationRequest', null, globa
78
78
  goog.exportSymbol('proto.wechaty.puppet.MessageSendLocationResponse', null, global);
79
79
  goog.exportSymbol('proto.wechaty.puppet.MessageSendMiniProgramRequest', null, global);
80
80
  goog.exportSymbol('proto.wechaty.puppet.MessageSendMiniProgramResponse', null, global);
81
+ goog.exportSymbol('proto.wechaty.puppet.MessageSendPostRequest', null, global);
82
+ goog.exportSymbol('proto.wechaty.puppet.MessageSendPostResponse', null, global);
81
83
  goog.exportSymbol('proto.wechaty.puppet.MessageSendTextRequest', null, global);
82
84
  goog.exportSymbol('proto.wechaty.puppet.MessageSendTextResponse', null, global);
83
85
  goog.exportSymbol('proto.wechaty.puppet.MessageSendUrlRequest', null, global);
@@ -718,6 +720,48 @@ if (goog.DEBUG && !COMPILED) {
718
720
  */
719
721
  proto.wechaty.puppet.MessageSendUrlResponse.displayName = 'proto.wechaty.puppet.MessageSendUrlResponse';
720
722
  }
723
+ /**
724
+ * Generated by JsPbCodeGenerator.
725
+ * @param {Array=} opt_data Optional initial data array, typically from a
726
+ * server response, or constructed directly in Javascript. The array is used
727
+ * in place and becomes part of the constructed object. It is not cloned.
728
+ * If no data is provided, the constructed object will be empty, but still
729
+ * valid.
730
+ * @extends {jspb.Message}
731
+ * @constructor
732
+ */
733
+ proto.wechaty.puppet.MessageSendPostRequest = function(opt_data) {
734
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
735
+ };
736
+ goog.inherits(proto.wechaty.puppet.MessageSendPostRequest, jspb.Message);
737
+ if (goog.DEBUG && !COMPILED) {
738
+ /**
739
+ * @public
740
+ * @override
741
+ */
742
+ proto.wechaty.puppet.MessageSendPostRequest.displayName = 'proto.wechaty.puppet.MessageSendPostRequest';
743
+ }
744
+ /**
745
+ * Generated by JsPbCodeGenerator.
746
+ * @param {Array=} opt_data Optional initial data array, typically from a
747
+ * server response, or constructed directly in Javascript. The array is used
748
+ * in place and becomes part of the constructed object. It is not cloned.
749
+ * If no data is provided, the constructed object will be empty, but still
750
+ * valid.
751
+ * @extends {jspb.Message}
752
+ * @constructor
753
+ */
754
+ proto.wechaty.puppet.MessageSendPostResponse = function(opt_data) {
755
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
756
+ };
757
+ goog.inherits(proto.wechaty.puppet.MessageSendPostResponse, jspb.Message);
758
+ if (goog.DEBUG && !COMPILED) {
759
+ /**
760
+ * @public
761
+ * @override
762
+ */
763
+ proto.wechaty.puppet.MessageSendPostResponse.displayName = 'proto.wechaty.puppet.MessageSendPostResponse';
764
+ }
721
765
  /**
722
766
  * Generated by JsPbCodeGenerator.
723
767
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -6382,6 +6426,317 @@ proto.wechaty.puppet.MessageSendUrlResponse.prototype.setId = function(value) {
6382
6426
 
6383
6427
 
6384
6428
 
6429
+ if (jspb.Message.GENERATE_TO_OBJECT) {
6430
+ /**
6431
+ * Creates an object representation of this proto.
6432
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
6433
+ * Optional fields that are not set will be set to undefined.
6434
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
6435
+ * For the list of reserved names please see:
6436
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
6437
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
6438
+ * JSPB instance for transitional soy proto support:
6439
+ * http://goto/soy-param-migration
6440
+ * @return {!Object}
6441
+ */
6442
+ proto.wechaty.puppet.MessageSendPostRequest.prototype.toObject = function(opt_includeInstance) {
6443
+ return proto.wechaty.puppet.MessageSendPostRequest.toObject(opt_includeInstance, this);
6444
+ };
6445
+
6446
+
6447
+ /**
6448
+ * Static version of the {@see toObject} method.
6449
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
6450
+ * the JSPB instance for transitional soy proto support:
6451
+ * http://goto/soy-param-migration
6452
+ * @param {!proto.wechaty.puppet.MessageSendPostRequest} msg The msg instance to transform.
6453
+ * @return {!Object}
6454
+ * @suppress {unusedLocalVariables} f is only used for nested messages
6455
+ */
6456
+ proto.wechaty.puppet.MessageSendPostRequest.toObject = function(includeInstance, msg) {
6457
+ var f, obj = {
6458
+ conversationId: jspb.Message.getFieldWithDefault(msg, 1, ""),
6459
+ content: (f = msg.getContent()) && wechaty_puppet_post_pb.PostPayloadClient.toObject(includeInstance, f)
6460
+ };
6461
+
6462
+ if (includeInstance) {
6463
+ obj.$jspbMessageInstance = msg;
6464
+ }
6465
+ return obj;
6466
+ };
6467
+ }
6468
+
6469
+
6470
+ /**
6471
+ * Deserializes binary data (in protobuf wire format).
6472
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
6473
+ * @return {!proto.wechaty.puppet.MessageSendPostRequest}
6474
+ */
6475
+ proto.wechaty.puppet.MessageSendPostRequest.deserializeBinary = function(bytes) {
6476
+ var reader = new jspb.BinaryReader(bytes);
6477
+ var msg = new proto.wechaty.puppet.MessageSendPostRequest;
6478
+ return proto.wechaty.puppet.MessageSendPostRequest.deserializeBinaryFromReader(msg, reader);
6479
+ };
6480
+
6481
+
6482
+ /**
6483
+ * Deserializes binary data (in protobuf wire format) from the
6484
+ * given reader into the given message object.
6485
+ * @param {!proto.wechaty.puppet.MessageSendPostRequest} msg The message object to deserialize into.
6486
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
6487
+ * @return {!proto.wechaty.puppet.MessageSendPostRequest}
6488
+ */
6489
+ proto.wechaty.puppet.MessageSendPostRequest.deserializeBinaryFromReader = function(msg, reader) {
6490
+ while (reader.nextField()) {
6491
+ if (reader.isEndGroup()) {
6492
+ break;
6493
+ }
6494
+ var field = reader.getFieldNumber();
6495
+ switch (field) {
6496
+ case 1:
6497
+ var value = /** @type {string} */ (reader.readString());
6498
+ msg.setConversationId(value);
6499
+ break;
6500
+ case 2:
6501
+ var value = new wechaty_puppet_post_pb.PostPayloadClient;
6502
+ reader.readMessage(value,wechaty_puppet_post_pb.PostPayloadClient.deserializeBinaryFromReader);
6503
+ msg.setContent(value);
6504
+ break;
6505
+ default:
6506
+ reader.skipField();
6507
+ break;
6508
+ }
6509
+ }
6510
+ return msg;
6511
+ };
6512
+
6513
+
6514
+ /**
6515
+ * Serializes the message to binary data (in protobuf wire format).
6516
+ * @return {!Uint8Array}
6517
+ */
6518
+ proto.wechaty.puppet.MessageSendPostRequest.prototype.serializeBinary = function() {
6519
+ var writer = new jspb.BinaryWriter();
6520
+ proto.wechaty.puppet.MessageSendPostRequest.serializeBinaryToWriter(this, writer);
6521
+ return writer.getResultBuffer();
6522
+ };
6523
+
6524
+
6525
+ /**
6526
+ * Serializes the given message to binary data (in protobuf wire
6527
+ * format), writing to the given BinaryWriter.
6528
+ * @param {!proto.wechaty.puppet.MessageSendPostRequest} message
6529
+ * @param {!jspb.BinaryWriter} writer
6530
+ * @suppress {unusedLocalVariables} f is only used for nested messages
6531
+ */
6532
+ proto.wechaty.puppet.MessageSendPostRequest.serializeBinaryToWriter = function(message, writer) {
6533
+ var f = undefined;
6534
+ f = message.getConversationId();
6535
+ if (f.length > 0) {
6536
+ writer.writeString(
6537
+ 1,
6538
+ f
6539
+ );
6540
+ }
6541
+ f = message.getContent();
6542
+ if (f != null) {
6543
+ writer.writeMessage(
6544
+ 2,
6545
+ f,
6546
+ wechaty_puppet_post_pb.PostPayloadClient.serializeBinaryToWriter
6547
+ );
6548
+ }
6549
+ };
6550
+
6551
+
6552
+ /**
6553
+ * optional string conversation_id = 1;
6554
+ * @return {string}
6555
+ */
6556
+ proto.wechaty.puppet.MessageSendPostRequest.prototype.getConversationId = function() {
6557
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
6558
+ };
6559
+
6560
+
6561
+ /**
6562
+ * @param {string} value
6563
+ * @return {!proto.wechaty.puppet.MessageSendPostRequest} returns this
6564
+ */
6565
+ proto.wechaty.puppet.MessageSendPostRequest.prototype.setConversationId = function(value) {
6566
+ return jspb.Message.setProto3StringField(this, 1, value);
6567
+ };
6568
+
6569
+
6570
+ /**
6571
+ * optional PostPayloadClient content = 2;
6572
+ * @return {?proto.wechaty.puppet.PostPayloadClient}
6573
+ */
6574
+ proto.wechaty.puppet.MessageSendPostRequest.prototype.getContent = function() {
6575
+ return /** @type{?proto.wechaty.puppet.PostPayloadClient} */ (
6576
+ jspb.Message.getWrapperField(this, wechaty_puppet_post_pb.PostPayloadClient, 2));
6577
+ };
6578
+
6579
+
6580
+ /**
6581
+ * @param {?proto.wechaty.puppet.PostPayloadClient|undefined} value
6582
+ * @return {!proto.wechaty.puppet.MessageSendPostRequest} returns this
6583
+ */
6584
+ proto.wechaty.puppet.MessageSendPostRequest.prototype.setContent = function(value) {
6585
+ return jspb.Message.setWrapperField(this, 2, value);
6586
+ };
6587
+
6588
+
6589
+ /**
6590
+ * Clears the message field making it undefined.
6591
+ * @return {!proto.wechaty.puppet.MessageSendPostRequest} returns this
6592
+ */
6593
+ proto.wechaty.puppet.MessageSendPostRequest.prototype.clearContent = function() {
6594
+ return this.setContent(undefined);
6595
+ };
6596
+
6597
+
6598
+ /**
6599
+ * Returns whether this field is set.
6600
+ * @return {boolean}
6601
+ */
6602
+ proto.wechaty.puppet.MessageSendPostRequest.prototype.hasContent = function() {
6603
+ return jspb.Message.getField(this, 2) != null;
6604
+ };
6605
+
6606
+
6607
+
6608
+
6609
+
6610
+ if (jspb.Message.GENERATE_TO_OBJECT) {
6611
+ /**
6612
+ * Creates an object representation of this proto.
6613
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
6614
+ * Optional fields that are not set will be set to undefined.
6615
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
6616
+ * For the list of reserved names please see:
6617
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
6618
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
6619
+ * JSPB instance for transitional soy proto support:
6620
+ * http://goto/soy-param-migration
6621
+ * @return {!Object}
6622
+ */
6623
+ proto.wechaty.puppet.MessageSendPostResponse.prototype.toObject = function(opt_includeInstance) {
6624
+ return proto.wechaty.puppet.MessageSendPostResponse.toObject(opt_includeInstance, this);
6625
+ };
6626
+
6627
+
6628
+ /**
6629
+ * Static version of the {@see toObject} method.
6630
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
6631
+ * the JSPB instance for transitional soy proto support:
6632
+ * http://goto/soy-param-migration
6633
+ * @param {!proto.wechaty.puppet.MessageSendPostResponse} msg The msg instance to transform.
6634
+ * @return {!Object}
6635
+ * @suppress {unusedLocalVariables} f is only used for nested messages
6636
+ */
6637
+ proto.wechaty.puppet.MessageSendPostResponse.toObject = function(includeInstance, msg) {
6638
+ var f, obj = {
6639
+ id: jspb.Message.getFieldWithDefault(msg, 1, "")
6640
+ };
6641
+
6642
+ if (includeInstance) {
6643
+ obj.$jspbMessageInstance = msg;
6644
+ }
6645
+ return obj;
6646
+ };
6647
+ }
6648
+
6649
+
6650
+ /**
6651
+ * Deserializes binary data (in protobuf wire format).
6652
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
6653
+ * @return {!proto.wechaty.puppet.MessageSendPostResponse}
6654
+ */
6655
+ proto.wechaty.puppet.MessageSendPostResponse.deserializeBinary = function(bytes) {
6656
+ var reader = new jspb.BinaryReader(bytes);
6657
+ var msg = new proto.wechaty.puppet.MessageSendPostResponse;
6658
+ return proto.wechaty.puppet.MessageSendPostResponse.deserializeBinaryFromReader(msg, reader);
6659
+ };
6660
+
6661
+
6662
+ /**
6663
+ * Deserializes binary data (in protobuf wire format) from the
6664
+ * given reader into the given message object.
6665
+ * @param {!proto.wechaty.puppet.MessageSendPostResponse} msg The message object to deserialize into.
6666
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
6667
+ * @return {!proto.wechaty.puppet.MessageSendPostResponse}
6668
+ */
6669
+ proto.wechaty.puppet.MessageSendPostResponse.deserializeBinaryFromReader = function(msg, reader) {
6670
+ while (reader.nextField()) {
6671
+ if (reader.isEndGroup()) {
6672
+ break;
6673
+ }
6674
+ var field = reader.getFieldNumber();
6675
+ switch (field) {
6676
+ case 1:
6677
+ var value = /** @type {string} */ (reader.readString());
6678
+ msg.setId(value);
6679
+ break;
6680
+ default:
6681
+ reader.skipField();
6682
+ break;
6683
+ }
6684
+ }
6685
+ return msg;
6686
+ };
6687
+
6688
+
6689
+ /**
6690
+ * Serializes the message to binary data (in protobuf wire format).
6691
+ * @return {!Uint8Array}
6692
+ */
6693
+ proto.wechaty.puppet.MessageSendPostResponse.prototype.serializeBinary = function() {
6694
+ var writer = new jspb.BinaryWriter();
6695
+ proto.wechaty.puppet.MessageSendPostResponse.serializeBinaryToWriter(this, writer);
6696
+ return writer.getResultBuffer();
6697
+ };
6698
+
6699
+
6700
+ /**
6701
+ * Serializes the given message to binary data (in protobuf wire
6702
+ * format), writing to the given BinaryWriter.
6703
+ * @param {!proto.wechaty.puppet.MessageSendPostResponse} message
6704
+ * @param {!jspb.BinaryWriter} writer
6705
+ * @suppress {unusedLocalVariables} f is only used for nested messages
6706
+ */
6707
+ proto.wechaty.puppet.MessageSendPostResponse.serializeBinaryToWriter = function(message, writer) {
6708
+ var f = undefined;
6709
+ f = message.getId();
6710
+ if (f.length > 0) {
6711
+ writer.writeString(
6712
+ 1,
6713
+ f
6714
+ );
6715
+ }
6716
+ };
6717
+
6718
+
6719
+ /**
6720
+ * optional string id = 1;
6721
+ * @return {string}
6722
+ */
6723
+ proto.wechaty.puppet.MessageSendPostResponse.prototype.getId = function() {
6724
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
6725
+ };
6726
+
6727
+
6728
+ /**
6729
+ * @param {string} value
6730
+ * @return {!proto.wechaty.puppet.MessageSendPostResponse} returns this
6731
+ */
6732
+ proto.wechaty.puppet.MessageSendPostResponse.prototype.setId = function(value) {
6733
+ return jspb.Message.setProto3StringField(this, 1, value);
6734
+ };
6735
+
6736
+
6737
+
6738
+
6739
+
6385
6740
  if (jspb.Message.GENERATE_TO_OBJECT) {
6386
6741
  /**
6387
6742
  * Creates an object representation of this proto.
@@ -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.85
12
+ version: 1.0.86
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: https://github.com/wechaty/openapi
@@ -603,6 +603,31 @@ paths:
603
603
  $ref: '#/definitions/PuppetMessageSendMiniProgramBody'
604
604
  tags:
605
605
  - Puppet
606
+ /conversations/{conversationId}/post:
607
+ post:
608
+ operationId: Puppet_MessageSendPost
609
+ responses:
610
+ '200':
611
+ description: A successful response.
612
+ schema:
613
+ $ref: '#/definitions/puppetMessageSendPostResponse'
614
+ default:
615
+ description: An unexpected error response.
616
+ schema:
617
+ $ref: '#/definitions/rpcStatus'
618
+ parameters:
619
+ - name: conversationId
620
+ description: 对话id
621
+ in: path
622
+ required: true
623
+ type: string
624
+ - name: body
625
+ in: body
626
+ required: true
627
+ schema:
628
+ $ref: '#/definitions/PuppetMessageSendPostBody'
629
+ tags:
630
+ - Puppet
606
631
  /conversations/{conversationId}/text:
607
632
  post:
608
633
  operationId: Puppet_MessageSendText
@@ -2697,6 +2722,12 @@ definitions:
2697
2722
  miniProgram:
2698
2723
  $ref: '#/definitions/puppetMiniProgramPayload'
2699
2724
  title: 小程序payload
2725
+ PuppetMessageSendPostBody:
2726
+ type: object
2727
+ properties:
2728
+ content:
2729
+ $ref: '#/definitions/puppetPostPayloadClient'
2730
+ title: 发送的post内容
2700
2731
  PuppetMessageSendTextBody:
2701
2732
  type: object
2702
2733
  properties:
@@ -3610,6 +3641,11 @@ definitions:
3610
3641
  https://cloud.google.com/apis/design/design_patterns#optional_primitive_fields
3611
3642
  id:
3612
3643
  type: string
3644
+ puppetMessageSendPostResponse:
3645
+ type: object
3646
+ properties:
3647
+ id:
3648
+ type: string
3613
3649
  puppetMessageSendTextResponse:
3614
3650
  type: object
3615
3651
  properties:
@@ -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.85",
6
+ "version": "1.0.86",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -916,6 +916,45 @@
916
916
  ]
917
917
  }
918
918
  },
919
+ "/conversations/{conversationId}/post": {
920
+ "post": {
921
+ "operationId": "Puppet_MessageSendPost",
922
+ "responses": {
923
+ "200": {
924
+ "description": "A successful response.",
925
+ "schema": {
926
+ "$ref": "#/definitions/puppetMessageSendPostResponse"
927
+ }
928
+ },
929
+ "default": {
930
+ "description": "An unexpected error response.",
931
+ "schema": {
932
+ "$ref": "#/definitions/rpcStatus"
933
+ }
934
+ }
935
+ },
936
+ "parameters": [
937
+ {
938
+ "name": "conversationId",
939
+ "description": "对话id",
940
+ "in": "path",
941
+ "required": true,
942
+ "type": "string"
943
+ },
944
+ {
945
+ "name": "body",
946
+ "in": "body",
947
+ "required": true,
948
+ "schema": {
949
+ "$ref": "#/definitions/PuppetMessageSendPostBody"
950
+ }
951
+ }
952
+ ],
953
+ "tags": [
954
+ "Puppet"
955
+ ]
956
+ }
957
+ },
919
958
  "/conversations/{conversationId}/text": {
920
959
  "post": {
921
960
  "operationId": "Puppet_MessageSendText",
@@ -4034,6 +4073,15 @@
4034
4073
  }
4035
4074
  }
4036
4075
  },
4076
+ "PuppetMessageSendPostBody": {
4077
+ "type": "object",
4078
+ "properties": {
4079
+ "content": {
4080
+ "$ref": "#/definitions/puppetPostPayloadClient",
4081
+ "title": "发送的post内容"
4082
+ }
4083
+ }
4084
+ },
4037
4085
  "PuppetMessageSendTextBody": {
4038
4086
  "type": "object",
4039
4087
  "properties": {
@@ -5186,6 +5234,14 @@
5186
5234
  }
5187
5235
  }
5188
5236
  },
5237
+ "puppetMessageSendPostResponse": {
5238
+ "type": "object",
5239
+ "properties": {
5240
+ "id": {
5241
+ "type": "string"
5242
+ }
5243
+ }
5244
+ },
5189
5245
  "puppetMessageSendTextResponse": {
5190
5246
  "type": "object",
5191
5247
  "properties": {
@@ -76,6 +76,7 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
76
76
  messageSendUrl: IPuppetService_IMessageSendUrl;
77
77
  messageSendLocation: IPuppetService_IMessageSendLocation;
78
78
  messageSendChannel: IPuppetService_IMessageSendChannel;
79
+ messageSendPost: IPuppetService_IMessageSendPost;
79
80
  messagePreview: IPuppetService_IMessagePreview;
80
81
  getMessageBroadcastTarget: IPuppetService_IGetMessageBroadcastTarget;
81
82
  createMessageBroadcast: IPuppetService_ICreateMessageBroadcast;
@@ -599,6 +600,15 @@ interface IPuppetService_IMessageSendChannel extends grpc.MethodDefinition<wecha
599
600
  responseSerialize: grpc.serialize<wechaty_puppet_message_pb.MessageSendChannelResponse>;
600
601
  responseDeserialize: grpc.deserialize<wechaty_puppet_message_pb.MessageSendChannelResponse>;
601
602
  }
603
+ interface IPuppetService_IMessageSendPost extends grpc.MethodDefinition<wechaty_puppet_message_pb.MessageSendPostRequest, wechaty_puppet_message_pb.MessageSendPostResponse> {
604
+ path: "/wechaty.Puppet/MessageSendPost";
605
+ requestStream: false;
606
+ responseStream: false;
607
+ requestSerialize: grpc.serialize<wechaty_puppet_message_pb.MessageSendPostRequest>;
608
+ requestDeserialize: grpc.deserialize<wechaty_puppet_message_pb.MessageSendPostRequest>;
609
+ responseSerialize: grpc.serialize<wechaty_puppet_message_pb.MessageSendPostResponse>;
610
+ responseDeserialize: grpc.deserialize<wechaty_puppet_message_pb.MessageSendPostResponse>;
611
+ }
602
612
  interface IPuppetService_IMessagePreview extends grpc.MethodDefinition<wechaty_puppet_message_pb.MessagePreviewRequest, wechaty_puppet_message_pb.MessagePreviewResponse> {
603
613
  path: "/wechaty.Puppet/MessagePreview";
604
614
  requestStream: false;
@@ -1132,6 +1142,7 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
1132
1142
  messageSendUrl: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageSendUrlRequest, wechaty_puppet_message_pb.MessageSendUrlResponse>;
1133
1143
  messageSendLocation: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageSendLocationRequest, wechaty_puppet_message_pb.MessageSendLocationResponse>;
1134
1144
  messageSendChannel: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageSendChannelRequest, wechaty_puppet_message_pb.MessageSendChannelResponse>;
1145
+ messageSendPost: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageSendPostRequest, wechaty_puppet_message_pb.MessageSendPostResponse>;
1135
1146
  messagePreview: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessagePreviewRequest, wechaty_puppet_message_pb.MessagePreviewResponse>;
1136
1147
  getMessageBroadcastTarget: grpc.handleUnaryCall<wechaty_puppet_message_pb.GetMessageBroadcastTargetRequest, wechaty_puppet_message_pb.GetMessageBroadcastTargetResponse>;
1137
1148
  createMessageBroadcast: grpc.handleUnaryCall<wechaty_puppet_message_pb.CreateMessageBroadcastRequest, wechaty_puppet_message_pb.CreateMessageBroadcastResponse>;
@@ -1343,6 +1354,9 @@ export interface IPuppetClient {
1343
1354
  messageSendChannel(request: wechaty_puppet_message_pb.MessageSendChannelRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendChannelResponse) => void): grpc.ClientUnaryCall;
1344
1355
  messageSendChannel(request: wechaty_puppet_message_pb.MessageSendChannelRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendChannelResponse) => void): grpc.ClientUnaryCall;
1345
1356
  messageSendChannel(request: wechaty_puppet_message_pb.MessageSendChannelRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendChannelResponse) => void): grpc.ClientUnaryCall;
1357
+ messageSendPost(request: wechaty_puppet_message_pb.MessageSendPostRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendPostResponse) => void): grpc.ClientUnaryCall;
1358
+ messageSendPost(request: wechaty_puppet_message_pb.MessageSendPostRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendPostResponse) => void): grpc.ClientUnaryCall;
1359
+ messageSendPost(request: wechaty_puppet_message_pb.MessageSendPostRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendPostResponse) => void): grpc.ClientUnaryCall;
1346
1360
  messagePreview(request: wechaty_puppet_message_pb.MessagePreviewRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessagePreviewResponse) => void): grpc.ClientUnaryCall;
1347
1361
  messagePreview(request: wechaty_puppet_message_pb.MessagePreviewRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessagePreviewResponse) => void): grpc.ClientUnaryCall;
1348
1362
  messagePreview(request: wechaty_puppet_message_pb.MessagePreviewRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessagePreviewResponse) => void): grpc.ClientUnaryCall;
@@ -1661,6 +1675,9 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
1661
1675
  public messageSendChannel(request: wechaty_puppet_message_pb.MessageSendChannelRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendChannelResponse) => void): grpc.ClientUnaryCall;
1662
1676
  public messageSendChannel(request: wechaty_puppet_message_pb.MessageSendChannelRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendChannelResponse) => void): grpc.ClientUnaryCall;
1663
1677
  public messageSendChannel(request: wechaty_puppet_message_pb.MessageSendChannelRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendChannelResponse) => void): grpc.ClientUnaryCall;
1678
+ public messageSendPost(request: wechaty_puppet_message_pb.MessageSendPostRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendPostResponse) => void): grpc.ClientUnaryCall;
1679
+ public messageSendPost(request: wechaty_puppet_message_pb.MessageSendPostRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendPostResponse) => void): grpc.ClientUnaryCall;
1680
+ public messageSendPost(request: wechaty_puppet_message_pb.MessageSendPostRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendPostResponse) => void): grpc.ClientUnaryCall;
1664
1681
  public messagePreview(request: wechaty_puppet_message_pb.MessagePreviewRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessagePreviewResponse) => void): grpc.ClientUnaryCall;
1665
1682
  public messagePreview(request: wechaty_puppet_message_pb.MessagePreviewRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessagePreviewResponse) => void): grpc.ClientUnaryCall;
1666
1683
  public messagePreview(request: wechaty_puppet_message_pb.MessagePreviewRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessagePreviewResponse) => void): grpc.ClientUnaryCall;
@@ -1220,6 +1220,28 @@ function deserialize_wechaty_puppet_MessageSendMiniProgramResponse(buffer_arg) {
1220
1220
  return wechaty_puppet_message_pb.MessageSendMiniProgramResponse.deserializeBinary(new Uint8Array(buffer_arg));
1221
1221
  }
1222
1222
 
1223
+ function serialize_wechaty_puppet_MessageSendPostRequest(arg) {
1224
+ if (!(arg instanceof wechaty_puppet_message_pb.MessageSendPostRequest)) {
1225
+ throw new Error('Expected argument of type wechaty.puppet.MessageSendPostRequest');
1226
+ }
1227
+ return Buffer.from(arg.serializeBinary());
1228
+ }
1229
+
1230
+ function deserialize_wechaty_puppet_MessageSendPostRequest(buffer_arg) {
1231
+ return wechaty_puppet_message_pb.MessageSendPostRequest.deserializeBinary(new Uint8Array(buffer_arg));
1232
+ }
1233
+
1234
+ function serialize_wechaty_puppet_MessageSendPostResponse(arg) {
1235
+ if (!(arg instanceof wechaty_puppet_message_pb.MessageSendPostResponse)) {
1236
+ throw new Error('Expected argument of type wechaty.puppet.MessageSendPostResponse');
1237
+ }
1238
+ return Buffer.from(arg.serializeBinary());
1239
+ }
1240
+
1241
+ function deserialize_wechaty_puppet_MessageSendPostResponse(buffer_arg) {
1242
+ return wechaty_puppet_message_pb.MessageSendPostResponse.deserializeBinary(new Uint8Array(buffer_arg));
1243
+ }
1244
+
1223
1245
  function serialize_wechaty_puppet_MessageSendTextRequest(arg) {
1224
1246
  if (!(arg instanceof wechaty_puppet_message_pb.MessageSendTextRequest)) {
1225
1247
  throw new Error('Expected argument of type wechaty.puppet.MessageSendTextRequest');
@@ -2895,6 +2917,17 @@ messageFile: {
2895
2917
  responseSerialize: serialize_wechaty_puppet_MessageSendChannelResponse,
2896
2918
  responseDeserialize: deserialize_wechaty_puppet_MessageSendChannelResponse,
2897
2919
  },
2920
+ messageSendPost: {
2921
+ path: '/wechaty.Puppet/MessageSendPost',
2922
+ requestStream: false,
2923
+ responseStream: false,
2924
+ requestType: wechaty_puppet_message_pb.MessageSendPostRequest,
2925
+ responseType: wechaty_puppet_message_pb.MessageSendPostResponse,
2926
+ requestSerialize: serialize_wechaty_puppet_MessageSendPostRequest,
2927
+ requestDeserialize: deserialize_wechaty_puppet_MessageSendPostRequest,
2928
+ responseSerialize: serialize_wechaty_puppet_MessageSendPostResponse,
2929
+ responseDeserialize: deserialize_wechaty_puppet_MessageSendPostResponse,
2930
+ },
2898
2931
  messagePreview: {
2899
2932
  path: '/wechaty.Puppet/MessagePreview',
2900
2933
  requestStream: false,