@juzi/wechaty-grpc 1.0.42 → 1.0.43

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 (57) hide show
  1. package/dist/cjs/commonjs/generated/puppet.cjs +0 -2
  2. package/dist/cjs/commonjs/generated/puppet.cjs.d.ts +0 -2
  3. package/dist/cjs/out/wechaty/puppet.openapi.yaml +1 -142
  4. package/dist/cjs/out/wechaty/puppet.swagger.json +1 -194
  5. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +0 -50
  6. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +0 -102
  7. package/dist/cjs/out/wechaty/puppet_pb.d.ts +0 -1
  8. package/dist/cjs/out/wechaty/puppet_pb.js +0 -2
  9. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +0 -34
  10. package/dist/cjs/out/wechaty/puppet_pb_service.js +0 -147
  11. package/dist/cjs/proto/wechaty/puppet.proto +0 -9
  12. package/dist/cjs/src/package-json.js +1 -1
  13. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  14. package/dist/cjs/tests/puppet-server-impl.js +0 -13
  15. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  16. package/dist/esm/commonjs/generated/puppet.cjs +0 -2
  17. package/dist/esm/commonjs/generated/puppet.cjs.d.ts +0 -2
  18. package/dist/esm/out/wechaty/puppet.openapi.yaml +1 -142
  19. package/dist/esm/out/wechaty/puppet.swagger.json +1 -194
  20. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +0 -50
  21. package/dist/esm/out/wechaty/puppet_grpc_pb.js +0 -102
  22. package/dist/esm/out/wechaty/puppet_pb.d.ts +0 -1
  23. package/dist/esm/out/wechaty/puppet_pb.js +0 -2
  24. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +0 -34
  25. package/dist/esm/out/wechaty/puppet_pb_service.js +0 -147
  26. package/dist/esm/proto/wechaty/puppet.proto +0 -9
  27. package/dist/esm/src/package-json.js +1 -1
  28. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  29. package/dist/esm/tests/puppet-server-impl.js +0 -13
  30. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  31. package/out/wechaty/puppet.openapi.yaml +1 -142
  32. package/out/wechaty/puppet.swagger.json +1 -194
  33. package/out/wechaty/puppet_grpc_pb.d.ts +0 -50
  34. package/out/wechaty/puppet_grpc_pb.js +0 -102
  35. package/out/wechaty/puppet_pb.d.ts +0 -1
  36. package/out/wechaty/puppet_pb.js +0 -2
  37. package/out/wechaty/puppet_pb_service.d.ts +0 -34
  38. package/out/wechaty/puppet_pb_service.js +0 -147
  39. package/package.json +1 -1
  40. package/src/package-json.ts +1 -1
  41. package/dist/cjs/out/wechaty/deprecated/file-box_grpc_pb.js +0 -1
  42. package/dist/cjs/out/wechaty/deprecated/file-box_pb.d.ts +0 -179
  43. package/dist/cjs/out/wechaty/deprecated/file-box_pb.js +0 -1368
  44. package/dist/cjs/out/wechaty/deprecated/file-box_pb_service.d.ts +0 -3
  45. package/dist/cjs/out/wechaty/deprecated/file-box_pb_service.js +0 -3
  46. package/dist/cjs/proto/wechaty/deprecated/file-box.proto +0 -61
  47. package/dist/esm/out/wechaty/deprecated/file-box_grpc_pb.js +0 -1
  48. package/dist/esm/out/wechaty/deprecated/file-box_pb.d.ts +0 -179
  49. package/dist/esm/out/wechaty/deprecated/file-box_pb.js +0 -1368
  50. package/dist/esm/out/wechaty/deprecated/file-box_pb_service.d.ts +0 -3
  51. package/dist/esm/out/wechaty/deprecated/file-box_pb_service.js +0 -3
  52. package/dist/esm/proto/wechaty/deprecated/file-box.proto +0 -61
  53. package/out/wechaty/deprecated/file-box_grpc_pb.js +0 -1
  54. package/out/wechaty/deprecated/file-box_pb.d.ts +0 -179
  55. package/out/wechaty/deprecated/file-box_pb.js +0 -1368
  56. package/out/wechaty/deprecated/file-box_pb_service.d.ts +0 -3
  57. package/out/wechaty/deprecated/file-box_pb_service.js +0 -3
