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

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 (112) hide show
  1. package/docs/sdks/custommessages/README.md +6 -6
  2. package/funcs/customMessagesCreate.d.ts +1 -1
  3. package/funcs/customMessagesCreate.d.ts.map +1 -1
  4. package/funcs/customMessagesCreate.js +2 -2
  5. package/funcs/customMessagesCreate.js.map +1 -1
  6. package/funcs/customMessagesGetById.d.ts +1 -1
  7. package/funcs/customMessagesGetById.d.ts.map +1 -1
  8. package/funcs/customMessagesGetById.js +1 -1
  9. package/funcs/customMessagesGetById.js.map +1 -1
  10. package/funcs/customMessagesList.d.ts +1 -1
  11. package/funcs/customMessagesList.d.ts.map +1 -1
  12. package/funcs/customMessagesList.js +1 -1
  13. package/funcs/customMessagesList.js.map +1 -1
  14. package/funcs/customMessagesUpdate.d.ts +1 -1
  15. package/funcs/customMessagesUpdate.d.ts.map +1 -1
  16. package/funcs/customMessagesUpdate.js +2 -2
  17. package/funcs/customMessagesUpdate.js.map +1 -1
  18. package/lib/config.d.ts +3 -3
  19. package/lib/config.js +3 -3
  20. package/lib/config.js.map +1 -1
  21. package/models/components/agentresponse.d.ts +3 -3
  22. package/models/components/agentresponse.d.ts.map +1 -1
  23. package/models/components/agentresponse.js +3 -3
  24. package/models/components/agentresponse.js.map +1 -1
  25. package/models/components/channel.d.ts +0 -3
  26. package/models/components/channel.d.ts.map +1 -1
  27. package/models/components/channel.js.map +1 -1
  28. package/models/components/custommessage.d.ts +3 -5
  29. package/models/components/custommessage.d.ts.map +1 -1
  30. package/models/components/custommessage.js +0 -2
  31. package/models/components/custommessage.js.map +1 -1
  32. package/models/components/custommessagecreaterequest.d.ts +44 -0
  33. package/models/components/custommessagecreaterequest.d.ts.map +1 -0
  34. package/models/components/{custommessagecreate.js → custommessagecreaterequest.js} +19 -17
  35. package/models/components/custommessagecreaterequest.js.map +1 -0
  36. package/models/components/custommessageproperties.d.ts +6 -0
  37. package/models/components/custommessageproperties.d.ts.map +1 -1
  38. package/models/components/custommessageproperties.js +2 -0
  39. package/models/components/custommessageproperties.js.map +1 -1
  40. package/models/components/custommessageresponse.d.ts +54 -0
  41. package/models/components/custommessageresponse.d.ts.map +1 -0
  42. package/models/components/custommessageresponse.js +78 -0
  43. package/models/components/custommessageresponse.js.map +1 -0
  44. package/models/components/custommessageupdaterequest.d.ts +49 -0
  45. package/models/components/custommessageupdaterequest.d.ts.map +1 -0
  46. package/models/components/custommessageupdaterequest.js +67 -0
  47. package/models/components/custommessageupdaterequest.js.map +1 -0
  48. package/models/components/index.d.ts +5 -3
  49. package/models/components/index.d.ts.map +1 -1
  50. package/models/components/index.js +5 -3
  51. package/models/components/index.js.map +1 -1
  52. package/models/components/listresponsecustommessageresponse.d.ts +38 -0
  53. package/models/components/listresponsecustommessageresponse.d.ts.map +1 -0
  54. package/models/components/{listresponsecustommessage.js → listresponsecustommessageresponse.js} +20 -20
  55. package/models/components/listresponsecustommessageresponse.js.map +1 -0
  56. package/models/components/llmconfig.d.ts +3 -34
  57. package/models/components/llmconfig.d.ts.map +1 -1
  58. package/models/components/llmconfig.js +4 -26
  59. package/models/components/llmconfig.js.map +1 -1
  60. package/models/components/prompt.d.ts +0 -3
  61. package/models/components/prompt.d.ts.map +1 -1
  62. package/models/components/prompt.js.map +1 -1
  63. package/models/components/promptcreate.d.ts +0 -3
  64. package/models/components/promptcreate.d.ts.map +1 -1
  65. package/models/components/promptcreate.js.map +1 -1
  66. package/models/components/promptupdate.d.ts +0 -3
  67. package/models/components/promptupdate.d.ts.map +1 -1
  68. package/models/components/promptupdate.js.map +1 -1
  69. package/models/components/provider.d.ts +34 -0
  70. package/models/components/provider.d.ts.map +1 -0
  71. package/models/components/{greeting.js → provider.js} +19 -28
  72. package/models/components/provider.js.map +1 -0
  73. package/models/components/target.d.ts +0 -3
  74. package/models/components/target.d.ts.map +1 -1
  75. package/models/components/target.js.map +1 -1
  76. package/package.json +1 -1
  77. package/sdk/custommessages.d.ts +4 -4
  78. package/sdk/custommessages.d.ts.map +1 -1
  79. package/sdk/custommessages.js.map +1 -1
  80. package/src/funcs/customMessagesCreate.ts +6 -5
  81. package/src/funcs/customMessagesGetById.ts +3 -3
  82. package/src/funcs/customMessagesList.ts +3 -3
  83. package/src/funcs/customMessagesUpdate.ts +6 -5
  84. package/src/lib/config.ts +3 -3
  85. package/src/models/components/agentresponse.ts +9 -9
  86. package/src/models/components/channel.ts +0 -3
  87. package/src/models/components/custommessage.ts +3 -7
  88. package/src/models/components/custommessagecreaterequest.ts +87 -0
  89. package/src/models/components/custommessageproperties.ts +2 -0
  90. package/src/models/components/custommessageresponse.ts +110 -0
  91. package/src/models/components/custommessageupdaterequest.ts +94 -0
  92. package/src/models/components/index.ts +5 -3
  93. package/src/models/components/listresponsecustommessageresponse.ts +104 -0
  94. package/src/models/components/llmconfig.ts +9 -36
  95. package/src/models/components/prompt.ts +0 -3
  96. package/src/models/components/promptcreate.ts +0 -3
  97. package/src/models/components/promptupdate.ts +0 -3
  98. package/src/models/components/provider.ts +37 -0
  99. package/src/models/components/target.ts +0 -3
  100. package/src/sdk/custommessages.ts +6 -6
  101. package/models/components/custommessagecreate.d.ts +0 -39
  102. package/models/components/custommessagecreate.d.ts.map +0 -1
  103. package/models/components/custommessagecreate.js.map +0 -1
  104. package/models/components/greeting.d.ts +0 -42
  105. package/models/components/greeting.d.ts.map +0 -1
  106. package/models/components/greeting.js.map +0 -1
  107. package/models/components/listresponsecustommessage.d.ts +0 -38
  108. package/models/components/listresponsecustommessage.d.ts.map +0 -1
  109. package/models/components/listresponsecustommessage.js.map +0 -1
  110. package/src/models/components/custommessagecreate.ts +0 -80
  111. package/src/models/components/greeting.ts +0 -79
  112. package/src/models/components/listresponsecustommessage.ts +0 -101
