@orq-ai/node 4.11.0 → 4.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- 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/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +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/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/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +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/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 +3 -3
- package/packages/orq-rc/src/funcs/notifiersCreate.ts +162 -0
- package/packages/orq-rc/src/funcs/notifiersDelete.ts +168 -0
- package/packages/orq-rc/src/funcs/notifiersGet.ts +168 -0
- package/packages/orq-rc/src/funcs/notifiersList.ts +171 -0
- package/packages/orq-rc/src/funcs/notifiersUpdate.ts +171 -0
- package/packages/orq-rc/src/funcs/tracesAggregate.ts +162 -0
- package/packages/orq-rc/src/funcs/tracesGet.ts +168 -0
- package/packages/orq-rc/src/funcs/tracesGetSpan.ts +172 -0
- package/packages/orq-rc/src/funcs/tracesListFacetValues.ts +177 -0
- package/packages/orq-rc/src/funcs/tracesListFacets.ts +144 -0
- package/packages/orq-rc/src/funcs/tracesListFields.ts +144 -0
- package/packages/orq-rc/src/funcs/tracesListSpans.ts +174 -0
- package/packages/orq-rc/src/funcs/tracesQuery.ts +162 -0
- package/packages/orq-rc/src/funcs/tracesSearch.ts +162 -0
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +5 -0
- package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +5 -0
- package/packages/orq-rc/src/models/components/aggregatetracesrequest.ts +65 -0
- package/packages/orq-rc/src/models/components/aggregatetracesresponse.ts +37 -0
- package/packages/orq-rc/src/models/components/createnotifierrequest.ts +433 -0
- package/packages/orq-rc/src/models/components/createnotifierresponse.ts +35 -0
- package/packages/orq-rc/src/models/components/deletenotifierresponse.ts +27 -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/getnotifierresponse.ts +35 -0
- package/packages/orq-rc/src/models/components/gettraceresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/gettracespanresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/index.ts +36 -0
- package/packages/orq-rc/src/models/components/listnotifiersresponse.ts +50 -0
- package/packages/orq-rc/src/models/components/listtracefacetsresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/listtracefacetvaluesresponse.ts +44 -0
- package/packages/orq-rc/src/models/components/listtracefieldsresponse.ts +32 -0
- package/packages/orq-rc/src/models/components/listtracespansresponse.ts +44 -0
- package/packages/orq-rc/src/models/components/notifier.ts +465 -0
- package/packages/orq-rc/src/models/components/notifiertype.ts +21 -0
- package/packages/orq-rc/src/models/components/querytracesrequest.ts +48 -0
- package/packages/orq-rc/src/models/components/querytracesresponse.ts +37 -0
- package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
- package/packages/orq-rc/src/models/components/searchtracesrequest.ts +68 -0
- package/packages/orq-rc/src/models/components/searchtracesresponse.ts +72 -0
- package/packages/orq-rc/src/models/components/spandetail.ts +53 -0
- package/packages/orq-rc/src/models/components/spansummary.ts +76 -0
- package/packages/orq-rc/src/models/components/traceagent.ts +33 -0
- package/packages/orq-rc/src/models/components/traceaggregaterow.ts +33 -0
- package/packages/orq-rc/src/models/components/tracecompute.ts +30 -0
- package/packages/orq-rc/src/models/components/tracecontext.ts +39 -0
- package/packages/orq-rc/src/models/components/tracecost.ts +77 -0
- package/packages/orq-rc/src/models/components/tracefacet.ts +35 -0
- package/packages/orq-rc/src/models/components/tracefacetvalue.ts +33 -0
- package/packages/orq-rc/src/models/components/tracefield.ts +56 -0
- package/packages/orq-rc/src/models/components/tracefilter.ts +33 -0
- package/packages/orq-rc/src/models/components/tracesearchmeta.ts +45 -0
- package/packages/orq-rc/src/models/components/tracesort.ts +30 -0
- package/packages/orq-rc/src/models/components/tracesummary.ts +152 -0
- package/packages/orq-rc/src/models/components/traceusage.ts +62 -0
- package/packages/orq-rc/src/models/components/updatenotifierrequest.ts +130 -0
- package/packages/orq-rc/src/models/components/updatenotifierresponse.ts +35 -0
- package/packages/orq-rc/src/models/operations/createagentrequest.ts +77 -0
- package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +4 -4
- package/packages/orq-rc/src/models/operations/createdatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/createprompt.ts +2 -0
- package/packages/orq-rc/src/models/operations/createtool.ts +6 -6
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +2 -0
- package/packages/orq-rc/src/models/operations/deployments.ts +2 -0
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +2 -0
- package/packages/orq-rc/src/models/operations/getallprompts.ts +2 -0
- package/packages/orq-rc/src/models/operations/getalltools.ts +6 -6
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +2 -0
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +2 -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/index.ts +8 -0
- package/packages/orq-rc/src/models/operations/listagents.ts +5 -0
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +4 -4
- 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 +2 -0
- package/packages/orq-rc/src/models/operations/notifierdelete.ts +36 -0
- package/packages/orq-rc/src/models/operations/notifierget.ts +36 -0
- package/packages/orq-rc/src/models/operations/notifierlist.ts +59 -0
- package/packages/orq-rc/src/models/operations/notifierupdate.ts +41 -0
- package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +5 -0
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +4 -4
- 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 +67 -1
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +67 -1
- package/packages/orq-rc/src/models/operations/tracesget.ts +36 -0
- package/packages/orq-rc/src/models/operations/tracesgetspan.ts +40 -0
- package/packages/orq-rc/src/models/operations/traceslistfacetvalues.ts +50 -0
- package/packages/orq-rc/src/models/operations/traceslistspans.ts +43 -0
- package/packages/orq-rc/src/models/operations/updateagent.ts +77 -0
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +4 -4
- 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 +2 -0
- package/packages/orq-rc/src/models/operations/updatetool.ts +7 -7
- package/packages/orq-rc/src/sdk/feedback.ts +2 -2
- package/packages/orq-rc/src/sdk/notifiers.ts +100 -0
- package/packages/orq-rc/src/sdk/sdk.ts +12 -0
- package/packages/orq-rc/src/sdk/traces.ts +168 -0
- package/sdk/feedback.d.ts +2 -2
- package/sdk/feedback.js +2 -2
- package/src/lib/config.ts +2 -2
- 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/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- 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/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/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- 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/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 +2 -2
|
@@ -0,0 +1,433 @@
|
|
|
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 { NotifierType, NotifierType$outboundSchema } from "./notifiertype.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Optional. Custom JSON metadata stored with the notifier.
|
|
11
|
+
*/
|
|
12
|
+
export type CreateNotifierRequest3Metadata = {};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Optional generic webhook headers. Each value may be a string or `{ "secret": true, "value": "..." }`.
|
|
16
|
+
*/
|
|
17
|
+
export type CreateNotifierRequest3Headers = {};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* `webhook_url` is required when `type` is `NOTIFIER_TYPE_WEBHOOK`; `headers` is optional.
|
|
21
|
+
*/
|
|
22
|
+
export type GenericWebhookNotifierCreateRequest = {
|
|
23
|
+
type: NotifierType;
|
|
24
|
+
/**
|
|
25
|
+
* Required when `type` is `NOTIFIER_TYPE_WEBHOOK`. Omit for other notifier types.
|
|
26
|
+
*/
|
|
27
|
+
webhookUrl: string;
|
|
28
|
+
/**
|
|
29
|
+
* Optional. Workspace-scoped callers may set this to create a project-scoped notifier, or omit it for a workspace-wide notifier. Project-scoped API keys create in the API key's project.
|
|
30
|
+
*/
|
|
31
|
+
projectId?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Required. Human-readable notifier name.
|
|
34
|
+
*/
|
|
35
|
+
displayName: string;
|
|
36
|
+
/**
|
|
37
|
+
* Optional. Custom JSON metadata stored with the notifier.
|
|
38
|
+
*/
|
|
39
|
+
metadata?: CreateNotifierRequest3Metadata | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Required when `type` is `NOTIFIER_TYPE_EMAIL`. Omit for other notifier types.
|
|
42
|
+
*/
|
|
43
|
+
emails?: Array<string> | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Required when `type` is `NOTIFIER_TYPE_SLACK_WEBHOOK`. Omit for other notifier types.
|
|
46
|
+
*/
|
|
47
|
+
incomingWebhookUrl?: string | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Optional generic webhook headers. Each value may be a string or `{ "secret": true, "value": "..." }`.
|
|
50
|
+
*/
|
|
51
|
+
headers?: CreateNotifierRequest3Headers | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Optional. Custom JSON metadata stored with the notifier.
|
|
56
|
+
*/
|
|
57
|
+
export type CreateNotifierRequest2Metadata = {};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Optional generic webhook headers. Each value may be a string or `{ "secret": true, "value": "..." }`.
|
|
61
|
+
*/
|
|
62
|
+
export type CreateNotifierRequest2Headers = {};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* `incoming_webhook_url` is required when `type` is `NOTIFIER_TYPE_SLACK_WEBHOOK`.
|
|
66
|
+
*/
|
|
67
|
+
export type SlackWebhookNotifierCreateRequest = {
|
|
68
|
+
type: NotifierType;
|
|
69
|
+
/**
|
|
70
|
+
* Required when `type` is `NOTIFIER_TYPE_SLACK_WEBHOOK`. Omit for other notifier types.
|
|
71
|
+
*/
|
|
72
|
+
incomingWebhookUrl: string;
|
|
73
|
+
/**
|
|
74
|
+
* Optional. Workspace-scoped callers may set this to create a project-scoped notifier, or omit it for a workspace-wide notifier. Project-scoped API keys create in the API key's project.
|
|
75
|
+
*/
|
|
76
|
+
projectId?: string | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* Required. Human-readable notifier name.
|
|
79
|
+
*/
|
|
80
|
+
displayName: string;
|
|
81
|
+
/**
|
|
82
|
+
* Optional. Custom JSON metadata stored with the notifier.
|
|
83
|
+
*/
|
|
84
|
+
metadata?: CreateNotifierRequest2Metadata | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Required when `type` is `NOTIFIER_TYPE_EMAIL`. Omit for other notifier types.
|
|
87
|
+
*/
|
|
88
|
+
emails?: Array<string> | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Required when `type` is `NOTIFIER_TYPE_WEBHOOK`. Omit for other notifier types.
|
|
91
|
+
*/
|
|
92
|
+
webhookUrl?: string | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* Optional generic webhook headers. Each value may be a string or `{ "secret": true, "value": "..." }`.
|
|
95
|
+
*/
|
|
96
|
+
headers?: CreateNotifierRequest2Headers | undefined;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Optional. Custom JSON metadata stored with the notifier.
|
|
101
|
+
*/
|
|
102
|
+
export type CreateNotifierRequestMetadata = {};
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Optional generic webhook headers. Each value may be a string or `{ "secret": true, "value": "..." }`.
|
|
106
|
+
*/
|
|
107
|
+
export type CreateNotifierRequestHeaders = {};
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* `emails` is required when `type` is `NOTIFIER_TYPE_EMAIL`.
|
|
111
|
+
*/
|
|
112
|
+
export type EmailNotifierCreateRequest = {
|
|
113
|
+
type: NotifierType;
|
|
114
|
+
/**
|
|
115
|
+
* Required when `type` is `NOTIFIER_TYPE_EMAIL`. Omit for other notifier types.
|
|
116
|
+
*/
|
|
117
|
+
emails: Array<string>;
|
|
118
|
+
/**
|
|
119
|
+
* Optional. Workspace-scoped callers may set this to create a project-scoped notifier, or omit it for a workspace-wide notifier. Project-scoped API keys create in the API key's project.
|
|
120
|
+
*/
|
|
121
|
+
projectId?: string | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* Required. Human-readable notifier name.
|
|
124
|
+
*/
|
|
125
|
+
displayName: string;
|
|
126
|
+
/**
|
|
127
|
+
* Optional. Custom JSON metadata stored with the notifier.
|
|
128
|
+
*/
|
|
129
|
+
metadata?: CreateNotifierRequestMetadata | undefined;
|
|
130
|
+
/**
|
|
131
|
+
* Required when `type` is `NOTIFIER_TYPE_SLACK_WEBHOOK`. Omit for other notifier types.
|
|
132
|
+
*/
|
|
133
|
+
incomingWebhookUrl?: string | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* Required when `type` is `NOTIFIER_TYPE_WEBHOOK`. Omit for other notifier types.
|
|
136
|
+
*/
|
|
137
|
+
webhookUrl?: string | undefined;
|
|
138
|
+
/**
|
|
139
|
+
* Optional generic webhook headers. Each value may be a string or `{ "secret": true, "value": "..." }`.
|
|
140
|
+
*/
|
|
141
|
+
headers?: CreateNotifierRequestHeaders | undefined;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Create notifier request. `project_id`, `display_name`, and `type` are always required. The destination field required by `type` is captured in `oneOf`.
|
|
146
|
+
*/
|
|
147
|
+
export type CreateNotifierRequest =
|
|
148
|
+
| EmailNotifierCreateRequest
|
|
149
|
+
| SlackWebhookNotifierCreateRequest
|
|
150
|
+
| GenericWebhookNotifierCreateRequest;
|
|
151
|
+
|
|
152
|
+
/** @internal */
|
|
153
|
+
export type CreateNotifierRequest3Metadata$Outbound = {};
|
|
154
|
+
|
|
155
|
+
/** @internal */
|
|
156
|
+
export const CreateNotifierRequest3Metadata$outboundSchema: z.ZodType<
|
|
157
|
+
CreateNotifierRequest3Metadata$Outbound,
|
|
158
|
+
z.ZodTypeDef,
|
|
159
|
+
CreateNotifierRequest3Metadata
|
|
160
|
+
> = z.object({});
|
|
161
|
+
|
|
162
|
+
export function createNotifierRequest3MetadataToJSON(
|
|
163
|
+
createNotifierRequest3Metadata: CreateNotifierRequest3Metadata,
|
|
164
|
+
): string {
|
|
165
|
+
return JSON.stringify(
|
|
166
|
+
CreateNotifierRequest3Metadata$outboundSchema.parse(
|
|
167
|
+
createNotifierRequest3Metadata,
|
|
168
|
+
),
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** @internal */
|
|
173
|
+
export type CreateNotifierRequest3Headers$Outbound = {};
|
|
174
|
+
|
|
175
|
+
/** @internal */
|
|
176
|
+
export const CreateNotifierRequest3Headers$outboundSchema: z.ZodType<
|
|
177
|
+
CreateNotifierRequest3Headers$Outbound,
|
|
178
|
+
z.ZodTypeDef,
|
|
179
|
+
CreateNotifierRequest3Headers
|
|
180
|
+
> = z.object({});
|
|
181
|
+
|
|
182
|
+
export function createNotifierRequest3HeadersToJSON(
|
|
183
|
+
createNotifierRequest3Headers: CreateNotifierRequest3Headers,
|
|
184
|
+
): string {
|
|
185
|
+
return JSON.stringify(
|
|
186
|
+
CreateNotifierRequest3Headers$outboundSchema.parse(
|
|
187
|
+
createNotifierRequest3Headers,
|
|
188
|
+
),
|
|
189
|
+
);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** @internal */
|
|
193
|
+
export type GenericWebhookNotifierCreateRequest$Outbound = {
|
|
194
|
+
type: string;
|
|
195
|
+
webhook_url: string;
|
|
196
|
+
project_id?: string | undefined;
|
|
197
|
+
display_name: string;
|
|
198
|
+
metadata?: CreateNotifierRequest3Metadata$Outbound | undefined;
|
|
199
|
+
emails?: Array<string> | undefined;
|
|
200
|
+
incoming_webhook_url?: string | undefined;
|
|
201
|
+
headers?: CreateNotifierRequest3Headers$Outbound | undefined;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
/** @internal */
|
|
205
|
+
export const GenericWebhookNotifierCreateRequest$outboundSchema: z.ZodType<
|
|
206
|
+
GenericWebhookNotifierCreateRequest$Outbound,
|
|
207
|
+
z.ZodTypeDef,
|
|
208
|
+
GenericWebhookNotifierCreateRequest
|
|
209
|
+
> = z.object({
|
|
210
|
+
type: NotifierType$outboundSchema,
|
|
211
|
+
webhookUrl: z.string(),
|
|
212
|
+
projectId: z.string().optional(),
|
|
213
|
+
displayName: z.string(),
|
|
214
|
+
metadata: z.lazy(() => CreateNotifierRequest3Metadata$outboundSchema)
|
|
215
|
+
.optional(),
|
|
216
|
+
emails: z.array(z.string()).optional(),
|
|
217
|
+
incomingWebhookUrl: z.string().optional(),
|
|
218
|
+
headers: z.lazy(() => CreateNotifierRequest3Headers$outboundSchema)
|
|
219
|
+
.optional(),
|
|
220
|
+
}).transform((v) => {
|
|
221
|
+
return remap$(v, {
|
|
222
|
+
webhookUrl: "webhook_url",
|
|
223
|
+
projectId: "project_id",
|
|
224
|
+
displayName: "display_name",
|
|
225
|
+
incomingWebhookUrl: "incoming_webhook_url",
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
export function genericWebhookNotifierCreateRequestToJSON(
|
|
230
|
+
genericWebhookNotifierCreateRequest: GenericWebhookNotifierCreateRequest,
|
|
231
|
+
): string {
|
|
232
|
+
return JSON.stringify(
|
|
233
|
+
GenericWebhookNotifierCreateRequest$outboundSchema.parse(
|
|
234
|
+
genericWebhookNotifierCreateRequest,
|
|
235
|
+
),
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/** @internal */
|
|
240
|
+
export type CreateNotifierRequest2Metadata$Outbound = {};
|
|
241
|
+
|
|
242
|
+
/** @internal */
|
|
243
|
+
export const CreateNotifierRequest2Metadata$outboundSchema: z.ZodType<
|
|
244
|
+
CreateNotifierRequest2Metadata$Outbound,
|
|
245
|
+
z.ZodTypeDef,
|
|
246
|
+
CreateNotifierRequest2Metadata
|
|
247
|
+
> = z.object({});
|
|
248
|
+
|
|
249
|
+
export function createNotifierRequest2MetadataToJSON(
|
|
250
|
+
createNotifierRequest2Metadata: CreateNotifierRequest2Metadata,
|
|
251
|
+
): string {
|
|
252
|
+
return JSON.stringify(
|
|
253
|
+
CreateNotifierRequest2Metadata$outboundSchema.parse(
|
|
254
|
+
createNotifierRequest2Metadata,
|
|
255
|
+
),
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/** @internal */
|
|
260
|
+
export type CreateNotifierRequest2Headers$Outbound = {};
|
|
261
|
+
|
|
262
|
+
/** @internal */
|
|
263
|
+
export const CreateNotifierRequest2Headers$outboundSchema: z.ZodType<
|
|
264
|
+
CreateNotifierRequest2Headers$Outbound,
|
|
265
|
+
z.ZodTypeDef,
|
|
266
|
+
CreateNotifierRequest2Headers
|
|
267
|
+
> = z.object({});
|
|
268
|
+
|
|
269
|
+
export function createNotifierRequest2HeadersToJSON(
|
|
270
|
+
createNotifierRequest2Headers: CreateNotifierRequest2Headers,
|
|
271
|
+
): string {
|
|
272
|
+
return JSON.stringify(
|
|
273
|
+
CreateNotifierRequest2Headers$outboundSchema.parse(
|
|
274
|
+
createNotifierRequest2Headers,
|
|
275
|
+
),
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/** @internal */
|
|
280
|
+
export type SlackWebhookNotifierCreateRequest$Outbound = {
|
|
281
|
+
type: string;
|
|
282
|
+
incoming_webhook_url: string;
|
|
283
|
+
project_id?: string | undefined;
|
|
284
|
+
display_name: string;
|
|
285
|
+
metadata?: CreateNotifierRequest2Metadata$Outbound | undefined;
|
|
286
|
+
emails?: Array<string> | undefined;
|
|
287
|
+
webhook_url?: string | undefined;
|
|
288
|
+
headers?: CreateNotifierRequest2Headers$Outbound | undefined;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
/** @internal */
|
|
292
|
+
export const SlackWebhookNotifierCreateRequest$outboundSchema: z.ZodType<
|
|
293
|
+
SlackWebhookNotifierCreateRequest$Outbound,
|
|
294
|
+
z.ZodTypeDef,
|
|
295
|
+
SlackWebhookNotifierCreateRequest
|
|
296
|
+
> = z.object({
|
|
297
|
+
type: NotifierType$outboundSchema,
|
|
298
|
+
incomingWebhookUrl: z.string(),
|
|
299
|
+
projectId: z.string().optional(),
|
|
300
|
+
displayName: z.string(),
|
|
301
|
+
metadata: z.lazy(() => CreateNotifierRequest2Metadata$outboundSchema)
|
|
302
|
+
.optional(),
|
|
303
|
+
emails: z.array(z.string()).optional(),
|
|
304
|
+
webhookUrl: z.string().optional(),
|
|
305
|
+
headers: z.lazy(() => CreateNotifierRequest2Headers$outboundSchema)
|
|
306
|
+
.optional(),
|
|
307
|
+
}).transform((v) => {
|
|
308
|
+
return remap$(v, {
|
|
309
|
+
incomingWebhookUrl: "incoming_webhook_url",
|
|
310
|
+
projectId: "project_id",
|
|
311
|
+
displayName: "display_name",
|
|
312
|
+
webhookUrl: "webhook_url",
|
|
313
|
+
});
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
export function slackWebhookNotifierCreateRequestToJSON(
|
|
317
|
+
slackWebhookNotifierCreateRequest: SlackWebhookNotifierCreateRequest,
|
|
318
|
+
): string {
|
|
319
|
+
return JSON.stringify(
|
|
320
|
+
SlackWebhookNotifierCreateRequest$outboundSchema.parse(
|
|
321
|
+
slackWebhookNotifierCreateRequest,
|
|
322
|
+
),
|
|
323
|
+
);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/** @internal */
|
|
327
|
+
export type CreateNotifierRequestMetadata$Outbound = {};
|
|
328
|
+
|
|
329
|
+
/** @internal */
|
|
330
|
+
export const CreateNotifierRequestMetadata$outboundSchema: z.ZodType<
|
|
331
|
+
CreateNotifierRequestMetadata$Outbound,
|
|
332
|
+
z.ZodTypeDef,
|
|
333
|
+
CreateNotifierRequestMetadata
|
|
334
|
+
> = z.object({});
|
|
335
|
+
|
|
336
|
+
export function createNotifierRequestMetadataToJSON(
|
|
337
|
+
createNotifierRequestMetadata: CreateNotifierRequestMetadata,
|
|
338
|
+
): string {
|
|
339
|
+
return JSON.stringify(
|
|
340
|
+
CreateNotifierRequestMetadata$outboundSchema.parse(
|
|
341
|
+
createNotifierRequestMetadata,
|
|
342
|
+
),
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/** @internal */
|
|
347
|
+
export type CreateNotifierRequestHeaders$Outbound = {};
|
|
348
|
+
|
|
349
|
+
/** @internal */
|
|
350
|
+
export const CreateNotifierRequestHeaders$outboundSchema: z.ZodType<
|
|
351
|
+
CreateNotifierRequestHeaders$Outbound,
|
|
352
|
+
z.ZodTypeDef,
|
|
353
|
+
CreateNotifierRequestHeaders
|
|
354
|
+
> = z.object({});
|
|
355
|
+
|
|
356
|
+
export function createNotifierRequestHeadersToJSON(
|
|
357
|
+
createNotifierRequestHeaders: CreateNotifierRequestHeaders,
|
|
358
|
+
): string {
|
|
359
|
+
return JSON.stringify(
|
|
360
|
+
CreateNotifierRequestHeaders$outboundSchema.parse(
|
|
361
|
+
createNotifierRequestHeaders,
|
|
362
|
+
),
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/** @internal */
|
|
367
|
+
export type EmailNotifierCreateRequest$Outbound = {
|
|
368
|
+
type: string;
|
|
369
|
+
emails: Array<string>;
|
|
370
|
+
project_id?: string | undefined;
|
|
371
|
+
display_name: string;
|
|
372
|
+
metadata?: CreateNotifierRequestMetadata$Outbound | undefined;
|
|
373
|
+
incoming_webhook_url?: string | undefined;
|
|
374
|
+
webhook_url?: string | undefined;
|
|
375
|
+
headers?: CreateNotifierRequestHeaders$Outbound | undefined;
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
/** @internal */
|
|
379
|
+
export const EmailNotifierCreateRequest$outboundSchema: z.ZodType<
|
|
380
|
+
EmailNotifierCreateRequest$Outbound,
|
|
381
|
+
z.ZodTypeDef,
|
|
382
|
+
EmailNotifierCreateRequest
|
|
383
|
+
> = z.object({
|
|
384
|
+
type: NotifierType$outboundSchema,
|
|
385
|
+
emails: z.array(z.string()),
|
|
386
|
+
projectId: z.string().optional(),
|
|
387
|
+
displayName: z.string(),
|
|
388
|
+
metadata: z.lazy(() => CreateNotifierRequestMetadata$outboundSchema)
|
|
389
|
+
.optional(),
|
|
390
|
+
incomingWebhookUrl: z.string().optional(),
|
|
391
|
+
webhookUrl: z.string().optional(),
|
|
392
|
+
headers: z.lazy(() => CreateNotifierRequestHeaders$outboundSchema).optional(),
|
|
393
|
+
}).transform((v) => {
|
|
394
|
+
return remap$(v, {
|
|
395
|
+
projectId: "project_id",
|
|
396
|
+
displayName: "display_name",
|
|
397
|
+
incomingWebhookUrl: "incoming_webhook_url",
|
|
398
|
+
webhookUrl: "webhook_url",
|
|
399
|
+
});
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
export function emailNotifierCreateRequestToJSON(
|
|
403
|
+
emailNotifierCreateRequest: EmailNotifierCreateRequest,
|
|
404
|
+
): string {
|
|
405
|
+
return JSON.stringify(
|
|
406
|
+
EmailNotifierCreateRequest$outboundSchema.parse(emailNotifierCreateRequest),
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/** @internal */
|
|
411
|
+
export type CreateNotifierRequest$Outbound =
|
|
412
|
+
| EmailNotifierCreateRequest$Outbound
|
|
413
|
+
| SlackWebhookNotifierCreateRequest$Outbound
|
|
414
|
+
| GenericWebhookNotifierCreateRequest$Outbound;
|
|
415
|
+
|
|
416
|
+
/** @internal */
|
|
417
|
+
export const CreateNotifierRequest$outboundSchema: z.ZodType<
|
|
418
|
+
CreateNotifierRequest$Outbound,
|
|
419
|
+
z.ZodTypeDef,
|
|
420
|
+
CreateNotifierRequest
|
|
421
|
+
> = z.union([
|
|
422
|
+
z.lazy(() => EmailNotifierCreateRequest$outboundSchema),
|
|
423
|
+
z.lazy(() => SlackWebhookNotifierCreateRequest$outboundSchema),
|
|
424
|
+
z.lazy(() => GenericWebhookNotifierCreateRequest$outboundSchema),
|
|
425
|
+
]);
|
|
426
|
+
|
|
427
|
+
export function createNotifierRequestToJSON(
|
|
428
|
+
createNotifierRequest: CreateNotifierRequest,
|
|
429
|
+
): string {
|
|
430
|
+
return JSON.stringify(
|
|
431
|
+
CreateNotifierRequest$outboundSchema.parse(createNotifierRequest),
|
|
432
|
+
);
|
|
433
|
+
}
|
|
@@ -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 { Notifier, Notifier$inboundSchema } from "./notifier.js";
|
|
10
|
+
|
|
11
|
+
export type CreateNotifierResponse = {
|
|
12
|
+
/**
|
|
13
|
+
* Notifier resource. The destination field present on the resource depends on `type` and is captured in `oneOf`.
|
|
14
|
+
*/
|
|
15
|
+
notifier: Notifier;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const CreateNotifierResponse$inboundSchema: z.ZodType<
|
|
20
|
+
CreateNotifierResponse,
|
|
21
|
+
z.ZodTypeDef,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.object({
|
|
24
|
+
notifier: Notifier$inboundSchema,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function createNotifierResponseFromJSON(
|
|
28
|
+
jsonString: string,
|
|
29
|
+
): SafeParseResult<CreateNotifierResponse, SDKValidationError> {
|
|
30
|
+
return safeParse(
|
|
31
|
+
jsonString,
|
|
32
|
+
(x) => CreateNotifierResponse$inboundSchema.parse(JSON.parse(x)),
|
|
33
|
+
`Failed to parse 'CreateNotifierResponse' from JSON`,
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 DeleteNotifierResponse = {};
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const DeleteNotifierResponse$inboundSchema: z.ZodType<
|
|
14
|
+
DeleteNotifierResponse,
|
|
15
|
+
z.ZodTypeDef,
|
|
16
|
+
unknown
|
|
17
|
+
> = z.object({});
|
|
18
|
+
|
|
19
|
+
export function deleteNotifierResponseFromJSON(
|
|
20
|
+
jsonString: string,
|
|
21
|
+
): SafeParseResult<DeleteNotifierResponse, SDKValidationError> {
|
|
22
|
+
return safeParse(
|
|
23
|
+
jsonString,
|
|
24
|
+
(x) => DeleteNotifierResponse$inboundSchema.parse(JSON.parse(x)),
|
|
25
|
+
`Failed to parse 'DeleteNotifierResponse' from JSON`,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
@@ -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-06T07:43:54.898Z"),
|
|
860
|
+
updated: z.string().default("2026-07-06T07:43:54.898Z"),
|
|
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-06T07:43:54.898Z"),
|
|
46
|
+
updated: z.string().default("2026-07-06T07:43:54.898Z"),
|
|
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-06T07:43:54.898Z"),
|
|
32
|
+
updated: z.string().default("2026-07-06T07:43:54.898Z"),
|
|
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-06T07:43:54.898Z"),
|
|
271
|
+
updated: z.string().default("2026-07-06T07:43:54.898Z"),
|
|
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-06T07:43:54.898Z"),
|
|
32
|
+
updated: z.string().default("2026-07-06T07:43:54.898Z"),
|
|
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-06T07:43:54.898Z"),
|
|
54
|
+
updated: z.string().default("2026-07-06T07:43:54.898Z"),
|
|
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-06T07:43:54.898Z"),
|
|
32
|
+
updated: z.string().default("2026-07-06T07:43:54.898Z"),
|
|
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,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 { Notifier, Notifier$inboundSchema } from "./notifier.js";
|
|
10
|
+
|
|
11
|
+
export type GetNotifierResponse = {
|
|
12
|
+
/**
|
|
13
|
+
* Notifier resource. The destination field present on the resource depends on `type` and is captured in `oneOf`.
|
|
14
|
+
*/
|
|
15
|
+
notifier: Notifier;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const GetNotifierResponse$inboundSchema: z.ZodType<
|
|
20
|
+
GetNotifierResponse,
|
|
21
|
+
z.ZodTypeDef,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.object({
|
|
24
|
+
notifier: Notifier$inboundSchema,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function getNotifierResponseFromJSON(
|
|
28
|
+
jsonString: string,
|
|
29
|
+
): SafeParseResult<GetNotifierResponse, SDKValidationError> {
|
|
30
|
+
return safeParse(
|
|
31
|
+
jsonString,
|
|
32
|
+
(x) => GetNotifierResponse$inboundSchema.parse(JSON.parse(x)),
|
|
33
|
+
`Failed to parse 'GetNotifierResponse' from JSON`,
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -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 { TraceSummary, TraceSummary$inboundSchema } from "./tracesummary.js";
|
|
10
|
+
|
|
11
|
+
export type GetTraceResponse = {
|
|
12
|
+
trace?: TraceSummary | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const GetTraceResponse$inboundSchema: z.ZodType<
|
|
17
|
+
GetTraceResponse,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.object({
|
|
21
|
+
trace: TraceSummary$inboundSchema.optional(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export function getTraceResponseFromJSON(
|
|
25
|
+
jsonString: string,
|
|
26
|
+
): SafeParseResult<GetTraceResponse, SDKValidationError> {
|
|
27
|
+
return safeParse(
|
|
28
|
+
jsonString,
|
|
29
|
+
(x) => GetTraceResponse$inboundSchema.parse(JSON.parse(x)),
|
|
30
|
+
`Failed to parse 'GetTraceResponse' from JSON`,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
@@ -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 { SpanDetail, SpanDetail$inboundSchema } from "./spandetail.js";
|
|
10
|
+
|
|
11
|
+
export type GetTraceSpanResponse = {
|
|
12
|
+
span?: SpanDetail | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const GetTraceSpanResponse$inboundSchema: z.ZodType<
|
|
17
|
+
GetTraceSpanResponse,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.object({
|
|
21
|
+
span: SpanDetail$inboundSchema.optional(),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export function getTraceSpanResponseFromJSON(
|
|
25
|
+
jsonString: string,
|
|
26
|
+
): SafeParseResult<GetTraceSpanResponse, SDKValidationError> {
|
|
27
|
+
return safeParse(
|
|
28
|
+
jsonString,
|
|
29
|
+
(x) => GetTraceSpanResponse$inboundSchema.parse(JSON.parse(x)),
|
|
30
|
+
`Failed to parse 'GetTraceSpanResponse' from JSON`,
|
|
31
|
+
);
|
|
32
|
+
}
|