mezon-js 2.10.65 → 2.10.66
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/api.gen.ts +16 -3
- package/client.ts +26 -9
- package/dist/api.gen.d.ts +7 -1
- package/dist/client.d.ts +2 -2
- package/dist/mezon-js.cjs.js +23 -7
- package/dist/mezon-js.esm.mjs +23 -7
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -225,7 +225,7 @@ export interface MezonUpdateEventBody {
|
|
225
225
|
//
|
226
226
|
channel_id_old?: string;
|
227
227
|
//
|
228
|
-
repeat_type?: number;
|
228
|
+
repeat_type?: number;
|
229
229
|
}
|
230
230
|
|
231
231
|
/** Update fields in a given role. */
|
@@ -1148,7 +1148,7 @@ export interface ApiCreateEventRequest {
|
|
1148
1148
|
//
|
1149
1149
|
event_status?: number;
|
1150
1150
|
//
|
1151
|
-
repeat_type?: number;
|
1151
|
+
repeat_type?: number;
|
1152
1152
|
//
|
1153
1153
|
creator_id?: number;
|
1154
1154
|
}
|
@@ -1514,6 +1514,17 @@ export interface ApiMessageDeleted {
|
|
1514
1514
|
//
|
1515
1515
|
message_id?: string;
|
1516
1516
|
}
|
1517
|
+
|
1518
|
+
/** */
|
1519
|
+
export interface ApiListThreadDecs {
|
1520
|
+
//
|
1521
|
+
limit?: number;
|
1522
|
+
//
|
1523
|
+
list_thread?: Array<ApiChannelDescription>;
|
1524
|
+
//
|
1525
|
+
page?: number;
|
1526
|
+
}
|
1527
|
+
|
1517
1528
|
/** */
|
1518
1529
|
export interface ApiListUserActivity {
|
1519
1530
|
//
|
@@ -9465,8 +9476,9 @@ export class MezonApi {
|
|
9465
9476
|
state?: number,
|
9466
9477
|
clanId?: string,
|
9467
9478
|
threadId?: string,
|
9479
|
+
page?: number,
|
9468
9480
|
options: any = {}
|
9469
|
-
): Promise<
|
9481
|
+
): Promise<ApiListThreadDecs> {
|
9470
9482
|
if (channelId === null || channelId === undefined) {
|
9471
9483
|
throw new Error(
|
9472
9484
|
"'channelId' is a required parameter but is null or undefined."
|
@@ -9481,6 +9493,7 @@ export class MezonApi {
|
|
9481
9493
|
queryParams.set("state", state);
|
9482
9494
|
queryParams.set("clan_id", clanId);
|
9483
9495
|
queryParams.set("thread_id", threadId);
|
9496
|
+
queryParams.set("page", page);
|
9484
9497
|
|
9485
9498
|
let bodyJson: string = "";
|
9486
9499
|
|
package/client.ts
CHANGED
@@ -158,6 +158,7 @@ import {
|
|
158
158
|
ApiSdTopic,
|
159
159
|
ApiSFUChannelUserList,
|
160
160
|
MezonUpdateEventBody,
|
161
|
+
ApiListThreadDecs,
|
161
162
|
} from "./api.gen";
|
162
163
|
|
163
164
|
import { Session } from "./session";
|
@@ -1223,7 +1224,14 @@ export class Client {
|
|
1223
1224
|
}
|
1224
1225
|
|
1225
1226
|
return this.apiClient
|
1226
|
-
.deleteEvent(
|
1227
|
+
.deleteEvent(
|
1228
|
+
session.token,
|
1229
|
+
eventId,
|
1230
|
+
clanId,
|
1231
|
+
creatorId,
|
1232
|
+
eventLabel,
|
1233
|
+
channelId
|
1234
|
+
)
|
1227
1235
|
.then((response: any) => {
|
1228
1236
|
return response !== undefined;
|
1229
1237
|
});
|
@@ -4063,8 +4071,9 @@ export class Client {
|
|
4063
4071
|
limit?: number,
|
4064
4072
|
state?: number,
|
4065
4073
|
clanId?: string,
|
4066
|
-
threadId?: string
|
4067
|
-
|
4074
|
+
threadId?: string,
|
4075
|
+
page?: number
|
4076
|
+
): Promise<ApiListThreadDecs> {
|
4068
4077
|
if (
|
4069
4078
|
this.autoRefreshSession &&
|
4070
4079
|
session.refresh_token &&
|
@@ -4074,17 +4083,25 @@ export class Client {
|
|
4074
4083
|
}
|
4075
4084
|
|
4076
4085
|
return this.apiClient
|
4077
|
-
.listThreadDescs(
|
4078
|
-
|
4079
|
-
|
4080
|
-
|
4086
|
+
.listThreadDescs(
|
4087
|
+
session.token,
|
4088
|
+
channelId,
|
4089
|
+
limit,
|
4090
|
+
state,
|
4091
|
+
clanId,
|
4092
|
+
threadId,
|
4093
|
+
page
|
4094
|
+
)
|
4095
|
+
.then((response: ApiListThreadDecs) => {
|
4096
|
+
var result: ApiListThreadDecs = {
|
4097
|
+
list_thread: [],
|
4081
4098
|
};
|
4082
4099
|
|
4083
|
-
if (response.
|
4100
|
+
if (response.list_thread == null) {
|
4084
4101
|
return Promise.resolve(result);
|
4085
4102
|
}
|
4086
4103
|
|
4087
|
-
result.
|
4104
|
+
result.list_thread = response.list_thread;
|
4088
4105
|
return Promise.resolve(result);
|
4089
4106
|
});
|
4090
4107
|
}
|
package/dist/api.gen.d.ts
CHANGED
@@ -873,6 +873,12 @@ export interface ApiMessageDeleted {
|
|
873
873
|
message_id?: string;
|
874
874
|
}
|
875
875
|
/** */
|
876
|
+
export interface ApiListThreadDecs {
|
877
|
+
limit?: number;
|
878
|
+
list_thread?: Array<ApiChannelDescription>;
|
879
|
+
page?: number;
|
880
|
+
}
|
881
|
+
/** */
|
876
882
|
export interface ApiListUserActivity {
|
877
883
|
activities?: Array<ApiUserActivity>;
|
878
884
|
}
|
@@ -1965,7 +1971,7 @@ export declare class MezonApi {
|
|
1965
1971
|
/** Update a system messages. */
|
1966
1972
|
updateSystemMessage(bearerToken: string, clanId: string, body: MezonUpdateSystemMessageBody, options?: any): Promise<any>;
|
1967
1973
|
/** List user channels */
|
1968
|
-
listThreadDescs(bearerToken: string, channelId: string, limit?: number, state?: number, clanId?: string, threadId?: string, options?: any): Promise<
|
1974
|
+
listThreadDescs(bearerToken: string, channelId: string, limit?: number, state?: number, clanId?: string, threadId?: string, page?: number, options?: any): Promise<ApiListThreadDecs>;
|
1969
1975
|
/** Update fields in a given category. */
|
1970
1976
|
updateCategory(bearerToken: string, clanId: string, body: MezonUpdateCategoryBody, options?: any): Promise<any>;
|
1971
1977
|
/** Update channel private. */
|
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, 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, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, ApiSFUChannelUserList, MezonUpdateEventBody } 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, 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, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, ApiSFUChannelUserList, MezonUpdateEventBody, ApiListThreadDecs } from "./api.gen";
|
17
17
|
import { Session } from "./session";
|
18
18
|
import { Socket } from "./socket";
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
@@ -602,7 +602,7 @@ export declare class Client {
|
|
602
602
|
getPermissionByRoleIdChannelId(session: Session, roleId?: string, channelId?: string, userId?: string): Promise<ApiPermissionRoleChannelListEventResponse>;
|
603
603
|
markAsRead(session: Session, request: ApiMarkAsReadRequest): Promise<any>;
|
604
604
|
/** List Threads. */
|
605
|
-
listThreadDescs(session: Session, channelId: string, limit?: number, state?: number, clanId?: string, threadId?: string): Promise<
|
605
|
+
listThreadDescs(session: Session, channelId: string, limit?: number, state?: number, clanId?: string, threadId?: string, page?: number): Promise<ApiListThreadDecs>;
|
606
606
|
leaveThread(session: Session, channelId: string): Promise<any>;
|
607
607
|
getChannelSettingInClan(session: Session, clanId: string, parentId?: string, categoryId?: string, privateChannel?: number, active?: number, status?: number, type?: number, limit?: number, page?: number, channel_label?: string): Promise<ApiChannelSettingListResponse>;
|
608
608
|
getChannelCanvasList(session: Session, channelId: string, clanId?: string, limit?: number, page?: number): Promise<any>;
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -5917,7 +5917,7 @@ var MezonApi = class {
|
|
5917
5917
|
]);
|
5918
5918
|
}
|
5919
5919
|
/** List user channels */
|
5920
|
-
listThreadDescs(bearerToken, channelId, limit, state, clanId, threadId, options = {}) {
|
5920
|
+
listThreadDescs(bearerToken, channelId, limit, state, clanId, threadId, page, options = {}) {
|
5921
5921
|
if (channelId === null || channelId === void 0) {
|
5922
5922
|
throw new Error(
|
5923
5923
|
"'channelId' is a required parameter but is null or undefined."
|
@@ -5932,6 +5932,7 @@ var MezonApi = class {
|
|
5932
5932
|
queryParams.set("state", state);
|
5933
5933
|
queryParams.set("clan_id", clanId);
|
5934
5934
|
queryParams.set("thread_id", threadId);
|
5935
|
+
queryParams.set("page", page);
|
5935
5936
|
let bodyJson = "";
|
5936
5937
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
5937
5938
|
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
@@ -8495,7 +8496,14 @@ var Client = class {
|
|
8495
8496
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
8496
8497
|
yield this.sessionRefresh(session);
|
8497
8498
|
}
|
8498
|
-
return this.apiClient.deleteEvent(
|
8499
|
+
return this.apiClient.deleteEvent(
|
8500
|
+
session.token,
|
8501
|
+
eventId,
|
8502
|
+
clanId,
|
8503
|
+
creatorId,
|
8504
|
+
eventLabel,
|
8505
|
+
channelId
|
8506
|
+
).then((response) => {
|
8499
8507
|
return response !== void 0;
|
8500
8508
|
});
|
8501
8509
|
});
|
@@ -10179,19 +10187,27 @@ var Client = class {
|
|
10179
10187
|
});
|
10180
10188
|
}
|
10181
10189
|
/** List Threads. */
|
10182
|
-
listThreadDescs(session, channelId, limit, state, clanId, threadId) {
|
10190
|
+
listThreadDescs(session, channelId, limit, state, clanId, threadId, page) {
|
10183
10191
|
return __async(this, null, function* () {
|
10184
10192
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
10185
10193
|
yield this.sessionRefresh(session);
|
10186
10194
|
}
|
10187
|
-
return this.apiClient.listThreadDescs(
|
10195
|
+
return this.apiClient.listThreadDescs(
|
10196
|
+
session.token,
|
10197
|
+
channelId,
|
10198
|
+
limit,
|
10199
|
+
state,
|
10200
|
+
clanId,
|
10201
|
+
threadId,
|
10202
|
+
page
|
10203
|
+
).then((response) => {
|
10188
10204
|
var result = {
|
10189
|
-
|
10205
|
+
list_thread: []
|
10190
10206
|
};
|
10191
|
-
if (response.
|
10207
|
+
if (response.list_thread == null) {
|
10192
10208
|
return Promise.resolve(result);
|
10193
10209
|
}
|
10194
|
-
result.
|
10210
|
+
result.list_thread = response.list_thread;
|
10195
10211
|
return Promise.resolve(result);
|
10196
10212
|
});
|
10197
10213
|
});
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -5882,7 +5882,7 @@ var MezonApi = class {
|
|
5882
5882
|
]);
|
5883
5883
|
}
|
5884
5884
|
/** List user channels */
|
5885
|
-
listThreadDescs(bearerToken, channelId, limit, state, clanId, threadId, options = {}) {
|
5885
|
+
listThreadDescs(bearerToken, channelId, limit, state, clanId, threadId, page, options = {}) {
|
5886
5886
|
if (channelId === null || channelId === void 0) {
|
5887
5887
|
throw new Error(
|
5888
5888
|
"'channelId' is a required parameter but is null or undefined."
|
@@ -5897,6 +5897,7 @@ var MezonApi = class {
|
|
5897
5897
|
queryParams.set("state", state);
|
5898
5898
|
queryParams.set("clan_id", clanId);
|
5899
5899
|
queryParams.set("thread_id", threadId);
|
5900
|
+
queryParams.set("page", page);
|
5900
5901
|
let bodyJson = "";
|
5901
5902
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
5902
5903
|
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
@@ -8460,7 +8461,14 @@ var Client = class {
|
|
8460
8461
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
8461
8462
|
yield this.sessionRefresh(session);
|
8462
8463
|
}
|
8463
|
-
return this.apiClient.deleteEvent(
|
8464
|
+
return this.apiClient.deleteEvent(
|
8465
|
+
session.token,
|
8466
|
+
eventId,
|
8467
|
+
clanId,
|
8468
|
+
creatorId,
|
8469
|
+
eventLabel,
|
8470
|
+
channelId
|
8471
|
+
).then((response) => {
|
8464
8472
|
return response !== void 0;
|
8465
8473
|
});
|
8466
8474
|
});
|
@@ -10144,19 +10152,27 @@ var Client = class {
|
|
10144
10152
|
});
|
10145
10153
|
}
|
10146
10154
|
/** List Threads. */
|
10147
|
-
listThreadDescs(session, channelId, limit, state, clanId, threadId) {
|
10155
|
+
listThreadDescs(session, channelId, limit, state, clanId, threadId, page) {
|
10148
10156
|
return __async(this, null, function* () {
|
10149
10157
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
10150
10158
|
yield this.sessionRefresh(session);
|
10151
10159
|
}
|
10152
|
-
return this.apiClient.listThreadDescs(
|
10160
|
+
return this.apiClient.listThreadDescs(
|
10161
|
+
session.token,
|
10162
|
+
channelId,
|
10163
|
+
limit,
|
10164
|
+
state,
|
10165
|
+
clanId,
|
10166
|
+
threadId,
|
10167
|
+
page
|
10168
|
+
).then((response) => {
|
10153
10169
|
var result = {
|
10154
|
-
|
10170
|
+
list_thread: []
|
10155
10171
|
};
|
10156
|
-
if (response.
|
10172
|
+
if (response.list_thread == null) {
|
10157
10173
|
return Promise.resolve(result);
|
10158
10174
|
}
|
10159
|
-
result.
|
10175
|
+
result.list_thread = response.list_thread;
|
10160
10176
|
return Promise.resolve(result);
|
10161
10177
|
});
|
10162
10178
|
});
|