@@ -2,7 +2,6 @@
2
2
  // file: wechaty/puppet.proto
3
3
 
4
4
  var wechaty_puppet_pb = require("../wechaty/puppet_pb");
5
- var wechaty_deprecated_file_box_pb = require("../wechaty/deprecated/file-box_pb");
6
5
  var wechaty_puppet_base_pb = require("../wechaty/puppet/base_pb");
7
6
  var wechaty_puppet_contact_pb = require("../wechaty/puppet/contact_pb");
8
7
  var wechaty_puppet_download_upload_pb = require("../wechaty/puppet/download-upload_pb");
@@ -24,33 +23,6 @@ var Puppet = (function () {
24
23
  return Puppet;
25
24
  }());
26
25
 
27
- Puppet.MessageFileStream = {
28
- methodName: "MessageFileStream",
29
- service: Puppet,
30
- requestStream: false,
31
- responseStream: true,
32
- requestType: wechaty_deprecated_file_box_pb.MessageFileStreamRequest,
33
- responseType: wechaty_deprecated_file_box_pb.MessageFileStreamResponse
34
- };
35
-
36
- Puppet.MessageImageStream = {
37
- methodName: "MessageImageStream",
38
- service: Puppet,
39
- requestStream: false,
40
- responseStream: true,
41
- requestType: wechaty_deprecated_file_box_pb.MessageImageStreamRequest,
42
- responseType: wechaty_deprecated_file_box_pb.MessageImageStreamResponse
43
- };
44
-
45
- Puppet.MessageSendFileStream = {
46
- methodName: "MessageSendFileStream",
47
- service: Puppet,
48
- requestStream: true,
49
- responseStream: false,
50
- requestType: wechaty_deprecated_file_box_pb.MessageSendFileStreamRequest,
51
- responseType: wechaty_deprecated_file_box_pb.MessageSendFileStreamResponse
52
- };
53
-
54
26
  Puppet.Start = {
55
27
  methodName: "Start",
56
28
  service: Puppet,
@@ -796,125 +768,6 @@ function PuppetClient(serviceHost, options) {
796
768
  this.options = options || {};
797
769
  }
798
770
 
799
- PuppetClient.prototype.messageFileStream = function messageFileStream(requestMessage, metadata) {
800
- var listeners = {
801
- data: [],
802
- end: [],
803
- status: []
804
- };
805
- var client = grpc.invoke(Puppet.MessageFileStream, {
806
- request: requestMessage,
807
- host: this.serviceHost,
808
- metadata: metadata,
809
- transport: this.options.transport,
810
- debug: this.options.debug,
811
- onMessage: function (responseMessage) {
812
- listeners.data.forEach(function (handler) {
813
- handler(responseMessage);
814
- });
815
- },
816
- onEnd: function (status, statusMessage, trailers) {
817
- listeners.status.forEach(function (handler) {
818
- handler({ code: status, details: statusMessage, metadata: trailers });
819
- });
820
- listeners.end.forEach(function (handler) {
821
- handler({ code: status, details: statusMessage, metadata: trailers });
822
- });
823
- listeners = null;
824
- }
825
- });
826
- return {
827
- on: function (type, handler) {
828
- listeners[type].push(handler);
829
- return this;
830
- },
831
- cancel: function () {
832
- listeners = null;
833
- client.close();
834
- }
835
- };
836
- };
837
-
838
- PuppetClient.prototype.messageImageStream = function messageImageStream(requestMessage, metadata) {
839
- var listeners = {
840
- data: [],
841
- end: [],
842
- status: []
843
- };
844
- var client = grpc.invoke(Puppet.MessageImageStream, {
845
- request: requestMessage,
846
- host: this.serviceHost,
847
- metadata: metadata,
848
- transport: this.options.transport,
849
- debug: this.options.debug,
850
- onMessage: function (responseMessage) {
851
- listeners.data.forEach(function (handler) {
852
- handler(responseMessage);
853
- });
854
- },
855
- onEnd: function (status, statusMessage, trailers) {
856
- listeners.status.forEach(function (handler) {
857
- handler({ code: status, details: statusMessage, metadata: trailers });
858
- });
859
- listeners.end.forEach(function (handler) {
860
- handler({ code: status, details: statusMessage, metadata: trailers });
861
- });
862
- listeners = null;
863
- }
864
- });
865
- return {
866
- on: function (type, handler) {
867
- listeners[type].push(handler);
868
- return this;
869
- },
870
- cancel: function () {
871
- listeners = null;
872
- client.close();
873
- }
874
- };
875
- };
876
-
877
- PuppetClient.prototype.messageSendFileStream = function messageSendFileStream(metadata) {
878
- var listeners = {
879
- end: [],
880
- status: []
881
- };
882
- var client = grpc.client(Puppet.MessageSendFileStream, {
883
- host: this.serviceHost,
884
- metadata: metadata,
885
- transport: this.options.transport
886
- });
887
- client.onEnd(function (status, statusMessage, trailers) {
888
- listeners.status.forEach(function (handler) {
889
- handler({ code: status, details: statusMessage, metadata: trailers });
890
- });
891
- listeners.end.forEach(function (handler) {
892
- handler({ code: status, details: statusMessage, metadata: trailers });
893
- });
894
- listeners = null;
895
- });
896
- return {
897
- on: function (type, handler) {
898
- listeners[type].push(handler);
899
- return this;
900
- },
901
- write: function (requestMessage) {
902
- if (!client.started) {
903
- client.start(metadata);
904
- }
905
- client.send(requestMessage);
906
- return this;
907
- },
908
- end: function () {
909
- client.finishSend();
910
- },
911
- cancel: function () {
912
- listeners = null;
913
- client.close();
914
- }
915
- };
916
- };
917
-
918
771
  PuppetClient.prototype.start = function start(requestMessage, metadata, callback) {
919
772
  if (arguments.length === 2) {
920
773
  callback = arguments[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juzi/wechaty-grpc",
3
- "version": "1.0.42",
3
+ "version": "1.0.43",
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.42",
7
+ "version": "1.0.43",
8
8
  "description": "gRPC for Wechaty",
9
9
  "type": "module",
10
10
  "exports": {
@@ -1 +0,0 @@
1
- // GENERATED CODE -- NO SERVICES IN PROTO
@@ -1,179 +0,0 @@
1
- // package: wechaty.puppet
2
- // file: wechaty/deprecated/file-box.proto
3
-
4
- import * as jspb from "google-protobuf";
5
- import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb";
6
- import * as wechaty_puppet_image_pb from "../../wechaty/puppet/image_pb";
7
-
8
- export class FileBoxChunk extends jspb.Message {
9
- hasData(): boolean;
10
- clearData(): void;
11
- getData(): Uint8Array | string;
12
- getData_asU8(): Uint8Array;
13
- getData_asB64(): string;
14
- setData(value: Uint8Array | string): void;
15
-
16
- hasName(): boolean;
17
- clearName(): void;
18
- getName(): string;
19
- setName(value: string): void;
20
-
21
- serializeBinary(): Uint8Array;
22
- toObject(includeInstance?: boolean): FileBoxChunk.AsObject;
23
- static toObject(includeInstance: boolean, msg: FileBoxChunk): FileBoxChunk.AsObject;
24
- static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
25
- static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
26
- static serializeBinaryToWriter(message: FileBoxChunk, writer: jspb.BinaryWriter): void;
27
- static deserializeBinary(bytes: Uint8Array): FileBoxChunk;
28
- static deserializeBinaryFromReader(message: FileBoxChunk, reader: jspb.BinaryReader): FileBoxChunk;
29
- }
30
-
31
- export namespace FileBoxChunk {
32
- export type AsObject = {
33
- data: Uint8Array | string,
34
- name: string,
35
- }
36
- }
37
-
38
- export class MessageImageStreamRequest extends jspb.Message {
39
- getId(): string;
40
- setId(value: string): void;
41
-
42
- getType(): wechaty_puppet_image_pb.ImageTypeMap[keyof wechaty_puppet_image_pb.ImageTypeMap];
43
- setType(value: wechaty_puppet_image_pb.ImageTypeMap[keyof wechaty_puppet_image_pb.ImageTypeMap]): void;
44
-
45
- serializeBinary(): Uint8Array;
46
- toObject(includeInstance?: boolean): MessageImageStreamRequest.AsObject;
47
- static toObject(includeInstance: boolean, msg: MessageImageStreamRequest): MessageImageStreamRequest.AsObject;
48
- static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
49
- static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
50
- static serializeBinaryToWriter(message: MessageImageStreamRequest, writer: jspb.BinaryWriter): void;
51
- static deserializeBinary(bytes: Uint8Array): MessageImageStreamRequest;
52
- static deserializeBinaryFromReader(message: MessageImageStreamRequest, reader: jspb.BinaryReader): MessageImageStreamRequest;
53
- }
54
-
55
- export namespace MessageImageStreamRequest {
56
- export type AsObject = {
57
- id: string,
58
- type: wechaty_puppet_image_pb.ImageTypeMap[keyof wechaty_puppet_image_pb.ImageTypeMap],
59
- }
60
- }
61
-
62
- export class MessageImageStreamResponse extends jspb.Message {
63
- hasFileBoxChunk(): boolean;
64
- clearFileBoxChunk(): void;
65
- getFileBoxChunk(): FileBoxChunk | undefined;
66
- setFileBoxChunk(value?: FileBoxChunk): void;
67
-
68
- serializeBinary(): Uint8Array;
69
- toObject(includeInstance?: boolean): MessageImageStreamResponse.AsObject;
70
- static toObject(includeInstance: boolean, msg: MessageImageStreamResponse): MessageImageStreamResponse.AsObject;
71
- static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
72
- static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
73
- static serializeBinaryToWriter(message: MessageImageStreamResponse, writer: jspb.BinaryWriter): void;
74
- static deserializeBinary(bytes: Uint8Array): MessageImageStreamResponse;
75
- static deserializeBinaryFromReader(message: MessageImageStreamResponse, reader: jspb.BinaryReader): MessageImageStreamResponse;
76
- }
77
-
78
- export namespace MessageImageStreamResponse {
79
- export type AsObject = {
80
- fileBoxChunk?: FileBoxChunk.AsObject,
81
- }
82
- }
83
-
84
- export class MessageFileStreamRequest extends jspb.Message {
85
- getId(): string;
86
- setId(value: string): void;
87
-
88
- serializeBinary(): Uint8Array;
89
- toObject(includeInstance?: boolean): MessageFileStreamRequest.AsObject;
90
- static toObject(includeInstance: boolean, msg: MessageFileStreamRequest): MessageFileStreamRequest.AsObject;
91
- static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
92
- static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
93
- static serializeBinaryToWriter(message: MessageFileStreamRequest, writer: jspb.BinaryWriter): void;
94
- static deserializeBinary(bytes: Uint8Array): MessageFileStreamRequest;
95
- static deserializeBinaryFromReader(message: MessageFileStreamRequest, reader: jspb.BinaryReader): MessageFileStreamRequest;
96
- }
97
-
98
- export namespace MessageFileStreamRequest {
99
- export type AsObject = {
100
- id: string,
101
- }
102
- }
103
-
104
- export class MessageFileStreamResponse extends jspb.Message {
105
- hasFileBoxChunk(): boolean;
106
- clearFileBoxChunk(): void;
107
- getFileBoxChunk(): FileBoxChunk | undefined;
108
- setFileBoxChunk(value?: FileBoxChunk): void;
109
-
110
- serializeBinary(): Uint8Array;
111
- toObject(includeInstance?: boolean): MessageFileStreamResponse.AsObject;
112
- static toObject(includeInstance: boolean, msg: MessageFileStreamResponse): MessageFileStreamResponse.AsObject;
113
- static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
114
- static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
115
- static serializeBinaryToWriter(message: MessageFileStreamResponse, writer: jspb.BinaryWriter): void;
116
- static deserializeBinary(bytes: Uint8Array): MessageFileStreamResponse;
117
- static deserializeBinaryFromReader(message: MessageFileStreamResponse, reader: jspb.BinaryReader): MessageFileStreamResponse;
118
- }
119
-
120
- export namespace MessageFileStreamResponse {
121
- export type AsObject = {
122
- fileBoxChunk?: FileBoxChunk.AsObject,
123
- }
124
- }
125
-
126
- export class MessageSendFileStreamRequest extends jspb.Message {
127
- hasConversationId(): boolean;
128
- clearConversationId(): void;
129
- getConversationId(): string;
130
- setConversationId(value: string): void;
131
-
132
- hasFileBoxChunk(): boolean;
133
- clearFileBoxChunk(): void;
134
- getFileBoxChunk(): FileBoxChunk | undefined;
135
- setFileBoxChunk(value?: FileBoxChunk): void;
136
-
137
- serializeBinary(): Uint8Array;
138
- toObject(includeInstance?: boolean): MessageSendFileStreamRequest.AsObject;
139
- static toObject(includeInstance: boolean, msg: MessageSendFileStreamRequest): MessageSendFileStreamRequest.AsObject;
140
- static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
141
- static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
142
- static serializeBinaryToWriter(message: MessageSendFileStreamRequest, writer: jspb.BinaryWriter): void;
143
- static deserializeBinary(bytes: Uint8Array): MessageSendFileStreamRequest;
144
- static deserializeBinaryFromReader(message: MessageSendFileStreamRequest, reader: jspb.BinaryReader): MessageSendFileStreamRequest;
145
- }
146
-
147
- export namespace MessageSendFileStreamRequest {
148
- export type AsObject = {
149
- conversationId: string,
150
- fileBoxChunk?: FileBoxChunk.AsObject,
151
- }
152
- }
153
-
154
- export class MessageSendFileStreamResponse extends jspb.Message {
155
- hasIdStringValueDeprecated(): boolean;
156
- clearIdStringValueDeprecated(): void;
157
- getIdStringValueDeprecated(): google_protobuf_wrappers_pb.StringValue | undefined;
158
- setIdStringValueDeprecated(value?: google_protobuf_wrappers_pb.StringValue): void;
159
-
160
- getId(): string;
161
- setId(value: string): void;
162
-
163
- serializeBinary(): Uint8Array;
164
- toObject(includeInstance?: boolean): MessageSendFileStreamResponse.AsObject;
165
- static toObject(includeInstance: boolean, msg: MessageSendFileStreamResponse): MessageSendFileStreamResponse.AsObject;
166
- static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
167
- static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
168
- static serializeBinaryToWriter(message: MessageSendFileStreamResponse, writer: jspb.BinaryWriter): void;
169
- static deserializeBinary(bytes: Uint8Array): MessageSendFileStreamResponse;
170
- static deserializeBinaryFromReader(message: MessageSendFileStreamResponse, reader: jspb.BinaryReader): MessageSendFileStreamResponse;
171
- }
172
-
173
- export namespace MessageSendFileStreamResponse {
174
- export type AsObject = {
175
- idStringValueDeprecated?: google_protobuf_wrappers_pb.StringValue.AsObject,
176
- id: string,
177
- }
178
- }
179
-