diff --git a/turms-client-js/src/model/proto/constant/device_type.ts b/turms-client-js/src/model/proto/constant/device_type.ts index 5dcd8d56dc..fb88790d0b 100644 --- a/turms-client-js/src/model/proto/constant/device_type.ts +++ b/turms-client-js/src/model/proto/constant/device_type.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: constant/device_type.proto /* eslint-disable */ @@ -16,4 +16,4 @@ export enum DeviceType { OTHERS = 4, UNKNOWN = 5, UNRECOGNIZED = -1, -} +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/constant/group_member_role.ts b/turms-client-js/src/model/proto/constant/group_member_role.ts index fc067f2154..66571d87ec 100644 --- a/turms-client-js/src/model/proto/constant/group_member_role.ts +++ b/turms-client-js/src/model/proto/constant/group_member_role.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: constant/group_member_role.proto /* eslint-disable */ @@ -15,4 +15,4 @@ export enum GroupMemberRole { GUEST = 3, ANONYMOUS_GUEST = 4, UNRECOGNIZED = -1, -} +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/constant/profile_access_strategy.ts b/turms-client-js/src/model/proto/constant/profile_access_strategy.ts index ba8bc2cd0c..173bc0c70b 100644 --- a/turms-client-js/src/model/proto/constant/profile_access_strategy.ts +++ b/turms-client-js/src/model/proto/constant/profile_access_strategy.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: constant/profile_access_strategy.proto /* eslint-disable */ @@ -13,4 +13,4 @@ export enum ProfileAccessStrategy { ALL_EXCEPT_BLOCKED_USERS = 1, FRIENDS = 2, UNRECOGNIZED = -1, -} +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/constant/request_status.ts b/turms-client-js/src/model/proto/constant/request_status.ts index 09de036ac1..28c8cede0d 100644 --- a/turms-client-js/src/model/proto/constant/request_status.ts +++ b/turms-client-js/src/model/proto/constant/request_status.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: constant/request_status.proto /* eslint-disable */ @@ -17,4 +17,4 @@ export enum RequestStatus { EXPIRED = 5, CANCELED = 6, UNRECOGNIZED = -1, -} +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/constant/response_action.ts b/turms-client-js/src/model/proto/constant/response_action.ts index 44c13a46ee..cf3129edaf 100644 --- a/turms-client-js/src/model/proto/constant/response_action.ts +++ b/turms-client-js/src/model/proto/constant/response_action.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: constant/response_action.proto /* eslint-disable */ @@ -13,4 +13,4 @@ export enum ResponseAction { DECLINE = 1, IGNORE = 2, UNRECOGNIZED = -1, -} +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/constant/storage_resource_type.ts b/turms-client-js/src/model/proto/constant/storage_resource_type.ts index a723f6063e..281e6b5885 100644 --- a/turms-client-js/src/model/proto/constant/storage_resource_type.ts +++ b/turms-client-js/src/model/proto/constant/storage_resource_type.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: constant/storage_resource_type.proto /* eslint-disable */ @@ -13,4 +13,4 @@ export enum StorageResourceType { GROUP_PROFILE_PICTURE = 1, MESSAGE_ATTACHMENT = 2, UNRECOGNIZED = -1, -} +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/constant/user_status.ts b/turms-client-js/src/model/proto/constant/user_status.ts index 7cbe9e554c..aa057a3ff9 100644 --- a/turms-client-js/src/model/proto/constant/user_status.ts +++ b/turms-client-js/src/model/proto/constant/user_status.ts @@ -1,7 +1,7 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: constant/user_status.proto /* eslint-disable */ @@ -17,4 +17,4 @@ export enum UserStatus { AWAY = 5, BE_RIGHT_BACK = 6, UNRECOGNIZED = -1, -} +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/model/common/longs_with_version.ts b/turms-client-js/src/model/proto/model/common/longs_with_version.ts index 8b0675d189..88f3a5009a 100644 --- a/turms-client-js/src/model/proto/model/common/longs_with_version.ts +++ b/turms-client-js/src/model/proto/model/common/longs_with_version.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/common/longs_with_version.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; export const protobufPackage = "im.turms.proto"; @@ -19,29 +18,29 @@ function createBaseLongsWithVersion(): LongsWithVersion { return { longs: [], lastUpdatedDate: undefined }; } -export const LongsWithVersion = { - encode(message: LongsWithVersion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const LongsWithVersion: MessageFns = { + encode(message: LongsWithVersion, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { writer.uint32(10).fork(); for (const v of message.longs) { writer.int64(v); } - writer.ldelim(); + writer.join(); if (message.lastUpdatedDate !== undefined) { writer.uint32(16).int64(message.lastUpdatedDate); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): LongsWithVersion { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): LongsWithVersion { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLongsWithVersion(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag === 8) { - message.longs.push(longToString(reader.int64() as Long)); + message.longs.push(reader.int64().toString()); continue; } @@ -49,35 +48,33 @@ export const LongsWithVersion = { if (tag === 10) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.longs.push(longToString(reader.int64() as Long)); + message.longs.push(reader.int64().toString()); } continue; } break; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/common/strings_with_version.ts b/turms-client-js/src/model/proto/model/common/strings_with_version.ts index 63e046f1bb..629ae8a490 100644 --- a/turms-client-js/src/model/proto/model/common/strings_with_version.ts +++ b/turms-client-js/src/model/proto/model/common/strings_with_version.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/common/strings_with_version.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; export const protobufPackage = "im.turms.proto"; @@ -19,8 +18,8 @@ function createBaseStringsWithVersion(): StringsWithVersion { return { strings: [], lastUpdatedDate: undefined }; } -export const StringsWithVersion = { - encode(message: StringsWithVersion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const StringsWithVersion: MessageFns = { + encode(message: StringsWithVersion, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.strings) { writer.uint32(10).string(v!); } @@ -30,42 +29,40 @@ export const StringsWithVersion = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): StringsWithVersion { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): StringsWithVersion { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStringsWithVersion(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.strings.push(reader.string()); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/common/value.ts b/turms-client-js/src/model/proto/model/common/value.ts index 6ebe2b32fb..748063885f 100644 --- a/turms-client-js/src/model/proto/model/common/value.ts +++ b/turms-client-js/src/model/proto/model/common/value.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/common/value.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; export const protobufPackage = "im.turms.proto"; @@ -34,8 +33,8 @@ function createBaseValue(): Value { }; } -export const Value = { - encode(message: Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const Value: MessageFns = { + encode(message: Value, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.int32Value !== undefined) { writer.uint32(8).int32(message.int32Value); } @@ -58,89 +57,93 @@ export const Value = { writer.uint32(58).string(message.stringValue); } for (const v of message.listValue) { - Value.encode(v!, writer.uint32(66).fork()).ldelim(); + Value.encode(v!, writer.uint32(66).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Value { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): Value { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseValue(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } message.int32Value = reader.int32(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.int64Value = longToString(reader.int64() as Long); + message.int64Value = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 29) { break; } message.floatValue = reader.float(); continue; - case 4: + } + case 4: { if (tag !== 33) { break; } message.doubleValue = reader.double(); continue; - case 5: + } + case 5: { if (tag !== 40) { break; } message.boolValue = reader.bool(); continue; - case 6: + } + case 6: { if (tag !== 50) { break; } message.bytesValue = reader.bytes(); continue; - case 7: + } + case 7: { if (tag !== 58) { break; } message.stringValue = reader.string(); continue; - case 8: + } + case 8: { if (tag !== 66) { break; } message.listValue.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/conference/meeting.ts b/turms-client-js/src/model/proto/model/conference/meeting.ts index 867734341e..cd3d0a2c71 100644 --- a/turms-client-js/src/model/proto/model/conference/meeting.ts +++ b/turms-client-js/src/model/proto/model/conference/meeting.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/conference/meeting.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -43,8 +42,8 @@ function createBaseMeeting(): Meeting { }; } -export const Meeting = { - encode(message: Meeting, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const Meeting: MessageFns = { + encode(message: Meeting, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.id !== "0") { writer.uint32(8).int64(message.id); } @@ -79,117 +78,125 @@ export const Meeting = { writer.uint32(88).int64(message.cancelDate); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Meeting { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): Meeting { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMeeting(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.id = longToString(reader.int64() as Long); + message.id = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.userId = longToString(reader.int64() as Long); + message.userId = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } - message.creatorId = longToString(reader.int64() as Long); + message.creatorId = reader.int64().toString(); continue; - case 5: + } + case 5: { if (tag !== 42) { break; } message.accessToken = reader.string(); continue; - case 6: + } + case 6: { if (tag !== 50) { break; } message.name = reader.string(); continue; - case 7: + } + case 7: { if (tag !== 58) { break; } message.intro = reader.string(); continue; - case 8: + } + case 8: { if (tag !== 66) { break; } message.password = reader.string(); continue; - case 9: + } + case 9: { if (tag !== 72) { break; } - message.startDate = longToString(reader.int64() as Long); + message.startDate = reader.int64().toString(); continue; - case 10: + } + case 10: { if (tag !== 80) { break; } - message.endDate = longToString(reader.int64() as Long); + message.endDate = reader.int64().toString(); continue; - case 11: + } + case 11: { if (tag !== 88) { break; } - message.cancelDate = longToString(reader.int64() as Long); + message.cancelDate = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/conference/meetings.ts b/turms-client-js/src/model/proto/model/conference/meetings.ts index 792a22a9a1..1c903e48db 100644 --- a/turms-client-js/src/model/proto/model/conference/meetings.ts +++ b/turms-client-js/src/model/proto/model/conference/meetings.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/conference/meetings.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Meeting } from "./meeting"; export const protobufPackage = "im.turms.proto"; @@ -18,34 +18,40 @@ function createBaseMeetings(): Meetings { return { meetings: [] }; } -export const Meetings = { - encode(message: Meetings, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const Meetings: MessageFns = { + encode(message: Meetings, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.meetings) { - Meeting.encode(v!, writer.uint32(10).fork()).ldelim(); + Meeting.encode(v!, writer.uint32(10).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Meetings { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): Meetings { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMeetings(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.meetings.push(Meeting.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} diff --git a/turms-client-js/src/model/proto/model/conversation/conversation_settings.ts b/turms-client-js/src/model/proto/model/conversation/conversation_settings.ts index 2e3dc389b0..fd94917759 100644 --- a/turms-client-js/src/model/proto/model/conversation/conversation_settings.ts +++ b/turms-client-js/src/model/proto/model/conversation/conversation_settings.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/conversation/conversation_settings.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -28,8 +27,8 @@ function createBaseConversationSettings(): ConversationSettings { return { userId: undefined, groupId: undefined, settings: {}, lastUpdatedDate: undefined, customAttributes: [] }; } -export const ConversationSettings = { - encode(message: ConversationSettings, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const ConversationSettings: MessageFns = { + encode(message: ConversationSettings, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.userId !== undefined) { writer.uint32(8).int64(message.userId); } @@ -37,39 +36,41 @@ export const ConversationSettings = { writer.uint32(16).int64(message.groupId); } Object.entries(message.settings).forEach(([key, value]) => { - ConversationSettings_SettingsEntry.encode({ key: key as any, value }, writer.uint32(26).fork()).ldelim(); + ConversationSettings_SettingsEntry.encode({ key: key as any, value }, writer.uint32(26).fork()).join(); }); if (message.lastUpdatedDate !== undefined) { writer.uint32(32).int64(message.lastUpdatedDate); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): ConversationSettings { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): ConversationSettings { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConversationSettings(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.userId = longToString(reader.int64() as Long); + message.userId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } @@ -79,25 +80,28 @@ export const ConversationSettings = { message.settings[entry3.key] = entry3.value; } continue; - case 4: + } + case 4: { if (tag !== 32) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -107,53 +111,51 @@ function createBaseConversationSettings_SettingsEntry(): ConversationSettings_Se return { key: "", value: undefined }; } -export const ConversationSettings_SettingsEntry = { - encode(message: ConversationSettings_SettingsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const ConversationSettings_SettingsEntry: MessageFns = { + encode(message: ConversationSettings_SettingsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - Value.encode(message.value, writer.uint32(18).fork()).ldelim(); + Value.encode(message.value, writer.uint32(18).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): ConversationSettings_SettingsEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): ConversationSettings_SettingsEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConversationSettings_SettingsEntry(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.key = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.value = Value.decode(reader, reader.uint32()); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/conversation/conversation_settings_list.ts b/turms-client-js/src/model/proto/model/conversation/conversation_settings_list.ts index ce5b8bd4a0..36bfff7125 100644 --- a/turms-client-js/src/model/proto/model/conversation/conversation_settings_list.ts +++ b/turms-client-js/src/model/proto/model/conversation/conversation_settings_list.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/conversation/conversation_settings_list.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { ConversationSettings } from "./conversation_settings"; export const protobufPackage = "im.turms.proto"; @@ -18,34 +18,40 @@ function createBaseConversationSettingsList(): ConversationSettingsList { return { conversationSettingsList: [] }; } -export const ConversationSettingsList = { - encode(message: ConversationSettingsList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const ConversationSettingsList: MessageFns = { + encode(message: ConversationSettingsList, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.conversationSettingsList) { - ConversationSettings.encode(v!, writer.uint32(10).fork()).ldelim(); + ConversationSettings.encode(v!, writer.uint32(10).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): ConversationSettingsList { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): ConversationSettingsList { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConversationSettingsList(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.conversationSettingsList.push(ConversationSettings.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} diff --git a/turms-client-js/src/model/proto/model/conversation/conversations.ts b/turms-client-js/src/model/proto/model/conversation/conversations.ts index c9653e3511..7de29e3a63 100644 --- a/turms-client-js/src/model/proto/model/conversation/conversations.ts +++ b/turms-client-js/src/model/proto/model/conversation/conversations.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/conversation/conversations.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { GroupConversation } from "./group_conversation"; import { PrivateConversation } from "./private_conversation"; @@ -20,44 +20,51 @@ function createBaseConversations(): Conversations { return { privateConversations: [], groupConversations: [] }; } -export const Conversations = { - encode(message: Conversations, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const Conversations: MessageFns = { + encode(message: Conversations, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.privateConversations) { - PrivateConversation.encode(v!, writer.uint32(10).fork()).ldelim(); + PrivateConversation.encode(v!, writer.uint32(10).fork()).join(); } for (const v of message.groupConversations) { - GroupConversation.encode(v!, writer.uint32(18).fork()).ldelim(); + GroupConversation.encode(v!, writer.uint32(18).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Conversations { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): Conversations { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseConversations(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.privateConversations.push(PrivateConversation.decode(reader, reader.uint32())); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.groupConversations.push(GroupConversation.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} diff --git a/turms-client-js/src/model/proto/model/conversation/group_conversation.ts b/turms-client-js/src/model/proto/model/conversation/group_conversation.ts index b3bad8ad1c..a8896cd4d2 100644 --- a/turms-client-js/src/model/proto/model/conversation/group_conversation.ts +++ b/turms-client-js/src/model/proto/model/conversation/group_conversation.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/conversation/group_conversation.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -26,35 +25,36 @@ function createBaseGroupConversation(): GroupConversation { return { groupId: "0", memberIdToReadDate: {}, customAttributes: [] }; } -export const GroupConversation = { - encode(message: GroupConversation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const GroupConversation: MessageFns = { + encode(message: GroupConversation, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== "0") { writer.uint32(8).int64(message.groupId); } Object.entries(message.memberIdToReadDate).forEach(([key, value]) => { - GroupConversation_MemberIdToReadDateEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).ldelim(); + GroupConversation_MemberIdToReadDateEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).join(); }); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GroupConversation { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): GroupConversation { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupConversation(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } @@ -64,18 +64,20 @@ export const GroupConversation = { message.memberIdToReadDate[entry2.key] = entry2.value; } continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -85,8 +87,8 @@ function createBaseGroupConversation_MemberIdToReadDateEntry(): GroupConversatio return { key: "0", value: "0" }; } -export const GroupConversation_MemberIdToReadDateEntry = { - encode(message: GroupConversation_MemberIdToReadDateEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const GroupConversation_MemberIdToReadDateEntry: MessageFns = { + encode(message: GroupConversation_MemberIdToReadDateEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.key !== "0") { writer.uint32(8).int64(message.key); } @@ -96,42 +98,40 @@ export const GroupConversation_MemberIdToReadDateEntry = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GroupConversation_MemberIdToReadDateEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): GroupConversation_MemberIdToReadDateEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupConversation_MemberIdToReadDateEntry(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.key = longToString(reader.int64() as Long); + message.key = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.value = longToString(reader.int64() as Long); + message.value = reader.int64().toString(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/conversation/private_conversation.ts b/turms-client-js/src/model/proto/model/conversation/private_conversation.ts index 5a8d588ab7..cd84998931 100644 --- a/turms-client-js/src/model/proto/model/conversation/private_conversation.ts +++ b/turms-client-js/src/model/proto/model/conversation/private_conversation.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/conversation/private_conversation.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -22,8 +21,8 @@ function createBasePrivateConversation(): PrivateConversation { return { ownerId: "0", targetId: "0", readDate: "0", customAttributes: [] }; } -export const PrivateConversation = { - encode(message: PrivateConversation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const PrivateConversation: MessageFns = { + encode(message: PrivateConversation, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.ownerId !== "0") { writer.uint32(8).int64(message.ownerId); } @@ -34,61 +33,61 @@ export const PrivateConversation = { writer.uint32(24).int64(message.readDate); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): PrivateConversation { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): PrivateConversation { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePrivateConversation(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.ownerId = longToString(reader.int64() as Long); + message.ownerId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.targetId = longToString(reader.int64() as Long); + message.targetId = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } - message.readDate = longToString(reader.int64() as Long); + message.readDate = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/file/audio_file.ts b/turms-client-js/src/model/proto/model/file/audio_file.ts index 3484f02159..fcc0142ecf 100644 --- a/turms-client-js/src/model/proto/model/file/audio_file.ts +++ b/turms-client-js/src/model/proto/model/file/audio_file.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/file/audio_file.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -27,53 +27,56 @@ function createBaseAudioFile(): AudioFile { return { description: undefined, data: undefined, customAttributes: [] }; } -export const AudioFile = { - encode(message: AudioFile, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const AudioFile: MessageFns = { + encode(message: AudioFile, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.description !== undefined) { - AudioFile_Description.encode(message.description, writer.uint32(10).fork()).ldelim(); + AudioFile_Description.encode(message.description, writer.uint32(10).fork()).join(); } if (message.data !== undefined) { writer.uint32(18).bytes(message.data); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): AudioFile { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): AudioFile { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAudioFile(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.description = AudioFile_Description.decode(reader, reader.uint32()); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.data = reader.bytes(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -83,8 +86,8 @@ function createBaseAudioFile_Description(): AudioFile_Description { return { url: "", duration: undefined, size: undefined, format: undefined }; } -export const AudioFile_Description = { - encode(message: AudioFile_Description, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const AudioFile_Description: MessageFns = { + encode(message: AudioFile_Description, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.url !== "") { writer.uint32(10).string(message.url); } @@ -100,47 +103,56 @@ export const AudioFile_Description = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): AudioFile_Description { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): AudioFile_Description { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAudioFile_Description(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.url = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.duration = reader.int32(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } message.size = reader.int32(); continue; - case 4: + } + case 4: { if (tag !== 34) { break; } message.format = reader.string(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} diff --git a/turms-client-js/src/model/proto/model/file/file.ts b/turms-client-js/src/model/proto/model/file/file.ts index f2152a5c32..16bba5c448 100644 --- a/turms-client-js/src/model/proto/model/file/file.ts +++ b/turms-client-js/src/model/proto/model/file/file.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/file/file.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -26,53 +26,56 @@ function createBaseFile(): File { return { description: undefined, data: undefined, customAttributes: [] }; } -export const File = { - encode(message: File, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const File: MessageFns = { + encode(message: File, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.description !== undefined) { - File_Description.encode(message.description, writer.uint32(10).fork()).ldelim(); + File_Description.encode(message.description, writer.uint32(10).fork()).join(); } if (message.data !== undefined) { writer.uint32(18).bytes(message.data); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): File { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): File { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFile(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.description = File_Description.decode(reader, reader.uint32()); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.data = reader.bytes(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -82,8 +85,8 @@ function createBaseFile_Description(): File_Description { return { url: "", size: undefined, format: undefined }; } -export const File_Description = { - encode(message: File_Description, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const File_Description: MessageFns = { + encode(message: File_Description, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.url !== "") { writer.uint32(10).string(message.url); } @@ -96,40 +99,48 @@ export const File_Description = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): File_Description { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): File_Description { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFile_Description(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.url = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.size = reader.int32(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.format = reader.string(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} diff --git a/turms-client-js/src/model/proto/model/file/image_file.ts b/turms-client-js/src/model/proto/model/file/image_file.ts index cb82c31f4a..58744912b3 100644 --- a/turms-client-js/src/model/proto/model/file/image_file.ts +++ b/turms-client-js/src/model/proto/model/file/image_file.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/file/image_file.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -27,53 +27,56 @@ function createBaseImageFile(): ImageFile { return { description: undefined, data: undefined, customAttributes: [] }; } -export const ImageFile = { - encode(message: ImageFile, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const ImageFile: MessageFns = { + encode(message: ImageFile, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.description !== undefined) { - ImageFile_Description.encode(message.description, writer.uint32(10).fork()).ldelim(); + ImageFile_Description.encode(message.description, writer.uint32(10).fork()).join(); } if (message.data !== undefined) { writer.uint32(18).bytes(message.data); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): ImageFile { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): ImageFile { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseImageFile(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.description = ImageFile_Description.decode(reader, reader.uint32()); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.data = reader.bytes(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -83,8 +86,8 @@ function createBaseImageFile_Description(): ImageFile_Description { return { url: "", original: undefined, imageSize: undefined, fileSize: undefined }; } -export const ImageFile_Description = { - encode(message: ImageFile_Description, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const ImageFile_Description: MessageFns = { + encode(message: ImageFile_Description, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.url !== "") { writer.uint32(10).string(message.url); } @@ -100,47 +103,56 @@ export const ImageFile_Description = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): ImageFile_Description { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): ImageFile_Description { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseImageFile_Description(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.url = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.original = reader.bool(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } message.imageSize = reader.int32(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } message.fileSize = reader.int32(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} diff --git a/turms-client-js/src/model/proto/model/file/video_file.ts b/turms-client-js/src/model/proto/model/file/video_file.ts index 917f6d6153..41b2555e8f 100644 --- a/turms-client-js/src/model/proto/model/file/video_file.ts +++ b/turms-client-js/src/model/proto/model/file/video_file.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/file/video_file.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -27,53 +27,56 @@ function createBaseVideoFile(): VideoFile { return { description: undefined, data: undefined, customAttributes: [] }; } -export const VideoFile = { - encode(message: VideoFile, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const VideoFile: MessageFns = { + encode(message: VideoFile, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.description !== undefined) { - VideoFile_Description.encode(message.description, writer.uint32(10).fork()).ldelim(); + VideoFile_Description.encode(message.description, writer.uint32(10).fork()).join(); } if (message.data !== undefined) { writer.uint32(18).bytes(message.data); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): VideoFile { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): VideoFile { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseVideoFile(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.description = VideoFile_Description.decode(reader, reader.uint32()); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.data = reader.bytes(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -83,8 +86,8 @@ function createBaseVideoFile_Description(): VideoFile_Description { return { url: "", duration: undefined, size: undefined, format: undefined }; } -export const VideoFile_Description = { - encode(message: VideoFile_Description, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const VideoFile_Description: MessageFns = { + encode(message: VideoFile_Description, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.url !== "") { writer.uint32(10).string(message.url); } @@ -100,47 +103,56 @@ export const VideoFile_Description = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): VideoFile_Description { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): VideoFile_Description { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseVideoFile_Description(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.url = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.duration = reader.int32(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } message.size = reader.int32(); continue; - case 4: + } + case 4: { if (tag !== 34) { break; } message.format = reader.string(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} diff --git a/turms-client-js/src/model/proto/model/group/group.ts b/turms-client-js/src/model/proto/model/group/group.ts index ba85948f76..9273ae16ef 100644 --- a/turms-client-js/src/model/proto/model/group/group.ts +++ b/turms-client-js/src/model/proto/model/group/group.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/group/group.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -50,8 +49,8 @@ function createBaseGroup(): Group { }; } -export const Group = { - encode(message: Group, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const Group: MessageFns = { + encode(message: Group, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.id !== undefined) { writer.uint32(8).int64(message.id); } @@ -86,99 +85,110 @@ export const Group = { writer.uint32(88).bool(message.active); } Object.entries(message.userDefinedAttributes).forEach(([key, value]) => { - Group_UserDefinedAttributesEntry.encode({ key: key as any, value }, writer.uint32(98).fork()).ldelim(); + Group_UserDefinedAttributesEntry.encode({ key: key as any, value }, writer.uint32(98).fork()).join(); }); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Group { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): Group { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroup(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.id = longToString(reader.int64() as Long); + message.id = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.typeId = longToString(reader.int64() as Long); + message.typeId = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } - message.creatorId = longToString(reader.int64() as Long); + message.creatorId = reader.int64().toString(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } - message.ownerId = longToString(reader.int64() as Long); + message.ownerId = reader.int64().toString(); continue; - case 5: + } + case 5: { if (tag !== 42) { break; } message.name = reader.string(); continue; - case 6: + } + case 6: { if (tag !== 50) { break; } message.intro = reader.string(); continue; - case 7: + } + case 7: { if (tag !== 58) { break; } message.announcement = reader.string(); continue; - case 8: + } + case 8: { if (tag !== 64) { break; } - message.creationDate = longToString(reader.int64() as Long); + message.creationDate = reader.int64().toString(); continue; - case 9: + } + case 9: { if (tag !== 72) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 10: + } + case 10: { if (tag !== 80) { break; } - message.muteEndDate = longToString(reader.int64() as Long); + message.muteEndDate = reader.int64().toString(); continue; - case 11: + } + case 11: { if (tag !== 88) { break; } message.active = reader.bool(); continue; - case 12: + } + case 12: { if (tag !== 98) { break; } @@ -188,18 +198,20 @@ export const Group = { message.userDefinedAttributes[entry12.key] = entry12.value; } continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -209,53 +221,51 @@ function createBaseGroup_UserDefinedAttributesEntry(): Group_UserDefinedAttribut return { key: "", value: undefined }; } -export const Group_UserDefinedAttributesEntry = { - encode(message: Group_UserDefinedAttributesEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const Group_UserDefinedAttributesEntry: MessageFns = { + encode(message: Group_UserDefinedAttributesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - Value.encode(message.value, writer.uint32(18).fork()).ldelim(); + Value.encode(message.value, writer.uint32(18).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Group_UserDefinedAttributesEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): Group_UserDefinedAttributesEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroup_UserDefinedAttributesEntry(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.key = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.value = Value.decode(reader, reader.uint32()); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/group/group_invitation.ts b/turms-client-js/src/model/proto/model/group/group_invitation.ts index c9e103792e..93fddaf8ef 100644 --- a/turms-client-js/src/model/proto/model/group/group_invitation.ts +++ b/turms-client-js/src/model/proto/model/group/group_invitation.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/group/group_invitation.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { RequestStatus } from "../../constant/request_status"; import { Value } from "../common/value"; @@ -38,8 +37,8 @@ function createBaseGroupInvitation(): GroupInvitation { }; } -export const GroupInvitation = { - encode(message: GroupInvitation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const GroupInvitation: MessageFns = { + encode(message: GroupInvitation, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.id !== undefined) { writer.uint32(8).int64(message.id); } @@ -65,96 +64,101 @@ export const GroupInvitation = { writer.uint32(64).int64(message.inviteeId); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GroupInvitation { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): GroupInvitation { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupInvitation(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.id = longToString(reader.int64() as Long); + message.id = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.creationDate = longToString(reader.int64() as Long); + message.creationDate = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.content = reader.string(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } message.status = reader.int32() as any; continue; - case 5: + } + case 5: { if (tag !== 40) { break; } - message.expirationDate = longToString(reader.int64() as Long); + message.expirationDate = reader.int64().toString(); continue; - case 6: + } + case 6: { if (tag !== 48) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 7: + } + case 7: { if (tag !== 56) { break; } - message.inviterId = longToString(reader.int64() as Long); + message.inviterId = reader.int64().toString(); continue; - case 8: + } + case 8: { if (tag !== 64) { break; } - message.inviteeId = longToString(reader.int64() as Long); + message.inviteeId = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/group/group_invitations_with_version.ts b/turms-client-js/src/model/proto/model/group/group_invitations_with_version.ts index 457b320a99..beb7627779 100644 --- a/turms-client-js/src/model/proto/model/group/group_invitations_with_version.ts +++ b/turms-client-js/src/model/proto/model/group/group_invitations_with_version.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/group/group_invitations_with_version.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { GroupInvitation } from "./group_invitation"; export const protobufPackage = "im.turms.proto"; @@ -20,10 +19,10 @@ function createBaseGroupInvitationsWithVersion(): GroupInvitationsWithVersion { return { groupInvitations: [], lastUpdatedDate: undefined }; } -export const GroupInvitationsWithVersion = { - encode(message: GroupInvitationsWithVersion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const GroupInvitationsWithVersion: MessageFns = { + encode(message: GroupInvitationsWithVersion, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.groupInvitations) { - GroupInvitation.encode(v!, writer.uint32(10).fork()).ldelim(); + GroupInvitation.encode(v!, writer.uint32(10).fork()).join(); } if (message.lastUpdatedDate !== undefined) { writer.uint32(16).int64(message.lastUpdatedDate); @@ -31,42 +30,40 @@ export const GroupInvitationsWithVersion = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GroupInvitationsWithVersion { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): GroupInvitationsWithVersion { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupInvitationsWithVersion(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.groupInvitations.push(GroupInvitation.decode(reader, reader.uint32())); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/group/group_join_question.ts b/turms-client-js/src/model/proto/model/group/group_join_question.ts index 9eb6e58b4f..1364fedf06 100644 --- a/turms-client-js/src/model/proto/model/group/group_join_question.ts +++ b/turms-client-js/src/model/proto/model/group/group_join_question.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/group/group_join_question.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -31,8 +30,8 @@ function createBaseGroupJoinQuestion(): GroupJoinQuestion { }; } -export const GroupJoinQuestion = { - encode(message: GroupJoinQuestion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const GroupJoinQuestion: MessageFns = { + encode(message: GroupJoinQuestion, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.id !== undefined) { writer.uint32(8).int64(message.id); } @@ -49,75 +48,77 @@ export const GroupJoinQuestion = { writer.uint32(40).int32(message.score); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GroupJoinQuestion { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): GroupJoinQuestion { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupJoinQuestion(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.id = longToString(reader.int64() as Long); + message.id = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.question = reader.string(); continue; - case 4: + } + case 4: { if (tag !== 34) { break; } message.answers.push(reader.string()); continue; - case 5: + } + case 5: { if (tag !== 40) { break; } message.score = reader.int32(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/group/group_join_questions_answer_result.ts b/turms-client-js/src/model/proto/model/group/group_join_questions_answer_result.ts index 65f56d30d2..a344314773 100644 --- a/turms-client-js/src/model/proto/model/group/group_join_questions_answer_result.ts +++ b/turms-client-js/src/model/proto/model/group/group_join_questions_answer_result.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/group/group_join_questions_answer_result.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; export const protobufPackage = "im.turms.proto"; @@ -20,8 +19,8 @@ function createBaseGroupJoinQuestionsAnswerResult(): GroupJoinQuestionsAnswerRes return { score: 0, questionIds: [], joined: false }; } -export const GroupJoinQuestionsAnswerResult = { - encode(message: GroupJoinQuestionsAnswerResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const GroupJoinQuestionsAnswerResult: MessageFns = { + encode(message: GroupJoinQuestionsAnswerResult, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.score !== 0) { writer.uint32(8).int32(message.score); } @@ -29,30 +28,31 @@ export const GroupJoinQuestionsAnswerResult = { for (const v of message.questionIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); if (message.joined !== false) { writer.uint32(24).bool(message.joined); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GroupJoinQuestionsAnswerResult { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): GroupJoinQuestionsAnswerResult { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupJoinQuestionsAnswerResult(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } message.score = reader.int32(); continue; - case 2: + } + case 2: { if (tag === 16) { - message.questionIds.push(longToString(reader.int64() as Long)); + message.questionIds.push(reader.int64().toString()); continue; } @@ -60,35 +60,33 @@ export const GroupJoinQuestionsAnswerResult = { if (tag === 18) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.questionIds.push(longToString(reader.int64() as Long)); + message.questionIds.push(reader.int64().toString()); } continue; } break; - case 3: + } + case 3: { if (tag !== 24) { break; } message.joined = reader.bool(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/group/group_join_questions_with_version.ts b/turms-client-js/src/model/proto/model/group/group_join_questions_with_version.ts index cb20de7c76..20ed154be4 100644 --- a/turms-client-js/src/model/proto/model/group/group_join_questions_with_version.ts +++ b/turms-client-js/src/model/proto/model/group/group_join_questions_with_version.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/group/group_join_questions_with_version.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { GroupJoinQuestion } from "./group_join_question"; export const protobufPackage = "im.turms.proto"; @@ -20,10 +19,10 @@ function createBaseGroupJoinQuestionsWithVersion(): GroupJoinQuestionsWithVersio return { groupJoinQuestions: [], lastUpdatedDate: undefined }; } -export const GroupJoinQuestionsWithVersion = { - encode(message: GroupJoinQuestionsWithVersion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const GroupJoinQuestionsWithVersion: MessageFns = { + encode(message: GroupJoinQuestionsWithVersion, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.groupJoinQuestions) { - GroupJoinQuestion.encode(v!, writer.uint32(10).fork()).ldelim(); + GroupJoinQuestion.encode(v!, writer.uint32(10).fork()).join(); } if (message.lastUpdatedDate !== undefined) { writer.uint32(16).int64(message.lastUpdatedDate); @@ -31,42 +30,40 @@ export const GroupJoinQuestionsWithVersion = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GroupJoinQuestionsWithVersion { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): GroupJoinQuestionsWithVersion { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupJoinQuestionsWithVersion(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.groupJoinQuestions.push(GroupJoinQuestion.decode(reader, reader.uint32())); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/group/group_join_request.ts b/turms-client-js/src/model/proto/model/group/group_join_request.ts index e641b1e890..4ff12f05fc 100644 --- a/turms-client-js/src/model/proto/model/group/group_join_request.ts +++ b/turms-client-js/src/model/proto/model/group/group_join_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/group/group_join_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { RequestStatus } from "../../constant/request_status"; import { Value } from "../common/value"; @@ -38,8 +37,8 @@ function createBaseGroupJoinRequest(): GroupJoinRequest { }; } -export const GroupJoinRequest = { - encode(message: GroupJoinRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const GroupJoinRequest: MessageFns = { + encode(message: GroupJoinRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.id !== undefined) { writer.uint32(8).int64(message.id); } @@ -65,96 +64,101 @@ export const GroupJoinRequest = { writer.uint32(64).int64(message.responderId); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GroupJoinRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): GroupJoinRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupJoinRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.id = longToString(reader.int64() as Long); + message.id = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.creationDate = longToString(reader.int64() as Long); + message.creationDate = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.content = reader.string(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } message.status = reader.int32() as any; continue; - case 5: + } + case 5: { if (tag !== 40) { break; } - message.expirationDate = longToString(reader.int64() as Long); + message.expirationDate = reader.int64().toString(); continue; - case 6: + } + case 6: { if (tag !== 48) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 7: + } + case 7: { if (tag !== 56) { break; } - message.requesterId = longToString(reader.int64() as Long); + message.requesterId = reader.int64().toString(); continue; - case 8: + } + case 8: { if (tag !== 64) { break; } - message.responderId = longToString(reader.int64() as Long); + message.responderId = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/group/group_join_requests_with_version.ts b/turms-client-js/src/model/proto/model/group/group_join_requests_with_version.ts index d2d3ad711c..f019c80c18 100644 --- a/turms-client-js/src/model/proto/model/group/group_join_requests_with_version.ts +++ b/turms-client-js/src/model/proto/model/group/group_join_requests_with_version.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/group/group_join_requests_with_version.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { GroupJoinRequest } from "./group_join_request"; export const protobufPackage = "im.turms.proto"; @@ -20,10 +19,10 @@ function createBaseGroupJoinRequestsWithVersion(): GroupJoinRequestsWithVersion return { groupJoinRequests: [], lastUpdatedDate: undefined }; } -export const GroupJoinRequestsWithVersion = { - encode(message: GroupJoinRequestsWithVersion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const GroupJoinRequestsWithVersion: MessageFns = { + encode(message: GroupJoinRequestsWithVersion, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.groupJoinRequests) { - GroupJoinRequest.encode(v!, writer.uint32(10).fork()).ldelim(); + GroupJoinRequest.encode(v!, writer.uint32(10).fork()).join(); } if (message.lastUpdatedDate !== undefined) { writer.uint32(16).int64(message.lastUpdatedDate); @@ -31,42 +30,40 @@ export const GroupJoinRequestsWithVersion = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GroupJoinRequestsWithVersion { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): GroupJoinRequestsWithVersion { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupJoinRequestsWithVersion(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.groupJoinRequests.push(GroupJoinRequest.decode(reader, reader.uint32())); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/group/group_member.ts b/turms-client-js/src/model/proto/model/group/group_member.ts index 94c1b39329..bc2331f0b0 100644 --- a/turms-client-js/src/model/proto/model/group/group_member.ts +++ b/turms-client-js/src/model/proto/model/group/group_member.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/group/group_member.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { DeviceType } from "../../constant/device_type"; import { GroupMemberRole } from "../../constant/group_member_role"; import { UserStatus } from "../../constant/user_status"; @@ -23,6 +22,7 @@ export interface GroupMember { muteEndDate?: string | undefined; userStatus?: UserStatus | undefined; usingDeviceTypes: DeviceType[]; + note?: string | undefined; customAttributes: Value[]; } @@ -36,12 +36,13 @@ function createBaseGroupMember(): GroupMember { muteEndDate: undefined, userStatus: undefined, usingDeviceTypes: [], + note: undefined, customAttributes: [], }; } -export const GroupMember = { - encode(message: GroupMember, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const GroupMember: MessageFns = { + encode(message: GroupMember, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== undefined) { writer.uint32(8).int64(message.groupId); } @@ -67,70 +68,80 @@ export const GroupMember = { for (const v of message.usingDeviceTypes) { writer.int32(v); } - writer.ldelim(); + writer.join(); + if (message.note !== undefined) { + writer.uint32(74).string(message.note); + } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GroupMember { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): GroupMember { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupMember(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.userId = longToString(reader.int64() as Long); + message.userId = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.name = reader.string(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } message.role = reader.int32() as any; continue; - case 5: + } + case 5: { if (tag !== 40) { break; } - message.joinDate = longToString(reader.int64() as Long); + message.joinDate = reader.int64().toString(); continue; - case 6: + } + case 6: { if (tag !== 48) { break; } - message.muteEndDate = longToString(reader.int64() as Long); + message.muteEndDate = reader.int64().toString(); continue; - case 7: + } + case 7: { if (tag !== 56) { break; } message.userStatus = reader.int32() as any; continue; - case 8: + } + case 8: { if (tag === 64) { message.usingDeviceTypes.push(reader.int32() as any); @@ -147,28 +158,34 @@ export const GroupMember = { } break; - case 15: + } + case 9: { + if (tag !== 74) { + break; + } + + message.note = reader.string(); + continue; + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/group/group_members_with_version.ts b/turms-client-js/src/model/proto/model/group/group_members_with_version.ts index 9e2cd2f88f..23ea6d5bbc 100644 --- a/turms-client-js/src/model/proto/model/group/group_members_with_version.ts +++ b/turms-client-js/src/model/proto/model/group/group_members_with_version.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/group/group_members_with_version.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { GroupMember } from "./group_member"; export const protobufPackage = "im.turms.proto"; @@ -20,10 +19,10 @@ function createBaseGroupMembersWithVersion(): GroupMembersWithVersion { return { groupMembers: [], lastUpdatedDate: undefined }; } -export const GroupMembersWithVersion = { - encode(message: GroupMembersWithVersion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const GroupMembersWithVersion: MessageFns = { + encode(message: GroupMembersWithVersion, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.groupMembers) { - GroupMember.encode(v!, writer.uint32(10).fork()).ldelim(); + GroupMember.encode(v!, writer.uint32(10).fork()).join(); } if (message.lastUpdatedDate !== undefined) { writer.uint32(16).int64(message.lastUpdatedDate); @@ -31,42 +30,40 @@ export const GroupMembersWithVersion = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GroupMembersWithVersion { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): GroupMembersWithVersion { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupMembersWithVersion(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.groupMembers.push(GroupMember.decode(reader, reader.uint32())); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/group/groups_with_version.ts b/turms-client-js/src/model/proto/model/group/groups_with_version.ts index 0cea3698d7..50a9a22118 100644 --- a/turms-client-js/src/model/proto/model/group/groups_with_version.ts +++ b/turms-client-js/src/model/proto/model/group/groups_with_version.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/group/groups_with_version.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Group } from "./group"; export const protobufPackage = "im.turms.proto"; @@ -20,10 +19,10 @@ function createBaseGroupsWithVersion(): GroupsWithVersion { return { groups: [], lastUpdatedDate: undefined }; } -export const GroupsWithVersion = { - encode(message: GroupsWithVersion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const GroupsWithVersion: MessageFns = { + encode(message: GroupsWithVersion, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.groups) { - Group.encode(v!, writer.uint32(10).fork()).ldelim(); + Group.encode(v!, writer.uint32(10).fork()).join(); } if (message.lastUpdatedDate !== undefined) { writer.uint32(16).int64(message.lastUpdatedDate); @@ -31,42 +30,40 @@ export const GroupsWithVersion = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GroupsWithVersion { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): GroupsWithVersion { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupsWithVersion(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.groups.push(Group.decode(reader, reader.uint32())); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/message/message.ts b/turms-client-js/src/model/proto/model/message/message.ts index d1d90de761..fdd902cabc 100644 --- a/turms-client-js/src/model/proto/model/message/message.ts +++ b/turms-client-js/src/model/proto/model/message/message.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/message/message.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; import { MessageReactionGroup } from "./message_reaction_group"; @@ -46,8 +45,8 @@ function createBaseMessage(): Message { }; } -export const Message = { - encode(message: Message, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const Message: MessageFns = { + encode(message: Message, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.id !== undefined) { writer.uint32(8).int64(message.id); } @@ -82,127 +81,136 @@ export const Message = { writer.uint32(88).int64(message.preMessageId); } for (const v of message.reactionGroups) { - MessageReactionGroup.encode(v!, writer.uint32(98).fork()).ldelim(); + MessageReactionGroup.encode(v!, writer.uint32(98).fork()).join(); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Message { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): Message { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMessage(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.id = longToString(reader.int64() as Long); + message.id = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.deliveryDate = longToString(reader.int64() as Long); + message.deliveryDate = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } - message.modificationDate = longToString(reader.int64() as Long); + message.modificationDate = reader.int64().toString(); continue; - case 4: + } + case 4: { if (tag !== 34) { break; } message.text = reader.string(); continue; - case 5: + } + case 5: { if (tag !== 40) { break; } - message.senderId = longToString(reader.int64() as Long); + message.senderId = reader.int64().toString(); continue; - case 6: + } + case 6: { if (tag !== 48) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 7: + } + case 7: { if (tag !== 56) { break; } message.isSystemMessage = reader.bool(); continue; - case 8: + } + case 8: { if (tag !== 64) { break; } - message.recipientId = longToString(reader.int64() as Long); + message.recipientId = reader.int64().toString(); continue; - case 9: + } + case 9: { if (tag !== 74) { break; } message.records.push(reader.bytes()); continue; - case 10: + } + case 10: { if (tag !== 80) { break; } message.sequenceId = reader.int32(); continue; - case 11: + } + case 11: { if (tag !== 88) { break; } - message.preMessageId = longToString(reader.int64() as Long); + message.preMessageId = reader.int64().toString(); continue; - case 12: + } + case 12: { if (tag !== 98) { break; } message.reactionGroups.push(MessageReactionGroup.decode(reader, reader.uint32())); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/message/message_reaction_group.ts b/turms-client-js/src/model/proto/model/message/message_reaction_group.ts index adc1176e0c..71d336dd16 100644 --- a/turms-client-js/src/model/proto/model/message/message_reaction_group.ts +++ b/turms-client-js/src/model/proto/model/message/message_reaction_group.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/message/message_reaction_group.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; import { UserInfo } from "../user/user_info"; @@ -22,8 +22,8 @@ function createBaseMessageReactionGroup(): MessageReactionGroup { return { reactionType: 0, reactionCount: 0, userInfos: [], customAttributes: [] }; } -export const MessageReactionGroup = { - encode(message: MessageReactionGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const MessageReactionGroup: MessageFns = { + encode(message: MessageReactionGroup, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.reactionType !== 0) { writer.uint32(8).int32(message.reactionType); } @@ -31,55 +31,64 @@ export const MessageReactionGroup = { writer.uint32(16).int32(message.reactionCount); } for (const v of message.userInfos) { - UserInfo.encode(v!, writer.uint32(26).fork()).ldelim(); + UserInfo.encode(v!, writer.uint32(26).fork()).join(); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): MessageReactionGroup { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): MessageReactionGroup { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMessageReactionGroup(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } message.reactionType = reader.int32(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.reactionCount = reader.int32(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.userInfos.push(UserInfo.decode(reader, reader.uint32())); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} diff --git a/turms-client-js/src/model/proto/model/message/messages.ts b/turms-client-js/src/model/proto/model/message/messages.ts index c552247518..9a2b395b5a 100644 --- a/turms-client-js/src/model/proto/model/message/messages.ts +++ b/turms-client-js/src/model/proto/model/message/messages.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/message/messages.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Message } from "./message"; export const protobufPackage = "im.turms.proto"; @@ -18,34 +18,40 @@ function createBaseMessages(): Messages { return { messages: [] }; } -export const Messages = { - encode(message: Messages, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const Messages: MessageFns = { + encode(message: Messages, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.messages) { - Message.encode(v!, writer.uint32(10).fork()).ldelim(); + Message.encode(v!, writer.uint32(10).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Messages { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): Messages { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMessages(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.messages.push(Message.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} diff --git a/turms-client-js/src/model/proto/model/message/messages_with_total.ts b/turms-client-js/src/model/proto/model/message/messages_with_total.ts index fac4da5a05..a40c379911 100644 --- a/turms-client-js/src/model/proto/model/message/messages_with_total.ts +++ b/turms-client-js/src/model/proto/model/message/messages_with_total.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/message/messages_with_total.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Message } from "./message"; export const protobufPackage = "im.turms.proto"; @@ -22,8 +21,8 @@ function createBaseMessagesWithTotal(): MessagesWithTotal { return { total: 0, isGroupMessage: false, fromId: "0", messages: [] }; } -export const MessagesWithTotal = { - encode(message: MessagesWithTotal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const MessagesWithTotal: MessageFns = { + encode(message: MessagesWithTotal, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.total !== 0) { writer.uint32(8).int32(message.total); } @@ -34,61 +33,61 @@ export const MessagesWithTotal = { writer.uint32(24).int64(message.fromId); } for (const v of message.messages) { - Message.encode(v!, writer.uint32(34).fork()).ldelim(); + Message.encode(v!, writer.uint32(34).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): MessagesWithTotal { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): MessagesWithTotal { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMessagesWithTotal(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } message.total = reader.int32(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.isGroupMessage = reader.bool(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } - message.fromId = longToString(reader.int64() as Long); + message.fromId = reader.int64().toString(); continue; - case 4: + } + case 4: { if (tag !== 34) { break; } message.messages.push(Message.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/message/messages_with_total_list.ts b/turms-client-js/src/model/proto/model/message/messages_with_total_list.ts index 3643973998..58ba08371c 100644 --- a/turms-client-js/src/model/proto/model/message/messages_with_total_list.ts +++ b/turms-client-js/src/model/proto/model/message/messages_with_total_list.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/message/messages_with_total_list.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { MessagesWithTotal } from "./messages_with_total"; export const protobufPackage = "im.turms.proto"; @@ -18,34 +18,40 @@ function createBaseMessagesWithTotalList(): MessagesWithTotalList { return { messagesWithTotalList: [] }; } -export const MessagesWithTotalList = { - encode(message: MessagesWithTotalList, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const MessagesWithTotalList: MessageFns = { + encode(message: MessagesWithTotalList, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.messagesWithTotalList) { - MessagesWithTotal.encode(v!, writer.uint32(10).fork()).ldelim(); + MessagesWithTotal.encode(v!, writer.uint32(10).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): MessagesWithTotalList { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): MessagesWithTotalList { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMessagesWithTotalList(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.messagesWithTotalList.push(MessagesWithTotal.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} diff --git a/turms-client-js/src/model/proto/model/storage/storage_resource_info.ts b/turms-client-js/src/model/proto/model/storage/storage_resource_info.ts index 40f741cb5e..987695e5e6 100644 --- a/turms-client-js/src/model/proto/model/storage/storage_resource_info.ts +++ b/turms-client-js/src/model/proto/model/storage/storage_resource_info.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/storage/storage_resource_info.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -33,8 +32,8 @@ function createBaseStorageResourceInfo(): StorageResourceInfo { }; } -export const StorageResourceInfo = { - encode(message: StorageResourceInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const StorageResourceInfo: MessageFns = { + encode(message: StorageResourceInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.idNum !== undefined) { writer.uint32(8).int64(message.idNum); } @@ -54,82 +53,85 @@ export const StorageResourceInfo = { writer.uint32(48).int64(message.creationDate); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): StorageResourceInfo { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): StorageResourceInfo { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStorageResourceInfo(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.idNum = longToString(reader.int64() as Long); + message.idNum = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.idStr = reader.string(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.name = reader.string(); continue; - case 4: + } + case 4: { if (tag !== 34) { break; } message.mediaType = reader.string(); continue; - case 5: + } + case 5: { if (tag !== 40) { break; } - message.uploaderId = longToString(reader.int64() as Long); + message.uploaderId = reader.int64().toString(); continue; - case 6: + } + case 6: { if (tag !== 48) { break; } - message.creationDate = longToString(reader.int64() as Long); + message.creationDate = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/storage/storage_resource_infos.ts b/turms-client-js/src/model/proto/model/storage/storage_resource_infos.ts index 72b8a156f9..ffec6d9451 100644 --- a/turms-client-js/src/model/proto/model/storage/storage_resource_infos.ts +++ b/turms-client-js/src/model/proto/model/storage/storage_resource_infos.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/storage/storage_resource_infos.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { StorageResourceInfo } from "./storage_resource_info"; export const protobufPackage = "im.turms.proto"; @@ -18,34 +18,40 @@ function createBaseStorageResourceInfos(): StorageResourceInfos { return { infos: [] }; } -export const StorageResourceInfos = { - encode(message: StorageResourceInfos, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const StorageResourceInfos: MessageFns = { + encode(message: StorageResourceInfos, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.infos) { - StorageResourceInfo.encode(v!, writer.uint32(10).fork()).ldelim(); + StorageResourceInfo.encode(v!, writer.uint32(10).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): StorageResourceInfos { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): StorageResourceInfos { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStorageResourceInfos(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.infos.push(StorageResourceInfo.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} diff --git a/turms-client-js/src/model/proto/model/user/nearby_user.ts b/turms-client-js/src/model/proto/model/user/nearby_user.ts index ca1f4614c4..2339e77b69 100644 --- a/turms-client-js/src/model/proto/model/user/nearby_user.ts +++ b/turms-client-js/src/model/proto/model/user/nearby_user.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/user/nearby_user.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { DeviceType } from "../../constant/device_type"; import { Value } from "../common/value"; import { UserInfo } from "./user_info"; @@ -41,8 +40,8 @@ function createBaseNearbyUser(): NearbyUser { }; } -export const NearbyUser = { - encode(message: NearbyUser, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const NearbyUser: MessageFns = { + encode(message: NearbyUser, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.userId !== "0") { writer.uint32(8).int64(message.userId); } @@ -50,84 +49,86 @@ export const NearbyUser = { writer.uint32(16).int32(message.deviceType); } if (message.info !== undefined) { - UserInfo.encode(message.info, writer.uint32(26).fork()).ldelim(); + UserInfo.encode(message.info, writer.uint32(26).fork()).join(); } if (message.distance !== undefined) { writer.uint32(32).int32(message.distance); } if (message.location !== undefined) { - UserLocation.encode(message.location, writer.uint32(42).fork()).ldelim(); + UserLocation.encode(message.location, writer.uint32(42).fork()).join(); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): NearbyUser { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): NearbyUser { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseNearbyUser(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.userId = longToString(reader.int64() as Long); + message.userId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.deviceType = reader.int32() as any; continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.info = UserInfo.decode(reader, reader.uint32()); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } message.distance = reader.int32(); continue; - case 5: + } + case 5: { if (tag !== 42) { break; } message.location = UserLocation.decode(reader, reader.uint32()); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/user/nearby_users.ts b/turms-client-js/src/model/proto/model/user/nearby_users.ts index 8b2481d4e1..1b1f182fc9 100644 --- a/turms-client-js/src/model/proto/model/user/nearby_users.ts +++ b/turms-client-js/src/model/proto/model/user/nearby_users.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/user/nearby_users.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { NearbyUser } from "./nearby_user"; export const protobufPackage = "im.turms.proto"; @@ -18,34 +18,40 @@ function createBaseNearbyUsers(): NearbyUsers { return { nearbyUsers: [] }; } -export const NearbyUsers = { - encode(message: NearbyUsers, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const NearbyUsers: MessageFns = { + encode(message: NearbyUsers, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.nearbyUsers) { - NearbyUser.encode(v!, writer.uint32(10).fork()).ldelim(); + NearbyUser.encode(v!, writer.uint32(10).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): NearbyUsers { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): NearbyUsers { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseNearbyUsers(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.nearbyUsers.push(NearbyUser.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} diff --git a/turms-client-js/src/model/proto/model/user/user_friend_request.ts b/turms-client-js/src/model/proto/model/user/user_friend_request.ts index 83d6dbed3f..0eee0e058e 100644 --- a/turms-client-js/src/model/proto/model/user/user_friend_request.ts +++ b/turms-client-js/src/model/proto/model/user/user_friend_request.ts @@ -1,13 +1,13 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/user/user_friend_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { RequestStatus } from "../../constant/request_status"; +import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -20,6 +20,7 @@ export interface UserFriendRequest { expirationDate?: string | undefined; requesterId?: string | undefined; recipientId?: string | undefined; + customAttributes: Value[]; } function createBaseUserFriendRequest(): UserFriendRequest { @@ -32,11 +33,12 @@ function createBaseUserFriendRequest(): UserFriendRequest { expirationDate: undefined, requesterId: undefined, recipientId: undefined, + customAttributes: [], }; } -export const UserFriendRequest = { - encode(message: UserFriendRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UserFriendRequest: MessageFns = { + encode(message: UserFriendRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.id !== undefined) { writer.uint32(8).int64(message.id); } @@ -61,87 +63,102 @@ export const UserFriendRequest = { if (message.recipientId !== undefined) { writer.uint32(64).int64(message.recipientId); } + for (const v of message.customAttributes) { + Value.encode(v!, writer.uint32(122).fork()).join(); + } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UserFriendRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UserFriendRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUserFriendRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.id = longToString(reader.int64() as Long); + message.id = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.creationDate = longToString(reader.int64() as Long); + message.creationDate = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.content = reader.string(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } message.requestStatus = reader.int32() as any; continue; - case 5: + } + case 5: { if (tag !== 42) { break; } message.reason = reader.string(); continue; - case 6: + } + case 6: { if (tag !== 48) { break; } - message.expirationDate = longToString(reader.int64() as Long); + message.expirationDate = reader.int64().toString(); continue; - case 7: + } + case 7: { if (tag !== 56) { break; } - message.requesterId = longToString(reader.int64() as Long); + message.requesterId = reader.int64().toString(); continue; - case 8: + } + case 8: { if (tag !== 64) { break; } - message.recipientId = longToString(reader.int64() as Long); + message.recipientId = reader.int64().toString(); continue; + } + case 15: { + if (tag !== 122) { + break; + } + + message.customAttributes.push(Value.decode(reader, reader.uint32())); + continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/user/user_friend_requests_with_version.ts b/turms-client-js/src/model/proto/model/user/user_friend_requests_with_version.ts index 764f9cd404..f3955a9797 100644 --- a/turms-client-js/src/model/proto/model/user/user_friend_requests_with_version.ts +++ b/turms-client-js/src/model/proto/model/user/user_friend_requests_with_version.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/user/user_friend_requests_with_version.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { UserFriendRequest } from "./user_friend_request"; export const protobufPackage = "im.turms.proto"; @@ -20,10 +19,10 @@ function createBaseUserFriendRequestsWithVersion(): UserFriendRequestsWithVersio return { userFriendRequests: [], lastUpdatedDate: undefined }; } -export const UserFriendRequestsWithVersion = { - encode(message: UserFriendRequestsWithVersion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UserFriendRequestsWithVersion: MessageFns = { + encode(message: UserFriendRequestsWithVersion, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.userFriendRequests) { - UserFriendRequest.encode(v!, writer.uint32(10).fork()).ldelim(); + UserFriendRequest.encode(v!, writer.uint32(10).fork()).join(); } if (message.lastUpdatedDate !== undefined) { writer.uint32(16).int64(message.lastUpdatedDate); @@ -31,42 +30,40 @@ export const UserFriendRequestsWithVersion = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UserFriendRequestsWithVersion { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UserFriendRequestsWithVersion { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUserFriendRequestsWithVersion(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.userFriendRequests.push(UserFriendRequest.decode(reader, reader.uint32())); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/user/user_info.ts b/turms-client-js/src/model/proto/model/user/user_info.ts index 190d722524..4d3b212d86 100644 --- a/turms-client-js/src/model/proto/model/user/user_info.ts +++ b/turms-client-js/src/model/proto/model/user/user_info.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/user/user_info.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { ProfileAccessStrategy } from "../../constant/profile_access_strategy"; import { Value } from "../common/value"; @@ -45,8 +44,8 @@ function createBaseUserInfo(): UserInfo { }; } -export const UserInfo = { - encode(message: UserInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UserInfo: MessageFns = { + encode(message: UserInfo, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.id !== undefined) { writer.uint32(8).int64(message.id); } @@ -72,78 +71,86 @@ export const UserInfo = { writer.uint32(64).bool(message.active); } Object.entries(message.userDefinedAttributes).forEach(([key, value]) => { - UserInfo_UserDefinedAttributesEntry.encode({ key: key as any, value }, writer.uint32(74).fork()).ldelim(); + UserInfo_UserDefinedAttributesEntry.encode({ key: key as any, value }, writer.uint32(74).fork()).join(); }); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UserInfo { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UserInfo { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUserInfo(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.id = longToString(reader.int64() as Long); + message.id = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.name = reader.string(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.intro = reader.string(); continue; - case 4: + } + case 4: { if (tag !== 34) { break; } message.profilePicture = reader.string(); continue; - case 5: + } + case 5: { if (tag !== 40) { break; } message.profileAccessStrategy = reader.int32() as any; continue; - case 6: + } + case 6: { if (tag !== 48) { break; } - message.registrationDate = longToString(reader.int64() as Long); + message.registrationDate = reader.int64().toString(); continue; - case 7: + } + case 7: { if (tag !== 56) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 8: + } + case 8: { if (tag !== 64) { break; } message.active = reader.bool(); continue; - case 9: + } + case 9: { if (tag !== 74) { break; } @@ -153,18 +160,20 @@ export const UserInfo = { message.userDefinedAttributes[entry9.key] = entry9.value; } continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -174,53 +183,51 @@ function createBaseUserInfo_UserDefinedAttributesEntry(): UserInfo_UserDefinedAt return { key: "", value: undefined }; } -export const UserInfo_UserDefinedAttributesEntry = { - encode(message: UserInfo_UserDefinedAttributesEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UserInfo_UserDefinedAttributesEntry: MessageFns = { + encode(message: UserInfo_UserDefinedAttributesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - Value.encode(message.value, writer.uint32(18).fork()).ldelim(); + Value.encode(message.value, writer.uint32(18).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UserInfo_UserDefinedAttributesEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UserInfo_UserDefinedAttributesEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUserInfo_UserDefinedAttributesEntry(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.key = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.value = Value.decode(reader, reader.uint32()); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/user/user_infos_with_version.ts b/turms-client-js/src/model/proto/model/user/user_infos_with_version.ts index e1e70c86e3..29a62486da 100644 --- a/turms-client-js/src/model/proto/model/user/user_infos_with_version.ts +++ b/turms-client-js/src/model/proto/model/user/user_infos_with_version.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/user/user_infos_with_version.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { UserInfo } from "./user_info"; export const protobufPackage = "im.turms.proto"; @@ -20,10 +19,10 @@ function createBaseUserInfosWithVersion(): UserInfosWithVersion { return { userInfos: [], lastUpdatedDate: undefined }; } -export const UserInfosWithVersion = { - encode(message: UserInfosWithVersion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UserInfosWithVersion: MessageFns = { + encode(message: UserInfosWithVersion, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.userInfos) { - UserInfo.encode(v!, writer.uint32(10).fork()).ldelim(); + UserInfo.encode(v!, writer.uint32(10).fork()).join(); } if (message.lastUpdatedDate !== undefined) { writer.uint32(16).int64(message.lastUpdatedDate); @@ -31,42 +30,40 @@ export const UserInfosWithVersion = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UserInfosWithVersion { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UserInfosWithVersion { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUserInfosWithVersion(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.userInfos.push(UserInfo.decode(reader, reader.uint32())); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/user/user_location.ts b/turms-client-js/src/model/proto/model/user/user_location.ts index 979ad3dc92..17ea214370 100644 --- a/turms-client-js/src/model/proto/model/user/user_location.ts +++ b/turms-client-js/src/model/proto/model/user/user_location.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/user/user_location.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -31,8 +30,8 @@ function createBaseUserLocation(): UserLocation { return { latitude: 0, longitude: 0, timestamp: undefined, details: {}, customAttributes: [] }; } -export const UserLocation = { - encode(message: UserLocation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UserLocation: MessageFns = { + encode(message: UserLocation, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.latitude !== 0) { writer.uint32(13).float(message.latitude); } @@ -43,43 +42,46 @@ export const UserLocation = { writer.uint32(24).int64(message.timestamp); } Object.entries(message.details).forEach(([key, value]) => { - UserLocation_DetailsEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).ldelim(); + UserLocation_DetailsEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).join(); }); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UserLocation { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UserLocation { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUserLocation(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 13) { break; } message.latitude = reader.float(); continue; - case 2: + } + case 2: { if (tag !== 21) { break; } message.longitude = reader.float(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } - message.timestamp = longToString(reader.int64() as Long); + message.timestamp = reader.int64().toString(); continue; - case 4: + } + case 4: { if (tag !== 34) { break; } @@ -89,18 +91,20 @@ export const UserLocation = { message.details[entry4.key] = entry4.value; } continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -110,8 +114,8 @@ function createBaseUserLocation_DetailsEntry(): UserLocation_DetailsEntry { return { key: "", value: "" }; } -export const UserLocation_DetailsEntry = { - encode(message: UserLocation_DetailsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UserLocation_DetailsEntry: MessageFns = { + encode(message: UserLocation_DetailsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -121,42 +125,40 @@ export const UserLocation_DetailsEntry = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UserLocation_DetailsEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UserLocation_DetailsEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUserLocation_DetailsEntry(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.key = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.value = reader.string(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/user/user_online_status.ts b/turms-client-js/src/model/proto/model/user/user_online_status.ts index 5147167772..a9a564f66a 100644 --- a/turms-client-js/src/model/proto/model/user/user_online_status.ts +++ b/turms-client-js/src/model/proto/model/user/user_online_status.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/user/user_online_status.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { DeviceType } from "../../constant/device_type"; import { UserStatus } from "../../constant/user_status"; import { Value } from "../common/value"; @@ -24,8 +23,8 @@ function createBaseUserOnlineStatus(): UserOnlineStatus { return { userId: "0", userStatus: 0, deviceTypes: [], customAttributes: [] }; } -export const UserOnlineStatus = { - encode(message: UserOnlineStatus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UserOnlineStatus: MessageFns = { + encode(message: UserOnlineStatus, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.userId !== "0") { writer.uint32(8).int64(message.userId); } @@ -36,35 +35,37 @@ export const UserOnlineStatus = { for (const v of message.deviceTypes) { writer.int32(v); } - writer.ldelim(); + writer.join(); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UserOnlineStatus { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UserOnlineStatus { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUserOnlineStatus(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.userId = longToString(reader.int64() as Long); + message.userId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.userStatus = reader.int32() as any; continue; - case 3: + } + case 3: { if (tag === 24) { message.deviceTypes.push(reader.int32() as any); @@ -81,28 +82,26 @@ export const UserOnlineStatus = { } break; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/user/user_online_statuses.ts b/turms-client-js/src/model/proto/model/user/user_online_statuses.ts index 3f29173b2b..35ca62fcfb 100644 --- a/turms-client-js/src/model/proto/model/user/user_online_statuses.ts +++ b/turms-client-js/src/model/proto/model/user/user_online_statuses.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/user/user_online_statuses.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { UserOnlineStatus } from "./user_online_status"; export const protobufPackage = "im.turms.proto"; @@ -18,34 +18,40 @@ function createBaseUserOnlineStatuses(): UserOnlineStatuses { return { statuses: [] }; } -export const UserOnlineStatuses = { - encode(message: UserOnlineStatuses, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UserOnlineStatuses: MessageFns = { + encode(message: UserOnlineStatuses, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.statuses) { - UserOnlineStatus.encode(v!, writer.uint32(10).fork()).ldelim(); + UserOnlineStatus.encode(v!, writer.uint32(10).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UserOnlineStatuses { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UserOnlineStatuses { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUserOnlineStatuses(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.statuses.push(UserOnlineStatus.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} diff --git a/turms-client-js/src/model/proto/model/user/user_relationship.ts b/turms-client-js/src/model/proto/model/user/user_relationship.ts index a7613385dd..4c4e4036a7 100644 --- a/turms-client-js/src/model/proto/model/user/user_relationship.ts +++ b/turms-client-js/src/model/proto/model/user/user_relationship.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/user/user_relationship.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -18,6 +17,7 @@ export interface UserRelationship { groupIndex?: string | undefined; establishmentDate?: string | undefined; name?: string | undefined; + note?: string | undefined; customAttributes: Value[]; } @@ -29,12 +29,13 @@ function createBaseUserRelationship(): UserRelationship { groupIndex: undefined, establishmentDate: undefined, name: undefined, + note: undefined, customAttributes: [], }; } -export const UserRelationship = { - encode(message: UserRelationship, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UserRelationship: MessageFns = { + encode(message: UserRelationship, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.ownerId !== undefined) { writer.uint32(8).int64(message.ownerId); } @@ -53,83 +54,97 @@ export const UserRelationship = { if (message.name !== undefined) { writer.uint32(50).string(message.name); } + if (message.note !== undefined) { + writer.uint32(58).string(message.note); + } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UserRelationship { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UserRelationship { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUserRelationship(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.ownerId = longToString(reader.int64() as Long); + message.ownerId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.relatedUserId = longToString(reader.int64() as Long); + message.relatedUserId = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } - message.blockDate = longToString(reader.int64() as Long); + message.blockDate = reader.int64().toString(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } - message.groupIndex = longToString(reader.int64() as Long); + message.groupIndex = reader.int64().toString(); continue; - case 5: + } + case 5: { if (tag !== 40) { break; } - message.establishmentDate = longToString(reader.int64() as Long); + message.establishmentDate = reader.int64().toString(); continue; - case 6: + } + case 6: { if (tag !== 50) { break; } message.name = reader.string(); continue; - case 15: + } + case 7: { + if (tag !== 58) { + break; + } + + message.note = reader.string(); + continue; + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/user/user_relationship_group.ts b/turms-client-js/src/model/proto/model/user/user_relationship_group.ts index dff2454cc5..c0daa13238 100644 --- a/turms-client-js/src/model/proto/model/user/user_relationship_group.ts +++ b/turms-client-js/src/model/proto/model/user/user_relationship_group.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/user/user_relationship_group.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -20,8 +20,8 @@ function createBaseUserRelationshipGroup(): UserRelationshipGroup { return { index: 0, name: "", customAttributes: [] }; } -export const UserRelationshipGroup = { - encode(message: UserRelationshipGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UserRelationshipGroup: MessageFns = { + encode(message: UserRelationshipGroup, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.index !== 0) { writer.uint32(8).int32(message.index); } @@ -29,45 +29,53 @@ export const UserRelationshipGroup = { writer.uint32(18).string(message.name); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UserRelationshipGroup { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UserRelationshipGroup { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUserRelationshipGroup(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } message.index = reader.int32(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.name = reader.string(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} diff --git a/turms-client-js/src/model/proto/model/user/user_relationship_groups_with_version.ts b/turms-client-js/src/model/proto/model/user/user_relationship_groups_with_version.ts index bf8949221e..9eb86a6b8f 100644 --- a/turms-client-js/src/model/proto/model/user/user_relationship_groups_with_version.ts +++ b/turms-client-js/src/model/proto/model/user/user_relationship_groups_with_version.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/user/user_relationship_groups_with_version.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { UserRelationshipGroup } from "./user_relationship_group"; export const protobufPackage = "im.turms.proto"; @@ -20,10 +19,10 @@ function createBaseUserRelationshipGroupsWithVersion(): UserRelationshipGroupsWi return { userRelationshipGroups: [], lastUpdatedDate: undefined }; } -export const UserRelationshipGroupsWithVersion = { - encode(message: UserRelationshipGroupsWithVersion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UserRelationshipGroupsWithVersion: MessageFns = { + encode(message: UserRelationshipGroupsWithVersion, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.userRelationshipGroups) { - UserRelationshipGroup.encode(v!, writer.uint32(10).fork()).ldelim(); + UserRelationshipGroup.encode(v!, writer.uint32(10).fork()).join(); } if (message.lastUpdatedDate !== undefined) { writer.uint32(16).int64(message.lastUpdatedDate); @@ -31,42 +30,40 @@ export const UserRelationshipGroupsWithVersion = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UserRelationshipGroupsWithVersion { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UserRelationshipGroupsWithVersion { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUserRelationshipGroupsWithVersion(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.userRelationshipGroups.push(UserRelationshipGroup.decode(reader, reader.uint32())); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/user/user_relationships_with_version.ts b/turms-client-js/src/model/proto/model/user/user_relationships_with_version.ts index 0ef8fbded3..ea6fadc0dc 100644 --- a/turms-client-js/src/model/proto/model/user/user_relationships_with_version.ts +++ b/turms-client-js/src/model/proto/model/user/user_relationships_with_version.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/user/user_relationships_with_version.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { UserRelationship } from "./user_relationship"; export const protobufPackage = "im.turms.proto"; @@ -20,10 +19,10 @@ function createBaseUserRelationshipsWithVersion(): UserRelationshipsWithVersion return { userRelationships: [], lastUpdatedDate: undefined }; } -export const UserRelationshipsWithVersion = { - encode(message: UserRelationshipsWithVersion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UserRelationshipsWithVersion: MessageFns = { + encode(message: UserRelationshipsWithVersion, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.userRelationships) { - UserRelationship.encode(v!, writer.uint32(10).fork()).ldelim(); + UserRelationship.encode(v!, writer.uint32(10).fork()).join(); } if (message.lastUpdatedDate !== undefined) { writer.uint32(16).int64(message.lastUpdatedDate); @@ -31,42 +30,40 @@ export const UserRelationshipsWithVersion = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UserRelationshipsWithVersion { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UserRelationshipsWithVersion { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUserRelationshipsWithVersion(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.userRelationships.push(UserRelationship.decode(reader, reader.uint32())); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/model/user/user_session.ts b/turms-client-js/src/model/proto/model/user/user_session.ts index ed2fedd8dd..796f8a0b56 100644 --- a/turms-client-js/src/model/proto/model/user/user_session.ts +++ b/turms-client-js/src/model/proto/model/user/user_session.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/user/user_session.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -20,8 +20,8 @@ function createBaseUserSession(): UserSession { return { sessionId: "", serverId: "", customAttributes: [] }; } -export const UserSession = { - encode(message: UserSession, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UserSession: MessageFns = { + encode(message: UserSession, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.sessionId !== "") { writer.uint32(10).string(message.sessionId); } @@ -29,45 +29,53 @@ export const UserSession = { writer.uint32(18).string(message.serverId); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UserSession { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UserSession { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUserSession(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.sessionId = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.serverId = reader.string(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} diff --git a/turms-client-js/src/model/proto/model/user/user_settings.ts b/turms-client-js/src/model/proto/model/user/user_settings.ts index f59b867332..2639ba4d59 100644 --- a/turms-client-js/src/model/proto/model/user/user_settings.ts +++ b/turms-client-js/src/model/proto/model/user/user_settings.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: model/user/user_settings.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../common/value"; export const protobufPackage = "im.turms.proto"; @@ -26,28 +25,28 @@ function createBaseUserSettings(): UserSettings { return { settings: {}, lastUpdatedDate: undefined, customAttributes: [] }; } -export const UserSettings = { - encode(message: UserSettings, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UserSettings: MessageFns = { + encode(message: UserSettings, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { Object.entries(message.settings).forEach(([key, value]) => { - UserSettings_SettingsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).ldelim(); + UserSettings_SettingsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join(); }); if (message.lastUpdatedDate !== undefined) { writer.uint32(16).int64(message.lastUpdatedDate); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UserSettings { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UserSettings { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUserSettings(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } @@ -57,25 +56,28 @@ export const UserSettings = { message.settings[entry1.key] = entry1.value; } continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -85,53 +87,51 @@ function createBaseUserSettings_SettingsEntry(): UserSettings_SettingsEntry { return { key: "", value: undefined }; } -export const UserSettings_SettingsEntry = { - encode(message: UserSettings_SettingsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UserSettings_SettingsEntry: MessageFns = { + encode(message: UserSettings_SettingsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - Value.encode(message.value, writer.uint32(18).fork()).ldelim(); + Value.encode(message.value, writer.uint32(18).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UserSettings_SettingsEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UserSettings_SettingsEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUserSettings_SettingsEntry(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.key = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.value = Value.decode(reader, reader.uint32()); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; } diff --git a/turms-client-js/src/model/proto/notification/turms_notification.ts b/turms-client-js/src/model/proto/notification/turms_notification.ts index 8a9e4e1c86..eea7096feb 100644 --- a/turms-client-js/src/model/proto/notification/turms_notification.ts +++ b/turms-client-js/src/model/proto/notification/turms_notification.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: notification/turms_notification.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { LongsWithVersion } from "../model/common/longs_with_version"; import { StringsWithVersion } from "../model/common/strings_with_version"; import { Value } from "../model/common/value"; @@ -126,13 +125,13 @@ function createBaseTurmsNotification(): TurmsNotification { }; } -export const TurmsNotification = { - encode(message: TurmsNotification, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const TurmsNotification: MessageFns = { + encode(message: TurmsNotification, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.timestamp !== "0") { writer.uint32(8).int64(message.timestamp); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(18).fork()).ldelim(); + Value.encode(v!, writer.uint32(18).fork()).join(); } if (message.requestId !== undefined) { writer.uint32(32).int64(message.requestId); @@ -144,7 +143,7 @@ export const TurmsNotification = { writer.uint32(50).string(message.reason); } if (message.data !== undefined) { - TurmsNotification_Data.encode(message.data, writer.uint32(58).fork()).ldelim(); + TurmsNotification_Data.encode(message.data, writer.uint32(58).fork()).join(); } if (message.requesterId !== undefined) { writer.uint32(80).int64(message.requesterId); @@ -153,86 +152,95 @@ export const TurmsNotification = { writer.uint32(88).int32(message.closeStatus); } if (message.relayedRequest !== undefined) { - TurmsRequest.encode(message.relayedRequest, writer.uint32(98).fork()).ldelim(); + TurmsRequest.encode(message.relayedRequest, writer.uint32(98).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): TurmsNotification { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): TurmsNotification { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTurmsNotification(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.timestamp = longToString(reader.int64() as Long); + message.timestamp = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } - message.requestId = longToString(reader.int64() as Long); + message.requestId = reader.int64().toString(); continue; - case 5: + } + case 5: { if (tag !== 40) { break; } message.code = reader.int32(); continue; - case 6: + } + case 6: { if (tag !== 50) { break; } message.reason = reader.string(); continue; - case 7: + } + case 7: { if (tag !== 58) { break; } message.data = TurmsNotification_Data.decode(reader, reader.uint32()); continue; - case 10: + } + case 10: { if (tag !== 80) { break; } - message.requesterId = longToString(reader.int64() as Long); + message.requesterId = reader.int64().toString(); continue; - case 11: + } + case 11: { if (tag !== 88) { break; } message.closeStatus = reader.int32(); continue; - case 12: + } + case 12: { if (tag !== 98) { break; } message.relayedRequest = TurmsRequest.decode(reader, reader.uint32()); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -267,8 +275,8 @@ function createBaseTurmsNotification_Data(): TurmsNotification_Data { }; } -export const TurmsNotification_Data = { - encode(message: TurmsNotification_Data, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const TurmsNotification_Data: MessageFns = { + encode(message: TurmsNotification_Data, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.long !== undefined) { writer.uint32(8).int64(message.long); } @@ -276,265 +284,285 @@ export const TurmsNotification_Data = { writer.uint32(18).string(message.string); } if (message.longsWithVersion !== undefined) { - LongsWithVersion.encode(message.longsWithVersion, writer.uint32(26).fork()).ldelim(); + LongsWithVersion.encode(message.longsWithVersion, writer.uint32(26).fork()).join(); } if (message.stringsWithVersion !== undefined) { - StringsWithVersion.encode(message.stringsWithVersion, writer.uint32(34).fork()).ldelim(); + StringsWithVersion.encode(message.stringsWithVersion, writer.uint32(34).fork()).join(); } if (message.conversations !== undefined) { - Conversations.encode(message.conversations, writer.uint32(42).fork()).ldelim(); + Conversations.encode(message.conversations, writer.uint32(42).fork()).join(); } if (message.messages !== undefined) { - Messages.encode(message.messages, writer.uint32(50).fork()).ldelim(); + Messages.encode(message.messages, writer.uint32(50).fork()).join(); } if (message.messagesWithTotalList !== undefined) { - MessagesWithTotalList.encode(message.messagesWithTotalList, writer.uint32(58).fork()).ldelim(); + MessagesWithTotalList.encode(message.messagesWithTotalList, writer.uint32(58).fork()).join(); } if (message.userSession !== undefined) { - UserSession.encode(message.userSession, writer.uint32(66).fork()).ldelim(); + UserSession.encode(message.userSession, writer.uint32(66).fork()).join(); } if (message.userInfosWithVersion !== undefined) { - UserInfosWithVersion.encode(message.userInfosWithVersion, writer.uint32(74).fork()).ldelim(); + UserInfosWithVersion.encode(message.userInfosWithVersion, writer.uint32(74).fork()).join(); } if (message.userOnlineStatuses !== undefined) { - UserOnlineStatuses.encode(message.userOnlineStatuses, writer.uint32(82).fork()).ldelim(); + UserOnlineStatuses.encode(message.userOnlineStatuses, writer.uint32(82).fork()).join(); } if (message.userFriendRequestsWithVersion !== undefined) { - UserFriendRequestsWithVersion.encode(message.userFriendRequestsWithVersion, writer.uint32(90).fork()).ldelim(); + UserFriendRequestsWithVersion.encode(message.userFriendRequestsWithVersion, writer.uint32(90).fork()).join(); } if (message.userRelationshipGroupsWithVersion !== undefined) { UserRelationshipGroupsWithVersion.encode(message.userRelationshipGroupsWithVersion, writer.uint32(98).fork()) - .ldelim(); + .join(); } if (message.userRelationshipsWithVersion !== undefined) { - UserRelationshipsWithVersion.encode(message.userRelationshipsWithVersion, writer.uint32(106).fork()).ldelim(); + UserRelationshipsWithVersion.encode(message.userRelationshipsWithVersion, writer.uint32(106).fork()).join(); } if (message.nearbyUsers !== undefined) { - NearbyUsers.encode(message.nearbyUsers, writer.uint32(114).fork()).ldelim(); + NearbyUsers.encode(message.nearbyUsers, writer.uint32(114).fork()).join(); } if (message.groupInvitationsWithVersion !== undefined) { - GroupInvitationsWithVersion.encode(message.groupInvitationsWithVersion, writer.uint32(122).fork()).ldelim(); + GroupInvitationsWithVersion.encode(message.groupInvitationsWithVersion, writer.uint32(122).fork()).join(); } if (message.groupJoinQuestionAnswerResult !== undefined) { - GroupJoinQuestionsAnswerResult.encode(message.groupJoinQuestionAnswerResult, writer.uint32(130).fork()).ldelim(); + GroupJoinQuestionsAnswerResult.encode(message.groupJoinQuestionAnswerResult, writer.uint32(130).fork()).join(); } if (message.groupJoinRequestsWithVersion !== undefined) { - GroupJoinRequestsWithVersion.encode(message.groupJoinRequestsWithVersion, writer.uint32(138).fork()).ldelim(); + GroupJoinRequestsWithVersion.encode(message.groupJoinRequestsWithVersion, writer.uint32(138).fork()).join(); } if (message.groupJoinQuestionsWithVersion !== undefined) { - GroupJoinQuestionsWithVersion.encode(message.groupJoinQuestionsWithVersion, writer.uint32(146).fork()).ldelim(); + GroupJoinQuestionsWithVersion.encode(message.groupJoinQuestionsWithVersion, writer.uint32(146).fork()).join(); } if (message.groupMembersWithVersion !== undefined) { - GroupMembersWithVersion.encode(message.groupMembersWithVersion, writer.uint32(154).fork()).ldelim(); + GroupMembersWithVersion.encode(message.groupMembersWithVersion, writer.uint32(154).fork()).join(); } if (message.groupsWithVersion !== undefined) { - GroupsWithVersion.encode(message.groupsWithVersion, writer.uint32(162).fork()).ldelim(); + GroupsWithVersion.encode(message.groupsWithVersion, writer.uint32(162).fork()).join(); } if (message.meetings !== undefined) { - Meetings.encode(message.meetings, writer.uint32(322).fork()).ldelim(); + Meetings.encode(message.meetings, writer.uint32(322).fork()).join(); } if (message.storageResourceInfos !== undefined) { - StorageResourceInfos.encode(message.storageResourceInfos, writer.uint32(402).fork()).ldelim(); + StorageResourceInfos.encode(message.storageResourceInfos, writer.uint32(402).fork()).join(); } if (message.conversationSettingsList !== undefined) { - ConversationSettingsList.encode(message.conversationSettingsList, writer.uint32(1602).fork()).ldelim(); + ConversationSettingsList.encode(message.conversationSettingsList, writer.uint32(1602).fork()).join(); } if (message.userSettings !== undefined) { - UserSettings.encode(message.userSettings, writer.uint32(3202).fork()).ldelim(); + UserSettings.encode(message.userSettings, writer.uint32(3202).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): TurmsNotification_Data { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): TurmsNotification_Data { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTurmsNotification_Data(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.long = longToString(reader.int64() as Long); + message.long = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.string = reader.string(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.longsWithVersion = LongsWithVersion.decode(reader, reader.uint32()); continue; - case 4: + } + case 4: { if (tag !== 34) { break; } message.stringsWithVersion = StringsWithVersion.decode(reader, reader.uint32()); continue; - case 5: + } + case 5: { if (tag !== 42) { break; } message.conversations = Conversations.decode(reader, reader.uint32()); continue; - case 6: + } + case 6: { if (tag !== 50) { break; } message.messages = Messages.decode(reader, reader.uint32()); continue; - case 7: + } + case 7: { if (tag !== 58) { break; } message.messagesWithTotalList = MessagesWithTotalList.decode(reader, reader.uint32()); continue; - case 8: + } + case 8: { if (tag !== 66) { break; } message.userSession = UserSession.decode(reader, reader.uint32()); continue; - case 9: + } + case 9: { if (tag !== 74) { break; } message.userInfosWithVersion = UserInfosWithVersion.decode(reader, reader.uint32()); continue; - case 10: + } + case 10: { if (tag !== 82) { break; } message.userOnlineStatuses = UserOnlineStatuses.decode(reader, reader.uint32()); continue; - case 11: + } + case 11: { if (tag !== 90) { break; } message.userFriendRequestsWithVersion = UserFriendRequestsWithVersion.decode(reader, reader.uint32()); continue; - case 12: + } + case 12: { if (tag !== 98) { break; } message.userRelationshipGroupsWithVersion = UserRelationshipGroupsWithVersion.decode(reader, reader.uint32()); continue; - case 13: + } + case 13: { if (tag !== 106) { break; } message.userRelationshipsWithVersion = UserRelationshipsWithVersion.decode(reader, reader.uint32()); continue; - case 14: + } + case 14: { if (tag !== 114) { break; } message.nearbyUsers = NearbyUsers.decode(reader, reader.uint32()); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.groupInvitationsWithVersion = GroupInvitationsWithVersion.decode(reader, reader.uint32()); continue; - case 16: + } + case 16: { if (tag !== 130) { break; } message.groupJoinQuestionAnswerResult = GroupJoinQuestionsAnswerResult.decode(reader, reader.uint32()); continue; - case 17: + } + case 17: { if (tag !== 138) { break; } message.groupJoinRequestsWithVersion = GroupJoinRequestsWithVersion.decode(reader, reader.uint32()); continue; - case 18: + } + case 18: { if (tag !== 146) { break; } message.groupJoinQuestionsWithVersion = GroupJoinQuestionsWithVersion.decode(reader, reader.uint32()); continue; - case 19: + } + case 19: { if (tag !== 154) { break; } message.groupMembersWithVersion = GroupMembersWithVersion.decode(reader, reader.uint32()); continue; - case 20: + } + case 20: { if (tag !== 162) { break; } message.groupsWithVersion = GroupsWithVersion.decode(reader, reader.uint32()); continue; - case 40: + } + case 40: { if (tag !== 322) { break; } message.meetings = Meetings.decode(reader, reader.uint32()); continue; - case 50: + } + case 50: { if (tag !== 402) { break; } message.storageResourceInfos = StorageResourceInfos.decode(reader, reader.uint32()); continue; - case 200: + } + case 200: { if (tag !== 1602) { break; } message.conversationSettingsList = ConversationSettingsList.decode(reader, reader.uint32()); continue; - case 400: + } + case 400: { if (tag !== 3202) { break; } message.userSettings = UserSettings.decode(reader, reader.uint32()); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/conference/create_meeting_request.ts b/turms-client-js/src/model/proto/request/conference/create_meeting_request.ts index f5f9a072ff..ae6518723a 100644 --- a/turms-client-js/src/model/proto/request/conference/create_meeting_request.ts +++ b/turms-client-js/src/model/proto/request/conference/create_meeting_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/conference/create_meeting_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -33,8 +32,8 @@ function createBaseCreateMeetingRequest(): CreateMeetingRequest { }; } -export const CreateMeetingRequest = { - encode(message: CreateMeetingRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const CreateMeetingRequest: MessageFns = { + encode(message: CreateMeetingRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.userId !== undefined) { writer.uint32(8).int64(message.userId); } @@ -54,82 +53,85 @@ export const CreateMeetingRequest = { writer.uint32(48).int64(message.startDate); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateMeetingRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): CreateMeetingRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCreateMeetingRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.userId = longToString(reader.int64() as Long); + message.userId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.name = reader.string(); continue; - case 4: + } + case 4: { if (tag !== 34) { break; } message.intro = reader.string(); continue; - case 5: + } + case 5: { if (tag !== 42) { break; } message.password = reader.string(); continue; - case 6: + } + case 6: { if (tag !== 48) { break; } - message.startDate = longToString(reader.int64() as Long); + message.startDate = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/conference/delete_meeting_request.ts b/turms-client-js/src/model/proto/request/conference/delete_meeting_request.ts index 77150d7d00..bbaf503834 100644 --- a/turms-client-js/src/model/proto/request/conference/delete_meeting_request.ts +++ b/turms-client-js/src/model/proto/request/conference/delete_meeting_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/conference/delete_meeting_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -20,53 +19,51 @@ function createBaseDeleteMeetingRequest(): DeleteMeetingRequest { return { id: undefined, customAttributes: [] }; } -export const DeleteMeetingRequest = { - encode(message: DeleteMeetingRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const DeleteMeetingRequest: MessageFns = { + encode(message: DeleteMeetingRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.id !== undefined) { writer.uint32(8).int64(message.id); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteMeetingRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): DeleteMeetingRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeleteMeetingRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.id = longToString(reader.int64() as Long); + message.id = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/conference/query_meetings_request.ts b/turms-client-js/src/model/proto/request/conference/query_meetings_request.ts index d9876ffd9e..625e06eb34 100644 --- a/turms-client-js/src/model/proto/request/conference/query_meetings_request.ts +++ b/turms-client-js/src/model/proto/request/conference/query_meetings_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/conference/query_meetings_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -37,28 +36,28 @@ function createBaseQueryMeetingsRequest(): QueryMeetingsRequest { }; } -export const QueryMeetingsRequest = { - encode(message: QueryMeetingsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryMeetingsRequest: MessageFns = { + encode(message: QueryMeetingsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { writer.uint32(10).fork(); for (const v of message.ids) { writer.int64(v); } - writer.ldelim(); + writer.join(); writer.uint32(18).fork(); for (const v of message.creatorIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); writer.uint32(26).fork(); for (const v of message.userIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); writer.uint32(34).fork(); for (const v of message.groupIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); if (message.creationDateStart !== undefined) { writer.uint32(40).int64(message.creationDateStart); } @@ -72,21 +71,21 @@ export const QueryMeetingsRequest = { writer.uint32(88).int32(message.limit); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryMeetingsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryMeetingsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryMeetingsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag === 8) { - message.ids.push(longToString(reader.int64() as Long)); + message.ids.push(reader.int64().toString()); continue; } @@ -94,16 +93,17 @@ export const QueryMeetingsRequest = { if (tag === 10) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.ids.push(longToString(reader.int64() as Long)); + message.ids.push(reader.int64().toString()); } continue; } break; - case 2: + } + case 2: { if (tag === 16) { - message.creatorIds.push(longToString(reader.int64() as Long)); + message.creatorIds.push(reader.int64().toString()); continue; } @@ -111,16 +111,17 @@ export const QueryMeetingsRequest = { if (tag === 18) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.creatorIds.push(longToString(reader.int64() as Long)); + message.creatorIds.push(reader.int64().toString()); } continue; } break; - case 3: + } + case 3: { if (tag === 24) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); continue; } @@ -128,16 +129,17 @@ export const QueryMeetingsRequest = { if (tag === 26) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); } continue; } break; - case 4: + } + case 4: { if (tag === 32) { - message.groupIds.push(longToString(reader.int64() as Long)); + message.groupIds.push(reader.int64().toString()); continue; } @@ -145,63 +147,65 @@ export const QueryMeetingsRequest = { if (tag === 34) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.groupIds.push(longToString(reader.int64() as Long)); + message.groupIds.push(reader.int64().toString()); } continue; } break; - case 5: + } + case 5: { if (tag !== 40) { break; } - message.creationDateStart = longToString(reader.int64() as Long); + message.creationDateStart = reader.int64().toString(); continue; - case 6: + } + case 6: { if (tag !== 48) { break; } - message.creationDateEnd = longToString(reader.int64() as Long); + message.creationDateEnd = reader.int64().toString(); continue; - case 10: + } + case 10: { if (tag !== 80) { break; } message.skip = reader.int32(); continue; - case 11: + } + case 11: { if (tag !== 88) { break; } message.limit = reader.int32(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/conference/update_meeting_invitation_request.ts b/turms-client-js/src/model/proto/request/conference/update_meeting_invitation_request.ts index 2ee47363dc..597abdfeb7 100644 --- a/turms-client-js/src/model/proto/request/conference/update_meeting_invitation_request.ts +++ b/turms-client-js/src/model/proto/request/conference/update_meeting_invitation_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/conference/update_meeting_invitation_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { ResponseAction } from "../../constant/response_action"; import { Value } from "../../model/common/value"; @@ -27,8 +26,8 @@ function createBaseUpdateMeetingInvitationRequest(): UpdateMeetingInvitationRequ return { meetingId: "0", password: undefined, responseAction: 0, customAttributes: [] }; } -export const UpdateMeetingInvitationRequest = { - encode(message: UpdateMeetingInvitationRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateMeetingInvitationRequest: MessageFns = { + encode(message: UpdateMeetingInvitationRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.meetingId !== "0") { writer.uint32(8).int64(message.meetingId); } @@ -39,61 +38,61 @@ export const UpdateMeetingInvitationRequest = { writer.uint32(40).int32(message.responseAction); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateMeetingInvitationRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateMeetingInvitationRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateMeetingInvitationRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.meetingId = longToString(reader.int64() as Long); + message.meetingId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.password = reader.string(); continue; - case 5: + } + case 5: { if (tag !== 40) { break; } message.responseAction = reader.int32() as any; continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/conference/update_meeting_request.ts b/turms-client-js/src/model/proto/request/conference/update_meeting_request.ts index 8ddad55a4e..c417517b6d 100644 --- a/turms-client-js/src/model/proto/request/conference/update_meeting_request.ts +++ b/turms-client-js/src/model/proto/request/conference/update_meeting_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/conference/update_meeting_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -23,8 +22,8 @@ function createBaseUpdateMeetingRequest(): UpdateMeetingRequest { return { id: undefined, name: undefined, intro: undefined, password: undefined, customAttributes: [] }; } -export const UpdateMeetingRequest = { - encode(message: UpdateMeetingRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateMeetingRequest: MessageFns = { + encode(message: UpdateMeetingRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.id !== undefined) { writer.uint32(8).int64(message.id); } @@ -38,68 +37,69 @@ export const UpdateMeetingRequest = { writer.uint32(34).string(message.password); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateMeetingRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateMeetingRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateMeetingRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.id = longToString(reader.int64() as Long); + message.id = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.name = reader.string(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.intro = reader.string(); continue; - case 4: + } + case 4: { if (tag !== 34) { break; } message.password = reader.string(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/conversation/delete_conversation_settings_request.ts b/turms-client-js/src/model/proto/request/conversation/delete_conversation_settings_request.ts index ed14547cb8..d61f5ae221 100644 --- a/turms-client-js/src/model/proto/request/conversation/delete_conversation_settings_request.ts +++ b/turms-client-js/src/model/proto/request/conversation/delete_conversation_settings_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/conversation/delete_conversation_settings_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -22,37 +21,37 @@ function createBaseDeleteConversationSettingsRequest(): DeleteConversationSettin return { userIds: [], groupIds: [], names: [], customAttributes: [] }; } -export const DeleteConversationSettingsRequest = { - encode(message: DeleteConversationSettingsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const DeleteConversationSettingsRequest: MessageFns = { + encode(message: DeleteConversationSettingsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { writer.uint32(10).fork(); for (const v of message.userIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); writer.uint32(18).fork(); for (const v of message.groupIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); for (const v of message.names) { writer.uint32(26).string(v!); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteConversationSettingsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): DeleteConversationSettingsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeleteConversationSettingsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag === 8) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); continue; } @@ -60,16 +59,17 @@ export const DeleteConversationSettingsRequest = { if (tag === 10) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); } continue; } break; - case 2: + } + case 2: { if (tag === 16) { - message.groupIds.push(longToString(reader.int64() as Long)); + message.groupIds.push(reader.int64().toString()); continue; } @@ -77,42 +77,41 @@ export const DeleteConversationSettingsRequest = { if (tag === 18) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.groupIds.push(longToString(reader.int64() as Long)); + message.groupIds.push(reader.int64().toString()); } continue; } break; - case 3: + } + case 3: { if (tag !== 26) { break; } message.names.push(reader.string()); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/conversation/query_conversation_settings_request.ts b/turms-client-js/src/model/proto/request/conversation/query_conversation_settings_request.ts index 349d44dcc9..18fc3f73e3 100644 --- a/turms-client-js/src/model/proto/request/conversation/query_conversation_settings_request.ts +++ b/turms-client-js/src/model/proto/request/conversation/query_conversation_settings_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/conversation/query_conversation_settings_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -23,18 +22,18 @@ function createBaseQueryConversationSettingsRequest(): QueryConversationSettings return { userIds: [], groupIds: [], names: [], lastUpdatedDateStart: undefined, customAttributes: [] }; } -export const QueryConversationSettingsRequest = { - encode(message: QueryConversationSettingsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryConversationSettingsRequest: MessageFns = { + encode(message: QueryConversationSettingsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { writer.uint32(10).fork(); for (const v of message.userIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); writer.uint32(18).fork(); for (const v of message.groupIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); for (const v of message.names) { writer.uint32(26).string(v!); } @@ -42,21 +41,21 @@ export const QueryConversationSettingsRequest = { writer.uint32(32).int64(message.lastUpdatedDateStart); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryConversationSettingsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryConversationSettingsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryConversationSettingsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag === 8) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); continue; } @@ -64,16 +63,17 @@ export const QueryConversationSettingsRequest = { if (tag === 10) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); } continue; } break; - case 2: + } + case 2: { if (tag === 16) { - message.groupIds.push(longToString(reader.int64() as Long)); + message.groupIds.push(reader.int64().toString()); continue; } @@ -81,49 +81,49 @@ export const QueryConversationSettingsRequest = { if (tag === 18) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.groupIds.push(longToString(reader.int64() as Long)); + message.groupIds.push(reader.int64().toString()); } continue; } break; - case 3: + } + case 3: { if (tag !== 26) { break; } message.names.push(reader.string()); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } - message.lastUpdatedDateStart = longToString(reader.int64() as Long); + message.lastUpdatedDateStart = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/conversation/query_conversations_request.ts b/turms-client-js/src/model/proto/request/conversation/query_conversations_request.ts index 7ecfde5736..8de1abd5b6 100644 --- a/turms-client-js/src/model/proto/request/conversation/query_conversations_request.ts +++ b/turms-client-js/src/model/proto/request/conversation/query_conversations_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/conversation/query_conversations_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -23,34 +22,34 @@ function createBaseQueryConversationsRequest(): QueryConversationsRequest { return { userIds: [], groupIds: [], customAttributes: [] }; } -export const QueryConversationsRequest = { - encode(message: QueryConversationsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryConversationsRequest: MessageFns = { + encode(message: QueryConversationsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { writer.uint32(10).fork(); for (const v of message.userIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); writer.uint32(18).fork(); for (const v of message.groupIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryConversationsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryConversationsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryConversationsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag === 8) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); continue; } @@ -58,16 +57,17 @@ export const QueryConversationsRequest = { if (tag === 10) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); } continue; } break; - case 2: + } + case 2: { if (tag === 16) { - message.groupIds.push(longToString(reader.int64() as Long)); + message.groupIds.push(reader.int64().toString()); continue; } @@ -75,35 +75,33 @@ export const QueryConversationsRequest = { if (tag === 18) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.groupIds.push(longToString(reader.int64() as Long)); + message.groupIds.push(reader.int64().toString()); } continue; } break; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/conversation/update_conversation_request.ts b/turms-client-js/src/model/proto/request/conversation/update_conversation_request.ts index bd91618caa..e7b63a4ead 100644 --- a/turms-client-js/src/model/proto/request/conversation/update_conversation_request.ts +++ b/turms-client-js/src/model/proto/request/conversation/update_conversation_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/conversation/update_conversation_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -26,8 +25,8 @@ function createBaseUpdateConversationRequest(): UpdateConversationRequest { return { userId: undefined, groupId: undefined, readDate: "0", customAttributes: [] }; } -export const UpdateConversationRequest = { - encode(message: UpdateConversationRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateConversationRequest: MessageFns = { + encode(message: UpdateConversationRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.userId !== undefined) { writer.uint32(8).int64(message.userId); } @@ -38,61 +37,61 @@ export const UpdateConversationRequest = { writer.uint32(24).int64(message.readDate); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateConversationRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateConversationRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateConversationRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.userId = longToString(reader.int64() as Long); + message.userId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } - message.readDate = longToString(reader.int64() as Long); + message.readDate = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/conversation/update_conversation_settings_request.ts b/turms-client-js/src/model/proto/request/conversation/update_conversation_settings_request.ts index 98b24a7f1d..03640ee68b 100644 --- a/turms-client-js/src/model/proto/request/conversation/update_conversation_settings_request.ts +++ b/turms-client-js/src/model/proto/request/conversation/update_conversation_settings_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/conversation/update_conversation_settings_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -31,8 +30,8 @@ function createBaseUpdateConversationSettingsRequest(): UpdateConversationSettin return { userId: undefined, groupId: undefined, settings: {}, customAttributes: [] }; } -export const UpdateConversationSettingsRequest = { - encode(message: UpdateConversationSettingsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateConversationSettingsRequest: MessageFns = { + encode(message: UpdateConversationSettingsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.userId !== undefined) { writer.uint32(8).int64(message.userId); } @@ -41,36 +40,38 @@ export const UpdateConversationSettingsRequest = { } Object.entries(message.settings).forEach(([key, value]) => { UpdateConversationSettingsRequest_SettingsEntry.encode({ key: key as any, value }, writer.uint32(26).fork()) - .ldelim(); + .join(); }); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateConversationSettingsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateConversationSettingsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateConversationSettingsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.userId = longToString(reader.int64() as Long); + message.userId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } @@ -80,18 +81,20 @@ export const UpdateConversationSettingsRequest = { message.settings[entry3.key] = entry3.value; } continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -101,56 +104,56 @@ function createBaseUpdateConversationSettingsRequest_SettingsEntry(): UpdateConv return { key: "", value: undefined }; } -export const UpdateConversationSettingsRequest_SettingsEntry = { +export const UpdateConversationSettingsRequest_SettingsEntry: MessageFns< + UpdateConversationSettingsRequest_SettingsEntry +> = { encode( message: UpdateConversationSettingsRequest_SettingsEntry, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + writer: BinaryWriter = new BinaryWriter(), + ): BinaryWriter { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - Value.encode(message.value, writer.uint32(18).fork()).ldelim(); + Value.encode(message.value, writer.uint32(18).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateConversationSettingsRequest_SettingsEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateConversationSettingsRequest_SettingsEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateConversationSettingsRequest_SettingsEntry(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.key = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.value = Value.decode(reader, reader.uint32()); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/conversation/update_typing_status_request.ts b/turms-client-js/src/model/proto/request/conversation/update_typing_status_request.ts index d64a53277e..cefd2f906f 100644 --- a/turms-client-js/src/model/proto/request/conversation/update_typing_status_request.ts +++ b/turms-client-js/src/model/proto/request/conversation/update_typing_status_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/conversation/update_typing_status_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -22,8 +21,8 @@ function createBaseUpdateTypingStatusRequest(): UpdateTypingStatusRequest { return { isGroupMessage: false, toId: "0", customAttributes: [] }; } -export const UpdateTypingStatusRequest = { - encode(message: UpdateTypingStatusRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateTypingStatusRequest: MessageFns = { + encode(message: UpdateTypingStatusRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.isGroupMessage !== false) { writer.uint32(8).bool(message.isGroupMessage); } @@ -31,54 +30,53 @@ export const UpdateTypingStatusRequest = { writer.uint32(16).int64(message.toId); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateTypingStatusRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateTypingStatusRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateTypingStatusRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } message.isGroupMessage = reader.bool(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.toId = longToString(reader.int64() as Long); + message.toId = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/blocklist/create_group_blocked_user_request.ts b/turms-client-js/src/model/proto/request/group/blocklist/create_group_blocked_user_request.ts index 05e001c3cd..4a4ad351f2 100644 --- a/turms-client-js/src/model/proto/request/group/blocklist/create_group_blocked_user_request.ts +++ b/turms-client-js/src/model/proto/request/group/blocklist/create_group_blocked_user_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/blocklist/create_group_blocked_user_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -21,8 +20,8 @@ function createBaseCreateGroupBlockedUserRequest(): CreateGroupBlockedUserReques return { groupId: "0", userId: "0", customAttributes: [] }; } -export const CreateGroupBlockedUserRequest = { - encode(message: CreateGroupBlockedUserRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const CreateGroupBlockedUserRequest: MessageFns = { + encode(message: CreateGroupBlockedUserRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== "0") { writer.uint32(8).int64(message.groupId); } @@ -30,54 +29,53 @@ export const CreateGroupBlockedUserRequest = { writer.uint32(16).int64(message.userId); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateGroupBlockedUserRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): CreateGroupBlockedUserRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCreateGroupBlockedUserRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.userId = longToString(reader.int64() as Long); + message.userId = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/blocklist/delete_group_blocked_user_request.ts b/turms-client-js/src/model/proto/request/group/blocklist/delete_group_blocked_user_request.ts index d78b024a21..026c916f10 100644 --- a/turms-client-js/src/model/proto/request/group/blocklist/delete_group_blocked_user_request.ts +++ b/turms-client-js/src/model/proto/request/group/blocklist/delete_group_blocked_user_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/blocklist/delete_group_blocked_user_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -21,8 +20,8 @@ function createBaseDeleteGroupBlockedUserRequest(): DeleteGroupBlockedUserReques return { groupId: "0", userId: "0", customAttributes: [] }; } -export const DeleteGroupBlockedUserRequest = { - encode(message: DeleteGroupBlockedUserRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const DeleteGroupBlockedUserRequest: MessageFns = { + encode(message: DeleteGroupBlockedUserRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== "0") { writer.uint32(8).int64(message.groupId); } @@ -30,54 +29,53 @@ export const DeleteGroupBlockedUserRequest = { writer.uint32(16).int64(message.userId); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteGroupBlockedUserRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): DeleteGroupBlockedUserRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeleteGroupBlockedUserRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.userId = longToString(reader.int64() as Long); + message.userId = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/blocklist/query_group_blocked_user_ids_request.ts b/turms-client-js/src/model/proto/request/group/blocklist/query_group_blocked_user_ids_request.ts index 6b522cd591..6af7c6a4f5 100644 --- a/turms-client-js/src/model/proto/request/group/blocklist/query_group_blocked_user_ids_request.ts +++ b/turms-client-js/src/model/proto/request/group/blocklist/query_group_blocked_user_ids_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/blocklist/query_group_blocked_user_ids_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -21,8 +20,8 @@ function createBaseQueryGroupBlockedUserIdsRequest(): QueryGroupBlockedUserIdsRe return { groupId: "0", lastUpdatedDate: undefined, customAttributes: [] }; } -export const QueryGroupBlockedUserIdsRequest = { - encode(message: QueryGroupBlockedUserIdsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryGroupBlockedUserIdsRequest: MessageFns = { + encode(message: QueryGroupBlockedUserIdsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== "0") { writer.uint32(8).int64(message.groupId); } @@ -30,54 +29,53 @@ export const QueryGroupBlockedUserIdsRequest = { writer.uint32(16).int64(message.lastUpdatedDate); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupBlockedUserIdsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupBlockedUserIdsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGroupBlockedUserIdsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/blocklist/query_group_blocked_user_infos_request.ts b/turms-client-js/src/model/proto/request/group/blocklist/query_group_blocked_user_infos_request.ts index ad43f61931..4eabf712ed 100644 --- a/turms-client-js/src/model/proto/request/group/blocklist/query_group_blocked_user_infos_request.ts +++ b/turms-client-js/src/model/proto/request/group/blocklist/query_group_blocked_user_infos_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/blocklist/query_group_blocked_user_infos_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -21,8 +20,8 @@ function createBaseQueryGroupBlockedUserInfosRequest(): QueryGroupBlockedUserInf return { groupId: "0", lastUpdatedDate: undefined, customAttributes: [] }; } -export const QueryGroupBlockedUserInfosRequest = { - encode(message: QueryGroupBlockedUserInfosRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryGroupBlockedUserInfosRequest: MessageFns = { + encode(message: QueryGroupBlockedUserInfosRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== "0") { writer.uint32(8).int64(message.groupId); } @@ -30,54 +29,53 @@ export const QueryGroupBlockedUserInfosRequest = { writer.uint32(16).int64(message.lastUpdatedDate); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupBlockedUserInfosRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupBlockedUserInfosRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGroupBlockedUserInfosRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/create_group_request.ts b/turms-client-js/src/model/proto/request/group/create_group_request.ts index 38d99d7e8d..5d8626b5f5 100644 --- a/turms-client-js/src/model/proto/request/group/create_group_request.ts +++ b/turms-client-js/src/model/proto/request/group/create_group_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/create_group_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -40,8 +39,8 @@ function createBaseCreateGroupRequest(): CreateGroupRequest { }; } -export const CreateGroupRequest = { - encode(message: CreateGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const CreateGroupRequest: MessageFns = { + encode(message: CreateGroupRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -61,65 +60,70 @@ export const CreateGroupRequest = { writer.uint32(48).int64(message.muteEndDate); } Object.entries(message.userDefinedAttributes).forEach(([key, value]) => { - CreateGroupRequest_UserDefinedAttributesEntry.encode({ key: key as any, value }, writer.uint32(58).fork()) - .ldelim(); + CreateGroupRequest_UserDefinedAttributesEntry.encode({ key: key as any, value }, writer.uint32(58).fork()).join(); }); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateGroupRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): CreateGroupRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCreateGroupRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.name = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.intro = reader.string(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.announcement = reader.string(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } message.minScore = reader.int32(); continue; - case 5: + } + case 5: { if (tag !== 40) { break; } - message.typeId = longToString(reader.int64() as Long); + message.typeId = reader.int64().toString(); continue; - case 6: + } + case 6: { if (tag !== 48) { break; } - message.muteEndDate = longToString(reader.int64() as Long); + message.muteEndDate = reader.int64().toString(); continue; - case 7: + } + case 7: { if (tag !== 58) { break; } @@ -129,18 +133,20 @@ export const CreateGroupRequest = { message.userDefinedAttributes[entry7.key] = entry7.value; } continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -150,53 +156,55 @@ function createBaseCreateGroupRequest_UserDefinedAttributesEntry(): CreateGroupR return { key: "", value: undefined }; } -export const CreateGroupRequest_UserDefinedAttributesEntry = { - encode(message: CreateGroupRequest_UserDefinedAttributesEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== undefined) { - Value.encode(message.value, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): CreateGroupRequest_UserDefinedAttributesEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateGroupRequest_UserDefinedAttributesEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; +export const CreateGroupRequest_UserDefinedAttributesEntry: MessageFns = + { + encode( + message: CreateGroupRequest_UserDefinedAttributesEntry, + writer: BinaryWriter = new BinaryWriter(), + ): BinaryWriter { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== undefined) { + Value.encode(message.value, writer.uint32(18).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): CreateGroupRequest_UserDefinedAttributesEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCreateGroupRequest_UserDefinedAttributesEntry(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.key = reader.string(); + continue; } + case 2: { + if (tag !== 18) { + break; + } - message.key = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; + message.value = Value.decode(reader, reader.uint32()); + continue; } - - message.value = Value.decode(reader, reader.uint32()); - continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, -}; - -function longToString(long: Long) { - return long.toString(); -} + return message; + }, + }; -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/delete_group_request.ts b/turms-client-js/src/model/proto/request/group/delete_group_request.ts index 24d0c7d2e9..5d9531e508 100644 --- a/turms-client-js/src/model/proto/request/group/delete_group_request.ts +++ b/turms-client-js/src/model/proto/request/group/delete_group_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/delete_group_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -20,53 +19,51 @@ function createBaseDeleteGroupRequest(): DeleteGroupRequest { return { groupId: "0", customAttributes: [] }; } -export const DeleteGroupRequest = { - encode(message: DeleteGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const DeleteGroupRequest: MessageFns = { + encode(message: DeleteGroupRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== "0") { writer.uint32(8).int64(message.groupId); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteGroupRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): DeleteGroupRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeleteGroupRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/enrollment/check_group_join_questions_answers_request.ts b/turms-client-js/src/model/proto/request/group/enrollment/check_group_join_questions_answers_request.ts index fed3417285..5d5b71a808 100644 --- a/turms-client-js/src/model/proto/request/group/enrollment/check_group_join_questions_answers_request.ts +++ b/turms-client-js/src/model/proto/request/group/enrollment/check_group_join_questions_answers_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/enrollment/check_group_join_questions_answers_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -25,28 +24,28 @@ function createBaseCheckGroupJoinQuestionsAnswersRequest(): CheckGroupJoinQuesti return { questionIdToAnswer: {}, customAttributes: [] }; } -export const CheckGroupJoinQuestionsAnswersRequest = { - encode(message: CheckGroupJoinQuestionsAnswersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const CheckGroupJoinQuestionsAnswersRequest: MessageFns = { + encode(message: CheckGroupJoinQuestionsAnswersRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { Object.entries(message.questionIdToAnswer).forEach(([key, value]) => { CheckGroupJoinQuestionsAnswersRequest_QuestionIdToAnswerEntry.encode( { key: key as any, value }, writer.uint32(10).fork(), - ).ldelim(); + ).join(); }); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CheckGroupJoinQuestionsAnswersRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): CheckGroupJoinQuestionsAnswersRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCheckGroupJoinQuestionsAnswersRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } @@ -56,18 +55,20 @@ export const CheckGroupJoinQuestionsAnswersRequest = { message.questionIdToAnswer[entry1.key] = entry1.value; } continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -77,11 +78,13 @@ function createBaseCheckGroupJoinQuestionsAnswersRequest_QuestionIdToAnswerEntry return { key: "0", value: "" }; } -export const CheckGroupJoinQuestionsAnswersRequest_QuestionIdToAnswerEntry = { +export const CheckGroupJoinQuestionsAnswersRequest_QuestionIdToAnswerEntry: MessageFns< + CheckGroupJoinQuestionsAnswersRequest_QuestionIdToAnswerEntry +> = { encode( message: CheckGroupJoinQuestionsAnswersRequest_QuestionIdToAnswerEntry, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + writer: BinaryWriter = new BinaryWriter(), + ): BinaryWriter { if (message.key !== "0") { writer.uint32(8).int64(message.key); } @@ -92,44 +95,42 @@ export const CheckGroupJoinQuestionsAnswersRequest_QuestionIdToAnswerEntry = { }, decode( - input: _m0.Reader | Uint8Array, + input: BinaryReader | Uint8Array, length?: number, ): CheckGroupJoinQuestionsAnswersRequest_QuestionIdToAnswerEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCheckGroupJoinQuestionsAnswersRequest_QuestionIdToAnswerEntry(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.key = longToString(reader.int64() as Long); + message.key = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.value = reader.string(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/enrollment/create_group_invitation_request.ts b/turms-client-js/src/model/proto/request/group/enrollment/create_group_invitation_request.ts index c3046de54e..8a4bb7dbe1 100644 --- a/turms-client-js/src/model/proto/request/group/enrollment/create_group_invitation_request.ts +++ b/turms-client-js/src/model/proto/request/group/enrollment/create_group_invitation_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/enrollment/create_group_invitation_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -22,8 +21,8 @@ function createBaseCreateGroupInvitationRequest(): CreateGroupInvitationRequest return { groupId: "0", inviteeId: "0", content: "", customAttributes: [] }; } -export const CreateGroupInvitationRequest = { - encode(message: CreateGroupInvitationRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const CreateGroupInvitationRequest: MessageFns = { + encode(message: CreateGroupInvitationRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== "0") { writer.uint32(8).int64(message.groupId); } @@ -34,61 +33,61 @@ export const CreateGroupInvitationRequest = { writer.uint32(26).string(message.content); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateGroupInvitationRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): CreateGroupInvitationRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCreateGroupInvitationRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.inviteeId = longToString(reader.int64() as Long); + message.inviteeId = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.content = reader.string(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/enrollment/create_group_join_questions_request.ts b/turms-client-js/src/model/proto/request/group/enrollment/create_group_join_questions_request.ts index da8cca6b62..21eed0e86a 100644 --- a/turms-client-js/src/model/proto/request/group/enrollment/create_group_join_questions_request.ts +++ b/turms-client-js/src/model/proto/request/group/enrollment/create_group_join_questions_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/enrollment/create_group_join_questions_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; import { GroupJoinQuestion } from "../../../model/group/group_join_question"; @@ -22,63 +21,62 @@ function createBaseCreateGroupJoinQuestionsRequest(): CreateGroupJoinQuestionsRe return { groupId: "0", questions: [], customAttributes: [] }; } -export const CreateGroupJoinQuestionsRequest = { - encode(message: CreateGroupJoinQuestionsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const CreateGroupJoinQuestionsRequest: MessageFns = { + encode(message: CreateGroupJoinQuestionsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== "0") { writer.uint32(8).int64(message.groupId); } for (const v of message.questions) { - GroupJoinQuestion.encode(v!, writer.uint32(18).fork()).ldelim(); + GroupJoinQuestion.encode(v!, writer.uint32(18).fork()).join(); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateGroupJoinQuestionsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): CreateGroupJoinQuestionsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCreateGroupJoinQuestionsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.questions.push(GroupJoinQuestion.decode(reader, reader.uint32())); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/enrollment/create_group_join_request_request.ts b/turms-client-js/src/model/proto/request/group/enrollment/create_group_join_request_request.ts index 0364aa5763..635717f473 100644 --- a/turms-client-js/src/model/proto/request/group/enrollment/create_group_join_request_request.ts +++ b/turms-client-js/src/model/proto/request/group/enrollment/create_group_join_request_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/enrollment/create_group_join_request_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -21,8 +20,8 @@ function createBaseCreateGroupJoinRequestRequest(): CreateGroupJoinRequestReques return { groupId: "0", content: "", customAttributes: [] }; } -export const CreateGroupJoinRequestRequest = { - encode(message: CreateGroupJoinRequestRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const CreateGroupJoinRequestRequest: MessageFns = { + encode(message: CreateGroupJoinRequestRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== "0") { writer.uint32(8).int64(message.groupId); } @@ -30,54 +29,53 @@ export const CreateGroupJoinRequestRequest = { writer.uint32(18).string(message.content); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateGroupJoinRequestRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): CreateGroupJoinRequestRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCreateGroupJoinRequestRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.content = reader.string(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/enrollment/delete_group_invitation_request.ts b/turms-client-js/src/model/proto/request/group/enrollment/delete_group_invitation_request.ts index d92213250a..9a5dfcac0a 100644 --- a/turms-client-js/src/model/proto/request/group/enrollment/delete_group_invitation_request.ts +++ b/turms-client-js/src/model/proto/request/group/enrollment/delete_group_invitation_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/enrollment/delete_group_invitation_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -20,53 +19,51 @@ function createBaseDeleteGroupInvitationRequest(): DeleteGroupInvitationRequest return { invitationId: "0", customAttributes: [] }; } -export const DeleteGroupInvitationRequest = { - encode(message: DeleteGroupInvitationRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const DeleteGroupInvitationRequest: MessageFns = { + encode(message: DeleteGroupInvitationRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.invitationId !== "0") { writer.uint32(8).int64(message.invitationId); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteGroupInvitationRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): DeleteGroupInvitationRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeleteGroupInvitationRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.invitationId = longToString(reader.int64() as Long); + message.invitationId = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/enrollment/delete_group_join_questions_request.ts b/turms-client-js/src/model/proto/request/group/enrollment/delete_group_join_questions_request.ts index 0532fcc2d8..5ef4f4a707 100644 --- a/turms-client-js/src/model/proto/request/group/enrollment/delete_group_join_questions_request.ts +++ b/turms-client-js/src/model/proto/request/group/enrollment/delete_group_join_questions_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/enrollment/delete_group_join_questions_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -21,8 +20,8 @@ function createBaseDeleteGroupJoinQuestionsRequest(): DeleteGroupJoinQuestionsRe return { groupId: "0", questionIds: [], customAttributes: [] }; } -export const DeleteGroupJoinQuestionsRequest = { - encode(message: DeleteGroupJoinQuestionsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const DeleteGroupJoinQuestionsRequest: MessageFns = { + encode(message: DeleteGroupJoinQuestionsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== "0") { writer.uint32(8).int64(message.groupId); } @@ -30,30 +29,31 @@ export const DeleteGroupJoinQuestionsRequest = { for (const v of message.questionIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteGroupJoinQuestionsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): DeleteGroupJoinQuestionsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeleteGroupJoinQuestionsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag === 16) { - message.questionIds.push(longToString(reader.int64() as Long)); + message.questionIds.push(reader.int64().toString()); continue; } @@ -61,35 +61,33 @@ export const DeleteGroupJoinQuestionsRequest = { if (tag === 18) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.questionIds.push(longToString(reader.int64() as Long)); + message.questionIds.push(reader.int64().toString()); } continue; } break; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/enrollment/delete_group_join_request_request.ts b/turms-client-js/src/model/proto/request/group/enrollment/delete_group_join_request_request.ts index 263e702a7a..b416451388 100644 --- a/turms-client-js/src/model/proto/request/group/enrollment/delete_group_join_request_request.ts +++ b/turms-client-js/src/model/proto/request/group/enrollment/delete_group_join_request_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/enrollment/delete_group_join_request_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -20,53 +19,51 @@ function createBaseDeleteGroupJoinRequestRequest(): DeleteGroupJoinRequestReques return { requestId: "0", customAttributes: [] }; } -export const DeleteGroupJoinRequestRequest = { - encode(message: DeleteGroupJoinRequestRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const DeleteGroupJoinRequestRequest: MessageFns = { + encode(message: DeleteGroupJoinRequestRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.requestId !== "0") { writer.uint32(8).int64(message.requestId); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteGroupJoinRequestRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): DeleteGroupJoinRequestRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeleteGroupJoinRequestRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.requestId = longToString(reader.int64() as Long); + message.requestId = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/enrollment/query_group_invitations_request.ts b/turms-client-js/src/model/proto/request/group/enrollment/query_group_invitations_request.ts index c223653bb2..2456d31495 100644 --- a/turms-client-js/src/model/proto/request/group/enrollment/query_group_invitations_request.ts +++ b/turms-client-js/src/model/proto/request/group/enrollment/query_group_invitations_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/enrollment/query_group_invitations_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -22,8 +21,8 @@ function createBaseQueryGroupInvitationsRequest(): QueryGroupInvitationsRequest return { groupId: undefined, areSentByMe: undefined, lastUpdatedDate: undefined, customAttributes: [] }; } -export const QueryGroupInvitationsRequest = { - encode(message: QueryGroupInvitationsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryGroupInvitationsRequest: MessageFns = { + encode(message: QueryGroupInvitationsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== undefined) { writer.uint32(8).int64(message.groupId); } @@ -34,61 +33,61 @@ export const QueryGroupInvitationsRequest = { writer.uint32(24).int64(message.lastUpdatedDate); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupInvitationsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupInvitationsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGroupInvitationsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.areSentByMe = reader.bool(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/enrollment/query_group_join_questions_request.ts b/turms-client-js/src/model/proto/request/group/enrollment/query_group_join_questions_request.ts index 6db94abcbb..6df9acf19a 100644 --- a/turms-client-js/src/model/proto/request/group/enrollment/query_group_join_questions_request.ts +++ b/turms-client-js/src/model/proto/request/group/enrollment/query_group_join_questions_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/enrollment/query_group_join_questions_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -22,8 +21,8 @@ function createBaseQueryGroupJoinQuestionsRequest(): QueryGroupJoinQuestionsRequ return { groupId: "0", withAnswers: false, lastUpdatedDate: undefined, customAttributes: [] }; } -export const QueryGroupJoinQuestionsRequest = { - encode(message: QueryGroupJoinQuestionsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryGroupJoinQuestionsRequest: MessageFns = { + encode(message: QueryGroupJoinQuestionsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== "0") { writer.uint32(8).int64(message.groupId); } @@ -34,61 +33,61 @@ export const QueryGroupJoinQuestionsRequest = { writer.uint32(24).int64(message.lastUpdatedDate); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupJoinQuestionsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupJoinQuestionsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGroupJoinQuestionsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.withAnswers = reader.bool(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/enrollment/query_group_join_requests_request.ts b/turms-client-js/src/model/proto/request/group/enrollment/query_group_join_requests_request.ts index a8286f5f92..77767a3ef9 100644 --- a/turms-client-js/src/model/proto/request/group/enrollment/query_group_join_requests_request.ts +++ b/turms-client-js/src/model/proto/request/group/enrollment/query_group_join_requests_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/enrollment/query_group_join_requests_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -21,8 +20,8 @@ function createBaseQueryGroupJoinRequestsRequest(): QueryGroupJoinRequestsReques return { groupId: undefined, lastUpdatedDate: undefined, customAttributes: [] }; } -export const QueryGroupJoinRequestsRequest = { - encode(message: QueryGroupJoinRequestsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryGroupJoinRequestsRequest: MessageFns = { + encode(message: QueryGroupJoinRequestsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== undefined) { writer.uint32(8).int64(message.groupId); } @@ -30,54 +29,53 @@ export const QueryGroupJoinRequestsRequest = { writer.uint32(16).int64(message.lastUpdatedDate); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupJoinRequestsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupJoinRequestsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGroupJoinRequestsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/enrollment/update_group_invitation_request.ts b/turms-client-js/src/model/proto/request/group/enrollment/update_group_invitation_request.ts index c5b6014d80..7b7e4e4e8b 100644 --- a/turms-client-js/src/model/proto/request/group/enrollment/update_group_invitation_request.ts +++ b/turms-client-js/src/model/proto/request/group/enrollment/update_group_invitation_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/enrollment/update_group_invitation_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { ResponseAction } from "../../../constant/response_action"; import { Value } from "../../../model/common/value"; @@ -25,8 +24,8 @@ function createBaseUpdateGroupInvitationRequest(): UpdateGroupInvitationRequest return { invitationId: "0", responseAction: 0, reason: undefined, customAttributes: [] }; } -export const UpdateGroupInvitationRequest = { - encode(message: UpdateGroupInvitationRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateGroupInvitationRequest: MessageFns = { + encode(message: UpdateGroupInvitationRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.invitationId !== "0") { writer.uint32(8).int64(message.invitationId); } @@ -37,61 +36,61 @@ export const UpdateGroupInvitationRequest = { writer.uint32(26).string(message.reason); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateGroupInvitationRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateGroupInvitationRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateGroupInvitationRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.invitationId = longToString(reader.int64() as Long); + message.invitationId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.responseAction = reader.int32() as any; continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.reason = reader.string(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/enrollment/update_group_join_question_request.ts b/turms-client-js/src/model/proto/request/group/enrollment/update_group_join_question_request.ts index 398f7b23f0..3cc39973ee 100644 --- a/turms-client-js/src/model/proto/request/group/enrollment/update_group_join_question_request.ts +++ b/turms-client-js/src/model/proto/request/group/enrollment/update_group_join_question_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/enrollment/update_group_join_question_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -25,8 +24,8 @@ function createBaseUpdateGroupJoinQuestionRequest(): UpdateGroupJoinQuestionRequ return { questionId: "0", question: undefined, answers: [], score: undefined, customAttributes: [] }; } -export const UpdateGroupJoinQuestionRequest = { - encode(message: UpdateGroupJoinQuestionRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateGroupJoinQuestionRequest: MessageFns = { + encode(message: UpdateGroupJoinQuestionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.questionId !== "0") { writer.uint32(8).int64(message.questionId); } @@ -40,68 +39,69 @@ export const UpdateGroupJoinQuestionRequest = { writer.uint32(32).int32(message.score); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateGroupJoinQuestionRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateGroupJoinQuestionRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateGroupJoinQuestionRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.questionId = longToString(reader.int64() as Long); + message.questionId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.question = reader.string(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.answers.push(reader.string()); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } message.score = reader.int32(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/enrollment/update_group_join_request_request.ts b/turms-client-js/src/model/proto/request/group/enrollment/update_group_join_request_request.ts index 99f58a434c..f87fc402c3 100644 --- a/turms-client-js/src/model/proto/request/group/enrollment/update_group_join_request_request.ts +++ b/turms-client-js/src/model/proto/request/group/enrollment/update_group_join_request_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/enrollment/update_group_join_request_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { ResponseAction } from "../../../constant/response_action"; import { Value } from "../../../model/common/value"; @@ -25,8 +24,8 @@ function createBaseUpdateGroupJoinRequestRequest(): UpdateGroupJoinRequestReques return { requestId: "0", responseAction: 0, reason: undefined, customAttributes: [] }; } -export const UpdateGroupJoinRequestRequest = { - encode(message: UpdateGroupJoinRequestRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateGroupJoinRequestRequest: MessageFns = { + encode(message: UpdateGroupJoinRequestRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.requestId !== "0") { writer.uint32(8).int64(message.requestId); } @@ -37,61 +36,61 @@ export const UpdateGroupJoinRequestRequest = { writer.uint32(26).string(message.reason); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateGroupJoinRequestRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateGroupJoinRequestRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateGroupJoinRequestRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.requestId = longToString(reader.int64() as Long); + message.requestId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.responseAction = reader.int32() as any; continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.reason = reader.string(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/member/create_group_members_request.ts b/turms-client-js/src/model/proto/request/group/member/create_group_members_request.ts index 0dc6645d84..ea6d635341 100644 --- a/turms-client-js/src/model/proto/request/group/member/create_group_members_request.ts +++ b/turms-client-js/src/model/proto/request/group/member/create_group_members_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/member/create_group_members_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { GroupMemberRole } from "../../../constant/group_member_role"; import { Value } from "../../../model/common/value"; @@ -25,8 +24,8 @@ function createBaseCreateGroupMembersRequest(): CreateGroupMembersRequest { return { groupId: "0", userIds: [], name: undefined, role: undefined, muteEndDate: undefined, customAttributes: [] }; } -export const CreateGroupMembersRequest = { - encode(message: CreateGroupMembersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const CreateGroupMembersRequest: MessageFns = { + encode(message: CreateGroupMembersRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== "0") { writer.uint32(8).int64(message.groupId); } @@ -34,7 +33,7 @@ export const CreateGroupMembersRequest = { for (const v of message.userIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); if (message.name !== undefined) { writer.uint32(26).string(message.name); } @@ -45,28 +44,29 @@ export const CreateGroupMembersRequest = { writer.uint32(40).int64(message.muteEndDate); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateGroupMembersRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): CreateGroupMembersRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCreateGroupMembersRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag === 16) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); continue; } @@ -74,56 +74,57 @@ export const CreateGroupMembersRequest = { if (tag === 18) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); } continue; } break; - case 3: + } + case 3: { if (tag !== 26) { break; } message.name = reader.string(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } message.role = reader.int32() as any; continue; - case 5: + } + case 5: { if (tag !== 40) { break; } - message.muteEndDate = longToString(reader.int64() as Long); + message.muteEndDate = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/member/delete_group_members_request.ts b/turms-client-js/src/model/proto/request/group/member/delete_group_members_request.ts index c33a3d2ef0..0afc75bfec 100644 --- a/turms-client-js/src/model/proto/request/group/member/delete_group_members_request.ts +++ b/turms-client-js/src/model/proto/request/group/member/delete_group_members_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/member/delete_group_members_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -23,8 +22,8 @@ function createBaseDeleteGroupMembersRequest(): DeleteGroupMembersRequest { return { groupId: "0", memberIds: [], successorId: undefined, quitAfterTransfer: undefined, customAttributes: [] }; } -export const DeleteGroupMembersRequest = { - encode(message: DeleteGroupMembersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const DeleteGroupMembersRequest: MessageFns = { + encode(message: DeleteGroupMembersRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== "0") { writer.uint32(8).int64(message.groupId); } @@ -32,7 +31,7 @@ export const DeleteGroupMembersRequest = { for (const v of message.memberIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); if (message.successorId !== undefined) { writer.uint32(24).int64(message.successorId); } @@ -40,28 +39,29 @@ export const DeleteGroupMembersRequest = { writer.uint32(32).bool(message.quitAfterTransfer); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteGroupMembersRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): DeleteGroupMembersRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeleteGroupMembersRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag === 16) { - message.memberIds.push(longToString(reader.int64() as Long)); + message.memberIds.push(reader.int64().toString()); continue; } @@ -69,49 +69,49 @@ export const DeleteGroupMembersRequest = { if (tag === 18) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.memberIds.push(longToString(reader.int64() as Long)); + message.memberIds.push(reader.int64().toString()); } continue; } break; - case 3: + } + case 3: { if (tag !== 24) { break; } - message.successorId = longToString(reader.int64() as Long); + message.successorId = reader.int64().toString(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } message.quitAfterTransfer = reader.bool(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/member/query_group_members_request.ts b/turms-client-js/src/model/proto/request/group/member/query_group_members_request.ts index 5cf0c05f53..41b24ef1b3 100644 --- a/turms-client-js/src/model/proto/request/group/member/query_group_members_request.ts +++ b/turms-client-js/src/model/proto/request/group/member/query_group_members_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/member/query_group_members_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -23,8 +22,8 @@ function createBaseQueryGroupMembersRequest(): QueryGroupMembersRequest { return { groupId: "0", lastUpdatedDate: undefined, memberIds: [], withStatus: undefined, customAttributes: [] }; } -export const QueryGroupMembersRequest = { - encode(message: QueryGroupMembersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryGroupMembersRequest: MessageFns = { + encode(message: QueryGroupMembersRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== "0") { writer.uint32(8).int64(message.groupId); } @@ -35,40 +34,42 @@ export const QueryGroupMembersRequest = { for (const v of message.memberIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); if (message.withStatus !== undefined) { writer.uint32(32).bool(message.withStatus); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupMembersRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupMembersRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGroupMembersRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag === 24) { - message.memberIds.push(longToString(reader.int64() as Long)); + message.memberIds.push(reader.int64().toString()); continue; } @@ -76,42 +77,41 @@ export const QueryGroupMembersRequest = { if (tag === 26) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.memberIds.push(longToString(reader.int64() as Long)); + message.memberIds.push(reader.int64().toString()); } continue; } break; - case 4: + } + case 4: { if (tag !== 32) { break; } message.withStatus = reader.bool(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/member/update_group_member_request.ts b/turms-client-js/src/model/proto/request/group/member/update_group_member_request.ts index 138a203a35..d80a58a322 100644 --- a/turms-client-js/src/model/proto/request/group/member/update_group_member_request.ts +++ b/turms-client-js/src/model/proto/request/group/member/update_group_member_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/member/update_group_member_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { GroupMemberRole } from "../../../constant/group_member_role"; import { Value } from "../../../model/common/value"; @@ -20,6 +19,7 @@ export interface UpdateGroupMemberRequest { name?: string | undefined; role?: GroupMemberRole | undefined; muteEndDate?: string | undefined; + note?: string | undefined; customAttributes: Value[]; } @@ -30,12 +30,13 @@ function createBaseUpdateGroupMemberRequest(): UpdateGroupMemberRequest { name: undefined, role: undefined, muteEndDate: undefined, + note: undefined, customAttributes: [], }; } -export const UpdateGroupMemberRequest = { - encode(message: UpdateGroupMemberRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateGroupMemberRequest: MessageFns = { + encode(message: UpdateGroupMemberRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== "0") { writer.uint32(8).int64(message.groupId); } @@ -51,76 +52,89 @@ export const UpdateGroupMemberRequest = { if (message.muteEndDate !== undefined) { writer.uint32(40).int64(message.muteEndDate); } + if (message.note !== undefined) { + writer.uint32(50).string(message.note); + } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateGroupMemberRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateGroupMemberRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateGroupMemberRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.memberId = longToString(reader.int64() as Long); + message.memberId = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.name = reader.string(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } message.role = reader.int32() as any; continue; - case 5: + } + case 5: { if (tag !== 40) { break; } - message.muteEndDate = longToString(reader.int64() as Long); + message.muteEndDate = reader.int64().toString(); + continue; + } + case 6: { + if (tag !== 50) { + break; + } + + message.note = reader.string(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/query_groups_request.ts b/turms-client-js/src/model/proto/request/group/query_groups_request.ts index 0f5f6de036..2b5b74e1b1 100644 --- a/turms-client-js/src/model/proto/request/group/query_groups_request.ts +++ b/turms-client-js/src/model/proto/request/group/query_groups_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/query_groups_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -33,13 +32,13 @@ function createBaseQueryGroupsRequest(): QueryGroupsRequest { }; } -export const QueryGroupsRequest = { - encode(message: QueryGroupsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryGroupsRequest: MessageFns = { + encode(message: QueryGroupsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { writer.uint32(10).fork(); for (const v of message.groupIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); if (message.lastUpdatedDate !== undefined) { writer.uint32(16).int64(message.lastUpdatedDate); } @@ -56,23 +55,23 @@ export const QueryGroupsRequest = { for (const v of message.fieldsToHighlight) { writer.int32(v); } - writer.ldelim(); + writer.join(); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryGroupsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGroupsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag === 8) { - message.groupIds.push(longToString(reader.int64() as Long)); + message.groupIds.push(reader.int64().toString()); continue; } @@ -80,42 +79,47 @@ export const QueryGroupsRequest = { if (tag === 10) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.groupIds.push(longToString(reader.int64() as Long)); + message.groupIds.push(reader.int64().toString()); } continue; } break; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.name = reader.string(); continue; - case 10: + } + case 10: { if (tag !== 80) { break; } message.skip = reader.int32(); continue; - case 11: + } + case 11: { if (tag !== 88) { break; } message.limit = reader.int32(); continue; - case 12: + } + case 12: { if (tag === 96) { message.fieldsToHighlight.push(reader.int32()); @@ -132,28 +136,26 @@ export const QueryGroupsRequest = { } break; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/query_joined_group_ids_request.ts b/turms-client-js/src/model/proto/request/group/query_joined_group_ids_request.ts index 481b1de58c..a33543b931 100644 --- a/turms-client-js/src/model/proto/request/group/query_joined_group_ids_request.ts +++ b/turms-client-js/src/model/proto/request/group/query_joined_group_ids_request.ts @@ -1,72 +1,93 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/query_joined_group_ids_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; export interface QueryJoinedGroupIdsRequest { lastUpdatedDate?: string | undefined; + userIdsForCommonGroups: string[]; customAttributes: Value[]; } function createBaseQueryJoinedGroupIdsRequest(): QueryJoinedGroupIdsRequest { - return { lastUpdatedDate: undefined, customAttributes: [] }; + return { lastUpdatedDate: undefined, userIdsForCommonGroups: [], customAttributes: [] }; } -export const QueryJoinedGroupIdsRequest = { - encode(message: QueryJoinedGroupIdsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryJoinedGroupIdsRequest: MessageFns = { + encode(message: QueryJoinedGroupIdsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.lastUpdatedDate !== undefined) { writer.uint32(8).int64(message.lastUpdatedDate); } + writer.uint32(18).fork(); + for (const v of message.userIdsForCommonGroups) { + writer.int64(v); + } + writer.join(); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryJoinedGroupIdsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryJoinedGroupIdsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryJoinedGroupIdsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 15: + } + case 2: { + if (tag === 16) { + message.userIdsForCommonGroups.push(reader.int64().toString()); + + continue; + } + + if (tag === 18) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.userIdsForCommonGroups.push(reader.int64().toString()); + } + + continue; + } + + break; + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/query_joined_group_infos_request.ts b/turms-client-js/src/model/proto/request/group/query_joined_group_infos_request.ts index 83a92f4b0c..d47d9a49c1 100644 --- a/turms-client-js/src/model/proto/request/group/query_joined_group_infos_request.ts +++ b/turms-client-js/src/model/proto/request/group/query_joined_group_infos_request.ts @@ -1,72 +1,93 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/query_joined_group_infos_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; export interface QueryJoinedGroupInfosRequest { lastUpdatedDate?: string | undefined; + userIdsForCommonGroups: string[]; customAttributes: Value[]; } function createBaseQueryJoinedGroupInfosRequest(): QueryJoinedGroupInfosRequest { - return { lastUpdatedDate: undefined, customAttributes: [] }; + return { lastUpdatedDate: undefined, userIdsForCommonGroups: [], customAttributes: [] }; } -export const QueryJoinedGroupInfosRequest = { - encode(message: QueryJoinedGroupInfosRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryJoinedGroupInfosRequest: MessageFns = { + encode(message: QueryJoinedGroupInfosRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.lastUpdatedDate !== undefined) { writer.uint32(8).int64(message.lastUpdatedDate); } + writer.uint32(18).fork(); + for (const v of message.userIdsForCommonGroups) { + writer.int64(v); + } + writer.join(); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryJoinedGroupInfosRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryJoinedGroupInfosRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryJoinedGroupInfosRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 15: + } + case 2: { + if (tag === 16) { + message.userIdsForCommonGroups.push(reader.int64().toString()); + + continue; + } + + if (tag === 18) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.userIdsForCommonGroups.push(reader.int64().toString()); + } + + continue; + } + + break; + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/group/update_group_request.ts b/turms-client-js/src/model/proto/request/group/update_group_request.ts index 6bb9bad4b0..d2a6bba1aa 100644 --- a/turms-client-js/src/model/proto/request/group/update_group_request.ts +++ b/turms-client-js/src/model/proto/request/group/update_group_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/group/update_group_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -51,8 +50,8 @@ function createBaseUpdateGroupRequest(): UpdateGroupRequest { }; } -export const UpdateGroupRequest = { - encode(message: UpdateGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateGroupRequest: MessageFns = { + encode(message: UpdateGroupRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupId !== "0") { writer.uint32(8).int64(message.groupId); } @@ -81,86 +80,94 @@ export const UpdateGroupRequest = { writer.uint32(72).int64(message.successorId); } Object.entries(message.userDefinedAttributes).forEach(([key, value]) => { - UpdateGroupRequest_UserDefinedAttributesEntry.encode({ key: key as any, value }, writer.uint32(82).fork()) - .ldelim(); + UpdateGroupRequest_UserDefinedAttributesEntry.encode({ key: key as any, value }, writer.uint32(82).fork()).join(); }); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateGroupRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateGroupRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateGroupRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.quitAfterTransfer = reader.bool(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.name = reader.string(); continue; - case 4: + } + case 4: { if (tag !== 34) { break; } message.intro = reader.string(); continue; - case 5: + } + case 5: { if (tag !== 42) { break; } message.announcement = reader.string(); continue; - case 6: + } + case 6: { if (tag !== 48) { break; } message.minScore = reader.int32(); continue; - case 7: + } + case 7: { if (tag !== 56) { break; } - message.typeId = longToString(reader.int64() as Long); + message.typeId = reader.int64().toString(); continue; - case 8: + } + case 8: { if (tag !== 64) { break; } - message.muteEndDate = longToString(reader.int64() as Long); + message.muteEndDate = reader.int64().toString(); continue; - case 9: + } + case 9: { if (tag !== 72) { break; } - message.successorId = longToString(reader.int64() as Long); + message.successorId = reader.int64().toString(); continue; - case 10: + } + case 10: { if (tag !== 82) { break; } @@ -170,18 +177,20 @@ export const UpdateGroupRequest = { message.userDefinedAttributes[entry10.key] = entry10.value; } continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -191,53 +200,55 @@ function createBaseUpdateGroupRequest_UserDefinedAttributesEntry(): UpdateGroupR return { key: "", value: undefined }; } -export const UpdateGroupRequest_UserDefinedAttributesEntry = { - encode(message: UpdateGroupRequest_UserDefinedAttributesEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== undefined) { - Value.encode(message.value, writer.uint32(18).fork()).ldelim(); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateGroupRequest_UserDefinedAttributesEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateGroupRequest_UserDefinedAttributesEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; +export const UpdateGroupRequest_UserDefinedAttributesEntry: MessageFns = + { + encode( + message: UpdateGroupRequest_UserDefinedAttributesEntry, + writer: BinaryWriter = new BinaryWriter(), + ): BinaryWriter { + if (message.key !== "") { + writer.uint32(10).string(message.key); + } + if (message.value !== undefined) { + Value.encode(message.value, writer.uint32(18).fork()).join(); + } + return writer; + }, + + decode(input: BinaryReader | Uint8Array, length?: number): UpdateGroupRequest_UserDefinedAttributesEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseUpdateGroupRequest_UserDefinedAttributesEntry(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (tag !== 10) { + break; + } + + message.key = reader.string(); + continue; } + case 2: { + if (tag !== 18) { + break; + } - message.key = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; + message.value = Value.decode(reader, reader.uint32()); + continue; } - - message.value = Value.decode(reader, reader.uint32()); - continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skip(tag & 7); } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, -}; - -function longToString(long: Long) { - return long.toString(); -} + return message; + }, + }; -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/message/create_message_reactions_request.ts b/turms-client-js/src/model/proto/request/message/create_message_reactions_request.ts index 9f08437a25..a4f81f82e9 100644 --- a/turms-client-js/src/model/proto/request/message/create_message_reactions_request.ts +++ b/turms-client-js/src/model/proto/request/message/create_message_reactions_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/message/create_message_reactions_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -21,8 +20,8 @@ function createBaseCreateMessageReactionsRequest(): CreateMessageReactionsReques return { messageId: "0", reactionTypes: [], customAttributes: [] }; } -export const CreateMessageReactionsRequest = { - encode(message: CreateMessageReactionsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const CreateMessageReactionsRequest: MessageFns = { + encode(message: CreateMessageReactionsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.messageId !== "0") { writer.uint32(8).int64(message.messageId); } @@ -30,28 +29,29 @@ export const CreateMessageReactionsRequest = { for (const v of message.reactionTypes) { writer.int32(v); } - writer.ldelim(); + writer.join(); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateMessageReactionsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): CreateMessageReactionsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCreateMessageReactionsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.messageId = longToString(reader.int64() as Long); + message.messageId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag === 16) { message.reactionTypes.push(reader.int32()); @@ -68,28 +68,26 @@ export const CreateMessageReactionsRequest = { } break; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/message/create_message_request.ts b/turms-client-js/src/model/proto/request/message/create_message_request.ts index 8adf57df32..62a50ee4d6 100644 --- a/turms-client-js/src/model/proto/request/message/create_message_request.ts +++ b/turms-client-js/src/model/proto/request/message/create_message_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/message/create_message_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -45,8 +44,8 @@ function createBaseCreateMessageRequest(): CreateMessageRequest { }; } -export const CreateMessageRequest = { - encode(message: CreateMessageRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const CreateMessageRequest: MessageFns = { + encode(message: CreateMessageRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.messageId !== undefined) { writer.uint32(8).int64(message.messageId); } @@ -75,103 +74,109 @@ export const CreateMessageRequest = { writer.uint32(72).int64(message.preMessageId); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateMessageRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): CreateMessageRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCreateMessageRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.messageId = longToString(reader.int64() as Long); + message.messageId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.isSystemMessage = reader.bool(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } - message.groupId = longToString(reader.int64() as Long); + message.groupId = reader.int64().toString(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } - message.recipientId = longToString(reader.int64() as Long); + message.recipientId = reader.int64().toString(); continue; - case 5: + } + case 5: { if (tag !== 40) { break; } - message.deliveryDate = longToString(reader.int64() as Long); + message.deliveryDate = reader.int64().toString(); continue; - case 6: + } + case 6: { if (tag !== 50) { break; } message.text = reader.string(); continue; - case 7: + } + case 7: { if (tag !== 58) { break; } message.records.push(reader.bytes()); continue; - case 8: + } + case 8: { if (tag !== 64) { break; } message.burnAfter = reader.int32(); continue; - case 9: + } + case 9: { if (tag !== 72) { break; } - message.preMessageId = longToString(reader.int64() as Long); + message.preMessageId = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/message/delete_message_reactions_request.ts b/turms-client-js/src/model/proto/request/message/delete_message_reactions_request.ts index bf8954f3db..7a16679328 100644 --- a/turms-client-js/src/model/proto/request/message/delete_message_reactions_request.ts +++ b/turms-client-js/src/model/proto/request/message/delete_message_reactions_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/message/delete_message_reactions_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -21,8 +20,8 @@ function createBaseDeleteMessageReactionsRequest(): DeleteMessageReactionsReques return { messageId: "0", reactionTypes: [], customAttributes: [] }; } -export const DeleteMessageReactionsRequest = { - encode(message: DeleteMessageReactionsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const DeleteMessageReactionsRequest: MessageFns = { + encode(message: DeleteMessageReactionsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.messageId !== "0") { writer.uint32(8).int64(message.messageId); } @@ -30,28 +29,29 @@ export const DeleteMessageReactionsRequest = { for (const v of message.reactionTypes) { writer.int32(v); } - writer.ldelim(); + writer.join(); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteMessageReactionsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): DeleteMessageReactionsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeleteMessageReactionsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.messageId = longToString(reader.int64() as Long); + message.messageId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag === 16) { message.reactionTypes.push(reader.int32()); @@ -68,28 +68,26 @@ export const DeleteMessageReactionsRequest = { } break; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/message/query_messages_request.ts b/turms-client-js/src/model/proto/request/message/query_messages_request.ts index d2d3584137..3c2aad598c 100644 --- a/turms-client-js/src/model/proto/request/message/query_messages_request.ts +++ b/turms-client-js/src/model/proto/request/message/query_messages_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/message/query_messages_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -50,13 +49,13 @@ function createBaseQueryMessagesRequest(): QueryMessagesRequest { }; } -export const QueryMessagesRequest = { - encode(message: QueryMessagesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryMessagesRequest: MessageFns = { + encode(message: QueryMessagesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { writer.uint32(10).fork(); for (const v of message.ids) { writer.int64(v); } - writer.ldelim(); + writer.join(); if (message.areGroupMessages !== undefined) { writer.uint32(16).bool(message.areGroupMessages); } @@ -67,7 +66,7 @@ export const QueryMessagesRequest = { for (const v of message.fromIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); if (message.deliveryDateStart !== undefined) { writer.uint32(40).int64(message.deliveryDateStart); } @@ -84,21 +83,21 @@ export const QueryMessagesRequest = { writer.uint32(72).bool(message.descending); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryMessagesRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryMessagesRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryMessagesRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag === 8) { - message.ids.push(longToString(reader.int64() as Long)); + message.ids.push(reader.int64().toString()); continue; } @@ -106,30 +105,33 @@ export const QueryMessagesRequest = { if (tag === 10) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.ids.push(longToString(reader.int64() as Long)); + message.ids.push(reader.int64().toString()); } continue; } break; - case 2: + } + case 2: { if (tag !== 16) { break; } message.areGroupMessages = reader.bool(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } message.areSystemMessages = reader.bool(); continue; - case 4: + } + case 4: { if (tag === 32) { - message.fromIds.push(longToString(reader.int64() as Long)); + message.fromIds.push(reader.int64().toString()); continue; } @@ -137,70 +139,73 @@ export const QueryMessagesRequest = { if (tag === 34) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.fromIds.push(longToString(reader.int64() as Long)); + message.fromIds.push(reader.int64().toString()); } continue; } break; - case 5: + } + case 5: { if (tag !== 40) { break; } - message.deliveryDateStart = longToString(reader.int64() as Long); + message.deliveryDateStart = reader.int64().toString(); continue; - case 6: + } + case 6: { if (tag !== 48) { break; } - message.deliveryDateEnd = longToString(reader.int64() as Long); + message.deliveryDateEnd = reader.int64().toString(); continue; - case 7: + } + case 7: { if (tag !== 56) { break; } message.maxCount = reader.int32(); continue; - case 8: + } + case 8: { if (tag !== 64) { break; } message.withTotal = reader.bool(); continue; - case 9: + } + case 9: { if (tag !== 72) { break; } message.descending = reader.bool(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/message/update_message_request.ts b/turms-client-js/src/model/proto/request/message/update_message_request.ts index 9f9f70ddae..b271c1dbae 100644 --- a/turms-client-js/src/model/proto/request/message/update_message_request.ts +++ b/turms-client-js/src/model/proto/request/message/update_message_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/message/update_message_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -25,8 +24,8 @@ function createBaseUpdateMessageRequest(): UpdateMessageRequest { return { messageId: "0", text: undefined, records: [], recallDate: undefined, customAttributes: [] }; } -export const UpdateMessageRequest = { - encode(message: UpdateMessageRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateMessageRequest: MessageFns = { + encode(message: UpdateMessageRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.messageId !== "0") { writer.uint32(8).int64(message.messageId); } @@ -40,68 +39,69 @@ export const UpdateMessageRequest = { writer.uint32(32).int64(message.recallDate); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateMessageRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateMessageRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateMessageRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.messageId = longToString(reader.int64() as Long); + message.messageId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.text = reader.string(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.records.push(reader.bytes()); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } - message.recallDate = longToString(reader.int64() as Long); + message.recallDate = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/storage/delete_resource_request.ts b/turms-client-js/src/model/proto/request/storage/delete_resource_request.ts index f03e98477b..befec40b4e 100644 --- a/turms-client-js/src/model/proto/request/storage/delete_resource_request.ts +++ b/turms-client-js/src/model/proto/request/storage/delete_resource_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/storage/delete_resource_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { StorageResourceType } from "../../constant/storage_resource_type"; import { Value } from "../../model/common/value"; @@ -23,8 +22,8 @@ function createBaseDeleteResourceRequest(): DeleteResourceRequest { return { type: 0, idNum: undefined, idStr: undefined, customAttributes: [] }; } -export const DeleteResourceRequest = { - encode(message: DeleteResourceRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const DeleteResourceRequest: MessageFns = { + encode(message: DeleteResourceRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.type !== 0) { writer.uint32(8).int32(message.type); } @@ -35,61 +34,61 @@ export const DeleteResourceRequest = { writer.uint32(26).string(message.idStr); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteResourceRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): DeleteResourceRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeleteResourceRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } message.type = reader.int32() as any; continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.idNum = longToString(reader.int64() as Long); + message.idNum = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.idStr = reader.string(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/storage/query_message_attachment_infos_request.ts b/turms-client-js/src/model/proto/request/storage/query_message_attachment_infos_request.ts index bedcf6032f..5b2459eb48 100644 --- a/turms-client-js/src/model/proto/request/storage/query_message_attachment_infos_request.ts +++ b/turms-client-js/src/model/proto/request/storage/query_message_attachment_infos_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/storage/query_message_attachment_infos_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -33,18 +32,18 @@ function createBaseQueryMessageAttachmentInfosRequest(): QueryMessageAttachmentI }; } -export const QueryMessageAttachmentInfosRequest = { - encode(message: QueryMessageAttachmentInfosRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryMessageAttachmentInfosRequest: MessageFns = { + encode(message: QueryMessageAttachmentInfosRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { writer.uint32(10).fork(); for (const v of message.userIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); writer.uint32(18).fork(); for (const v of message.groupIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); if (message.creationDateStart !== undefined) { writer.uint32(24).int64(message.creationDateStart); } @@ -58,21 +57,21 @@ export const QueryMessageAttachmentInfosRequest = { writer.uint32(48).bool(message.areSharedByMe); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryMessageAttachmentInfosRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryMessageAttachmentInfosRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryMessageAttachmentInfosRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag === 8) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); continue; } @@ -80,16 +79,17 @@ export const QueryMessageAttachmentInfosRequest = { if (tag === 10) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); } continue; } break; - case 2: + } + case 2: { if (tag === 16) { - message.groupIds.push(longToString(reader.int64() as Long)); + message.groupIds.push(reader.int64().toString()); continue; } @@ -97,63 +97,65 @@ export const QueryMessageAttachmentInfosRequest = { if (tag === 18) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.groupIds.push(longToString(reader.int64() as Long)); + message.groupIds.push(reader.int64().toString()); } continue; } break; - case 3: + } + case 3: { if (tag !== 24) { break; } - message.creationDateStart = longToString(reader.int64() as Long); + message.creationDateStart = reader.int64().toString(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } - message.creationDateEnd = longToString(reader.int64() as Long); + message.creationDateEnd = reader.int64().toString(); continue; - case 5: + } + case 5: { if (tag !== 40) { break; } message.inPrivateConversation = reader.bool(); continue; - case 6: + } + case 6: { if (tag !== 48) { break; } message.areSharedByMe = reader.bool(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/storage/query_resource_download_info_request.ts b/turms-client-js/src/model/proto/request/storage/query_resource_download_info_request.ts index 250657db68..7364502d0a 100644 --- a/turms-client-js/src/model/proto/request/storage/query_resource_download_info_request.ts +++ b/turms-client-js/src/model/proto/request/storage/query_resource_download_info_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/storage/query_resource_download_info_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { StorageResourceType } from "../../constant/storage_resource_type"; import { Value } from "../../model/common/value"; @@ -23,8 +22,8 @@ function createBaseQueryResourceDownloadInfoRequest(): QueryResourceDownloadInfo return { type: 0, idNum: undefined, idStr: undefined, customAttributes: [] }; } -export const QueryResourceDownloadInfoRequest = { - encode(message: QueryResourceDownloadInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryResourceDownloadInfoRequest: MessageFns = { + encode(message: QueryResourceDownloadInfoRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.type !== 0) { writer.uint32(8).int32(message.type); } @@ -35,61 +34,61 @@ export const QueryResourceDownloadInfoRequest = { writer.uint32(26).string(message.idStr); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryResourceDownloadInfoRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryResourceDownloadInfoRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryResourceDownloadInfoRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } message.type = reader.int32() as any; continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.idNum = longToString(reader.int64() as Long); + message.idNum = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.idStr = reader.string(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/storage/query_resource_upload_info_request.ts b/turms-client-js/src/model/proto/request/storage/query_resource_upload_info_request.ts index f9a821c8d9..b14910241d 100644 --- a/turms-client-js/src/model/proto/request/storage/query_resource_upload_info_request.ts +++ b/turms-client-js/src/model/proto/request/storage/query_resource_upload_info_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/storage/query_resource_upload_info_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { StorageResourceType } from "../../constant/storage_resource_type"; import { Value } from "../../model/common/value"; @@ -25,8 +24,8 @@ function createBaseQueryResourceUploadInfoRequest(): QueryResourceUploadInfoRequ return { type: 0, idNum: undefined, idStr: undefined, name: undefined, mediaType: undefined, customAttributes: [] }; } -export const QueryResourceUploadInfoRequest = { - encode(message: QueryResourceUploadInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryResourceUploadInfoRequest: MessageFns = { + encode(message: QueryResourceUploadInfoRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.type !== 0) { writer.uint32(8).int32(message.type); } @@ -43,75 +42,77 @@ export const QueryResourceUploadInfoRequest = { writer.uint32(42).string(message.mediaType); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryResourceUploadInfoRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryResourceUploadInfoRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryResourceUploadInfoRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } message.type = reader.int32() as any; continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.idNum = longToString(reader.int64() as Long); + message.idNum = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.idStr = reader.string(); continue; - case 4: + } + case 4: { if (tag !== 34) { break; } message.name = reader.string(); continue; - case 5: + } + case 5: { if (tag !== 42) { break; } message.mediaType = reader.string(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/storage/update_message_attachment_info_request.ts b/turms-client-js/src/model/proto/request/storage/update_message_attachment_info_request.ts index 4358cde512..f92013d7d5 100644 --- a/turms-client-js/src/model/proto/request/storage/update_message_attachment_info_request.ts +++ b/turms-client-js/src/model/proto/request/storage/update_message_attachment_info_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/storage/update_message_attachment_info_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -37,8 +36,8 @@ function createBaseUpdateMessageAttachmentInfoRequest(): UpdateMessageAttachment }; } -export const UpdateMessageAttachmentInfoRequest = { - encode(message: UpdateMessageAttachmentInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateMessageAttachmentInfoRequest: MessageFns = { + encode(message: UpdateMessageAttachmentInfoRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.attachmentIdNum !== undefined) { writer.uint32(8).int64(message.attachmentIdNum); } @@ -58,82 +57,85 @@ export const UpdateMessageAttachmentInfoRequest = { writer.uint32(48).int64(message.groupIdToUnshareWith); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateMessageAttachmentInfoRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateMessageAttachmentInfoRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateMessageAttachmentInfoRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.attachmentIdNum = longToString(reader.int64() as Long); + message.attachmentIdNum = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.attachmentIdStr = reader.string(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } - message.userIdToShareWith = longToString(reader.int64() as Long); + message.userIdToShareWith = reader.int64().toString(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } - message.userIdToUnshareWith = longToString(reader.int64() as Long); + message.userIdToUnshareWith = reader.int64().toString(); continue; - case 5: + } + case 5: { if (tag !== 40) { break; } - message.groupIdToShareWith = longToString(reader.int64() as Long); + message.groupIdToShareWith = reader.int64().toString(); continue; - case 6: + } + case 6: { if (tag !== 48) { break; } - message.groupIdToUnshareWith = longToString(reader.int64() as Long); + message.groupIdToUnshareWith = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/turms_request.ts b/turms-client-js/src/model/proto/request/turms_request.ts index 4cee16e16d..3154e9cf3c 100644 --- a/turms-client-js/src/model/proto/request/turms_request.ts +++ b/turms-client-js/src/model/proto/request/turms_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/turms_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../model/common/value"; import { CreateMeetingRequest } from "./conference/create_meeting_request"; import { DeleteMeetingRequest } from "./conference/delete_meeting_request"; @@ -281,584 +280,622 @@ function createBaseTurmsRequest(): TurmsRequest { }; } -export const TurmsRequest = { - encode(message: TurmsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const TurmsRequest: MessageFns = { + encode(message: TurmsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.requestId !== undefined) { writer.uint32(8).int64(message.requestId); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(18).fork()).ldelim(); + Value.encode(v!, writer.uint32(18).fork()).join(); } if (message.createSessionRequest !== undefined) { - CreateSessionRequest.encode(message.createSessionRequest, writer.uint32(26).fork()).ldelim(); + CreateSessionRequest.encode(message.createSessionRequest, writer.uint32(26).fork()).join(); } if (message.deleteSessionRequest !== undefined) { - DeleteSessionRequest.encode(message.deleteSessionRequest, writer.uint32(34).fork()).ldelim(); + DeleteSessionRequest.encode(message.deleteSessionRequest, writer.uint32(34).fork()).join(); } if (message.queryConversationsRequest !== undefined) { - QueryConversationsRequest.encode(message.queryConversationsRequest, writer.uint32(42).fork()).ldelim(); + QueryConversationsRequest.encode(message.queryConversationsRequest, writer.uint32(42).fork()).join(); } if (message.updateConversationRequest !== undefined) { - UpdateConversationRequest.encode(message.updateConversationRequest, writer.uint32(50).fork()).ldelim(); + UpdateConversationRequest.encode(message.updateConversationRequest, writer.uint32(50).fork()).join(); } if (message.updateTypingStatusRequest !== undefined) { - UpdateTypingStatusRequest.encode(message.updateTypingStatusRequest, writer.uint32(58).fork()).ldelim(); + UpdateTypingStatusRequest.encode(message.updateTypingStatusRequest, writer.uint32(58).fork()).join(); } if (message.createMessageRequest !== undefined) { - CreateMessageRequest.encode(message.createMessageRequest, writer.uint32(66).fork()).ldelim(); + CreateMessageRequest.encode(message.createMessageRequest, writer.uint32(66).fork()).join(); } if (message.queryMessagesRequest !== undefined) { - QueryMessagesRequest.encode(message.queryMessagesRequest, writer.uint32(74).fork()).ldelim(); + QueryMessagesRequest.encode(message.queryMessagesRequest, writer.uint32(74).fork()).join(); } if (message.updateMessageRequest !== undefined) { - UpdateMessageRequest.encode(message.updateMessageRequest, writer.uint32(82).fork()).ldelim(); + UpdateMessageRequest.encode(message.updateMessageRequest, writer.uint32(82).fork()).join(); } if (message.createGroupMembersRequest !== undefined) { - CreateGroupMembersRequest.encode(message.createGroupMembersRequest, writer.uint32(90).fork()).ldelim(); + CreateGroupMembersRequest.encode(message.createGroupMembersRequest, writer.uint32(90).fork()).join(); } if (message.deleteGroupMembersRequest !== undefined) { - DeleteGroupMembersRequest.encode(message.deleteGroupMembersRequest, writer.uint32(98).fork()).ldelim(); + DeleteGroupMembersRequest.encode(message.deleteGroupMembersRequest, writer.uint32(98).fork()).join(); } if (message.queryGroupMembersRequest !== undefined) { - QueryGroupMembersRequest.encode(message.queryGroupMembersRequest, writer.uint32(106).fork()).ldelim(); + QueryGroupMembersRequest.encode(message.queryGroupMembersRequest, writer.uint32(106).fork()).join(); } if (message.updateGroupMemberRequest !== undefined) { - UpdateGroupMemberRequest.encode(message.updateGroupMemberRequest, writer.uint32(114).fork()).ldelim(); + UpdateGroupMemberRequest.encode(message.updateGroupMemberRequest, writer.uint32(114).fork()).join(); } if (message.queryUserProfilesRequest !== undefined) { - QueryUserProfilesRequest.encode(message.queryUserProfilesRequest, writer.uint32(802).fork()).ldelim(); + QueryUserProfilesRequest.encode(message.queryUserProfilesRequest, writer.uint32(802).fork()).join(); } if (message.queryNearbyUsersRequest !== undefined) { - QueryNearbyUsersRequest.encode(message.queryNearbyUsersRequest, writer.uint32(810).fork()).ldelim(); + QueryNearbyUsersRequest.encode(message.queryNearbyUsersRequest, writer.uint32(810).fork()).join(); } if (message.queryUserOnlineStatusesRequest !== undefined) { - QueryUserOnlineStatusesRequest.encode(message.queryUserOnlineStatusesRequest, writer.uint32(818).fork()).ldelim(); + QueryUserOnlineStatusesRequest.encode(message.queryUserOnlineStatusesRequest, writer.uint32(818).fork()).join(); } if (message.updateUserLocationRequest !== undefined) { - UpdateUserLocationRequest.encode(message.updateUserLocationRequest, writer.uint32(826).fork()).ldelim(); + UpdateUserLocationRequest.encode(message.updateUserLocationRequest, writer.uint32(826).fork()).join(); } if (message.updateUserOnlineStatusRequest !== undefined) { - UpdateUserOnlineStatusRequest.encode(message.updateUserOnlineStatusRequest, writer.uint32(834).fork()).ldelim(); + UpdateUserOnlineStatusRequest.encode(message.updateUserOnlineStatusRequest, writer.uint32(834).fork()).join(); } if (message.updateUserRequest !== undefined) { - UpdateUserRequest.encode(message.updateUserRequest, writer.uint32(842).fork()).ldelim(); + UpdateUserRequest.encode(message.updateUserRequest, writer.uint32(842).fork()).join(); } if (message.updateUserSettingsRequest !== undefined) { - UpdateUserSettingsRequest.encode(message.updateUserSettingsRequest, writer.uint32(850).fork()).ldelim(); + UpdateUserSettingsRequest.encode(message.updateUserSettingsRequest, writer.uint32(850).fork()).join(); } if (message.deleteUserSettingsRequest !== undefined) { - DeleteUserSettingsRequest.encode(message.deleteUserSettingsRequest, writer.uint32(858).fork()).ldelim(); + DeleteUserSettingsRequest.encode(message.deleteUserSettingsRequest, writer.uint32(858).fork()).join(); } if (message.queryUserSettingsRequest !== undefined) { - QueryUserSettingsRequest.encode(message.queryUserSettingsRequest, writer.uint32(866).fork()).ldelim(); + QueryUserSettingsRequest.encode(message.queryUserSettingsRequest, writer.uint32(866).fork()).join(); } if (message.createFriendRequestRequest !== undefined) { - CreateFriendRequestRequest.encode(message.createFriendRequestRequest, writer.uint32(1602).fork()).ldelim(); + CreateFriendRequestRequest.encode(message.createFriendRequestRequest, writer.uint32(1602).fork()).join(); } if (message.createRelationshipGroupRequest !== undefined) { - CreateRelationshipGroupRequest.encode(message.createRelationshipGroupRequest, writer.uint32(1610).fork()) - .ldelim(); + CreateRelationshipGroupRequest.encode(message.createRelationshipGroupRequest, writer.uint32(1610).fork()).join(); } if (message.createRelationshipRequest !== undefined) { - CreateRelationshipRequest.encode(message.createRelationshipRequest, writer.uint32(1618).fork()).ldelim(); + CreateRelationshipRequest.encode(message.createRelationshipRequest, writer.uint32(1618).fork()).join(); } if (message.deleteFriendRequestRequest !== undefined) { - DeleteFriendRequestRequest.encode(message.deleteFriendRequestRequest, writer.uint32(1626).fork()).ldelim(); + DeleteFriendRequestRequest.encode(message.deleteFriendRequestRequest, writer.uint32(1626).fork()).join(); } if (message.deleteRelationshipGroupRequest !== undefined) { - DeleteRelationshipGroupRequest.encode(message.deleteRelationshipGroupRequest, writer.uint32(1634).fork()) - .ldelim(); + DeleteRelationshipGroupRequest.encode(message.deleteRelationshipGroupRequest, writer.uint32(1634).fork()).join(); } if (message.deleteRelationshipRequest !== undefined) { - DeleteRelationshipRequest.encode(message.deleteRelationshipRequest, writer.uint32(1642).fork()).ldelim(); + DeleteRelationshipRequest.encode(message.deleteRelationshipRequest, writer.uint32(1642).fork()).join(); } if (message.queryFriendRequestsRequest !== undefined) { - QueryFriendRequestsRequest.encode(message.queryFriendRequestsRequest, writer.uint32(1650).fork()).ldelim(); + QueryFriendRequestsRequest.encode(message.queryFriendRequestsRequest, writer.uint32(1650).fork()).join(); } if (message.queryRelatedUserIdsRequest !== undefined) { - QueryRelatedUserIdsRequest.encode(message.queryRelatedUserIdsRequest, writer.uint32(1658).fork()).ldelim(); + QueryRelatedUserIdsRequest.encode(message.queryRelatedUserIdsRequest, writer.uint32(1658).fork()).join(); } if (message.queryRelationshipGroupsRequest !== undefined) { - QueryRelationshipGroupsRequest.encode(message.queryRelationshipGroupsRequest, writer.uint32(1666).fork()) - .ldelim(); + QueryRelationshipGroupsRequest.encode(message.queryRelationshipGroupsRequest, writer.uint32(1666).fork()).join(); } if (message.queryRelationshipsRequest !== undefined) { - QueryRelationshipsRequest.encode(message.queryRelationshipsRequest, writer.uint32(1674).fork()).ldelim(); + QueryRelationshipsRequest.encode(message.queryRelationshipsRequest, writer.uint32(1674).fork()).join(); } if (message.updateFriendRequestRequest !== undefined) { - UpdateFriendRequestRequest.encode(message.updateFriendRequestRequest, writer.uint32(1682).fork()).ldelim(); + UpdateFriendRequestRequest.encode(message.updateFriendRequestRequest, writer.uint32(1682).fork()).join(); } if (message.updateRelationshipGroupRequest !== undefined) { - UpdateRelationshipGroupRequest.encode(message.updateRelationshipGroupRequest, writer.uint32(1690).fork()) - .ldelim(); + UpdateRelationshipGroupRequest.encode(message.updateRelationshipGroupRequest, writer.uint32(1690).fork()).join(); } if (message.updateRelationshipRequest !== undefined) { - UpdateRelationshipRequest.encode(message.updateRelationshipRequest, writer.uint32(1698).fork()).ldelim(); + UpdateRelationshipRequest.encode(message.updateRelationshipRequest, writer.uint32(1698).fork()).join(); } if (message.createGroupRequest !== undefined) { - CreateGroupRequest.encode(message.createGroupRequest, writer.uint32(2402).fork()).ldelim(); + CreateGroupRequest.encode(message.createGroupRequest, writer.uint32(2402).fork()).join(); } if (message.deleteGroupRequest !== undefined) { - DeleteGroupRequest.encode(message.deleteGroupRequest, writer.uint32(2410).fork()).ldelim(); + DeleteGroupRequest.encode(message.deleteGroupRequest, writer.uint32(2410).fork()).join(); } if (message.queryGroupsRequest !== undefined) { - QueryGroupsRequest.encode(message.queryGroupsRequest, writer.uint32(2418).fork()).ldelim(); + QueryGroupsRequest.encode(message.queryGroupsRequest, writer.uint32(2418).fork()).join(); } if (message.queryJoinedGroupIdsRequest !== undefined) { - QueryJoinedGroupIdsRequest.encode(message.queryJoinedGroupIdsRequest, writer.uint32(2426).fork()).ldelim(); + QueryJoinedGroupIdsRequest.encode(message.queryJoinedGroupIdsRequest, writer.uint32(2426).fork()).join(); } if (message.queryJoinedGroupInfosRequest !== undefined) { - QueryJoinedGroupInfosRequest.encode(message.queryJoinedGroupInfosRequest, writer.uint32(2434).fork()).ldelim(); + QueryJoinedGroupInfosRequest.encode(message.queryJoinedGroupInfosRequest, writer.uint32(2434).fork()).join(); } if (message.updateGroupRequest !== undefined) { - UpdateGroupRequest.encode(message.updateGroupRequest, writer.uint32(2442).fork()).ldelim(); + UpdateGroupRequest.encode(message.updateGroupRequest, writer.uint32(2442).fork()).join(); } if (message.createGroupBlockedUserRequest !== undefined) { - CreateGroupBlockedUserRequest.encode(message.createGroupBlockedUserRequest, writer.uint32(3202).fork()).ldelim(); + CreateGroupBlockedUserRequest.encode(message.createGroupBlockedUserRequest, writer.uint32(3202).fork()).join(); } if (message.deleteGroupBlockedUserRequest !== undefined) { - DeleteGroupBlockedUserRequest.encode(message.deleteGroupBlockedUserRequest, writer.uint32(3210).fork()).ldelim(); + DeleteGroupBlockedUserRequest.encode(message.deleteGroupBlockedUserRequest, writer.uint32(3210).fork()).join(); } if (message.queryGroupBlockedUserIdsRequest !== undefined) { QueryGroupBlockedUserIdsRequest.encode(message.queryGroupBlockedUserIdsRequest, writer.uint32(3218).fork()) - .ldelim(); + .join(); } if (message.queryGroupBlockedUserInfosRequest !== undefined) { QueryGroupBlockedUserInfosRequest.encode(message.queryGroupBlockedUserInfosRequest, writer.uint32(3226).fork()) - .ldelim(); + .join(); } if (message.checkGroupJoinQuestionsAnswersRequest !== undefined) { CheckGroupJoinQuestionsAnswersRequest.encode( message.checkGroupJoinQuestionsAnswersRequest, writer.uint32(4002).fork(), - ).ldelim(); + ).join(); } if (message.createGroupInvitationRequest !== undefined) { - CreateGroupInvitationRequest.encode(message.createGroupInvitationRequest, writer.uint32(4010).fork()).ldelim(); + CreateGroupInvitationRequest.encode(message.createGroupInvitationRequest, writer.uint32(4010).fork()).join(); } if (message.createGroupJoinRequestRequest !== undefined) { - CreateGroupJoinRequestRequest.encode(message.createGroupJoinRequestRequest, writer.uint32(4018).fork()).ldelim(); + CreateGroupJoinRequestRequest.encode(message.createGroupJoinRequestRequest, writer.uint32(4018).fork()).join(); } if (message.createGroupJoinQuestionsRequest !== undefined) { CreateGroupJoinQuestionsRequest.encode(message.createGroupJoinQuestionsRequest, writer.uint32(4026).fork()) - .ldelim(); + .join(); } if (message.deleteGroupInvitationRequest !== undefined) { - DeleteGroupInvitationRequest.encode(message.deleteGroupInvitationRequest, writer.uint32(4034).fork()).ldelim(); + DeleteGroupInvitationRequest.encode(message.deleteGroupInvitationRequest, writer.uint32(4034).fork()).join(); } if (message.deleteGroupJoinRequestRequest !== undefined) { - DeleteGroupJoinRequestRequest.encode(message.deleteGroupJoinRequestRequest, writer.uint32(4042).fork()).ldelim(); + DeleteGroupJoinRequestRequest.encode(message.deleteGroupJoinRequestRequest, writer.uint32(4042).fork()).join(); } if (message.deleteGroupJoinQuestionsRequest !== undefined) { DeleteGroupJoinQuestionsRequest.encode(message.deleteGroupJoinQuestionsRequest, writer.uint32(4050).fork()) - .ldelim(); + .join(); } if (message.queryGroupInvitationsRequest !== undefined) { - QueryGroupInvitationsRequest.encode(message.queryGroupInvitationsRequest, writer.uint32(4058).fork()).ldelim(); + QueryGroupInvitationsRequest.encode(message.queryGroupInvitationsRequest, writer.uint32(4058).fork()).join(); } if (message.queryGroupJoinRequestsRequest !== undefined) { - QueryGroupJoinRequestsRequest.encode(message.queryGroupJoinRequestsRequest, writer.uint32(4066).fork()).ldelim(); + QueryGroupJoinRequestsRequest.encode(message.queryGroupJoinRequestsRequest, writer.uint32(4066).fork()).join(); } if (message.queryGroupJoinQuestionsRequest !== undefined) { - QueryGroupJoinQuestionsRequest.encode(message.queryGroupJoinQuestionsRequest, writer.uint32(4074).fork()) - .ldelim(); + QueryGroupJoinQuestionsRequest.encode(message.queryGroupJoinQuestionsRequest, writer.uint32(4074).fork()).join(); } if (message.updateGroupInvitationRequest !== undefined) { - UpdateGroupInvitationRequest.encode(message.updateGroupInvitationRequest, writer.uint32(4082).fork()).ldelim(); + UpdateGroupInvitationRequest.encode(message.updateGroupInvitationRequest, writer.uint32(4082).fork()).join(); } if (message.updateGroupJoinQuestionRequest !== undefined) { - UpdateGroupJoinQuestionRequest.encode(message.updateGroupJoinQuestionRequest, writer.uint32(4090).fork()) - .ldelim(); + UpdateGroupJoinQuestionRequest.encode(message.updateGroupJoinQuestionRequest, writer.uint32(4090).fork()).join(); } if (message.updateGroupJoinRequestRequest !== undefined) { - UpdateGroupJoinRequestRequest.encode(message.updateGroupJoinRequestRequest, writer.uint32(4098).fork()).ldelim(); + UpdateGroupJoinRequestRequest.encode(message.updateGroupJoinRequestRequest, writer.uint32(4098).fork()).join(); } if (message.createMeetingRequest !== undefined) { - CreateMeetingRequest.encode(message.createMeetingRequest, writer.uint32(7202).fork()).ldelim(); + CreateMeetingRequest.encode(message.createMeetingRequest, writer.uint32(7202).fork()).join(); } if (message.deleteMeetingRequest !== undefined) { - DeleteMeetingRequest.encode(message.deleteMeetingRequest, writer.uint32(7210).fork()).ldelim(); + DeleteMeetingRequest.encode(message.deleteMeetingRequest, writer.uint32(7210).fork()).join(); } if (message.queryMeetingsRequest !== undefined) { - QueryMeetingsRequest.encode(message.queryMeetingsRequest, writer.uint32(7218).fork()).ldelim(); + QueryMeetingsRequest.encode(message.queryMeetingsRequest, writer.uint32(7218).fork()).join(); } if (message.updateMeetingRequest !== undefined) { - UpdateMeetingRequest.encode(message.updateMeetingRequest, writer.uint32(7226).fork()).ldelim(); + UpdateMeetingRequest.encode(message.updateMeetingRequest, writer.uint32(7226).fork()).join(); } if (message.updateMeetingInvitationRequest !== undefined) { - UpdateMeetingInvitationRequest.encode(message.updateMeetingInvitationRequest, writer.uint32(7234).fork()) - .ldelim(); + UpdateMeetingInvitationRequest.encode(message.updateMeetingInvitationRequest, writer.uint32(7234).fork()).join(); } if (message.deleteResourceRequest !== undefined) { - DeleteResourceRequest.encode(message.deleteResourceRequest, writer.uint32(8002).fork()).ldelim(); + DeleteResourceRequest.encode(message.deleteResourceRequest, writer.uint32(8002).fork()).join(); } if (message.queryResourceDownloadInfoRequest !== undefined) { QueryResourceDownloadInfoRequest.encode(message.queryResourceDownloadInfoRequest, writer.uint32(8010).fork()) - .ldelim(); + .join(); } if (message.queryResourceUploadInfoRequest !== undefined) { - QueryResourceUploadInfoRequest.encode(message.queryResourceUploadInfoRequest, writer.uint32(8018).fork()) - .ldelim(); + QueryResourceUploadInfoRequest.encode(message.queryResourceUploadInfoRequest, writer.uint32(8018).fork()).join(); } if (message.queryMessageAttachmentInfosRequest !== undefined) { QueryMessageAttachmentInfosRequest.encode(message.queryMessageAttachmentInfosRequest, writer.uint32(8026).fork()) - .ldelim(); + .join(); } if (message.updateMessageAttachmentInfoRequest !== undefined) { UpdateMessageAttachmentInfoRequest.encode(message.updateMessageAttachmentInfoRequest, writer.uint32(8034).fork()) - .ldelim(); + .join(); } if (message.deleteConversationSettingsRequest !== undefined) { DeleteConversationSettingsRequest.encode(message.deleteConversationSettingsRequest, writer.uint32(8802).fork()) - .ldelim(); + .join(); } if (message.queryConversationSettingsRequest !== undefined) { QueryConversationSettingsRequest.encode(message.queryConversationSettingsRequest, writer.uint32(8810).fork()) - .ldelim(); + .join(); } if (message.updateConversationSettingsRequest !== undefined) { UpdateConversationSettingsRequest.encode(message.updateConversationSettingsRequest, writer.uint32(8818).fork()) - .ldelim(); + .join(); } if (message.createMessageReactionsRequest !== undefined) { - CreateMessageReactionsRequest.encode(message.createMessageReactionsRequest, writer.uint32(9602).fork()).ldelim(); + CreateMessageReactionsRequest.encode(message.createMessageReactionsRequest, writer.uint32(9602).fork()).join(); } if (message.deleteMessageReactionsRequest !== undefined) { - DeleteMessageReactionsRequest.encode(message.deleteMessageReactionsRequest, writer.uint32(9610).fork()).ldelim(); + DeleteMessageReactionsRequest.encode(message.deleteMessageReactionsRequest, writer.uint32(9610).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): TurmsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): TurmsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTurmsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.requestId = longToString(reader.int64() as Long); + message.requestId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.createSessionRequest = CreateSessionRequest.decode(reader, reader.uint32()); continue; - case 4: + } + case 4: { if (tag !== 34) { break; } message.deleteSessionRequest = DeleteSessionRequest.decode(reader, reader.uint32()); continue; - case 5: + } + case 5: { if (tag !== 42) { break; } message.queryConversationsRequest = QueryConversationsRequest.decode(reader, reader.uint32()); continue; - case 6: + } + case 6: { if (tag !== 50) { break; } message.updateConversationRequest = UpdateConversationRequest.decode(reader, reader.uint32()); continue; - case 7: + } + case 7: { if (tag !== 58) { break; } message.updateTypingStatusRequest = UpdateTypingStatusRequest.decode(reader, reader.uint32()); continue; - case 8: + } + case 8: { if (tag !== 66) { break; } message.createMessageRequest = CreateMessageRequest.decode(reader, reader.uint32()); continue; - case 9: + } + case 9: { if (tag !== 74) { break; } message.queryMessagesRequest = QueryMessagesRequest.decode(reader, reader.uint32()); continue; - case 10: + } + case 10: { if (tag !== 82) { break; } message.updateMessageRequest = UpdateMessageRequest.decode(reader, reader.uint32()); continue; - case 11: + } + case 11: { if (tag !== 90) { break; } message.createGroupMembersRequest = CreateGroupMembersRequest.decode(reader, reader.uint32()); continue; - case 12: + } + case 12: { if (tag !== 98) { break; } message.deleteGroupMembersRequest = DeleteGroupMembersRequest.decode(reader, reader.uint32()); continue; - case 13: + } + case 13: { if (tag !== 106) { break; } message.queryGroupMembersRequest = QueryGroupMembersRequest.decode(reader, reader.uint32()); continue; - case 14: + } + case 14: { if (tag !== 114) { break; } message.updateGroupMemberRequest = UpdateGroupMemberRequest.decode(reader, reader.uint32()); continue; - case 100: + } + case 100: { if (tag !== 802) { break; } message.queryUserProfilesRequest = QueryUserProfilesRequest.decode(reader, reader.uint32()); continue; - case 101: + } + case 101: { if (tag !== 810) { break; } message.queryNearbyUsersRequest = QueryNearbyUsersRequest.decode(reader, reader.uint32()); continue; - case 102: + } + case 102: { if (tag !== 818) { break; } message.queryUserOnlineStatusesRequest = QueryUserOnlineStatusesRequest.decode(reader, reader.uint32()); continue; - case 103: + } + case 103: { if (tag !== 826) { break; } message.updateUserLocationRequest = UpdateUserLocationRequest.decode(reader, reader.uint32()); continue; - case 104: + } + case 104: { if (tag !== 834) { break; } message.updateUserOnlineStatusRequest = UpdateUserOnlineStatusRequest.decode(reader, reader.uint32()); continue; - case 105: + } + case 105: { if (tag !== 842) { break; } message.updateUserRequest = UpdateUserRequest.decode(reader, reader.uint32()); continue; - case 106: + } + case 106: { if (tag !== 850) { break; } message.updateUserSettingsRequest = UpdateUserSettingsRequest.decode(reader, reader.uint32()); continue; - case 107: + } + case 107: { if (tag !== 858) { break; } message.deleteUserSettingsRequest = DeleteUserSettingsRequest.decode(reader, reader.uint32()); continue; - case 108: + } + case 108: { if (tag !== 866) { break; } message.queryUserSettingsRequest = QueryUserSettingsRequest.decode(reader, reader.uint32()); continue; - case 200: + } + case 200: { if (tag !== 1602) { break; } message.createFriendRequestRequest = CreateFriendRequestRequest.decode(reader, reader.uint32()); continue; - case 201: + } + case 201: { if (tag !== 1610) { break; } message.createRelationshipGroupRequest = CreateRelationshipGroupRequest.decode(reader, reader.uint32()); continue; - case 202: + } + case 202: { if (tag !== 1618) { break; } message.createRelationshipRequest = CreateRelationshipRequest.decode(reader, reader.uint32()); continue; - case 203: + } + case 203: { if (tag !== 1626) { break; } message.deleteFriendRequestRequest = DeleteFriendRequestRequest.decode(reader, reader.uint32()); continue; - case 204: + } + case 204: { if (tag !== 1634) { break; } message.deleteRelationshipGroupRequest = DeleteRelationshipGroupRequest.decode(reader, reader.uint32()); continue; - case 205: + } + case 205: { if (tag !== 1642) { break; } message.deleteRelationshipRequest = DeleteRelationshipRequest.decode(reader, reader.uint32()); continue; - case 206: + } + case 206: { if (tag !== 1650) { break; } message.queryFriendRequestsRequest = QueryFriendRequestsRequest.decode(reader, reader.uint32()); continue; - case 207: + } + case 207: { if (tag !== 1658) { break; } message.queryRelatedUserIdsRequest = QueryRelatedUserIdsRequest.decode(reader, reader.uint32()); continue; - case 208: + } + case 208: { if (tag !== 1666) { break; } message.queryRelationshipGroupsRequest = QueryRelationshipGroupsRequest.decode(reader, reader.uint32()); continue; - case 209: + } + case 209: { if (tag !== 1674) { break; } message.queryRelationshipsRequest = QueryRelationshipsRequest.decode(reader, reader.uint32()); continue; - case 210: + } + case 210: { if (tag !== 1682) { break; } message.updateFriendRequestRequest = UpdateFriendRequestRequest.decode(reader, reader.uint32()); continue; - case 211: + } + case 211: { if (tag !== 1690) { break; } message.updateRelationshipGroupRequest = UpdateRelationshipGroupRequest.decode(reader, reader.uint32()); continue; - case 212: + } + case 212: { if (tag !== 1698) { break; } message.updateRelationshipRequest = UpdateRelationshipRequest.decode(reader, reader.uint32()); continue; - case 300: + } + case 300: { if (tag !== 2402) { break; } message.createGroupRequest = CreateGroupRequest.decode(reader, reader.uint32()); continue; - case 301: + } + case 301: { if (tag !== 2410) { break; } message.deleteGroupRequest = DeleteGroupRequest.decode(reader, reader.uint32()); continue; - case 302: + } + case 302: { if (tag !== 2418) { break; } message.queryGroupsRequest = QueryGroupsRequest.decode(reader, reader.uint32()); continue; - case 303: + } + case 303: { if (tag !== 2426) { break; } message.queryJoinedGroupIdsRequest = QueryJoinedGroupIdsRequest.decode(reader, reader.uint32()); continue; - case 304: + } + case 304: { if (tag !== 2434) { break; } message.queryJoinedGroupInfosRequest = QueryJoinedGroupInfosRequest.decode(reader, reader.uint32()); continue; - case 305: + } + case 305: { if (tag !== 2442) { break; } message.updateGroupRequest = UpdateGroupRequest.decode(reader, reader.uint32()); continue; - case 400: + } + case 400: { if (tag !== 3202) { break; } message.createGroupBlockedUserRequest = CreateGroupBlockedUserRequest.decode(reader, reader.uint32()); continue; - case 401: + } + case 401: { if (tag !== 3210) { break; } message.deleteGroupBlockedUserRequest = DeleteGroupBlockedUserRequest.decode(reader, reader.uint32()); continue; - case 402: + } + case 402: { if (tag !== 3218) { break; } message.queryGroupBlockedUserIdsRequest = QueryGroupBlockedUserIdsRequest.decode(reader, reader.uint32()); continue; - case 403: + } + case 403: { if (tag !== 3226) { break; } message.queryGroupBlockedUserInfosRequest = QueryGroupBlockedUserInfosRequest.decode(reader, reader.uint32()); continue; - case 500: + } + case 500: { if (tag !== 4002) { break; } @@ -868,147 +905,168 @@ export const TurmsRequest = { reader.uint32(), ); continue; - case 501: + } + case 501: { if (tag !== 4010) { break; } message.createGroupInvitationRequest = CreateGroupInvitationRequest.decode(reader, reader.uint32()); continue; - case 502: + } + case 502: { if (tag !== 4018) { break; } message.createGroupJoinRequestRequest = CreateGroupJoinRequestRequest.decode(reader, reader.uint32()); continue; - case 503: + } + case 503: { if (tag !== 4026) { break; } message.createGroupJoinQuestionsRequest = CreateGroupJoinQuestionsRequest.decode(reader, reader.uint32()); continue; - case 504: + } + case 504: { if (tag !== 4034) { break; } message.deleteGroupInvitationRequest = DeleteGroupInvitationRequest.decode(reader, reader.uint32()); continue; - case 505: + } + case 505: { if (tag !== 4042) { break; } message.deleteGroupJoinRequestRequest = DeleteGroupJoinRequestRequest.decode(reader, reader.uint32()); continue; - case 506: + } + case 506: { if (tag !== 4050) { break; } message.deleteGroupJoinQuestionsRequest = DeleteGroupJoinQuestionsRequest.decode(reader, reader.uint32()); continue; - case 507: + } + case 507: { if (tag !== 4058) { break; } message.queryGroupInvitationsRequest = QueryGroupInvitationsRequest.decode(reader, reader.uint32()); continue; - case 508: + } + case 508: { if (tag !== 4066) { break; } message.queryGroupJoinRequestsRequest = QueryGroupJoinRequestsRequest.decode(reader, reader.uint32()); continue; - case 509: + } + case 509: { if (tag !== 4074) { break; } message.queryGroupJoinQuestionsRequest = QueryGroupJoinQuestionsRequest.decode(reader, reader.uint32()); continue; - case 510: + } + case 510: { if (tag !== 4082) { break; } message.updateGroupInvitationRequest = UpdateGroupInvitationRequest.decode(reader, reader.uint32()); continue; - case 511: + } + case 511: { if (tag !== 4090) { break; } message.updateGroupJoinQuestionRequest = UpdateGroupJoinQuestionRequest.decode(reader, reader.uint32()); continue; - case 512: + } + case 512: { if (tag !== 4098) { break; } message.updateGroupJoinRequestRequest = UpdateGroupJoinRequestRequest.decode(reader, reader.uint32()); continue; - case 900: + } + case 900: { if (tag !== 7202) { break; } message.createMeetingRequest = CreateMeetingRequest.decode(reader, reader.uint32()); continue; - case 901: + } + case 901: { if (tag !== 7210) { break; } message.deleteMeetingRequest = DeleteMeetingRequest.decode(reader, reader.uint32()); continue; - case 902: + } + case 902: { if (tag !== 7218) { break; } message.queryMeetingsRequest = QueryMeetingsRequest.decode(reader, reader.uint32()); continue; - case 903: + } + case 903: { if (tag !== 7226) { break; } message.updateMeetingRequest = UpdateMeetingRequest.decode(reader, reader.uint32()); continue; - case 904: + } + case 904: { if (tag !== 7234) { break; } message.updateMeetingInvitationRequest = UpdateMeetingInvitationRequest.decode(reader, reader.uint32()); continue; - case 1000: + } + case 1000: { if (tag !== 8002) { break; } message.deleteResourceRequest = DeleteResourceRequest.decode(reader, reader.uint32()); continue; - case 1001: + } + case 1001: { if (tag !== 8010) { break; } message.queryResourceDownloadInfoRequest = QueryResourceDownloadInfoRequest.decode(reader, reader.uint32()); continue; - case 1002: + } + case 1002: { if (tag !== 8018) { break; } message.queryResourceUploadInfoRequest = QueryResourceUploadInfoRequest.decode(reader, reader.uint32()); continue; - case 1003: + } + case 1003: { if (tag !== 8026) { break; } @@ -1018,7 +1076,8 @@ export const TurmsRequest = { reader.uint32(), ); continue; - case 1004: + } + case 1004: { if (tag !== 8034) { break; } @@ -1028,56 +1087,58 @@ export const TurmsRequest = { reader.uint32(), ); continue; - case 1100: + } + case 1100: { if (tag !== 8802) { break; } message.deleteConversationSettingsRequest = DeleteConversationSettingsRequest.decode(reader, reader.uint32()); continue; - case 1101: + } + case 1101: { if (tag !== 8810) { break; } message.queryConversationSettingsRequest = QueryConversationSettingsRequest.decode(reader, reader.uint32()); continue; - case 1102: + } + case 1102: { if (tag !== 8818) { break; } message.updateConversationSettingsRequest = UpdateConversationSettingsRequest.decode(reader, reader.uint32()); continue; - case 1200: + } + case 1200: { if (tag !== 9602) { break; } message.createMessageReactionsRequest = CreateMessageReactionsRequest.decode(reader, reader.uint32()); continue; - case 1201: + } + case 1201: { if (tag !== 9610) { break; } message.deleteMessageReactionsRequest = DeleteMessageReactionsRequest.decode(reader, reader.uint32()); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/create_session_request.ts b/turms-client-js/src/model/proto/request/user/create_session_request.ts index 90e2f60c5d..5e6d893fb7 100644 --- a/turms-client-js/src/model/proto/request/user/create_session_request.ts +++ b/turms-client-js/src/model/proto/request/user/create_session_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/create_session_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { DeviceType } from "../../constant/device_type"; import { UserStatus } from "../../constant/user_status"; import { Value } from "../../model/common/value"; @@ -43,8 +42,8 @@ function createBaseCreateSessionRequest(): CreateSessionRequest { }; } -export const CreateSessionRequest = { - encode(message: CreateSessionRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const CreateSessionRequest: MessageFns = { + encode(message: CreateSessionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.version !== 0) { writer.uint32(8).int32(message.version); } @@ -61,60 +60,65 @@ export const CreateSessionRequest = { writer.uint32(40).int32(message.deviceType); } Object.entries(message.deviceDetails).forEach(([key, value]) => { - CreateSessionRequest_DeviceDetailsEntry.encode({ key: key as any, value }, writer.uint32(50).fork()).ldelim(); + CreateSessionRequest_DeviceDetailsEntry.encode({ key: key as any, value }, writer.uint32(50).fork()).join(); }); if (message.location !== undefined) { - UserLocation.encode(message.location, writer.uint32(58).fork()).ldelim(); + UserLocation.encode(message.location, writer.uint32(58).fork()).join(); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateSessionRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): CreateSessionRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCreateSessionRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } message.version = reader.int32(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.userId = longToString(reader.int64() as Long); + message.userId = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.password = reader.string(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } message.userStatus = reader.int32() as any; continue; - case 5: + } + case 5: { if (tag !== 40) { break; } message.deviceType = reader.int32() as any; continue; - case 6: + } + case 6: { if (tag !== 50) { break; } @@ -124,25 +128,28 @@ export const CreateSessionRequest = { message.deviceDetails[entry6.key] = entry6.value; } continue; - case 7: + } + case 7: { if (tag !== 58) { break; } message.location = UserLocation.decode(reader, reader.uint32()); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -152,8 +159,8 @@ function createBaseCreateSessionRequest_DeviceDetailsEntry(): CreateSessionReque return { key: "", value: "" }; } -export const CreateSessionRequest_DeviceDetailsEntry = { - encode(message: CreateSessionRequest_DeviceDetailsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const CreateSessionRequest_DeviceDetailsEntry: MessageFns = { + encode(message: CreateSessionRequest_DeviceDetailsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -163,42 +170,40 @@ export const CreateSessionRequest_DeviceDetailsEntry = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateSessionRequest_DeviceDetailsEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): CreateSessionRequest_DeviceDetailsEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCreateSessionRequest_DeviceDetailsEntry(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.key = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.value = reader.string(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/delete_session_request.ts b/turms-client-js/src/model/proto/request/user/delete_session_request.ts index cd05b54374..2575c04995 100644 --- a/turms-client-js/src/model/proto/request/user/delete_session_request.ts +++ b/turms-client-js/src/model/proto/request/user/delete_session_request.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/delete_session_request.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -18,34 +18,40 @@ function createBaseDeleteSessionRequest(): DeleteSessionRequest { return { customAttributes: [] }; } -export const DeleteSessionRequest = { - encode(message: DeleteSessionRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const DeleteSessionRequest: MessageFns = { + encode(message: DeleteSessionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteSessionRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): DeleteSessionRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeleteSessionRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 15: + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/delete_user_settings_request.ts b/turms-client-js/src/model/proto/request/user/delete_user_settings_request.ts index a140b99e8e..39df3e389f 100644 --- a/turms-client-js/src/model/proto/request/user/delete_user_settings_request.ts +++ b/turms-client-js/src/model/proto/request/user/delete_user_settings_request.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/delete_user_settings_request.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -19,44 +19,51 @@ function createBaseDeleteUserSettingsRequest(): DeleteUserSettingsRequest { return { names: [], customAttributes: [] }; } -export const DeleteUserSettingsRequest = { - encode(message: DeleteUserSettingsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const DeleteUserSettingsRequest: MessageFns = { + encode(message: DeleteUserSettingsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.names) { writer.uint32(10).string(v!); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteUserSettingsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): DeleteUserSettingsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeleteUserSettingsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.names.push(reader.string()); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/query_nearby_users_request.ts b/turms-client-js/src/model/proto/request/user/query_nearby_users_request.ts index 3307a7f06d..b4a369e447 100644 --- a/turms-client-js/src/model/proto/request/user/query_nearby_users_request.ts +++ b/turms-client-js/src/model/proto/request/user/query_nearby_users_request.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/query_nearby_users_request.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -34,8 +34,8 @@ function createBaseQueryNearbyUsersRequest(): QueryNearbyUsersRequest { }; } -export const QueryNearbyUsersRequest = { - encode(message: QueryNearbyUsersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryNearbyUsersRequest: MessageFns = { + encode(message: QueryNearbyUsersRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.latitude !== 0) { writer.uint32(13).float(message.latitude); } @@ -58,80 +58,93 @@ export const QueryNearbyUsersRequest = { writer.uint32(56).bool(message.withUserInfo); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryNearbyUsersRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryNearbyUsersRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryNearbyUsersRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 13) { break; } message.latitude = reader.float(); continue; - case 2: + } + case 2: { if (tag !== 21) { break; } message.longitude = reader.float(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } message.maxCount = reader.int32(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } message.maxDistance = reader.int32(); continue; - case 5: + } + case 5: { if (tag !== 40) { break; } message.withCoordinates = reader.bool(); continue; - case 6: + } + case 6: { if (tag !== 48) { break; } message.withDistance = reader.bool(); continue; - case 7: + } + case 7: { if (tag !== 56) { break; } message.withUserInfo = reader.bool(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/query_user_online_statuses_request.ts b/turms-client-js/src/model/proto/request/user/query_user_online_statuses_request.ts index 3faaaf7efa..1fd712f445 100644 --- a/turms-client-js/src/model/proto/request/user/query_user_online_statuses_request.ts +++ b/turms-client-js/src/model/proto/request/user/query_user_online_statuses_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/query_user_online_statuses_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -20,29 +19,29 @@ function createBaseQueryUserOnlineStatusesRequest(): QueryUserOnlineStatusesRequ return { userIds: [], customAttributes: [] }; } -export const QueryUserOnlineStatusesRequest = { - encode(message: QueryUserOnlineStatusesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryUserOnlineStatusesRequest: MessageFns = { + encode(message: QueryUserOnlineStatusesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { writer.uint32(10).fork(); for (const v of message.userIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryUserOnlineStatusesRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryUserOnlineStatusesRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryUserOnlineStatusesRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag === 8) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); continue; } @@ -50,35 +49,33 @@ export const QueryUserOnlineStatusesRequest = { if (tag === 10) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); } continue; } break; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/query_user_profiles_request.ts b/turms-client-js/src/model/proto/request/user/query_user_profiles_request.ts index f911fb79f2..be6574031f 100644 --- a/turms-client-js/src/model/proto/request/user/query_user_profiles_request.ts +++ b/turms-client-js/src/model/proto/request/user/query_user_profiles_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/query_user_profiles_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -33,13 +32,13 @@ function createBaseQueryUserProfilesRequest(): QueryUserProfilesRequest { }; } -export const QueryUserProfilesRequest = { - encode(message: QueryUserProfilesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryUserProfilesRequest: MessageFns = { + encode(message: QueryUserProfilesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { writer.uint32(10).fork(); for (const v of message.userIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); if (message.lastUpdatedDate !== undefined) { writer.uint32(16).int64(message.lastUpdatedDate); } @@ -56,23 +55,23 @@ export const QueryUserProfilesRequest = { for (const v of message.fieldsToHighlight) { writer.int32(v); } - writer.ldelim(); + writer.join(); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryUserProfilesRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryUserProfilesRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryUserProfilesRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag === 8) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); continue; } @@ -80,42 +79,47 @@ export const QueryUserProfilesRequest = { if (tag === 10) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); } continue; } break; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.name = reader.string(); continue; - case 10: + } + case 10: { if (tag !== 80) { break; } message.skip = reader.int32(); continue; - case 11: + } + case 11: { if (tag !== 88) { break; } message.limit = reader.int32(); continue; - case 12: + } + case 12: { if (tag === 96) { message.fieldsToHighlight.push(reader.int32()); @@ -132,28 +136,26 @@ export const QueryUserProfilesRequest = { } break; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/query_user_settings_request.ts b/turms-client-js/src/model/proto/request/user/query_user_settings_request.ts index 840bbecabf..26141817eb 100644 --- a/turms-client-js/src/model/proto/request/user/query_user_settings_request.ts +++ b/turms-client-js/src/model/proto/request/user/query_user_settings_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/query_user_settings_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -21,8 +20,8 @@ function createBaseQueryUserSettingsRequest(): QueryUserSettingsRequest { return { names: [], lastUpdatedDateStart: undefined, customAttributes: [] }; } -export const QueryUserSettingsRequest = { - encode(message: QueryUserSettingsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryUserSettingsRequest: MessageFns = { + encode(message: QueryUserSettingsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { for (const v of message.names) { writer.uint32(10).string(v!); } @@ -30,54 +29,53 @@ export const QueryUserSettingsRequest = { writer.uint32(16).int64(message.lastUpdatedDateStart); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryUserSettingsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryUserSettingsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryUserSettingsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.names.push(reader.string()); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDateStart = longToString(reader.int64() as Long); + message.lastUpdatedDateStart = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/relationship/create_friend_request_request.ts b/turms-client-js/src/model/proto/request/user/relationship/create_friend_request_request.ts index 86abd093c7..b6b6430d0c 100644 --- a/turms-client-js/src/model/proto/request/user/relationship/create_friend_request_request.ts +++ b/turms-client-js/src/model/proto/request/user/relationship/create_friend_request_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/relationship/create_friend_request_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -21,8 +20,8 @@ function createBaseCreateFriendRequestRequest(): CreateFriendRequestRequest { return { recipientId: "0", content: "", customAttributes: [] }; } -export const CreateFriendRequestRequest = { - encode(message: CreateFriendRequestRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const CreateFriendRequestRequest: MessageFns = { + encode(message: CreateFriendRequestRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.recipientId !== "0") { writer.uint32(8).int64(message.recipientId); } @@ -30,54 +29,53 @@ export const CreateFriendRequestRequest = { writer.uint32(18).string(message.content); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateFriendRequestRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): CreateFriendRequestRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCreateFriendRequestRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.recipientId = longToString(reader.int64() as Long); + message.recipientId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.content = reader.string(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/relationship/create_relationship_group_request.ts b/turms-client-js/src/model/proto/request/user/relationship/create_relationship_group_request.ts index 2148a3253b..1ecbf53834 100644 --- a/turms-client-js/src/model/proto/request/user/relationship/create_relationship_group_request.ts +++ b/turms-client-js/src/model/proto/request/user/relationship/create_relationship_group_request.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/relationship/create_relationship_group_request.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -19,44 +19,51 @@ function createBaseCreateRelationshipGroupRequest(): CreateRelationshipGroupRequ return { name: "", customAttributes: [] }; } -export const CreateRelationshipGroupRequest = { - encode(message: CreateRelationshipGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const CreateRelationshipGroupRequest: MessageFns = { + encode(message: CreateRelationshipGroupRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.name !== "") { writer.uint32(10).string(message.name); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateRelationshipGroupRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): CreateRelationshipGroupRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCreateRelationshipGroupRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.name = reader.string(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/relationship/create_relationship_request.ts b/turms-client-js/src/model/proto/request/user/relationship/create_relationship_request.ts index 6d4515493f..7fd5e91422 100644 --- a/turms-client-js/src/model/proto/request/user/relationship/create_relationship_request.ts +++ b/turms-client-js/src/model/proto/request/user/relationship/create_relationship_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/relationship/create_relationship_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -23,8 +22,8 @@ function createBaseCreateRelationshipRequest(): CreateRelationshipRequest { return { userId: "0", blocked: false, groupIndex: undefined, name: undefined, customAttributes: [] }; } -export const CreateRelationshipRequest = { - encode(message: CreateRelationshipRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const CreateRelationshipRequest: MessageFns = { + encode(message: CreateRelationshipRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.userId !== "0") { writer.uint32(8).int64(message.userId); } @@ -38,68 +37,69 @@ export const CreateRelationshipRequest = { writer.uint32(34).string(message.name); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateRelationshipRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): CreateRelationshipRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCreateRelationshipRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.userId = longToString(reader.int64() as Long); + message.userId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.blocked = reader.bool(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } message.groupIndex = reader.int32(); continue; - case 4: + } + case 4: { if (tag !== 34) { break; } message.name = reader.string(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/relationship/delete_friend_request_request.ts b/turms-client-js/src/model/proto/request/user/relationship/delete_friend_request_request.ts index e5864069af..b95b3347ed 100644 --- a/turms-client-js/src/model/proto/request/user/relationship/delete_friend_request_request.ts +++ b/turms-client-js/src/model/proto/request/user/relationship/delete_friend_request_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/relationship/delete_friend_request_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -20,53 +19,51 @@ function createBaseDeleteFriendRequestRequest(): DeleteFriendRequestRequest { return { requestId: "0", customAttributes: [] }; } -export const DeleteFriendRequestRequest = { - encode(message: DeleteFriendRequestRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const DeleteFriendRequestRequest: MessageFns = { + encode(message: DeleteFriendRequestRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.requestId !== "0") { writer.uint32(8).int64(message.requestId); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteFriendRequestRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): DeleteFriendRequestRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeleteFriendRequestRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.requestId = longToString(reader.int64() as Long); + message.requestId = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/relationship/delete_relationship_group_member_request.ts b/turms-client-js/src/model/proto/request/user/relationship/delete_relationship_group_member_request.ts index 9096716e41..46af9819a3 100644 --- a/turms-client-js/src/model/proto/request/user/relationship/delete_relationship_group_member_request.ts +++ b/turms-client-js/src/model/proto/request/user/relationship/delete_relationship_group_member_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/relationship/delete_relationship_group_member_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -22,8 +21,8 @@ function createBaseDeleteRelationshipGroupMemberRequest(): DeleteRelationshipGro return { userId: "0", groupIndex: 0, targetGroupIndex: undefined, customAttributes: [] }; } -export const DeleteRelationshipGroupMemberRequest = { - encode(message: DeleteRelationshipGroupMemberRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const DeleteRelationshipGroupMemberRequest: MessageFns = { + encode(message: DeleteRelationshipGroupMemberRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.userId !== "0") { writer.uint32(8).int64(message.userId); } @@ -34,61 +33,61 @@ export const DeleteRelationshipGroupMemberRequest = { writer.uint32(24).int32(message.targetGroupIndex); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteRelationshipGroupMemberRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): DeleteRelationshipGroupMemberRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeleteRelationshipGroupMemberRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.userId = longToString(reader.int64() as Long); + message.userId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.groupIndex = reader.int32(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } message.targetGroupIndex = reader.int32(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/relationship/delete_relationship_group_request.ts b/turms-client-js/src/model/proto/request/user/relationship/delete_relationship_group_request.ts index 439871fb4c..691f0009a8 100644 --- a/turms-client-js/src/model/proto/request/user/relationship/delete_relationship_group_request.ts +++ b/turms-client-js/src/model/proto/request/user/relationship/delete_relationship_group_request.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/relationship/delete_relationship_group_request.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -20,8 +20,8 @@ function createBaseDeleteRelationshipGroupRequest(): DeleteRelationshipGroupRequ return { groupIndex: 0, targetGroupIndex: undefined, customAttributes: [] }; } -export const DeleteRelationshipGroupRequest = { - encode(message: DeleteRelationshipGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const DeleteRelationshipGroupRequest: MessageFns = { + encode(message: DeleteRelationshipGroupRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupIndex !== 0) { writer.uint32(8).int32(message.groupIndex); } @@ -29,45 +29,53 @@ export const DeleteRelationshipGroupRequest = { writer.uint32(16).int32(message.targetGroupIndex); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteRelationshipGroupRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): DeleteRelationshipGroupRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeleteRelationshipGroupRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } message.groupIndex = reader.int32(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.targetGroupIndex = reader.int32(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/relationship/delete_relationship_request.ts b/turms-client-js/src/model/proto/request/user/relationship/delete_relationship_request.ts index d2f5089e1f..8f1bfdc078 100644 --- a/turms-client-js/src/model/proto/request/user/relationship/delete_relationship_request.ts +++ b/turms-client-js/src/model/proto/request/user/relationship/delete_relationship_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/relationship/delete_relationship_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -22,8 +21,8 @@ function createBaseDeleteRelationshipRequest(): DeleteRelationshipRequest { return { userId: "0", groupIndex: undefined, targetGroupIndex: undefined, customAttributes: [] }; } -export const DeleteRelationshipRequest = { - encode(message: DeleteRelationshipRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const DeleteRelationshipRequest: MessageFns = { + encode(message: DeleteRelationshipRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.userId !== "0") { writer.uint32(8).int64(message.userId); } @@ -34,61 +33,61 @@ export const DeleteRelationshipRequest = { writer.uint32(24).int32(message.targetGroupIndex); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteRelationshipRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): DeleteRelationshipRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeleteRelationshipRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.userId = longToString(reader.int64() as Long); + message.userId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.groupIndex = reader.int32(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } message.targetGroupIndex = reader.int32(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/relationship/query_friend_requests_request.ts b/turms-client-js/src/model/proto/request/user/relationship/query_friend_requests_request.ts index dbe74554d6..6b30e9634a 100644 --- a/turms-client-js/src/model/proto/request/user/relationship/query_friend_requests_request.ts +++ b/turms-client-js/src/model/proto/request/user/relationship/query_friend_requests_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/relationship/query_friend_requests_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -21,8 +20,8 @@ function createBaseQueryFriendRequestsRequest(): QueryFriendRequestsRequest { return { areSentByMe: false, lastUpdatedDate: undefined, customAttributes: [] }; } -export const QueryFriendRequestsRequest = { - encode(message: QueryFriendRequestsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryFriendRequestsRequest: MessageFns = { + encode(message: QueryFriendRequestsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.areSentByMe !== false) { writer.uint32(8).bool(message.areSentByMe); } @@ -30,54 +29,53 @@ export const QueryFriendRequestsRequest = { writer.uint32(16).int64(message.lastUpdatedDate); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryFriendRequestsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryFriendRequestsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryFriendRequestsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } message.areSentByMe = reader.bool(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/relationship/query_related_user_ids_request.ts b/turms-client-js/src/model/proto/request/user/relationship/query_related_user_ids_request.ts index b4c25ceecd..a5b69779d4 100644 --- a/turms-client-js/src/model/proto/request/user/relationship/query_related_user_ids_request.ts +++ b/turms-client-js/src/model/proto/request/user/relationship/query_related_user_ids_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/relationship/query_related_user_ids_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -15,15 +14,22 @@ export interface QueryRelatedUserIdsRequest { blocked?: boolean | undefined; groupIndexes: number[]; lastUpdatedDate?: string | undefined; + userIdsForCommonRelationships: string[]; customAttributes: Value[]; } function createBaseQueryRelatedUserIdsRequest(): QueryRelatedUserIdsRequest { - return { blocked: undefined, groupIndexes: [], lastUpdatedDate: undefined, customAttributes: [] }; + return { + blocked: undefined, + groupIndexes: [], + lastUpdatedDate: undefined, + userIdsForCommonRelationships: [], + customAttributes: [], + }; } -export const QueryRelatedUserIdsRequest = { - encode(message: QueryRelatedUserIdsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryRelatedUserIdsRequest: MessageFns = { + encode(message: QueryRelatedUserIdsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.blocked !== undefined) { writer.uint32(8).bool(message.blocked); } @@ -31,31 +37,37 @@ export const QueryRelatedUserIdsRequest = { for (const v of message.groupIndexes) { writer.int32(v); } - writer.ldelim(); + writer.join(); if (message.lastUpdatedDate !== undefined) { writer.uint32(24).int64(message.lastUpdatedDate); } + writer.uint32(34).fork(); + for (const v of message.userIdsForCommonRelationships) { + writer.int64(v); + } + writer.join(); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryRelatedUserIdsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryRelatedUserIdsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryRelatedUserIdsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } message.blocked = reader.bool(); continue; - case 2: + } + case 2: { if (tag === 16) { message.groupIndexes.push(reader.int32()); @@ -72,35 +84,52 @@ export const QueryRelatedUserIdsRequest = { } break; - case 3: + } + case 3: { if (tag !== 24) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 15: + } + case 4: { + if (tag === 32) { + message.userIdsForCommonRelationships.push(reader.int64().toString()); + + continue; + } + + if (tag === 34) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.userIdsForCommonRelationships.push(reader.int64().toString()); + } + + continue; + } + + break; + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/relationship/query_relationship_groups_request.ts b/turms-client-js/src/model/proto/request/user/relationship/query_relationship_groups_request.ts index af0b1d9197..8a9f6624eb 100644 --- a/turms-client-js/src/model/proto/request/user/relationship/query_relationship_groups_request.ts +++ b/turms-client-js/src/model/proto/request/user/relationship/query_relationship_groups_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/relationship/query_relationship_groups_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -20,53 +19,51 @@ function createBaseQueryRelationshipGroupsRequest(): QueryRelationshipGroupsRequ return { lastUpdatedDate: undefined, customAttributes: [] }; } -export const QueryRelationshipGroupsRequest = { - encode(message: QueryRelationshipGroupsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryRelationshipGroupsRequest: MessageFns = { + encode(message: QueryRelationshipGroupsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.lastUpdatedDate !== undefined) { writer.uint32(8).int64(message.lastUpdatedDate); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryRelationshipGroupsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryRelationshipGroupsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryRelationshipGroupsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/relationship/query_relationships_request.ts b/turms-client-js/src/model/proto/request/user/relationship/query_relationships_request.ts index 6ec8278507..a7ca2ebd20 100644 --- a/turms-client-js/src/model/proto/request/user/relationship/query_relationships_request.ts +++ b/turms-client-js/src/model/proto/request/user/relationship/query_relationships_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/relationship/query_relationships_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -16,20 +15,28 @@ export interface QueryRelationshipsRequest { blocked?: boolean | undefined; groupIndexes: number[]; lastUpdatedDate?: string | undefined; + userIdsForCommonRelationships: string[]; customAttributes: Value[]; } function createBaseQueryRelationshipsRequest(): QueryRelationshipsRequest { - return { userIds: [], blocked: undefined, groupIndexes: [], lastUpdatedDate: undefined, customAttributes: [] }; + return { + userIds: [], + blocked: undefined, + groupIndexes: [], + lastUpdatedDate: undefined, + userIdsForCommonRelationships: [], + customAttributes: [], + }; } -export const QueryRelationshipsRequest = { - encode(message: QueryRelationshipsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const QueryRelationshipsRequest: MessageFns = { + encode(message: QueryRelationshipsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { writer.uint32(10).fork(); for (const v of message.userIds) { writer.int64(v); } - writer.ldelim(); + writer.join(); if (message.blocked !== undefined) { writer.uint32(16).bool(message.blocked); } @@ -37,26 +44,31 @@ export const QueryRelationshipsRequest = { for (const v of message.groupIndexes) { writer.int32(v); } - writer.ldelim(); + writer.join(); if (message.lastUpdatedDate !== undefined) { writer.uint32(32).int64(message.lastUpdatedDate); } + writer.uint32(42).fork(); + for (const v of message.userIdsForCommonRelationships) { + writer.int64(v); + } + writer.join(); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): QueryRelationshipsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): QueryRelationshipsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryRelationshipsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag === 8) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); continue; } @@ -64,21 +76,23 @@ export const QueryRelationshipsRequest = { if (tag === 10) { const end2 = reader.uint32() + reader.pos; while (reader.pos < end2) { - message.userIds.push(longToString(reader.int64() as Long)); + message.userIds.push(reader.int64().toString()); } continue; } break; - case 2: + } + case 2: { if (tag !== 16) { break; } message.blocked = reader.bool(); continue; - case 3: + } + case 3: { if (tag === 24) { message.groupIndexes.push(reader.int32()); @@ -95,35 +109,52 @@ export const QueryRelationshipsRequest = { } break; - case 4: + } + case 4: { if (tag !== 32) { break; } - message.lastUpdatedDate = longToString(reader.int64() as Long); + message.lastUpdatedDate = reader.int64().toString(); continue; - case 15: + } + case 5: { + if (tag === 40) { + message.userIdsForCommonRelationships.push(reader.int64().toString()); + + continue; + } + + if (tag === 42) { + const end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) { + message.userIdsForCommonRelationships.push(reader.int64().toString()); + } + + continue; + } + + break; + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/relationship/update_friend_request_request.ts b/turms-client-js/src/model/proto/request/user/relationship/update_friend_request_request.ts index 2c9e591713..ec18d60135 100644 --- a/turms-client-js/src/model/proto/request/user/relationship/update_friend_request_request.ts +++ b/turms-client-js/src/model/proto/request/user/relationship/update_friend_request_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/relationship/update_friend_request_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { ResponseAction } from "../../../constant/response_action"; import { Value } from "../../../model/common/value"; @@ -25,8 +24,8 @@ function createBaseUpdateFriendRequestRequest(): UpdateFriendRequestRequest { return { requestId: "0", responseAction: 0, reason: undefined, customAttributes: [] }; } -export const UpdateFriendRequestRequest = { - encode(message: UpdateFriendRequestRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateFriendRequestRequest: MessageFns = { + encode(message: UpdateFriendRequestRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.requestId !== "0") { writer.uint32(8).int64(message.requestId); } @@ -37,61 +36,61 @@ export const UpdateFriendRequestRequest = { writer.uint32(26).string(message.reason); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateFriendRequestRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateFriendRequestRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateFriendRequestRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.requestId = longToString(reader.int64() as Long); + message.requestId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.responseAction = reader.int32() as any; continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.reason = reader.string(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/relationship/update_relationship_group_request.ts b/turms-client-js/src/model/proto/request/user/relationship/update_relationship_group_request.ts index cc35d58396..43ef28a360 100644 --- a/turms-client-js/src/model/proto/request/user/relationship/update_relationship_group_request.ts +++ b/turms-client-js/src/model/proto/request/user/relationship/update_relationship_group_request.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/relationship/update_relationship_group_request.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -22,8 +22,8 @@ function createBaseUpdateRelationshipGroupRequest(): UpdateRelationshipGroupRequ return { groupIndex: 0, newName: "", customAttributes: [] }; } -export const UpdateRelationshipGroupRequest = { - encode(message: UpdateRelationshipGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateRelationshipGroupRequest: MessageFns = { + encode(message: UpdateRelationshipGroupRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.groupIndex !== 0) { writer.uint32(8).int32(message.groupIndex); } @@ -31,45 +31,53 @@ export const UpdateRelationshipGroupRequest = { writer.uint32(18).string(message.newName); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateRelationshipGroupRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateRelationshipGroupRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateRelationshipGroupRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } message.groupIndex = reader.int32(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.newName = reader.string(); continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/relationship/update_relationship_request.ts b/turms-client-js/src/model/proto/request/user/relationship/update_relationship_request.ts index 5a502238f4..9e5f776bf4 100644 --- a/turms-client-js/src/model/proto/request/user/relationship/update_relationship_request.ts +++ b/turms-client-js/src/model/proto/request/user/relationship/update_relationship_request.ts @@ -1,12 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/relationship/update_relationship_request.proto /* eslint-disable */ -import Long from "long"; -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -19,6 +18,7 @@ export interface UpdateRelationshipRequest { newGroupIndex?: number | undefined; deleteGroupIndex?: number | undefined; name?: string | undefined; + note?: string | undefined; customAttributes: Value[]; } @@ -29,12 +29,13 @@ function createBaseUpdateRelationshipRequest(): UpdateRelationshipRequest { newGroupIndex: undefined, deleteGroupIndex: undefined, name: undefined, + note: undefined, customAttributes: [], }; } -export const UpdateRelationshipRequest = { - encode(message: UpdateRelationshipRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateRelationshipRequest: MessageFns = { + encode(message: UpdateRelationshipRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.userId !== "0") { writer.uint32(8).int64(message.userId); } @@ -50,76 +51,89 @@ export const UpdateRelationshipRequest = { if (message.name !== undefined) { writer.uint32(42).string(message.name); } + if (message.note !== undefined) { + writer.uint32(50).string(message.note); + } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateRelationshipRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateRelationshipRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateRelationshipRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 8) { break; } - message.userId = longToString(reader.int64() as Long); + message.userId = reader.int64().toString(); continue; - case 2: + } + case 2: { if (tag !== 16) { break; } message.blocked = reader.bool(); continue; - case 3: + } + case 3: { if (tag !== 24) { break; } message.newGroupIndex = reader.int32(); continue; - case 4: + } + case 4: { if (tag !== 32) { break; } message.deleteGroupIndex = reader.int32(); continue; - case 5: + } + case 5: { if (tag !== 42) { break; } message.name = reader.string(); continue; - case 15: + } + case 6: { + if (tag !== 50) { + break; + } + + message.note = reader.string(); + continue; + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; -function longToString(long: Long) { - return long.toString(); -} - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/update_user_location_request.ts b/turms-client-js/src/model/proto/request/user/update_user_location_request.ts index 6dd94b7c04..d01fff2504 100644 --- a/turms-client-js/src/model/proto/request/user/update_user_location_request.ts +++ b/turms-client-js/src/model/proto/request/user/update_user_location_request.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/update_user_location_request.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -27,8 +27,8 @@ function createBaseUpdateUserLocationRequest(): UpdateUserLocationRequest { return { latitude: 0, longitude: 0, details: {}, customAttributes: [] }; } -export const UpdateUserLocationRequest = { - encode(message: UpdateUserLocationRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateUserLocationRequest: MessageFns = { + encode(message: UpdateUserLocationRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.latitude !== 0) { writer.uint32(13).float(message.latitude); } @@ -36,36 +36,38 @@ export const UpdateUserLocationRequest = { writer.uint32(21).float(message.longitude); } Object.entries(message.details).forEach(([key, value]) => { - UpdateUserLocationRequest_DetailsEntry.encode({ key: key as any, value }, writer.uint32(26).fork()).ldelim(); + UpdateUserLocationRequest_DetailsEntry.encode({ key: key as any, value }, writer.uint32(26).fork()).join(); }); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateUserLocationRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateUserLocationRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateUserLocationRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 13) { break; } message.latitude = reader.float(); continue; - case 2: + } + case 2: { if (tag !== 21) { break; } message.longitude = reader.float(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } @@ -75,18 +77,20 @@ export const UpdateUserLocationRequest = { message.details[entry3.key] = entry3.value; } continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -96,8 +100,8 @@ function createBaseUpdateUserLocationRequest_DetailsEntry(): UpdateUserLocationR return { key: "", value: "" }; } -export const UpdateUserLocationRequest_DetailsEntry = { - encode(message: UpdateUserLocationRequest_DetailsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateUserLocationRequest_DetailsEntry: MessageFns = { + encode(message: UpdateUserLocationRequest_DetailsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -107,33 +111,40 @@ export const UpdateUserLocationRequest_DetailsEntry = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateUserLocationRequest_DetailsEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateUserLocationRequest_DetailsEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateUserLocationRequest_DetailsEntry(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.key = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.value = reader.string(); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/update_user_online_status_request.ts b/turms-client-js/src/model/proto/request/user/update_user_online_status_request.ts index 38341fc1ff..441166573d 100644 --- a/turms-client-js/src/model/proto/request/user/update_user_online_status_request.ts +++ b/turms-client-js/src/model/proto/request/user/update_user_online_status_request.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/update_user_online_status_request.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { DeviceType } from "../../constant/device_type"; import { UserStatus } from "../../constant/user_status"; import { Value } from "../../model/common/value"; @@ -24,30 +24,30 @@ function createBaseUpdateUserOnlineStatusRequest(): UpdateUserOnlineStatusReques return { deviceTypes: [], userStatus: 0, customAttributes: [] }; } -export const UpdateUserOnlineStatusRequest = { - encode(message: UpdateUserOnlineStatusRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateUserOnlineStatusRequest: MessageFns = { + encode(message: UpdateUserOnlineStatusRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { writer.uint32(10).fork(); for (const v of message.deviceTypes) { writer.int32(v); } - writer.ldelim(); + writer.join(); if (message.userStatus !== 0) { writer.uint32(16).int32(message.userStatus); } for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateUserOnlineStatusRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateUserOnlineStatusRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateUserOnlineStatusRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag === 8) { message.deviceTypes.push(reader.int32() as any); @@ -64,26 +64,34 @@ export const UpdateUserOnlineStatusRequest = { } break; - case 2: + } + case 2: { if (tag !== 16) { break; } message.userStatus = reader.int32() as any; continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/update_user_request.ts b/turms-client-js/src/model/proto/request/user/update_user_request.ts index c4ffd91ff5..96493b4bae 100644 --- a/turms-client-js/src/model/proto/request/user/update_user_request.ts +++ b/turms-client-js/src/model/proto/request/user/update_user_request.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/update_user_request.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { ProfileAccessStrategy } from "../../constant/profile_access_strategy"; import { Value } from "../../model/common/value"; @@ -39,8 +39,8 @@ function createBaseUpdateUserRequest(): UpdateUserRequest { }; } -export const UpdateUserRequest = { - encode(message: UpdateUserRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateUserRequest: MessageFns = { + encode(message: UpdateUserRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.password !== undefined) { writer.uint32(10).string(message.password); } @@ -57,58 +57,62 @@ export const UpdateUserRequest = { writer.uint32(40).int32(message.profileAccessStrategy); } Object.entries(message.userDefinedAttributes).forEach(([key, value]) => { - UpdateUserRequest_UserDefinedAttributesEntry.encode({ key: key as any, value }, writer.uint32(50).fork()) - .ldelim(); + UpdateUserRequest_UserDefinedAttributesEntry.encode({ key: key as any, value }, writer.uint32(50).fork()).join(); }); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateUserRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateUserRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateUserRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.password = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.name = reader.string(); continue; - case 3: + } + case 3: { if (tag !== 26) { break; } message.intro = reader.string(); continue; - case 4: + } + case 4: { if (tag !== 34) { break; } message.profilePicture = reader.string(); continue; - case 5: + } + case 5: { if (tag !== 40) { break; } message.profileAccessStrategy = reader.int32() as any; continue; - case 6: + } + case 6: { if (tag !== 50) { break; } @@ -118,18 +122,20 @@ export const UpdateUserRequest = { message.userDefinedAttributes[entry6.key] = entry6.value; } continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -139,44 +145,54 @@ function createBaseUpdateUserRequest_UserDefinedAttributesEntry(): UpdateUserReq return { key: "", value: undefined }; } -export const UpdateUserRequest_UserDefinedAttributesEntry = { - encode(message: UpdateUserRequest_UserDefinedAttributesEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateUserRequest_UserDefinedAttributesEntry: MessageFns = { + encode( + message: UpdateUserRequest_UserDefinedAttributesEntry, + writer: BinaryWriter = new BinaryWriter(), + ): BinaryWriter { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - Value.encode(message.value, writer.uint32(18).fork()).ldelim(); + Value.encode(message.value, writer.uint32(18).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateUserRequest_UserDefinedAttributesEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateUserRequest_UserDefinedAttributesEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateUserRequest_UserDefinedAttributesEntry(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.key = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.value = Value.decode(reader, reader.uint32()); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file diff --git a/turms-client-js/src/model/proto/request/user/update_user_settings_request.ts b/turms-client-js/src/model/proto/request/user/update_user_settings_request.ts index 683a79d1f2..2984630977 100644 --- a/turms-client-js/src/model/proto/request/user/update_user_settings_request.ts +++ b/turms-client-js/src/model/proto/request/user/update_user_settings_request.ts @@ -1,11 +1,11 @@ // Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: -// protoc-gen-ts_proto v1.181.1 -// protoc v5.27.2 +// protoc-gen-ts_proto v2.6.1 +// protoc v5.29.1 // source: request/user/update_user_settings_request.proto /* eslint-disable */ -import _m0 from "protobufjs/minimal"; +import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { Value } from "../../model/common/value"; export const protobufPackage = "im.turms.proto"; @@ -25,25 +25,25 @@ function createBaseUpdateUserSettingsRequest(): UpdateUserSettingsRequest { return { settings: {}, customAttributes: [] }; } -export const UpdateUserSettingsRequest = { - encode(message: UpdateUserSettingsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateUserSettingsRequest: MessageFns = { + encode(message: UpdateUserSettingsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { Object.entries(message.settings).forEach(([key, value]) => { - UpdateUserSettingsRequest_SettingsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).ldelim(); + UpdateUserSettingsRequest_SettingsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).join(); }); for (const v of message.customAttributes) { - Value.encode(v!, writer.uint32(122).fork()).ldelim(); + Value.encode(v!, writer.uint32(122).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateUserSettingsRequest { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateUserSettingsRequest { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateUserSettingsRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } @@ -53,18 +53,20 @@ export const UpdateUserSettingsRequest = { message.settings[entry1.key] = entry1.value; } continue; - case 15: + } + case 15: { if (tag !== 122) { break; } message.customAttributes.push(Value.decode(reader, reader.uint32())); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, @@ -74,44 +76,51 @@ function createBaseUpdateUserSettingsRequest_SettingsEntry(): UpdateUserSettings return { key: "", value: undefined }; } -export const UpdateUserSettingsRequest_SettingsEntry = { - encode(message: UpdateUserSettingsRequest_SettingsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { +export const UpdateUserSettingsRequest_SettingsEntry: MessageFns = { + encode(message: UpdateUserSettingsRequest_SettingsEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - Value.encode(message.value, writer.uint32(18).fork()).ldelim(); + Value.encode(message.value, writer.uint32(18).fork()).join(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateUserSettingsRequest_SettingsEntry { - const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: BinaryReader | Uint8Array, length?: number): UpdateUserSettingsRequest_SettingsEntry { + const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUpdateUserSettingsRequest_SettingsEntry(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { - case 1: + case 1: { if (tag !== 10) { break; } message.key = reader.string(); continue; - case 2: + } + case 2: { if (tag !== 18) { break; } message.value = Value.decode(reader, reader.uint32()); continue; + } } if ((tag & 7) === 4 || tag === 0) { break; } - reader.skipType(tag & 7); + reader.skip(tag & 7); } return message; }, }; + +export interface MessageFns { + encode(message: T, writer?: BinaryWriter): BinaryWriter; + decode(input: BinaryReader | Uint8Array, length?: number): T; +} \ No newline at end of file