@orq-ai/node 4.12.0-rc.33 → 4.12.0-rc.36
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/README.md +55 -36
- package/funcs/knowledgeListDatasources.js +1 -0
- package/funcs/knowledgeListDatasources.js.map +1 -1
- package/funcs/webhooksCount.d.ts +17 -0
- package/funcs/webhooksCount.d.ts.map +1 -0
- package/funcs/webhooksCount.js +105 -0
- package/funcs/webhooksCount.js.map +1 -0
- package/funcs/webhooksCreate.d.ts +17 -0
- package/funcs/webhooksCreate.d.ts.map +1 -0
- package/funcs/webhooksCreate.js +115 -0
- package/funcs/webhooksCreate.js.map +1 -0
- package/funcs/webhooksDelete.d.ts +18 -0
- package/funcs/webhooksDelete.d.ts.map +1 -0
- package/funcs/webhooksDelete.js +121 -0
- package/funcs/webhooksDelete.js.map +1 -0
- package/funcs/webhooksGenerateSecret.d.ts +17 -0
- package/funcs/webhooksGenerateSecret.d.ts.map +1 -0
- package/funcs/webhooksGenerateSecret.js +105 -0
- package/funcs/webhooksGenerateSecret.js.map +1 -0
- package/funcs/webhooksGet.d.ts +18 -0
- package/funcs/webhooksGet.d.ts.map +1 -0
- package/funcs/webhooksGet.js +121 -0
- package/funcs/webhooksGet.js.map +1 -0
- package/funcs/webhooksList.d.ts +18 -0
- package/funcs/webhooksList.d.ts.map +1 -0
- package/funcs/webhooksList.js +126 -0
- package/funcs/webhooksList.js.map +1 -0
- package/funcs/webhooksQuery.d.ts +19 -0
- package/funcs/webhooksQuery.d.ts.map +1 -0
- package/funcs/webhooksQuery.js +117 -0
- package/funcs/webhooksQuery.js.map +1 -0
- package/funcs/webhooksUpdate.d.ts +17 -0
- package/funcs/webhooksUpdate.d.ts.map +1 -0
- package/funcs/webhooksUpdate.js +121 -0
- package/funcs/webhooksUpdate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/countwebhooksresponse.d.ts +16 -0
- package/models/components/countwebhooksresponse.d.ts.map +1 -0
- package/models/components/countwebhooksresponse.js +50 -0
- package/models/components/countwebhooksresponse.js.map +1 -0
- package/models/components/createwebhookrequest.d.ts +62 -0
- package/models/components/createwebhookrequest.d.ts.map +1 -0
- package/models/components/createwebhookrequest.js +71 -0
- package/models/components/createwebhookrequest.js.map +1 -0
- package/models/components/deletewebhookresponse.d.ts +13 -0
- package/models/components/deletewebhookresponse.d.ts.map +1 -0
- package/models/components/deletewebhookresponse.js +50 -0
- package/models/components/deletewebhookresponse.js.map +1 -0
- 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/generatewebhooksecretresponse.d.ts +16 -0
- package/models/components/generatewebhooksecretresponse.d.ts.map +1 -0
- package/models/components/generatewebhooksecretresponse.js +50 -0
- package/models/components/generatewebhooksecretresponse.js.map +1 -0
- package/models/components/index.d.ts +10 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +10 -0
- package/models/components/index.js.map +1 -1
- package/models/components/listwebhooksresponse.d.ts +25 -0
- package/models/components/listwebhooksresponse.d.ts.map +1 -0
- package/models/components/listwebhooksresponse.js +58 -0
- package/models/components/listwebhooksresponse.js.map +1 -0
- package/models/components/queryparamspagination.d.ts +18 -0
- package/models/components/queryparamspagination.d.ts.map +1 -0
- package/models/components/queryparamspagination.js +52 -0
- package/models/components/queryparamspagination.js.map +1 -0
- package/models/components/queryparamssort.d.ts +14 -0
- package/models/components/queryparamssort.d.ts.map +1 -0
- package/models/components/queryparamssort.js +50 -0
- package/models/components/queryparamssort.js.map +1 -0
- package/models/components/querywebhooksrequest.d.ts +38 -0
- package/models/components/querywebhooksrequest.d.ts.map +1 -0
- package/models/components/querywebhooksrequest.js +67 -0
- package/models/components/querywebhooksrequest.js.map +1 -0
- package/models/components/querywebhooksresponse.d.ts +12 -0
- package/models/components/querywebhooksresponse.d.ts.map +1 -0
- package/models/components/querywebhooksresponse.js +52 -0
- package/models/components/querywebhooksresponse.js.map +1 -0
- package/models/components/reasoningpart.js +1 -1
- package/models/components/webhook.d.ts +74 -0
- package/models/components/webhook.d.ts.map +1 -0
- package/models/components/webhook.js +81 -0
- package/models/components/webhook.js.map +1 -0
- 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.d.ts +121 -8
- package/models/operations/createdatasetitem.d.ts.map +1 -1
- package/models/operations/createdatasetitem.js +97 -12
- package/models/operations/createdatasetitem.js.map +1 -1
- package/models/operations/createdatasource.d.ts +42 -0
- package/models/operations/createdatasource.d.ts.map +1 -1
- package/models/operations/createdatasource.js +26 -2
- package/models/operations/createdatasource.js.map +1 -1
- package/models/operations/createrouterresponse.d.ts +34 -4
- package/models/operations/createrouterresponse.d.ts.map +1 -1
- package/models/operations/createrouterresponse.js +18 -3
- 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/index.d.ts +4 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +4 -0
- package/models/operations/index.js.map +1 -1
- 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.d.ts +149 -36
- package/models/operations/listdatasetdatapoints.d.ts.map +1 -1
- package/models/operations/listdatasetdatapoints.js +119 -37
- package/models/operations/listdatasetdatapoints.js.map +1 -1
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.d.ts +48 -0
- package/models/operations/listdatasources.d.ts.map +1 -1
- package/models/operations/listdatasources.js +33 -2
- package/models/operations/listdatasources.js.map +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/postv2feedbackevaluation.d.ts +68 -6
- package/models/operations/postv2feedbackevaluation.d.ts.map +1 -1
- package/models/operations/postv2feedbackevaluation.js +46 -6
- package/models/operations/postv2feedbackevaluation.js.map +1 -1
- 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.d.ts +117 -4
- package/models/operations/retrievedatapoint.d.ts.map +1 -1
- package/models/operations/retrievedatapoint.js +90 -8
- package/models/operations/retrievedatapoint.js.map +1 -1
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.d.ts +33 -0
- package/models/operations/retrievedatasource.d.ts.map +1 -1
- package/models/operations/retrievedatasource.js +25 -2
- package/models/operations/retrievedatasource.js.map +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.d.ts +117 -4
- package/models/operations/updatedatapoint.d.ts.map +1 -1
- package/models/operations/updatedatapoint.js +92 -8
- package/models/operations/updatedatapoint.js.map +1 -1
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.d.ts +33 -0
- package/models/operations/updatedatasource.d.ts.map +1 -1
- package/models/operations/updatedatasource.js +25 -2
- package/models/operations/updatedatasource.js.map +1 -1
- package/models/operations/updatetool.js +7 -7
- package/models/operations/webhookdelete.d.ts +12 -0
- package/models/operations/webhookdelete.d.ts.map +1 -0
- package/models/operations/webhookdelete.js +49 -0
- package/models/operations/webhookdelete.js.map +1 -0
- package/models/operations/webhookget.d.ts +12 -0
- package/models/operations/webhookget.d.ts.map +1 -0
- package/models/operations/webhookget.js +49 -0
- package/models/operations/webhookget.js.map +1 -0
- package/models/operations/webhooklist.d.ts +70 -0
- package/models/operations/webhooklist.d.ts.map +1 -0
- package/models/operations/webhooklist.js +61 -0
- package/models/operations/webhooklist.js.map +1 -0
- package/models/operations/webhookupdate.d.ts +29 -0
- package/models/operations/webhookupdate.d.ts.map +1 -0
- package/models/operations/webhookupdate.js +68 -0
- package/models/operations/webhookupdate.js.map +1 -0
- package/package.json +7 -7
- package/sdk/feedback.d.ts +4 -1
- package/sdk/feedback.d.ts.map +1 -1
- package/sdk/feedback.js +4 -1
- package/sdk/feedback.js.map +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/webhooks.d.ts +64 -0
- package/sdk/webhooks.d.ts.map +1 -0
- package/sdk/webhooks.js +94 -0
- package/sdk/webhooks.js.map +1 -0
- package/src/funcs/knowledgeListDatasources.ts +1 -0
- package/src/funcs/webhooksCount.ts +144 -0
- package/src/funcs/webhooksCreate.ts +162 -0
- package/src/funcs/webhooksDelete.ts +168 -0
- package/src/funcs/webhooksGenerateSecret.ts +144 -0
- package/src/funcs/webhooksGet.ts +168 -0
- package/src/funcs/webhooksList.ts +175 -0
- package/src/funcs/webhooksQuery.ts +164 -0
- package/src/funcs/webhooksUpdate.ts +168 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/countwebhooksresponse.ts +37 -0
- package/src/models/components/createwebhookrequest.ts +100 -0
- package/src/models/components/deletewebhookresponse.ts +34 -0
- 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/generatewebhooksecretresponse.ts +37 -0
- package/src/models/components/index.ts +10 -0
- package/src/models/components/listwebhooksresponse.ts +53 -0
- package/src/models/components/queryparamspagination.ts +40 -0
- package/src/models/components/queryparamssort.ts +32 -0
- package/src/models/components/querywebhooksrequest.ts +85 -0
- package/src/models/components/querywebhooksresponse.ts +34 -0
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/components/webhook.ts +116 -0
- package/src/models/operations/createagentrequest.ts +2 -2
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +237 -19
- package/src/models/operations/createdatasource.ts +78 -2
- package/src/models/operations/createrouterresponse.ts +41 -5
- 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/index.ts +4 -0
- package/src/models/operations/listagents.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +313 -84
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +99 -2
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/postv2feedbackevaluation.ts +119 -11
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrieveagentrequest.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +234 -9
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +72 -2
- 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 +229 -9
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +72 -2
- package/src/models/operations/updatetool.ts +7 -7
- package/src/models/operations/webhookdelete.ts +31 -0
- package/src/models/operations/webhookget.ts +31 -0
- package/src/models/operations/webhooklist.ts +101 -0
- package/src/models/operations/webhookupdate.ts +84 -0
- package/src/sdk/feedback.ts +4 -1
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/webhooks.ts +152 -0
|
@@ -0,0 +1,168 @@
|
|
|
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 {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { OrqError } from "../models/errors/orqerror.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Update a webhook
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Updates the supplied fields on a webhook in the current workspace. Omitted fields are unchanged. The response contains the applied fields rather than the complete webhook.
|
|
33
|
+
*/
|
|
34
|
+
export function webhooksUpdate(
|
|
35
|
+
client: OrqCore,
|
|
36
|
+
request: operations.WebhookUpdateRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.WebhookUpdateResponseBody,
|
|
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: operations.WebhookUpdateRequest,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
operations.WebhookUpdateResponseBody,
|
|
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) => operations.WebhookUpdateRequest$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.RequestBody, { explode: true });
|
|
88
|
+
|
|
89
|
+
const pathParams = {
|
|
90
|
+
id: encodeSimple("id", payload.id, {
|
|
91
|
+
explode: false,
|
|
92
|
+
charEncoding: "percent",
|
|
93
|
+
}),
|
|
94
|
+
};
|
|
95
|
+
const path = pathToFunc("/v2/webhooks/{id}")(pathParams);
|
|
96
|
+
|
|
97
|
+
const headers = new Headers(compactMap({
|
|
98
|
+
"Content-Type": "application/json",
|
|
99
|
+
Accept: "application/json",
|
|
100
|
+
}));
|
|
101
|
+
|
|
102
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
103
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
104
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
105
|
+
|
|
106
|
+
const context = {
|
|
107
|
+
options: client._options,
|
|
108
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
109
|
+
operationID: "WebhookUpdate",
|
|
110
|
+
oAuth2Scopes: null,
|
|
111
|
+
|
|
112
|
+
resolvedSecurity: requestSecurity,
|
|
113
|
+
|
|
114
|
+
securitySource: client._options.apiKey,
|
|
115
|
+
retryConfig: options?.retries
|
|
116
|
+
|| client._options.retryConfig
|
|
117
|
+
|| { strategy: "none" },
|
|
118
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
const requestRes = client._createRequest(context, {
|
|
122
|
+
security: requestSecurity,
|
|
123
|
+
method: "PATCH",
|
|
124
|
+
baseURL: options?.serverURL,
|
|
125
|
+
path: path,
|
|
126
|
+
headers: headers,
|
|
127
|
+
body: body,
|
|
128
|
+
userAgent: client._options.userAgent,
|
|
129
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
130
|
+
}, options);
|
|
131
|
+
if (!requestRes.ok) {
|
|
132
|
+
return [requestRes, { status: "invalid" }];
|
|
133
|
+
}
|
|
134
|
+
const req = requestRes.value;
|
|
135
|
+
|
|
136
|
+
const doResult = await client._do(req, {
|
|
137
|
+
context,
|
|
138
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
139
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
140
|
+
retryConfig: context.retryConfig,
|
|
141
|
+
retryCodes: context.retryCodes,
|
|
142
|
+
});
|
|
143
|
+
if (!doResult.ok) {
|
|
144
|
+
return [doResult, { status: "request-error", request: req }];
|
|
145
|
+
}
|
|
146
|
+
const response = doResult.value;
|
|
147
|
+
|
|
148
|
+
const [result] = await M.match<
|
|
149
|
+
operations.WebhookUpdateResponseBody,
|
|
150
|
+
| OrqError
|
|
151
|
+
| ResponseValidationError
|
|
152
|
+
| ConnectionError
|
|
153
|
+
| RequestAbortedError
|
|
154
|
+
| RequestTimeoutError
|
|
155
|
+
| InvalidRequestError
|
|
156
|
+
| UnexpectedClientError
|
|
157
|
+
| SDKValidationError
|
|
158
|
+
>(
|
|
159
|
+
M.json(200, operations.WebhookUpdateResponseBody$inboundSchema),
|
|
160
|
+
M.fail("4XX"),
|
|
161
|
+
M.fail("5XX"),
|
|
162
|
+
)(response, req);
|
|
163
|
+
if (!result.ok) {
|
|
164
|
+
return [result, { status: "complete", request: req, response }];
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return [result, { status: "complete", request: req, response }];
|
|
168
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -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.
|
|
61
|
+
sdkVersion: "4.12.0-rc.36",
|
|
62
62
|
genVersion: "2.918.3",
|
|
63
|
-
userAgent: "speakeasy-sdk/typescript 4.12.0-rc.
|
|
63
|
+
userAgent: "speakeasy-sdk/typescript 4.12.0-rc.36 2.918.3 2.0 @orq-ai/node",
|
|
64
64
|
} as const;
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Webhook count for the current workspace.
|
|
12
|
+
*/
|
|
13
|
+
export type CountWebhooksResponse = {
|
|
14
|
+
/**
|
|
15
|
+
* Total number of webhooks in the current workspace.
|
|
16
|
+
*/
|
|
17
|
+
total: number;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const CountWebhooksResponse$inboundSchema: z.ZodType<
|
|
22
|
+
CountWebhooksResponse,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
total: z.number().int(),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function countWebhooksResponseFromJSON(
|
|
30
|
+
jsonString: string,
|
|
31
|
+
): SafeParseResult<CountWebhooksResponse, SDKValidationError> {
|
|
32
|
+
return safeParse(
|
|
33
|
+
jsonString,
|
|
34
|
+
(x) => CountWebhooksResponse$inboundSchema.parse(JSON.parse(x)),
|
|
35
|
+
`Failed to parse 'CountWebhooksResponse' from JSON`,
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Content type sent with webhook deliveries.
|
|
11
|
+
*/
|
|
12
|
+
export const CreateWebhookRequestContentType = {
|
|
13
|
+
ApplicationJson: "application/json",
|
|
14
|
+
ApplicationXWwwFormUrlencoded: "application/x-www-form-urlencoded",
|
|
15
|
+
} as const;
|
|
16
|
+
/**
|
|
17
|
+
* Content type sent with webhook deliveries.
|
|
18
|
+
*/
|
|
19
|
+
export type CreateWebhookRequestContentType = ClosedEnum<
|
|
20
|
+
typeof CreateWebhookRequestContentType
|
|
21
|
+
>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Configuration used to create a webhook in the current workspace.
|
|
25
|
+
*/
|
|
26
|
+
export type CreateWebhookRequest = {
|
|
27
|
+
/**
|
|
28
|
+
* Client-generated webhook ID.
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* HTTPS endpoint that receives webhook deliveries.
|
|
33
|
+
*/
|
|
34
|
+
url: string;
|
|
35
|
+
/**
|
|
36
|
+
* Content type sent with webhook deliveries.
|
|
37
|
+
*/
|
|
38
|
+
contentType: CreateWebhookRequestContentType;
|
|
39
|
+
/**
|
|
40
|
+
* Human-readable webhook name.
|
|
41
|
+
*/
|
|
42
|
+
displayName: string;
|
|
43
|
+
/**
|
|
44
|
+
* One or more workspace event slugs that trigger a delivery, for example `deployment.invoked` or `llm.response`.
|
|
45
|
+
*/
|
|
46
|
+
events: Array<string>;
|
|
47
|
+
/**
|
|
48
|
+
* Signing secret returned by `GET /v2/webhooks/secret`.
|
|
49
|
+
*/
|
|
50
|
+
secret: string;
|
|
51
|
+
/**
|
|
52
|
+
* Whether webhook deliveries are enabled.
|
|
53
|
+
*/
|
|
54
|
+
enabled?: boolean | undefined;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const CreateWebhookRequestContentType$outboundSchema: z.ZodNativeEnum<
|
|
59
|
+
typeof CreateWebhookRequestContentType
|
|
60
|
+
> = z.nativeEnum(CreateWebhookRequestContentType);
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export type CreateWebhookRequest$Outbound = {
|
|
64
|
+
_id: string;
|
|
65
|
+
url: string;
|
|
66
|
+
content_type: string;
|
|
67
|
+
display_name: string;
|
|
68
|
+
events: Array<string>;
|
|
69
|
+
secret: string;
|
|
70
|
+
enabled?: boolean | undefined;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const CreateWebhookRequest$outboundSchema: z.ZodType<
|
|
75
|
+
CreateWebhookRequest$Outbound,
|
|
76
|
+
z.ZodTypeDef,
|
|
77
|
+
CreateWebhookRequest
|
|
78
|
+
> = z.object({
|
|
79
|
+
id: z.string(),
|
|
80
|
+
url: z.string(),
|
|
81
|
+
contentType: CreateWebhookRequestContentType$outboundSchema,
|
|
82
|
+
displayName: z.string(),
|
|
83
|
+
events: z.array(z.string()),
|
|
84
|
+
secret: z.string(),
|
|
85
|
+
enabled: z.boolean().optional(),
|
|
86
|
+
}).transform((v) => {
|
|
87
|
+
return remap$(v, {
|
|
88
|
+
id: "_id",
|
|
89
|
+
contentType: "content_type",
|
|
90
|
+
displayName: "display_name",
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
export function createWebhookRequestToJSON(
|
|
95
|
+
createWebhookRequest: CreateWebhookRequest,
|
|
96
|
+
): string {
|
|
97
|
+
return JSON.stringify(
|
|
98
|
+
CreateWebhookRequest$outboundSchema.parse(createWebhookRequest),
|
|
99
|
+
);
|
|
100
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
|
|
10
|
+
export type DeleteWebhookResponse = {
|
|
11
|
+
/**
|
|
12
|
+
* ID of the deleted webhook.
|
|
13
|
+
*/
|
|
14
|
+
id: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const DeleteWebhookResponse$inboundSchema: z.ZodType<
|
|
19
|
+
DeleteWebhookResponse,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
id: z.string(),
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export function deleteWebhookResponseFromJSON(
|
|
27
|
+
jsonString: string,
|
|
28
|
+
): SafeParseResult<DeleteWebhookResponse, SDKValidationError> {
|
|
29
|
+
return safeParse(
|
|
30
|
+
jsonString,
|
|
31
|
+
(x) => DeleteWebhookResponse$inboundSchema.parse(JSON.parse(x)),
|
|
32
|
+
`Failed to parse 'DeleteWebhookResponse' from JSON`,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -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-17T02:34:29.037Z"),
|
|
860
|
+
updated: z.string().default("2026-07-17T02:34:29.037Z"),
|
|
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-17T02:34:29.037Z"),
|
|
46
|
+
updated: z.string().default("2026-07-17T02:34:29.037Z"),
|
|
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-17T02:34:29.037Z"),
|
|
32
|
+
updated: z.string().default("2026-07-17T02:34:29.037Z"),
|
|
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-17T02:34:29.037Z"),
|
|
271
|
+
updated: z.string().default("2026-07-17T02:34:29.037Z"),
|
|
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-17T02:34:29.037Z"),
|
|
32
|
+
updated: z.string().default("2026-07-17T02:34:29.037Z"),
|
|
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-17T02:34:29.037Z"),
|
|
54
|
+
updated: z.string().default("2026-07-17T02:34:29.037Z"),
|
|
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-17T02:34:29.037Z"),
|
|
32
|
+
updated: z.string().default("2026-07-17T02:34:29.037Z"),
|
|
33
33
|
updated_by_id: z.nullable(z.string()).optional(),
|
|
34
34
|
guardrail_config: z.any().optional(),
|
|
35
35
|
code: z.string(),
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A newly generated webhook signing secret.
|
|
12
|
+
*/
|
|
13
|
+
export type GenerateWebhookSecretResponse = {
|
|
14
|
+
/**
|
|
15
|
+
* Signing secret to supply when creating or updating a webhook. Store it securely.
|
|
16
|
+
*/
|
|
17
|
+
secret: string;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const GenerateWebhookSecretResponse$inboundSchema: z.ZodType<
|
|
22
|
+
GenerateWebhookSecretResponse,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
secret: z.string(),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function generateWebhookSecretResponseFromJSON(
|
|
30
|
+
jsonString: string,
|
|
31
|
+
): SafeParseResult<GenerateWebhookSecretResponse, SDKValidationError> {
|
|
32
|
+
return safeParse(
|
|
33
|
+
jsonString,
|
|
34
|
+
(x) => GenerateWebhookSecretResponse$inboundSchema.parse(JSON.parse(x)),
|
|
35
|
+
`Failed to parse 'GenerateWebhookSecretResponse' from JSON`,
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -42,6 +42,7 @@ export * from "./checkbudgetsrequest.js";
|
|
|
42
42
|
export * from "./checkbudgetsresponse.js";
|
|
43
43
|
export * from "./config.js";
|
|
44
44
|
export * from "./conversationparam.js";
|
|
45
|
+
export * from "./countwebhooksresponse.js";
|
|
45
46
|
export * from "./createagentresponse.js";
|
|
46
47
|
export * from "./createapikeyrequest.js";
|
|
47
48
|
export * from "./createapikeyresponse.js";
|
|
@@ -60,6 +61,7 @@ export * from "./createprojectrequest.js";
|
|
|
60
61
|
export * from "./createprojectresponse.js";
|
|
61
62
|
export * from "./createskillrequest.js";
|
|
62
63
|
export * from "./createskillresponse.js";
|
|
64
|
+
export * from "./createwebhookrequest.js";
|
|
63
65
|
export * from "./datapart.js";
|
|
64
66
|
export * from "./datapoint.js";
|
|
65
67
|
export * from "./deleteapikeyresponse.js";
|
|
@@ -70,6 +72,7 @@ export * from "./deletemanagementkeyresponse.js";
|
|
|
70
72
|
export * from "./deletenotifierresponse.js";
|
|
71
73
|
export * from "./deleteprojectresponse.js";
|
|
72
74
|
export * from "./deleteskillresponse.js";
|
|
75
|
+
export * from "./deletewebhookresponse.js";
|
|
73
76
|
export * from "./detectrequest.js";
|
|
74
77
|
export * from "./detectresponse.js";
|
|
75
78
|
export * from "./dimensioninfo.js";
|
|
@@ -103,6 +106,7 @@ export * from "./filecontentpartschema.js";
|
|
|
103
106
|
export * from "./filepart.js";
|
|
104
107
|
export * from "./filepurpose.js";
|
|
105
108
|
export * from "./filter.js";
|
|
109
|
+
export * from "./generatewebhooksecretresponse.js";
|
|
106
110
|
export * from "./getagentresponse.js";
|
|
107
111
|
export * from "./getapikeyresponse.js";
|
|
108
112
|
export * from "./getbudgetconsumptionresponse.js";
|
|
@@ -141,6 +145,7 @@ export * from "./listtracefacetsresponse.js";
|
|
|
141
145
|
export * from "./listtracefacetvaluesresponse.js";
|
|
142
146
|
export * from "./listtracefieldsresponse.js";
|
|
143
147
|
export * from "./listtracespansresponse.js";
|
|
148
|
+
export * from "./listwebhooksresponse.js";
|
|
144
149
|
export * from "./litellmmodel.js";
|
|
145
150
|
export * from "./litellmmodelinfo.js";
|
|
146
151
|
export * from "./litellmparams.js";
|
|
@@ -188,6 +193,8 @@ export * from "./publicschedule.js";
|
|
|
188
193
|
export * from "./publicscheduleerrordetail.js";
|
|
189
194
|
export * from "./publicschedulepayload.js";
|
|
190
195
|
export * from "./publicusage.js";
|
|
196
|
+
export * from "./queryparamspagination.js";
|
|
197
|
+
export * from "./queryparamssort.js";
|
|
191
198
|
export * from "./queryreportrequest.js";
|
|
192
199
|
export * from "./queryreportresponse.js";
|
|
193
200
|
export * from "./querytelemetrymeta.js";
|
|
@@ -195,6 +202,8 @@ export * from "./querytelemetryrequest.js";
|
|
|
195
202
|
export * from "./querytelemetryresponse.js";
|
|
196
203
|
export * from "./querytracesrequest.js";
|
|
197
204
|
export * from "./querytracesresponse.js";
|
|
205
|
+
export * from "./querywebhooksrequest.js";
|
|
206
|
+
export * from "./querywebhooksresponse.js";
|
|
198
207
|
export * from "./ratelimit.js";
|
|
199
208
|
export * from "./reasoning.js";
|
|
200
209
|
export * from "./reasoningparam.js";
|
|
@@ -335,4 +344,5 @@ export * from "./vertexmodelconfiguration.js";
|
|
|
335
344
|
export * from "./vertexparameters.js";
|
|
336
345
|
export * from "./vertexparamrange.js";
|
|
337
346
|
export * from "./vertexparamrangeint.js";
|
|
347
|
+
export * from "./webhook.js";
|
|
338
348
|
export * from "./workspacebudgetscope.js";
|
|
@@ -0,0 +1,53 @@
|
|
|
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 { Webhook, Webhook$inboundSchema } from "./webhook.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* A page of webhooks and the total number of matching records.
|
|
14
|
+
*/
|
|
15
|
+
export type ListWebhooksResponse = {
|
|
16
|
+
/**
|
|
17
|
+
* Total number of webhooks matching the filters, before pagination.
|
|
18
|
+
*/
|
|
19
|
+
count: number;
|
|
20
|
+
/**
|
|
21
|
+
* Requested page of webhooks.
|
|
22
|
+
*/
|
|
23
|
+
items: Array<Webhook>;
|
|
24
|
+
/**
|
|
25
|
+
* Whether another page of matching webhooks is available.
|
|
26
|
+
*/
|
|
27
|
+
hasMore: boolean;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const ListWebhooksResponse$inboundSchema: z.ZodType<
|
|
32
|
+
ListWebhooksResponse,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
count: z.number().int(),
|
|
37
|
+
items: z.array(Webhook$inboundSchema),
|
|
38
|
+
has_more: z.boolean(),
|
|
39
|
+
}).transform((v) => {
|
|
40
|
+
return remap$(v, {
|
|
41
|
+
"has_more": "hasMore",
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export function listWebhooksResponseFromJSON(
|
|
46
|
+
jsonString: string,
|
|
47
|
+
): SafeParseResult<ListWebhooksResponse, SDKValidationError> {
|
|
48
|
+
return safeParse(
|
|
49
|
+
jsonString,
|
|
50
|
+
(x) => ListWebhooksResponse$inboundSchema.parse(JSON.parse(x)),
|
|
51
|
+
`Failed to parse 'ListWebhooksResponse' from JSON`,
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -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 QueryParamsPagination = {
|
|
8
|
+
page?: number | undefined;
|
|
9
|
+
limit?: number | undefined;
|
|
10
|
+
lastId?: string | undefined;
|
|
11
|
+
firstId?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type QueryParamsPagination$Outbound = {
|
|
16
|
+
page?: number | undefined;
|
|
17
|
+
limit?: number | undefined;
|
|
18
|
+
lastId?: string | undefined;
|
|
19
|
+
firstId?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const QueryParamsPagination$outboundSchema: z.ZodType<
|
|
24
|
+
QueryParamsPagination$Outbound,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
QueryParamsPagination
|
|
27
|
+
> = z.object({
|
|
28
|
+
page: z.number().int().optional(),
|
|
29
|
+
limit: z.number().int().optional(),
|
|
30
|
+
lastId: z.string().optional(),
|
|
31
|
+
firstId: z.string().optional(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export function queryParamsPaginationToJSON(
|
|
35
|
+
queryParamsPagination: QueryParamsPagination,
|
|
36
|
+
): string {
|
|
37
|
+
return JSON.stringify(
|
|
38
|
+
QueryParamsPagination$outboundSchema.parse(queryParamsPagination),
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -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
|
+
|
|
7
|
+
export type QueryParamsSort = {
|
|
8
|
+
key?: string | undefined;
|
|
9
|
+
direction?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export type QueryParamsSort$Outbound = {
|
|
14
|
+
key?: string | undefined;
|
|
15
|
+
direction?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const QueryParamsSort$outboundSchema: z.ZodType<
|
|
20
|
+
QueryParamsSort$Outbound,
|
|
21
|
+
z.ZodTypeDef,
|
|
22
|
+
QueryParamsSort
|
|
23
|
+
> = z.object({
|
|
24
|
+
key: z.string().optional(),
|
|
25
|
+
direction: z.string().optional(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export function queryParamsSortToJSON(
|
|
29
|
+
queryParamsSort: QueryParamsSort,
|
|
30
|
+
): string {
|
|
31
|
+
return JSON.stringify(QueryParamsSort$outboundSchema.parse(queryParamsSort));
|
|
32
|
+
}
|