syllable-sdk 0.1.0-alpha.39 → 0.1.0-alpha.40
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 +24 -16
- package/docs/sdks/dashboards/README.md +178 -8
- package/docs/sdks/tools/README.md +12 -4
- package/docs/sdks/v1/README.md +178 -8
- package/funcs/dashboardsPostGetDashboard.d.ts +20 -0
- package/funcs/dashboardsPostGetDashboard.d.ts.map +1 -0
- package/funcs/dashboardsPostGetDashboard.js +108 -0
- package/funcs/dashboardsPostGetDashboard.js.map +1 -0
- package/funcs/dashboardsPostListDashboard.d.ts +20 -0
- package/funcs/dashboardsPostListDashboard.d.ts.map +1 -0
- package/funcs/dashboardsPostListDashboard.js +116 -0
- package/funcs/dashboardsPostListDashboard.js.map +1 -0
- package/funcs/dashboardsPostSessionEventsDashboard.d.ts +3 -0
- package/funcs/dashboardsPostSessionEventsDashboard.d.ts.map +1 -1
- package/funcs/dashboardsPostSessionEventsDashboard.js +3 -0
- package/funcs/dashboardsPostSessionEventsDashboard.js.map +1 -1
- package/funcs/dashboardsPostSessionSummaryDashboard.d.ts +3 -0
- package/funcs/dashboardsPostSessionSummaryDashboard.d.ts.map +1 -1
- package/funcs/dashboardsPostSessionSummaryDashboard.js +3 -0
- package/funcs/dashboardsPostSessionSummaryDashboard.js.map +1 -1
- package/funcs/dashboardsPostSessionTransfersDashboard.d.ts +3 -0
- package/funcs/dashboardsPostSessionTransfersDashboard.d.ts.map +1 -1
- package/funcs/dashboardsPostSessionTransfersDashboard.js +3 -0
- package/funcs/dashboardsPostSessionTransfersDashboard.js.map +1 -1
- package/funcs/dashboardsPostSessionsDashboard.d.ts +3 -0
- package/funcs/dashboardsPostSessionsDashboard.d.ts.map +1 -1
- package/funcs/dashboardsPostSessionsDashboard.js +3 -0
- package/funcs/dashboardsPostSessionsDashboard.js.map +1 -1
- package/funcs/v1PostGetDashboard.d.ts +20 -0
- package/funcs/v1PostGetDashboard.d.ts.map +1 -0
- package/funcs/v1PostGetDashboard.js +108 -0
- package/funcs/v1PostGetDashboard.js.map +1 -0
- package/funcs/v1PostListDashboard.d.ts +20 -0
- package/funcs/v1PostListDashboard.d.ts.map +1 -0
- package/funcs/v1PostListDashboard.js +116 -0
- package/funcs/v1PostListDashboard.js.map +1 -0
- package/funcs/v1PostSessionEventsDashboard.d.ts +3 -0
- package/funcs/v1PostSessionEventsDashboard.d.ts.map +1 -1
- package/funcs/v1PostSessionEventsDashboard.js +3 -0
- package/funcs/v1PostSessionEventsDashboard.js.map +1 -1
- package/funcs/v1PostSessionSummaryDashboard.d.ts +3 -0
- package/funcs/v1PostSessionSummaryDashboard.d.ts.map +1 -1
- package/funcs/v1PostSessionSummaryDashboard.js +3 -0
- package/funcs/v1PostSessionSummaryDashboard.js.map +1 -1
- package/funcs/v1PostSessionTransfersDashboard.d.ts +3 -0
- package/funcs/v1PostSessionTransfersDashboard.d.ts.map +1 -1
- package/funcs/v1PostSessionTransfersDashboard.js +3 -0
- package/funcs/v1PostSessionTransfersDashboard.js.map +1 -1
- package/funcs/v1PostSessionsDashboard.d.ts +3 -0
- package/funcs/v1PostSessionsDashboard.d.ts.map +1 -1
- package/funcs/v1PostSessionsDashboard.js +3 -0
- package/funcs/v1PostSessionsDashboard.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/dashboard.d.ts +3 -0
- package/models/components/dashboard.d.ts.map +1 -1
- package/models/components/dashboard.js.map +1 -1
- package/models/components/dashboardproperties.d.ts +37 -0
- package/models/components/dashboardproperties.d.ts.map +1 -0
- package/models/components/dashboardproperties.js +53 -0
- package/models/components/dashboardproperties.js.map +1 -0
- package/models/components/dashboardresponse.d.ts +50 -0
- package/models/components/dashboardresponse.d.ts.map +1 -0
- package/models/components/dashboardresponse.js +74 -0
- package/models/components/dashboardresponse.js.map +1 -0
- package/models/components/dashboardtokenresponse.d.ts +65 -0
- package/models/components/dashboardtokenresponse.d.ts.map +1 -0
- package/models/components/dashboardtokenresponse.js +86 -0
- package/models/components/dashboardtokenresponse.js.map +1 -0
- package/models/components/index.d.ts +4 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +4 -0
- package/models/components/index.js.map +1 -1
- package/models/components/listresponsedashboardresponse.d.ts +38 -0
- package/models/components/listresponsedashboardresponse.d.ts.map +1 -0
- package/models/components/listresponsedashboardresponse.js +81 -0
- package/models/components/listresponsedashboardresponse.js.map +1 -0
- package/models/components/tooldefinition.d.ts +8 -50
- package/models/components/tooldefinition.d.ts.map +1 -1
- package/models/components/tooldefinition.js +7 -68
- package/models/components/tooldefinition.js.map +1 -1
- package/models/components/toolfunction.d.ts +2 -26
- package/models/components/toolfunction.d.ts.map +1 -1
- package/models/components/toolfunction.js +3 -26
- package/models/components/toolfunction.js.map +1 -1
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/postgetdashboard.d.ts +29 -0
- package/models/operations/postgetdashboard.d.ts.map +1 -0
- package/models/operations/postgetdashboard.js +68 -0
- package/models/operations/postgetdashboard.js.map +1 -0
- package/models/operations/postlistdashboard.d.ts +46 -0
- package/models/operations/postlistdashboard.d.ts.map +1 -0
- package/models/operations/postlistdashboard.js +101 -0
- package/models/operations/postlistdashboard.js.map +1 -0
- package/openapi.json +381 -11
- package/package.json +1 -1
- package/sdk/dashboards.d.ts +33 -0
- package/sdk/dashboards.d.ts.map +1 -1
- package/sdk/dashboards.js +38 -0
- package/sdk/dashboards.js.map +1 -1
- package/sdk/v1.d.ts +33 -0
- package/sdk/v1.d.ts.map +1 -1
- package/sdk/v1.js +38 -0
- package/sdk/v1.js.map +1 -1
- package/src/funcs/dashboardsPostGetDashboard.ts +142 -0
- package/src/funcs/dashboardsPostListDashboard.ts +150 -0
- package/src/funcs/dashboardsPostSessionEventsDashboard.ts +3 -0
- package/src/funcs/dashboardsPostSessionSummaryDashboard.ts +3 -0
- package/src/funcs/dashboardsPostSessionTransfersDashboard.ts +3 -0
- package/src/funcs/dashboardsPostSessionsDashboard.ts +3 -0
- package/src/funcs/v1PostGetDashboard.ts +142 -0
- package/src/funcs/v1PostListDashboard.ts +150 -0
- package/src/funcs/v1PostSessionEventsDashboard.ts +3 -0
- package/src/funcs/v1PostSessionSummaryDashboard.ts +3 -0
- package/src/funcs/v1PostSessionTransfersDashboard.ts +3 -0
- package/src/funcs/v1PostSessionsDashboard.ts +3 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/dashboard.ts +3 -0
- package/src/models/components/dashboardproperties.ts +36 -0
- package/src/models/components/dashboardresponse.ts +102 -0
- package/src/models/components/dashboardtokenresponse.ts +129 -0
- package/src/models/components/index.ts +4 -0
- package/src/models/components/listresponsedashboardresponse.ts +103 -0
- package/src/models/components/tooldefinition.ts +12 -107
- package/src/models/components/toolfunction.ts +4 -53
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/postgetdashboard.ts +75 -0
- package/src/models/operations/postlistdashboard.ts +124 -0
- package/src/sdk/dashboards.ts +55 -0
- package/src/sdk/v1.ts +55 -0
|
@@ -0,0 +1,150 @@
|
|
|
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 { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { Result } from "../types/fp.js";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Post List Dashboards
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* METHOD: POST
|
|
32
|
+
* URL: /dashboard/list
|
|
33
|
+
* ARGUMENTS: None
|
|
34
|
+
* RETURNS: List of dashboards
|
|
35
|
+
*/
|
|
36
|
+
export async function v1PostListDashboard(
|
|
37
|
+
client: SyllableSDKCore,
|
|
38
|
+
request: operations.PostListDashboardRequest,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): Promise<
|
|
41
|
+
Result<
|
|
42
|
+
components.ListResponseDashboardResponse,
|
|
43
|
+
| errors.HTTPValidationError
|
|
44
|
+
| SDKError
|
|
45
|
+
| SDKValidationError
|
|
46
|
+
| UnexpectedClientError
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| RequestAbortedError
|
|
49
|
+
| RequestTimeoutError
|
|
50
|
+
| ConnectionError
|
|
51
|
+
>
|
|
52
|
+
> {
|
|
53
|
+
const parsed = safeParse(
|
|
54
|
+
request,
|
|
55
|
+
(value) => operations.PostListDashboardRequest$outboundSchema.parse(value),
|
|
56
|
+
"Input validation failed",
|
|
57
|
+
);
|
|
58
|
+
if (!parsed.ok) {
|
|
59
|
+
return parsed;
|
|
60
|
+
}
|
|
61
|
+
const payload = parsed.value;
|
|
62
|
+
const body = null;
|
|
63
|
+
|
|
64
|
+
const path = pathToFunc("/api/v1/dashboards/list")();
|
|
65
|
+
|
|
66
|
+
const query = encodeFormQuery({
|
|
67
|
+
"end_datetime": payload.end_datetime,
|
|
68
|
+
"fields": payload.fields,
|
|
69
|
+
"limit": payload.limit,
|
|
70
|
+
"order_by": payload.order_by,
|
|
71
|
+
"order_by_direction": payload.order_by_direction,
|
|
72
|
+
"page": payload.page,
|
|
73
|
+
"search_field_values": payload.search_field_values,
|
|
74
|
+
"search_fields": payload.search_fields,
|
|
75
|
+
"start_datetime": payload.start_datetime,
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const headers = new Headers(compactMap({
|
|
79
|
+
Accept: "application/json",
|
|
80
|
+
}));
|
|
81
|
+
|
|
82
|
+
const secConfig = await extractSecurity(client._options.apiKeyHeader);
|
|
83
|
+
const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
|
|
84
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
85
|
+
|
|
86
|
+
const context = {
|
|
87
|
+
operationID: "post_list_dashboard",
|
|
88
|
+
oAuth2Scopes: [],
|
|
89
|
+
|
|
90
|
+
resolvedSecurity: requestSecurity,
|
|
91
|
+
|
|
92
|
+
securitySource: client._options.apiKeyHeader,
|
|
93
|
+
retryConfig: options?.retries
|
|
94
|
+
|| client._options.retryConfig
|
|
95
|
+
|| { strategy: "none" },
|
|
96
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const requestRes = client._createRequest(context, {
|
|
100
|
+
security: requestSecurity,
|
|
101
|
+
method: "POST",
|
|
102
|
+
baseURL: options?.serverURL,
|
|
103
|
+
path: path,
|
|
104
|
+
headers: headers,
|
|
105
|
+
query: query,
|
|
106
|
+
body: body,
|
|
107
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
108
|
+
}, options);
|
|
109
|
+
if (!requestRes.ok) {
|
|
110
|
+
return requestRes;
|
|
111
|
+
}
|
|
112
|
+
const req = requestRes.value;
|
|
113
|
+
|
|
114
|
+
const doResult = await client._do(req, {
|
|
115
|
+
context,
|
|
116
|
+
errorCodes: ["422", "4XX", "5XX"],
|
|
117
|
+
retryConfig: context.retryConfig,
|
|
118
|
+
retryCodes: context.retryCodes,
|
|
119
|
+
});
|
|
120
|
+
if (!doResult.ok) {
|
|
121
|
+
return doResult;
|
|
122
|
+
}
|
|
123
|
+
const response = doResult.value;
|
|
124
|
+
|
|
125
|
+
const responseFields = {
|
|
126
|
+
HttpMeta: { Response: response, Request: req },
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const [result] = await M.match<
|
|
130
|
+
components.ListResponseDashboardResponse,
|
|
131
|
+
| errors.HTTPValidationError
|
|
132
|
+
| SDKError
|
|
133
|
+
| SDKValidationError
|
|
134
|
+
| UnexpectedClientError
|
|
135
|
+
| InvalidRequestError
|
|
136
|
+
| RequestAbortedError
|
|
137
|
+
| RequestTimeoutError
|
|
138
|
+
| ConnectionError
|
|
139
|
+
>(
|
|
140
|
+
M.json(200, components.ListResponseDashboardResponse$inboundSchema),
|
|
141
|
+
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
142
|
+
M.fail("4XX"),
|
|
143
|
+
M.fail("5XX"),
|
|
144
|
+
)(response, { extraFields: responseFields });
|
|
145
|
+
if (!result.ok) {
|
|
146
|
+
return result;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return result;
|
|
150
|
+
}
|
|
@@ -28,6 +28,9 @@ import { Result } from "../types/fp.js";
|
|
|
28
28
|
* URL: /dashboard/session_events
|
|
29
29
|
* ARGUMENTS: None
|
|
30
30
|
* RETURNS: Dashboard info for embedding
|
|
31
|
+
* DEPRECATED: This endpoint is deprecated. Please use /dashboard/list instead
|
|
32
|
+
*
|
|
33
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
31
34
|
*/
|
|
32
35
|
export async function v1PostSessionEventsDashboard(
|
|
33
36
|
client: SyllableSDKCore,
|
|
@@ -28,6 +28,9 @@ import { Result } from "../types/fp.js";
|
|
|
28
28
|
* URL: /dashboard/session_summary
|
|
29
29
|
* ARGUMENTS: None
|
|
30
30
|
* RETURNS: Dashboard info for embedding
|
|
31
|
+
* DEPRECATED: This endpoint is deprecated. Please use /dashboard/list instead
|
|
32
|
+
*
|
|
33
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
31
34
|
*/
|
|
32
35
|
export async function v1PostSessionSummaryDashboard(
|
|
33
36
|
client: SyllableSDKCore,
|
|
@@ -28,6 +28,9 @@ import { Result } from "../types/fp.js";
|
|
|
28
28
|
* URL: /dashboard/session_transfers
|
|
29
29
|
* ARGUMENTS: None
|
|
30
30
|
* RETURNS: Dashboard info for embedding
|
|
31
|
+
* DEPRECATED: This endpoint is deprecated. Please use /dashboard/list instead
|
|
32
|
+
*
|
|
33
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
31
34
|
*/
|
|
32
35
|
export async function v1PostSessionTransfersDashboard(
|
|
33
36
|
client: SyllableSDKCore,
|
|
@@ -28,6 +28,9 @@ import { Result } from "../types/fp.js";
|
|
|
28
28
|
* URL: /dashboard/sessions
|
|
29
29
|
* ARGUMENTS: None
|
|
30
30
|
* RETURNS: Dashboard info for embedding
|
|
31
|
+
* DEPRECATED: This endpoint is deprecated. Please use /dashboard/list instead
|
|
32
|
+
*
|
|
33
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
31
34
|
*/
|
|
32
35
|
export async function v1PostSessionsDashboard(
|
|
33
36
|
client: SyllableSDKCore,
|
package/src/lib/config.ts
CHANGED
|
@@ -57,8 +57,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
57
57
|
export const SDK_METADATA = {
|
|
58
58
|
language: "typescript",
|
|
59
59
|
openapiDocVersion: "0.0.2",
|
|
60
|
-
sdkVersion: "0.1.0-alpha.
|
|
60
|
+
sdkVersion: "0.1.0-alpha.40",
|
|
61
61
|
genVersion: "2.506.0",
|
|
62
62
|
userAgent:
|
|
63
|
-
"speakeasy-sdk/typescript 0.1.0-alpha.
|
|
63
|
+
"speakeasy-sdk/typescript 0.1.0-alpha.40 2.506.0 0.0.2 syllable-sdk",
|
|
64
64
|
} as const;
|
|
@@ -9,6 +9,9 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
|
+
* Deprecated. Please update to use DashboardTokenResponse.
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
12
15
|
* Basic information about a dashboard.
|
|
13
16
|
*/
|
|
14
17
|
export type Dashboard = {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const DashboardProperties = {
|
|
9
|
+
Id: "id",
|
|
10
|
+
Name: "name",
|
|
11
|
+
DisplayName: "display_name",
|
|
12
|
+
Rank: "rank",
|
|
13
|
+
Label: "label",
|
|
14
|
+
} as const;
|
|
15
|
+
export type DashboardProperties = ClosedEnum<typeof DashboardProperties>;
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const DashboardProperties$inboundSchema: z.ZodNativeEnum<
|
|
19
|
+
typeof DashboardProperties
|
|
20
|
+
> = z.nativeEnum(DashboardProperties);
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const DashboardProperties$outboundSchema: z.ZodNativeEnum<
|
|
24
|
+
typeof DashboardProperties
|
|
25
|
+
> = DashboardProperties$inboundSchema;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
30
|
+
*/
|
|
31
|
+
export namespace DashboardProperties$ {
|
|
32
|
+
/** @deprecated use `DashboardProperties$inboundSchema` instead. */
|
|
33
|
+
export const inboundSchema = DashboardProperties$inboundSchema;
|
|
34
|
+
/** @deprecated use `DashboardProperties$outboundSchema` instead. */
|
|
35
|
+
export const outboundSchema = DashboardProperties$outboundSchema;
|
|
36
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Basic information about a dashboard with a description.
|
|
13
|
+
*/
|
|
14
|
+
export type DashboardResponse = {
|
|
15
|
+
/**
|
|
16
|
+
* Name of the dashboard
|
|
17
|
+
*/
|
|
18
|
+
name: string;
|
|
19
|
+
/**
|
|
20
|
+
* Display name of the dashboard
|
|
21
|
+
*/
|
|
22
|
+
displayName: string;
|
|
23
|
+
/**
|
|
24
|
+
* Dashboard importance, 0 is the highest
|
|
25
|
+
*/
|
|
26
|
+
rank: number;
|
|
27
|
+
/**
|
|
28
|
+
* Dashboard label. Typically report or dashboard
|
|
29
|
+
*/
|
|
30
|
+
label: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const DashboardResponse$inboundSchema: z.ZodType<
|
|
35
|
+
DashboardResponse,
|
|
36
|
+
z.ZodTypeDef,
|
|
37
|
+
unknown
|
|
38
|
+
> = z.object({
|
|
39
|
+
name: z.string(),
|
|
40
|
+
display_name: z.string(),
|
|
41
|
+
rank: z.number().int(),
|
|
42
|
+
label: z.string(),
|
|
43
|
+
}).transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
"display_name": "displayName",
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type DashboardResponse$Outbound = {
|
|
51
|
+
name: string;
|
|
52
|
+
display_name: string;
|
|
53
|
+
rank: number;
|
|
54
|
+
label: string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const DashboardResponse$outboundSchema: z.ZodType<
|
|
59
|
+
DashboardResponse$Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
DashboardResponse
|
|
62
|
+
> = z.object({
|
|
63
|
+
name: z.string(),
|
|
64
|
+
displayName: z.string(),
|
|
65
|
+
rank: z.number().int(),
|
|
66
|
+
label: z.string(),
|
|
67
|
+
}).transform((v) => {
|
|
68
|
+
return remap$(v, {
|
|
69
|
+
displayName: "display_name",
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
76
|
+
*/
|
|
77
|
+
export namespace DashboardResponse$ {
|
|
78
|
+
/** @deprecated use `DashboardResponse$inboundSchema` instead. */
|
|
79
|
+
export const inboundSchema = DashboardResponse$inboundSchema;
|
|
80
|
+
/** @deprecated use `DashboardResponse$outboundSchema` instead. */
|
|
81
|
+
export const outboundSchema = DashboardResponse$outboundSchema;
|
|
82
|
+
/** @deprecated use `DashboardResponse$Outbound` instead. */
|
|
83
|
+
export type Outbound = DashboardResponse$Outbound;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function dashboardResponseToJSON(
|
|
87
|
+
dashboardResponse: DashboardResponse,
|
|
88
|
+
): string {
|
|
89
|
+
return JSON.stringify(
|
|
90
|
+
DashboardResponse$outboundSchema.parse(dashboardResponse),
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function dashboardResponseFromJSON(
|
|
95
|
+
jsonString: string,
|
|
96
|
+
): SafeParseResult<DashboardResponse, SDKValidationError> {
|
|
97
|
+
return safeParse(
|
|
98
|
+
jsonString,
|
|
99
|
+
(x) => DashboardResponse$inboundSchema.parse(JSON.parse(x)),
|
|
100
|
+
`Failed to parse 'DashboardResponse' from JSON`,
|
|
101
|
+
);
|
|
102
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Basic information about a dashboard.
|
|
13
|
+
*/
|
|
14
|
+
export type DashboardTokenResponse = {
|
|
15
|
+
/**
|
|
16
|
+
* Superset embedded ID of the dashboard
|
|
17
|
+
*/
|
|
18
|
+
embeddedId: string;
|
|
19
|
+
/**
|
|
20
|
+
* Superset guest token of the dashboard
|
|
21
|
+
*/
|
|
22
|
+
guestToken: string;
|
|
23
|
+
/**
|
|
24
|
+
* Name of the dashboard
|
|
25
|
+
*/
|
|
26
|
+
name: string;
|
|
27
|
+
/**
|
|
28
|
+
* Display name of the dashboard
|
|
29
|
+
*/
|
|
30
|
+
displayName: string;
|
|
31
|
+
/**
|
|
32
|
+
* Superset URL of the dashboard
|
|
33
|
+
*/
|
|
34
|
+
supersetUrl: string;
|
|
35
|
+
/**
|
|
36
|
+
* Dashboard importance, 0 is the highest
|
|
37
|
+
*/
|
|
38
|
+
rank: number;
|
|
39
|
+
/**
|
|
40
|
+
* Dashboard label. Typically report or dashboard
|
|
41
|
+
*/
|
|
42
|
+
label: string;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const DashboardTokenResponse$inboundSchema: z.ZodType<
|
|
47
|
+
DashboardTokenResponse,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
unknown
|
|
50
|
+
> = z.object({
|
|
51
|
+
embedded_id: z.string(),
|
|
52
|
+
guest_token: z.string(),
|
|
53
|
+
name: z.string(),
|
|
54
|
+
display_name: z.string(),
|
|
55
|
+
superset_url: z.string(),
|
|
56
|
+
rank: z.number().int(),
|
|
57
|
+
label: z.string(),
|
|
58
|
+
}).transform((v) => {
|
|
59
|
+
return remap$(v, {
|
|
60
|
+
"embedded_id": "embeddedId",
|
|
61
|
+
"guest_token": "guestToken",
|
|
62
|
+
"display_name": "displayName",
|
|
63
|
+
"superset_url": "supersetUrl",
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
/** @internal */
|
|
68
|
+
export type DashboardTokenResponse$Outbound = {
|
|
69
|
+
embedded_id: string;
|
|
70
|
+
guest_token: string;
|
|
71
|
+
name: string;
|
|
72
|
+
display_name: string;
|
|
73
|
+
superset_url: string;
|
|
74
|
+
rank: number;
|
|
75
|
+
label: string;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export const DashboardTokenResponse$outboundSchema: z.ZodType<
|
|
80
|
+
DashboardTokenResponse$Outbound,
|
|
81
|
+
z.ZodTypeDef,
|
|
82
|
+
DashboardTokenResponse
|
|
83
|
+
> = z.object({
|
|
84
|
+
embeddedId: z.string(),
|
|
85
|
+
guestToken: z.string(),
|
|
86
|
+
name: z.string(),
|
|
87
|
+
displayName: z.string(),
|
|
88
|
+
supersetUrl: z.string(),
|
|
89
|
+
rank: z.number().int(),
|
|
90
|
+
label: z.string(),
|
|
91
|
+
}).transform((v) => {
|
|
92
|
+
return remap$(v, {
|
|
93
|
+
embeddedId: "embedded_id",
|
|
94
|
+
guestToken: "guest_token",
|
|
95
|
+
displayName: "display_name",
|
|
96
|
+
supersetUrl: "superset_url",
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @internal
|
|
102
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
103
|
+
*/
|
|
104
|
+
export namespace DashboardTokenResponse$ {
|
|
105
|
+
/** @deprecated use `DashboardTokenResponse$inboundSchema` instead. */
|
|
106
|
+
export const inboundSchema = DashboardTokenResponse$inboundSchema;
|
|
107
|
+
/** @deprecated use `DashboardTokenResponse$outboundSchema` instead. */
|
|
108
|
+
export const outboundSchema = DashboardTokenResponse$outboundSchema;
|
|
109
|
+
/** @deprecated use `DashboardTokenResponse$Outbound` instead. */
|
|
110
|
+
export type Outbound = DashboardTokenResponse$Outbound;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export function dashboardTokenResponseToJSON(
|
|
114
|
+
dashboardTokenResponse: DashboardTokenResponse,
|
|
115
|
+
): string {
|
|
116
|
+
return JSON.stringify(
|
|
117
|
+
DashboardTokenResponse$outboundSchema.parse(dashboardTokenResponse),
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export function dashboardTokenResponseFromJSON(
|
|
122
|
+
jsonString: string,
|
|
123
|
+
): SafeParseResult<DashboardTokenResponse, SDKValidationError> {
|
|
124
|
+
return safeParse(
|
|
125
|
+
jsonString,
|
|
126
|
+
(x) => DashboardTokenResponse$inboundSchema.parse(JSON.parse(x)),
|
|
127
|
+
`Failed to parse 'DashboardTokenResponse' from JSON`,
|
|
128
|
+
);
|
|
129
|
+
}
|
|
@@ -27,6 +27,9 @@ export * from "./custommessageresponse.js";
|
|
|
27
27
|
export * from "./custommessagerule.js";
|
|
28
28
|
export * from "./custommessageupdaterequest.js";
|
|
29
29
|
export * from "./dashboard.js";
|
|
30
|
+
export * from "./dashboardproperties.js";
|
|
31
|
+
export * from "./dashboardresponse.js";
|
|
32
|
+
export * from "./dashboardtokenresponse.js";
|
|
30
33
|
export * from "./datasourcecreaterequest.js";
|
|
31
34
|
export * from "./datasourcedetailresponse.js";
|
|
32
35
|
export * from "./datasourcemetadataresponse.js";
|
|
@@ -42,6 +45,7 @@ export * from "./listresponsechannel.js";
|
|
|
42
45
|
export * from "./listresponsechanneltargetresponse.js";
|
|
43
46
|
export * from "./listresponseconversation.js";
|
|
44
47
|
export * from "./listresponsecustommessageresponse.js";
|
|
48
|
+
export * from "./listresponsedashboardresponse.js";
|
|
45
49
|
export * from "./listresponsedatasourcemetadataresponse.js";
|
|
46
50
|
export * from "./listresponseevent.js";
|
|
47
51
|
export * from "./listresponsepromptresponse.js";
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
DashboardResponse,
|
|
12
|
+
DashboardResponse$inboundSchema,
|
|
13
|
+
DashboardResponse$Outbound,
|
|
14
|
+
DashboardResponse$outboundSchema,
|
|
15
|
+
} from "./dashboardresponse.js";
|
|
16
|
+
|
|
17
|
+
export type ListResponseDashboardResponse = {
|
|
18
|
+
items: Array<DashboardResponse>;
|
|
19
|
+
page: number;
|
|
20
|
+
pageSize: number;
|
|
21
|
+
totalPages?: number | null | undefined;
|
|
22
|
+
totalCount?: number | null | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ListResponseDashboardResponse$inboundSchema: z.ZodType<
|
|
27
|
+
ListResponseDashboardResponse,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
items: z.array(DashboardResponse$inboundSchema),
|
|
32
|
+
page: z.number().int(),
|
|
33
|
+
page_size: z.number().int(),
|
|
34
|
+
total_pages: z.nullable(z.number().int()).optional(),
|
|
35
|
+
total_count: z.nullable(z.number().int()).optional(),
|
|
36
|
+
}).transform((v) => {
|
|
37
|
+
return remap$(v, {
|
|
38
|
+
"page_size": "pageSize",
|
|
39
|
+
"total_pages": "totalPages",
|
|
40
|
+
"total_count": "totalCount",
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export type ListResponseDashboardResponse$Outbound = {
|
|
46
|
+
items: Array<DashboardResponse$Outbound>;
|
|
47
|
+
page: number;
|
|
48
|
+
page_size: number;
|
|
49
|
+
total_pages?: number | null | undefined;
|
|
50
|
+
total_count?: number | null | undefined;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const ListResponseDashboardResponse$outboundSchema: z.ZodType<
|
|
55
|
+
ListResponseDashboardResponse$Outbound,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
ListResponseDashboardResponse
|
|
58
|
+
> = z.object({
|
|
59
|
+
items: z.array(DashboardResponse$outboundSchema),
|
|
60
|
+
page: z.number().int(),
|
|
61
|
+
pageSize: z.number().int(),
|
|
62
|
+
totalPages: z.nullable(z.number().int()).optional(),
|
|
63
|
+
totalCount: z.nullable(z.number().int()).optional(),
|
|
64
|
+
}).transform((v) => {
|
|
65
|
+
return remap$(v, {
|
|
66
|
+
pageSize: "page_size",
|
|
67
|
+
totalPages: "total_pages",
|
|
68
|
+
totalCount: "total_count",
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @internal
|
|
74
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
75
|
+
*/
|
|
76
|
+
export namespace ListResponseDashboardResponse$ {
|
|
77
|
+
/** @deprecated use `ListResponseDashboardResponse$inboundSchema` instead. */
|
|
78
|
+
export const inboundSchema = ListResponseDashboardResponse$inboundSchema;
|
|
79
|
+
/** @deprecated use `ListResponseDashboardResponse$outboundSchema` instead. */
|
|
80
|
+
export const outboundSchema = ListResponseDashboardResponse$outboundSchema;
|
|
81
|
+
/** @deprecated use `ListResponseDashboardResponse$Outbound` instead. */
|
|
82
|
+
export type Outbound = ListResponseDashboardResponse$Outbound;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function listResponseDashboardResponseToJSON(
|
|
86
|
+
listResponseDashboardResponse: ListResponseDashboardResponse,
|
|
87
|
+
): string {
|
|
88
|
+
return JSON.stringify(
|
|
89
|
+
ListResponseDashboardResponse$outboundSchema.parse(
|
|
90
|
+
listResponseDashboardResponse,
|
|
91
|
+
),
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function listResponseDashboardResponseFromJSON(
|
|
96
|
+
jsonString: string,
|
|
97
|
+
): SafeParseResult<ListResponseDashboardResponse, SDKValidationError> {
|
|
98
|
+
return safeParse(
|
|
99
|
+
jsonString,
|
|
100
|
+
(x) => ListResponseDashboardResponse$inboundSchema.parse(JSON.parse(x)),
|
|
101
|
+
`Failed to parse 'ListResponseDashboardResponse' from JSON`,
|
|
102
|
+
);
|
|
103
|
+
}
|