@juzi/wechaty-grpc 1.0.16 → 1.0.18
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.
- package/dist/cjs/commonjs/generated/puppet.cjs +2 -0
- package/dist/cjs/commonjs/generated/puppet.cjs.d.ts +2 -0
- package/dist/cjs/out/wechaty/puppet/moment_grpc_pb.js +1 -0
- package/dist/cjs/out/wechaty/puppet/moment_pb.d.ts +300 -0
- package/dist/cjs/out/wechaty/puppet/moment_pb.js +2272 -0
- package/dist/cjs/out/wechaty/puppet/moment_pb_service.d.ts +3 -0
- package/dist/cjs/out/wechaty/puppet/moment_pb_service.js +3 -0
- package/dist/cjs/out/wechaty/puppet/post_grpc_pb.js +1 -0
- package/dist/cjs/out/wechaty/puppet/post_pb.d.ts +176 -0
- package/dist/cjs/out/wechaty/puppet/post_pb.js +1189 -0
- package/dist/cjs/out/wechaty/puppet/post_pb_service.d.ts +3 -0
- package/dist/cjs/out/wechaty/puppet/post_pb_service.js +3 -0
- package/dist/cjs/out/wechaty/puppet/tag_pb.d.ts +3 -2
- package/dist/cjs/out/wechaty/puppet/tag_pb.js +3 -2
- package/dist/cjs/out/wechaty/puppet.openapi.yaml +288 -2
- package/dist/cjs/out/wechaty/puppet.swagger.json +446 -2
- package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +121 -0
- package/dist/cjs/out/wechaty/puppet_grpc_pb.js +238 -0
- package/dist/cjs/out/wechaty/puppet_pb.d.ts +2 -0
- package/dist/cjs/out/wechaty/puppet_pb.js +4 -0
- package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +134 -0
- package/dist/cjs/out/wechaty/puppet_pb_service.js +281 -0
- package/dist/cjs/proto/wechaty/puppet/channel.proto +8 -8
- package/dist/cjs/proto/wechaty/puppet/contact.proto +29 -29
- package/dist/cjs/proto/wechaty/puppet/friendship.proto +14 -14
- package/dist/cjs/proto/wechaty/puppet/location.proto +5 -5
- package/dist/cjs/proto/wechaty/puppet/message.proto +42 -43
- package/dist/cjs/proto/wechaty/puppet/mini-program.proto +9 -9
- package/dist/cjs/proto/wechaty/puppet/moment.proto +66 -0
- package/dist/cjs/proto/wechaty/puppet/post.proto +57 -0
- package/dist/cjs/proto/wechaty/puppet/room-invitation.proto +8 -8
- package/dist/cjs/proto/wechaty/puppet/room-member.proto +4 -4
- package/dist/cjs/proto/wechaty/puppet/room.proto +11 -11
- package/dist/cjs/proto/wechaty/puppet/tag.proto +7 -6
- package/dist/cjs/proto/wechaty/puppet/url-link.proto +4 -4
- package/dist/cjs/proto/wechaty/puppet.proto +58 -0
- package/dist/cjs/src/package-json.js +2 -2
- package/dist/cjs/src/package-json.js.map +1 -1
- package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
- package/dist/cjs/tests/puppet-server-impl.js +35 -0
- package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
- package/dist/esm/commonjs/generated/puppet.cjs +2 -0
- package/dist/esm/commonjs/generated/puppet.cjs.d.ts +2 -0
- package/dist/esm/out/wechaty/puppet/moment_grpc_pb.js +1 -0
- package/dist/esm/out/wechaty/puppet/moment_pb.d.ts +300 -0
- package/dist/esm/out/wechaty/puppet/moment_pb.js +2272 -0
- package/dist/esm/out/wechaty/puppet/moment_pb_service.d.ts +3 -0
- package/dist/esm/out/wechaty/puppet/moment_pb_service.js +3 -0
- package/dist/esm/out/wechaty/puppet/post_grpc_pb.js +1 -0
- package/dist/esm/out/wechaty/puppet/post_pb.d.ts +176 -0
- package/dist/esm/out/wechaty/puppet/post_pb.js +1189 -0
- package/dist/esm/out/wechaty/puppet/post_pb_service.d.ts +3 -0
- package/dist/esm/out/wechaty/puppet/post_pb_service.js +3 -0
- package/dist/esm/out/wechaty/puppet/tag_pb.d.ts +3 -2
- package/dist/esm/out/wechaty/puppet/tag_pb.js +3 -2
- package/dist/esm/out/wechaty/puppet.openapi.yaml +288 -2
- package/dist/esm/out/wechaty/puppet.swagger.json +446 -2
- package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +121 -0
- package/dist/esm/out/wechaty/puppet_grpc_pb.js +238 -0
- package/dist/esm/out/wechaty/puppet_pb.d.ts +2 -0
- package/dist/esm/out/wechaty/puppet_pb.js +4 -0
- package/dist/esm/out/wechaty/puppet_pb_service.d.ts +134 -0
- package/dist/esm/out/wechaty/puppet_pb_service.js +281 -0
- package/dist/esm/proto/wechaty/puppet/channel.proto +8 -8
- package/dist/esm/proto/wechaty/puppet/contact.proto +29 -29
- package/dist/esm/proto/wechaty/puppet/friendship.proto +14 -14
- package/dist/esm/proto/wechaty/puppet/location.proto +5 -5
- package/dist/esm/proto/wechaty/puppet/message.proto +42 -43
- package/dist/esm/proto/wechaty/puppet/mini-program.proto +9 -9
- package/dist/esm/proto/wechaty/puppet/moment.proto +66 -0
- package/dist/esm/proto/wechaty/puppet/post.proto +57 -0
- package/dist/esm/proto/wechaty/puppet/room-invitation.proto +8 -8
- package/dist/esm/proto/wechaty/puppet/room-member.proto +4 -4
- package/dist/esm/proto/wechaty/puppet/room.proto +11 -11
- package/dist/esm/proto/wechaty/puppet/tag.proto +7 -6
- package/dist/esm/proto/wechaty/puppet/url-link.proto +4 -4
- package/dist/esm/proto/wechaty/puppet.proto +58 -0
- package/dist/esm/src/package-json.js +2 -2
- package/dist/esm/src/package-json.js.map +1 -1
- package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
- package/dist/esm/tests/puppet-server-impl.js +35 -0
- package/dist/esm/tests/puppet-server-impl.js.map +1 -1
- package/out/wechaty/puppet/moment_grpc_pb.js +1 -0
- package/out/wechaty/puppet/moment_pb.d.ts +300 -0
- package/out/wechaty/puppet/moment_pb.js +2272 -0
- package/out/wechaty/puppet/moment_pb_service.d.ts +3 -0
- package/out/wechaty/puppet/moment_pb_service.js +3 -0
- package/out/wechaty/puppet/post_grpc_pb.js +1 -0
- package/out/wechaty/puppet/post_pb.d.ts +176 -0
- package/out/wechaty/puppet/post_pb.js +1189 -0
- package/out/wechaty/puppet/post_pb_service.d.ts +3 -0
- package/out/wechaty/puppet/post_pb_service.js +3 -0
- package/out/wechaty/puppet/tag_pb.d.ts +3 -2
- package/out/wechaty/puppet/tag_pb.js +3 -2
- package/out/wechaty/puppet.openapi.yaml +288 -2
- package/out/wechaty/puppet.swagger.json +446 -2
- package/out/wechaty/puppet_grpc_pb.d.ts +121 -0
- package/out/wechaty/puppet_grpc_pb.js +238 -0
- package/out/wechaty/puppet_pb.d.ts +2 -0
- package/out/wechaty/puppet_pb.js +4 -0
- package/out/wechaty/puppet_pb_service.d.ts +134 -0
- package/out/wechaty/puppet_pb_service.js +281 -0
- package/package.json +1 -1
- package/src/package-json.ts +2 -2
|
@@ -13,6 +13,7 @@ var wechaty_puppet_room_invitation_pb = require("../wechaty/puppet/room-invitati
|
|
|
13
13
|
var wechaty_puppet_room_member_pb = require("../wechaty/puppet/room-member_pb");
|
|
14
14
|
var wechaty_puppet_room_pb = require("../wechaty/puppet/room_pb");
|
|
15
15
|
var wechaty_puppet_tag_pb = require("../wechaty/puppet/tag_pb");
|
|
16
|
+
var wechaty_puppet_moment_pb = require("../wechaty/puppet/moment_pb");
|
|
16
17
|
var grpc = require("@improbable-eng/grpc-web").grpc;
|
|
17
18
|
|
|
18
19
|
var Puppet = (function () {
|
|
@@ -669,6 +670,69 @@ Puppet.TagTagContactList = {
|
|
|
669
670
|
responseType: wechaty_puppet_tag_pb.TagTagContactListResponse
|
|
670
671
|
};
|
|
671
672
|
|
|
673
|
+
Puppet.momentPublish = {
|
|
674
|
+
methodName: "momentPublish",
|
|
675
|
+
service: Puppet,
|
|
676
|
+
requestStream: false,
|
|
677
|
+
responseStream: false,
|
|
678
|
+
requestType: wechaty_puppet_moment_pb.MomentPublishRequest,
|
|
679
|
+
responseType: wechaty_puppet_moment_pb.MomentPublishResponse
|
|
680
|
+
};
|
|
681
|
+
|
|
682
|
+
Puppet.momentComment = {
|
|
683
|
+
methodName: "momentComment",
|
|
684
|
+
service: Puppet,
|
|
685
|
+
requestStream: false,
|
|
686
|
+
responseStream: false,
|
|
687
|
+
requestType: wechaty_puppet_moment_pb.MomentCommentRequest,
|
|
688
|
+
responseType: wechaty_puppet_moment_pb.MomentCommentResponse
|
|
689
|
+
};
|
|
690
|
+
|
|
691
|
+
Puppet.momentLike = {
|
|
692
|
+
methodName: "momentLike",
|
|
693
|
+
service: Puppet,
|
|
694
|
+
requestStream: false,
|
|
695
|
+
responseStream: false,
|
|
696
|
+
requestType: wechaty_puppet_moment_pb.MomentLikeRequest,
|
|
697
|
+
responseType: wechaty_puppet_moment_pb.MomentLikeResponse
|
|
698
|
+
};
|
|
699
|
+
|
|
700
|
+
Puppet.momentSignature = {
|
|
701
|
+
methodName: "momentSignature",
|
|
702
|
+
service: Puppet,
|
|
703
|
+
requestStream: false,
|
|
704
|
+
responseStream: false,
|
|
705
|
+
requestType: wechaty_puppet_moment_pb.MomentSignatureRequest,
|
|
706
|
+
responseType: wechaty_puppet_moment_pb.MomentSignatureResponse
|
|
707
|
+
};
|
|
708
|
+
|
|
709
|
+
Puppet.momentCoverage = {
|
|
710
|
+
methodName: "momentCoverage",
|
|
711
|
+
service: Puppet,
|
|
712
|
+
requestStream: false,
|
|
713
|
+
responseStream: false,
|
|
714
|
+
requestType: wechaty_puppet_moment_pb.MomentCoverageRequest,
|
|
715
|
+
responseType: wechaty_puppet_moment_pb.MomentCoverageResponse
|
|
716
|
+
};
|
|
717
|
+
|
|
718
|
+
Puppet.momentPayload = {
|
|
719
|
+
methodName: "momentPayload",
|
|
720
|
+
service: Puppet,
|
|
721
|
+
requestStream: false,
|
|
722
|
+
responseStream: false,
|
|
723
|
+
requestType: wechaty_puppet_moment_pb.MomentPayloadRequest,
|
|
724
|
+
responseType: wechaty_puppet_moment_pb.MomentPayloadResponse
|
|
725
|
+
};
|
|
726
|
+
|
|
727
|
+
Puppet.momentPayloadSayable = {
|
|
728
|
+
methodName: "momentPayloadSayable",
|
|
729
|
+
service: Puppet,
|
|
730
|
+
requestStream: false,
|
|
731
|
+
responseStream: false,
|
|
732
|
+
requestType: wechaty_puppet_moment_pb.MomentPayloadSayableRequest,
|
|
733
|
+
responseType: wechaty_puppet_moment_pb.MomentPayloadSayableResponse
|
|
734
|
+
};
|
|
735
|
+
|
|
672
736
|
Puppet.Download = {
|
|
673
737
|
methodName: "Download",
|
|
674
738
|
service: Puppet,
|
|
@@ -2960,6 +3024,223 @@ PuppetClient.prototype.tagTagContactList = function tagTagContactList(requestMes
|
|
|
2960
3024
|
};
|
|
2961
3025
|
};
|
|
2962
3026
|
|
|
3027
|
+
PuppetClient.prototype.momentPublish = function momentPublish(requestMessage, metadata, callback) {
|
|
3028
|
+
if (arguments.length === 2) {
|
|
3029
|
+
callback = arguments[1];
|
|
3030
|
+
}
|
|
3031
|
+
var client = grpc.unary(Puppet.momentPublish, {
|
|
3032
|
+
request: requestMessage,
|
|
3033
|
+
host: this.serviceHost,
|
|
3034
|
+
metadata: metadata,
|
|
3035
|
+
transport: this.options.transport,
|
|
3036
|
+
debug: this.options.debug,
|
|
3037
|
+
onEnd: function (response) {
|
|
3038
|
+
if (callback) {
|
|
3039
|
+
if (response.status !== grpc.Code.OK) {
|
|
3040
|
+
var err = new Error(response.statusMessage);
|
|
3041
|
+
err.code = response.status;
|
|
3042
|
+
err.metadata = response.trailers;
|
|
3043
|
+
callback(err, null);
|
|
3044
|
+
} else {
|
|
3045
|
+
callback(null, response.message);
|
|
3046
|
+
}
|
|
3047
|
+
}
|
|
3048
|
+
}
|
|
3049
|
+
});
|
|
3050
|
+
return {
|
|
3051
|
+
cancel: function () {
|
|
3052
|
+
callback = null;
|
|
3053
|
+
client.close();
|
|
3054
|
+
}
|
|
3055
|
+
};
|
|
3056
|
+
};
|
|
3057
|
+
|
|
3058
|
+
PuppetClient.prototype.momentComment = function momentComment(requestMessage, metadata, callback) {
|
|
3059
|
+
if (arguments.length === 2) {
|
|
3060
|
+
callback = arguments[1];
|
|
3061
|
+
}
|
|
3062
|
+
var client = grpc.unary(Puppet.momentComment, {
|
|
3063
|
+
request: requestMessage,
|
|
3064
|
+
host: this.serviceHost,
|
|
3065
|
+
metadata: metadata,
|
|
3066
|
+
transport: this.options.transport,
|
|
3067
|
+
debug: this.options.debug,
|
|
3068
|
+
onEnd: function (response) {
|
|
3069
|
+
if (callback) {
|
|
3070
|
+
if (response.status !== grpc.Code.OK) {
|
|
3071
|
+
var err = new Error(response.statusMessage);
|
|
3072
|
+
err.code = response.status;
|
|
3073
|
+
err.metadata = response.trailers;
|
|
3074
|
+
callback(err, null);
|
|
3075
|
+
} else {
|
|
3076
|
+
callback(null, response.message);
|
|
3077
|
+
}
|
|
3078
|
+
}
|
|
3079
|
+
}
|
|
3080
|
+
});
|
|
3081
|
+
return {
|
|
3082
|
+
cancel: function () {
|
|
3083
|
+
callback = null;
|
|
3084
|
+
client.close();
|
|
3085
|
+
}
|
|
3086
|
+
};
|
|
3087
|
+
};
|
|
3088
|
+
|
|
3089
|
+
PuppetClient.prototype.momentLike = function momentLike(requestMessage, metadata, callback) {
|
|
3090
|
+
if (arguments.length === 2) {
|
|
3091
|
+
callback = arguments[1];
|
|
3092
|
+
}
|
|
3093
|
+
var client = grpc.unary(Puppet.momentLike, {
|
|
3094
|
+
request: requestMessage,
|
|
3095
|
+
host: this.serviceHost,
|
|
3096
|
+
metadata: metadata,
|
|
3097
|
+
transport: this.options.transport,
|
|
3098
|
+
debug: this.options.debug,
|
|
3099
|
+
onEnd: function (response) {
|
|
3100
|
+
if (callback) {
|
|
3101
|
+
if (response.status !== grpc.Code.OK) {
|
|
3102
|
+
var err = new Error(response.statusMessage);
|
|
3103
|
+
err.code = response.status;
|
|
3104
|
+
err.metadata = response.trailers;
|
|
3105
|
+
callback(err, null);
|
|
3106
|
+
} else {
|
|
3107
|
+
callback(null, response.message);
|
|
3108
|
+
}
|
|
3109
|
+
}
|
|
3110
|
+
}
|
|
3111
|
+
});
|
|
3112
|
+
return {
|
|
3113
|
+
cancel: function () {
|
|
3114
|
+
callback = null;
|
|
3115
|
+
client.close();
|
|
3116
|
+
}
|
|
3117
|
+
};
|
|
3118
|
+
};
|
|
3119
|
+
|
|
3120
|
+
PuppetClient.prototype.momentSignature = function momentSignature(requestMessage, metadata, callback) {
|
|
3121
|
+
if (arguments.length === 2) {
|
|
3122
|
+
callback = arguments[1];
|
|
3123
|
+
}
|
|
3124
|
+
var client = grpc.unary(Puppet.momentSignature, {
|
|
3125
|
+
request: requestMessage,
|
|
3126
|
+
host: this.serviceHost,
|
|
3127
|
+
metadata: metadata,
|
|
3128
|
+
transport: this.options.transport,
|
|
3129
|
+
debug: this.options.debug,
|
|
3130
|
+
onEnd: function (response) {
|
|
3131
|
+
if (callback) {
|
|
3132
|
+
if (response.status !== grpc.Code.OK) {
|
|
3133
|
+
var err = new Error(response.statusMessage);
|
|
3134
|
+
err.code = response.status;
|
|
3135
|
+
err.metadata = response.trailers;
|
|
3136
|
+
callback(err, null);
|
|
3137
|
+
} else {
|
|
3138
|
+
callback(null, response.message);
|
|
3139
|
+
}
|
|
3140
|
+
}
|
|
3141
|
+
}
|
|
3142
|
+
});
|
|
3143
|
+
return {
|
|
3144
|
+
cancel: function () {
|
|
3145
|
+
callback = null;
|
|
3146
|
+
client.close();
|
|
3147
|
+
}
|
|
3148
|
+
};
|
|
3149
|
+
};
|
|
3150
|
+
|
|
3151
|
+
PuppetClient.prototype.momentCoverage = function momentCoverage(requestMessage, metadata, callback) {
|
|
3152
|
+
if (arguments.length === 2) {
|
|
3153
|
+
callback = arguments[1];
|
|
3154
|
+
}
|
|
3155
|
+
var client = grpc.unary(Puppet.momentCoverage, {
|
|
3156
|
+
request: requestMessage,
|
|
3157
|
+
host: this.serviceHost,
|
|
3158
|
+
metadata: metadata,
|
|
3159
|
+
transport: this.options.transport,
|
|
3160
|
+
debug: this.options.debug,
|
|
3161
|
+
onEnd: function (response) {
|
|
3162
|
+
if (callback) {
|
|
3163
|
+
if (response.status !== grpc.Code.OK) {
|
|
3164
|
+
var err = new Error(response.statusMessage);
|
|
3165
|
+
err.code = response.status;
|
|
3166
|
+
err.metadata = response.trailers;
|
|
3167
|
+
callback(err, null);
|
|
3168
|
+
} else {
|
|
3169
|
+
callback(null, response.message);
|
|
3170
|
+
}
|
|
3171
|
+
}
|
|
3172
|
+
}
|
|
3173
|
+
});
|
|
3174
|
+
return {
|
|
3175
|
+
cancel: function () {
|
|
3176
|
+
callback = null;
|
|
3177
|
+
client.close();
|
|
3178
|
+
}
|
|
3179
|
+
};
|
|
3180
|
+
};
|
|
3181
|
+
|
|
3182
|
+
PuppetClient.prototype.momentPayload = function momentPayload(requestMessage, metadata, callback) {
|
|
3183
|
+
if (arguments.length === 2) {
|
|
3184
|
+
callback = arguments[1];
|
|
3185
|
+
}
|
|
3186
|
+
var client = grpc.unary(Puppet.momentPayload, {
|
|
3187
|
+
request: requestMessage,
|
|
3188
|
+
host: this.serviceHost,
|
|
3189
|
+
metadata: metadata,
|
|
3190
|
+
transport: this.options.transport,
|
|
3191
|
+
debug: this.options.debug,
|
|
3192
|
+
onEnd: function (response) {
|
|
3193
|
+
if (callback) {
|
|
3194
|
+
if (response.status !== grpc.Code.OK) {
|
|
3195
|
+
var err = new Error(response.statusMessage);
|
|
3196
|
+
err.code = response.status;
|
|
3197
|
+
err.metadata = response.trailers;
|
|
3198
|
+
callback(err, null);
|
|
3199
|
+
} else {
|
|
3200
|
+
callback(null, response.message);
|
|
3201
|
+
}
|
|
3202
|
+
}
|
|
3203
|
+
}
|
|
3204
|
+
});
|
|
3205
|
+
return {
|
|
3206
|
+
cancel: function () {
|
|
3207
|
+
callback = null;
|
|
3208
|
+
client.close();
|
|
3209
|
+
}
|
|
3210
|
+
};
|
|
3211
|
+
};
|
|
3212
|
+
|
|
3213
|
+
PuppetClient.prototype.momentPayloadSayable = function momentPayloadSayable(requestMessage, metadata, callback) {
|
|
3214
|
+
if (arguments.length === 2) {
|
|
3215
|
+
callback = arguments[1];
|
|
3216
|
+
}
|
|
3217
|
+
var client = grpc.unary(Puppet.momentPayloadSayable, {
|
|
3218
|
+
request: requestMessage,
|
|
3219
|
+
host: this.serviceHost,
|
|
3220
|
+
metadata: metadata,
|
|
3221
|
+
transport: this.options.transport,
|
|
3222
|
+
debug: this.options.debug,
|
|
3223
|
+
onEnd: function (response) {
|
|
3224
|
+
if (callback) {
|
|
3225
|
+
if (response.status !== grpc.Code.OK) {
|
|
3226
|
+
var err = new Error(response.statusMessage);
|
|
3227
|
+
err.code = response.status;
|
|
3228
|
+
err.metadata = response.trailers;
|
|
3229
|
+
callback(err, null);
|
|
3230
|
+
} else {
|
|
3231
|
+
callback(null, response.message);
|
|
3232
|
+
}
|
|
3233
|
+
}
|
|
3234
|
+
}
|
|
3235
|
+
});
|
|
3236
|
+
return {
|
|
3237
|
+
cancel: function () {
|
|
3238
|
+
callback = null;
|
|
3239
|
+
client.close();
|
|
3240
|
+
}
|
|
3241
|
+
};
|
|
3242
|
+
};
|
|
3243
|
+
|
|
2963
3244
|
PuppetClient.prototype.download = function download(requestMessage, metadata) {
|
|
2964
3245
|
var listeners = {
|
|
2965
3246
|
data: [],
|
|
@@ -6,12 +6,12 @@ option java_package = "io.github.wechaty.grpc.puppet";
|
|
|
6
6
|
option csharp_namespace = "github.wechaty.grpc.puppet";
|
|
7
7
|
|
|
8
8
|
message ChannelPayload {
|
|
9
|
-
string avatar = 1;
|
|
10
|
-
string cover_url = 2;
|
|
11
|
-
string desc = 3;
|
|
12
|
-
string extras = 4;
|
|
13
|
-
int32 feed_type = 5;
|
|
14
|
-
string nickname = 6;
|
|
15
|
-
string thumb_url = 7;
|
|
16
|
-
string url = 8;
|
|
9
|
+
string avatar = 1; // 头像
|
|
10
|
+
string cover_url = 2; // 封面地址
|
|
11
|
+
string desc = 3; // 描述
|
|
12
|
+
string extras = 4; // 额外信息,暂不明确含义,但传错会导致无法发出(红色感叹号)。应根据收到的视频号的extras字段填入。
|
|
13
|
+
int32 feed_type = 5; // 暂不明确含义,目前请固定传4
|
|
14
|
+
string nickname = 6; // 用户名
|
|
15
|
+
string thumb_url = 7; // 缩略图地址
|
|
16
|
+
string url = 8; // 视频号地址
|
|
17
17
|
}
|
|
@@ -7,17 +7,17 @@ option csharp_namespace = "github.wechaty.grpc.puppet";
|
|
|
7
7
|
|
|
8
8
|
import "google/protobuf/wrappers.proto";
|
|
9
9
|
|
|
10
|
-
enum ContactGender {
|
|
11
|
-
CONTACT_GENDER_UNSPECIFIED = 0;
|
|
12
|
-
CONTACT_GENDER_MALE = 1;
|
|
13
|
-
CONTACT_GENDER_FEMALE = 2;
|
|
10
|
+
enum ContactGender { // 性别枚举
|
|
11
|
+
CONTACT_GENDER_UNSPECIFIED = 0; // 不明确
|
|
12
|
+
CONTACT_GENDER_MALE = 1; // 男
|
|
13
|
+
CONTACT_GENDER_FEMALE = 2; // 女
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
enum ContactType {
|
|
17
|
-
CONTACT_TYPE_UNSPECIFIED = 0;
|
|
18
|
-
CONTACT_TYPE_PERSONAL = 1;
|
|
19
|
-
CONTACT_TYPE_OFFICIAL = 2;
|
|
20
|
-
CONTACT_TYPE_CORPORATION = 3;
|
|
16
|
+
enum ContactType { // 类型枚举
|
|
17
|
+
CONTACT_TYPE_UNSPECIFIED = 0; // 不明确
|
|
18
|
+
CONTACT_TYPE_PERSONAL = 1; // 个微联系人
|
|
19
|
+
CONTACT_TYPE_OFFICIAL = 2; // 公众号
|
|
20
|
+
CONTACT_TYPE_CORPORATION = 3; // 企微联系人
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
message ContactListRequest {}
|
|
@@ -30,17 +30,17 @@ message ContactPayloadRequest {
|
|
|
30
30
|
}
|
|
31
31
|
message ContactPayloadResponse {
|
|
32
32
|
string id = 1;
|
|
33
|
-
ContactGender gender = 2;
|
|
34
|
-
ContactType type = 3;
|
|
35
|
-
string name = 4;
|
|
36
|
-
string avatar = 5;
|
|
37
|
-
string address = 6;
|
|
38
|
-
string alias = 7;
|
|
39
|
-
string city = 8;
|
|
40
|
-
bool friend = 9;
|
|
41
|
-
string province = 10
|
|
42
|
-
string signature = 11
|
|
43
|
-
bool star = 12
|
|
33
|
+
ContactGender gender = 2; // 性别
|
|
34
|
+
ContactType type = 3; // 类型
|
|
35
|
+
string name = 4; // 姓名
|
|
36
|
+
string avatar = 5; // 头像
|
|
37
|
+
string address = 6; // 地址
|
|
38
|
+
string alias = 7; // 别名,即备注
|
|
39
|
+
string city = 8; // 城市
|
|
40
|
+
bool friend = 9; // 是否为好友
|
|
41
|
+
string province = 10;// 省份
|
|
42
|
+
string signature = 11;// 签名
|
|
43
|
+
bool star = 12;// 是否为特别好友
|
|
44
44
|
/**
|
|
45
45
|
* Huan(202203): in gRPC, we can freely rename the field name as long as the number keep consistent.
|
|
46
46
|
* so we can just rename `weixin` to `handle` here.
|
|
@@ -52,15 +52,15 @@ message ContactPayloadResponse {
|
|
|
52
52
|
*
|
|
53
53
|
* TODO: rename `weixin` to `handle` in v2.0.0
|
|
54
54
|
*/
|
|
55
|
-
string weixin = 13
|
|
56
|
-
string corporation = 14
|
|
57
|
-
string title = 15
|
|
58
|
-
string description = 16
|
|
59
|
-
bool coworker = 17
|
|
60
|
-
repeated string phones = 18
|
|
61
|
-
string additional_info = 19
|
|
62
|
-
|
|
63
|
-
repeated string tag_ids = 20;
|
|
55
|
+
string weixin = 13;// IM专属id,在企微环境中特指weixinId
|
|
56
|
+
string corporation = 14;// 企业
|
|
57
|
+
string title = 15;// 头衔
|
|
58
|
+
string description = 16;// 描述
|
|
59
|
+
bool coworker = 17;// 是否为同事
|
|
60
|
+
repeated string phones = 18;// 电话号码,企微中最多5个
|
|
61
|
+
string additional_info = 19;// 额外信息,是由JS对象stringify得到的字符串,目前支持的内容包含addContactTime、corpId等。
|
|
62
|
+
|
|
63
|
+
repeated string tag_ids = 20; // 标签(的id)
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
message ContactSelfQRCodeRequest {}
|
|
@@ -8,16 +8,16 @@ option csharp_namespace = "github.wechaty.grpc.puppet";
|
|
|
8
8
|
import "google/protobuf/wrappers.proto";
|
|
9
9
|
import "wechaty/puppet/referrer.proto";
|
|
10
10
|
|
|
11
|
-
enum FriendshipType {
|
|
12
|
-
FRIENDSHIP_TYPE_UNSPECIFIED = 0;
|
|
13
|
-
FRIENDSHIP_TYPE_CONFIRM = 1;
|
|
14
|
-
FRIENDSHIP_TYPE_RECEIVE = 2;
|
|
15
|
-
FRIENDSHIP_TYPE_VERIFY = 3;
|
|
16
|
-
FRIENDSHIP_TYPE_DELETE = 4;
|
|
17
|
-
FRIENDSHIP_TYPE_REMOVED = 5;
|
|
11
|
+
enum FriendshipType { // 事件类型
|
|
12
|
+
FRIENDSHIP_TYPE_UNSPECIFIED = 0; // 不明确
|
|
13
|
+
FRIENDSHIP_TYPE_CONFIRM = 1; // 确认——双方互加后触发
|
|
14
|
+
FRIENDSHIP_TYPE_RECEIVE = 2; // 收到——收到好友请求后触发
|
|
15
|
+
FRIENDSHIP_TYPE_VERIFY = 3; // 验证——主动加他人为好友时触发,wxwork里暂无此事件
|
|
16
|
+
FRIENDSHIP_TYPE_DELETE = 4; // 删除——主动删除好友时触发
|
|
17
|
+
FRIENDSHIP_TYPE_REMOVED = 5; // 被删除——被他人删除好友时触发
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
enum FriendshipSceneType {
|
|
20
|
+
enum FriendshipSceneType { // 事件场景 wxwork中未使用
|
|
21
21
|
FRIENDSHIP_SCENE_TYPE_UNSPECIFIED = 0;
|
|
22
22
|
|
|
23
23
|
FRIENDSHIP_SCENE_TYPE_QQ = 1;
|
|
@@ -45,12 +45,12 @@ message FriendshipPayloadRequest {
|
|
|
45
45
|
}
|
|
46
46
|
message FriendshipPayloadResponse {
|
|
47
47
|
string id = 1;
|
|
48
|
-
string contact_id = 2;
|
|
49
|
-
string hello = 3;
|
|
50
|
-
FriendshipType type = 4;
|
|
51
|
-
string stranger = 5;
|
|
52
|
-
string ticket = 6;
|
|
53
|
-
FriendshipSceneType scene = 7;
|
|
48
|
+
string contact_id = 2; // 加好友的联系人id
|
|
49
|
+
string hello = 3; // 加好友的打招呼消息
|
|
50
|
+
FriendshipType type = 4; // 好友事件类型
|
|
51
|
+
string stranger = 5; // 不明确含义,wxwork中未使用
|
|
52
|
+
string ticket = 6; // 个微遗留字段,wxwork中会传corp_id
|
|
53
|
+
FriendshipSceneType scene = 7; // 加好友的场景(例如通过名片添加、通过群添加等),wxwork未使用
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
message FriendshipSearchPhoneRequest {
|
|
@@ -6,9 +6,9 @@ option java_package = "io.github.wechaty.grpc.puppet";
|
|
|
6
6
|
option csharp_namespace = "github.wechaty.grpc.puppet";
|
|
7
7
|
|
|
8
8
|
message LocationPayload {
|
|
9
|
-
float accuracy = 1;
|
|
10
|
-
string address = 2;
|
|
11
|
-
double latitude = 3;
|
|
12
|
-
double longitude = 4;
|
|
13
|
-
string name = 5;
|
|
9
|
+
float accuracy = 1; // 精确度,默认为15
|
|
10
|
+
string address = 2; // 地址,xx省xx市xx区xx路xx号
|
|
11
|
+
double latitude = 3; // 纬度,北纬为正
|
|
12
|
+
double longitude = 4; // 经度,东经为正
|
|
13
|
+
string name = 5; // 地址名,例如xx大厦
|
|
14
14
|
}
|
|
@@ -20,28 +20,27 @@ import "wechaty/puppet/mini-program.proto";
|
|
|
20
20
|
import "wechaty/puppet/url-link.proto";
|
|
21
21
|
import "wechaty/puppet/channel.proto";
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
enum MessageType {
|
|
23
|
+
enum MessageType { // 消息类型
|
|
25
24
|
MESSAGE_TYPE_UNSPECIFIED = 0;
|
|
26
25
|
|
|
27
|
-
MESSAGE_TYPE_ATTACHMENT = 1;
|
|
28
|
-
MESSAGE_TYPE_AUDIO = 2;
|
|
29
|
-
MESSAGE_TYPE_CONTACT = 3;
|
|
30
|
-
MESSAGE_TYPE_CHAT_HISTORY = 4;
|
|
31
|
-
MESSAGE_TYPE_EMOTCION = 5;
|
|
32
|
-
MESSAGE_TYPE_IMAGE = 6;
|
|
33
|
-
MESSAGE_TYPE_TEXT = 7;
|
|
34
|
-
MESSAGE_TYPE_LOCATION = 8;
|
|
35
|
-
MESSAGE_TYPE_MINI_PROGRAM = 9;
|
|
36
|
-
MESSAGE_TYPE_GROUP_NOTE = 10
|
|
37
|
-
MESSAGE_TYPE_TRANSFER = 11
|
|
38
|
-
MESSAGE_TYPE_RED_ENVELOPE = 12
|
|
39
|
-
MESSAGE_TYPE_RECALLED = 13
|
|
40
|
-
MESSAGE_TYPE_URL = 14
|
|
41
|
-
MESSAGE_TYPE_VIDEO = 15
|
|
42
|
-
MESSAGE_TYPE_POST = 16
|
|
43
|
-
MESSAGE_TYPE_CHANNEL = 17
|
|
44
|
-
MESSAGE_TYPE_SYSTEM = 18
|
|
26
|
+
MESSAGE_TYPE_ATTACHMENT = 1; // 文件消息
|
|
27
|
+
MESSAGE_TYPE_AUDIO = 2; // 音频
|
|
28
|
+
MESSAGE_TYPE_CONTACT = 3; // 名片
|
|
29
|
+
MESSAGE_TYPE_CHAT_HISTORY = 4; // 聊天记录,wxwork暂不支持
|
|
30
|
+
MESSAGE_TYPE_EMOTCION = 5; // 表情
|
|
31
|
+
MESSAGE_TYPE_IMAGE = 6; // 图片
|
|
32
|
+
MESSAGE_TYPE_TEXT = 7; // 文本
|
|
33
|
+
MESSAGE_TYPE_LOCATION = 8; // 地址
|
|
34
|
+
MESSAGE_TYPE_MINI_PROGRAM = 9; // 小程序
|
|
35
|
+
MESSAGE_TYPE_GROUP_NOTE = 10;// 群接龙消息,wxwork中没有
|
|
36
|
+
MESSAGE_TYPE_TRANSFER = 11;// 转账,wxwork中没有
|
|
37
|
+
MESSAGE_TYPE_RED_ENVELOPE = 12;// 红包,wxwork中没有
|
|
38
|
+
MESSAGE_TYPE_RECALLED = 13;// 撤回
|
|
39
|
+
MESSAGE_TYPE_URL = 14;// 链接
|
|
40
|
+
MESSAGE_TYPE_VIDEO = 15;// 视频
|
|
41
|
+
MESSAGE_TYPE_POST = 16;// 特殊的复合类型,wxwork中没有
|
|
42
|
+
MESSAGE_TYPE_CHANNEL = 17;// 视频号
|
|
43
|
+
MESSAGE_TYPE_SYSTEM = 18;// 系统消息
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
message MessagePayloadRequest {
|
|
@@ -49,25 +48,25 @@ message MessagePayloadRequest {
|
|
|
49
48
|
}
|
|
50
49
|
message MessagePayloadResponse {
|
|
51
50
|
string id = 1;
|
|
52
|
-
string filename = 2;
|
|
53
|
-
string text = 3;
|
|
51
|
+
string filename = 2; // 文件名
|
|
52
|
+
string text = 3; // 文本内容
|
|
54
53
|
/**
|
|
55
54
|
* @deprecated will be removed after Dec 31, 2022
|
|
56
55
|
* Huan(202109): use receive_time(10) instead
|
|
57
56
|
*/
|
|
58
57
|
uint64 timestamp_deprecated = 4 [deprecated = true];
|
|
59
|
-
MessageType type = 5;
|
|
60
|
-
string talker_id = 6;
|
|
61
|
-
string room_id = 7;
|
|
62
|
-
string listener_id = 8;
|
|
63
|
-
repeated string mention_ids = 9;
|
|
64
|
-
google.protobuf.Timestamp receive_time = 10;
|
|
65
|
-
optional string quote_id = 11;
|
|
58
|
+
MessageType type = 5; // 类型
|
|
59
|
+
string talker_id = 6; // 发送者id
|
|
60
|
+
string room_id = 7; // 群聊id
|
|
61
|
+
string listener_id = 8; // 接受者id
|
|
62
|
+
repeated string mention_ids = 9; // 群消息@人的id列表
|
|
63
|
+
google.protobuf.Timestamp receive_time = 10; // 收到消息时间
|
|
64
|
+
optional string quote_id = 11; // 被引用的消息id
|
|
66
65
|
}
|
|
67
66
|
|
|
68
67
|
message MessageImageRequest {
|
|
69
68
|
string id = 1;
|
|
70
|
-
ImageType type = 2;
|
|
69
|
+
ImageType type = 2; // 获取图片的类型(缩略图、原图)
|
|
71
70
|
}
|
|
72
71
|
message MessageImageResponse {
|
|
73
72
|
string file_box = 1;
|
|
@@ -133,8 +132,8 @@ message MessageSendContactResponse {
|
|
|
133
132
|
}
|
|
134
133
|
|
|
135
134
|
message MessageSendFileRequest {
|
|
136
|
-
string conversation_id = 1;
|
|
137
|
-
string file_box = 2;
|
|
135
|
+
string conversation_id = 1; // 对话id
|
|
136
|
+
string file_box = 2; // 发送文件的fileBox.toJSON()
|
|
138
137
|
}
|
|
139
138
|
message MessageSendFileResponse {
|
|
140
139
|
/**
|
|
@@ -146,11 +145,11 @@ message MessageSendFileResponse {
|
|
|
146
145
|
string id = 2;
|
|
147
146
|
}
|
|
148
147
|
|
|
149
|
-
message MessageSendTextRequest {
|
|
150
|
-
string conversation_id = 1;
|
|
151
|
-
string text = 2;
|
|
152
|
-
repeated string mentional_ids = 3;
|
|
153
|
-
optional string quote_id = 4;
|
|
148
|
+
message MessageSendTextRequest { // 发文本消息
|
|
149
|
+
string conversation_id = 1; // 对话id
|
|
150
|
+
string text = 2; // 文本内容
|
|
151
|
+
repeated string mentional_ids = 3; // @人id列表
|
|
152
|
+
optional string quote_id = 4; // 引用消息的id
|
|
154
153
|
}
|
|
155
154
|
message MessageSendTextResponse {
|
|
156
155
|
/**
|
|
@@ -163,13 +162,13 @@ message MessageSendTextResponse {
|
|
|
163
162
|
}
|
|
164
163
|
|
|
165
164
|
message MessageSendMiniProgramRequest {
|
|
166
|
-
string conversation_id = 1;
|
|
165
|
+
string conversation_id = 1; // 对话id
|
|
167
166
|
/**
|
|
168
167
|
* Huan(202110): We should use payload instead of JSON.stringify string
|
|
169
168
|
* The compatible code will be removed after Dec 31, 2022
|
|
170
169
|
*/
|
|
171
170
|
string mini_program_deprecated = 2 [deprecated = true]; // deprecated after Sep 31, 2021, remove compatible code after Dec 31, 2022
|
|
172
|
-
MiniProgramPayload mini_program = 3;
|
|
171
|
+
MiniProgramPayload mini_program = 3; // 小程序payload
|
|
173
172
|
}
|
|
174
173
|
message MessageSendMiniProgramResponse {
|
|
175
174
|
/**
|
|
@@ -182,13 +181,13 @@ message MessageSendMiniProgramResponse {
|
|
|
182
181
|
}
|
|
183
182
|
|
|
184
183
|
message MessageSendUrlRequest {
|
|
185
|
-
string conversation_id = 1;
|
|
184
|
+
string conversation_id = 1; // 对话id
|
|
186
185
|
/**
|
|
187
186
|
* Huan(202110): We should use payload instead of JSON.stringify string
|
|
188
187
|
* The compatible code will be removed after Dec 31, 2022
|
|
189
188
|
*/
|
|
190
189
|
string url_link_deprecated = 2 [deprecated = true]; // deprecated after Sep 31, 2021, remove compatible code after Dec 31, 2022
|
|
191
|
-
UrlLinkPayload url_link = 3;
|
|
190
|
+
UrlLinkPayload url_link = 3; // 链接payload
|
|
192
191
|
}
|
|
193
192
|
message MessageSendUrlResponse {
|
|
194
193
|
/**
|
|
@@ -207,8 +206,8 @@ message MessageRecallResponse {
|
|
|
207
206
|
bool success = 1;
|
|
208
207
|
}
|
|
209
208
|
message MessageForwardRequest{
|
|
210
|
-
string message_id = 1;
|
|
211
|
-
string conversation_id = 2;
|
|
209
|
+
string message_id = 1; // 要转发的消息id
|
|
210
|
+
string conversation_id = 2; // 对话id
|
|
212
211
|
}
|
|
213
212
|
message MessageForwardResponse {
|
|
214
213
|
/**
|
|
@@ -6,13 +6,13 @@ option java_package = "io.github.wechaty.grpc.puppet";
|
|
|
6
6
|
option csharp_namespace = "github.wechaty.grpc.puppet";
|
|
7
7
|
|
|
8
8
|
message MiniProgramPayload {
|
|
9
|
-
string appid = 1;
|
|
10
|
-
string description = 2;
|
|
11
|
-
string page_path = 3;
|
|
12
|
-
string icon_url = 4;
|
|
13
|
-
string share_id = 5;
|
|
14
|
-
string thumb_url = 6;
|
|
15
|
-
string title = 7;
|
|
16
|
-
string username = 8;
|
|
17
|
-
string thumb_key = 9;
|
|
9
|
+
string appid = 1; // appId,形式如wx4ff94de0d8038c25
|
|
10
|
+
string description = 2; // 描述(副标题)
|
|
11
|
+
string page_path = 3; // 访问路径
|
|
12
|
+
string icon_url = 4; // 图标路径
|
|
13
|
+
string share_id = 5; // 发送小程序的用户id,可不填
|
|
14
|
+
string thumb_url = 6; // 缩略图路径
|
|
15
|
+
string title = 7; // 标题
|
|
16
|
+
string username = 8; // 关联公众号id,形式gh_69105b80ea75@app
|
|
17
|
+
string thumb_key = 9; // 缩略图的key,可不填
|
|
18
18
|
}
|