ntk-cms-api 20.26.6 → 20.26.7
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/fesm2022/ntk-cms-api.mjs +26 -39
- package/fesm2022/ntk-cms-api.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ntk-cms-api.d.ts +24 -44
package/fesm2022/ntk-cms-api.mjs
CHANGED
|
@@ -1788,68 +1788,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1788
1788
|
type: Injectable
|
|
1789
1789
|
}] });
|
|
1790
1790
|
|
|
1791
|
-
/**
|
|
1792
|
-
* سرویس وضعیت و مانیتورینگ میکروسرویسها
|
|
1793
|
-
*/
|
|
1794
1791
|
class CoreLogMicroServiceStatusService extends ApiServerBase {
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
this.http = http;
|
|
1792
|
+
getModuleControllerUrl() {
|
|
1793
|
+
return 'CoreLogMicroServiceStatus';
|
|
1798
1794
|
}
|
|
1799
|
-
|
|
1800
|
-
const base =
|
|
1801
|
-
|
|
1802
|
-
return v3Base + 'CoreLog/MicroServiceStatus';
|
|
1795
|
+
getBaseUrl() {
|
|
1796
|
+
const base = super.getBaseUrl();
|
|
1797
|
+
return base.replace(/\/v\d+\/?$/, '/v3/');
|
|
1803
1798
|
}
|
|
1804
|
-
/**
|
|
1805
|
-
* لیست آخرین وضعیت همه میکروسرویسها
|
|
1806
|
-
*/
|
|
1807
1799
|
ServiceGetAllStatus() {
|
|
1808
1800
|
return this.http
|
|
1809
|
-
.get(this.
|
|
1801
|
+
.get(this.getBaseUrl() + this.getModuleControllerUrl(), {
|
|
1802
|
+
headers: this.getHeaders(),
|
|
1803
|
+
})
|
|
1810
1804
|
.pipe(retry(this.configApiRetry), map((ret) => ret));
|
|
1811
1805
|
}
|
|
1812
|
-
/**
|
|
1813
|
-
* لیست وضعیت میکروسرویسها با فیلتر AppInfo (مثال: MagfaSms, Sms)
|
|
1814
|
-
*/
|
|
1815
1806
|
ServiceGetStatusByAppInfoFilter(appInfoFilter) {
|
|
1816
1807
|
return this.http
|
|
1817
|
-
.get(this.
|
|
1818
|
-
|
|
1808
|
+
.get(this.getBaseUrl() +
|
|
1809
|
+
this.getModuleControllerUrl() +
|
|
1810
|
+
'/' +
|
|
1811
|
+
encodeURIComponent(appInfoFilter), {
|
|
1812
|
+
headers: this.getHeaders(),
|
|
1819
1813
|
})
|
|
1820
1814
|
.pipe(retry(this.configApiRetry), map((ret) => ret));
|
|
1821
1815
|
}
|
|
1822
|
-
/**
|
|
1823
|
-
* ارسال Ping به میکروسرویس و دریافت RTT
|
|
1824
|
-
* @param appInfoFilter شناسه صف (مثال: MagfaSms)
|
|
1825
|
-
* @param timeoutSeconds حداکثر زمان انتظار (پیشفرض: 15)
|
|
1826
|
-
*/
|
|
1827
1816
|
ServicePing(appInfoFilter, timeoutSeconds = 15) {
|
|
1828
|
-
const url =
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1817
|
+
const url = this.getBaseUrl() +
|
|
1818
|
+
this.getModuleControllerUrl() +
|
|
1819
|
+
'/Ping/' +
|
|
1820
|
+
encodeURIComponent(appInfoFilter) +
|
|
1821
|
+
'?timeoutSeconds=' +
|
|
1822
|
+
timeoutSeconds;
|
|
1823
|
+
return this.http.post(url, {}, { headers: this.getHeaders() }).pipe(retry(this.configApiRetry), map((ret) => ret));
|
|
1832
1824
|
}
|
|
1833
|
-
/**
|
|
1834
|
-
* ارسال دستور به میکروسرویس
|
|
1835
|
-
* @param appInfoFilter شناسه صف (مثال: MagfaSms)
|
|
1836
|
-
* @param command دستور (commandType, payloadJson)
|
|
1837
|
-
*/
|
|
1838
1825
|
ServiceSendCommand(appInfoFilter, command) {
|
|
1839
|
-
const url =
|
|
1826
|
+
const url = this.getBaseUrl() +
|
|
1827
|
+
this.getModuleControllerUrl() +
|
|
1828
|
+
'/Command/' +
|
|
1829
|
+
encodeURIComponent(appInfoFilter);
|
|
1840
1830
|
return this.http
|
|
1841
1831
|
.post(url, command || {}, { headers: this.getHeaders() })
|
|
1842
1832
|
.pipe(retry(this.configApiRetry), map((ret) => ret));
|
|
1843
1833
|
}
|
|
1844
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CoreLogMicroServiceStatusService, deps:
|
|
1834
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CoreLogMicroServiceStatusService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1845
1835
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CoreLogMicroServiceStatusService }); }
|
|
1846
1836
|
}
|
|
1847
1837
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CoreLogMicroServiceStatusService, decorators: [{
|
|
1848
1838
|
type: Injectable
|
|
1849
|
-
}]
|
|
1850
|
-
type: Inject,
|
|
1851
|
-
args: [HttpClient]
|
|
1852
|
-
}] }] });
|
|
1839
|
+
}] });
|
|
1853
1840
|
|
|
1854
1841
|
class ApiServerConfigSiteBase extends ApiServerBase {
|
|
1855
1842
|
getModuleControllerUrl() {
|