@livechat/developer-studio-api 2.3.9 → 2.3.11

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
@@ -442,9 +442,9 @@ interface TextPlatformDashboardPaymentDto {
442
442
  interface TextPlatformDashboardReportItemDto {
443
443
  usage: number;
444
444
  amount: number;
445
- client_id: string;
446
- api_type: string;
447
- method: string;
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
 
@@ -2428,6 +2428,7 @@ declare const api: {
2428
2428
  getReport(params: GetTextPlatformDashboardReportParams, authorization?: TextClientInstanceAuthorization | undefined): Promise<TextPlatformDashboardReportDto>;
2429
2429
  getCredits(authorization?: TextClientInstanceAuthorization | undefined): Promise<TextPlatformDashboardCreditsDto>;
2430
2430
  getPayment(authorization?: TextClientInstanceAuthorization | undefined): Promise<TextPlatformDashboardPaymentDto>;
2431
+ registerDeveloper(authorization?: TextClientInstanceAuthorization | undefined): Promise<any>;
2431
2432
  };
2432
2433
  };
2433
2434
  };
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
- client_id: string;
446
- api_type: string;
447
- method: string;
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
 
@@ -2428,6 +2428,7 @@ declare const api: {
2428
2428
  getReport(params: GetTextPlatformDashboardReportParams, authorization?: TextClientInstanceAuthorization | undefined): Promise<TextPlatformDashboardReportDto>;
2429
2429
  getCredits(authorization?: TextClientInstanceAuthorization | undefined): Promise<TextPlatformDashboardCreditsDto>;
2430
2430
  getPayment(authorization?: TextClientInstanceAuthorization | undefined): Promise<TextPlatformDashboardPaymentDto>;
2431
+ registerDeveloper(authorization?: TextClientInstanceAuthorization | undefined): Promise<any>;
2431
2432
  };
2432
2433
  };
2433
2434
  };
package/dist/index.js CHANGED
@@ -2110,6 +2110,22 @@ var textPlatformDashboardApi = {
2110
2110
  throw error;
2111
2111
  }
2112
2112
  });
2113
+ },
2114
+ registerDeveloper(authorization) {
2115
+ return __async(this, null, function* () {
2116
+ try {
2117
+ const response = yield textClientInstance.post(
2118
+ `/platform_dashboard/credits`,
2119
+ getTextClientConfig(authorization)
2120
+ );
2121
+ return response.data;
2122
+ } catch (error) {
2123
+ if (error instanceof Error) {
2124
+ throw new Error(`Couldn't register developer. [${error.message}]`);
2125
+ }
2126
+ throw error;
2127
+ }
2128
+ });
2113
2129
  }
2114
2130
  };
2115
2131
 
package/dist/index.mjs CHANGED
@@ -2019,6 +2019,22 @@ var textPlatformDashboardApi = {
2019
2019
  throw error;
2020
2020
  }
2021
2021
  });
2022
+ },
2023
+ registerDeveloper(authorization) {
2024
+ return __async(this, null, function* () {
2025
+ try {
2026
+ const response = yield textClientInstance.post(
2027
+ `/platform_dashboard/credits`,
2028
+ getTextClientConfig(authorization)
2029
+ );
2030
+ return response.data;
2031
+ } catch (error) {
2032
+ if (error instanceof Error) {
2033
+ throw new Error(`Couldn't register developer. [${error.message}]`);
2034
+ }
2035
+ throw error;
2036
+ }
2037
+ });
2022
2038
  }
2023
2039
  };
2024
2040
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livechat/developer-studio-api",
3
- "version": "2.3.9",
3
+ "version": "2.3.11",
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
- "config": "0.0.1",
21
20
  "eslint-config-custom": "0.0.2",
22
- "tsconfig": "0.0.1"
21
+ "tsconfig": "0.0.1",
22
+ "config": "0.0.1"
23
23
  },
24
24
  "scripts": {
25
25
  "build": "tsup src/index.ts --format esm,cjs --dts",