syllable-sdk 0.1.0-alpha.207 → 0.1.0-alpha.213
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/docs/sdks/agents/README.md +4 -4
- package/docs/sdks/batches/README.md +4 -4
- package/docs/sdks/services/README.md +229 -1
- package/docs/sdks/workflows/README.md +8 -8
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/agentcreate.d.ts +1 -1
- package/models/components/agentresponse.d.ts +1 -1
- package/models/components/agentupdate.d.ts +1 -1
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/organizationresponse.d.ts +5 -2
- package/models/components/organizationresponse.d.ts.map +1 -1
- package/models/components/organizationresponse.js +4 -4
- package/models/components/organizationresponse.js.map +1 -1
- package/models/components/servicecreaterequest.d.ts +15 -0
- package/models/components/servicecreaterequest.d.ts.map +1 -1
- package/models/components/servicecreaterequest.js +16 -0
- package/models/components/servicecreaterequest.js.map +1 -1
- package/models/components/serviceproperties.d.ts +3 -3
- package/models/components/serviceproperties.js +1 -1
- package/models/components/serviceproperties.js.map +1 -1
- package/models/components/serviceresponse.d.ts +14 -3
- package/models/components/serviceresponse.d.ts.map +1 -1
- package/models/components/serviceresponse.js +11 -2
- package/models/components/serviceresponse.js.map +1 -1
- package/models/components/serviceupdaterequest.d.ts +15 -0
- package/models/components/serviceupdaterequest.d.ts.map +1 -1
- package/models/components/serviceupdaterequest.js +9 -0
- package/models/components/serviceupdaterequest.js.map +1 -1
- package/models/components/toolauthtype.d.ts +31 -0
- package/models/components/toolauthtype.d.ts.map +1 -0
- package/models/components/toolauthtype.js +51 -0
- package/models/components/toolauthtype.js.map +1 -0
- package/openapi.json +176 -51
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/agentcreate.ts +1 -1
- package/src/models/components/agentresponse.ts +1 -1
- package/src/models/components/agentupdate.ts +1 -1
- package/src/models/components/index.ts +1 -0
- package/src/models/components/organizationresponse.ts +9 -6
- package/src/models/components/servicecreaterequest.ts +30 -0
- package/src/models/components/serviceproperties.ts +1 -1
- package/src/models/components/serviceresponse.ts +28 -5
- package/src/models/components/serviceupdaterequest.ts +23 -0
- package/src/models/components/toolauthtype.ts +32 -0
|
@@ -3,9 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
ToolAuthType,
|
|
12
|
+
ToolAuthType$inboundSchema,
|
|
13
|
+
ToolAuthType$outboundSchema,
|
|
14
|
+
} from "./toolauthtype.js";
|
|
9
15
|
|
|
10
16
|
/**
|
|
11
17
|
* Request model to create a service.
|
|
@@ -19,6 +25,14 @@ export type ServiceCreateRequest = {
|
|
|
19
25
|
* The description of the service
|
|
20
26
|
*/
|
|
21
27
|
description: string;
|
|
28
|
+
/**
|
|
29
|
+
* The type of authentication to use for the service's tools
|
|
30
|
+
*/
|
|
31
|
+
authType?: ToolAuthType | null | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The values to use for the authentication. Should contain "username" and "password" keys if auth type is basic, "token" key if auth type is bearer, or arbitrary header keys if auth type is custom_headers. On an update, leave a value for a given key null and the value in the database will not be updated. (If a key is omitted entirely, any existing value for that key will be removed.)
|
|
34
|
+
*/
|
|
35
|
+
authValues?: { [k: string]: string } | null | undefined;
|
|
22
36
|
};
|
|
23
37
|
|
|
24
38
|
/** @internal */
|
|
@@ -29,12 +43,21 @@ export const ServiceCreateRequest$inboundSchema: z.ZodType<
|
|
|
29
43
|
> = z.object({
|
|
30
44
|
name: z.string(),
|
|
31
45
|
description: z.string(),
|
|
46
|
+
auth_type: z.nullable(ToolAuthType$inboundSchema).optional(),
|
|
47
|
+
auth_values: z.nullable(z.record(z.string())).optional(),
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
"auth_type": "authType",
|
|
51
|
+
"auth_values": "authValues",
|
|
52
|
+
});
|
|
32
53
|
});
|
|
33
54
|
|
|
34
55
|
/** @internal */
|
|
35
56
|
export type ServiceCreateRequest$Outbound = {
|
|
36
57
|
name: string;
|
|
37
58
|
description: string;
|
|
59
|
+
auth_type?: string | null | undefined;
|
|
60
|
+
auth_values?: { [k: string]: string } | null | undefined;
|
|
38
61
|
};
|
|
39
62
|
|
|
40
63
|
/** @internal */
|
|
@@ -45,6 +68,13 @@ export const ServiceCreateRequest$outboundSchema: z.ZodType<
|
|
|
45
68
|
> = z.object({
|
|
46
69
|
name: z.string(),
|
|
47
70
|
description: z.string(),
|
|
71
|
+
authType: z.nullable(ToolAuthType$outboundSchema).optional(),
|
|
72
|
+
authValues: z.nullable(z.record(z.string())).optional(),
|
|
73
|
+
}).transform((v) => {
|
|
74
|
+
return remap$(v, {
|
|
75
|
+
authType: "auth_type",
|
|
76
|
+
authValues: "auth_values",
|
|
77
|
+
});
|
|
48
78
|
});
|
|
49
79
|
|
|
50
80
|
/**
|
|
@@ -7,11 +7,20 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
ToolAuthType,
|
|
12
|
+
ToolAuthType$inboundSchema,
|
|
13
|
+
ToolAuthType$outboundSchema,
|
|
14
|
+
} from "./toolauthtype.js";
|
|
10
15
|
|
|
11
16
|
/**
|
|
12
17
|
* Response model for service operations. A service is a collection of tools.
|
|
13
18
|
*/
|
|
14
19
|
export type ServiceResponse = {
|
|
20
|
+
/**
|
|
21
|
+
* The internal ID of the service
|
|
22
|
+
*/
|
|
23
|
+
id: number;
|
|
15
24
|
/**
|
|
16
25
|
* The name of the service
|
|
17
26
|
*/
|
|
@@ -21,9 +30,13 @@ export type ServiceResponse = {
|
|
|
21
30
|
*/
|
|
22
31
|
description: string;
|
|
23
32
|
/**
|
|
24
|
-
* The
|
|
33
|
+
* The type of authentication to use for the service's tools
|
|
25
34
|
*/
|
|
26
|
-
|
|
35
|
+
authType?: ToolAuthType | null | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Auth value keys (values omitted for security)
|
|
38
|
+
*/
|
|
39
|
+
authValueKeys?: Array<string> | null | undefined;
|
|
27
40
|
/**
|
|
28
41
|
* Free text providing comment about what was updated
|
|
29
42
|
*/
|
|
@@ -48,9 +61,11 @@ export const ServiceResponse$inboundSchema: z.ZodType<
|
|
|
48
61
|
z.ZodTypeDef,
|
|
49
62
|
unknown
|
|
50
63
|
> = z.object({
|
|
64
|
+
id: z.number().int(),
|
|
51
65
|
name: z.string(),
|
|
52
66
|
description: z.string(),
|
|
53
|
-
|
|
67
|
+
auth_type: z.nullable(ToolAuthType$inboundSchema).optional(),
|
|
68
|
+
auth_value_keys: z.nullable(z.array(z.string())).optional(),
|
|
54
69
|
last_updated_comments: z.nullable(z.string()).optional(),
|
|
55
70
|
last_updated: z.string().datetime({ offset: true }).transform(v =>
|
|
56
71
|
new Date(v)
|
|
@@ -59,6 +74,8 @@ export const ServiceResponse$inboundSchema: z.ZodType<
|
|
|
59
74
|
tools: z.array(z.string()),
|
|
60
75
|
}).transform((v) => {
|
|
61
76
|
return remap$(v, {
|
|
77
|
+
"auth_type": "authType",
|
|
78
|
+
"auth_value_keys": "authValueKeys",
|
|
62
79
|
"last_updated_comments": "lastUpdatedComments",
|
|
63
80
|
"last_updated": "lastUpdated",
|
|
64
81
|
"last_updated_by": "lastUpdatedBy",
|
|
@@ -67,9 +84,11 @@ export const ServiceResponse$inboundSchema: z.ZodType<
|
|
|
67
84
|
|
|
68
85
|
/** @internal */
|
|
69
86
|
export type ServiceResponse$Outbound = {
|
|
87
|
+
id: number;
|
|
70
88
|
name: string;
|
|
71
89
|
description: string;
|
|
72
|
-
|
|
90
|
+
auth_type?: string | null | undefined;
|
|
91
|
+
auth_value_keys?: Array<string> | null | undefined;
|
|
73
92
|
last_updated_comments?: string | null | undefined;
|
|
74
93
|
last_updated: string;
|
|
75
94
|
last_updated_by: string;
|
|
@@ -82,15 +101,19 @@ export const ServiceResponse$outboundSchema: z.ZodType<
|
|
|
82
101
|
z.ZodTypeDef,
|
|
83
102
|
ServiceResponse
|
|
84
103
|
> = z.object({
|
|
104
|
+
id: z.number().int(),
|
|
85
105
|
name: z.string(),
|
|
86
106
|
description: z.string(),
|
|
87
|
-
|
|
107
|
+
authType: z.nullable(ToolAuthType$outboundSchema).optional(),
|
|
108
|
+
authValueKeys: z.nullable(z.array(z.string())).optional(),
|
|
88
109
|
lastUpdatedComments: z.nullable(z.string()).optional(),
|
|
89
110
|
lastUpdated: z.date().transform(v => v.toISOString()),
|
|
90
111
|
lastUpdatedBy: z.string(),
|
|
91
112
|
tools: z.array(z.string()),
|
|
92
113
|
}).transform((v) => {
|
|
93
114
|
return remap$(v, {
|
|
115
|
+
authType: "auth_type",
|
|
116
|
+
authValueKeys: "auth_value_keys",
|
|
94
117
|
lastUpdatedComments: "last_updated_comments",
|
|
95
118
|
lastUpdated: "last_updated",
|
|
96
119
|
lastUpdatedBy: "last_updated_by",
|
|
@@ -7,6 +7,11 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
ToolAuthType,
|
|
12
|
+
ToolAuthType$inboundSchema,
|
|
13
|
+
ToolAuthType$outboundSchema,
|
|
14
|
+
} from "./toolauthtype.js";
|
|
10
15
|
|
|
11
16
|
/**
|
|
12
17
|
* Request model to update an existing service.
|
|
@@ -20,6 +25,14 @@ export type ServiceUpdateRequest = {
|
|
|
20
25
|
* The description of the service
|
|
21
26
|
*/
|
|
22
27
|
description: string;
|
|
28
|
+
/**
|
|
29
|
+
* The type of authentication to use for the service's tools
|
|
30
|
+
*/
|
|
31
|
+
authType?: ToolAuthType | null | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The values to use for the authentication. Should contain "username" and "password" keys if auth type is basic, "token" key if auth type is bearer, or arbitrary header keys if auth type is custom_headers. On an update, leave a value for a given key null and the value in the database will not be updated. (If a key is omitted entirely, any existing value for that key will be removed.)
|
|
34
|
+
*/
|
|
35
|
+
authValues?: { [k: string]: string } | null | undefined;
|
|
23
36
|
/**
|
|
24
37
|
* The internal ID of the service
|
|
25
38
|
*/
|
|
@@ -38,10 +51,14 @@ export const ServiceUpdateRequest$inboundSchema: z.ZodType<
|
|
|
38
51
|
> = z.object({
|
|
39
52
|
name: z.string(),
|
|
40
53
|
description: z.string(),
|
|
54
|
+
auth_type: z.nullable(ToolAuthType$inboundSchema).optional(),
|
|
55
|
+
auth_values: z.nullable(z.record(z.string())).optional(),
|
|
41
56
|
id: z.number().int(),
|
|
42
57
|
last_updated_comments: z.nullable(z.string()).optional(),
|
|
43
58
|
}).transform((v) => {
|
|
44
59
|
return remap$(v, {
|
|
60
|
+
"auth_type": "authType",
|
|
61
|
+
"auth_values": "authValues",
|
|
45
62
|
"last_updated_comments": "lastUpdatedComments",
|
|
46
63
|
});
|
|
47
64
|
});
|
|
@@ -50,6 +67,8 @@ export const ServiceUpdateRequest$inboundSchema: z.ZodType<
|
|
|
50
67
|
export type ServiceUpdateRequest$Outbound = {
|
|
51
68
|
name: string;
|
|
52
69
|
description: string;
|
|
70
|
+
auth_type?: string | null | undefined;
|
|
71
|
+
auth_values?: { [k: string]: string } | null | undefined;
|
|
53
72
|
id: number;
|
|
54
73
|
last_updated_comments?: string | null | undefined;
|
|
55
74
|
};
|
|
@@ -62,10 +81,14 @@ export const ServiceUpdateRequest$outboundSchema: z.ZodType<
|
|
|
62
81
|
> = z.object({
|
|
63
82
|
name: z.string(),
|
|
64
83
|
description: z.string(),
|
|
84
|
+
authType: z.nullable(ToolAuthType$outboundSchema).optional(),
|
|
85
|
+
authValues: z.nullable(z.record(z.string())).optional(),
|
|
65
86
|
id: z.number().int(),
|
|
66
87
|
lastUpdatedComments: z.nullable(z.string()).optional(),
|
|
67
88
|
}).transform((v) => {
|
|
68
89
|
return remap$(v, {
|
|
90
|
+
authType: "auth_type",
|
|
91
|
+
authValues: "auth_values",
|
|
69
92
|
lastUpdatedComments: "last_updated_comments",
|
|
70
93
|
});
|
|
71
94
|
});
|
|
@@ -0,0 +1,32 @@
|
|
|
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 ToolAuthType = {
|
|
9
|
+
Basic: "basic",
|
|
10
|
+
Bearer: "bearer",
|
|
11
|
+
CustomHeaders: "custom_headers",
|
|
12
|
+
} as const;
|
|
13
|
+
export type ToolAuthType = ClosedEnum<typeof ToolAuthType>;
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const ToolAuthType$inboundSchema: z.ZodNativeEnum<typeof ToolAuthType> =
|
|
17
|
+
z.nativeEnum(ToolAuthType);
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const ToolAuthType$outboundSchema: z.ZodNativeEnum<typeof ToolAuthType> =
|
|
21
|
+
ToolAuthType$inboundSchema;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @internal
|
|
25
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
26
|
+
*/
|
|
27
|
+
export namespace ToolAuthType$ {
|
|
28
|
+
/** @deprecated use `ToolAuthType$inboundSchema` instead. */
|
|
29
|
+
export const inboundSchema = ToolAuthType$inboundSchema;
|
|
30
|
+
/** @deprecated use `ToolAuthType$outboundSchema` instead. */
|
|
31
|
+
export const outboundSchema = ToolAuthType$outboundSchema;
|
|
32
|
+
}
|