@@ -0,0 +1,87 @@
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 CustomMessageCreateRequest = {
11
+ /**
12
+ * The name of the custom message
13
+ */
14
+ name: string;
15
+ /**
16
+ * The text of the custom message
17
+ */
18
+ text: string;
19
+ /**
20
+ * The label of the custom message
21
+ */
22
+ label?: string | null | undefined;
23
+ type?: string | undefined;
24
+ };
25
+
26
+ /** @internal */
27
+ export const CustomMessageCreateRequest$inboundSchema: z.ZodType<
28
+ CustomMessageCreateRequest,
29
+ z.ZodTypeDef,
30
+ unknown
31
+ > = z.object({
32
+ name: z.string(),
33
+ text: z.string(),
34
+ label: z.nullable(z.string()).optional(),
35
+ type: z.string().default("greeting"),
36
+ });
37
+
38
+ /** @internal */
39
+ export type CustomMessageCreateRequest$Outbound = {
40
+ name: string;
41
+ text: string;
42
+ label?: string | null | undefined;
43
+ type: string;
44
+ };
45
+
46
+ /** @internal */
47
+ export const CustomMessageCreateRequest$outboundSchema: z.ZodType<
48
+ CustomMessageCreateRequest$Outbound,
49
+ z.ZodTypeDef,
50
+ CustomMessageCreateRequest
51
+ > = z.object({
52
+ name: z.string(),
53
+ text: z.string(),
54
+ label: z.nullable(z.string()).optional(),
55
+ type: z.string().default("greeting"),
56
+ });
57
+
58
+ /**
59
+ * @internal
60
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
61
+ */
62
+ export namespace CustomMessageCreateRequest$ {
63
+ /** @deprecated use `CustomMessageCreateRequest$inboundSchema` instead. */
64
+ export const inboundSchema = CustomMessageCreateRequest$inboundSchema;
65
+ /** @deprecated use `CustomMessageCreateRequest$outboundSchema` instead. */
66
+ export const outboundSchema = CustomMessageCreateRequest$outboundSchema;
67
+ /** @deprecated use `CustomMessageCreateRequest$Outbound` instead. */
68
+ export type Outbound = CustomMessageCreateRequest$Outbound;
69
+ }
70
+
71
+ export function customMessageCreateRequestToJSON(
72
+ customMessageCreateRequest: CustomMessageCreateRequest,
73
+ ): string {
74
+ return JSON.stringify(
75
+ CustomMessageCreateRequest$outboundSchema.parse(customMessageCreateRequest),
76
+ );
77
+ }
78
+
79
+ export function customMessageCreateRequestFromJSON(
80
+ jsonString: string,
81
+ ): SafeParseResult<CustomMessageCreateRequest, SDKValidationError> {
82
+ return safeParse(
83
+ jsonString,
84
+ (x) => CustomMessageCreateRequest$inboundSchema.parse(JSON.parse(x)),
85
+ `Failed to parse 'CustomMessageCreateRequest' from JSON`,
86
+ );
87
+ }
@@ -9,6 +9,8 @@ export const CustomMessageProperties = {
9
9
  Id: "id",
10
10
  Name: "name",
11
11
  Text: "text",
12
+ Label: "label",
13
+ UpdatedAt: "updated_at",
12
14
  } as const;
