diff --git a/commonjs/generated/puppet.cjs b/commonjs/generated/puppet.cjs index e782472..7b907ae 100644 --- a/commonjs/generated/puppet.cjs +++ b/commonjs/generated/puppet.cjs @@ -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', diff --git a/commonjs/generated/puppet.cjs.d.ts b/commonjs/generated/puppet.cjs.d.ts index dad10af..452c5de 100644 --- a/commonjs/generated/puppet.cjs.d.ts +++ b/commonjs/generated/puppet.cjs.d.ts @@ -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' diff --git a/package.json b/package.json index e678acd..949d4e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@juzi/wechaty-grpc", - "version": "1.0.71", + "version": "1.0.72", "description": "gRPC for Wechaty", "type": "module", "exports": { diff --git a/proto/wechaty/puppet.proto b/proto/wechaty/puppet.proto index 0e3a70a..3aeea2b 100644 --- a/proto/wechaty/puppet.proto +++ b/proto/wechaty/puppet.proto @@ -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"; @@ -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 diff --git a/proto/wechaty/puppet/wecom.proto b/proto/wechaty/puppet/wecom.proto new file mode 100644 index 0000000..338a4db --- /dev/null +++ b/proto/wechaty/puppet/wecom.proto @@ -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; +} diff --git a/tests/puppet-server-impl.ts b/tests/puppet-server-impl.ts index 14495e4..4767e5a 100644 --- a/tests/puppet-server-impl.ts +++ b/tests/puppet-server-impl.ts @@ -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.')