diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index febbc60..7a0ceb6 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -28,7 +28,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.18 + go-version: 1.21 - name: Install Protoc uses: arduino/setup-protoc@v1 @@ -61,7 +61,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.18 + go-version: 1.21 - name: Install Protoc uses: arduino/setup-protoc@v1 @@ -97,7 +97,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.18 + go-version: 1.21 - name: Install Protoc uses: arduino/setup-protoc@v1 - name: Install Protoc 3rd party protos diff --git a/package.json b/package.json index 07a11b5..e2aa020 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@juzi/wechaty-grpc", - "version": "1.0.87", + "version": "1.0.89", "description": "gRPC for Wechaty", "type": "module", "exports": { diff --git a/proto/wechaty/puppet.proto b/proto/wechaty/puppet.proto index 2ef3caf..7112da4 100644 --- a/proto/wechaty/puppet.proto +++ b/proto/wechaty/puppet.proto @@ -527,6 +527,12 @@ service Puppet { get: "/rooms/{id}/qrcode" }; } + rpc RoomParseDynamicQRCode (puppet.RoomParseDynamicQRCodeRequest) returns (puppet.RoomParseDynamicQRCodeResponse) { + option (google.api.http) = { + get: "/rooms/{url}/parse-dynamic-qrcode" + }; + } + rpc RoomAnnounce (puppet.RoomAnnounceRequest) returns (puppet.RoomAnnounceResponse) { option (google.api.http) = { get: "/rooms/{id}/announcement" // TODO: disable other get parameters @@ -598,6 +604,11 @@ service Puppet { put: "/room-invitations/{id}/accept" }; } + rpc RoomInvitationAcceptByQRCode (puppet.RoomInvitationAcceptByQRCodeRequest) returns (puppet.RoomInvitationAcceptByQRCodeResponse) { + option (google.api.http) = { + put: "/room-invitations/{qrcode}/accept-by-qrcode" + }; + } /** * diff --git a/proto/wechaty/puppet/room-invitation.proto b/proto/wechaty/puppet/room-invitation.proto index 9316ef9..d8917be 100644 --- a/proto/wechaty/puppet/room-invitation.proto +++ b/proto/wechaty/puppet/room-invitation.proto @@ -49,3 +49,11 @@ message RoomInvitationAcceptRequest { string id = 1; } message RoomInvitationAcceptResponse {} + +message RoomInvitationAcceptByQRCodeRequest { + string qrcode = 1; +} +message RoomInvitationAcceptByQRCodeResponse { + string room_id = 1; + string chat_id = 2; +} diff --git a/proto/wechaty/puppet/room.proto b/proto/wechaty/puppet/room.proto index b7c6d64..f12a0a4 100644 --- a/proto/wechaty/puppet/room.proto +++ b/proto/wechaty/puppet/room.proto @@ -83,6 +83,15 @@ message RoomQRCodeResponse { string qrcode = 1; } +message RoomParseDynamicQRCodeRequest { + string url = 1; // 群活码链接 +} +message RoomParseDynamicQRCodeResponse { + string qrcode = 1; // 二维码url + string qrcode_image_url = 2; // 二维码图片url + string room_name = 3; // 群名称 +} + message RoomAnnounceRequest { // 群公告 string id = 1; google.protobuf.StringValue text_string_value_deprecated = 2 [deprecated = true]; // DEPRECATED, will be removed after Dec 31, 2022 diff --git a/tests/puppet-server-impl.ts b/tests/puppet-server-impl.ts index bf4c18b..74da8fe 100644 --- a/tests/puppet-server-impl.ts +++ b/tests/puppet-server-impl.ts @@ -352,6 +352,12 @@ export const puppetServerImpl: IPuppetServer = { throw new Error('not implemented.') }, + roomInvitationAcceptByQRCode: (call, callback) => { + void call + void callback + throw new Error('not implemented.') + }, + roomInvitationPayload: (call, callback) => { void call void callback @@ -388,6 +394,12 @@ export const puppetServerImpl: IPuppetServer = { throw new Error('not implemented.') }, + roomParseDynamicQRCode: (call, callback) => { + void call + void callback + throw new Error('not implemented.') + }, + roomQuit: (call, callback) => { void call void callback