@orq-ai/node 4.16.6 → 4.16.7

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 (127) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/models/components/reasoningpart.js +1 -1
  5. package/models/operations/createtool.js +4 -4
  6. package/models/operations/getalltools.js +4 -4
  7. package/models/operations/getv2humanevalsets.js +2 -2
  8. package/models/operations/getv2humanevalsetsid.js +2 -2
  9. package/models/operations/patchv2humanevalsetsid.js +2 -2
  10. package/models/operations/postv2feedbackevaluation.js +4 -4
  11. package/models/operations/postv2humanevalsets.js +2 -2
  12. package/models/operations/retrievetool.js +4 -4
  13. package/models/operations/runagent.js +1 -1
  14. package/models/operations/streamrunagent.js +1 -1
  15. package/models/operations/updatetool.js +4 -4
  16. package/package.json +6 -6
  17. package/packages/orq-rc/src/funcs/agentsExternalCreate.ts +163 -0
  18. package/packages/orq-rc/src/funcs/agentsExternalDelete.ts +169 -0
  19. package/packages/orq-rc/src/funcs/agentsExternalList.ts +172 -0
  20. package/packages/orq-rc/src/funcs/agentsExternalRefreshCard.ts +174 -0
  21. package/packages/orq-rc/src/funcs/agentsExternalRetrieve.ts +168 -0
  22. package/packages/orq-rc/src/funcs/agentsExternalTestConnection.ts +174 -0
  23. package/packages/orq-rc/src/funcs/agentsExternalUpdate.ts +172 -0
  24. package/packages/orq-rc/src/funcs/agentsUpdate.ts +2 -2
  25. package/packages/orq-rc/src/funcs/monitorsCreate.ts +162 -0
  26. package/packages/orq-rc/src/funcs/monitorsDelete.ts +168 -0
  27. package/packages/orq-rc/src/funcs/monitorsGet.ts +168 -0
  28. package/packages/orq-rc/src/funcs/monitorsList.ts +173 -0
  29. package/packages/orq-rc/src/funcs/monitorsListPresets.ts +144 -0
  30. package/packages/orq-rc/src/funcs/monitorsUpdate.ts +171 -0
  31. package/packages/orq-rc/src/funcs/usersCreate.ts +171 -0
  32. package/packages/orq-rc/src/funcs/usersDelete.ts +168 -0
  33. package/packages/orq-rc/src/funcs/usersGet.ts +168 -0
  34. package/packages/orq-rc/src/funcs/usersList.ts +144 -0
  35. package/packages/orq-rc/src/funcs/usersUpdate.ts +169 -0
  36. package/packages/orq-rc/src/lib/config.ts +2 -2
  37. package/packages/orq-rc/src/models/components/autorouterv2config.ts +30 -0
  38. package/packages/orq-rc/src/models/components/autorouterv2creatorconfig.ts +4 -4
  39. package/packages/orq-rc/src/models/components/autorouterv2effortconfig.ts +24 -0
  40. package/packages/orq-rc/src/models/components/createexternalagentrequest.ts +73 -0
  41. package/packages/orq-rc/src/models/components/createexternalagentresponse.ts +32 -0
  42. package/packages/orq-rc/src/models/components/createmonitorrequest.ts +108 -0
  43. package/packages/orq-rc/src/models/components/createmonitorresponse.ts +35 -0
  44. package/packages/orq-rc/src/models/components/createusersrequest.ts +40 -0
  45. package/packages/orq-rc/src/models/components/createusersresponse.ts +32 -0
  46. package/packages/orq-rc/src/models/components/deleteexternalagentresponse.ts +27 -0
  47. package/packages/orq-rc/src/models/components/deletemonitorresponse.ts +27 -0
  48. package/packages/orq-rc/src/models/components/deleteuserresponse.ts +27 -0
  49. package/packages/orq-rc/src/models/components/externalagent.ts +107 -0
  50. package/packages/orq-rc/src/models/components/externalagentheader.ts +55 -0
  51. package/packages/orq-rc/src/models/components/getexternalagentresponse.ts +32 -0
  52. package/packages/orq-rc/src/models/components/getmonitorresponse.ts +35 -0
  53. package/packages/orq-rc/src/models/components/getuserresponse.ts +35 -0
  54. package/packages/orq-rc/src/models/components/index.ts +40 -0
  55. package/packages/orq-rc/src/models/components/listexternalagentsresponse.ts +41 -0
  56. package/packages/orq-rc/src/models/components/listmonitorpresetsresponse.ts +40 -0
  57. package/packages/orq-rc/src/models/components/listmonitorsresponse.ts +53 -0
  58. package/packages/orq-rc/src/models/components/listusersresponse.ts +32 -0
  59. package/packages/orq-rc/src/models/components/monitor.ts +133 -0
  60. package/packages/orq-rc/src/models/components/monitorpreset.ts +120 -0
  61. package/packages/orq-rc/src/models/components/monitortelemetrysource.ts +23 -0
  62. package/packages/orq-rc/src/models/components/monitorwidget.ts +145 -0
  63. package/packages/orq-rc/src/models/components/monitorwidgetcompute.ts +61 -0
  64. package/packages/orq-rc/src/models/components/monitorwidgetdisplay.ts +196 -0
  65. package/packages/orq-rc/src/models/components/monitorwidgetlayout.ts +75 -0
  66. package/packages/orq-rc/src/models/components/monitorwidgetquery.ts +165 -0
  67. package/packages/orq-rc/src/models/components/openaicontextmanagement.ts +43 -0
  68. package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
  69. package/packages/orq-rc/src/models/components/refreshexternalagentcardrequest.ts +27 -0
  70. package/packages/orq-rc/src/models/components/refreshexternalagentcardresponse.ts +32 -0
  71. package/packages/orq-rc/src/models/components/testexternalagentconnectionrequest.ts +27 -0
  72. package/packages/orq-rc/src/models/components/testexternalagentconnectionresponse.ts +50 -0
  73. package/packages/orq-rc/src/models/components/thinkingparam.ts +112 -0
  74. package/packages/orq-rc/src/models/components/updateexternalagentrequest.ts +74 -0
  75. package/packages/orq-rc/src/models/components/updateexternalagentresponse.ts +32 -0
  76. package/packages/orq-rc/src/models/components/updatemonitorrequest.ts +80 -0
  77. package/packages/orq-rc/src/models/components/updatemonitorresponse.ts +35 -0
  78. package/packages/orq-rc/src/models/components/updateuserrequest.ts +42 -0
  79. package/packages/orq-rc/src/models/components/updateuserresponse.ts +35 -0
  80. package/packages/orq-rc/src/models/components/user.ts +90 -0
  81. package/packages/orq-rc/src/models/components/userinvitationdata.ts +38 -0
  82. package/packages/orq-rc/src/models/operations/createrouterresponse.ts +24 -0
  83. package/packages/orq-rc/src/models/operations/createtool.ts +4 -4
  84. package/packages/orq-rc/src/models/operations/externalagentdelete.ts +36 -0
  85. package/packages/orq-rc/src/models/operations/externalagentget.ts +36 -0
  86. package/packages/orq-rc/src/models/operations/externalagentlist.ts +43 -0
  87. package/packages/orq-rc/src/models/operations/externalagentrefreshcard.ts +45 -0
  88. package/packages/orq-rc/src/models/operations/externalagenttestconnection.ts +46 -0
  89. package/packages/orq-rc/src/models/operations/externalagentupdate.ts +42 -0
  90. package/packages/orq-rc/src/models/operations/getalltools.ts +4 -4
  91. package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
  92. package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
  93. package/packages/orq-rc/src/models/operations/index.ts +14 -0
  94. package/packages/orq-rc/src/models/operations/monitordelete.ts +39 -0
  95. package/packages/orq-rc/src/models/operations/monitorget.ts +39 -0
  96. package/packages/orq-rc/src/models/operations/monitorlist.ts +84 -0
  97. package/packages/orq-rc/src/models/operations/monitorupdate.ts +44 -0
  98. package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  99. package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +4 -4
  100. package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
  101. package/packages/orq-rc/src/models/operations/retrievetool.ts +4 -4
  102. package/packages/orq-rc/src/models/operations/runagent.ts +1 -1
  103. package/packages/orq-rc/src/models/operations/streamrunagent.ts +1 -1
  104. package/packages/orq-rc/src/models/operations/updateagent.ts +16 -11
  105. package/packages/orq-rc/src/models/operations/updatetool.ts +4 -4
  106. package/packages/orq-rc/src/models/operations/usercreate.ts +44 -0
  107. package/packages/orq-rc/src/models/operations/userdelete.ts +39 -0
  108. package/packages/orq-rc/src/models/operations/userget.ts +35 -0
  109. package/packages/orq-rc/src/models/operations/userupdate.ts +44 -0
  110. package/packages/orq-rc/src/sdk/agents.ts +7 -1
  111. package/packages/orq-rc/src/sdk/external.ts +136 -0
  112. package/packages/orq-rc/src/sdk/monitors.ts +116 -0
  113. package/packages/orq-rc/src/sdk/sdk.ts +12 -0
  114. package/packages/orq-rc/src/sdk/users.ts +98 -0
  115. package/src/lib/config.ts +2 -2
  116. package/src/models/components/reasoningpart.ts +1 -1
  117. package/src/models/operations/createtool.ts +4 -4
  118. package/src/models/operations/getalltools.ts +4 -4
  119. package/src/models/operations/getv2humanevalsets.ts +2 -2
  120. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  121. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  122. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  123. package/src/models/operations/postv2humanevalsets.ts +2 -2
  124. package/src/models/operations/retrievetool.ts +4 -4
  125. package/src/models/operations/runagent.ts +1 -1
  126. package/src/models/operations/streamrunagent.ts +1 -1
  127. package/src/models/operations/updatetool.ts +4 -4
