@orq-ai/node 3.1.0-rc.54 → 3.1.0-rc.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/docs/sdks/prompts/README.md +182 -25
- package/funcs/contactsCreate.d.ts.map +1 -1
- package/funcs/contactsCreate.js +0 -4
- package/funcs/contactsCreate.js.map +1 -1
- package/funcs/deploymentsGetConfig.d.ts.map +1 -1
- package/funcs/deploymentsGetConfig.js +0 -4
- package/funcs/deploymentsGetConfig.js.map +1 -1
- package/funcs/deploymentsList.d.ts.map +1 -1
- package/funcs/deploymentsList.js +0 -4
- package/funcs/deploymentsList.js.map +1 -1
- package/funcs/deploymentsMetricsCreate.d.ts.map +1 -1
- package/funcs/deploymentsMetricsCreate.js +0 -4
- package/funcs/deploymentsMetricsCreate.js.map +1 -1
- package/funcs/feedbackCreate.d.ts.map +1 -1
- package/funcs/feedbackCreate.js +0 -4
- package/funcs/feedbackCreate.js.map +1 -1
- package/funcs/filesDelete.d.ts.map +1 -1
- package/funcs/filesDelete.js +0 -4
- package/funcs/filesDelete.js.map +1 -1
- package/funcs/filesGet.d.ts.map +1 -1
- package/funcs/filesGet.js +0 -4
- package/funcs/filesGet.js.map +1 -1
- package/funcs/filesList.d.ts.map +1 -1
- package/funcs/filesList.js +0 -4
- package/funcs/filesList.js.map +1 -1
- package/funcs/filesUpload.d.ts.map +1 -1
- package/funcs/filesUpload.js +0 -4
- package/funcs/filesUpload.js.map +1 -1
- package/funcs/promptSnippetsCreate.d.ts.map +1 -1
- package/funcs/promptSnippetsCreate.js +0 -4
- package/funcs/promptSnippetsCreate.js.map +1 -1
- package/funcs/promptSnippetsDelete.d.ts.map +1 -1
- package/funcs/promptSnippetsDelete.js +0 -4
- package/funcs/promptSnippetsDelete.js.map +1 -1
- package/funcs/promptSnippetsGet.d.ts.map +1 -1
- package/funcs/promptSnippetsGet.js +0 -4
- package/funcs/promptSnippetsGet.js.map +1 -1
- package/funcs/promptSnippetsGetByKey.d.ts.map +1 -1
- package/funcs/promptSnippetsGetByKey.js +0 -4
- package/funcs/promptSnippetsGetByKey.js.map +1 -1
- package/funcs/promptSnippetsList.d.ts.map +1 -1
- package/funcs/promptSnippetsList.js +0 -4
- package/funcs/promptSnippetsList.js.map +1 -1
- package/funcs/promptSnippetsUpdate.d.ts.map +1 -1
- package/funcs/promptSnippetsUpdate.js +0 -4
- package/funcs/promptSnippetsUpdate.js.map +1 -1
- package/funcs/promptsCreate.d.ts.map +1 -1
- package/funcs/promptsCreate.js +0 -4
- package/funcs/promptsCreate.js.map +1 -1
- package/funcs/promptsDelete.d.ts.map +1 -1
- package/funcs/promptsDelete.js +0 -4
- package/funcs/promptsDelete.js.map +1 -1
- package/funcs/promptsGetVersion.d.ts +16 -0
- package/funcs/promptsGetVersion.d.ts.map +1 -0
- package/funcs/promptsGetVersion.js +120 -0
- package/funcs/promptsGetVersion.js.map +1 -0
- package/funcs/promptsList.d.ts +3 -0
- package/funcs/promptsList.d.ts.map +1 -1
- package/funcs/promptsList.js +3 -4
- package/funcs/promptsList.js.map +1 -1
- package/funcs/promptsListVersions.d.ts +15 -0
- package/funcs/promptsListVersions.d.ts.map +1 -0
- package/funcs/promptsListVersions.js +118 -0
- package/funcs/promptsListVersions.js.map +1 -0
- package/funcs/{promptsGet.d.ts → promptsRetrieve.d.ts} +5 -2
- package/funcs/promptsRetrieve.d.ts.map +1 -0
- package/funcs/{promptsGet.js → promptsRetrieve.js} +6 -7
- package/funcs/promptsRetrieve.js.map +1 -0
- package/funcs/promptsUpdate.d.ts.map +1 -1
- package/funcs/promptsUpdate.js +0 -4
- package/funcs/promptsUpdate.js.map +1 -1
- package/funcs/remoteconfigGetConfig.d.ts.map +1 -1
- package/funcs/remoteconfigGetConfig.js +0 -4
- package/funcs/remoteconfigGetConfig.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/errors/getpromptversion.d.ts +36 -0
- package/models/errors/getpromptversion.d.ts.map +1 -0
- package/models/errors/getpromptversion.js +79 -0
- package/models/errors/getpromptversion.js.map +1 -0
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/operations/createcontact.d.ts +0 -25
- package/models/operations/createcontact.d.ts.map +1 -1
- package/models/operations/createcontact.js +3 -30
- package/models/operations/createcontact.js.map +1 -1
- package/models/operations/createfeedback.d.ts +0 -25
- package/models/operations/createfeedback.d.ts.map +1 -1
- package/models/operations/createfeedback.js +1 -28
- package/models/operations/createfeedback.js.map +1 -1
- package/models/operations/createprompt.d.ts +690 -1932
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +49 -1105
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createpromptsnippet.d.ts +0 -25
- package/models/operations/createpromptsnippet.d.ts.map +1 -1
- package/models/operations/createpromptsnippet.js +9 -36
- package/models/operations/createpromptsnippet.js.map +1 -1
- package/models/operations/deleteprompt.d.ts +0 -25
- package/models/operations/deleteprompt.d.ts.map +1 -1
- package/models/operations/deleteprompt.js +1 -28
- package/models/operations/deleteprompt.js.map +1 -1
- package/models/operations/deletepromptsnippet.d.ts +0 -25
- package/models/operations/deletepromptsnippet.d.ts.map +1 -1
- package/models/operations/deletepromptsnippet.js +1 -28
- package/models/operations/deletepromptsnippet.js.map +1 -1
- package/models/operations/deploymentcreatemetric.d.ts +0 -25
- package/models/operations/deploymentcreatemetric.d.ts.map +1 -1
- package/models/operations/deploymentcreatemetric.js +2 -29
- package/models/operations/deploymentcreatemetric.js.map +1 -1
- package/models/operations/deploymentgetconfig.d.ts +0 -25
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +4 -31
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deployments.d.ts +0 -25
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +3 -30
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/filedelete.d.ts +0 -25
- package/models/operations/filedelete.d.ts.map +1 -1
- package/models/operations/filedelete.js +1 -28
- package/models/operations/filedelete.js.map +1 -1
- package/models/operations/fileget.d.ts +0 -25
- package/models/operations/fileget.d.ts.map +1 -1
- package/models/operations/fileget.js +3 -30
- package/models/operations/fileget.js.map +1 -1
- package/models/operations/filelist.d.ts +0 -25
- package/models/operations/filelist.d.ts.map +1 -1
- package/models/operations/filelist.js +3 -30
- package/models/operations/filelist.js.map +1 -1
- package/models/operations/fileupload.d.ts +0 -25
- package/models/operations/fileupload.d.ts.map +1 -1
- package/models/operations/fileupload.js +3 -30
- package/models/operations/fileupload.js.map +1 -1
- package/models/operations/findonebykeypromptsnippet.d.ts +0 -25
- package/models/operations/findonebykeypromptsnippet.d.ts.map +1 -1
- package/models/operations/findonebykeypromptsnippet.js +7 -34
- package/models/operations/findonebykeypromptsnippet.js.map +1 -1
- package/models/operations/findonepromptsnippet.d.ts +0 -25
- package/models/operations/findonepromptsnippet.d.ts.map +1 -1
- package/models/operations/findonepromptsnippet.js +7 -34
- package/models/operations/findonepromptsnippet.js.map +1 -1
- package/models/operations/getallprompts.d.ts +426 -1671
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +47 -1099
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getallpromptsnippets.d.ts +0 -25
- package/models/operations/getallpromptsnippets.d.ts.map +1 -1
- package/models/operations/getallpromptsnippets.js +7 -34
- package/models/operations/getallpromptsnippets.js.map +1 -1
- package/models/operations/getoneprompt.d.ts +0 -25
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +1 -28
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +1228 -0
- package/models/operations/getpromptversion.d.ts.map +1 -0
- package/models/operations/getpromptversion.js +1080 -0
- package/models/operations/getpromptversion.js.map +1 -0
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listpromptversions.d.ts +1286 -0
- package/models/operations/listpromptversions.d.ts.map +1 -0
- package/models/operations/listpromptversions.js +1142 -0
- package/models/operations/listpromptversions.js.map +1 -0
- package/models/operations/remoteconfigsgetconfig.d.ts +0 -25
- package/models/operations/remoteconfigsgetconfig.d.ts.map +1 -1
- package/models/operations/remoteconfigsgetconfig.js +1 -28
- package/models/operations/remoteconfigsgetconfig.js.map +1 -1
- package/models/operations/updateprompt.d.ts +728 -1958
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +67 -1105
- package/models/operations/updateprompt.js.map +1 -1
- package/models/operations/updatepromptsnippet.d.ts +0 -25
- package/models/operations/updatepromptsnippet.d.ts.map +1 -1
- package/models/operations/updatepromptsnippet.js +9 -36
- package/models/operations/updatepromptsnippet.js.map +1 -1
- package/package.json +1 -1
- package/sdk/prompts.d.ts +24 -4
- package/sdk/prompts.d.ts.map +1 -1
- package/sdk/prompts.js +33 -7
- package/sdk/prompts.js.map +1 -1
- package/src/funcs/contactsCreate.ts +1 -5
- package/src/funcs/deploymentsGetConfig.ts +1 -5
- package/src/funcs/deploymentsList.ts +1 -5
- package/src/funcs/deploymentsMetricsCreate.ts +0 -4
- package/src/funcs/feedbackCreate.ts +1 -5
- package/src/funcs/filesDelete.ts +0 -4
- package/src/funcs/filesGet.ts +0 -4
- package/src/funcs/filesList.ts +1 -5
- package/src/funcs/filesUpload.ts +1 -5
- package/src/funcs/promptSnippetsCreate.ts +1 -5
- package/src/funcs/promptSnippetsDelete.ts +0 -4
- package/src/funcs/promptSnippetsGet.ts +0 -4
- package/src/funcs/promptSnippetsGetByKey.ts +0 -4
- package/src/funcs/promptSnippetsList.ts +1 -5
- package/src/funcs/promptSnippetsUpdate.ts +0 -4
- package/src/funcs/promptsCreate.ts +1 -5
- package/src/funcs/promptsDelete.ts +0 -4
- package/src/funcs/promptsGetVersion.ts +146 -0
- package/src/funcs/promptsList.ts +4 -5
- package/src/funcs/promptsListVersions.ts +139 -0
- package/src/funcs/{promptsGet.ts → promptsRetrieve.ts} +4 -5
- package/src/funcs/promptsUpdate.ts +0 -4
- package/src/funcs/remoteconfigGetConfig.ts +1 -5
- package/src/lib/config.ts +2 -2
- package/src/models/errors/getpromptversion.ts +71 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/operations/createcontact.ts +2 -60
- package/src/models/operations/createfeedback.ts +0 -58
- package/src/models/operations/createprompt.ts +1375 -3592
- package/src/models/operations/createpromptsnippet.ts +2 -60
- package/src/models/operations/deleteprompt.ts +0 -58
- package/src/models/operations/deletepromptsnippet.ts +0 -58
- package/src/models/operations/deploymentcreatemetric.ts +0 -60
- package/src/models/operations/deploymentgetconfig.ts +0 -58
- package/src/models/operations/deployments.ts +0 -58
- package/src/models/operations/filedelete.ts +0 -58
- package/src/models/operations/fileget.ts +2 -56
- package/src/models/operations/filelist.ts +2 -58
- package/src/models/operations/fileupload.ts +2 -60
- package/src/models/operations/findonebykeypromptsnippet.ts +2 -62
- package/src/models/operations/findonepromptsnippet.ts +2 -62
- package/src/models/operations/getallprompts.ts +732 -2826
- package/src/models/operations/getallpromptsnippets.ts +2 -62
- package/src/models/operations/getoneprompt.ts +0 -58
- package/src/models/operations/getpromptversion.ts +2012 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listpromptversions.ts +2146 -0
- package/src/models/operations/remoteconfigsgetconfig.ts +0 -60
- package/src/models/operations/updateprompt.ts +1544 -3731
- package/src/models/operations/updatepromptsnippet.ts +2 -60
- package/src/sdk/prompts.ts +53 -11
- package/funcs/promptsGet.d.ts.map +0 -1
- package/funcs/promptsGet.js.map +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { OrqCore } from "../core.js";
|
|
6
|
-
import { encodeJSON
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -60,10 +60,6 @@ export async function feedbackCreate(
|
|
|
60
60
|
const headers = new Headers(compactMap({
|
|
61
61
|
"Content-Type": "application/json",
|
|
62
62
|
Accept: "application/json",
|
|
63
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
64
|
-
explode: false,
|
|
65
|
-
charEncoding: "none",
|
|
66
|
-
}),
|
|
67
63
|
}));
|
|
68
64
|
|
|
69
65
|
const secConfig = await extractSecurity(client._options.apiKey);
|
package/src/funcs/filesDelete.ts
CHANGED
|
@@ -64,10 +64,6 @@ export async function filesDelete(
|
|
|
64
64
|
|
|
65
65
|
const headers = new Headers(compactMap({
|
|
66
66
|
Accept: "*/*",
|
|
67
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
68
|
-
explode: false,
|
|
69
|
-
charEncoding: "none",
|
|
70
|
-
}),
|
|
71
67
|
}));
|
|
72
68
|
|
|
73
69
|
const secConfig = await extractSecurity(client._options.apiKey);
|
package/src/funcs/filesGet.ts
CHANGED
|
@@ -63,10 +63,6 @@ export async function filesGet(
|
|
|
63
63
|
|
|
64
64
|
const headers = new Headers(compactMap({
|
|
65
65
|
Accept: "application/json",
|
|
66
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
67
|
-
explode: false,
|
|
68
|
-
charEncoding: "none",
|
|
69
|
-
}),
|
|
70
66
|
}));
|
|
71
67
|
|
|
72
68
|
const secConfig = await extractSecurity(client._options.apiKey);
|
package/src/funcs/filesList.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { OrqCore } from "../core.js";
|
|
6
|
-
import { encodeFormQuery
|
|
6
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -64,10 +64,6 @@ export async function filesList(
|
|
|
64
64
|
|
|
65
65
|
const headers = new Headers(compactMap({
|
|
66
66
|
Accept: "application/json",
|
|
67
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
68
|
-
explode: false,
|
|
69
|
-
charEncoding: "none",
|
|
70
|
-
}),
|
|
71
67
|
}));
|
|
72
68
|
|
|
73
69
|
const secConfig = await extractSecurity(client._options.apiKey);
|
package/src/funcs/filesUpload.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { OrqCore } from "../core.js";
|
|
6
|
-
import { appendForm
|
|
6
|
+
import { appendForm } from "../lib/encodings.js";
|
|
7
7
|
import { readableStreamToArrayBuffer } from "../lib/files.js";
|
|
8
8
|
import * as M from "../lib/matchers.js";
|
|
9
9
|
import { compactMap } from "../lib/primitives.js";
|
|
@@ -83,10 +83,6 @@ export async function filesUpload(
|
|
|
83
83
|
|
|
84
84
|
const headers = new Headers(compactMap({
|
|
85
85
|
Accept: "application/json",
|
|
86
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
87
|
-
explode: false,
|
|
88
|
-
charEncoding: "none",
|
|
89
|
-
}),
|
|
90
86
|
}));
|
|
91
87
|
|
|
92
88
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { OrqCore } from "../core.js";
|
|
6
|
-
import { encodeJSON
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -62,10 +62,6 @@ export async function promptSnippetsCreate(
|
|
|
62
62
|
const headers = new Headers(compactMap({
|
|
63
63
|
"Content-Type": "application/json",
|
|
64
64
|
Accept: "application/json",
|
|
65
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
66
|
-
explode: false,
|
|
67
|
-
charEncoding: "none",
|
|
68
|
-
}),
|
|
69
65
|
}));
|
|
70
66
|
|
|
71
67
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
@@ -65,10 +65,6 @@ export async function promptSnippetsDelete(
|
|
|
65
65
|
|
|
66
66
|
const headers = new Headers(compactMap({
|
|
67
67
|
Accept: "*/*",
|
|
68
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
69
|
-
explode: false,
|
|
70
|
-
charEncoding: "none",
|
|
71
|
-
}),
|
|
72
68
|
}));
|
|
73
69
|
|
|
74
70
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
@@ -64,10 +64,6 @@ export async function promptSnippetsGet(
|
|
|
64
64
|
|
|
65
65
|
const headers = new Headers(compactMap({
|
|
66
66
|
Accept: "application/json",
|
|
67
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
68
|
-
explode: false,
|
|
69
|
-
charEncoding: "none",
|
|
70
|
-
}),
|
|
71
67
|
}));
|
|
72
68
|
|
|
73
69
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
@@ -66,10 +66,6 @@ export async function promptSnippetsGetByKey(
|
|
|
66
66
|
|
|
67
67
|
const headers = new Headers(compactMap({
|
|
68
68
|
Accept: "application/json",
|
|
69
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
70
|
-
explode: false,
|
|
71
|
-
charEncoding: "none",
|
|
72
|
-
}),
|
|
73
69
|
}));
|
|
74
70
|
|
|
75
71
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { OrqCore } from "../core.js";
|
|
6
|
-
import { encodeFormQuery
|
|
6
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -65,10 +65,6 @@ export async function promptSnippetsList(
|
|
|
65
65
|
|
|
66
66
|
const headers = new Headers(compactMap({
|
|
67
67
|
Accept: "application/json",
|
|
68
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
69
|
-
explode: false,
|
|
70
|
-
charEncoding: "none",
|
|
71
|
-
}),
|
|
72
68
|
}));
|
|
73
69
|
|
|
74
70
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
@@ -67,10 +67,6 @@ export async function promptSnippetsUpdate(
|
|
|
67
67
|
const headers = new Headers(compactMap({
|
|
68
68
|
"Content-Type": "application/json",
|
|
69
69
|
Accept: "application/json",
|
|
70
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
71
|
-
explode: false,
|
|
72
|
-
charEncoding: "none",
|
|
73
|
-
}),
|
|
74
70
|
}));
|
|
75
71
|
|
|
76
72
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { OrqCore } from "../core.js";
|
|
6
|
-
import { encodeJSON
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -60,10 +60,6 @@ export async function promptsCreate(
|
|
|
60
60
|
const headers = new Headers(compactMap({
|
|
61
61
|
"Content-Type": "application/json",
|
|
62
62
|
Accept: "application/json",
|
|
63
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
64
|
-
explode: false,
|
|
65
|
-
charEncoding: "none",
|
|
66
|
-
}),
|
|
67
63
|
}));
|
|
68
64
|
|
|
69
65
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
@@ -64,10 +64,6 @@ export async function promptsDelete(
|
|
|
64
64
|
|
|
65
65
|
const headers = new Headers(compactMap({
|
|
66
66
|
Accept: "*/*",
|
|
67
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
68
|
-
explode: false,
|
|
69
|
-
charEncoding: "none",
|
|
70
|
-
}),
|
|
71
67
|
}));
|
|
72
68
|
|
|
73
69
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { OrqCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
22
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
+
import * as operations from "../models/operations/index.js";
|
|
24
|
+
import { Result } from "../types/fp.js";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Retrieve a prompt version
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Retrieves a specific version of a prompt by its ID and version ID.
|
|
31
|
+
*/
|
|
32
|
+
export async function promptsGetVersion(
|
|
33
|
+
client: OrqCore,
|
|
34
|
+
request: operations.GetPromptVersionRequest,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): Promise<
|
|
37
|
+
Result<
|
|
38
|
+
operations.GetPromptVersionResponseBody,
|
|
39
|
+
| errors.GetPromptVersionResponseBody
|
|
40
|
+
| APIError
|
|
41
|
+
| SDKValidationError
|
|
42
|
+
| UnexpectedClientError
|
|
43
|
+
| InvalidRequestError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| ConnectionError
|
|
47
|
+
>
|
|
48
|
+
> {
|
|
49
|
+
const parsed = safeParse(
|
|
50
|
+
request,
|
|
51
|
+
(value) => operations.GetPromptVersionRequest$outboundSchema.parse(value),
|
|
52
|
+
"Input validation failed",
|
|
53
|
+
);
|
|
54
|
+
if (!parsed.ok) {
|
|
55
|
+
return parsed;
|
|
56
|
+
}
|
|
57
|
+
const payload = parsed.value;
|
|
58
|
+
const body = null;
|
|
59
|
+
|
|
60
|
+
const pathParams = {
|
|
61
|
+
prompt_id: encodeSimple("prompt_id", payload.prompt_id, {
|
|
62
|
+
explode: false,
|
|
63
|
+
charEncoding: "percent",
|
|
64
|
+
}),
|
|
65
|
+
version_id: encodeSimple("version_id", payload.version_id, {
|
|
66
|
+
explode: false,
|
|
67
|
+
charEncoding: "percent",
|
|
68
|
+
}),
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const path = pathToFunc("/v2/prompts/{prompt_id}/versions/{version_id}")(
|
|
72
|
+
pathParams,
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
const headers = new Headers(compactMap({
|
|
76
|
+
Accept: "application/json",
|
|
77
|
+
}));
|
|
78
|
+
|
|
79
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
80
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
81
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
82
|
+
|
|
83
|
+
const context = {
|
|
84
|
+
operationID: "GetPromptVersion",
|
|
85
|
+
oAuth2Scopes: [],
|
|
86
|
+
|
|
87
|
+
resolvedSecurity: requestSecurity,
|
|
88
|
+
|
|
89
|
+
securitySource: client._options.apiKey,
|
|
90
|
+
retryConfig: options?.retries
|
|
91
|
+
|| client._options.retryConfig
|
|
92
|
+
|| { strategy: "none" },
|
|
93
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const requestRes = client._createRequest(context, {
|
|
97
|
+
security: requestSecurity,
|
|
98
|
+
method: "GET",
|
|
99
|
+
baseURL: options?.serverURL,
|
|
100
|
+
path: path,
|
|
101
|
+
headers: headers,
|
|
102
|
+
body: body,
|
|
103
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
104
|
+
}, options);
|
|
105
|
+
if (!requestRes.ok) {
|
|
106
|
+
return requestRes;
|
|
107
|
+
}
|
|
108
|
+
const req = requestRes.value;
|
|
109
|
+
|
|
110
|
+
const doResult = await client._do(req, {
|
|
111
|
+
context,
|
|
112
|
+
errorCodes: ["404", "4XX", "5XX"],
|
|
113
|
+
retryConfig: context.retryConfig,
|
|
114
|
+
retryCodes: context.retryCodes,
|
|
115
|
+
});
|
|
116
|
+
if (!doResult.ok) {
|
|
117
|
+
return doResult;
|
|
118
|
+
}
|
|
119
|
+
const response = doResult.value;
|
|
120
|
+
|
|
121
|
+
const responseFields = {
|
|
122
|
+
HttpMeta: { Response: response, Request: req },
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const [result] = await M.match<
|
|
126
|
+
operations.GetPromptVersionResponseBody,
|
|
127
|
+
| errors.GetPromptVersionResponseBody
|
|
128
|
+
| APIError
|
|
129
|
+
| SDKValidationError
|
|
130
|
+
| UnexpectedClientError
|
|
131
|
+
| InvalidRequestError
|
|
132
|
+
| RequestAbortedError
|
|
133
|
+
| RequestTimeoutError
|
|
134
|
+
| ConnectionError
|
|
135
|
+
>(
|
|
136
|
+
M.json(200, operations.GetPromptVersionResponseBody$inboundSchema),
|
|
137
|
+
M.jsonErr(404, errors.GetPromptVersionResponseBody$inboundSchema),
|
|
138
|
+
M.fail("4XX"),
|
|
139
|
+
M.fail("5XX"),
|
|
140
|
+
)(response, { extraFields: responseFields });
|
|
141
|
+
if (!result.ok) {
|
|
142
|
+
return result;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return result;
|
|
146
|
+
}
|
package/src/funcs/promptsList.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { OrqCore } from "../core.js";
|
|
6
|
-
import { encodeFormQuery
|
|
6
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -24,6 +24,9 @@ import { Result } from "../types/fp.js";
|
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* List all prompts
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Returns a list of your prompts. The prompts are returned sorted by creation date, with the most recent prompts appearing first
|
|
27
30
|
*/
|
|
28
31
|
export async function promptsList(
|
|
29
32
|
client: OrqCore,
|
|
@@ -63,10 +66,6 @@ export async function promptsList(
|
|
|
63
66
|
|
|
64
67
|
const headers = new Headers(compactMap({
|
|
65
68
|
Accept: "application/json",
|
|
66
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
67
|
-
explode: false,
|
|
68
|
-
charEncoding: "none",
|
|
69
|
-
}),
|
|
70
69
|
}));
|
|
71
70
|
|
|
72
71
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { OrqCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
|
+
import * as operations from "../models/operations/index.js";
|
|
23
|
+
import { Result } from "../types/fp.js";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* List all prompt versions
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Returns a list of your prompt versions. The prompt versions are returned sorted by creation date, with the most recent prompt versions appearing first
|
|
30
|
+
*/
|
|
31
|
+
export async function promptsListVersions(
|
|
32
|
+
client: OrqCore,
|
|
33
|
+
request: operations.ListPromptVersionsRequest,
|
|
34
|
+
options?: RequestOptions,
|
|
35
|
+
): Promise<
|
|
36
|
+
Result<
|
|
37
|
+
operations.ListPromptVersionsResponseBody,
|
|
38
|
+
| APIError
|
|
39
|
+
| SDKValidationError
|
|
40
|
+
| UnexpectedClientError
|
|
41
|
+
| InvalidRequestError
|
|
42
|
+
| RequestAbortedError
|
|
43
|
+
| RequestTimeoutError
|
|
44
|
+
| ConnectionError
|
|
45
|
+
>
|
|
46
|
+
> {
|
|
47
|
+
const parsed = safeParse(
|
|
48
|
+
request,
|
|
49
|
+
(value) => operations.ListPromptVersionsRequest$outboundSchema.parse(value),
|
|
50
|
+
"Input validation failed",
|
|
51
|
+
);
|
|
52
|
+
if (!parsed.ok) {
|
|
53
|
+
return parsed;
|
|
54
|
+
}
|
|
55
|
+
const payload = parsed.value;
|
|
56
|
+
const body = null;
|
|
57
|
+
|
|
58
|
+
const pathParams = {
|
|
59
|
+
prompt_id: encodeSimple("prompt_id", payload.prompt_id, {
|
|
60
|
+
explode: false,
|
|
61
|
+
charEncoding: "percent",
|
|
62
|
+
}),
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const path = pathToFunc("/v2/prompts/{prompt_id}/versions")(pathParams);
|
|
66
|
+
|
|
67
|
+
const query = encodeFormQuery({
|
|
68
|
+
"ending_before": payload.ending_before,
|
|
69
|
+
"limit": payload.limit,
|
|
70
|
+
"starting_after": payload.starting_after,
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
const headers = new Headers(compactMap({
|
|
74
|
+
Accept: "application/json",
|
|
75
|
+
}));
|
|
76
|
+
|
|
77
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
78
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
79
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
80
|
+
|
|
81
|
+
const context = {
|
|
82
|
+
operationID: "ListPromptVersions",
|
|
83
|
+
oAuth2Scopes: [],
|
|
84
|
+
|
|
85
|
+
resolvedSecurity: requestSecurity,
|
|
86
|
+
|
|
87
|
+
securitySource: client._options.apiKey,
|
|
88
|
+
retryConfig: options?.retries
|
|
89
|
+
|| client._options.retryConfig
|
|
90
|
+
|| { strategy: "none" },
|
|
91
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const requestRes = client._createRequest(context, {
|
|
95
|
+
security: requestSecurity,
|
|
96
|
+
method: "GET",
|
|
97
|
+
baseURL: options?.serverURL,
|
|
98
|
+
path: path,
|
|
99
|
+
headers: headers,
|
|
100
|
+
query: query,
|
|
101
|
+
body: body,
|
|
102
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
103
|
+
}, options);
|
|
104
|
+
if (!requestRes.ok) {
|
|
105
|
+
return requestRes;
|
|
106
|
+
}
|
|
107
|
+
const req = requestRes.value;
|
|
108
|
+
|
|
109
|
+
const doResult = await client._do(req, {
|
|
110
|
+
context,
|
|
111
|
+
errorCodes: ["4XX", "5XX"],
|
|
112
|
+
retryConfig: context.retryConfig,
|
|
113
|
+
retryCodes: context.retryCodes,
|
|
114
|
+
});
|
|
115
|
+
if (!doResult.ok) {
|
|
116
|
+
return doResult;
|
|
117
|
+
}
|
|
118
|
+
const response = doResult.value;
|
|
119
|
+
|
|
120
|
+
const [result] = await M.match<
|
|
121
|
+
operations.ListPromptVersionsResponseBody,
|
|
122
|
+
| APIError
|
|
123
|
+
| SDKValidationError
|
|
124
|
+
| UnexpectedClientError
|
|
125
|
+
| InvalidRequestError
|
|
126
|
+
| RequestAbortedError
|
|
127
|
+
| RequestTimeoutError
|
|
128
|
+
| ConnectionError
|
|
129
|
+
>(
|
|
130
|
+
M.json(200, operations.ListPromptVersionsResponseBody$inboundSchema),
|
|
131
|
+
M.fail("4XX"),
|
|
132
|
+
M.fail("5XX"),
|
|
133
|
+
)(response);
|
|
134
|
+
if (!result.ok) {
|
|
135
|
+
return result;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return result;
|
|
139
|
+
}
|
|
@@ -25,8 +25,11 @@ import { Result } from "../types/fp.js";
|
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Retrieve a prompt
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Retrieves a prompt object
|
|
28
31
|
*/
|
|
29
|
-
export async function
|
|
32
|
+
export async function promptsRetrieve(
|
|
30
33
|
client: OrqCore,
|
|
31
34
|
request: operations.GetOnePromptRequest,
|
|
32
35
|
options?: RequestOptions,
|
|
@@ -64,10 +67,6 @@ export async function promptsGet(
|
|
|
64
67
|
|
|
65
68
|
const headers = new Headers(compactMap({
|
|
66
69
|
Accept: "*/*",
|
|
67
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
68
|
-
explode: false,
|
|
69
|
-
charEncoding: "none",
|
|
70
|
-
}),
|
|
71
70
|
}));
|
|
72
71
|
|
|
73
72
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
@@ -66,10 +66,6 @@ export async function promptsUpdate(
|
|
|
66
66
|
const headers = new Headers(compactMap({
|
|
67
67
|
"Content-Type": "application/json",
|
|
68
68
|
Accept: "application/json",
|
|
69
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
70
|
-
explode: false,
|
|
71
|
-
charEncoding: "none",
|
|
72
|
-
}),
|
|
73
69
|
}));
|
|
74
70
|
|
|
75
71
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { OrqCore } from "../core.js";
|
|
6
|
-
import { encodeJSON
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -61,10 +61,6 @@ export async function remoteconfigGetConfig(
|
|
|
61
61
|
const headers = new Headers(compactMap({
|
|
62
62
|
"Content-Type": "application/json",
|
|
63
63
|
Accept: "application/json",
|
|
64
|
-
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
65
|
-
explode: false,
|
|
66
|
-
charEncoding: "none",
|
|
67
|
-
}),
|
|
68
64
|
}));
|
|
69
65
|
|
|
70
66
|
const secConfig = await extractSecurity(client._options.apiKey);
|
package/src/lib/config.ts
CHANGED
|
@@ -64,7 +64,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
64
64
|
export const SDK_METADATA = {
|
|
65
65
|
language: "typescript",
|
|
66
66
|
openapiDocVersion: "2.0",
|
|
67
|
-
sdkVersion: "3.1.0-rc.
|
|
67
|
+
sdkVersion: "3.1.0-rc.55",
|
|
68
68
|
genVersion: "2.506.0",
|
|
69
|
-
userAgent: "speakeasy-sdk/typescript 3.1.0-rc.
|
|
69
|
+
userAgent: "speakeasy-sdk/typescript 3.1.0-rc.55 2.506.0 2.0 @orq-ai/node",
|
|
70
70
|
} as const;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Not Found - The prompt or prompt version does not exist.
|
|
9
|
+
*/
|
|
10
|
+
export type GetPromptVersionResponseBodyData = {
|
|
11
|
+
message: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Not Found - The prompt or prompt version does not exist.
|
|
16
|
+
*/
|
|
17
|
+
export class GetPromptVersionResponseBody extends Error {
|
|
18
|
+
/** The original data that was passed to this error instance. */
|
|
19
|
+
data$: GetPromptVersionResponseBodyData;
|
|
20
|
+
|
|
21
|
+
constructor(err: GetPromptVersionResponseBodyData) {
|
|
22
|
+
const message = "message" in err && typeof err.message === "string"
|
|
23
|
+
? err.message
|
|
24
|
+
: `API error occurred: ${JSON.stringify(err)}`;
|
|
25
|
+
super(message);
|
|
26
|
+
this.data$ = err;
|
|
27
|
+
|
|
28
|
+
this.name = "GetPromptVersionResponseBody";
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const GetPromptVersionResponseBody$inboundSchema: z.ZodType<
|
|
34
|
+
GetPromptVersionResponseBody,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
unknown
|
|
37
|
+
> = z.object({
|
|
38
|
+
message: z.string(),
|
|
39
|
+
})
|
|
40
|
+
.transform((v) => {
|
|
41
|
+
return new GetPromptVersionResponseBody(v);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export type GetPromptVersionResponseBody$Outbound = {
|
|
46
|
+
message: string;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const GetPromptVersionResponseBody$outboundSchema: z.ZodType<
|
|
51
|
+
GetPromptVersionResponseBody$Outbound,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
GetPromptVersionResponseBody
|
|
54
|
+
> = z.instanceof(GetPromptVersionResponseBody)
|
|
55
|
+
.transform(v => v.data$)
|
|
56
|
+
.pipe(z.object({
|
|
57
|
+
message: z.string(),
|
|
58
|
+
}));
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @internal
|
|
62
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
63
|
+
*/
|
|
64
|
+
export namespace GetPromptVersionResponseBody$ {
|
|
65
|
+
/** @deprecated use `GetPromptVersionResponseBody$inboundSchema` instead. */
|
|
66
|
+
export const inboundSchema = GetPromptVersionResponseBody$inboundSchema;
|
|
67
|
+
/** @deprecated use `GetPromptVersionResponseBody$outboundSchema` instead. */
|
|
68
|
+
export const outboundSchema = GetPromptVersionResponseBody$outboundSchema;
|
|
69
|
+
/** @deprecated use `GetPromptVersionResponseBody$Outbound` instead. */
|
|
70
|
+
export type Outbound = GetPromptVersionResponseBody$Outbound;
|
|
71
|
+
}
|