@meetkai/mka1 0.54.31 → 0.54.33

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 (133) hide show
  1. package/README.md +299 -294
  2. package/bin/mcp-server.js +217 -13
  3. package/bin/mcp-server.js.map +15 -12
  4. package/dist/commonjs/funcs/sessionGetPendingInvitation.d.ts +18 -0
  5. package/dist/commonjs/funcs/sessionGetPendingInvitation.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/sessionGetPendingInvitation.js +133 -0
  7. package/dist/commonjs/funcs/sessionGetPendingInvitation.js.map +1 -0
  8. package/dist/commonjs/lib/config.d.ts +2 -2
  9. package/dist/commonjs/lib/config.js +2 -2
  10. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  11. package/dist/commonjs/mcp-server/server.js +1 -1
  12. package/dist/commonjs/models/components/addcatalogmodelrequest.d.ts +20 -0
  13. package/dist/commonjs/models/components/addcatalogmodelrequest.d.ts.map +1 -1
  14. package/dist/commonjs/models/components/addcatalogmodelrequest.js +24 -1
  15. package/dist/commonjs/models/components/addcatalogmodelrequest.js.map +1 -1
  16. package/dist/commonjs/models/components/updatecatalogmodelrequest.d.ts +20 -0
  17. package/dist/commonjs/models/components/updatecatalogmodelrequest.d.ts.map +1 -1
  18. package/dist/commonjs/models/components/updatecatalogmodelrequest.js +24 -1
  19. package/dist/commonjs/models/components/updatecatalogmodelrequest.js.map +1 -1
  20. package/dist/commonjs/models/errors/getpendinginvitation.d.ts +55 -0
  21. package/dist/commonjs/models/errors/getpendinginvitation.d.ts.map +1 -0
  22. package/dist/commonjs/models/errors/getpendinginvitation.js +106 -0
  23. package/dist/commonjs/models/errors/getpendinginvitation.js.map +1 -0
  24. package/dist/commonjs/models/errors/index.d.ts +1 -0
  25. package/dist/commonjs/models/errors/index.d.ts.map +1 -1
  26. package/dist/commonjs/models/errors/index.js +1 -0
  27. package/dist/commonjs/models/errors/index.js.map +1 -1
  28. package/dist/commonjs/models/operations/getmodel.d.ts +16 -0
  29. package/dist/commonjs/models/operations/getmodel.d.ts.map +1 -1
  30. package/dist/commonjs/models/operations/getmodel.js +13 -0
  31. package/dist/commonjs/models/operations/getmodel.js.map +1 -1
  32. package/dist/commonjs/models/operations/getpendinginvitation.d.ts +89 -0
  33. package/dist/commonjs/models/operations/getpendinginvitation.d.ts.map +1 -0
  34. package/dist/commonjs/models/operations/getpendinginvitation.js +160 -0
  35. package/dist/commonjs/models/operations/getpendinginvitation.js.map +1 -0
  36. package/dist/commonjs/models/operations/index.d.ts +1 -0
  37. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  38. package/dist/commonjs/models/operations/index.js +1 -0
  39. package/dist/commonjs/models/operations/index.js.map +1 -1
  40. package/dist/commonjs/models/operations/listmodels.d.ts +16 -0
  41. package/dist/commonjs/models/operations/listmodels.d.ts.map +1 -1
  42. package/dist/commonjs/models/operations/listmodels.js +13 -0
  43. package/dist/commonjs/models/operations/listmodels.js.map +1 -1
  44. package/dist/commonjs/react-query/index.d.ts +1 -0
  45. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  46. package/dist/commonjs/react-query/index.js +1 -0
  47. package/dist/commonjs/react-query/index.js.map +1 -1
  48. package/dist/commonjs/react-query/sessionGetPendingInvitation.core.d.ts +14 -0
  49. package/dist/commonjs/react-query/sessionGetPendingInvitation.core.d.ts.map +1 -0
  50. package/dist/commonjs/react-query/sessionGetPendingInvitation.core.js +36 -0
  51. package/dist/commonjs/react-query/sessionGetPendingInvitation.core.js.map +1 -0
  52. package/dist/commonjs/react-query/sessionGetPendingInvitation.d.ts +35 -0
  53. package/dist/commonjs/react-query/sessionGetPendingInvitation.d.ts.map +1 -0
  54. package/dist/commonjs/react-query/sessionGetPendingInvitation.js +65 -0
  55. package/dist/commonjs/react-query/sessionGetPendingInvitation.js.map +1 -0
  56. package/dist/commonjs/sdk/session.d.ts +7 -0
  57. package/dist/commonjs/sdk/session.d.ts.map +1 -1
  58. package/dist/commonjs/sdk/session.js +10 -0
  59. package/dist/commonjs/sdk/session.js.map +1 -1
  60. package/dist/esm/funcs/sessionGetPendingInvitation.d.ts +18 -0
  61. package/dist/esm/funcs/sessionGetPendingInvitation.d.ts.map +1 -0
  62. package/dist/esm/funcs/sessionGetPendingInvitation.js +97 -0
  63. package/dist/esm/funcs/sessionGetPendingInvitation.js.map +1 -0
  64. package/dist/esm/lib/config.d.ts +2 -2
  65. package/dist/esm/lib/config.js +2 -2
  66. package/dist/esm/mcp-server/mcp-server.js +1 -1
  67. package/dist/esm/mcp-server/server.js +1 -1
  68. package/dist/esm/models/components/addcatalogmodelrequest.d.ts +20 -0
  69. package/dist/esm/models/components/addcatalogmodelrequest.d.ts.map +1 -1
  70. package/dist/esm/models/components/addcatalogmodelrequest.js +21 -0
  71. package/dist/esm/models/components/addcatalogmodelrequest.js.map +1 -1
  72. package/dist/esm/models/components/updatecatalogmodelrequest.d.ts +20 -0
  73. package/dist/esm/models/components/updatecatalogmodelrequest.d.ts.map +1 -1
  74. package/dist/esm/models/components/updatecatalogmodelrequest.js +21 -0
  75. package/dist/esm/models/components/updatecatalogmodelrequest.js.map +1 -1
  76. package/dist/esm/models/errors/getpendinginvitation.d.ts +55 -0
  77. package/dist/esm/models/errors/getpendinginvitation.d.ts.map +1 -0
  78. package/dist/esm/models/errors/getpendinginvitation.js +68 -0
  79. package/dist/esm/models/errors/getpendinginvitation.js.map +1 -0
  80. package/dist/esm/models/errors/index.d.ts +1 -0
  81. package/dist/esm/models/errors/index.d.ts.map +1 -1
  82. package/dist/esm/models/errors/index.js +1 -0
  83. package/dist/esm/models/errors/index.js.map +1 -1
  84. package/dist/esm/models/operations/getmodel.d.ts +16 -0
  85. package/dist/esm/models/operations/getmodel.d.ts.map +1 -1
  86. package/dist/esm/models/operations/getmodel.js +13 -0
  87. package/dist/esm/models/operations/getmodel.js.map +1 -1
  88. package/dist/esm/models/operations/getpendinginvitation.d.ts +89 -0
  89. package/dist/esm/models/operations/getpendinginvitation.d.ts.map +1 -0
  90. package/dist/esm/models/operations/getpendinginvitation.js +112 -0
  91. package/dist/esm/models/operations/getpendinginvitation.js.map +1 -0
  92. package/dist/esm/models/operations/index.d.ts +1 -0
  93. package/dist/esm/models/operations/index.d.ts.map +1 -1
  94. package/dist/esm/models/operations/index.js +1 -0
  95. package/dist/esm/models/operations/index.js.map +1 -1
  96. package/dist/esm/models/operations/listmodels.d.ts +16 -0
  97. package/dist/esm/models/operations/listmodels.d.ts.map +1 -1
  98. package/dist/esm/models/operations/listmodels.js +13 -0
  99. package/dist/esm/models/operations/listmodels.js.map +1 -1
  100. package/dist/esm/react-query/index.d.ts +1 -0
  101. package/dist/esm/react-query/index.d.ts.map +1 -1
  102. package/dist/esm/react-query/index.js +1 -0
  103. package/dist/esm/react-query/index.js.map +1 -1
  104. package/dist/esm/react-query/sessionGetPendingInvitation.core.d.ts +14 -0
  105. package/dist/esm/react-query/sessionGetPendingInvitation.core.d.ts.map +1 -0
  106. package/dist/esm/react-query/sessionGetPendingInvitation.core.js +31 -0
  107. package/dist/esm/react-query/sessionGetPendingInvitation.core.js.map +1 -0
  108. package/dist/esm/react-query/sessionGetPendingInvitation.d.ts +35 -0
  109. package/dist/esm/react-query/sessionGetPendingInvitation.d.ts.map +1 -0
  110. package/dist/esm/react-query/sessionGetPendingInvitation.js +55 -0
  111. package/dist/esm/react-query/sessionGetPendingInvitation.js.map +1 -0
  112. package/dist/esm/sdk/session.d.ts +7 -0
  113. package/dist/esm/sdk/session.d.ts.map +1 -1
  114. package/dist/esm/sdk/session.js +10 -0
  115. package/dist/esm/sdk/session.js.map +1 -1
  116. package/jsr.json +1 -1
  117. package/package.json +1 -1
  118. package/src/funcs/sessionGetPendingInvitation.ts +202 -0
  119. package/src/lib/config.ts +2 -2
  120. package/src/mcp-server/mcp-server.ts +1 -1
  121. package/src/mcp-server/server.ts +1 -1
  122. package/src/models/components/addcatalogmodelrequest.ts +52 -0
  123. package/src/models/components/updatecatalogmodelrequest.ts +63 -0
  124. package/src/models/errors/getpendinginvitation.ts +128 -0
  125. package/src/models/errors/index.ts +1 -0
  126. package/src/models/operations/getmodel.ts +28 -0
  127. package/src/models/operations/getpendinginvitation.ts +308 -0
  128. package/src/models/operations/index.ts +1 -0
  129. package/src/models/operations/listmodels.ts +28 -0
  130. package/src/react-query/index.ts +1 -0
  131. package/src/react-query/sessionGetPendingInvitation.core.ts +79 -0
  132. package/src/react-query/sessionGetPendingInvitation.ts +150 -0
  133. package/src/sdk/session.ts +20 -0
