Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/wecom #54

Merged
merged 4 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions commonjs/generated/puppet.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const puppetFileList = [
'../../out/wechaty/puppet/verify-code_pb.js',
'../../out/wechaty/puppet/call_pb.js',
'../../out/wechaty/puppet/chat-history_pb.js',
'../../out/wechaty/puppet/wecom_pb.js',

'../../out/wechaty/puppet_grpc_pb.js',
'../../out/wechaty/puppet_pb.js',
Expand Down
1 change: 1 addition & 0 deletions commonjs/generated/puppet.cjs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export * from '../../out/wechaty/puppet/util_pb.js'
export * from '../../out/wechaty/puppet/verify-code_pb.js'
export * from '../../out/wechaty/puppet/call_pb.js'
export * from '../../out/wechaty/puppet/chat-history_pb.js'
export * from '../../out/wechaty/puppet/wecom_pb.js'

export * from '../../out/wechaty/puppet_grpc_pb.js'
export * from '../../out/wechaty/puppet_pb.js'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@juzi/wechaty-grpc",
"version": "1.0.71",
"version": "1.0.72",
"description": "gRPC for Wechaty",
"type": "module",
"exports": {
Expand Down
11 changes: 11 additions & 0 deletions proto/wechaty/puppet.proto
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import "wechaty/puppet/conversation.proto";
import "wechaty/puppet/post.proto";
import "wechaty/puppet/moment.proto";
import "wechaty/puppet/verify-code.proto";
import "wechaty/puppet/wecom.proto";

option java_package="io.github.wechaty.grpc";
option go_package="github.com/wechaty/go-grpc/wechaty";
Expand Down Expand Up @@ -748,6 +749,16 @@ service Puppet {
};
}

/**
* Wecom
*/

rpc GetContactExternalUserId (puppet.GetContactExternalUserIdRequest) returns (puppet.GetContactExternalUserIdResponse) {
option (google.api.http) = {
post: "/contact/externalUserId"
body: "*"
};
}

/**
* File/Blob download & upload
Expand Down
20 changes: 20 additions & 0 deletions proto/wechaty/puppet/wecom.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
syntax = "proto3";
package wechaty.puppet;

option go_package = "github.com/wechaty/go-grpc/wechaty/puppet";
option java_package = "io.github.wechaty.grpc.puppet";
option csharp_namespace = "github.wechaty.grpc.puppet";

message ContactExternalUserIdPair {
string contact_id = 1;
string external_user_id = 2;
}

message GetContactExternalUserIdRequest {
repeated string contact_ids = 1;
string service_provider_id = 2;
}

message GetContactExternalUserIdResponse {
repeated ContactExternalUserIdPair contact_external_user_id_paris = 1;
}
6 changes: 6 additions & 0 deletions tests/puppet-server-impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,12 @@ export const puppetServerImpl: IPuppetServer = {
throw new Error('not implemented.')
},

getContactExternalUserId: (call, callback) => {
void call
void callback
throw new Error('not implemented.')
},

download: (call) => {
void call
throw new Error('not implemented.')
Expand Down
Loading