13
15
  export type CustomMessageProperties = ClosedEnum<
14
16
  typeof CustomMessageProperties
@@ -0,0 +1,110 @@
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 CustomMessageResponse = {
12
+ /**
13
+ * The name of the custom message
14
+ */
15
+ name: string;
16
+ /**
17
+ * The text of the custom message
18
+ */
19
+ text: string;
20
+ /**
21
+ * The label of the custom message
22
+ */
23
+ label?: string | null | undefined;
24
+ /**
25
+ * The ID of the custom message
26
+ */
27
+ id: number;
28
+ /**
29
+ * Timestamp of the most recent update to the custom message
30
+ */
31
+ updatedAt: Date;
32
+ type?: string | undefined;
33
+ };
34
+
35
+ /** @internal */
36
+ export const CustomMessageResponse$inboundSchema: z.ZodType<
37
+ CustomMessageResponse,
38
+ z.ZodTypeDef,
39
+ unknown
40
+ > = z.object({
41
+ name: z.string(),
42
+ text: z.string(),
43
+ label: z.nullable(z.string()).optional(),
44
+ id: z.number().int(),
45
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
46
+ type: z.string().default("greeting"),
47
+ }).transform((v) => {
48
+ return remap$(v, {
49
+ "updated_at": "updatedAt",
50
+ });
51
+ });
52
+
53
+ /** @internal */
54
+ export type CustomMessageResponse$Outbound = {
55
+ name: string;
56
+ text: string;
57
+ label?: string | null | undefined;
58
+ id: number;
59
+ updated_at: string;
60
+ type: string;
61
+ };
62
+
63
+ /** @internal */
64
+ export const CustomMessageResponse$outboundSchema: z.ZodType<
65
+ CustomMessageResponse$Outbound,
66
+ z.ZodTypeDef,
67
+ CustomMessageResponse
68
+ > = z.object({
69
+ name: z.string(),
70
+ text: z.string(),
71
+ label: z.nullable(z.string()).optional(),
72
+ id: z.number().int(),
73
+ updatedAt: z.date().transform(v => v.toISOString()),
74
+ type: z.string().default("greeting"),
75
+ }).transform((v) => {
76
+ return remap$(v, {
77
+ updatedAt: "updated_at",
78
+ });
79
+ });
80
+
81
+ /**
82
+ * @internal
83
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
84
+ */
85
+ export namespace CustomMessageResponse$ {
86
+ /** @deprecated use `CustomMessageResponse$inboundSchema` instead. */
87
+ export const inboundSchema = CustomMessageResponse$inboundSchema;
88
+ /** @deprecated use `CustomMessageResponse$outboundSchema` instead. */
89
+ export const outboundSchema = CustomMessageResponse$outboundSchema;
90
+ /** @deprecated use `CustomMessageResponse$Outbound` instead. */
91
+ export type Outbound = CustomMessageResponse$Outbound;
92
+ }
93
+
94
+ export function customMessageResponseToJSON(
95
+ customMessageResponse: CustomMessageResponse,
96
+ ): string {
97
+ return JSON.stringify(
98
+ CustomMessageResponse$outboundSchema.parse(customMessageResponse),
99
+ );
100
+ }
101
+
102
+ export function customMessageResponseFromJSON(
103
+ jsonString: string,
104
+ ): SafeParseResult<CustomMessageResponse, SDKValidationError> {
105
+ return safeParse(
106
+ jsonString,
107
+ (x) => CustomMessageResponse$inboundSchema.parse(JSON.parse(x)),
108
+ `Failed to parse 'CustomMessageResponse' from JSON`,
109
+ );
110
+ }
@@ -0,0 +1,94 @@
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 CustomMessageUpdateRequest = {
11
+ /**
12
+ * The name of the custom message
13
+ */
14
+ name: string;
15
+ /**
16
+ * The text of the custom message
17
+ */
18
+ text: string;
19
+ /**
20
+ * The label of the custom message
21
+ */
22
+ label?: string | null | undefined;
23
+ /**
24
+ * The ID of the custom message
25
+ */
26
+ id: number;
27
+ type?: string | undefined;
28
+ };
29
+
30
+ /** @internal */
31
+ export const CustomMessageUpdateRequest$inboundSchema: z.ZodType<
32
+ CustomMessageUpdateRequest,
33
+ z.ZodTypeDef,
34
+ unknown
35
+ > = z.object({
36
+ name: z.string(),
37
+ text: z.string(),
38
+ label: z.nullable(z.string()).optional(),
39
+ id: z.number().int(),
40
+ type: z.string().default("greeting"),
41
+ });
42
+
43
+ /** @internal */
44
+ export type CustomMessageUpdateRequest$Outbound = {
45
+ name: string;
46
+ text: string;
47
+ label?: string | null | undefined;
48
+ id: number;
49
+ type: string;
50
+ };
51
+
52
+ /** @internal */
53
+ export const CustomMessageUpdateRequest$outboundSchema: z.ZodType<
54
+ CustomMessageUpdateRequest$Outbound,
55
+ z.ZodTypeDef,
56
+ CustomMessageUpdateRequest
57
+ > = z.object({
58
+ name: z.string(),
59
+ text: z.string(),
60
+ label: z.nullable(z.string()).optional(),
61
+ id: z.number().int(),
62
+ type: z.string().default("greeting"),
63
+ });
64
+
65
+ /**
66
+ * @internal
67
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
68
+ */
69
+ export namespace CustomMessageUpdateRequest$ {
70
+ /** @deprecated use `CustomMessageUpdateRequest$inboundSchema` instead. */
71
+ export const inboundSchema = CustomMessageUpdateRequest$inboundSchema;
72
+ /** @deprecated use `CustomMessageUpdateRequest$outboundSchema` instead. */
73
+ export const outboundSchema = CustomMessageUpdateRequest$outboundSchema;
74
+ /** @deprecated use `CustomMessageUpdateRequest$Outbound` instead. */
75
+ export type Outbound = CustomMessageUpdateRequest$Outbound;
76
+ }
77
+
78
+ export function customMessageUpdateRequestToJSON(
79
+ customMessageUpdateRequest: CustomMessageUpdateRequest,
80
+ ): string {
81
+ return JSON.stringify(
82
+ CustomMessageUpdateRequest$outboundSchema.parse(customMessageUpdateRequest),
83
+ );
84
+ }
85
+
86
+ export function customMessageUpdateRequestFromJSON(
87
+ jsonString: string,
88
+ ): SafeParseResult<CustomMessageUpdateRequest, SDKValidationError> {
89
+ return safeParse(
90
+ jsonString,
91
+ (x) => CustomMessageUpdateRequest$inboundSchema.parse(JSON.parse(x)),
92
+ `Failed to parse 'CustomMessageUpdateRequest' from JSON`,
93
+ );
94
+ }
@@ -23,21 +23,22 @@ export * from "./channeltargetproperties.js";
23
23
  export * from "./conversation.js";
