mezon-js 2.9.53 → 2.9.55
Sign up to get free protection for your applications and to get access to all the features.
- package/api.gen.ts +7 -10
- package/client.ts +8 -11
- package/dist/api.gen.d.ts +3 -3
- package/dist/client.d.ts +3 -3
- package/dist/mezon-js.cjs.js +2 -4
- package/dist/mezon-js.esm.mjs +2 -4
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -1870,7 +1870,7 @@ export interface ApiRpc {
|
|
1870
1870
|
/** */
|
1871
1871
|
export interface ApiSearchMessageDocument {
|
1872
1872
|
//
|
1873
|
-
|
1873
|
+
attachments?: Array<ApiMessageAttachment>;
|
1874
1874
|
//
|
1875
1875
|
avatar_url?: string;
|
1876
1876
|
//The channel ID.
|
@@ -3822,7 +3822,7 @@ export class MezonApi {
|
|
3822
3822
|
/** Create user activity */
|
3823
3823
|
createActiviy(bearerToken: string,
|
3824
3824
|
body:ApiCreateActivityRequest,
|
3825
|
-
options: any = {}): Promise<
|
3825
|
+
options: any = {}): Promise<ApiUserActivity> {
|
3826
3826
|
|
3827
3827
|
if (body === null || body === undefined) {
|
3828
3828
|
throw new Error("'body' is a required parameter but is null or undefined.");
|
@@ -7409,15 +7409,12 @@ export class MezonApi {
|
|
7409
7409
|
}
|
7410
7410
|
|
7411
7411
|
/** set notification user channel. */
|
7412
|
-
createPinMessage(
|
7413
|
-
|
7414
|
-
|
7415
|
-
|
7416
|
-
): Promise<any> {
|
7412
|
+
createPinMessage(bearerToken: string,
|
7413
|
+
body:ApiPinMessageRequest,
|
7414
|
+
options: any = {}): Promise<ApiChannelMessageHeader> {
|
7415
|
+
|
7417
7416
|
if (body === null || body === undefined) {
|
7418
|
-
throw new Error(
|
7419
|
-
"'body' is a required parameter but is null or undefined."
|
7420
|
-
);
|
7417
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
7421
7418
|
}
|
7422
7419
|
const urlPath = "/v2/pinmessage/set";
|
7423
7420
|
const queryParams = new Map<string, any>();
|
package/client.ts
CHANGED
@@ -131,6 +131,7 @@ import {
|
|
131
131
|
ApiLoginIDResponse,
|
132
132
|
ApiLoginRequest,
|
133
133
|
ApiConfirmLoginRequest,
|
134
|
+
ApiUserActivity,
|
134
135
|
} from "./api.gen";
|
135
136
|
|
136
137
|
import { Session } from "./session";
|
@@ -2998,7 +2999,7 @@ export class Client {
|
|
2998
2999
|
async createPinMessage(
|
2999
3000
|
session: Session,
|
3000
3001
|
request: ApiPinMessageRequest
|
3001
|
-
): Promise<
|
3002
|
+
): Promise<ApiChannelMessageHeader> {
|
3002
3003
|
if (
|
3003
3004
|
this.autoRefreshSession &&
|
3004
3005
|
session.refresh_token &&
|
@@ -3009,8 +3010,8 @@ export class Client {
|
|
3009
3010
|
|
3010
3011
|
return this.apiClient
|
3011
3012
|
.createPinMessage(session.token, request)
|
3012
|
-
.then((response:
|
3013
|
-
return response
|
3013
|
+
.then((response: ApiChannelMessageHeader) => {
|
3014
|
+
return Promise.resolve(response);
|
3014
3015
|
});
|
3015
3016
|
}
|
3016
3017
|
|
@@ -4119,11 +4120,10 @@ export class Client {
|
|
4119
4120
|
});
|
4120
4121
|
}
|
4121
4122
|
|
4122
|
-
|
4123
4123
|
async addFavoriteChannel(
|
4124
4124
|
session: Session,
|
4125
4125
|
channelId: string,
|
4126
|
-
clanId: string
|
4126
|
+
clanId: string
|
4127
4127
|
): Promise<ApiAddFavoriteChannelResponse> {
|
4128
4128
|
if (
|
4129
4129
|
this.autoRefreshSession &&
|
@@ -4136,7 +4136,7 @@ export class Client {
|
|
4136
4136
|
return this.apiClient
|
4137
4137
|
.addChannelFavorite(session.token, {
|
4138
4138
|
channel_id: channelId,
|
4139
|
-
clan_id: clanId
|
4139
|
+
clan_id: clanId,
|
4140
4140
|
})
|
4141
4141
|
.then((response: ApiAddFavoriteChannelResponse) => {
|
4142
4142
|
return response;
|
@@ -4162,10 +4162,7 @@ export class Client {
|
|
4162
4162
|
});
|
4163
4163
|
}
|
4164
4164
|
|
4165
|
-
async getListFavoriteChannel(
|
4166
|
-
session: Session,
|
4167
|
-
clanId: string
|
4168
|
-
): Promise<any> {
|
4165
|
+
async getListFavoriteChannel(session: Session, clanId: string): Promise<any> {
|
4169
4166
|
if (
|
4170
4167
|
this.autoRefreshSession &&
|
4171
4168
|
session.refresh_token &&
|
@@ -4202,7 +4199,7 @@ export class Client {
|
|
4202
4199
|
async createActiviy(
|
4203
4200
|
session: Session,
|
4204
4201
|
request: ApiCreateActivityRequest
|
4205
|
-
): Promise<
|
4202
|
+
): Promise<ApiUserActivity> {
|
4206
4203
|
if (
|
4207
4204
|
this.autoRefreshSession &&
|
4208
4205
|
session.refresh_token &&
|
package/dist/api.gen.d.ts
CHANGED
@@ -1087,7 +1087,7 @@ export interface ApiRpc {
|
|
1087
1087
|
}
|
1088
1088
|
/** */
|
1089
1089
|
export interface ApiSearchMessageDocument {
|
1090
|
-
|
1090
|
+
attachments?: Array<ApiMessageAttachment>;
|
1091
1091
|
avatar_url?: string;
|
1092
1092
|
channel_id?: string;
|
1093
1093
|
channel_label?: string;
|
@@ -1432,7 +1432,7 @@ export declare class MezonApi {
|
|
1432
1432
|
/** List activity */
|
1433
1433
|
listActivity(bearerToken: string, options?: any): Promise<ApiListUserActivity>;
|
1434
1434
|
/** Create user activity */
|
1435
|
-
createActiviy(bearerToken: string, body: ApiCreateActivityRequest, options?: any): Promise<
|
1435
|
+
createActiviy(bearerToken: string, body: ApiCreateActivityRequest, options?: any): Promise<ApiUserActivity>;
|
1436
1436
|
/** Add a new apps. */
|
1437
1437
|
addApp(bearerToken: string, body: ApiAddAppRequest, options?: any): Promise<any>;
|
1438
1438
|
/** List (and optionally filter) accounts. */
|
@@ -1614,7 +1614,7 @@ export declare class MezonApi {
|
|
1614
1614
|
/** */
|
1615
1615
|
getPinMessagesList(bearerToken: string, messageId?: string, channelId?: string, clanId?: string, options?: any): Promise<ApiPinMessagesList>;
|
1616
1616
|
/** set notification user channel. */
|
1617
|
-
createPinMessage(bearerToken: string, body: ApiPinMessageRequest, options?: any): Promise<
|
1617
|
+
createPinMessage(bearerToken: string, body: ApiPinMessageRequest, options?: any): Promise<ApiChannelMessageHeader>;
|
1618
1618
|
/** */
|
1619
1619
|
addRolesChannelDesc(bearerToken: string, body: ApiAddRoleChannelDescRequest, options?: any): Promise<any>;
|
1620
1620
|
/** update the category of a channel */
|
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, ApiSession, 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 } 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, ApiSession, 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 } from "./api.gen";
|
17
17
|
import { Session } from "./session";
|
18
18
|
import { Socket } from "./socket";
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
@@ -529,7 +529,7 @@ export declare class Client {
|
|
529
529
|
/** query message in elasticsearch */
|
530
530
|
searchMessage(session: Session, request: ApiSearchMessageRequest): Promise<ApiSearchMessageResponse>;
|
531
531
|
/** */
|
532
|
-
createPinMessage(session: Session, request: ApiPinMessageRequest): Promise<
|
532
|
+
createPinMessage(session: Session, request: ApiPinMessageRequest): Promise<ApiChannelMessageHeader>;
|
533
533
|
pinMessagesList(session: Session, messageId: string, channelId: string, clanId: string): Promise<ApiPinMessagesList>;
|
534
534
|
deletePinMessage(session: Session, message_id: string): Promise<boolean>;
|
535
535
|
/** create clan emoji */
|
@@ -593,7 +593,7 @@ export declare class Client {
|
|
593
593
|
getListFavoriteChannel(session: Session, clanId: string): Promise<any>;
|
594
594
|
/** List activity */
|
595
595
|
listActivity(session: Session): Promise<ApiListUserActivity>;
|
596
|
-
createActiviy(session: Session, request: ApiCreateActivityRequest): Promise<
|
596
|
+
createActiviy(session: Session, request: ApiCreateActivityRequest): Promise<ApiUserActivity>;
|
597
597
|
createQRLogin(requet: ApiLoginRequest): Promise<ApiLoginIDResponse>;
|
598
598
|
checkLoginRequest(requet: ApiConfirmLoginRequest): Promise<ApiSession>;
|
599
599
|
confirmLogin(session: Session, body: ApiConfirmLoginRequest): Promise<any>;
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -4662,9 +4662,7 @@ var MezonApi = class {
|
|
4662
4662
|
/** set notification user channel. */
|
4663
4663
|
createPinMessage(bearerToken, body, options = {}) {
|
4664
4664
|
if (body === null || body === void 0) {
|
4665
|
-
throw new Error(
|
4666
|
-
"'body' is a required parameter but is null or undefined."
|
4667
|
-
);
|
4665
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
4668
4666
|
}
|
4669
4667
|
const urlPath = "/v2/pinmessage/set";
|
4670
4668
|
const queryParams = /* @__PURE__ */ new Map();
|
@@ -8396,7 +8394,7 @@ var Client = class {
|
|
8396
8394
|
yield this.sessionRefresh(session);
|
8397
8395
|
}
|
8398
8396
|
return this.apiClient.createPinMessage(session.token, request).then((response) => {
|
8399
|
-
return response
|
8397
|
+
return Promise.resolve(response);
|
8400
8398
|
});
|
8401
8399
|
});
|
8402
8400
|
}
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -4633,9 +4633,7 @@ var MezonApi = class {
|
|
4633
4633
|
/** set notification user channel. */
|
4634
4634
|
createPinMessage(bearerToken, body, options = {}) {
|
4635
4635
|
if (body === null || body === void 0) {
|
4636
|
-
throw new Error(
|
4637
|
-
"'body' is a required parameter but is null or undefined."
|
4638
|
-
);
|
4636
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
4639
4637
|
}
|
4640
4638
|
const urlPath = "/v2/pinmessage/set";
|
4641
4639
|
const queryParams = /* @__PURE__ */ new Map();
|
@@ -8367,7 +8365,7 @@ var Client = class {
|
|
8367
8365
|
yield this.sessionRefresh(session);
|
8368
8366
|
}
|
8369
8367
|
return this.apiClient.createPinMessage(session.token, request).then((response) => {
|
8370
|
-
return response
|
8368
|
+
return Promise.resolve(response);
|
8371
8369
|
});
|
8372
8370
|
});
|
8373
8371
|
}
|