@juzi/wechaty-grpc 1.0.63 → 1.0.65

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 (97) 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/examples/auth/raw-https/client.js.map +1 -1
  4. package/dist/cjs/examples/auth/server.js +5 -6
  5. package/dist/cjs/examples/auth/server.js.map +1 -1
  6. package/dist/cjs/examples/client.js +2 -1
  7. package/dist/cjs/examples/client.js.map +1 -1
  8. package/dist/cjs/out/wechaty/puppet/call_grpc_pb.js +1 -0
  9. package/dist/cjs/out/wechaty/puppet/call_pb.d.ts +61 -0
  10. package/dist/cjs/out/wechaty/puppet/call_pb.js +338 -0
  11. package/dist/cjs/out/wechaty/puppet/call_pb_service.d.ts +3 -0
  12. package/dist/cjs/out/wechaty/puppet/call_pb_service.js +3 -0
  13. package/dist/cjs/out/wechaty/puppet/channel_pb.d.ts +12 -3
  14. package/dist/cjs/out/wechaty/puppet/channel_pb.js +19 -8
  15. package/dist/cjs/out/wechaty/puppet/message_pb.d.ts +45 -0
  16. package/dist/cjs/out/wechaty/puppet/message_pb.js +330 -1
  17. package/dist/cjs/out/wechaty/puppet.openapi.yaml +164 -86
  18. package/dist/cjs/out/wechaty/puppet.swagger.json +101 -5
  19. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +17 -1
  20. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +33 -1
  21. package/dist/cjs/out/wechaty/puppet_pb.d.ts +0 -1
  22. package/dist/cjs/out/wechaty/puppet_pb.js +0 -2
  23. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +19 -0
  24. package/dist/cjs/out/wechaty/puppet_pb_service.js +40 -0
  25. package/dist/cjs/proto/wechaty/puppet/call.proto +28 -0
  26. package/dist/cjs/proto/wechaty/puppet/channel.proto +8 -1
  27. package/dist/cjs/proto/wechaty/puppet/message.proto +11 -0
  28. package/dist/cjs/proto/wechaty/puppet.proto +5 -1
  29. package/dist/cjs/src/package-json.d.ts.map +1 -1
  30. package/dist/cjs/src/package-json.js +7 -6
  31. package/dist/cjs/src/package-json.js.map +1 -1
  32. package/dist/cjs/tests/health-check.spec.js +2 -2
  33. package/dist/cjs/tests/health-check.spec.js.map +1 -1
  34. package/dist/cjs/tests/integration.spec.js.map +1 -1
  35. package/dist/cjs/tests/nullable.spec.js +4 -0
  36. package/dist/cjs/tests/nullable.spec.js.map +1 -1
  37. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  38. package/dist/cjs/tests/puppet-server-impl.js +5 -0
  39. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  40. package/dist/esm/commonjs/generated/puppet.cjs +1 -0
  41. package/dist/esm/commonjs/generated/puppet.cjs.d.ts +1 -0
  42. package/dist/esm/examples/auth/raw-https/client.js.map +1 -1
  43. package/dist/esm/examples/auth/server.js +2 -3
  44. package/dist/esm/examples/auth/server.js.map +1 -1
  45. package/dist/esm/examples/client.js +2 -1
  46. package/dist/esm/examples/client.js.map +1 -1
  47. package/dist/esm/out/wechaty/puppet/call_grpc_pb.js +1 -0
  48. package/dist/esm/out/wechaty/puppet/call_pb.d.ts +61 -0
  49. package/dist/esm/out/wechaty/puppet/call_pb.js +338 -0
  50. package/dist/esm/out/wechaty/puppet/call_pb_service.d.ts +3 -0
  51. package/dist/esm/out/wechaty/puppet/call_pb_service.js +3 -0
  52. package/dist/esm/out/wechaty/puppet/channel_pb.d.ts +12 -3
  53. package/dist/esm/out/wechaty/puppet/channel_pb.js +19 -8
  54. package/dist/esm/out/wechaty/puppet/message_pb.d.ts +45 -0
  55. package/dist/esm/out/wechaty/puppet/message_pb.js +330 -1
  56. package/dist/esm/out/wechaty/puppet.openapi.yaml +164 -86
  57. package/dist/esm/out/wechaty/puppet.swagger.json +101 -5
  58. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +17 -1
  59. package/dist/esm/out/wechaty/puppet_grpc_pb.js +33 -1
  60. package/dist/esm/out/wechaty/puppet_pb.d.ts +0 -1
  61. package/dist/esm/out/wechaty/puppet_pb.js +0 -2
  62. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +19 -0
  63. package/dist/esm/out/wechaty/puppet_pb_service.js +40 -0
  64. package/dist/esm/proto/wechaty/puppet/call.proto +28 -0
  65. package/dist/esm/proto/wechaty/puppet/channel.proto +8 -1
  66. package/dist/esm/proto/wechaty/puppet/message.proto +11 -0
  67. package/dist/esm/proto/wechaty/puppet.proto +5 -1
  68. package/dist/esm/src/package-json.d.ts.map +1 -1
  69. package/dist/esm/src/package-json.js +7 -6
  70. package/dist/esm/src/package-json.js.map +1 -1
  71. package/dist/esm/tests/health-check.spec.js +2 -2
  72. package/dist/esm/tests/health-check.spec.js.map +1 -1
  73. package/dist/esm/tests/integration.spec.js.map +1 -1
  74. package/dist/esm/tests/nullable.spec.js +4 -0
  75. package/dist/esm/tests/nullable.spec.js.map +1 -1
  76. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  77. package/dist/esm/tests/puppet-server-impl.js +5 -0
  78. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  79. package/out/wechaty/puppet/call_grpc_pb.js +1 -0
  80. package/out/wechaty/puppet/call_pb.d.ts +61 -0
  81. package/out/wechaty/puppet/call_pb.js +338 -0
  82. package/out/wechaty/puppet/call_pb_service.d.ts +3 -0
  83. package/out/wechaty/puppet/call_pb_service.js +3 -0
  84. package/out/wechaty/puppet/channel_pb.d.ts +12 -3
  85. package/out/wechaty/puppet/channel_pb.js +19 -8
  86. package/out/wechaty/puppet/message_pb.d.ts +45 -0
  87. package/out/wechaty/puppet/message_pb.js +330 -1
  88. package/out/wechaty/puppet.openapi.yaml +164 -86
  89. package/out/wechaty/puppet.swagger.json +101 -5
  90. package/out/wechaty/puppet_grpc_pb.d.ts +17 -1
  91. package/out/wechaty/puppet_grpc_pb.js +33 -1
  92. package/out/wechaty/puppet_pb.d.ts +0 -1
  93. package/out/wechaty/puppet_pb.js +0 -2
  94. package/out/wechaty/puppet_pb_service.d.ts +19 -0
  95. package/out/wechaty/puppet_pb_service.js +40 -0
  96. package/package.json +7 -6
  97. package/src/package-json.ts +7 -6
