@mistralai/mistralai 2.6.2 → 2.6.3

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 (162) hide show
  1. package/README.md +11 -2
  2. package/esm/funcs/betaUsersListOrganizations.d.ts +23 -0
  3. package/esm/funcs/betaUsersListOrganizations.d.ts.map +1 -0
  4. package/esm/funcs/betaUsersListOrganizations.js +128 -0
  5. package/esm/funcs/betaUsersListOrganizations.js.map +1 -0
  6. package/esm/funcs/betaUsersListWorkspaces.d.ts +21 -0
  7. package/esm/funcs/betaUsersListWorkspaces.d.ts.map +1 -0
  8. package/esm/funcs/betaUsersListWorkspaces.js +126 -0
  9. package/esm/funcs/betaUsersListWorkspaces.js.map +1 -0
  10. package/esm/funcs/realtimeSessionsCreate.d.ts +16 -0
  11. package/esm/funcs/realtimeSessionsCreate.d.ts.map +1 -0
  12. package/esm/funcs/realtimeSessionsCreate.js +82 -0
  13. package/esm/funcs/realtimeSessionsCreate.js.map +1 -0
  14. package/esm/funcs/workflowsDeploymentsGetDeployment.js +5 -1
  15. package/esm/funcs/workflowsDeploymentsGetDeployment.js.map +1 -1
  16. package/esm/lib/config.d.ts +2 -2
  17. package/esm/lib/config.js +2 -2
  18. package/esm/models/components/authenticationmethodcreateorupdaterequest.d.ts +10 -0
  19. package/esm/models/components/authenticationmethodcreateorupdaterequest.d.ts.map +1 -1
  20. package/esm/models/components/authenticationmethodcreateorupdaterequest.js +4 -0
  21. package/esm/models/components/authenticationmethodcreateorupdaterequest.js.map +1 -1
  22. package/esm/models/components/clientsecret.d.ts +11 -0
  23. package/esm/models/components/clientsecret.d.ts.map +1 -0
  24. package/esm/models/components/clientsecret.js +21 -0
  25. package/esm/models/components/clientsecret.js.map +1 -0
  26. package/esm/models/components/clientsessionpurpose.d.ts +15 -0
  27. package/esm/models/components/clientsessionpurpose.d.ts.map +1 -0
  28. package/esm/models/components/clientsessionpurpose.js +14 -0
  29. package/esm/models/components/clientsessionpurpose.js.map +1 -0
  30. package/esm/models/components/createconnectorrequest.d.ts +10 -0
  31. package/esm/models/components/createconnectorrequest.d.ts.map +1 -1
  32. package/esm/models/components/createconnectorrequest.js +4 -0
  33. package/esm/models/components/createconnectorrequest.js.map +1 -1
  34. package/esm/models/components/createingestionpipelineconfigurationrequest.d.ts +3 -0
  35. package/esm/models/components/createingestionpipelineconfigurationrequest.d.ts.map +1 -1
  36. package/esm/models/components/createingestionpipelineconfigurationrequest.js +3 -0
  37. package/esm/models/components/createingestionpipelineconfigurationrequest.js.map +1 -1
  38. package/esm/models/components/createrealtimesessionrequest.d.ts +17 -0
  39. package/esm/models/components/createrealtimesessionrequest.d.ts.map +1 -0
  40. package/esm/models/components/createrealtimesessionrequest.js +14 -0
  41. package/esm/models/components/createrealtimesessionrequest.js.map +1 -0
  42. package/esm/models/components/createrealtimesessionresponse.d.ts +18 -0
  43. package/esm/models/components/createrealtimesessionresponse.d.ts.map +1 -0
  44. package/esm/models/components/createrealtimesessionresponse.js +25 -0
  45. package/esm/models/components/createrealtimesessionresponse.js.map +1 -0
  46. package/esm/models/components/deploymentdetailresponse.d.ts +2 -0
  47. package/esm/models/components/deploymentdetailresponse.d.ts.map +1 -1
  48. package/esm/models/components/deploymentdetailresponse.js.map +1 -1
  49. package/esm/models/components/deploymentresponse.d.ts +2 -0
  50. package/esm/models/components/deploymentresponse.d.ts.map +1 -1
  51. package/esm/models/components/deploymentresponse.js.map +1 -1
  52. package/esm/models/components/extendedoauthservermetadata.d.ts +8 -0
  53. package/esm/models/components/extendedoauthservermetadata.d.ts.map +1 -1
  54. package/esm/models/components/extendedoauthservermetadata.js +65 -0
  55. package/esm/models/components/extendedoauthservermetadata.js.map +1 -1
  56. package/esm/models/components/globalheadervalue.d.ts +26 -0
  57. package/esm/models/components/globalheadervalue.d.ts.map +1 -0
  58. package/esm/models/components/globalheadervalue.js +32 -0
  59. package/esm/models/components/globalheadervalue.js.map +1 -0
  60. package/esm/models/components/index.d.ts +11 -0
  61. package/esm/models/components/index.d.ts.map +1 -1
  62. package/esm/models/components/index.js +11 -0
  63. package/esm/models/components/index.js.map +1 -1
  64. package/esm/models/components/ingestionpipelinetargetindexref.d.ts +14 -0
  65. package/esm/models/components/ingestionpipelinetargetindexref.d.ts.map +1 -0
  66. package/esm/models/components/ingestionpipelinetargetindexref.js +14 -0
  67. package/esm/models/components/ingestionpipelinetargetindexref.js.map +1 -0
  68. package/esm/models/components/listorganizationsresponse.d.ts +14 -0
  69. package/esm/models/components/listorganizationsresponse.d.ts.map +1 -0
  70. package/esm/models/components/listorganizationsresponse.js +15 -0
  71. package/esm/models/components/listorganizationsresponse.js.map +1 -0
  72. package/esm/models/components/listworkspacesresponse.d.ts +14 -0
  73. package/esm/models/components/listworkspacesresponse.d.ts.map +1 -0
  74. package/esm/models/components/listworkspacesresponse.js +15 -0
  75. package/esm/models/components/listworkspacesresponse.js.map +1 -0
  76. package/esm/models/components/oauthmetadatasource.d.ts +18 -0
  77. package/esm/models/components/oauthmetadatasource.d.ts.map +1 -0
  78. package/esm/models/components/oauthmetadatasource.js +17 -0
  79. package/esm/models/components/oauthmetadatasource.js.map +1 -0
  80. package/esm/models/components/publicauthenticationmethod.d.ts +6 -0
  81. package/esm/models/components/publicauthenticationmethod.d.ts.map +1 -1
  82. package/esm/models/components/publicauthenticationmethod.js +8 -0
  83. package/esm/models/components/publicauthenticationmethod.js.map +1 -1
  84. package/esm/models/components/userorganization.d.ts +17 -0
  85. package/esm/models/components/userorganization.d.ts.map +1 -0
  86. package/esm/models/components/userorganization.js +15 -0
  87. package/esm/models/components/userorganization.js.map +1 -0
  88. package/esm/models/components/userworkspace.d.ts +21 -0
  89. package/esm/models/components/userworkspace.d.ts.map +1 -0
  90. package/esm/models/components/userworkspace.js +22 -0
  91. package/esm/models/components/userworkspace.js.map +1 -0
  92. package/esm/models/operations/createclientsessionv1clientsessionspost.d.ts +9 -0
  93. package/esm/models/operations/createclientsessionv1clientsessionspost.d.ts.map +1 -0
  94. package/esm/models/operations/createclientsessionv1clientsessionspost.js +11 -0
  95. package/esm/models/operations/createclientsessionv1clientsessionspost.js.map +1 -0
  96. package/esm/models/operations/getdeploymentv1workflowsdeploymentsnameget.d.ts +5 -0
  97. package/esm/models/operations/getdeploymentv1workflowsdeploymentsnameget.d.ts.map +1 -1
  98. package/esm/models/operations/getdeploymentv1workflowsdeploymentsnameget.js +6 -0
  99. package/esm/models/operations/getdeploymentv1workflowsdeploymentsnameget.js.map +1 -1
  100. package/esm/models/operations/index.d.ts +3 -0
  101. package/esm/models/operations/index.d.ts.map +1 -1
  102. package/esm/models/operations/index.js +3 -0
  103. package/esm/models/operations/index.js.map +1 -1
  104. package/esm/models/operations/usersapilistorganizations.d.ts +39 -0
  105. package/esm/models/operations/usersapilistorganizations.d.ts.map +1 -0
  106. package/esm/models/operations/usersapilistorganizations.js +39 -0
  107. package/esm/models/operations/usersapilistorganizations.js.map +1 -0
  108. package/esm/models/operations/usersapilistworkspaces.d.ts +44 -0
  109. package/esm/models/operations/usersapilistworkspaces.d.ts.map +1 -0
  110. package/esm/models/operations/usersapilistworkspaces.js +44 -0
  111. package/esm/models/operations/usersapilistworkspaces.js.map +1 -0
  112. package/esm/sdk/realtime.d.ts +7 -0
  113. package/esm/sdk/realtime.d.ts.map +1 -0
  114. package/esm/sdk/realtime.js +13 -0
  115. package/esm/sdk/realtime.js.map +1 -0
  116. package/esm/sdk/sdk.d.ts +3 -0
  117. package/esm/sdk/sdk.d.ts.map +1 -1
  118. package/esm/sdk/sdk.js +5 -0
  119. package/esm/sdk/sdk.js.map +1 -1
  120. package/esm/sdk/sessions.d.ts +10 -0
  121. package/esm/sdk/sessions.d.ts.map +1 -0
  122. package/esm/sdk/sessions.js +16 -0
  123. package/esm/sdk/sessions.js.map +1 -0
  124. package/esm/sdk/users.d.ts +23 -0
  125. package/esm/sdk/users.d.ts.map +1 -1
  126. package/esm/sdk/users.js +25 -0
  127. package/esm/sdk/users.js.map +1 -1
  128. package/jsr.json +1 -1
  129. package/package.json +1 -1
  130. package/src/funcs/betaUsersListOrganizations.ts +257 -0
  131. package/src/funcs/betaUsersListWorkspaces.ts +257 -0
  132. package/src/funcs/realtimeSessionsCreate.ts +170 -0
  133. package/src/funcs/workflowsDeploymentsGetDeployment.ts +6 -1
  134. package/src/lib/config.ts +2 -2
  135. package/src/models/components/authenticationmethodcreateorupdaterequest.ts +13 -0
  136. package/src/models/components/clientsecret.ts +36 -0
  137. package/src/models/components/clientsessionpurpose.ts +23 -0
  138. package/src/models/components/createconnectorrequest.ts +13 -0
  139. package/src/models/components/createingestionpipelineconfigurationrequest.ts +14 -0
  140. package/src/models/components/createrealtimesessionrequest.ts +39 -0
  141. package/src/models/components/createrealtimesessionresponse.ts +51 -0
  142. package/src/models/components/deploymentdetailresponse.ts +2 -0
  143. package/src/models/components/deploymentresponse.ts +2 -0
  144. package/src/models/components/extendedoauthservermetadata.ts +95 -0
  145. package/src/models/components/globalheadervalue.ts +70 -0
  146. package/src/models/components/index.ts +11 -0
  147. package/src/models/components/ingestionpipelinetargetindexref.ts +36 -0
  148. package/src/models/components/listorganizationsresponse.ts +38 -0
  149. package/src/models/components/listworkspacesresponse.ts +35 -0
  150. package/src/models/components/oauthmetadatasource.ts +31 -0
  151. package/src/models/components/publicauthenticationmethod.ts +16 -0
  152. package/src/models/components/userorganization.ts +39 -0
  153. package/src/models/components/userworkspace.ts +47 -0
  154. package/src/models/operations/createclientsessionv1clientsessionspost.ts +20 -0
  155. package/src/models/operations/getdeploymentv1workflowsdeploymentsnameget.ts +11 -0
  156. package/src/models/operations/index.ts +3 -0
  157. package/src/models/operations/usersapilistorganizations.ts +104 -0
  158. package/src/models/operations/usersapilistworkspaces.ts +114 -0
  159. package/src/sdk/realtime.ts +14 -0
  160. package/src/sdk/sdk.ts +6 -0
  161. package/src/sdk/sessions.ts +26 -0
  162. package/src/sdk/users.ts +52 -0
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 1e00d716ccf6
4
+ */
5
+
6
+ import * as z from "zod/v4";
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
+ UserOrganization,
12
+ UserOrganization$inboundSchema,
13
+ } from "./userorganization.js";
14
+
15
+ export type ListOrganizationsResponse = {
16
+ /**
17
+ * The organizations the authenticated user is a member of.
18
+ */
19
+ organizations: Array<UserOrganization>;
20
+ };
21
+
22
+ /** @internal */
23
+ export const ListOrganizationsResponse$inboundSchema: z.ZodType<
24
+ ListOrganizationsResponse,
25
+ unknown
26
+ > = z.object({
27
+ organizations: z.array(UserOrganization$inboundSchema),
28
+ });
29
+
30
+ export function listOrganizationsResponseFromJSON(
31
+ jsonString: string,
32
+ ): SafeParseResult<ListOrganizationsResponse, SDKValidationError> {
33
+ return safeParse(
34
+ jsonString,
35
+ (x) => ListOrganizationsResponse$inboundSchema.parse(JSON.parse(x)),
36
+ `Failed to parse 'ListOrganizationsResponse' from JSON`,
37
+ );
38
+ }
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: d0a0a253bc7e
4
+ */
5
+
6
+ import * as z from "zod/v4";
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 { UserWorkspace, UserWorkspace$inboundSchema } from "./userworkspace.js";
11
+
12
+ export type ListWorkspacesResponse = {
13
+ /**
14
+ * The workspaces the authenticated user is a member of, each tagged with the organization it belongs to.
15
+ */
16
+ workspaces: Array<UserWorkspace>;
17
+ };
18
+
19
+ /** @internal */
20
+ export const ListWorkspacesResponse$inboundSchema: z.ZodType<
21
+ ListWorkspacesResponse,
22
+ unknown
23
+ > = z.object({
24
+ workspaces: z.array(UserWorkspace$inboundSchema),
25
+ });
26
+
27
+ export function listWorkspacesResponseFromJSON(
28
+ jsonString: string,
29
+ ): SafeParseResult<ListWorkspacesResponse, SDKValidationError> {
30
+ return safeParse(
31
+ jsonString,
32
+ (x) => ListWorkspacesResponse$inboundSchema.parse(JSON.parse(x)),
33
+ `Failed to parse 'ListWorkspacesResponse' from JSON`,
34
+ );
35
+ }
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 10a04a8e4a87
4
+ */
5
+
6
+ import * as z from "zod/v4";
7
+ import * as openEnums from "../../types/enums.js";
8
+ import { OpenEnum } from "../../types/enums.js";
9
+
10
+ /**
11
+ * How a connector's OAuth server metadata was obtained.
12
+ */
13
+ export const OAuthMetadataSource = {
14
+ Autodiscovery: "autodiscovery",
15
+ Provided: "provided",
16
+ } as const;
17
+ /**
18
+ * How a connector's OAuth server metadata was obtained.
19
+ */
20
+ export type OAuthMetadataSource = OpenEnum<typeof OAuthMetadataSource>;
21
+
22
+ /** @internal */
23
+ export const OAuthMetadataSource$inboundSchema: z.ZodType<
24
+ OAuthMetadataSource,
25
+ unknown
26
+ > = openEnums.inboundSchema(OAuthMetadataSource);
27
+ /** @internal */
28
+ export const OAuthMetadataSource$outboundSchema: z.ZodType<
29
+ string,
30
+ OAuthMetadataSource
31
+ > = openEnums.outboundSchema(OAuthMetadataSource);
@@ -12,6 +12,14 @@ import {
12
12
  ConnectorAuthenticationHeader,
13
13
  ConnectorAuthenticationHeader$inboundSchema,
14
14
  } from "./connectorauthenticationheader.js";