24
24
  export * from "./conversationproperties.js";
25
25
  export * from "./custommessage.js";
26
- export * from "./custommessagecreate.js";
26
+ export * from "./custommessagecreaterequest.js";
27
27
  export * from "./custommessageproperties.js";
28
+ export * from "./custommessageresponse.js";
29
+ export * from "./custommessageupdaterequest.js";
28
30
  export * from "./directoryextension.js";
29
31
  export * from "./directorymember.js";
30
32
  export * from "./directorymembercreate.js";
31
33
  export * from "./directorymemberproperties.js";
32
34
  export * from "./event.js";
33
35
  export * from "./eventproperties.js";
34
- export * from "./greeting.js";
35
36
  export * from "./listresponseagentresponse.js";
36
37
  export * from "./listresponseavailabletarget.js";
37
38
  export * from "./listresponsechannel.js";
38
39
  export * from "./listresponsechanneltarget.js";
39
40
  export * from "./listresponseconversation.js";
40
- export * from "./listresponsecustommessage.js";
41
+ export * from "./listresponsecustommessageresponse.js";
41
42
  export * from "./listresponsedirectorymember.js";
42
43
  export * from "./listresponseevent.js";
43
44
  export * from "./listresponseprompt.js";
@@ -52,6 +53,7 @@ export * from "./promptcreate.js";
52
53
  export * from "./prompthistory.js";
