mezon-js 2.10.8 → 2.10.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 +0 -62
- package/client.ts +0 -50
- package/dist/api.gen.d.ts +0 -13
- package/dist/client.d.ts +1 -3
- package/dist/mezon-js.cjs.js +0 -64
- package/dist/mezon-js.esm.mjs +0 -64
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -1724,24 +1724,6 @@ export interface ApiOssrsHttpCallbackResponse {
|
|
1724
1724
|
msg?: string;
|
1725
1725
|
}
|
1726
1726
|
|
1727
|
-
/** A list of users belonging to a channel, along with their role. */
|
1728
|
-
export interface ApiPTTChannelUser {
|
1729
|
-
//
|
1730
|
-
channel_id?: string;
|
1731
|
-
//
|
1732
|
-
id?: string;
|
1733
|
-
//
|
1734
|
-
participant?: string;
|
1735
|
-
//user for a channel.
|
1736
|
-
user_id?: string;
|
1737
|
-
}
|
1738
|
-
|
1739
|
-
/** A list of users belonging to a channel, along with their role. */
|
1740
|
-
export interface ApiPTTChannelUserList {
|
1741
|
-
//
|
1742
|
-
ptt_channel_users?: Array<ApiPTTChannelUser>;
|
1743
|
-
}
|
1744
|
-
|
1745
1727
|
/** */
|
1746
1728
|
export interface ApiPermission {
|
1747
1729
|
//
|
@@ -8049,50 +8031,6 @@ export class MezonApi {
|
|
8049
8031
|
]);
|
8050
8032
|
}
|
8051
8033
|
|
8052
|
-
/** List all users in ptt channel. */
|
8053
|
-
listPTTChannelUsers(
|
8054
|
-
bearerToken: string,
|
8055
|
-
clanId?: string,
|
8056
|
-
channelId?: string,
|
8057
|
-
channelType?: number,
|
8058
|
-
limit?: number,
|
8059
|
-
state?: number,
|
8060
|
-
cursor?: string,
|
8061
|
-
options: any = {}
|
8062
|
-
): Promise<ApiPTTChannelUserList> {
|
8063
|
-
const urlPath = "/v2/ptt_channels/users";
|
8064
|
-
const queryParams = new Map<string, any>();
|
8065
|
-
queryParams.set("clan_id", clanId);
|
8066
|
-
queryParams.set("channel_id", channelId);
|
8067
|
-
queryParams.set("channel_type", channelType);
|
8068
|
-
queryParams.set("limit", limit);
|
8069
|
-
queryParams.set("state", state);
|
8070
|
-
queryParams.set("cursor", cursor);
|
8071
|
-
|
8072
|
-
let bodyJson: string = "";
|
8073
|
-
|
8074
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
8075
|
-
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
8076
|
-
if (bearerToken) {
|
8077
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
8078
|
-
}
|
8079
|
-
|
8080
|
-
return Promise.race([
|
8081
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
8082
|
-
if (response.status == 204) {
|
8083
|
-
return response;
|
8084
|
-
} else if (response.status >= 200 && response.status < 300) {
|
8085
|
-
return response.json();
|
8086
|
-
} else {
|
8087
|
-
throw response;
|
8088
|
-
}
|
8089
|
-
}),
|
8090
|
-
new Promise((_, reject) =>
|
8091
|
-
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
8092
|
-
),
|
8093
|
-
]);
|
8094
|
-
}
|
8095
|
-
|
8096
8034
|
/** get pubkey */
|
8097
8035
|
getPubKeys(
|
8098
8036
|
bearerToken: string,
|
package/client.ts
CHANGED
@@ -153,7 +153,6 @@ import {
|
|
153
153
|
ApiUserStatus,
|
154
154
|
ApiListOnboardingStepResponse,
|
155
155
|
MezonUpdateOnboardingStepByClanIdBody,
|
156
|
-
ApiPTTChannelUserList,
|
157
156
|
ApiWalletLedgerList,
|
158
157
|
ApiSdTopicList,
|
159
158
|
ApiSdTopicRequest,
|
@@ -4715,55 +4714,6 @@ export class Client {
|
|
4715
4714
|
});
|
4716
4715
|
}
|
4717
4716
|
|
4718
|
-
/** List a ptt channel's users. */
|
4719
|
-
async listPTTChannelUsers(
|
4720
|
-
session: Session,
|
4721
|
-
clanId: string,
|
4722
|
-
channelId: string,
|
4723
|
-
channelType: number,
|
4724
|
-
state?: number,
|
4725
|
-
limit?: number,
|
4726
|
-
cursor?: string
|
4727
|
-
): Promise<ApiPTTChannelUserList> {
|
4728
|
-
if (
|
4729
|
-
this.autoRefreshSession &&
|
4730
|
-
session.refresh_token &&
|
4731
|
-
session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
|
4732
|
-
) {
|
4733
|
-
await this.sessionRefresh(session);
|
4734
|
-
}
|
4735
|
-
|
4736
|
-
return this.apiClient
|
4737
|
-
.listPTTChannelUsers(
|
4738
|
-
session.token,
|
4739
|
-
clanId,
|
4740
|
-
channelId,
|
4741
|
-
channelType,
|
4742
|
-
limit,
|
4743
|
-
state,
|
4744
|
-
cursor
|
4745
|
-
)
|
4746
|
-
.then((response: ApiPTTChannelUserList) => {
|
4747
|
-
var result: ApiPTTChannelUserList = {
|
4748
|
-
ptt_channel_users: [],
|
4749
|
-
};
|
4750
|
-
|
4751
|
-
if (response.ptt_channel_users == null) {
|
4752
|
-
return Promise.resolve(result);
|
4753
|
-
}
|
4754
|
-
|
4755
|
-
response.ptt_channel_users!.forEach((gu) => {
|
4756
|
-
result.ptt_channel_users!.push({
|
4757
|
-
id: gu.id,
|
4758
|
-
channel_id: gu.channel_id,
|
4759
|
-
user_id: gu.user_id,
|
4760
|
-
participant: gu.participant,
|
4761
|
-
});
|
4762
|
-
});
|
4763
|
-
return Promise.resolve(result);
|
4764
|
-
});
|
4765
|
-
}
|
4766
|
-
|
4767
4717
|
//**list wallet ledger */
|
4768
4718
|
async listWalletLedger(
|
4769
4719
|
session: Session,
|
package/dist/api.gen.d.ts
CHANGED
@@ -1001,17 +1001,6 @@ export interface ApiOssrsHttpCallbackResponse {
|
|
1001
1001
|
code?: number;
|
1002
1002
|
msg?: string;
|
1003
1003
|
}
|
1004
|
-
/** A list of users belonging to a channel, along with their role. */
|
1005
|
-
export interface ApiPTTChannelUser {
|
1006
|
-
channel_id?: string;
|
1007
|
-
id?: string;
|
1008
|
-
participant?: string;
|
1009
|
-
user_id?: string;
|
1010
|
-
}
|
1011
|
-
/** A list of users belonging to a channel, along with their role. */
|
1012
|
-
export interface ApiPTTChannelUserList {
|
1013
|
-
ptt_channel_users?: Array<ApiPTTChannelUser>;
|
1014
|
-
}
|
1015
1004
|
/** */
|
1016
1005
|
export interface ApiPermission {
|
1017
1006
|
active?: number;
|
@@ -1867,8 +1856,6 @@ export declare class MezonApi {
|
|
1867
1856
|
getPinMessagesList(bearerToken: string, messageId?: string, channelId?: string, clanId?: string, options?: any): Promise<ApiPinMessagesList>;
|
1868
1857
|
/** set notification user channel. */
|
1869
1858
|
createPinMessage(bearerToken: string, body: ApiPinMessageRequest, options?: any): Promise<ApiChannelMessageHeader>;
|
1870
|
-
/** List all users in ptt channel. */
|
1871
|
-
listPTTChannelUsers(bearerToken: string, clanId?: string, channelId?: string, channelType?: number, limit?: number, state?: number, cursor?: string, options?: any): Promise<ApiPTTChannelUserList>;
|
1872
1859
|
/** get pubkey */
|
1873
1860
|
getPubKeys(bearerToken: string, userIds?: Array<string>, options?: any): Promise<ApiGetPubKeysResponse>;
|
1874
1861
|
/** store pubkey for e2ee */
|
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, 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, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiWithdrawTokenRequest, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody,
|
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, 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, 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 } from "./api.gen";
|
17
17
|
import { Session } from "./session";
|
18
18
|
import { Socket } from "./socket";
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
@@ -627,8 +627,6 @@ export declare class Client {
|
|
627
627
|
updateOnboardingStepByClanId(session: Session, clan_id: string, request: MezonUpdateOnboardingStepByClanIdBody): Promise<boolean>;
|
628
628
|
updateUserStatus(session: Session, request: ApiUserStatusUpdate): Promise<boolean>;
|
629
629
|
getUserStatus(session: Session): Promise<ApiUserStatus>;
|
630
|
-
/** List a ptt channel's users. */
|
631
|
-
listPTTChannelUsers(session: Session, clanId: string, channelId: string, channelType: number, state?: number, limit?: number, cursor?: string): Promise<ApiPTTChannelUserList>;
|
632
630
|
listWalletLedger(session: Session, limit?: number, cursor?: string, transactionId?: string): Promise<ApiWalletLedgerList>;
|
633
631
|
listSdTopic(session: Session, channelId?: string, limit?: number): Promise<ApiSdTopicList>;
|
634
632
|
createSdTopic(session: Session, request: ApiSdTopicRequest): Promise<ApiSdTopic>;
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -4869,37 +4869,6 @@ var MezonApi = class {
|
|
4869
4869
|
)
|
4870
4870
|
]);
|
4871
4871
|
}
|
4872
|
-
/** List all users in ptt channel. */
|
4873
|
-
listPTTChannelUsers(bearerToken, clanId, channelId, channelType, limit, state, cursor, options = {}) {
|
4874
|
-
const urlPath = "/v2/ptt_channels/users";
|
4875
|
-
const queryParams = /* @__PURE__ */ new Map();
|
4876
|
-
queryParams.set("clan_id", clanId);
|
4877
|
-
queryParams.set("channel_id", channelId);
|
4878
|
-
queryParams.set("channel_type", channelType);
|
4879
|
-
queryParams.set("limit", limit);
|
4880
|
-
queryParams.set("state", state);
|
4881
|
-
queryParams.set("cursor", cursor);
|
4882
|
-
let bodyJson = "";
|
4883
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
4884
|
-
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
4885
|
-
if (bearerToken) {
|
4886
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
4887
|
-
}
|
4888
|
-
return Promise.race([
|
4889
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
4890
|
-
if (response.status == 204) {
|
4891
|
-
return response;
|
4892
|
-
} else if (response.status >= 200 && response.status < 300) {
|
4893
|
-
return response.json();
|
4894
|
-
} else {
|
4895
|
-
throw response;
|
4896
|
-
}
|
4897
|
-
}),
|
4898
|
-
new Promise(
|
4899
|
-
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
4900
|
-
)
|
4901
|
-
]);
|
4902
|
-
}
|
4903
4872
|
/** get pubkey */
|
4904
4873
|
getPubKeys(bearerToken, userIds, options = {}) {
|
4905
4874
|
const urlPath = "/v2/pubkey";
|
@@ -10510,39 +10479,6 @@ var Client = class {
|
|
10510
10479
|
});
|
10511
10480
|
});
|
10512
10481
|
}
|
10513
|
-
/** List a ptt channel's users. */
|
10514
|
-
listPTTChannelUsers(session, clanId, channelId, channelType, state, limit, cursor) {
|
10515
|
-
return __async(this, null, function* () {
|
10516
|
-
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
10517
|
-
yield this.sessionRefresh(session);
|
10518
|
-
}
|
10519
|
-
return this.apiClient.listPTTChannelUsers(
|
10520
|
-
session.token,
|
10521
|
-
clanId,
|
10522
|
-
channelId,
|
10523
|
-
channelType,
|
10524
|
-
limit,
|
10525
|
-
state,
|
10526
|
-
cursor
|
10527
|
-
).then((response) => {
|
10528
|
-
var result = {
|
10529
|
-
ptt_channel_users: []
|
10530
|
-
};
|
10531
|
-
if (response.ptt_channel_users == null) {
|
10532
|
-
return Promise.resolve(result);
|
10533
|
-
}
|
10534
|
-
response.ptt_channel_users.forEach((gu) => {
|
10535
|
-
result.ptt_channel_users.push({
|
10536
|
-
id: gu.id,
|
10537
|
-
channel_id: gu.channel_id,
|
10538
|
-
user_id: gu.user_id,
|
10539
|
-
participant: gu.participant
|
10540
|
-
});
|
10541
|
-
});
|
10542
|
-
return Promise.resolve(result);
|
10543
|
-
});
|
10544
|
-
});
|
10545
|
-
}
|
10546
10482
|
//**list wallet ledger */
|
10547
10483
|
listWalletLedger(session, limit, cursor, transactionId) {
|
10548
10484
|
return __async(this, null, function* () {
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -4835,37 +4835,6 @@ var MezonApi = class {
|
|
4835
4835
|
)
|
4836
4836
|
]);
|
4837
4837
|
}
|
4838
|
-
/** List all users in ptt channel. */
|
4839
|
-
listPTTChannelUsers(bearerToken, clanId, channelId, channelType, limit, state, cursor, options = {}) {
|
4840
|
-
const urlPath = "/v2/ptt_channels/users";
|
4841
|
-
const queryParams = /* @__PURE__ */ new Map();
|
4842
|
-
queryParams.set("clan_id", clanId);
|
4843
|
-
queryParams.set("channel_id", channelId);
|
4844
|
-
queryParams.set("channel_type", channelType);
|
4845
|
-
queryParams.set("limit", limit);
|
4846
|
-
queryParams.set("state", state);
|
4847
|
-
queryParams.set("cursor", cursor);
|
4848
|
-
let bodyJson = "";
|
4849
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
4850
|
-
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
4851
|
-
if (bearerToken) {
|
4852
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
4853
|
-
}
|
4854
|
-
return Promise.race([
|
4855
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
4856
|
-
if (response.status == 204) {
|
4857
|
-
return response;
|
4858
|
-
} else if (response.status >= 200 && response.status < 300) {
|
4859
|
-
return response.json();
|
4860
|
-
} else {
|
4861
|
-
throw response;
|
4862
|
-
}
|
4863
|
-
}),
|
4864
|
-
new Promise(
|
4865
|
-
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
4866
|
-
)
|
4867
|
-
]);
|
4868
|
-
}
|
4869
4838
|
/** get pubkey */
|
4870
4839
|
getPubKeys(bearerToken, userIds, options = {}) {
|
4871
4840
|
const urlPath = "/v2/pubkey";
|
@@ -10476,39 +10445,6 @@ var Client = class {
|
|
10476
10445
|
});
|
10477
10446
|
});
|
10478
10447
|
}
|
10479
|
-
/** List a ptt channel's users. */
|
10480
|
-
listPTTChannelUsers(session, clanId, channelId, channelType, state, limit, cursor) {
|
10481
|
-
return __async(this, null, function* () {
|
10482
|
-
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
10483
|
-
yield this.sessionRefresh(session);
|
10484
|
-
}
|
10485
|
-
return this.apiClient.listPTTChannelUsers(
|
10486
|
-
session.token,
|
10487
|
-
clanId,
|
10488
|
-
channelId,
|
10489
|
-
channelType,
|
10490
|
-
limit,
|
10491
|
-
state,
|
10492
|
-
cursor
|
10493
|
-
).then((response) => {
|
10494
|
-
var result = {
|
10495
|
-
ptt_channel_users: []
|
10496
|
-
};
|
10497
|
-
if (response.ptt_channel_users == null) {
|
10498
|
-
return Promise.resolve(result);
|
10499
|
-
}
|
10500
|
-
response.ptt_channel_users.forEach((gu) => {
|
10501
|
-
result.ptt_channel_users.push({
|
10502
|
-
id: gu.id,
|
10503
|
-
channel_id: gu.channel_id,
|
10504
|
-
user_id: gu.user_id,
|
10505
|
-
participant: gu.participant
|
10506
|
-
});
|
10507
|
-
});
|
10508
|
-
return Promise.resolve(result);
|
10509
|
-
});
|
10510
|
-
});
|
10511
|
-
}
|
10512
10448
|
//**list wallet ledger */
|
10513
10449
|
listWalletLedger(session, limit, cursor, transactionId) {
|
10514
10450
|
return __async(this, null, function* () {
|