@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
@@ -211,6 +211,42 @@ export namespace DirtyPayloadResponse {
211
211
  }
212
212
  }
213
213
 
214
+ export class CurrentUserRequest extends jspb.Message {
215
+ serializeBinary(): Uint8Array;
216
+ toObject(includeInstance?: boolean): CurrentUserRequest.AsObject;
217
+ static toObject(includeInstance: boolean, msg: CurrentUserRequest): CurrentUserRequest.AsObject;
218
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
219
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
220
+ static serializeBinaryToWriter(message: CurrentUserRequest, writer: jspb.BinaryWriter): void;
221
+ static deserializeBinary(bytes: Uint8Array): CurrentUserRequest;
222
+ static deserializeBinaryFromReader(message: CurrentUserRequest, reader: jspb.BinaryReader): CurrentUserRequest;
223
+ }
224
+
225
+ export namespace CurrentUserRequest {
226
+ export type AsObject = {
227
+ }
228
+ }
229
+
230
+ export class CurrentUserResponse extends jspb.Message {
231
+ getUserId(): string;
232
+ setUserId(value: string): void;
233
+
234
+ serializeBinary(): Uint8Array;
235
+ toObject(includeInstance?: boolean): CurrentUserResponse.AsObject;
236
+ static toObject(includeInstance: boolean, msg: CurrentUserResponse): CurrentUserResponse.AsObject;
237
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
238
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
239
+ static serializeBinaryToWriter(message: CurrentUserResponse, writer: jspb.BinaryWriter): void;
240
+ static deserializeBinary(bytes: Uint8Array): CurrentUserResponse;
241
+ static deserializeBinaryFromReader(message: CurrentUserResponse, reader: jspb.BinaryReader): CurrentUserResponse;
242
+ }
243
+
244
+ export namespace CurrentUserResponse {
245
+ export type AsObject = {
246
+ userId: string,
247
+ }
248
+ }
249
+
214
250
  export interface PayloadTypeMap {
215
251
  PAYLOAD_TYPE_UNSPECIFIED: 0;
216
252
  PAYLOAD_TYPE_MESSAGE: 1;
@@ -15,6 +15,8 @@ var jspb = require('google-protobuf');
15
15
  var goog = jspb;
16
16
  var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
17
17
 
18
+ goog.exportSymbol('proto.wechaty.puppet.CurrentUserRequest', null, global);
19
+ goog.exportSymbol('proto.wechaty.puppet.CurrentUserResponse', null, global);
18
20
  goog.exportSymbol('proto.wechaty.puppet.DingRequest', null, global);
19
21
  goog.exportSymbol('proto.wechaty.puppet.DingResponse', null, global);
20
22
  goog.exportSymbol('proto.wechaty.puppet.DirtyPayloadRequest', null, global);
@@ -280,6 +282,48 @@ if (goog.DEBUG && !COMPILED) {
280
282
  */
281
283
  proto.wechaty.puppet.DirtyPayloadResponse.displayName = 'proto.wechaty.puppet.DirtyPayloadResponse';
282
284
  }
285
+ /**
286
+ * Generated by JsPbCodeGenerator.
287
+ * @param {Array=} opt_data Optional initial data array, typically from a
288
+ * server response, or constructed directly in Javascript. The array is used
289
+ * in place and becomes part of the constructed object. It is not cloned.
290
+ * If no data is provided, the constructed object will be empty, but still
291
+ * valid.
292
+ * @extends {jspb.Message}
293
+ * @constructor
294
+ */
295
+ proto.wechaty.puppet.CurrentUserRequest = function(opt_data) {
296
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
297
+ };
298
+ goog.inherits(proto.wechaty.puppet.CurrentUserRequest, jspb.Message);
299
+ if (goog.DEBUG && !COMPILED) {
300
+ /**
301
+ * @public
302
+ * @override
303
+ */
304
+ proto.wechaty.puppet.CurrentUserRequest.displayName = 'proto.wechaty.puppet.CurrentUserRequest';
305
+ }
306
+ /**
307
+ * Generated by JsPbCodeGenerator.
308
+ * @param {Array=} opt_data Optional initial data array, typically from a
309
+ * server response, or constructed directly in Javascript. The array is used
310
+ * in place and becomes part of the constructed object. It is not cloned.
311
+ * If no data is provided, the constructed object will be empty, but still
312
+ * valid.
313
+ * @extends {jspb.Message}
314
+ * @constructor
315
+ */
316
+ proto.wechaty.puppet.CurrentUserResponse = function(opt_data) {
317
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
318
+ };
319
+ goog.inherits(proto.wechaty.puppet.CurrentUserResponse, jspb.Message);
320
+ if (goog.DEBUG && !COMPILED) {
321
+ /**
322
+ * @public
323
+ * @override
324
+ */
325
+ proto.wechaty.puppet.CurrentUserResponse.displayName = 'proto.wechaty.puppet.CurrentUserResponse';
326
+ }
283
327
 
284
328
 
285
329
 
@@ -1609,6 +1653,237 @@ proto.wechaty.puppet.DirtyPayloadResponse.serializeBinaryToWriter = function(mes
1609
1653
  };
1610
1654
 
1611
1655
 
1656
+
1657
+
1658
+
1659
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1660
+ /**
1661
+ * Creates an object representation of this proto.
1662
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1663
+ * Optional fields that are not set will be set to undefined.
1664
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1665
+ * For the list of reserved names please see:
1666
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1667
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1668
+ * JSPB instance for transitional soy proto support:
1669
+ * http://goto/soy-param-migration
1670
+ * @return {!Object}
1671
+ */
1672
+ proto.wechaty.puppet.CurrentUserRequest.prototype.toObject = function(opt_includeInstance) {
1673
+ return proto.wechaty.puppet.CurrentUserRequest.toObject(opt_includeInstance, this);
1674
+ };
1675
+
1676
+
1677
+ /**
1678
+ * Static version of the {@see toObject} method.
1679
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1680
+ * the JSPB instance for transitional soy proto support:
1681
+ * http://goto/soy-param-migration
1682
+ * @param {!proto.wechaty.puppet.CurrentUserRequest} msg The msg instance to transform.
1683
+ * @return {!Object}
1684
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1685
+ */
1686
+ proto.wechaty.puppet.CurrentUserRequest.toObject = function(includeInstance, msg) {
1687
+ var f, obj = {
1688
+
1689
+ };
1690
+
1691
+ if (includeInstance) {
1692
+ obj.$jspbMessageInstance = msg;
1693
+ }
1694
+ return obj;
1695
+ };
1696
+ }
1697
+
1698
+
1699
+ /**
1700
+ * Deserializes binary data (in protobuf wire format).
1701
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1702
+ * @return {!proto.wechaty.puppet.CurrentUserRequest}
1703
+ */
1704
+ proto.wechaty.puppet.CurrentUserRequest.deserializeBinary = function(bytes) {
1705
+ var reader = new jspb.BinaryReader(bytes);
1706
+ var msg = new proto.wechaty.puppet.CurrentUserRequest;
1707
+ return proto.wechaty.puppet.CurrentUserRequest.deserializeBinaryFromReader(msg, reader);
1708
+ };
1709
+
1710
+
1711
+ /**
1712
+ * Deserializes binary data (in protobuf wire format) from the
1713
+ * given reader into the given message object.
1714
+ * @param {!proto.wechaty.puppet.CurrentUserRequest} msg The message object to deserialize into.
1715
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1716
+ * @return {!proto.wechaty.puppet.CurrentUserRequest}
1717
+ */
1718
+ proto.wechaty.puppet.CurrentUserRequest.deserializeBinaryFromReader = function(msg, reader) {
1719
+ while (reader.nextField()) {
1720
+ if (reader.isEndGroup()) {
1721
+ break;
1722
+ }
1723
+ var field = reader.getFieldNumber();
1724
+ switch (field) {
1725
+ default:
1726
+ reader.skipField();
1727
+ break;
1728
+ }
1729
+ }
1730
+ return msg;
1731
+ };
1732
+
1733
+
1734
+ /**
1735
+ * Serializes the message to binary data (in protobuf wire format).
1736
+ * @return {!Uint8Array}
1737
+ */
1738
+ proto.wechaty.puppet.CurrentUserRequest.prototype.serializeBinary = function() {
1739
+ var writer = new jspb.BinaryWriter();
1740
+ proto.wechaty.puppet.CurrentUserRequest.serializeBinaryToWriter(this, writer);
1741
+ return writer.getResultBuffer();
1742
+ };
1743
+
1744
+
1745
+ /**
1746
+ * Serializes the given message to binary data (in protobuf wire
1747
+ * format), writing to the given BinaryWriter.
1748
+ * @param {!proto.wechaty.puppet.CurrentUserRequest} message
1749
+ * @param {!jspb.BinaryWriter} writer
1750
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1751
+ */
1752
+ proto.wechaty.puppet.CurrentUserRequest.serializeBinaryToWriter = function(message, writer) {
1753
+ var f = undefined;
1754
+ };
1755
+
1756
+
1757
+
1758
+
1759
+
1760
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1761
+ /**
1762
+ * Creates an object representation of this proto.
1763
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1764
+ * Optional fields that are not set will be set to undefined.
1765
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1766
+ * For the list of reserved names please see:
1767
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1768
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1769
+ * JSPB instance for transitional soy proto support:
1770
+ * http://goto/soy-param-migration
1771
+ * @return {!Object}
1772
+ */
1773
+ proto.wechaty.puppet.CurrentUserResponse.prototype.toObject = function(opt_includeInstance) {
1774
+ return proto.wechaty.puppet.CurrentUserResponse.toObject(opt_includeInstance, this);
1775
+ };
1776
+
1777
+
1778
+ /**
1779
+ * Static version of the {@see toObject} method.
1780
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1781
+ * the JSPB instance for transitional soy proto support:
1782
+ * http://goto/soy-param-migration
1783
+ * @param {!proto.wechaty.puppet.CurrentUserResponse} msg The msg instance to transform.
1784
+ * @return {!Object}
1785
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1786
+ */
1787
+ proto.wechaty.puppet.CurrentUserResponse.toObject = function(includeInstance, msg) {
1788
+ var f, obj = {
1789
+ userId: jspb.Message.getFieldWithDefault(msg, 1, "")
1790
+ };
1791
+
1792
+ if (includeInstance) {
1793
+ obj.$jspbMessageInstance = msg;
1794
+ }
1795
+ return obj;
1796
+ };
1797
+ }
1798
+
1799
+
1800
+ /**
1801
+ * Deserializes binary data (in protobuf wire format).
1802
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1803
+ * @return {!proto.wechaty.puppet.CurrentUserResponse}
1804
+ */
1805
+ proto.wechaty.puppet.CurrentUserResponse.deserializeBinary = function(bytes) {
1806
+ var reader = new jspb.BinaryReader(bytes);
1807
+ var msg = new proto.wechaty.puppet.CurrentUserResponse;
1808
+ return proto.wechaty.puppet.CurrentUserResponse.deserializeBinaryFromReader(msg, reader);
1809
+ };
1810
+
1811
+
1812
+ /**
1813
+ * Deserializes binary data (in protobuf wire format) from the
1814
+ * given reader into the given message object.
1815
+ * @param {!proto.wechaty.puppet.CurrentUserResponse} msg The message object to deserialize into.
1816
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1817
+ * @return {!proto.wechaty.puppet.CurrentUserResponse}
1818
+ */
1819
+ proto.wechaty.puppet.CurrentUserResponse.deserializeBinaryFromReader = function(msg, reader) {
1820
+ while (reader.nextField()) {
1821
+ if (reader.isEndGroup()) {
1822
+ break;
1823
+ }
1824
+ var field = reader.getFieldNumber();
1825
+ switch (field) {
1826
+ case 1:
1827
+ var value = /** @type {string} */ (reader.readString());
1828
+ msg.setUserId(value);
1829
+ break;
1830
+ default:
1831
+ reader.skipField();
1832
+ break;
1833
+ }
1834
+ }
1835
+ return msg;
1836
+ };
1837
+
1838
+
1839
+ /**
1840
+ * Serializes the message to binary data (in protobuf wire format).
1841
+ * @return {!Uint8Array}
1842
+ */
1843
+ proto.wechaty.puppet.CurrentUserResponse.prototype.serializeBinary = function() {
1844
+ var writer = new jspb.BinaryWriter();
1845
+ proto.wechaty.puppet.CurrentUserResponse.serializeBinaryToWriter(this, writer);
1846
+ return writer.getResultBuffer();
1847
+ };
1848
+
1849
+
1850
+ /**
1851
+ * Serializes the given message to binary data (in protobuf wire
1852
+ * format), writing to the given BinaryWriter.
1853
+ * @param {!proto.wechaty.puppet.CurrentUserResponse} message
1854
+ * @param {!jspb.BinaryWriter} writer
1855
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1856
+ */
1857
+ proto.wechaty.puppet.CurrentUserResponse.serializeBinaryToWriter = function(message, writer) {
1858
+ var f = undefined;
1859
+ f = message.getUserId();
1860
+ if (f.length > 0) {
1861
+ writer.writeString(
1862
+ 1,
1863
+ f
1864
+ );
1865
+ }
1866
+ };
1867
+
1868
+
1869
+ /**
1870
+ * optional string user_id = 1;
1871
+ * @return {string}
1872
+ */
1873
+ proto.wechaty.puppet.CurrentUserResponse.prototype.getUserId = function() {
1874
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1875
+ };
1876
+
1877
+
1878
+ /**
1879
+ * @param {string} value
1880
+ * @return {!proto.wechaty.puppet.CurrentUserResponse} returns this
1881
+ */
1882
+ proto.wechaty.puppet.CurrentUserResponse.prototype.setUserId = function(value) {
1883
+ return jspb.Message.setProto3StringField(this, 1, value);
1884
+ };
1885
+
1886
+
1612
1887
  /**
1613
1888
  * @enum {number}
1614
1889
  */
