@orq-ai/node 3.0.0-rc.19 → 3.0.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/README.md +1 -1
- package/RUNTIMES.md +27 -1
- package/funcs/contactsCreate.d.ts.map +1 -1
- package/funcs/contactsCreate.js +7 -6
- package/funcs/contactsCreate.js.map +1 -1
- package/funcs/deploymentsAll.d.ts.map +1 -1
- package/funcs/deploymentsAll.js +9 -8
- package/funcs/deploymentsAll.js.map +1 -1
- package/funcs/deploymentsGetConfig.d.ts.map +1 -1
- package/funcs/deploymentsGetConfig.js +7 -6
- package/funcs/deploymentsGetConfig.js.map +1 -1
- package/funcs/deploymentsInvoke.d.ts.map +1 -1
- package/funcs/deploymentsInvoke.js +8 -7
- package/funcs/deploymentsInvoke.js.map +1 -1
- package/funcs/deploymentsMetricsCreate.d.ts.map +1 -1
- package/funcs/deploymentsMetricsCreate.js +7 -6
- package/funcs/deploymentsMetricsCreate.js.map +1 -1
- package/funcs/feedbackCreate.d.ts.map +1 -1
- package/funcs/feedbackCreate.js +7 -6
- package/funcs/feedbackCreate.js.map +1 -1
- package/funcs/filesBulkUpload.d.ts.map +1 -1
- package/funcs/filesBulkUpload.js +10 -8
- package/funcs/filesBulkUpload.js.map +1 -1
- package/funcs/filesDelete.d.ts.map +1 -1
- package/funcs/filesDelete.js +7 -6
- package/funcs/filesDelete.js.map +1 -1
- package/funcs/filesGet.d.ts.map +1 -1
- package/funcs/filesGet.js +7 -6
- package/funcs/filesGet.js.map +1 -1
- package/funcs/filesList.d.ts.map +1 -1
- package/funcs/filesList.js +11 -10
- package/funcs/filesList.js.map +1 -1
- package/funcs/filesUpdate.d.ts.map +1 -1
- package/funcs/filesUpdate.js +7 -6
- package/funcs/filesUpdate.js.map +1 -1
- package/funcs/filesUpload.d.ts.map +1 -1
- package/funcs/filesUpload.js +17 -15
- package/funcs/filesUpload.js.map +1 -1
- package/funcs/promptSnippetsFindOne.d.ts.map +1 -1
- package/funcs/promptSnippetsFindOne.js +7 -6
- package/funcs/promptSnippetsFindOne.js.map +1 -1
- package/funcs/promptTemplatesGetAll.d.ts.map +1 -1
- package/funcs/promptTemplatesGetAll.js +10 -9
- package/funcs/promptTemplatesGetAll.js.map +1 -1
- package/funcs/promptsCreate.d.ts.map +1 -1
- package/funcs/promptsCreate.js +7 -6
- package/funcs/promptsCreate.js.map +1 -1
- package/funcs/promptsCreateVersion.d.ts.map +1 -1
- package/funcs/promptsCreateVersion.js +7 -6
- package/funcs/promptsCreateVersion.js.map +1 -1
- package/funcs/promptsDelete.d.ts.map +1 -1
- package/funcs/promptsDelete.js +7 -6
- package/funcs/promptsDelete.js.map +1 -1
- package/funcs/promptsDuplicate.d.ts.map +1 -1
- package/funcs/promptsDuplicate.js +7 -6
- package/funcs/promptsDuplicate.js.map +1 -1
- package/funcs/promptsGetAll.d.ts.map +1 -1
- package/funcs/promptsGetAll.js +7 -6
- package/funcs/promptsGetAll.js.map +1 -1
- package/funcs/promptsGetOne.d.ts.map +1 -1
- package/funcs/promptsGetOne.js +7 -6
- package/funcs/promptsGetOne.js.map +1 -1
- package/funcs/promptsUpdate.d.ts.map +1 -1
- package/funcs/promptsUpdate.js +7 -6
- package/funcs/promptsUpdate.js.map +1 -1
- package/funcs/remoteconfigGetConfig.d.ts.map +1 -1
- package/funcs/remoteconfigGetConfig.js +7 -6
- package/funcs/remoteconfigGetConfig.js.map +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +5 -6
- package/lib/config.js.map +1 -1
- package/lib/encodings.d.ts +10 -9
- package/lib/encodings.d.ts.map +1 -1
- package/lib/encodings.js +91 -66
- package/lib/encodings.js.map +1 -1
- package/lib/env.js +1 -2
- package/lib/env.js.map +1 -1
- package/lib/event-streams.js +2 -3
- package/lib/event-streams.js.map +1 -1
- package/lib/http.js +1 -2
- package/lib/http.js.map +1 -1
- package/lib/matchers.js +5 -6
- package/lib/matchers.js.map +1 -1
- package/lib/primitives.d.ts +1 -0
- package/lib/primitives.d.ts.map +1 -1
- package/lib/primitives.js +11 -1
- package/lib/primitives.js.map +1 -1
- package/lib/retries.js +3 -4
- package/lib/retries.js.map +1 -1
- package/lib/sdks.d.ts.map +1 -1
- package/lib/sdks.js +19 -17
- package/lib/sdks.js.map +1 -1
- package/lib/security.js +2 -3
- package/lib/security.js.map +1 -1
- package/lib/url.js +1 -1
- package/lib/url.js.map +1 -1
- package/models/errors/httpclienterrors.js +2 -2
- package/models/errors/httpclienterrors.js.map +1 -1
- package/package.json +2 -3
- package/packages/orq-rc/FUNCTIONS.md +106 -0
- package/packages/orq-rc/README.md +564 -0
- package/packages/orq-rc/RUNTIMES.md +22 -0
- package/packages/orq-rc/docs/sdks/contacts/README.md +84 -0
- package/packages/orq-rc/docs/sdks/deployments/README.md +239 -0
- package/packages/orq-rc/docs/sdks/feedback/README.md +92 -0
- package/packages/orq-rc/docs/sdks/files/README.md +473 -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 +124 -0
- package/packages/orq-rc/src/funcs/deploymentsAll.ts +138 -0
- package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +132 -0
- package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +135 -0
- package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +132 -0
- package/packages/orq-rc/src/funcs/feedbackCreate.ts +124 -0
- package/packages/orq-rc/src/funcs/filesBulkUpload.ts +126 -0
- package/packages/orq-rc/src/funcs/filesDelete.ts +128 -0
- package/packages/orq-rc/src/funcs/filesGet.ts +127 -0
- package/packages/orq-rc/src/funcs/filesList.ts +129 -0
- package/packages/orq-rc/src/funcs/filesUpdate.ts +128 -0
- package/packages/orq-rc/src/funcs/filesUpload.ts +145 -0
- package/packages/orq-rc/src/funcs/promptSnippetsFindOne.ts +128 -0
- package/packages/orq-rc/src/funcs/promptTemplatesGetAll.ts +130 -0
- package/packages/orq-rc/src/funcs/promptsCreate.ts +124 -0
- package/packages/orq-rc/src/funcs/promptsCreateVersion.ts +129 -0
- package/packages/orq-rc/src/funcs/promptsDelete.ts +128 -0
- package/packages/orq-rc/src/funcs/promptsDuplicate.ts +128 -0
- package/packages/orq-rc/src/funcs/promptsGetAll.ts +126 -0
- package/packages/orq-rc/src/funcs/promptsGetOne.ts +128 -0
- package/packages/orq-rc/src/funcs/promptsUpdate.ts +136 -0
- package/packages/orq-rc/src/funcs/remoteconfigGetConfig.ts +125 -0
- package/packages/orq-rc/src/hooks/hooks.ts +132 -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 +109 -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 +397 -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 +1673 -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 +315 -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 +3461 -0
- package/packages/orq-rc/src/models/operations/createpromptversion.ts +3703 -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 +3483 -0
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +2385 -0
- package/packages/orq-rc/src/models/operations/deployments.ts +2098 -0
- package/packages/orq-rc/src/models/operations/duplicateprompt.ts +69 -0
- package/packages/orq-rc/src/models/operations/filedelete.ts +78 -0
- package/packages/orq-rc/src/models/operations/fileget.ts +222 -0
- package/packages/orq-rc/src/models/operations/filelist.ts +333 -0
- package/packages/orq-rc/src/models/operations/fileupdate.ts +298 -0
- package/packages/orq-rc/src/models/operations/fileupload.ts +322 -0
- package/packages/orq-rc/src/models/operations/findonepromptsnippet.ts +13629 -0
- package/packages/orq-rc/src/models/operations/getallprompts.ts +18640 -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 +26 -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 +75 -0
- package/packages/orq-rc/src/sdk/feedback.ts +27 -0
- package/packages/orq-rc/src/sdk/files.ts +105 -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/sdk/deployments.js +1 -2
- package/sdk/deployments.js.map +1 -1
- package/sdk/prompt.js +2 -4
- package/sdk/prompt.js.map +1 -1
- package/sdk/sdk.js +7 -14
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/contactsCreate.ts +3 -2
- package/src/funcs/deploymentsAll.ts +3 -2
- package/src/funcs/deploymentsGetConfig.ts +3 -2
- package/src/funcs/deploymentsInvoke.ts +3 -2
- package/src/funcs/deploymentsMetricsCreate.ts +3 -2
- package/src/funcs/feedbackCreate.ts +3 -2
- package/src/funcs/filesBulkUpload.ts +6 -4
- package/src/funcs/filesDelete.ts +3 -2
- package/src/funcs/filesGet.ts +3 -2
- package/src/funcs/filesList.ts +3 -2
- package/src/funcs/filesUpdate.ts +3 -2
- package/src/funcs/filesUpload.ts +9 -6
- package/src/funcs/promptSnippetsFindOne.ts +3 -2
- package/src/funcs/promptTemplatesGetAll.ts +3 -2
- package/src/funcs/promptsCreate.ts +3 -2
- package/src/funcs/promptsCreateVersion.ts +3 -2
- package/src/funcs/promptsDelete.ts +3 -2
- package/src/funcs/promptsDuplicate.ts +3 -2
- package/src/funcs/promptsGetAll.ts +3 -2
- package/src/funcs/promptsGetOne.ts +3 -2
- package/src/funcs/promptsUpdate.ts +3 -2
- package/src/funcs/remoteconfigGetConfig.ts +3 -2
- package/src/lib/config.ts +4 -4
- package/src/lib/encodings.ts +95 -61
- package/src/lib/primitives.ts +14 -0
- package/src/lib/sdks.ts +4 -1
- package/src/lib/security.ts +1 -1
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
# Prompts
|
|
2
|
+
(*prompts*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [create](#create) - Create a new prompt
|
|
9
|
+
* [createVersion](#createversion) - Create a new prompt version
|
|
10
|
+
* [delete](#delete) - Delete a prompt
|
|
11
|
+
* [getOne](#getone) - Get one prompt
|
|
12
|
+
* [update](#update) - Update a prompt
|
|
13
|
+
* [duplicate](#duplicate) - Duplicate a prompt
|
|
14
|
+
* [getAll](#getall) - Get all prompts
|
|
15
|
+
|
|
16
|
+
## create
|
|
17
|
+
|
|
18
|
+
Create a new prompt
|
|
19
|
+
|
|
20
|
+
### Example Usage
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import { Orq } from "@orq-ai/node";
|
|
24
|
+
|
|
25
|
+
const orq = new Orq({
|
|
26
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
async function run() {
|
|
30
|
+
const result = await orq.prompts.create();
|
|
31
|
+
|
|
32
|
+
// Handle the result
|
|
33
|
+
console.log(result);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
run();
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Standalone function
|
|
40
|
+
|
|
41
|
+
The standalone function version of this method:
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
45
|
+
import { promptsCreate } from "@orq-ai/node/funcs/promptsCreate.js";
|
|
46
|
+
|
|
47
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
48
|
+
// You can create one instance of it to use across an application.
|
|
49
|
+
const orq = new OrqCore({
|
|
50
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
async function run() {
|
|
54
|
+
const res = await promptsCreate(orq);
|
|
55
|
+
|
|
56
|
+
if (!res.ok) {
|
|
57
|
+
throw res.error;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const { value: result } = res;
|
|
61
|
+
|
|
62
|
+
// Handle the result
|
|
63
|
+
console.log(result);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
run();
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Parameters
|
|
70
|
+
|
|
71
|
+
| Parameter | Type | Required | Description |
|
|
72
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
73
|
+
| `request` | [operations.CreatePromptRequestBody](../../models/operations/createpromptrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
74
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
75
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
76
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
77
|
+
|
|
78
|
+
### Response
|
|
79
|
+
|
|
80
|
+
**Promise\<[operations.CreatePromptResponseBody](../../models/operations/createpromptresponsebody.md)\>**
|
|
81
|
+
|
|
82
|
+
### Errors
|
|
83
|
+
|
|
84
|
+
| Error Type | Status Code | Content Type |
|
|
85
|
+
| --------------- | --------------- | --------------- |
|
|
86
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
87
|
+
|
|
88
|
+
## createVersion
|
|
89
|
+
|
|
90
|
+
Create a new prompt version
|
|
91
|
+
|
|
92
|
+
### Example Usage
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
import { Orq } from "@orq-ai/node";
|
|
96
|
+
|
|
97
|
+
const orq = new Orq({
|
|
98
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
async function run() {
|
|
102
|
+
const result = await orq.prompts.createVersion({
|
|
103
|
+
id: "<id>",
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
// Handle the result
|
|
107
|
+
console.log(result);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
run();
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Standalone function
|
|
114
|
+
|
|
115
|
+
The standalone function version of this method:
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
119
|
+
import { promptsCreateVersion } from "@orq-ai/node/funcs/promptsCreateVersion.js";
|
|
120
|
+
|
|
121
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
122
|
+
// You can create one instance of it to use across an application.
|
|
123
|
+
const orq = new OrqCore({
|
|
124
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
async function run() {
|
|
128
|
+
const res = await promptsCreateVersion(orq, {
|
|
129
|
+
id: "<id>",
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
if (!res.ok) {
|
|
133
|
+
throw res.error;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const { value: result } = res;
|
|
137
|
+
|
|
138
|
+
// Handle the result
|
|
139
|
+
console.log(result);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
run();
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Parameters
|
|
146
|
+
|
|
147
|
+
| Parameter | Type | Required | Description |
|
|
148
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
149
|
+
| `request` | [operations.CreatePromptVersionRequest](../../models/operations/createpromptversionrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
150
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
151
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
152
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
153
|
+
|
|
154
|
+
### Response
|
|
155
|
+
|
|
156
|
+
**Promise\<[operations.CreatePromptVersionResponseBody](../../models/operations/createpromptversionresponsebody.md)\>**
|
|
157
|
+
|
|
158
|
+
### Errors
|
|
159
|
+
|
|
160
|
+
| Error Type | Status Code | Content Type |
|
|
161
|
+
| --------------- | --------------- | --------------- |
|
|
162
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
163
|
+
|
|
164
|
+
## delete
|
|
165
|
+
|
|
166
|
+
Delete a prompt
|
|
167
|
+
|
|
168
|
+
### Example Usage
|
|
169
|
+
|
|
170
|
+
```typescript
|
|
171
|
+
import { Orq } from "@orq-ai/node";
|
|
172
|
+
|
|
173
|
+
const orq = new Orq({
|
|
174
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
async function run() {
|
|
178
|
+
await orq.prompts.delete({
|
|
179
|
+
id: "<id>",
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
run();
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Standalone function
|
|
189
|
+
|
|
190
|
+
The standalone function version of this method:
|
|
191
|
+
|
|
192
|
+
```typescript
|
|
193
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
194
|
+
import { promptsDelete } from "@orq-ai/node/funcs/promptsDelete.js";
|
|
195
|
+
|
|
196
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
197
|
+
// You can create one instance of it to use across an application.
|
|
198
|
+
const orq = new OrqCore({
|
|
199
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
async function run() {
|
|
203
|
+
const res = await promptsDelete(orq, {
|
|
204
|
+
id: "<id>",
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
if (!res.ok) {
|
|
208
|
+
throw res.error;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
const { value: result } = res;
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
run();
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Parameters
|
|
220
|
+
|
|
221
|
+
| Parameter | Type | Required | Description |
|
|
222
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
223
|
+
| `request` | [operations.DeletePromptRequest](../../models/operations/deletepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
224
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
225
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
226
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
227
|
+
|
|
228
|
+
### Response
|
|
229
|
+
|
|
230
|
+
**Promise\<void\>**
|
|
231
|
+
|
|
232
|
+
### Errors
|
|
233
|
+
|
|
234
|
+
| Error Type | Status Code | Content Type |
|
|
235
|
+
| --------------- | --------------- | --------------- |
|
|
236
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
237
|
+
|
|
238
|
+
## getOne
|
|
239
|
+
|
|
240
|
+
Get one prompt
|
|
241
|
+
|
|
242
|
+
### Example Usage
|
|
243
|
+
|
|
244
|
+
```typescript
|
|
245
|
+
import { Orq } from "@orq-ai/node";
|
|
246
|
+
|
|
247
|
+
const orq = new Orq({
|
|
248
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
async function run() {
|
|
252
|
+
await orq.prompts.getOne({
|
|
253
|
+
id: "<id>",
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
run();
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### Standalone function
|
|
263
|
+
|
|
264
|
+
The standalone function version of this method:
|
|
265
|
+
|
|
266
|
+
```typescript
|
|
267
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
268
|
+
import { promptsGetOne } from "@orq-ai/node/funcs/promptsGetOne.js";
|
|
269
|
+
|
|
270
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
271
|
+
// You can create one instance of it to use across an application.
|
|
272
|
+
const orq = new OrqCore({
|
|
273
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
async function run() {
|
|
277
|
+
const res = await promptsGetOne(orq, {
|
|
278
|
+
id: "<id>",
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
if (!res.ok) {
|
|
282
|
+
throw res.error;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
const { value: result } = res;
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
run();
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Parameters
|
|
294
|
+
|
|
295
|
+
| Parameter | Type | Required | Description |
|
|
296
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
297
|
+
| `request` | [operations.GetOnePromptRequest](../../models/operations/getonepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
298
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
299
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
300
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
301
|
+
|
|
302
|
+
### Response
|
|
303
|
+
|
|
304
|
+
**Promise\<void\>**
|
|
305
|
+
|
|
306
|
+
### Errors
|
|
307
|
+
|
|
308
|
+
| Error Type | Status Code | Content Type |
|
|
309
|
+
| --------------- | --------------- | --------------- |
|
|
310
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
311
|
+
|
|
312
|
+
## update
|
|
313
|
+
|
|
314
|
+
Update a prompt
|
|
315
|
+
|
|
316
|
+
### Example Usage
|
|
317
|
+
|
|
318
|
+
```typescript
|
|
319
|
+
import { Orq } from "@orq-ai/node";
|
|
320
|
+
|
|
321
|
+
const orq = new Orq({
|
|
322
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
async function run() {
|
|
326
|
+
const result = await orq.prompts.update({
|
|
327
|
+
id: "<id>",
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
// Handle the result
|
|
331
|
+
console.log(result);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
run();
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### Standalone function
|
|
338
|
+
|
|
339
|
+
The standalone function version of this method:
|
|
340
|
+
|
|
341
|
+
```typescript
|
|
342
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
343
|
+
import { promptsUpdate } from "@orq-ai/node/funcs/promptsUpdate.js";
|
|
344
|
+
|
|
345
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
346
|
+
// You can create one instance of it to use across an application.
|
|
347
|
+
const orq = new OrqCore({
|
|
348
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
async function run() {
|
|
352
|
+
const res = await promptsUpdate(orq, {
|
|
353
|
+
id: "<id>",
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
if (!res.ok) {
|
|
357
|
+
throw res.error;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
const { value: result } = res;
|
|
361
|
+
|
|
362
|
+
// Handle the result
|
|
363
|
+
console.log(result);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
run();
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
### Parameters
|
|
370
|
+
|
|
371
|
+
| Parameter | Type | Required | Description |
|
|
372
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
373
|
+
| `request` | [operations.UpdatePromptRequest](../../models/operations/updatepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
374
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
375
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
376
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
377
|
+
|
|
378
|
+
### Response
|
|
379
|
+
|
|
380
|
+
**Promise\<[operations.UpdatePromptResponseBody](../../models/operations/updatepromptresponsebody.md)\>**
|
|
381
|
+
|
|
382
|
+
### Errors
|
|
383
|
+
|
|
384
|
+
| Error Type | Status Code | Content Type |
|
|
385
|
+
| ------------------------------- | ------------------------------- | ------------------------------- |
|
|
386
|
+
| errors.UpdatePromptResponseBody | 404 | application/json |
|
|
387
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
388
|
+
|
|
389
|
+
## duplicate
|
|
390
|
+
|
|
391
|
+
Duplicate a prompt
|
|
392
|
+
|
|
393
|
+
### Example Usage
|
|
394
|
+
|
|
395
|
+
```typescript
|
|
396
|
+
import { Orq } from "@orq-ai/node";
|
|
397
|
+
|
|
398
|
+
const orq = new Orq({
|
|
399
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
400
|
+
});
|
|
401
|
+
|
|
402
|
+
async function run() {
|
|
403
|
+
await orq.prompts.duplicate({
|
|
404
|
+
id: "<id>",
|
|
405
|
+
});
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
run();
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
### Standalone function
|
|
414
|
+
|
|
415
|
+
The standalone function version of this method:
|
|
416
|
+
|
|
417
|
+
```typescript
|
|
418
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
419
|
+
import { promptsDuplicate } from "@orq-ai/node/funcs/promptsDuplicate.js";
|
|
420
|
+
|
|
421
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
422
|
+
// You can create one instance of it to use across an application.
|
|
423
|
+
const orq = new OrqCore({
|
|
424
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
async function run() {
|
|
428
|
+
const res = await promptsDuplicate(orq, {
|
|
429
|
+
id: "<id>",
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
if (!res.ok) {
|
|
433
|
+
throw res.error;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
const { value: result } = res;
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
run();
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
### Parameters
|
|
445
|
+
|
|
446
|
+
| Parameter | Type | Required | Description |
|
|
447
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
448
|
+
| `request` | [operations.DuplicatePromptRequest](../../models/operations/duplicatepromptrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
449
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
450
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
451
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
452
|
+
|
|
453
|
+
### Response
|
|
454
|
+
|
|
455
|
+
**Promise\<void\>**
|
|
456
|
+
|
|
457
|
+
### Errors
|
|
458
|
+
|
|
459
|
+
| Error Type | Status Code | Content Type |
|
|
460
|
+
| --------------- | --------------- | --------------- |
|
|
461
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
462
|
+
|
|
463
|
+
## getAll
|
|
464
|
+
|
|
465
|
+
Get all prompts
|
|
466
|
+
|
|
467
|
+
### Example Usage
|
|
468
|
+
|
|
469
|
+
```typescript
|
|
470
|
+
import { Orq } from "@orq-ai/node";
|
|
471
|
+
|
|
472
|
+
const orq = new Orq({
|
|
473
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
async function run() {
|
|
477
|
+
const result = await orq.prompts.getAll();
|
|
478
|
+
|
|
479
|
+
// Handle the result
|
|
480
|
+
console.log(result);
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
run();
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
### Standalone function
|
|
487
|
+
|
|
488
|
+
The standalone function version of this method:
|
|
489
|
+
|
|
490
|
+
```typescript
|
|
491
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
492
|
+
import { promptsGetAll } from "@orq-ai/node/funcs/promptsGetAll.js";
|
|
493
|
+
|
|
494
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
495
|
+
// You can create one instance of it to use across an application.
|
|
496
|
+
const orq = new OrqCore({
|
|
497
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
498
|
+
});
|
|
499
|
+
|
|
500
|
+
async function run() {
|
|
501
|
+
const res = await promptsGetAll(orq);
|
|
502
|
+
|
|
503
|
+
if (!res.ok) {
|
|
504
|
+
throw res.error;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
const { value: result } = res;
|
|
508
|
+
|
|
509
|
+
// Handle the result
|
|
510
|
+
console.log(result);
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
run();
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
### Parameters
|
|
517
|
+
|
|
518
|
+
| Parameter | Type | Required | Description |
|
|
519
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
520
|
+
| `request` | [operations.GetAllPromptsRequestBody](../../models/operations/getallpromptsrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
521
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
522
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
523
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
524
|
+
|
|
525
|
+
### Response
|
|
526
|
+
|
|
527
|
+
**Promise\<[operations.GetAllPromptsResponseBody](../../models/operations/getallpromptsresponsebody.md)\>**
|
|
528
|
+
|
|
529
|
+
### Errors
|
|
530
|
+
|
|
531
|
+
| Error Type | Status Code | Content Type |
|
|
532
|
+
| --------------- | --------------- | --------------- |
|
|
533
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Remoteconfig
|
|
2
|
+
(*remoteconfig*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [getConfig](#getconfig) - Get Configurations
|
|
9
|
+
|
|
10
|
+
## getConfig
|
|
11
|
+
|
|
12
|
+
Get Configurations
|
|
13
|
+
|
|
14
|
+
### Example Usage
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { Orq } from "@orq-ai/node";
|
|
18
|
+
|
|
19
|
+
const orq = new Orq({
|
|
20
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
async function run() {
|
|
24
|
+
const result = await orq.remoteconfig.getConfig();
|
|
25
|
+
|
|
26
|
+
// Handle the result
|
|
27
|
+
console.log(result);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
run();
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Standalone function
|
|
34
|
+
|
|
35
|
+
The standalone function version of this method:
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
39
|
+
import { remoteconfigGetConfig } from "@orq-ai/node/funcs/remoteconfigGetConfig.js";
|
|
40
|
+
|
|
41
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
42
|
+
// You can create one instance of it to use across an application.
|
|
43
|
+
const orq = new OrqCore({
|
|
44
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
async function run() {
|
|
48
|
+
const res = await remoteconfigGetConfig(orq);
|
|
49
|
+
|
|
50
|
+
if (!res.ok) {
|
|
51
|
+
throw res.error;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const { value: result } = res;
|
|
55
|
+
|
|
56
|
+
// Handle the result
|
|
57
|
+
console.log(result);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
run();
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Parameters
|
|
64
|
+
|
|
65
|
+
| Parameter | Type | Required | Description |
|
|
66
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
67
|
+
| `request` | [operations.RemoteConfigsGetConfigRequestBody](../../models/operations/remoteconfigsgetconfigrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
68
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
69
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
70
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
71
|
+
|
|
72
|
+
### Response
|
|
73
|
+
|
|
74
|
+
**Promise\<[operations.RemoteConfigsGetConfigResponseBody](../../models/operations/remoteconfigsgetconfigresponsebody.md)\>**
|
|
75
|
+
|
|
76
|
+
### Errors
|
|
77
|
+
|
|
78
|
+
| Error Type | Status Code | Content Type |
|
|
79
|
+
| --------------- | --------------- | --------------- |
|
|
80
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|