mezon-js 2.9.31 → 2.9.33
Sign up to get free protection for your applications and to get access to all the features.
- package/api.gen.ts +44 -2
- package/client.ts +38 -0
- package/dist/api.gen.d.ts +3 -1
- package/dist/client.d.ts +2 -0
- package/dist/mezon-js.cjs.js +69 -16
- package/dist/mezon-js.esm.mjs +69 -16
- package/dist/socket.d.ts +16 -25
- package/package.json +1 -1
- package/socket.ts +22 -42
package/api.gen.ts
CHANGED
@@ -707,6 +707,8 @@ export interface ApiChannelSettingItem {
|
|
707
707
|
//
|
708
708
|
meeting_code?: string;
|
709
709
|
//
|
710
|
+
message_count?: string;
|
711
|
+
//
|
710
712
|
parent_id?: string;
|
711
713
|
//
|
712
714
|
user_ids?: Array<string>;
|
@@ -1328,8 +1330,6 @@ export interface ApiMessageReaction {
|
|
1328
1330
|
channel_label: string;
|
1329
1331
|
/** The message that user react */
|
1330
1332
|
message_id: string;
|
1331
|
-
// The parent id to sent to.
|
1332
|
-
parent_id?: string;
|
1333
1333
|
}
|
1334
1334
|
|
1335
1335
|
export interface ApiListChannelAppsResponse {
|
@@ -7988,6 +7988,48 @@ export class MezonApi {
|
|
7988
7988
|
]);
|
7989
7989
|
}
|
7990
7990
|
|
7991
|
+
/** List user channels */
|
7992
|
+
listThreadDescs(bearerToken: string,
|
7993
|
+
channelId:string,
|
7994
|
+
limit?:number,
|
7995
|
+
state?:number,
|
7996
|
+
clanId?:string,
|
7997
|
+
options: any = {}): Promise<ApiChannelDescList> {
|
7998
|
+
|
7999
|
+
if (channelId === null || channelId === undefined) {
|
8000
|
+
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
8001
|
+
}
|
8002
|
+
const urlPath = "/v2/thread/{channelId}"
|
8003
|
+
.replace("{channelId}", encodeURIComponent(String(channelId)));
|
8004
|
+
const queryParams = new Map<string, any>();
|
8005
|
+
queryParams.set("limit", limit);
|
8006
|
+
queryParams.set("state", state);
|
8007
|
+
queryParams.set("clan_id", clanId);
|
8008
|
+
|
8009
|
+
let bodyJson : string = "";
|
8010
|
+
|
8011
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
8012
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
8013
|
+
if (bearerToken) {
|
8014
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
8015
|
+
}
|
8016
|
+
|
8017
|
+
return Promise.race([
|
8018
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
8019
|
+
if (response.status == 204) {
|
8020
|
+
return response;
|
8021
|
+
} else if (response.status >= 200 && response.status < 300) {
|
8022
|
+
return response.json();
|
8023
|
+
} else {
|
8024
|
+
throw response;
|
8025
|
+
}
|
8026
|
+
}),
|
8027
|
+
new Promise((_, reject) =>
|
8028
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
8029
|
+
),
|
8030
|
+
]);
|
8031
|
+
}
|
8032
|
+
|
7991
8033
|
/** Update fields in a given category. */
|
7992
8034
|
updateCategory(
|
7993
8035
|
bearerToken: string,
|
package/client.ts
CHANGED
@@ -3921,6 +3921,44 @@ export class Client {
|
|
3921
3921
|
});
|
3922
3922
|
}
|
3923
3923
|
|
3924
|
+
/** List Threads. */
|
3925
|
+
async listThreadDescs(
|
3926
|
+
session: Session,
|
3927
|
+
channelId:string,
|
3928
|
+
limit?:number,
|
3929
|
+
state?:number,
|
3930
|
+
clanId?:string,
|
3931
|
+
): Promise<ApiChannelDescList> {
|
3932
|
+
if (
|
3933
|
+
this.autoRefreshSession &&
|
3934
|
+
session.refresh_token &&
|
3935
|
+
session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
|
3936
|
+
) {
|
3937
|
+
await this.sessionRefresh(session);
|
3938
|
+
}
|
3939
|
+
|
3940
|
+
return this.apiClient
|
3941
|
+
.listThreadDescs(
|
3942
|
+
session.token,
|
3943
|
+
channelId,
|
3944
|
+
limit,
|
3945
|
+
state,
|
3946
|
+
clanId
|
3947
|
+
)
|
3948
|
+
.then((response: ApiChannelDescList) => {
|
3949
|
+
var result: ApiChannelDescList = {
|
3950
|
+
channeldesc: [],
|
3951
|
+
};
|
3952
|
+
|
3953
|
+
if (response.channeldesc == null) {
|
3954
|
+
return Promise.resolve(result);
|
3955
|
+
}
|
3956
|
+
|
3957
|
+
result.channeldesc = response.channeldesc;
|
3958
|
+
return Promise.resolve(result);
|
3959
|
+
});
|
3960
|
+
}
|
3961
|
+
|
3924
3962
|
async getChannelSettingInClan(
|
3925
3963
|
session: Session,
|
3926
3964
|
clanId: string,
|
package/dist/api.gen.d.ts
CHANGED
@@ -406,6 +406,7 @@ export interface ApiChannelSettingItem {
|
|
406
406
|
creator_id?: string;
|
407
407
|
id?: string;
|
408
408
|
meeting_code?: string;
|
409
|
+
message_count?: string;
|
409
410
|
parent_id?: string;
|
410
411
|
user_ids?: Array<string>;
|
411
412
|
}
|
@@ -770,7 +771,6 @@ export interface ApiMessageReaction {
|
|
770
771
|
channel_label: string;
|
771
772
|
/** The message that user react */
|
772
773
|
message_id: string;
|
773
|
-
parent_id?: string;
|
774
774
|
}
|
775
775
|
export interface ApiListChannelAppsResponse {
|
776
776
|
channel_apps?: Array<ApiChannelAppResponse>;
|
@@ -1532,6 +1532,8 @@ export declare class MezonApi {
|
|
1532
1532
|
getSystemMessageByClanId(bearerToken: string, clanId: string, options?: any): Promise<ApiSystemMessage>;
|
1533
1533
|
/** Update a system messages. */
|
1534
1534
|
updateSystemMessage(bearerToken: string, clanId: string, body: MezonUpdateSystemMessageBody, options?: any): Promise<any>;
|
1535
|
+
/** List user channels */
|
1536
|
+
listThreadDescs(bearerToken: string, channelId: string, limit?: number, state?: number, clanId?: string, options?: any): Promise<ApiChannelDescList>;
|
1535
1537
|
/** Update fields in a given category. */
|
1536
1538
|
updateCategory(bearerToken: string, clanId: string, body: MezonUpdateCategoryBody, options?: any): Promise<any>;
|
1537
1539
|
/** Update channel private. */
|
package/dist/client.d.ts
CHANGED
@@ -577,5 +577,7 @@ export declare class Client {
|
|
577
577
|
listUserPermissionInChannel(session: Session, clanId?: string, channelId?: string): Promise<ApiUserPermissionInChannelListResponse>;
|
578
578
|
getPermissionByRoleIdChannelId(session: Session, roleId?: string, channelId?: string, userId?: string): Promise<ApiPermissionRoleChannelListEventResponse>;
|
579
579
|
markAsRead(session: Session, request: ApiMarkAsReadRequest): Promise<any>;
|
580
|
+
/** List Threads. */
|
581
|
+
listThreadDescs(session: Session, channelId: string, limit?: number, state?: number, clanId?: string): Promise<ApiChannelDescList>;
|
580
582
|
getChannelSettingInClan(session: Session, clanId: string, parentId?: string, categoryId?: string, privateChannel?: number, active?: number, status?: number, type?: number, limit?: number, page?: number): Promise<any>;
|
581
583
|
}
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -5265,6 +5265,37 @@ var MezonApi = class {
|
|
5265
5265
|
)
|
5266
5266
|
]);
|
5267
5267
|
}
|
5268
|
+
/** List user channels */
|
5269
|
+
listThreadDescs(bearerToken, channelId, limit, state, clanId, options = {}) {
|
5270
|
+
if (channelId === null || channelId === void 0) {
|
5271
|
+
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
5272
|
+
}
|
5273
|
+
const urlPath = "/v2/thread/{channelId}".replace("{channelId}", encodeURIComponent(String(channelId)));
|
5274
|
+
const queryParams = /* @__PURE__ */ new Map();
|
5275
|
+
queryParams.set("limit", limit);
|
5276
|
+
queryParams.set("state", state);
|
5277
|
+
queryParams.set("clan_id", clanId);
|
5278
|
+
let bodyJson = "";
|
5279
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
5280
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
5281
|
+
if (bearerToken) {
|
5282
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
5283
|
+
}
|
5284
|
+
return Promise.race([
|
5285
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
5286
|
+
if (response.status == 204) {
|
5287
|
+
return response;
|
5288
|
+
} else if (response.status >= 200 && response.status < 300) {
|
5289
|
+
return response.json();
|
5290
|
+
} else {
|
5291
|
+
throw response;
|
5292
|
+
}
|
5293
|
+
}),
|
5294
|
+
new Promise(
|
5295
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
5296
|
+
)
|
5297
|
+
]);
|
5298
|
+
}
|
5268
5299
|
/** Update fields in a given category. */
|
5269
5300
|
updateCategory(bearerToken, clanId, body, options = {}) {
|
5270
5301
|
if (clanId === null || clanId === void 0) {
|
@@ -6294,13 +6325,12 @@ var _DefaultSocket = class _DefaultSocket {
|
|
6294
6325
|
return response.clan_join;
|
6295
6326
|
});
|
6296
6327
|
}
|
6297
|
-
joinChat(clan_id,
|
6328
|
+
joinChat(clan_id, channel_id, channel_type, is_public) {
|
6298
6329
|
return __async(this, null, function* () {
|
6299
6330
|
const response = yield this.send(
|
6300
6331
|
{
|
6301
6332
|
channel_join: {
|
6302
6333
|
clan_id,
|
6303
|
-
parent_id,
|
6304
6334
|
channel_id,
|
6305
6335
|
channel_type,
|
6306
6336
|
is_public
|
@@ -6310,16 +6340,15 @@ var _DefaultSocket = class _DefaultSocket {
|
|
6310
6340
|
return response.channel;
|
6311
6341
|
});
|
6312
6342
|
}
|
6313
|
-
leaveChat(clan_id,
|
6314
|
-
return this.send({ channel_leave: { clan_id,
|
6343
|
+
leaveChat(clan_id, channel_id, channel_type, is_public) {
|
6344
|
+
return this.send({ channel_leave: { clan_id, channel_id, channel_type, is_public } });
|
6315
6345
|
}
|
6316
|
-
removeChatMessage(clan_id,
|
6346
|
+
removeChatMessage(clan_id, channel_id, mode, is_public, message_id) {
|
6317
6347
|
return __async(this, null, function* () {
|
6318
6348
|
const response = yield this.send(
|
6319
6349
|
{
|
6320
6350
|
channel_message_remove: {
|
6321
6351
|
clan_id,
|
6322
|
-
parent_id,
|
6323
6352
|
channel_id,
|
6324
6353
|
mode,
|
6325
6354
|
message_id,
|
@@ -6347,30 +6376,30 @@ var _DefaultSocket = class _DefaultSocket {
|
|
6347
6376
|
unfollowUsers(user_ids) {
|
6348
6377
|
return this.send({ status_unfollow: { user_ids } });
|
6349
6378
|
}
|
6350
|
-
updateChatMessage(clan_id,
|
6379
|
+
updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted) {
|
6351
6380
|
return __async(this, null, function* () {
|
6352
|
-
const response = yield this.send({ channel_message_update: { clan_id,
|
6381
|
+
const response = yield this.send({ channel_message_update: { clan_id, channel_id, message_id, content, mentions, attachments, mode, is_public, hide_editted: hideEditted } });
|
6353
6382
|
return response.channel_message_ack;
|
6354
6383
|
});
|
6355
6384
|
}
|
6356
6385
|
updateStatus(status) {
|
6357
6386
|
return this.send({ status_update: { status } });
|
6358
6387
|
}
|
6359
|
-
writeChatMessage(clan_id,
|
6388
|
+
writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
|
6360
6389
|
return __async(this, null, function* () {
|
6361
|
-
const response = yield this.send({ channel_message_send: { clan_id,
|
6390
|
+
const response = yield this.send({ channel_message_send: { clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar } });
|
6362
6391
|
return response.channel_message_ack;
|
6363
6392
|
});
|
6364
6393
|
}
|
6365
|
-
writeMessageReaction(id, clan_id,
|
6394
|
+
writeMessageReaction(id, clan_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action_delete) {
|
6366
6395
|
return __async(this, null, function* () {
|
6367
|
-
const response = yield this.send({ message_reaction_event: { id, clan_id,
|
6396
|
+
const response = yield this.send({ message_reaction_event: { id, clan_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action: action_delete } });
|
6368
6397
|
return response.message_reaction_event;
|
6369
6398
|
});
|
6370
6399
|
}
|
6371
|
-
writeMessageTyping(clan_id,
|
6400
|
+
writeMessageTyping(clan_id, channel_id, mode, is_public) {
|
6372
6401
|
return __async(this, null, function* () {
|
6373
|
-
const response = yield this.send({ message_typing_event: { clan_id,
|
6402
|
+
const response = yield this.send({ message_typing_event: { clan_id, channel_id, mode, is_public } });
|
6374
6403
|
return response.message_typing_event;
|
6375
6404
|
});
|
6376
6405
|
}
|
@@ -6380,9 +6409,9 @@ var _DefaultSocket = class _DefaultSocket {
|
|
6380
6409
|
return response.last_seen_message_event;
|
6381
6410
|
});
|
6382
6411
|
}
|
6383
|
-
writeLastPinMessage(clan_id,
|
6412
|
+
writeLastPinMessage(clan_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation) {
|
6384
6413
|
return __async(this, null, function* () {
|
6385
|
-
const response = yield this.send({ last_pin_message_event: { clan_id,
|
6414
|
+
const response = yield this.send({ last_pin_message_event: { clan_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation } });
|
6386
6415
|
return response.last_pin_message_event;
|
6387
6416
|
});
|
6388
6417
|
}
|
@@ -8510,6 +8539,30 @@ var Client = class {
|
|
8510
8539
|
});
|
8511
8540
|
});
|
8512
8541
|
}
|
8542
|
+
/** List Threads. */
|
8543
|
+
listThreadDescs(session, channelId, limit, state, clanId) {
|
8544
|
+
return __async(this, null, function* () {
|
8545
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
8546
|
+
yield this.sessionRefresh(session);
|
8547
|
+
}
|
8548
|
+
return this.apiClient.listThreadDescs(
|
8549
|
+
session.token,
|
8550
|
+
channelId,
|
8551
|
+
limit,
|
8552
|
+
state,
|
8553
|
+
clanId
|
8554
|
+
).then((response) => {
|
8555
|
+
var result = {
|
8556
|
+
channeldesc: []
|
8557
|
+
};
|
8558
|
+
if (response.channeldesc == null) {
|
8559
|
+
return Promise.resolve(result);
|
8560
|
+
}
|
8561
|
+
result.channeldesc = response.channeldesc;
|
8562
|
+
return Promise.resolve(result);
|
8563
|
+
});
|
8564
|
+
});
|
8565
|
+
}
|
8513
8566
|
getChannelSettingInClan(session, clanId, parentId, categoryId, privateChannel, active, status, type, limit, page) {
|
8514
8567
|
return __async(this, null, function* () {
|
8515
8568
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -5236,6 +5236,37 @@ var MezonApi = class {
|
|
5236
5236
|
)
|
5237
5237
|
]);
|
5238
5238
|
}
|
5239
|
+
/** List user channels */
|
5240
|
+
listThreadDescs(bearerToken, channelId, limit, state, clanId, options = {}) {
|
5241
|
+
if (channelId === null || channelId === void 0) {
|
5242
|
+
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
5243
|
+
}
|
5244
|
+
const urlPath = "/v2/thread/{channelId}".replace("{channelId}", encodeURIComponent(String(channelId)));
|
5245
|
+
const queryParams = /* @__PURE__ */ new Map();
|
5246
|
+
queryParams.set("limit", limit);
|
5247
|
+
queryParams.set("state", state);
|
5248
|
+
queryParams.set("clan_id", clanId);
|
5249
|
+
let bodyJson = "";
|
5250
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
5251
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
5252
|
+
if (bearerToken) {
|
5253
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
5254
|
+
}
|
5255
|
+
return Promise.race([
|
5256
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
5257
|
+
if (response.status == 204) {
|
5258
|
+
return response;
|
5259
|
+
} else if (response.status >= 200 && response.status < 300) {
|
5260
|
+
return response.json();
|
5261
|
+
} else {
|
5262
|
+
throw response;
|
5263
|
+
}
|
5264
|
+
}),
|
5265
|
+
new Promise(
|
5266
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
5267
|
+
)
|
5268
|
+
]);
|
5269
|
+
}
|
5239
5270
|
/** Update fields in a given category. */
|
5240
5271
|
updateCategory(bearerToken, clanId, body, options = {}) {
|
5241
5272
|
if (clanId === null || clanId === void 0) {
|
@@ -6265,13 +6296,12 @@ var _DefaultSocket = class _DefaultSocket {
|
|
6265
6296
|
return response.clan_join;
|
6266
6297
|
});
|
6267
6298
|
}
|
6268
|
-
joinChat(clan_id,
|
6299
|
+
joinChat(clan_id, channel_id, channel_type, is_public) {
|
6269
6300
|
return __async(this, null, function* () {
|
6270
6301
|
const response = yield this.send(
|
6271
6302
|
{
|
6272
6303
|
channel_join: {
|
6273
6304
|
clan_id,
|
6274
|
-
parent_id,
|
6275
6305
|
channel_id,
|
6276
6306
|
channel_type,
|
6277
6307
|
is_public
|
@@ -6281,16 +6311,15 @@ var _DefaultSocket = class _DefaultSocket {
|
|
6281
6311
|
return response.channel;
|
6282
6312
|
});
|
6283
6313
|
}
|
6284
|
-
leaveChat(clan_id,
|
6285
|
-
return this.send({ channel_leave: { clan_id,
|
6314
|
+
leaveChat(clan_id, channel_id, channel_type, is_public) {
|
6315
|
+
return this.send({ channel_leave: { clan_id, channel_id, channel_type, is_public } });
|
6286
6316
|
}
|
6287
|
-
removeChatMessage(clan_id,
|
6317
|
+
removeChatMessage(clan_id, channel_id, mode, is_public, message_id) {
|
6288
6318
|
return __async(this, null, function* () {
|
6289
6319
|
const response = yield this.send(
|
6290
6320
|
{
|
6291
6321
|
channel_message_remove: {
|
6292
6322
|
clan_id,
|
6293
|
-
parent_id,
|
6294
6323
|
channel_id,
|
6295
6324
|
mode,
|
6296
6325
|
message_id,
|
@@ -6318,30 +6347,30 @@ var _DefaultSocket = class _DefaultSocket {
|
|
6318
6347
|
unfollowUsers(user_ids) {
|
6319
6348
|
return this.send({ status_unfollow: { user_ids } });
|
6320
6349
|
}
|
6321
|
-
updateChatMessage(clan_id,
|
6350
|
+
updateChatMessage(clan_id, channel_id, mode, is_public, message_id, content, mentions, attachments, hideEditted) {
|
6322
6351
|
return __async(this, null, function* () {
|
6323
|
-
const response = yield this.send({ channel_message_update: { clan_id,
|
6352
|
+
const response = yield this.send({ channel_message_update: { clan_id, channel_id, message_id, content, mentions, attachments, mode, is_public, hide_editted: hideEditted } });
|
6324
6353
|
return response.channel_message_ack;
|
6325
6354
|
});
|
6326
6355
|
}
|
6327
6356
|
updateStatus(status) {
|
6328
6357
|
return this.send({ status_update: { status } });
|
6329
6358
|
}
|
6330
|
-
writeChatMessage(clan_id,
|
6359
|
+
writeChatMessage(clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar) {
|
6331
6360
|
return __async(this, null, function* () {
|
6332
|
-
const response = yield this.send({ channel_message_send: { clan_id,
|
6361
|
+
const response = yield this.send({ channel_message_send: { clan_id, channel_id, mode, is_public, content, mentions, attachments, references, anonymous_message, mention_everyone, avatar } });
|
6333
6362
|
return response.channel_message_ack;
|
6334
6363
|
});
|
6335
6364
|
}
|
6336
|
-
writeMessageReaction(id, clan_id,
|
6365
|
+
writeMessageReaction(id, clan_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action_delete) {
|
6337
6366
|
return __async(this, null, function* () {
|
6338
|
-
const response = yield this.send({ message_reaction_event: { id, clan_id,
|
6367
|
+
const response = yield this.send({ message_reaction_event: { id, clan_id, channel_id, mode, is_public, message_id, emoji_id, emoji, count, message_sender_id, action: action_delete } });
|
6339
6368
|
return response.message_reaction_event;
|
6340
6369
|
});
|
6341
6370
|
}
|
6342
|
-
writeMessageTyping(clan_id,
|
6371
|
+
writeMessageTyping(clan_id, channel_id, mode, is_public) {
|
6343
6372
|
return __async(this, null, function* () {
|
6344
|
-
const response = yield this.send({ message_typing_event: { clan_id,
|
6373
|
+
const response = yield this.send({ message_typing_event: { clan_id, channel_id, mode, is_public } });
|
6345
6374
|
return response.message_typing_event;
|
6346
6375
|
});
|
6347
6376
|
}
|
@@ -6351,9 +6380,9 @@ var _DefaultSocket = class _DefaultSocket {
|
|
6351
6380
|
return response.last_seen_message_event;
|
6352
6381
|
});
|
6353
6382
|
}
|
6354
|
-
writeLastPinMessage(clan_id,
|
6383
|
+
writeLastPinMessage(clan_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation) {
|
6355
6384
|
return __async(this, null, function* () {
|
6356
|
-
const response = yield this.send({ last_pin_message_event: { clan_id,
|
6385
|
+
const response = yield this.send({ last_pin_message_event: { clan_id, channel_id, mode, is_public, message_id, timestamp_seconds, operation } });
|
6357
6386
|
return response.last_pin_message_event;
|
6358
6387
|
});
|
6359
6388
|
}
|
@@ -8481,6 +8510,30 @@ var Client = class {
|
|
8481
8510
|
});
|
8482
8511
|
});
|
8483
8512
|
}
|
8513
|
+
/** List Threads. */
|
8514
|
+
listThreadDescs(session, channelId, limit, state, clanId) {
|
8515
|
+
return __async(this, null, function* () {
|
8516
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
8517
|
+
yield this.sessionRefresh(session);
|
8518
|
+
}
|
8519
|
+
return this.apiClient.listThreadDescs(
|
8520
|
+
session.token,
|
8521
|
+
channelId,
|
8522
|
+
limit,
|
8523
|
+
state,
|
8524
|
+
clanId
|
8525
|
+
).then((response) => {
|
8526
|
+
var result = {
|
8527
|
+
channeldesc: []
|
8528
|
+
};
|
8529
|
+
if (response.channeldesc == null) {
|
8530
|
+
return Promise.resolve(result);
|
8531
|
+
}
|
8532
|
+
result.channeldesc = response.channeldesc;
|
8533
|
+
return Promise.resolve(result);
|
8534
|
+
});
|
8535
|
+
});
|
8536
|
+
}
|
8484
8537
|
getChannelSettingInClan(session, clanId, parentId, categoryId, privateChannel, active, status, type, limit, page) {
|
8485
8538
|
return __async(this, null, function* () {
|
8486
8539
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
package/dist/socket.d.ts
CHANGED
@@ -61,7 +61,6 @@ interface ChannelJoin {
|
|
61
61
|
/** Whether the user's channel presence is hidden when joining. */
|
62
62
|
hidden: boolean;
|
63
63
|
is_public: boolean;
|
64
|
-
parent_id: string;
|
65
64
|
};
|
66
65
|
}
|
67
66
|
/** Leave a realtime chat channel. */
|
@@ -72,7 +71,6 @@ interface ChannelLeave {
|
|
72
71
|
mode: number;
|
73
72
|
channel_label: string;
|
74
73
|
is_public: boolean;
|
75
|
-
parent_id: string;
|
76
74
|
};
|
77
75
|
}
|
78
76
|
export interface AddClanUserEvent {
|
@@ -103,7 +101,6 @@ export interface UserChannelAddedEvent {
|
|
103
101
|
clan_id: string;
|
104
102
|
channel_type: number;
|
105
103
|
is_public: boolean;
|
106
|
-
parent_id: string;
|
107
104
|
}
|
108
105
|
export interface UserChannelRemovedEvent {
|
109
106
|
channel_id: string;
|
@@ -127,7 +124,6 @@ export interface LastPinMessageEvent {
|
|
127
124
|
/** operation */
|
128
125
|
operation: number;
|
129
126
|
is_public: boolean;
|
130
|
-
parent_id?: string;
|
131
127
|
}
|
132
128
|
/** Last seen message by user */
|
133
129
|
export interface LastSeenMessageEvent {
|
@@ -148,7 +144,6 @@ export interface MessageTypingEvent {
|
|
148
144
|
/** Message sender, usually a user ID. */
|
149
145
|
sender_id: string;
|
150
146
|
is_public: boolean;
|
151
|
-
parent_id?: string;
|
152
147
|
}
|
153
148
|
export interface UserProfileUpdatedEvent {
|
154
149
|
user_id: string;
|
@@ -193,7 +188,6 @@ interface ChannelMessageSend {
|
|
193
188
|
mention_everyone?: boolean;
|
194
189
|
avatar: string;
|
195
190
|
is_public: boolean;
|
196
|
-
parent_id?: string;
|
197
191
|
};
|
198
192
|
}
|
199
193
|
/** Update a message previously sent to a realtime chat channel. */
|
@@ -212,7 +206,6 @@ interface ChannelMessageUpdate {
|
|
212
206
|
/** The mode payload. */
|
213
207
|
mode: number;
|
214
208
|
is_public: boolean;
|
215
|
-
parent_id?: string;
|
216
209
|
};
|
217
210
|
}
|
218
211
|
/** Remove a message previously sent to a realtime chat channel. */
|
@@ -227,7 +220,6 @@ interface ChannelMessageRemove {
|
|
227
220
|
/** A unique ID for the chat message to be removed. */
|
228
221
|
message_id: string;
|
229
222
|
is_public: boolean;
|
230
|
-
parent_id?: string;
|
231
223
|
};
|
232
224
|
}
|
233
225
|
/** Presence update for a particular realtime chat channel. */
|
@@ -297,7 +289,6 @@ export interface ChannelCreatedEvent {
|
|
297
289
|
channel_private: number;
|
298
290
|
channel_type: number;
|
299
291
|
status: number;
|
300
|
-
parent_id: string;
|
301
292
|
app_url: string;
|
302
293
|
}
|
303
294
|
export interface ChannelDeletedEvent {
|
@@ -591,29 +582,29 @@ export interface Socket {
|
|
591
582
|
/** Join clan chat */
|
592
583
|
joinClanChat(clan_id: string): Promise<ClanJoin>;
|
593
584
|
/** Join a chat channel on the server. */
|
594
|
-
joinChat(clan_id: string,
|
585
|
+
joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
|
595
586
|
/** Leave a chat channel on the server. */
|
596
|
-
leaveChat(clan_id: string,
|
587
|
+
leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
|
597
588
|
/** Remove a chat message from a chat channel on the server. */
|
598
|
-
removeChatMessage(clan_id: string,
|
589
|
+
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck>;
|
599
590
|
/** Execute an RPC function to the server. */
|
600
591
|
rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
|
601
592
|
/** Unfollow one or more users from their status updates. */
|
602
593
|
unfollowUsers(user_ids: string[]): Promise<void>;
|
603
594
|
/** Update a chat message on a chat channel in the server. */
|
604
|
-
updateChatMessage(clan_id: string,
|
595
|
+
updateChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, hideEditted?: boolean): Promise<ChannelMessageAck>;
|
605
596
|
/** Update the status for the current user online. */
|
606
597
|
updateStatus(status?: string): Promise<void>;
|
607
598
|
/** Send a chat message to a chat channel on the server. */
|
608
|
-
writeChatMessage(clan_id: string,
|
599
|
+
writeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: boolean, avatar?: string): Promise<ChannelMessageAck>;
|
609
600
|
/** Send message typing */
|
610
|
-
writeMessageTyping(clan_id: string,
|
601
|
+
writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent>;
|
611
602
|
/** Send message reaction */
|
612
|
-
writeMessageReaction(id: string, clan_id: string,
|
603
|
+
writeMessageReaction(id: string, clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<ApiMessageReaction>;
|
613
604
|
/** Send last seen message */
|
614
605
|
writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number): Promise<LastSeenMessageEvent>;
|
615
606
|
/** Send last pin message */
|
616
|
-
writeLastPinMessage(clan_id: string,
|
607
|
+
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
|
617
608
|
/** Send custom user status */
|
618
609
|
writeCustomStatus(clan_id: string, status: string): Promise<CustomStatusEvent>;
|
619
610
|
/** send voice joined */
|
@@ -763,18 +754,18 @@ export declare class DefaultSocket implements Socket {
|
|
763
754
|
send(message: ChannelJoin | ChannelLeave | ChannelMessageSend | ChannelMessageUpdate | CustomStatusEvent | ChannelMessageRemove | MessageTypingEvent | LastSeenMessageEvent | Rpc | StatusFollow | StatusUnfollow | StatusUpdate | Ping, sendTimeout?: number): Promise<any>;
|
764
755
|
followUsers(userIds: string[]): Promise<Status>;
|
765
756
|
joinClanChat(clan_id: string): Promise<ClanJoin>;
|
766
|
-
joinChat(clan_id: string,
|
767
|
-
leaveChat(clan_id: string,
|
768
|
-
removeChatMessage(clan_id: string,
|
757
|
+
joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel>;
|
758
|
+
leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void>;
|
759
|
+
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck>;
|
769
760
|
rpc(id?: string, payload?: string, http_key?: string): Promise<ApiRpc>;
|
770
761
|
unfollowUsers(user_ids: string[]): Promise<void>;
|
771
|
-
updateChatMessage(clan_id: string,
|
762
|
+
updateChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, hideEditted?: boolean): Promise<ChannelMessageAck>;
|
772
763
|
updateStatus(status?: string): Promise<void>;
|
773
|
-
writeChatMessage(clan_id: string,
|
774
|
-
writeMessageReaction(id: string, clan_id: string,
|
775
|
-
writeMessageTyping(clan_id: string,
|
764
|
+
writeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?: Boolean, avatar?: string): Promise<ChannelMessageAck>;
|
765
|
+
writeMessageReaction(id: string, clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<ApiMessageReaction>;
|
766
|
+
writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent>;
|
776
767
|
writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number): Promise<LastSeenMessageEvent>;
|
777
|
-
writeLastPinMessage(clan_id: string,
|
768
|
+
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent>;
|
778
769
|
writeVoiceJoined(id: string, clanId: string, clanName: string, voiceChannelId: string, voiceChannelLabel: string, participant: string, lastScreenshot: string): Promise<VoiceJoinedEvent>;
|
779
770
|
writeVoiceLeaved(id: string, clanId: string, voiceChannelId: string, voiceUserId: string): Promise<VoiceLeavedEvent>;
|
780
771
|
writeCustomStatus(clan_id: string, status: string): Promise<CustomStatusEvent>;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -75,8 +75,6 @@ interface ChannelJoin {
|
|
75
75
|
hidden: boolean;
|
76
76
|
// is public
|
77
77
|
is_public: boolean;
|
78
|
-
// parent id
|
79
|
-
parent_id: string;
|
80
78
|
};
|
81
79
|
}
|
82
80
|
|
@@ -91,8 +89,6 @@ interface ChannelLeave {
|
|
91
89
|
channel_label: string;
|
92
90
|
// Is public
|
93
91
|
is_public: boolean;
|
94
|
-
// parent id
|
95
|
-
parent_id: string;
|
96
92
|
};
|
97
93
|
}
|
98
94
|
|
@@ -134,8 +130,6 @@ export interface UserChannelAddedEvent {
|
|
134
130
|
channel_type: number;
|
135
131
|
// is public
|
136
132
|
is_public: boolean;
|
137
|
-
// parent id
|
138
|
-
parent_id: string;
|
139
133
|
}
|
140
134
|
|
141
135
|
export interface UserChannelRemovedEvent {
|
@@ -170,8 +164,6 @@ export interface LastPinMessageEvent {
|
|
170
164
|
operation: number;
|
171
165
|
// Is public
|
172
166
|
is_public: boolean;
|
173
|
-
// The parent id to sent to.
|
174
|
-
parent_id?: string;
|
175
167
|
}
|
176
168
|
|
177
169
|
/** Last seen message by user */
|
@@ -200,8 +192,6 @@ export interface MessageTypingEvent {
|
|
200
192
|
sender_id: string;
|
201
193
|
// Is public
|
202
194
|
is_public: boolean;
|
203
|
-
// The parent id to sent to.
|
204
|
-
parent_id?: string;
|
205
195
|
}
|
206
196
|
|
207
197
|
// user profile updated event
|
@@ -265,8 +255,6 @@ interface ChannelMessageSend {
|
|
265
255
|
avatar: string;
|
266
256
|
// Is public
|
267
257
|
is_public: boolean;
|
268
|
-
// The parent id to sent to.
|
269
|
-
parent_id?: string;
|
270
258
|
};
|
271
259
|
}
|
272
260
|
|
@@ -287,8 +275,6 @@ interface ChannelMessageUpdate {
|
|
287
275
|
mode: number;
|
288
276
|
// Is public
|
289
277
|
is_public: boolean;
|
290
|
-
// The parent id to sent to.
|
291
|
-
parent_id?: string;
|
292
278
|
};
|
293
279
|
}
|
294
280
|
|
@@ -307,8 +293,6 @@ interface ChannelMessageRemove {
|
|
307
293
|
message_id: string;
|
308
294
|
// Is public
|
309
295
|
is_public: boolean;
|
310
|
-
// The parent id to sent to.
|
311
|
-
parent_id?: string;
|
312
296
|
};
|
313
297
|
}
|
314
298
|
|
@@ -429,8 +413,6 @@ export interface ChannelCreatedEvent {
|
|
429
413
|
channel_type: number;
|
430
414
|
// status
|
431
415
|
status: number;
|
432
|
-
// parent
|
433
|
-
parent_id: string;
|
434
416
|
// app url
|
435
417
|
app_url: string;
|
436
418
|
}
|
@@ -831,13 +813,13 @@ export interface Socket {
|
|
831
813
|
joinClanChat(clan_id: string) : Promise<ClanJoin>;
|
832
814
|
|
833
815
|
/** Join a chat channel on the server. */
|
834
|
-
joinChat(clan_id: string,
|
816
|
+
joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean) : Promise<Channel>;
|
835
817
|
|
836
818
|
/** Leave a chat channel on the server. */
|
837
|
-
leaveChat(clan_id: string,
|
819
|
+
leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean) : Promise<void>;
|
838
820
|
|
839
821
|
/** Remove a chat message from a chat channel on the server. */
|
840
|
-
removeChatMessage(clan_id: string,
|
822
|
+
removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string) : Promise<ChannelMessageAck>;
|
841
823
|
|
842
824
|
/** Execute an RPC function to the server. */
|
843
825
|
rpc(id?: string, payload?: string, http_key?: string) : Promise<ApiRpc>
|
@@ -846,25 +828,25 @@ export interface Socket {
|
|
846
828
|
unfollowUsers(user_ids : string[]) : Promise<void>;
|
847
829
|
|
848
830
|
/** Update a chat message on a chat channel in the server. */
|
849
|
-
updateChatMessage(clan_id: string,
|
831
|
+
updateChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, hideEditted?: boolean) : Promise<ChannelMessageAck>;
|
850
832
|
|
851
833
|
/** Update the status for the current user online. */
|
852
834
|
updateStatus(status?: string) : Promise<void>;
|
853
835
|
|
854
836
|
/** Send a chat message to a chat channel on the server. */
|
855
|
-
writeChatMessage(clan_id: string,
|
837
|
+
writeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, content?: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?:boolean, avatar?: string) : Promise<ChannelMessageAck>;
|
856
838
|
|
857
839
|
/** Send message typing */
|
858
|
-
writeMessageTyping(clan_id: string,
|
840
|
+
writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean) : Promise<MessageTypingEvent>;
|
859
841
|
|
860
842
|
/** Send message reaction */
|
861
|
-
writeMessageReaction(id: string, clan_id: string,
|
843
|
+
writeMessageReaction(id: string, clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean) : Promise<ApiMessageReaction>;
|
862
844
|
|
863
845
|
/** Send last seen message */
|
864
846
|
writeLastSeenMessage(clan_id: string, channel_id: string, mode: number, message_id: string, timestamp_seconds: number) : Promise<LastSeenMessageEvent>;
|
865
847
|
|
866
848
|
/** Send last pin message */
|
867
|
-
writeLastPinMessage(clan_id: string,
|
849
|
+
writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number) : Promise<LastPinMessageEvent>;
|
868
850
|
|
869
851
|
/** Send custom user status */
|
870
852
|
writeCustomStatus(clan_id: string, status: string) : Promise<CustomStatusEvent>;
|
@@ -1571,12 +1553,11 @@ export class DefaultSocket implements Socket {
|
|
1571
1553
|
return response.clan_join;
|
1572
1554
|
}
|
1573
1555
|
|
1574
|
-
async joinChat(clan_id: string,
|
1556
|
+
async joinChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<Channel> {
|
1575
1557
|
|
1576
1558
|
const response = await this.send({
|
1577
1559
|
channel_join: {
|
1578
1560
|
clan_id: clan_id,
|
1579
|
-
parent_id: parent_id,
|
1580
1561
|
channel_id: channel_id,
|
1581
1562
|
channel_type: channel_type,
|
1582
1563
|
is_public: is_public
|
@@ -1587,16 +1568,15 @@ export class DefaultSocket implements Socket {
|
|
1587
1568
|
return response.channel;
|
1588
1569
|
}
|
1589
1570
|
|
1590
|
-
leaveChat(clan_id: string,
|
1591
|
-
return this.send({channel_leave: {clan_id: clan_id,
|
1571
|
+
leaveChat(clan_id: string, channel_id: string, channel_type: number, is_public: boolean): Promise<void> {
|
1572
|
+
return this.send({channel_leave: {clan_id: clan_id, channel_id: channel_id, channel_type: channel_type, is_public: is_public}});
|
1592
1573
|
}
|
1593
1574
|
|
1594
|
-
async removeChatMessage(clan_id: string,
|
1575
|
+
async removeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string): Promise<ChannelMessageAck> {
|
1595
1576
|
const response = await this.send(
|
1596
1577
|
{
|
1597
1578
|
channel_message_remove: {
|
1598
1579
|
clan_id: clan_id,
|
1599
|
-
parent_id: parent_id,
|
1600
1580
|
channel_id: channel_id,
|
1601
1581
|
mode: mode,
|
1602
1582
|
message_id: message_id,
|
@@ -1625,8 +1605,8 @@ export class DefaultSocket implements Socket {
|
|
1625
1605
|
return this.send({status_unfollow: {user_ids: user_ids}});
|
1626
1606
|
}
|
1627
1607
|
|
1628
|
-
async updateChatMessage(clan_id: string,
|
1629
|
-
const response = await this.send({channel_message_update: {clan_id: clan_id,
|
1608
|
+
async updateChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, hideEditted?: boolean): Promise<ChannelMessageAck> {
|
1609
|
+
const response = await this.send({channel_message_update: {clan_id: clan_id, channel_id: channel_id, message_id: message_id, content: content, mentions: mentions, attachments: attachments, mode: mode, is_public: is_public, hide_editted: hideEditted}});
|
1630
1610
|
return response.channel_message_ack;
|
1631
1611
|
}
|
1632
1612
|
|
@@ -1634,18 +1614,18 @@ export class DefaultSocket implements Socket {
|
|
1634
1614
|
return this.send({status_update: {status: status}});
|
1635
1615
|
}
|
1636
1616
|
|
1637
|
-
async writeChatMessage(clan_id: string,
|
1638
|
-
const response = await this.send({channel_message_send: {clan_id: clan_id,
|
1617
|
+
async writeChatMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, content: any, mentions?: Array<ApiMessageMention>, attachments?: Array<ApiMessageAttachment>, references?: Array<ApiMessageRef>, anonymous_message?: boolean, mention_everyone?:Boolean, avatar?: string ): Promise<ChannelMessageAck> {
|
1618
|
+
const response = await this.send({channel_message_send: {clan_id: clan_id, channel_id: channel_id, mode: mode, is_public: is_public, content: content, mentions: mentions, attachments: attachments, references: references, anonymous_message: anonymous_message, mention_everyone: mention_everyone, avatar: avatar}});
|
1639
1619
|
return response.channel_message_ack;
|
1640
1620
|
}
|
1641
1621
|
|
1642
|
-
async writeMessageReaction(id: string, clan_id: string,
|
1643
|
-
const response = await this.send({message_reaction_event: {id: id, clan_id: clan_id,
|
1622
|
+
async writeMessageReaction(id: string, clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, emoji_id: string, emoji: string, count: number, message_sender_id: string, action_delete: boolean): Promise<ApiMessageReaction> {
|
1623
|
+
const response = await this.send({message_reaction_event: {id: id, clan_id: clan_id, channel_id: channel_id, mode: mode, is_public: is_public, message_id: message_id, emoji_id: emoji_id, emoji: emoji, count: count, message_sender_id: message_sender_id, action: action_delete}});
|
1644
1624
|
return response.message_reaction_event
|
1645
1625
|
}
|
1646
1626
|
|
1647
|
-
async writeMessageTyping(clan_id: string,
|
1648
|
-
const response = await this.send({message_typing_event: {clan_id: clan_id,
|
1627
|
+
async writeMessageTyping(clan_id: string, channel_id: string, mode: number, is_public: boolean): Promise<MessageTypingEvent> {
|
1628
|
+
const response = await this.send({message_typing_event: {clan_id: clan_id, channel_id: channel_id, mode:mode, is_public: is_public}});
|
1649
1629
|
return response.message_typing_event
|
1650
1630
|
}
|
1651
1631
|
|
@@ -1654,8 +1634,8 @@ export class DefaultSocket implements Socket {
|
|
1654
1634
|
return response.last_seen_message_event
|
1655
1635
|
}
|
1656
1636
|
|
1657
|
-
async writeLastPinMessage(clan_id: string,
|
1658
|
-
const response = await this.send({last_pin_message_event: {clan_id: clan_id,
|
1637
|
+
async writeLastPinMessage(clan_id: string, channel_id: string, mode: number, is_public: boolean, message_id: string, timestamp_seconds: number, operation: number): Promise<LastPinMessageEvent> {
|
1638
|
+
const response = await this.send({last_pin_message_event: {clan_id: clan_id, channel_id: channel_id, mode: mode, is_public: is_public, message_id: message_id, timestamp_seconds: timestamp_seconds, operation: operation}});
|
1659
1639
|
return response.last_pin_message_event
|
1660
1640
|
}
|
1661
1641
|
|