15
+ import {
16
+ ExtendedOAuthServerMetadata,
17
+ ExtendedOAuthServerMetadata$inboundSchema,
18
+ } from "./extendedoauthservermetadata.js";
19
+ import {
20
+ GlobalHeaderValue,
21
+ GlobalHeaderValue$inboundSchema,
22
+ } from "./globalheadervalue.js";
15
23
  import {
16
24
  OutboundAuthenticationType,
17
25
  OutboundAuthenticationType$inboundSchema,
@@ -23,7 +31,9 @@ import {
23
31
  export type PublicAuthenticationMethod = {
24
32
  methodType: OutboundAuthenticationType;
25
33
  headers?: Array<ConnectorAuthenticationHeader> | null | undefined;
34
+ globalHeaders?: { [k: string]: GlobalHeaderValue } | undefined;
26
35
  hasDefaultCredentials: boolean;
36
+ oauth2ServerMetadata?: ExtendedOAuthServerMetadata | null | undefined;
27
37
  };
28
38
 
29
39
  /** @internal */
@@ -34,11 +44,17 @@ export const PublicAuthenticationMethod$inboundSchema: z.ZodType<
34
44
  method_type: OutboundAuthenticationType$inboundSchema,
35
45
  headers: z.nullable(z.array(ConnectorAuthenticationHeader$inboundSchema))
36
46
  .optional(),
47
+ global_headers: z.record(z.string(), GlobalHeaderValue$inboundSchema)
48
+ .optional(),
37
49
  has_default_credentials: z.boolean(),
50
+ oauth2_server_metadata: z.nullable(ExtendedOAuthServerMetadata$inboundSchema)
51
+ .optional(),
38
52
  }).transform((v) => {
39
53
  return remap$(v, {
40
54
  "method_type": "methodType",
55
+ "global_headers": "globalHeaders",
41
56
  "has_default_credentials": "hasDefaultCredentials",
57
+ "oauth2_server_metadata": "oauth2ServerMetadata",
42
58
  });
43
59
  });