@@ -19,6 +19,7 @@ const puppetFileList = [
19
19
  '../../out/wechaty/puppet/conversation_pb.js',
20
20
  '../../out/wechaty/puppet/util_pb.js',
21
21
  '../../out/wechaty/puppet/verify-code_pb.js',
22
+ '../../out/wechaty/puppet/call_pb.js',
22
23
 
23
24
  '../../out/wechaty/puppet_grpc_pb.js',
24
25
  '../../out/wechaty/puppet_pb.js',
@@ -41,6 +41,7 @@ export * from '../../out/wechaty/puppet/post_pb.js'
41
41
  export * from '../../out/wechaty/puppet/conversation_pb.js'
42
42
  export * from '../../out/wechaty/puppet/util_pb.js'
43
43
  export * from '../../out/wechaty/puppet/verify-code_pb.js'
44
+ export * from '../../out/wechaty/puppet/call_pb.js'
44
45
 
45
46
  export * from '../../out/wechaty/puppet_grpc_pb.js'
46
47
  export * from '../../out/wechaty/puppet_pb.js'
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../examples/auth/raw-https/client.ts"],"names":[],"mappings":";;;;;AAAA,4CAAmB;AACnB,kDAAyB;AAEzB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;AAErB,eAAK,CAAC,OAAO,CAAC;IACZ,EAAE,EAAE,CAAC,YAAE,CAAC,YAAY,CAAC,cAAc,CAAC,CAAC;IACrC,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,IAAI;IACV,6BAA6B;CAC9B,EAAE,GAAG,CAAC,EAAE;IACP,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;QACpB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC5B,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAA"}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../examples/auth/raw-https/client.ts"],"names":[],"mappings":";;;;;AAAA,4CAAmB;AACnB,kDAAyB;AAEzB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;AAErB,eAAK,CAAC,OAAO,CAAC;IACZ,EAAE,EAAE,CAAE,YAAE,CAAC,YAAY,CAAC,cAAc,CAAC,CAAE;IACvC,QAAQ,EAAE,WAAW;IACrB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,IAAI;IACV,6BAA6B;CAC9B,EAAE,GAAG,CAAC,EAAE;IACP,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE;QACpB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IAC5B,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAC,GAAG,EAAE,CAAA"}
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const util_1 = __importDefault(require("util"));
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const constants_1 = require("@grpc/grpc-js/build/src/constants");
9
- const mod_1 = require("../../src/mod");
9
+ const mod_js_1 = require("../../src/mod.js");
10
10
  const puppet_server_impl_js_1 = require("../../tests/puppet-server-impl.js");
