syllable-sdk 0.1.0-alpha.22 → 0.1.0-alpha.23
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 +0 -19
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/testmessage.d.ts +2 -0
- package/models/components/testmessage.d.ts.map +1 -1
- package/models/components/testmessage.js +4 -0
- package/models/components/testmessage.js.map +1 -1
- package/models/operations/index.d.ts +0 -8
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -8
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/sdk.d.ts +0 -3
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +0 -5
- package/sdk/sdk.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/testmessage.ts +6 -0
- package/src/models/operations/index.ts +0 -8
- package/src/sdk/sdk.ts +0 -6
- package/docs/sdks/dashboards/README.md +0 -587
- package/funcs/dashboardsGetDailyCallVolumeByHour.d.ts +0 -15
- package/funcs/dashboardsGetDailyCallVolumeByHour.d.ts.map +0 -1
- package/funcs/dashboardsGetDailyCallVolumeByHour.js +0 -86
- package/funcs/dashboardsGetDailyCallVolumeByHour.js.map +0 -1
- package/funcs/dashboardsGetMonthlyCallVolumeByDay.d.ts +0 -15
- package/funcs/dashboardsGetMonthlyCallVolumeByDay.d.ts.map +0 -1
- package/funcs/dashboardsGetMonthlyCallVolumeByDay.js +0 -86
- package/funcs/dashboardsGetMonthlyCallVolumeByDay.js.map +0 -1
- package/funcs/dashboardsGetMonthlyCallVolumeByWeek.d.ts +0 -15
- package/funcs/dashboardsGetMonthlyCallVolumeByWeek.d.ts.map +0 -1
- package/funcs/dashboardsGetMonthlyCallVolumeByWeek.js +0 -86
- package/funcs/dashboardsGetMonthlyCallVolumeByWeek.js.map +0 -1
- package/funcs/dashboardsGetSessionAgents.d.ts +0 -15
- package/funcs/dashboardsGetSessionAgents.d.ts.map +0 -1
- package/funcs/dashboardsGetSessionAgents.js +0 -85
- package/funcs/dashboardsGetSessionAgents.js.map +0 -1
- package/funcs/dashboardsGetSessionSummary.d.ts +0 -16
- package/funcs/dashboardsGetSessionSummary.d.ts.map +0 -1
- package/funcs/dashboardsGetSessionSummary.js +0 -107
- package/funcs/dashboardsGetSessionSummary.js.map +0 -1
- package/funcs/dashboardsGetTotalCallVolumeByHour.d.ts +0 -15
- package/funcs/dashboardsGetTotalCallVolumeByHour.d.ts.map +0 -1
- package/funcs/dashboardsGetTotalCallVolumeByHour.js +0 -86
- package/funcs/dashboardsGetTotalCallVolumeByHour.js.map +0 -1
- package/funcs/dashboardsGetWeeklyCallVolumeByWeekday.d.ts +0 -15
- package/funcs/dashboardsGetWeeklyCallVolumeByWeekday.d.ts.map +0 -1
- package/funcs/dashboardsGetWeeklyCallVolumeByWeekday.js +0 -86
- package/funcs/dashboardsGetWeeklyCallVolumeByWeekday.js.map +0 -1
- package/funcs/dashboardsTotalCallVolumeByWeekday.d.ts +0 -15
- package/funcs/dashboardsTotalCallVolumeByWeekday.d.ts.map +0 -1
- package/funcs/dashboardsTotalCallVolumeByWeekday.js +0 -86
- package/funcs/dashboardsTotalCallVolumeByWeekday.js.map +0 -1
- package/models/operations/getdailycallvolumebyhour.d.ts +0 -28
- package/models/operations/getdailycallvolumebyhour.d.ts.map +0 -1
- package/models/operations/getdailycallvolumebyhour.js +0 -57
- package/models/operations/getdailycallvolumebyhour.js.map +0 -1
- package/models/operations/getmonthlycallvolumebyday.d.ts +0 -28
- package/models/operations/getmonthlycallvolumebyday.d.ts.map +0 -1
- package/models/operations/getmonthlycallvolumebyday.js +0 -57
- package/models/operations/getmonthlycallvolumebyday.js.map +0 -1
- package/models/operations/getmonthlycallvolumebyweek.d.ts +0 -28
- package/models/operations/getmonthlycallvolumebyweek.d.ts.map +0 -1
- package/models/operations/getmonthlycallvolumebyweek.js +0 -57
- package/models/operations/getmonthlycallvolumebyweek.js.map +0 -1
- package/models/operations/getsessionagents.d.ts +0 -28
- package/models/operations/getsessionagents.d.ts.map +0 -1
- package/models/operations/getsessionagents.js +0 -55
- package/models/operations/getsessionagents.js.map +0 -1
- package/models/operations/getsessionsummary.d.ts +0 -63
- package/models/operations/getsessionsummary.d.ts.map +0 -1
- package/models/operations/getsessionsummary.js +0 -107
- package/models/operations/getsessionsummary.js.map +0 -1
- package/models/operations/gettotalcallvolumebyhour.d.ts +0 -28
- package/models/operations/gettotalcallvolumebyhour.d.ts.map +0 -1
- package/models/operations/gettotalcallvolumebyhour.js +0 -57
- package/models/operations/gettotalcallvolumebyhour.js.map +0 -1
- package/models/operations/getweeklycallvolumebyweekday.d.ts +0 -28
- package/models/operations/getweeklycallvolumebyweekday.d.ts.map +0 -1
- package/models/operations/getweeklycallvolumebyweekday.js +0 -57
- package/models/operations/getweeklycallvolumebyweekday.js.map +0 -1
- package/models/operations/totalcallvolumebyweekday.d.ts +0 -28
- package/models/operations/totalcallvolumebyweekday.d.ts.map +0 -1
- package/models/operations/totalcallvolumebyweekday.js +0 -57
- package/models/operations/totalcallvolumebyweekday.js.map +0 -1
- package/sdk/dashboards.d.ts +0 -61
- package/sdk/dashboards.d.ts.map +0 -1
- package/sdk/dashboards.js +0 -92
- package/sdk/dashboards.js.map +0 -1
- package/src/funcs/dashboardsGetDailyCallVolumeByHour.ts +0 -111
- package/src/funcs/dashboardsGetMonthlyCallVolumeByDay.ts +0 -113
- package/src/funcs/dashboardsGetMonthlyCallVolumeByWeek.ts +0 -113
- package/src/funcs/dashboardsGetSessionAgents.ts +0 -110
- package/src/funcs/dashboardsGetSessionSummary.ts +0 -143
- package/src/funcs/dashboardsGetTotalCallVolumeByHour.ts +0 -111
- package/src/funcs/dashboardsGetWeeklyCallVolumeByWeekday.ts +0 -113
- package/src/funcs/dashboardsTotalCallVolumeByWeekday.ts +0 -111
- package/src/models/operations/getdailycallvolumebyhour.ts +0 -74
- package/src/models/operations/getmonthlycallvolumebyday.ts +0 -74
- package/src/models/operations/getmonthlycallvolumebyweek.ts +0 -74
- package/src/models/operations/getsessionagents.ts +0 -72
- package/src/models/operations/getsessionsummary.ts +0 -164
- package/src/models/operations/gettotalcallvolumebyhour.ts +0 -74
- package/src/models/operations/getweeklycallvolumebyweekday.ts +0 -75
- package/src/models/operations/totalcallvolumebyweekday.ts +0 -74
- package/src/sdk/dashboards.ts +0 -151
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { SyllableSDKCore } from "../core.js";
|
|
6
|
-
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
|
-
import * as M from "../lib/matchers.js";
|
|
8
|
-
import { safeParse } from "../lib/schemas.js";
|
|
9
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
-
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import {
|
|
13
|
-
ConnectionError,
|
|
14
|
-
InvalidRequestError,
|
|
15
|
-
RequestAbortedError,
|
|
16
|
-
RequestTimeoutError,
|
|
17
|
-
UnexpectedClientError,
|
|
18
|
-
} from "../models/errors/httpclienterrors.js";
|
|
19
|
-
import * as errors from "../models/errors/index.js";
|
|
20
|
-
import { SDKError } from "../models/errors/sdkerror.js";
|
|
21
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
|
-
import * as operations from "../models/operations/index.js";
|
|
23
|
-
import { Result } from "../types/fp.js";
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Get Session Summary
|
|
27
|
-
*
|
|
28
|
-
* @remarks
|
|
29
|
-
* Get session summary data
|
|
30
|
-
*/
|
|
31
|
-
export async function dashboardsGetSessionSummary(
|
|
32
|
-
client: SyllableSDKCore,
|
|
33
|
-
request: operations.GetSessionSummaryRequest,
|
|
34
|
-
options?: RequestOptions,
|
|
35
|
-
): Promise<
|
|
36
|
-
Result<
|
|
37
|
-
operations.GetSessionSummaryResponseGetSessionSummary,
|
|
38
|
-
| errors.HTTPValidationError
|
|
39
|
-
| SDKError
|
|
40
|
-
| SDKValidationError
|
|
41
|
-
| UnexpectedClientError
|
|
42
|
-
| InvalidRequestError
|
|
43
|
-
| RequestAbortedError
|
|
44
|
-
| RequestTimeoutError
|
|
45
|
-
| ConnectionError
|
|
46
|
-
>
|
|
47
|
-
> {
|
|
48
|
-
const parsed = safeParse(
|
|
49
|
-
request,
|
|
50
|
-
(value) => operations.GetSessionSummaryRequest$outboundSchema.parse(value),
|
|
51
|
-
"Input validation failed",
|
|
52
|
-
);
|
|
53
|
-
if (!parsed.ok) {
|
|
54
|
-
return parsed;
|
|
55
|
-
}
|
|
56
|
-
const payload = parsed.value;
|
|
57
|
-
const body = null;
|
|
58
|
-
|
|
59
|
-
const path = pathToFunc("/api/v1/dashboards/get_session_summary")();
|
|
60
|
-
|
|
61
|
-
const query = encodeFormQuery({
|
|
62
|
-
"agent_id": payload.agent_id,
|
|
63
|
-
"end_date": payload.end_date,
|
|
64
|
-
"limit": payload.limit,
|
|
65
|
-
"order_by": payload.order_by,
|
|
66
|
-
"page": payload.page,
|
|
67
|
-
"start_date": payload.start_date,
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
const headers = new Headers({
|
|
71
|
-
Accept: "application/json",
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
75
|
-
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
76
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
77
|
-
|
|
78
|
-
const context = {
|
|
79
|
-
operationID: "get_session_summary",
|
|
80
|
-
oAuth2Scopes: [],
|
|
81
|
-
|
|
82
|
-
resolvedSecurity: requestSecurity,
|
|
83
|
-
|
|
84
|
-
securitySource: client._options.apiKeyHeader,
|
|
85
|
-
retryConfig: options?.retries
|
|
86
|
-
|| client._options.retryConfig
|
|
87
|
-
|| { strategy: "none" },
|
|
88
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
const requestRes = client._createRequest(context, {
|
|
92
|
-
security: requestSecurity,
|
|
93
|
-
method: "GET",
|
|
94
|
-
path: path,
|
|
95
|
-
headers: headers,
|
|
96
|
-
query: query,
|
|
97
|
-
body: body,
|
|
98
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
99
|
-
}, options);
|
|
100
|
-
if (!requestRes.ok) {
|
|
101
|
-
return requestRes;
|
|
102
|
-
}
|
|
103
|
-
const req = requestRes.value;
|
|
104
|
-
|
|
105
|
-
const doResult = await client._do(req, {
|
|
106
|
-
context,
|
|
107
|
-
errorCodes: ["422", "4XX", "5XX"],
|
|
108
|
-
retryConfig: context.retryConfig,
|
|
109
|
-
retryCodes: context.retryCodes,
|
|
110
|
-
});
|
|
111
|
-
if (!doResult.ok) {
|
|
112
|
-
return doResult;
|
|
113
|
-
}
|
|
114
|
-
const response = doResult.value;
|
|
115
|
-
|
|
116
|
-
const responseFields = {
|
|
117
|
-
HttpMeta: { Response: response, Request: req },
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
const [result] = await M.match<
|
|
121
|
-
operations.GetSessionSummaryResponseGetSessionSummary,
|
|
122
|
-
| errors.HTTPValidationError
|
|
123
|
-
| SDKError
|
|
124
|
-
| SDKValidationError
|
|
125
|
-
| UnexpectedClientError
|
|
126
|
-
| InvalidRequestError
|
|
127
|
-
| RequestAbortedError
|
|
128
|
-
| RequestTimeoutError
|
|
129
|
-
| ConnectionError
|
|
130
|
-
>(
|
|
131
|
-
M.json(
|
|
132
|
-
200,
|
|
133
|
-
operations.GetSessionSummaryResponseGetSessionSummary$inboundSchema,
|
|
134
|
-
),
|
|
135
|
-
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
136
|
-
M.fail(["4XX", "5XX"]),
|
|
137
|
-
)(response, { extraFields: responseFields });
|
|
138
|
-
if (!result.ok) {
|
|
139
|
-
return result;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
return result;
|
|
143
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { SyllableSDKCore } from "../core.js";
|
|
6
|
-
import * as M from "../lib/matchers.js";
|
|
7
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
8
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
9
|
-
import { pathToFunc } from "../lib/url.js";
|
|
10
|
-
import {
|
|
11
|
-
ConnectionError,
|
|
12
|
-
InvalidRequestError,
|
|
13
|
-
RequestAbortedError,
|
|
14
|
-
RequestTimeoutError,
|
|
15
|
-
UnexpectedClientError,
|
|
16
|
-
} from "../models/errors/httpclienterrors.js";
|
|
17
|
-
import { SDKError } from "../models/errors/sdkerror.js";
|
|
18
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
19
|
-
import * as operations from "../models/operations/index.js";
|
|
20
|
-
import { Result } from "../types/fp.js";
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Get Total Call Volume By Hour
|
|
24
|
-
*
|
|
25
|
-
* @remarks
|
|
26
|
-
* Get total call volume by hour.
|
|
27
|
-
*/
|
|
28
|
-
export async function dashboardsGetTotalCallVolumeByHour(
|
|
29
|
-
client: SyllableSDKCore,
|
|
30
|
-
options?: RequestOptions,
|
|
31
|
-
): Promise<
|
|
32
|
-
Result<
|
|
33
|
-
operations.GetTotalCallVolumeByHourResponseGetTotalCallVolumeByHour,
|
|
34
|
-
| SDKError
|
|
35
|
-
| SDKValidationError
|
|
36
|
-
| UnexpectedClientError
|
|
37
|
-
| InvalidRequestError
|
|
38
|
-
| RequestAbortedError
|
|
39
|
-
| RequestTimeoutError
|
|
40
|
-
| ConnectionError
|
|
41
|
-
>
|
|
42
|
-
> {
|
|
43
|
-
const path = pathToFunc("/api/v1/dashboards/get_total_call_volume_by_hour")();
|
|
44
|
-
|
|
45
|
-
const headers = new Headers({
|
|
46
|
-
Accept: "application/json",
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
50
|
-
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
51
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
52
|
-
|
|
53
|
-
const context = {
|
|
54
|
-
operationID: "get_total_call_volume_by_hour",
|
|
55
|
-
oAuth2Scopes: [],
|
|
56
|
-
|
|
57
|
-
resolvedSecurity: requestSecurity,
|
|
58
|
-
|
|
59
|
-
securitySource: client._options.apiKeyHeader,
|
|
60
|
-
retryConfig: options?.retries
|
|
61
|
-
|| client._options.retryConfig
|
|
62
|
-
|| { strategy: "none" },
|
|
63
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const requestRes = client._createRequest(context, {
|
|
67
|
-
security: requestSecurity,
|
|
68
|
-
method: "GET",
|
|
69
|
-
path: path,
|
|
70
|
-
headers: headers,
|
|
71
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
72
|
-
}, options);
|
|
73
|
-
if (!requestRes.ok) {
|
|
74
|
-
return requestRes;
|
|
75
|
-
}
|
|
76
|
-
const req = requestRes.value;
|
|
77
|
-
|
|
78
|
-
const doResult = await client._do(req, {
|
|
79
|
-
context,
|
|
80
|
-
errorCodes: ["4XX", "5XX"],
|
|
81
|
-
retryConfig: context.retryConfig,
|
|
82
|
-
retryCodes: context.retryCodes,
|
|
83
|
-
});
|
|
84
|
-
if (!doResult.ok) {
|
|
85
|
-
return doResult;
|
|
86
|
-
}
|
|
87
|
-
const response = doResult.value;
|
|
88
|
-
|
|
89
|
-
const [result] = await M.match<
|
|
90
|
-
operations.GetTotalCallVolumeByHourResponseGetTotalCallVolumeByHour,
|
|
91
|
-
| SDKError
|
|
92
|
-
| SDKValidationError
|
|
93
|
-
| UnexpectedClientError
|
|
94
|
-
| InvalidRequestError
|
|
95
|
-
| RequestAbortedError
|
|
96
|
-
| RequestTimeoutError
|
|
97
|
-
| ConnectionError
|
|
98
|
-
>(
|
|
99
|
-
M.json(
|
|
100
|
-
200,
|
|
101
|
-
operations
|
|
102
|
-
.GetTotalCallVolumeByHourResponseGetTotalCallVolumeByHour$inboundSchema,
|
|
103
|
-
),
|
|
104
|
-
M.fail(["4XX", "5XX"]),
|
|
105
|
-
)(response);
|
|
106
|
-
if (!result.ok) {
|
|
107
|
-
return result;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return result;
|
|
111
|
-
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { SyllableSDKCore } from "../core.js";
|
|
6
|
-
import * as M from "../lib/matchers.js";
|
|
7
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
8
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
9
|
-
import { pathToFunc } from "../lib/url.js";
|
|
10
|
-
import {
|
|
11
|
-
ConnectionError,
|
|
12
|
-
InvalidRequestError,
|
|
13
|
-
RequestAbortedError,
|
|
14
|
-
RequestTimeoutError,
|
|
15
|
-
UnexpectedClientError,
|
|
16
|
-
} from "../models/errors/httpclienterrors.js";
|
|
17
|
-
import { SDKError } from "../models/errors/sdkerror.js";
|
|
18
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
19
|
-
import * as operations from "../models/operations/index.js";
|
|
20
|
-
import { Result } from "../types/fp.js";
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Get Weekly Call Volume By Weekday
|
|
24
|
-
*
|
|
25
|
-
* @remarks
|
|
26
|
-
* Get weekly call volume by weekday.
|
|
27
|
-
*/
|
|
28
|
-
export async function dashboardsGetWeeklyCallVolumeByWeekday(
|
|
29
|
-
client: SyllableSDKCore,
|
|
30
|
-
options?: RequestOptions,
|
|
31
|
-
): Promise<
|
|
32
|
-
Result<
|
|
33
|
-
operations.GetWeeklyCallVolumeByWeekdayResponseGetWeeklyCallVolumeByWeekday,
|
|
34
|
-
| SDKError
|
|
35
|
-
| SDKValidationError
|
|
36
|
-
| UnexpectedClientError
|
|
37
|
-
| InvalidRequestError
|
|
38
|
-
| RequestAbortedError
|
|
39
|
-
| RequestTimeoutError
|
|
40
|
-
| ConnectionError
|
|
41
|
-
>
|
|
42
|
-
> {
|
|
43
|
-
const path = pathToFunc(
|
|
44
|
-
"/api/v1/dashboards/get_weekly_call_volume_by_weekday",
|
|
45
|
-
)();
|
|
46
|
-
|
|
47
|
-
const headers = new Headers({
|
|
48
|
-
Accept: "application/json",
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
52
|
-
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
53
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
54
|
-
|
|
55
|
-
const context = {
|
|
56
|
-
operationID: "get_weekly_call_volume_by_weekday",
|
|
57
|
-
oAuth2Scopes: [],
|
|
58
|
-
|
|
59
|
-
resolvedSecurity: requestSecurity,
|
|
60
|
-
|
|
61
|
-
securitySource: client._options.apiKeyHeader,
|
|
62
|
-
retryConfig: options?.retries
|
|
63
|
-
|| client._options.retryConfig
|
|
64
|
-
|| { strategy: "none" },
|
|
65
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
const requestRes = client._createRequest(context, {
|
|
69
|
-
security: requestSecurity,
|
|
70
|
-
method: "GET",
|
|
71
|
-
path: path,
|
|
72
|
-
headers: headers,
|
|
73
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
74
|
-
}, options);
|
|
75
|
-
if (!requestRes.ok) {
|
|
76
|
-
return requestRes;
|
|
77
|
-
}
|
|
78
|
-
const req = requestRes.value;
|
|
79
|
-
|
|
80
|
-
const doResult = await client._do(req, {
|
|
81
|
-
context,
|
|
82
|
-
errorCodes: ["4XX", "5XX"],
|
|
83
|
-
retryConfig: context.retryConfig,
|
|
84
|
-
retryCodes: context.retryCodes,
|
|
85
|
-
});
|
|
86
|
-
if (!doResult.ok) {
|
|
87
|
-
return doResult;
|
|
88
|
-
}
|
|
89
|
-
const response = doResult.value;
|
|
90
|
-
|
|
91
|
-
const [result] = await M.match<
|
|
92
|
-
operations.GetWeeklyCallVolumeByWeekdayResponseGetWeeklyCallVolumeByWeekday,
|
|
93
|
-
| SDKError
|
|
94
|
-
| SDKValidationError
|
|
95
|
-
| UnexpectedClientError
|
|
96
|
-
| InvalidRequestError
|
|
97
|
-
| RequestAbortedError
|
|
98
|
-
| RequestTimeoutError
|
|
99
|
-
| ConnectionError
|
|
100
|
-
>(
|
|
101
|
-
M.json(
|
|
102
|
-
200,
|
|
103
|
-
operations
|
|
104
|
-
.GetWeeklyCallVolumeByWeekdayResponseGetWeeklyCallVolumeByWeekday$inboundSchema,
|
|
105
|
-
),
|
|
106
|
-
M.fail(["4XX", "5XX"]),
|
|
107
|
-
)(response);
|
|
108
|
-
if (!result.ok) {
|
|
109
|
-
return result;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
return result;
|
|
113
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { SyllableSDKCore } from "../core.js";
|
|
6
|
-
import * as M from "../lib/matchers.js";
|
|
7
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
8
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
9
|
-
import { pathToFunc } from "../lib/url.js";
|
|
10
|
-
import {
|
|
11
|
-
ConnectionError,
|
|
12
|
-
InvalidRequestError,
|
|
13
|
-
RequestAbortedError,
|
|
14
|
-
RequestTimeoutError,
|
|
15
|
-
UnexpectedClientError,
|
|
16
|
-
} from "../models/errors/httpclienterrors.js";
|
|
17
|
-
import { SDKError } from "../models/errors/sdkerror.js";
|
|
18
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
19
|
-
import * as operations from "../models/operations/index.js";
|
|
20
|
-
import { Result } from "../types/fp.js";
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Get Total Call Volume By Weekday
|
|
24
|
-
*
|
|
25
|
-
* @remarks
|
|
26
|
-
* Get total call volume by weekday.
|
|
27
|
-
*/
|
|
28
|
-
export async function dashboardsTotalCallVolumeByWeekday(
|
|
29
|
-
client: SyllableSDKCore,
|
|
30
|
-
options?: RequestOptions,
|
|
31
|
-
): Promise<
|
|
32
|
-
Result<
|
|
33
|
-
operations.TotalCallVolumeByWeekdayResponseTotalCallVolumeByWeekday,
|
|
34
|
-
| SDKError
|
|
35
|
-
| SDKValidationError
|
|
36
|
-
| UnexpectedClientError
|
|
37
|
-
| InvalidRequestError
|
|
38
|
-
| RequestAbortedError
|
|
39
|
-
| RequestTimeoutError
|
|
40
|
-
| ConnectionError
|
|
41
|
-
>
|
|
42
|
-
> {
|
|
43
|
-
const path = pathToFunc("/api/v1/dashboards/total_call_volume_by_weekday")();
|
|
44
|
-
|
|
45
|
-
const headers = new Headers({
|
|
46
|
-
Accept: "application/json",
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
50
|
-
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
51
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
52
|
-
|
|
53
|
-
const context = {
|
|
54
|
-
operationID: "total_call_volume_by_weekday",
|
|
55
|
-
oAuth2Scopes: [],
|
|
56
|
-
|
|
57
|
-
resolvedSecurity: requestSecurity,
|
|
58
|
-
|
|
59
|
-
securitySource: client._options.apiKeyHeader,
|
|
60
|
-
retryConfig: options?.retries
|
|
61
|
-
|| client._options.retryConfig
|
|
62
|
-
|| { strategy: "none" },
|
|
63
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const requestRes = client._createRequest(context, {
|
|
67
|
-
security: requestSecurity,
|
|
68
|
-
method: "GET",
|
|
69
|
-
path: path,
|
|
70
|
-
headers: headers,
|
|
71
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
72
|
-
}, options);
|
|
73
|
-
if (!requestRes.ok) {
|
|
74
|
-
return requestRes;
|
|
75
|
-
}
|
|
76
|
-
const req = requestRes.value;
|
|
77
|
-
|
|
78
|
-
const doResult = await client._do(req, {
|
|
79
|
-
context,
|
|
80
|
-
errorCodes: ["4XX", "5XX"],
|
|
81
|
-
retryConfig: context.retryConfig,
|
|
82
|
-
retryCodes: context.retryCodes,
|
|
83
|
-
});
|
|
84
|
-
if (!doResult.ok) {
|
|
85
|
-
return doResult;
|
|
86
|
-
}
|
|
87
|
-
const response = doResult.value;
|
|
88
|
-
|
|
89
|
-
const [result] = await M.match<
|
|
90
|
-
operations.TotalCallVolumeByWeekdayResponseTotalCallVolumeByWeekday,
|
|
91
|
-
| SDKError
|
|
92
|
-
| SDKValidationError
|
|
93
|
-
| UnexpectedClientError
|
|
94
|
-
| InvalidRequestError
|
|
95
|
-
| RequestAbortedError
|
|
96
|
-
| RequestTimeoutError
|
|
97
|
-
| ConnectionError
|
|
98
|
-
>(
|
|
99
|
-
M.json(
|
|
100
|
-
200,
|
|
101
|
-
operations
|
|
102
|
-
.TotalCallVolumeByWeekdayResponseTotalCallVolumeByWeekday$inboundSchema,
|
|
103
|
-
),
|
|
104
|
-
M.fail(["4XX", "5XX"]),
|
|
105
|
-
)(response);
|
|
106
|
-
if (!result.ok) {
|
|
107
|
-
return result;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
return result;
|
|
111
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Successful Response
|
|
12
|
-
*/
|
|
13
|
-
export type GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour = {};
|
|
14
|
-
|
|
15
|
-
/** @internal */
|
|
16
|
-
export const GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour$inboundSchema:
|
|
17
|
-
z.ZodType<
|
|
18
|
-
GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour,
|
|
19
|
-
z.ZodTypeDef,
|
|
20
|
-
unknown
|
|
21
|
-
> = z.object({});
|
|
22
|
-
|
|
23
|
-
/** @internal */
|
|
24
|
-
export type GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour$Outbound =
|
|
25
|
-
{};
|
|
26
|
-
|
|
27
|
-
/** @internal */
|
|
28
|
-
export const GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour$outboundSchema:
|
|
29
|
-
z.ZodType<
|
|
30
|
-
GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour$Outbound,
|
|
31
|
-
z.ZodTypeDef,
|
|
32
|
-
GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour
|
|
33
|
-
> = z.object({});
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @internal
|
|
37
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
38
|
-
*/
|
|
39
|
-
export namespace GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour$ {
|
|
40
|
-
/** @deprecated use `GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour$inboundSchema` instead. */
|
|
41
|
-
export const inboundSchema =
|
|
42
|
-
GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour$inboundSchema;
|
|
43
|
-
/** @deprecated use `GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour$outboundSchema` instead. */
|
|
44
|
-
export const outboundSchema =
|
|
45
|
-
GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour$outboundSchema;
|
|
46
|
-
/** @deprecated use `GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour$Outbound` instead. */
|
|
47
|
-
export type Outbound =
|
|
48
|
-
GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour$Outbound;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export function getDailyCallVolumeByHourResponseGetDailyCallVolumeByHourToJSON(
|
|
52
|
-
getDailyCallVolumeByHourResponseGetDailyCallVolumeByHour:
|
|
53
|
-
GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour,
|
|
54
|
-
): string {
|
|
55
|
-
return JSON.stringify(
|
|
56
|
-
GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour$outboundSchema
|
|
57
|
-
.parse(getDailyCallVolumeByHourResponseGetDailyCallVolumeByHour),
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function getDailyCallVolumeByHourResponseGetDailyCallVolumeByHourFromJSON(
|
|
62
|
-
jsonString: string,
|
|
63
|
-
): SafeParseResult<
|
|
64
|
-
GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour,
|
|
65
|
-
SDKValidationError
|
|
66
|
-
> {
|
|
67
|
-
return safeParse(
|
|
68
|
-
jsonString,
|
|
69
|
-
(x) =>
|
|
70
|
-
GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour$inboundSchema
|
|
71
|
-
.parse(JSON.parse(x)),
|
|
72
|
-
`Failed to parse 'GetDailyCallVolumeByHourResponseGetDailyCallVolumeByHour' from JSON`,
|
|
73
|
-
);
|
|
74
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Successful Response
|
|
12
|
-
*/
|
|
13
|
-
export type GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay = {};
|
|
14
|
-
|
|
15
|
-
/** @internal */
|
|
16
|
-
export const GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay$inboundSchema:
|
|
17
|
-
z.ZodType<
|
|
18
|
-
GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay,
|
|
19
|
-
z.ZodTypeDef,
|
|
20
|
-
unknown
|
|
21
|
-
> = z.object({});
|
|
22
|
-
|
|
23
|
-
/** @internal */
|
|
24
|
-
export type GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay$Outbound =
|
|
25
|
-
{};
|
|
26
|
-
|
|
27
|
-
/** @internal */
|
|
28
|
-
export const GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay$outboundSchema:
|
|
29
|
-
z.ZodType<
|
|
30
|
-
GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay$Outbound,
|
|
31
|
-
z.ZodTypeDef,
|
|
32
|
-
GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay
|
|
33
|
-
> = z.object({});
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @internal
|
|
37
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
38
|
-
*/
|
|
39
|
-
export namespace GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay$ {
|
|
40
|
-
/** @deprecated use `GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay$inboundSchema` instead. */
|
|
41
|
-
export const inboundSchema =
|
|
42
|
-
GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay$inboundSchema;
|
|
43
|
-
/** @deprecated use `GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay$outboundSchema` instead. */
|
|
44
|
-
export const outboundSchema =
|
|
45
|
-
GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay$outboundSchema;
|
|
46
|
-
/** @deprecated use `GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay$Outbound` instead. */
|
|
47
|
-
export type Outbound =
|
|
48
|
-
GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay$Outbound;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export function getMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDayToJSON(
|
|
52
|
-
getMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay:
|
|
53
|
-
GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay,
|
|
54
|
-
): string {
|
|
55
|
-
return JSON.stringify(
|
|
56
|
-
GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay$outboundSchema
|
|
57
|
-
.parse(getMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay),
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function getMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDayFromJSON(
|
|
62
|
-
jsonString: string,
|
|
63
|
-
): SafeParseResult<
|
|
64
|
-
GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay,
|
|
65
|
-
SDKValidationError
|
|
66
|
-
> {
|
|
67
|
-
return safeParse(
|
|
68
|
-
jsonString,
|
|
69
|
-
(x) =>
|
|
70
|
-
GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay$inboundSchema
|
|
71
|
-
.parse(JSON.parse(x)),
|
|
72
|
-
`Failed to parse 'GetMonthlyCallVolumeByDayResponseGetMonthlyCallVolumeByDay' from JSON`,
|
|
73
|
-
);
|
|
74
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Successful Response
|
|
12
|
-
*/
|
|
13
|
-
export type GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek = {};
|
|
14
|
-
|
|
15
|
-
/** @internal */
|
|
16
|
-
export const GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek$inboundSchema:
|
|
17
|
-
z.ZodType<
|
|
18
|
-
GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek,
|
|
19
|
-
z.ZodTypeDef,
|
|
20
|
-
unknown
|
|
21
|
-
> = z.object({});
|
|
22
|
-
|
|
23
|
-
/** @internal */
|
|
24
|
-
export type GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek$Outbound =
|
|
25
|
-
{};
|
|
26
|
-
|
|
27
|
-
/** @internal */
|
|
28
|
-
export const GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek$outboundSchema:
|
|
29
|
-
z.ZodType<
|
|
30
|
-
GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek$Outbound,
|
|
31
|
-
z.ZodTypeDef,
|
|
32
|
-
GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek
|
|
33
|
-
> = z.object({});
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* @internal
|
|
37
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
38
|
-
*/
|
|
39
|
-
export namespace GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek$ {
|
|
40
|
-
/** @deprecated use `GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek$inboundSchema` instead. */
|
|
41
|
-
export const inboundSchema =
|
|
42
|
-
GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek$inboundSchema;
|
|
43
|
-
/** @deprecated use `GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek$outboundSchema` instead. */
|
|
44
|
-
export const outboundSchema =
|
|
45
|
-
GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek$outboundSchema;
|
|
46
|
-
/** @deprecated use `GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek$Outbound` instead. */
|
|
47
|
-
export type Outbound =
|
|
48
|
-
GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek$Outbound;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export function getMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeekToJSON(
|
|
52
|
-
getMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek:
|
|
53
|
-
GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek,
|
|
54
|
-
): string {
|
|
55
|
-
return JSON.stringify(
|
|
56
|
-
GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek$outboundSchema
|
|
57
|
-
.parse(getMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek),
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function getMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeekFromJSON(
|
|
62
|
-
jsonString: string,
|
|
63
|
-
): SafeParseResult<
|
|
64
|
-
GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek,
|
|
65
|
-
SDKValidationError
|
|
66
|
-
> {
|
|
67
|
-
return safeParse(
|
|
68
|
-
jsonString,
|
|
69
|
-
(x) =>
|
|
70
|
-
GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek$inboundSchema
|
|
71
|
-
.parse(JSON.parse(x)),
|
|
72
|
-
`Failed to parse 'GetMonthlyCallVolumeByWeekResponseGetMonthlyCallVolumeByWeek' from JSON`,
|
|
73
|
-
);
|
|
74
|
-
}
|