44
60
 
@@ -0,0 +1,39 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: f685bfb80176
4
+ */
5
+
6
+ import * as z from "zod/v4";
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 UserOrganization = {
12
+ /**
13
+ * The organization's unique identifier.
14
+ */
15
+ id: string;
16
+ /**
17
+ * The organization's display name.
18
+ */
19
+ name: string;
20
+ };
21
+
22
+ /** @internal */
23
+ export const UserOrganization$inboundSchema: z.ZodType<
24
+ UserOrganization,
25
+ unknown
26
+ > = z.object({
27
+ id: z.string(),
28
+ name: z.string(),
29
+ });
30
+
31
+ export function userOrganizationFromJSON(
32
+ jsonString: string,
33
+ ): SafeParseResult<UserOrganization, SDKValidationError> {
34
+ return safeParse(
35
+ jsonString,
36
+ (x) => UserOrganization$inboundSchema.parse(JSON.parse(x)),
37
+ `Failed to parse 'UserOrganization' from JSON`,
38
+ );
39
+ }
@@ -0,0 +1,47 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 7a0cb86aee63
4
+ */
5
+
6
+ import * as z from "zod/v4";
7
+ import { remap as remap$ } from "../../lib/primitives.js";
8
+ import { safeParse } from "../../lib/schemas.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type UserWorkspace = {
13
+ /**
14
+ * The workspace's unique identifier.
15
+ */
16
+ id: string;
17
+ /**
18
+ * The workspace's display name.
19
+ */
20
+ name: string;
21
+ /**
22
+ * The identifier of the organization this workspace belongs to.
23
+ */
24
+ organizationId: string;
25
+ };
26
+
27
+ /** @internal */
28
+ export const UserWorkspace$inboundSchema: z.ZodType<UserWorkspace, unknown> = z
29
+ .object({
30
+ id: z.string(),
31
+ name: z.string(),
32
+ organization_id: z.string(),
33
+ }).transform((v) => {
34
+ return remap$(v, {
35
+ "organization_id": "organizationId",
36
+ });
37
+ });
38
+
39
+ export function userWorkspaceFromJSON(
40
+ jsonString: string,
41
+ ): SafeParseResult<UserWorkspace, SDKValidationError> {
42
+ return safeParse(
43
+ jsonString,
44
+ (x) => UserWorkspace$inboundSchema.parse(JSON.parse(x)),
45
+ `Failed to parse 'UserWorkspace' from JSON`,
46
+ );
47
+ }
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 0ef3837f40cb
4
+ */
5
+
6
+ import * as z from "zod/v4";
7
+ import * as components from "../components/index.js";
8
+
9
+ export type Body = components.CreateRealtimeSessionRequest;
10
+
11
+ /** @internal */
12
+ export type Body$Outbound = components.CreateRealtimeSessionRequest$Outbound;
13
+
14
+ /** @internal */
15
+ export const Body$outboundSchema: z.ZodType<Body$Outbound, Body> =
16
+ components.CreateRealtimeSessionRequest$outboundSchema;
17
+
18
+ export function bodyToJSON(body: Body): string {
19
+ return JSON.stringify(Body$outboundSchema.parse(body));
20
+ }
@@ -4,14 +4,20 @@
4
4
  */