@@ -0,0 +1,202 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SDKCore } from "../core.js";
6
+ import { encodeSimple } from "../lib/encodings.js";
7
+ import { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { resolveSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKError } from "../models/errors/sdkerror.js";
24
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * Find an unfinished invitation for the signed-in recipient
31
+ *
32
+ * @remarks
33
+ * Requires a session with a verified email. Returns a pending, unexpired organization invitation first, otherwise an unclaimed, unexpired cluster invitation bound to that email. Open cluster invitations are never returned. Does not accept or modify the invitation.
34
+ */
35
+ export function sessionGetPendingInvitation(
36
+ client: SDKCore,
37
+ security: operations.GetPendingInvitationSecurity,
38
+ request: operations.GetPendingInvitationRequest,
39
+ options?: RequestOptions,
40
+ ): APIPromise<
41
+ Result<
42
+ operations.GetPendingInvitationResponseBody,
43
+ | errors.GetPendingInvitationResponseBody
44
+ | errors.GetPendingInvitationSessionResponseBody
45
+ | SDKError
46
+ | ResponseValidationError
47
+ | ConnectionError
48
+ | RequestAbortedError
49
+ | RequestTimeoutError
50
+ | InvalidRequestError
51
+ | UnexpectedClientError
52
+ | SDKValidationError
53
+ >
54
+ > {
55
+ return new APIPromise($do(
56
+ client,
57
+ security,
58
+ request,
59
+ options,
60
+ ));
61
+ }
62
+
63
+ async function $do(
64
+ client: SDKCore,
65
+ security: operations.GetPendingInvitationSecurity,
66
+ request: operations.GetPendingInvitationRequest,
67
+ options?: RequestOptions,
68
+ ): Promise<
69
+ [
70
+ Result<
71
+ operations.GetPendingInvitationResponseBody,
72
+ | errors.GetPendingInvitationResponseBody
73
+ | errors.GetPendingInvitationSessionResponseBody
74
+ | SDKError
75
+ | ResponseValidationError
76
+ | ConnectionError
77
+ | RequestAbortedError
78
+ | RequestTimeoutError
79
+ | InvalidRequestError
80
+ | UnexpectedClientError
81
+ | SDKValidationError
82
+ >,
83
+ APICall,
84
+ ]
85
+ > {
86
+ const parsed = safeParse(
87
+ request,
88
+ (value) =>
89
+ operations.GetPendingInvitationRequest$outboundSchema.parse(value),
90
+ "Input validation failed",
91
+ );
92
+ if (!parsed.ok) {
93
+ return [parsed, { status: "invalid" }];
94
+ }
95
+ const payload = parsed.value;
96
+ const body = null;
97
+
98
+ const path = pathToFunc("/api/v1/authentication/pending-invitation")();
99
+
100
+ const headers = new Headers(compactMap({
101
+ Accept: "application/json",
102
+ "X-On-Behalf-Of": encodeSimple(
103
+ "X-On-Behalf-Of",
104
+ payload["X-On-Behalf-Of"],
105
+ { explode: false, charEncoding: "none" },
106
+ ),
107
+ }));
108
+
109
+ const requestSecurity = resolveSecurity(
110
+ [
111
+ {
112
+ fieldName: "__Secure-mka1-auth-v2.session_token",
113
+ type: "apiKey:cookie",
114
+ value: security?.sessionCookie,
115
+ },
116
+ ],
117
+ );
118
+
119
+ const context = {
120
+ options: client._options,
121
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
122
+ operationID: "getPendingInvitation",
123
+ oAuth2Scopes: null,
124
+
125
+ resolvedSecurity: requestSecurity,
126
+
127
+ securitySource: security,
128
+ retryConfig: options?.retries
129
+ || client._options.retryConfig
130
+ || {
131
+ strategy: "backoff",
132
+ backoff: {
133
+ initialInterval: 500,
134
+ maxInterval: 5000,
135
+ exponent: 1.5,
136
+ maxElapsedTime: 15000,
137
+ },
138
+ retryConnectionErrors: true,
139
+ }
140
+ || { strategy: "none" },
141
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
142
+ };
143
+
144
+ const requestRes = client._createRequest(context, {
145
+ security: requestSecurity,
146
+ method: "GET",
147
+ baseURL: options?.serverURL,
148
+ path: path,
149
+ headers: headers,
150
+ body: body,
151
+ userAgent: client._options.userAgent,
152
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
153
+ }, options);
154
+ if (!requestRes.ok) {
155
+ return [requestRes, { status: "invalid" }];
156
+ }
157
+ const req = requestRes.value;
158
+
159
+ const doResult = await client._do(req, {
160
+ context,
161
+ isErrorStatusCode: (statusCode: number) =>
162
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
163
+ retryConfig: context.retryConfig,
164
+ retryCodes: context.retryCodes,
165
+ });
166
+ if (!doResult.ok) {
167
+ return [doResult, { status: "request-error", request: req }];
168
+ }
169
+ const response = doResult.value;
170
+
171
+ const responseFields = {
172
+ HttpMeta: { Response: response, Request: req },
173
+ };
174
+
175
+ const [result] = await M.match<
176
+ operations.GetPendingInvitationResponseBody,
177
+ | errors.GetPendingInvitationResponseBody
178
+ | errors.GetPendingInvitationSessionResponseBody
179
+ | SDKError
180
+ | ResponseValidationError
181
+ | ConnectionError
182
+ | RequestAbortedError
183
+ | RequestTimeoutError
184
+ | InvalidRequestError
185
+ | UnexpectedClientError
186
+ | SDKValidationError
187
+ >(
188
+ M.json(200, operations.GetPendingInvitationResponseBody$inboundSchema),
189
+ M.jsonErr(401, errors.GetPendingInvitationResponseBody$inboundSchema),
190
+ M.jsonErr(
191
+ 403,
192
+ errors.GetPendingInvitationSessionResponseBody$inboundSchema,
193
+ ),
194
+ M.fail("4XX"),
195
+ M.fail("5XX"),
196
+ )(response, req, { extraFields: responseFields });
197
+ if (!result.ok) {
198
+ return [result, { status: "complete", request: req, response }];
199
+ }
200
+
201
+ return [result, { status: "complete", request: req, response }];
202
+ }
package/src/lib/config.ts CHANGED
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
65
65
  export const SDK_METADATA = {
66
66
  language: "typescript",
67
67
  openapiDocVersion: "1.1.0",
68
- sdkVersion: "0.54.31",
68
+ sdkVersion: "0.54.33",
69
69
  genVersion: "2.937.18",
70
- userAgent: "speakeasy-sdk/typescript 0.54.31 2.937.18 1.1.0 @meetkai/mka1",
70
+ userAgent: "speakeasy-sdk/typescript 0.54.33 2.937.18 1.1.0 @meetkai/mka1",
71
71
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.54.31",
22
+ currentVersion: "0.54.33",
23
23
  },
24
24
  });
