@livechat/developer-studio-api 2.3.58 → 2.3.60
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 +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +23 -1
- package/dist/index.mjs +23 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import * as axios from 'axios';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
|
|
4
|
+
interface AgentDto$1 {
|
|
5
|
+
id: string;
|
|
6
|
+
account_id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
avatar: string;
|
|
9
|
+
role: string;
|
|
10
|
+
login_status: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
4
13
|
interface AppEventDto {
|
|
5
14
|
name: string;
|
|
6
15
|
aggregateName: string;
|
|
@@ -2560,6 +2569,9 @@ declare const api: {
|
|
|
2560
2569
|
getUser(): Promise<AgentDto>;
|
|
2561
2570
|
};
|
|
2562
2571
|
configuration: {
|
|
2572
|
+
agents: {
|
|
2573
|
+
getAgents(authorization?: LiveChatClientInstanceAuthorization | undefined): Promise<axios.AxiosResponse<AgentDto$1[]>>;
|
|
2574
|
+
};
|
|
2563
2575
|
property: {
|
|
2564
2576
|
getProperties(clientId: string, isAgent?: boolean | undefined, authorization?: LiveChatClientInstanceAuthorization | undefined): Promise<axios.AxiosResponse<PropertiesDto>>;
|
|
2565
2577
|
registerProperty(property: Property, authorization?: LiveChatClientInstanceAuthorization | undefined): Promise<axios.AxiosResponse<undefined>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import * as axios from 'axios';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
|
|
4
|
+
interface AgentDto$1 {
|
|
5
|
+
id: string;
|
|
6
|
+
account_id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
avatar: string;
|
|
9
|
+
role: string;
|
|
10
|
+
login_status: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
4
13
|
interface AppEventDto {
|
|
5
14
|
name: string;
|
|
6
15
|
aggregateName: string;
|
|
@@ -2560,6 +2569,9 @@ declare const api: {
|
|
|
2560
2569
|
getUser(): Promise<AgentDto>;
|
|
2561
2570
|
};
|
|
2562
2571
|
configuration: {
|
|
2572
|
+
agents: {
|
|
2573
|
+
getAgents(authorization?: LiveChatClientInstanceAuthorization | undefined): Promise<axios.AxiosResponse<AgentDto$1[]>>;
|
|
2574
|
+
};
|
|
2563
2575
|
property: {
|
|
2564
2576
|
getProperties(clientId: string, isAgent?: boolean | undefined, authorization?: LiveChatClientInstanceAuthorization | undefined): Promise<axios.AxiosResponse<PropertiesDto>>;
|
|
2565
2577
|
registerProperty(property: Property, authorization?: LiveChatClientInstanceAuthorization | undefined): Promise<axios.AxiosResponse<undefined>>;
|
package/dist/index.js
CHANGED
|
@@ -2817,6 +2817,27 @@ var livechatAgentApi = {
|
|
|
2817
2817
|
}
|
|
2818
2818
|
};
|
|
2819
2819
|
|
|
2820
|
+
// src/apis/products/livechat/configuration/agents/api.ts
|
|
2821
|
+
var livechatAgentsApi = {
|
|
2822
|
+
getAgents(authorization) {
|
|
2823
|
+
return __async(this, null, function* () {
|
|
2824
|
+
try {
|
|
2825
|
+
const response = yield livechatClientInstance.get(
|
|
2826
|
+
`/v3.5/configuration/action/list_agents`,
|
|
2827
|
+
getLiveChatClientConfig(authorization)
|
|
2828
|
+
);
|
|
2829
|
+
return response;
|
|
2830
|
+
} catch (error) {
|
|
2831
|
+
if (error instanceof Error) {
|
|
2832
|
+
throw new Error(`Agents couldn't be fetched. [${error.message}]`);
|
|
2833
|
+
} else {
|
|
2834
|
+
throw error;
|
|
2835
|
+
}
|
|
2836
|
+
}
|
|
2837
|
+
});
|
|
2838
|
+
}
|
|
2839
|
+
};
|
|
2840
|
+
|
|
2820
2841
|
// src/constants/notifications.ts
|
|
2821
2842
|
var API_NOTIFICATIONS = {
|
|
2822
2843
|
BUILDING_BLOCKS: {
|
|
@@ -3220,6 +3241,7 @@ var livechatWebhookApi = {
|
|
|
3220
3241
|
|
|
3221
3242
|
// src/apis/products/livechat/configuration/api.ts
|
|
3222
3243
|
var livechatConfigurationApi = {
|
|
3244
|
+
agents: livechatAgentsApi,
|
|
3223
3245
|
property: livechatPropertyApi,
|
|
3224
3246
|
webhook: livechatWebhookApi
|
|
3225
3247
|
};
|
|
@@ -4789,7 +4811,7 @@ var platformDpsApplicationApi = {
|
|
|
4789
4811
|
publish(appId, authorization) {
|
|
4790
4812
|
return __async(this, null, function* () {
|
|
4791
4813
|
try {
|
|
4792
|
-
return yield platformDpsClientInstance.
|
|
4814
|
+
return yield platformDpsClientInstance.put(
|
|
4793
4815
|
`/v2/applications/${appId}/publish`,
|
|
4794
4816
|
{},
|
|
4795
4817
|
getPlatformDpsClientConfig(authorization)
|
package/dist/index.mjs
CHANGED
|
@@ -2721,6 +2721,27 @@ var livechatAgentApi = {
|
|
|
2721
2721
|
}
|
|
2722
2722
|
};
|
|
2723
2723
|
|
|
2724
|
+
// src/apis/products/livechat/configuration/agents/api.ts
|
|
2725
|
+
var livechatAgentsApi = {
|
|
2726
|
+
getAgents(authorization) {
|
|
2727
|
+
return __async(this, null, function* () {
|
|
2728
|
+
try {
|
|
2729
|
+
const response = yield livechatClientInstance.get(
|
|
2730
|
+
`/v3.5/configuration/action/list_agents`,
|
|
2731
|
+
getLiveChatClientConfig(authorization)
|
|
2732
|
+
);
|
|
2733
|
+
return response;
|
|
2734
|
+
} catch (error) {
|
|
2735
|
+
if (error instanceof Error) {
|
|
2736
|
+
throw new Error(`Agents couldn't be fetched. [${error.message}]`);
|
|
2737
|
+
} else {
|
|
2738
|
+
throw error;
|
|
2739
|
+
}
|
|
2740
|
+
}
|
|
2741
|
+
});
|
|
2742
|
+
}
|
|
2743
|
+
};
|
|
2744
|
+
|
|
2724
2745
|
// src/constants/notifications.ts
|
|
2725
2746
|
var API_NOTIFICATIONS = {
|
|
2726
2747
|
BUILDING_BLOCKS: {
|
|
@@ -3124,6 +3145,7 @@ var livechatWebhookApi = {
|
|
|
3124
3145
|
|
|
3125
3146
|
// src/apis/products/livechat/configuration/api.ts
|
|
3126
3147
|
var livechatConfigurationApi = {
|
|
3148
|
+
agents: livechatAgentsApi,
|
|
3127
3149
|
property: livechatPropertyApi,
|
|
3128
3150
|
webhook: livechatWebhookApi
|
|
3129
3151
|
};
|
|
@@ -4693,7 +4715,7 @@ var platformDpsApplicationApi = {
|
|
|
4693
4715
|
publish(appId, authorization) {
|
|
4694
4716
|
return __async(this, null, function* () {
|
|
4695
4717
|
try {
|
|
4696
|
-
return yield platformDpsClientInstance.
|
|
4718
|
+
return yield platformDpsClientInstance.put(
|
|
4697
4719
|
`/v2/applications/${appId}/publish`,
|
|
4698
4720
|
{},
|
|
4699
4721
|
getPlatformDpsClientConfig(authorization)
|