@mistralai/mistralai 1.11.0 → 1.12.0

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 (80) hide show
  1. package/_speakeasy/.github/action-inputs-config.json +53 -0
  2. package/_speakeasy/.github/action-security-config.json +88 -0
  3. package/funcs/batchJobsGet.d.ts +3 -0
  4. package/funcs/batchJobsGet.d.ts.map +1 -1
  5. package/funcs/batchJobsGet.js +7 -0
  6. package/funcs/batchJobsGet.js.map +1 -1
  7. package/funcs/betaAgentsList.d.ts.map +1 -1
  8. package/funcs/betaAgentsList.js +4 -3
  9. package/funcs/betaAgentsList.js.map +1 -1
  10. package/funcs/betaConversationsList.d.ts.map +1 -1
  11. package/funcs/betaConversationsList.js +4 -3
  12. package/funcs/betaConversationsList.js.map +1 -1
  13. package/jsr.json +1 -1
  14. package/lib/config.d.ts +2 -2
  15. package/lib/config.js +2 -2
  16. package/models/components/audioencoding.d.ts +26 -0
  17. package/models/components/audioencoding.d.ts.map +1 -0
  18. package/models/components/audioencoding.js +72 -0
  19. package/models/components/audioencoding.js.map +1 -0
  20. package/models/components/audioformat.d.ts +32 -0
  21. package/models/components/audioformat.d.ts.map +1 -0
  22. package/models/components/audioformat.js +81 -0
  23. package/models/components/audioformat.js.map +1 -0
  24. package/models/components/batchjobin.d.ts +5 -2
  25. package/models/components/batchjobin.d.ts.map +1 -1
  26. package/models/components/batchjobin.js +5 -2
  27. package/models/components/batchjobin.js.map +1 -1
  28. package/models/components/batchjobout.d.ts +6 -0
  29. package/models/components/batchjobout.d.ts.map +1 -1
  30. package/models/components/batchjobout.js +2 -0
  31. package/models/components/batchjobout.js.map +1 -1
  32. package/models/components/batchrequest.d.ts +35 -0
  33. package/models/components/batchrequest.d.ts.map +1 -0
  34. package/models/components/batchrequest.js +80 -0
  35. package/models/components/batchrequest.js.map +1 -0
  36. package/models/components/classificationrequest.d.ts +6 -0
  37. package/models/components/classificationrequest.d.ts.map +1 -1
  38. package/models/components/classificationrequest.js +2 -0
  39. package/models/components/classificationrequest.js.map +1 -1
  40. package/models/components/embeddingrequest.d.ts +6 -0
  41. package/models/components/embeddingrequest.d.ts.map +1 -1
  42. package/models/components/embeddingrequest.js +2 -0
  43. package/models/components/embeddingrequest.js.map +1 -1
  44. package/models/components/index.d.ts +3 -0
  45. package/models/components/index.d.ts.map +1 -1
  46. package/models/components/index.js +3 -0
  47. package/models/components/index.js.map +1 -1
  48. package/models/components/toolfilechunk.d.ts +23 -2
  49. package/models/components/toolfilechunk.d.ts.map +1 -1
  50. package/models/components/toolfilechunk.js +26 -3
  51. package/models/components/toolfilechunk.js.map +1 -1
  52. package/models/components/toolreferencechunk.d.ts +23 -2
  53. package/models/components/toolreferencechunk.d.ts.map +1 -1
  54. package/models/components/toolreferencechunk.js +26 -3
  55. package/models/components/toolreferencechunk.js.map +1 -1
  56. package/models/operations/jobsapiroutesbatchgetbatchjob.d.ts +2 -0
  57. package/models/operations/jobsapiroutesbatchgetbatchjob.d.ts.map +1 -1
  58. package/models/operations/jobsapiroutesbatchgetbatchjob.js +2 -0
  59. package/models/operations/jobsapiroutesbatchgetbatchjob.js.map +1 -1
  60. package/package.json +1 -1
  61. package/sdk/mistraljobs.d.ts +3 -0
  62. package/sdk/mistraljobs.d.ts.map +1 -1
  63. package/sdk/mistraljobs.js +3 -0
  64. package/sdk/mistraljobs.js.map +1 -1
  65. package/src/funcs/batchJobsGet.ts +9 -1
  66. package/src/funcs/betaAgentsList.ts +18 -10
  67. package/src/funcs/betaConversationsList.ts +14 -6
  68. package/src/lib/config.ts +2 -2
  69. package/src/models/components/audioencoding.ts +52 -0
  70. package/src/models/components/audioformat.ts +80 -0
  71. package/src/models/components/batchjobin.ts +14 -4
  72. package/src/models/components/batchjobout.ts +4 -0
  73. package/src/models/components/batchrequest.ts +75 -0
  74. package/src/models/components/classificationrequest.ts +4 -0
  75. package/src/models/components/embeddingrequest.ts +4 -0
  76. package/src/models/components/index.ts +3 -0
  77. package/src/models/components/toolfilechunk.ts +54 -4
  78. package/src/models/components/toolreferencechunk.ts +54 -4
  79. package/src/models/operations/jobsapiroutesbatchgetbatchjob.ts +4 -0
  80. package/src/sdk/mistraljobs.ts +3 -0
