mezon-js 2.10.20 → 2.10.22
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 +56 -48
- package/client.ts +18 -10
- package/dist/api.gen.d.ts +3 -1
- package/dist/client.d.ts +3 -3
- package/dist/mezon-js.cjs.js +12 -4
- package/dist/mezon-js.esm.mjs +12 -4
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -207,6 +207,8 @@ export interface MezonUpdateEventBody {
|
|
207
207
|
//
|
208
208
|
clan_id?: string;
|
209
209
|
//
|
210
|
+
creator_id?: string;
|
211
|
+
//
|
210
212
|
description?: string;
|
211
213
|
//
|
212
214
|
end_time?: string;
|
@@ -1177,6 +1179,8 @@ export interface ApiDeleteChannelDescRequest {
|
|
1177
1179
|
export interface ApiDeleteEventRequest {
|
1178
1180
|
//
|
1179
1181
|
clan_id?: string;
|
1182
|
+
//
|
1183
|
+
creator_id?: string;
|
1180
1184
|
//The id of a event.
|
1181
1185
|
event_id?: string;
|
1182
1186
|
}
|
@@ -4919,7 +4923,7 @@ export class MezonApi {
|
|
4919
4923
|
messageId?: string,
|
4920
4924
|
direction?: number,
|
4921
4925
|
limit?: number,
|
4922
|
-
topicId?:string,
|
4926
|
+
topicId?: string,
|
4923
4927
|
options: any = {}
|
4924
4928
|
): Promise<ApiChannelMessageList> {
|
4925
4929
|
if (channelId === null || channelId === undefined) {
|
@@ -5364,22 +5368,23 @@ export class MezonApi {
|
|
5364
5368
|
}
|
5365
5369
|
|
5366
5370
|
/** list user add channel by channel ids */
|
5367
|
-
listChannelUsersUC(
|
5368
|
-
|
5369
|
-
|
5370
|
-
|
5371
|
-
|
5371
|
+
listChannelUsersUC(
|
5372
|
+
bearerToken: string,
|
5373
|
+
channelId?: string,
|
5374
|
+
limit?: number,
|
5375
|
+
options: any = {}
|
5376
|
+
): Promise<ApiAllUsersAddChannelResponse> {
|
5372
5377
|
const urlPath = "/v2/channeldesc/users";
|
5373
5378
|
const queryParams = new Map<string, any>();
|
5374
5379
|
queryParams.set("channel_id", channelId);
|
5375
5380
|
queryParams.set("limit", limit);
|
5376
5381
|
|
5377
|
-
let bodyJson
|
5382
|
+
let bodyJson: string = "";
|
5378
5383
|
|
5379
5384
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
5380
5385
|
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
5381
5386
|
if (bearerToken) {
|
5382
|
-
|
5387
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
5383
5388
|
}
|
5384
5389
|
|
5385
5390
|
return Promise.race([
|
@@ -5396,7 +5401,7 @@ export class MezonApi {
|
|
5396
5401
|
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
5397
5402
|
),
|
5398
5403
|
]);
|
5399
|
-
}
|
5404
|
+
}
|
5400
5405
|
|
5401
5406
|
/** Delete a channel by ID. */
|
5402
5407
|
deleteChannelDesc(
|
@@ -6563,6 +6568,7 @@ export class MezonApi {
|
|
6563
6568
|
bearerToken: string,
|
6564
6569
|
eventId: string,
|
6565
6570
|
clanId?: string,
|
6571
|
+
creatorId?: string,
|
6566
6572
|
options: any = {}
|
6567
6573
|
): Promise<any> {
|
6568
6574
|
if (eventId === null || eventId === undefined) {
|
@@ -6576,6 +6582,7 @@ export class MezonApi {
|
|
6576
6582
|
);
|
6577
6583
|
const queryParams = new Map<string, any>();
|
6578
6584
|
queryParams.set("clan_id", clanId);
|
6585
|
+
queryParams.set("creator_id", creatorId);
|
6579
6586
|
|
6580
6587
|
let bodyJson: string = "";
|
6581
6588
|
|
@@ -7500,45 +7507,46 @@ export class MezonApi {
|
|
7500
7507
|
}
|
7501
7508
|
|
7502
7509
|
/** Fetch list of notifications. */
|
7503
|
-
listNotifications(
|
7504
|
-
|
7505
|
-
|
7506
|
-
|
7507
|
-
|
7508
|
-
|
7509
|
-
|
7510
|
-
|
7511
|
-
|
7512
|
-
|
7513
|
-
|
7514
|
-
|
7515
|
-
|
7516
|
-
|
7517
|
-
|
7518
|
-
|
7519
|
-
|
7520
|
-
|
7521
|
-
|
7522
|
-
|
7523
|
-
|
7524
|
-
|
7525
|
-
|
7526
|
-
|
7527
|
-
|
7528
|
-
|
7529
|
-
|
7530
|
-
|
7531
|
-
|
7532
|
-
|
7533
|
-
|
7534
|
-
|
7535
|
-
|
7536
|
-
|
7537
|
-
|
7538
|
-
|
7539
|
-
|
7540
|
-
|
7541
|
-
|
7510
|
+
listNotifications(
|
7511
|
+
bearerToken: string,
|
7512
|
+
limit?: number,
|
7513
|
+
clanId?: string,
|
7514
|
+
notificationId?: string,
|
7515
|
+
code?: number,
|
7516
|
+
direction?: number,
|
7517
|
+
options: any = {}
|
7518
|
+
): Promise<ApiNotificationList> {
|
7519
|
+
const urlPath = "/v2/notification";
|
7520
|
+
const queryParams = new Map<string, any>();
|
7521
|
+
queryParams.set("limit", limit);
|
7522
|
+
queryParams.set("clan_id", clanId);
|
7523
|
+
queryParams.set("notification_id", notificationId);
|
7524
|
+
queryParams.set("code", code);
|
7525
|
+
queryParams.set("direction", direction);
|
7526
|
+
|
7527
|
+
let bodyJson: string = "";
|
7528
|
+
|
7529
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
7530
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
7531
|
+
if (bearerToken) {
|
7532
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
7533
|
+
}
|
7534
|
+
|
7535
|
+
return Promise.race([
|
7536
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
7537
|
+
if (response.status == 204) {
|
7538
|
+
return response;
|
7539
|
+
} else if (response.status >= 200 && response.status < 300) {
|
7540
|
+
return response.json();
|
7541
|
+
} else {
|
7542
|
+
throw response;
|
7543
|
+
}
|
7544
|
+
}),
|
7545
|
+
new Promise((_, reject) =>
|
7546
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
7547
|
+
),
|
7548
|
+
]);
|
7549
|
+
}
|
7542
7550
|
|
7543
7551
|
/** set notification user channel. */
|
7544
7552
|
setNotificationChannelSetting(
|
package/client.ts
CHANGED
@@ -56,7 +56,6 @@ import {
|
|
56
56
|
ApiChannelUserList,
|
57
57
|
ApiClanUserList,
|
58
58
|
ApiLinkInviteUserRequest,
|
59
|
-
ApiUpdateEventRequest,
|
60
59
|
ApiLinkInviteUser,
|
61
60
|
ApiInviteUserRes,
|
62
61
|
ApiUploadAttachmentRequest,
|
@@ -158,6 +157,7 @@ import {
|
|
158
157
|
ApiSdTopicRequest,
|
159
158
|
ApiSdTopic,
|
160
159
|
ApiPTTChannelUserList,
|
160
|
+
MezonUpdateEventBody,
|
161
161
|
} from "./api.gen";
|
162
162
|
|
163
163
|
import { Session } from "./session";
|
@@ -201,7 +201,7 @@ export enum WebrtcSignalingType {
|
|
201
201
|
WEBRTC_SDP_OFFER = 1,
|
202
202
|
WEBRTC_SDP_ANSWER = 2,
|
203
203
|
WEBRTC_ICE_CANDIDATE = 3,
|
204
|
-
WEBRTC_SDP_QUIT = 4
|
204
|
+
WEBRTC_SDP_QUIT = 4,
|
205
205
|
}
|
206
206
|
|
207
207
|
/** Response for an RPC function executed on the server. */
|
@@ -1201,7 +1201,8 @@ export class Client {
|
|
1201
1201
|
async deleteEvent(
|
1202
1202
|
session: Session,
|
1203
1203
|
eventId: string,
|
1204
|
-
clanId: string
|
1204
|
+
clanId: string,
|
1205
|
+
creatorId: string
|
1205
1206
|
): Promise<boolean> {
|
1206
1207
|
if (
|
1207
1208
|
this.autoRefreshSession &&
|
@@ -1212,7 +1213,7 @@ export class Client {
|
|
1212
1213
|
}
|
1213
1214
|
|
1214
1215
|
return this.apiClient
|
1215
|
-
.deleteEvent(session.token, eventId, clanId)
|
1216
|
+
.deleteEvent(session.token, eventId, clanId, creatorId)
|
1216
1217
|
.then((response: any) => {
|
1217
1218
|
return response !== undefined;
|
1218
1219
|
});
|
@@ -1409,7 +1410,7 @@ export class Client {
|
|
1409
1410
|
messageId?: string,
|
1410
1411
|
direction?: number,
|
1411
1412
|
limit?: number,
|
1412
|
-
topicId?:string
|
1413
|
+
topicId?: string
|
1413
1414
|
): Promise<ChannelMessageList> {
|
1414
1415
|
if (
|
1415
1416
|
this.autoRefreshSession &&
|
@@ -2231,9 +2232,9 @@ export class Client {
|
|
2231
2232
|
session: Session,
|
2232
2233
|
clanId: string,
|
2233
2234
|
limit?: number,
|
2234
|
-
notificationId?:string,
|
2235
|
-
code?:number,
|
2236
|
-
direction?:number
|
2235
|
+
notificationId?: string,
|
2236
|
+
code?: number,
|
2237
|
+
direction?: number
|
2237
2238
|
): Promise<NotificationList> {
|
2238
2239
|
if (
|
2239
2240
|
this.autoRefreshSession &&
|
@@ -2244,7 +2245,14 @@ export class Client {
|
|
2244
2245
|
}
|
2245
2246
|
|
2246
2247
|
return this.apiClient
|
2247
|
-
.listNotifications(
|
2248
|
+
.listNotifications(
|
2249
|
+
session.token,
|
2250
|
+
limit,
|
2251
|
+
clanId,
|
2252
|
+
notificationId,
|
2253
|
+
code,
|
2254
|
+
direction
|
2255
|
+
)
|
2248
2256
|
.then((response: ApiNotificationList) => {
|
2249
2257
|
var result: NotificationList = {
|
2250
2258
|
cacheable_cursor: response.cacheable_cursor,
|
@@ -2710,7 +2718,7 @@ export class Client {
|
|
2710
2718
|
async updateEvent(
|
2711
2719
|
session: Session,
|
2712
2720
|
roleId: string,
|
2713
|
-
request:
|
2721
|
+
request: MezonUpdateEventBody
|
2714
2722
|
): Promise<boolean> {
|
2715
2723
|
if (
|
2716
2724
|
this.autoRefreshSession &&
|
package/dist/api.gen.d.ts
CHANGED
@@ -121,6 +121,7 @@ export interface MezonUpdateEventBody {
|
|
121
121
|
address?: string;
|
122
122
|
channel_id?: string;
|
123
123
|
clan_id?: string;
|
124
|
+
creator_id?: string;
|
124
125
|
description?: string;
|
125
126
|
end_time?: string;
|
126
127
|
logo?: string;
|
@@ -675,6 +676,7 @@ export interface ApiDeleteChannelDescRequest {
|
|
675
676
|
/** */
|
676
677
|
export interface ApiDeleteEventRequest {
|
677
678
|
clan_id?: string;
|
679
|
+
creator_id?: string;
|
678
680
|
event_id?: string;
|
679
681
|
}
|
680
682
|
/** Delete a role the user has access to. */
|
@@ -1790,7 +1792,7 @@ export declare class MezonApi {
|
|
1790
1792
|
/** Update fields in a given event. */
|
1791
1793
|
updateEventUser(bearerToken: string, body: ApiDeleteEventRequest, options?: any): Promise<any>;
|
1792
1794
|
/** Delete a event by ID. */
|
1793
|
-
deleteEvent(bearerToken: string, eventId: string, clanId?: string, options?: any): Promise<any>;
|
1795
|
+
deleteEvent(bearerToken: string, eventId: string, clanId?: string, creatorId?: string, options?: any): Promise<any>;
|
1794
1796
|
/** Update fields in a given event. */
|
1795
1797
|
updateEvent(bearerToken: string, eventId: string, body: MezonUpdateEventBody, options?: any): Promise<any>;
|
1796
1798
|
/** Delete one or more users by ID or username. */
|
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,
|
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, ApiPTTChannelUserList, MezonUpdateEventBody } from "./api.gen";
|
17
17
|
import { Session } from "./session";
|
18
18
|
import { Socket } from "./socket";
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
@@ -400,7 +400,7 @@ export declare class Client {
|
|
400
400
|
/** Delete a role by ID. */
|
401
401
|
deleteRole(session: Session, roleId: string, clanId: string): Promise<boolean>;
|
402
402
|
/** Delete a event by ID. */
|
403
|
-
deleteEvent(session: Session, eventId: string, clanId: string): Promise<boolean>;
|
403
|
+
deleteEvent(session: Session, eventId: string, clanId: string, creatorId: string): Promise<boolean>;
|
404
404
|
/** update user a event by ID. */
|
405
405
|
updateEventUser(session: Session, request: ApiDeleteEventRequest): Promise<boolean>;
|
406
406
|
/** Submit an event for processing in the server's registered runtime custom events handler. */
|
@@ -509,7 +509,7 @@ export declare class Client {
|
|
509
509
|
/** Update fields in a given role. */
|
510
510
|
updateRole(session: Session, roleId: string, request: ApiUpdateRoleRequest): Promise<boolean>;
|
511
511
|
/** Update fields in a given event. */
|
512
|
-
updateEvent(session: Session, roleId: string, request:
|
512
|
+
updateEvent(session: Session, roleId: string, request: MezonUpdateEventBody): Promise<boolean>;
|
513
513
|
/** Update fields in a given event. */
|
514
514
|
updateApp(session: Session, roleId: string, request: MezonUpdateAppBody): Promise<boolean>;
|
515
515
|
/** Update fields in a given clan profile. */
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -3708,7 +3708,7 @@ var MezonApi = class {
|
|
3708
3708
|
]);
|
3709
3709
|
}
|
3710
3710
|
/** Delete a event by ID. */
|
3711
|
-
deleteEvent(bearerToken, eventId, clanId, options = {}) {
|
3711
|
+
deleteEvent(bearerToken, eventId, clanId, creatorId, options = {}) {
|
3712
3712
|
if (eventId === null || eventId === void 0) {
|
3713
3713
|
throw new Error(
|
3714
3714
|
"'eventId' is a required parameter but is null or undefined."
|
@@ -3720,6 +3720,7 @@ var MezonApi = class {
|
|
3720
3720
|
);
|
3721
3721
|
const queryParams = /* @__PURE__ */ new Map();
|
3722
3722
|
queryParams.set("clan_id", clanId);
|
3723
|
+
queryParams.set("creator_id", creatorId);
|
3723
3724
|
let bodyJson = "";
|
3724
3725
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
3725
3726
|
const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
|
@@ -8447,12 +8448,12 @@ var Client = class {
|
|
8447
8448
|
});
|
8448
8449
|
}
|
8449
8450
|
/** Delete a event by ID. */
|
8450
|
-
deleteEvent(session, eventId, clanId) {
|
8451
|
+
deleteEvent(session, eventId, clanId, creatorId) {
|
8451
8452
|
return __async(this, null, function* () {
|
8452
8453
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
8453
8454
|
yield this.sessionRefresh(session);
|
8454
8455
|
}
|
8455
|
-
return this.apiClient.deleteEvent(session.token, eventId, clanId).then((response) => {
|
8456
|
+
return this.apiClient.deleteEvent(session.token, eventId, clanId, creatorId).then((response) => {
|
8456
8457
|
return response !== void 0;
|
8457
8458
|
});
|
8458
8459
|
});
|
@@ -9111,7 +9112,14 @@ var Client = class {
|
|
9111
9112
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
9112
9113
|
yield this.sessionRefresh(session);
|
9113
9114
|
}
|
9114
|
-
return this.apiClient.listNotifications(
|
9115
|
+
return this.apiClient.listNotifications(
|
9116
|
+
session.token,
|
9117
|
+
limit,
|
9118
|
+
clanId,
|
9119
|
+
notificationId,
|
9120
|
+
code,
|
9121
|
+
direction
|
9122
|
+
).then((response) => {
|
9115
9123
|
var result = {
|
9116
9124
|
cacheable_cursor: response.cacheable_cursor,
|
9117
9125
|
notifications: []
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -3674,7 +3674,7 @@ var MezonApi = class {
|
|
3674
3674
|
]);
|
3675
3675
|
}
|
3676
3676
|
/** Delete a event by ID. */
|
3677
|
-
deleteEvent(bearerToken, eventId, clanId, options = {}) {
|
3677
|
+
deleteEvent(bearerToken, eventId, clanId, creatorId, options = {}) {
|
3678
3678
|
if (eventId === null || eventId === void 0) {
|
3679
3679
|
throw new Error(
|
3680
3680
|
"'eventId' is a required parameter but is null or undefined."
|
@@ -3686,6 +3686,7 @@ var MezonApi = class {
|
|
3686
3686
|
);
|
3687
3687
|
const queryParams = /* @__PURE__ */ new Map();
|
3688
3688
|
queryParams.set("clan_id", clanId);
|
3689
|
+
queryParams.set("creator_id", creatorId);
|
3689
3690
|
let bodyJson = "";
|
3690
3691
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
3691
3692
|
const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
|
@@ -8413,12 +8414,12 @@ var Client = class {
|
|
8413
8414
|
});
|
8414
8415
|
}
|
8415
8416
|
/** Delete a event by ID. */
|
8416
|
-
deleteEvent(session, eventId, clanId) {
|
8417
|
+
deleteEvent(session, eventId, clanId, creatorId) {
|
8417
8418
|
return __async(this, null, function* () {
|
8418
8419
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
8419
8420
|
yield this.sessionRefresh(session);
|
8420
8421
|
}
|
8421
|
-
return this.apiClient.deleteEvent(session.token, eventId, clanId).then((response) => {
|
8422
|
+
return this.apiClient.deleteEvent(session.token, eventId, clanId, creatorId).then((response) => {
|
8422
8423
|
return response !== void 0;
|
8423
8424
|
});
|
8424
8425
|
});
|
@@ -9077,7 +9078,14 @@ var Client = class {
|
|
9077
9078
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
9078
9079
|
yield this.sessionRefresh(session);
|
9079
9080
|
}
|
9080
|
-
return this.apiClient.listNotifications(
|
9081
|
+
return this.apiClient.listNotifications(
|
9082
|
+
session.token,
|
9083
|
+
limit,
|
9084
|
+
clanId,
|
9085
|
+
notificationId,
|
9086
|
+
code,
|
9087
|
+
direction
|
9088
|
+
).then((response) => {
|
9081
9089
|
var result = {
|
9082
9090
|
cacheable_cursor: response.cacheable_cursor,
|
9083
9091
|
notifications: []
|