mezon-js 2.7.54 → 2.7.55

Sign up to get free protection for your applications and to get access to all the features.
package/api.gen.ts CHANGED
@@ -386,16 +386,6 @@ export interface ApiClanUserList {
386
386
  cursor?: string;
387
387
  }
388
388
 
389
- /** A collection of zero or more friends of the user. */
390
- export interface ApiCommonToUsersList {
391
- //The Clan objects.
392
- clandesc?: Array<ApiClanDesc>;
393
- //Cursor for the next page of results, if any.
394
- cursor?: string;
395
- //The Friend objects.
396
- friends?: Array<ApiFriend>;
397
- }
398
-
399
389
  /** */
400
390
  export interface ApiCreateCategoryDescRequest {
401
391
  //
@@ -3284,45 +3274,6 @@ export class MezonApi {
3284
3274
  ]);
3285
3275
  }
3286
3276
 
3287
- /** List common friends for the current user. */
3288
- listCommonToUsers(bearerToken: string,
3289
- limit?:number,
3290
- state?:number,
3291
- cursor?:string,
3292
- friendId?:string,
3293
- options: any = {}): Promise<ApiCommonToUsersList> {
3294
-
3295
- const urlPath = "/v2/commonfriend";
3296
- const queryParams = new Map<string, any>();
3297
- queryParams.set("limit", limit);
3298
- queryParams.set("state", state);
3299
- queryParams.set("cursor", cursor);
3300
- queryParams.set("friend_id", friendId);
3301
-
3302
- let bodyJson : string = "";
3303
-
3304
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3305
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
3306
- if (bearerToken) {
3307
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
3308
- }
3309
-
3310
- return Promise.race([
3311
- fetch(fullUrl, fetchOptions).then((response) => {
3312
- if (response.status == 204) {
3313
- return response;
3314
- } else if (response.status >= 200 && response.status < 300) {
3315
- return response.json();
3316
- } else {
3317
- throw response;
3318
- }
3319
- }),
3320
- new Promise((_, reject) =>
3321
- setTimeout(reject, this.timeoutMs, "Request timed out.")
3322
- ),
3323
- ]);
3324
- }
3325
-
3326
3277
  /** */
3327
3278
  createCategoryDesc(bearerToken: string,
3328
3279
  body:ApiCreateCategoryDescRequest,
package/client.ts CHANGED
@@ -94,7 +94,6 @@ import {
94
94
  ApiWebhookResponse,
95
95
  ApiDeleteChannelDescRequest,
96
96
  ApiChangeChannelPrivateRequest,
97
- ApiCommonToUsersList,
98
97
  } from "./api.gen";
99
98
 
100
99
  import { Session } from "./session";
@@ -1961,19 +1960,6 @@ export class Client {
1961
1960
 
1962
1961
  });
1963
1962
  }
1964
-
1965
- /** */
1966
- async listCommonToUsers(session: Session, userId?: string, state?: number, limit?: number, cursor?: string): Promise<ApiCommonToUsersList> {
1967
- if (this.autoRefreshSession && session.refresh_token &&
1968
- session.isexpired((Date.now() + this.expiredTimespanMs)/1000)) {
1969
- await this.sessionRefresh(session);
1970
- }
1971
-
1972
- return this.apiClient.listCommonToUsers(session.token, limit, state, cursor, userId).then((response: ApiCommonToUsersList) => {
1973
- return Promise.resolve(response);
1974
-
1975
- });
1976
- }
1977
1963
 
1978
1964
  /** Get permission of user in the clan */
1979
1965
  async GetPermissionOfUserInTheClan(session: Session, clanId:string): Promise<ApiPermissionList> {
package/dist/api.gen.d.ts CHANGED
@@ -220,12 +220,6 @@ export interface ApiClanUserList {
220
220
  clan_users?: Array<ClanUserListClanUser>;
221
221
  cursor?: string;
222
222
  }
223
- /** A collection of zero or more friends of the user. */
224
- export interface ApiCommonToUsersList {
225
- clandesc?: Array<ApiClanDesc>;
226
- cursor?: string;
227
- friends?: Array<ApiFriend>;
228
- }
229
223
  /** */
230
224
  export interface ApiCreateCategoryDescRequest {
231
225
  category_name?: string;
@@ -864,8 +858,6 @@ export declare class MezonApi {
864
858
  getClanDescProfile(bearerToken: string, clanId: string, options?: any): Promise<ApiClanDescProfile>;
865
859
  /** Update fields in a given clan profile. */
866
860
  updateClanDescProfile(bearerToken: string, clanId: string, body: {}, options?: any): Promise<any>;
867
- /** List common friends for the current user. */
868
- listCommonToUsers(bearerToken: string, limit?: number, state?: number, cursor?: string, friendId?: string, options?: any): Promise<ApiCommonToUsersList>;
869
861
  /** */
870
862
  createCategoryDesc(bearerToken: string, body: ApiCreateCategoryDescRequest, options?: any): Promise<ApiCategoryDesc>;
871
863
  /** */
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, ApiRoleList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiDeleteStorageObjectsRequest, ApiEvent, ApiReadStorageObjectsRequest, ApiStorageObjectAcks, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiUpdateEventRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiNotificationChannelCategoySettingsList, ApiNotificationSetting, ApiSetDefaultNotificationRequest, ApiNotificationUserChannel, ApiSetNotificationRequest, ApiNotifiReactMessage, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiCreateWebhookRequest, ApiWebhookResponse, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiCommonToUsersList } from "./api.gen";
16
+ import { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiRoleList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiDeleteStorageObjectsRequest, ApiEvent, ApiReadStorageObjectsRequest, ApiStorageObjectAcks, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiUpdateEventRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiNotificationChannelCategoySettingsList, ApiNotificationSetting, ApiSetDefaultNotificationRequest, ApiNotificationUserChannel, ApiSetNotificationRequest, ApiNotifiReactMessage, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiCreateWebhookRequest, ApiWebhookResponse, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest } from "./api.gen";
17
17
  import { Session } from "./session";
18
18
  import { Socket } from "./socket";
19
19
  import { WebSocketAdapter } from "./web_socket_adapter";
@@ -541,8 +541,6 @@ export declare class Client {
541
541
  createLinkInviteUser(session: Session, request: ApiLinkInviteUserRequest): Promise<ApiLinkInviteUser>;
542
542
  /** Get link invite user */
543
543
  getLinkInvite(session: Session, inviteId: string): Promise<ApiInviteUserRes>;
544
- /** */
545
- listCommonToUsers(session: Session, userId?: string, state?: number, limit?: number, cursor?: string): Promise<ApiCommonToUsersList>;
546
544
  /** Get permission of user in the clan */
547
545
  GetPermissionOfUserInTheClan(session: Session, clanId: string): Promise<ApiPermissionList>;
548
546
  /** invite user */
@@ -2189,35 +2189,6 @@ var MezonApi = class {
2189
2189
  )
2190
2190
  ]);
2191
2191
  }
