@orq-ai/node 4.2.0-rc.29 → 4.2.0-rc.30
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/FUNCTIONS.md +7 -17
- package/README.md +82 -118
- package/bin/mcp-server.js +1687 -692
- package/bin/mcp-server.js.map +67 -49
- package/examples/feedbackCreate.example.ts +32 -0
- package/examples/package-lock.json +2 -2
- package/funcs/contactsCreate.d.ts +2 -0
- package/funcs/contactsCreate.d.ts.map +1 -1
- package/funcs/contactsCreate.js +2 -0
- package/funcs/contactsCreate.js.map +1 -1
- package/funcs/contactsDelete.d.ts +2 -0
- package/funcs/contactsDelete.d.ts.map +1 -1
- package/funcs/contactsDelete.js +2 -0
- package/funcs/contactsDelete.js.map +1 -1
- package/funcs/contactsList.d.ts +2 -0
- package/funcs/contactsList.d.ts.map +1 -1
- package/funcs/contactsList.js +2 -0
- package/funcs/contactsList.js.map +1 -1
- package/funcs/contactsRetrieve.d.ts +2 -0
- package/funcs/contactsRetrieve.d.ts.map +1 -1
- package/funcs/contactsRetrieve.js +2 -0
- package/funcs/contactsRetrieve.js.map +1 -1
- package/funcs/contactsUpdate.d.ts +2 -0
- package/funcs/contactsUpdate.d.ts.map +1 -1
- package/funcs/contactsUpdate.js +2 -0
- package/funcs/contactsUpdate.js.map +1 -1
- package/funcs/identitiesCreate.d.ts +17 -0
- package/funcs/identitiesCreate.d.ts.map +1 -0
- package/funcs/identitiesCreate.js +116 -0
- package/funcs/identitiesCreate.js.map +1 -0
- package/funcs/identitiesDelete.d.ts +18 -0
- package/funcs/identitiesDelete.d.ts.map +1 -0
- package/funcs/identitiesDelete.js +124 -0
- package/funcs/identitiesDelete.js.map +1 -0
- package/funcs/identitiesList.d.ts +17 -0
- package/funcs/identitiesList.d.ts.map +1 -0
- package/funcs/identitiesList.js +122 -0
- package/funcs/identitiesList.js.map +1 -0
- package/funcs/identitiesRetrieve.d.ts +18 -0
- package/funcs/identitiesRetrieve.d.ts.map +1 -0
- package/funcs/identitiesRetrieve.js +123 -0
- package/funcs/identitiesRetrieve.js.map +1 -0
- package/funcs/identitiesUpdate.d.ts +18 -0
- package/funcs/identitiesUpdate.d.ts.map +1 -0
- package/funcs/identitiesUpdate.js +124 -0
- package/funcs/identitiesUpdate.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +11 -1
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/identitiesCreate.d.ts +8 -0
- package/mcp-server/tools/identitiesCreate.d.ts.map +1 -0
- package/mcp-server/tools/identitiesCreate.js +64 -0
- package/mcp-server/tools/identitiesCreate.js.map +1 -0
- package/mcp-server/tools/identitiesDelete.d.ts +8 -0
- package/mcp-server/tools/identitiesDelete.d.ts.map +1 -0
- package/mcp-server/tools/identitiesDelete.js +63 -0
- package/mcp-server/tools/identitiesDelete.js.map +1 -0
- package/mcp-server/tools/identitiesList.d.ts +8 -0
- package/mcp-server/tools/identitiesList.d.ts.map +1 -0
- package/mcp-server/tools/identitiesList.js +64 -0
- package/mcp-server/tools/identitiesList.js.map +1 -0
- package/mcp-server/tools/identitiesRetrieve.d.ts +8 -0
- package/mcp-server/tools/identitiesRetrieve.d.ts.map +1 -0
- package/mcp-server/tools/identitiesRetrieve.js +64 -0
- package/mcp-server/tools/identitiesRetrieve.js.map +1 -0
- package/mcp-server/tools/identitiesUpdate.d.ts +8 -0
- package/mcp-server/tools/identitiesUpdate.d.ts.map +1 -0
- package/mcp-server/tools/identitiesUpdate.js +64 -0
- package/mcp-server/tools/identitiesUpdate.js.map +1 -0
- package/models/components/conversationresponse.js +2 -2
- package/models/components/conversationwithmessagesresponse.js +2 -2
- package/models/components/partdoneevent.js +2 -2
- package/models/components/reasoningpart.js +2 -2
- package/models/errors/deleteidentity.d.ts +36 -0
- package/models/errors/deleteidentity.d.ts.map +1 -0
- package/models/errors/deleteidentity.js +77 -0
- package/models/errors/deleteidentity.js.map +1 -0
- package/models/errors/index.d.ts +3 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +3 -0
- package/models/errors/index.js.map +1 -1
- package/models/errors/retrieveidentity.d.ts +36 -0
- package/models/errors/retrieveidentity.d.ts.map +1 -0
- package/models/errors/retrieveidentity.js +77 -0
- package/models/errors/retrieveidentity.js.map +1 -0
- package/models/errors/updateidentity.d.ts +32 -0
- package/models/errors/updateidentity.d.ts.map +1 -0
- package/models/errors/updateidentity.js +74 -0
- package/models/errors/updateidentity.js.map +1 -0
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createconversation.js +2 -2
- package/models/operations/createconversationresponse.js +4 -4
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +8 -8
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +28 -28
- package/models/operations/createidentity.d.ts +120 -0
- package/models/operations/createidentity.d.ts.map +1 -0
- package/models/operations/createidentity.js +133 -0
- package/models/operations/createidentity.js.map +1 -0
- package/models/operations/createtool.js +12 -12
- package/models/operations/deleteidentity.d.ts +20 -0
- package/models/operations/deleteidentity.d.ts.map +1 -0
- package/models/operations/deleteidentity.js +58 -0
- package/models/operations/deleteidentity.js.map +1 -0
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/generateconversationname.js +2 -2
- package/models/operations/getalltools.js +12 -12
- package/models/operations/getevals.js +28 -28
- package/models/operations/index.d.ts +5 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +5 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listcontacts.d.ts +8 -8
- package/models/operations/listcontacts.d.ts.map +1 -1
- package/models/operations/listcontacts.js +15 -13
- package/models/operations/listcontacts.js.map +1 -1
- package/models/operations/listdatasetdatapoints.js +8 -8
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/listidentities.d.ts +183 -0
- package/models/operations/listidentities.d.ts.map +1 -0
- package/models/operations/listidentities.js +220 -0
- package/models/operations/listidentities.js.map +1 -0
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +8 -8
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/retrieveidentity.d.ts +83 -0
- package/models/operations/retrieveidentity.d.ts.map +1 -0
- package/models/operations/retrieveidentity.js +107 -0
- package/models/operations/retrieveidentity.js.map +1 -0
- package/models/operations/retrievetool.js +12 -12
- package/models/operations/runagent.js +2 -2
- package/models/operations/streamrunagent.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updateconversation.js +2 -2
- package/models/operations/updatedatapoint.js +8 -8
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +28 -28
- package/models/operations/updateidentity.d.ts +131 -0
- package/models/operations/updateidentity.d.ts.map +1 -0
- package/models/operations/updateidentity.js +152 -0
- package/models/operations/updateidentity.js.map +1 -0
- package/models/operations/updatetool.js +14 -14
- package/package.json +2 -2
- package/sdk/contacts.d.ts +10 -0
- package/sdk/contacts.d.ts.map +1 -1
- package/sdk/contacts.js +10 -0
- package/sdk/contacts.js.map +1 -1
- package/sdk/identities.d.ts +40 -0
- package/sdk/identities.d.ts.map +1 -0
- package/sdk/identities.js +62 -0
- package/sdk/identities.js.map +1 -0
- 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/src/funcs/contactsCreate.ts +2 -0
- package/src/funcs/contactsDelete.ts +2 -0
- package/src/funcs/contactsList.ts +2 -0
- package/src/funcs/contactsRetrieve.ts +2 -0
- package/src/funcs/contactsUpdate.ts +2 -0
- package/src/funcs/identitiesCreate.ts +165 -0
- package/src/funcs/identitiesDelete.ts +176 -0
- package/src/funcs/identitiesList.ts +170 -0
- package/src/funcs/identitiesRetrieve.ts +175 -0
- package/src/funcs/identitiesUpdate.ts +176 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +11 -1
- package/src/mcp-server/tools/identitiesCreate.ts +37 -0
- package/src/mcp-server/tools/identitiesDelete.ts +35 -0
- package/src/mcp-server/tools/identitiesList.ts +37 -0
- package/src/mcp-server/tools/identitiesRetrieve.ts +37 -0
- package/src/mcp-server/tools/identitiesUpdate.ts +37 -0
- package/src/models/components/conversationresponse.ts +2 -2
- package/src/models/components/conversationwithmessagesresponse.ts +2 -2
- package/src/models/components/partdoneevent.ts +2 -2
- package/src/models/components/reasoningpart.ts +2 -2
- package/src/models/errors/deleteidentity.ts +78 -0
- package/src/models/errors/index.ts +3 -0
- package/src/models/errors/retrieveidentity.ts +78 -0
- package/src/models/errors/updateidentity.ts +70 -0
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createconversation.ts +2 -2
- package/src/models/operations/createconversationresponse.ts +4 -4
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +8 -8
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +28 -28
- package/src/models/operations/createidentity.ts +237 -0
- package/src/models/operations/createtool.ts +12 -12
- package/src/models/operations/deleteidentity.ts +54 -0
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/generateconversationname.ts +2 -2
- package/src/models/operations/getalltools.ts +12 -12
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/index.ts +5 -0
- package/src/models/operations/listcontacts.ts +24 -20
- package/src/models/operations/listdatasetdatapoints.ts +8 -8
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/listidentities.ts +432 -0
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +8 -8
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/retrieveidentity.ts +180 -0
- package/src/models/operations/retrievetool.ts +12 -12
- package/src/models/operations/runagent.ts +2 -2
- package/src/models/operations/streamrunagent.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updateconversation.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +8 -8
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +28 -28
- package/src/models/operations/updateidentity.ts +281 -0
- package/src/models/operations/updatetool.ts +14 -14
- package/src/sdk/contacts.ts +10 -0
- package/src/sdk/identities.ts +99 -0
- package/src/sdk/sdk.ts +6 -0
- package/examples/contactsCreate.example.ts +0 -42
|
@@ -0,0 +1,432 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Filter identities by tags. Can be provided as JSON object {"tags": ["premium", "beta-user"]} or as query format "tags=premium,beta-user"
|
|
14
|
+
*/
|
|
15
|
+
export type QueryParamFilterBy = {
|
|
16
|
+
tags?: Array<string> | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type ListIdentitiesRequest = {
|
|
20
|
+
/**
|
|
21
|
+
* A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
|
|
22
|
+
*/
|
|
23
|
+
limit?: number | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, ending with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `after=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the next page of the list.
|
|
26
|
+
*/
|
|
27
|
+
startingAfter?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, starting with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `before=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the previous page of the list.
|
|
30
|
+
*/
|
|
31
|
+
endingBefore?: string | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Search identities by display name or email address. Minimum 2 characters required.
|
|
34
|
+
*/
|
|
35
|
+
search?: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Filter identities by tags. Can be provided as JSON object {"tags": ["premium", "beta-user"]} or as query format "tags=premium,beta-user"
|
|
38
|
+
*/
|
|
39
|
+
filterBy?: QueryParamFilterBy | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Include usage metrics of the last 30 days for each identity.
|
|
42
|
+
*/
|
|
43
|
+
includeMetrics?: boolean | null | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const ListIdentitiesObject = {
|
|
47
|
+
List: "list",
|
|
48
|
+
} as const;
|
|
49
|
+
export type ListIdentitiesObject = ClosedEnum<typeof ListIdentitiesObject>;
|
|
50
|
+
|
|
51
|
+
export type ListIdentitiesMetrics = {
|
|
52
|
+
/**
|
|
53
|
+
* Total cost in dollars of the last 30 days
|
|
54
|
+
*/
|
|
55
|
+
totalCost: number;
|
|
56
|
+
/**
|
|
57
|
+
* Total tokens of the last 30 days
|
|
58
|
+
*/
|
|
59
|
+
totalTokens: number;
|
|
60
|
+
/**
|
|
61
|
+
* Total requests of the last 30 days
|
|
62
|
+
*/
|
|
63
|
+
totalRequests: number;
|
|
64
|
+
/**
|
|
65
|
+
* P50 error rate of the last 30 days
|
|
66
|
+
*/
|
|
67
|
+
errorRate: number;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export type ListIdentitiesData = {
|
|
71
|
+
/**
|
|
72
|
+
* Unique ULID (Universally Unique Lexicographically Sortable Identifier) for the contact
|
|
73
|
+
*/
|
|
74
|
+
id: string;
|
|
75
|
+
/**
|
|
76
|
+
* Unique string value to identify the contact user in the customer's system. This should be the same ID you use in your system to reference this user.
|
|
77
|
+
*/
|
|
78
|
+
externalId: string;
|
|
79
|
+
/**
|
|
80
|
+
* Display name or nickname of the contact user. This is typically shown in user interfaces.
|
|
81
|
+
*/
|
|
82
|
+
displayName?: string | null | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Email address of the contact user
|
|
85
|
+
*/
|
|
86
|
+
email?: string | null | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* URL linking to the contact user's avatar image
|
|
89
|
+
*/
|
|
90
|
+
avatarUrl?: string | null | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Array of tags associated with the contact. Useful for organizing and filtering contacts by categories, departments, or custom classifications.
|
|
93
|
+
*/
|
|
94
|
+
tags?: Array<string> | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Additional custom metadata associated with the contact as key-value pairs. Use this to store any extra information specific to your application.
|
|
97
|
+
*/
|
|
98
|
+
metadata?: { [k: string]: any } | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* The date and time the resource was created
|
|
101
|
+
*/
|
|
102
|
+
created?: Date | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* The date and time the resource was last updated
|
|
105
|
+
*/
|
|
106
|
+
updated?: Date | undefined;
|
|
107
|
+
metrics: ListIdentitiesMetrics;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* List of identities
|
|
112
|
+
*/
|
|
113
|
+
export type ListIdentitiesResponseBody = {
|
|
114
|
+
object: ListIdentitiesObject;
|
|
115
|
+
data: Array<ListIdentitiesData>;
|
|
116
|
+
hasMore: boolean;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/** @internal */
|
|
120
|
+
export const QueryParamFilterBy$inboundSchema: z.ZodType<
|
|
121
|
+
QueryParamFilterBy,
|
|
122
|
+
z.ZodTypeDef,
|
|
123
|
+
unknown
|
|
124
|
+
> = z.object({
|
|
125
|
+
tags: z.array(z.string()).optional(),
|
|
126
|
+
});
|
|
127
|
+
/** @internal */
|
|
128
|
+
export type QueryParamFilterBy$Outbound = {
|
|
129
|
+
tags?: Array<string> | undefined;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
/** @internal */
|
|
133
|
+
export const QueryParamFilterBy$outboundSchema: z.ZodType<
|
|
134
|
+
QueryParamFilterBy$Outbound,
|
|
135
|
+
z.ZodTypeDef,
|
|
136
|
+
QueryParamFilterBy
|
|
137
|
+
> = z.object({
|
|
138
|
+
tags: z.array(z.string()).optional(),
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
export function queryParamFilterByToJSON(
|
|
142
|
+
queryParamFilterBy: QueryParamFilterBy,
|
|
143
|
+
): string {
|
|
144
|
+
return JSON.stringify(
|
|
145
|
+
QueryParamFilterBy$outboundSchema.parse(queryParamFilterBy),
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
export function queryParamFilterByFromJSON(
|
|
149
|
+
jsonString: string,
|
|
150
|
+
): SafeParseResult<QueryParamFilterBy, SDKValidationError> {
|
|
151
|
+
return safeParse(
|
|
152
|
+
jsonString,
|
|
153
|
+
(x) => QueryParamFilterBy$inboundSchema.parse(JSON.parse(x)),
|
|
154
|
+
`Failed to parse 'QueryParamFilterBy' from JSON`,
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/** @internal */
|
|
159
|
+
export const ListIdentitiesRequest$inboundSchema: z.ZodType<
|
|
160
|
+
ListIdentitiesRequest,
|
|
161
|
+
z.ZodTypeDef,
|
|
162
|
+
unknown
|
|
163
|
+
> = z.object({
|
|
164
|
+
limit: z.number().default(10),
|
|
165
|
+
starting_after: z.string().optional(),
|
|
166
|
+
ending_before: z.string().optional(),
|
|
167
|
+
search: z.string().optional(),
|
|
168
|
+
filter_by: z.lazy(() => QueryParamFilterBy$inboundSchema).optional(),
|
|
169
|
+
include_metrics: z.nullable(z.boolean().default(false)),
|
|
170
|
+
}).transform((v) => {
|
|
171
|
+
return remap$(v, {
|
|
172
|
+
"starting_after": "startingAfter",
|
|
173
|
+
"ending_before": "endingBefore",
|
|
174
|
+
"filter_by": "filterBy",
|
|
175
|
+
"include_metrics": "includeMetrics",
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
/** @internal */
|
|
179
|
+
export type ListIdentitiesRequest$Outbound = {
|
|
180
|
+
limit: number;
|
|
181
|
+
starting_after?: string | undefined;
|
|
182
|
+
ending_before?: string | undefined;
|
|
183
|
+
search?: string | undefined;
|
|
184
|
+
filter_by?: QueryParamFilterBy$Outbound | undefined;
|
|
185
|
+
include_metrics: boolean | null;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
/** @internal */
|
|
189
|
+
export const ListIdentitiesRequest$outboundSchema: z.ZodType<
|
|
190
|
+
ListIdentitiesRequest$Outbound,
|
|
191
|
+
z.ZodTypeDef,
|
|
192
|
+
ListIdentitiesRequest
|
|
193
|
+
> = z.object({
|
|
194
|
+
limit: z.number().default(10),
|
|
195
|
+
startingAfter: z.string().optional(),
|
|
196
|
+
endingBefore: z.string().optional(),
|
|
197
|
+
search: z.string().optional(),
|
|
198
|
+
filterBy: z.lazy(() => QueryParamFilterBy$outboundSchema).optional(),
|
|
199
|
+
includeMetrics: z.nullable(z.boolean().default(false)),
|
|
200
|
+
}).transform((v) => {
|
|
201
|
+
return remap$(v, {
|
|
202
|
+
startingAfter: "starting_after",
|
|
203
|
+
endingBefore: "ending_before",
|
|
204
|
+
filterBy: "filter_by",
|
|
205
|
+
includeMetrics: "include_metrics",
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
|
|
209
|
+
export function listIdentitiesRequestToJSON(
|
|
210
|
+
listIdentitiesRequest: ListIdentitiesRequest,
|
|
211
|
+
): string {
|
|
212
|
+
return JSON.stringify(
|
|
213
|
+
ListIdentitiesRequest$outboundSchema.parse(listIdentitiesRequest),
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
export function listIdentitiesRequestFromJSON(
|
|
217
|
+
jsonString: string,
|
|
218
|
+
): SafeParseResult<ListIdentitiesRequest, SDKValidationError> {
|
|
219
|
+
return safeParse(
|
|
220
|
+
jsonString,
|
|
221
|
+
(x) => ListIdentitiesRequest$inboundSchema.parse(JSON.parse(x)),
|
|
222
|
+
`Failed to parse 'ListIdentitiesRequest' from JSON`,
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/** @internal */
|
|
227
|
+
export const ListIdentitiesObject$inboundSchema: z.ZodNativeEnum<
|
|
228
|
+
typeof ListIdentitiesObject
|
|
229
|
+
> = z.nativeEnum(ListIdentitiesObject);
|
|
230
|
+
/** @internal */
|
|
231
|
+
export const ListIdentitiesObject$outboundSchema: z.ZodNativeEnum<
|
|
232
|
+
typeof ListIdentitiesObject
|
|
233
|
+
> = ListIdentitiesObject$inboundSchema;
|
|
234
|
+
|
|
235
|
+
/** @internal */
|
|
236
|
+
export const ListIdentitiesMetrics$inboundSchema: z.ZodType<
|
|
237
|
+
ListIdentitiesMetrics,
|
|
238
|
+
z.ZodTypeDef,
|
|
239
|
+
unknown
|
|
240
|
+
> = z.object({
|
|
241
|
+
total_cost: z.number(),
|
|
242
|
+
total_tokens: z.number(),
|
|
243
|
+
total_requests: z.number(),
|
|
244
|
+
error_rate: z.number(),
|
|
245
|
+
}).transform((v) => {
|
|
246
|
+
return remap$(v, {
|
|
247
|
+
"total_cost": "totalCost",
|
|
248
|
+
"total_tokens": "totalTokens",
|
|
249
|
+
"total_requests": "totalRequests",
|
|
250
|
+
"error_rate": "errorRate",
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
/** @internal */
|
|
254
|
+
export type ListIdentitiesMetrics$Outbound = {
|
|
255
|
+
total_cost: number;
|
|
256
|
+
total_tokens: number;
|
|
257
|
+
total_requests: number;
|
|
258
|
+
error_rate: number;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
/** @internal */
|
|
262
|
+
export const ListIdentitiesMetrics$outboundSchema: z.ZodType<
|
|
263
|
+
ListIdentitiesMetrics$Outbound,
|
|
264
|
+
z.ZodTypeDef,
|
|
265
|
+
ListIdentitiesMetrics
|
|
266
|
+
> = z.object({
|
|
267
|
+
totalCost: z.number(),
|
|
268
|
+
totalTokens: z.number(),
|
|
269
|
+
totalRequests: z.number(),
|
|
270
|
+
errorRate: z.number(),
|
|
271
|
+
}).transform((v) => {
|
|
272
|
+
return remap$(v, {
|
|
273
|
+
totalCost: "total_cost",
|
|
274
|
+
totalTokens: "total_tokens",
|
|
275
|
+
totalRequests: "total_requests",
|
|
276
|
+
errorRate: "error_rate",
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
|
|
280
|
+
export function listIdentitiesMetricsToJSON(
|
|
281
|
+
listIdentitiesMetrics: ListIdentitiesMetrics,
|
|
282
|
+
): string {
|
|
283
|
+
return JSON.stringify(
|
|
284
|
+
ListIdentitiesMetrics$outboundSchema.parse(listIdentitiesMetrics),
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
export function listIdentitiesMetricsFromJSON(
|
|
288
|
+
jsonString: string,
|
|
289
|
+
): SafeParseResult<ListIdentitiesMetrics, SDKValidationError> {
|
|
290
|
+
return safeParse(
|
|
291
|
+
jsonString,
|
|
292
|
+
(x) => ListIdentitiesMetrics$inboundSchema.parse(JSON.parse(x)),
|
|
293
|
+
`Failed to parse 'ListIdentitiesMetrics' from JSON`,
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/** @internal */
|
|
298
|
+
export const ListIdentitiesData$inboundSchema: z.ZodType<
|
|
299
|
+
ListIdentitiesData,
|
|
300
|
+
z.ZodTypeDef,
|
|
301
|
+
unknown
|
|
302
|
+
> = z.object({
|
|
303
|
+
_id: z.string(),
|
|
304
|
+
external_id: z.string(),
|
|
305
|
+
display_name: z.nullable(z.string()).optional(),
|
|
306
|
+
email: z.nullable(z.string()).optional(),
|
|
307
|
+
avatar_url: z.nullable(z.string()).optional(),
|
|
308
|
+
tags: z.array(z.string()).optional(),
|
|
309
|
+
metadata: z.record(z.any()).optional(),
|
|
310
|
+
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
311
|
+
.optional(),
|
|
312
|
+
updated: z.string().datetime({ offset: true }).default(
|
|
313
|
+
"2026-01-15T04:13:15.987Z",
|
|
314
|
+
).transform(v => new Date(v)),
|
|
315
|
+
metrics: z.lazy(() => ListIdentitiesMetrics$inboundSchema),
|
|
316
|
+
}).transform((v) => {
|
|
317
|
+
return remap$(v, {
|
|
318
|
+
"_id": "id",
|
|
319
|
+
"external_id": "externalId",
|
|
320
|
+
"display_name": "displayName",
|
|
321
|
+
"avatar_url": "avatarUrl",
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
/** @internal */
|
|
325
|
+
export type ListIdentitiesData$Outbound = {
|
|
326
|
+
_id: string;
|
|
327
|
+
external_id: string;
|
|
328
|
+
display_name?: string | null | undefined;
|
|
329
|
+
email?: string | null | undefined;
|
|
330
|
+
avatar_url?: string | null | undefined;
|
|
331
|
+
tags?: Array<string> | undefined;
|
|
332
|
+
metadata?: { [k: string]: any } | undefined;
|
|
333
|
+
created?: string | undefined;
|
|
334
|
+
updated: string;
|
|
335
|
+
metrics: ListIdentitiesMetrics$Outbound;
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
/** @internal */
|
|
339
|
+
export const ListIdentitiesData$outboundSchema: z.ZodType<
|
|
340
|
+
ListIdentitiesData$Outbound,
|
|
341
|
+
z.ZodTypeDef,
|
|
342
|
+
ListIdentitiesData
|
|
343
|
+
> = z.object({
|
|
344
|
+
id: z.string(),
|
|
345
|
+
externalId: z.string(),
|
|
346
|
+
displayName: z.nullable(z.string()).optional(),
|
|
347
|
+
email: z.nullable(z.string()).optional(),
|
|
348
|
+
avatarUrl: z.nullable(z.string()).optional(),
|
|
349
|
+
tags: z.array(z.string()).optional(),
|
|
350
|
+
metadata: z.record(z.any()).optional(),
|
|
351
|
+
created: z.date().transform(v => v.toISOString()).optional(),
|
|
352
|
+
updated: z.date().default(() => new Date("2026-01-15T04:13:15.987Z"))
|
|
353
|
+
.transform(v => v.toISOString()),
|
|
354
|
+
metrics: z.lazy(() => ListIdentitiesMetrics$outboundSchema),
|
|
355
|
+
}).transform((v) => {
|
|
356
|
+
return remap$(v, {
|
|
357
|
+
id: "_id",
|
|
358
|
+
externalId: "external_id",
|
|
359
|
+
displayName: "display_name",
|
|
360
|
+
avatarUrl: "avatar_url",
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
export function listIdentitiesDataToJSON(
|
|
365
|
+
listIdentitiesData: ListIdentitiesData,
|
|
366
|
+
): string {
|
|
367
|
+
return JSON.stringify(
|
|
368
|
+
ListIdentitiesData$outboundSchema.parse(listIdentitiesData),
|
|
369
|
+
);
|
|
370
|
+
}
|
|
371
|
+
export function listIdentitiesDataFromJSON(
|
|
372
|
+
jsonString: string,
|
|
373
|
+
): SafeParseResult<ListIdentitiesData, SDKValidationError> {
|
|
374
|
+
return safeParse(
|
|
375
|
+
jsonString,
|
|
376
|
+
(x) => ListIdentitiesData$inboundSchema.parse(JSON.parse(x)),
|
|
377
|
+
`Failed to parse 'ListIdentitiesData' from JSON`,
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/** @internal */
|
|
382
|
+
export const ListIdentitiesResponseBody$inboundSchema: z.ZodType<
|
|
383
|
+
ListIdentitiesResponseBody,
|
|
384
|
+
z.ZodTypeDef,
|
|
385
|
+
unknown
|
|
386
|
+
> = z.object({
|
|
387
|
+
object: ListIdentitiesObject$inboundSchema,
|
|
388
|
+
data: z.array(z.lazy(() => ListIdentitiesData$inboundSchema)),
|
|
389
|
+
has_more: z.boolean(),
|
|
390
|
+
}).transform((v) => {
|
|
391
|
+
return remap$(v, {
|
|
392
|
+
"has_more": "hasMore",
|
|
393
|
+
});
|
|
394
|
+
});
|
|
395
|
+
/** @internal */
|
|
396
|
+
export type ListIdentitiesResponseBody$Outbound = {
|
|
397
|
+
object: string;
|
|
398
|
+
data: Array<ListIdentitiesData$Outbound>;
|
|
399
|
+
has_more: boolean;
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
/** @internal */
|
|
403
|
+
export const ListIdentitiesResponseBody$outboundSchema: z.ZodType<
|
|
404
|
+
ListIdentitiesResponseBody$Outbound,
|
|
405
|
+
z.ZodTypeDef,
|
|
406
|
+
ListIdentitiesResponseBody
|
|
407
|
+
> = z.object({
|
|
408
|
+
object: ListIdentitiesObject$outboundSchema,
|
|
409
|
+
data: z.array(z.lazy(() => ListIdentitiesData$outboundSchema)),
|
|
410
|
+
hasMore: z.boolean(),
|
|
411
|
+
}).transform((v) => {
|
|
412
|
+
return remap$(v, {
|
|
413
|
+
hasMore: "has_more",
|
|
414
|
+
});
|
|
415
|
+
});
|
|
416
|
+
|
|
417
|
+
export function listIdentitiesResponseBodyToJSON(
|
|
418
|
+
listIdentitiesResponseBody: ListIdentitiesResponseBody,
|
|
419
|
+
): string {
|
|
420
|
+
return JSON.stringify(
|
|
421
|
+
ListIdentitiesResponseBody$outboundSchema.parse(listIdentitiesResponseBody),
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
export function listIdentitiesResponseBodyFromJSON(
|
|
425
|
+
jsonString: string,
|
|
426
|
+
): SafeParseResult<ListIdentitiesResponseBody, SDKValidationError> {
|
|
427
|
+
return safeParse(
|
|
428
|
+
jsonString,
|
|
429
|
+
(x) => ListIdentitiesResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
430
|
+
`Failed to parse 'ListIdentitiesResponseBody' from JSON`,
|
|
431
|
+
);
|
|
432
|
+
}
|
|
@@ -112,7 +112,7 @@ export const RetrieveContactResponseBody$inboundSchema: z.ZodType<
|
|
|
112
112
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
113
113
|
.optional(),
|
|
114
114
|
updated: z.string().datetime({ offset: true }).default(
|
|
115
|
-
"2026-01-
|
|
115
|
+
"2026-01-15T04:13:15.987Z",
|
|
116
116
|
).transform(v => new Date(v)),
|
|
117
117
|
}).transform((v) => {
|
|
118
118
|
return remap$(v, {
|
|
@@ -149,7 +149,7 @@ export const RetrieveContactResponseBody$outboundSchema: z.ZodType<
|
|
|
149
149
|
tags: z.array(z.string()).optional(),
|
|
150
150
|
metadata: z.record(z.any()).optional(),
|
|
151
151
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
152
|
-
updated: z.date().default(() => new Date("2026-01-
|
|
152
|
+
updated: z.date().default(() => new Date("2026-01-15T04:13:15.987Z"))
|
|
153
153
|
.transform(v => v.toISOString()),
|
|
154
154
|
}).transform((v) => {
|
|
155
155
|
return remap$(v, {
|
|
@@ -1878,7 +1878,7 @@ export const RetrieveDatapointEvaluations3$inboundSchema: z.ZodType<
|
|
|
1878
1878
|
.default("orq"),
|
|
1879
1879
|
reviewed_by_id: z.string(),
|
|
1880
1880
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
1881
|
-
"2026-01-
|
|
1881
|
+
"2026-01-15T04:13:29.364Z",
|
|
1882
1882
|
).transform(v => new Date(v)),
|
|
1883
1883
|
type: z.literal("string_array"),
|
|
1884
1884
|
values: z.array(z.string()),
|
|
@@ -1915,7 +1915,7 @@ export const RetrieveDatapointEvaluations3$outboundSchema: z.ZodType<
|
|
|
1915
1915
|
source: RetrieveDatapointEvaluationsDatasetsResponseSource$outboundSchema
|
|
1916
1916
|
.default("orq"),
|
|
1917
1917
|
reviewedById: z.string(),
|
|
1918
|
-
reviewedAt: z.date().default(() => new Date("2026-01-
|
|
1918
|
+
reviewedAt: z.date().default(() => new Date("2026-01-15T04:13:29.364Z"))
|
|
1919
1919
|
.transform(v => v.toISOString()),
|
|
1920
1920
|
type: z.literal("string_array"),
|
|
1921
1921
|
values: z.array(z.string()),
|
|
@@ -1980,7 +1980,7 @@ export const RetrieveDatapointEvaluations2$inboundSchema: z.ZodType<
|
|
|
1980
1980
|
),
|
|
1981
1981
|
reviewed_by_id: z.string(),
|
|
1982
1982
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
1983
|
-
"2026-01-
|
|
1983
|
+
"2026-01-15T04:13:29.364Z",
|
|
1984
1984
|
).transform(v => new Date(v)),
|
|
1985
1985
|
type: z.literal("number"),
|
|
1986
1986
|
value: z.number(),
|
|
@@ -2018,7 +2018,7 @@ export const RetrieveDatapointEvaluations2$outboundSchema: z.ZodType<
|
|
|
2018
2018
|
"orq",
|
|
2019
2019
|
),
|
|
2020
2020
|
reviewedById: z.string(),
|
|
2021
|
-
reviewedAt: z.date().default(() => new Date("2026-01-
|
|
2021
|
+
reviewedAt: z.date().default(() => new Date("2026-01-15T04:13:29.364Z"))
|
|
2022
2022
|
.transform(v => v.toISOString()),
|
|
2023
2023
|
type: z.literal("number"),
|
|
2024
2024
|
value: z.number(),
|
|
@@ -2080,7 +2080,7 @@ export const RetrieveDatapointEvaluations1$inboundSchema: z.ZodType<
|
|
|
2080
2080
|
source: RetrieveDatapointEvaluationsSource$inboundSchema.default("orq"),
|
|
2081
2081
|
reviewed_by_id: z.string(),
|
|
2082
2082
|
reviewed_at: z.string().datetime({ offset: true }).default(
|
|
2083
|
-
"2026-01-
|
|
2083
|
+
"2026-01-15T04:13:29.363Z",
|
|
2084
2084
|
).transform(v => new Date(v)),
|
|
2085
2085
|
type: z.literal("string"),
|
|
2086
2086
|
value: z.string(),
|
|
@@ -2115,7 +2115,7 @@ export const RetrieveDatapointEvaluations1$outboundSchema: z.ZodType<
|
|
|
2115
2115
|
humanReviewId: z.string(),
|
|
2116
2116
|
source: RetrieveDatapointEvaluationsSource$outboundSchema.default("orq"),
|
|
2117
2117
|
reviewedById: z.string(),
|
|
2118
|
-
reviewedAt: z.date().default(() => new Date("2026-01-
|
|
2118
|
+
reviewedAt: z.date().default(() => new Date("2026-01-15T04:13:29.363Z"))
|
|
2119
2119
|
.transform(v => v.toISOString()),
|
|
2120
2120
|
type: z.literal("string"),
|
|
2121
2121
|
value: z.string(),
|
|
@@ -2226,7 +2226,7 @@ export const RetrieveDatapointResponseBody$inboundSchema: z.ZodType<
|
|
|
2226
2226
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
2227
2227
|
.optional(),
|
|
2228
2228
|
updated: z.string().datetime({ offset: true }).default(
|
|
2229
|
-
"2026-01-
|
|
2229
|
+
"2026-01-15T04:13:15.987Z",
|
|
2230
2230
|
).transform(v => new Date(v)),
|
|
2231
2231
|
}).transform((v) => {
|
|
2232
2232
|
return remap$(v, {
|
|
@@ -2300,7 +2300,7 @@ export const RetrieveDatapointResponseBody$outboundSchema: z.ZodType<
|
|
|
2300
2300
|
createdById: z.string().optional(),
|
|
2301
2301
|
updatedById: z.string().optional(),
|
|
2302
2302
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
2303
|
-
updated: z.date().default(() => new Date("2026-01-
|
|
2303
|
+
updated: z.date().default(() => new Date("2026-01-15T04:13:15.987Z"))
|
|
2304
2304
|
.transform(v => v.toISOString()),
|
|
2305
2305
|
}).transform((v) => {
|
|
2306
2306
|
return remap$(v, {
|
|
@@ -174,7 +174,7 @@ export const RetrieveDatasetResponseBody$inboundSchema: z.ZodType<
|
|
|
174
174
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
175
175
|
.optional(),
|
|
176
176
|
updated: z.string().datetime({ offset: true }).default(
|
|
177
|
-
"2026-01-
|
|
177
|
+
"2026-01-15T04:13:15.987Z",
|
|
178
178
|
).transform(v => new Date(v)),
|
|
179
179
|
}).transform((v) => {
|
|
180
180
|
return remap$(v, {
|
|
@@ -213,7 +213,7 @@ export const RetrieveDatasetResponseBody$outboundSchema: z.ZodType<
|
|
|
213
213
|
createdById: z.string().optional(),
|
|
214
214
|
updatedById: z.string().optional(),
|
|
215
215
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
216
|
-
updated: z.date().default(() => new Date("2026-01-
|
|
216
|
+
updated: z.date().default(() => new Date("2026-01-15T04:13:15.987Z"))
|
|
217
217
|
.transform(v => v.toISOString()),
|
|
218
218
|
}).transform((v) => {
|
|
219
219
|
return remap$(v, {
|
|
@@ -145,7 +145,7 @@ export const RetrieveDatasourceResponseBody$inboundSchema: z.ZodType<
|
|
|
145
145
|
z.ZodTypeDef,
|
|
146
146
|
unknown
|
|
147
147
|
> = z.object({
|
|
148
|
-
_id: z.string().default("
|
|
148
|
+
_id: z.string().default("01KEZXQGSDHSCWAD54YAKKKJTM"),
|
|
149
149
|
display_name: z.string(),
|
|
150
150
|
description: z.string().optional(),
|
|
151
151
|
status: RetrieveDatasourceStatus$inboundSchema,
|
|
@@ -188,7 +188,7 @@ export const RetrieveDatasourceResponseBody$outboundSchema: z.ZodType<
|
|
|
188
188
|
z.ZodTypeDef,
|
|
189
189
|
RetrieveDatasourceResponseBody
|
|
190
190
|
> = z.object({
|
|
191
|
-
id: z.string().default("
|
|
191
|
+
id: z.string().default("01KEZXQGSDHSCWAD54YAKKKJTM"),
|
|
192
192
|
displayName: z.string(),
|
|
193
193
|
description: z.string().optional(),
|
|
194
194
|
status: RetrieveDatasourceStatus$outboundSchema,
|