53
54
  export * from "./promptproperties.js";
54
55
  export * from "./promptupdate.js";
56
+ export * from "./provider.js";
55
57
  export * from "./security.js";
56
58
  export * from "./service.js";
57
59
  export * from "./servicecreate.js";
@@ -0,0 +1,104 @@
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
+ CustomMessageResponse,
12
+ CustomMessageResponse$inboundSchema,
13
+ CustomMessageResponse$Outbound,
14
+ CustomMessageResponse$outboundSchema,
15
+ } from "./custommessageresponse.js";
16
+
17
+ export type ListResponseCustomMessageResponse = {
18
+ items: Array<CustomMessageResponse>;
19
+ page: number;
20
+ pageSize: number;
21
+ totalPages?: number | null | undefined;
22
+ totalCount?: number | null | undefined;
23
+ };
24
+
25
+ /** @internal */
26
+ export const ListResponseCustomMessageResponse$inboundSchema: z.ZodType<
27
+ ListResponseCustomMessageResponse,
28
+ z.ZodTypeDef,
29
+ unknown
30
+ > = z.object({
31
+ items: z.array(CustomMessageResponse$inboundSchema),
32
+ page: z.number().int(),
33
+ page_size: z.number().int(),
34
+ total_pages: z.nullable(z.number().int()).optional(),
35
+ total_count: z.nullable(z.number().int()).optional(),
36
+ }).transform((v) => {
37
+ return remap$(v, {
38
+ "page_size": "pageSize",
39
+ "total_pages": "totalPages",
40
+ "total_count": "totalCount",
41
+ });
42
+ });
43
+
44
+ /** @internal */
45
+ export type ListResponseCustomMessageResponse$Outbound = {
46
+ items: Array<CustomMessageResponse$Outbound>;
47
+ page: number;
48
+ page_size: number;
49
+ total_pages?: number | null | undefined;
50
+ total_count?: number | null | undefined;
51
+ };
52
+
53
+ /** @internal */
54
+ export const ListResponseCustomMessageResponse$outboundSchema: z.ZodType<
55
+ ListResponseCustomMessageResponse$Outbound,
56
+ z.ZodTypeDef,
57
+ ListResponseCustomMessageResponse
58
+ > = z.object({
59
+ items: z.array(CustomMessageResponse$outboundSchema),
60
+ page: z.number().int(),
61
+ pageSize: z.number().int(),
62
+ totalPages: z.nullable(z.number().int()).optional(),
63
+ totalCount: z.nullable(z.number().int()).optional(),
64
+ }).transform((v) => {
65
+ return remap$(v, {
66
+ pageSize: "page_size",
67
+ totalPages: "total_pages",
68
+ totalCount: "total_count",
69
+ });
70
+ });
71
+
72
+ /**
73
+ * @internal
74
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
75
+ */
76
+ export namespace ListResponseCustomMessageResponse$ {
77
+ /** @deprecated use `ListResponseCustomMessageResponse$inboundSchema` instead. */
78
+ export const inboundSchema = ListResponseCustomMessageResponse$inboundSchema;
79
+ /** @deprecated use `ListResponseCustomMessageResponse$outboundSchema` instead. */
80
+ export const outboundSchema =
81
+ ListResponseCustomMessageResponse$outboundSchema;
82
+ /** @deprecated use `ListResponseCustomMessageResponse$Outbound` instead. */
83
+ export type Outbound = ListResponseCustomMessageResponse$Outbound;
84
+ }
85
+
86
+ export function listResponseCustomMessageResponseToJSON(
87
+ listResponseCustomMessageResponse: ListResponseCustomMessageResponse,
88
+ ): string {
89
+ return JSON.stringify(
90
+ ListResponseCustomMessageResponse$outboundSchema.parse(
91
+ listResponseCustomMessageResponse,
92
+ ),
93
+ );
94
+ }
95
+
96
+ export function listResponseCustomMessageResponseFromJSON(
97
+ jsonString: string,
98
+ ): SafeParseResult<ListResponseCustomMessageResponse, SDKValidationError> {
99
+ return safeParse(
100
+ jsonString,
101
+ (x) => ListResponseCustomMessageResponse$inboundSchema.parse(JSON.parse(x)),
102
+ `Failed to parse 'ListResponseCustomMessageResponse' from JSON`,
103
+ );
104
+ }
@@ -5,25 +5,17 @@
5
5
  import * as z from "zod";
