@orq-ai/node 4.11.7 → 4.11.10
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.
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/models/components/evaluatorresponsefunction.js +2 -2
- package/models/components/evaluatorresponsehttp.js +2 -2
- package/models/components/evaluatorresponsejsonschema.js +2 -2
- package/models/components/evaluatorresponsellm.js +2 -2
- package/models/components/evaluatorresponsepython.js +2 -2
- package/models/components/evaluatorresponseragas.js +2 -2
- package/models/components/evaluatorresponsetypescript.js +2 -2
- package/models/components/reasoningpart.js +1 -1
- package/models/operations/createagentrequest.d.ts +1 -1
- package/models/operations/createagentrequest.d.ts.map +1 -1
- package/models/operations/createagentrequest.js +1 -1
- package/models/operations/createagentrequest.js.map +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createrouterresponse.d.ts +1 -1
- package/models/operations/createrouterresponse.d.ts.map +1 -1
- package/models/operations/createrouterresponse.js +1 -1
- package/models/operations/createrouterresponse.js.map +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/listagents.d.ts +1 -1
- package/models/operations/listagents.d.ts.map +1 -1
- package/models/operations/listagents.js +1 -1
- package/models/operations/listagents.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +4 -4
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.js +3 -3
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrieveagentrequest.d.ts +1 -1
- package/models/operations/retrieveagentrequest.d.ts.map +1 -1
- package/models/operations/retrieveagentrequest.js +1 -1
- package/models/operations/retrieveagentrequest.js.map +1 -1
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrieveresponse.d.ts +4 -4
- package/models/operations/retrieveresponse.d.ts.map +1 -1
- package/models/operations/retrieveresponse.js +4 -4
- package/models/operations/retrieveresponse.js.map +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updateagent.d.ts +1 -1
- package/models/operations/updateagent.d.ts.map +1 -1
- package/models/operations/updateagent.js +1 -1
- package/models/operations/updateagent.js.map +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +6 -6
- package/packages/orq-rc/src/funcs/notifiersList.ts +2 -0
- package/packages/orq-rc/src/funcs/reportingQuery.ts +3 -1
- package/packages/orq-rc/src/funcs/telemetryQuery.ts +162 -0
- package/packages/orq-rc/src/funcs/tracesAggregate.ts +3 -1
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/models/components/apikey.ts +6 -0
- package/packages/orq-rc/src/models/components/budget.ts +6 -0
- package/packages/orq-rc/src/models/components/budgetalert.ts +92 -0
- package/packages/orq-rc/src/models/components/budgetalertdimension.ts +22 -0
- package/packages/orq-rc/src/models/components/createbudgetrequest.ts +14 -0
- package/packages/orq-rc/src/models/components/evaluatorresponsefunction.ts +2 -2
- package/packages/orq-rc/src/models/components/evaluatorresponsehttp.ts +2 -2
- package/packages/orq-rc/src/models/components/evaluatorresponsejsonschema.ts +2 -2
- package/packages/orq-rc/src/models/components/evaluatorresponsellm.ts +2 -2
- package/packages/orq-rc/src/models/components/evaluatorresponsepython.ts +2 -2
- package/packages/orq-rc/src/models/components/evaluatorresponseragas.ts +2 -2
- package/packages/orq-rc/src/models/components/evaluatorresponsetypescript.ts +2 -2
- package/packages/orq-rc/src/models/components/identity.ts +6 -0
- package/packages/orq-rc/src/models/components/index.ts +6 -0
- package/packages/orq-rc/src/models/components/modelsconfig.ts +1 -0
- package/packages/orq-rc/src/models/components/querytelemetrymeta.ts +38 -0
- package/packages/orq-rc/src/models/components/querytelemetryrequest.ts +85 -0
- package/packages/orq-rc/src/models/components/querytelemetryresponse.ts +42 -0
- package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
- package/packages/orq-rc/src/models/components/telemetryrow.ts +42 -0
- package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +1 -0
- package/packages/orq-rc/src/models/components/updatebudgetrequest.ts +21 -0
- package/packages/orq-rc/src/models/operations/createagentrequest.ts +4 -0
- package/packages/orq-rc/src/models/operations/createchatcompletion.ts +1 -0
- package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +237 -19
- package/packages/orq-rc/src/models/operations/createdatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/createprompt.ts +4 -0
- package/packages/orq-rc/src/models/operations/createrouterresponse.ts +19 -26
- package/packages/orq-rc/src/models/operations/createtool.ts +6 -6
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +1 -0
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +1 -0
- package/packages/orq-rc/src/models/operations/deployments.ts +2 -0
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +1 -0
- package/packages/orq-rc/src/models/operations/getallprompts.ts +3 -0
- package/packages/orq-rc/src/models/operations/getalltools.ts +6 -6
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +3 -0
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +3 -0
- package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/listagents.ts +2 -0
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +313 -84
- package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
- package/packages/orq-rc/src/models/operations/listdatasources.ts +1 -1
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +3 -0
- package/packages/orq-rc/src/models/operations/notifierlist.ts +13 -0
- package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +119 -11
- package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +2 -0
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +234 -9
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrievetool.ts +6 -6
- package/packages/orq-rc/src/models/operations/runagent.ts +3 -1
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +3 -1
- package/packages/orq-rc/src/models/operations/updateagent.ts +4 -0
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +229 -9
- package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/updateprompt.ts +4 -0
- package/packages/orq-rc/src/models/operations/updatetool.ts +7 -7
- package/packages/orq-rc/src/sdk/feedback.ts +6 -0
- package/packages/orq-rc/src/sdk/humanreviewsets.ts +4 -1
- package/packages/orq-rc/src/sdk/reporting.ts +3 -1
- package/packages/orq-rc/src/sdk/sdk.ts +6 -0
- package/packages/orq-rc/src/sdk/telemetry.ts +27 -0
- package/packages/orq-rc/src/sdk/traces.ts +3 -1
- package/sdk/feedback.d.ts +1 -1
- package/sdk/feedback.js +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/evaluatorresponsefunction.ts +2 -2
- package/src/models/components/evaluatorresponsehttp.ts +2 -2
- package/src/models/components/evaluatorresponsejsonschema.ts +2 -2
- package/src/models/components/evaluatorresponsellm.ts +2 -2
- package/src/models/components/evaluatorresponsepython.ts +2 -2
- package/src/models/components/evaluatorresponseragas.ts +2 -2
- package/src/models/components/evaluatorresponsetypescript.ts +2 -2
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/operations/createagentrequest.ts +2 -2
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createrouterresponse.ts +2 -2
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/listagents.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrieveagentrequest.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrieveresponse.ts +8 -8
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updateagent.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updatetool.ts +7 -7
- package/src/sdk/feedback.ts +1 -1
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { OrqCore } from "../core.js";
|
|
6
|
+
import { encodeJSON } 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 { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Query telemetry
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Unified query envelope for traces, metrics, and logs. Selects a source, a compute list, and a time range, with optional grain, group-by, and filters; returns a time series or a single aggregate row per group.
|
|
33
|
+
*/
|
|
34
|
+
export function telemetryQuery(
|
|
35
|
+
client: OrqCore,
|
|
36
|
+
request: components.QueryTelemetryRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
components.QueryTelemetryResponse,
|
|
41
|
+
| OrqError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
request,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: OrqCore,
|
|
60
|
+
request: components.QueryTelemetryRequest,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
components.QueryTelemetryResponse,
|
|
66
|
+
| OrqError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
69
|
+
| RequestAbortedError
|
|
70
|
+
| RequestTimeoutError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
>,
|
|
75
|
+
APICall,
|
|
76
|
+
]
|
|
77
|
+
> {
|
|
78
|
+
const parsed = safeParse(
|
|
79
|
+
request,
|
|
80
|
+
(value) => components.QueryTelemetryRequest$outboundSchema.parse(value),
|
|
81
|
+
"Input validation failed",
|
|
82
|
+
);
|
|
83
|
+
if (!parsed.ok) {
|
|
84
|
+
return [parsed, { status: "invalid" }];
|
|
85
|
+
}
|
|
86
|
+
const payload = parsed.value;
|
|
87
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
88
|
+
|
|
89
|
+
const path = pathToFunc("/v2/telemetry/query")();
|
|
90
|
+
|
|
91
|
+
const headers = new Headers(compactMap({
|
|
92
|
+
"Content-Type": "application/json",
|
|
93
|
+
Accept: "application/json",
|
|
94
|
+
}));
|
|
95
|
+
|
|
96
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
97
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
98
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
99
|
+
|
|
100
|
+
const context = {
|
|
101
|
+
options: client._options,
|
|
102
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
103
|
+
operationID: "TelemetryQuery",
|
|
104
|
+
oAuth2Scopes: null,
|
|
105
|
+
|
|
106
|
+
resolvedSecurity: requestSecurity,
|
|
107
|
+
|
|
108
|
+
securitySource: client._options.apiKey,
|
|
109
|
+
retryConfig: options?.retries
|
|
110
|
+
|| client._options.retryConfig
|
|
111
|
+
|| { strategy: "none" },
|
|
112
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
const requestRes = client._createRequest(context, {
|
|
116
|
+
security: requestSecurity,
|
|
117
|
+
method: "POST",
|
|
118
|
+
baseURL: options?.serverURL,
|
|
119
|
+
path: path,
|
|
120
|
+
headers: headers,
|
|
121
|
+
body: body,
|
|
122
|
+
userAgent: client._options.userAgent,
|
|
123
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
124
|
+
}, options);
|
|
125
|
+
if (!requestRes.ok) {
|
|
126
|
+
return [requestRes, { status: "invalid" }];
|
|
127
|
+
}
|
|
128
|
+
const req = requestRes.value;
|
|
129
|
+
|
|
130
|
+
const doResult = await client._do(req, {
|
|
131
|
+
context,
|
|
132
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
133
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
134
|
+
retryConfig: context.retryConfig,
|
|
135
|
+
retryCodes: context.retryCodes,
|
|
136
|
+
});
|
|
137
|
+
if (!doResult.ok) {
|
|
138
|
+
return [doResult, { status: "request-error", request: req }];
|
|
139
|
+
}
|
|
140
|
+
const response = doResult.value;
|
|
141
|
+
|
|
142
|
+
const [result] = await M.match<
|
|
143
|
+
components.QueryTelemetryResponse,
|
|
144
|
+
| OrqError
|
|
145
|
+
| ResponseValidationError
|
|
146
|
+
| ConnectionError
|
|
147
|
+
| RequestAbortedError
|
|
148
|
+
| RequestTimeoutError
|
|
149
|
+
| InvalidRequestError
|
|
150
|
+
| UnexpectedClientError
|
|
151
|
+
| SDKValidationError
|
|
152
|
+
>(
|
|
153
|
+
M.json(200, components.QueryTelemetryResponse$inboundSchema),
|
|
154
|
+
M.fail("4XX"),
|
|
155
|
+
M.fail("5XX"),
|
|
156
|
+
)(response, req);
|
|
157
|
+
if (!result.ok) {
|
|
158
|
+
return [result, { status: "complete", request: req, response }];
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
return [result, { status: "complete", request: req, response }];
|
|
162
|
+
}
|
|
@@ -29,7 +29,9 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Aggregate traces
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Aggregate trace metrics using the structured trace filter contract.
|
|
32
|
+
* Deprecated: use TelemetryService.Query (POST /v2/telemetry/query, source=TRACES, grain=none) instead. Aggregate trace metrics using the structured trace filter contract.
|
|
33
|
+
*
|
|
34
|
+
* @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
33
35
|
*/
|
|
34
36
|
export function tracesAggregate(
|
|
35
37
|
client: OrqCore,
|
|
@@ -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.12.0-rc.
|
|
62
|
-
genVersion: "2.
|
|
63
|
-
userAgent: "speakeasy-sdk/typescript 4.12.0-rc.
|
|
61
|
+
sdkVersion: "4.12.0-rc.34",
|
|
62
|
+
genVersion: "2.918.3",
|
|
63
|
+
userAgent: "speakeasy-sdk/typescript 4.12.0-rc.34 2.918.3 2.0 @orq-ai/node",
|
|
64
64
|
} as const;
|
|
@@ -9,6 +9,7 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import { ApiKeyOwner, ApiKeyOwner$inboundSchema } from "./apikeyowner.js";
|
|
11
11
|
import { ApiKeyStatus, ApiKeyStatus$inboundSchema } from "./apikeystatus.js";
|
|
12
|
+
import { BudgetAlert, BudgetAlert$inboundSchema } from "./budgetalert.js";
|
|
12
13
|
import { BudgetLimits, BudgetLimits$inboundSchema } from "./budgetlimits.js";
|
|
13
14
|
import { BudgetMatch, BudgetMatch$inboundSchema } from "./budgetmatch.js";
|
|
14
15
|
import { BudgetScope, BudgetScope$inboundSchema } from "./budgetscope.js";
|
|
@@ -84,6 +85,10 @@ export type ApiKeyBudget = {
|
|
|
84
85
|
* has not been spent against in the current period.
|
|
85
86
|
*/
|
|
86
87
|
usage?: BudgetUsage | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Threshold notifications. Absent when the budget has none.
|
|
90
|
+
*/
|
|
91
|
+
alerts?: Array<BudgetAlert> | undefined;
|
|
87
92
|
};
|
|
88
93
|
|
|
89
94
|
/**
|
|
@@ -210,6 +215,7 @@ export const ApiKeyBudget$inboundSchema: z.ZodType<
|
|
|
210
215
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
211
216
|
.optional(),
|
|
212
217
|
usage: BudgetUsage$inboundSchema.optional(),
|
|
218
|
+
alerts: z.array(BudgetAlert$inboundSchema).optional(),
|
|
213
219
|
}).transform((v) => {
|
|
214
220
|
return remap$(v, {
|
|
215
221
|
"budget_id": "budgetId",
|
|
@@ -7,6 +7,7 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import { BudgetAlert, BudgetAlert$inboundSchema } from "./budgetalert.js";
|
|
10
11
|
import { BudgetLimits, BudgetLimits$inboundSchema } from "./budgetlimits.js";
|
|
11
12
|
import { BudgetMatch, BudgetMatch$inboundSchema } from "./budgetmatch.js";
|
|
12
13
|
import { BudgetScope, BudgetScope$inboundSchema } from "./budgetscope.js";
|
|
@@ -71,6 +72,10 @@ export type Budget = {
|
|
|
71
72
|
* has not been spent against in the current period.
|
|
72
73
|
*/
|
|
73
74
|
usage?: BudgetUsage | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Threshold notifications. Absent when the budget has none.
|
|
77
|
+
*/
|
|
78
|
+
alerts?: Array<BudgetAlert> | undefined;
|
|
74
79
|
};
|
|
75
80
|
|
|
76
81
|
/** @internal */
|
|
@@ -92,6 +97,7 @@ export const Budget$inboundSchema: z.ZodType<Budget, z.ZodTypeDef, unknown> = z
|
|
|
92
97
|
new Date(v)
|
|
93
98
|
).optional(),
|
|
94
99
|
usage: BudgetUsage$inboundSchema.optional(),
|
|
100
|
+
alerts: z.array(BudgetAlert$inboundSchema).optional(),
|
|
95
101
|
}).transform((v) => {
|
|
96
102
|
return remap$(v, {
|
|
97
103
|
"budget_id": "budgetId",
|
|
@@ -0,0 +1,92 @@
|
|
|
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 { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
BudgetAlertDimension,
|
|
12
|
+
BudgetAlertDimension$inboundSchema,
|
|
13
|
+
BudgetAlertDimension$outboundSchema,
|
|
14
|
+
} from "./budgetalertdimension.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Notifies every listed notifier once current-period consumption on
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* `dimension` reaches `threshold_percent` of the matching limit. Each alert
|
|
21
|
+
* fires at most once per period, re-arming on rollover or a limit change.
|
|
22
|
+
* The dimension must have a limit set, or the write is rejected.
|
|
23
|
+
*/
|
|
24
|
+
export type BudgetAlert = {
|
|
25
|
+
/**
|
|
26
|
+
* Assigned by ORQ. Supply an existing id to edit that alert in place.
|
|
27
|
+
*/
|
|
28
|
+
id?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Percentage of the dimension's limit at which the alert fires, 1–100.
|
|
31
|
+
*/
|
|
32
|
+
thresholdPercent: number;
|
|
33
|
+
/**
|
|
34
|
+
* Must be workspace-scoped; project-scoped notifiers are rejected.
|
|
35
|
+
*/
|
|
36
|
+
notifierIds: Array<string>;
|
|
37
|
+
dimension?: BudgetAlertDimension | undefined;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const BudgetAlert$inboundSchema: z.ZodType<
|
|
42
|
+
BudgetAlert,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
unknown
|
|
45
|
+
> = z.object({
|
|
46
|
+
id: z.string().optional(),
|
|
47
|
+
threshold_percent: z.number().int(),
|
|
48
|
+
notifier_ids: z.array(z.string()),
|
|
49
|
+
dimension: BudgetAlertDimension$inboundSchema.optional(),
|
|
50
|
+
}).transform((v) => {
|
|
51
|
+
return remap$(v, {
|
|
52
|
+
"threshold_percent": "thresholdPercent",
|
|
53
|
+
"notifier_ids": "notifierIds",
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
/** @internal */
|
|
57
|
+
export type BudgetAlert$Outbound = {
|
|
58
|
+
id?: string | undefined;
|
|
59
|
+
threshold_percent: number;
|
|
60
|
+
notifier_ids: Array<string>;
|
|
61
|
+
dimension?: string | undefined;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export const BudgetAlert$outboundSchema: z.ZodType<
|
|
66
|
+
BudgetAlert$Outbound,
|
|
67
|
+
z.ZodTypeDef,
|
|
68
|
+
BudgetAlert
|
|
69
|
+
> = z.object({
|
|
70
|
+
id: z.string().optional(),
|
|
71
|
+
thresholdPercent: z.number().int(),
|
|
72
|
+
notifierIds: z.array(z.string()),
|
|
73
|
+
dimension: BudgetAlertDimension$outboundSchema.optional(),
|
|
74
|
+
}).transform((v) => {
|
|
75
|
+
return remap$(v, {
|
|
76
|
+
thresholdPercent: "threshold_percent",
|
|
77
|
+
notifierIds: "notifier_ids",
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export function budgetAlertToJSON(budgetAlert: BudgetAlert): string {
|
|
82
|
+
return JSON.stringify(BudgetAlert$outboundSchema.parse(budgetAlert));
|
|
83
|
+
}
|
|
84
|
+
export function budgetAlertFromJSON(
|
|
85
|
+
jsonString: string,
|
|
86
|
+
): SafeParseResult<BudgetAlert, SDKValidationError> {
|
|
87
|
+
return safeParse(
|
|
88
|
+
jsonString,
|
|
89
|
+
(x) => BudgetAlert$inboundSchema.parse(JSON.parse(x)),
|
|
90
|
+
`Failed to parse 'BudgetAlert' from JSON`,
|
|
91
|
+
);
|
|
92
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const BudgetAlertDimension = {
|
|
9
|
+
BudgetAlertDimensionUnspecified: "BUDGET_ALERT_DIMENSION_UNSPECIFIED",
|
|
10
|
+
BudgetAlertDimensionCost: "BUDGET_ALERT_DIMENSION_COST",
|
|
11
|
+
BudgetAlertDimensionTokens: "BUDGET_ALERT_DIMENSION_TOKENS",
|
|
12
|
+
} as const;
|
|
13
|
+
export type BudgetAlertDimension = ClosedEnum<typeof BudgetAlertDimension>;
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const BudgetAlertDimension$inboundSchema: z.ZodNativeEnum<
|
|
17
|
+
typeof BudgetAlertDimension
|
|
18
|
+
> = z.nativeEnum(BudgetAlertDimension);
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const BudgetAlertDimension$outboundSchema: z.ZodNativeEnum<
|
|
21
|
+
typeof BudgetAlertDimension
|
|
22
|
+
> = BudgetAlertDimension$inboundSchema;
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import {
|
|
8
|
+
BudgetAlert,
|
|
9
|
+
BudgetAlert$Outbound,
|
|
10
|
+
BudgetAlert$outboundSchema,
|
|
11
|
+
} from "./budgetalert.js";
|
|
7
12
|
import {
|
|
8
13
|
BudgetLimits,
|
|
9
14
|
BudgetLimits$Outbound,
|
|
@@ -68,6 +73,13 @@ export type CreateBudgetRequest = {
|
|
|
68
73
|
* the value MUST be in the future; the handler rejects past values.
|
|
69
74
|
*/
|
|
70
75
|
expiresAt?: Date | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Optional threshold notifications. Ids are assigned by the server, so
|
|
78
|
+
*
|
|
79
|
+
* @remarks
|
|
80
|
+
* `alerts[].id` must be omitted here; supplying one is rejected.
|
|
81
|
+
*/
|
|
82
|
+
alerts?: Array<BudgetAlert> | undefined;
|
|
71
83
|
};
|
|
72
84
|
|
|
73
85
|
/** @internal */
|
|
@@ -78,6 +90,7 @@ export type CreateBudgetRequest$Outbound = {
|
|
|
78
90
|
rate_limit?: RateLimit$Outbound | undefined;
|
|
79
91
|
is_active?: boolean | undefined;
|
|
80
92
|
expires_at?: string | undefined;
|
|
93
|
+
alerts?: Array<BudgetAlert$Outbound> | undefined;
|
|
81
94
|
};
|
|
82
95
|
|
|
83
96
|
/** @internal */
|
|
@@ -92,6 +105,7 @@ export const CreateBudgetRequest$outboundSchema: z.ZodType<
|
|
|
92
105
|
rateLimit: RateLimit$outboundSchema.optional(),
|
|
93
106
|
isActive: z.boolean().optional(),
|
|
94
107
|
expiresAt: z.date().transform(v => v.toISOString()).optional(),
|
|
108
|
+
alerts: z.array(BudgetAlert$outboundSchema).optional(),
|
|
95
109
|
}).transform((v) => {
|
|
96
110
|
return remap$(v, {
|
|
97
111
|
rateLimit: "rate_limit",
|
|
@@ -856,8 +856,8 @@ export const EvaluatorResponseFunction$inboundSchema: z.ZodType<
|
|
|
856
856
|
> = z.object({
|
|
857
857
|
_id: z.string(),
|
|
858
858
|
description: z.string(),
|
|
859
|
-
created: z.string().default("2026-07-
|
|
860
|
-
updated: z.string().default("2026-07-
|
|
859
|
+
created: z.string().default("2026-07-16T11:02:25.452Z"),
|
|
860
|
+
updated: z.string().default("2026-07-16T11:02:25.452Z"),
|
|
861
861
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
862
862
|
guardrail_config: z.any().optional(),
|
|
863
863
|
type: z.literal("function_eval"),
|
|
@@ -42,8 +42,8 @@ export const EvaluatorResponseHttp$inboundSchema: z.ZodType<
|
|
|
42
42
|
> = z.object({
|
|
43
43
|
_id: z.string(),
|
|
44
44
|
description: z.string(),
|
|
45
|
-
created: z.string().default("2026-07-
|
|
46
|
-
updated: z.string().default("2026-07-
|
|
45
|
+
created: z.string().default("2026-07-16T11:02:25.452Z"),
|
|
46
|
+
updated: z.string().default("2026-07-16T11:02:25.452Z"),
|
|
47
47
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
48
48
|
guardrail_config: z.any().optional(),
|
|
49
49
|
type: z.literal("http_eval"),
|
|
@@ -28,8 +28,8 @@ export const EvaluatorResponseJsonSchema$inboundSchema: z.ZodType<
|
|
|
28
28
|
> = z.object({
|
|
29
29
|
_id: z.string(),
|
|
30
30
|
description: z.string(),
|
|
31
|
-
created: z.string().default("2026-07-
|
|
32
|
-
updated: z.string().default("2026-07-
|
|
31
|
+
created: z.string().default("2026-07-16T11:02:25.452Z"),
|
|
32
|
+
updated: z.string().default("2026-07-16T11:02:25.452Z"),
|
|
33
33
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
34
34
|
guardrail_config: z.any().optional(),
|
|
35
35
|
type: z.literal("json_schema"),
|
|
@@ -267,8 +267,8 @@ export const EvaluatorResponseLlm$inboundSchema: z.ZodType<
|
|
|
267
267
|
> = z.object({
|
|
268
268
|
_id: z.string(),
|
|
269
269
|
description: z.string(),
|
|
270
|
-
created: z.string().default("2026-07-
|
|
271
|
-
updated: z.string().default("2026-07-
|
|
270
|
+
created: z.string().default("2026-07-16T11:02:25.452Z"),
|
|
271
|
+
updated: z.string().default("2026-07-16T11:02:25.452Z"),
|
|
272
272
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
273
273
|
guardrail_config: z.any().optional(),
|
|
274
274
|
type: z.literal("llm_eval"),
|
|
@@ -28,8 +28,8 @@ export const EvaluatorResponsePython$inboundSchema: z.ZodType<
|
|
|
28
28
|
> = z.object({
|
|
29
29
|
_id: z.string(),
|
|
30
30
|
description: z.string(),
|
|
31
|
-
created: z.string().default("2026-07-
|
|
32
|
-
updated: z.string().default("2026-07-
|
|
31
|
+
created: z.string().default("2026-07-16T11:02:25.452Z"),
|
|
32
|
+
updated: z.string().default("2026-07-16T11:02:25.452Z"),
|
|
33
33
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
34
34
|
guardrail_config: z.any().optional(),
|
|
35
35
|
code: z.string(),
|
|
@@ -50,8 +50,8 @@ export const EvaluatorResponseRagas$inboundSchema: z.ZodType<
|
|
|
50
50
|
> = z.object({
|
|
51
51
|
_id: z.string(),
|
|
52
52
|
description: z.string(),
|
|
53
|
-
created: z.string().default("2026-07-
|
|
54
|
-
updated: z.string().default("2026-07-
|
|
53
|
+
created: z.string().default("2026-07-16T11:02:25.452Z"),
|
|
54
|
+
updated: z.string().default("2026-07-16T11:02:25.452Z"),
|
|
55
55
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
56
56
|
guardrail_config: z.any().optional(),
|
|
57
57
|
type: z.literal("ragas"),
|
|
@@ -28,8 +28,8 @@ export const EvaluatorResponseTypescript$inboundSchema: z.ZodType<
|
|
|
28
28
|
> = z.object({
|
|
29
29
|
_id: z.string(),
|
|
30
30
|
description: z.string(),
|
|
31
|
-
created: z.string().default("2026-07-
|
|
32
|
-
updated: z.string().default("2026-07-
|
|
31
|
+
created: z.string().default("2026-07-16T11:02:25.452Z"),
|
|
32
|
+
updated: z.string().default("2026-07-16T11:02:25.452Z"),
|
|
33
33
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
34
34
|
guardrail_config: z.any().optional(),
|
|
35
35
|
code: z.string(),
|
|
@@ -7,6 +7,7 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import { BudgetAlert, BudgetAlert$inboundSchema } from "./budgetalert.js";
|
|
10
11
|
import { BudgetLimits, BudgetLimits$inboundSchema } from "./budgetlimits.js";
|
|
11
12
|
import { BudgetMatch, BudgetMatch$inboundSchema } from "./budgetmatch.js";
|
|
12
13
|
import { BudgetScope, BudgetScope$inboundSchema } from "./budgetscope.js";
|
|
@@ -82,6 +83,10 @@ export type IdentityBudget = {
|
|
|
82
83
|
* has not been spent against in the current period.
|
|
83
84
|
*/
|
|
84
85
|
usage?: BudgetUsage | undefined;
|
|
86
|
+
/**
|
|
87
|
+
* Threshold notifications. Absent when the budget has none.
|
|
88
|
+
*/
|
|
89
|
+
alerts?: Array<BudgetAlert> | undefined;
|
|
85
90
|
};
|
|
86
91
|
|
|
87
92
|
export type Identity = {
|
|
@@ -186,6 +191,7 @@ export const IdentityBudget$inboundSchema: z.ZodType<
|
|
|
186
191
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
187
192
|
.optional(),
|
|
188
193
|
usage: BudgetUsage$inboundSchema.optional(),
|
|
194
|
+
alerts: z.array(BudgetAlert$inboundSchema).optional(),
|
|
189
195
|
}).transform((v) => {
|
|
190
196
|
return remap$(v, {
|
|
191
197
|
"budget_id": "budgetId",
|
|
@@ -27,6 +27,8 @@ export * from "./autorouterv2effortconfig.js";
|
|
|
27
27
|
export * from "./azurefoundrydeployment.js";
|
|
28
28
|
export * from "./azurefoundrydeploymentmasterdata.js";
|
|
29
29
|
export * from "./budget.js";
|
|
30
|
+
export * from "./budgetalert.js";
|
|
31
|
+
export * from "./budgetalertdimension.js";
|
|
30
32
|
export * from "./budgetlimit.js";
|
|
31
33
|
export * from "./budgetlimits.js";
|
|
32
34
|
export * from "./budgetmatch.js";
|
|
@@ -188,6 +190,9 @@ export * from "./publicschedulepayload.js";
|
|
|
188
190
|
export * from "./publicusage.js";
|
|
189
191
|
export * from "./queryreportrequest.js";
|
|
190
192
|
export * from "./queryreportresponse.js";
|
|
193
|
+
export * from "./querytelemetrymeta.js";
|
|
194
|
+
export * from "./querytelemetryrequest.js";
|
|
195
|
+
export * from "./querytelemetryresponse.js";
|
|
191
196
|
export * from "./querytracesrequest.js";
|
|
192
197
|
export * from "./querytracesresponse.js";
|
|
193
198
|
export * from "./ratelimit.js";
|
|
@@ -274,6 +279,7 @@ export * from "./spandetail.js";
|
|
|
274
279
|
export * from "./spansummary.js";
|
|
275
280
|
export * from "./streamoptions.js";
|
|
276
281
|
export * from "./telemetry.js";
|
|
282
|
+
export * from "./telemetryrow.js";
|
|
277
283
|
export * from "./textcontentpartschema.js";
|
|
278
284
|
export * from "./textpart.js";
|
|
279
285
|
export * from "./thinkingconfigadaptiveschema.js";
|
|
@@ -0,0 +1,38 @@
|
|
|
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 { 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 QueryTelemetryMeta = {
|
|
12
|
+
effectiveGrain?: string | undefined;
|
|
13
|
+
warnings?: Array<string> | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const QueryTelemetryMeta$inboundSchema: z.ZodType<
|
|
18
|
+
QueryTelemetryMeta,
|
|
19
|
+
z.ZodTypeDef,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.object({
|
|
22
|
+
effective_grain: z.string().optional(),
|
|
23
|
+
warnings: z.array(z.string()).optional(),
|
|
24
|
+
}).transform((v) => {
|
|
25
|
+
return remap$(v, {
|
|
26
|
+
"effective_grain": "effectiveGrain",
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export function queryTelemetryMetaFromJSON(
|
|
31
|
+
jsonString: string,
|
|
32
|
+
): SafeParseResult<QueryTelemetryMeta, SDKValidationError> {
|
|
33
|
+
return safeParse(
|
|
34
|
+
jsonString,
|
|
35
|
+
(x) => QueryTelemetryMeta$inboundSchema.parse(JSON.parse(x)),
|
|
36
|
+
`Failed to parse 'QueryTelemetryMeta' from JSON`,
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
TraceCompute,
|
|
9
|
+
TraceCompute$Outbound,
|
|
10
|
+
TraceCompute$outboundSchema,
|
|
11
|
+
} from "./tracecompute.js";
|
|
12
|
+
import {
|
|
13
|
+
TraceFilter,
|
|
14
|
+
TraceFilter$Outbound,
|
|
15
|
+
TraceFilter$outboundSchema,
|
|
16
|
+
} from "./tracefilter.js";
|
|
17
|
+
|
|
18
|
+
export type QueryTelemetryRequest = {
|
|
19
|
+
source?: number | undefined;
|
|
20
|
+
from?: Date | undefined;
|
|
21
|
+
to?: Date | undefined;
|
|
22
|
+
compute?: Array<TraceCompute> | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Empty string and "none" are equivalent: a single row per group instead
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* of a time series.
|
|
28
|
+
*/
|
|
29
|
+
grain?: string | undefined;
|
|
30
|
+
groupBy?: Array<string> | undefined;
|
|
31
|
+
filters?: Array<TraceFilter> | undefined;
|
|
32
|
+
filterOperator?: string | undefined;
|
|
33
|
+
limit?: number | undefined;
|
|
34
|
+
timeZone?: string | undefined;
|
|
35
|
+
includeTotals?: boolean | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type QueryTelemetryRequest$Outbound = {
|
|
40
|
+
source?: number | undefined;
|
|
41
|
+
from?: string | undefined;
|
|
42
|
+
to?: string | undefined;
|
|
43
|
+
compute?: Array<TraceCompute$Outbound> | undefined;
|
|
44
|
+
grain?: string | undefined;
|
|
45
|
+
group_by?: Array<string> | undefined;
|
|
46
|
+
filters?: Array<TraceFilter$Outbound> | undefined;
|
|
47
|
+
filter_operator?: string | undefined;
|
|
48
|
+
limit?: number | undefined;
|
|
49
|
+
time_zone?: string | undefined;
|
|
50
|
+
include_totals?: boolean | undefined;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const QueryTelemetryRequest$outboundSchema: z.ZodType<
|
|
55
|
+
QueryTelemetryRequest$Outbound,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
QueryTelemetryRequest
|
|
58
|
+
> = z.object({
|
|
59
|
+
source: z.number().int().optional(),
|
|
60
|
+
from: z.date().transform(v => v.toISOString()).optional(),
|
|
61
|
+
to: z.date().transform(v => v.toISOString()).optional(),
|
|
62
|
+
compute: z.array(TraceCompute$outboundSchema).optional(),
|
|
63
|
+
grain: z.string().optional(),
|
|
64
|
+
groupBy: z.array(z.string()).optional(),
|
|
65
|
+
filters: z.array(TraceFilter$outboundSchema).optional(),
|
|
66
|
+
filterOperator: z.string().optional(),
|
|
67
|
+
limit: z.number().int().optional(),
|
|
68
|
+
timeZone: z.string().optional(),
|
|
69
|
+
includeTotals: z.boolean().optional(),
|
|
70
|
+
}).transform((v) => {
|
|
71
|
+
return remap$(v, {
|
|
72
|
+
groupBy: "group_by",
|
|
73
|
+
filterOperator: "filter_operator",
|
|
74
|
+
timeZone: "time_zone",
|
|
75
|
+
includeTotals: "include_totals",
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
export function queryTelemetryRequestToJSON(
|
|
80
|
+
queryTelemetryRequest: QueryTelemetryRequest,
|
|
81
|
+
): string {
|
|
82
|
+
return JSON.stringify(
|
|
83
|
+
QueryTelemetryRequest$outboundSchema.parse(queryTelemetryRequest),
|
|
84
|
+
);
|
|
85
|
+
}
|