@dcl/protocol 1.0.0-16670787325.commit-554f0f2 → 1.0.0-16751971069.commit-16c6dee

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -783,6 +783,45 @@ export interface KickPlayerFromCommunityVoiceChatResponse_Ok {
783
783
  message: string;
784
784
  }
785
785
 
786
+ /** Reject speak request in community voice chat */
787
+ export interface RejectSpeakRequestInCommunityVoiceChatPayload {
788
+ communityId: string;
789
+ userAddress: string;
790
+ }
791
+
792
+ export interface RejectSpeakRequestInCommunityVoiceChatResponse {
793
+ response?:
794
+ | { $case: "ok"; ok: RejectSpeakRequestInCommunityVoiceChatResponse_Ok }
795
+ | { $case: "invalidRequest"; invalidRequest: InvalidRequest }
796
+ | { $case: "forbiddenError"; forbiddenError: ForbiddenError }
797
+ | { $case: "notFoundError"; notFoundError: NotFoundError }
798
+ | { $case: "internalServerError"; internalServerError: InternalServerError }
799
+ | undefined;
800
+ }
801
+
802
+ export interface RejectSpeakRequestInCommunityVoiceChatResponse_Ok {
803
+ message: string;
804
+ }
805
+
806
+ /** End community voice chat (moderator/owner only) */
807
+ export interface EndCommunityVoiceChatPayload {
808
+ communityId: string;
809
+ }
810
+
811
+ export interface EndCommunityVoiceChatResponse {
812
+ response?:
813
+ | { $case: "ok"; ok: EndCommunityVoiceChatResponse_Ok }
814
+ | { $case: "invalidRequest"; invalidRequest: InvalidRequest }
815
+ | { $case: "forbiddenError"; forbiddenError: ForbiddenError }
816
+ | { $case: "notFoundError"; notFoundError: NotFoundError }
817
+ | { $case: "internalServerError"; internalServerError: InternalServerError }
818
+ | undefined;
819
+ }
820
+
821
+ export interface EndCommunityVoiceChatResponse_Ok {
822
+ message: string;
823
+ }
824
+
786
825
  /** Community voice chat updates/events - 'started' and 'ended' status */
787
826
  export interface CommunityVoiceChatUpdate {
788
827
  communityId: string;
@@ -8941,56 +8980,31 @@ export namespace KickPlayerFromCommunityVoiceChatResponse_Ok {
8941
8980
  }
8942
8981
  }
8943
8982
 