25
25
 
@@ -412,7 +412,7 @@ export function createMCPServer(deps: {
412
412
  }) {
413
413
  const server = new McpServer({
414
414
  name: "SDK",
415
- version: "0.54.31",
415
+ version: "0.54.33",
416
416
  });
417
417
 
418
418
  const client = new SDKCore({
@@ -6,6 +6,7 @@ import * as z from "zod/v3";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
7
  import { ClosedEnum } from "../../types/enums.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { RFCDate } from "../../types/rfcdate.js";
9
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
11
  import {
11
12
  AutoEndpoint,
@@ -268,6 +269,12 @@ export type HealthCheck1 = {
268
269
 
269
270
  export type HealthCheck = HealthCheck1 | HealthCheck2 | HealthCheck3;
270
271
 
272
+ export type ModelCard = {
273
+ parameterCount?: number | undefined;
274
+ activeParameterCount?: number | undefined;
275
+ releaseDate?: RFCDate | undefined;
276
+ };
277
+
271
278
  export type AddCatalogModelRequest = {
272
279
  id: string;
273
280
  provider: string;
@@ -290,6 +297,7 @@ export type AddCatalogModelRequest = {
290
297
  hidden?: boolean | undefined;
291
298
  embeddingLimits?: EmbeddingLimits | undefined;
292
299
  healthCheck?: HealthCheck1 | HealthCheck2 | HealthCheck3 | undefined;
300
+ modelCard?: ModelCard | undefined;
293
301
  };
294
302
 
295
303
  /** @internal */
@@ -1882,6 +1890,47 @@ export function healthCheckFromJSON(
1882
1890
  );
1883
1891
  }
1884
1892
 
1893
+ /** @internal */
1894
+ export const ModelCard$inboundSchema: z.ZodType<
1895
+ ModelCard,
1896
+ z.ZodTypeDef,
1897
+ unknown
1898
+ > = z.object({
1899
+ parameterCount: z.number().int().optional(),
1900
+ activeParameterCount: z.number().int().optional(),
1901
+ releaseDate: z.string().transform(v => new RFCDate(v)).optional(),
1902
+ });
1903
+ /** @internal */
1904
+ export type ModelCard$Outbound = {
1905
+ parameterCount?: number | undefined;
1906
+ activeParameterCount?: number | undefined;
1907
+ releaseDate?: string | undefined;
1908
+ };
1909
+
1910
+ /** @internal */
1911
+ export const ModelCard$outboundSchema: z.ZodType<
1912
+ ModelCard$Outbound,
1913
+ z.ZodTypeDef,
1914
+ ModelCard
1915
+ > = z.object({
1916
+ parameterCount: z.number().int().optional(),
1917
+ activeParameterCount: z.number().int().optional(),
1918
+ releaseDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
1919
+ });
1920
+
1921
+ export function modelCardToJSON(modelCard: ModelCard): string {
1922
+ return JSON.stringify(ModelCard$outboundSchema.parse(modelCard));
1923
+ }
1924
+ export function modelCardFromJSON(
1925
+ jsonString: string,
1926
+ ): SafeParseResult<ModelCard, SDKValidationError> {
1927
+ return safeParse(
1928
+ jsonString,
1929
+ (x) => ModelCard$inboundSchema.parse(JSON.parse(x)),
1930
+ `Failed to parse 'ModelCard' from JSON`,
1931
+ );
1932
+ }
1933
+
1885
1934
  /** @internal */
1886
1935
  export const AddCatalogModelRequest$inboundSchema: z.ZodType<
1887
1936
  AddCatalogModelRequest,
@@ -1918,6 +1967,7 @@ export const AddCatalogModelRequest$inboundSchema: z.ZodType<
1918
1967
  z.lazy(() => HealthCheck2$inboundSchema),
1919
1968
  z.lazy(() => HealthCheck3$inboundSchema),
1920
1969
  ]).optional(),
1970
+ modelCard: z.lazy(() => ModelCard$inboundSchema).optional(),
1921
1971
  });
1922
1972
  /** @internal */
1923
1973
  export type AddCatalogModelRequest$Outbound = {
@@ -1946,6 +1996,7 @@ export type AddCatalogModelRequest$Outbound = {
1946
1996
  | HealthCheck2$Outbound
1947
1997
  | HealthCheck3$Outbound
1948
1998
  | undefined;
1999
+ modelCard?: ModelCard$Outbound | undefined;
1949
2000
  };
1950
2001
 
1951
2002
  /** @internal */
@@ -1984,6 +2035,7 @@ export const AddCatalogModelRequest$outboundSchema: z.ZodType<
1984
2035
  z.lazy(() => HealthCheck2$outboundSchema),
1985
2036
  z.lazy(() => HealthCheck3$outboundSchema),
1986
2037
  ]).optional(),
