@juzi/wechaty-grpc 1.0.55 → 1.0.57

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 (39) hide show
  1. package/dist/cjs/commonjs/generated/puppet.cjs +1 -0
  2. package/dist/cjs/commonjs/generated/puppet.cjs.d.ts +1 -0
  3. package/dist/cjs/out/wechaty/puppet/room_pb.d.ts +10 -9
  4. package/dist/cjs/out/wechaty/puppet/room_pb.js +29 -27
  5. package/dist/cjs/out/wechaty/puppet/util_grpc_pb.js +1 -0
  6. package/dist/cjs/out/wechaty/puppet/util_pb.d.ts +13 -0
  7. package/dist/cjs/out/wechaty/puppet/util_pb.js +28 -0
  8. package/dist/cjs/out/wechaty/puppet/util_pb_service.d.ts +3 -0
  9. package/dist/cjs/out/wechaty/puppet/util_pb_service.js +3 -0
  10. package/dist/cjs/out/wechaty/puppet.openapi.yaml +26 -4
  11. package/dist/cjs/out/wechaty/puppet.swagger.json +31 -4
  12. package/dist/cjs/proto/wechaty/puppet/room.proto +5 -3
  13. package/dist/cjs/proto/wechaty/puppet/util.proto +12 -0
  14. package/dist/cjs/src/package-json.js +1 -1
  15. package/dist/esm/commonjs/generated/puppet.cjs +1 -0
  16. package/dist/esm/commonjs/generated/puppet.cjs.d.ts +1 -0
  17. package/dist/esm/out/wechaty/puppet/room_pb.d.ts +10 -9
  18. package/dist/esm/out/wechaty/puppet/room_pb.js +29 -27
  19. package/dist/esm/out/wechaty/puppet/util_grpc_pb.js +1 -0
  20. package/dist/esm/out/wechaty/puppet/util_pb.d.ts +13 -0
  21. package/dist/esm/out/wechaty/puppet/util_pb.js +28 -0
  22. package/dist/esm/out/wechaty/puppet/util_pb_service.d.ts +3 -0
  23. package/dist/esm/out/wechaty/puppet/util_pb_service.js +3 -0
  24. package/dist/esm/out/wechaty/puppet.openapi.yaml +26 -4
  25. package/dist/esm/out/wechaty/puppet.swagger.json +31 -4
  26. package/dist/esm/proto/wechaty/puppet/room.proto +5 -3
  27. package/dist/esm/proto/wechaty/puppet/util.proto +12 -0
  28. package/dist/esm/src/package-json.js +1 -1
  29. package/out/wechaty/puppet/room_pb.d.ts +10 -9
  30. package/out/wechaty/puppet/room_pb.js +29 -27
  31. package/out/wechaty/puppet/util_grpc_pb.js +1 -0
  32. package/out/wechaty/puppet/util_pb.d.ts +13 -0
  33. package/out/wechaty/puppet/util_pb.js +28 -0
  34. package/out/wechaty/puppet/util_pb_service.d.ts +3 -0
  35. package/out/wechaty/puppet/util_pb_service.js +3 -0
  36. package/out/wechaty/puppet.openapi.yaml +26 -4
  37. package/out/wechaty/puppet.swagger.json +31 -4
  38. package/package.json +1 -1
  39. package/src/package-json.ts +1 -1
@@ -17,6 +17,7 @@ const puppetFileList = [
17
17
  '../../out/wechaty/puppet/moment_pb.js',
18
18
  '../../out/wechaty/puppet/post_pb.js',
19
19
  '../../out/wechaty/puppet/conversation_pb.js',
20
+ '../../out/wechaty/puppet/util_pb.js',
20
21
 
21
22
  '../../out/wechaty/puppet_grpc_pb.js',
22
23
  '../../out/wechaty/puppet_pb.js',
@@ -39,6 +39,7 @@ export * from '../../out/wechaty/puppet/channel_pb.js'
39
39
  export * from '../../out/wechaty/puppet/moment_pb.js'
40
40
  export * from '../../out/wechaty/puppet/post_pb.js'
41
41
  export * from '../../out/wechaty/puppet/conversation_pb.js'
42
+ export * from '../../out/wechaty/puppet/util_pb.js'
42
43
 
43
44
  export * from '../../out/wechaty/puppet_grpc_pb.js'
44
45
  export * from '../../out/wechaty/puppet_pb.js'
@@ -3,6 +3,7 @@
3
3
 
4
4
  import * as jspb from "google-protobuf";
5
5
  import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb";
6
+ import * as wechaty_puppet_util_pb from "../../wechaty/puppet/util_pb";
6
7
 
7
8
  export class RoomListRequest extends jspb.Message {
8
9
  serializeBinary(): Uint8Array;
@@ -570,14 +571,14 @@ export class RoomPermissionRequest extends jspb.Message {
570
571
  getId(): string;
571
572
  setId(value: string): void;
572
573
 
573
- getSendMessage(): boolean;
574
- setSendMessage(value: boolean): void;
574
+ getSendMessage(): wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap];
575
+ setSendMessage(value: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap]): void;
575
576
 
576
- getInvitationCheck(): boolean;
577
- setInvitationCheck(value: boolean): void;
577
+ getInvitationCheck(): wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap];
578
+ setInvitationCheck(value: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap]): void;
578
579
 
579
- getRoomTopicEdit(): boolean;
580
- setRoomTopicEdit(value: boolean): void;
580
+ getRoomTopicEdit(): wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap];
581
+ setRoomTopicEdit(value: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap]): void;
581
582
 
582
583
  serializeBinary(): Uint8Array;
583
584
  toObject(includeInstance?: boolean): RoomPermissionRequest.AsObject;
@@ -592,9 +593,9 @@ export class RoomPermissionRequest extends jspb.Message {
592
593
  export namespace RoomPermissionRequest {
593
594
  export type AsObject = {
594
595
  id: string,
595
- sendMessage: boolean,
596
- invitationCheck: boolean,
597
- roomTopicEdit: boolean,
596
+ sendMessage: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap],
597
+ invitationCheck: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap],
598
+ roomTopicEdit: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap],
598
599
  }
599
600
  }
600
601
 
