@livechat/developer-studio-api 2.0.35 → 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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +17 -0
- package/dist/index.mjs +17 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2309,6 +2309,7 @@ declare const api: {
|
|
|
2309
2309
|
getEvent(appId: string, key: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEvent>;
|
|
2310
2310
|
getEventReports(appId: string, payload: GetAppMonitoringEventsReportPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEventsReportDto>;
|
|
2311
2311
|
getEventsLog(appId: string, payload: GetAppMonitoringEventsLogPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEventsLogDto>;
|
|
2312
|
+
upsertEvent(appId: string, event: AppMonitoringEvent, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
|
|
2312
2313
|
};
|
|
2313
2314
|
};
|
|
2314
2315
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -2309,6 +2309,7 @@ declare const api: {
|
|
|
2309
2309
|
getEvent(appId: string, key: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEvent>;
|
|
2310
2310
|
getEventReports(appId: string, payload: GetAppMonitoringEventsReportPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEventsReportDto>;
|
|
2311
2311
|
getEventsLog(appId: string, payload: GetAppMonitoringEventsLogPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEventsLogDto>;
|
|
2312
|
+
upsertEvent(appId: string, event: AppMonitoringEvent, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
|
|
2312
2313
|
};
|
|
2313
2314
|
};
|
|
2314
2315
|
};
|
package/dist/index.js
CHANGED
|
@@ -1816,6 +1816,23 @@ var textAppMonitoringApi = {
|
|
|
1816
1816
|
throw error;
|
|
1817
1817
|
}
|
|
1818
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
|
+
});
|
|
1819
1836
|
}
|
|
1820
1837
|
};
|
|
1821
1838
|
|
package/dist/index.mjs
CHANGED
|
@@ -1728,6 +1728,23 @@ var textAppMonitoringApi = {
|
|
|
1728
1728
|
throw error;
|
|
1729
1729
|
}
|
|
1730
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
|
+
});
|
|
1731
1748
|
}
|
|
1732
1749
|
};
|
|
1733
1750
|
|