2038
+ modelCard: z.lazy(() => ModelCard$outboundSchema).optional(),
1987
2039
  });
1988
2040
 
1989
2041
  export function addCatalogModelRequestToJSON(
@@ -6,6 +6,7 @@ import * as z from "zod/v3";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
7
  import { ClosedEnum } from "../../types/enums.js";
8
8
  import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { RFCDate } from "../../types/rfcdate.js";
9
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
11
  import {
11
12
  AutoEndpoint,
@@ -298,6 +299,12 @@ export type UpdateCatalogModelRequestHealthCheck =
298
299
  | UpdateCatalogModelRequestHealthCheck2
299
300
  | UpdateCatalogModelRequestHealthCheck3;
300
301
 
302
+ export type UpdateCatalogModelRequestModelCard = {
303
+ parameterCount?: number | undefined;
304
+ activeParameterCount?: number | undefined;
305
+ releaseDate?: RFCDate | undefined;
306
+ };
307
+
301
308
  export type UpdateCatalogModelRequest = {
302
309
  provider?: string | undefined;
303
310
  modelId?: string | undefined;
@@ -332,6 +339,7 @@ export type UpdateCatalogModelRequest = {
332
339
  | UpdateCatalogModelRequestHealthCheck3
333
340
  | null
334
341
  | undefined;
342
+ modelCard?: UpdateCatalogModelRequestModelCard | null | undefined;
335
343
  id: string;
336
344
  };
337
345
 
@@ -2209,6 +2217,54 @@ export function updateCatalogModelRequestHealthCheckFromJSON(
2209
2217
  );
2210
2218
  }
2211
2219
 
2220
+ /** @internal */
2221
+ export const UpdateCatalogModelRequestModelCard$inboundSchema: z.ZodType<
2222
+ UpdateCatalogModelRequestModelCard,
2223
+ z.ZodTypeDef,
2224
+ unknown
2225
+ > = z.object({
2226
+ parameterCount: z.number().int().optional(),
2227
+ activeParameterCount: z.number().int().optional(),
2228
+ releaseDate: z.string().transform(v => new RFCDate(v)).optional(),
2229
+ });
2230
+ /** @internal */
2231
+ export type UpdateCatalogModelRequestModelCard$Outbound = {
2232
+ parameterCount?: number | undefined;
2233
+ activeParameterCount?: number | undefined;
2234
+ releaseDate?: string | undefined;
2235
+ };
2236
+
2237
+ /** @internal */
2238
+ export const UpdateCatalogModelRequestModelCard$outboundSchema: z.ZodType<
2239
+ UpdateCatalogModelRequestModelCard$Outbound,
2240
+ z.ZodTypeDef,
2241
+ UpdateCatalogModelRequestModelCard
2242
+ > = z.object({
2243
+ parameterCount: z.number().int().optional(),
2244
+ activeParameterCount: z.number().int().optional(),
2245
+ releaseDate: z.instanceof(RFCDate).transform(v => v.toString()).optional(),
2246
+ });
2247
+
2248
+ export function updateCatalogModelRequestModelCardToJSON(
2249
+ updateCatalogModelRequestModelCard: UpdateCatalogModelRequestModelCard,
2250
+ ): string {
2251
+ return JSON.stringify(
2252
+ UpdateCatalogModelRequestModelCard$outboundSchema.parse(
2253
+ updateCatalogModelRequestModelCard,
2254
+ ),
2255
+ );
2256
+ }
2257
+ export function updateCatalogModelRequestModelCardFromJSON(
2258
+ jsonString: string,
2259
+ ): SafeParseResult<UpdateCatalogModelRequestModelCard, SDKValidationError> {
2260
+ return safeParse(
2261
+ jsonString,
2262
+ (x) =>
2263
+ UpdateCatalogModelRequestModelCard$inboundSchema.parse(JSON.parse(x)),
2264
+ `Failed to parse 'UpdateCatalogModelRequestModelCard' from JSON`,
2265
+ );
2266
+ }
2267
+
2212
2268
  /** @internal */
2213
2269
  export const UpdateCatalogModelRequest$inboundSchema: z.ZodType<
2214
2270
  UpdateCatalogModelRequest,
@@ -2259,6 +2315,9 @@ export const UpdateCatalogModelRequest$inboundSchema: z.ZodType<
2259
2315
  z.lazy(() => UpdateCatalogModelRequestHealthCheck3$inboundSchema),
2260
2316
  ]),
