twilio 5.13.1 → 6.0.1
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 +2 -4
- package/lib/rest/ConversationsBase.d.ts +3 -0
- package/lib/rest/ConversationsBase.js +5 -0
- package/lib/rest/InsightsBase.d.ts +3 -0
- package/lib/rest/InsightsBase.js +5 -0
- package/lib/rest/IntelligenceBase.d.ts +3 -0
- package/lib/rest/IntelligenceBase.js +5 -0
- package/lib/rest/KnowledgeBase.d.ts +3 -0
- package/lib/rest/KnowledgeBase.js +5 -0
- package/lib/rest/Memory.d.ts +4 -0
- package/lib/rest/Memory.js +8 -0
- package/lib/rest/MemoryBase.d.ts +13 -0
- package/lib/rest/MemoryBase.js +31 -0
- package/lib/rest/MessagingBase.d.ts +3 -0
- package/lib/rest/MessagingBase.js +5 -0
- package/lib/rest/Twilio.d.ts +5 -0
- package/lib/rest/Twilio.js +5 -0
- package/lib/rest/VoiceBase.d.ts +3 -0
- package/lib/rest/VoiceBase.js +5 -0
- package/lib/rest/api/v2010/account/call/recording.d.ts +2 -0
- package/lib/rest/api/v2010/account/call/recording.js +4 -0
- package/lib/rest/api/v2010/account/call/transcription.d.ts +2 -0
- package/lib/rest/api/v2010/account/call/transcription.js +6 -0
- package/lib/rest/api/v2010/account/call.d.ts +2 -0
- package/lib/rest/api/v2010/account/call.js +4 -0
- package/lib/rest/api/v2010/account/conference/participant.d.ts +2 -0
- package/lib/rest/api/v2010/account/conference/participant.js +4 -0
- package/lib/rest/api/v2010/account/message.d.ts +2 -0
- package/lib/rest/api/v2010/account/message.js +4 -0
- package/lib/rest/conversations/V2.d.ts +35 -0
- package/lib/rest/conversations/V2.js +67 -0
- package/lib/rest/conversations/v2/communication.d.ts +479 -0
- package/lib/rest/conversations/v2/communication.js +436 -0
- package/lib/rest/conversations/v2/configuration.d.ts +906 -0
- package/lib/rest/conversations/v2/configuration.js +619 -0
- package/lib/rest/conversations/v2/conversation.d.ts +936 -0
- package/lib/rest/conversations/v2/conversation.js +664 -0
- package/lib/rest/conversations/v2/operation.d.ts +167 -0
- package/lib/rest/conversations/v2/operation.js +170 -0
- package/lib/rest/conversations/v2/participant.d.ts +469 -0
- package/lib/rest/conversations/v2/participant.js +442 -0
- package/lib/rest/flexApi/V1.d.ts +0 -5
- package/lib/rest/flexApi/V1.js +0 -7
- package/lib/rest/flexApi/v1/plugin/pluginVersions.d.ts +1 -1
- package/lib/rest/flexApi/v1/plugin/pluginVersions.js +8 -6
- package/lib/rest/iam/V1.d.ts +3 -0
- package/lib/rest/iam/V1.js +5 -0
- package/lib/rest/iam/v1/rolePermission.d.ts +225 -0
- package/lib/rest/iam/v1/rolePermission.js +181 -0
- package/lib/rest/insights/V3.d.ts +20 -0
- package/lib/rest/insights/V3.js +42 -0
- package/lib/rest/insights/v1/call/callSummary.d.ts +10 -10
- package/lib/rest/insights/v1/call/event.d.ts +4 -4
- package/lib/rest/insights/v1/callSummaries.d.ts +12 -9
- package/lib/rest/insights/v2/inbound.d.ts +8 -8
- package/lib/rest/insights/v2/inbound.js +4 -4
- package/lib/rest/insights/v2/outbound.d.ts +8 -8
- package/lib/rest/insights/v2/outbound.js +4 -4
- package/lib/rest/insights/v2/report.d.ts +8 -8
- package/lib/rest/insights/v2/report.js +4 -4
- package/lib/rest/insights/v3/metadata.d.ts +115 -0
- package/lib/rest/insights/v3/metadata.js +118 -0
- package/lib/rest/insights/v3/query.d.ts +180 -0
- package/lib/rest/insights/v3/query.js +214 -0
- package/lib/rest/intelligence/V3.d.ts +35 -0
- package/lib/rest/intelligence/V3.js +65 -0
- package/lib/rest/intelligence/v3/configuration.d.ts +693 -0
- package/lib/rest/intelligence/v3/configuration.js +528 -0
- package/lib/rest/intelligence/v3/conversation.d.ts +478 -0
- package/lib/rest/intelligence/v3/conversation.js +342 -0
- package/lib/rest/intelligence/v3/operator.d.ts +619 -0
- package/lib/rest/intelligence/v3/operator.js +493 -0
- package/lib/rest/intelligence/v3/operatorResult.d.ts +543 -0
- package/lib/rest/intelligence/v3/operatorResult.js +478 -0
- package/lib/rest/intelligence/v3/version.d.ts +469 -0
- package/lib/rest/intelligence/v3/version.js +341 -0
- package/lib/rest/knowledge/V2.d.ts +31 -0
- package/lib/rest/knowledge/V2.js +62 -0
- package/lib/rest/knowledge/v2/chunk.d.ts +209 -0
- package/lib/rest/knowledge/v2/chunk.js +178 -0
- package/lib/rest/knowledge/v2/knowledge.d.ts +507 -0
- package/lib/rest/knowledge/v2/knowledge.js +466 -0
- package/lib/rest/knowledge/v2/knowledgeBasis.d.ts +484 -0
- package/lib/rest/knowledge/v2/knowledgeBasis.js +441 -0
- package/lib/rest/knowledge/v2/operation.d.ts +162 -0
- package/lib/rest/knowledge/v2/operation.js +175 -0
- package/lib/rest/knowledge/v2/search.d.ts +180 -0
- package/lib/rest/{flexApi/v1/createFlexInstance.js → knowledge/v2/search.js} +45 -36
- package/lib/rest/memory/V1.d.ts +76 -0
- package/lib/rest/memory/V1.js +140 -0
- package/lib/rest/memory/v1/bulk.d.ts +129 -0
- package/lib/rest/memory/v1/bulk.js +158 -0
- package/lib/rest/memory/v1/conversationSummary.d.ts +531 -0
- package/lib/rest/memory/v1/conversationSummary.js +473 -0
- package/lib/rest/memory/v1/dataMapping.d.ts +630 -0
- package/lib/rest/memory/v1/dataMapping.js +512 -0
- package/lib/rest/memory/v1/event.d.ts +153 -0
- package/lib/rest/memory/v1/event.js +159 -0
- package/lib/rest/memory/v1/identifier.d.ts +362 -0
- package/lib/rest/memory/v1/identifier.js +369 -0
- package/lib/rest/memory/v1/identityResolutionSetting.d.ts +247 -0
- package/lib/rest/memory/v1/identityResolutionSetting.js +229 -0
- package/lib/rest/memory/v1/import.d.ts +292 -0
- package/lib/rest/memory/v1/import.js +280 -0
- package/lib/rest/memory/v1/lookup.d.ts +82 -0
- package/lib/rest/memory/v1/lookup.js +118 -0
- package/lib/rest/memory/v1/observation.d.ts +521 -0
- package/lib/rest/memory/v1/observation.js +477 -0
- package/lib/rest/memory/v1/operation.d.ts +162 -0
- package/lib/rest/memory/v1/operation.js +175 -0
- package/lib/rest/memory/v1/profile.d.ts +441 -0
- package/lib/rest/memory/v1/profile.js +467 -0
- package/lib/rest/memory/v1/recall.d.ts +306 -0
- package/lib/rest/memory/v1/recall.js +234 -0
- package/lib/rest/memory/v1/revision.d.ts +246 -0
- package/lib/rest/memory/v1/revision.js +195 -0
- package/lib/rest/memory/v1/store.d.ts +503 -0
- package/lib/rest/memory/v1/store.js +482 -0
- package/lib/rest/memory/v1/trait.d.ts +233 -0
- package/lib/rest/memory/v1/trait.js +190 -0
- package/lib/rest/memory/v1/traitGroup.d.ts +758 -0
- package/lib/rest/memory/v1/traitGroup.js +555 -0
- package/lib/rest/messaging/V3.d.ts +15 -0
- package/lib/rest/messaging/V3.js +37 -0
- package/lib/rest/messaging/v2/channelsSender.d.ts +9 -1
- package/lib/rest/messaging/v2/channelsSender.js +2 -0
- package/lib/rest/messaging/v3/typingIndicator.d.ts +90 -0
- package/lib/rest/messaging/v3/typingIndicator.js +114 -0
- package/lib/rest/numbers/v3/hostedNumberOrder.d.ts +1 -1
- package/lib/rest/numbers/v3/hostedNumberOrder.js +2 -1
- package/lib/rest/previewIam/versionless/organization/roleAssignment.d.ts +32 -0
- package/lib/rest/previewIam/versionless/organization/roleAssignment.js +14 -0
- package/lib/rest/studio/v2/flow/execution.d.ts +12 -0
- package/lib/rest/studio/v2/flow/execution.js +6 -0
- package/lib/rest/studio/v2/flow.d.ts +4 -0
- package/lib/rest/studio/v2/flow.js +8 -0
- package/lib/rest/verify/v2/service/approveChallenge.d.ts +6 -6
- package/lib/rest/verify/v2/service/approveChallenge.js +2 -2
- package/lib/rest/verify/v2/service/newChallenge.d.ts +6 -6
- package/lib/rest/verify/v2/service/newChallenge.js +2 -2
- package/lib/rest/verify/v2/service/verification.d.ts +1 -1
- package/lib/rest/verify/v2/service/webhook.d.ts +2 -2
- package/lib/rest/verify/v2/service/webhook.js +8 -8
- package/lib/rest/video/v1/room.d.ts +4 -1
- package/lib/rest/voice/V3.d.ts +15 -0
- package/lib/rest/voice/V3.js +37 -0
- package/lib/rest/voice/v3/transcription.d.ts +378 -0
- package/lib/rest/voice/v3/transcription.js +264 -0
- package/lib/twiml/VoiceResponse.d.ts +18 -0
- package/package.json +2 -2
- package/lib/rest/flexApi/v1/createFlexInstance.d.ts +0 -165
|
@@ -33,8 +33,8 @@ class InsightsV2CreatePhoneNumbersReportRequest {
|
|
|
33
33
|
exports.InsightsV2CreatePhoneNumbersReportRequest = InsightsV2CreatePhoneNumbersReportRequest;
|
|
34
34
|
class InsightsV2CreatePhoneNumbersReportRequestTimeRange {
|
|
35
35
|
constructor(payload) {
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
36
|
+
this.startDatetime = payload["start_datetime"];
|
|
37
|
+
this.endDatetime = payload["end_datetime"];
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
exports.InsightsV2CreatePhoneNumbersReportRequestTimeRange = InsightsV2CreatePhoneNumbersReportRequestTimeRange;
|
|
@@ -67,8 +67,8 @@ class ReportFilter {
|
|
|
67
67
|
exports.ReportFilter = ReportFilter;
|
|
68
68
|
class ReportMetadata {
|
|
69
69
|
constructor(payload) {
|
|
70
|
-
this.
|
|
71
|
-
this.
|
|
70
|
+
this.startDatetime = payload["start_datetime"];
|
|
71
|
+
this.endDatetime = payload["end_datetime"];
|
|
72
72
|
this.filters = payload["filters"];
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -38,13 +38,13 @@ export declare class InsightsV2CreatePhoneNumbersReportRequest {
|
|
|
38
38
|
}
|
|
39
39
|
export declare class InsightsV2CreatePhoneNumbersReportRequestTimeRange {
|
|
40
40
|
/**
|
|
41
|
-
* Start time of the report
|
|
41
|
+
* Start date time of the report
|
|
42
42
|
*/
|
|
43
|
-
"
|
|
43
|
+
"startDatetime"?: Date;
|
|
44
44
|
/**
|
|
45
|
-
* End time of the report
|
|
45
|
+
* End date time of the report
|
|
46
46
|
*/
|
|
47
|
-
"
|
|
47
|
+
"endDatetime"?: Date;
|
|
48
48
|
constructor(payload: any);
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
@@ -115,13 +115,13 @@ export declare class ReportFilter {
|
|
|
115
115
|
}
|
|
116
116
|
export declare class ReportMetadata {
|
|
117
117
|
/**
|
|
118
|
-
* Start time of the report
|
|
118
|
+
* Start date time of the report
|
|
119
119
|
*/
|
|
120
|
-
"
|
|
120
|
+
"startDatetime"?: Date;
|
|
121
121
|
/**
|
|
122
|
-
* End time of the report
|
|
122
|
+
* End date time of the report
|
|
123
123
|
*/
|
|
124
|
-
"
|
|
124
|
+
"endDatetime"?: Date;
|
|
125
125
|
/**
|
|
126
126
|
* Filter values applied to the report
|
|
127
127
|
*/
|
|
@@ -49,8 +49,8 @@ class InsightsV2CreatePhoneNumbersReportRequest {
|
|
|
49
49
|
exports.InsightsV2CreatePhoneNumbersReportRequest = InsightsV2CreatePhoneNumbersReportRequest;
|
|
50
50
|
class InsightsV2CreatePhoneNumbersReportRequestTimeRange {
|
|
51
51
|
constructor(payload) {
|
|
52
|
-
this.
|
|
53
|
-
this.
|
|
52
|
+
this.startDatetime = payload["start_datetime"];
|
|
53
|
+
this.endDatetime = payload["end_datetime"];
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
exports.InsightsV2CreatePhoneNumbersReportRequestTimeRange = InsightsV2CreatePhoneNumbersReportRequestTimeRange;
|
|
@@ -95,8 +95,8 @@ class ReportFilter {
|
|
|
95
95
|
exports.ReportFilter = ReportFilter;
|
|
96
96
|
class ReportMetadata {
|
|
97
97
|
constructor(payload) {
|
|
98
|
-
this.
|
|
99
|
-
this.
|
|
98
|
+
this.startDatetime = payload["start_datetime"];
|
|
99
|
+
this.endDatetime = payload["end_datetime"];
|
|
100
100
|
this.filters = payload["filters"];
|
|
101
101
|
}
|
|
102
102
|
}
|
|
@@ -318,13 +318,13 @@ export declare class InsightsV2CreateAccountReportRequest {
|
|
|
318
318
|
*/
|
|
319
319
|
export declare class InsightsV2CreateAccountReportRequestTimeRange {
|
|
320
320
|
/**
|
|
321
|
-
* Start time of the report
|
|
321
|
+
* Start date time of the report
|
|
322
322
|
*/
|
|
323
|
-
"
|
|
323
|
+
"startDatetime"?: Date;
|
|
324
324
|
/**
|
|
325
|
-
* End time of the report
|
|
325
|
+
* End date time of the report
|
|
326
326
|
*/
|
|
327
|
-
"
|
|
327
|
+
"endDatetime"?: Date;
|
|
328
328
|
constructor(payload: any);
|
|
329
329
|
}
|
|
330
330
|
/**
|
|
@@ -384,13 +384,13 @@ export declare class ReportFilter {
|
|
|
384
384
|
}
|
|
385
385
|
export declare class ReportMetadata {
|
|
386
386
|
/**
|
|
387
|
-
* Start time of the report
|
|
387
|
+
* Start date time of the report
|
|
388
388
|
*/
|
|
389
|
-
"
|
|
389
|
+
"startDatetime"?: Date;
|
|
390
390
|
/**
|
|
391
|
-
* End time of the report
|
|
391
|
+
* End date time of the report
|
|
392
392
|
*/
|
|
393
|
-
"
|
|
393
|
+
"endDatetime"?: Date;
|
|
394
394
|
/**
|
|
395
395
|
* Filter values applied to the report
|
|
396
396
|
*/
|
|
@@ -205,8 +205,8 @@ exports.InsightsV2CreateAccountReportRequest = InsightsV2CreateAccountReportRequ
|
|
|
205
205
|
*/
|
|
206
206
|
class InsightsV2CreateAccountReportRequestTimeRange {
|
|
207
207
|
constructor(payload) {
|
|
208
|
-
this.
|
|
209
|
-
this.
|
|
208
|
+
this.startDatetime = payload["start_datetime"];
|
|
209
|
+
this.endDatetime = payload["end_datetime"];
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
exports.InsightsV2CreateAccountReportRequestTimeRange = InsightsV2CreateAccountReportRequestTimeRange;
|
|
@@ -244,8 +244,8 @@ class ReportFilter {
|
|
|
244
244
|
exports.ReportFilter = ReportFilter;
|
|
245
245
|
class ReportMetadata {
|
|
246
246
|
constructor(payload) {
|
|
247
|
-
this.
|
|
248
|
-
this.
|
|
247
|
+
this.startDatetime = payload["start_datetime"];
|
|
248
|
+
this.endDatetime = payload["end_datetime"];
|
|
249
249
|
this.filters = payload["filters"];
|
|
250
250
|
}
|
|
251
251
|
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { inspect, InspectOptions } from "util";
|
|
2
|
+
import V3 from "../V3";
|
|
3
|
+
import { ApiResponse } from "../../../base/ApiResponse";
|
|
4
|
+
export declare class InsightsMetadataResponseCubes {
|
|
5
|
+
/**
|
|
6
|
+
* Name of the cube, used as a reference in queries
|
|
7
|
+
*/
|
|
8
|
+
"name": string;
|
|
9
|
+
/**
|
|
10
|
+
* Human-readable description of what the cube represents
|
|
11
|
+
*/
|
|
12
|
+
"description"?: string;
|
|
13
|
+
/**
|
|
14
|
+
* List of measures available in the cube, representing quantitative values that can be aggregated
|
|
15
|
+
*/
|
|
16
|
+
"measures": Array<InsightsMetadataResponseCubesMeasures>;
|
|
17
|
+
/**
|
|
18
|
+
* List of dimensions available in the cube, representing categorical attributes for grouping data
|
|
19
|
+
*/
|
|
20
|
+
"dimensions": Array<InsightsMetadataResponseCubesDimensions>;
|
|
21
|
+
constructor(payload: any);
|
|
22
|
+
}
|
|
23
|
+
export declare class InsightsMetadataResponseCubesDimensions {
|
|
24
|
+
/**
|
|
25
|
+
* Identifier used to reference this dimension in queries
|
|
26
|
+
*/
|
|
27
|
+
"name": string;
|
|
28
|
+
/**
|
|
29
|
+
* Detailed explanation of what this dimension represents
|
|
30
|
+
*/
|
|
31
|
+
"description"?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Data type of the dimension (e.g., string, number, boolean, date)
|
|
34
|
+
*/
|
|
35
|
+
"type": string;
|
|
36
|
+
constructor(payload: any);
|
|
37
|
+
}
|
|
38
|
+
export declare class InsightsMetadataResponseCubesMeasures {
|
|
39
|
+
/**
|
|
40
|
+
* Identifier used to reference this measure in queries
|
|
41
|
+
*/
|
|
42
|
+
"name": string;
|
|
43
|
+
/**
|
|
44
|
+
* Detailed explanation of what this measure represents
|
|
45
|
+
*/
|
|
46
|
+
"description"?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Type of the measure
|
|
49
|
+
*/
|
|
50
|
+
"type": string;
|
|
51
|
+
/**
|
|
52
|
+
* Aggregation type for the measure (e.g., sum, count, average)
|
|
53
|
+
*/
|
|
54
|
+
"aggregation"?: string;
|
|
55
|
+
constructor(payload: any);
|
|
56
|
+
}
|
|
57
|
+
export interface MetadataSolution {
|
|
58
|
+
}
|
|
59
|
+
export interface MetadataListInstance {
|
|
60
|
+
_version: V3;
|
|
61
|
+
_solution: MetadataSolution;
|
|
62
|
+
_uri: string;
|
|
63
|
+
/**
|
|
64
|
+
* Fetch a MetadataInstance
|
|
65
|
+
*
|
|
66
|
+
* @param callback - Callback to handle processed record
|
|
67
|
+
*
|
|
68
|
+
* @returns Resolves to processed MetadataInstance
|
|
69
|
+
*/
|
|
70
|
+
fetch(callback?: (error: Error | null, item?: MetadataInstance) => any): Promise<MetadataInstance>;
|
|
71
|
+
/**
|
|
72
|
+
* Fetch a MetadataInstance and return HTTP info
|
|
73
|
+
*
|
|
74
|
+
* @param callback - Callback to handle processed record
|
|
75
|
+
*
|
|
76
|
+
* @returns Resolves to processed MetadataInstance with HTTP metadata
|
|
77
|
+
*/
|
|
78
|
+
fetchWithHttpInfo(callback?: (error: Error | null, item?: ApiResponse<MetadataInstance>) => any): Promise<ApiResponse<MetadataInstance>>;
|
|
79
|
+
/**
|
|
80
|
+
* Provide a user-friendly representation
|
|
81
|
+
*/
|
|
82
|
+
toJSON(): any;
|
|
83
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
84
|
+
}
|
|
85
|
+
export declare function MetadataListInstance(version: V3): MetadataListInstance;
|
|
86
|
+
interface MetadataResource {
|
|
87
|
+
domain: string;
|
|
88
|
+
cubes: Array<InsightsMetadataResponseCubes>;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Response containing metadata about available cubes, measures, and dimensions for a domain
|
|
92
|
+
*/
|
|
93
|
+
export declare class MetadataInstance {
|
|
94
|
+
protected _version: V3;
|
|
95
|
+
constructor(_version: V3, _payload: MetadataResource);
|
|
96
|
+
/**
|
|
97
|
+
* The business domain name for which metadata is being provided
|
|
98
|
+
*/
|
|
99
|
+
domain: string;
|
|
100
|
+
/**
|
|
101
|
+
* List of data cubes available in the domain, each containing measures and dimensions
|
|
102
|
+
*/
|
|
103
|
+
cubes: Array<InsightsMetadataResponseCubes>;
|
|
104
|
+
/**
|
|
105
|
+
* Provide a user-friendly representation
|
|
106
|
+
*
|
|
107
|
+
* @returns Object
|
|
108
|
+
*/
|
|
109
|
+
toJSON(): {
|
|
110
|
+
domain: string;
|
|
111
|
+
cubes: InsightsMetadataResponseCubes[];
|
|
112
|
+
};
|
|
113
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
114
|
+
}
|
|
115
|
+
export {};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This code was generated by
|
|
4
|
+
* ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
|
|
5
|
+
* | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
|
|
6
|
+
* | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
|
|
7
|
+
*
|
|
8
|
+
* Twilio - Insights
|
|
9
|
+
* Insights Domain V3 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.MetadataInstance = exports.InsightsMetadataResponseCubesMeasures = exports.InsightsMetadataResponseCubesDimensions = exports.InsightsMetadataResponseCubes = void 0;
|
|
17
|
+
exports.MetadataListInstance = MetadataListInstance;
|
|
18
|
+
const util_1 = require("util");
|
|
19
|
+
const deserialize = require("../../../base/deserialize");
|
|
20
|
+
const serialize = require("../../../base/serialize");
|
|
21
|
+
class InsightsMetadataResponseCubes {
|
|
22
|
+
constructor(payload) {
|
|
23
|
+
this.name = payload["name"];
|
|
24
|
+
this.description = payload["description"];
|
|
25
|
+
this.measures = payload["measures"];
|
|
26
|
+
this.dimensions = payload["dimensions"];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.InsightsMetadataResponseCubes = InsightsMetadataResponseCubes;
|
|
30
|
+
class InsightsMetadataResponseCubesDimensions {
|
|
31
|
+
constructor(payload) {
|
|
32
|
+
this.name = payload["name"];
|
|
33
|
+
this.description = payload["description"];
|
|
34
|
+
this.type = payload["type"];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.InsightsMetadataResponseCubesDimensions = InsightsMetadataResponseCubesDimensions;
|
|
38
|
+
class InsightsMetadataResponseCubesMeasures {
|
|
39
|
+
constructor(payload) {
|
|
40
|
+
this.name = payload["name"];
|
|
41
|
+
this.description = payload["description"];
|
|
42
|
+
this.type = payload["type"];
|
|
43
|
+
this.aggregation = payload["aggregation"];
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.InsightsMetadataResponseCubesMeasures = InsightsMetadataResponseCubesMeasures;
|
|
47
|
+
function MetadataListInstance(version) {
|
|
48
|
+
const instance = {};
|
|
49
|
+
instance._version = version;
|
|
50
|
+
instance._solution = {};
|
|
51
|
+
instance._uri = `/InsightsDomains/Conversations/Metadata`;
|
|
52
|
+
instance.fetch = function fetch(callback) {
|
|
53
|
+
const headers = {};
|
|
54
|
+
headers["Accept"] = "application/json";
|
|
55
|
+
let operationVersion = version, operationPromise = operationVersion.fetch({
|
|
56
|
+
uri: instance._uri,
|
|
57
|
+
method: "get",
|
|
58
|
+
headers,
|
|
59
|
+
});
|
|
60
|
+
operationPromise = operationPromise.then((payload) => new MetadataInstance(operationVersion, payload));
|
|
61
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
62
|
+
return operationPromise;
|
|
63
|
+
};
|
|
64
|
+
instance.fetchWithHttpInfo = function fetchWithHttpInfo(callback) {
|
|
65
|
+
const headers = {};
|
|
66
|
+
headers["Accept"] = "application/json";
|
|
67
|
+
let operationVersion = version;
|
|
68
|
+
// CREATE, FETCH, UPDATE operations
|
|
69
|
+
let operationPromise = operationVersion
|
|
70
|
+
.fetchWithResponseInfo({
|
|
71
|
+
uri: instance._uri,
|
|
72
|
+
method: "get",
|
|
73
|
+
headers,
|
|
74
|
+
})
|
|
75
|
+
.then((response) => ({
|
|
76
|
+
...response,
|
|
77
|
+
body: new MetadataInstance(operationVersion, response.body),
|
|
78
|
+
}));
|
|
79
|
+
operationPromise = instance._version.setPromiseCallback(operationPromise, callback);
|
|
80
|
+
return operationPromise;
|
|
81
|
+
};
|
|
82
|
+
instance.toJSON = function toJSON() {
|
|
83
|
+
return instance._solution;
|
|
84
|
+
};
|
|
85
|
+
instance[util_1.inspect.custom] = function inspectImpl(_depth, options) {
|
|
86
|
+
return (0, util_1.inspect)(instance.toJSON(), options);
|
|
87
|
+
};
|
|
88
|
+
return instance;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Response containing metadata about available cubes, measures, and dimensions for a domain
|
|
92
|
+
*/
|
|
93
|
+
class MetadataInstance {
|
|
94
|
+
constructor(_version, _payload) {
|
|
95
|
+
this._version = _version;
|
|
96
|
+
const payload = _payload;
|
|
97
|
+
this.domain = payload.domain;
|
|
98
|
+
this.cubes =
|
|
99
|
+
payload.cubes !== null && payload.cubes !== undefined
|
|
100
|
+
? payload.cubes.map((payload) => new InsightsMetadataResponseCubes(payload))
|
|
101
|
+
: null;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Provide a user-friendly representation
|
|
105
|
+
*
|
|
106
|
+
* @returns Object
|
|
107
|
+
*/
|
|
108
|
+
toJSON() {
|
|
109
|
+
return {
|
|
110
|
+
domain: this.domain,
|
|
111
|
+
cubes: this.cubes,
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
[util_1.inspect.custom](_depth, options) {
|
|
115
|
+
return (0, util_1.inspect)(this.toJSON(), options);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.MetadataInstance = MetadataInstance;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { inspect, InspectOptions } from "util";
|
|
2
|
+
import V3 from "../V3";
|
|
3
|
+
import { ApiResponse } from "../../../base/ApiResponse";
|
|
4
|
+
export declare class InsightsQueryRequest {
|
|
5
|
+
/**
|
|
6
|
+
* The business domain to execute the query against
|
|
7
|
+
*/
|
|
8
|
+
"domain"?: string;
|
|
9
|
+
"query": QueryDefinition;
|
|
10
|
+
constructor(payload: any);
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Pagination metadata containing navigation tokens and result information, this schema should according to convention be added to the response payload\'s \'meta\' attribute
|
|
14
|
+
*/
|
|
15
|
+
export declare class PaginationMeta {
|
|
16
|
+
/**
|
|
17
|
+
* The key of the list property contains the actual data items. This enables programmatic iteration over paginated results.
|
|
18
|
+
*/
|
|
19
|
+
"key": string;
|
|
20
|
+
/**
|
|
21
|
+
* The actual number of items returned in this response. May be less than the requested pageSize for the last page.
|
|
22
|
+
*/
|
|
23
|
+
"pageSize": number;
|
|
24
|
+
/**
|
|
25
|
+
* Token to fetch the previous page of results. Only included if there is a previous page, otherwise omitted.
|
|
26
|
+
*/
|
|
27
|
+
"previousToken"?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Token to fetch the next page of results. Only included if there is a next page, otherwise omitted.
|
|
30
|
+
*/
|
|
31
|
+
"nextToken"?: string | null;
|
|
32
|
+
constructor(payload: any);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Structured query definition that specifies what data to retrieve and how to filter, group, and order it
|
|
36
|
+
*/
|
|
37
|
+
export declare class QueryDefinition {
|
|
38
|
+
/**
|
|
39
|
+
* Array of measures to retrieve, representing quantitative values or metrics to be calculated
|
|
40
|
+
*/
|
|
41
|
+
"measures"?: Array<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Array of dimensions to retrieve, representing categorical attributes for grouping and organizing data
|
|
44
|
+
*/
|
|
45
|
+
"dimensions"?: Array<string>;
|
|
46
|
+
/**
|
|
47
|
+
* Nested filter conditions. Always use `op` and `expressions`.
|
|
48
|
+
*/
|
|
49
|
+
"filters"?: Array<QueryDefinitionFilters>;
|
|
50
|
+
/**
|
|
51
|
+
* Specifications for sorting the query results by specific fields in ascending or descending order
|
|
52
|
+
*/
|
|
53
|
+
"orderBy"?: Array<QueryDefinitionOrderBy>;
|
|
54
|
+
constructor(payload: any);
|
|
55
|
+
}
|
|
56
|
+
export declare class QueryDefinitionFilters {
|
|
57
|
+
"op"?: string;
|
|
58
|
+
"expressions": Array<QueryDefinitionFiltersExpressions>;
|
|
59
|
+
constructor(payload: any);
|
|
60
|
+
}
|
|
61
|
+
export declare class QueryDefinitionFiltersExpressions {
|
|
62
|
+
"op": string;
|
|
63
|
+
"field": string;
|
|
64
|
+
"values"?: Array<string>;
|
|
65
|
+
constructor(payload: any);
|
|
66
|
+
}
|
|
67
|
+
export declare class QueryDefinitionOrderBy {
|
|
68
|
+
/**
|
|
69
|
+
* Dimension or measure to order by
|
|
70
|
+
*/
|
|
71
|
+
"field"?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Sort order direction, ascending or descending
|
|
74
|
+
*/
|
|
75
|
+
"direction"?: string;
|
|
76
|
+
constructor(payload: any);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Options to pass to create a QueryInstance
|
|
80
|
+
*/
|
|
81
|
+
export interface QueryListInstanceCreateOptions {
|
|
82
|
+
/** */
|
|
83
|
+
insightsQueryRequest: InsightsQueryRequest;
|
|
84
|
+
/** Number of items per page */
|
|
85
|
+
pageSize?: number;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Options to pass to fetch a QueryInstance
|
|
89
|
+
*/
|
|
90
|
+
export interface QueryListInstanceFetchOptions {
|
|
91
|
+
/** Pagination token */
|
|
92
|
+
pageToken: string;
|
|
93
|
+
}
|
|
94
|
+
export interface QuerySolution {
|
|
95
|
+
}
|
|
96
|
+
export interface QueryListInstance {
|
|
97
|
+
_version: V3;
|
|
98
|
+
_solution: QuerySolution;
|
|
99
|
+
_uri: string;
|
|
100
|
+
/**
|
|
101
|
+
* Create a QueryInstance
|
|
102
|
+
*
|
|
103
|
+
* @param params - Body for request
|
|
104
|
+
* @param headers - header params for request
|
|
105
|
+
* @param callback - Callback to handle processed record
|
|
106
|
+
*
|
|
107
|
+
* @returns Resolves to processed QueryInstance
|
|
108
|
+
*/
|
|
109
|
+
create(params: InsightsQueryRequest, headers?: any, callback?: (error: Error | null, item?: QueryInstance) => any): Promise<QueryInstance>;
|
|
110
|
+
/**
|
|
111
|
+
* Create a QueryInstance and return HTTP info
|
|
112
|
+
*
|
|
113
|
+
* @param params - Body for request
|
|
114
|
+
* @param headers - header params for request
|
|
115
|
+
* @param callback - Callback to handle processed record
|
|
116
|
+
*
|
|
117
|
+
* @returns Resolves to processed QueryInstance with HTTP metadata
|
|
118
|
+
*/
|
|
119
|
+
createWithHttpInfo(params: InsightsQueryRequest, headers?: any, callback?: (error: Error | null, item?: ApiResponse<QueryInstance>) => any): Promise<ApiResponse<QueryInstance>>;
|
|
120
|
+
/**
|
|
121
|
+
* Fetch a QueryInstance
|
|
122
|
+
*
|
|
123
|
+
* @param params - Parameter for request
|
|
124
|
+
* @param callback - Callback to handle processed record
|
|
125
|
+
*
|
|
126
|
+
* @returns Resolves to processed QueryInstance
|
|
127
|
+
*/
|
|
128
|
+
fetch(params: QueryListInstanceFetchOptions, callback?: (error: Error | null, item?: QueryInstance) => any): Promise<QueryInstance>;
|
|
129
|
+
/**
|
|
130
|
+
* Fetch a QueryInstance and return HTTP info
|
|
131
|
+
*
|
|
132
|
+
* @param params - Parameter for request
|
|
133
|
+
* @param callback - Callback to handle processed record
|
|
134
|
+
*
|
|
135
|
+
* @returns Resolves to processed QueryInstance with HTTP metadata
|
|
136
|
+
*/
|
|
137
|
+
fetchWithHttpInfo(params: QueryListInstanceFetchOptions, callback?: (error: Error | null, item?: ApiResponse<QueryInstance>) => any): Promise<ApiResponse<QueryInstance>>;
|
|
138
|
+
/**
|
|
139
|
+
* Provide a user-friendly representation
|
|
140
|
+
*/
|
|
141
|
+
toJSON(): any;
|
|
142
|
+
[inspect.custom](_depth: any, options: InspectOptions): any;
|
|
143
|
+
}
|
|
144
|
+
export declare function QueryListInstance(version: V3): QueryListInstance;
|
|
145
|
+
interface QueryResource {
|
|
146
|
+
domain: string;
|
|
147
|
+
items: Array<{
|
|
148
|
+
[key: string]: any;
|
|
149
|
+
}>;
|
|
150
|
+
meta: PaginationMeta;
|
|
151
|
+
}
|
|
152
|
+
export declare class QueryInstance {
|
|
153
|
+
protected _version: V3;
|
|
154
|
+
constructor(_version: V3, _payload: QueryResource);
|
|
155
|
+
/**
|
|
156
|
+
* Indicates the business domain the query was executed against
|
|
157
|
+
*/
|
|
158
|
+
domain: string;
|
|
159
|
+
/**
|
|
160
|
+
* Array of result objects containing the query results. Each object contains properties matching the requested measures and dimensions.
|
|
161
|
+
*/
|
|
162
|
+
items: Array<{
|
|
163
|
+
[key: string]: any;
|
|
164
|
+
}>;
|
|
165
|
+
meta: PaginationMeta;
|
|
166
|
+
/**
|
|
167
|
+
* Provide a user-friendly representation
|
|
168
|
+
*
|
|
169
|
+
* @returns Object
|
|
170
|
+
*/
|
|
171
|
+
toJSON(): {
|
|
172
|
+
domain: string;
|
|
173
|
+
items: {
|
|
174
|
+
[key: string]: any;
|
|
175
|
+
}[];
|
|
176
|
+
meta: PaginationMeta;
|
|
177
|
+
};
|
|
178
|
+
[inspect.custom](_depth: any, options: InspectOptions): string;
|
|
179
|
+
}
|
|
180
|
+
export {};
|