syllable-sdk 0.1.0-alpha.15 → 0.1.0-alpha.16

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.
Files changed (41) hide show
  1. package/docs/sdks/agents/README.md +2 -2
  2. package/funcs/agentsGetById.d.ts +1 -1
  3. package/funcs/agentsGetById.d.ts.map +1 -1
  4. package/funcs/agentsGetById.js +1 -1
  5. package/funcs/agentsGetById.js.map +1 -1
  6. package/funcs/agentsList.d.ts +1 -1
  7. package/funcs/agentsList.d.ts.map +1 -1
  8. package/funcs/agentsList.js +1 -1
  9. package/funcs/agentsList.js.map +1 -1
  10. package/lib/config.d.ts +2 -2
  11. package/lib/config.js +2 -2
  12. package/models/components/agentresponse.d.ts +115 -0
  13. package/models/components/agentresponse.d.ts.map +1 -0
  14. package/models/components/agentresponse.js +118 -0
  15. package/models/components/agentresponse.js.map +1 -0
  16. package/models/components/greeting.d.ts +42 -0
  17. package/models/components/greeting.d.ts.map +1 -0
  18. package/models/components/greeting.js +63 -0
  19. package/models/components/greeting.js.map +1 -0
  20. package/models/components/index.d.ts +3 -1
  21. package/models/components/index.d.ts.map +1 -1
  22. package/models/components/index.js +3 -1
  23. package/models/components/index.js.map +1 -1
  24. package/models/components/listresponseagentresponse.d.ts +38 -0
  25. package/models/components/listresponseagentresponse.d.ts.map +1 -0
  26. package/models/components/{listresponseagent.js → listresponseagentresponse.js} +20 -20
  27. package/models/components/listresponseagentresponse.js.map +1 -0
  28. package/package.json +1 -1
  29. package/sdk/agents.d.ts +2 -2
  30. package/sdk/agents.d.ts.map +1 -1
  31. package/src/funcs/agentsGetById.ts +3 -3
  32. package/src/funcs/agentsList.ts +3 -3
  33. package/src/lib/config.ts +2 -2
  34. package/src/models/components/agentresponse.ts +215 -0
  35. package/src/models/components/greeting.ts +79 -0
  36. package/src/models/components/index.ts +3 -1
  37. package/src/models/components/{listresponseagent.ts → listresponseagentresponse.ts} +30 -30
  38. package/src/sdk/agents.ts +2 -2
  39. package/models/components/listresponseagent.d.ts +0 -38
  40. package/models/components/listresponseagent.d.ts.map +0 -1
  41. package/models/components/listresponseagent.js.map +0 -1
@@ -26,16 +26,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.ListResponseAgent$ = exports.ListResponseAgent$outboundSchema = exports.ListResponseAgent$inboundSchema = void 0;
30
- exports.listResponseAgentToJSON = listResponseAgentToJSON;
31
- exports.listResponseAgentFromJSON = listResponseAgentFromJSON;
29
+ exports.ListResponseAgentResponse$ = exports.ListResponseAgentResponse$outboundSchema = exports.ListResponseAgentResponse$inboundSchema = void 0;
30
+ exports.listResponseAgentResponseToJSON = listResponseAgentResponseToJSON;
31
+ exports.listResponseAgentResponseFromJSON = listResponseAgentResponseFromJSON;
32
32
  const z = __importStar(require("zod"));
33
33
  const primitives_js_1 = require("../../lib/primitives.js");
34
34
  const schemas_js_1 = require("../../lib/schemas.js");
35
- const agent_js_1 = require("./agent.js");
35
+ const agentresponse_js_1 = require("./agentresponse.js");
36
36
  /** @internal */