2192
- /** List common friends for the current user. */
2193
- listCommonToUsers(bearerToken, limit, state, cursor, friendId, options = {}) {
2194
- const urlPath = "/v2/commonfriend";
2195
- const queryParams = /* @__PURE__ */ new Map();
2196
- queryParams.set("limit", limit);
2197
- queryParams.set("state", state);
2198
- queryParams.set("cursor", cursor);
2199
- queryParams.set("friend_id", friendId);
2200
- let bodyJson = "";
2201
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
2202
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
2203
- if (bearerToken) {
2204
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
2205
- }
2206
- return Promise.race([
2207
- fetch(fullUrl, fetchOptions).then((response) => {
2208
- if (response.status == 204) {
2209
- return response;
2210
- } else if (response.status >= 200 && response.status < 300) {
2211
- return response.json();
2212
- } else {
2213
- throw response;
2214
- }
2215
- }),
2216
- new Promise(
2217
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
2218
- )
2219
- ]);
2220
- }
2221
2192
  /** */
2222
2193
  createCategoryDesc(bearerToken, body, options = {}) {
2223
2194
  if (body === null || body === void 0) {
@@ -6033,17 +6004,6 @@ var Client = class {
6033
6004
  });
6034
6005
  });
6035
6006
  }
6036
- /** */
6037
- listCommonToUsers(session, userId, state, limit, cursor) {
6038
- return __async(this, null, function* () {
6039
- if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
6040
- yield this.sessionRefresh(session);
6041
- }
6042
- return this.apiClient.listCommonToUsers(session.token, limit, state, cursor, userId).then((response) => {
6043
- return Promise.resolve(response);
6044
- });
6045
- });
6046
- }
6047
6007
  /** Get permission of user in the clan */
6048
6008
  GetPermissionOfUserInTheClan(session, clanId) {
6049
6009
  return __async(this, null, function* () {
@@ -2160,35 +2160,6 @@ var MezonApi = class {
2160
2160
  )
2161
2161
  ]);
2162
2162
  }
2163
- /** List common friends for the current user. */
2164
- listCommonToUsers(bearerToken, limit, state, cursor, friendId, options = {}) {
2165
- const urlPath = "/v2/commonfriend";
2166
- const queryParams = /* @__PURE__ */ new Map();
2167
- queryParams.set("limit", limit);
2168
- queryParams.set("state", state);
2169
- queryParams.set("cursor", cursor);
2170
- queryParams.set("friend_id", friendId);
2171
- let bodyJson = "";
2172
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
2173
- const fetchOptions = buildFetchOptions("GET", options, bodyJson);
2174
- if (bearerToken) {
2175
- fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
2176
- }
2177
- return Promise.race([
2178
- fetch(fullUrl, fetchOptions).then((response) => {
2179
- if (response.status == 204) {
2180
- return response;
2181
- } else if (response.status >= 200 && response.status < 300) {
2182
- return response.json();
2183
- } else {
2184
- throw response;
2185
- }
2186
- }),
2187
- new Promise(
2188
- (_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
2189
- )
2190
- ]);
2191
- }
2192
2163
  /** */
2193
2164
  createCategoryDesc(bearerToken, body, options = {}) {
2194
2165
  if (body === null || body === void 0) {
@@ -6004,17 +5975,6 @@ var Client = class {
6004
5975
  });
6005
5976
  });
6006
5977
  }
6007
- /** */
6008
- listCommonToUsers(session, userId, state, limit, cursor) {
6009
- return __async(this, null, function* () {
6010
- if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
6011
- yield this.sessionRefresh(session);
6012
- }
6013
- return this.apiClient.listCommonToUsers(session.token, limit, state, cursor, userId).then((response) => {
6014
- return Promise.resolve(response);
6015
- });
6016
- });
6017
- }
6018
5978
  /** Get permission of user in the clan */
6019
5979
  GetPermissionOfUserInTheClan(session, clanId) {
6020
5980
  return __async(this, null, function* () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.7.54",
3
+ "version": "2.7.55",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },