@orq-ai/node 1.31.0-rc.7 → 1.31.1
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 +106 -0
- package/README.md +1 -1
- package/RUNTIMES.md +22 -0
- package/hooks/hooks.d.ts.map +1 -1
- package/hooks/hooks.js +18 -0
- package/hooks/hooks.js.map +1 -1
- package/hooks/types.d.ts +1 -0
- package/hooks/types.d.ts.map +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +4 -4
- package/lib/config.js.map +1 -1
- package/models/components/deployments.d.ts +2 -2
- package/models/components/deployments.d.ts.map +1 -1
- package/models/components/deployments.js +4 -4
- package/models/components/deployments.js.map +1 -1
- package/models/operations/bulkfileupload.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createprompt.d.ts +12 -0
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +4 -0
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createpromptversion.d.ts +12 -0
- package/models/operations/createpromptversion.d.ts.map +1 -1
- package/models/operations/createpromptversion.js +4 -0
- package/models/operations/createpromptversion.js.map +1 -1
- package/models/operations/deploymentgetconfig.d.ts +7 -4
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +9 -8
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deploymentinvoke.d.ts +3 -0
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +1 -0
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +6 -0
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +2 -0
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/fileupload.d.ts +2 -2
- package/models/operations/fileupload.d.ts.map +1 -1
- package/models/operations/fileupload.js +6 -6
- package/models/operations/fileupload.js.map +1 -1
- package/models/operations/findonepromptsnippet.d.ts +62 -26
- package/models/operations/findonepromptsnippet.d.ts.map +1 -1
- package/models/operations/findonepromptsnippet.js +70 -58
- package/models/operations/findonepromptsnippet.js.map +1 -1
- package/models/operations/getallprompts.d.ts +46 -10
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +38 -26
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getallprompttemplates.d.ts +46 -10
- package/models/operations/getallprompttemplates.d.ts.map +1 -1
- package/models/operations/getallprompttemplates.js +38 -26
- package/models/operations/getallprompttemplates.js.map +1 -1
- package/models/operations/updateprompt.d.ts +52 -10
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +40 -26
- package/models/operations/updateprompt.js.map +1 -1
- package/package.json +2 -5
- package/packages/orq-rc/README.md +556 -0
- package/packages/orq-rc/docs/sdks/contacts/README.md +84 -0
- package/packages/orq-rc/docs/sdks/deployments/README.md +314 -0
- package/packages/orq-rc/docs/sdks/feedback/README.md +92 -0
- package/packages/orq-rc/docs/sdks/files/README.md +171 -0
- package/packages/orq-rc/docs/sdks/metrics/README.md +86 -0
- package/packages/orq-rc/docs/sdks/orq/README.md +10 -0
- package/packages/orq-rc/docs/sdks/prompt/README.md +6 -0
- package/packages/orq-rc/docs/sdks/prompts/README.md +533 -0
- package/packages/orq-rc/docs/sdks/remoteconfig/README.md +80 -0
- package/packages/orq-rc/docs/sdks/snippets/README.md +84 -0
- package/packages/orq-rc/docs/sdks/templates/README.md +80 -0
- package/packages/orq-rc/src/core.ts +13 -0
- package/packages/orq-rc/src/funcs/contactsCreate.ts +123 -0
- package/packages/orq-rc/src/funcs/deploymentsAll.ts +137 -0
- package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +131 -0
- package/packages/orq-rc/src/funcs/deploymentsInvalidate.ts +132 -0
- package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +134 -0
- package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +131 -0
- package/packages/orq-rc/src/funcs/feedbackCreate.ts +123 -0
- package/packages/orq-rc/src/funcs/filesBulkUpload.ts +125 -0
- package/packages/orq-rc/src/funcs/filesUpload.ts +144 -0
- package/packages/orq-rc/src/funcs/promptSnippetsFindOne.ts +127 -0
- package/packages/orq-rc/src/funcs/promptTemplatesGetAll.ts +129 -0
- package/packages/orq-rc/src/funcs/promptsCreate.ts +123 -0
- package/packages/orq-rc/src/funcs/promptsCreateVersion.ts +128 -0
- package/packages/orq-rc/src/funcs/promptsDelete.ts +127 -0
- package/packages/orq-rc/src/funcs/promptsDuplicate.ts +127 -0
- package/packages/orq-rc/src/funcs/promptsGetAll.ts +127 -0
- package/packages/orq-rc/src/funcs/promptsGetOne.ts +127 -0
- package/packages/orq-rc/src/funcs/promptsUpdate.ts +135 -0
- package/packages/orq-rc/src/funcs/remoteconfigGetConfig.ts +124 -0
- package/packages/orq-rc/src/hooks/hooks.ts +112 -0
- package/packages/orq-rc/src/hooks/index.ts +6 -0
- package/packages/orq-rc/src/hooks/registration.ts +14 -0
- package/packages/orq-rc/src/hooks/types.ts +102 -0
- package/packages/orq-rc/src/index.ts +7 -0
- package/packages/orq-rc/src/lib/base64.ts +37 -0
- package/packages/orq-rc/src/lib/config.ts +60 -0
- package/packages/orq-rc/src/lib/dlv.ts +53 -0
- package/packages/orq-rc/src/lib/encodings.ts +449 -0
- package/packages/orq-rc/src/lib/env.ts +41 -0
- package/packages/orq-rc/src/lib/event-streams.ts +264 -0
- package/packages/orq-rc/src/lib/files.ts +40 -0
- package/packages/orq-rc/src/lib/http.ts +323 -0
- package/packages/orq-rc/src/lib/is-plain-object.ts +43 -0
- package/packages/orq-rc/src/lib/logger.ts +9 -0
- package/packages/orq-rc/src/lib/matchers.ts +325 -0
- package/packages/orq-rc/src/lib/primitives.ts +122 -0
- package/packages/orq-rc/src/lib/retries.ts +219 -0
- package/packages/orq-rc/src/lib/schemas.ts +86 -0
- package/packages/orq-rc/src/lib/sdks.ts +392 -0
- package/packages/orq-rc/src/lib/security.ts +254 -0
- package/packages/orq-rc/src/lib/url.ts +33 -0
- package/packages/orq-rc/src/models/components/deployments.ts +1607 -0
- package/packages/orq-rc/src/models/components/index.ts +6 -0
- package/packages/orq-rc/src/models/components/security.ts +71 -0
- package/packages/orq-rc/src/models/errors/apierror.ts +27 -0
- package/packages/orq-rc/src/models/errors/honoapierror.ts +82 -0
- package/packages/orq-rc/src/models/errors/httpclienterrors.ts +62 -0
- package/packages/orq-rc/src/models/errors/index.ts +9 -0
- package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +97 -0
- package/packages/orq-rc/src/models/errors/updateprompt.ts +71 -0
- package/packages/orq-rc/src/models/operations/bulkfileupload.ts +304 -0
- package/packages/orq-rc/src/models/operations/createcontact.ts +256 -0
- package/packages/orq-rc/src/models/operations/createfeedback.ts +286 -0
- package/packages/orq-rc/src/models/operations/createprompt.ts +3455 -0
- package/packages/orq-rc/src/models/operations/createpromptversion.ts +3697 -0
- package/packages/orq-rc/src/models/operations/deleteprompt.ts +69 -0
- package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +1790 -0
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +3417 -0
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +2384 -0
- package/packages/orq-rc/src/models/operations/deployments.ts +2086 -0
- package/packages/orq-rc/src/models/operations/duplicateprompt.ts +69 -0
- package/packages/orq-rc/src/models/operations/fileupload.ts +311 -0
- package/packages/orq-rc/src/models/operations/findonepromptsnippet.ts +13629 -0
- package/packages/orq-rc/src/models/operations/getallprompts.ts +13390 -0
- package/packages/orq-rc/src/models/operations/getallprompttemplates.ts +13690 -0
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +69 -0
- package/packages/orq-rc/src/models/operations/index.ts +23 -0
- package/packages/orq-rc/src/models/operations/invaliddeployment.ts +75 -0
- package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +190 -0
- package/packages/orq-rc/src/models/operations/updateprompt.ts +14407 -0
- package/packages/orq-rc/src/sdk/contacts.ts +27 -0
- package/packages/orq-rc/src/sdk/deployments.ts +93 -0
- package/packages/orq-rc/src/sdk/feedback.ts +27 -0
- package/packages/orq-rc/src/sdk/files.ts +45 -0
- package/packages/orq-rc/src/sdk/index.ts +5 -0
- package/packages/orq-rc/src/sdk/metrics.ts +27 -0
- package/packages/orq-rc/src/sdk/prompt.ts +19 -0
- package/packages/orq-rc/src/sdk/prompts.ts +114 -0
- package/packages/orq-rc/src/sdk/remoteconfig.ts +24 -0
- package/packages/orq-rc/src/sdk/sdk.ts +49 -0
- package/packages/orq-rc/src/sdk/snippets.ts +24 -0
- package/packages/orq-rc/src/sdk/templates.ts +24 -0
- package/packages/orq-rc/src/types/blobs.ts +31 -0
- package/packages/orq-rc/src/types/constdatetime.ts +15 -0
- package/packages/orq-rc/src/types/enums.ts +16 -0
- package/packages/orq-rc/src/types/fp.ts +50 -0
- package/packages/orq-rc/src/types/index.ts +11 -0
- package/packages/orq-rc/src/types/operations.ts +105 -0
- package/packages/orq-rc/src/types/rfcdate.ts +54 -0
- package/packages/orq-rc/src/types/streams.ts +21 -0
- package/src/hooks/hooks.ts +20 -0
- package/src/hooks/types.ts +7 -0
- package/src/lib/config.ts +4 -4
- package/src/models/components/deployments.ts +2 -2
- package/src/models/operations/bulkfileupload.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createprompt.ts +4 -0
- package/src/models/operations/createpromptversion.ts +4 -0
- package/src/models/operations/deploymentgetconfig.ts +5 -4
- package/src/models/operations/deploymentinvoke.ts +1 -0
- package/src/models/operations/deployments.ts +2 -0
- package/src/models/operations/fileupload.ts +4 -4
- package/src/models/operations/findonepromptsnippet.ts +44 -32
- package/src/models/operations/getallprompts.ts +28 -16
- package/src/models/operations/getallprompttemplates.ts +28 -16
- package/src/models/operations/updateprompt.ts +30 -16
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { Result } from "./fp.js";
|
|
6
|
+
|
|
7
|
+
export type Paginator<V> = () => Promise<V & { next: Paginator<V> }> | null;
|
|
8
|
+
|
|
9
|
+
export type PageIterator<V, PageState = unknown> = V & {
|
|
10
|
+
next: Paginator<V>;
|
|
11
|
+
[Symbol.asyncIterator]: () => AsyncIterableIterator<V>;
|
|
12
|
+
"~next"?: PageState | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export function createPageIterator<V>(
|
|
16
|
+
page: V & { next: Paginator<V> },
|
|
17
|
+
halt: (v: V) => boolean,
|
|
18
|
+
): {
|
|
19
|
+
[Symbol.asyncIterator]: () => AsyncIterableIterator<V>;
|
|
20
|
+
} {
|
|
21
|
+
return {
|
|
22
|
+
[Symbol.asyncIterator]: async function* paginator() {
|
|
23
|
+
yield page;
|
|
24
|
+
if (halt(page)) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
let p: typeof page | null = page;
|
|
29
|
+
for (p = await p.next(); p != null; p = await p.next()) {
|
|
30
|
+
yield p;
|
|
31
|
+
if (halt(p)) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* This utility create a special iterator that yields a single value and
|
|
41
|
+
* terminates. It is useful in paginated SDK functions that have early return
|
|
42
|
+
* paths when things go wrong.
|
|
43
|
+
*/
|
|
44
|
+
export function haltIterator<V extends object>(
|
|
45
|
+
v: V,
|
|
46
|
+
): PageIterator<V, undefined> {
|
|
47
|
+
return {
|
|
48
|
+
...v,
|
|
49
|
+
next: () => null,
|
|
50
|
+
[Symbol.asyncIterator]: async function* paginator() {
|
|
51
|
+
yield v;
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Converts an async iterator of `Result<V, E>` into an async iterator of `V`.
|
|
58
|
+
* When error results occur, the underlying error value is thrown.
|
|
59
|
+
*/
|
|
60
|
+
export async function unwrapResultIterator<V, PageState>(
|
|
61
|
+
iteratorPromise: Promise<PageIterator<Result<V, unknown>, PageState>>,
|
|
62
|
+
): Promise<PageIterator<V, PageState>> {
|
|
63
|
+
const resultIter = await iteratorPromise;
|
|
64
|
+
|
|
65
|
+
if (!resultIter.ok) {
|
|
66
|
+
throw resultIter.error;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
...resultIter.value,
|
|
71
|
+
next: unwrapPaginator(resultIter.next),
|
|
72
|
+
"~next": resultIter["~next"],
|
|
73
|
+
[Symbol.asyncIterator]: async function* paginator() {
|
|
74
|
+
for await (const page of resultIter) {
|
|
75
|
+
if (!page.ok) {
|
|
76
|
+
throw page.error;
|
|
77
|
+
}
|
|
78
|
+
yield page.value;
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function unwrapPaginator<V>(
|
|
85
|
+
paginator: Paginator<Result<V, unknown>>,
|
|
86
|
+
): Paginator<V> {
|
|
87
|
+
return () => {
|
|
88
|
+
const nextResult = paginator();
|
|
89
|
+
if (nextResult == null) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
return nextResult.then((res) => {
|
|
93
|
+
if (!res.ok) {
|
|
94
|
+
throw res.error;
|
|
95
|
+
}
|
|
96
|
+
const out = {
|
|
97
|
+
...res.value,
|
|
98
|
+
next: unwrapPaginator(res.next),
|
|
99
|
+
};
|
|
100
|
+
return out;
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export const URL_OVERRIDE = Symbol("URL_OVERRIDE");
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const dateRE = /^\d{4}-\d{2}-\d{2}$/;
|
|
6
|
+
|
|
7
|
+
export class RFCDate {
|
|
8
|
+
private serialized: string;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Creates a new RFCDate instance using today's date.
|
|
12
|
+
*/
|
|
13
|
+
static today(): RFCDate {
|
|
14
|
+
return new RFCDate(new Date());
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Creates a new RFCDate instance using the provided input.
|
|
19
|
+
* If a string is used then in must be in the format YYYY-MM-DD.
|
|
20
|
+
*
|
|
21
|
+
* @param date A Date object or a date string in YYYY-MM-DD format
|
|
22
|
+
* @example
|
|
23
|
+
* new RFCDate("2022-01-01")
|
|
24
|
+
* @example
|
|
25
|
+
* new RFCDate(new Date())
|
|
26
|
+
*/
|
|
27
|
+
constructor(date: Date | string) {
|
|
28
|
+
if (typeof date === "string" && !dateRE.test(date)) {
|
|
29
|
+
throw new RangeError(
|
|
30
|
+
"RFCDate: date strings must be in the format YYYY-MM-DD: " + date,
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const value = new Date(date);
|
|
35
|
+
if (isNaN(+value)) {
|
|
36
|
+
throw new RangeError("RFCDate: invalid date provided: " + date);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
this.serialized = value.toISOString().slice(0, "YYYY-MM-DD".length);
|
|
40
|
+
if (!dateRE.test(this.serialized)) {
|
|
41
|
+
throw new TypeError(
|
|
42
|
+
`RFCDate: failed to build valid date with given value: ${date} serialized to ${this.serialized}`,
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
toJSON(): string {
|
|
48
|
+
return this.toString();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
toString(): string {
|
|
52
|
+
return this.serialized;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export function isReadableStream<T = Uint8Array>(
|
|
6
|
+
val: unknown,
|
|
7
|
+
): val is ReadableStream<T> {
|
|
8
|
+
if (typeof val !== "object" || val === null) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Check for the presence of methods specific to ReadableStream
|
|
13
|
+
const stream = val as ReadableStream<Uint8Array>;
|
|
14
|
+
|
|
15
|
+
// ReadableStream has methods like getReader, cancel, and tee
|
|
16
|
+
return (
|
|
17
|
+
typeof stream.getReader === "function" &&
|
|
18
|
+
typeof stream.cancel === "function" &&
|
|
19
|
+
typeof stream.tee === "function"
|
|
20
|
+
);
|
|
21
|
+
}
|
package/src/hooks/hooks.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
BeforeCreateRequestHook,
|
|
13
13
|
BeforeRequestContext,
|
|
14
14
|
BeforeRequestHook,
|
|
15
|
+
Hook,
|
|
15
16
|
Hooks,
|
|
16
17
|
SDKInitHook,
|
|
17
18
|
SDKInitOptions,
|
|
@@ -27,6 +28,25 @@ export class SDKHooks implements Hooks {
|
|
|
27
28
|
afterErrorHooks: AfterErrorHook[] = [];
|
|
28
29
|
|
|
29
30
|
constructor() {
|
|
31
|
+
const presetHooks: Array<Hook> = [];
|
|
32
|
+
|
|
33
|
+
for (const hook of presetHooks) {
|
|
34
|
+
if ("sdkInit" in hook) {
|
|
35
|
+
this.registerSDKInitHook(hook);
|
|
36
|
+
}
|
|
37
|
+
if ("beforeCreateRequest" in hook) {
|
|
38
|
+
this.registerBeforeCreateRequestHook(hook);
|
|
39
|
+
}
|
|
40
|
+
if ("beforeRequest" in hook) {
|
|
41
|
+
this.registerBeforeRequestHook(hook);
|
|
42
|
+
}
|
|
43
|
+
if ("afterSuccess" in hook) {
|
|
44
|
+
this.registerAfterSuccessHook(hook);
|
|
45
|
+
}
|
|
46
|
+
if ("afterError" in hook) {
|
|
47
|
+
this.registerAfterErrorHook(hook);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
30
50
|
initHooks(this);
|
|
31
51
|
}
|
|
32
52
|
|
package/src/hooks/types.ts
CHANGED
|
@@ -100,3 +100,10 @@ export interface Hooks {
|
|
|
100
100
|
/** Registers a hook to be used by the SDK for the after error event. */
|
|
101
101
|
registerAfterErrorHook(hook: AfterErrorHook): void;
|
|
102
102
|
}
|
|
103
|
+
|
|
104
|
+
export type Hook =
|
|
105
|
+
| SDKInitHook
|
|
106
|
+
| BeforeCreateRequestHook
|
|
107
|
+
| BeforeRequestHook
|
|
108
|
+
| AfterSuccessHook
|
|
109
|
+
| AfterErrorHook;
|
package/src/lib/config.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { Params, pathToFunc } from "./url.js";
|
|
|
11
11
|
* Contains the list of servers available to the SDK
|
|
12
12
|
*/
|
|
13
13
|
export const ServerList = [
|
|
14
|
-
"https://my.
|
|
14
|
+
"https://my.orq.ai",
|
|
15
15
|
] as const;
|
|
16
16
|
|
|
17
17
|
export type SDKOptions = {
|
|
@@ -54,7 +54,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
54
54
|
export const SDK_METADATA = {
|
|
55
55
|
language: "typescript",
|
|
56
56
|
openapiDocVersion: "2.0",
|
|
57
|
-
sdkVersion: "1.31.
|
|
58
|
-
genVersion: "2.
|
|
59
|
-
userAgent: "speakeasy-sdk/typescript 1.31.
|
|
57
|
+
sdkVersion: "1.31.1",
|
|
58
|
+
genVersion: "2.477.0",
|
|
59
|
+
userAgent: "speakeasy-sdk/typescript 1.31.1 2.477.0 2.0 @orq-ai/node",
|
|
60
60
|
} as const;
|
|
@@ -685,11 +685,11 @@ export namespace FunctionT$ {
|
|
|
685
685
|
export type Outbound = FunctionT$Outbound;
|
|
686
686
|
}
|
|
687
687
|
|
|
688
|
-
export function
|
|
688
|
+
export function functionToJSON(functionT: FunctionT): string {
|
|
689
689
|
return JSON.stringify(FunctionT$outboundSchema.parse(functionT));
|
|
690
690
|
}
|
|
691
691
|
|
|
692
|
-
export function
|
|
692
|
+
export function functionFromJSON(
|
|
693
693
|
jsonString: string,
|
|
694
694
|
): SafeParseResult<FunctionT, SDKValidationError> {
|
|
695
695
|
return safeParse(
|
|
@@ -235,7 +235,7 @@ export const ResponseBody$inboundSchema: z.ZodType<
|
|
|
235
235
|
bytes: z.number(),
|
|
236
236
|
file_name: z.string(),
|
|
237
237
|
created: z.string().datetime({ offset: true }).default(
|
|
238
|
-
"2024-
|
|
238
|
+
"2024-12-01T21:30:45.101Z",
|
|
239
239
|
).transform(v => new Date(v)),
|
|
240
240
|
}).transform((v) => {
|
|
241
241
|
return remap$(v, {
|
|
@@ -266,7 +266,7 @@ export const ResponseBody$outboundSchema: z.ZodType<
|
|
|
266
266
|
purpose: BulkFileUploadFilesPurpose$outboundSchema,
|
|
267
267
|
bytes: z.number(),
|
|
268
268
|
fileName: z.string(),
|
|
269
|
-
created: z.date().default(() => new Date("2024-
|
|
269
|
+
created: z.date().default(() => new Date("2024-12-01T21:30:45.101Z"))
|
|
270
270
|
.transform(v => v.toISOString()),
|
|
271
271
|
}).transform((v) => {
|
|
272
272
|
return remap$(v, {
|
|
@@ -177,7 +177,7 @@ export const CreateContactResponseBody$inboundSchema: z.ZodType<
|
|
|
177
177
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
178
178
|
.optional(),
|
|
179
179
|
updated: z.string().datetime({ offset: true }).default(
|
|
180
|
-
"2024-
|
|
180
|
+
"2024-12-01T21:30:44.576Z",
|
|
181
181
|
).transform(v => new Date(v)),
|
|
182
182
|
}).transform((v) => {
|
|
183
183
|
return remap$(v, {
|
|
@@ -214,7 +214,7 @@ export const CreateContactResponseBody$outboundSchema: z.ZodType<
|
|
|
214
214
|
tags: z.array(z.string()).optional(),
|
|
215
215
|
metadata: z.record(z.any()).optional(),
|
|
216
216
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
217
|
-
updated: z.date().default(() => new Date("2024-
|
|
217
|
+
updated: z.date().default(() => new Date("2024-12-01T21:30:44.576Z"))
|
|
218
218
|
.transform(v => v.toISOString()),
|
|
219
219
|
}).transform((v) => {
|
|
220
220
|
return remap$(v, {
|
|
@@ -21,6 +21,7 @@ export const ModelType = {
|
|
|
21
21
|
Tts: "tts",
|
|
22
22
|
Stt: "stt",
|
|
23
23
|
Rerank: "rerank",
|
|
24
|
+
Moderations: "moderations",
|
|
24
25
|
} as const;
|
|
25
26
|
/**
|
|
26
27
|
* The type of the model
|
|
@@ -207,6 +208,7 @@ export const Provider = {
|
|
|
207
208
|
Fal: "fal",
|
|
208
209
|
Leonardoai: "leonardoai",
|
|
209
210
|
Nvidia: "nvidia",
|
|
211
|
+
Jina: "jina",
|
|
210
212
|
} as const;
|
|
211
213
|
export type Provider = ClosedEnum<typeof Provider>;
|
|
212
214
|
|
|
@@ -359,6 +361,7 @@ export const CreatePromptModelType = {
|
|
|
359
361
|
Tts: "tts",
|
|
360
362
|
Stt: "stt",
|
|
361
363
|
Rerank: "rerank",
|
|
364
|
+
Moderations: "moderations",
|
|
362
365
|
} as const;
|
|
363
366
|
/**
|
|
364
367
|
* The type of the model
|
|
@@ -557,6 +560,7 @@ export const CreatePromptProvider = {
|
|
|
557
560
|
Fal: "fal",
|
|
558
561
|
Leonardoai: "leonardoai",
|
|
559
562
|
Nvidia: "nvidia",
|
|
563
|
+
Jina: "jina",
|
|
560
564
|
} as const;
|
|
561
565
|
export type CreatePromptProvider = ClosedEnum<typeof CreatePromptProvider>;
|
|
562
566
|
|
|
@@ -21,6 +21,7 @@ export const CreatePromptVersionModelType = {
|
|
|
21
21
|
Tts: "tts",
|
|
22
22
|
Stt: "stt",
|
|
23
23
|
Rerank: "rerank",
|
|
24
|
+
Moderations: "moderations",
|
|
24
25
|
} as const;
|
|
25
26
|
/**
|
|
26
27
|
* The type of the model
|
|
@@ -225,6 +226,7 @@ export const CreatePromptVersionProvider = {
|
|
|
225
226
|
Fal: "fal",
|
|
226
227
|
Leonardoai: "leonardoai",
|
|
227
228
|
Nvidia: "nvidia",
|
|
229
|
+
Jina: "jina",
|
|
228
230
|
} as const;
|
|
229
231
|
export type CreatePromptVersionProvider = ClosedEnum<
|
|
230
232
|
typeof CreatePromptVersionProvider
|
|
@@ -386,6 +388,7 @@ export const CreatePromptVersionPromptsModelType = {
|
|
|
386
388
|
Tts: "tts",
|
|
387
389
|
Stt: "stt",
|
|
388
390
|
Rerank: "rerank",
|
|
391
|
+
Moderations: "moderations",
|
|
389
392
|
} as const;
|
|
390
393
|
/**
|
|
391
394
|
* The type of the model
|
|
@@ -589,6 +592,7 @@ export const CreatePromptVersionPromptsProvider = {
|
|
|
589
592
|
Fal: "fal",
|
|
590
593
|
Leonardoai: "leonardoai",
|
|
591
594
|
Nvidia: "nvidia",
|
|
595
|
+
Jina: "jina",
|
|
592
596
|
} as const;
|
|
593
597
|
export type CreatePromptVersionPromptsProvider = ClosedEnum<
|
|
594
598
|
typeof CreatePromptVersionPromptsProvider
|
|
@@ -291,6 +291,7 @@ export const DeploymentGetConfigDeploymentsResponseType = {
|
|
|
291
291
|
Tts: "tts",
|
|
292
292
|
Stt: "stt",
|
|
293
293
|
Rerank: "rerank",
|
|
294
|
+
Moderations: "moderations",
|
|
294
295
|
} as const;
|
|
295
296
|
/**
|
|
296
297
|
* The type of the model. Current `chat`,`completion` and `image` are supported
|
|
@@ -1074,11 +1075,11 @@ export namespace FunctionT$ {
|
|
|
1074
1075
|
export type Outbound = FunctionT$Outbound;
|
|
1075
1076
|
}
|
|
1076
1077
|
|
|
1077
|
-
export function
|
|
1078
|
+
export function functionToJSON(functionT: FunctionT): string {
|
|
1078
1079
|
return JSON.stringify(FunctionT$outboundSchema.parse(functionT));
|
|
1079
1080
|
}
|
|
1080
1081
|
|
|
1081
|
-
export function
|
|
1082
|
+
export function functionFromJSON(
|
|
1082
1083
|
jsonString: string,
|
|
1083
1084
|
): SafeParseResult<FunctionT, SDKValidationError> {
|
|
1084
1085
|
return safeParse(
|
|
@@ -3183,11 +3184,11 @@ export namespace ParametersT$ {
|
|
|
3183
3184
|
export type Outbound = ParametersT$Outbound;
|
|
3184
3185
|
}
|
|
3185
3186
|
|
|
3186
|
-
export function
|
|
3187
|
+
export function parametersToJSON(parametersT: ParametersT): string {
|
|
3187
3188
|
return JSON.stringify(ParametersT$outboundSchema.parse(parametersT));
|
|
3188
3189
|
}
|
|
3189
3190
|
|
|
3190
|
-
export function
|
|
3191
|
+
export function parametersFromJSON(
|
|
3191
3192
|
jsonString: string,
|
|
3192
3193
|
): SafeParseResult<ParametersT, SDKValidationError> {
|
|
3193
3194
|
return safeParse(
|
|
@@ -98,6 +98,7 @@ export const DeploymentsModelType = {
|
|
|
98
98
|
Tts: "tts",
|
|
99
99
|
Stt: "stt",
|
|
100
100
|
Rerank: "rerank",
|
|
101
|
+
Moderations: "moderations",
|
|
101
102
|
} as const;
|
|
102
103
|
/**
|
|
103
104
|
* The type of the model
|
|
@@ -296,6 +297,7 @@ export const DeploymentsProvider = {
|
|
|
296
297
|
Fal: "fal",
|
|
297
298
|
Leonardoai: "leonardoai",
|
|
298
299
|
Nvidia: "nvidia",
|
|
300
|
+
Jina: "jina",
|
|
299
301
|
} as const;
|
|
300
302
|
export type DeploymentsProvider = ClosedEnum<typeof DeploymentsProvider>;
|
|
301
303
|
|
|
@@ -115,11 +115,11 @@ export namespace FileT$ {
|
|
|
115
115
|
export type Outbound = FileT$Outbound;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
export function
|
|
118
|
+
export function fileToJSON(fileT: FileT): string {
|
|
119
119
|
return JSON.stringify(FileT$outboundSchema.parse(fileT));
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
export function
|
|
122
|
+
export function fileFromJSON(
|
|
123
123
|
jsonString: string,
|
|
124
124
|
): SafeParseResult<FileT, SDKValidationError> {
|
|
125
125
|
return safeParse(
|
|
@@ -238,7 +238,7 @@ export const FileUploadResponseBody$inboundSchema: z.ZodType<
|
|
|
238
238
|
bytes: z.number(),
|
|
239
239
|
file_name: z.string(),
|
|
240
240
|
created: z.string().datetime({ offset: true }).default(
|
|
241
|
-
"2024-
|
|
241
|
+
"2024-12-01T21:30:45.101Z",
|
|
242
242
|
).transform(v => new Date(v)),
|
|
243
243
|
}).transform((v) => {
|
|
244
244
|
return remap$(v, {
|
|
@@ -269,7 +269,7 @@ export const FileUploadResponseBody$outboundSchema: z.ZodType<
|
|
|
269
269
|
purpose: FileUploadPurpose$outboundSchema,
|
|
270
270
|
bytes: z.number(),
|
|
271
271
|
fileName: z.string(),
|
|
272
|
-
created: z.date().default(() => new Date("2024-
|
|
272
|
+
created: z.date().default(() => new Date("2024-12-01T21:30:45.101Z"))
|
|
273
273
|
.transform(v => v.toISOString()),
|
|
274
274
|
}).transform((v) => {
|
|
275
275
|
return remap$(v, {
|