5
5
 
6
6
  import * as z from "zod/v4";
7
+ import { remap as remap$ } from "../../lib/primitives.js";
7
8
 
8
9
  export type GetDeploymentV1WorkflowsDeploymentsNameGetRequest = {
9
10
  name: string;
11
+ /**
12
+ * Scope serving status to this workflow
13
+ */
14
+ workflowName?: string | null | undefined;
10
15
  };
11
16
 
12
17
  /** @internal */
13
18
  export type GetDeploymentV1WorkflowsDeploymentsNameGetRequest$Outbound = {
14
19
  name: string;
20
+ workflow_name?: string | null | undefined;
15
21
  };
16
22
 
17
23
  /** @internal */
@@ -21,6 +27,11 @@ export const GetDeploymentV1WorkflowsDeploymentsNameGetRequest$outboundSchema:
21
27
  GetDeploymentV1WorkflowsDeploymentsNameGetRequest
22
28
  > = z.object({
23
29
  name: z.string(),
30
+ workflowName: z.nullable(z.string()).optional(),
31
+ }).transform((v) => {
32
+ return remap$(v, {
33
+ workflowName: "workflow_name",
34
+ });
24
35
  });
25
36
 
26
37
  export function getDeploymentV1WorkflowsDeploymentsNameGetRequestToJSON(
@@ -49,6 +49,7 @@ export * from "./connectorlistworkspacecredentialsv1.js";
49
49
  export * from "./connectorsharev1.js";
50
50
  export * from "./connectorunsharev1.js";
51
51
  export * from "./connectorupdatev1.js";
52
+ export * from "./createclientsessionv1clientsessionspost.js";
52
53
  export * from "./createdatasetrecordv1observabilitydatasetsdatasetidrecordspost.js";
53
54
  export * from "./deletecampaignv1observabilitycampaignscampaigniddelete.js";
54
55
  export * from "./deletedatasetrecordv1observabilitydatasetrecordsdatasetrecordiddelete.js";
@@ -202,3 +203,5 @@ export * from "./updatevoicev1audiovoicesvoiceidpatch.js";
202
203
  export * from "./updateworkflowexecutionv1workflowsexecutionsexecutionidupdatespost.js";
203
204
  export * from "./updateworkflowv1workflowsworkflowidentifierput.js";
204
205
  export * from "./usersapigetidentity.js";
206
+ export * from "./usersapilistorganizations.js";
207
+ export * from "./usersapilistworkspaces.js";
@@ -0,0 +1,104 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 4a5dc076290b
4
+ */
5
+
6
+ import * as z from "zod/v4";
7
+ import { remap as remap$ } from "../../lib/primitives.js";
8
+ import { safeParse } from "../../lib/schemas.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import * as components from "../components/index.js";
11
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
+
13
+ export type UsersApiListOrganizationsSecurity = {
14
+ dashboardUserContextAuth: string;
15
+ };
16
+
17
+ export type UsersApiListOrganizationsRequest = {
18
+ /**
19
+ * Number of organizations to skip before returning results.
20
+ */
21
+ offset?: number | undefined;
22
+ /**
23
+ * Maximum number of organizations to return.
24
+ */
25
+ limit?: number | undefined;
26
+ };
27
+
28
+ export type UsersApiListOrganizationsResponse = {
29
+ result: components.ListOrganizationsResponse;
30
+ };
31
+
32
+ /** @internal */
33
+ export type UsersApiListOrganizationsSecurity$Outbound = {
34
+ DashboardUserContextAuth: string;
35
+ };
36
+
37
+ /** @internal */
38
+ export const UsersApiListOrganizationsSecurity$outboundSchema: z.ZodType<
39
+ UsersApiListOrganizationsSecurity$Outbound,
40
+ UsersApiListOrganizationsSecurity
41
+ > = z.object({
42
+ dashboardUserContextAuth: z.string(),
43
+ }).transform((v) => {
44
+ return remap$(v, {
45
+ dashboardUserContextAuth: "DashboardUserContextAuth",
46
+ });
47
+ });
48
+
49
+ export function usersApiListOrganizationsSecurityToJSON(
50
+ usersApiListOrganizationsSecurity: UsersApiListOrganizationsSecurity,
51
+ ): string {
52
+ return JSON.stringify(
53
+ UsersApiListOrganizationsSecurity$outboundSchema.parse(
54
+ usersApiListOrganizationsSecurity,
55
+ ),
56
+ );
57
+ }
58
+
59
+ /** @internal */
60
+ export type UsersApiListOrganizationsRequest$Outbound = {
61
+ offset: number;
62
+ limit: number;
63
+ };
64
+
65
+ /** @internal */
66
+ export const UsersApiListOrganizationsRequest$outboundSchema: z.ZodType<
67
+ UsersApiListOrganizationsRequest$Outbound,
68
+ UsersApiListOrganizationsRequest
69
+ > = z.object({
70
+ offset: z.int().default(0),
71
+ limit: z.int().default(100),
72
+ });
73
+
74
+ export function usersApiListOrganizationsRequestToJSON(
75
+ usersApiListOrganizationsRequest: UsersApiListOrganizationsRequest,
76
+ ): string {
77
+ return JSON.stringify(
78
+ UsersApiListOrganizationsRequest$outboundSchema.parse(
79
+ usersApiListOrganizationsRequest,
80
+ ),
81
+ );
82
+ }
83
+
84
+ /** @internal */
85
+ export const UsersApiListOrganizationsResponse$inboundSchema: z.ZodType<
86
+ UsersApiListOrganizationsResponse,
87
+ unknown
88
+ > = z.object({
89
+ Result: components.ListOrganizationsResponse$inboundSchema,
90
+ }).transform((v) => {
91
+ return remap$(v, {
92
+ "Result": "result",
93
+ });
94
+ });
95
+
96
+ export function usersApiListOrganizationsResponseFromJSON(
97
+ jsonString: string,
98
+ ): SafeParseResult<UsersApiListOrganizationsResponse, SDKValidationError> {
99
+ return safeParse(
100
+ jsonString,
101
+ (x) => UsersApiListOrganizationsResponse$inboundSchema.parse(JSON.parse(x)),
102
+ `Failed to parse 'UsersApiListOrganizationsResponse' from JSON`,
103
+ );
104
+ }
@@ -0,0 +1,114 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: d0798e7afb73
4
+ */
5
+
6
+ import * as z from "zod/v4";
7
+ import { remap as remap$ } from "../../lib/primitives.js";
8
+ import { safeParse } from "../../lib/schemas.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import * as components from "../components/index.js";
11
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
+
13
+ export type UsersApiListWorkspacesSecurity = {
14
+ dashboardUserContextAuth: string;
15
+ };
16
+
17
+ export type UsersApiListWorkspacesRequest = {
18
+ /**
19
+ * Return only workspaces belonging to this organization.
20
+ */
21
+ organizationId?: string | null | undefined;
22
+ /**
23
+ * Number of workspaces to skip before returning results.
24
+ */
25
+ offset?: number | undefined;
26
+ /**
27
+ * Maximum number of workspaces to return.
28
+ */
29
+ limit?: number | undefined;
30
+ };
31
+
32
+ export type UsersApiListWorkspacesResponse = {
33
+ result: components.ListWorkspacesResponse;
34
+ };
35
+
36
+ /** @internal */
37
+ export type UsersApiListWorkspacesSecurity$Outbound = {
38
+ DashboardUserContextAuth: string;
39
+ };
40
+
41
+ /** @internal */
42
+ export const UsersApiListWorkspacesSecurity$outboundSchema: z.ZodType<
43
+ UsersApiListWorkspacesSecurity$Outbound,
44
+ UsersApiListWorkspacesSecurity
45
+ > = z.object({
46
+ dashboardUserContextAuth: z.string(),
47
+ }).transform((v) => {
48
+ return remap$(v, {
49
+ dashboardUserContextAuth: "DashboardUserContextAuth",
50
+ });
51
+ });
52
+
53
+ export function usersApiListWorkspacesSecurityToJSON(
54
+ usersApiListWorkspacesSecurity: UsersApiListWorkspacesSecurity,
55
+ ): string {
56
+ return JSON.stringify(
57
+ UsersApiListWorkspacesSecurity$outboundSchema.parse(
58
+ usersApiListWorkspacesSecurity,
59
+ ),
60
+ );
61
+ }
62
+
63
+ /** @internal */
64
+ export type UsersApiListWorkspacesRequest$Outbound = {
65
+ organization_id?: string | null | undefined;
66
+ offset: number;
67
+ limit: number;
68
+ };
69
+
70
+ /** @internal */
71
+ export const UsersApiListWorkspacesRequest$outboundSchema: z.ZodType<
72
+ UsersApiListWorkspacesRequest$Outbound,
73
+ UsersApiListWorkspacesRequest
74
+ > = z.object({
75
+ organizationId: z.nullable(z.string()).optional(),
76
+ offset: z.int().default(0),
77
+ limit: z.int().default(100),
78
+ }).transform((v) => {
79
+ return remap$(v, {
80
+ organizationId: "organization_id",
81
+ });
82
+ });
83
+
84
+ export function usersApiListWorkspacesRequestToJSON(
85
+ usersApiListWorkspacesRequest: UsersApiListWorkspacesRequest,
86
+ ): string {
87
+ return JSON.stringify(
88
+ UsersApiListWorkspacesRequest$outboundSchema.parse(
89
+ usersApiListWorkspacesRequest,
90
+ ),
91
+ );
92
+ }
93
+
94
+ /** @internal */
95
+ export const UsersApiListWorkspacesResponse$inboundSchema: z.ZodType<
96
+ UsersApiListWorkspacesResponse,
97
+ unknown
98
+ > = z.object({
99
+ Result: components.ListWorkspacesResponse$inboundSchema,
100
+ }).transform((v) => {
101
+ return remap$(v, {
102
+ "Result": "result",
103
+ });
104
+ });
105
+
106
+ export function usersApiListWorkspacesResponseFromJSON(
107
+ jsonString: string,
108
+ ): SafeParseResult<UsersApiListWorkspacesResponse, SDKValidationError> {
109
+ return safeParse(
110
+ jsonString,
111
+ (x) => UsersApiListWorkspacesResponse$inboundSchema.parse(JSON.parse(x)),
112
+ `Failed to parse 'UsersApiListWorkspacesResponse' from JSON`,
113
+ );
114
+ }
@@ -0,0 +1,14 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: dc7128196075
4
+ */
5
+
6
+ import { ClientSDK } from "../lib/sdks.js";
7
+ import { Sessions } from "./sessions.js";
8
+
9
+ export class Realtime extends ClientSDK {
10
+ private _sessions?: Sessions;
11
+ get sessions(): Sessions {
12
+ return (this._sessions ??= new Sessions(this._options));
13
+ }
14
+ }
package/src/sdk/sdk.ts CHANGED
@@ -16,6 +16,7 @@ import { Files } from "./files.js";
16
16
  import { Fim } from "./fim.js";
17
17
  import { Models } from "./models.js";
18
18
  import { Ocr } from "./ocr.js";
19
+ import { Realtime } from "./realtime.js";
19
20
  import { Workflows } from "./workflows.js";
20
21
 
21
22
  export class Mistral extends ClientSDK {
@@ -34,6 +35,11 @@ export class Mistral extends ClientSDK {
34
35
  return (this._models ??= new Models(this._options));
35
36
  }
36
37
 
38
+ private _realtime?: Realtime;
39
+ get realtime(): Realtime {
40
+ return (this._realtime ??= new Realtime(this._options));
41
+ }
42
+
37
43
  private _files?: Files;
38
44
  get files(): Files {
39
45
  return (this._files ??= new Files(this._options));
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 8dd1c8430722
4
+ */
5
+
6
+ import { realtimeSessionsCreate } from "../funcs/realtimeSessionsCreate.js";
7
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
8
+ import * as components from "../models/components/index.js";
9
+ import * as operations from "../models/operations/index.js";
10
+ import { unwrapAsync } from "../types/fp.js";
11
+
12
+ export class Sessions extends ClientSDK {
13
+ /**
14
+ * Create Client Session
15
+ */
16
+ async create(
17
+ request: operations.Body,
18
+ options?: RequestOptions,
19
+ ): Promise<components.CreateRealtimeSessionResponse> {
20
+ return unwrapAsync(realtimeSessionsCreate(
21
+ this,
22
+ request,
23
+ options,
24
+ ));
25
+ }
26
+ }
package/src/sdk/users.ts CHANGED
@@ -4,10 +4,13 @@
4
4
  */
5
5
 
6
6
  import { betaUsersGetIdentity } from "../funcs/betaUsersGetIdentity.js";
7
+ import { betaUsersListOrganizations } from "../funcs/betaUsersListOrganizations.js";
8
+ import { betaUsersListWorkspaces } from "../funcs/betaUsersListWorkspaces.js";
7
9
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
8
10
  import * as components from "../models/components/index.js";
9
11
  import * as operations from "../models/operations/index.js";
10
12
  import { unwrapAsync } from "../types/fp.js";
13
+ import { PageIterator, unwrapResultIterator } from "../types/operations.js";
11
14
 
12
15
  export class Users extends ClientSDK {
13
16
  /**
@@ -23,4 +26,53 @@ export class Users extends ClientSDK {
23
26
  options,
24
27
  ));
25
28
  }
29
+
30
+ /**
31
+ * List Organizations
32
+ *
33
+ * @remarks
34
+ * List every organization the authenticated user is a member of.
35
+ *
36
+ * Identity-only: the caller need not have selected an organization, so this
37
+ * reads only the user and never scopes by the active org.
38
+ */
39
+ async listOrganizations(
40
+ security: operations.UsersApiListOrganizationsSecurity,
41
+ request?: operations.UsersApiListOrganizationsRequest | undefined,
42
+ options?: RequestOptions,
43
+ ): Promise<
44
+ PageIterator<
45
+ operations.UsersApiListOrganizationsResponse,
46
+ { offset: number }
47
+ >
48
+ > {
49
+ return unwrapResultIterator(betaUsersListOrganizations(
50
+ this,
51
+ security,
52
+ request,
53
+ options,
54
+ ));
55
+ }
56
+
57
+ /**
58
+ * List Workspaces
59
+ *
60
+ * @remarks
61
+ * List every workspace the authenticated user is a member of, across all
62
+ * their organizations, each tagged with the organization it belongs to.
63
+ */
64
+ async listWorkspaces(
65
+ security: operations.UsersApiListWorkspacesSecurity,
66
+ request?: operations.UsersApiListWorkspacesRequest | undefined,
67
+ options?: RequestOptions,
68
+ ): Promise<
69
+ PageIterator<operations.UsersApiListWorkspacesResponse, { offset: number }>
70
+ > {
71
+ return unwrapResultIterator(betaUsersListWorkspaces(
72
+ this,
73
+ security,
74
+ request,
75
+ options,
76
+ ));
77
+ }
26
78
  }