2261
2317
  ).optional(),
2318
+ modelCard: z.nullable(
2319
+ z.lazy(() => UpdateCatalogModelRequestModelCard$inboundSchema),
2320
+ ).optional(),
2262
2321
  id: z.string(),
2263
2322
  });
2264
2323
  /** @internal */
@@ -2308,6 +2367,7 @@ export type UpdateCatalogModelRequest$Outbound = {
2308
2367
  | UpdateCatalogModelRequestHealthCheck3$Outbound
2309
2368
  | null
2310
2369
  | undefined;
2370
+ modelCard?: UpdateCatalogModelRequestModelCard$Outbound | null | undefined;
2311
2371
  id: string;
2312
2372
  };
2313
2373
 
@@ -2361,6 +2421,9 @@ export const UpdateCatalogModelRequest$outboundSchema: z.ZodType<
2361
2421
  z.lazy(() => UpdateCatalogModelRequestHealthCheck3$outboundSchema),
2362
2422
  ]),
2363
2423
  ).optional(),
2424
+ modelCard: z.nullable(
2425
+ z.lazy(() => UpdateCatalogModelRequestModelCard$outboundSchema),
2426
+ ).optional(),
2364
2427
  id: z.string(),
2365
2428
  });
2366
2429
 
@@ -0,0 +1,128 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { SDKError } from "./sdkerror.js";
7
+
8
+ /**
9
+ * Forbidden
10
+ */
11
+ export type GetPendingInvitationSessionResponseBodyData = {
12
+ message: string;
13
+ };
14
+
15
+ /**
16
+ * Forbidden
17
+ */
18
+ export class GetPendingInvitationSessionResponseBody extends SDKError {
19
+ /** The original data that was passed to this error instance. */
20
+ data$: GetPendingInvitationSessionResponseBodyData;
21
+
22
+ constructor(
23
+ err: GetPendingInvitationSessionResponseBodyData,
24
+ httpMeta: { response: Response; request: Request; body: string },
25
+ ) {
26
+ const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
27
+ super(message, httpMeta);
28
+ this.data$ = err;
29
+
30
+ this.name = "GetPendingInvitationSessionResponseBody";
31
+ }
32
+ }
33
+
34
+ /**
35
+ * Unauthorized
36
+ */
37
+ export type GetPendingInvitationResponseBodyData = {
38
+ message: string;
39
+ };
40
+
41
+ /**
42
+ * Unauthorized
43
+ */
44
+ export class GetPendingInvitationResponseBody extends SDKError {
45
+ /** The original data that was passed to this error instance. */
46
+ data$: GetPendingInvitationResponseBodyData;
47
+
48
+ constructor(
49
+ err: GetPendingInvitationResponseBodyData,
50
+ httpMeta: { response: Response; request: Request; body: string },
51
+ ) {
52
+ const message = err.message || `API error occurred: ${JSON.stringify(err)}`;
53
+ super(message, httpMeta);
54
+ this.data$ = err;
55
+
56
+ this.name = "GetPendingInvitationResponseBody";
57
+ }
58
+ }
59
+
60
+ /** @internal */
61
+ export const GetPendingInvitationSessionResponseBody$inboundSchema: z.ZodType<
62
+ GetPendingInvitationSessionResponseBody,
63
+ z.ZodTypeDef,
64
+ unknown
65
+ > = z.object({
66
+ message: z.string(),
67
+ request$: z.instanceof(Request),
68
+ response$: z.instanceof(Response),
69
+ body$: z.string(),
70
+ })
71
+ .transform((v) => {
72
+ return new GetPendingInvitationSessionResponseBody(v, {
73
+ request: v.request$,
74
+ response: v.response$,
75
+ body: v.body$,
76
+ });
77
+ });
78
+
79
+ /** @internal */
80
+ export type GetPendingInvitationSessionResponseBody$Outbound = {
81
+ message: string;
82
+ };
83
+
84
+ /** @internal */
85
+ export const GetPendingInvitationSessionResponseBody$outboundSchema: z.ZodType<
86
+ GetPendingInvitationSessionResponseBody$Outbound,
87
+ z.ZodTypeDef,
88
+ GetPendingInvitationSessionResponseBody
89
+ > = z.instanceof(GetPendingInvitationSessionResponseBody)
90
+ .transform(v => v.data$)
91
+ .pipe(z.object({
92
+ message: z.string(),
93
+ }));
94
+
95
+ /** @internal */
96
+ export const GetPendingInvitationResponseBody$inboundSchema: z.ZodType<
97
+ GetPendingInvitationResponseBody,
98
+ z.ZodTypeDef,
99
+ unknown
100
+ > = z.object({
101
+ message: z.string(),
102
+ request$: z.instanceof(Request),
103
+ response$: z.instanceof(Response),
104
+ body$: z.string(),
105
+ })
106
+ .transform((v) => {
107
+ return new GetPendingInvitationResponseBody(v, {
108
+ request: v.request$,
109
+ response: v.response$,
110
+ body: v.body$,
111
+ });
112
+ });
113
+
114
+ /** @internal */
115
+ export type GetPendingInvitationResponseBody$Outbound = {
116
+ message: string;
117
+ };
118
+
119
+ /** @internal */
120
+ export const GetPendingInvitationResponseBody$outboundSchema: z.ZodType<
121
+ GetPendingInvitationResponseBody$Outbound,
122
+ z.ZodTypeDef,
123
+ GetPendingInvitationResponseBody
124
+ > = z.instanceof(GetPendingInvitationResponseBody)
125
+ .transform(v => v.data$)
126
+ .pipe(z.object({
127
+ message: z.string(),
128
+ }));
@@ -23,6 +23,7 @@ export * from "./getjwtfromkey.js";
23
23
  export * from "./getorgbyid.js";