37
- exports.ListResponseAgent$inboundSchema = z.object({
38
- items: z.array(agent_js_1.Agent$inboundSchema),
37
+ exports.ListResponseAgentResponse$inboundSchema = z.object({
38
+ items: z.array(agentresponse_js_1.AgentResponse$inboundSchema),
39
39
  page: z.number().int(),
40
40
  page_size: z.number().int(),
41
41
  total_pages: z.nullable(z.number().int()).optional(),
@@ -48,8 +48,8 @@ exports.ListResponseAgent$inboundSchema = z.object({
48
48
  });
49
49
  });
50
50
  /** @internal */
51
- exports.ListResponseAgent$outboundSchema = z.object({
52
- items: z.array(agent_js_1.Agent$outboundSchema),
51
+ exports.ListResponseAgentResponse$outboundSchema = z.object({
52
+ items: z.array(agentresponse_js_1.AgentResponse$outboundSchema),
53
53
  page: z.number().int(),
54
54
  pageSize: z.number().int(),
55
55
  totalPages: z.nullable(z.number().int()).optional(),
@@ -65,17 +65,17 @@ exports.ListResponseAgent$outboundSchema = z.object({
65
65
  * @internal
66
66
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
67
67
  */
68
- var ListResponseAgent$;
69
- (function (ListResponseAgent$) {
70
- /** @deprecated use `ListResponseAgent$inboundSchema` instead. */
71
- ListResponseAgent$.inboundSchema = exports.ListResponseAgent$inboundSchema;
72
- /** @deprecated use `ListResponseAgent$outboundSchema` instead. */
73
- ListResponseAgent$.outboundSchema = exports.ListResponseAgent$outboundSchema;
74
- })(ListResponseAgent$ || (exports.ListResponseAgent$ = ListResponseAgent$ = {}));
75
- function listResponseAgentToJSON(listResponseAgent) {
76
- return JSON.stringify(exports.ListResponseAgent$outboundSchema.parse(listResponseAgent));
68
+ var ListResponseAgentResponse$;
69
+ (function (ListResponseAgentResponse$) {
70
+ /** @deprecated use `ListResponseAgentResponse$inboundSchema` instead. */
71
+ ListResponseAgentResponse$.inboundSchema = exports.ListResponseAgentResponse$inboundSchema;
72
+ /** @deprecated use `ListResponseAgentResponse$outboundSchema` instead. */
73
+ ListResponseAgentResponse$.outboundSchema = exports.ListResponseAgentResponse$outboundSchema;
74
+ })(ListResponseAgentResponse$ || (exports.ListResponseAgentResponse$ = ListResponseAgentResponse$ = {}));
75
+ function listResponseAgentResponseToJSON(listResponseAgentResponse) {
76
+ return JSON.stringify(exports.ListResponseAgentResponse$outboundSchema.parse(listResponseAgentResponse));
77
77
  }
78
- function listResponseAgentFromJSON(jsonString) {
79
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListResponseAgent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListResponseAgent' from JSON`);
78
+ function listResponseAgentResponseFromJSON(jsonString) {
79
+ return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.ListResponseAgentResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListResponseAgentResponse' from JSON`);
80
80
  }
81
- //# sourceMappingURL=listresponseagent.js.map
81
+ //# sourceMappingURL=listresponseagentresponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listresponseagentresponse.js","sourceRoot":"","sources":["../../src/models/components/listresponseagentresponse.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFH,0EAMC;AAED,8EAQC;AAhGD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAGjD,yDAK4B;AAU5B,gBAAgB;AACH,QAAA,uCAAuC,GAIhD,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,8CAA2B,CAAC;IAC3C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACtB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC3B,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IACpD,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;CACrD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,WAAW,EAAE,UAAU;QACvB,aAAa,EAAE,YAAY;QAC3B,aAAa,EAAE,YAAY;KAC5B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAWH,gBAAgB;AACH,QAAA,wCAAwC,GAIjD,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,+CAA4B,CAAC;IAC5C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACtB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC1B,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;IACnD,UAAU,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,QAAQ,EAAE;CACpD,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,QAAQ,EAAE,WAAW;QACrB,UAAU,EAAE,aAAa;QACzB,UAAU,EAAE,aAAa;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,0BAA0B,CAO1C;AAPD,WAAiB,0BAA0B;IACzC,yEAAyE;IAC5D,wCAAa,GAAG,+CAAuC,CAAC;IACrE,0EAA0E;IAC7D,yCAAc,GAAG,gDAAwC,CAAC;AAGzE,CAAC,EAPgB,0BAA0B,0CAA1B,0BAA0B,QAO1C;AAED,SAAgB,+BAA+B,CAC7C,yBAAoD;IAEpD,OAAO,IAAI,CAAC,SAAS,CACnB,gDAAwC,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAC1E,CAAC;AACJ,CAAC;AAED,SAAgB,iCAAiC,CAC/C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,+CAAuC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACnE,uDAAuD,CACxD,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "syllable-sdk",
3
- "version": "0.1.0-alpha.15",
3
+ "version": "0.1.0-alpha.16",
4
4
  "author": "Speakeasy",
5
5
  "main": "./index.js",
6
6
  "sideEffects": false,
package/sdk/agents.d.ts CHANGED
@@ -11,7 +11,7 @@ export declare class Agents extends ClientSDK {
11
11
  * @remarks
12
12
  * List the existing agents
13
13
  */
14
- list(request: operations.AgentListRequest, options?: RequestOptions): Promise<components.ListResponseAgent>;
14
+ list(request: operations.AgentListRequest, options?: RequestOptions): Promise<components.ListResponseAgentResponse>;
15
15
  /**
16
16
  * Create Agent
17
17
  *
@@ -32,7 +32,7 @@ export declare class Agents extends ClientSDK {
32
32
  * @remarks
33
33
  * Get an agent by ID.
34
34
  */
35
- getById(request: operations.AgentGetByIdRequest, options?: RequestOptions): Promise<components.Agent>;
35
+ getById(request: operations.AgentGetByIdRequest, options?: RequestOptions): Promise<components.AgentResponse>;
36
36
  /**
37
37
  * Delete Agent
38
38
  */
@@ -1 +1 @@
1
- {"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../src/sdk/agents.ts"],"names":[],"mappings":"AAUA,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,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,qBAAa,MAAO,SAAQ,SAAS;IACnC,OAAO,CAAC,KAAK,CAAC,CAAO;IACrB,IAAI,IAAI,IAAI,IAAI,CAEf;IAED;;;;;OAKG;IACG,IAAI,CACR,OAAO,EAAE,UAAU,CAAC,gBAAgB,EACpC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC;IAQxC;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,WAAW,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC;IAQ5B;;;;;OAKG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,WAAW,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC;IAQ5B;;;;;OAKG;IACG,OAAO,CACX,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC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,aAAa,CAAC;IAQpC;;OAEG;IACG,MAAM,CACV,OAAO,EAAE,UAAU,CAAC,kBAAkB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,GAAG,CAAC;IAQf;;;;;OAKG;IACG,uBAAuB,CAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;CAMzC"}
@@ -35,7 +35,7 @@ export async function agentsGetById(
35
35
  options?: RequestOptions,
36
36
  ): Promise<
37
37
  Result<
38
- components.Agent,
38
+ components.AgentResponse,
39
39
  | errors.HTTPValidationError
40
40
  | SDKError
41
41
  | SDKValidationError
@@ -116,7 +116,7 @@ export async function agentsGetById(
116
116
  };
117
117
 
118
118
  const [result] = await M.match<
119
- components.Agent,
119
+ components.AgentResponse,
120
120
  | errors.HTTPValidationError
121
121
  | SDKError
122
122
  | SDKValidationError
@@ -126,7 +126,7 @@ export async function agentsGetById(
126
126
  | RequestTimeoutError
127
127
  | ConnectionError
128
128
  >(
129
- M.json(200, components.Agent$inboundSchema),
129
+ M.json(200, components.AgentResponse$inboundSchema),
130
130
  M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
131
131
  M.fail(["4XX", "5XX"]),
132
132
  )(response, { extraFields: responseFields });
@@ -35,7 +35,7 @@ export async function agentsList(
35
35
  options?: RequestOptions,
36
36
  ): Promise<
37
37
  Result<
38
- components.ListResponseAgent,
38
+ components.ListResponseAgentResponse,
39
39
  | errors.HTTPValidationError
40
40
  | SDKError
41
41
  | SDKValidationError
@@ -122,7 +122,7 @@ export async function agentsList(
122
122
  };
123
123
 
124
124
  const [result] = await M.match<
125
- components.ListResponseAgent,
125
+ components.ListResponseAgentResponse,
126
126
  | errors.HTTPValidationError
127
127
  | SDKError
128
128
  | SDKValidationError
@@ -132,7 +132,7 @@ export async function agentsList(
132
132
  | RequestTimeoutError
133
133
  | ConnectionError
134
134
  >(
135
- M.json(200, components.ListResponseAgent$inboundSchema),
135
+ M.json(200, components.ListResponseAgentResponse$inboundSchema),
136
136
  M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
137
137
  M.fail(["4XX", "5XX"]),
138
138
  )(response, { extraFields: responseFields });
package/src/lib/config.ts CHANGED
@@ -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.15",
64
+ sdkVersion: "0.1.0-alpha.16",
65
65
  genVersion: "2.474.15",
66
66
  userAgent:
67
- "speakeasy-sdk/typescript 0.1.0-alpha.15 2.474.15 0.0.2 syllable-sdk",
67
+ "speakeasy-sdk/typescript 0.1.0-alpha.16 2.474.15 0.0.2 syllable-sdk",
68
68
  } as const;
@@ -0,0 +1,215 @@
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
+ AgentToolDefaults,
12
+ AgentToolDefaults$inboundSchema,
13
+ AgentToolDefaults$Outbound,
14
+ AgentToolDefaults$outboundSchema,
15
+ } from "./agenttooldefaults.js";
16
+ import {
17
+ Greeting,
18
+ Greeting$inboundSchema,
19
+ Greeting$Outbound,
20
+ Greeting$outboundSchema,
21
+ } from "./greeting.js";
22
+ import {
23
+ Prompt,
24
+ Prompt$inboundSchema,
25
+ Prompt$Outbound,
26
+ Prompt$outboundSchema,
27
+ } from "./prompt.js";
28
+ import {
29
+ Target,
30
+ Target$inboundSchema,
31
+ Target$Outbound,
32
+ Target$outboundSchema,
33
+ } from "./target.js";
34
+
35
+ export type AgentResponse = {
36
+ /**
37
+ * The Agent name
38
+ */
39
+ name: string;
40
+ /**
41
+ * The Agent description
42
+ */
43
+ description?: string | null | undefined;
44
+ /**
45
+ * The Agent label
46
+ */
47
+ label?: string | null | undefined;
48
+ /**
49
+ * The Agent type
50
+ */
51
+ type: string;
52
+ /**
53
+ * The Agent's prompt id
54
+ */
55
+ promptId: number;
56
+ /**
57
+ * The Agent's custom message id
58
+ */
59
+ customMessageId?: number | null | undefined;
60
+ /**
61
+ * The time zone the bot operates in
62
+ */
63
+ timezone: string;
64
+ promptToolDefaults: Array<AgentToolDefaults>;
65
+ languages: Array<string>;
66
+ variables: { [k: string]: string };
67
+ /**
68
+ * Optional headers to include in tool calls.
69
+ */
70
+ toolHeaders: { [k: string]: string } | null;
71
+ /**
72
+ * The Agent ID
73
+ */
74
+ id: number;
75
+ /**
76
+ * Timestamp of most recent update
77
+ */
78
+ updatedAt: Date;
79
+ /**
80
+ * Email of the user who last updated the agent
81
+ */
82
+ lastUpdatedBy: string | null;
83
+ /**
84
+ * Channel targets associated with the agent
85
+ */
86
+ channelTargets?: Array<Target> | null | undefined;
87
+ /**
88
+ * The prompt associated with the agent
89
+ */
90
+ prompt?: Prompt | null | undefined;
91
+ /**
92
+ * The custom message associated with the agent
93
+ */
94
+ customMessage?: Greeting | null | undefined;
95
+ };
96
+
97
+ /** @internal */
98
+ export const AgentResponse$inboundSchema: z.ZodType<
99
+ AgentResponse,
100
+ z.ZodTypeDef,
101
+ unknown
102
+ > = z.object({
103
+ name: z.string(),
104
+ description: z.nullable(z.string()).optional(),
105
+ label: z.nullable(z.string()).optional(),
106
+ type: z.string(),
107
+ prompt_id: z.number().int(),
108
+ custom_message_id: z.nullable(z.number().int()).optional(),
109
+ timezone: z.string(),
110
+ prompt_tool_defaults: z.array(AgentToolDefaults$inboundSchema),
111
+ languages: z.array(z.string()),
112
+ variables: z.record(z.string()),
113
+ tool_headers: z.nullable(z.record(z.string())),
114
+ id: z.number().int(),
115
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
116
+ last_updated_by: z.nullable(z.string()),
117
+ channel_targets: z.nullable(z.array(Target$inboundSchema)).optional(),
118
+ prompt: z.nullable(Prompt$inboundSchema).optional(),
119
+ custom_message: z.nullable(Greeting$inboundSchema).optional(),
120
+ }).transform((v) => {
121
+ return remap$(v, {
122
+ "prompt_id": "promptId",
123
+ "custom_message_id": "customMessageId",
124
+ "prompt_tool_defaults": "promptToolDefaults",
125
+ "tool_headers": "toolHeaders",
126
+ "updated_at": "updatedAt",
127
+ "last_updated_by": "lastUpdatedBy",
128
+ "channel_targets": "channelTargets",
129
+ "custom_message": "customMessage",
130
+ });
131
+ });
132
+
133
+ /** @internal */
134
+ export type AgentResponse$Outbound = {
135
+ name: string;
136
+ description?: string | null | undefined;
137
+ label?: string | null | undefined;
138
+ type: string;
139
+ prompt_id: number;
140
+ custom_message_id?: number | null | undefined;
141
+ timezone: string;
142
+ prompt_tool_defaults: Array<AgentToolDefaults$Outbound>;
143
+ languages: Array<string>;
144
+ variables: { [k: string]: string };
145
+ tool_headers: { [k: string]: string } | null;
146
+ id: number;
147
+ updated_at: string;
148
+ last_updated_by: string | null;
149
+ channel_targets?: Array<Target$Outbound> | null | undefined;
150
+ prompt?: Prompt$Outbound | null | undefined;
151
+ custom_message?: Greeting$Outbound | null | undefined;
152
+ };
153
+
154
+ /** @internal */
155
+ export const AgentResponse$outboundSchema: z.ZodType<
156
+ AgentResponse$Outbound,
157
+ z.ZodTypeDef,
158
+ AgentResponse
159
+ > = z.object({
160
+ name: z.string(),
161
+ description: z.nullable(z.string()).optional(),
162
+ label: z.nullable(z.string()).optional(),
163
+ type: z.string(),
164
+ promptId: z.number().int(),
165
+ customMessageId: z.nullable(z.number().int()).optional(),
166
+ timezone: z.string(),
167
+ promptToolDefaults: z.array(AgentToolDefaults$outboundSchema),
168
+ languages: z.array(z.string()),
169
+ variables: z.record(z.string()),
170
+ toolHeaders: z.nullable(z.record(z.string())),
171
+ id: z.number().int(),
172
+ updatedAt: z.date().transform(v => v.toISOString()),
173
+ lastUpdatedBy: z.nullable(z.string()),
174
+ channelTargets: z.nullable(z.array(Target$outboundSchema)).optional(),
175
+ prompt: z.nullable(Prompt$outboundSchema).optional(),
176
+ customMessage: z.nullable(Greeting$outboundSchema).optional(),
177
+ }).transform((v) => {
178
+ return remap$(v, {
179
+ promptId: "prompt_id",
180
+ customMessageId: "custom_message_id",
181
+ promptToolDefaults: "prompt_tool_defaults",
182
+ toolHeaders: "tool_headers",
183
+ updatedAt: "updated_at",
184
+ lastUpdatedBy: "last_updated_by",
185
+ channelTargets: "channel_targets",
186
+ customMessage: "custom_message",
187
+ });
188
+ });
189
+
190
+ /**
191
+ * @internal
192
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
193
+ */
194
+ export namespace AgentResponse$ {
195
+ /** @deprecated use `AgentResponse$inboundSchema` instead. */
196
+ export const inboundSchema = AgentResponse$inboundSchema;
197
+ /** @deprecated use `AgentResponse$outboundSchema` instead. */
198
+ export const outboundSchema = AgentResponse$outboundSchema;
199
+ /** @deprecated use `AgentResponse$Outbound` instead. */
200
+ export type Outbound = AgentResponse$Outbound;
201
+ }
202
+
203
+ export function agentResponseToJSON(agentResponse: AgentResponse): string {
204
+ return JSON.stringify(AgentResponse$outboundSchema.parse(agentResponse));
205
+ }
206
+
207
+ export function agentResponseFromJSON(
208
+ jsonString: string,
209
+ ): SafeParseResult<AgentResponse, SDKValidationError> {
210
+ return safeParse(
211
+ jsonString,
212
+ (x) => AgentResponse$inboundSchema.parse(JSON.parse(x)),
213
+ `Failed to parse 'AgentResponse' from JSON`,
214
+ );
215
+ }
@@ -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 Greeting = {
11
+ /**
12
+ * The name of the greeting
13
+ */
14
+ name: string;
15
+ /**
16
+ * The text of the greeting
17
+ */
18
+ text: string;
19
+ /**
20
+ * The ID of the greeting
21
+ */
22
+ id: number;
23
+ };
24
+
25
+ /** @internal */
26
+ export const Greeting$inboundSchema: z.ZodType<
27
+ Greeting,
28
+ z.ZodTypeDef,
29
+ unknown
30
+ > = z.object({
31
+ name: z.string(),
32
+ text: z.string(),
33
+ id: z.number().int(),
34
+ });
35
+
36
+ /** @internal */
37
+ export type Greeting$Outbound = {
38
+ name: string;
39
+ text: string;
40
+ id: number;
41
+ };
42
+
43
+ /** @internal */
44
+ export const Greeting$outboundSchema: z.ZodType<
45
+ Greeting$Outbound,
46
+ z.ZodTypeDef,
47
+ Greeting
48
+ > = z.object({
49
+ name: z.string(),
50
+ text: 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 Greeting$ {
59
+ /** @deprecated use `Greeting$inboundSchema` instead. */
60
+ export const inboundSchema = Greeting$inboundSchema;
61
+ /** @deprecated use `Greeting$outboundSchema` instead. */
62
+ export const outboundSchema = Greeting$outboundSchema;
63
+ /** @deprecated use `Greeting$Outbound` instead. */
64
+ export type Outbound = Greeting$Outbound;
65
+ }
66
+
67
+ export function greetingToJSON(greeting: Greeting): string {
68
+ return JSON.stringify(Greeting$outboundSchema.parse(greeting));
69
+ }
70
+
71
+ export function greetingFromJSON(
72
+ jsonString: string,
73
+ ): SafeParseResult<Greeting, SDKValidationError> {
74
+ return safeParse(
75
+ jsonString,
76
+ (x) => Greeting$inboundSchema.parse(JSON.parse(x)),
77
+ `Failed to parse 'Greeting' from JSON`,
78
+ );
79
+ }
@@ -5,6 +5,7 @@
5
5
  export * from "./agent.js";
6
6
  export * from "./agentcreate.js";
7
7
  export * from "./agentproperties.js";
8
+ export * from "./agentresponse.js";
8
9
  export * from "./agenttooldefaults.js";
9
10
  export * from "./agenttoolfielddefault.js";
10
11
  export * from "./agentupdate.js";
@@ -30,7 +31,8 @@ export * from "./directorymembercreate.js";
30
31
  export * from "./directorymemberproperties.js";
31
32
  export * from "./event.js";
32
33
  export * from "./eventproperties.js";
33
- export * from "./listresponseagent.js";
34
+ export * from "./greeting.js";
35
+ export * from "./listresponseagentresponse.js";
34
36
  export * from "./listresponseavailabletarget.js";
35
37
  export * from "./listresponsechannel.js";
36
38
  export * from "./listresponsechanneltarget.js";
@@ -8,14 +8,14 @@ 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
10
  import {
11
- Agent,
12
- Agent$inboundSchema,
13
- Agent$Outbound,
14
- Agent$outboundSchema,
15
- } from "./agent.js";
11
+ AgentResponse,
12
+ AgentResponse$inboundSchema,
13
+ AgentResponse$Outbound,
14
+ AgentResponse$outboundSchema,
15
+ } from "./agentresponse.js";
16
16
 
17
- export type ListResponseAgent = {
18
- items: Array<Agent>;
17
+ export type ListResponseAgentResponse = {
18
+ items: Array<AgentResponse>;
19
19
  page: number;
20
20
  pageSize: number;
21
21
  totalPages?: number | null | undefined;
@@ -23,12 +23,12 @@ export type ListResponseAgent = {
23
23
  };
24
24
 
25
25
  /** @internal */
26
- export const ListResponseAgent$inboundSchema: z.ZodType<
27
- ListResponseAgent,
26
+ export const ListResponseAgentResponse$inboundSchema: z.ZodType<
27
+ ListResponseAgentResponse,
28
28
  z.ZodTypeDef,
29
29
  unknown
30
30
  > = z.object({
31
- items: z.array(Agent$inboundSchema),
31
+ items: z.array(AgentResponse$inboundSchema),
32
32
  page: z.number().int(),
33
33
  page_size: z.number().int(),
34
34
  total_pages: z.nullable(z.number().int()).optional(),
@@ -42,8 +42,8 @@ export const ListResponseAgent$inboundSchema: z.ZodType<
42
42
  });
43
43
 
44
44
  /** @internal */
45
- export type ListResponseAgent$Outbound = {
46
- items: Array<Agent$Outbound>;
45
+ export type ListResponseAgentResponse$Outbound = {
46
+ items: Array<AgentResponse$Outbound>;
47
47
  page: number;
48
48
  page_size: number;
49
49
  total_pages?: number | null | undefined;
@@ -51,12 +51,12 @@ export type ListResponseAgent$Outbound = {
51
51
  };
52
52
 
53
53
  /** @internal */
54
- export const ListResponseAgent$outboundSchema: z.ZodType<
55
- ListResponseAgent$Outbound,
54
+ export const ListResponseAgentResponse$outboundSchema: z.ZodType<
55
+ ListResponseAgentResponse$Outbound,
56
56
  z.ZodTypeDef,
57
- ListResponseAgent
57
+ ListResponseAgentResponse
58
58
  > = z.object({
59
- items: z.array(Agent$outboundSchema),
59
+ items: z.array(AgentResponse$outboundSchema),
60
60
  page: z.number().int(),
61
61
  pageSize: z.number().int(),
62
62
  totalPages: z.nullable(z.number().int()).optional(),
@@ -73,29 +73,29 @@ export const ListResponseAgent$outboundSchema: z.ZodType<
73
73
  * @internal
74
74
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
75
75
  */
76
- export namespace ListResponseAgent$ {
77
- /** @deprecated use `ListResponseAgent$inboundSchema` instead. */
78
- export const inboundSchema = ListResponseAgent$inboundSchema;
79
- /** @deprecated use `ListResponseAgent$outboundSchema` instead. */
80
- export const outboundSchema = ListResponseAgent$outboundSchema;
81
- /** @deprecated use `ListResponseAgent$Outbound` instead. */
82
- export type Outbound = ListResponseAgent$Outbound;
76
+ export namespace ListResponseAgentResponse$ {
77
+ /** @deprecated use `ListResponseAgentResponse$inboundSchema` instead. */
78
+ export const inboundSchema = ListResponseAgentResponse$inboundSchema;
79
+ /** @deprecated use `ListResponseAgentResponse$outboundSchema` instead. */
80
+ export const outboundSchema = ListResponseAgentResponse$outboundSchema;
81
+ /** @deprecated use `ListResponseAgentResponse$Outbound` instead. */
82
+ export type Outbound = ListResponseAgentResponse$Outbound;
83
83
  }
84
84
 
85
- export function listResponseAgentToJSON(
86
- listResponseAgent: ListResponseAgent,
85
+ export function listResponseAgentResponseToJSON(
86
+ listResponseAgentResponse: ListResponseAgentResponse,
87
87
  ): string {
88
88
  return JSON.stringify(
89
- ListResponseAgent$outboundSchema.parse(listResponseAgent),
89
+ ListResponseAgentResponse$outboundSchema.parse(listResponseAgentResponse),
90
90
  );
91
91
  }
92
92
 
93
- export function listResponseAgentFromJSON(
93
+ export function listResponseAgentResponseFromJSON(
94
94
  jsonString: string,
95
- ): SafeParseResult<ListResponseAgent, SDKValidationError> {
95
+ ): SafeParseResult<ListResponseAgentResponse, SDKValidationError> {
96
96
  return safeParse(
97
97
  jsonString,
98
- (x) => ListResponseAgent$inboundSchema.parse(JSON.parse(x)),
99
- `Failed to parse 'ListResponseAgent' from JSON`,
98
+ (x) => ListResponseAgentResponse$inboundSchema.parse(JSON.parse(x)),
99
+ `Failed to parse 'ListResponseAgentResponse' from JSON`,
100
100
  );
101
101
  }
package/src/sdk/agents.ts CHANGED
@@ -29,7 +29,7 @@ export class Agents extends ClientSDK {
29
29
  async list(
30
30
  request: operations.AgentListRequest,
31
31
  options?: RequestOptions,
32
- ): Promise<components.ListResponseAgent> {
32
+ ): Promise<components.ListResponseAgentResponse> {
33
33
  return unwrapAsync(agentsList(
34
34
  this,
35
35
  request,
@@ -80,7 +80,7 @@ export class Agents extends ClientSDK {
80
80
  async getById(
81
81
  request: operations.AgentGetByIdRequest,
82
82
  options?: RequestOptions,
83
- ): Promise<components.Agent> {
83
+ ): Promise<components.AgentResponse> {
84
84
  return unwrapAsync(agentsGetById(
85
85
  this,
86
86
  request,
@@ -1,38 +0,0 @@
1
- import * as z from "zod";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
- import { Agent, Agent$Outbound } from "./agent.js";
5
- export type ListResponseAgent = {
6
- items: Array<Agent>;
7
- page: number;
8
- pageSize: number;
9
- totalPages?: number | null | undefined;
10
- totalCount?: number | null | undefined;
11
- };
12
- /** @internal */
13
- export declare const ListResponseAgent$inboundSchema: z.ZodType<ListResponseAgent, z.ZodTypeDef, unknown>;
14
- /** @internal */
15
- export type ListResponseAgent$Outbound = {
16
- items: Array<Agent$Outbound>;
17
- page: number;
18
- page_size: number;
19
- total_pages?: number | null | undefined;
20
- total_count?: number | null | undefined;
21
- };
22
- /** @internal */
23
- export declare const ListResponseAgent$outboundSchema: z.ZodType<ListResponseAgent$Outbound, z.ZodTypeDef, ListResponseAgent>;
24
- /**
25
- * @internal
26
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
27
- */
28
- export declare namespace ListResponseAgent$ {
29
- /** @deprecated use `ListResponseAgent$inboundSchema` instead. */
30
- const inboundSchema: z.ZodType<ListResponseAgent, z.ZodTypeDef, unknown>;
31
- /** @deprecated use `ListResponseAgent$outboundSchema` instead. */
32
- const outboundSchema: z.ZodType<ListResponseAgent$Outbound, z.ZodTypeDef, ListResponseAgent>;
33
- /** @deprecated use `ListResponseAgent$Outbound` instead. */
34
- type Outbound = ListResponseAgent$Outbound;
35
- }
36
- export declare function listResponseAgentToJSON(listResponseAgent: ListResponseAgent): string;
37
- export declare function listResponseAgentFromJSON(jsonString: string): SafeParseResult<ListResponseAgent, SDKValidationError>;
38
- //# sourceMappingURL=listresponseagent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"listresponseagent.d.ts","sourceRoot":"","sources":["../../src/models/components/listresponseagent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,KAAK,EAEL,cAAc,EAEf,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACvC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,+BAA+B,EAAE,CAAC,CAAC,OAAO,CACrD,iBAAiB,EACjB,CAAC,CAAC,UAAU,EACZ,OAAO,CAaP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,0BAA0B,EAC1B,CAAC,CAAC,UAAU,EACZ,iBAAiB,CAajB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,kBAAkB,CAAC;IAClC,iEAAiE;IAC1D,MAAM,aAAa,qDAAkC,CAAC;IAC7D,kEAAkE;IAC3D,MAAM,cAAc,wEAAmC,CAAC;IAC/D,4DAA4D;IAC5D,KAAY,QAAQ,GAAG,0BAA0B,CAAC;CACnD;AAED,wBAAgB,uBAAuB,CACrC,iBAAiB,EAAE,iBAAiB,GACnC,MAAM,CAIR;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAMxD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"listresponseagent.js","sourceRoot":"","sources":["../../src/models/components/listresponseagent.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFH,0DAMC;AAED,8DAQC;AAhGD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAGjD,yCAKoB;AAUpB,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