@livechat/developer-studio-api 2.0.44 → 2.0.46

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 CHANGED
@@ -422,24 +422,11 @@ interface AppMonitoringReportParams {
422
422
  resolution: "hourly" | "daily" | "monthly";
423
423
  }
424
424
 
425
- interface GetAppMonitoringCustomReportDataPayload {
426
- from: string;
427
- to: string;
428
- resolution: "hourly" | "daily" | "monthly";
429
- }
425
+ type GetAppMonitoringCustomReportDataPayload = AppMonitoringReportParams;
430
426
 
431
- interface GetAppMonitoringUptimeReportPayload {
432
- from: string;
433
- to: string;
434
- resolution: "hourly" | "daily" | "monthly";
435
- }
427
+ type GetAppMonitoringUptimeReportPayload = AppMonitoringReportParams;
436
428
 
437
- interface GetAppMonitoringEventsReportPayload {
438
- from: string;
439
- to: string;
440
- resolution: "hourly" | "daily" | "monthly";
441
- type: string | undefined;
442
- }
429
+ type GetAppMonitoringEventsReportPayload = AppMonitoringReportParams;
443
430
 
444
431
  interface AppMonitoringEvent {
445
432
  key: string;
@@ -456,10 +443,9 @@ interface AppMonitoringEventsLogDto {
456
443
  }
457
444
 
458
445
  interface GetAppMonitoringEventsLogPayload {
459
- from: string;
460
- to: string;
461
- type: string;
462
- search: string;
446
+ type?: string;
447
+ from?: string;
448
+ search?: string;
463
449
  }
464
450
 
465
451
  interface TextClientInstanceAuthorization {
@@ -2338,8 +2324,8 @@ declare const api: {
2338
2324
  deleteEvent(appId: string, eventKey: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
2339
2325
  };
2340
2326
  reports: {
2341
- getUptimeReports(appId: string, payload: GetAppMonitoringUptimeReportPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringUptimeReportDto>;
2342
- getEventReports(appId: string, payload: GetAppMonitoringEventsReportPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEventsReportDto>;
2327
+ getUptimeReports(appId: string, payload: AppMonitoringReportParams, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringUptimeReportDto>;
2328
+ getEventReports(appId: string, payload: AppMonitoringReportParams, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEventsReportDto>;
2343
2329
  getCustomReport(appId: string, customReportId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReport>;
2344
2330
  getCustomReportData(appId: string, customReportId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReportDataDto>;
2345
2331
  getCustomReports(appId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReport[]>;
package/dist/index.d.ts CHANGED
@@ -422,24 +422,11 @@ interface AppMonitoringReportParams {
422
422
  resolution: "hourly" | "daily" | "monthly";
423
423
  }
424
424
 
425
- interface GetAppMonitoringCustomReportDataPayload {
426
- from: string;
427
- to: string;
428
- resolution: "hourly" | "daily" | "monthly";
429
- }
425
+ type GetAppMonitoringCustomReportDataPayload = AppMonitoringReportParams;
430
426
 
431
- interface GetAppMonitoringUptimeReportPayload {
432
- from: string;
433
- to: string;
434
- resolution: "hourly" | "daily" | "monthly";
435
- }
427
+ type GetAppMonitoringUptimeReportPayload = AppMonitoringReportParams;
436
428
 
437
- interface GetAppMonitoringEventsReportPayload {
438
- from: string;
439
- to: string;
440
- resolution: "hourly" | "daily" | "monthly";
441
- type: string | undefined;
442
- }
429
+ type GetAppMonitoringEventsReportPayload = AppMonitoringReportParams;
443
430
 
444
431
  interface AppMonitoringEvent {
445
432
  key: string;
@@ -456,10 +443,9 @@ interface AppMonitoringEventsLogDto {
456
443
  }
457
444
 
458
445
  interface GetAppMonitoringEventsLogPayload {
459
- from: string;
460
- to: string;
461
- type: string;
462
- search: string;
446
+ type?: string;
447
+ from?: string;
448
+ search?: string;
463
449
  }
464
450
 
465
451
  interface TextClientInstanceAuthorization {
@@ -2338,8 +2324,8 @@ declare const api: {
2338
2324
  deleteEvent(appId: string, eventKey: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<void>;
2339
2325
  };
2340
2326
  reports: {
2341
- getUptimeReports(appId: string, payload: GetAppMonitoringUptimeReportPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringUptimeReportDto>;
2342
- getEventReports(appId: string, payload: GetAppMonitoringEventsReportPayload, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEventsReportDto>;
2327
+ getUptimeReports(appId: string, payload: AppMonitoringReportParams, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringUptimeReportDto>;
2328
+ getEventReports(appId: string, payload: AppMonitoringReportParams, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringEventsReportDto>;
2343
2329
  getCustomReport(appId: string, customReportId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReport>;
2344
2330
  getCustomReportData(appId: string, customReportId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReportDataDto>;
2345
2331
  getCustomReports(appId: string, authorization?: TextClientInstanceAuthorization | undefined): Promise<AppMonitoringCustomReport[]>;
package/dist/index.js CHANGED
@@ -1771,9 +1771,14 @@ var textAppMonitoringEventsApi = {
1771
1771
  },
1772
1772
  getEventsLog(appId, payload, authorization) {
1773
1773
  return __async(this, null, function* () {
1774
+ var _a, _b, _c;
1774
1775
  try {
1775
1776
  const response = yield textClientInstance.get(
1776
- `/app_monitoring/${appId}/events/logs?from=${payload.from}&to=${payload.to}&type=${payload.type}&search=${payload.search}`,
1777
+ `/app_monitoring/${appId}/events/logs?${new URLSearchParams({
1778
+ from: (_a = payload.from) != null ? _a : "",
1779
+ type: (_b = payload.type) != null ? _b : "",
1780
+ search: (_c = payload.search) != null ? _c : ""
1781
+ }).toString()}`,
1777
1782
  getTextClientConfig(authorization)
1778
1783
  );
1779
1784
  return response.data;
@@ -1826,7 +1831,11 @@ var textAppMonitoringReportsApi = {
1826
1831
  return __async(this, null, function* () {
1827
1832
  try {
1828
1833
  const response = yield textClientInstance.get(
1829
- `/app_monitoring/${appId}/reports/uptime?from=${payload.from}&to=${payload.to}&resolution=${payload.resolution}`,
1834
+ `/app_monitoring/${appId}/reports/uptime?${new URLSearchParams({
1835
+ from: payload.from,
1836
+ to: payload.to,
1837
+ resolution: payload.resolution
1838
+ }).toString()}`,
1830
1839
  getTextClientConfig(authorization)
1831
1840
  );
1832
1841
  return response.data;
@@ -1842,7 +1851,11 @@ var textAppMonitoringReportsApi = {
1842
1851
  return __async(this, null, function* () {
1843
1852
  try {
1844
1853
  const response = yield textClientInstance.get(
1845
- `/app_monitoring/${appId}/reports/events?from=${payload.from}&to=${payload.to}&resolution=${payload.resolution}&type=${payload.type}`,
1854
+ `/app_monitoring/${appId}/reports/events?${new URLSearchParams({
1855
+ from: payload.from,
1856
+ to: payload.to,
1857
+ resolution: payload.resolution
1858
+ }).toString()}`,
1846
1859
  getTextClientConfig(authorization)
1847
1860
  );
1848
1861
  return response.data;
package/dist/index.mjs CHANGED
@@ -1683,9 +1683,14 @@ var textAppMonitoringEventsApi = {
1683
1683
  },
1684
1684
  getEventsLog(appId, payload, authorization) {
1685
1685
  return __async(this, null, function* () {
1686
+ var _a, _b, _c;
1686
1687
  try {
1687
1688
  const response = yield textClientInstance.get(
1688
- `/app_monitoring/${appId}/events/logs?from=${payload.from}&to=${payload.to}&type=${payload.type}&search=${payload.search}`,
1689
+ `/app_monitoring/${appId}/events/logs?${new URLSearchParams({
1690
+ from: (_a = payload.from) != null ? _a : "",
1691
+ type: (_b = payload.type) != null ? _b : "",
1692
+ search: (_c = payload.search) != null ? _c : ""
1693
+ }).toString()}`,
1689
1694
  getTextClientConfig(authorization)
1690
1695
  );
1691
1696
  return response.data;
@@ -1738,7 +1743,11 @@ var textAppMonitoringReportsApi = {
1738
1743
  return __async(this, null, function* () {
1739
1744
  try {
1740
1745
  const response = yield textClientInstance.get(
1741
- `/app_monitoring/${appId}/reports/uptime?from=${payload.from}&to=${payload.to}&resolution=${payload.resolution}`,
1746
+ `/app_monitoring/${appId}/reports/uptime?${new URLSearchParams({
1747
+ from: payload.from,
1748
+ to: payload.to,
1749
+ resolution: payload.resolution
1750
+ }).toString()}`,
1742
1751
  getTextClientConfig(authorization)
1743
1752
  );
1744
1753
  return response.data;
@@ -1754,7 +1763,11 @@ var textAppMonitoringReportsApi = {
1754
1763
  return __async(this, null, function* () {
1755
1764
  try {
1756
1765
  const response = yield textClientInstance.get(
1757
- `/app_monitoring/${appId}/reports/events?from=${payload.from}&to=${payload.to}&resolution=${payload.resolution}&type=${payload.type}`,
1766
+ `/app_monitoring/${appId}/reports/events?${new URLSearchParams({
1767
+ from: payload.from,
1768
+ to: payload.to,
1769
+ resolution: payload.resolution
1770
+ }).toString()}`,
1758
1771
  getTextClientConfig(authorization)
1759
1772
  );
1760
1773
  return response.data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livechat/developer-studio-api",
3
- "version": "2.0.44",
3
+ "version": "2.0.46",
4
4
  "description": "This project is API for LiveChat Developer Studio.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -19,8 +19,8 @@
19
19
  "typescript": "^5.1.6",
20
20
  "config": "0.0.0",
21
21
  "tsconfig": "0.0.0",
22
- "eslint-config-custom-lib": "0.0.1",
23
- "types": "0.0.1"
22
+ "types": "0.0.1",
23
+ "eslint-config-custom-lib": "0.0.1"
24
24
  },
25
25
  "scripts": {
26
26
  "build": "tsup src/index.ts --format esm,cjs --dts",