11
11
  const grpc_js_1 = require("@grpc/grpc-js");
12
12
  function monkeyPatchMetadataFromHttp2Headers(MetadataClass) {
@@ -88,13 +88,13 @@ const puppetServerExample = {
88
88
  const data = call.request.getData();
89
89
  console.info(`ding(${data})`);
90
90
  console.info('authorization:', call.metadata.getMap()['authorization']);
91
- callback(null, new mod_1.puppet.DingResponse());
91
+ callback(null, new mod_js_1.puppet.DingResponse());
92
92
  },
93
93
  };
94
94
  async function main() {
95
95
  const puppetServerExampleWithAuth = wechatyAuthToken('__token__')(puppetServerExample);
96
- const server = new mod_1.grpc.Server();
97
- server.addService(mod_1.puppet.PuppetService, puppetServerExampleWithAuth);
96
+ const server = new mod_js_1.grpc.Server();
97
+ server.addService(mod_js_1.puppet.PuppetService, puppetServerExampleWithAuth);
98
98
  const serverBindPromise = util_1.default.promisify(server.bindAsync.bind(server));
99
99
  void fs_1.default;
100
100
  const rootCerts = fs_1.default.readFileSync('root-ca.crt');
@@ -106,8 +106,7 @@ async function main() {
106
106
  // const checkClientCertificate = false
107
107
  const port = await serverBindPromise('0.0.0.0:8788',
108
108
  // grpc.ServerCredentials.createInsecure(),
109
- mod_1.grpc.ServerCredentials.createSsl(null, keyCertPairs) //, checkClientCertificate),
110
- );
109
+ mod_js_1.grpc.ServerCredentials.createSsl(null, keyCertPairs));
111
110
  console.info('Listen on port:', port);
112
111
  server.start();
113
112
  return 0;
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../../../examples/auth/server.ts"],"names":[],"mappings":";;;;;AAAA,gDAAuB;AACvB,4CAAmB;AAEnB,iEAA8E;AAE9E,uCAG4C;AAE5C,6EAE8D;AAC9D,2CAI0C;AAS1C,SAAS,mCAAmC,CAC1C,aAA8B;IAE9B,MAAM,gBAAgB,GAAG,aAAa,CAAC,gBAAgB,CAAA;IACvD,aAAa,CAAC,gBAAgB,GAAG,UAC/B,OAAkC;QAElC,MAAM,QAAQ,GAAG,gBAAgB,CAAC,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,CAAA;QAE9D,IAAI,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,MAAM,IAAI,CAAC,EAAE;YAC7C,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAA;YACvC,MAAM,aAAa,GAAG,WAAW,SAAS,EAAE,CAAA;YAC5C,QAAQ,CAAC,GAAG,CAAC,eAAe,EAAE,aAAa,CAAC,CAAA;SAC7C;QACD,OAAO,QAAQ,CAAA;IACjB,CAAC,CAAA;AACH,CAAC;AAgBD;;;;;;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;IAED,MAAM,iBAAiB,GAAG,cAAI,CAAC,SAAS,CACtC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAC9B,CAAA;IAED,KAAK,YAAE,CAAA;IAEP,MAAM,SAAS,GAAkB,YAAE,CAAC,YAAY,CAAC,aAAa,CAAC,CAAA;IAC/D,KAAK,SAAS,CAAA;IACd,MAAM,YAAY,GAAuB,CAAE;YACzC,UAAU,EAAI,YAAE,CAAC,YAAY,CAAC,YAAY,CAAC;YAC3C,WAAW,EAAG,YAAE,CAAC,YAAY,CAAC,YAAY,CAAC;SAC5C,CAAE,CAAA;IACH,uCAAuC;IAEvC,MAAM,IAAI,GAAG,MAAM,iBAAiB,CAClC,cAAc;IACd,2CAA2C;IAC3C,aAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,IAAI,EAAE,YAAY,CAAC,CACrD,CAAA;IACD,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAA;IACrC,MAAM,CAAC,KAAK,EAAE,CAAA;IACd,OAAO,CAAC,CAAA;AACV,CAAC;AAED,IAAI,EAAE;KACH,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA"}
@@ -70,7 +70,8 @@ async function main() {
70
70
  'grpc.default_authority': 'puppet_token',
71
71
  });
72
72
  testStream(client);
73
- setInterval(() => testDing(client), 1000);
73
+ // eslint-disable-next-line no-void
74
+ setInterval(() => void testDing(client), 1000);
74
75
  // await testAlias(client)
75
76
  return 0;
