mezon-js-protobuf 1.4.59 → 1.4.61

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.
package/README.md CHANGED
@@ -3,7 +3,7 @@ Mezon JavaScript Protobuf adapter
3
3
 
4
4
  > Websocket adapter adding protocol buffer support to the [mezon-js](https://www.npmjs.com/package/mezon-js) client.
5
5
 
6
- [Mezon](https://github.com/heroiclabs/mezon) is an open-source server designed to power modern games and apps. Features include user accounts, chat, social, matchmaker, realtime multiplayer, and much [more](https://mezon.vn).
6
+ [Mezon](https://github.com/mezon/mezon) is an open-source server designed to power modern games and apps. Features include user accounts, chat, social, matchmaker, realtime multiplayer, and much [more](https://mezon.vn).
7
7
 
8
8
 
9
9
  ## Getting Started
package/api/api.ts CHANGED
@@ -2552,7 +2552,6 @@ export interface Webhook {
2552
2552
  export interface WebhookCreateRequest {
2553
2553
  webhook_name: string;
2554
2554
  channel_id: string;
2555
- url: string;
2556
2555
  }
2557
2556
 
2558
2557
  export interface WebhookListRequestById {
@@ -2576,6 +2575,10 @@ export interface WebhookListResponse {
2576
2575
  webhooks: Webhook[];
2577
2576
  }
2578
2577
 
2578
+ export interface WebhookGenerateResponse {
2579
+ url: string;
2580
+ }
2581
+
2579
2582
  function createBaseAccount(): Account {
2580
2583
  return {
2581
2584
  user: undefined,
@@ -18683,7 +18686,7 @@ export const Webhook = {
18683
18686
  };
18684
18687
 
18685
18688
  function createBaseWebhookCreateRequest(): WebhookCreateRequest {
18686
- return { webhook_name: "", channel_id: "", url: "" };
18689
+ return { webhook_name: "", channel_id: "" };
18687
18690
  }
18688
18691
 
18689
18692
  export const WebhookCreateRequest = {
@@ -18694,9 +18697,6 @@ export const WebhookCreateRequest = {
18694
18697
  if (message.channel_id !== "") {
18695
18698
  writer.uint32(18).string(message.channel_id);
18696
18699
  }
18697
- if (message.url !== "") {
18698
- writer.uint32(26).string(message.url);
18699
- }
18700
18700
  return writer;
18701
18701
  },
18702
18702
 
@@ -18713,9 +18713,6 @@ export const WebhookCreateRequest = {
18713
18713
  case 2:
18714
18714
  message.channel_id = reader.string();
18715
18715
  break;
18716
- case 3:
18717
- message.url = reader.string();
18718
- break;
18719
18716
  default:
18720
18717
  reader.skipType(tag & 7);
18721
18718
  break;
@@ -18728,7 +18725,6 @@ export const WebhookCreateRequest = {
18728
18725
  return {
18729
18726
  webhook_name: isSet(object.webhook_name) ? String(object.webhook_name) : "",
18730
18727
  channel_id: isSet(object.channel_id) ? String(object.channel_id) : "",
18731
- url: isSet(object.url) ? String(object.url) : "",
18732
18728
  };
18733
18729
  },
18734
18730
 
@@ -18736,7 +18732,6 @@ export const WebhookCreateRequest = {
18736
18732
  const obj: any = {};
18737
18733
  message.webhook_name !== undefined && (obj.webhook_name = message.webhook_name);
18738
18734
  message.channel_id !== undefined && (obj.channel_id = message.channel_id);
18739
- message.url !== undefined && (obj.url = message.url);
18740
18735
  return obj;
18741
18736
  },
18742
18737
 
@@ -18748,7 +18743,6 @@ export const WebhookCreateRequest = {
18748
18743
  const message = createBaseWebhookCreateRequest();
18749
18744
  message.webhook_name = object.webhook_name ?? "";
18750
18745
  message.channel_id = object.channel_id ?? "";
18751
- message.url = object.url ?? "";
18752
18746
  return message;
18753
18747
  },
18754
18748
  };
@@ -19023,6 +19017,57 @@ export const WebhookListResponse = {
19023
19017
  },
19024
19018
  };
19025
19019
 
19020
+ function createBaseWebhookGenerateResponse(): WebhookGenerateResponse {
19021
+ return { url: "" };
19022
+ }
19023
+
19024
+ export const WebhookGenerateResponse = {
19025
+ encode(message: WebhookGenerateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
19026
+ if (message.url !== "") {
19027
+ writer.uint32(10).string(message.url);
19028
+ }
19029
+ return writer;
19030
+ },
19031
+
19032
+ decode(input: _m0.Reader | Uint8Array, length?: number): WebhookGenerateResponse {
19033
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
19034
+ let end = length === undefined ? reader.len : reader.pos + length;
19035
+ const message = createBaseWebhookGenerateResponse();
19036
+ while (reader.pos < end) {
19037
+ const tag = reader.uint32();
19038
+ switch (tag >>> 3) {
19039
+ case 1:
19040
+ message.url = reader.string();
19041
+ break;
19042
+ default:
19043
+ reader.skipType(tag & 7);
19044
+ break;
19045
+ }
19046
+ }
19047
+ return message;
19048
+ },
19049
+
19050
+ fromJSON(object: any): WebhookGenerateResponse {
19051
+ return { url: isSet(object.url) ? String(object.url) : "" };
19052
+ },
19053
+
19054
+ toJSON(message: WebhookGenerateResponse): unknown {
19055
+ const obj: any = {};
19056
+ message.url !== undefined && (obj.url = message.url);
19057
+ return obj;
19058
+ },
19059
+
19060
+ create<I extends Exact<DeepPartial<WebhookGenerateResponse>, I>>(base?: I): WebhookGenerateResponse {
19061
+ return WebhookGenerateResponse.fromPartial(base ?? {});
19062
+ },
19063
+
19064
+ fromPartial<I extends Exact<DeepPartial<WebhookGenerateResponse>, I>>(object: I): WebhookGenerateResponse {
19065
+ const message = createBaseWebhookGenerateResponse();
19066
+ message.url = object.url ?? "";
19067
+ return message;
19068
+ },
19069
+ };
19070
+
19026
19071
  declare var self: any | undefined;
19027
19072
  declare var window: any | undefined;
19028
19073
  declare var global: any | undefined;
@@ -1978,7 +1978,6 @@ export interface Webhook {
1978
1978
  export interface WebhookCreateRequest {
1979
1979
  webhook_name: string;
1980
1980
  channel_id: string;
1981
- url: string;
1982
1981
  }
1983
1982
  export interface WebhookListRequestById {
1984
1983
  id: string;
@@ -1996,6 +1995,9 @@ export interface WebhookListRequest {
1996
1995
  export interface WebhookListResponse {
1997
1996
  webhooks: Webhook[];
1998
1997
  }
1998
+ export interface WebhookGenerateResponse {
1999
+ url: string;
2000
+ }
1999
2001
  export declare const Account: {
2000
2002
  encode(message: Account, writer?: _m0.Writer): _m0.Writer;
2001
2003
  decode(input: _m0.Reader | Uint8Array, length?: number): Account;
@@ -13388,20 +13390,16 @@ export declare const WebhookCreateRequest: {
13388
13390
  create<I extends {
13389
13391
  webhook_name?: string | undefined;
13390
13392
  channel_id?: string | undefined;
13391
- url?: string | undefined;
13392
13393
  } & {
13393
13394
  webhook_name?: string | undefined;
13394
13395
  channel_id?: string | undefined;
13395
- url?: string | undefined;
13396
13396
  } & { [K in Exclude<keyof I, keyof WebhookCreateRequest>]: never; }>(base?: I | undefined): WebhookCreateRequest;
13397
13397
  fromPartial<I_1 extends {
13398
13398
  webhook_name?: string | undefined;
13399
13399
  channel_id?: string | undefined;
13400
- url?: string | undefined;
13401
13400
  } & {
13402
13401
  webhook_name?: string | undefined;
13403
13402
  channel_id?: string | undefined;
13404
- url?: string | undefined;
13405
13403
  } & { [K_1 in Exclude<keyof I_1, keyof WebhookCreateRequest>]: never; }>(object: I_1): WebhookCreateRequest;
13406
13404
  };
13407
13405
  export declare const WebhookListRequestById: {
@@ -13578,6 +13576,22 @@ export declare const WebhookListResponse: {
13578
13576
  }[]>]: never; }) | undefined;
13579
13577
  } & { [K_5 in Exclude<keyof I_1, "webhooks">]: never; }>(object: I_1): WebhookListResponse;
13580
13578
  };
13579
+ export declare const WebhookGenerateResponse: {
13580
+ encode(message: WebhookGenerateResponse, writer?: _m0.Writer): _m0.Writer;
13581
+ decode(input: _m0.Reader | Uint8Array, length?: number): WebhookGenerateResponse;
13582
+ fromJSON(object: any): WebhookGenerateResponse;
13583
+ toJSON(message: WebhookGenerateResponse): unknown;
13584
+ create<I extends {
13585
+ url?: string | undefined;
13586
+ } & {
13587
+ url?: string | undefined;
13588
+ } & { [K in Exclude<keyof I, "url">]: never; }>(base?: I | undefined): WebhookGenerateResponse;
13589
+ fromPartial<I_1 extends {
13590
+ url?: string | undefined;
13591
+ } & {
13592
+ url?: string | undefined;
13593
+ } & { [K_1 in Exclude<keyof I_1, "url">]: never; }>(object: I_1): WebhookGenerateResponse;
13594
+ };
13581
13595
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
13582
13596
  export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
13583
13597
  [K in keyof T]?: DeepPartial<T[K]>;