mezon-js 2.12.70 → 2.12.71
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 +19 -20
- package/client.ts +4 -2
- package/dist/api.gen.d.ts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/mezon-js.cjs.js +9 -11
- package/dist/mezon-js.esm.mjs +9 -11
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -4698,38 +4698,37 @@ export class MezonApi {
|
|
4698
4698
|
}
|
4699
4699
|
|
4700
4700
|
/** List all attachment that are part of a channel. */
|
4701
|
-
listChannelAttachment(
|
4702
|
-
|
4703
|
-
|
4704
|
-
|
4705
|
-
|
4706
|
-
|
4707
|
-
|
4708
|
-
|
4709
|
-
|
4710
|
-
|
4701
|
+
listChannelAttachment(bearerToken: string,
|
4702
|
+
channelId:string,
|
4703
|
+
clanId?:string,
|
4704
|
+
fileType?:string,
|
4705
|
+
limit?:number,
|
4706
|
+
state?:number,
|
4707
|
+
before?:number,
|
4708
|
+
after?:number,
|
4709
|
+
around?:number,
|
4710
|
+
options: any = {}): Promise<ApiChannelAttachmentList> {
|
4711
|
+
|
4711
4712
|
if (channelId === null || channelId === undefined) {
|
4712
|
-
throw new Error(
|
4713
|
-
"'channelId' is a required parameter but is null or undefined."
|
4714
|
-
);
|
4713
|
+
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
4715
4714
|
}
|
4716
|
-
const urlPath = "/v2/channel/{channelId}/attachment"
|
4717
|
-
|
4718
|
-
encodeURIComponent(String(channelId))
|
4719
|
-
);
|
4715
|
+
const urlPath = "/v2/channel/{channelId}/attachment"
|
4716
|
+
.replace("{channelId}", encodeURIComponent(String(channelId)));
|
4720
4717
|
const queryParams = new Map<string, any>();
|
4721
4718
|
queryParams.set("clan_id", clanId);
|
4722
4719
|
queryParams.set("file_type", fileType);
|
4723
4720
|
queryParams.set("limit", limit);
|
4724
4721
|
queryParams.set("state", state);
|
4725
|
-
queryParams.set("
|
4722
|
+
queryParams.set("before", before);
|
4723
|
+
queryParams.set("after", after);
|
4724
|
+
queryParams.set("around", around);
|
4726
4725
|
|
4727
|
-
let bodyJson: string = "";
|
4726
|
+
let bodyJson : string = "";
|
4728
4727
|
|
4729
4728
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
4730
4729
|
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
4731
4730
|
if (bearerToken) {
|
4732
|
-
|
4731
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
4733
4732
|
}
|
4734
4733
|
|
4735
4734
|
return Promise.race([
|
package/client.ts
CHANGED
@@ -1435,7 +1435,8 @@ export class Client {
|
|
1435
1435
|
fileType: string,
|
1436
1436
|
state?: number,
|
1437
1437
|
limit?: number,
|
1438
|
-
|
1438
|
+
before?: number,
|
1439
|
+
after?: number,
|
1439
1440
|
): Promise<ApiChannelAttachmentList> {
|
1440
1441
|
if (
|
1441
1442
|
this.autoRefreshSession &&
|
@@ -1453,7 +1454,8 @@ export class Client {
|
|
1453
1454
|
fileType,
|
1454
1455
|
limit,
|
1455
1456
|
state,
|
1456
|
-
|
1457
|
+
before,
|
1458
|
+
after,
|
1457
1459
|
)
|
1458
1460
|
.then((response: ApiChannelAttachmentList) => {
|
1459
1461
|
var result: ApiChannelAttachmentList = {
|
package/dist/api.gen.d.ts
CHANGED
@@ -1977,7 +1977,7 @@ export declare class MezonApi {
|
|
1977
1977
|
/** Add users to a channel. */
|
1978
1978
|
addChannelUsers(bearerToken: string, channelId: string, userIds?: Array<string>, options?: any): Promise<any>;
|
1979
1979
|
/** List all attachment that are part of a channel. */
|
1980
|
-
listChannelAttachment(bearerToken: string, channelId: string, clanId?: string, fileType?: string, limit?: number, state?: number,
|
1980
|
+
listChannelAttachment(bearerToken: string, channelId: string, clanId?: string, fileType?: string, limit?: number, state?: number, before?: number, after?: number, around?: number, options?: any): Promise<ApiChannelAttachmentList>;
|
1981
1981
|
/** get channel encryption method */
|
1982
1982
|
getChanEncryptionMethod(bearerToken: string, channelId: string, method?: string, options?: any): Promise<ApiChanEncryptionMethod>;
|
1983
1983
|
/** store channel encryption method */
|
package/dist/client.d.ts
CHANGED
@@ -409,7 +409,7 @@ export declare class Client {
|
|
409
409
|
/** List a channel's users. */
|
410
410
|
listChannelUsers(session: Session, clanId: string, channelId: string, channelType: number, state?: number, limit?: number, cursor?: string): Promise<ApiChannelUserList>;
|
411
411
|
/** List a channel's attachment. */
|
412
|
-
listChannelAttachments(session: Session, clanId: string, channelId: string, fileType: string, state?: number, limit?: number,
|
412
|
+
listChannelAttachments(session: Session, clanId: string, channelId: string, fileType: string, state?: number, limit?: number, before?: number, after?: number): Promise<ApiChannelAttachmentList>;
|
413
413
|
/** List a channel's users. */
|
414
414
|
listClanUsers(session: Session, clanId: string): Promise<ApiClanUserList>;
|
415
415
|
/** List channels. */
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -1813,22 +1813,19 @@ var MezonApi = class {
|
|
1813
1813
|
]);
|
1814
1814
|
}
|
1815
1815
|
/** List all attachment that are part of a channel. */
|
1816
|
-
listChannelAttachment(bearerToken, channelId, clanId, fileType, limit, state,
|
1816
|
+
listChannelAttachment(bearerToken, channelId, clanId, fileType, limit, state, before, after, around, options = {}) {
|
1817
1817
|
if (channelId === null || channelId === void 0) {
|
1818
|
-
throw new Error(
|
1819
|
-
"'channelId' is a required parameter but is null or undefined."
|
1820
|
-
);
|
1818
|
+
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
1821
1819
|
}
|
1822
|
-
const urlPath = "/v2/channel/{channelId}/attachment".replace(
|
1823
|
-
"{channelId}",
|
1824
|
-
encodeURIComponent(String(channelId))
|
1825
|
-
);
|
1820
|
+
const urlPath = "/v2/channel/{channelId}/attachment".replace("{channelId}", encodeURIComponent(String(channelId)));
|
1826
1821
|
const queryParams = /* @__PURE__ */ new Map();
|
1827
1822
|
queryParams.set("clan_id", clanId);
|
1828
1823
|
queryParams.set("file_type", fileType);
|
1829
1824
|
queryParams.set("limit", limit);
|
1830
1825
|
queryParams.set("state", state);
|
1831
|
-
queryParams.set("
|
1826
|
+
queryParams.set("before", before);
|
1827
|
+
queryParams.set("after", after);
|
1828
|
+
queryParams.set("around", around);
|
1832
1829
|
let bodyJson = "";
|
1833
1830
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
1834
1831
|
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
@@ -8694,7 +8691,7 @@ var Client = class {
|
|
8694
8691
|
});
|
8695
8692
|
}
|
8696
8693
|
/** List a channel's attachment. */
|
8697
|
-
listChannelAttachments(session, clanId, channelId, fileType, state, limit,
|
8694
|
+
listChannelAttachments(session, clanId, channelId, fileType, state, limit, before, after) {
|
8698
8695
|
return __async(this, null, function* () {
|
8699
8696
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
|
8700
8697
|
yield this.sessionRefresh(session);
|
@@ -8706,7 +8703,8 @@ var Client = class {
|
|
8706
8703
|
fileType,
|
8707
8704
|
limit,
|
8708
8705
|
state,
|
8709
|
-
|
8706
|
+
before,
|
8707
|
+
after
|
8710
8708
|
).then((response) => {
|
8711
8709
|
var result = {
|
8712
8710
|
attachments: []
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -1779,22 +1779,19 @@ var MezonApi = class {
|
|
1779
1779
|
]);
|
1780
1780
|
}
|
1781
1781
|
/** List all attachment that are part of a channel. */
|
1782
|
-
listChannelAttachment(bearerToken, channelId, clanId, fileType, limit, state,
|
1782
|
+
listChannelAttachment(bearerToken, channelId, clanId, fileType, limit, state, before, after, around, options = {}) {
|
1783
1783
|
if (channelId === null || channelId === void 0) {
|
1784
|
-
throw new Error(
|
1785
|
-
"'channelId' is a required parameter but is null or undefined."
|
1786
|
-
);
|
1784
|
+
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
1787
1785
|
}
|
1788
|
-
const urlPath = "/v2/channel/{channelId}/attachment".replace(
|
1789
|
-
"{channelId}",
|
1790
|
-
encodeURIComponent(String(channelId))
|
1791
|
-
);
|
1786
|
+
const urlPath = "/v2/channel/{channelId}/attachment".replace("{channelId}", encodeURIComponent(String(channelId)));
|
1792
1787
|
const queryParams = /* @__PURE__ */ new Map();
|
1793
1788
|
queryParams.set("clan_id", clanId);
|
1794
1789
|
queryParams.set("file_type", fileType);
|
1795
1790
|
queryParams.set("limit", limit);
|
1796
1791
|
queryParams.set("state", state);
|
1797
|
-
queryParams.set("
|
1792
|
+
queryParams.set("before", before);
|
1793
|
+
queryParams.set("after", after);
|
1794
|
+
queryParams.set("around", around);
|
1798
1795
|
let bodyJson = "";
|
1799
1796
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
1800
1797
|
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
@@ -8660,7 +8657,7 @@ var Client = class {
|
|
8660
8657
|
});
|
8661
8658
|
}
|
8662
8659
|
/** List a channel's attachment. */
|
8663
|
-
listChannelAttachments(session, clanId, channelId, fileType, state, limit,
|
8660
|
+
listChannelAttachments(session, clanId, channelId, fileType, state, limit, before, after) {
|
8664
8661
|
return __async(this, null, function* () {
|
8665
8662
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
|
8666
8663
|
yield this.sessionRefresh(session);
|
@@ -8672,7 +8669,8 @@ var Client = class {
|
|
8672
8669
|
fileType,
|
8673
8670
|
limit,
|
8674
8671
|
state,
|
8675
|
-
|
8672
|
+
before,
|
8673
|
+
after
|
8676
8674
|
).then((response) => {
|
8677
8675
|
var result = {
|
8678
8676
|
attachments: []
|