@livechat/developer-studio-api 2.0.34 → 2.0.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/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +33 -0
- package/dist/index.mjs +33 -0
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -2306,8 +2306,10 @@ declare const api: {
|
|
|
2306
2306
|
monitoring: {
|
|
2307
2307
|
getUptimeReports(appId: string, payload: GetAppMonitoringUptimeReportPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringUptimeReportDto>;
|
|
2308
2308
|
getEvents(appId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEvent[]>;
|
|
2309
|
+
getEvent(appId: string, key: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEvent>;
|
|
2309
2310
|
getEventReports(appId: string, payload: GetAppMonitoringEventsReportPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEventsReportDto>;
|
|
2310
2311
|
getEventsLog(appId: string, payload: GetAppMonitoringEventsLogPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEventsLogDto>;
|
|
2312
|
+
upsertEvent(appId: string, event: AppMonitoringEvent, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
|
|
2311
2313
|
};
|
|
2312
2314
|
};
|
|
2313
2315
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -2306,8 +2306,10 @@ declare const api: {
|
|
|
2306
2306
|
monitoring: {
|
|
2307
2307
|
getUptimeReports(appId: string, payload: GetAppMonitoringUptimeReportPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringUptimeReportDto>;
|
|
2308
2308
|
getEvents(appId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEvent[]>;
|
|
2309
|
+
getEvent(appId: string, key: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEvent>;
|
|
2309
2310
|
getEventReports(appId: string, payload: GetAppMonitoringEventsReportPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEventsReportDto>;
|
|
2310
2311
|
getEventsLog(appId: string, payload: GetAppMonitoringEventsLogPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEventsLogDto>;
|
|
2312
|
+
upsertEvent(appId: string, event: AppMonitoringEvent, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
|
|
2311
2313
|
};
|
|
2312
2314
|
};
|
|
2313
2315
|
};
|
package/dist/index.js
CHANGED
|
@@ -1769,6 +1769,22 @@ var textAppMonitoringApi = {
|
|
|
1769
1769
|
}
|
|
1770
1770
|
});
|
|
1771
1771
|
},
|
|
1772
|
+
getEvent(appId, key, authorization) {
|
|
1773
|
+
return __async(this, null, function* () {
|
|
1774
|
+
try {
|
|
1775
|
+
const response = yield textClientInstance.get(
|
|
1776
|
+
`/app_monitoring/${appId}/events/${key}`,
|
|
1777
|
+
getTextClientConfig(authorization)
|
|
1778
|
+
);
|
|
1779
|
+
return response.data;
|
|
1780
|
+
} catch (error) {
|
|
1781
|
+
if (error instanceof Error) {
|
|
1782
|
+
throw new Error(`Couldn't load events. [${error.message}]`);
|
|
1783
|
+
}
|
|
1784
|
+
throw error;
|
|
1785
|
+
}
|
|
1786
|
+
});
|
|
1787
|
+
},
|
|
1772
1788
|
getEventReports(appId, payload, authorization) {
|
|
1773
1789
|
return __async(this, null, function* () {
|
|
1774
1790
|
try {
|
|
@@ -1800,6 +1816,23 @@ var textAppMonitoringApi = {
|
|
|
1800
1816
|
throw error;
|
|
1801
1817
|
}
|
|
1802
1818
|
});
|
|
1819
|
+
},
|
|
1820
|
+
upsertEvent(appId, event, authorization) {
|
|
1821
|
+
return __async(this, null, function* () {
|
|
1822
|
+
try {
|
|
1823
|
+
const response = yield textClientInstance.post(
|
|
1824
|
+
`/app_monitoring/${appId}/events/${event.key}`,
|
|
1825
|
+
event,
|
|
1826
|
+
getTextClientConfig(authorization)
|
|
1827
|
+
);
|
|
1828
|
+
return response.data;
|
|
1829
|
+
} catch (error) {
|
|
1830
|
+
if (error instanceof Error) {
|
|
1831
|
+
throw new Error(`Couldn't upsert events. [${error.message}]`);
|
|
1832
|
+
}
|
|
1833
|
+
throw error;
|
|
1834
|
+
}
|
|
1835
|
+
});
|
|
1803
1836
|
}
|
|
1804
1837
|
};
|
|
1805
1838
|
|
package/dist/index.mjs
CHANGED
|
@@ -1681,6 +1681,22 @@ var textAppMonitoringApi = {
|
|
|
1681
1681
|
}
|
|
1682
1682
|
});
|
|
1683
1683
|
},
|
|
1684
|
+
getEvent(appId, key, authorization) {
|
|
1685
|
+
return __async(this, null, function* () {
|
|
1686
|
+
try {
|
|
1687
|
+
const response = yield textClientInstance.get(
|
|
1688
|
+
`/app_monitoring/${appId}/events/${key}`,
|
|
1689
|
+
getTextClientConfig(authorization)
|
|
1690
|
+
);
|
|
1691
|
+
return response.data;
|
|
1692
|
+
} catch (error) {
|
|
1693
|
+
if (error instanceof Error) {
|
|
1694
|
+
throw new Error(`Couldn't load events. [${error.message}]`);
|
|
1695
|
+
}
|
|
1696
|
+
throw error;
|
|
1697
|
+
}
|
|
1698
|
+
});
|
|
1699
|
+
},
|
|
1684
1700
|
getEventReports(appId, payload, authorization) {
|
|
1685
1701
|
return __async(this, null, function* () {
|
|
1686
1702
|
try {
|
|
@@ -1712,6 +1728,23 @@ var textAppMonitoringApi = {
|
|
|
1712
1728
|
throw error;
|
|
1713
1729
|
}
|
|
1714
1730
|
});
|
|
1731
|
+
},
|
|
1732
|
+
upsertEvent(appId, event, authorization) {
|
|
1733
|
+
return __async(this, null, function* () {
|
|
1734
|
+
try {
|
|
1735
|
+
const response = yield textClientInstance.post(
|
|
1736
|
+
`/app_monitoring/${appId}/events/${event.key}`,
|
|
1737
|
+
event,
|
|
1738
|
+
getTextClientConfig(authorization)
|
|
1739
|
+
);
|
|
1740
|
+
return response.data;
|
|
1741
|
+
} catch (error) {
|
|
1742
|
+
if (error instanceof Error) {
|
|
1743
|
+
throw new Error(`Couldn't upsert events. [${error.message}]`);
|
|
1744
|
+
}
|
|
1745
|
+
throw error;
|
|
1746
|
+
}
|
|
1747
|
+
});
|
|
1715
1748
|
}
|
|
1716
1749
|
};
|
|
1717
1750
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livechat/developer-studio-api",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.36",
|
|
4
4
|
"description": "This project is API for LiveChat Developer Studio.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
"@types/node": "^17.0.12",
|
|
18
18
|
"tsup": "^7.1.0",
|
|
19
19
|
"typescript": "^5.1.6",
|
|
20
|
-
"types": "0.0.1",
|
|
21
20
|
"config": "0.0.0",
|
|
22
21
|
"tsconfig": "0.0.0",
|
|
22
|
+
"types": "0.0.1",
|
|
23
23
|
"eslint-config-custom-lib": "0.0.1"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|