diff --git a/package.json b/package.json index 4a03238e..827b85d1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chatie/grpc", - "version": "0.17.2", + "version": "0.17.3", "description": "gRPC for Chatie", "main": "dist/src/index.js", "typings": "dist/src/index.d.js", diff --git a/proto/wechaty/puppet.proto b/proto/wechaty/puppet.proto index 94ce4c9d..1b6878b1 100644 --- a/proto/wechaty/puppet.proto +++ b/proto/wechaty/puppet.proto @@ -66,6 +66,8 @@ service Puppet { rpc ContactAlias (puppet.ContactAliasRequest) returns (puppet.ContactAliasResponse) {} rpc ContactAvatar (puppet.ContactAvatarRequest) returns (puppet.ContactAvatarResponse) {} rpc ContactPhone (puppet.ContactPhoneRequest) returns (puppet.ContactPhoneResponse) {} + rpc ContactCorporationRemark (puppet.ContactCorporationRemarkRequest) returns (puppet.ContactCorporationRemarkResponse) {} + rpc ContactDescription (puppet.ContactDescriptionRequest) returns (puppet.ContactDescriptionResponse) {} rpc ContactList (puppet.ContactListRequest) returns (puppet.ContactListResponse) {} diff --git a/proto/wechaty/puppet/contact.proto b/proto/wechaty/puppet/contact.proto index 4a92b388..204dea59 100644 --- a/proto/wechaty/puppet/contact.proto +++ b/proto/wechaty/puppet/contact.proto @@ -16,6 +16,7 @@ enum ContactType { CONTACT_TYPE_UNSPECIFIED = 0; CONTACT_TYPE_PERSONAL = 1; CONTACT_TYPE_OFFICIAL = 2; + CONTACT_TYPE_CORPORATION = 3; } message ContactListRequest {} @@ -27,19 +28,23 @@ message ContactPayloadRequest { string id = 1; } message ContactPayloadResponse { - string id = 1; - ContactGender gender = 2; - ContactType type = 3; - string name = 4; - string avatar = 5; - string address = 6; - string alias = 7; - string city = 8; - bool friend = 9; - string province = 10; - string signature = 11; - bool star = 12; - string weixin = 13; + string id = 1; + ContactGender gender = 2; + ContactType type = 3; + string name = 4; + string avatar = 5; + string address = 6; + string alias = 7; + string city = 8; + bool friend = 9; + string province = 10; + string signature = 11; + bool star = 12; + string weixin = 13; + string corporation = 14; + string title = 15; + string description = 16; + bool coworker = 17; } message ContactSelfQRCodeRequest {} @@ -83,3 +88,17 @@ message ContactPhoneRequest { message ContactPhoneResponse { repeated string phone_list = 2; } + +message ContactCorporationRemarkRequest { + string contact_id = 1; + google.protobuf.StringValue corporation_remark = 2; +} + +message ContactCorporationRemarkResponse {} + +message ContactDescriptionRequest { + string contact_id = 1; + google.protobuf.StringValue description = 2; +} + +message ContactDescriptionResponse {} diff --git a/tests/puppet-server-impl.ts b/tests/puppet-server-impl.ts index 958b70a8..26bdd38e 100644 --- a/tests/puppet-server-impl.ts +++ b/tests/puppet-server-impl.ts @@ -10,25 +10,37 @@ export const puppetServerImpl: IPuppetServer = { contactAlias: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, contactAvatar: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') + }, + + contactCorporationRemark: (call, callback) => { + void call + void callback + throw new Error('not implemented') + }, + + contactDescription: (call, callback) => { + void call + void callback + throw new Error('not implemented') }, contactList: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, contactPayload: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, contactPhone: (call, callback) => { @@ -40,271 +52,271 @@ export const puppetServerImpl: IPuppetServer = { contactSelfName: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, contactSelfQRCode: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, contactSelfSignature: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, ding: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, dirtyPayload: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, event: (streamnigCall) => { void streamnigCall - throw new Error('not implmented.') + throw new Error('not implemented.') }, friendshipAccept: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, friendshipAdd: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, friendshipPayload: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, friendshipSearchPhone: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, friendshipSearchWeixin: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, logout: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, messageContact: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, messageFile: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, messageImage: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, messageMiniProgram: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, messagePayload: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, messageRecall: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, messageSendContact: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, messageSendFile: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, messageSendMiniProgram: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, messageSendText: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, messageSendUrl: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, messageUrl: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, roomAdd: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, roomAnnounce: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, roomAvatar: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, roomCreate: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, roomDel: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, roomInvitationAccept: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, roomInvitationPayload: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, roomList: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, roomMemberList: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, roomMemberPayload: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, roomPayload: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, roomQRCode: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, roomQuit: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, roomTopic: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, start: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, stop: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, tagContactAdd: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, tagContactDelete: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, tagContactList: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, tagContactRemove: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, version: (call, callback) => { void call void callback - throw new Error('not implmented.') + throw new Error('not implemented.') }, }