8944
- function createBaseCommunityVoiceChatUpdate(): CommunityVoiceChatUpdate {
8945
- return {
8946
- communityId: "",
8947
- createdAt: 0,
8948
- status: 0,
8949
- endedAt: undefined,
8950
- positions: [],
8951
- isMember: false,
8952
- communityName: "",
8953
- communityImage: undefined,
8954
- worlds: [],
8955
- };
8983
+ function createBaseRejectSpeakRequestInCommunityVoiceChatPayload(): RejectSpeakRequestInCommunityVoiceChatPayload {
8984
+ return { communityId: "", userAddress: "" };
8956
8985
  }
8957
8986
 
8958
- export namespace CommunityVoiceChatUpdate {
8959
- export function encode(message: CommunityVoiceChatUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
8987
+ export namespace RejectSpeakRequestInCommunityVoiceChatPayload {
8988
+ export function encode(
8989
+ message: RejectSpeakRequestInCommunityVoiceChatPayload,
8990
+ writer: _m0.Writer = _m0.Writer.create(),
8991
+ ): _m0.Writer {
8960
8992
  if (message.communityId !== "") {
8961
8993
  writer.uint32(10).string(message.communityId);
8962
8994
  }
8963
- if (message.createdAt !== 0) {
8964
- writer.uint32(16).int64(message.createdAt);
8965
- }
8966
- if (message.status !== 0) {
8967
- writer.uint32(24).int32(message.status);
8968
- }
8969
- if (message.endedAt !== undefined) {
8970
- writer.uint32(32).int64(message.endedAt);
8971
- }
8972
- for (const v of message.positions) {
8973
- writer.uint32(42).string(v!);
8974
- }
8975
- if (message.isMember === true) {
8976
- writer.uint32(48).bool(message.isMember);
8977
- }
8978
- if (message.communityName !== "") {
8979
- writer.uint32(58).string(message.communityName);
8980
- }
8981
- if (message.communityImage !== undefined) {
8982
- writer.uint32(66).string(message.communityImage);
8983
- }
8984
- for (const v of message.worlds) {
8985
- writer.uint32(74).string(v!);
8995
+ if (message.userAddress !== "") {
8996
+ writer.uint32(18).string(message.userAddress);
8986
8997
  }
8987
8998
  return writer;
8988
8999
  }
8989
9000
 
8990
- export function decode(input: _m0.Reader | Uint8Array, length?: number): CommunityVoiceChatUpdate {
9001
+ export function decode(
9002
+ input: _m0.Reader | Uint8Array,
9003
+ length?: number,
9004
+ ): RejectSpeakRequestInCommunityVoiceChatPayload {
8991
9005
  const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
8992
9006
  let end = length === undefined ? reader.len : reader.pos + length;
8993
- const message = createBaseCommunityVoiceChatUpdate();
9007
+ const message = createBaseRejectSpeakRequestInCommunityVoiceChatPayload();
8994
9008
  while (reader.pos < end) {
8995
9009
  const tag = reader.uint32();
8996
9010
  switch (tag >>> 3) {
@@ -9002,60 +9016,137 @@ export namespace CommunityVoiceChatUpdate {
9002
9016
  message.communityId = reader.string();
9003
9017
  continue;
9004
9018
  case 2:
9005
- if (tag !== 16) {
9019
+ if (tag !== 18) {
9006
9020
  break;
9007
9021
  }
9008
9022
 
9009
- message.createdAt = longToNumber(reader.int64() as Long);
9023
+ message.userAddress = reader.string();
9010
9024
  continue;
9011
- case 3:
9012
- if (tag !== 24) {
9013
- break;
9014
- }
9025
+ }
9026
+ if ((tag & 7) === 4 || tag === 0) {
9027
+ break;
9028
+ }
9029
+ reader.skipType(tag & 7);
9030
+ }
9031
+ return message;
9032
+ }
9015
9033
 
9016
- message.status = reader.int32() as any;
9017
- continue;
9018
- case 4:
9019
- if (tag !== 32) {
9020
- break;
9021
- }
9034
+ export function fromJSON(object: any): RejectSpeakRequestInCommunityVoiceChatPayload {
9035
+ return {
9036
+ communityId: isSet(object.communityId) ? String(object.communityId) : "",
9037
+ userAddress: isSet(object.userAddress) ? String(object.userAddress) : "",
9038
+ };
9039
+ }
9022
9040
 
9023
- message.endedAt = longToNumber(reader.int64() as Long);
9024
- continue;
9025
- case 5:
9026
- if (tag !== 42) {
9041
+ export function toJSON(message: RejectSpeakRequestInCommunityVoiceChatPayload): unknown {
9042
+ const obj: any = {};
9043
+ message.communityId !== undefined && (obj.communityId = message.communityId);
9044
+ message.userAddress !== undefined && (obj.userAddress = message.userAddress);
9045
+ return obj;
9046
+ }
9047
+
9048
+ export function create<I extends Exact<DeepPartial<RejectSpeakRequestInCommunityVoiceChatPayload>, I>>(
9049
+ base?: I,
9050
+ ): RejectSpeakRequestInCommunityVoiceChatPayload {
9051
+ return RejectSpeakRequestInCommunityVoiceChatPayload.fromPartial(base ?? {});
9052
+ }
9053
+
9054
+ export function fromPartial<I extends Exact<DeepPartial<RejectSpeakRequestInCommunityVoiceChatPayload>, I>>(
9055
+ object: I,
9056
+ ): RejectSpeakRequestInCommunityVoiceChatPayload {
9057
+ const message = createBaseRejectSpeakRequestInCommunityVoiceChatPayload();
9058
+ message.communityId = object.communityId ?? "";
9059
+ message.userAddress = object.userAddress ?? "";
9060
+ return message;
9061
+ }
9062
+ }
9063
+
9064
+ function createBaseRejectSpeakRequestInCommunityVoiceChatResponse(): RejectSpeakRequestInCommunityVoiceChatResponse {
9065
+ return { response: undefined };
9066
+ }
9067
+
9068
+ export namespace RejectSpeakRequestInCommunityVoiceChatResponse {
9069
+ export function encode(
9070
+ message: RejectSpeakRequestInCommunityVoiceChatResponse,
9071
+ writer: _m0.Writer = _m0.Writer.create(),
9072
+ ): _m0.Writer {
9073
+ switch (message.response?.$case) {
9074
+ case "ok":
9075
+ RejectSpeakRequestInCommunityVoiceChatResponse_Ok.encode(message.response.ok, writer.uint32(10).fork())
9076
+ .ldelim();
9077
+ break;
9078
+ case "invalidRequest":
9079
+ InvalidRequest.encode(message.response.invalidRequest, writer.uint32(18).fork()).ldelim();
9080
+ break;
9081
+ case "forbiddenError":
9082
+ ForbiddenError.encode(message.response.forbiddenError, writer.uint32(26).fork()).ldelim();
9083
+ break;
9084
+ case "notFoundError":
9085
+ NotFoundError.encode(message.response.notFoundError, writer.uint32(34).fork()).ldelim();
9086
+ break;
9087
+ case "internalServerError":
9088
+ InternalServerError.encode(message.response.internalServerError, writer.uint32(42).fork()).ldelim();
9089
+ break;
9090
+ }
9091
+ return writer;
9092
+ }
9093
+
9094
+ export function decode(
9095
+ input: _m0.Reader | Uint8Array,
9096
+ length?: number,
9097
+ ): RejectSpeakRequestInCommunityVoiceChatResponse {
9098
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
9099
+ let end = length === undefined ? reader.len : reader.pos + length;
9100
+ const message = createBaseRejectSpeakRequestInCommunityVoiceChatResponse();
9101
+ while (reader.pos < end) {
9102
+ const tag = reader.uint32();
9103
+ switch (tag >>> 3) {
9104
+ case 1:
9105
+ if (tag !== 10) {
9027
9106
  break;
9028
9107
  }
9029
9108
 
9030
- message.positions.push(reader.string());
9109
+ message.response = {
9110
+ $case: "ok",
9111
+ ok: RejectSpeakRequestInCommunityVoiceChatResponse_Ok.decode(reader, reader.uint32()),
9112
+ };
9031
9113
  continue;
9032
- case 6:
9033
- if (tag !== 48) {
9114
+ case 2:
9115
+ if (tag !== 18) {
9034
9116
  break;
9035
9117
  }
9036
9118
 
9037
- message.isMember = reader.bool();
9119
+ message.response = {
9120
+ $case: "invalidRequest",
9121
+ invalidRequest: InvalidRequest.decode(reader, reader.uint32()),
9122
+ };
9038
9123
  continue;
9039
- case 7:
9040
- if (tag !== 58) {
9124
+ case 3:
9125
+ if (tag !== 26) {
9041
9126
  break;
9042
9127
  }
9043
9128
 
9044
- message.communityName = reader.string();
9129
+ message.response = {
9130
+ $case: "forbiddenError",
9131
+ forbiddenError: ForbiddenError.decode(reader, reader.uint32()),
9132
+ };
9045
9133
  continue;
9046
- case 8:
9047
- if (tag !== 66) {
9134
+ case 4:
9135
+ if (tag !== 34) {
9048
9136
  break;
9049
9137
  }
9050
9138
 
9051
- message.communityImage = reader.string();
9139
+ message.response = { $case: "notFoundError", notFoundError: NotFoundError.decode(reader, reader.uint32()) };
9052
9140
  continue;
9053
- case 9:
9054
- if (tag !== 74) {
9141
+ case 5:
9142
+ if (tag !== 42) {
9055
9143
  break;
9056
9144
  }
9057
9145
 
9058
- message.worlds.push(reader.string());
9146
+ message.response = {
9147
+ $case: "internalServerError",
9148
+ internalServerError: InternalServerError.decode(reader, reader.uint32()),
9149
+ };
9059
9150
  continue;
9060
9151
  }
9061
9152
  if ((tag & 7) === 4 || tag === 0) {
@@ -9066,39 +9157,642 @@ export namespace CommunityVoiceChatUpdate {
9066
9157
  return message;
9067
9158
  }
9068
9159
 
9069
- export function fromJSON(object: any): CommunityVoiceChatUpdate {
9160
+ export function fromJSON(object: any): RejectSpeakRequestInCommunityVoiceChatResponse {
9070
9161
  return {
9071
- communityId: isSet(object.communityId) ? String(object.communityId) : "",
9072
- createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
9073
- status: isSet(object.status) ? communityVoiceChatStatusFromJSON(object.status) : 0,
9074
- endedAt: isSet(object.endedAt) ? Number(object.endedAt) : undefined,
9075
- positions: Array.isArray(object?.positions) ? object.positions.map((e: any) => String(e)) : [],
9076
- isMember: isSet(object.isMember) ? Boolean(object.isMember) : false,
9077
- communityName: isSet(object.communityName) ? String(object.communityName) : "",
9078
- communityImage: isSet(object.communityImage) ? String(object.communityImage) : undefined,
9079
- worlds: Array.isArray(object?.worlds) ? object.worlds.map((e: any) => String(e)) : [],
9162
+ response: isSet(object.ok)
9163
+ ? { $case: "ok", ok: RejectSpeakRequestInCommunityVoiceChatResponse_Ok.fromJSON(object.ok) }
9164
+ : isSet(object.invalidRequest)
9165
+ ? { $case: "invalidRequest", invalidRequest: InvalidRequest.fromJSON(object.invalidRequest) }
9166
+ : isSet(object.forbiddenError)
9167
+ ? { $case: "forbiddenError", forbiddenError: ForbiddenError.fromJSON(object.forbiddenError) }
9168
+ : isSet(object.notFoundError)
9169
+ ? { $case: "notFoundError", notFoundError: NotFoundError.fromJSON(object.notFoundError) }
9170
+ : isSet(object.internalServerError)
9171
+ ? {
9172
+ $case: "internalServerError",
9173
+ internalServerError: InternalServerError.fromJSON(object.internalServerError),
9174
+ }
9175
+ : undefined,
9080
9176
  };
9081
9177
  }
9082
9178
 
9083
- export function toJSON(message: CommunityVoiceChatUpdate): unknown {
9179
+ export function toJSON(message: RejectSpeakRequestInCommunityVoiceChatResponse): unknown {
9084
9180
  const obj: any = {};
9085
- message.communityId !== undefined && (obj.communityId = message.communityId);
9086
- message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
9087
- message.status !== undefined && (obj.status = communityVoiceChatStatusToJSON(message.status));
9088
- message.endedAt !== undefined && (obj.endedAt = Math.round(message.endedAt));
9089
- if (message.positions) {
9090
- obj.positions = message.positions.map((e) => e);
9091
- } else {
9092
- obj.positions = [];
9093
- }
9094
- message.isMember !== undefined && (obj.isMember = message.isMember);
9095
- message.communityName !== undefined && (obj.communityName = message.communityName);
9096
- message.communityImage !== undefined && (obj.communityImage = message.communityImage);
9097
- if (message.worlds) {
9098
- obj.worlds = message.worlds.map((e) => e);
9099
- } else {
9100
- obj.worlds = [];
9101
- }
9181
+ message.response?.$case === "ok" &&
9182
+ (obj.ok = message.response?.ok
9183
+ ? RejectSpeakRequestInCommunityVoiceChatResponse_Ok.toJSON(message.response?.ok)
9184
+ : undefined);
9185
+ message.response?.$case === "invalidRequest" &&
9186
+ (obj.invalidRequest = message.response?.invalidRequest
9187
+ ? InvalidRequest.toJSON(message.response?.invalidRequest)
9188
+ : undefined);
9189
+ message.response?.$case === "forbiddenError" &&
9190
+ (obj.forbiddenError = message.response?.forbiddenError
9191
+ ? ForbiddenError.toJSON(message.response?.forbiddenError)
9192
+ : undefined);
9193
+ message.response?.$case === "notFoundError" &&
9194
+ (obj.notFoundError = message.response?.notFoundError
9195
+ ? NotFoundError.toJSON(message.response?.notFoundError)
9196
+ : undefined);
9197
+ message.response?.$case === "internalServerError" &&
9198
+ (obj.internalServerError = message.response?.internalServerError
9199
+ ? InternalServerError.toJSON(message.response?.internalServerError)
9200
+ : undefined);
9201
+ return obj;
9202
+ }
9203
+
9204
+ export function create<I extends Exact<DeepPartial<RejectSpeakRequestInCommunityVoiceChatResponse>, I>>(
9205
+ base?: I,
9206
+ ): RejectSpeakRequestInCommunityVoiceChatResponse {
9207
+ return RejectSpeakRequestInCommunityVoiceChatResponse.fromPartial(base ?? {});
9208
+ }
9209
+
9210
+ export function fromPartial<I extends Exact<DeepPartial<RejectSpeakRequestInCommunityVoiceChatResponse>, I>>(
9211
+ object: I,
9212
+ ): RejectSpeakRequestInCommunityVoiceChatResponse {
9213
+ const message = createBaseRejectSpeakRequestInCommunityVoiceChatResponse();
9214
+ if (object.response?.$case === "ok" && object.response?.ok !== undefined && object.response?.ok !== null) {
9215
+ message.response = {
9216
+ $case: "ok",
9217
+ ok: RejectSpeakRequestInCommunityVoiceChatResponse_Ok.fromPartial(object.response.ok),
9218
+ };
9219
+ }
9220
+ if (
9221
+ object.response?.$case === "invalidRequest" &&
9222
+ object.response?.invalidRequest !== undefined &&
9223
+ object.response?.invalidRequest !== null
9224
+ ) {
9225
+ message.response = {
9226
+ $case: "invalidRequest",
9227
+ invalidRequest: InvalidRequest.fromPartial(object.response.invalidRequest),
9228
+ };
9229
+ }
9230
+ if (
9231
+ object.response?.$case === "forbiddenError" &&
9232
+ object.response?.forbiddenError !== undefined &&
9233
+ object.response?.forbiddenError !== null
9234
+ ) {
9235
+ message.response = {
9236
+ $case: "forbiddenError",
9237
+ forbiddenError: ForbiddenError.fromPartial(object.response.forbiddenError),
9238
+ };
9239
+ }
9240
+ if (
9241
+ object.response?.$case === "notFoundError" &&
9242
+ object.response?.notFoundError !== undefined &&
9243
+ object.response?.notFoundError !== null
9244
+ ) {
9245
+ message.response = {
9246
+ $case: "notFoundError",
9247
+ notFoundError: NotFoundError.fromPartial(object.response.notFoundError),
9248
+ };
9249
+ }
9250
+ if (
9251
+ object.response?.$case === "internalServerError" &&
9252
+ object.response?.internalServerError !== undefined &&
9253
+ object.response?.internalServerError !== null
9254
+ ) {
9255
+ message.response = {
9256
+ $case: "internalServerError",
9257
+ internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
9258
+ };
9259
+ }
9260
+ return message;
9261
+ }
9262
+ }
9263
+
9264
+ function createBaseRejectSpeakRequestInCommunityVoiceChatResponse_Ok(): RejectSpeakRequestInCommunityVoiceChatResponse_Ok {
9265
+ return { message: "" };
9266
+ }
9267
+
9268
+ export namespace RejectSpeakRequestInCommunityVoiceChatResponse_Ok {
9269
+ export function encode(
9270
+ message: RejectSpeakRequestInCommunityVoiceChatResponse_Ok,
9271
+ writer: _m0.Writer = _m0.Writer.create(),
9272
+ ): _m0.Writer {
9273
+ if (message.message !== "") {
9274
+ writer.uint32(10).string(message.message);
9275
+ }
9276
+ return writer;
9277
+ }
9278
+
9279
+ export function decode(
9280
+ input: _m0.Reader | Uint8Array,
9281
+ length?: number,
9282
+ ): RejectSpeakRequestInCommunityVoiceChatResponse_Ok {
9283
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
9284
+ let end = length === undefined ? reader.len : reader.pos + length;
9285
+ const message = createBaseRejectSpeakRequestInCommunityVoiceChatResponse_Ok();
9286
+ while (reader.pos < end) {
9287
+ const tag = reader.uint32();
9288
+ switch (tag >>> 3) {
9289
+ case 1:
9290
+ if (tag !== 10) {
9291
+ break;
9292
+ }
9293
+
9294
+ message.message = reader.string();
9295
+ continue;
9296
+ }
9297
+ if ((tag & 7) === 4 || tag === 0) {
9298
+ break;
9299
+ }
9300
+ reader.skipType(tag & 7);
9301
+ }
9302
+ return message;
9303
+ }
9304
+
9305
+ export function fromJSON(object: any): RejectSpeakRequestInCommunityVoiceChatResponse_Ok {
9306
+ return { message: isSet(object.message) ? String(object.message) : "" };
9307
+ }
9308
+
9309
+ export function toJSON(message: RejectSpeakRequestInCommunityVoiceChatResponse_Ok): unknown {
9310
+ const obj: any = {};
9311
+ message.message !== undefined && (obj.message = message.message);
9312
+ return obj;
9313
+ }
9314
+
9315
+ export function create<I extends Exact<DeepPartial<RejectSpeakRequestInCommunityVoiceChatResponse_Ok>, I>>(
9316
+ base?: I,
9317
+ ): RejectSpeakRequestInCommunityVoiceChatResponse_Ok {
9318
+ return RejectSpeakRequestInCommunityVoiceChatResponse_Ok.fromPartial(base ?? {});
9319
+ }
9320
+
9321
+ export function fromPartial<I extends Exact<DeepPartial<RejectSpeakRequestInCommunityVoiceChatResponse_Ok>, I>>(
9322
+ object: I,
9323
+ ): RejectSpeakRequestInCommunityVoiceChatResponse_Ok {
9324
+ const message = createBaseRejectSpeakRequestInCommunityVoiceChatResponse_Ok();
9325
+ message.message = object.message ?? "";
9326
+ return message;
9327
+ }
9328
+ }
9329
+
9330
+ function createBaseEndCommunityVoiceChatPayload(): EndCommunityVoiceChatPayload {
9331
+ return { communityId: "" };
9332
+ }
9333
+
9334
+ export namespace EndCommunityVoiceChatPayload {
9335
+ export function encode(message: EndCommunityVoiceChatPayload, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
9336
+ if (message.communityId !== "") {
9337
+ writer.uint32(10).string(message.communityId);
9338
+ }
9339
+ return writer;
9340
+ }
9341
+
9342
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): EndCommunityVoiceChatPayload {
9343
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
9344
+ let end = length === undefined ? reader.len : reader.pos + length;
9345
+ const message = createBaseEndCommunityVoiceChatPayload();
9346
+ while (reader.pos < end) {
9347
+ const tag = reader.uint32();
9348
+ switch (tag >>> 3) {
9349
+ case 1:
9350
+ if (tag !== 10) {
9351
+ break;
9352
+ }
9353
+
9354
+ message.communityId = reader.string();
9355
+ continue;
9356
+ }
9357
+ if ((tag & 7) === 4 || tag === 0) {
9358
+ break;
9359
+ }
9360
+ reader.skipType(tag & 7);
9361
+ }
9362
+ return message;
9363
+ }
9364
+
9365
+ export function fromJSON(object: any): EndCommunityVoiceChatPayload {
9366
+ return { communityId: isSet(object.communityId) ? String(object.communityId) : "" };
9367
+ }
9368
+
9369
+ export function toJSON(message: EndCommunityVoiceChatPayload): unknown {
9370
+ const obj: any = {};
9371
+ message.communityId !== undefined && (obj.communityId = message.communityId);
9372
+ return obj;
9373
+ }
9374
+
9375
+ export function create<I extends Exact<DeepPartial<EndCommunityVoiceChatPayload>, I>>(
9376
+ base?: I,
9377
+ ): EndCommunityVoiceChatPayload {
9378
+ return EndCommunityVoiceChatPayload.fromPartial(base ?? {});
9379
+ }
9380
+
9381
+ export function fromPartial<I extends Exact<DeepPartial<EndCommunityVoiceChatPayload>, I>>(
9382
+ object: I,
9383
+ ): EndCommunityVoiceChatPayload {
9384
+ const message = createBaseEndCommunityVoiceChatPayload();
9385
+ message.communityId = object.communityId ?? "";
9386
+ return message;
9387
+ }
9388
+ }
9389
+
9390
+ function createBaseEndCommunityVoiceChatResponse(): EndCommunityVoiceChatResponse {
9391
+ return { response: undefined };
9392
+ }
9393
+
9394
+ export namespace EndCommunityVoiceChatResponse {
9395
+ export function encode(message: EndCommunityVoiceChatResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
9396
+ switch (message.response?.$case) {
9397
+ case "ok":
9398
+ EndCommunityVoiceChatResponse_Ok.encode(message.response.ok, writer.uint32(10).fork()).ldelim();
9399
+ break;
9400
+ case "invalidRequest":
9401
+ InvalidRequest.encode(message.response.invalidRequest, writer.uint32(18).fork()).ldelim();
9402
+ break;
9403
+ case "forbiddenError":
9404
+ ForbiddenError.encode(message.response.forbiddenError, writer.uint32(26).fork()).ldelim();
9405
+ break;
9406
+ case "notFoundError":
9407
+ NotFoundError.encode(message.response.notFoundError, writer.uint32(34).fork()).ldelim();
9408
+ break;
9409
+ case "internalServerError":
9410
+ InternalServerError.encode(message.response.internalServerError, writer.uint32(42).fork()).ldelim();
9411
+ break;
9412
+ }
9413
+ return writer;
9414
+ }
9415
+
9416
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): EndCommunityVoiceChatResponse {
9417
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
9418
+ let end = length === undefined ? reader.len : reader.pos + length;
9419
+ const message = createBaseEndCommunityVoiceChatResponse();
9420
+ while (reader.pos < end) {
9421
+ const tag = reader.uint32();
9422
+ switch (tag >>> 3) {
9423
+ case 1:
9424
+ if (tag !== 10) {
9425
+ break;
9426
+ }
9427
+
9428
+ message.response = { $case: "ok", ok: EndCommunityVoiceChatResponse_Ok.decode(reader, reader.uint32()) };
9429
+ continue;
9430
+ case 2:
9431
+ if (tag !== 18) {
9432
+ break;
9433
+ }
9434
+
9435
+ message.response = {
9436
+ $case: "invalidRequest",
9437
+ invalidRequest: InvalidRequest.decode(reader, reader.uint32()),
9438
+ };
9439
+ continue;
9440
+ case 3:
9441
+ if (tag !== 26) {
9442
+ break;
9443
+ }
9444
+
9445
+ message.response = {
9446
+ $case: "forbiddenError",
9447
+ forbiddenError: ForbiddenError.decode(reader, reader.uint32()),
9448
+ };
9449
+ continue;
9450
+ case 4:
9451
+ if (tag !== 34) {
9452
+ break;
9453
+ }
9454
+
9455
+ message.response = { $case: "notFoundError", notFoundError: NotFoundError.decode(reader, reader.uint32()) };
9456
+ continue;
9457
+ case 5:
9458
+ if (tag !== 42) {
9459
+ break;
9460
+ }
9461
+
9462
+ message.response = {
9463
+ $case: "internalServerError",
9464
+ internalServerError: InternalServerError.decode(reader, reader.uint32()),
9465
+ };
9466
+ continue;
9467
+ }
9468
+ if ((tag & 7) === 4 || tag === 0) {
9469
+ break;
9470
+ }
9471
+ reader.skipType(tag & 7);
9472
+ }
9473
+ return message;
9474
+ }
9475
+
9476
+ export function fromJSON(object: any): EndCommunityVoiceChatResponse {
9477
+ return {
9478
+ response: isSet(object.ok)
9479
+ ? { $case: "ok", ok: EndCommunityVoiceChatResponse_Ok.fromJSON(object.ok) }
9480
+ : isSet(object.invalidRequest)
9481
+ ? { $case: "invalidRequest", invalidRequest: InvalidRequest.fromJSON(object.invalidRequest) }
9482
+ : isSet(object.forbiddenError)
9483
+ ? { $case: "forbiddenError", forbiddenError: ForbiddenError.fromJSON(object.forbiddenError) }
9484
+ : isSet(object.notFoundError)
9485
+ ? { $case: "notFoundError", notFoundError: NotFoundError.fromJSON(object.notFoundError) }
9486
+ : isSet(object.internalServerError)
9487
+ ? {
9488
+ $case: "internalServerError",
9489
+ internalServerError: InternalServerError.fromJSON(object.internalServerError),
9490
+ }
9491
+ : undefined,
9492
+ };
9493
+ }
9494
+
9495
+ export function toJSON(message: EndCommunityVoiceChatResponse): unknown {
9496
+ const obj: any = {};
9497
+ message.response?.$case === "ok" &&
9498
+ (obj.ok = message.response?.ok ? EndCommunityVoiceChatResponse_Ok.toJSON(message.response?.ok) : undefined);
9499
+ message.response?.$case === "invalidRequest" &&
9500
+ (obj.invalidRequest = message.response?.invalidRequest
9501
+ ? InvalidRequest.toJSON(message.response?.invalidRequest)
9502
+ : undefined);
9503
+ message.response?.$case === "forbiddenError" &&
9504
+ (obj.forbiddenError = message.response?.forbiddenError
9505
+ ? ForbiddenError.toJSON(message.response?.forbiddenError)
9506
+ : undefined);
9507
+ message.response?.$case === "notFoundError" &&
9508
+ (obj.notFoundError = message.response?.notFoundError
9509
+ ? NotFoundError.toJSON(message.response?.notFoundError)
9510
+ : undefined);
9511
+ message.response?.$case === "internalServerError" &&
9512
+ (obj.internalServerError = message.response?.internalServerError
9513
+ ? InternalServerError.toJSON(message.response?.internalServerError)
9514
+ : undefined);
9515
+ return obj;
9516
+ }
9517
+
9518
+ export function create<I extends Exact<DeepPartial<EndCommunityVoiceChatResponse>, I>>(
9519
+ base?: I,
9520
+ ): EndCommunityVoiceChatResponse {
9521
+ return EndCommunityVoiceChatResponse.fromPartial(base ?? {});
9522
+ }
9523
+
9524
+ export function fromPartial<I extends Exact<DeepPartial<EndCommunityVoiceChatResponse>, I>>(
9525
+ object: I,
9526
+ ): EndCommunityVoiceChatResponse {
9527
+ const message = createBaseEndCommunityVoiceChatResponse();
9528
+ if (object.response?.$case === "ok" && object.response?.ok !== undefined && object.response?.ok !== null) {
9529
+ message.response = { $case: "ok", ok: EndCommunityVoiceChatResponse_Ok.fromPartial(object.response.ok) };
9530
+ }
9531
+ if (
9532
+ object.response?.$case === "invalidRequest" &&
9533
+ object.response?.invalidRequest !== undefined &&
9534
+ object.response?.invalidRequest !== null
9535
+ ) {
9536
+ message.response = {
9537
+ $case: "invalidRequest",
9538
+ invalidRequest: InvalidRequest.fromPartial(object.response.invalidRequest),
9539
+ };
9540
+ }
9541
+ if (
9542
+ object.response?.$case === "forbiddenError" &&
9543
+ object.response?.forbiddenError !== undefined &&
9544
+ object.response?.forbiddenError !== null
9545
+ ) {
9546
+ message.response = {
9547
+ $case: "forbiddenError",
9548
+ forbiddenError: ForbiddenError.fromPartial(object.response.forbiddenError),
9549
+ };
9550
+ }
9551
+ if (
9552
+ object.response?.$case === "notFoundError" &&
9553
+ object.response?.notFoundError !== undefined &&
9554
+ object.response?.notFoundError !== null
9555
+ ) {
9556
+ message.response = {
9557
+ $case: "notFoundError",
9558
+ notFoundError: NotFoundError.fromPartial(object.response.notFoundError),
9559
+ };
9560
+ }
9561
+ if (
9562
+ object.response?.$case === "internalServerError" &&
9563
+ object.response?.internalServerError !== undefined &&
9564
+ object.response?.internalServerError !== null
9565
+ ) {
9566
+ message.response = {
9567
+ $case: "internalServerError",
9568
+ internalServerError: InternalServerError.fromPartial(object.response.internalServerError),
9569
+ };
9570
+ }
9571
+ return message;
9572
+ }
9573
+ }
9574
+
9575
+ function createBaseEndCommunityVoiceChatResponse_Ok(): EndCommunityVoiceChatResponse_Ok {
9576
+ return { message: "" };
9577
+ }
9578
+
9579
+ export namespace EndCommunityVoiceChatResponse_Ok {
9580
+ export function encode(
9581
+ message: EndCommunityVoiceChatResponse_Ok,
9582
+ writer: _m0.Writer = _m0.Writer.create(),
9583
+ ): _m0.Writer {
9584
+ if (message.message !== "") {
9585
+ writer.uint32(10).string(message.message);
9586
+ }
9587
+ return writer;
9588
+ }
9589
+
9590
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): EndCommunityVoiceChatResponse_Ok {
9591
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
9592
+ let end = length === undefined ? reader.len : reader.pos + length;
9593
+ const message = createBaseEndCommunityVoiceChatResponse_Ok();
9594
+ while (reader.pos < end) {
9595
+ const tag = reader.uint32();
9596
+ switch (tag >>> 3) {
9597
+ case 1:
9598
+ if (tag !== 10) {
9599
+ break;
9600
+ }
9601
+
9602
+ message.message = reader.string();
9603
+ continue;
9604
+ }
9605
+ if ((tag & 7) === 4 || tag === 0) {
9606
+ break;
9607
+ }
9608
+ reader.skipType(tag & 7);
9609
+ }
9610
+ return message;
9611
+ }
9612
+
9613
+ export function fromJSON(object: any): EndCommunityVoiceChatResponse_Ok {
9614
+ return { message: isSet(object.message) ? String(object.message) : "" };
9615
+ }
9616
+
9617
+ export function toJSON(message: EndCommunityVoiceChatResponse_Ok): unknown {
9618
+ const obj: any = {};
9619
+ message.message !== undefined && (obj.message = message.message);
9620
+ return obj;
9621
+ }
9622
+
9623
+ export function create<I extends Exact<DeepPartial<EndCommunityVoiceChatResponse_Ok>, I>>(
9624
+ base?: I,
9625
+ ): EndCommunityVoiceChatResponse_Ok {
9626
+ return EndCommunityVoiceChatResponse_Ok.fromPartial(base ?? {});
9627
+ }
9628
+
9629
+ export function fromPartial<I extends Exact<DeepPartial<EndCommunityVoiceChatResponse_Ok>, I>>(
9630
+ object: I,
9631
+ ): EndCommunityVoiceChatResponse_Ok {
9632
+ const message = createBaseEndCommunityVoiceChatResponse_Ok();
9633
+ message.message = object.message ?? "";
9634
+ return message;
9635
+ }
9636
+ }
9637
+
9638
+ function createBaseCommunityVoiceChatUpdate(): CommunityVoiceChatUpdate {
9639
+ return {
9640
+ communityId: "",
9641
+ createdAt: 0,
9642
+ status: 0,
9643
+ endedAt: undefined,
9644
+ positions: [],
9645
+ isMember: false,
9646
+ communityName: "",
9647
+ communityImage: undefined,
9648
+ worlds: [],
9649
+ };
9650
+ }
9651
+
9652
+ export namespace CommunityVoiceChatUpdate {
9653
+ export function encode(message: CommunityVoiceChatUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
9654
+ if (message.communityId !== "") {
9655
+ writer.uint32(10).string(message.communityId);
9656
+ }
9657
+ if (message.createdAt !== 0) {
9658
+ writer.uint32(16).int64(message.createdAt);
9659
+ }
9660
+ if (message.status !== 0) {
9661
+ writer.uint32(24).int32(message.status);
9662
+ }
9663
+ if (message.endedAt !== undefined) {
9664
+ writer.uint32(32).int64(message.endedAt);
9665
+ }
9666
+ for (const v of message.positions) {
9667
+ writer.uint32(42).string(v!);
9668
+ }
9669
+ if (message.isMember === true) {
9670
+ writer.uint32(48).bool(message.isMember);
9671
+ }
9672
+ if (message.communityName !== "") {
9673
+ writer.uint32(58).string(message.communityName);
9674
+ }
9675
+ if (message.communityImage !== undefined) {
9676
+ writer.uint32(66).string(message.communityImage);
9677
+ }
9678
+ for (const v of message.worlds) {
9679
+ writer.uint32(74).string(v!);
9680
+ }
9681
+ return writer;
9682
+ }
9683
+
9684
+ export function decode(input: _m0.Reader | Uint8Array, length?: number): CommunityVoiceChatUpdate {
9685
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
9686
+ let end = length === undefined ? reader.len : reader.pos + length;
9687
+ const message = createBaseCommunityVoiceChatUpdate();
9688
+ while (reader.pos < end) {
9689
+ const tag = reader.uint32();
9690
+ switch (tag >>> 3) {
9691
+ case 1:
9692
+ if (tag !== 10) {
9693
+ break;
9694
+ }
9695
+
9696
+ message.communityId = reader.string();
9697
+ continue;
9698
+ case 2:
9699
+ if (tag !== 16) {
9700
+ break;
9701
+ }
9702
+
9703
+ message.createdAt = longToNumber(reader.int64() as Long);
9704
+ continue;
9705
+ case 3:
9706
+ if (tag !== 24) {
9707
+ break;
9708
+ }
9709
+
9710
+ message.status = reader.int32() as any;
9711
+ continue;
9712
+ case 4:
9713
+ if (tag !== 32) {
9714
+ break;
9715
+ }
9716
+
9717
+ message.endedAt = longToNumber(reader.int64() as Long);
9718
+ continue;
9719
+ case 5:
9720
+ if (tag !== 42) {
9721
+ break;
9722
+ }
9723
+
9724
+ message.positions.push(reader.string());
9725
+ continue;
9726
+ case 6:
9727
+ if (tag !== 48) {
9728
+ break;
9729
+ }
9730
+
9731
+ message.isMember = reader.bool();
9732
+ continue;
9733
+ case 7:
9734
+ if (tag !== 58) {
9735
+ break;
9736
+ }
9737
+
9738
+ message.communityName = reader.string();
9739
+ continue;
9740
+ case 8:
9741
+ if (tag !== 66) {
9742
+ break;
9743
+ }
9744
+
9745
+ message.communityImage = reader.string();
9746
+ continue;
9747
+ case 9:
9748
+ if (tag !== 74) {
9749
+ break;
9750
+ }
9751
+
9752
+ message.worlds.push(reader.string());
9753
+ continue;
9754
+ }
9755
+ if ((tag & 7) === 4 || tag === 0) {
9756
+ break;
9757
+ }
9758
+ reader.skipType(tag & 7);
9759
+ }
9760
+ return message;
9761
+ }
9762
+
9763
+ export function fromJSON(object: any): CommunityVoiceChatUpdate {
9764
+ return {
9765
+ communityId: isSet(object.communityId) ? String(object.communityId) : "",
9766
+ createdAt: isSet(object.createdAt) ? Number(object.createdAt) : 0,
9767
+ status: isSet(object.status) ? communityVoiceChatStatusFromJSON(object.status) : 0,
9768
+ endedAt: isSet(object.endedAt) ? Number(object.endedAt) : undefined,
9769
+ positions: Array.isArray(object?.positions) ? object.positions.map((e: any) => String(e)) : [],
9770
+ isMember: isSet(object.isMember) ? Boolean(object.isMember) : false,
9771
+ communityName: isSet(object.communityName) ? String(object.communityName) : "",
9772
+ communityImage: isSet(object.communityImage) ? String(object.communityImage) : undefined,
9773
+ worlds: Array.isArray(object?.worlds) ? object.worlds.map((e: any) => String(e)) : [],
9774
+ };
9775
+ }
9776
+
9777
+ export function toJSON(message: CommunityVoiceChatUpdate): unknown {
9778
+ const obj: any = {};
9779
+ message.communityId !== undefined && (obj.communityId = message.communityId);
9780
+ message.createdAt !== undefined && (obj.createdAt = Math.round(message.createdAt));
9781
+ message.status !== undefined && (obj.status = communityVoiceChatStatusToJSON(message.status));
9782
+ message.endedAt !== undefined && (obj.endedAt = Math.round(message.endedAt));
9783
+ if (message.positions) {
9784
+ obj.positions = message.positions.map((e) => e);
9785
+ } else {
9786
+ obj.positions = [];
9787
+ }
9788
+ message.isMember !== undefined && (obj.isMember = message.isMember);
9789
+ message.communityName !== undefined && (obj.communityName = message.communityName);
9790
+ message.communityImage !== undefined && (obj.communityImage = message.communityImage);
9791
+ if (message.worlds) {
9792
+ obj.worlds = message.worlds.map((e) => e);
9793
+ } else {
9794
+ obj.worlds = [];
9795
+ }
9102
9796
  return obj;
9103
9797
  }
9104
9798
 
@@ -9386,6 +10080,24 @@ export const SocialServiceDefinition = {
9386
10080
  responseStream: false,
9387
10081
  options: {},
9388
10082
  },
10083
+ /** Reject speak request in community voice chat (moderator only) */
10084
+ rejectSpeakRequestInCommunityVoiceChat: {
10085
+ name: "RejectSpeakRequestInCommunityVoiceChat",
10086
+ requestType: RejectSpeakRequestInCommunityVoiceChatPayload,
10087
+ requestStream: false,
10088
+ responseType: RejectSpeakRequestInCommunityVoiceChatResponse,
10089
+ responseStream: false,
10090
+ options: {},
10091
+ },
10092
+ /** End community voice chat (moderator/owner only) */
10093
+ endCommunityVoiceChat: {
10094
+ name: "EndCommunityVoiceChat",
10095
+ requestType: EndCommunityVoiceChatPayload,
10096
+ requestStream: false,
10097
+ responseType: EndCommunityVoiceChatResponse,
10098
+ responseStream: false,
10099
+ options: {},
10100
+ },
9389
10101
  /** Subscribe to community voice chat updates (only 'started' events) */
9390
10102
  subscribeToCommunityVoiceChatUpdates: {
9391
10103
  name: "SubscribeToCommunityVoiceChatUpdates",