24
24
  export * from "./getorgquota.js";
25
25
  export * from "./getorgratelimit.js";
26
+ export * from "./getpendinginvitation.js";
26
27
  export * from "./getserviceaccount.js";
27
28
  export * from "./getteam.js";
28
29
  export * from "./httpclienterrors.js";
@@ -7,6 +7,7 @@ import { remap as remap$ } from "../../lib/primitives.js";
7
7
  import { safeParse } from "../../lib/schemas.js";
8
8
  import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { RFCDate } from "../../types/rfcdate.js";
10
11
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
12
 
12
13
  export type GetModelRequest = {
@@ -57,6 +58,18 @@ export type GetModelResponseBody = {
57
58
  * Modalities this model can produce, mirroring the registry's `capabilities.modalities.output`. Unconstrained strings rather than a closed enum so a new registry modality reaches clients without a breaking schema change.
58
59
  */
59
60
  outputModalities: Array<string>;
61
+ /**
62
+ * Total parameter count of the weights behind this model, mirroring the registry's `modelCard.parameterCount`. Null when the registry does not record one (closed-weight API models, or entries nobody has filled in yet).
63
+ */
64
+ parameterCount: number | null;
65
+ /**
66
+ * Parameters active per token for mixture-of-experts models, mirroring the registry's `modelCard.activeParameterCount`. Null for dense models and whenever unrecorded.
67
+ */
68
+ activeParameterCount: number | null;
69
+ /**
70
+ * Public release date of the model as an ISO calendar date (YYYY-MM-DD), mirroring the registry's `modelCard.releaseDate`. Null when unrecorded.
71
+ */
72
+ releaseDate: RFCDate | null;
60
73
  /**
61
74
  * Curated public sampling capabilities for this model.
62
75
  */
@@ -181,6 +194,9 @@ export const GetModelResponseBody$inboundSchema: z.ZodType<
181
194
  model_type: ModelType$inboundSchema,
182
195
  input_modalities: z.array(z.string()),
183
196
  output_modalities: z.array(z.string()),
197
+ parameter_count: z.nullable(z.number().int()),
198
+ active_parameter_count: z.nullable(z.number().int()),
199
+ release_date: z.nullable(z.string().transform(v => new RFCDate(v))),
184
200
  capabilities: z.lazy(() => Capabilities$inboundSchema),
185
201
  }).transform((v) => {
186
202
  return remap$(v, {
@@ -188,6 +204,9 @@ export const GetModelResponseBody$inboundSchema: z.ZodType<
188
204
  "model_type": "modelType",
189
205
  "input_modalities": "inputModalities",
190
206
  "output_modalities": "outputModalities",
207
+ "parameter_count": "parameterCount",
208
+ "active_parameter_count": "activeParameterCount",
209
+ "release_date": "releaseDate",
191
210
  });
192
211
  });
