mezon-js 2.9.95 → 2.9.97

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/client.ts CHANGED
@@ -154,7 +154,6 @@ import {
154
154
  ApiListOnboardingStepResponse,
155
155
  MezonUpdateOnboardingStepByClanIdBody,
156
156
  ApiPTTChannelUserList,
157
- ApiCustomDisplay,
158
157
  ApiWalletLedgerList,
159
158
  } from "./api.gen";
160
159
 
@@ -2288,7 +2287,9 @@ export class Client {
2288
2287
  .then((response: ApiRpc) => {
2289
2288
  return Promise.resolve({
2290
2289
  id: response.id,
2291
- payload: !response.payload ? undefined : safeJSONParse(response.payload),
2290
+ payload: !response.payload
2291
+ ? undefined
2292
+ : safeJSONParse(response.payload),
2292
2293
  });
2293
2294
  });
2294
2295
  }
@@ -2304,7 +2305,9 @@ export class Client {
2304
2305
  .then((response: ApiRpc) => {
2305
2306
  return Promise.resolve({
2306
2307
  id: response.id,
2307
- payload: !response.payload ? undefined : safeJSONParse(response.payload),
2308
+ payload: !response.payload
2309
+ ? undefined
2310
+ : safeJSONParse(response.payload),
2308
2311
  });
2309
2312
  })
2310
2313
  .catch((err: any) => {
@@ -4758,40 +4761,6 @@ export class Client {
4758
4761
  });
4759
4762
  }
4760
4763
 
4761
- //**get custom display */
4762
- async getCustomDisplay(session: Session): Promise<ApiCustomDisplay> {
4763
- if (
4764
- this.autoRefreshSession &&
4765
- session.refresh_token &&
4766
- session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
4767
- ) {
4768
- await this.sessionRefresh(session);
4769
- }
4770
-
4771
- return this.apiClient
4772
- .getCustomDisplay(session.token)
4773
- .then((response: ApiCustomDisplay) => {
4774
- return Promise.resolve(response);
4775
- });
4776
- }
4777
-
4778
- //**update custom display */
4779
- async updateCustomDisplay(session: Session, request: ApiCustomDisplay) {
4780
- if (
4781
- this.autoRefreshSession &&
4782
- session.refresh_token &&
4783
- session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
4784
- ) {
4785
- await this.sessionRefresh(session);
4786
- }
4787
-
4788
- return this.apiClient
4789
- .updateCustomDisplay(session.token, request)
4790
- .then((response: any) => {
4791
- return response !== undefined;
4792
- });
4793
- }
4794
-
4795
4764
  //**list wallet ledger */
4796
4765
  async listWalletLedger(
4797
4766
  session: Session,
package/dist/api.gen.d.ts CHANGED
@@ -183,6 +183,8 @@ export interface ApiAccount {
183
183
  devices?: Array<ApiAccountDevice>;
184
184
  disable_time?: string;
185
185
  email?: string;
186
+ logo?: string;
187
+ splash_screen?: string;
186
188
  user?: ApiUser;
187
189
  verify_time?: string;
188
190
  wallet?: string;
@@ -663,11 +665,6 @@ export interface ApiCreateRoleRequest {
663
665
  role_icon?: string;
664
666
  title?: string;
665
667
  }
666
- /** */
667
- export interface ApiCustomDisplay {
668
- logo?: string;
669
- splash_screen?: string;
670
- }
671
668
  /** Delete a channel the user has access to. */
672
669
  export interface ApiDeleteChannelDescRequest {
673
670
  channel_id?: string;
@@ -1293,6 +1290,8 @@ export interface ApiUpdateAccountRequest {
1293
1290
  display_name?: string;
1294
1291
  lang_tag?: string;
1295
1292
  location?: string;
1293
+ logo?: string;
1294
+ splash_screen?: string;
1296
1295
  timezone?: string;
1297
1296
  username?: string;
1298
1297
  }
@@ -1738,10 +1737,6 @@ export declare class MezonApi {
1738
1737
  /** */
1739
1738
  createCategoryDesc(bearerToken: string, body: ApiCreateCategoryDescRequest, options?: any): Promise<ApiCategoryDesc>;
1740
1739
  /** */
1741
- getCustomDisplay(bearerToken: string, options?: any): Promise<ApiCustomDisplay>;
1742
- /** */
1743
- updateCustomDisplay(bearerToken: string, body: ApiCustomDisplay, options?: any): Promise<any>;
1744
- /** */
1745
1740
  deleteCategoryDesc(bearerToken: string, categoryId: string, clanId: string, options?: any): Promise<any>;
1746
1741
  /** */
1747
1742
  deleteCategoryOrder(bearerToken: string, clanId: string, options?: any): Promise<any>;
package/dist/client.d.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiUpdateEventRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiListStreamingChannelsResponse, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiNotificationChannelCategorySettingList, ApiNotificationUserChannel, ApiNotificationSetting, ApiNotifiReactMessage, ApiHashtagDmList, ApiEmojiListedResponse, ApiStickerListedResponse, ApiAllUsersAddChannelResponse, ApiRoleListEventResponse, ApiAllUserClans, ApiUserPermissionInChannelListResponse, ApiPermissionRoleChannelListEventResponse, ApiMarkAsReadRequest, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse, ApiRegistFcmDeviceTokenResponse, ApiListUserActivity, ApiCreateActivityRequest, ApiLoginIDResponse, ApiLoginRequest, ApiConfirmLoginRequest, ApiUserActivity, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiWithdrawTokenRequest, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody, ApiPTTChannelUserList, ApiCustomDisplay, ApiWalletLedgerList } from "./api.gen";
16
+ import { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiUpdateEventRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiListStreamingChannelsResponse, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiNotificationChannelCategorySettingList, ApiNotificationUserChannel, ApiNotificationSetting, ApiNotifiReactMessage, ApiHashtagDmList, ApiEmojiListedResponse, ApiStickerListedResponse, ApiAllUsersAddChannelResponse, ApiRoleListEventResponse, ApiAllUserClans, ApiUserPermissionInChannelListResponse, ApiPermissionRoleChannelListEventResponse, ApiMarkAsReadRequest, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse, ApiRegistFcmDeviceTokenResponse, ApiListUserActivity, ApiCreateActivityRequest, ApiLoginIDResponse, ApiLoginRequest, ApiConfirmLoginRequest, ApiUserActivity, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiWithdrawTokenRequest, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody, ApiPTTChannelUserList, ApiWalletLedgerList } from "./api.gen";
17
17
  import { Session } from "./session";
18
18
  import { Socket } from "./socket";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
@@ -629,7 +629,5 @@ export declare class Client {
629
629
  getUserStatus(session: Session): Promise<ApiUserStatus>;
630
630
  /** List a ptt channel's users. */
631
631
  listPTTChannelUsers(session: Session, clanId: string, channelId: string, channelType: number, state?: number, limit?: number, cursor?: string): Promise<ApiPTTChannelUserList>;
632
- getCustomDisplay(session: Session): Promise<ApiCustomDisplay>;
633
- updateCustomDisplay(session: Session, request: ApiCustomDisplay): Promise<boolean>;
634
632
  listWalletLedger(session: Session, limit?: number, cursor?: string, transactionId?: string): Promise<ApiWalletLedgerList>;
635
633
  }
package/dist/index.d.ts CHANGED
@@ -18,6 +18,7 @@ export * from "./client";
18
18
  export * from "./session";
19
19
  export * from "./socket";
20
20
  export * from "./web_socket_adapter";
21
+ export * from "./utils";
21
22
  /**
22
23
  * Reexported due to duplicate definition of ChannelMessage in [Client]{@link ./client.ts} and [Session]{@link ./session.ts}
23
24
  */