mezon-js 2.10.35 → 2.10.36
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 +33 -0
- package/client.ts +20 -0
- package/dist/api.gen.d.ts +2 -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
@@ -10602,6 +10602,39 @@ export class MezonApi {
|
|
10602
10602
|
]);
|
10603
10603
|
}
|
10604
10604
|
|
10605
|
+
/** Sd Topic */
|
10606
|
+
getTopicDetail(bearerToken: string,
|
10607
|
+
topicId?:string,
|
10608
|
+
options: any = {}): Promise<ApiSdTopic> {
|
10609
|
+
|
10610
|
+
const urlPath = "/v2/sdmtopic/detail";
|
10611
|
+
const queryParams = new Map<string, any>();
|
10612
|
+
queryParams.set("topic_id", topicId);
|
10613
|
+
|
10614
|
+
let bodyJson : string = "";
|
10615
|
+
|
10616
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
10617
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
10618
|
+
if (bearerToken) {
|
10619
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
10620
|
+
}
|
10621
|
+
|
10622
|
+
return Promise.race([
|
10623
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
10624
|
+
if (response.status == 204) {
|
10625
|
+
return response;
|
10626
|
+
} else if (response.status >= 200 && response.status < 300) {
|
10627
|
+
return response.json();
|
10628
|
+
} else {
|
10629
|
+
throw response;
|
10630
|
+
}
|
10631
|
+
}),
|
10632
|
+
new Promise((_, reject) =>
|
10633
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
10634
|
+
),
|
10635
|
+
]);
|
10636
|
+
}
|
10637
|
+
|
10605
10638
|
/** List onboarding step. */
|
10606
10639
|
listOnboardingStep(
|
10607
10640
|
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
@@ -1995,6 +1995,8 @@ export declare class MezonApi {
|
|
1995
1995
|
deleteClanWebhookById(bearerToken: string, id: string, clanId?: string, options?: any): Promise<any>;
|
1996
1996
|
/** Update clan webhook by id. */
|
1997
1997
|
updateClanWebhookById(bearerToken: string, id: string, body: MezonUpdateClanWebhookByIdBody, options?: any): Promise<any>;
|
1998
|
+
/** Sd Topic */
|
1999
|
+
getTopicDetail(bearerToken: string, topicId?: string, options?: any): Promise<ApiSdTopic>;
|
1998
2000
|
/** List onboarding step. */
|
1999
2001
|
listOnboardingStep(bearerToken: string, clanId?: string, limit?: number, page?: number, options?: any): Promise<ApiListOnboardingStepResponse>;
|
2000
2002
|
/** 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,
|