syllable-sdk 0.1.0-alpha.25 → 0.1.0-alpha.26
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/api-reference/sdks/agents/README.md +224 -0
- package/api-reference/sdks/availabletargets/README.md +49 -0
- package/api-reference/sdks/channels/README.md +92 -0
- package/api-reference/sdks/chats/README.md +55 -0
- package/api-reference/sdks/conversations/README.md +91 -0
- package/api-reference/sdks/dashboards/README.md +321 -0
- package/api-reference/sdks/events/README.md +50 -0
- package/api-reference/sdks/greetings/README.md +223 -0
- package/api-reference/sdks/organizations/README.md +48 -0
- package/api-reference/sdks/prompts/README.md +225 -0
- package/api-reference/sdks/sessions/README.md +50 -0
- package/api-reference/sdks/syllable/README.md +22 -0
- package/api-reference/sdks/targets/README.md +194 -0
- package/api-reference/sdks/tools/README.md +92 -0
- package/docs/sdks/channels/README.md +2 -2
- package/docs/sdks/targets/README.md +2 -4
- package/funcs/channelsDelete.d.ts +4 -2
- package/funcs/channelsDelete.d.ts.map +1 -1
- package/funcs/channelsDelete.js +5 -2
- package/funcs/channelsDelete.js.map +1 -1
- package/funcs/channelsTargetsUpdate.d.ts.map +1 -1
- package/funcs/channelsTargetsUpdate.js +3 -1
- package/funcs/channelsTargetsUpdate.js.map +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +5 -5
- package/models/components/channeltarget.d.ts +10 -0
- package/models/components/channeltarget.d.ts.map +1 -1
- package/models/components/channeltarget.js +11 -0
- package/models/components/channeltarget.js.map +1 -1
- package/models/components/channeltargetupdaterequest.d.ts +41 -0
- package/models/components/channeltargetupdaterequest.d.ts.map +1 -0
- package/models/components/channeltargetupdaterequest.js +88 -0
- package/models/components/channeltargetupdaterequest.js.map +1 -0
- package/models/components/daochanneltargetagent.d.ts +47 -0
- package/models/components/daochanneltargetagent.d.ts.map +1 -0
- package/models/components/daochanneltargetagent.js +92 -0
- package/models/components/daochanneltargetagent.js.map +1 -0
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/operations/channeltargetsupdate.d.ts +2 -2
- package/models/operations/channeltargetsupdate.d.ts.map +1 -1
- package/models/operations/channeltargetsupdate.js +4 -4
- package/models/operations/channeltargetsupdate.js.map +1 -1
- package/package.json +1 -1
- package/sdk/channels.d.ts +4 -1
- package/sdk/channels.d.ts.map +1 -1
- package/sdk/channels.js +3 -0
- package/sdk/channels.js.map +1 -1
- package/src/funcs/channelsDelete.ts +7 -4
- package/src/funcs/channelsTargetsUpdate.ts +3 -1
- package/src/lib/config.ts +5 -5
- package/src/models/components/channeltarget.ts +27 -0
- package/src/models/components/channeltargetupdaterequest.ts +107 -0
- package/src/models/components/daochanneltargetagent.ts +117 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/operations/channeltargetsupdate.ts +8 -6
- package/src/sdk/channels.ts +4 -1
|
@@ -37,24 +37,24 @@ const components = __importStar(require("../components/index.js"));
|
|
|
37
37
|
exports.ChannelTargetsUpdateRequest$inboundSchema = z.object({
|
|
38
38
|
channel_id: z.number().int(),
|
|
39
39
|
target_id: z.number().int(),
|
|
40
|
-
|
|
40
|
+
ChannelTargetUpdateRequest: components.ChannelTargetUpdateRequest$inboundSchema,
|
|
41
41
|
}).transform((v) => {
|
|
42
42
|
return (0, primitives_js_1.remap)(v, {
|
|
43
43
|
"channel_id": "channelId",
|
|
44
44
|
"target_id": "targetId",
|
|
45
|
-
"
|
|
45
|
+
"ChannelTargetUpdateRequest": "channelTargetUpdateRequest",
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
48
|
/** @internal */
|
|
49
49
|
exports.ChannelTargetsUpdateRequest$outboundSchema = z.object({
|
|
50
50
|
channelId: z.number().int(),
|
|
51
51
|
targetId: z.number().int(),
|
|
52
|
-
|
|
52
|
+
channelTargetUpdateRequest: components.ChannelTargetUpdateRequest$outboundSchema,
|
|
53
53
|
}).transform((v) => {
|
|
54
54
|
return (0, primitives_js_1.remap)(v, {
|
|
55
55
|
channelId: "channel_id",
|
|
56
56
|
targetId: "target_id",
|
|
57
|
-
|
|
57
|
+
channelTargetUpdateRequest: "ChannelTargetUpdateRequest",
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
60
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channeltargetsupdate.js","sourceRoot":"","sources":["../../src/models/operations/channeltargetsupdate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"channeltargetsupdate.js","sourceRoot":"","sources":["../../src/models/operations/channeltargetsupdate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEH,8EAQC;AAED,kFAQC;AAvFD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAEjD,mEAAqD;AASrD,gBAAgB;AACH,QAAA,yCAAyC,GAIlD,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC5B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC3B,0BAA0B,EACxB,UAAU,CAAC,wCAAwC;CACtD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,YAAY,EAAE,WAAW;QACzB,WAAW,EAAE,UAAU;QACvB,4BAA4B,EAAE,4BAA4B;KAC3D,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AASH,gBAAgB;AACH,QAAA,0CAA0C,GAInD,CAAC,CAAC,MAAM,CAAC;IACX,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC3B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC1B,0BAA0B,EACxB,UAAU,CAAC,yCAAyC;CACvD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,SAAS,EAAE,YAAY;QACvB,QAAQ,EAAE,WAAW;QACrB,0BAA0B,EAAE,4BAA4B;KACzD,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,4BAA4B,CAO5C;AAPD,WAAiB,4BAA4B;IAC3C,2EAA2E;IAC9D,0CAAa,GAAG,iDAAyC,CAAC;IACvE,4EAA4E;IAC/D,2CAAc,GAAG,kDAA0C,CAAC;AAG3E,CAAC,EAPgB,4BAA4B,4CAA5B,4BAA4B,QAO5C;AAED,SAAgB,iCAAiC,CAC/C,2BAAwD;IAExD,OAAO,IAAI,CAAC,SAAS,CACnB,kDAA0C,CAAC,KAAK,CAC9C,2BAA2B,CAC5B,CACF,CAAC;AACJ,CAAC;AAED,SAAgB,mCAAmC,CACjD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,iDAAyC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACrE,yDAAyD,CAC1D,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
package/sdk/channels.d.ts
CHANGED
|
@@ -11,7 +11,10 @@ export declare class Channels extends ClientSDK {
|
|
|
11
11
|
list(request: operations.ChannelsListRequest, options?: RequestOptions): Promise<components.ListResponseChannel>;
|
|
12
12
|
/**
|
|
13
13
|
* Delete Channel Target
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* Hard-delete a channel target by ID
|
|
14
17
|
*/
|
|
15
|
-
delete(request: operations.ChannelTargetsDeleteRequest, options?: RequestOptions): Promise<
|
|
18
|
+
delete(request: operations.ChannelTargetsDeleteRequest, options?: RequestOptions): Promise<any>;
|
|
16
19
|
}
|
|
17
20
|
//# sourceMappingURL=channels.d.ts.map
|
package/sdk/channels.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../src/sdk/channels.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,qBAAa,QAAS,SAAQ,SAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,CAAU;IAC3B,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;OAEG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAQ1C
|
|
1
|
+
{"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../src/sdk/channels.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,qBAAa,QAAS,SAAQ,SAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,CAAU;IAC3B,IAAI,OAAO,IAAI,OAAO,CAErB;IAED;;OAEG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC;IAQ1C;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,2BAA2B,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,GAAG,CAAC;CAOhB"}
|
package/sdk/channels.js
CHANGED
|
@@ -22,6 +22,9 @@ class Channels extends sdks_js_1.ClientSDK {
|
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Delete Channel Target
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* Hard-delete a channel target by ID
|
|
25
28
|
*/
|
|
26
29
|
async delete(request, options) {
|
|
27
30
|
return (0, fp_js_1.unwrapAsync)((0, channelsDelete_js_1.channelsDelete)(this, request, options));
|
package/sdk/channels.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channels.js","sourceRoot":"","sources":["../src/sdk/channels.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kEAA4D;AAC5D,8DAAwD;AACxD,4CAA2D;AAG3D,0CAA6C;AAC7C,6CAAuC;AAEvC,MAAa,QAAS,SAAQ,mBAAS;IAErC,IAAI,OAAO;;QACT,OAAO,OAAC,IAAI,CAAC,QAAQ,oCAAb,IAAI,CAAC,QAAQ,GAAK,IAAI,oBAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACxD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,IAAI,CACR,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"channels.js","sourceRoot":"","sources":["../src/sdk/channels.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kEAA4D;AAC5D,8DAAwD;AACxD,4CAA2D;AAG3D,0CAA6C;AAC7C,6CAAuC;AAEvC,MAAa,QAAS,SAAQ,mBAAS;IAErC,IAAI,OAAO;;QACT,OAAO,OAAC,IAAI,CAAC,QAAQ,oCAAb,IAAI,CAAC,QAAQ,GAAK,IAAI,oBAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACxD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,IAAI,CACR,OAAuC,EACvC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8BAAY,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAA+C,EAC/C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kCAAc,EAC/B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AApCD,4BAoCC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import * as z from "zod";
|
|
5
6
|
import { SyllableSDKCore } from "../core.js";
|
|
6
7
|
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
@@ -9,7 +10,6 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
9
10
|
import { RequestOptions } from "../lib/sdks.js";
|
|
10
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
12
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import * as components from "../models/components/index.js";
|
|
13
13
|
import {
|
|
14
14
|
ConnectionError,
|
|
15
15
|
InvalidRequestError,
|
|
@@ -25,6 +25,9 @@ import { Result } from "../types/fp.js";
|
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Delete Channel Target
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Hard-delete a channel target by ID
|
|
28
31
|
*/
|
|
29
32
|
export async function channelsDelete(
|
|
30
33
|
client: SyllableSDKCore,
|
|
@@ -32,7 +35,7 @@ export async function channelsDelete(
|
|
|
32
35
|
options?: RequestOptions,
|
|
33
36
|
): Promise<
|
|
34
37
|
Result<
|
|
35
|
-
|
|
38
|
+
any,
|
|
36
39
|
| errors.HTTPValidationError
|
|
37
40
|
| SDKError
|
|
38
41
|
| SDKValidationError
|
|
@@ -120,7 +123,7 @@ export async function channelsDelete(
|
|
|
120
123
|
};
|
|
121
124
|
|
|
122
125
|
const [result] = await M.match<
|
|
123
|
-
|
|
126
|
+
any,
|
|
124
127
|
| errors.HTTPValidationError
|
|
125
128
|
| SDKError
|
|
126
129
|
| SDKValidationError
|
|
@@ -130,7 +133,7 @@ export async function channelsDelete(
|
|
|
130
133
|
| RequestTimeoutError
|
|
131
134
|
| ConnectionError
|
|
132
135
|
>(
|
|
133
|
-
M.json(200,
|
|
136
|
+
M.json(200, z.any()),
|
|
134
137
|
M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
|
|
135
138
|
M.fail(["4XX", "5XX"]),
|
|
136
139
|
)(response, { extraFields: responseFields });
|
|
@@ -56,7 +56,9 @@ export async function channelsTargetsUpdate(
|
|
|
56
56
|
return parsed;
|
|
57
57
|
}
|
|
58
58
|
const payload = parsed.value;
|
|
59
|
-
const body = encodeJSON("body", payload.
|
|
59
|
+
const body = encodeJSON("body", payload.ChannelTargetUpdateRequest, {
|
|
60
|
+
explode: true,
|
|
61
|
+
});
|
|
60
62
|
|
|
61
63
|
const pathParams = {
|
|
62
64
|
channel_id: encodeSimple("channel_id", payload.channel_id, {
|
package/src/lib/config.ts
CHANGED
|
@@ -12,11 +12,11 @@ import { Params, pathToFunc } from "./url.js";
|
|
|
12
12
|
*/
|
|
13
13
|
export const ServerList = [
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* production server
|
|
16
16
|
*/
|
|
17
17
|
"http://localhost:8001",
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* production / port-forwarding server
|
|
20
20
|
*/
|
|
21
21
|
"http://localhost:8001",
|
|
22
22
|
] as const;
|
|
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "0.0.2",
|
|
64
|
-
sdkVersion: "0.1.0-alpha.
|
|
65
|
-
genVersion: "2.
|
|
64
|
+
sdkVersion: "0.1.0-alpha.26",
|
|
65
|
+
genVersion: "2.481.0",
|
|
66
66
|
userAgent:
|
|
67
|
-
"speakeasy-sdk/typescript 0.1.0-alpha.
|
|
67
|
+
"speakeasy-sdk/typescript 0.1.0-alpha.26 2.481.0 0.0.2 syllable-sdk",
|
|
68
68
|
} as const;
|
|
@@ -7,16 +7,28 @@ 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
|
+
DaoChannelTargetAgent,
|
|
12
|
+
DaoChannelTargetAgent$inboundSchema,
|
|
13
|
+
DaoChannelTargetAgent$Outbound,
|
|
14
|
+
DaoChannelTargetAgent$outboundSchema,
|
|
15
|
+
} from "./daochanneltargetagent.js";
|
|
10
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Class for all Channel Target responses
|
|
19
|
+
*/
|
|
11
20
|
export type ChannelTarget = {
|
|
12
21
|
id: number;
|
|
13
22
|
channelId: number | null;
|
|
14
23
|
channelName: string | null;
|
|
15
24
|
agentId: number | null;
|
|
25
|
+
agent: DaoChannelTargetAgent | null;
|
|
16
26
|
target: string | null;
|
|
17
27
|
targetMode: string | null;
|
|
18
28
|
fallbackTarget: string | null;
|
|
19
29
|
isTest: boolean | null;
|
|
30
|
+
updatedAt: Date | null;
|
|
31
|
+
lastUpdatedBy: string | null;
|
|
20
32
|
};
|
|
21
33
|
|
|
22
34
|
/** @internal */
|
|
@@ -29,10 +41,15 @@ export const ChannelTarget$inboundSchema: z.ZodType<
|
|
|
29
41
|
channel_id: z.nullable(z.number().int()),
|
|
30
42
|
channel_name: z.nullable(z.string()),
|
|
31
43
|
agent_id: z.nullable(z.number().int()),
|
|
44
|
+
agent: z.nullable(DaoChannelTargetAgent$inboundSchema),
|
|
32
45
|
target: z.nullable(z.string()),
|
|
33
46
|
target_mode: z.nullable(z.string()),
|
|
34
47
|
fallback_target: z.nullable(z.string()),
|
|
35
48
|
is_test: z.nullable(z.boolean()),
|
|
49
|
+
updated_at: z.nullable(
|
|
50
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
51
|
+
),
|
|
52
|
+
last_updated_by: z.nullable(z.string()),
|
|
36
53
|
}).transform((v) => {
|
|
37
54
|
return remap$(v, {
|
|
38
55
|
"channel_id": "channelId",
|
|
@@ -41,6 +58,8 @@ export const ChannelTarget$inboundSchema: z.ZodType<
|
|
|
41
58
|
"target_mode": "targetMode",
|
|
42
59
|
"fallback_target": "fallbackTarget",
|
|
43
60
|
"is_test": "isTest",
|
|
61
|
+
"updated_at": "updatedAt",
|
|
62
|
+
"last_updated_by": "lastUpdatedBy",
|
|
44
63
|
});
|
|
45
64
|
});
|
|
46
65
|
|
|
@@ -50,10 +69,13 @@ export type ChannelTarget$Outbound = {
|
|
|
50
69
|
channel_id: number | null;
|
|
51
70
|
channel_name: string | null;
|
|
52
71
|
agent_id: number | null;
|
|
72
|
+
agent: DaoChannelTargetAgent$Outbound | null;
|
|
53
73
|
target: string | null;
|
|
54
74
|
target_mode: string | null;
|
|
55
75
|
fallback_target: string | null;
|
|
56
76
|
is_test: boolean | null;
|
|
77
|
+
updated_at: string | null;
|
|
78
|
+
last_updated_by: string | null;
|
|
57
79
|
};
|
|
58
80
|
|
|
59
81
|
/** @internal */
|
|
@@ -66,10 +88,13 @@ export const ChannelTarget$outboundSchema: z.ZodType<
|
|
|
66
88
|
channelId: z.nullable(z.number().int()),
|
|
67
89
|
channelName: z.nullable(z.string()),
|
|
68
90
|
agentId: z.nullable(z.number().int()),
|
|
91
|
+
agent: z.nullable(DaoChannelTargetAgent$outboundSchema),
|
|
69
92
|
target: z.nullable(z.string()),
|
|
70
93
|
targetMode: z.nullable(z.string()),
|
|
71
94
|
fallbackTarget: z.nullable(z.string()),
|
|
72
95
|
isTest: z.nullable(z.boolean()),
|
|
96
|
+
updatedAt: z.nullable(z.date().transform(v => v.toISOString())),
|
|
97
|
+
lastUpdatedBy: z.nullable(z.string()),
|
|
73
98
|
}).transform((v) => {
|
|
74
99
|
return remap$(v, {
|
|
75
100
|
channelId: "channel_id",
|
|
@@ -78,6 +103,8 @@ export const ChannelTarget$outboundSchema: z.ZodType<
|
|
|
78
103
|
targetMode: "target_mode",
|
|
79
104
|
fallbackTarget: "fallback_target",
|
|
80
105
|
isTest: "is_test",
|
|
106
|
+
updatedAt: "updated_at",
|
|
107
|
+
lastUpdatedBy: "last_updated_by",
|
|
81
108
|
});
|
|
82
109
|
});
|
|
83
110
|
|
|
@@ -0,0 +1,107 @@
|
|
|
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 ChannelTargetUpdateRequest = {
|
|
12
|
+
id: number;
|
|
13
|
+
channelId: number | null;
|
|
14
|
+
agentId: number | null;
|
|
15
|
+
target: string | null;
|
|
16
|
+
targetMode: string | null;
|
|
17
|
+
fallbackTarget: string | null;
|
|
18
|
+
isTest: boolean | null;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const ChannelTargetUpdateRequest$inboundSchema: z.ZodType<
|
|
23
|
+
ChannelTargetUpdateRequest,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
id: z.number().int(),
|
|
28
|
+
channel_id: z.nullable(z.number().int()),
|
|
29
|
+
agent_id: z.nullable(z.number().int()),
|
|
30
|
+
target: z.nullable(z.string()),
|
|
31
|
+
target_mode: z.nullable(z.string()),
|
|
32
|
+
fallback_target: z.nullable(z.string()),
|
|
33
|
+
is_test: z.nullable(z.boolean()),
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
"channel_id": "channelId",
|
|
37
|
+
"agent_id": "agentId",
|
|
38
|
+
"target_mode": "targetMode",
|
|
39
|
+
"fallback_target": "fallbackTarget",
|
|
40
|
+
"is_test": "isTest",
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export type ChannelTargetUpdateRequest$Outbound = {
|
|
46
|
+
id: number;
|
|
47
|
+
channel_id: number | null;
|
|
48
|
+
agent_id: number | null;
|
|
49
|
+
target: string | null;
|
|
50
|
+
target_mode: string | null;
|
|
51
|
+
fallback_target: string | null;
|
|
52
|
+
is_test: boolean | null;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const ChannelTargetUpdateRequest$outboundSchema: z.ZodType<
|
|
57
|
+
ChannelTargetUpdateRequest$Outbound,
|
|
58
|
+
z.ZodTypeDef,
|
|
59
|
+
ChannelTargetUpdateRequest
|
|
60
|
+
> = z.object({
|
|
61
|
+
id: z.number().int(),
|
|
62
|
+
channelId: z.nullable(z.number().int()),
|
|
63
|
+
agentId: z.nullable(z.number().int()),
|
|
64
|
+
target: z.nullable(z.string()),
|
|
65
|
+
targetMode: z.nullable(z.string()),
|
|
66
|
+
fallbackTarget: z.nullable(z.string()),
|
|
67
|
+
isTest: z.nullable(z.boolean()),
|
|
68
|
+
}).transform((v) => {
|
|
69
|
+
return remap$(v, {
|
|
70
|
+
channelId: "channel_id",
|
|
71
|
+
agentId: "agent_id",
|
|
72
|
+
targetMode: "target_mode",
|
|
73
|
+
fallbackTarget: "fallback_target",
|
|
74
|
+
isTest: "is_test",
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @internal
|
|
80
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
81
|
+
*/
|
|
82
|
+
export namespace ChannelTargetUpdateRequest$ {
|
|
83
|
+
/** @deprecated use `ChannelTargetUpdateRequest$inboundSchema` instead. */
|
|
84
|
+
export const inboundSchema = ChannelTargetUpdateRequest$inboundSchema;
|
|
85
|
+
/** @deprecated use `ChannelTargetUpdateRequest$outboundSchema` instead. */
|
|
86
|
+
export const outboundSchema = ChannelTargetUpdateRequest$outboundSchema;
|
|
87
|
+
/** @deprecated use `ChannelTargetUpdateRequest$Outbound` instead. */
|
|
88
|
+
export type Outbound = ChannelTargetUpdateRequest$Outbound;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function channelTargetUpdateRequestToJSON(
|
|
92
|
+
channelTargetUpdateRequest: ChannelTargetUpdateRequest,
|
|
93
|
+
): string {
|
|
94
|
+
return JSON.stringify(
|
|
95
|
+
ChannelTargetUpdateRequest$outboundSchema.parse(channelTargetUpdateRequest),
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function channelTargetUpdateRequestFromJSON(
|
|
100
|
+
jsonString: string,
|
|
101
|
+
): SafeParseResult<ChannelTargetUpdateRequest, SDKValidationError> {
|
|
102
|
+
return safeParse(
|
|
103
|
+
jsonString,
|
|
104
|
+
(x) => ChannelTargetUpdateRequest$inboundSchema.parse(JSON.parse(x)),
|
|
105
|
+
`Failed to parse 'ChannelTargetUpdateRequest' from JSON`,
|
|
106
|
+
);
|
|
107
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
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 DaoChannelTargetAgent = {
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string | null | undefined;
|
|
14
|
+
label?: string | null | undefined;
|
|
15
|
+
type: string;
|
|
16
|
+
promptId: number;
|
|
17
|
+
customMessageId?: number | null | undefined;
|
|
18
|
+
timezone: string;
|
|
19
|
+
id: number;
|
|
20
|
+
updatedAt: Date;
|
|
21
|
+
lastUpdatedBy: string | null;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const DaoChannelTargetAgent$inboundSchema: z.ZodType<
|
|
26
|
+
DaoChannelTargetAgent,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
name: z.string(),
|
|
31
|
+
description: z.nullable(z.string()).optional(),
|
|
32
|
+
label: z.nullable(z.string()).optional(),
|
|
33
|
+
type: z.string(),
|
|
34
|
+
prompt_id: z.number().int(),
|
|
35
|
+
custom_message_id: z.nullable(z.number().int()).optional(),
|
|
36
|
+
timezone: z.string(),
|
|
37
|
+
id: z.number().int(),
|
|
38
|
+
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
39
|
+
last_updated_by: z.nullable(z.string()),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"prompt_id": "promptId",
|
|
43
|
+
"custom_message_id": "customMessageId",
|
|
44
|
+
"updated_at": "updatedAt",
|
|
45
|
+
"last_updated_by": "lastUpdatedBy",
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type DaoChannelTargetAgent$Outbound = {
|
|
51
|
+
name: string;
|
|
52
|
+
description?: string | null | undefined;
|
|
53
|
+
label?: string | null | undefined;
|
|
54
|
+
type: string;
|
|
55
|
+
prompt_id: number;
|
|
56
|
+
custom_message_id?: number | null | undefined;
|
|
57
|
+
timezone: string;
|
|
58
|
+
id: number;
|
|
59
|
+
updated_at: string;
|
|
60
|
+
last_updated_by: string | null;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const DaoChannelTargetAgent$outboundSchema: z.ZodType<
|
|
65
|
+
DaoChannelTargetAgent$Outbound,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
DaoChannelTargetAgent
|
|
68
|
+
> = z.object({
|
|
69
|
+
name: z.string(),
|
|
70
|
+
description: z.nullable(z.string()).optional(),
|
|
71
|
+
label: z.nullable(z.string()).optional(),
|
|
72
|
+
type: z.string(),
|
|
73
|
+
promptId: z.number().int(),
|
|
74
|
+
customMessageId: z.nullable(z.number().int()).optional(),
|
|
75
|
+
timezone: z.string(),
|
|
76
|
+
id: z.number().int(),
|
|
77
|
+
updatedAt: z.date().transform(v => v.toISOString()),
|
|
78
|
+
lastUpdatedBy: z.nullable(z.string()),
|
|
79
|
+
}).transform((v) => {
|
|
80
|
+
return remap$(v, {
|
|
81
|
+
promptId: "prompt_id",
|
|
82
|
+
customMessageId: "custom_message_id",
|
|
83
|
+
updatedAt: "updated_at",
|
|
84
|
+
lastUpdatedBy: "last_updated_by",
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @internal
|
|
90
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
91
|
+
*/
|
|
92
|
+
export namespace DaoChannelTargetAgent$ {
|
|
93
|
+
/** @deprecated use `DaoChannelTargetAgent$inboundSchema` instead. */
|
|
94
|
+
export const inboundSchema = DaoChannelTargetAgent$inboundSchema;
|
|
95
|
+
/** @deprecated use `DaoChannelTargetAgent$outboundSchema` instead. */
|
|
96
|
+
export const outboundSchema = DaoChannelTargetAgent$outboundSchema;
|
|
97
|
+
/** @deprecated use `DaoChannelTargetAgent$Outbound` instead. */
|
|
98
|
+
export type Outbound = DaoChannelTargetAgent$Outbound;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function daoChannelTargetAgentToJSON(
|
|
102
|
+
daoChannelTargetAgent: DaoChannelTargetAgent,
|
|
103
|
+
): string {
|
|
104
|
+
return JSON.stringify(
|
|
105
|
+
DaoChannelTargetAgent$outboundSchema.parse(daoChannelTargetAgent),
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function daoChannelTargetAgentFromJSON(
|
|
110
|
+
jsonString: string,
|
|
111
|
+
): SafeParseResult<DaoChannelTargetAgent, SDKValidationError> {
|
|
112
|
+
return safeParse(
|
|
113
|
+
jsonString,
|
|
114
|
+
(x) => DaoChannelTargetAgent$inboundSchema.parse(JSON.parse(x)),
|
|
115
|
+
`Failed to parse 'DaoChannelTargetAgent' from JSON`,
|
|
116
|
+
);
|
|
117
|
+
}
|
|
@@ -20,6 +20,7 @@ export * from "./channelservices.js";
|
|
|
20
20
|
export * from "./channeltarget.js";
|
|
21
21
|
export * from "./channeltargetcreaterequest.js";
|
|
22
22
|
export * from "./channeltargetproperties.js";
|
|
23
|
+
export * from "./channeltargetupdaterequest.js";
|
|
23
24
|
export * from "./conversation.js";
|
|
24
25
|
export * from "./conversationproperties.js";
|
|
25
26
|
export * from "./custommessage.js";
|
|
@@ -27,6 +28,7 @@ export * from "./custommessagecreaterequest.js";
|
|
|
27
28
|
export * from "./custommessageproperties.js";
|
|
28
29
|
export * from "./custommessageresponse.js";
|
|
29
30
|
export * from "./custommessageupdaterequest.js";
|
|
31
|
+
export * from "./daochanneltargetagent.js";
|
|
30
32
|
export * from "./daocustommessagerule.js";
|
|
31
33
|
export * from "./dayofweek.js";
|
|
32
34
|
export * from "./directoryextension.js";
|
|
@@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
export type ChannelTargetsUpdateRequest = {
|
|
13
13
|
channelId: number;
|
|
14
14
|
targetId: number;
|
|
15
|
-
|
|
15
|
+
channelTargetUpdateRequest: components.ChannelTargetUpdateRequest;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
/** @internal */
|
|
@@ -23,12 +23,13 @@ export const ChannelTargetsUpdateRequest$inboundSchema: z.ZodType<
|
|
|
23
23
|
> = z.object({
|
|
24
24
|
channel_id: z.number().int(),
|
|
25
25
|
target_id: z.number().int(),
|
|
26
|
-
|
|
26
|
+
ChannelTargetUpdateRequest:
|
|
27
|
+
components.ChannelTargetUpdateRequest$inboundSchema,
|
|
27
28
|
}).transform((v) => {
|
|
28
29
|
return remap$(v, {
|
|
29
30
|
"channel_id": "channelId",
|
|
30
31
|
"target_id": "targetId",
|
|
31
|
-
"
|
|
32
|
+
"ChannelTargetUpdateRequest": "channelTargetUpdateRequest",
|
|
32
33
|
});
|
|
33
34
|
});
|
|
34
35
|
|
|
@@ -36,7 +37,7 @@ export const ChannelTargetsUpdateRequest$inboundSchema: z.ZodType<
|
|
|
36
37
|
export type ChannelTargetsUpdateRequest$Outbound = {
|
|
37
38
|
channel_id: number;
|
|
38
39
|
target_id: number;
|
|
39
|
-
|
|
40
|
+
ChannelTargetUpdateRequest: components.ChannelTargetUpdateRequest$Outbound;
|
|
40
41
|
};
|
|
41
42
|
|
|
42
43
|
/** @internal */
|
|
@@ -47,12 +48,13 @@ export const ChannelTargetsUpdateRequest$outboundSchema: z.ZodType<
|
|
|
47
48
|
> = z.object({
|
|
48
49
|
channelId: z.number().int(),
|
|
49
50
|
targetId: z.number().int(),
|
|
50
|
-
|
|
51
|
+
channelTargetUpdateRequest:
|
|
52
|
+
components.ChannelTargetUpdateRequest$outboundSchema,
|
|
51
53
|
}).transform((v) => {
|
|
52
54
|
return remap$(v, {
|
|
53
55
|
channelId: "channel_id",
|
|
54
56
|
targetId: "target_id",
|
|
55
|
-
|
|
57
|
+
channelTargetUpdateRequest: "ChannelTargetUpdateRequest",
|
|
56
58
|
});
|
|
57
59
|
});
|
|
58
60
|
|
package/src/sdk/channels.ts
CHANGED
|
@@ -32,11 +32,14 @@ export class Channels extends ClientSDK {
|
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Delete Channel Target
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* Hard-delete a channel target by ID
|
|
35
38
|
*/
|
|
36
39
|
async delete(
|
|
37
40
|
request: operations.ChannelTargetsDeleteRequest,
|
|
38
41
|
options?: RequestOptions,
|
|
39
|
-
): Promise<
|
|
42
|
+
): Promise<any> {
|
|
40
43
|
return unwrapAsync(channelsDelete(
|
|
41
44
|
this,
|
|
42
45
|
request,
|