syllable-sdk 0.1.0-alpha.4 → 0.1.0-alpha.6
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 +23 -7
- package/docs/sdks/prompts/README.md +78 -0
- package/docs/sdks/services/README.md +245 -0
- package/docs/sdks/sessions/README.md +1 -1
- package/docs/sdks/syllablesdk/README.md +3 -2
- package/docs/sdks/tools/README.md +163 -1
- package/docs/sdks/transcript/README.md +2 -0
- package/funcs/promptsPromptsHistory.d.ts +17 -0
- package/funcs/promptsPromptsHistory.d.ts.map +1 -0
- package/funcs/promptsPromptsHistory.js +106 -0
- package/funcs/promptsPromptsHistory.js.map +1 -0
- package/funcs/servicesCreate.d.ts +13 -0
- package/funcs/servicesCreate.d.ts.map +1 -0
- package/funcs/servicesCreate.js +96 -0
- package/funcs/servicesCreate.js.map +1 -0
- package/funcs/servicesList.d.ts +17 -0
- package/funcs/servicesList.d.ts.map +1 -0
- package/funcs/servicesList.js +111 -0
- package/funcs/servicesList.js.map +1 -0
- package/funcs/servicesUpdate.d.ts +13 -0
- package/funcs/servicesUpdate.d.ts.map +1 -0
- package/funcs/servicesUpdate.js +96 -0
- package/funcs/servicesUpdate.js.map +1 -0
- package/funcs/sessionsSessionRecordingStream.d.ts +1 -1
- package/funcs/sessionsSessionRecordingStream.d.ts.map +1 -1
- package/funcs/sessionsSessionRecordingStream.js +2 -2
- package/funcs/sessionsSessionRecordingStream.js.map +1 -1
- package/funcs/toolsCreate.d.ts +16 -0
- package/funcs/toolsCreate.d.ts.map +1 -0
- package/funcs/toolsCreate.js +99 -0
- package/funcs/toolsCreate.js.map +1 -0
- package/funcs/toolsList.d.ts +1 -1
- package/funcs/toolsList.js +1 -1
- package/funcs/toolsUpdate.d.ts +16 -0
- package/funcs/toolsUpdate.d.ts.map +1 -0
- package/funcs/toolsUpdate.js +99 -0
- package/funcs/toolsUpdate.js.map +1 -0
- package/lib/config.d.ts +4 -4
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +4 -4
- package/lib/config.js.map +1 -1
- package/models/components/index.d.ts +8 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +8 -0
- package/models/components/index.js.map +1 -1
- package/models/components/listresponseservice.d.ts +38 -0
- package/models/components/listresponseservice.d.ts.map +1 -0
- package/models/components/listresponseservice.js +81 -0
- package/models/components/listresponseservice.js.map +1 -0
- package/models/components/prompt.d.ts +10 -0
- package/models/components/prompt.d.ts.map +1 -1
- package/models/components/prompt.js +8 -0
- package/models/components/prompt.js.map +1 -1
- package/models/components/prompthistory.d.ts +41 -0
- package/models/components/prompthistory.d.ts.map +1 -0
- package/models/components/prompthistory.js +88 -0
- package/models/components/prompthistory.js.map +1 -0
- package/models/components/promptproperties.d.ts +3 -0
- package/models/components/promptproperties.d.ts.map +1 -1
- package/models/components/promptproperties.js +1 -0
- package/models/components/promptproperties.js.map +1 -1
- package/models/components/service.d.ts +47 -0
- package/models/components/service.d.ts.map +1 -0
- package/models/components/service.js +65 -0
- package/models/components/service.js.map +1 -0
- package/models/components/servicecreate.d.ts +37 -0
- package/models/components/servicecreate.d.ts.map +1 -0
- package/models/components/servicecreate.js +61 -0
- package/models/components/servicecreate.js.map +1 -0
- package/models/components/serviceproperties.d.ts +28 -0
- package/models/components/serviceproperties.d.ts.map +1 -0
- package/models/components/serviceproperties.js +50 -0
- package/models/components/serviceproperties.js.map +1 -0
- package/models/components/serviceupdate.d.ts +42 -0
- package/models/components/serviceupdate.d.ts.map +1 -0
- package/models/components/serviceupdate.js +63 -0
- package/models/components/serviceupdate.js.map +1 -0
- package/models/components/sessionproperties.d.ts +3 -0
- package/models/components/sessionproperties.d.ts.map +1 -1
- package/models/components/sessionproperties.js +1 -0
- package/models/components/sessionproperties.js.map +1 -1
- package/models/components/toolcreate.d.ts +66 -0
- package/models/components/toolcreate.d.ts.map +1 -0
- package/models/components/toolcreate.js +95 -0
- package/models/components/toolcreate.js.map +1 -0
- package/models/components/toolupdate.d.ts +71 -0
- package/models/components/toolupdate.d.ts.map +1 -0
- package/models/components/toolupdate.js +97 -0
- package/models/components/toolupdate.js.map +1 -0
- 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/promptshistory.d.ts +29 -0
- package/models/operations/promptshistory.d.ts.map +1 -0
- package/models/operations/promptshistory.js +68 -0
- package/models/operations/promptshistory.js.map +1 -0
- package/models/operations/promptslist.d.ts +3 -0
- package/models/operations/promptslist.d.ts.map +1 -1
- package/models/operations/promptslist.js +1 -0
- package/models/operations/promptslist.js.map +1 -1
- package/models/operations/servicelist.d.ts +97 -0
- package/models/operations/servicelist.d.ts.map +1 -0
- package/models/operations/servicelist.js +137 -0
- package/models/operations/servicelist.js.map +1 -0
- package/models/operations/sessionslist.d.ts +3 -0
- package/models/operations/sessionslist.d.ts.map +1 -1
- package/models/operations/sessionslist.js +1 -0
- package/models/operations/sessionslist.js.map +1 -1
- package/package.json +1 -1
- package/sdk/prompts.d.ts +7 -0
- package/sdk/prompts.d.ts.map +1 -1
- package/sdk/prompts.js +10 -0
- package/sdk/prompts.js.map +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +5 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/services.d.ts +21 -0
- package/sdk/services.d.ts.map +1 -0
- package/sdk/services.js +36 -0
- package/sdk/services.js.map +1 -0
- package/sdk/sessions.d.ts +1 -1
- package/sdk/sessions.d.ts.map +1 -1
- package/sdk/tools.d.ts +15 -1
- package/sdk/tools.d.ts.map +1 -1
- package/sdk/tools.js +21 -1
- package/sdk/tools.js.map +1 -1
- package/src/funcs/promptsPromptsHistory.ts +139 -0
- package/src/funcs/servicesCreate.ts +128 -0
- package/src/funcs/servicesList.ts +144 -0
- package/src/funcs/servicesUpdate.ts +128 -0
- package/src/funcs/sessionsSessionRecordingStream.ts +4 -4
- package/src/funcs/toolsCreate.ts +131 -0
- package/src/funcs/toolsList.ts +1 -1
- package/src/funcs/toolsUpdate.ts +131 -0
- package/src/lib/config.ts +4 -4
- package/src/models/components/index.ts +8 -0
- package/src/models/components/listresponseservice.ts +101 -0
- package/src/models/components/prompt.ts +18 -0
- package/src/models/components/prompthistory.ts +103 -0
- package/src/models/components/promptproperties.ts +1 -0
- package/src/models/components/service.ts +83 -0
- package/src/models/components/servicecreate.ts +72 -0
- package/src/models/components/serviceproperties.ts +33 -0
- package/src/models/components/serviceupdate.ts +79 -0
- package/src/models/components/sessionproperties.ts +1 -0
- package/src/models/components/toolcreate.ts +141 -0
- package/src/models/components/toolupdate.ts +148 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/promptshistory.ts +75 -0
- package/src/models/operations/promptslist.ts +1 -0
- package/src/models/operations/servicelist.ts +184 -0
- package/src/models/operations/sessionslist.ts +1 -0
- package/src/sdk/prompts.ts +18 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/services.ts +58 -0
- package/src/sdk/sessions.ts +1 -1
- package/src/sdk/tools.ts +37 -1
|
@@ -0,0 +1,79 @@
|
|
|
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
|
+
export type ServiceUpdate = {
|
|
11
|
+
/**
|
|
12
|
+
* The name of the service
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* The description of the service
|
|
17
|
+
*/
|
|
18
|
+
description: string;
|
|
19
|
+
/**
|
|
20
|
+
* The ID of the service
|
|
21
|
+
*/
|
|
22
|
+
id: number;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ServiceUpdate$inboundSchema: z.ZodType<
|
|
27
|
+
ServiceUpdate,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
name: z.string(),
|
|
32
|
+
description: z.string(),
|
|
33
|
+
id: z.number().int(),
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export type ServiceUpdate$Outbound = {
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
id: number;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const ServiceUpdate$outboundSchema: z.ZodType<
|
|
45
|
+
ServiceUpdate$Outbound,
|
|
46
|
+
z.ZodTypeDef,
|
|
47
|
+
ServiceUpdate
|
|
48
|
+
> = z.object({
|
|
49
|
+
name: z.string(),
|
|
50
|
+
description: z.string(),
|
|
51
|
+
id: z.number().int(),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @internal
|
|
56
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
57
|
+
*/
|
|
58
|
+
export namespace ServiceUpdate$ {
|
|
59
|
+
/** @deprecated use `ServiceUpdate$inboundSchema` instead. */
|
|
60
|
+
export const inboundSchema = ServiceUpdate$inboundSchema;
|
|
61
|
+
/** @deprecated use `ServiceUpdate$outboundSchema` instead. */
|
|
62
|
+
export const outboundSchema = ServiceUpdate$outboundSchema;
|
|
63
|
+
/** @deprecated use `ServiceUpdate$Outbound` instead. */
|
|
64
|
+
export type Outbound = ServiceUpdate$Outbound;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function serviceUpdateToJSON(serviceUpdate: ServiceUpdate): string {
|
|
68
|
+
return JSON.stringify(ServiceUpdate$outboundSchema.parse(serviceUpdate));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function serviceUpdateFromJSON(
|
|
72
|
+
jsonString: string,
|
|
73
|
+
): SafeParseResult<ServiceUpdate, SDKValidationError> {
|
|
74
|
+
return safeParse(
|
|
75
|
+
jsonString,
|
|
76
|
+
(x) => ServiceUpdate$inboundSchema.parse(JSON.parse(x)),
|
|
77
|
+
`Failed to parse 'ServiceUpdate' from JSON`,
|
|
78
|
+
);
|
|
79
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
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
|
+
* The definition of the tool
|
|
13
|
+
*/
|
|
14
|
+
export type ToolCreateDefinition = {};
|
|
15
|
+
|
|
16
|
+
export type ToolCreate = {
|
|
17
|
+
/**
|
|
18
|
+
* The name of the tool
|
|
19
|
+
*/
|
|
20
|
+
name: string;
|
|
21
|
+
/**
|
|
22
|
+
* The definition of the tool
|
|
23
|
+
*/
|
|
24
|
+
definition?: ToolCreateDefinition | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The service this tool belongs to
|
|
27
|
+
*/
|
|
28
|
+
serviceId: number;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const ToolCreateDefinition$inboundSchema: z.ZodType<
|
|
33
|
+
ToolCreateDefinition,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
unknown
|
|
36
|
+
> = z.object({});
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type ToolCreateDefinition$Outbound = {};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const ToolCreateDefinition$outboundSchema: z.ZodType<
|
|
43
|
+
ToolCreateDefinition$Outbound,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
ToolCreateDefinition
|
|
46
|
+
> = z.object({});
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
|
+
*/
|
|
52
|
+
export namespace ToolCreateDefinition$ {
|
|
53
|
+
/** @deprecated use `ToolCreateDefinition$inboundSchema` instead. */
|
|
54
|
+
export const inboundSchema = ToolCreateDefinition$inboundSchema;
|
|
55
|
+
/** @deprecated use `ToolCreateDefinition$outboundSchema` instead. */
|
|
56
|
+
export const outboundSchema = ToolCreateDefinition$outboundSchema;
|
|
57
|
+
/** @deprecated use `ToolCreateDefinition$Outbound` instead. */
|
|
58
|
+
export type Outbound = ToolCreateDefinition$Outbound;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function toolCreateDefinitionToJSON(
|
|
62
|
+
toolCreateDefinition: ToolCreateDefinition,
|
|
63
|
+
): string {
|
|
64
|
+
return JSON.stringify(
|
|
65
|
+
ToolCreateDefinition$outboundSchema.parse(toolCreateDefinition),
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function toolCreateDefinitionFromJSON(
|
|
70
|
+
jsonString: string,
|
|
71
|
+
): SafeParseResult<ToolCreateDefinition, SDKValidationError> {
|
|
72
|
+
return safeParse(
|
|
73
|
+
jsonString,
|
|
74
|
+
(x) => ToolCreateDefinition$inboundSchema.parse(JSON.parse(x)),
|
|
75
|
+
`Failed to parse 'ToolCreateDefinition' from JSON`,
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const ToolCreate$inboundSchema: z.ZodType<
|
|
81
|
+
ToolCreate,
|
|
82
|
+
z.ZodTypeDef,
|
|
83
|
+
unknown
|
|
84
|
+
> = z.object({
|
|
85
|
+
name: z.string(),
|
|
86
|
+
definition: z.lazy(() => ToolCreateDefinition$inboundSchema).optional(),
|
|
87
|
+
service_id: z.number().int(),
|
|
88
|
+
}).transform((v) => {
|
|
89
|
+
return remap$(v, {
|
|
90
|
+
"service_id": "serviceId",
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
/** @internal */
|
|
95
|
+
export type ToolCreate$Outbound = {
|
|
96
|
+
name: string;
|
|
97
|
+
definition?: ToolCreateDefinition$Outbound | undefined;
|
|
98
|
+
service_id: number;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
export const ToolCreate$outboundSchema: z.ZodType<
|
|
103
|
+
ToolCreate$Outbound,
|
|
104
|
+
z.ZodTypeDef,
|
|
105
|
+
ToolCreate
|
|
106
|
+
> = z.object({
|
|
107
|
+
name: z.string(),
|
|
108
|
+
definition: z.lazy(() => ToolCreateDefinition$outboundSchema).optional(),
|
|
109
|
+
serviceId: z.number().int(),
|
|
110
|
+
}).transform((v) => {
|
|
111
|
+
return remap$(v, {
|
|
112
|
+
serviceId: "service_id",
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @internal
|
|
118
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
119
|
+
*/
|
|
120
|
+
export namespace ToolCreate$ {
|
|
121
|
+
/** @deprecated use `ToolCreate$inboundSchema` instead. */
|
|
122
|
+
export const inboundSchema = ToolCreate$inboundSchema;
|
|
123
|
+
/** @deprecated use `ToolCreate$outboundSchema` instead. */
|
|
124
|
+
export const outboundSchema = ToolCreate$outboundSchema;
|
|
125
|
+
/** @deprecated use `ToolCreate$Outbound` instead. */
|
|
126
|
+
export type Outbound = ToolCreate$Outbound;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export function toolCreateToJSON(toolCreate: ToolCreate): string {
|
|
130
|
+
return JSON.stringify(ToolCreate$outboundSchema.parse(toolCreate));
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function toolCreateFromJSON(
|
|
134
|
+
jsonString: string,
|
|
135
|
+
): SafeParseResult<ToolCreate, SDKValidationError> {
|
|
136
|
+
return safeParse(
|
|
137
|
+
jsonString,
|
|
138
|
+
(x) => ToolCreate$inboundSchema.parse(JSON.parse(x)),
|
|
139
|
+
`Failed to parse 'ToolCreate' from JSON`,
|
|
140
|
+
);
|
|
141
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
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
|
+
* The definition of the tool
|
|
13
|
+
*/
|
|
14
|
+
export type ToolUpdateDefinition = {};
|
|
15
|
+
|
|
16
|
+
export type ToolUpdate = {
|
|
17
|
+
/**
|
|
18
|
+
* The name of the tool
|
|
19
|
+
*/
|
|
20
|
+
name: string;
|
|
21
|
+
/**
|
|
22
|
+
* The definition of the tool
|
|
23
|
+
*/
|
|
24
|
+
definition?: ToolUpdateDefinition | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The service this tool belongs to
|
|
27
|
+
*/
|
|
28
|
+
serviceId: number;
|
|
29
|
+
/**
|
|
30
|
+
* The ID of the tool
|
|
31
|
+
*/
|
|
32
|
+
id: number;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const ToolUpdateDefinition$inboundSchema: z.ZodType<
|
|
37
|
+
ToolUpdateDefinition,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
unknown
|
|
40
|
+
> = z.object({});
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type ToolUpdateDefinition$Outbound = {};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const ToolUpdateDefinition$outboundSchema: z.ZodType<
|
|
47
|
+
ToolUpdateDefinition$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
ToolUpdateDefinition
|
|
50
|
+
> = z.object({});
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export namespace ToolUpdateDefinition$ {
|
|
57
|
+
/** @deprecated use `ToolUpdateDefinition$inboundSchema` instead. */
|
|
58
|
+
export const inboundSchema = ToolUpdateDefinition$inboundSchema;
|
|
59
|
+
/** @deprecated use `ToolUpdateDefinition$outboundSchema` instead. */
|
|
60
|
+
export const outboundSchema = ToolUpdateDefinition$outboundSchema;
|
|
61
|
+
/** @deprecated use `ToolUpdateDefinition$Outbound` instead. */
|
|
62
|
+
export type Outbound = ToolUpdateDefinition$Outbound;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function toolUpdateDefinitionToJSON(
|
|
66
|
+
toolUpdateDefinition: ToolUpdateDefinition,
|
|
67
|
+
): string {
|
|
68
|
+
return JSON.stringify(
|
|
69
|
+
ToolUpdateDefinition$outboundSchema.parse(toolUpdateDefinition),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function toolUpdateDefinitionFromJSON(
|
|
74
|
+
jsonString: string,
|
|
75
|
+
): SafeParseResult<ToolUpdateDefinition, SDKValidationError> {
|
|
76
|
+
return safeParse(
|
|
77
|
+
jsonString,
|
|
78
|
+
(x) => ToolUpdateDefinition$inboundSchema.parse(JSON.parse(x)),
|
|
79
|
+
`Failed to parse 'ToolUpdateDefinition' from JSON`,
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const ToolUpdate$inboundSchema: z.ZodType<
|
|
85
|
+
ToolUpdate,
|
|
86
|
+
z.ZodTypeDef,
|
|
87
|
+
unknown
|
|
88
|
+
> = z.object({
|
|
89
|
+
name: z.string(),
|
|
90
|
+
definition: z.lazy(() => ToolUpdateDefinition$inboundSchema).optional(),
|
|
91
|
+
service_id: z.number().int(),
|
|
92
|
+
id: z.number().int(),
|
|
93
|
+
}).transform((v) => {
|
|
94
|
+
return remap$(v, {
|
|
95
|
+
"service_id": "serviceId",
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
export type ToolUpdate$Outbound = {
|
|
101
|
+
name: string;
|
|
102
|
+
definition?: ToolUpdateDefinition$Outbound | undefined;
|
|
103
|
+
service_id: number;
|
|
104
|
+
id: number;
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
/** @internal */
|
|
108
|
+
export const ToolUpdate$outboundSchema: z.ZodType<
|
|
109
|
+
ToolUpdate$Outbound,
|
|
110
|
+
z.ZodTypeDef,
|
|
111
|
+
ToolUpdate
|
|
112
|
+
> = z.object({
|
|
113
|
+
name: z.string(),
|
|
114
|
+
definition: z.lazy(() => ToolUpdateDefinition$outboundSchema).optional(),
|
|
115
|
+
serviceId: z.number().int(),
|
|
116
|
+
id: z.number().int(),
|
|
117
|
+
}).transform((v) => {
|
|
118
|
+
return remap$(v, {
|
|
119
|
+
serviceId: "service_id",
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @internal
|
|
125
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
126
|
+
*/
|
|
127
|
+
export namespace ToolUpdate$ {
|
|
128
|
+
/** @deprecated use `ToolUpdate$inboundSchema` instead. */
|
|
129
|
+
export const inboundSchema = ToolUpdate$inboundSchema;
|
|
130
|
+
/** @deprecated use `ToolUpdate$outboundSchema` instead. */
|
|
131
|
+
export const outboundSchema = ToolUpdate$outboundSchema;
|
|
132
|
+
/** @deprecated use `ToolUpdate$Outbound` instead. */
|
|
133
|
+
export type Outbound = ToolUpdate$Outbound;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function toolUpdateToJSON(toolUpdate: ToolUpdate): string {
|
|
137
|
+
return JSON.stringify(ToolUpdate$outboundSchema.parse(toolUpdate));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function toolUpdateFromJSON(
|
|
141
|
+
jsonString: string,
|
|
142
|
+
): SafeParseResult<ToolUpdate, SDKValidationError> {
|
|
143
|
+
return safeParse(
|
|
144
|
+
jsonString,
|
|
145
|
+
(x) => ToolUpdate$inboundSchema.parse(JSON.parse(x)),
|
|
146
|
+
`Failed to parse 'ToolUpdate' from JSON`,
|
|
147
|
+
);
|
|
148
|
+
}
|
|
@@ -27,7 +27,9 @@ export * from "./gettotalcallvolumebyhour.js";
|
|
|
27
27
|
export * from "./getweeklycallvolumebyweekday.js";
|
|
28
28
|
export * from "./promptsdelete.js";
|
|
29
29
|
export * from "./promptsgetbyid.js";
|
|
30
|
+
export * from "./promptshistory.js";
|
|
30
31
|
export * from "./promptslist.js";
|
|
32
|
+
export * from "./servicelist.js";
|
|
31
33
|
export * from "./sessiongetbyid.js";
|
|
32
34
|
export * from "./sessionlabelgetbyid.js";
|
|
33
35
|
export * from "./sessionlabelslist.js";
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
export type PromptsHistoryRequest = {
|
|
12
|
+
promptId: number;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const PromptsHistoryRequest$inboundSchema: z.ZodType<
|
|
17
|
+
PromptsHistoryRequest,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.object({
|
|
21
|
+
prompt_id: z.number().int(),
|
|
22
|
+
}).transform((v) => {
|
|
23
|
+
return remap$(v, {
|
|
24
|
+
"prompt_id": "promptId",
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export type PromptsHistoryRequest$Outbound = {
|
|
30
|
+
prompt_id: number;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const PromptsHistoryRequest$outboundSchema: z.ZodType<
|
|
35
|
+
PromptsHistoryRequest$Outbound,
|
|
36
|
+
z.ZodTypeDef,
|
|
37
|
+
PromptsHistoryRequest
|
|
38
|
+
> = z.object({
|
|
39
|
+
promptId: z.number().int(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
promptId: "prompt_id",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
|
+
*/
|
|
50
|
+
export namespace PromptsHistoryRequest$ {
|
|
51
|
+
/** @deprecated use `PromptsHistoryRequest$inboundSchema` instead. */
|
|
52
|
+
export const inboundSchema = PromptsHistoryRequest$inboundSchema;
|
|
53
|
+
/** @deprecated use `PromptsHistoryRequest$outboundSchema` instead. */
|
|
54
|
+
export const outboundSchema = PromptsHistoryRequest$outboundSchema;
|
|
55
|
+
/** @deprecated use `PromptsHistoryRequest$Outbound` instead. */
|
|
56
|
+
export type Outbound = PromptsHistoryRequest$Outbound;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function promptsHistoryRequestToJSON(
|
|
60
|
+
promptsHistoryRequest: PromptsHistoryRequest,
|
|
61
|
+
): string {
|
|
62
|
+
return JSON.stringify(
|
|
63
|
+
PromptsHistoryRequest$outboundSchema.parse(promptsHistoryRequest),
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function promptsHistoryRequestFromJSON(
|
|
68
|
+
jsonString: string,
|
|
69
|
+
): SafeParseResult<PromptsHistoryRequest, SDKValidationError> {
|
|
70
|
+
return safeParse(
|
|
71
|
+
jsonString,
|
|
72
|
+
(x) => PromptsHistoryRequest$inboundSchema.parse(JSON.parse(x)),
|
|
73
|
+
`Failed to parse 'PromptsHistoryRequest' from JSON`,
|
|
74
|
+
);
|
|
75
|
+
}
|
|
@@ -16,6 +16,7 @@ export const PromptsListQueryParamOrderBy = {
|
|
|
16
16
|
Context: "context",
|
|
17
17
|
Tools: "tools",
|
|
18
18
|
LlmConfig: "llm_config",
|
|
19
|
+
LastUpdatedBy: "last_updated_by",
|
|
19
20
|
} as const;
|
|
20
21
|
export type PromptsListQueryParamOrderBy = ClosedEnum<
|
|
21
22
|
typeof PromptsListQueryParamOrderBy
|
|
@@ -0,0 +1,184 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as components from "../components/index.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
export const ServiceListQueryParamOrderBy = {
|
|
14
|
+
Id: "id",
|
|
15
|
+
Name: "name",
|
|
16
|
+
} as const;
|
|
17
|
+
export type ServiceListQueryParamOrderBy = ClosedEnum<
|
|
18
|
+
typeof ServiceListQueryParamOrderBy
|
|
19
|
+
>;
|
|
20
|
+
|
|
21
|
+
export const ServiceListQueryParamOrderByDirection = {
|
|
22
|
+
Asc: "asc",
|
|
23
|
+
Desc: "desc",
|
|
24
|
+
} as const;
|
|
25
|
+
export type ServiceListQueryParamOrderByDirection = ClosedEnum<
|
|
26
|
+
typeof ServiceListQueryParamOrderByDirection
|
|
27
|
+
>;
|
|
28
|
+
|
|
29
|
+
export type ServiceListRequest = {
|
|
30
|
+
page?: number | null | undefined;
|
|
31
|
+
limit?: number | undefined;
|
|
32
|
+
searchFields?: Array<components.ServiceProperties> | undefined;
|
|
33
|
+
searchFieldValues?: Array<string> | undefined;
|
|
34
|
+
orderBy?: ServiceListQueryParamOrderBy | undefined;
|
|
35
|
+
orderByDirection?: ServiceListQueryParamOrderByDirection | undefined;
|
|
36
|
+
fields?: Array<components.ServiceProperties> | null | undefined;
|
|
37
|
+
startDatetime?: string | null | undefined;
|
|
38
|
+
endDatetime?: string | null | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const ServiceListQueryParamOrderBy$inboundSchema: z.ZodNativeEnum<
|
|
43
|
+
typeof ServiceListQueryParamOrderBy
|
|
44
|
+
> = z.nativeEnum(ServiceListQueryParamOrderBy);
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const ServiceListQueryParamOrderBy$outboundSchema: z.ZodNativeEnum<
|
|
48
|
+
typeof ServiceListQueryParamOrderBy
|
|
49
|
+
> = ServiceListQueryParamOrderBy$inboundSchema;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
54
|
+
*/
|
|
55
|
+
export namespace ServiceListQueryParamOrderBy$ {
|
|
56
|
+
/** @deprecated use `ServiceListQueryParamOrderBy$inboundSchema` instead. */
|
|
57
|
+
export const inboundSchema = ServiceListQueryParamOrderBy$inboundSchema;
|
|
58
|
+
/** @deprecated use `ServiceListQueryParamOrderBy$outboundSchema` instead. */
|
|
59
|
+
export const outboundSchema = ServiceListQueryParamOrderBy$outboundSchema;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export const ServiceListQueryParamOrderByDirection$inboundSchema:
|
|
64
|
+
z.ZodNativeEnum<typeof ServiceListQueryParamOrderByDirection> = z.nativeEnum(
|
|
65
|
+
ServiceListQueryParamOrderByDirection,
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const ServiceListQueryParamOrderByDirection$outboundSchema:
|
|
70
|
+
z.ZodNativeEnum<typeof ServiceListQueryParamOrderByDirection> =
|
|
71
|
+
ServiceListQueryParamOrderByDirection$inboundSchema;
|
|
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 ServiceListQueryParamOrderByDirection$ {
|
|
78
|
+
/** @deprecated use `ServiceListQueryParamOrderByDirection$inboundSchema` instead. */
|
|
79
|
+
export const inboundSchema =
|
|
80
|
+
ServiceListQueryParamOrderByDirection$inboundSchema;
|
|
81
|
+
/** @deprecated use `ServiceListQueryParamOrderByDirection$outboundSchema` instead. */
|
|
82
|
+
export const outboundSchema =
|
|
83
|
+
ServiceListQueryParamOrderByDirection$outboundSchema;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const ServiceListRequest$inboundSchema: z.ZodType<
|
|
88
|
+
ServiceListRequest,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
unknown
|
|
91
|
+
> = z.object({
|
|
92
|
+
page: z.nullable(z.number().int()).optional(),
|
|
93
|
+
limit: z.number().int().default(25),
|
|
94
|
+
search_fields: z.array(components.ServiceProperties$inboundSchema).optional(),
|
|
95
|
+
search_field_values: z.array(z.string()).optional(),
|
|
96
|
+
order_by: ServiceListQueryParamOrderBy$inboundSchema.optional(),
|
|
97
|
+
order_by_direction: ServiceListQueryParamOrderByDirection$inboundSchema
|
|
98
|
+
.optional(),
|
|
99
|
+
fields: z.nullable(z.array(components.ServiceProperties$inboundSchema))
|
|
100
|
+
.optional(),
|
|
101
|
+
start_datetime: z.nullable(z.string()).optional(),
|
|
102
|
+
end_datetime: z.nullable(z.string()).optional(),
|
|
103
|
+
}).transform((v) => {
|
|
104
|
+
return remap$(v, {
|
|
105
|
+
"search_fields": "searchFields",
|
|
106
|
+
"search_field_values": "searchFieldValues",
|
|
107
|
+
"order_by": "orderBy",
|
|
108
|
+
"order_by_direction": "orderByDirection",
|
|
109
|
+
"start_datetime": "startDatetime",
|
|
110
|
+
"end_datetime": "endDatetime",
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
/** @internal */
|
|
115
|
+
export type ServiceListRequest$Outbound = {
|
|
116
|
+
page?: number | null | undefined;
|
|
117
|
+
limit: number;
|
|
118
|
+
search_fields?: Array<string> | undefined;
|
|
119
|
+
search_field_values?: Array<string> | undefined;
|
|
120
|
+
order_by?: string | undefined;
|
|
121
|
+
order_by_direction?: string | undefined;
|
|
122
|
+
fields?: Array<string> | null | undefined;
|
|
123
|
+
start_datetime?: string | null | undefined;
|
|
124
|
+
end_datetime?: string | null | undefined;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/** @internal */
|
|
128
|
+
export const ServiceListRequest$outboundSchema: z.ZodType<
|
|
129
|
+
ServiceListRequest$Outbound,
|
|
130
|
+
z.ZodTypeDef,
|
|
131
|
+
ServiceListRequest
|
|
132
|
+
> = z.object({
|
|
133
|
+
page: z.nullable(z.number().int()).optional(),
|
|
134
|
+
limit: z.number().int().default(25),
|
|
135
|
+
searchFields: z.array(components.ServiceProperties$outboundSchema).optional(),
|
|
136
|
+
searchFieldValues: z.array(z.string()).optional(),
|
|
137
|
+
orderBy: ServiceListQueryParamOrderBy$outboundSchema.optional(),
|
|
138
|
+
orderByDirection: ServiceListQueryParamOrderByDirection$outboundSchema
|
|
139
|
+
.optional(),
|
|
140
|
+
fields: z.nullable(z.array(components.ServiceProperties$outboundSchema))
|
|
141
|
+
.optional(),
|
|
142
|
+
startDatetime: z.nullable(z.string()).optional(),
|
|
143
|
+
endDatetime: z.nullable(z.string()).optional(),
|
|
144
|
+
}).transform((v) => {
|
|
145
|
+
return remap$(v, {
|
|
146
|
+
searchFields: "search_fields",
|
|
147
|
+
searchFieldValues: "search_field_values",
|
|
148
|
+
orderBy: "order_by",
|
|
149
|
+
orderByDirection: "order_by_direction",
|
|
150
|
+
startDatetime: "start_datetime",
|
|
151
|
+
endDatetime: "end_datetime",
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* @internal
|
|
157
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
158
|
+
*/
|
|
159
|
+
export namespace ServiceListRequest$ {
|
|
160
|
+
/** @deprecated use `ServiceListRequest$inboundSchema` instead. */
|
|
161
|
+
export const inboundSchema = ServiceListRequest$inboundSchema;
|
|
162
|
+
/** @deprecated use `ServiceListRequest$outboundSchema` instead. */
|
|
163
|
+
export const outboundSchema = ServiceListRequest$outboundSchema;
|
|
164
|
+
/** @deprecated use `ServiceListRequest$Outbound` instead. */
|
|
165
|
+
export type Outbound = ServiceListRequest$Outbound;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export function serviceListRequestToJSON(
|
|
169
|
+
serviceListRequest: ServiceListRequest,
|
|
170
|
+
): string {
|
|
171
|
+
return JSON.stringify(
|
|
172
|
+
ServiceListRequest$outboundSchema.parse(serviceListRequest),
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export function serviceListRequestFromJSON(
|
|
177
|
+
jsonString: string,
|
|
178
|
+
): SafeParseResult<ServiceListRequest, SDKValidationError> {
|
|
179
|
+
return safeParse(
|
|
180
|
+
jsonString,
|
|
181
|
+
(x) => ServiceListRequest$inboundSchema.parse(JSON.parse(x)),
|
|
182
|
+
`Failed to parse 'ServiceListRequest' from JSON`,
|
|
183
|
+
);
|
|
184
|
+
}
|
package/src/sdk/prompts.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { promptsCreate } from "../funcs/promptsCreate.js";
|
|
|
6
6
|
import { promptsDelete } from "../funcs/promptsDelete.js";
|
|
7
7
|
import { promptsGetById } from "../funcs/promptsGetById.js";
|
|
8
8
|
import { promptsList } from "../funcs/promptsList.js";
|
|
9
|
+
import { promptsPromptsHistory } from "../funcs/promptsPromptsHistory.js";
|
|
9
10
|
import { promptsUpdate } from "../funcs/promptsUpdate.js";
|
|
10
11
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
12
|
import * as components from "../models/components/index.js";
|
|
@@ -94,4 +95,21 @@ export class Prompts extends ClientSDK {
|
|
|
94
95
|
options,
|
|
95
96
|
));
|
|
96
97
|
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Get Prompt History
|
|
101
|
+
*
|
|
102
|
+
* @remarks
|
|
103
|
+
* Get a prompt by ID
|
|
104
|
+
*/
|
|
105
|
+
async promptsHistory(
|
|
106
|
+
request: operations.PromptsHistoryRequest,
|
|
107
|
+
options?: RequestOptions,
|
|
108
|
+
): Promise<Array<components.PromptHistory>> {
|
|
109
|
+
return unwrapAsync(promptsPromptsHistory(
|
|
110
|
+
this,
|
|
111
|
+
request,
|
|
112
|
+
options,
|
|
113
|
+
));
|
|
114
|
+
}
|
|
97
115
|
}
|