6
6
  import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
- import { ClosedEnum } from "../../types/enums.js";
9
8
  import { Result as SafeParseResult } from "../../types/fp.js";
10
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
-
12
- /**
13
- * Provider of the LLM model.
14
- */
15
- export const Provider = {
16
- AzureOpenai: "azure_openai",
17
- Openai: "openai",
18
- } as const;
19
- /**
20
- * Provider of the LLM model.
21
- */
22
- export type Provider = ClosedEnum<typeof Provider>;
10
+ import {
11
+ Provider,
12
+ Provider$inboundSchema,
13
+ Provider$outboundSchema,
14
+ } from "./provider.js";
23
15
 
24
16
  export type LlmConfig = {
25
17
  /**
26
- * Provider of the LLM model.
18
+ * LLM API provider.
27
19
  */
28
20
  provider?: Provider | undefined;
29
21
  /**
@@ -40,32 +32,13 @@ export type LlmConfig = {
40
32
  apiVersion?: string | null | undefined;
41
33
  };
42
34
 
43
- /** @internal */
44
- export const Provider$inboundSchema: z.ZodNativeEnum<typeof Provider> = z
45
- .nativeEnum(Provider);
46
-
47
- /** @internal */
48
- export const Provider$outboundSchema: z.ZodNativeEnum<typeof Provider> =
49
- Provider$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 Provider$ {
56
- /** @deprecated use `Provider$inboundSchema` instead. */
57
- export const inboundSchema = Provider$inboundSchema;
58
- /** @deprecated use `Provider$outboundSchema` instead. */
59
- export const outboundSchema = Provider$outboundSchema;
60
- }
61
-
62
35
  /** @internal */
63
36
  export const LlmConfig$inboundSchema: z.ZodType<
64
37
  LlmConfig,
65
38
  z.ZodTypeDef,
66
39
  unknown
67
40
  > = z.object({
68
- provider: Provider$inboundSchema.default("azure_openai"),
41
+ provider: Provider$inboundSchema.optional(),
69
42
  model: z.string().default("gpt-4o"),
70
43
  version: z.nullable(z.string()).optional(),
71
44
  api_version: z.nullable(z.string()).optional(),
@@ -77,7 +50,7 @@ export const LlmConfig$inboundSchema: z.ZodType<
77
50
 
78
51
  /** @internal */
79
52
  export type LlmConfig$Outbound = {
80
- provider: string;
53
+ provider?: string | undefined;
81
54
  model: string;
82
55
  version?: string | null | undefined;
83
56
  api_version?: string | null | undefined;
@@ -89,7 +62,7 @@ export const LlmConfig$outboundSchema: z.ZodType<
89
62
  z.ZodTypeDef,
90
63
  LlmConfig
91
64
  > = z.object({
92
- provider: Provider$outboundSchema.default("azure_openai"),
65
+ provider: Provider$outboundSchema.optional(),
93
66
  model: z.string().default("gpt-4o"),
94
67
  version: z.nullable(z.string()).optional(),
95
68
  apiVersion: z.nullable(z.string()).optional(),
@@ -35,9 +35,6 @@ export type Prompt = {
35
35
  * The tools for the prompt
36
36
  */
37
37
  tools?: Array<string> | undefined;
38
- /**
39
- * The configuration for the language model used by the Cortex API.
40
- */
41
38
  llmConfig: LlmConfig;
42
39
  /**
43
40
  * The Prompt ID
@@ -35,9 +35,6 @@ export type PromptCreate = {
35
35
  * The tools for the prompt
36
36
  */
37
37
  tools?: Array<string> | undefined;
38
- /**
39
- * The configuration for the language model used by the Cortex API.
40
- */
41
38
  llmConfig: LlmConfig;
42
39
  };
43
40
 
@@ -35,9 +35,6 @@ export type PromptUpdate = {
35
35
  * The tools for the prompt
36
36
  */
37
37
  tools?: Array<string> | undefined;
38
- /**
39
- * The configuration for the language model used by the Cortex API.
40
- */
41
38
  llmConfig: LlmConfig;
42
39
  /**
43
40
  * The Prompt ID
@@ -0,0 +1,37 @@
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
+ /**
9
+ * LLM API provider.
10
+ */
11
+ export const Provider = {
12
+ AzureOpenai: "azure_openai",
13
+ Openai: "openai",
14
+ } as const;
15
+ /**
16
+ * LLM API provider.
17
+ */
18
+ export type Provider = ClosedEnum<typeof Provider>;
19
+
20
+ /** @internal */
21
+ export const Provider$inboundSchema: z.ZodNativeEnum<typeof Provider> = z
22
+ .nativeEnum(Provider);
23
+
24
+ /** @internal */
25
+ export const Provider$outboundSchema: z.ZodNativeEnum<typeof Provider> =
26
+ Provider$inboundSchema;
27
+
28
+ /**
29
+ * @internal
30
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
31
+ */
32
+ export namespace Provider$ {
33
+ /** @deprecated use `Provider$inboundSchema` instead. */
34
+ export const inboundSchema = Provider$inboundSchema;
35
+ /** @deprecated use `Provider$outboundSchema` instead. */
36
+ export const outboundSchema = Provider$outboundSchema;
37
+ }
@@ -22,9 +22,6 @@ export type Target = {
22
22
  * The Target
23
23
  */
24
24
  target: string;
25
- /**
26
- * The target mode
27
- */
28
25
  targetMode: TargetModes;
29
26
  /**
30
27
  * The Channel ID
@@ -22,7 +22,7 @@ export class CustomMessages extends ClientSDK {
22
22
  async list(
23
23
  request: operations.CustomMessagesListRequest,
24
24
  options?: RequestOptions,
25
- ): Promise<components.ListResponseCustomMessage> {
25
+ ): Promise<components.ListResponseCustomMessageResponse> {
26
26
  return unwrapAsync(customMessagesList(
27
27
  this,
28
28
  request,
@@ -37,9 +37,9 @@ export class CustomMessages extends ClientSDK {
37
37
  * Create a new greeting
38
38
  */
39
39
  async create(
40
- request: components.CustomMessageCreate,
40
+ request: components.CustomMessageCreateRequest,
41
41
  options?: RequestOptions,
42
- ): Promise<components.CustomMessage> {
42
+ ): Promise<components.CustomMessageResponse> {
43
43
  return unwrapAsync(customMessagesCreate(
44
44
  this,
45
45
  request,
@@ -54,9 +54,9 @@ export class CustomMessages extends ClientSDK {
54
54
  * Update a greeting
55
55
  */
56
56
  async update(
57
- request: components.CustomMessage,
57
+ request: components.CustomMessageUpdateRequest,
58
58
  options?: RequestOptions,
59
- ): Promise<components.CustomMessage> {
59
+ ): Promise<components.CustomMessageResponse> {
60
60
  return unwrapAsync(customMessagesUpdate(
61
61
  this,
62
62
  request,
@@ -73,7 +73,7 @@ export class CustomMessages extends ClientSDK {
73
73
  async getById(
74
74
  request: operations.CustomMessageGetByIdRequest,
75
75
  options?: RequestOptions,
76
- ): Promise<components.CustomMessage> {
76
+ ): Promise<components.CustomMessageResponse> {
77
77
  return unwrapAsync(customMessagesGetById(
78
78
  this,
79
79
  request,
@@ -1,39 +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
- export type CustomMessageCreate = {
5
- /**
6
- * The name of the greeting
7
- */
8
- name: string;
9
- /**
10
- * The text of the greeting
11
- */
12
- text: string;
13
- type?: string | undefined;
14
- };
15
- /** @internal */
16
- export declare const CustomMessageCreate$inboundSchema: z.ZodType<CustomMessageCreate, z.ZodTypeDef, unknown>;
17
- /** @internal */
18
- export type CustomMessageCreate$Outbound = {
19
- name: string;
20
- text: string;
21
- type: string;
22
- };
23
- /** @internal */
24
- export declare const CustomMessageCreate$outboundSchema: z.ZodType<CustomMessageCreate$Outbound, z.ZodTypeDef, CustomMessageCreate>;
25
- /**
26
- * @internal
27
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
28
- */
29
- export declare namespace CustomMessageCreate$ {
30
- /** @deprecated use `CustomMessageCreate$inboundSchema` instead. */
31
- const inboundSchema: z.ZodType<CustomMessageCreate, z.ZodTypeDef, unknown>;
32
- /** @deprecated use `CustomMessageCreate$outboundSchema` instead. */
33
- const outboundSchema: z.ZodType<CustomMessageCreate$Outbound, z.ZodTypeDef, CustomMessageCreate>;
34
- /** @deprecated use `CustomMessageCreate$Outbound` instead. */
35
- type Outbound = CustomMessageCreate$Outbound;
36
- }
37
- export declare function customMessageCreateToJSON(customMessageCreate: CustomMessageCreate): string;
38
- export declare function customMessageCreateFromJSON(jsonString: string): SafeParseResult<CustomMessageCreate, SDKValidationError>;
39
- //# sourceMappingURL=custommessagecreate.d.ts.map