twilio 4.20.1 → 4.22.0
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/README.md +13 -4
- package/lib/rest/Media.d.ts +0 -15
- package/lib/rest/Media.js +0 -21
- package/lib/rest/flexApi/V1.d.ts +10 -0
- package/lib/rest/flexApi/V1.js +16 -0
- package/lib/rest/flexApi/v1/configuration.d.ts +6 -0
- package/lib/rest/flexApi/v1/configuration.js +2 -0
- package/lib/rest/flexApi/v1/insightsConversationalAi.d.ts +165 -0
- package/lib/rest/flexApi/v1/insightsConversationalAi.js +136 -0
- package/lib/rest/flexApi/v1/insightsConversationalAiReportInsights.d.ts +149 -0
- package/lib/rest/flexApi/v1/insightsConversationalAiReportInsights.js +130 -0
- package/lib/rest/messaging/v1/service/usAppToPerson.d.ts +62 -0
- package/lib/rest/messaging/v1/service/usAppToPerson.js +65 -0
- package/lib/rest/trusthub/V1.d.ts +5 -0
- package/lib/rest/trusthub/V1.js +8 -0
- package/lib/rest/trusthub/v1/complianceInquiries.d.ts +2 -0
- package/lib/rest/trusthub/v1/complianceInquiries.js +2 -0
- package/lib/rest/trusthub/v1/complianceRegistrationInquiries.d.ts +132 -0
- package/lib/rest/trusthub/v1/complianceRegistrationInquiries.js +150 -0
- package/lib/rest/video/v1/compositionSettings.d.ts +2 -2
- package/lib/rest/video/v1/recordingSettings.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# twilio-node
|
|
2
2
|
|
|
3
|
-
[![
|
|
4
|
-
|
|
5
|
-
[![
|
|
6
|
-
[![
|
|
3
|
+
[![][test-workflow-image]][test-workflow-url]
|
|
4
|
+
[![][npm-version-image]][npm-url]
|
|
5
|
+
[![][npm-install-size-image]][npm-install-size-url]
|
|
6
|
+
[![][npm-downloads-image]][npm-downloads-url]
|
|
7
7
|
|
|
8
8
|
## Documentation
|
|
9
9
|
|
|
@@ -294,3 +294,12 @@ npm run test:javascript -- -m .\*client.\*
|
|
|
294
294
|
|
|
295
295
|
[apidocs]: https://www.twilio.com/docs/api
|
|
296
296
|
[libdocs]: https://twilio.github.io/twilio-node
|
|
297
|
+
|
|
298
|
+
[test-workflow-image]: https://github.com/twilio/twilio-node/actions/workflows/test-and-deploy.yml/badge.svg
|
|
299
|
+
[test-workflow-url]: https://github.com/twilio/twilio-node/actions/workflows/test-and-deploy.yml
|
|
300
|
+
[npm-downloads-image]: https://img.shields.io/npm/dm/twilio.svg
|
|
301
|
+
[npm-downloads-url]: https://npmcharts.com/compare/twilio?minimal=true
|
|
302
|
+
[npm-install-size-image]: https://badgen.net/packagephobia/install/twilio
|
|
303
|
+
[npm-install-size-url]: https://packagephobia.com/result?p=twilio
|
|
304
|
+
[npm-url]: https://npmjs.org/package/twilio
|
|
305
|
+
[npm-version-image]: https://img.shields.io/npm/v/twilio.svg
|
package/lib/rest/Media.d.ts
CHANGED
|
@@ -1,19 +1,4 @@
|
|
|
1
|
-
import { MediaProcessorListInstance } from "./media/v1/mediaProcessor";
|
|
2
|
-
import { MediaRecordingListInstance } from "./media/v1/mediaRecording";
|
|
3
|
-
import { PlayerStreamerListInstance } from "./media/v1/playerStreamer";
|
|
4
1
|
import MediaBase from "./MediaBase";
|
|
5
2
|
declare class Media extends MediaBase {
|
|
6
|
-
/**
|
|
7
|
-
* @deprecated - Use v1.mediaProcessor instead
|
|
8
|
-
*/
|
|
9
|
-
get mediaProcessor(): MediaProcessorListInstance;
|
|
10
|
-
/**
|
|
11
|
-
* @deprecated - Use v1.mediaRecording instead
|
|
12
|
-
*/
|
|
13
|
-
get mediaRecording(): MediaRecordingListInstance;
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated - Use v1.playerStreamer instead
|
|
16
|
-
*/
|
|
17
|
-
get playerStreamer(): PlayerStreamerListInstance;
|
|
18
3
|
}
|
|
19
4
|
export = Media;
|
package/lib/rest/Media.js
CHANGED
|
@@ -4,26 +4,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
const MediaBase_1 = __importDefault(require("./MediaBase"));
|
|
6
6
|
class Media extends MediaBase_1.default {
|
|
7
|
-
/**
|
|
8
|
-
* @deprecated - Use v1.mediaProcessor instead
|
|
9
|
-
*/
|
|
10
|
-
get mediaProcessor() {
|
|
11
|
-
console.warn("mediaProcessor is deprecated. Use v1.mediaProcessor instead.");
|
|
12
|
-
return this.v1.mediaProcessor;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @deprecated - Use v1.mediaRecording instead
|
|
16
|
-
*/
|
|
17
|
-
get mediaRecording() {
|
|
18
|
-
console.warn("mediaRecording is deprecated. Use v1.mediaRecording instead.");
|
|
19
|
-
return this.v1.mediaRecording;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* @deprecated - Use v1.playerStreamer instead
|
|
23
|
-
*/
|
|
24
|
-
get playerStreamer() {
|
|
25
|
-
console.warn("playerStreamer is deprecated. Use v1.playerStreamer instead.");
|
|
26
|
-
return this.v1.playerStreamer;
|
|
27
|
-
}
|
|
28
7
|
}
|
|
29
8
|
module.exports = Media;
|
package/lib/rest/flexApi/V1.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ import { ChannelListInstance } from "./v1/channel";
|
|
|
5
5
|
import { ConfigurationListInstance } from "./v1/configuration";
|
|
6
6
|
import { FlexFlowListInstance } from "./v1/flexFlow";
|
|
7
7
|
import { InsightsAssessmentsCommentListInstance } from "./v1/insightsAssessmentsComment";
|
|
8
|
+
import { InsightsConversationalAiListInstance } from "./v1/insightsConversationalAi";
|
|
9
|
+
import { InsightsConversationalAiReportInsightsListInstance } from "./v1/insightsConversationalAiReportInsights";
|
|
8
10
|
import { InsightsConversationsListInstance } from "./v1/insightsConversations";
|
|
9
11
|
import { InsightsQuestionnairesListInstance } from "./v1/insightsQuestionnaires";
|
|
10
12
|
import { InsightsQuestionnairesCategoryListInstance } from "./v1/insightsQuestionnairesCategory";
|
|
@@ -34,6 +36,10 @@ export default class V1 extends Version {
|
|
|
34
36
|
protected _flexFlow?: FlexFlowListInstance;
|
|
35
37
|
/** insightsAssessmentsComment - { Twilio.FlexApi.V1.InsightsAssessmentsCommentListInstance } resource */
|
|
36
38
|
protected _insightsAssessmentsComment?: InsightsAssessmentsCommentListInstance;
|
|
39
|
+
/** insightsConversationalAi - { Twilio.FlexApi.V1.InsightsConversationalAiListInstance } resource */
|
|
40
|
+
protected _insightsConversationalAi?: InsightsConversationalAiListInstance;
|
|
41
|
+
/** insightsConversationalAiReportInsights - { Twilio.FlexApi.V1.InsightsConversationalAiReportInsightsListInstance } resource */
|
|
42
|
+
protected _insightsConversationalAiReportInsights?: InsightsConversationalAiReportInsightsListInstance;
|
|
37
43
|
/** insightsConversations - { Twilio.FlexApi.V1.InsightsConversationsListInstance } resource */
|
|
38
44
|
protected _insightsConversations?: InsightsConversationsListInstance;
|
|
39
45
|
/** insightsQuestionnaires - { Twilio.FlexApi.V1.InsightsQuestionnairesListInstance } resource */
|
|
@@ -68,6 +74,10 @@ export default class V1 extends Version {
|
|
|
68
74
|
get flexFlow(): FlexFlowListInstance;
|
|
69
75
|
/** Getter for insightsAssessmentsComment resource */
|
|
70
76
|
get insightsAssessmentsComment(): InsightsAssessmentsCommentListInstance;
|
|
77
|
+
/** Getter for insightsConversationalAi resource */
|
|
78
|
+
get insightsConversationalAi(): InsightsConversationalAiListInstance;
|
|
79
|
+
/** Getter for insightsConversationalAiReportInsights resource */
|
|
80
|
+
get insightsConversationalAiReportInsights(): InsightsConversationalAiReportInsightsListInstance;
|
|
71
81
|
/** Getter for insightsConversations resource */
|
|
72
82
|
get insightsConversations(): InsightsConversationsListInstance;
|
|
73
83
|
/** Getter for insightsQuestionnaires resource */
|
package/lib/rest/flexApi/V1.js
CHANGED
|
@@ -22,6 +22,8 @@ const channel_1 = require("./v1/channel");
|
|
|
22
22
|
const configuration_1 = require("./v1/configuration");
|
|
23
23
|
const flexFlow_1 = require("./v1/flexFlow");
|
|
24
24
|
const insightsAssessmentsComment_1 = require("./v1/insightsAssessmentsComment");
|
|
25
|
+
const insightsConversationalAi_1 = require("./v1/insightsConversationalAi");
|
|
26
|
+
const insightsConversationalAiReportInsights_1 = require("./v1/insightsConversationalAiReportInsights");
|
|
25
27
|
const insightsConversations_1 = require("./v1/insightsConversations");
|
|
26
28
|
const insightsQuestionnaires_1 = require("./v1/insightsQuestionnaires");
|
|
27
29
|
const insightsQuestionnairesCategory_1 = require("./v1/insightsQuestionnairesCategory");
|
|
@@ -71,6 +73,20 @@ class V1 extends Version_1.default {
|
|
|
71
73
|
(0, insightsAssessmentsComment_1.InsightsAssessmentsCommentListInstance)(this);
|
|
72
74
|
return this._insightsAssessmentsComment;
|
|
73
75
|
}
|
|
76
|
+
/** Getter for insightsConversationalAi resource */
|
|
77
|
+
get insightsConversationalAi() {
|
|
78
|
+
this._insightsConversationalAi =
|
|
79
|
+
this._insightsConversationalAi ||
|
|
80
|
+
(0, insightsConversationalAi_1.InsightsConversationalAiListInstance)(this);
|
|
81
|
+
return this._insightsConversationalAi;
|
|
82
|
+
}
|
|
83
|
+
/** Getter for insightsConversationalAiReportInsights resource */
|
|
84
|
+
get insightsConversationalAiReportInsights() {
|
|
85
|
+
this._insightsConversationalAiReportInsights =
|
|
86
|
+
this._insightsConversationalAiReportInsights ||
|
|
87
|
+
(0, insightsConversationalAiReportInsights_1.InsightsConversationalAiReportInsightsListInstance)(this);
|
|
88
|
+
return this._insightsConversationalAiReportInsights;
|
|
89
|
+
}
|
|
74
90
|
/** Getter for insightsConversations resource */
|
|
75
91
|
get insightsConversations() {
|
|
76
92
|
this._insightsConversations =
|
|
@@ -67,6 +67,7 @@ interface ConfigurationResource {
|
|
|
67
67
|
messaging_service_instance_sid: string;
|
|
68
68
|
chat_service_instance_sid: string;
|
|
69
69
|
flex_service_instance_sid: string;
|
|
70
|
+
flex_instance_sid: string;
|
|
70
71
|
ui_language: string;
|
|
71
72
|
ui_attributes: any;
|
|
72
73
|
ui_dependencies: any;
|
|
@@ -169,6 +170,10 @@ export declare class ConfigurationInstance {
|
|
|
169
170
|
* The SID of the Flex service instance.
|
|
170
171
|
*/
|
|
171
172
|
flexServiceInstanceSid: string;
|
|
173
|
+
/**
|
|
174
|
+
* The SID of the Flex instance.
|
|
175
|
+
*/
|
|
176
|
+
flexInstanceSid: string;
|
|
172
177
|
/**
|
|
173
178
|
* The primary language of the Flex UI.
|
|
174
179
|
*/
|
|
@@ -334,6 +339,7 @@ export declare class ConfigurationInstance {
|
|
|
334
339
|
messagingServiceInstanceSid: string;
|
|
335
340
|
chatServiceInstanceSid: string;
|
|
336
341
|
flexServiceInstanceSid: string;
|
|
342
|
+
flexInstanceSid: string;
|
|
337
343
|
uiLanguage: string;
|
|
338
344
|
uiAttributes: any;
|
|
339
345
|
uiDependencies: any;
|
|
@@ -79,6 +79,7 @@ class ConfigurationInstance {
|
|
|
79
79
|
this.messagingServiceInstanceSid = payload.messaging_service_instance_sid;
|
|
80
80
|
this.chatServiceInstanceSid = payload.chat_service_instance_sid;
|
|
81
81
|
this.flexServiceInstanceSid = payload.flex_service_instance_sid;
|
|
82
|
+
this.flexInstanceSid = payload.flex_instance_sid;
|
|
82
83
|
this.uiLanguage = payload.ui_language;
|
|
83
84
|
this.uiAttributes = payload.ui_attributes;
|
|
84
85
|
this.uiDependencies = payload.ui_dependencies;
|
|
@@ -144,6 +145,7 @@ class ConfigurationInstance {
|
|
|
144
145
|
messagingServiceInstanceSid: this.messagingServiceInstanceSid,
|
|
145
146
|
chatServiceInstanceSid: this.chatServiceInstanceSid,
|
|
146
147
|
flexServiceInstanceSid: this.flexServiceInstanceSid,
|
|
148
|
+
flexInstanceSid: this.flexInstanceSid,
|
|
147
149
|
uiLanguage: this.uiLanguage,
|
|
148
150
|
uiAttributes: this.uiAttributes,
|
|
149
151
|
uiDependencies: this.uiDependencies,
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { inspect, InspectOptions } from "util";
|
|
3
|
+
import V1 from "../V1";
|
|
4
|
+
export type InsightsConversationalAiGranularity = "days" | "weeks" | "months" | "quarters" | "years";
|
|
5
|
+
/**
|
|
6
|
+
* Options to pass to fetch a InsightsConversationalAiInstance
|
|
7
|
+
*/
|
|
8
|
+
export interface InsightsConversationalAiContextFetchOptions {
|
|
9
|
+
/** Maximum number of rows to return */
|
|
10
|
+
maxRows?: number;
|
|
11
|
+
/** The type of report required to fetch.Like gauge,channel-metrics,queue-metrics */
|
|
12
|
+
reportId?: string;
|
|
13
|
+
/** The time period for which report is needed */
|
|
14
|
+
granularity?: InsightsConversationalAiGranularity;
|
|
15
|
+
/** A reference date that should be included in the returned period */
|
|
16
|
+
includeDate?: Date;
|
|
17
|
+
}
|
|
18
|
+
export interface InsightsConversationalAiContext {
|
|
19
|
+
/**
|
|
20
|
+
* Fetch a InsightsConversationalAiInstance
|
|
21
|
+
*
|
|
22
|
+
* @param callback - Callback to handle processed record
|
|
23
|
+
*
|
|
24
|
+
* @returns Resolves to processed InsightsConversationalAiInstance
|
|
25
|
+
*/
|
|
26
|
+
fetch(callback?: (error: Error | null, item?: InsightsConversationalAiInstance) => any): Promise<InsightsConversationalAiInstance>;
|
|
27
|
+
/**
|
|
28
|
+
* Fetch a InsightsConversationalAiInstance
|
|
29
|
+
*
|
|
30
|
+
* @param params - Parameter for request
|
|
31
|
+
* @param callback - Callback to handle processed record
|
|
32
|
+
*
|
|
33
|
+
* @returns Resolves to processed InsightsConversationalAiInstance
|
|
34
|
+
*/
|
|
35
|
+
fetch(params: InsightsConversationalAiContextFetchOptions, callback?: (error: Error | null, item?: InsightsConversationalAiInstance) => any): Promise<InsightsConversationalAiInstance>;
|
|
36
|
+
/**
|
|
37
|
+
* Provide a user-friendly representation
|
|
38
|
+
*/
|
|
39
|
+
toJSON(): any;
|
|
40
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
41
|
+
}
|
|
42
|
+
export interface InsightsConversationalAiContextSolution {
|
|
43
|
+
instanceSid: string;
|
|
44
|
+
}
|
|
45
|
+
export declare class InsightsConversationalAiContextImpl implements InsightsConversationalAiContext {
|
|
46
|
+
protected _version: V1;
|
|
47
|
+
protected _solution: InsightsConversationalAiContextSolution;
|
|
48
|
+
protected _uri: string;
|
|
49
|
+
constructor(_version: V1, instanceSid: string);
|
|
50
|
+
fetch(params?: InsightsConversationalAiContextFetchOptions | ((error: Error | null, item?: InsightsConversationalAiInstance) => any), callback?: (error: Error | null, item?: InsightsConversationalAiInstance) => any): Promise<InsightsConversationalAiInstance>;
|
|
51
|
+
/**
|
|
52
|
+
* Provide a user-friendly representation
|
|
53
|
+
*
|
|
54
|
+
* @returns Object
|
|
55
|
+
*/
|
|
56
|
+
toJSON(): InsightsConversationalAiContextSolution;
|
|
57
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
58
|
+
}
|
|
59
|
+
interface InsightsConversationalAiResource {
|
|
60
|
+
instance_sid: string;
|
|
61
|
+
report_id: string;
|
|
62
|
+
granularity: InsightsConversationalAiGranularity;
|
|
63
|
+
period_start: Date;
|
|
64
|
+
period_end: Date;
|
|
65
|
+
updated: Date;
|
|
66
|
+
total_pages: number;
|
|
67
|
+
page: number;
|
|
68
|
+
rows: Array<any>;
|
|
69
|
+
url: string;
|
|
70
|
+
}
|
|
71
|
+
export declare class InsightsConversationalAiInstance {
|
|
72
|
+
protected _version: V1;
|
|
73
|
+
protected _solution: InsightsConversationalAiContextSolution;
|
|
74
|
+
protected _context?: InsightsConversationalAiContext;
|
|
75
|
+
constructor(_version: V1, payload: InsightsConversationalAiResource, instanceSid?: string);
|
|
76
|
+
/**
|
|
77
|
+
* Sid of Flex Service Instance
|
|
78
|
+
*/
|
|
79
|
+
instanceSid: string;
|
|
80
|
+
/**
|
|
81
|
+
* The type of report required to fetch.Like gauge,channel-metrics,queue-metrics
|
|
82
|
+
*/
|
|
83
|
+
reportId: string;
|
|
84
|
+
granularity: InsightsConversationalAiGranularity;
|
|
85
|
+
/**
|
|
86
|
+
* The start date from which report data is included
|
|
87
|
+
*/
|
|
88
|
+
periodStart: Date;
|
|
89
|
+
/**
|
|
90
|
+
* The end date till report data is included
|
|
91
|
+
*/
|
|
92
|
+
periodEnd: Date;
|
|
93
|
+
/**
|
|
94
|
+
* Updated time of the report
|
|
95
|
+
*/
|
|
96
|
+
updated: Date;
|
|
97
|
+
/**
|
|
98
|
+
* Represents total number of pages fetched report has
|
|
99
|
+
*/
|
|
100
|
+
totalPages: number;
|
|
101
|
+
/**
|
|
102
|
+
* Page offset required for pagination
|
|
103
|
+
*/
|
|
104
|
+
page: number;
|
|
105
|
+
/**
|
|
106
|
+
* List of report breakdown
|
|
107
|
+
*/
|
|
108
|
+
rows: Array<any>;
|
|
109
|
+
/**
|
|
110
|
+
* The URL of this resource.
|
|
111
|
+
*/
|
|
112
|
+
url: string;
|
|
113
|
+
private get _proxy();
|
|
114
|
+
/**
|
|
115
|
+
* Fetch a InsightsConversationalAiInstance
|
|
116
|
+
*
|
|
117
|
+
* @param callback - Callback to handle processed record
|
|
118
|
+
*
|
|
119
|
+
* @returns Resolves to processed InsightsConversationalAiInstance
|
|
120
|
+
*/
|
|
121
|
+
fetch(callback?: (error: Error | null, item?: InsightsConversationalAiInstance) => any): Promise<InsightsConversationalAiInstance>;
|
|
122
|
+
/**
|
|
123
|
+
* Fetch a InsightsConversationalAiInstance
|
|
124
|
+
*
|
|
125
|
+
* @param params - Parameter for request
|
|
126
|
+
* @param callback - Callback to handle processed record
|
|
127
|
+
*
|
|
128
|
+
* @returns Resolves to processed InsightsConversationalAiInstance
|
|
129
|
+
*/
|
|
130
|
+
fetch(params: InsightsConversationalAiContextFetchOptions, callback?: (error: Error | null, item?: InsightsConversationalAiInstance) => any): Promise<InsightsConversationalAiInstance>;
|
|
131
|
+
/**
|
|
132
|
+
* Provide a user-friendly representation
|
|
133
|
+
*
|
|
134
|
+
* @returns Object
|
|
135
|
+
*/
|
|
136
|
+
toJSON(): {
|
|
137
|
+
instanceSid: string;
|
|
138
|
+
reportId: string;
|
|
139
|
+
granularity: InsightsConversationalAiGranularity;
|
|
140
|
+
periodStart: Date;
|
|
141
|
+
periodEnd: Date;
|
|
142
|
+
updated: Date;
|
|
143
|
+
totalPages: number;
|
|
144
|
+
page: number;
|
|
145
|
+
rows: any[];
|
|
146
|
+
url: string;
|
|
147
|
+
};
|
|
148
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
149
|
+
}
|
|
150
|
+
export interface InsightsConversationalAiSolution {
|
|
151
|
+
}
|
|
152
|
+
export interface InsightsConversationalAiListInstance {
|
|
153
|
+
_version: V1;
|
|
154
|
+
_solution: InsightsConversationalAiSolution;
|
|
155
|
+
_uri: string;
|
|
156
|
+
(instanceSid: string): InsightsConversationalAiContext;
|
|
157
|
+
get(instanceSid: string): InsightsConversationalAiContext;
|
|
158
|
+
/**
|
|
159
|
+
* Provide a user-friendly representation
|
|
160
|
+
*/
|
|
161
|
+
toJSON(): any;
|
|
162
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
163
|
+
}
|
|
164
|
+
export declare function InsightsConversationalAiListInstance(version: V1): InsightsConversationalAiListInstance;
|
|
165
|
+
export {};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* Twilio - Flex
|
|
9
|
+
* This is the public Twilio REST API.
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator.
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.InsightsConversationalAiListInstance = exports.InsightsConversationalAiInstance = exports.InsightsConversationalAiContextImpl = void 0;
|
|
17
|
+
const util_1 = require("util");
|
|
18
|
+
const deserialize = require("../../../base/deserialize");
|
|
19
|
+
const serialize = require("../../../base/serialize");
|
|
20
|
+
const utility_1 = require("../../../base/utility");
|
|
21
|
+
class InsightsConversationalAiContextImpl {
|
|
22
|
+
constructor(_version, instanceSid) {
|
|
23
|
+
this._version = _version;
|
|
24
|
+
if (!(0, utility_1.isValidPathParam)(instanceSid)) {
|
|
25
|
+
throw new Error("Parameter 'instanceSid' is not valid.");
|
|
26
|
+
}
|
|
27
|
+
this._solution = { instanceSid };
|
|
28
|
+
this._uri = `/Insights/Instances/${instanceSid}/AI/Reports`;
|
|
29
|
+
}
|
|
30
|
+
fetch(params, callback) {
|
|
31
|
+
if (params instanceof Function) {
|
|
32
|
+
callback = params;
|
|
33
|
+
params = {};
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
params = params || {};
|
|
37
|
+
}
|
|
38
|
+
let data = {};
|
|
39
|
+
if (params["maxRows"] !== undefined)
|
|
40
|
+
data["MaxRows"] = params["maxRows"];
|
|
41
|
+
if (params["reportId"] !== undefined)
|
|
42
|
+
data["ReportId"] = params["reportId"];
|
|
43
|
+
if (params["granularity"] !== undefined)
|
|
44
|
+
data["Granularity"] = params["granularity"];
|
|
45
|
+
if (params["includeDate"] !== undefined)
|
|
46
|
+
data["IncludeDate"] = serialize.iso8601DateTime(params["includeDate"]);
|
|
47
|
+
const headers = {};
|
|
48
|
+
const instance = this;
|
|
49
|
+
let operationVersion = instance._version, operationPromise = operationVersion.fetch({
|
|
50
|
+
uri: instance._uri,
|
|
51
|
+
method: "get",
|
|
52
|
+
params: data,
|
|
53
|
+
headers,
|
|
54
|
+
});
|
|
55
|
+
operationPromise = operationPromise.then((payload) => new InsightsConversationalAiInstance(operationVersion, payload, instance._solution.instanceSid));
|
|
56
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
57
|
+
return operationPromise;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Provide a user-friendly representation
|
|
61
|
+
*
|
|
62
|
+
* @returns Object
|
|
63
|
+
*/
|
|
64
|
+
toJSON() {
|
|
65
|
+
return this._solution;
|
|
66
|
+
}
|
|
67
|
+
[util_1.inspect.custom](_depth, options) {
|
|
68
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.InsightsConversationalAiContextImpl = InsightsConversationalAiContextImpl;
|
|
72
|
+
class InsightsConversationalAiInstance {
|
|
73
|
+
constructor(_version, payload, instanceSid) {
|
|
74
|
+
this._version = _version;
|
|
75
|
+
this.instanceSid = payload.instance_sid;
|
|
76
|
+
this.reportId = payload.report_id;
|
|
77
|
+
this.granularity = payload.granularity;
|
|
78
|
+
this.periodStart = deserialize.iso8601DateTime(payload.period_start);
|
|
79
|
+
this.periodEnd = deserialize.iso8601DateTime(payload.period_end);
|
|
80
|
+
this.updated = deserialize.iso8601DateTime(payload.updated);
|
|
81
|
+
this.totalPages = deserialize.integer(payload.total_pages);
|
|
82
|
+
this.page = deserialize.integer(payload.page);
|
|
83
|
+
this.rows = payload.rows;
|
|
84
|
+
this.url = payload.url;
|
|
85
|
+
this._solution = { instanceSid: instanceSid || this.instanceSid };
|
|
86
|
+
}
|
|
87
|
+
get _proxy() {
|
|
88
|
+
this._context =
|
|
89
|
+
this._context ||
|
|
90
|
+
new InsightsConversationalAiContextImpl(this._version, this._solution.instanceSid);
|
|
91
|
+
return this._context;
|
|
92
|
+
}
|
|
93
|
+
fetch(params, callback) {
|
|
94
|
+
return this._proxy.fetch(params, callback);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Provide a user-friendly representation
|
|
98
|
+
*
|
|
99
|
+
* @returns Object
|
|
100
|
+
*/
|
|
101
|
+
toJSON() {
|
|
102
|
+
return {
|
|
103
|
+
instanceSid: this.instanceSid,
|
|
104
|
+
reportId: this.reportId,
|
|
105
|
+
granularity: this.granularity,
|
|
106
|
+
periodStart: this.periodStart,
|
|
107
|
+
periodEnd: this.periodEnd,
|
|
108
|
+
updated: this.updated,
|
|
109
|
+
totalPages: this.totalPages,
|
|
110
|
+
page: this.page,
|
|
111
|
+
rows: this.rows,
|
|
112
|
+
url: this.url,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
[util_1.inspect.custom](_depth, options) {
|
|
116
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
exports.InsightsConversationalAiInstance = InsightsConversationalAiInstance;
|
|
120
|
+
function InsightsConversationalAiListInstance(version) {
|
|
121
|
+
const instance = ((instanceSid) => instance.get(instanceSid));
|
|
122
|
+
instance.get = function get(instanceSid) {
|
|
123
|
+
return new InsightsConversationalAiContextImpl(version, instanceSid);
|
|
124
|
+
};
|
|
125
|
+
instance._version = version;
|
|
126
|
+
instance._solution = {};
|
|
127
|
+
instance._uri = ``;
|
|
128
|
+
instance.toJSON = function toJSON() {
|
|
129
|
+
return instance._solution;
|
|
130
|
+
};
|
|
131
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
132
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
133
|
+
};
|
|
134
|
+
return instance;
|
|
135
|
+
}
|
|
136
|
+
exports.InsightsConversationalAiListInstance = InsightsConversationalAiListInstance;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { inspect, InspectOptions } from "util";
|
|
3
|
+
import V1 from "../V1";
|
|
4
|
+
/**
|
|
5
|
+
* Options to pass to fetch a InsightsConversationalAiReportInsightsInstance
|
|
6
|
+
*/
|
|
7
|
+
export interface InsightsConversationalAiReportInsightsContextFetchOptions {
|
|
8
|
+
/** Maximum number of rows to return */
|
|
9
|
+
maxRows?: number;
|
|
10
|
+
/** The type of report insights required to fetch.Like gauge,channel-metrics,queue-metrics */
|
|
11
|
+
reportId?: string;
|
|
12
|
+
/** The time period for which report insights is needed */
|
|
13
|
+
granularity?: string;
|
|
14
|
+
/** A reference date that should be included in the returned period */
|
|
15
|
+
includeDate?: Date;
|
|
16
|
+
}
|
|
17
|
+
export interface InsightsConversationalAiReportInsightsContext {
|
|
18
|
+
/**
|
|
19
|
+
* Fetch a InsightsConversationalAiReportInsightsInstance
|
|
20
|
+
*
|
|
21
|
+
* @param callback - Callback to handle processed record
|
|
22
|
+
*
|
|
23
|
+
* @returns Resolves to processed InsightsConversationalAiReportInsightsInstance
|
|
24
|
+
*/
|
|
25
|
+
fetch(callback?: (error: Error | null, item?: InsightsConversationalAiReportInsightsInstance) => any): Promise<InsightsConversationalAiReportInsightsInstance>;
|
|
26
|
+
/**
|
|
27
|
+
* Fetch a InsightsConversationalAiReportInsightsInstance
|
|
28
|
+
*
|
|
29
|
+
* @param params - Parameter for request
|
|
30
|
+
* @param callback - Callback to handle processed record
|
|
31
|
+
*
|
|
32
|
+
* @returns Resolves to processed InsightsConversationalAiReportInsightsInstance
|
|
33
|
+
*/
|
|
34
|
+
fetch(params: InsightsConversationalAiReportInsightsContextFetchOptions, callback?: (error: Error | null, item?: InsightsConversationalAiReportInsightsInstance) => any): Promise<InsightsConversationalAiReportInsightsInstance>;
|
|
35
|
+
/**
|
|
36
|
+
* Provide a user-friendly representation
|
|
37
|
+
*/
|
|
38
|
+
toJSON(): any;
|
|
39
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
40
|
+
}
|
|
41
|
+
export interface InsightsConversationalAiReportInsightsContextSolution {
|
|
42
|
+
instanceSid: string;
|
|
43
|
+
}
|
|
44
|
+
export declare class InsightsConversationalAiReportInsightsContextImpl implements InsightsConversationalAiReportInsightsContext {
|
|
45
|
+
protected _version: V1;
|
|
46
|
+
protected _solution: InsightsConversationalAiReportInsightsContextSolution;
|
|
47
|
+
protected _uri: string;
|
|
48
|
+
constructor(_version: V1, instanceSid: string);
|
|
49
|
+
fetch(params?: InsightsConversationalAiReportInsightsContextFetchOptions | ((error: Error | null, item?: InsightsConversationalAiReportInsightsInstance) => any), callback?: (error: Error | null, item?: InsightsConversationalAiReportInsightsInstance) => any): Promise<InsightsConversationalAiReportInsightsInstance>;
|
|
50
|
+
/**
|
|
51
|
+
* Provide a user-friendly representation
|
|
52
|
+
*
|
|
53
|
+
* @returns Object
|
|
54
|
+
*/
|
|
55
|
+
toJSON(): InsightsConversationalAiReportInsightsContextSolution;
|
|
56
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
57
|
+
}
|
|
58
|
+
interface InsightsConversationalAiReportInsightsResource {
|
|
59
|
+
instance_sid: string;
|
|
60
|
+
report_id: string;
|
|
61
|
+
period_start: Date;
|
|
62
|
+
period_end: Date;
|
|
63
|
+
updated: Date;
|
|
64
|
+
insights: Array<any>;
|
|
65
|
+
url: string;
|
|
66
|
+
}
|
|
67
|
+
export declare class InsightsConversationalAiReportInsightsInstance {
|
|
68
|
+
protected _version: V1;
|
|
69
|
+
protected _solution: InsightsConversationalAiReportInsightsContextSolution;
|
|
70
|
+
protected _context?: InsightsConversationalAiReportInsightsContext;
|
|
71
|
+
constructor(_version: V1, payload: InsightsConversationalAiReportInsightsResource, instanceSid?: string);
|
|
72
|
+
/**
|
|
73
|
+
* The Instance SID of the instance for which report insights is fetched
|
|
74
|
+
*/
|
|
75
|
+
instanceSid: string;
|
|
76
|
+
/**
|
|
77
|
+
* The type of report insights required to fetch.Like gauge,channel-metrics,queue-metrics
|
|
78
|
+
*/
|
|
79
|
+
reportId: string;
|
|
80
|
+
/**
|
|
81
|
+
* The start date from which report insights data is included
|
|
82
|
+
*/
|
|
83
|
+
periodStart: Date;
|
|
84
|
+
/**
|
|
85
|
+
* The end date till report insights data is included
|
|
86
|
+
*/
|
|
87
|
+
periodEnd: Date;
|
|
88
|
+
/**
|
|
89
|
+
* Updated time of the report insights
|
|
90
|
+
*/
|
|
91
|
+
updated: Date;
|
|
92
|
+
/**
|
|
93
|
+
* List of report insights breakdown
|
|
94
|
+
*/
|
|
95
|
+
insights: Array<any>;
|
|
96
|
+
/**
|
|
97
|
+
* The URL of this resource
|
|
98
|
+
*/
|
|
99
|
+
url: string;
|
|
100
|
+
private get _proxy();
|
|
101
|
+
/**
|
|
102
|
+
* Fetch a InsightsConversationalAiReportInsightsInstance
|
|
103
|
+
*
|
|
104
|
+
* @param callback - Callback to handle processed record
|
|
105
|
+
*
|
|
106
|
+
* @returns Resolves to processed InsightsConversationalAiReportInsightsInstance
|
|
107
|
+
*/
|
|
108
|
+
fetch(callback?: (error: Error | null, item?: InsightsConversationalAiReportInsightsInstance) => any): Promise<InsightsConversationalAiReportInsightsInstance>;
|
|
109
|
+
/**
|
|
110
|
+
* Fetch a InsightsConversationalAiReportInsightsInstance
|
|
111
|
+
*
|
|
112
|
+
* @param params - Parameter for request
|
|
113
|
+
* @param callback - Callback to handle processed record
|
|
114
|
+
*
|
|
115
|
+
* @returns Resolves to processed InsightsConversationalAiReportInsightsInstance
|
|
116
|
+
*/
|
|
117
|
+
fetch(params: InsightsConversationalAiReportInsightsContextFetchOptions, callback?: (error: Error | null, item?: InsightsConversationalAiReportInsightsInstance) => any): Promise<InsightsConversationalAiReportInsightsInstance>;
|
|
118
|
+
/**
|
|
119
|
+
* Provide a user-friendly representation
|
|
120
|
+
*
|
|
121
|
+
* @returns Object
|
|
122
|
+
*/
|
|
123
|
+
toJSON(): {
|
|
124
|
+
instanceSid: string;
|
|
125
|
+
reportId: string;
|
|
126
|
+
periodStart: Date;
|
|
127
|
+
periodEnd: Date;
|
|
128
|
+
updated: Date;
|
|
129
|
+
insights: any[];
|
|
130
|
+
url: string;
|
|
131
|
+
};
|
|
132
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
133
|
+
}
|
|
134
|
+
export interface InsightsConversationalAiReportInsightsSolution {
|
|
135
|
+
}
|
|
136
|
+
export interface InsightsConversationalAiReportInsightsListInstance {
|
|
137
|
+
_version: V1;
|
|
138
|
+
_solution: InsightsConversationalAiReportInsightsSolution;
|
|
139
|
+
_uri: string;
|
|
140
|
+
(instanceSid: string): InsightsConversationalAiReportInsightsContext;
|
|
141
|
+
get(instanceSid: string): InsightsConversationalAiReportInsightsContext;
|
|
142
|
+
/**
|
|
143
|
+
* Provide a user-friendly representation
|
|
144
|
+
*/
|
|
145
|
+
toJSON(): any;
|
|
146
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
147
|
+
}
|
|
148
|
+
export declare function InsightsConversationalAiReportInsightsListInstance(version: V1): InsightsConversationalAiReportInsightsListInstance;
|
|
149
|
+
export {};
|