193
212
  /** @internal */
@@ -199,6 +218,9 @@ export type GetModelResponseBody$Outbound = {
199
218
  model_type: string;
200
219
  input_modalities: Array<string>;
201
220
  output_modalities: Array<string>;
221
+ parameter_count: number | null;
222
+ active_parameter_count: number | null;
223
+ release_date: string | null;
202
224
  capabilities: Capabilities$Outbound;
203
225
  };
204
226
 
@@ -215,6 +237,9 @@ export const GetModelResponseBody$outboundSchema: z.ZodType<
215
237
  modelType: ModelType$outboundSchema,
216
238
  inputModalities: z.array(z.string()),
217
239
  outputModalities: z.array(z.string()),
240
+ parameterCount: z.nullable(z.number().int()),
241
+ activeParameterCount: z.nullable(z.number().int()),
242
+ releaseDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())),
218
243
  capabilities: z.lazy(() => Capabilities$outboundSchema),
219
244
  }).transform((v) => {
220
245
  return remap$(v, {
@@ -222,6 +247,9 @@ export const GetModelResponseBody$outboundSchema: z.ZodType<
222
247
  modelType: "model_type",
223
248
  inputModalities: "input_modalities",
224
249
  outputModalities: "output_modalities",
250
+ parameterCount: "parameter_count",
251
+ activeParameterCount: "active_parameter_count",
252
+ releaseDate: "release_date",
225
253
  });
226
254
  });
227
255