@juzi/wechaty-grpc 1.0.44 → 1.0.46

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.
@@ -6,6 +6,7 @@ import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/t
6
6
  import * as wechaty_puppet_url_link_pb from "../../wechaty/puppet/url-link_pb";
7
7
  import * as wechaty_puppet_channel_pb from "../../wechaty/puppet/channel_pb";
8
8
  import * as wechaty_puppet_location_pb from "../../wechaty/puppet/location_pb";
9
+ import * as wechaty_puppet_mini_program_pb from "../../wechaty/puppet/mini-program_pb";
9
10
 
10
11
  export class PostSayable extends jspb.Message {
11
12
  getType(): SayableTypeMap[keyof SayableTypeMap];
@@ -30,6 +31,11 @@ export class PostSayable extends jspb.Message {
30
31
  getChannel(): wechaty_puppet_channel_pb.ChannelPayload | undefined;
31
32
  setChannel(value?: wechaty_puppet_channel_pb.ChannelPayload): void;
32
33
 
34
+ hasMiniProgram(): boolean;
35
+ clearMiniProgram(): void;
36
+ getMiniProgram(): wechaty_puppet_mini_program_pb.MiniProgramPayload | undefined;
37
+ setMiniProgram(value?: wechaty_puppet_mini_program_pb.MiniProgramPayload): void;
38
+
33
39
  clearMentionIdListList(): void;
34
40
  getMentionIdListList(): Array<string>;
35
41
  setMentionIdListList(value: Array<string>): void;
@@ -53,6 +59,7 @@ export namespace PostSayable {
53
59
  fileBox: string,
54
60
  urlLink?: wechaty_puppet_url_link_pb.UrlLinkPayload.AsObject,
55
61
  channel?: wechaty_puppet_channel_pb.ChannelPayload.AsObject,
62
+ miniProgram?: wechaty_puppet_mini_program_pb.MiniProgramPayload.AsObject,
56
63
  mentionIdListList: Array<string>,
57
64
  }
58
65
  }
@@ -332,6 +339,7 @@ export interface PostTypeMap {
332
339
  POST_TYPE_MOMENT: 1;
333
340
  POST_TYPE_CHANNEL: 2;
334
341
  POST_TYPE_MESSAGE: 3;
342
+ POST_TYPE_BROADCAST: 4;
335
343
  }
336
344
 
337
345
  export const PostType: PostTypeMap;
@@ -23,6 +23,8 @@ var wechaty_puppet_channel_pb = require('../../wechaty/puppet/channel_pb.js');
23
23
  goog.object.extend(proto, wechaty_puppet_channel_pb);
24
24
  var wechaty_puppet_location_pb = require('../../wechaty/puppet/location_pb.js');
25
25
  goog.object.extend(proto, wechaty_puppet_location_pb);
26
+ var wechaty_puppet_mini$program_pb = require('../../wechaty/puppet/mini-program_pb.js');
27
+ goog.object.extend(proto, wechaty_puppet_mini$program_pb);
26
28
  goog.exportSymbol('proto.wechaty.puppet.PostLikeResponse', null, global);
27
29
  goog.exportSymbol('proto.wechaty.puppet.PostPayloadClient', null, global);
28
30
  goog.exportSymbol('proto.wechaty.puppet.PostPayloadRequest', null, global);
@@ -291,6 +293,7 @@ proto.wechaty.puppet.PostSayable.toObject = function(includeInstance, msg) {
291
293
  fileBox: jspb.Message.getFieldWithDefault(msg, 4, ""),
292
294
  urlLink: (f = msg.getUrlLink()) && wechaty_puppet_url$link_pb.UrlLinkPayload.toObject(includeInstance, f),
293
295
  channel: (f = msg.getChannel()) && wechaty_puppet_channel_pb.ChannelPayload.toObject(includeInstance, f),
296
+ miniProgram: (f = msg.getMiniProgram()) && wechaty_puppet_mini$program_pb.MiniProgramPayload.toObject(includeInstance, f),
294
297
  mentionIdListList: (f = jspb.Message.getRepeatedField(msg, 13)) == null ? undefined : f
295
298
  };
296
299
 
@@ -354,6 +357,11 @@ proto.wechaty.puppet.PostSayable.deserializeBinaryFromReader = function(msg, rea
354
357
  reader.readMessage(value,wechaty_puppet_channel_pb.ChannelPayload.deserializeBinaryFromReader);
355
358
  msg.setChannel(value);
356
359
  break;
360
+ case 7:
361
+ var value = new wechaty_puppet_mini$program_pb.MiniProgramPayload;
362
+ reader.readMessage(value,wechaty_puppet_mini$program_pb.MiniProgramPayload.deserializeBinaryFromReader);
363
+ msg.setMiniProgram(value);
364
+ break;
357
365
  case 13:
358
366
  var value = /** @type {string} */ (reader.readString());
359
367
  msg.addMentionIdList(value);
@@ -431,6 +439,14 @@ proto.wechaty.puppet.PostSayable.serializeBinaryToWriter = function(message, wri
431
439
  wechaty_puppet_channel_pb.ChannelPayload.serializeBinaryToWriter
432
440
  );
433
441
  }
442
+ f = message.getMiniProgram();
443
+ if (f != null) {
444
+ writer.writeMessage(
445
+ 7,
446
+ f,
447
+ wechaty_puppet_mini$program_pb.MiniProgramPayload.serializeBinaryToWriter
448
+ );
449
+ }
434
450
  f = message.getMentionIdListList();
435
451
  if (f.length > 0) {
436
452
  writer.writeRepeatedString(
@@ -587,6 +603,43 @@ proto.wechaty.puppet.PostSayable.prototype.hasChannel = function() {
587
603
  };
588
604
 
589
605
 
606
+ /**
607
+ * optional MiniProgramPayload mini_program = 7;
608
+ * @return {?proto.wechaty.puppet.MiniProgramPayload}
609
+ */
610
+ proto.wechaty.puppet.PostSayable.prototype.getMiniProgram = function() {
611
+ return /** @type{?proto.wechaty.puppet.MiniProgramPayload} */ (
612
+ jspb.Message.getWrapperField(this, wechaty_puppet_mini$program_pb.MiniProgramPayload, 7));
613
+ };
614
+
615
+
616
+ /**
617
+ * @param {?proto.wechaty.puppet.MiniProgramPayload|undefined} value
618
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
619
+ */
620
+ proto.wechaty.puppet.PostSayable.prototype.setMiniProgram = function(value) {
621
+ return jspb.Message.setWrapperField(this, 7, value);
622
+ };
623
+
624
+
625
+ /**
626
+ * Clears the message field making it undefined.
627
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
628
+ */
629
+ proto.wechaty.puppet.PostSayable.prototype.clearMiniProgram = function() {
630
+ return this.setMiniProgram(undefined);
631
+ };
632
+
633
+
634
+ /**
635
+ * Returns whether this field is set.
636
+ * @return {boolean}
637
+ */
638
+ proto.wechaty.puppet.PostSayable.prototype.hasMiniProgram = function() {
639
+ return jspb.Message.getField(this, 7) != null;
640
+ };
641
+
642
+
590
643
  /**
591
644
  * repeated string mention_id_list = 13;
592
645
  * @return {!Array<string>}
@@ -2544,7 +2597,8 @@ proto.wechaty.puppet.PostType = {
2544
2597
  POST_TYPE_UNSPECIFIED: 0,
2545
2598
  POST_TYPE_MOMENT: 1,
2546
2599
  POST_TYPE_CHANNEL: 2,
2547
- POST_TYPE_MESSAGE: 3
2600
+ POST_TYPE_MESSAGE: 3,
2601
+ POST_TYPE_BROADCAST: 4
2548
2602
  };
2549
2603
 
2550
2604
  /**
@@ -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.44
12
+ version: 1.0.46
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: 'https://github.com/wechaty/openapi'
@@ -3056,6 +3056,8 @@ definitions:
3056
3056
  $ref: '#/definitions/puppetUrlLinkPayload'
3057
3057
  channel:
3058
3058
  $ref: '#/definitions/puppetChannelPayload'
3059
+ miniProgram:
3060
+ $ref: '#/definitions/puppetMiniProgramPayload'
3059
3061
  mentionIdList:
3060
3062
  type: array
3061
3063
  items:
@@ -3083,11 +3085,13 @@ definitions:
3083
3085
  - POST_TYPE_MOMENT
3084
3086
  - POST_TYPE_CHANNEL
3085
3087
  - POST_TYPE_MESSAGE
3088
+ - POST_TYPE_BROADCAST
3086
3089
  default: POST_TYPE_UNSPECIFIED
3087
3090
  title: |-
3088
3091
  - POST_TYPE_MOMENT: 朋友圈
3089
3092
  - POST_TYPE_CHANNEL: 视频号——原始设计走post,实际目前采用message
3090
3093
  - POST_TYPE_MESSAGE: 消息——富媒体消息
3094
+ - POST_TYPE_BROADCAST: 群发
3091
3095
  puppetReferrer:
3092
3096
  type: object
3093
3097
  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.44",
6
+ "version": "1.0.46",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -4325,6 +4325,9 @@
4325
4325
  "channel": {
4326
4326
  "$ref": "#/definitions/puppetChannelPayload"
4327
4327
  },
4328
+ "miniProgram": {
4329
+ "$ref": "#/definitions/puppetMiniProgramPayload"
4330
+ },
4328
4331
  "mentionIdList": {
4329
4332
  "type": "array",
4330
4333
  "items": {
@@ -4363,10 +4366,11 @@
4363
4366
  "POST_TYPE_UNSPECIFIED",
4364
4367
  "POST_TYPE_MOMENT",
4365
4368
  "POST_TYPE_CHANNEL",
4366
- "POST_TYPE_MESSAGE"
4369
+ "POST_TYPE_MESSAGE",
4370
+ "POST_TYPE_BROADCAST"
4367
4371
  ],
4368
4372
  "default": "POST_TYPE_UNSPECIFIED",
4369
- "title": "- POST_TYPE_MOMENT: 朋友圈\n - POST_TYPE_CHANNEL: 视频号——原始设计走post,实际目前采用message\n - POST_TYPE_MESSAGE: 消息——富媒体消息"
4373
+ "title": "- POST_TYPE_MOMENT: 朋友圈\n - POST_TYPE_CHANNEL: 视频号——原始设计走post,实际目前采用message\n - POST_TYPE_MESSAGE: 消息——富媒体消息\n - POST_TYPE_BROADCAST: 群发"
4370
4374
  },
4371
4375
  "puppetReferrer": {
4372
4376
  "type": "object",
@@ -10,12 +10,14 @@ import "google/protobuf/timestamp.proto";
10
10
  import "wechaty/puppet/url-link.proto";
11
11
  import "wechaty/puppet/channel.proto";
12
12
  import "wechaty/puppet/location.proto";
13
+ import "wechaty/puppet/mini-program.proto";
13
14
 
14
15
  enum PostType {
15
16
  POST_TYPE_UNSPECIFIED = 0;
16
17
  POST_TYPE_MOMENT = 1; // 朋友圈
17
18
  POST_TYPE_CHANNEL = 2; // 视频号——原始设计走post,实际目前采用message
18
19
  POST_TYPE_MESSAGE = 3; // 消息——富媒体消息
20
+ POST_TYPE_BROADCAST = 4; // 群发
19
21
  }
20
22
 
21
23
  enum SayableType {
@@ -38,6 +40,7 @@ message PostSayable {
38
40
  string file_box = 4; // FileBox.toJSON()
39
41
  UrlLinkPayload url_link = 5;
40
42
  ChannelPayload channel = 6;
43
+ MiniProgramPayload mini_program = 7;
41
44
 
42
45
  repeated string mention_id_list = 13; // 文本类型的sayable可传,朋友圈暂不支持
43
46
  }
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.packageJson = void 0;
4
4
  exports.packageJson = {
5
5
  "name": "@juzi/wechaty-grpc",
6
- "version": "1.0.44",
6
+ "version": "1.0.46",
7
7
  "description": "gRPC for Wechaty",
8
8
  "type": "module",
9
9
  "exports": {
@@ -6,6 +6,7 @@ import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/t
6
6
  import * as wechaty_puppet_url_link_pb from "../../wechaty/puppet/url-link_pb";
7
7
  import * as wechaty_puppet_channel_pb from "../../wechaty/puppet/channel_pb";
8
8
  import * as wechaty_puppet_location_pb from "../../wechaty/puppet/location_pb";
9
+ import * as wechaty_puppet_mini_program_pb from "../../wechaty/puppet/mini-program_pb";
9
10
 
10
11
  export class PostSayable extends jspb.Message {
11
12
  getType(): SayableTypeMap[keyof SayableTypeMap];
@@ -30,6 +31,11 @@ export class PostSayable extends jspb.Message {
30
31
  getChannel(): wechaty_puppet_channel_pb.ChannelPayload | undefined;
31
32
  setChannel(value?: wechaty_puppet_channel_pb.ChannelPayload): void;
32
33
 
34
+ hasMiniProgram(): boolean;
35
+ clearMiniProgram(): void;
36
+ getMiniProgram(): wechaty_puppet_mini_program_pb.MiniProgramPayload | undefined;
37
+ setMiniProgram(value?: wechaty_puppet_mini_program_pb.MiniProgramPayload): void;
38
+
33
39
  clearMentionIdListList(): void;
34
40
  getMentionIdListList(): Array<string>;
35
41
  setMentionIdListList(value: Array<string>): void;
@@ -53,6 +59,7 @@ export namespace PostSayable {
53
59
  fileBox: string,
54
60
  urlLink?: wechaty_puppet_url_link_pb.UrlLinkPayload.AsObject,
55
61
  channel?: wechaty_puppet_channel_pb.ChannelPayload.AsObject,
62
+ miniProgram?: wechaty_puppet_mini_program_pb.MiniProgramPayload.AsObject,
56
63
  mentionIdListList: Array<string>,
57
64
  }
58
65
  }
@@ -332,6 +339,7 @@ export interface PostTypeMap {
332
339
  POST_TYPE_MOMENT: 1;
333
340
  POST_TYPE_CHANNEL: 2;
334
341
  POST_TYPE_MESSAGE: 3;
342
+ POST_TYPE_BROADCAST: 4;
335
343
  }
336
344
 
337
345
  export const PostType: PostTypeMap;
@@ -23,6 +23,8 @@ var wechaty_puppet_channel_pb = require('../../wechaty/puppet/channel_pb.js');
23
23
  goog.object.extend(proto, wechaty_puppet_channel_pb);
24
24
  var wechaty_puppet_location_pb = require('../../wechaty/puppet/location_pb.js');
25
25
  goog.object.extend(proto, wechaty_puppet_location_pb);
26
+ var wechaty_puppet_mini$program_pb = require('../../wechaty/puppet/mini-program_pb.js');
27
+ goog.object.extend(proto, wechaty_puppet_mini$program_pb);
26
28
  goog.exportSymbol('proto.wechaty.puppet.PostLikeResponse', null, global);
27
29
  goog.exportSymbol('proto.wechaty.puppet.PostPayloadClient', null, global);
28
30
  goog.exportSymbol('proto.wechaty.puppet.PostPayloadRequest', null, global);
@@ -291,6 +293,7 @@ proto.wechaty.puppet.PostSayable.toObject = function(includeInstance, msg) {
291
293
  fileBox: jspb.Message.getFieldWithDefault(msg, 4, ""),
292
294
  urlLink: (f = msg.getUrlLink()) && wechaty_puppet_url$link_pb.UrlLinkPayload.toObject(includeInstance, f),
293
295
  channel: (f = msg.getChannel()) && wechaty_puppet_channel_pb.ChannelPayload.toObject(includeInstance, f),
296
+ miniProgram: (f = msg.getMiniProgram()) && wechaty_puppet_mini$program_pb.MiniProgramPayload.toObject(includeInstance, f),
294
297
  mentionIdListList: (f = jspb.Message.getRepeatedField(msg, 13)) == null ? undefined : f
295
298
  };
296
299
 
@@ -354,6 +357,11 @@ proto.wechaty.puppet.PostSayable.deserializeBinaryFromReader = function(msg, rea
354
357
  reader.readMessage(value,wechaty_puppet_channel_pb.ChannelPayload.deserializeBinaryFromReader);
355
358
  msg.setChannel(value);
356
359
  break;
360
+ case 7:
361
+ var value = new wechaty_puppet_mini$program_pb.MiniProgramPayload;
362
+ reader.readMessage(value,wechaty_puppet_mini$program_pb.MiniProgramPayload.deserializeBinaryFromReader);
363
+ msg.setMiniProgram(value);
364
+ break;
357
365
  case 13:
358
366
  var value = /** @type {string} */ (reader.readString());
359
367
  msg.addMentionIdList(value);
@@ -431,6 +439,14 @@ proto.wechaty.puppet.PostSayable.serializeBinaryToWriter = function(message, wri
431
439
  wechaty_puppet_channel_pb.ChannelPayload.serializeBinaryToWriter
432
440
  );
433
441
  }
442
+ f = message.getMiniProgram();
443
+ if (f != null) {
444
+ writer.writeMessage(
445
+ 7,
446
+ f,
447
+ wechaty_puppet_mini$program_pb.MiniProgramPayload.serializeBinaryToWriter
448
+ );
449
+ }
434
450
  f = message.getMentionIdListList();
435
451
  if (f.length > 0) {
436
452
  writer.writeRepeatedString(
@@ -587,6 +603,43 @@ proto.wechaty.puppet.PostSayable.prototype.hasChannel = function() {
587
603
  };
588
604
 
589
605
 
606
+ /**
607
+ * optional MiniProgramPayload mini_program = 7;
608
+ * @return {?proto.wechaty.puppet.MiniProgramPayload}
609
+ */
610
+ proto.wechaty.puppet.PostSayable.prototype.getMiniProgram = function() {
611
+ return /** @type{?proto.wechaty.puppet.MiniProgramPayload} */ (
612
+ jspb.Message.getWrapperField(this, wechaty_puppet_mini$program_pb.MiniProgramPayload, 7));
613
+ };
614
+
615
+
616
+ /**
617
+ * @param {?proto.wechaty.puppet.MiniProgramPayload|undefined} value
618
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
619
+ */
620
+ proto.wechaty.puppet.PostSayable.prototype.setMiniProgram = function(value) {
621
+ return jspb.Message.setWrapperField(this, 7, value);
622
+ };
623
+
624
+
625
+ /**
626
+ * Clears the message field making it undefined.
627
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
628
+ */
629
+ proto.wechaty.puppet.PostSayable.prototype.clearMiniProgram = function() {
630
+ return this.setMiniProgram(undefined);
631
+ };
632
+
633
+
634
+ /**
635
+ * Returns whether this field is set.
636
+ * @return {boolean}
637
+ */
638
+ proto.wechaty.puppet.PostSayable.prototype.hasMiniProgram = function() {
639
+ return jspb.Message.getField(this, 7) != null;
640
+ };
641
+
642
+
590
643
  /**
591
644
  * repeated string mention_id_list = 13;
592
645
  * @return {!Array<string>}
@@ -2544,7 +2597,8 @@ proto.wechaty.puppet.PostType = {
2544
2597
  POST_TYPE_UNSPECIFIED: 0,
2545
2598
  POST_TYPE_MOMENT: 1,
2546
2599
  POST_TYPE_CHANNEL: 2,
2547
- POST_TYPE_MESSAGE: 3
2600
+ POST_TYPE_MESSAGE: 3,
2601
+ POST_TYPE_BROADCAST: 4
2548
2602
  };
2549
2603
 
2550
2604
  /**
@@ -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.44
12
+ version: 1.0.46
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: 'https://github.com/wechaty/openapi'
@@ -3056,6 +3056,8 @@ definitions:
3056
3056
  $ref: '#/definitions/puppetUrlLinkPayload'
3057
3057
  channel:
3058
3058
  $ref: '#/definitions/puppetChannelPayload'
3059
+ miniProgram:
3060
+ $ref: '#/definitions/puppetMiniProgramPayload'
3059
3061
  mentionIdList:
3060
3062
  type: array
3061
3063
  items:
@@ -3083,11 +3085,13 @@ definitions:
3083
3085
  - POST_TYPE_MOMENT
3084
3086
  - POST_TYPE_CHANNEL
3085
3087
  - POST_TYPE_MESSAGE
3088
+ - POST_TYPE_BROADCAST
3086
3089
  default: POST_TYPE_UNSPECIFIED
3087
3090
  title: |-
3088
3091
  - POST_TYPE_MOMENT: 朋友圈
3089
3092
  - POST_TYPE_CHANNEL: 视频号——原始设计走post,实际目前采用message
3090
3093
  - POST_TYPE_MESSAGE: 消息——富媒体消息
3094
+ - POST_TYPE_BROADCAST: 群发
3091
3095
  puppetReferrer:
3092
3096
  type: object
3093
3097
  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.44",
6
+ "version": "1.0.46",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -4325,6 +4325,9 @@
4325
4325
  "channel": {
4326
4326
  "$ref": "#/definitions/puppetChannelPayload"
4327
4327
  },
4328
+ "miniProgram": {
4329
+ "$ref": "#/definitions/puppetMiniProgramPayload"
4330
+ },
4328
4331
  "mentionIdList": {
4329
4332
  "type": "array",
4330
4333
  "items": {
@@ -4363,10 +4366,11 @@
4363
4366
  "POST_TYPE_UNSPECIFIED",
4364
4367
  "POST_TYPE_MOMENT",
4365
4368
  "POST_TYPE_CHANNEL",
4366
- "POST_TYPE_MESSAGE"
4369
+ "POST_TYPE_MESSAGE",
4370
+ "POST_TYPE_BROADCAST"
4367
4371
  ],
4368
4372
  "default": "POST_TYPE_UNSPECIFIED",
4369
- "title": "- POST_TYPE_MOMENT: 朋友圈\n - POST_TYPE_CHANNEL: 视频号——原始设计走post,实际目前采用message\n - POST_TYPE_MESSAGE: 消息——富媒体消息"
4373
+ "title": "- POST_TYPE_MOMENT: 朋友圈\n - POST_TYPE_CHANNEL: 视频号——原始设计走post,实际目前采用message\n - POST_TYPE_MESSAGE: 消息——富媒体消息\n - POST_TYPE_BROADCAST: 群发"
4370
4374
  },
4371
4375
  "puppetReferrer": {
4372
4376
  "type": "object",
@@ -10,12 +10,14 @@ import "google/protobuf/timestamp.proto";
10
10
  import "wechaty/puppet/url-link.proto";
11
11
  import "wechaty/puppet/channel.proto";
12
12
  import "wechaty/puppet/location.proto";
13
+ import "wechaty/puppet/mini-program.proto";
13
14
 
14
15
  enum PostType {
15
16
  POST_TYPE_UNSPECIFIED = 0;
16
17
  POST_TYPE_MOMENT = 1; // 朋友圈
17
18
  POST_TYPE_CHANNEL = 2; // 视频号——原始设计走post,实际目前采用message
18
19
  POST_TYPE_MESSAGE = 3; // 消息——富媒体消息
20
+ POST_TYPE_BROADCAST = 4; // 群发
19
21
  }
20
22
 
21
23
  enum SayableType {
@@ -38,6 +40,7 @@ message PostSayable {
38
40
  string file_box = 4; // FileBox.toJSON()
39
41
  UrlLinkPayload url_link = 5;
40
42
  ChannelPayload channel = 6;
43
+ MiniProgramPayload mini_program = 7;
41
44
 
42
45
  repeated string mention_id_list = 13; // 文本类型的sayable可传,朋友圈暂不支持
43
46
  }
@@ -1,6 +1,6 @@
1
1
  export const packageJson = {
2
2
  "name": "@juzi/wechaty-grpc",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
4
4
  "description": "gRPC for Wechaty",
5
5
  "type": "module",
6
6
  "exports": {
@@ -6,6 +6,7 @@ import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/t
6
6
  import * as wechaty_puppet_url_link_pb from "../../wechaty/puppet/url-link_pb";
7
7
  import * as wechaty_puppet_channel_pb from "../../wechaty/puppet/channel_pb";
8
8
  import * as wechaty_puppet_location_pb from "../../wechaty/puppet/location_pb";
9
+ import * as wechaty_puppet_mini_program_pb from "../../wechaty/puppet/mini-program_pb";
9
10
 
10
11
  export class PostSayable extends jspb.Message {
11
12
  getType(): SayableTypeMap[keyof SayableTypeMap];
@@ -30,6 +31,11 @@ export class PostSayable extends jspb.Message {
30
31
  getChannel(): wechaty_puppet_channel_pb.ChannelPayload | undefined;
31
32
  setChannel(value?: wechaty_puppet_channel_pb.ChannelPayload): void;
32
33
 
34
+ hasMiniProgram(): boolean;
35
+ clearMiniProgram(): void;
36
+ getMiniProgram(): wechaty_puppet_mini_program_pb.MiniProgramPayload | undefined;
37
+ setMiniProgram(value?: wechaty_puppet_mini_program_pb.MiniProgramPayload): void;
38
+
33
39
  clearMentionIdListList(): void;
34
40
  getMentionIdListList(): Array<string>;
35
41
  setMentionIdListList(value: Array<string>): void;
@@ -53,6 +59,7 @@ export namespace PostSayable {
53
59
  fileBox: string,
54
60
  urlLink?: wechaty_puppet_url_link_pb.UrlLinkPayload.AsObject,
55
61
  channel?: wechaty_puppet_channel_pb.ChannelPayload.AsObject,
62
+ miniProgram?: wechaty_puppet_mini_program_pb.MiniProgramPayload.AsObject,
56
63
  mentionIdListList: Array<string>,
57
64
  }
58
65
  }
@@ -332,6 +339,7 @@ export interface PostTypeMap {
332
339
  POST_TYPE_MOMENT: 1;
333
340
  POST_TYPE_CHANNEL: 2;
334
341
  POST_TYPE_MESSAGE: 3;
342
+ POST_TYPE_BROADCAST: 4;
335
343
  }
336
344
 
337
345
  export const PostType: PostTypeMap;
@@ -23,6 +23,8 @@ var wechaty_puppet_channel_pb = require('../../wechaty/puppet/channel_pb.js');
23
23
  goog.object.extend(proto, wechaty_puppet_channel_pb);
24
24
  var wechaty_puppet_location_pb = require('../../wechaty/puppet/location_pb.js');
25
25
  goog.object.extend(proto, wechaty_puppet_location_pb);
26
+ var wechaty_puppet_mini$program_pb = require('../../wechaty/puppet/mini-program_pb.js');
27
+ goog.object.extend(proto, wechaty_puppet_mini$program_pb);
26
28
  goog.exportSymbol('proto.wechaty.puppet.PostLikeResponse', null, global);
27
29
  goog.exportSymbol('proto.wechaty.puppet.PostPayloadClient', null, global);
28
30
  goog.exportSymbol('proto.wechaty.puppet.PostPayloadRequest', null, global);
@@ -291,6 +293,7 @@ proto.wechaty.puppet.PostSayable.toObject = function(includeInstance, msg) {
291
293
  fileBox: jspb.Message.getFieldWithDefault(msg, 4, ""),
292
294
  urlLink: (f = msg.getUrlLink()) && wechaty_puppet_url$link_pb.UrlLinkPayload.toObject(includeInstance, f),
293
295
  channel: (f = msg.getChannel()) && wechaty_puppet_channel_pb.ChannelPayload.toObject(includeInstance, f),
296
+ miniProgram: (f = msg.getMiniProgram()) && wechaty_puppet_mini$program_pb.MiniProgramPayload.toObject(includeInstance, f),
294
297
  mentionIdListList: (f = jspb.Message.getRepeatedField(msg, 13)) == null ? undefined : f
295
298
  };
296
299
 
@@ -354,6 +357,11 @@ proto.wechaty.puppet.PostSayable.deserializeBinaryFromReader = function(msg, rea
354
357
  reader.readMessage(value,wechaty_puppet_channel_pb.ChannelPayload.deserializeBinaryFromReader);
355
358
  msg.setChannel(value);
356
359
  break;
360
+ case 7:
361
+ var value = new wechaty_puppet_mini$program_pb.MiniProgramPayload;
362
+ reader.readMessage(value,wechaty_puppet_mini$program_pb.MiniProgramPayload.deserializeBinaryFromReader);
363
+ msg.setMiniProgram(value);
364
+ break;
357
365
  case 13:
358
366
  var value = /** @type {string} */ (reader.readString());
359
367
  msg.addMentionIdList(value);
@@ -431,6 +439,14 @@ proto.wechaty.puppet.PostSayable.serializeBinaryToWriter = function(message, wri
431
439
  wechaty_puppet_channel_pb.ChannelPayload.serializeBinaryToWriter
432
440
  );
433
441
  }
442
+ f = message.getMiniProgram();
443
+ if (f != null) {
444
+ writer.writeMessage(
445
+ 7,
446
+ f,
447
+ wechaty_puppet_mini$program_pb.MiniProgramPayload.serializeBinaryToWriter
448
+ );
449
+ }
434
450
  f = message.getMentionIdListList();
435
451
  if (f.length > 0) {
436
452
  writer.writeRepeatedString(
@@ -587,6 +603,43 @@ proto.wechaty.puppet.PostSayable.prototype.hasChannel = function() {
587
603
  };
588
604
 
589
605
 
606
+ /**
607
+ * optional MiniProgramPayload mini_program = 7;
608
+ * @return {?proto.wechaty.puppet.MiniProgramPayload}
609
+ */
610
+ proto.wechaty.puppet.PostSayable.prototype.getMiniProgram = function() {
611
+ return /** @type{?proto.wechaty.puppet.MiniProgramPayload} */ (
612
+ jspb.Message.getWrapperField(this, wechaty_puppet_mini$program_pb.MiniProgramPayload, 7));
613
+ };
614
+
615
+
616
+ /**
617
+ * @param {?proto.wechaty.puppet.MiniProgramPayload|undefined} value
618
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
619
+ */
620
+ proto.wechaty.puppet.PostSayable.prototype.setMiniProgram = function(value) {
621
+ return jspb.Message.setWrapperField(this, 7, value);
622
+ };
623
+
624
+
625
+ /**
626
+ * Clears the message field making it undefined.
627
+ * @return {!proto.wechaty.puppet.PostSayable} returns this
628
+ */
629
+ proto.wechaty.puppet.PostSayable.prototype.clearMiniProgram = function() {
630
+ return this.setMiniProgram(undefined);
631
+ };
632
+
633
+
634
+ /**
635
+ * Returns whether this field is set.
636
+ * @return {boolean}
637
+ */
638
+ proto.wechaty.puppet.PostSayable.prototype.hasMiniProgram = function() {
639
+ return jspb.Message.getField(this, 7) != null;
640
+ };
641
+
642
+
590
643
  /**
591
644
  * repeated string mention_id_list = 13;
592
645
  * @return {!Array<string>}
@@ -2544,7 +2597,8 @@ proto.wechaty.puppet.PostType = {
2544
2597
  POST_TYPE_UNSPECIFIED: 0,
2545
2598
  POST_TYPE_MOMENT: 1,
2546
2599
  POST_TYPE_CHANNEL: 2,
2547
- POST_TYPE_MESSAGE: 3
2600
+ POST_TYPE_MESSAGE: 3,
2601
+ POST_TYPE_BROADCAST: 4
2548
2602
  };
2549
2603
 
2550
2604
  /**
@@ -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.44
12
+ version: 1.0.46
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: 'https://github.com/wechaty/openapi'
@@ -3056,6 +3056,8 @@ definitions:
3056
3056
  $ref: '#/definitions/puppetUrlLinkPayload'
3057
3057
  channel:
3058
3058
  $ref: '#/definitions/puppetChannelPayload'
3059
+ miniProgram:
3060
+ $ref: '#/definitions/puppetMiniProgramPayload'
3059
3061
  mentionIdList:
3060
3062
  type: array
3061
3063
  items:
@@ -3083,11 +3085,13 @@ definitions:
3083
3085
  - POST_TYPE_MOMENT
3084
3086
  - POST_TYPE_CHANNEL
3085
3087
  - POST_TYPE_MESSAGE
3088
+ - POST_TYPE_BROADCAST
3086
3089
  default: POST_TYPE_UNSPECIFIED
3087
3090
  title: |-
3088
3091
  - POST_TYPE_MOMENT: 朋友圈
3089
3092
  - POST_TYPE_CHANNEL: 视频号——原始设计走post,实际目前采用message
3090
3093
  - POST_TYPE_MESSAGE: 消息——富媒体消息
3094
+ - POST_TYPE_BROADCAST: 群发
3091
3095
  puppetReferrer:
3092
3096
  type: object
3093
3097
  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.44",
6
+ "version": "1.0.46",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -4325,6 +4325,9 @@
4325
4325
  "channel": {
4326
4326
  "$ref": "#/definitions/puppetChannelPayload"
4327
4327
  },
4328
+ "miniProgram": {
4329
+ "$ref": "#/definitions/puppetMiniProgramPayload"
4330
+ },
4328
4331
  "mentionIdList": {
4329
4332
  "type": "array",
4330
4333
  "items": {
@@ -4363,10 +4366,11 @@
4363
4366
  "POST_TYPE_UNSPECIFIED",
4364
4367
  "POST_TYPE_MOMENT",
4365
4368
  "POST_TYPE_CHANNEL",
4366
- "POST_TYPE_MESSAGE"
4369
+ "POST_TYPE_MESSAGE",
4370
+ "POST_TYPE_BROADCAST"
4367
4371
  ],
4368
4372
  "default": "POST_TYPE_UNSPECIFIED",
4369
- "title": "- POST_TYPE_MOMENT: 朋友圈\n - POST_TYPE_CHANNEL: 视频号——原始设计走post,实际目前采用message\n - POST_TYPE_MESSAGE: 消息——富媒体消息"
4373
+ "title": "- POST_TYPE_MOMENT: 朋友圈\n - POST_TYPE_CHANNEL: 视频号——原始设计走post,实际目前采用message\n - POST_TYPE_MESSAGE: 消息——富媒体消息\n - POST_TYPE_BROADCAST: 群发"
4370
4374
  },
4371
4375
  "puppetReferrer": {
4372
4376
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juzi/wechaty-grpc",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
4
4
  "description": "gRPC for Wechaty",
5
5
  "type": "module",
6
6
  "exports": {
@@ -4,7 +4,7 @@
4
4
  import type { PackageJson } from 'type-fest'
5
5
  export const packageJson: PackageJson = {
6
6
  "name": "@juzi/wechaty-grpc",
7
- "version": "1.0.44",
7
+ "version": "1.0.46",
8
8
  "description": "gRPC for Wechaty",
9
9
  "type": "module",
10
10
  "exports": {