@@ -15,6 +15,8 @@ export * from "./apiendpoint.js";
15
15
  export * from "./archiveftmodelout.js";
16
16
  export * from "./assistantmessage.js";
17
17
  export * from "./audiochunk.js";
18
+ export * from "./audioencoding.js";
19
+ export * from "./audioformat.js";
18
20
  export * from "./audiotranscriptionrequest.js";
19
21
  export * from "./audiotranscriptionrequeststream.js";
20
22
  export * from "./basemodelcard.js";
@@ -23,6 +25,7 @@ export * from "./batchjobin.js";
23
25
  export * from "./batchjobout.js";
24
26
  export * from "./batchjobsout.js";
25
27
  export * from "./batchjobstatus.js";
28
+ export * from "./batchrequest.js";
26
29
  export * from "./builtinconnectors.js";
27
30
  export * from "./chatclassificationrequest.js";
28
31
  export * from "./chatcompletionchoice.js";
@@ -19,9 +19,11 @@ export const ToolFileChunkType = {
19
19
  } as const;
20
20
  export type ToolFileChunkType = ClosedEnum<typeof ToolFileChunkType>;
21
21
 
22
+ export type ToolFileChunkTool = BuiltInConnectors | string;
23
+
22
24
  export type ToolFileChunk = {
23
25
  type?: ToolFileChunkType | undefined;
24
- tool: BuiltInConnectors;
26
+ tool: BuiltInConnectors | string;
25
27
  fileId: string;
26
28
  fileName?: string | null | undefined;
27
29
  fileType?: string | null | undefined;
@@ -48,6 +50,54 @@ export namespace ToolFileChunkType$ {
48
50
  export const outboundSchema = ToolFileChunkType$outboundSchema;
49
51
  }
50
52
 
53
+ /** @internal */
54
+ export const ToolFileChunkTool$inboundSchema: z.ZodType<
55
+ ToolFileChunkTool,
56
+ z.ZodTypeDef,
57
+ unknown
58
+ > = z.union([BuiltInConnectors$inboundSchema, z.string()]);
59
+
60
+ /** @internal */
61
+ export type ToolFileChunkTool$Outbound = string | string;
62
+
63
+ /** @internal */
64
+ export const ToolFileChunkTool$outboundSchema: z.ZodType<
65
+ ToolFileChunkTool$Outbound,
66
+ z.ZodTypeDef,
67
+ ToolFileChunkTool
68
+ > = z.union([BuiltInConnectors$outboundSchema, z.string()]);
69
+
70
+ /**
71
+ * @internal
72
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
73
+ */
74
+ export namespace ToolFileChunkTool$ {
75
+ /** @deprecated use `ToolFileChunkTool$inboundSchema` instead. */
76
+ export const inboundSchema = ToolFileChunkTool$inboundSchema;
77
+ /** @deprecated use `ToolFileChunkTool$outboundSchema` instead. */
78
+ export const outboundSchema = ToolFileChunkTool$outboundSchema;
79
+ /** @deprecated use `ToolFileChunkTool$Outbound` instead. */
80
+ export type Outbound = ToolFileChunkTool$Outbound;
81
+ }
82
+
83
+ export function toolFileChunkToolToJSON(
84
+ toolFileChunkTool: ToolFileChunkTool,
85
+ ): string {
86
+ return JSON.stringify(
87
+ ToolFileChunkTool$outboundSchema.parse(toolFileChunkTool),
88
+ );
89
+ }
90
+
91
+ export function toolFileChunkToolFromJSON(
92
+ jsonString: string,
93
+ ): SafeParseResult<ToolFileChunkTool, SDKValidationError> {
94
+ return safeParse(
95
+ jsonString,
96
+ (x) => ToolFileChunkTool$inboundSchema.parse(JSON.parse(x)),
97
+ `Failed to parse 'ToolFileChunkTool' from JSON`,
98
+ );
99
+ }
100
+
51
101
  /** @internal */
52
102
  export const ToolFileChunk$inboundSchema: z.ZodType<
53
103
  ToolFileChunk,
@@ -55,7 +105,7 @@ export const ToolFileChunk$inboundSchema: z.ZodType<
55
105
  unknown
56
106
  > = z.object({
57
107
  type: ToolFileChunkType$inboundSchema.default("tool_file"),
58
- tool: BuiltInConnectors$inboundSchema,
108
+ tool: z.union([BuiltInConnectors$inboundSchema, z.string()]),
59
109
  file_id: z.string(),
60
110
  file_name: z.nullable(z.string()).optional(),
61
111
  file_type: z.nullable(z.string()).optional(),
@@ -70,7 +120,7 @@ export const ToolFileChunk$inboundSchema: z.ZodType<
70
120
  /** @internal */
71
121
  export type ToolFileChunk$Outbound = {
72
122
  type: string;
73
- tool: string;
123
+ tool: string | string;
74
124
  file_id: string;
75
125
  file_name?: string | null | undefined;
76
126
  file_type?: string | null | undefined;
@@ -83,7 +133,7 @@ export const ToolFileChunk$outboundSchema: z.ZodType<
83
133
  ToolFileChunk
84
134
  > = z.object({
85
135
  type: ToolFileChunkType$outboundSchema.default("tool_file"),
86
- tool: BuiltInConnectors$outboundSchema,
136
+ tool: z.union([BuiltInConnectors$outboundSchema, z.string()]),
87
137
  fileId: z.string(),
88
138
  fileName: z.nullable(z.string()).optional(),
89
139
  fileType: z.nullable(z.string()).optional(),
@@ -18,9 +18,11 @@ export const ToolReferenceChunkType = {
18
18
  } as const;
19
19
  export type ToolReferenceChunkType = ClosedEnum<typeof ToolReferenceChunkType>;
20
20
 
21
+ export type ToolReferenceChunkTool = BuiltInConnectors | string;
22
+
21
23
  export type ToolReferenceChunk = {
22
24
  type?: ToolReferenceChunkType | undefined;
23
- tool: BuiltInConnectors;
25
+ tool: BuiltInConnectors | string;
24
26
  title: string;
25
27
  url?: string | null | undefined;
26
28
  favicon?: string | null | undefined;
@@ -48,6 +50,54 @@ export namespace ToolReferenceChunkType$ {
48
50
  export const outboundSchema = ToolReferenceChunkType$outboundSchema;
49
51
  }
50
52
 
53
+ /** @internal */
54
+ export const ToolReferenceChunkTool$inboundSchema: z.ZodType<
55
+ ToolReferenceChunkTool,
56
+ z.ZodTypeDef,
57
+ unknown
58
+ > = z.union([BuiltInConnectors$inboundSchema, z.string()]);
59
+
60
+ /** @internal */
61
+ export type ToolReferenceChunkTool$Outbound = string | string;
62
+
63
+ /** @internal */
64
+ export const ToolReferenceChunkTool$outboundSchema: z.ZodType<
65
+ ToolReferenceChunkTool$Outbound,
66
+ z.ZodTypeDef,
67
+ ToolReferenceChunkTool
68
+ > = z.union([BuiltInConnectors$outboundSchema, z.string()]);
69
+
70
+ /**
71
+ * @internal
72
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
73
+ */
74
+ export namespace ToolReferenceChunkTool$ {
75
+ /** @deprecated use `ToolReferenceChunkTool$inboundSchema` instead. */
76
+ export const inboundSchema = ToolReferenceChunkTool$inboundSchema;
77
+ /** @deprecated use `ToolReferenceChunkTool$outboundSchema` instead. */
78
+ export const outboundSchema = ToolReferenceChunkTool$outboundSchema;
79
+ /** @deprecated use `ToolReferenceChunkTool$Outbound` instead. */
80
+ export type Outbound = ToolReferenceChunkTool$Outbound;
81
+ }
82
+
83
+ export function toolReferenceChunkToolToJSON(
84
+ toolReferenceChunkTool: ToolReferenceChunkTool,
85
+ ): string {
86
+ return JSON.stringify(
87
+ ToolReferenceChunkTool$outboundSchema.parse(toolReferenceChunkTool),
88
+ );
89
+ }
90
+
91
+ export function toolReferenceChunkToolFromJSON(
92
+ jsonString: string,
93
+ ): SafeParseResult<ToolReferenceChunkTool, SDKValidationError> {
94
+ return safeParse(
95
+ jsonString,
96
+ (x) => ToolReferenceChunkTool$inboundSchema.parse(JSON.parse(x)),
97
+ `Failed to parse 'ToolReferenceChunkTool' from JSON`,
98
+ );
99
+ }
100
+
51
101
  /** @internal */
52
102
  export const ToolReferenceChunk$inboundSchema: z.ZodType<
53
103
  ToolReferenceChunk,
@@ -55,7 +105,7 @@ export const ToolReferenceChunk$inboundSchema: z.ZodType<
55
105
  unknown
56
106
  > = z.object({
57
107
  type: ToolReferenceChunkType$inboundSchema.default("tool_reference"),
58
- tool: BuiltInConnectors$inboundSchema,
108
+ tool: z.union([BuiltInConnectors$inboundSchema, z.string()]),
59
109
  title: z.string(),
60
110
  url: z.nullable(z.string()).optional(),
61
111
  favicon: z.nullable(z.string()).optional(),
@@ -65,7 +115,7 @@ export const ToolReferenceChunk$inboundSchema: z.ZodType<
65
115
  /** @internal */
66
116
  export type ToolReferenceChunk$Outbound = {
67
117
  type: string;
68
- tool: string;
118
+ tool: string | string;
69
119
  title: string;
70
120
  url?: string | null | undefined;
71
121
  favicon?: string | null | undefined;
@@ -79,7 +129,7 @@ export const ToolReferenceChunk$outboundSchema: z.ZodType<
79
129
  ToolReferenceChunk
80
130
  > = z.object({
81
131
  type: ToolReferenceChunkType$outboundSchema.default("tool_reference"),
82
- tool: BuiltInConnectors$outboundSchema,
132
+ tool: z.union([BuiltInConnectors$outboundSchema, z.string()]),
83
133
  title: z.string(),
84
134
  url: z.nullable(z.string()).optional(),
85
135
  favicon: z.nullable(z.string()).optional(),
@@ -10,6 +10,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type JobsApiRoutesBatchGetBatchJobRequest = {
12
12
  jobId: string;
13
+ inline?: boolean | null | undefined;
13
14
  };
14
15
 
15
16
  /** @internal */
@@ -19,6 +20,7 @@ export const JobsApiRoutesBatchGetBatchJobRequest$inboundSchema: z.ZodType<
19
20
  unknown
20
21
  > = z.object({
21
22
  job_id: z.string(),
23
+ inline: z.nullable(z.boolean()).optional(),
22
24
  }).transform((v) => {
23
25
  return remap$(v, {
24
26
  "job_id": "jobId",
@@ -28,6 +30,7 @@ export const JobsApiRoutesBatchGetBatchJobRequest$inboundSchema: z.ZodType<
28
30
  /** @internal */
29
31
  export type JobsApiRoutesBatchGetBatchJobRequest$Outbound = {
30
32
  job_id: string;
33
+ inline?: boolean | null | undefined;
31
34
  };
32
35
 
33
36
  /** @internal */
@@ -37,6 +40,7 @@ export const JobsApiRoutesBatchGetBatchJobRequest$outboundSchema: z.ZodType<
37
40
  JobsApiRoutesBatchGetBatchJobRequest
38
41
  > = z.object({
39
42
  jobId: z.string(),
43
+ inline: z.nullable(z.boolean()).optional(),
40
44
  }).transform((v) => {
41
45
  return remap$(v, {
42
46
  jobId: "job_id",
@@ -51,6 +51,9 @@ export class MistralJobs extends ClientSDK {
51
51
  *
52
52
  * @remarks
53
53
  * Get a batch job details by its UUID.
54
+ *
55
+ * Args:
56
+ * inline: If True, return results inline in the response.
54
57
  */
55
58
  async get(
56
59
  request: operations.JobsApiRoutesBatchGetBatchJobRequest,