@@ -852,23 +852,66 @@ export namespace MessageSendChannelResponse {
852
852
  }
853
853
  }
854
854
 
855
+ export class MessagePreviewRequest extends jspb.Message {
856
+ getId(): string;
857
+ setId(value: string): void;
858
+
859
+ serializeBinary(): Uint8Array;
860
+ toObject(includeInstance?: boolean): MessagePreviewRequest.AsObject;
861
+ static toObject(includeInstance: boolean, msg: MessagePreviewRequest): MessagePreviewRequest.AsObject;
862
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
863
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
864
+ static serializeBinaryToWriter(message: MessagePreviewRequest, writer: jspb.BinaryWriter): void;
865
+ static deserializeBinary(bytes: Uint8Array): MessagePreviewRequest;
866
+ static deserializeBinaryFromReader(message: MessagePreviewRequest, reader: jspb.BinaryReader): MessagePreviewRequest;
867
+ }
868
+
869
+ export namespace MessagePreviewRequest {
870
+ export type AsObject = {
871
+ id: string,
872
+ }
873
+ }
874
+
875
+ export class MessagePreviewResponse extends jspb.Message {
876
+ getFileBox(): string;
877
+ setFileBox(value: string): void;
878
+
879
+ serializeBinary(): Uint8Array;
880
+ toObject(includeInstance?: boolean): MessagePreviewResponse.AsObject;
881
+ static toObject(includeInstance: boolean, msg: MessagePreviewResponse): MessagePreviewResponse.AsObject;
882
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
883
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
884
+ static serializeBinaryToWriter(message: MessagePreviewResponse, writer: jspb.BinaryWriter): void;
885
+ static deserializeBinary(bytes: Uint8Array): MessagePreviewResponse;
886
+ static deserializeBinaryFromReader(message: MessagePreviewResponse, reader: jspb.BinaryReader): MessagePreviewResponse;
887
+ }
888
+
889
+ export namespace MessagePreviewResponse {
890
+ export type AsObject = {
891
+ fileBox: string,
892
+ }
893
+ }
894
+
855
895
  export interface MessageTypeMap {
856
896
  MESSAGE_TYPE_UNSPECIFIED: 0;
857
897
  MESSAGE_TYPE_ATTACHMENT: 1;
858
898
  MESSAGE_TYPE_AUDIO: 2;
859
899
  MESSAGE_TYPE_CONTACT: 3;
860
- MESSAGE_TYPE_EMOTICON: 4;
861
- MESSAGE_TYPE_IMAGE: 5;
862
- MESSAGE_TYPE_TEXT: 6;
863
- MESSAGE_TYPE_VIDEO: 7;
864
- MESSAGE_TYPE_CHAT_HISTORY: 8;
865
- MESSAGE_TYPE_LOCATION: 9;
866
- MESSAGE_TYPE_MINI_PROGRAM: 10;
900
+ MESSAGE_TYPE_CHAT_HISTORY: 4;
901
+ MESSAGE_TYPE_EMOTCION: 5;
902
+ MESSAGE_TYPE_IMAGE: 6;
903
+ MESSAGE_TYPE_TEXT: 7;
904
+ MESSAGE_TYPE_LOCATION: 8;
905
+ MESSAGE_TYPE_MINI_PROGRAM: 9;
906
+ MESSAGE_TYPE_GROUP_NOTE: 10;
867
907
  MESSAGE_TYPE_TRANSFER: 11;
868
908
  MESSAGE_TYPE_RED_ENVELOPE: 12;
869
909
  MESSAGE_TYPE_RECALLED: 13;
870
910
  MESSAGE_TYPE_URL: 14;
871
- MESSAGE_TYPE_CHANNEL: 15;
911
+ MESSAGE_TYPE_VIDEO: 15;
912
+ MESSAGE_TYPE_POST: 16;
913
+ MESSAGE_TYPE_CHANNEL: 17;
914
+ MESSAGE_TYPE_SYSTEM: 18;
872
915
  }
873
916
 
874
917
  export const MessageType: MessageTypeMap;