@orq-ai/node 3.6.5 → 3.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FUNCTIONS.md +5 -22
- package/README.md +45 -47
- package/bin/mcp-server.js +43 -43
- package/bin/mcp-server.js.map +23 -23
- package/docs/sdks/contacts/README.md +5 -9
- package/docs/sdks/datasets/README.md +65 -111
- package/docs/sdks/deployments/README.md +34 -44
- package/docs/sdks/feedback/README.md +5 -9
- package/docs/sdks/files/README.md +20 -34
- package/docs/sdks/knowledge/README.md +80 -138
- package/docs/sdks/metrics/README.md +5 -9
- package/docs/sdks/models/README.md +5 -9
- package/docs/sdks/prompts/README.md +35 -61
- package/docs/sdks/remoteconfigs/README.md +5 -9
- 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.js +1 -1
- package/models/errors/apierror.d.ts +14 -2
- package/models/errors/apierror.d.ts.map +1 -1
- package/models/errors/apierror.js +1 -1
- package/models/errors/apierror.js.map +1 -1
- package/models/operations/bulkcreatedatapoints.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/package.json +1 -1
- package/packages/orq-rc/FUNCTIONS.md +5 -22
- package/packages/orq-rc/README.md +129 -47
- package/packages/orq-rc/docs/sdks/contacts/README.md +344 -11
- package/packages/orq-rc/docs/sdks/datasets/README.md +60 -102
- package/packages/orq-rc/docs/sdks/deployments/README.md +34 -44
- package/packages/orq-rc/docs/sdks/evals/README.md +175 -315
- package/packages/orq-rc/docs/sdks/feedback/README.md +5 -9
- package/packages/orq-rc/docs/sdks/files/README.md +20 -34
- package/packages/orq-rc/docs/sdks/knowledge/README.md +80 -138
- package/packages/orq-rc/docs/sdks/metrics/README.md +5 -9
- package/packages/orq-rc/docs/sdks/models/README.md +5 -9
- package/packages/orq-rc/docs/sdks/prompts/README.md +35 -61
- package/packages/orq-rc/docs/sdks/remoteconfigs/README.md +5 -9
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/funcs/contactsCreate.ts +12 -7
- package/packages/orq-rc/src/funcs/contactsDelete.ts +172 -0
- package/packages/orq-rc/src/funcs/contactsList.ts +165 -0
- package/packages/orq-rc/src/funcs/contactsRetrieve.ts +171 -0
- package/packages/orq-rc/src/funcs/contactsUpdate.ts +172 -0
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +9 -1
- package/packages/orq-rc/src/mcp-server/tools/contactsCreate.ts +3 -3
- package/packages/orq-rc/src/mcp-server/tools/contactsDelete.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/contactsList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/contactsRetrieve.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/contactsUpdate.ts +37 -0
- package/packages/orq-rc/src/models/errors/apierror.ts +18 -3
- package/packages/orq-rc/src/models/errors/deletecontact.ts +81 -0
- package/packages/orq-rc/src/models/errors/index.ts +3 -0
- package/packages/orq-rc/src/models/errors/retrievecontact.ts +81 -0
- package/packages/orq-rc/src/models/errors/updatecontact.ts +74 -0
- package/packages/orq-rc/src/models/operations/createcontact.ts +30 -19
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
- package/packages/orq-rc/src/models/operations/deletecontact.ts +69 -0
- package/packages/orq-rc/src/models/operations/deployments.ts +69 -59
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/index.ts +4 -0
- package/packages/orq-rc/src/models/operations/listcontacts.ts +490 -0
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +210 -0
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatecontact.ts +325 -0
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/sdk/contacts.ts +75 -3
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/errors/apierror.ts +18 -3
- package/src/models/operations/bulkcreatedatapoints.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +2 -2
- package/src/models/operations/createdatasource.ts +2 -2
- 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/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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 contacts by tags
|
|
14
|
+
*/
|
|
15
|
+
export type QueryParamFilterBy = {
|
|
16
|
+
tags?: Array<string> | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export type ListContactsRequest = {
|
|
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
|
+
* Filter contacts by tags
|
|
34
|
+
*/
|
|
35
|
+
filterBy?: QueryParamFilterBy | undefined;
|
|
36
|
+
includeMetrics?: boolean | null | undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const ObjectT = {
|
|
40
|
+
List: "list",
|
|
41
|
+
} as const;
|
|
42
|
+
export type ObjectT = ClosedEnum<typeof ObjectT>;
|
|
43
|
+
|
|
44
|
+
export type Metrics = {
|
|
45
|
+
/**
|
|
46
|
+
* Total cost in dollars of the last 30 days
|
|
47
|
+
*/
|
|
48
|
+
totalCost: number;
|
|
49
|
+
/**
|
|
50
|
+
* Total tokens of the last 30 days
|
|
51
|
+
*/
|
|
52
|
+
totalTokens: number;
|
|
53
|
+
/**
|
|
54
|
+
* Total requests of the last 30 days
|
|
55
|
+
*/
|
|
56
|
+
totalRequests: number;
|
|
57
|
+
/**
|
|
58
|
+
* P50 error rate of the last 30 days
|
|
59
|
+
*/
|
|
60
|
+
errorRate: number;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export type Data = {
|
|
64
|
+
/**
|
|
65
|
+
* Unique ULID (Universally Unique Lexicographically Sortable Identifier) for the contact
|
|
66
|
+
*/
|
|
67
|
+
id: string;
|
|
68
|
+
/**
|
|
69
|
+
* 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.
|
|
70
|
+
*/
|
|
71
|
+
externalId: string;
|
|
72
|
+
/**
|
|
73
|
+
* Display name or nickname of the contact user. This is typically shown in user interfaces.
|
|
74
|
+
*/
|
|
75
|
+
displayName?: string | null | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Email address of the contact user
|
|
78
|
+
*/
|
|
79
|
+
email?: string | null | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* URL linking to the contact user's avatar image
|
|
82
|
+
*/
|
|
83
|
+
avatarUrl?: string | null | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Array of tags associated with the contact. Useful for organizing and filtering contacts by categories, departments, or custom classifications.
|
|
86
|
+
*/
|
|
87
|
+
tags?: Array<string> | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Additional custom metadata associated with the contact as key-value pairs. Use this to store any extra information specific to your application.
|
|
90
|
+
*/
|
|
91
|
+
metadata?: { [k: string]: any } | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* The date and time the resource was created
|
|
94
|
+
*/
|
|
95
|
+
created?: Date | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* The date and time the resource was last updated
|
|
98
|
+
*/
|
|
99
|
+
updated?: Date | undefined;
|
|
100
|
+
metrics: Metrics;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* List of contacts
|
|
105
|
+
*/
|
|
106
|
+
export type ListContactsResponseBody = {
|
|
107
|
+
object: ObjectT;
|
|
108
|
+
data: Array<Data>;
|
|
109
|
+
hasMore: boolean;
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
/** @internal */
|
|
113
|
+
export const QueryParamFilterBy$inboundSchema: z.ZodType<
|
|
114
|
+
QueryParamFilterBy,
|
|
115
|
+
z.ZodTypeDef,
|
|
116
|
+
unknown
|
|
117
|
+
> = z.object({
|
|
118
|
+
tags: z.array(z.string()).optional(),
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
export type QueryParamFilterBy$Outbound = {
|
|
123
|
+
tags?: Array<string> | undefined;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export const QueryParamFilterBy$outboundSchema: z.ZodType<
|
|
128
|
+
QueryParamFilterBy$Outbound,
|
|
129
|
+
z.ZodTypeDef,
|
|
130
|
+
QueryParamFilterBy
|
|
131
|
+
> = z.object({
|
|
132
|
+
tags: z.array(z.string()).optional(),
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* @internal
|
|
137
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
138
|
+
*/
|
|
139
|
+
export namespace QueryParamFilterBy$ {
|
|
140
|
+
/** @deprecated use `QueryParamFilterBy$inboundSchema` instead. */
|
|
141
|
+
export const inboundSchema = QueryParamFilterBy$inboundSchema;
|
|
142
|
+
/** @deprecated use `QueryParamFilterBy$outboundSchema` instead. */
|
|
143
|
+
export const outboundSchema = QueryParamFilterBy$outboundSchema;
|
|
144
|
+
/** @deprecated use `QueryParamFilterBy$Outbound` instead. */
|
|
145
|
+
export type Outbound = QueryParamFilterBy$Outbound;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function queryParamFilterByToJSON(
|
|
149
|
+
queryParamFilterBy: QueryParamFilterBy,
|
|
150
|
+
): string {
|
|
151
|
+
return JSON.stringify(
|
|
152
|
+
QueryParamFilterBy$outboundSchema.parse(queryParamFilterBy),
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function queryParamFilterByFromJSON(
|
|
157
|
+
jsonString: string,
|
|
158
|
+
): SafeParseResult<QueryParamFilterBy, SDKValidationError> {
|
|
159
|
+
return safeParse(
|
|
160
|
+
jsonString,
|
|
161
|
+
(x) => QueryParamFilterBy$inboundSchema.parse(JSON.parse(x)),
|
|
162
|
+
`Failed to parse 'QueryParamFilterBy' from JSON`,
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/** @internal */
|
|
167
|
+
export const ListContactsRequest$inboundSchema: z.ZodType<
|
|
168
|
+
ListContactsRequest,
|
|
169
|
+
z.ZodTypeDef,
|
|
170
|
+
unknown
|
|
171
|
+
> = z.object({
|
|
172
|
+
limit: z.number().default(10),
|
|
173
|
+
starting_after: z.string().optional(),
|
|
174
|
+
ending_before: z.string().optional(),
|
|
175
|
+
filter_by: z.lazy(() => QueryParamFilterBy$inboundSchema).optional(),
|
|
176
|
+
include_metrics: z.nullable(z.boolean().default(false)),
|
|
177
|
+
}).transform((v) => {
|
|
178
|
+
return remap$(v, {
|
|
179
|
+
"starting_after": "startingAfter",
|
|
180
|
+
"ending_before": "endingBefore",
|
|
181
|
+
"filter_by": "filterBy",
|
|
182
|
+
"include_metrics": "includeMetrics",
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
/** @internal */
|
|
187
|
+
export type ListContactsRequest$Outbound = {
|
|
188
|
+
limit: number;
|
|
189
|
+
starting_after?: string | undefined;
|
|
190
|
+
ending_before?: string | undefined;
|
|
191
|
+
filter_by?: QueryParamFilterBy$Outbound | undefined;
|
|
192
|
+
include_metrics: boolean | null;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
/** @internal */
|
|
196
|
+
export const ListContactsRequest$outboundSchema: z.ZodType<
|
|
197
|
+
ListContactsRequest$Outbound,
|
|
198
|
+
z.ZodTypeDef,
|
|
199
|
+
ListContactsRequest
|
|
200
|
+
> = z.object({
|
|
201
|
+
limit: z.number().default(10),
|
|
202
|
+
startingAfter: z.string().optional(),
|
|
203
|
+
endingBefore: z.string().optional(),
|
|
204
|
+
filterBy: z.lazy(() => QueryParamFilterBy$outboundSchema).optional(),
|
|
205
|
+
includeMetrics: z.nullable(z.boolean().default(false)),
|
|
206
|
+
}).transform((v) => {
|
|
207
|
+
return remap$(v, {
|
|
208
|
+
startingAfter: "starting_after",
|
|
209
|
+
endingBefore: "ending_before",
|
|
210
|
+
filterBy: "filter_by",
|
|
211
|
+
includeMetrics: "include_metrics",
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* @internal
|
|
217
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
218
|
+
*/
|
|
219
|
+
export namespace ListContactsRequest$ {
|
|
220
|
+
/** @deprecated use `ListContactsRequest$inboundSchema` instead. */
|
|
221
|
+
export const inboundSchema = ListContactsRequest$inboundSchema;
|
|
222
|
+
/** @deprecated use `ListContactsRequest$outboundSchema` instead. */
|
|
223
|
+
export const outboundSchema = ListContactsRequest$outboundSchema;
|
|
224
|
+
/** @deprecated use `ListContactsRequest$Outbound` instead. */
|
|
225
|
+
export type Outbound = ListContactsRequest$Outbound;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export function listContactsRequestToJSON(
|
|
229
|
+
listContactsRequest: ListContactsRequest,
|
|
230
|
+
): string {
|
|
231
|
+
return JSON.stringify(
|
|
232
|
+
ListContactsRequest$outboundSchema.parse(listContactsRequest),
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function listContactsRequestFromJSON(
|
|
237
|
+
jsonString: string,
|
|
238
|
+
): SafeParseResult<ListContactsRequest, SDKValidationError> {
|
|
239
|
+
return safeParse(
|
|
240
|
+
jsonString,
|
|
241
|
+
(x) => ListContactsRequest$inboundSchema.parse(JSON.parse(x)),
|
|
242
|
+
`Failed to parse 'ListContactsRequest' from JSON`,
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/** @internal */
|
|
247
|
+
export const ObjectT$inboundSchema: z.ZodNativeEnum<typeof ObjectT> = z
|
|
248
|
+
.nativeEnum(ObjectT);
|
|
249
|
+
|
|
250
|
+
/** @internal */
|
|
251
|
+
export const ObjectT$outboundSchema: z.ZodNativeEnum<typeof ObjectT> =
|
|
252
|
+
ObjectT$inboundSchema;
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* @internal
|
|
256
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
257
|
+
*/
|
|
258
|
+
export namespace ObjectT$ {
|
|
259
|
+
/** @deprecated use `ObjectT$inboundSchema` instead. */
|
|
260
|
+
export const inboundSchema = ObjectT$inboundSchema;
|
|
261
|
+
/** @deprecated use `ObjectT$outboundSchema` instead. */
|
|
262
|
+
export const outboundSchema = ObjectT$outboundSchema;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/** @internal */
|
|
266
|
+
export const Metrics$inboundSchema: z.ZodType<Metrics, z.ZodTypeDef, unknown> =
|
|
267
|
+
z.object({
|
|
268
|
+
total_cost: z.number(),
|
|
269
|
+
total_tokens: z.number(),
|
|
270
|
+
total_requests: z.number(),
|
|
271
|
+
error_rate: z.number(),
|
|
272
|
+
}).transform((v) => {
|
|
273
|
+
return remap$(v, {
|
|
274
|
+
"total_cost": "totalCost",
|
|
275
|
+
"total_tokens": "totalTokens",
|
|
276
|
+
"total_requests": "totalRequests",
|
|
277
|
+
"error_rate": "errorRate",
|
|
278
|
+
});
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
/** @internal */
|
|
282
|
+
export type Metrics$Outbound = {
|
|
283
|
+
total_cost: number;
|
|
284
|
+
total_tokens: number;
|
|
285
|
+
total_requests: number;
|
|
286
|
+
error_rate: number;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
/** @internal */
|
|
290
|
+
export const Metrics$outboundSchema: z.ZodType<
|
|
291
|
+
Metrics$Outbound,
|
|
292
|
+
z.ZodTypeDef,
|
|
293
|
+
Metrics
|
|
294
|
+
> = z.object({
|
|
295
|
+
totalCost: z.number(),
|
|
296
|
+
totalTokens: z.number(),
|
|
297
|
+
totalRequests: z.number(),
|
|
298
|
+
errorRate: z.number(),
|
|
299
|
+
}).transform((v) => {
|
|
300
|
+
return remap$(v, {
|
|
301
|
+
totalCost: "total_cost",
|
|
302
|
+
totalTokens: "total_tokens",
|
|
303
|
+
totalRequests: "total_requests",
|
|
304
|
+
errorRate: "error_rate",
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* @internal
|
|
310
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
311
|
+
*/
|
|
312
|
+
export namespace Metrics$ {
|
|
313
|
+
/** @deprecated use `Metrics$inboundSchema` instead. */
|
|
314
|
+
export const inboundSchema = Metrics$inboundSchema;
|
|
315
|
+
/** @deprecated use `Metrics$outboundSchema` instead. */
|
|
316
|
+
export const outboundSchema = Metrics$outboundSchema;
|
|
317
|
+
/** @deprecated use `Metrics$Outbound` instead. */
|
|
318
|
+
export type Outbound = Metrics$Outbound;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export function metricsToJSON(metrics: Metrics): string {
|
|
322
|
+
return JSON.stringify(Metrics$outboundSchema.parse(metrics));
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export function metricsFromJSON(
|
|
326
|
+
jsonString: string,
|
|
327
|
+
): SafeParseResult<Metrics, SDKValidationError> {
|
|
328
|
+
return safeParse(
|
|
329
|
+
jsonString,
|
|
330
|
+
(x) => Metrics$inboundSchema.parse(JSON.parse(x)),
|
|
331
|
+
`Failed to parse 'Metrics' from JSON`,
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/** @internal */
|
|
336
|
+
export const Data$inboundSchema: z.ZodType<Data, z.ZodTypeDef, unknown> = z
|
|
337
|
+
.object({
|
|
338
|
+
_id: z.string(),
|
|
339
|
+
external_id: z.string(),
|
|
340
|
+
display_name: z.nullable(z.string()).optional(),
|
|
341
|
+
email: z.nullable(z.string()).optional(),
|
|
342
|
+
avatar_url: z.nullable(z.string()).optional(),
|
|
343
|
+
tags: z.array(z.string()).optional(),
|
|
344
|
+
metadata: z.record(z.any()).optional(),
|
|
345
|
+
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
346
|
+
.optional(),
|
|
347
|
+
updated: z.string().datetime({ offset: true }).default(
|
|
348
|
+
"2025-06-04T07:24:10.431Z",
|
|
349
|
+
).transform(v => new Date(v)),
|
|
350
|
+
metrics: z.lazy(() => Metrics$inboundSchema),
|
|
351
|
+
}).transform((v) => {
|
|
352
|
+
return remap$(v, {
|
|
353
|
+
"_id": "id",
|
|
354
|
+
"external_id": "externalId",
|
|
355
|
+
"display_name": "displayName",
|
|
356
|
+
"avatar_url": "avatarUrl",
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
/** @internal */
|
|
361
|
+
export type Data$Outbound = {
|
|
362
|
+
_id: string;
|
|
363
|
+
external_id: string;
|
|
364
|
+
display_name?: string | null | undefined;
|
|
365
|
+
email?: string | null | undefined;
|
|
366
|
+
avatar_url?: string | null | undefined;
|
|
367
|
+
tags?: Array<string> | undefined;
|
|
368
|
+
metadata?: { [k: string]: any } | undefined;
|
|
369
|
+
created?: string | undefined;
|
|
370
|
+
updated: string;
|
|
371
|
+
metrics: Metrics$Outbound;
|
|
372
|
+
};
|
|
373
|
+
|
|
374
|
+
/** @internal */
|
|
375
|
+
export const Data$outboundSchema: z.ZodType<Data$Outbound, z.ZodTypeDef, Data> =
|
|
376
|
+
z.object({
|
|
377
|
+
id: z.string(),
|
|
378
|
+
externalId: z.string(),
|
|
379
|
+
displayName: z.nullable(z.string()).optional(),
|
|
380
|
+
email: z.nullable(z.string()).optional(),
|
|
381
|
+
avatarUrl: z.nullable(z.string()).optional(),
|
|
382
|
+
tags: z.array(z.string()).optional(),
|
|
383
|
+
metadata: z.record(z.any()).optional(),
|
|
384
|
+
created: z.date().transform(v => v.toISOString()).optional(),
|
|
385
|
+
updated: z.date().default(() => new Date("2025-06-04T07:24:10.431Z"))
|
|
386
|
+
.transform(v => v.toISOString()),
|
|
387
|
+
metrics: z.lazy(() => Metrics$outboundSchema),
|
|
388
|
+
}).transform((v) => {
|
|
389
|
+
return remap$(v, {
|
|
390
|
+
id: "_id",
|
|
391
|
+
externalId: "external_id",
|
|
392
|
+
displayName: "display_name",
|
|
393
|
+
avatarUrl: "avatar_url",
|
|
394
|
+
});
|
|
395
|
+
});
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* @internal
|
|
399
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
400
|
+
*/
|
|
401
|
+
export namespace Data$ {
|
|
402
|
+
/** @deprecated use `Data$inboundSchema` instead. */
|
|
403
|
+
export const inboundSchema = Data$inboundSchema;
|
|
404
|
+
/** @deprecated use `Data$outboundSchema` instead. */
|
|
405
|
+
export const outboundSchema = Data$outboundSchema;
|
|
406
|
+
/** @deprecated use `Data$Outbound` instead. */
|
|
407
|
+
export type Outbound = Data$Outbound;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export function dataToJSON(data: Data): string {
|
|
411
|
+
return JSON.stringify(Data$outboundSchema.parse(data));
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
export function dataFromJSON(
|
|
415
|
+
jsonString: string,
|
|
416
|
+
): SafeParseResult<Data, SDKValidationError> {
|
|
417
|
+
return safeParse(
|
|
418
|
+
jsonString,
|
|
419
|
+
(x) => Data$inboundSchema.parse(JSON.parse(x)),
|
|
420
|
+
`Failed to parse 'Data' from JSON`,
|
|
421
|
+
);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/** @internal */
|
|
425
|
+
export const ListContactsResponseBody$inboundSchema: z.ZodType<
|
|
426
|
+
ListContactsResponseBody,
|
|
427
|
+
z.ZodTypeDef,
|
|
428
|
+
unknown
|
|
429
|
+
> = z.object({
|
|
430
|
+
object: ObjectT$inboundSchema,
|
|
431
|
+
data: z.array(z.lazy(() => Data$inboundSchema)),
|
|
432
|
+
has_more: z.boolean(),
|
|
433
|
+
}).transform((v) => {
|
|
434
|
+
return remap$(v, {
|
|
435
|
+
"has_more": "hasMore",
|
|
436
|
+
});
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
/** @internal */
|
|
440
|
+
export type ListContactsResponseBody$Outbound = {
|
|
441
|
+
object: string;
|
|
442
|
+
data: Array<Data$Outbound>;
|
|
443
|
+
has_more: boolean;
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
/** @internal */
|
|
447
|
+
export const ListContactsResponseBody$outboundSchema: z.ZodType<
|
|
448
|
+
ListContactsResponseBody$Outbound,
|
|
449
|
+
z.ZodTypeDef,
|
|
450
|
+
ListContactsResponseBody
|
|
451
|
+
> = z.object({
|
|
452
|
+
object: ObjectT$outboundSchema,
|
|
453
|
+
data: z.array(z.lazy(() => Data$outboundSchema)),
|
|
454
|
+
hasMore: z.boolean(),
|
|
455
|
+
}).transform((v) => {
|
|
456
|
+
return remap$(v, {
|
|
457
|
+
hasMore: "has_more",
|
|
458
|
+
});
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* @internal
|
|
463
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
464
|
+
*/
|
|
465
|
+
export namespace ListContactsResponseBody$ {
|
|
466
|
+
/** @deprecated use `ListContactsResponseBody$inboundSchema` instead. */
|
|
467
|
+
export const inboundSchema = ListContactsResponseBody$inboundSchema;
|
|
468
|
+
/** @deprecated use `ListContactsResponseBody$outboundSchema` instead. */
|
|
469
|
+
export const outboundSchema = ListContactsResponseBody$outboundSchema;
|
|
470
|
+
/** @deprecated use `ListContactsResponseBody$Outbound` instead. */
|
|
471
|
+
export type Outbound = ListContactsResponseBody$Outbound;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
export function listContactsResponseBodyToJSON(
|
|
475
|
+
listContactsResponseBody: ListContactsResponseBody,
|
|
476
|
+
): string {
|
|
477
|
+
return JSON.stringify(
|
|
478
|
+
ListContactsResponseBody$outboundSchema.parse(listContactsResponseBody),
|
|
479
|
+
);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
export function listContactsResponseBodyFromJSON(
|
|
483
|
+
jsonString: string,
|
|
484
|
+
): SafeParseResult<ListContactsResponseBody, SDKValidationError> {
|
|
485
|
+
return safeParse(
|
|
486
|
+
jsonString,
|
|
487
|
+
(x) => ListContactsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
488
|
+
`Failed to parse 'ListContactsResponseBody' from JSON`,
|
|
489
|
+
);
|
|
490
|
+
}
|
|
@@ -2602,7 +2602,7 @@ export const ListDatasetDatapointsData$inboundSchema: z.ZodType<
|
|
|
2602
2602
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
2603
2603
|
.optional(),
|
|
2604
2604
|
updated: z.string().datetime({ offset: true }).default(
|
|
2605
|
-
"2025-06-
|
|
2605
|
+
"2025-06-04T07:24:10.431Z",
|
|
2606
2606
|
).transform(v => new Date(v)),
|
|
2607
2607
|
}).transform((v) => {
|
|
2608
2608
|
return remap$(v, {
|
|
@@ -2664,7 +2664,7 @@ export const ListDatasetDatapointsData$outboundSchema: z.ZodType<
|
|
|
2664
2664
|
createdById: z.string().optional(),
|
|
2665
2665
|
updatedById: z.string().optional(),
|
|
2666
2666
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
2667
|
-
updated: z.date().default(() => new Date("2025-06-
|
|
2667
|
+
updated: z.date().default(() => new Date("2025-06-04T07:24:10.431Z"))
|
|
2668
2668
|
.transform(v => v.toISOString()),
|
|
2669
2669
|
}).transform((v) => {
|
|
2670
2670
|
return remap$(v, {
|
|
@@ -253,7 +253,7 @@ export const ListDatasetsData$inboundSchema: z.ZodType<
|
|
|
253
253
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
254
254
|
.optional(),
|
|
255
255
|
updated: z.string().datetime({ offset: true }).default(
|
|
256
|
-
"2025-06-
|
|
256
|
+
"2025-06-04T07:24:10.431Z",
|
|
257
257
|
).transform(v => new Date(v)),
|
|
258
258
|
}).transform((v) => {
|
|
259
259
|
return remap$(v, {
|
|
@@ -293,7 +293,7 @@ export const ListDatasetsData$outboundSchema: z.ZodType<
|
|
|
293
293
|
updatedById: z.string().optional(),
|
|
294
294
|
metadata: z.lazy(() => ListDatasetsMetadata$outboundSchema),
|
|
295
295
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
296
|
-
updated: z.date().default(() => new Date("2025-06-
|
|
296
|
+
updated: z.date().default(() => new Date("2025-06-04T07:24:10.431Z"))
|
|
297
297
|
.transform(v => v.toISOString()),
|
|
298
298
|
}).transform((v) => {
|
|
299
299
|
return remap$(v, {
|
|
@@ -278,7 +278,7 @@ export const ListDatasourcesData$inboundSchema: z.ZodType<
|
|
|
278
278
|
z.ZodTypeDef,
|
|
279
279
|
unknown
|
|
280
280
|
> = z.object({
|
|
281
|
-
_id: z.string().default("
|
|
281
|
+
_id: z.string().default("01JWWX75X074W828JMKWDHCNAH"),
|
|
282
282
|
display_name: z.string(),
|
|
283
283
|
description: z.string().optional(),
|
|
284
284
|
status: ListDatasourcesStatus$inboundSchema,
|
|
@@ -322,7 +322,7 @@ export const ListDatasourcesData$outboundSchema: z.ZodType<
|
|
|
322
322
|
z.ZodTypeDef,
|
|
323
323
|
ListDatasourcesData
|
|
324
324
|
> = z.object({
|
|
325
|
-
id: z.string().default("
|
|
325
|
+
id: z.string().default("01JWWX75X074W828JMKWDHCNAH"),
|
|
326
326
|
displayName: z.string(),
|
|
327
327
|
description: z.string().optional(),
|
|
328
328
|
status: ListDatasourcesStatus$outboundSchema,
|