@livechat/developer-studio-api 2.3.8 → 2.3.10
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 +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +19 -5
- package/dist/index.mjs +19 -5
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -442,9 +442,9 @@ interface TextPlatformDashboardPaymentDto {
|
|
|
442
442
|
interface TextPlatformDashboardReportItemDto {
|
|
443
443
|
usage: number;
|
|
444
444
|
amount: number;
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
445
|
+
service?: "agent-api" | "customer-api" | "configuration-api" | "lc-webhooks" | "reports-api";
|
|
446
|
+
action?: string;
|
|
447
|
+
source?: string;
|
|
448
448
|
}
|
|
449
449
|
type TextPlatformDashboardReportDto = Record<string, TextPlatformDashboardReportItemDto[]>;
|
|
450
450
|
|
package/dist/index.d.ts
CHANGED
|
@@ -442,9 +442,9 @@ interface TextPlatformDashboardPaymentDto {
|
|
|
442
442
|
interface TextPlatformDashboardReportItemDto {
|
|
443
443
|
usage: number;
|
|
444
444
|
amount: number;
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
445
|
+
service?: "agent-api" | "customer-api" | "configuration-api" | "lc-webhooks" | "reports-api";
|
|
446
|
+
action?: string;
|
|
447
|
+
source?: string;
|
|
448
448
|
}
|
|
449
449
|
type TextPlatformDashboardReportDto = Record<string, TextPlatformDashboardReportItemDto[]>;
|
|
450
450
|
|
package/dist/index.js
CHANGED
|
@@ -2047,11 +2047,25 @@ var textPlatformDashboardApi = {
|
|
|
2047
2047
|
getReport(params, authorization) {
|
|
2048
2048
|
return __async(this, null, function* () {
|
|
2049
2049
|
try {
|
|
2050
|
-
const searchParams = new URLSearchParams(
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
)
|
|
2054
|
-
|
|
2050
|
+
const searchParams = new URLSearchParams();
|
|
2051
|
+
Object.keys(params).forEach((entry) => {
|
|
2052
|
+
const key = entry;
|
|
2053
|
+
if (key === "group_by") {
|
|
2054
|
+
const value = params[key];
|
|
2055
|
+
if (!value) {
|
|
2056
|
+
return;
|
|
2057
|
+
}
|
|
2058
|
+
value.forEach((innerValue) => {
|
|
2059
|
+
searchParams.append(key, innerValue);
|
|
2060
|
+
});
|
|
2061
|
+
} else {
|
|
2062
|
+
const value = params[key];
|
|
2063
|
+
if (!value) {
|
|
2064
|
+
return;
|
|
2065
|
+
}
|
|
2066
|
+
searchParams.append(key, value);
|
|
2067
|
+
}
|
|
2068
|
+
});
|
|
2055
2069
|
const response = yield textClientInstance.get(
|
|
2056
2070
|
`/platform_dashboard/report?${searchParams.toString()}`,
|
|
2057
2071
|
getTextClientConfig(authorization)
|
package/dist/index.mjs
CHANGED
|
@@ -1956,11 +1956,25 @@ var textPlatformDashboardApi = {
|
|
|
1956
1956
|
getReport(params, authorization) {
|
|
1957
1957
|
return __async(this, null, function* () {
|
|
1958
1958
|
try {
|
|
1959
|
-
const searchParams = new URLSearchParams(
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
)
|
|
1963
|
-
|
|
1959
|
+
const searchParams = new URLSearchParams();
|
|
1960
|
+
Object.keys(params).forEach((entry) => {
|
|
1961
|
+
const key = entry;
|
|
1962
|
+
if (key === "group_by") {
|
|
1963
|
+
const value = params[key];
|
|
1964
|
+
if (!value) {
|
|
1965
|
+
return;
|
|
1966
|
+
}
|
|
1967
|
+
value.forEach((innerValue) => {
|
|
1968
|
+
searchParams.append(key, innerValue);
|
|
1969
|
+
});
|
|
1970
|
+
} else {
|
|
1971
|
+
const value = params[key];
|
|
1972
|
+
if (!value) {
|
|
1973
|
+
return;
|
|
1974
|
+
}
|
|
1975
|
+
searchParams.append(key, value);
|
|
1976
|
+
}
|
|
1977
|
+
});
|
|
1964
1978
|
const response = yield textClientInstance.get(
|
|
1965
1979
|
`/platform_dashboard/report?${searchParams.toString()}`,
|
|
1966
1980
|
getTextClientConfig(authorization)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livechat/developer-studio-api",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.10",
|
|
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,8 +17,8 @@
|
|
|
17
17
|
"@types/node": "^17.0.12",
|
|
18
18
|
"tsup": "^7.1.0",
|
|
19
19
|
"typescript": "^5.1.6",
|
|
20
|
-
"config": "0.0.1",
|
|
21
20
|
"eslint-config-custom": "0.0.2",
|
|
21
|
+
"config": "0.0.1",
|
|
22
22
|
"tsconfig": "0.0.1"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|