@@ -0,0 +1,169 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { OrqCore } from "../core.js";
6
+ import { encodeJSON, 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 { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import * as components from "../models/components/index.js";
15
+ import {
16
+ ConnectionError,
17
+ InvalidRequestError,
18
+ RequestAbortedError,
19
+ RequestTimeoutError,
20
+ UnexpectedClientError,
21
+ } from "../models/errors/httpclienterrors.js";
22
+ import { OrqError } from "../models/errors/orqerror.js";
23
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.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
+ * Update a workspace user
31
+ *
32
+ * @remarks
33
+ * Updates a user's last-activity timestamp and/or workspace role. Omitted fields remain unchanged. Requires a Management Key with user permissions or an authenticated workspace admin session. Standard API keys are not supported.
34
+ */
35
+ export function usersUpdate(
36
+ client: OrqCore,
37
+ request: operations.UserUpdateRequest,
38
+ options?: RequestOptions,
39
+ ): APIPromise<
40
+ Result<
41
+ components.UpdateUserResponse,
42
+ | OrqError
43
+ | ResponseValidationError
44
+ | ConnectionError
45
+ | RequestAbortedError
46
+ | RequestTimeoutError
47
+ | InvalidRequestError
48
+ | UnexpectedClientError
49
+ | SDKValidationError
50
+ >
51
+ > {
52
+ return new APIPromise($do(
53
+ client,
54
+ request,
55
+ options,
56
+ ));
57
+ }
58
+
59
+ async function $do(
60
+ client: OrqCore,
61
+ request: operations.UserUpdateRequest,
62
+ options?: RequestOptions,
63
+ ): Promise<
64
+ [
65
+ Result<
66
+ components.UpdateUserResponse,
67
+ | OrqError
68
+ | ResponseValidationError
69
+ | ConnectionError
70
+ | RequestAbortedError
71
+ | RequestTimeoutError
72
+ | InvalidRequestError
73
+ | UnexpectedClientError
74
+ | SDKValidationError
75
+ >,
76
+ APICall,
77
+ ]
78
+ > {
79
+ const parsed = safeParse(
80
+ request,
81
+ (value) => operations.UserUpdateRequest$outboundSchema.parse(value),
82
+ "Input validation failed",
83
+ );
84
+ if (!parsed.ok) {
85
+ return [parsed, { status: "invalid" }];
86
+ }
87
+ const payload = parsed.value;
88
+ const body = encodeJSON("body", payload.UpdateUserRequest, { explode: true });
89
+
90
+ const pathParams = {
91
+ id: encodeSimple("id", payload.user_id, {
92
+ explode: false,
93
+ charEncoding: "percent",
94
+ }),
95
+ };
96
+ const path = pathToFunc("/v3/users/{id}")(pathParams);
97
+
98
+ const headers = new Headers(compactMap({
99
+ "Content-Type": "application/json",
100
+ Accept: "application/json",
101
+ }));
102
+
103
+ const secConfig = await extractSecurity(client._options.apiKey);
104
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
105
+ const requestSecurity = resolveGlobalSecurity(securityInput);
106
+
107
+ const context = {
108
+ options: client._options,
109
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
110
+ operationID: "UserUpdate",
111
+ oAuth2Scopes: null,
112
+
113
+ resolvedSecurity: requestSecurity,
114
+
115
+ securitySource: client._options.apiKey,
116
+ retryConfig: options?.retries
117
+ || client._options.retryConfig
118
+ || { strategy: "none" },
119
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
120
+ };
121
+
122
+ const requestRes = client._createRequest(context, {
123
+ security: requestSecurity,
124
+ method: "PATCH",
125
+ baseURL: options?.serverURL,
126
+ path: path,
127
+ headers: headers,
128
+ body: body,
129
+ userAgent: client._options.userAgent,
130
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
131
+ }, options);
132
+ if (!requestRes.ok) {
133
+ return [requestRes, { status: "invalid" }];
134
+ }
135
+ const req = requestRes.value;
136
+
137
+ const doResult = await client._do(req, {
138
+ context,
139
+ isErrorStatusCode: (statusCode: number) =>
140
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
141
+ retryConfig: context.retryConfig,
142
+ retryCodes: context.retryCodes,
143
+ });
144
+ if (!doResult.ok) {
145
+ return [doResult, { status: "request-error", request: req }];
146
+ }
147
+ const response = doResult.value;
148
+
149
+ const [result] = await M.match<
150
+ components.UpdateUserResponse,
151
+ | OrqError
152
+ | ResponseValidationError
153
+ | ConnectionError
154
+ | RequestAbortedError
155
+ | RequestTimeoutError
156
+ | InvalidRequestError
157
+ | UnexpectedClientError
158
+ | SDKValidationError
159
+ >(
160
+ M.json(200, components.UpdateUserResponse$inboundSchema),
161
+ M.fail("4XX"),
162
+ M.fail("5XX"),
163
+ )(response, req);
164
+ if (!result.ok) {
165
+ return [result, { status: "complete", request: req, response }];
166
+ }
167
+
168
+ return [result, { status: "complete", request: req, response }];
169
+ }
@@ -58,7 +58,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
58
58
  export const SDK_METADATA = {
59
59
  language: "typescript",
60
60
  openapiDocVersion: "2.0",
61
- sdkVersion: "4.17.0-rc.20",
61
+ sdkVersion: "4.17.0-rc.23",
62
62
  genVersion: "2.948.4",
63
- userAgent: "speakeasy-sdk/typescript 4.17.0-rc.20 2.948.4 2.0 @orq-ai/node",
63
+ userAgent: "speakeasy-sdk/typescript 4.17.0-rc.23 2.948.4 2.0 @orq-ai/node",
64
64
  } as const;
@@ -23,15 +23,20 @@ import {
23
23
  export type AutoRouterV2Config = {
24
24
  aaCreator?: AutoRouterV2CreatorConfig | undefined;
25
25
  aaEvaluations?: { [k: string]: number | null } | undefined;
26
+ aaIndexIsEstimated?: boolean | undefined;
27
+ aaIndexVersion?: string | undefined;
28
+ aaIsReasoning?: boolean | undefined;
26
29
  aaMedianOutputTokensPerSecond?: number | undefined;
27
30
  aaMedianTimeToFirstAnswerToken?: number | undefined;
28
31
  aaMedianTimeToFirstTokenSeconds?: number | undefined;
29
32
  aaModelId?: string | undefined;
30
33
  aaName?: string | undefined;
31
34
  aaPricing?: { [k: string]: number | null } | undefined;
35
+ aaReasoningEffort?: string | undefined;
32
36
  aaReleaseDate?: string | undefined;
33
37
  aaSlug?: string | undefined;
34
38
  defaultEffort?: string | undefined;
39
+ defaultEffortScored?: boolean | undefined;
35
40
  intelligenceIndex: number;
36
41
  price: number;
37
42
  reasoningEfforts?: { [k: string]: AutoRouterV2EffortConfig } | undefined;
@@ -45,15 +50,20 @@ export const AutoRouterV2Config$inboundSchema: z.ZodType<
45
50
  > = z.object({
46
51
  aa_creator: AutoRouterV2CreatorConfig$inboundSchema.optional(),
47
52
  aa_evaluations: z.record(z.nullable(z.number())).optional(),
53
+ aa_index_is_estimated: z.boolean().optional(),
54
+ aa_index_version: z.string().optional(),
55
+ aa_is_reasoning: z.boolean().optional(),
48
56
  aa_median_output_tokens_per_second: z.number().optional(),
49
57
  aa_median_time_to_first_answer_token: z.number().optional(),
50
58
  aa_median_time_to_first_token_seconds: z.number().optional(),
51
59
  aa_model_id: z.string().optional(),
52
60
  aa_name: z.string().optional(),
53
61
  aa_pricing: z.record(z.nullable(z.number())).optional(),
62
+ aa_reasoning_effort: z.string().optional(),
54
63
  aa_release_date: z.string().optional(),
55
64
  aa_slug: z.string().optional(),
56
65
  default_effort: z.string().optional(),
66
+ default_effort_scored: z.boolean().optional(),
57
67
  intelligence_index: z.number(),
58
68
  price: z.number(),
59
69
  reasoning_efforts: z.record(AutoRouterV2EffortConfig$inboundSchema)
@@ -62,15 +72,20 @@ export const AutoRouterV2Config$inboundSchema: z.ZodType<
62
72
  return remap$(v, {
63
73
  "aa_creator": "aaCreator",
64
74
  "aa_evaluations": "aaEvaluations",
75
+ "aa_index_is_estimated": "aaIndexIsEstimated",
76
+ "aa_index_version": "aaIndexVersion",
77
+ "aa_is_reasoning": "aaIsReasoning",
65
78
  "aa_median_output_tokens_per_second": "aaMedianOutputTokensPerSecond",
66
79
  "aa_median_time_to_first_answer_token": "aaMedianTimeToFirstAnswerToken",
67
80
  "aa_median_time_to_first_token_seconds": "aaMedianTimeToFirstTokenSeconds",
68
81
  "aa_model_id": "aaModelId",
69
82
  "aa_name": "aaName",
70
83
  "aa_pricing": "aaPricing",
84
+ "aa_reasoning_effort": "aaReasoningEffort",
71
85
  "aa_release_date": "aaReleaseDate",
72
86
  "aa_slug": "aaSlug",
73
87
  "default_effort": "defaultEffort",
88
+ "default_effort_scored": "defaultEffortScored",
74
89
  "intelligence_index": "intelligenceIndex",
75
90
  "reasoning_efforts": "reasoningEfforts",
76
91
  });
@@ -79,15 +94,20 @@ export const AutoRouterV2Config$inboundSchema: z.ZodType<
79
94
  export type AutoRouterV2Config$Outbound = {
80
95
  aa_creator?: AutoRouterV2CreatorConfig$Outbound | undefined;
81
96
  aa_evaluations?: { [k: string]: number | null } | undefined;
97
+ aa_index_is_estimated?: boolean | undefined;
98
+ aa_index_version?: string | undefined;
99
+ aa_is_reasoning?: boolean | undefined;
82
100
  aa_median_output_tokens_per_second?: number | undefined;
83
101
  aa_median_time_to_first_answer_token?: number | undefined;
84
102
  aa_median_time_to_first_token_seconds?: number | undefined;
85
103
  aa_model_id?: string | undefined;
86
104
  aa_name?: string | undefined;
87
105
  aa_pricing?: { [k: string]: number | null } | undefined;
106
+ aa_reasoning_effort?: string | undefined;
88
107
  aa_release_date?: string | undefined;
89
108
  aa_slug?: string | undefined;
90
109
  default_effort?: string | undefined;
110
+ default_effort_scored?: boolean | undefined;
91
111
  intelligence_index: number;
92
112
  price: number;
93
113
  reasoning_efforts?:
@@ -103,15 +123,20 @@ export const AutoRouterV2Config$outboundSchema: z.ZodType<
103
123
  > = z.object({
104
124
  aaCreator: AutoRouterV2CreatorConfig$outboundSchema.optional(),
105
125
  aaEvaluations: z.record(z.nullable(z.number())).optional(),
126
+ aaIndexIsEstimated: z.boolean().optional(),
127
+ aaIndexVersion: z.string().optional(),
128
+ aaIsReasoning: z.boolean().optional(),
106
129
  aaMedianOutputTokensPerSecond: z.number().optional(),
107
130
  aaMedianTimeToFirstAnswerToken: z.number().optional(),
108
131
  aaMedianTimeToFirstTokenSeconds: z.number().optional(),
109
132
  aaModelId: z.string().optional(),
110
133
  aaName: z.string().optional(),
111
134
  aaPricing: z.record(z.nullable(z.number())).optional(),
135
+ aaReasoningEffort: z.string().optional(),
112
136
  aaReleaseDate: z.string().optional(),
113
137
  aaSlug: z.string().optional(),
114
138
  defaultEffort: z.string().optional(),
139
+ defaultEffortScored: z.boolean().optional(),
115
140
  intelligenceIndex: z.number(),
116
141
  price: z.number(),
117
142
  reasoningEfforts: z.record(AutoRouterV2EffortConfig$outboundSchema)
@@ -120,15 +145,20 @@ export const AutoRouterV2Config$outboundSchema: z.ZodType<
120
145
  return remap$(v, {
121
146
  aaCreator: "aa_creator",
122
147
  aaEvaluations: "aa_evaluations",
148
+ aaIndexIsEstimated: "aa_index_is_estimated",
149
+ aaIndexVersion: "aa_index_version",
150
+ aaIsReasoning: "aa_is_reasoning",
123
151
  aaMedianOutputTokensPerSecond: "aa_median_output_tokens_per_second",
124
152
  aaMedianTimeToFirstAnswerToken: "aa_median_time_to_first_answer_token",
125
153
  aaMedianTimeToFirstTokenSeconds: "aa_median_time_to_first_token_seconds",
126
154
  aaModelId: "aa_model_id",
127
155
  aaName: "aa_name",
128
156
  aaPricing: "aa_pricing",
157
+ aaReasoningEffort: "aa_reasoning_effort",
129
158
  aaReleaseDate: "aa_release_date",
130
159
  aaSlug: "aa_slug",
131
160
  defaultEffort: "default_effort",
161
+ defaultEffortScored: "default_effort_scored",
132
162
  intelligenceIndex: "intelligence_index",
133
163
  reasoningEfforts: "reasoning_efforts",
134
164
  });
@@ -10,7 +10,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
  export type AutoRouterV2CreatorConfig = {
11
11
  id: string;
12
12
  name: string;
13
- slug: string;
13
+ slug?: string | undefined;
14
14
  };
15
15
 
16
16
  /** @internal */
@@ -21,13 +21,13 @@ export const AutoRouterV2CreatorConfig$inboundSchema: z.ZodType<
21
21
  > = z.object({
22
22
  id: z.string(),
23
23
  name: z.string(),
24
- slug: z.string(),
24
+ slug: z.string().optional(),
25
25
  });
26
26
  /** @internal */
27
27
  export type AutoRouterV2CreatorConfig$Outbound = {
28
28
  id: string;
29
29
  name: string;
30
- slug: string;
30
+ slug?: string | undefined;
31
31
  };
32
32
 
33
33
  /** @internal */
@@ -38,7 +38,7 @@ export const AutoRouterV2CreatorConfig$outboundSchema: z.ZodType<
38
38
  > = z.object({
39
39
  id: z.string(),
40
40
  name: z.string(),
41
- slug: z.string(),
41
+ slug: z.string().optional(),
42
42
  });
43
43
 
44
44
  export function autoRouterV2CreatorConfigToJSON(
@@ -9,6 +9,10 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type AutoRouterV2EffortConfig = {
12
+ aaIndexIsEstimated?: boolean | undefined;
13
+ aaIndexVersion?: string | undefined;
14
+ aaIsReasoning?: boolean | undefined;
15
+ aaReasoningEffort?: string | undefined;
12
16
  aaSlug?: string | undefined;
13
17
  intelligenceIndex: number;
14
18
  };
@@ -19,16 +23,28 @@ export const AutoRouterV2EffortConfig$inboundSchema: z.ZodType<
19
23
  z.ZodTypeDef,
20
24
  unknown
21
25
  > = z.object({
26
+ aa_index_is_estimated: z.boolean().optional(),
27
+ aa_index_version: z.string().optional(),
28
+ aa_is_reasoning: z.boolean().optional(),
29
+ aa_reasoning_effort: z.string().optional(),
22
30
  aa_slug: z.string().optional(),
23
31
  intelligence_index: z.number(),
24
32
  }).transform((v) => {
25
33
  return remap$(v, {
34
+ "aa_index_is_estimated": "aaIndexIsEstimated",
35
+ "aa_index_version": "aaIndexVersion",
36
+ "aa_is_reasoning": "aaIsReasoning",
37
+ "aa_reasoning_effort": "aaReasoningEffort",
26
38
  "aa_slug": "aaSlug",
27
39
  "intelligence_index": "intelligenceIndex",
28
40
  });
29
41
  });
30
42
  /** @internal */
31
43
  export type AutoRouterV2EffortConfig$Outbound = {
44
+ aa_index_is_estimated?: boolean | undefined;
45
+ aa_index_version?: string | undefined;
46
+ aa_is_reasoning?: boolean | undefined;
47
+ aa_reasoning_effort?: string | undefined;
32
48
  aa_slug?: string | undefined;
33
49
  intelligence_index: number;
34
50
  };
@@ -39,10 +55,18 @@ export const AutoRouterV2EffortConfig$outboundSchema: z.ZodType<
39
55
  z.ZodTypeDef,
40
56
  AutoRouterV2EffortConfig
41
57
  > = z.object({
58
+ aaIndexIsEstimated: z.boolean().optional(),
59
+ aaIndexVersion: z.string().optional(),
60
+ aaIsReasoning: z.boolean().optional(),
61
+ aaReasoningEffort: z.string().optional(),
42
62
  aaSlug: z.string().optional(),
43
63
  intelligenceIndex: z.number(),
44
64
  }).transform((v) => {
45
65
  return remap$(v, {
66
+ aaIndexIsEstimated: "aa_index_is_estimated",
67
+ aaIndexVersion: "aa_index_version",
68
+ aaIsReasoning: "aa_is_reasoning",
69
+ aaReasoningEffort: "aa_reasoning_effort",
46
70
  aaSlug: "aa_slug",
47
71
  intelligenceIndex: "intelligence_index",
48
72
  });
@@ -0,0 +1,73 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import {
8
+ ExternalAgentHeader,
9
+ ExternalAgentHeader$Outbound,
10
+ ExternalAgentHeader$outboundSchema,
11
+ } from "./externalagentheader.js";
12
+
13
+ export type CreateExternalAgentRequest = {
14
+ key: string;
15
+ displayName: string;
16
+ description?: string | undefined;
17
+ path: string;
18
+ projectId?: string | undefined;
19
+ agentUrl: string;
20
+ cardUrl?: string | undefined;
21
+ headers?: { [k: string]: ExternalAgentHeader } | undefined;
22
+ protocolVersion?: string | undefined;
23
+ preferredTransport?: string | undefined;
24
+ };
25
+
26
+ /** @internal */
27
+ export type CreateExternalAgentRequest$Outbound = {
28
+ key: string;
29
+ display_name: string;
30
+ description?: string | undefined;
31
+ path: string;
32
+ project_id?: string | undefined;
33
+ agent_url: string;
34
+ card_url?: string | undefined;
35
+ headers?: { [k: string]: ExternalAgentHeader$Outbound } | undefined;
36
+ protocol_version?: string | undefined;
37
+ preferred_transport?: string | undefined;
38
+ };
39
+
40
+ /** @internal */
41
+ export const CreateExternalAgentRequest$outboundSchema: z.ZodType<
42
+ CreateExternalAgentRequest$Outbound,
43
+ z.ZodTypeDef,
44
+ CreateExternalAgentRequest
45
+ > = z.object({
46
+ key: z.string(),
47
+ displayName: z.string(),
48
+ description: z.string().optional(),
49
+ path: z.string(),
50
+ projectId: z.string().optional(),
51
+ agentUrl: z.string(),
52
+ cardUrl: z.string().optional(),
53
+ headers: z.record(ExternalAgentHeader$outboundSchema).optional(),
54
+ protocolVersion: z.string().optional(),
55
+ preferredTransport: z.string().optional(),
56
+ }).transform((v) => {
57
+ return remap$(v, {
58
+ displayName: "display_name",
59
+ projectId: "project_id",
60
+ agentUrl: "agent_url",
61
+ cardUrl: "card_url",
62
+ protocolVersion: "protocol_version",
63
+ preferredTransport: "preferred_transport",
64
+ });
65
+ });
66
+
67
+ export function createExternalAgentRequestToJSON(
68
+ createExternalAgentRequest: CreateExternalAgentRequest,
69
+ ): string {
70
+ return JSON.stringify(
71
+ CreateExternalAgentRequest$outboundSchema.parse(createExternalAgentRequest),
72
+ );
73
+ }
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import { ExternalAgent, ExternalAgent$inboundSchema } from "./externalagent.js";
10
+
11
+ export type CreateExternalAgentResponse = {
12
+ agent?: ExternalAgent | undefined;
13
+ };
14
+
15
+ /** @internal */
16
+ export const CreateExternalAgentResponse$inboundSchema: z.ZodType<
17
+ CreateExternalAgentResponse,
18
+ z.ZodTypeDef,
19
+ unknown
20
+ > = z.object({
21
+ agent: ExternalAgent$inboundSchema.optional(),
22
+ });
23
+
24
+ export function createExternalAgentResponseFromJSON(
25
+ jsonString: string,
26
+ ): SafeParseResult<CreateExternalAgentResponse, SDKValidationError> {
27
+ return safeParse(
28
+ jsonString,
29
+ (x) => CreateExternalAgentResponse$inboundSchema.parse(JSON.parse(x)),
30
+ `Failed to parse 'CreateExternalAgentResponse' from JSON`,
31
+ );
32
+ }
@@ -0,0 +1,108 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import {
9
+ MonitorWidget,
10
+ MonitorWidget$Outbound,
11
+ MonitorWidget$outboundSchema,
12
+ } from "./monitorwidget.js";
13
+
14
+ /**
15
+ * Known preset used to create the monitor. Empty when built from scratch.
16
+ */
17
+ export const PresetKey = {
18
+ GenaiOverview: "genai-overview",
19
+ CostAnalysis: "cost-analysis",
20
+ Latency: "latency",
21
+ Quality: "quality",
22
+ WidgetSpans: "widget-spans",
23
+ WidgetLatency: "widget-latency",
24
+ WidgetTotalLlmCost: "widget-total-llm-cost",
25
+ WidgetTokenCount: "widget-token-count",
26
+ WidgetScores: "widget-scores",
27
+ WidgetTimeToFirstToken: "widget-time-to-first-token",
28
+ WidgetToolExecutions: "widget-tool-executions",
29
+ WidgetToolErrorRate: "widget-tool-error-rate",
30
+ WidgetToolDurationP50: "widget-tool-duration-p50",
31
+ } as const;
32
+ /**
33
+ * Known preset used to create the monitor. Empty when built from scratch.
34
+ */
35
+ export type PresetKey = ClosedEnum<typeof PresetKey>;
36
+
37
+ export type CreateMonitorRequest = {
38
+ /**
39
+ * Workspace-unique display name.
40
+ */
41
+ displayName: string;
42
+ /**
43
+ * Short human-readable summary of what the monitor tracks.
44
+ */
45
+ description?: string | undefined;
46
+ /**
47
+ * Project that should own the monitor. Omit to create a
48
+ *
49
+ * @remarks
50
+ * workspace-wide monitor (requires admin access).
51
+ */
52
+ projectId?: string | undefined;
53
+ /**
54
+ * Widgets to render on the monitor. Empty creates a valid blank monitor.
55
+ */
56
+ widgets?: Array<MonitorWidget> | undefined;
57
+ /**
58
+ * Default relative time range applied when the monitor opens.
59
+ */
60
+ defaultRange?: string | undefined;
61
+ /**
62
+ * Known preset used to create the monitor. Empty when built from scratch.
63
+ */
64
+ presetKey?: PresetKey | undefined;
65
+ };
66
+
67
+ /** @internal */
68
+ export const PresetKey$outboundSchema: z.ZodNativeEnum<typeof PresetKey> = z
69
+ .nativeEnum(PresetKey);
70
+
71
+ /** @internal */
72
+ export type CreateMonitorRequest$Outbound = {
73
+ display_name: string;
74
+ description?: string | undefined;
75
+ project_id?: string | undefined;
76
+ widgets?: Array<MonitorWidget$Outbound> | undefined;
77
+ default_range?: string | undefined;
78
+ preset_key?: string | undefined;
79
+ };
80
+
81
+ /** @internal */
82
+ export const CreateMonitorRequest$outboundSchema: z.ZodType<
83
+ CreateMonitorRequest$Outbound,
84
+ z.ZodTypeDef,
85
+ CreateMonitorRequest
86
+ > = z.object({
87
+ displayName: z.string(),
88
+ description: z.string().optional(),
89
+ projectId: z.string().optional(),
90
+ widgets: z.array(MonitorWidget$outboundSchema).optional(),
91
+ defaultRange: z.string().optional(),
92
+ presetKey: PresetKey$outboundSchema.optional(),
93
+ }).transform((v) => {
94
+ return remap$(v, {
95
+ displayName: "display_name",
96
+ projectId: "project_id",
97
+ defaultRange: "default_range",
98
+ presetKey: "preset_key",
99
+ });
100
+ });
101
+
102
+ export function createMonitorRequestToJSON(
103
+ createMonitorRequest: CreateMonitorRequest,
104
+ ): string {
105
+ return JSON.stringify(
106
+ CreateMonitorRequest$outboundSchema.parse(createMonitorRequest),
107
+ );
108
+ }
@@ -0,0 +1,35 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import { Monitor, Monitor$inboundSchema } from "./monitor.js";
10
+
11
+ export type CreateMonitorResponse = {
12
+ /**
13
+ * Newly created monitor.
14
+ */
15
+ monitor: Monitor;
16
+ };
17
+
18
+ /** @internal */
19
+ export const CreateMonitorResponse$inboundSchema: z.ZodType<
20
+ CreateMonitorResponse,
21
+ z.ZodTypeDef,
22
+ unknown
23
+ > = z.object({
24
+ monitor: Monitor$inboundSchema,
25
+ });
26
+
27
+ export function createMonitorResponseFromJSON(
28
+ jsonString: string,
29
+ ): SafeParseResult<CreateMonitorResponse, SDKValidationError> {
30
+ return safeParse(
31
+ jsonString,
32
+ (x) => CreateMonitorResponse$inboundSchema.parse(JSON.parse(x)),
33
+ `Failed to parse 'CreateMonitorResponse' from JSON`,
34
+ );
35
+ }
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+
7
+ export type CreateUsersRequest = {
8
+ emails?: Array<string> | undefined;
9
+ /**
10
+ * One effective workspace role is required. The first entry is retained for
11
+ *
12
+ * @remarks
13
+ * wire compatibility with the legacy invitation payload.
14
+ */
15
+ roles?: Array<string> | undefined;
16
+ };
17
+
18
+ /** @internal */
19
+ export type CreateUsersRequest$Outbound = {
20
+ emails?: Array<string> | undefined;
21
+ roles?: Array<string> | undefined;
22
+ };
23
+
24
+ /** @internal */
25
+ export const CreateUsersRequest$outboundSchema: z.ZodType<
26
+ CreateUsersRequest$Outbound,
27
+ z.ZodTypeDef,
28
+ CreateUsersRequest
29
+ > = z.object({
30
+ emails: z.array(z.string()).optional(),
31
+ roles: z.array(z.string()).optional(),
32
+ });
33
+
34
+ export function createUsersRequestToJSON(
35
+ createUsersRequest: CreateUsersRequest,
36
+ ): string {
37
+ return JSON.stringify(
38
+ CreateUsersRequest$outboundSchema.parse(createUsersRequest),
39
+ );
40
+ }