@@ -17,6 +17,8 @@ var global = (function() { return this || window || global || self || Function('
17
17
 
18
18
  var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js');
19
19
  goog.object.extend(proto, google_protobuf_wrappers_pb);
20
+ var wechaty_puppet_util_pb = require('../../wechaty/puppet/util_pb.js');
21
+ goog.object.extend(proto, wechaty_puppet_util_pb);
20
22
  goog.exportSymbol('proto.wechaty.puppet.RoomAddRequest', null, global);
21
23
  goog.exportSymbol('proto.wechaty.puppet.RoomAddResponse', null, global);
22
24
  goog.exportSymbol('proto.wechaty.puppet.RoomAnnounceRequest', null, global);
@@ -4441,9 +4443,9 @@ proto.wechaty.puppet.RoomPermissionRequest.prototype.toObject = function(opt_inc
4441
4443
  proto.wechaty.puppet.RoomPermissionRequest.toObject = function(includeInstance, msg) {
4442
4444
  var f, obj = {
4443
4445
  id: jspb.Message.getFieldWithDefault(msg, 1, ""),
4444
- sendMessage: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
4445
- invitationCheck: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
4446
- roomTopicEdit: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
4446
+ sendMessage: jspb.Message.getFieldWithDefault(msg, 2, 0),
4447
+ invitationCheck: jspb.Message.getFieldWithDefault(msg, 3, 0),
4448
+ roomTopicEdit: jspb.Message.getFieldWithDefault(msg, 4, 0)
4447
4449
  };
4448
4450
 
4449
4451
  if (includeInstance) {
@@ -4485,15 +4487,15 @@ proto.wechaty.puppet.RoomPermissionRequest.deserializeBinaryFromReader = functio
4485
4487
  msg.setId(value);
4486
4488
  break;
4487
4489
  case 2:
4488
- var value = /** @type {boolean} */ (reader.readBool());
4490
+ var value = /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (reader.readEnum());
4489
4491
  msg.setSendMessage(value);
4490
4492
  break;
4491
4493
  case 3:
4492
- var value = /** @type {boolean} */ (reader.readBool());
4494
+ var value = /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (reader.readEnum());
4493
4495
  msg.setInvitationCheck(value);
4494
4496
  break;
4495
4497
  case 4:
4496
- var value = /** @type {boolean} */ (reader.readBool());
4498
+ var value = /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (reader.readEnum());
4497
4499
  msg.setRoomTopicEdit(value);
4498
4500
  break;
4499
4501
  default:
@@ -4533,22 +4535,22 @@ proto.wechaty.puppet.RoomPermissionRequest.serializeBinaryToWriter = function(me
4533
4535
  );
4534
4536
  }
4535
4537
  f = message.getSendMessage();
4536
- if (f) {
4537
- writer.writeBool(
4538
+ if (f !== 0.0) {
4539
+ writer.writeEnum(
4538
4540
  2,
4539
4541
  f
4540
4542
  );
4541
4543
  }
4542
4544
  f = message.getInvitationCheck();
4543
- if (f) {
4544
- writer.writeBool(
4545
+ if (f !== 0.0) {
4546
+ writer.writeEnum(
4545
4547
  3,
4546
4548
  f
4547
4549
  );
4548
4550
  }
4549
4551
  f = message.getRoomTopicEdit();
4550
- if (f) {
4551
- writer.writeBool(
4552
+ if (f !== 0.0) {
4553
+ writer.writeEnum(
4552
4554
  4,
4553
4555
  f
4554
4556
  );
@@ -4575,56 +4577,56 @@ proto.wechaty.puppet.RoomPermissionRequest.prototype.setId = function(value) {
4575
4577
 
4576
4578
 
4577
4579
  /**
4578
- * optional bool send_message = 2;
4579
- * @return {boolean}
4580
+ * optional OptionalBoolean send_message = 2;
4581
+ * @return {!proto.wechaty.puppet.OptionalBoolean}
4580
4582
  */
4581
4583
  proto.wechaty.puppet.RoomPermissionRequest.prototype.getSendMessage = function() {
4582
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
4584
+ return /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
4583
4585
  };
4584
4586
 
4585
4587
 
4586
4588
  /**
4587
- * @param {boolean} value
4589
+ * @param {!proto.wechaty.puppet.OptionalBoolean} value
4588
4590
  * @return {!proto.wechaty.puppet.RoomPermissionRequest} returns this
4589
4591
  */
4590
4592
  proto.wechaty.puppet.RoomPermissionRequest.prototype.setSendMessage = function(value) {
4591
- return jspb.Message.setProto3BooleanField(this, 2, value);
4593
+ return jspb.Message.setProto3EnumField(this, 2, value);
4592
4594
  };
4593
4595
 
4594
4596
 
4595
4597
  /**
4596
- * optional bool invitation_check = 3;
4597
- * @return {boolean}
4598
+ * optional OptionalBoolean invitation_check = 3;
4599
+ * @return {!proto.wechaty.puppet.OptionalBoolean}
4598
4600
  */
4599
4601
  proto.wechaty.puppet.RoomPermissionRequest.prototype.getInvitationCheck = function() {
4600
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
4602
+ return /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
4601
4603
  };
4602
4604
 
4603
4605
 
4604
4606
  /**
4605
- * @param {boolean} value
4607
+ * @param {!proto.wechaty.puppet.OptionalBoolean} value
4606
4608
  * @return {!proto.wechaty.puppet.RoomPermissionRequest} returns this
4607
4609
  */
4608
4610
  proto.wechaty.puppet.RoomPermissionRequest.prototype.setInvitationCheck = function(value) {
4609
- return jspb.Message.setProto3BooleanField(this, 3, value);
4611
+ return jspb.Message.setProto3EnumField(this, 3, value);
4610
4612
  };
4611
4613
 
4612
4614
 
4613
4615
  /**
4614
- * optional bool room_topic_edit = 4;
4615
- * @return {boolean}
4616
+ * optional OptionalBoolean room_topic_edit = 4;
4617
+ * @return {!proto.wechaty.puppet.OptionalBoolean}
4616
4618
  */
4617
4619
  proto.wechaty.puppet.RoomPermissionRequest.prototype.getRoomTopicEdit = function() {
4618
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
4620
+ return /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
4619
4621
  };
4620
4622
 
4621
4623
 
4622
4624
  /**
4623
- * @param {boolean} value
4625
+ * @param {!proto.wechaty.puppet.OptionalBoolean} value
4624
4626
  * @return {!proto.wechaty.puppet.RoomPermissionRequest} returns this
4625
4627
  */
4626
4628
  proto.wechaty.puppet.RoomPermissionRequest.prototype.setRoomTopicEdit = function(value) {
4627
- return jspb.Message.setProto3BooleanField(this, 4, value);
4629
+ return jspb.Message.setProto3EnumField(this, 4, value);
4628
4630
  };
4629
4631
 
4630
4632
 
@@ -0,0 +1 @@
1
+ // GENERATED CODE -- NO SERVICES IN PROTO
@@ -0,0 +1,13 @@
1
+ // package: wechaty.puppet
2
+ // file: wechaty/puppet/util.proto
3
+
4
+ import * as jspb from "google-protobuf";
5
+
6
+ export interface OptionalBooleanMap {
7
+ BOOL_UNSET: 0;
8
+ BOOL_FALSE: 1;
9
+ BOOL_TRUE: 2;
10
+ }
11
+
12
+ export const OptionalBoolean: OptionalBooleanMap;
13
+
@@ -0,0 +1,28 @@
1
+ // source: wechaty/puppet/util.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
17
+
18
+ goog.exportSymbol('proto.wechaty.puppet.OptionalBoolean', null, global);
19
+ /**
20
+ * @enum {number}
21
+ */
22
+ proto.wechaty.puppet.OptionalBoolean = {
23
+ BOOL_UNSET: 0,
24
+ BOOL_FALSE: 1,
25
+ BOOL_TRUE: 2
26
+ };
27
+
28
+ goog.object.extend(exports, proto.wechaty.puppet);
@@ -0,0 +1,3 @@
1
+ // package: wechaty.puppet
2
+ // file: wechaty/puppet/util.proto
3
+
@@ -0,0 +1,3 @@
1
+ // package: wechaty.puppet
2
+ // file: wechaty/puppet/util.proto
3
+
@@ -9,7 +9,7 @@ info:
9
9
 
10
10
  Wechaty Puppet Service is the RESTful API for Wechaty API, which is build on
11
11
  top of the Wechaty Puppet Abstraction and the gRPC proto definition.
12
- version: 1.0.55
12
+ version: 1.0.57
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: 'https://github.com/wechaty/openapi'
@@ -1794,15 +1794,30 @@ paths:
1794
1794
  - name: sendMessage
1795
1795
  in: query
1796
1796
  required: false
1797
- type: boolean
1797
+ type: string
1798
+ enum:
1799
+ - BOOL_UNSET
1800
+ - BOOL_FALSE
1801
+ - BOOL_TRUE
1802
+ default: BOOL_UNSET
1798
1803
  - name: invitationCheck
1799
1804
  in: query
1800
1805
  required: false
1801
- type: boolean
1806
+ type: string
1807
+ enum:
1808
+ - BOOL_UNSET
1809
+ - BOOL_FALSE
1810
+ - BOOL_TRUE
1811
+ default: BOOL_UNSET
1802
1812
  - name: roomTopicEdit
1803
1813
  in: query
1804
1814
  required: false
1805
- type: boolean
1815
+ type: string
1816
+ enum:
1817
+ - BOOL_UNSET
1818
+ - BOOL_FALSE
1819
+ - BOOL_TRUE
1820
+ default: BOOL_UNSET
1806
1821
  tags:
1807
1822
  - Puppet
1808
1823
  '/rooms/{id}/qrcode':
@@ -3090,6 +3105,13 @@ definitions:
3090
3105
  type: array
3091
3106
  items:
3092
3107
  type: string
3108
+ puppetOptionalBoolean:
3109
+ type: string
3110
+ enum:
3111
+ - BOOL_UNSET
3112
+ - BOOL_FALSE
3113
+ - BOOL_TRUE
3114
+ default: BOOL_UNSET
3093
3115
  puppetPayloadType:
3094
3116
  type: string
3095
3117
  enum:
@@ -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.55",
6
+ "version": "1.0.57",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -2659,19 +2659,37 @@
2659
2659
  "name": "sendMessage",
2660
2660
  "in": "query",
2661
2661
  "required": false,
2662
- "type": "boolean"
2662
+ "type": "string",
2663
+ "enum": [
2664
+ "BOOL_UNSET",
2665
+ "BOOL_FALSE",
2666
+ "BOOL_TRUE"
2667
+ ],
2668
+ "default": "BOOL_UNSET"
2663
2669
  },
2664
2670
  {
2665
2671
  "name": "invitationCheck",
2666
2672
  "in": "query",
2667
2673
  "required": false,
2668
- "type": "boolean"
2674
+ "type": "string",
2675
+ "enum": [
2676
+ "BOOL_UNSET",
2677
+ "BOOL_FALSE",
2678
+ "BOOL_TRUE"
2679
+ ],
2680
+ "default": "BOOL_UNSET"
2669
2681
  },
2670
2682
  {
2671
2683
  "name": "roomTopicEdit",
2672
2684
  "in": "query",
2673
2685
  "required": false,
2674
- "type": "boolean"
2686
+ "type": "string",
2687
+ "enum": [
2688
+ "BOOL_UNSET",
2689
+ "BOOL_FALSE",
2690
+ "BOOL_TRUE"
2691
+ ],
2692
+ "default": "BOOL_UNSET"
2675
2693
  }
2676
2694
  ],
2677
2695
  "tags": [
@@ -4381,6 +4399,15 @@
4381
4399
  }
4382
4400
  }
4383
4401
  },
4402
+ "puppetOptionalBoolean": {
4403
+ "type": "string",
4404
+ "enum": [
4405
+ "BOOL_UNSET",
4406
+ "BOOL_FALSE",
4407
+ "BOOL_TRUE"
4408
+ ],
4409
+ "default": "BOOL_UNSET"
4410
+ },
4384
4411
  "puppetPayloadType": {
4385
4412
  "type": "string",
4386
4413
  "enum": [
@@ -7,6 +7,8 @@ option csharp_namespace = "github.wechaty.grpc.puppet";
7
7
 
8
8
  import "google/protobuf/wrappers.proto";
9
9
 
10
+ import "wechaty/puppet/util.proto";
11
+
10
12
  message RoomListRequest {}
11
13
  message RoomListResponse {
12
14
  repeated string ids = 1;
@@ -104,9 +106,9 @@ message RoomOwnerTransferResponse {}
104
106
 
105
107
  message RoomPermissionRequest {
106
108
  string id = 1;
107
- bool send_message = 2;
108
- bool invitation_check = 3;
109
- bool room_topic_edit = 4;
109
+ OptionalBoolean send_message = 2;
110
+ OptionalBoolean invitation_check = 3;
111
+ OptionalBoolean room_topic_edit = 4;
110
112
  }
111
113
 
112
114
  message RoomPermissionResponse {
@@ -0,0 +1,12 @@
1
+ syntax = "proto3";
2
+ package wechaty.puppet;
3
+
4
+ option go_package = "github.com/wechaty/go-grpc/wechaty/puppet";
5
+ option java_package = "io.github.wechaty.grpc.puppet";
6
+ option csharp_namespace = "github.wechaty.grpc.puppet";
7
+
8
+ enum OptionalBoolean {
9
+ BOOL_UNSET = 0;
10
+ BOOL_FALSE = 1;
11
+ BOOL_TRUE = 2;
12
+ }
@@ -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.55",
6
+ "version": "1.0.57",
7
7
  "description": "gRPC for Wechaty",
8
8
  "type": "module",
9
9
  "exports": {
@@ -17,6 +17,7 @@ const puppetFileList = [
17
17
  '../../out/wechaty/puppet/moment_pb.js',
18
18
  '../../out/wechaty/puppet/post_pb.js',
19
19
  '../../out/wechaty/puppet/conversation_pb.js',
20
+ '../../out/wechaty/puppet/util_pb.js',
20
21
 
21
22
  '../../out/wechaty/puppet_grpc_pb.js',
22
23
  '../../out/wechaty/puppet_pb.js',
@@ -39,6 +39,7 @@ export * from '../../out/wechaty/puppet/channel_pb.js'
39
39
  export * from '../../out/wechaty/puppet/moment_pb.js'
40
40
  export * from '../../out/wechaty/puppet/post_pb.js'
41
41
  export * from '../../out/wechaty/puppet/conversation_pb.js'
42
+ export * from '../../out/wechaty/puppet/util_pb.js'
42
43
 
43
44
  export * from '../../out/wechaty/puppet_grpc_pb.js'
44
45
  export * from '../../out/wechaty/puppet_pb.js'
@@ -3,6 +3,7 @@
3
3
 
4
4
  import * as jspb from "google-protobuf";
5
5
  import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb";
6
+ import * as wechaty_puppet_util_pb from "../../wechaty/puppet/util_pb";
6
7
 
7
8
  export class RoomListRequest extends jspb.Message {
8
9
  serializeBinary(): Uint8Array;
@@ -570,14 +571,14 @@ export class RoomPermissionRequest extends jspb.Message {
570
571
  getId(): string;
571
572
  setId(value: string): void;
572
573
 
573
- getSendMessage(): boolean;
574
- setSendMessage(value: boolean): void;
574
+ getSendMessage(): wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap];
575
+ setSendMessage(value: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap]): void;
575
576
 
576
- getInvitationCheck(): boolean;
577
- setInvitationCheck(value: boolean): void;
577
+ getInvitationCheck(): wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap];
578
+ setInvitationCheck(value: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap]): void;
578
579
 
579
- getRoomTopicEdit(): boolean;
580
- setRoomTopicEdit(value: boolean): void;
580
+ getRoomTopicEdit(): wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap];
581
+ setRoomTopicEdit(value: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap]): void;
581
582
 
582
583
  serializeBinary(): Uint8Array;
583
584
  toObject(includeInstance?: boolean): RoomPermissionRequest.AsObject;
@@ -592,9 +593,9 @@ export class RoomPermissionRequest extends jspb.Message {
592
593
  export namespace RoomPermissionRequest {
593
594
  export type AsObject = {
594
595
  id: string,
595
- sendMessage: boolean,
596
- invitationCheck: boolean,
597
- roomTopicEdit: boolean,
596
+ sendMessage: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap],
597
+ invitationCheck: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap],
598
+ roomTopicEdit: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap],
598
599
  }
599
600
  }
600
601
 
@@ -17,6 +17,8 @@ var global = (function() { return this || window || global || self || Function('
17
17
 
18
18
  var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js');
19
19
  goog.object.extend(proto, google_protobuf_wrappers_pb);
20
+ var wechaty_puppet_util_pb = require('../../wechaty/puppet/util_pb.js');
21
+ goog.object.extend(proto, wechaty_puppet_util_pb);
20
22
  goog.exportSymbol('proto.wechaty.puppet.RoomAddRequest', null, global);
21
23
  goog.exportSymbol('proto.wechaty.puppet.RoomAddResponse', null, global);
22
24
  goog.exportSymbol('proto.wechaty.puppet.RoomAnnounceRequest', null, global);
@@ -4441,9 +4443,9 @@ proto.wechaty.puppet.RoomPermissionRequest.prototype.toObject = function(opt_inc
4441
4443
  proto.wechaty.puppet.RoomPermissionRequest.toObject = function(includeInstance, msg) {
4442
4444
  var f, obj = {
4443
4445
  id: jspb.Message.getFieldWithDefault(msg, 1, ""),
4444
- sendMessage: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
4445
- invitationCheck: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
4446
- roomTopicEdit: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
4446
+ sendMessage: jspb.Message.getFieldWithDefault(msg, 2, 0),
4447
+ invitationCheck: jspb.Message.getFieldWithDefault(msg, 3, 0),
4448
+ roomTopicEdit: jspb.Message.getFieldWithDefault(msg, 4, 0)
4447
4449
  };
4448
4450
 
4449
4451
  if (includeInstance) {
@@ -4485,15 +4487,15 @@ proto.wechaty.puppet.RoomPermissionRequest.deserializeBinaryFromReader = functio
4485
4487
  msg.setId(value);
4486
4488
  break;
4487
4489
  case 2:
4488
- var value = /** @type {boolean} */ (reader.readBool());
4490
+ var value = /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (reader.readEnum());
4489
4491
  msg.setSendMessage(value);
4490
4492
  break;
4491
4493
  case 3:
4492
- var value = /** @type {boolean} */ (reader.readBool());
4494
+ var value = /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (reader.readEnum());
4493
4495
  msg.setInvitationCheck(value);
4494
4496
  break;
4495
4497
  case 4:
4496
- var value = /** @type {boolean} */ (reader.readBool());
4498
+ var value = /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (reader.readEnum());
4497
4499
  msg.setRoomTopicEdit(value);
4498
4500
  break;
4499
4501
  default:
@@ -4533,22 +4535,22 @@ proto.wechaty.puppet.RoomPermissionRequest.serializeBinaryToWriter = function(me
4533
4535
  );
4534
4536
  }
4535
4537
  f = message.getSendMessage();
4536
- if (f) {
4537
- writer.writeBool(
4538
+ if (f !== 0.0) {
4539
+ writer.writeEnum(
4538
4540
  2,
4539
4541
  f
4540
4542
  );
4541
4543
  }
4542
4544
  f = message.getInvitationCheck();
4543
- if (f) {
4544
- writer.writeBool(
4545
+ if (f !== 0.0) {
4546
+ writer.writeEnum(
4545
4547
  3,
4546
4548
  f
4547
4549
  );
4548
4550
  }
4549
4551
  f = message.getRoomTopicEdit();
4550
- if (f) {
4551
- writer.writeBool(
4552
+ if (f !== 0.0) {
4553
+ writer.writeEnum(
4552
4554
  4,
4553
4555
  f
4554
4556
  );
@@ -4575,56 +4577,56 @@ proto.wechaty.puppet.RoomPermissionRequest.prototype.setId = function(value) {
4575
4577
 
4576
4578
 
4577
4579
  /**
4578
- * optional bool send_message = 2;
4579
- * @return {boolean}
4580
+ * optional OptionalBoolean send_message = 2;
4581
+ * @return {!proto.wechaty.puppet.OptionalBoolean}
4580
4582
  */
4581
4583
  proto.wechaty.puppet.RoomPermissionRequest.prototype.getSendMessage = function() {
4582
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
4584
+ return /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
4583
4585
  };
4584
4586
 
4585
4587
 
4586
4588
  /**
4587
- * @param {boolean} value
4589
+ * @param {!proto.wechaty.puppet.OptionalBoolean} value
4588
4590
  * @return {!proto.wechaty.puppet.RoomPermissionRequest} returns this
4589
4591
  */
4590
4592
  proto.wechaty.puppet.RoomPermissionRequest.prototype.setSendMessage = function(value) {
4591
- return jspb.Message.setProto3BooleanField(this, 2, value);
4593
+ return jspb.Message.setProto3EnumField(this, 2, value);
4592
4594
  };
4593
4595
 
4594
4596
 
4595
4597
  /**
4596
- * optional bool invitation_check = 3;
4597
- * @return {boolean}
4598
+ * optional OptionalBoolean invitation_check = 3;
4599
+ * @return {!proto.wechaty.puppet.OptionalBoolean}
4598
4600
  */
4599
4601
  proto.wechaty.puppet.RoomPermissionRequest.prototype.getInvitationCheck = function() {
4600
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
4602
+ return /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
4601
4603
  };
4602
4604
 
4603
4605
 
4604
4606
  /**
4605
- * @param {boolean} value
4607
+ * @param {!proto.wechaty.puppet.OptionalBoolean} value
4606
4608
  * @return {!proto.wechaty.puppet.RoomPermissionRequest} returns this
4607
4609
  */
4608
4610
  proto.wechaty.puppet.RoomPermissionRequest.prototype.setInvitationCheck = function(value) {
4609
- return jspb.Message.setProto3BooleanField(this, 3, value);
4611
+ return jspb.Message.setProto3EnumField(this, 3, value);
4610
4612
  };
4611
4613
 
4612
4614
 
4613
4615
  /**
4614
- * optional bool room_topic_edit = 4;
4615
- * @return {boolean}
4616
+ * optional OptionalBoolean room_topic_edit = 4;
4617
+ * @return {!proto.wechaty.puppet.OptionalBoolean}
4616
4618
  */
4617
4619
  proto.wechaty.puppet.RoomPermissionRequest.prototype.getRoomTopicEdit = function() {
4618
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
4620
+ return /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
4619
4621
  };
4620
4622
 
4621
4623
 
4622
4624
  /**
4623
- * @param {boolean} value
4625
+ * @param {!proto.wechaty.puppet.OptionalBoolean} value
4624
4626
  * @return {!proto.wechaty.puppet.RoomPermissionRequest} returns this
4625
4627
  */
4626
4628
  proto.wechaty.puppet.RoomPermissionRequest.prototype.setRoomTopicEdit = function(value) {
4627
- return jspb.Message.setProto3BooleanField(this, 4, value);
4629
+ return jspb.Message.setProto3EnumField(this, 4, value);
4628
4630
  };
4629
4631
 
4630
4632
 
@@ -0,0 +1 @@
1
+ // GENERATED CODE -- NO SERVICES IN PROTO
@@ -0,0 +1,13 @@
1
+ // package: wechaty.puppet
2
+ // file: wechaty/puppet/util.proto
3
+
4
+ import * as jspb from "google-protobuf";
5
+
6
+ export interface OptionalBooleanMap {
7
+ BOOL_UNSET: 0;
8
+ BOOL_FALSE: 1;
9
+ BOOL_TRUE: 2;
10
+ }
11
+
12
+ export const OptionalBoolean: OptionalBooleanMap;
13
+
@@ -0,0 +1,28 @@
1
+ // source: wechaty/puppet/util.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
17
+
18
+ goog.exportSymbol('proto.wechaty.puppet.OptionalBoolean', null, global);
19
+ /**
20
+ * @enum {number}
21
+ */
22
+ proto.wechaty.puppet.OptionalBoolean = {
23
+ BOOL_UNSET: 0,
24
+ BOOL_FALSE: 1,
25
+ BOOL_TRUE: 2
26
+ };
27
+
28
+ goog.object.extend(exports, proto.wechaty.puppet);
@@ -0,0 +1,3 @@
1
+ // package: wechaty.puppet
2
+ // file: wechaty/puppet/util.proto
3
+
@@ -0,0 +1,3 @@
1
+ // package: wechaty.puppet
2
+ // file: wechaty/puppet/util.proto
3
+
@@ -9,7 +9,7 @@ info:
9
9
 
10
10
  Wechaty Puppet Service is the RESTful API for Wechaty API, which is build on
11
11
  top of the Wechaty Puppet Abstraction and the gRPC proto definition.
12
- version: 1.0.55
12
+ version: 1.0.57
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: 'https://github.com/wechaty/openapi'
@@ -1794,15 +1794,30 @@ paths:
1794
1794
  - name: sendMessage
1795
1795
  in: query
1796
1796
  required: false
1797
- type: boolean
1797
+ type: string
1798
+ enum:
1799
+ - BOOL_UNSET
1800
+ - BOOL_FALSE
1801
+ - BOOL_TRUE
1802
+ default: BOOL_UNSET
1798
1803
  - name: invitationCheck
1799
1804
  in: query
1800
1805
  required: false
1801
- type: boolean
1806
+ type: string
1807
+ enum:
1808
+ - BOOL_UNSET
1809
+ - BOOL_FALSE
1810
+ - BOOL_TRUE
1811
+ default: BOOL_UNSET
1802
1812
  - name: roomTopicEdit
1803
1813
  in: query
1804
1814
  required: false
1805
- type: boolean
1815
+ type: string
1816
+ enum:
1817
+ - BOOL_UNSET
1818
+ - BOOL_FALSE
1819
+ - BOOL_TRUE
1820
+ default: BOOL_UNSET
1806
1821
  tags:
1807
1822
  - Puppet
1808
1823
  '/rooms/{id}/qrcode':
@@ -3090,6 +3105,13 @@ definitions:
3090
3105
  type: array
3091
3106
  items:
3092
3107
  type: string
3108
+ puppetOptionalBoolean:
3109
+ type: string
3110
+ enum:
3111
+ - BOOL_UNSET
3112
+ - BOOL_FALSE
3113
+ - BOOL_TRUE
3114
+ default: BOOL_UNSET
3093
3115
  puppetPayloadType:
3094
3116
  type: string
3095
3117
  enum:
@@ -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.55",
6
+ "version": "1.0.57",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -2659,19 +2659,37 @@
2659
2659
  "name": "sendMessage",
2660
2660
  "in": "query",
2661
2661
  "required": false,
2662
- "type": "boolean"
2662
+ "type": "string",
2663
+ "enum": [
2664
+ "BOOL_UNSET",
2665
+ "BOOL_FALSE",
2666
+ "BOOL_TRUE"
2667
+ ],
2668
+ "default": "BOOL_UNSET"
2663
2669
  },
2664
2670
  {
2665
2671
  "name": "invitationCheck",
2666
2672
  "in": "query",
2667
2673
  "required": false,
2668
- "type": "boolean"
2674
+ "type": "string",
2675
+ "enum": [
2676
+ "BOOL_UNSET",
2677
+ "BOOL_FALSE",
2678
+ "BOOL_TRUE"
2679
+ ],
2680
+ "default": "BOOL_UNSET"
2669
2681
  },
2670
2682
  {
2671
2683
  "name": "roomTopicEdit",
2672
2684
  "in": "query",
2673
2685
  "required": false,
2674
- "type": "boolean"
2686
+ "type": "string",
2687
+ "enum": [
2688
+ "BOOL_UNSET",
2689
+ "BOOL_FALSE",
2690
+ "BOOL_TRUE"
2691
+ ],
2692
+ "default": "BOOL_UNSET"
2675
2693
  }
2676
2694
  ],
2677
2695
  "tags": [
@@ -4381,6 +4399,15 @@
4381
4399
  }
4382
4400
  }
4383
4401
  },
4402
+ "puppetOptionalBoolean": {
4403
+ "type": "string",
4404
+ "enum": [
4405
+ "BOOL_UNSET",
4406
+ "BOOL_FALSE",
4407
+ "BOOL_TRUE"
4408
+ ],
4409
+ "default": "BOOL_UNSET"
4410
+ },
4384
4411
  "puppetPayloadType": {
4385
4412
  "type": "string",
4386
4413
  "enum": [
@@ -7,6 +7,8 @@ option csharp_namespace = "github.wechaty.grpc.puppet";
7
7
 
8
8
  import "google/protobuf/wrappers.proto";
9
9
 
10
+ import "wechaty/puppet/util.proto";
11
+
10
12
  message RoomListRequest {}
11
13
  message RoomListResponse {
12
14
  repeated string ids = 1;
@@ -104,9 +106,9 @@ message RoomOwnerTransferResponse {}
104
106
 
105
107
  message RoomPermissionRequest {
106
108
  string id = 1;
107
- bool send_message = 2;
108
- bool invitation_check = 3;
109
- bool room_topic_edit = 4;
109
+ OptionalBoolean send_message = 2;
110
+ OptionalBoolean invitation_check = 3;
111
+ OptionalBoolean room_topic_edit = 4;
110
112
  }
111
113
 
112
114
  message RoomPermissionResponse {
@@ -0,0 +1,12 @@
1
+ syntax = "proto3";
2
+ package wechaty.puppet;
3
+
4
+ option go_package = "github.com/wechaty/go-grpc/wechaty/puppet";
5
+ option java_package = "io.github.wechaty.grpc.puppet";
6
+ option csharp_namespace = "github.wechaty.grpc.puppet";
7
+
8
+ enum OptionalBoolean {
9
+ BOOL_UNSET = 0;
10
+ BOOL_FALSE = 1;
11
+ BOOL_TRUE = 2;
12
+ }
@@ -1,6 +1,6 @@
1
1
  export const packageJson = {
2
2
  "name": "@juzi/wechaty-grpc",
3
- "version": "1.0.55",
3
+ "version": "1.0.57",
4
4
  "description": "gRPC for Wechaty",
5
5
  "type": "module",
6
6
  "exports": {
@@ -3,6 +3,7 @@
3
3
 
4
4
  import * as jspb from "google-protobuf";
5
5
  import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb";
6
+ import * as wechaty_puppet_util_pb from "../../wechaty/puppet/util_pb";
6
7
 
7
8
  export class RoomListRequest extends jspb.Message {
8
9
  serializeBinary(): Uint8Array;
@@ -570,14 +571,14 @@ export class RoomPermissionRequest extends jspb.Message {
570
571
  getId(): string;
571
572
  setId(value: string): void;
572
573
 
573
- getSendMessage(): boolean;
574
- setSendMessage(value: boolean): void;
574
+ getSendMessage(): wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap];
575
+ setSendMessage(value: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap]): void;
575
576
 
576
- getInvitationCheck(): boolean;
577
- setInvitationCheck(value: boolean): void;
577
+ getInvitationCheck(): wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap];
578
+ setInvitationCheck(value: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap]): void;
578
579
 
579
- getRoomTopicEdit(): boolean;
580
- setRoomTopicEdit(value: boolean): void;
580
+ getRoomTopicEdit(): wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap];
581
+ setRoomTopicEdit(value: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap]): void;
581
582
 
582
583
  serializeBinary(): Uint8Array;
583
584
  toObject(includeInstance?: boolean): RoomPermissionRequest.AsObject;
@@ -592,9 +593,9 @@ export class RoomPermissionRequest extends jspb.Message {
592
593
  export namespace RoomPermissionRequest {
593
594
  export type AsObject = {
594
595
  id: string,
595
- sendMessage: boolean,
596
- invitationCheck: boolean,
597
- roomTopicEdit: boolean,
596
+ sendMessage: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap],
597
+ invitationCheck: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap],
598
+ roomTopicEdit: wechaty_puppet_util_pb.OptionalBooleanMap[keyof wechaty_puppet_util_pb.OptionalBooleanMap],
598
599
  }
599
600
  }
600
601
 
@@ -17,6 +17,8 @@ var global = (function() { return this || window || global || self || Function('
17
17
 
18
18
  var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js');
19
19
  goog.object.extend(proto, google_protobuf_wrappers_pb);
20
+ var wechaty_puppet_util_pb = require('../../wechaty/puppet/util_pb.js');
21
+ goog.object.extend(proto, wechaty_puppet_util_pb);
20
22
  goog.exportSymbol('proto.wechaty.puppet.RoomAddRequest', null, global);
21
23
  goog.exportSymbol('proto.wechaty.puppet.RoomAddResponse', null, global);
22
24
  goog.exportSymbol('proto.wechaty.puppet.RoomAnnounceRequest', null, global);
@@ -4441,9 +4443,9 @@ proto.wechaty.puppet.RoomPermissionRequest.prototype.toObject = function(opt_inc
4441
4443
  proto.wechaty.puppet.RoomPermissionRequest.toObject = function(includeInstance, msg) {
4442
4444
  var f, obj = {
4443
4445
  id: jspb.Message.getFieldWithDefault(msg, 1, ""),
4444
- sendMessage: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
4445
- invitationCheck: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
4446
- roomTopicEdit: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
4446
+ sendMessage: jspb.Message.getFieldWithDefault(msg, 2, 0),
4447
+ invitationCheck: jspb.Message.getFieldWithDefault(msg, 3, 0),
4448
+ roomTopicEdit: jspb.Message.getFieldWithDefault(msg, 4, 0)
4447
4449
  };
4448
4450
 
4449
4451
  if (includeInstance) {
@@ -4485,15 +4487,15 @@ proto.wechaty.puppet.RoomPermissionRequest.deserializeBinaryFromReader = functio
4485
4487
  msg.setId(value);
4486
4488
  break;
4487
4489
  case 2:
4488
- var value = /** @type {boolean} */ (reader.readBool());
4490
+ var value = /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (reader.readEnum());
4489
4491
  msg.setSendMessage(value);
4490
4492
  break;
4491
4493
  case 3:
4492
- var value = /** @type {boolean} */ (reader.readBool());
4494
+ var value = /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (reader.readEnum());
4493
4495
  msg.setInvitationCheck(value);
4494
4496
  break;
4495
4497
  case 4:
4496
- var value = /** @type {boolean} */ (reader.readBool());
4498
+ var value = /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (reader.readEnum());
4497
4499
  msg.setRoomTopicEdit(value);
4498
4500
  break;
4499
4501
  default:
@@ -4533,22 +4535,22 @@ proto.wechaty.puppet.RoomPermissionRequest.serializeBinaryToWriter = function(me
4533
4535
  );
4534
4536
  }
4535
4537
  f = message.getSendMessage();
4536
- if (f) {
4537
- writer.writeBool(
4538
+ if (f !== 0.0) {
4539
+ writer.writeEnum(
4538
4540
  2,
4539
4541
  f
4540
4542
  );
4541
4543
  }
4542
4544
  f = message.getInvitationCheck();
4543
- if (f) {
4544
- writer.writeBool(
4545
+ if (f !== 0.0) {
4546
+ writer.writeEnum(
4545
4547
  3,
4546
4548
  f
4547
4549
  );
4548
4550
  }
4549
4551
  f = message.getRoomTopicEdit();
4550
- if (f) {
4551
- writer.writeBool(
4552
+ if (f !== 0.0) {
4553
+ writer.writeEnum(
4552
4554
  4,
4553
4555
  f
4554
4556
  );
@@ -4575,56 +4577,56 @@ proto.wechaty.puppet.RoomPermissionRequest.prototype.setId = function(value) {
4575
4577
 
4576
4578
 
4577
4579
  /**
4578
- * optional bool send_message = 2;
4579
- * @return {boolean}
4580
+ * optional OptionalBoolean send_message = 2;
4581
+ * @return {!proto.wechaty.puppet.OptionalBoolean}
4580
4582
  */
4581
4583
  proto.wechaty.puppet.RoomPermissionRequest.prototype.getSendMessage = function() {
4582
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
4584
+ return /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
4583
4585
  };
4584
4586
 
4585
4587
 
4586
4588
  /**
4587
- * @param {boolean} value
4589
+ * @param {!proto.wechaty.puppet.OptionalBoolean} value
4588
4590
  * @return {!proto.wechaty.puppet.RoomPermissionRequest} returns this
4589
4591
  */
4590
4592
  proto.wechaty.puppet.RoomPermissionRequest.prototype.setSendMessage = function(value) {
4591
- return jspb.Message.setProto3BooleanField(this, 2, value);
4593
+ return jspb.Message.setProto3EnumField(this, 2, value);
4592
4594
  };
4593
4595
 
4594
4596
 
4595
4597
  /**
4596
- * optional bool invitation_check = 3;
4597
- * @return {boolean}
4598
+ * optional OptionalBoolean invitation_check = 3;
4599
+ * @return {!proto.wechaty.puppet.OptionalBoolean}
4598
4600
  */
4599
4601
  proto.wechaty.puppet.RoomPermissionRequest.prototype.getInvitationCheck = function() {
4600
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
4602
+ return /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
4601
4603
  };
4602
4604
 
4603
4605
 
4604
4606
  /**
4605
- * @param {boolean} value
4607
+ * @param {!proto.wechaty.puppet.OptionalBoolean} value
4606
4608
  * @return {!proto.wechaty.puppet.RoomPermissionRequest} returns this
4607
4609
  */
4608
4610
  proto.wechaty.puppet.RoomPermissionRequest.prototype.setInvitationCheck = function(value) {
4609
- return jspb.Message.setProto3BooleanField(this, 3, value);
4611
+ return jspb.Message.setProto3EnumField(this, 3, value);
4610
4612
  };
4611
4613
 
4612
4614
 
4613
4615
  /**
4614
- * optional bool room_topic_edit = 4;
4615
- * @return {boolean}
4616
+ * optional OptionalBoolean room_topic_edit = 4;
4617
+ * @return {!proto.wechaty.puppet.OptionalBoolean}
4616
4618
  */
4617
4619
  proto.wechaty.puppet.RoomPermissionRequest.prototype.getRoomTopicEdit = function() {
4618
- return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
4620
+ return /** @type {!proto.wechaty.puppet.OptionalBoolean} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
4619
4621
  };
4620
4622
 
4621
4623
 
4622
4624
  /**
4623
- * @param {boolean} value
4625
+ * @param {!proto.wechaty.puppet.OptionalBoolean} value
4624
4626
  * @return {!proto.wechaty.puppet.RoomPermissionRequest} returns this
4625
4627
  */
4626
4628
  proto.wechaty.puppet.RoomPermissionRequest.prototype.setRoomTopicEdit = function(value) {
4627
- return jspb.Message.setProto3BooleanField(this, 4, value);
4629
+ return jspb.Message.setProto3EnumField(this, 4, value);
4628
4630
  };
4629
4631
 
4630
4632
 
@@ -0,0 +1 @@
1
+ // GENERATED CODE -- NO SERVICES IN PROTO
@@ -0,0 +1,13 @@
1
+ // package: wechaty.puppet
2
+ // file: wechaty/puppet/util.proto
3
+
4
+ import * as jspb from "google-protobuf";
5
+
6
+ export interface OptionalBooleanMap {
7
+ BOOL_UNSET: 0;
8
+ BOOL_FALSE: 1;
9
+ BOOL_TRUE: 2;
10
+ }
11
+
12
+ export const OptionalBoolean: OptionalBooleanMap;
13
+
@@ -0,0 +1,28 @@
1
+ // source: wechaty/puppet/util.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
17
+
18
+ goog.exportSymbol('proto.wechaty.puppet.OptionalBoolean', null, global);
19
+ /**
20
+ * @enum {number}
21
+ */
22
+ proto.wechaty.puppet.OptionalBoolean = {
23
+ BOOL_UNSET: 0,
24
+ BOOL_FALSE: 1,
25
+ BOOL_TRUE: 2
26
+ };
27
+
28
+ goog.object.extend(exports, proto.wechaty.puppet);
@@ -0,0 +1,3 @@
1
+ // package: wechaty.puppet
2
+ // file: wechaty/puppet/util.proto
3
+
@@ -0,0 +1,3 @@
1
+ // package: wechaty.puppet
2
+ // file: wechaty/puppet/util.proto
3
+
@@ -9,7 +9,7 @@ info:
9
9
 
10
10
  Wechaty Puppet Service is the RESTful API for Wechaty API, which is build on
11
11
  top of the Wechaty Puppet Abstraction and the gRPC proto definition.
12
- version: 1.0.55
12
+ version: 1.0.57
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: 'https://github.com/wechaty/openapi'
@@ -1794,15 +1794,30 @@ paths:
1794
1794
  - name: sendMessage
1795
1795
  in: query
1796
1796
  required: false
1797
- type: boolean
1797
+ type: string
1798
+ enum:
1799
+ - BOOL_UNSET
1800
+ - BOOL_FALSE
1801
+ - BOOL_TRUE
1802
+ default: BOOL_UNSET
1798
1803
  - name: invitationCheck
1799
1804
  in: query
1800
1805
  required: false
1801
- type: boolean
1806
+ type: string
1807
+ enum:
1808
+ - BOOL_UNSET
1809
+ - BOOL_FALSE
1810
+ - BOOL_TRUE
1811
+ default: BOOL_UNSET
1802
1812
  - name: roomTopicEdit
1803
1813
  in: query
1804
1814
  required: false
1805
- type: boolean
1815
+ type: string
1816
+ enum:
1817
+ - BOOL_UNSET
1818
+ - BOOL_FALSE
1819
+ - BOOL_TRUE
1820
+ default: BOOL_UNSET
1806
1821
  tags:
1807
1822
  - Puppet
1808
1823
  '/rooms/{id}/qrcode':
@@ -3090,6 +3105,13 @@ definitions:
3090
3105
  type: array
3091
3106
  items:
3092
3107
  type: string
3108
+ puppetOptionalBoolean:
3109
+ type: string
3110
+ enum:
3111
+ - BOOL_UNSET
3112
+ - BOOL_FALSE
3113
+ - BOOL_TRUE
3114
+ default: BOOL_UNSET
3093
3115
  puppetPayloadType:
3094
3116
  type: string
3095
3117
  enum:
@@ -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.55",
6
+ "version": "1.0.57",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -2659,19 +2659,37 @@
2659
2659
  "name": "sendMessage",
2660
2660
  "in": "query",
2661
2661
  "required": false,
2662
- "type": "boolean"
2662
+ "type": "string",
2663
+ "enum": [
2664
+ "BOOL_UNSET",
2665
+ "BOOL_FALSE",
2666
+ "BOOL_TRUE"
2667
+ ],
2668
+ "default": "BOOL_UNSET"
2663
2669
  },
2664
2670
  {
2665
2671
  "name": "invitationCheck",
2666
2672
  "in": "query",
2667
2673
  "required": false,
2668
- "type": "boolean"
2674
+ "type": "string",
2675
+ "enum": [
2676
+ "BOOL_UNSET",
2677
+ "BOOL_FALSE",
2678
+ "BOOL_TRUE"
2679
+ ],
2680
+ "default": "BOOL_UNSET"
2669
2681
  },
2670
2682
  {
2671
2683
  "name": "roomTopicEdit",
2672
2684
  "in": "query",
2673
2685
  "required": false,
2674
- "type": "boolean"
2686
+ "type": "string",
2687
+ "enum": [
2688
+ "BOOL_UNSET",
2689
+ "BOOL_FALSE",
2690
+ "BOOL_TRUE"
2691
+ ],
2692
+ "default": "BOOL_UNSET"
2675
2693
  }
2676
2694
  ],
2677
2695
  "tags": [
@@ -4381,6 +4399,15 @@
4381
4399
  }
4382
4400
  }
4383
4401
  },
4402
+ "puppetOptionalBoolean": {
4403
+ "type": "string",
4404
+ "enum": [
4405
+ "BOOL_UNSET",
4406
+ "BOOL_FALSE",
4407
+ "BOOL_TRUE"
4408
+ ],
4409
+ "default": "BOOL_UNSET"
4410
+ },
4384
4411
  "puppetPayloadType": {
4385
4412
  "type": "string",
4386
4413
  "enum": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juzi/wechaty-grpc",
3
- "version": "1.0.55",
3
+ "version": "1.0.57",
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.55",
7
+ "version": "1.0.57",
8
8
  "description": "gRPC for Wechaty",
9
9
  "type": "module",
10
10
  "exports": {