mezon-js 2.10.35 → 2.10.37
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 +35 -0
- package/client.ts +20 -0
- package/dist/api.gen.d.ts +3 -0
- package/dist/client.d.ts +1 -0
- package/dist/mezon-js.cjs.js +37 -0
- package/dist/mezon-js.esm.mjs +37 -0
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -2022,6 +2022,8 @@ export interface ApiSdTopic {
|
|
2022
2022
|
status?: number;
|
2023
2023
|
//
|
2024
2024
|
update_time?: string;
|
2025
|
+
//
|
2026
|
+
message?: ApiChannelMessage;
|
2025
2027
|
}
|
2026
2028
|
|
2027
2029
|
/** */
|
@@ -10602,6 +10604,39 @@ export class MezonApi {
|
|
10602
10604
|
]);
|
10603
10605
|
}
|
10604
10606
|
|
10607
|
+
/** Sd Topic */
|
10608
|
+
getTopicDetail(bearerToken: string,
|
10609
|
+
topicId?:string,
|
10610
|
+
options: any = {}): Promise<ApiSdTopic> {
|
10611
|
+
|
10612
|
+
const urlPath = "/v2/sdmtopic/detail";
|
10613
|
+
const queryParams = new Map<string, any>();
|
10614
|
+
queryParams.set("topic_id", topicId);
|
10615
|
+
|
10616
|
+
let bodyJson : string = "";
|
10617
|
+
|
10618
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
10619
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
10620
|
+
if (bearerToken) {
|
10621
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
10622
|
+
}
|
10623
|
+
|
10624
|
+
return Promise.race([
|
10625
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
10626
|
+
if (response.status == 204) {
|
10627
|
+
return response;
|
10628
|
+
} else if (response.status >= 200 && response.status < 300) {
|
10629
|
+
return response.json();
|
10630
|
+
} else {
|
10631
|
+
throw response;
|
10632
|
+
}
|
10633
|
+
}),
|
10634
|
+
new Promise((_, reject) =>
|
10635
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
10636
|
+
),
|
10637
|
+
]);
|
10638
|
+
}
|
10639
|
+
|
10605
10640
|
/** List onboarding step. */
|
10606
10641
|
listOnboardingStep(
|
10607
10642
|
bearerToken: string,
|
package/client.ts
CHANGED
@@ -4840,4 +4840,24 @@ export class Client {
|
|
4840
4840
|
return response;
|
4841
4841
|
});
|
4842
4842
|
}
|
4843
|
+
|
4844
|
+
//**list sd topic */
|
4845
|
+
async getTopicDetail(
|
4846
|
+
session: Session,
|
4847
|
+
topicId?: string,
|
4848
|
+
): Promise<ApiSdTopic> {
|
4849
|
+
if (
|
4850
|
+
this.autoRefreshSession &&
|
4851
|
+
session.refresh_token &&
|
4852
|
+
session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
|
4853
|
+
) {
|
4854
|
+
await this.sessionRefresh(session);
|
4855
|
+
}
|
4856
|
+
|
4857
|
+
return this.apiClient
|
4858
|
+
.getTopicDetail(session.token, topicId)
|
4859
|
+
.then((response: ApiSdTopic) => {
|
4860
|
+
return Promise.resolve(response);
|
4861
|
+
});
|
4862
|
+
}
|
4843
4863
|
}
|
package/dist/api.gen.d.ts
CHANGED
@@ -1174,6 +1174,7 @@ export interface ApiSdTopic {
|
|
1174
1174
|
message_id?: string;
|
1175
1175
|
status?: number;
|
1176
1176
|
update_time?: string;
|
1177
|
+
message?: ApiChannelMessage;
|
1177
1178
|
}
|
1178
1179
|
/** */
|
1179
1180
|
export interface ApiSdTopicList {
|
@@ -1995,6 +1996,8 @@ export declare class MezonApi {
|
|
1995
1996
|
deleteClanWebhookById(bearerToken: string, id: string, clanId?: string, options?: any): Promise<any>;
|
1996
1997
|
/** Update clan webhook by id. */
|
1997
1998
|
updateClanWebhookById(bearerToken: string, id: string, body: MezonUpdateClanWebhookByIdBody, options?: any): Promise<any>;
|
1999
|
+
/** Sd Topic */
|
2000
|
+
getTopicDetail(bearerToken: string, topicId?: string, options?: any): Promise<ApiSdTopic>;
|
1998
2001
|
/** List onboarding step. */
|
1999
2002
|
listOnboardingStep(bearerToken: string, clanId?: string, limit?: number, page?: number, options?: any): Promise<ApiListOnboardingStepResponse>;
|
2000
2003
|
/** Update onboarding step. */
|
package/dist/client.d.ts
CHANGED
@@ -634,4 +634,5 @@ export declare class Client {
|
|
634
634
|
listWalletLedger(session: Session, limit?: number, cursor?: string, transactionId?: string): Promise<ApiWalletLedgerList>;
|
635
635
|
listSdTopic(session: Session, channelId?: string, limit?: number): Promise<ApiSdTopicList>;
|
636
636
|
createSdTopic(session: Session, request: ApiSdTopicRequest): Promise<ApiSdTopic>;
|
637
|
+
getTopicDetail(session: Session, topicId?: string): Promise<ApiSdTopic>;
|
637
638
|
}
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -6857,6 +6857,32 @@ var MezonApi = class {
|
|
6857
6857
|
)
|
6858
6858
|
]);
|
6859
6859
|
}
|
6860
|
+
/** Sd Topic */
|
6861
|
+
getTopicDetail(bearerToken, topicId, options = {}) {
|
6862
|
+
const urlPath = "/v2/sdmtopic/detail";
|
6863
|
+
const queryParams = /* @__PURE__ */ new Map();
|
6864
|
+
queryParams.set("topic_id", topicId);
|
6865
|
+
let bodyJson = "";
|
6866
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6867
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
6868
|
+
if (bearerToken) {
|
6869
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6870
|
+
}
|
6871
|
+
return Promise.race([
|
6872
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6873
|
+
if (response.status == 204) {
|
6874
|
+
return response;
|
6875
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6876
|
+
return response.json();
|
6877
|
+
} else {
|
6878
|
+
throw response;
|
6879
|
+
}
|
6880
|
+
}),
|
6881
|
+
new Promise(
|
6882
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6883
|
+
)
|
6884
|
+
]);
|
6885
|
+
}
|
6860
6886
|
/** List onboarding step. */
|
6861
6887
|
listOnboardingStep(bearerToken, clanId, limit, page, options = {}) {
|
6862
6888
|
const urlPath = "/v2/onboardingsteps";
|
@@ -10600,4 +10626,15 @@ var Client = class {
|
|
10600
10626
|
});
|
10601
10627
|
});
|
10602
10628
|
}
|
10629
|
+
//**list sd topic */
|
10630
|
+
getTopicDetail(session, topicId) {
|
10631
|
+
return __async(this, null, function* () {
|
10632
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
10633
|
+
yield this.sessionRefresh(session);
|
10634
|
+
}
|
10635
|
+
return this.apiClient.getTopicDetail(session.token, topicId).then((response) => {
|
10636
|
+
return Promise.resolve(response);
|
10637
|
+
});
|
10638
|
+
});
|
10639
|
+
}
|
10603
10640
|
};
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -6823,6 +6823,32 @@ var MezonApi = class {
|
|
6823
6823
|
)
|
6824
6824
|
]);
|
6825
6825
|
}
|
6826
|
+
/** Sd Topic */
|
6827
|
+
getTopicDetail(bearerToken, topicId, options = {}) {
|
6828
|
+
const urlPath = "/v2/sdmtopic/detail";
|
6829
|
+
const queryParams = /* @__PURE__ */ new Map();
|
6830
|
+
queryParams.set("topic_id", topicId);
|
6831
|
+
let bodyJson = "";
|
6832
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6833
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
6834
|
+
if (bearerToken) {
|
6835
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6836
|
+
}
|
6837
|
+
return Promise.race([
|
6838
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6839
|
+
if (response.status == 204) {
|
6840
|
+
return response;
|
6841
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6842
|
+
return response.json();
|
6843
|
+
} else {
|
6844
|
+
throw response;
|
6845
|
+
}
|
6846
|
+
}),
|
6847
|
+
new Promise(
|
6848
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6849
|
+
)
|
6850
|
+
]);
|
6851
|
+
}
|
6826
6852
|
/** List onboarding step. */
|
6827
6853
|
listOnboardingStep(bearerToken, clanId, limit, page, options = {}) {
|
6828
6854
|
const urlPath = "/v2/onboardingsteps";
|
@@ -10566,6 +10592,17 @@ var Client = class {
|
|
10566
10592
|
});
|
10567
10593
|
});
|
10568
10594
|
}
|
10595
|
+
//**list sd topic */
|
10596
|
+
getTopicDetail(session, topicId) {
|
10597
|
+
return __async(this, null, function* () {
|
10598
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
10599
|
+
yield this.sessionRefresh(session);
|
10600
|
+
}
|
10601
|
+
return this.apiClient.getTopicDetail(session.token, topicId).then((response) => {
|
10602
|
+
return Promise.resolve(response);
|
10603
|
+
});
|
10604
|
+
});
|
10605
|
+
}
|
10569
10606
|
};
|
10570
10607
|
export {
|
10571
10608
|
ChannelStreamMode,
|