76
77
  }
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../examples/client.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,mFAAmF;;;AAEnF,0CAG0C;AAE1C,iDAA2C;AAEpC,KAAK,UAAU,SAAS,CAAE,MAA2B;IAC1D,MAAM,OAAO,GAAG,IAAI,eAAM,CAAC,mBAAmB,EAAE,CAAA;IAEhD,MAAM,YAAY,GAAG,IAAA,wBAAS,EAAC,MAAM,C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,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ // GENERATED CODE -- NO SERVICES IN PROTO
@@ -0,0 +1,61 @@
1
+ // package: wechaty.puppet
2
+ // file: wechaty/puppet/call.proto
3
+
4
+ import * as jspb from "google-protobuf";
5
+
6
+ export class CallRecordPayload extends jspb.Message {
7
+ getStarterId(): string;
8
+ setStarterId(value: string): void;
9
+
10
+ clearParticipantIdsList(): void;
11
+ getParticipantIdsList(): Array<string>;
12
+ setParticipantIdsList(value: Array<string>): void;
13
+ addParticipantIds(value: string, index?: number): string;
14
+
15
+ getLength(): number;
16
+ setLength(value: number): void;
17
+
18
+ getType(): CallTypeMap[keyof CallTypeMap];
19
+ setType(value: CallTypeMap[keyof CallTypeMap]): void;
20
+
21
+ getStatus(): CallStatusMap[keyof CallStatusMap];
22
+ setStatus(value: CallStatusMap[keyof CallStatusMap]): void;
23
+
24
+ serializeBinary(): Uint8Array;
25
+ toObject(includeInstance?: boolean): CallRecordPayload.AsObject;
26
+ static toObject(includeInstance: boolean, msg: CallRecordPayload): CallRecordPayload.AsObject;
27
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
28
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
29
+ static serializeBinaryToWriter(message: CallRecordPayload, writer: jspb.BinaryWriter): void;
30
+ static deserializeBinary(bytes: Uint8Array): CallRecordPayload;
31
+ static deserializeBinaryFromReader(message: CallRecordPayload, reader: jspb.BinaryReader): CallRecordPayload;
32
+ }
33
+
34
+ export namespace CallRecordPayload {
35
+ export type AsObject = {
36
+ starterId: string,
37
+ participantIdsList: Array<string>,
38
+ length: number,
39
+ type: CallTypeMap[keyof CallTypeMap],
40
+ status: CallStatusMap[keyof CallStatusMap],
41
+ }
42
+ }
43
+
44
+ export interface CallTypeMap {
45
+ CALL_TYPE_UNKNOWN: 0;
46
+ CALL_TYPE_VOICE: 1;
47
+ CALL_TYPE_VIDEO: 2;
48
+ }
49
+
50
+ export const CallType: CallTypeMap;
51
+
52
+ export interface CallStatusMap {
53
+ CALL_STATUS_UNKNOWN: 0;
54
+ CALL_STATUS_CANCELED: 1;
55
+ CALL_STATUS_REJECTED: 2;
56
+ CALL_STATUS_ONGOING: 3;
57
+ CALL_STATUS_ENDED: 4;
58
+ }
59
+
60
+ export const CallStatus: CallStatusMap;
61
+
@@ -0,0 +1,338 @@
1
+ // source: wechaty/puppet/call.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.CallRecordPayload', null, global);
19
+ goog.exportSymbol('proto.wechaty.puppet.CallStatus', null, global);
20
+ goog.exportSymbol('proto.wechaty.puppet.CallType', null, global);
21
+ /**
22
+ * Generated by JsPbCodeGenerator.
23
+ * @param {Array=} opt_data Optional initial data array, typically from a
24
+ * server response, or constructed directly in Javascript. The array is used
25
+ * in place and becomes part of the constructed object. It is not cloned.
26
+ * If no data is provided, the constructed object will be empty, but still
27
+ * valid.
28
+ * @extends {jspb.Message}
29
+ * @constructor
30
+ */
31
+ proto.wechaty.puppet.CallRecordPayload = function(opt_data) {
32
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.CallRecordPayload.repeatedFields_, null);
33
+ };
34
+ goog.inherits(proto.wechaty.puppet.CallRecordPayload, jspb.Message);
35
+ if (goog.DEBUG && !COMPILED) {
36
+ /**
37
+ * @public
38
+ * @override
39
+ */
40
+ proto.wechaty.puppet.CallRecordPayload.displayName = 'proto.wechaty.puppet.CallRecordPayload';
41
+ }
42
+
43
+ /**
44
+ * List of repeated fields within this message type.
45
+ * @private {!Array<number>}
46
+ * @const
47
+ */
48
+ proto.wechaty.puppet.CallRecordPayload.repeatedFields_ = [2];
49
+
50
+
51
+
52
+ if (jspb.Message.GENERATE_TO_OBJECT) {
53
+ /**
54
+ * Creates an object representation of this proto.
55
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
56
+ * Optional fields that are not set will be set to undefined.
57
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
58
+ * For the list of reserved names please see:
59
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
60
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
61
+ * JSPB instance for transitional soy proto support:
62
+ * http://goto/soy-param-migration
63
+ * @return {!Object}
64
+ */
65
+ proto.wechaty.puppet.CallRecordPayload.prototype.toObject = function(opt_includeInstance) {
66
+ return proto.wechaty.puppet.CallRecordPayload.toObject(opt_includeInstance, this);
67
+ };
68
+
69
+
70
+ /**
71
+ * Static version of the {@see toObject} method.
72
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
73
+ * the JSPB instance for transitional soy proto support:
74
+ * http://goto/soy-param-migration
75
+ * @param {!proto.wechaty.puppet.CallRecordPayload} msg The msg instance to transform.
76
+ * @return {!Object}
77
+ * @suppress {unusedLocalVariables} f is only used for nested messages
78
+ */
79
+ proto.wechaty.puppet.CallRecordPayload.toObject = function(includeInstance, msg) {
80
+ var f, obj = {
81
+ starterId: jspb.Message.getFieldWithDefault(msg, 1, ""),
82
+ participantIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
83
+ length: jspb.Message.getFieldWithDefault(msg, 3, 0),
84
+ type: jspb.Message.getFieldWithDefault(msg, 4, 0),
85
+ status: jspb.Message.getFieldWithDefault(msg, 5, 0)
86
+ };
87
+
88
+ if (includeInstance) {
89
+ obj.$jspbMessageInstance = msg;
90
+ }
91
+ return obj;
92
+ };
93
+ }
94
+
95
+
96
+ /**
97
+ * Deserializes binary data (in protobuf wire format).
98
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
99
+ * @return {!proto.wechaty.puppet.CallRecordPayload}
100
+ */
101
+ proto.wechaty.puppet.CallRecordPayload.deserializeBinary = function(bytes) {
102
+ var reader = new jspb.BinaryReader(bytes);
103
+ var msg = new proto.wechaty.puppet.CallRecordPayload;
104
+ return proto.wechaty.puppet.CallRecordPayload.deserializeBinaryFromReader(msg, reader);
105
+ };
106
+
107
+
108
+ /**
109
+ * Deserializes binary data (in protobuf wire format) from the
110
+ * given reader into the given message object.
111
+ * @param {!proto.wechaty.puppet.CallRecordPayload} msg The message object to deserialize into.
112
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
113
+ * @return {!proto.wechaty.puppet.CallRecordPayload}
114
+ */
115
+ proto.wechaty.puppet.CallRecordPayload.deserializeBinaryFromReader = function(msg, reader) {
116
+ while (reader.nextField()) {
117
+ if (reader.isEndGroup()) {
118
+ break;
119
+ }
120
+ var field = reader.getFieldNumber();
121
+ switch (field) {
122
+ case 1:
123
+ var value = /** @type {string} */ (reader.readString());
124
+ msg.setStarterId(value);
125
+ break;
126
+ case 2:
127
+ var value = /** @type {string} */ (reader.readString());
128
+ msg.addParticipantIds(value);
129
+ break;
130
+ case 3:
131
+ var value = /** @type {number} */ (reader.readInt32());
132
+ msg.setLength(value);
133
+ break;
134
+ case 4:
135
+ var value = /** @type {!proto.wechaty.puppet.CallType} */ (reader.readEnum());
136
+ msg.setType(value);
137
+ break;
138
+ case 5:
139
+ var value = /** @type {!proto.wechaty.puppet.CallStatus} */ (reader.readEnum());
140
+ msg.setStatus(value);
141
+ break;
142
+ default:
143
+ reader.skipField();
144
+ break;
145
+ }
146
+ }
147
+ return msg;
148
+ };
149
+
150
+
151
+ /**
152
+ * Serializes the message to binary data (in protobuf wire format).
153
+ * @return {!Uint8Array}
154
+ */
155
+ proto.wechaty.puppet.CallRecordPayload.prototype.serializeBinary = function() {
156
+ var writer = new jspb.BinaryWriter();
157
+ proto.wechaty.puppet.CallRecordPayload.serializeBinaryToWriter(this, writer);
158
+ return writer.getResultBuffer();
159
+ };
160
+
161
+
162
+ /**
163
+ * Serializes the given message to binary data (in protobuf wire
164
+ * format), writing to the given BinaryWriter.
165
+ * @param {!proto.wechaty.puppet.CallRecordPayload} message
166
+ * @param {!jspb.BinaryWriter} writer
167
+ * @suppress {unusedLocalVariables} f is only used for nested messages
168
+ */
169
+ proto.wechaty.puppet.CallRecordPayload.serializeBinaryToWriter = function(message, writer) {
170
+ var f = undefined;
171
+ f = message.getStarterId();
172
+ if (f.length > 0) {
173
+ writer.writeString(
174
+ 1,
175
+ f
176
+ );
177
+ }
178
+ f = message.getParticipantIdsList();
179
+ if (f.length > 0) {
180
+ writer.writeRepeatedString(
181
+ 2,
182
+ f
183
+ );
184
+ }
185
+ f = message.getLength();
186
+ if (f !== 0) {
187
+ writer.writeInt32(
188
+ 3,
189
+ f
190
+ );
191
+ }
192
+ f = message.getType();
193
+ if (f !== 0.0) {
194
+ writer.writeEnum(
195
+ 4,
196
+ f
197
+ );
198
+ }
199
+ f = message.getStatus();
200
+ if (f !== 0.0) {
201
+ writer.writeEnum(
202
+ 5,
203
+ f
204
+ );
205
+ }
206
+ };
207
+
208
+
209
+ /**
210
+ * optional string starter_id = 1;
211
+ * @return {string}
212
+ */
213
+ proto.wechaty.puppet.CallRecordPayload.prototype.getStarterId = function() {
214
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
215
+ };
216
+
217
+
218
+ /**
219
+ * @param {string} value
220
+ * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
221
+ */
222
+ proto.wechaty.puppet.CallRecordPayload.prototype.setStarterId = function(value) {
223
+ return jspb.Message.setProto3StringField(this, 1, value);
224
+ };
225
+
226
+
227
+ /**
228
+ * repeated string participant_ids = 2;
229
+ * @return {!Array<string>}
230
+ */
231
+ proto.wechaty.puppet.CallRecordPayload.prototype.getParticipantIdsList = function() {
232
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
233
+ };
234
+
235
+
236
+ /**
237
+ * @param {!Array<string>} value
238
+ * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
239
+ */
240
+ proto.wechaty.puppet.CallRecordPayload.prototype.setParticipantIdsList = function(value) {
241
+ return jspb.Message.setField(this, 2, value || []);
242
+ };
243
+
244
+
245
+ /**
246
+ * @param {string} value
247
+ * @param {number=} opt_index
248
+ * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
249
+ */
250
+ proto.wechaty.puppet.CallRecordPayload.prototype.addParticipantIds = function(value, opt_index) {
251
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
252
+ };
253
+
254
+
255
+ /**
256
+ * Clears the list making it empty but non-null.
257
+ * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
258
+ */
259
+ proto.wechaty.puppet.CallRecordPayload.prototype.clearParticipantIdsList = function() {
260
+ return this.setParticipantIdsList([]);
261
+ };
262
+
263
+
264
+ /**
265
+ * optional int32 length = 3;
266
+ * @return {number}
267
+ */
268
+ proto.wechaty.puppet.CallRecordPayload.prototype.getLength = function() {
269
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
270
+ };
271
+
272
+
273
+ /**
274
+ * @param {number} value
275
+ * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
276
+ */
277
+ proto.wechaty.puppet.CallRecordPayload.prototype.setLength = function(value) {
278
+ return jspb.Message.setProto3IntField(this, 3, value);
279
+ };
280
+
281
+
282
+ /**
283
+ * optional CallType type = 4;
284
+ * @return {!proto.wechaty.puppet.CallType}
285
+ */
286
+ proto.wechaty.puppet.CallRecordPayload.prototype.getType = function() {
287
+ return /** @type {!proto.wechaty.puppet.CallType} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
288
+ };
289
+
290
+
291
+ /**
292
+ * @param {!proto.wechaty.puppet.CallType} value
293
+ * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
294
+ */
295
+ proto.wechaty.puppet.CallRecordPayload.prototype.setType = function(value) {
296
+ return jspb.Message.setProto3EnumField(this, 4, value);
297
+ };
298
+
299
+
300
+ /**
301
+ * optional CallStatus status = 5;
302
+ * @return {!proto.wechaty.puppet.CallStatus}
303
+ */
304
+ proto.wechaty.puppet.CallRecordPayload.prototype.getStatus = function() {
305
+ return /** @type {!proto.wechaty.puppet.CallStatus} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
306
+ };
307
+
308
+
309
+ /**
310
+ * @param {!proto.wechaty.puppet.CallStatus} value
311
+ * @return {!proto.wechaty.puppet.CallRecordPayload} returns this
312
+ */
313
+ proto.wechaty.puppet.CallRecordPayload.prototype.setStatus = function(value) {
314
+ return jspb.Message.setProto3EnumField(this, 5, value);
315
+ };
316
+
317
+
318
+ /**
319
+ * @enum {number}
320
+ */
321
+ proto.wechaty.puppet.CallType = {
322
+ CALL_TYPE_UNKNOWN: 0,
323
+ CALL_TYPE_VOICE: 1,
324
+ CALL_TYPE_VIDEO: 2
325
+ };
326
+
327
+ /**
328
+ * @enum {number}
329
+ */
330
+ proto.wechaty.puppet.CallStatus = {
331
+ CALL_STATUS_UNKNOWN: 0,
332
+ CALL_STATUS_CANCELED: 1,
333
+ CALL_STATUS_REJECTED: 2,
334
+ CALL_STATUS_ONGOING: 3,
335
+ CALL_STATUS_ENDED: 4
336
+ };
337
+
338
+ goog.object.extend(exports, proto.wechaty.puppet);
@@ -0,0 +1,3 @@
1
+ // package: wechaty.puppet
2
+ // file: wechaty/puppet/call.proto
3
+
@@ -0,0 +1,3 @@
1
+ // package: wechaty.puppet
2
+ // file: wechaty/puppet/call.proto
3
+
@@ -16,8 +16,8 @@ export class ChannelPayload extends jspb.Message {
16
16
  getExtras(): string;
17
17
  setExtras(value: string): void;
18
18
 
19
- getFeedType(): number;
20
- setFeedType(value: number): void;
19
+ getFeedType(): ChannelFeedTypeMap[keyof ChannelFeedTypeMap];
20
+ setFeedType(value: ChannelFeedTypeMap[keyof ChannelFeedTypeMap]): void;
21
21
 
22
22
  getNickname(): string;
23
23
  setNickname(value: string): void;
@@ -50,7 +50,7 @@ export namespace ChannelPayload {
50
50
  coverUrl: string,
51
51
  desc: string,
52
52
  extras: string,
53
- feedType: number,
53
+ feedType: ChannelFeedTypeMap[keyof ChannelFeedTypeMap],
54
54
  nickname: string,
55
55
  thumbUrl: string,
56
56
  url: string,
@@ -59,3 +59,12 @@ export namespace ChannelPayload {
59
59
  }
60
60
  }
61
61
 
62
+ export interface ChannelFeedTypeMap {
63
+ CHANNEL_FEED_TYPE_UNKNOWN: 0;
64
+ CHANNEL_FEED_TYPE_PHOTO: 2;
65
+ CHANNEL_FEED_TYPE_VIDEO: 4;
66
+ CHANNEL_FEED_TYPE_LIVE: 9;
67
+ }
68
+
69
+ export const ChannelFeedType: ChannelFeedTypeMap;
70
+
@@ -15,6 +15,7 @@ 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.ChannelFeedType', null, global);
18
19
  goog.exportSymbol('proto.wechaty.puppet.ChannelPayload', null, global);
19
20
  /**
20
21
  * Generated by JsPbCodeGenerator.
@@ -132,7 +133,7 @@ proto.wechaty.puppet.ChannelPayload.deserializeBinaryFromReader = function(msg,
132
133
  msg.setExtras(value);
133
134
  break;
134
135
  case 5:
135
- var value = /** @type {number} */ (reader.readInt32());
136
+ var value = /** @type {!proto.wechaty.puppet.ChannelFeedType} */ (reader.readEnum());
136
137
  msg.setFeedType(value);
137
138
  break;
138
139
  case 6:
@@ -213,8 +214,8 @@ proto.wechaty.puppet.ChannelPayload.serializeBinaryToWriter = function(message,
213
214
  );
214
215
  }
215
216
  f = message.getFeedType();
216
- if (f !== 0) {
217
- writer.writeInt32(
217
+ if (f !== 0.0) {
218
+ writer.writeEnum(
218
219
  5,
219
220
  f
220
221
  );
@@ -330,20 +331,20 @@ proto.wechaty.puppet.ChannelPayload.prototype.setExtras = function(value) {
330
331
 
331
332
 
332
333
  /**
333
- * optional int32 feed_type = 5;
334
- * @return {number}
334
+ * optional ChannelFeedType feed_type = 5;
335
+ * @return {!proto.wechaty.puppet.ChannelFeedType}
335
336
  */
336
337
  proto.wechaty.puppet.ChannelPayload.prototype.getFeedType = function() {
337
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
338
+ return /** @type {!proto.wechaty.puppet.ChannelFeedType} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
338
339
  };
339
340
 
340
341
 
341
342
  /**
342
- * @param {number} value
343
+ * @param {!proto.wechaty.puppet.ChannelFeedType} value
343
344
  * @return {!proto.wechaty.puppet.ChannelPayload} returns this
344
345
  */
345
346
  proto.wechaty.puppet.ChannelPayload.prototype.setFeedType = function(value) {
346
- return jspb.Message.setProto3IntField(this, 5, value);
347
+ return jspb.Message.setProto3EnumField(this, 5, value);
347
348
  };
348
349
 
349
350
 
@@ -437,4 +438,14 @@ proto.wechaty.puppet.ChannelPayload.prototype.setObjectNonceId = function(value)
437
438
  };
438
439
 
439
440
 
441
+ /**
442
+ * @enum {number}
443
+ */
444
+ proto.wechaty.puppet.ChannelFeedType = {
445
+ CHANNEL_FEED_TYPE_UNKNOWN: 0,
446
+ CHANNEL_FEED_TYPE_PHOTO: 2,
447
+ CHANNEL_FEED_TYPE_VIDEO: 4,
448
+ CHANNEL_FEED_TYPE_LIVE: 9
449
+ };
450
+
440
451
  goog.object.extend(exports, proto.wechaty.puppet);
@@ -10,6 +10,7 @@ import * as wechaty_puppet_mini_program_pb from "../../wechaty/puppet/mini-progr
10
10
  import * as wechaty_puppet_url_link_pb from "../../wechaty/puppet/url-link_pb";
11
11
  import * as wechaty_puppet_channel_pb from "../../wechaty/puppet/channel_pb";
12
12
  import * as wechaty_puppet_post_pb from "../../wechaty/puppet/post_pb";
13
+ import * as wechaty_puppet_call_pb from "../../wechaty/puppet/call_pb";
13
14
 
14
15
  export class MessagePayloadRequest extends jspb.Message {
15
16
  getId(): string;
@@ -361,6 +362,48 @@ export namespace MessageChannelResponse {
361
362
  }
362
363
  }
363
364
 
365
+ export class MessageCallRecordRequest extends jspb.Message {
366
+ getId(): string;
367
+ setId(value: string): void;
368
+
369
+ serializeBinary(): Uint8Array;
370
+ toObject(includeInstance?: boolean): MessageCallRecordRequest.AsObject;
371
+ static toObject(includeInstance: boolean, msg: MessageCallRecordRequest): MessageCallRecordRequest.AsObject;
372
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
373
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
374
+ static serializeBinaryToWriter(message: MessageCallRecordRequest, writer: jspb.BinaryWriter): void;
375
+ static deserializeBinary(bytes: Uint8Array): MessageCallRecordRequest;
376
+ static deserializeBinaryFromReader(message: MessageCallRecordRequest, reader: jspb.BinaryReader): MessageCallRecordRequest;
377
+ }
378
+
379
+ export namespace MessageCallRecordRequest {
380
+ export type AsObject = {
381
+ id: string,
382
+ }
383
+ }
384
+
385
+ export class MessageCallRecordlResponse extends jspb.Message {
386
+ hasCallRecord(): boolean;
387
+ clearCallRecord(): void;
388
+ getCallRecord(): wechaty_puppet_call_pb.CallRecordPayload | undefined;
389
+ setCallRecord(value?: wechaty_puppet_call_pb.CallRecordPayload): void;
390
+
391
+ serializeBinary(): Uint8Array;
392
+ toObject(includeInstance?: boolean): MessageCallRecordlResponse.AsObject;
393
+ static toObject(includeInstance: boolean, msg: MessageCallRecordlResponse): MessageCallRecordlResponse.AsObject;
394
+ static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
395
+ static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
396
+ static serializeBinaryToWriter(message: MessageCallRecordlResponse, writer: jspb.BinaryWriter): void;
397
+ static deserializeBinary(bytes: Uint8Array): MessageCallRecordlResponse;
398
+ static deserializeBinaryFromReader(message: MessageCallRecordlResponse, reader: jspb.BinaryReader): MessageCallRecordlResponse;
399
+ }
400
+
401
+ export namespace MessageCallRecordlResponse {
402
+ export type AsObject = {
403
+ callRecord?: wechaty_puppet_call_pb.CallRecordPayload.AsObject,
404
+ }
405
+ }
406
+
364
407
  export class MessageSendContactRequest extends jspb.Message {
365
408
  getConversationId(): string;
366
409
  setConversationId(value: string): void;
@@ -1085,6 +1128,8 @@ export interface MessageTypeMap {
1085
1128
  MESSAGE_TYPE_POST: 16;
1086
1129
  MESSAGE_TYPE_CHANNEL: 17;
1087
1130
  MESSAGE_TYPE_SYSTEM: 18;
1131
+ MESSAGE_TYPE_MARKDOWN: 19;
1132
+ MESSAGE_TYPE_CALL_RECORD: 20;
1088
1133
  }
1089
1134
 
1090
1135
  export const MessageType: MessageTypeMap;