mezon-js 2.9.8 → 2.9.9
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 +3 -1
- package/client.ts +2 -0
- package/dist/api.gen.d.ts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/mezon-js.cjs.js +4 -2
- package/dist/mezon-js.esm.mjs +4 -2
- package/dist/socket.d.ts +3 -0
- package/package.json +1 -1
- package/socket.ts +6 -2
package/api.gen.ts
CHANGED
@@ -3470,9 +3470,10 @@ export class MezonApi {
|
|
3470
3470
|
/** List a channel's message history. */
|
3471
3471
|
listChannelMessages(bearerToken: string,
|
3472
3472
|
channelId:string,
|
3473
|
+
clanId?:string,
|
3473
3474
|
messageId?:string,
|
3474
|
-
direction?:number,
|
3475
3475
|
limit?:number,
|
3476
|
+
direction?:number,
|
3476
3477
|
options: any = {}): Promise<ApiChannelMessageList> {
|
3477
3478
|
|
3478
3479
|
if (channelId === null || channelId === undefined) {
|
@@ -3481,6 +3482,7 @@ export class MezonApi {
|
|
3481
3482
|
const urlPath = "/v2/channel/{channelId}"
|
3482
3483
|
.replace("{channelId}", encodeURIComponent(String(channelId)));
|
3483
3484
|
const queryParams = new Map<string, any>();
|
3485
|
+
queryParams.set("clan_id", clanId);
|
3484
3486
|
queryParams.set("message_id", messageId);
|
3485
3487
|
queryParams.set("limit", limit);
|
3486
3488
|
queryParams.set("direction", direction);
|
package/client.ts
CHANGED
@@ -1331,6 +1331,7 @@ export class Client {
|
|
1331
1331
|
/** List a channel's message history. */
|
1332
1332
|
async listChannelMessages(
|
1333
1333
|
session: Session,
|
1334
|
+
clanId: string,
|
1334
1335
|
channelId: string,
|
1335
1336
|
messageId?: string,
|
1336
1337
|
direction?: number,
|
@@ -1347,6 +1348,7 @@ export class Client {
|
|
1347
1348
|
return this.apiClient
|
1348
1349
|
.listChannelMessages(
|
1349
1350
|
session.token,
|
1351
|
+
clanId,
|
1350
1352
|
channelId,
|
1351
1353
|
messageId,
|
1352
1354
|
direction,
|
package/dist/api.gen.d.ts
CHANGED
@@ -1152,7 +1152,7 @@ export declare class MezonApi {
|
|
1152
1152
|
/** List channel apps. */
|
1153
1153
|
listChannelApps(bearerToken: string, clanId?: string, options?: any): Promise<ApiListChannelAppsResponse>;
|
1154
1154
|
/** List a channel's message history. */
|
1155
|
-
listChannelMessages(bearerToken: string, channelId: string, messageId?: string,
|
1155
|
+
listChannelMessages(bearerToken: string, channelId: string, clanId?: string, messageId?: string, limit?: number, direction?: number, options?: any): Promise<ApiChannelMessageList>;
|
1156
1156
|
/** Add users to a channel. */
|
1157
1157
|
addChannelUsers(bearerToken: string, channelId: string, userIds?: Array<string>, options?: any): Promise<any>;
|
1158
1158
|
/** List all attachment that are part of a channel. */
|
package/dist/client.d.ts
CHANGED
@@ -402,7 +402,7 @@ export declare class Client {
|
|
402
402
|
/** Kick users from a channel, or decline their join requests. */
|
403
403
|
removeChannelUsers(session: Session, channelId: string, ids?: Array<string>): Promise<boolean>;
|
404
404
|
/** List a channel's message history. */
|
405
|
-
listChannelMessages(session: Session, channelId: string, messageId?: string, direction?: number, limit?: number): Promise<ChannelMessageList>;
|
405
|
+
listChannelMessages(session: Session, clanId: string, channelId: string, messageId?: string, direction?: number, limit?: number): Promise<ChannelMessageList>;
|
406
406
|
/** List a channel's users. */
|
407
407
|
listChannelVoiceUsers(session: Session, clanId: string, channelId: string, channelType: number, state?: number, limit?: number, cursor?: string): Promise<ApiVoiceChannelUserList>;
|
408
408
|
/** List a channel's users. */
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -1973,12 +1973,13 @@ var MezonApi = class {
|
|
1973
1973
|
]);
|
1974
1974
|
}
|
1975
1975
|
/** List a channel's message history. */
|
1976
|
-
listChannelMessages(bearerToken, channelId,
|
1976
|
+
listChannelMessages(bearerToken, channelId, clanId, messageId, limit, direction, options = {}) {
|
1977
1977
|
if (channelId === null || channelId === void 0) {
|
1978
1978
|
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
1979
1979
|
}
|
1980
1980
|
const urlPath = "/v2/channel/{channelId}".replace("{channelId}", encodeURIComponent(String(channelId)));
|
1981
1981
|
const queryParams = /* @__PURE__ */ new Map();
|
1982
|
+
queryParams.set("clan_id", clanId);
|
1982
1983
|
queryParams.set("message_id", messageId);
|
1983
1984
|
queryParams.set("limit", limit);
|
1984
1985
|
queryParams.set("direction", direction);
|
@@ -6199,13 +6200,14 @@ var Client = class {
|
|
6199
6200
|
});
|
6200
6201
|
}
|
6201
6202
|
/** List a channel's message history. */
|
6202
|
-
listChannelMessages(session, channelId, messageId, direction, limit) {
|
6203
|
+
listChannelMessages(session, clanId, channelId, messageId, direction, limit) {
|
6203
6204
|
return __async(this, null, function* () {
|
6204
6205
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
6205
6206
|
yield this.sessionRefresh(session);
|
6206
6207
|
}
|
6207
6208
|
return this.apiClient.listChannelMessages(
|
6208
6209
|
session.token,
|
6210
|
+
clanId,
|
6209
6211
|
channelId,
|
6210
6212
|
messageId,
|
6211
6213
|
direction,
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -1944,12 +1944,13 @@ var MezonApi = class {
|
|
1944
1944
|
]);
|
1945
1945
|
}
|
1946
1946
|
/** List a channel's message history. */
|
1947
|
-
listChannelMessages(bearerToken, channelId,
|
1947
|
+
listChannelMessages(bearerToken, channelId, clanId, messageId, limit, direction, options = {}) {
|
1948
1948
|
if (channelId === null || channelId === void 0) {
|
1949
1949
|
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
1950
1950
|
}
|
1951
1951
|
const urlPath = "/v2/channel/{channelId}".replace("{channelId}", encodeURIComponent(String(channelId)));
|
1952
1952
|
const queryParams = /* @__PURE__ */ new Map();
|
1953
|
+
queryParams.set("clan_id", clanId);
|
1953
1954
|
queryParams.set("message_id", messageId);
|
1954
1955
|
queryParams.set("limit", limit);
|
1955
1956
|
queryParams.set("direction", direction);
|
@@ -6170,13 +6171,14 @@ var Client = class {
|
|
6170
6171
|
});
|
6171
6172
|
}
|
6172
6173
|
/** List a channel's message history. */
|
6173
|
-
listChannelMessages(session, channelId, messageId, direction, limit) {
|
6174
|
+
listChannelMessages(session, clanId, channelId, messageId, direction, limit) {
|
6174
6175
|
return __async(this, null, function* () {
|
6175
6176
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
6176
6177
|
yield this.sessionRefresh(session);
|
6177
6178
|
}
|
6178
6179
|
return this.apiClient.listChannelMessages(
|
6179
6180
|
session.token,
|
6181
|
+
clanId,
|
6180
6182
|
channelId,
|
6181
6183
|
messageId,
|
6182
6184
|
direction,
|
package/dist/socket.d.ts
CHANGED
@@ -135,6 +135,7 @@ export interface LastPinMessageEvent {
|
|
135
135
|
}
|
136
136
|
/** Last seen message by user */
|
137
137
|
export interface LastSeenMessageEvent {
|
138
|
+
clan_id: string;
|
138
139
|
/** The channel this message belongs to. */
|
139
140
|
channel_id: string;
|
140
141
|
mode: number;
|
@@ -224,6 +225,8 @@ interface ChannelMessageUpdate {
|
|
224
225
|
/** Remove a message previously sent to a realtime chat channel. */
|
225
226
|
interface ChannelMessageRemove {
|
226
227
|
channel_message_remove: {
|
228
|
+
/** The clan id */
|
229
|
+
clan_id: string;
|
227
230
|
/** The server-assigned channel ID. */
|
228
231
|
channel_id: string;
|
229
232
|
mode: number;
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -184,8 +184,10 @@ export interface LastPinMessageEvent {
|
|
184
184
|
|
185
185
|
/** Last seen message by user */
|
186
186
|
export interface LastSeenMessageEvent {
|
187
|
+
// The clan id
|
188
|
+
clan_id: string;
|
187
189
|
/** The channel this message belongs to. */
|
188
|
-
channel_id:string;
|
190
|
+
channel_id: string;
|
189
191
|
// The mode
|
190
192
|
mode: number;
|
191
193
|
// The channel label
|
@@ -307,8 +309,10 @@ interface ChannelMessageUpdate {
|
|
307
309
|
/** Remove a message previously sent to a realtime chat channel. */
|
308
310
|
interface ChannelMessageRemove {
|
309
311
|
channel_message_remove: {
|
312
|
+
/** The clan id */
|
313
|
+
clan_id: string;
|
310
314
|
/** The server-assigned channel ID. */
|
311
|
-
channel_id:string;
|
315
|
+
channel_id: string;
|
312
316
|
// The mode
|
313
317
|
mode: number;
|
314
318
|
// The channel label
|