@orq-ai/node 3.1.6 → 3.2.0-rc.3
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 +0 -38
- package/docs/sdks/deployments/README.md +0 -81
- package/jsr.json +1 -2
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/lib/config.js.map +1 -1
- package/lib/matchers.d.ts.map +1 -1
- package/lib/matchers.js +1 -4
- package/lib/matchers.js.map +1 -1
- package/models/operations/createcontact.js +2 -2
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/index.d.ts +0 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -1
- package/models/operations/index.js.map +1 -1
- package/package.json +3 -2
- package/sdk/deployments.d.ts +0 -8
- package/sdk/deployments.d.ts.map +1 -1
- package/sdk/deployments.js +0 -10
- package/sdk/deployments.js.map +1 -1
- package/src/lib/config.ts +2 -2
- package/src/lib/matchers.ts +1 -4
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/index.ts +0 -1
- package/src/sdk/deployments.ts +0 -19
- package/funcs/deploymentsStream.d.ts +0 -16
- package/funcs/deploymentsStream.d.ts.map +0 -1
- package/funcs/deploymentsStream.js +0 -126
- package/funcs/deploymentsStream.js.map +0 -1
- package/lib/event-streams.d.ts +0 -17
- package/lib/event-streams.d.ts.map +0 -1
- package/lib/event-streams.js +0 -220
- package/lib/event-streams.js.map +0 -1
- package/models/operations/deploymentstream.d.ts +0 -1622
- package/models/operations/deploymentstream.d.ts.map +0 -1
- package/models/operations/deploymentstream.js +0 -1571
- package/models/operations/deploymentstream.js.map +0 -1
- package/packages/orq-rc/FUNCTIONS.md +0 -106
- package/packages/orq-rc/README.md +0 -559
- package/packages/orq-rc/RUNTIMES.md +0 -48
- package/packages/orq-rc/docs/sdks/contacts/README.md +0 -84
- package/packages/orq-rc/docs/sdks/deployments/README.md +0 -316
- package/packages/orq-rc/docs/sdks/feedback/README.md +0 -92
- package/packages/orq-rc/docs/sdks/files/README.md +0 -305
- package/packages/orq-rc/docs/sdks/metrics/README.md +0 -86
- package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
- package/packages/orq-rc/docs/sdks/prompts/README.md +0 -608
- package/packages/orq-rc/docs/sdks/promptsnippets/README.md +0 -534
- package/packages/orq-rc/docs/sdks/remoteconfig/README.md +0 -80
- package/packages/orq-rc/jsr.json +0 -28
- package/packages/orq-rc/package-lock.json +0 -1861
- package/packages/orq-rc/package.json +0 -31
- package/packages/orq-rc/src/core.ts +0 -13
- package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -126
- package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -134
- package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -142
- package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -141
- package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -134
- package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -150
- package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -126
- package/packages/orq-rc/src/funcs/filesDelete.ts +0 -130
- package/packages/orq-rc/src/funcs/filesGet.ts +0 -129
- package/packages/orq-rc/src/funcs/filesList.ts +0 -131
- package/packages/orq-rc/src/funcs/filesUpload.ts +0 -149
- package/packages/orq-rc/src/funcs/promptSnippetsCreate.ts +0 -128
- package/packages/orq-rc/src/funcs/promptSnippetsDelete.ts +0 -131
- package/packages/orq-rc/src/funcs/promptSnippetsGet.ts +0 -130
- package/packages/orq-rc/src/funcs/promptSnippetsGetByKey.ts +0 -132
- package/packages/orq-rc/src/funcs/promptSnippetsList.ts +0 -132
- package/packages/orq-rc/src/funcs/promptSnippetsUpdate.ts +0 -139
- package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -126
- package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -130
- package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -146
- package/packages/orq-rc/src/funcs/promptsList.ts +0 -133
- package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -139
- package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -132
- package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -138
- package/packages/orq-rc/src/funcs/remoteconfigGetConfig.ts +0 -127
- package/packages/orq-rc/src/hooks/global.ts +0 -44
- package/packages/orq-rc/src/hooks/hooks.ts +0 -132
- package/packages/orq-rc/src/hooks/index.ts +0 -6
- package/packages/orq-rc/src/hooks/registration.ts +0 -15
- package/packages/orq-rc/src/hooks/types.ts +0 -109
- package/packages/orq-rc/src/index.ts +0 -7
- package/packages/orq-rc/src/lib/base64.ts +0 -37
- package/packages/orq-rc/src/lib/config.ts +0 -70
- package/packages/orq-rc/src/lib/dlv.ts +0 -53
- package/packages/orq-rc/src/lib/encodings.ts +0 -483
- package/packages/orq-rc/src/lib/env.ts +0 -73
- package/packages/orq-rc/src/lib/event-streams.ts +0 -264
- package/packages/orq-rc/src/lib/files.ts +0 -40
- package/packages/orq-rc/src/lib/http.ts +0 -323
- package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
- package/packages/orq-rc/src/lib/logger.ts +0 -9
- package/packages/orq-rc/src/lib/matchers.ts +0 -325
- package/packages/orq-rc/src/lib/primitives.ts +0 -136
- package/packages/orq-rc/src/lib/retries.ts +0 -218
- package/packages/orq-rc/src/lib/schemas.ts +0 -91
- package/packages/orq-rc/src/lib/sdks.ts +0 -400
- package/packages/orq-rc/src/lib/security.ts +0 -254
- package/packages/orq-rc/src/lib/url.ts +0 -33
- package/packages/orq-rc/src/models/components/deployments.ts +0 -1666
- package/packages/orq-rc/src/models/components/index.ts +0 -6
- package/packages/orq-rc/src/models/components/security.ts +0 -71
- package/packages/orq-rc/src/models/errors/apierror.ts +0 -27
- package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -71
- package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -82
- package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
- package/packages/orq-rc/src/models/errors/index.ts +0 -11
- package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -97
- package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -71
- package/packages/orq-rc/src/models/errors/updatepromptsnippet.ts +0 -71
- package/packages/orq-rc/src/models/operations/createcontact.ts +0 -256
- package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
- package/packages/orq-rc/src/models/operations/createprompt.ts +0 -3819
- package/packages/orq-rc/src/models/operations/createpromptsnippet.ts +0 -6239
- package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
- package/packages/orq-rc/src/models/operations/deletepromptsnippet.ts +0 -69
- package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -1790
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -3527
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1144
- package/packages/orq-rc/src/models/operations/deployments.ts +0 -2148
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -3062
- package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
- package/packages/orq-rc/src/models/operations/fileget.ts +0 -222
- package/packages/orq-rc/src/models/operations/filelist.ts +0 -321
- package/packages/orq-rc/src/models/operations/fileupload.ts +0 -322
- package/packages/orq-rc/src/models/operations/findonebykeypromptsnippet.ts +0 -4483
- package/packages/orq-rc/src/models/operations/findonepromptsnippet.ts +0 -4343
- package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2116
- package/packages/orq-rc/src/models/operations/getallpromptsnippets.ts +0 -4472
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -1982
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -2012
- package/packages/orq-rc/src/models/operations/index.ts +0 -29
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2146
- package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
- package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -3917
- package/packages/orq-rc/src/models/operations/updatepromptsnippet.ts +0 -6544
- package/packages/orq-rc/src/sdk/contacts.ts +0 -27
- package/packages/orq-rc/src/sdk/deployments.ts +0 -89
- package/packages/orq-rc/src/sdk/feedback.ts +0 -27
- package/packages/orq-rc/src/sdk/files.ts +0 -72
- package/packages/orq-rc/src/sdk/index.ts +0 -5
- package/packages/orq-rc/src/sdk/metrics.ts +0 -27
- package/packages/orq-rc/src/sdk/prompts.ts +0 -126
- package/packages/orq-rc/src/sdk/promptsnippets.ts +0 -99
- package/packages/orq-rc/src/sdk/remoteconfig.ts +0 -24
- package/packages/orq-rc/src/sdk/sdk.ts +0 -49
- package/packages/orq-rc/src/types/blobs.ts +0 -31
- package/packages/orq-rc/src/types/constdatetime.ts +0 -15
- package/packages/orq-rc/src/types/enums.ts +0 -16
- package/packages/orq-rc/src/types/fp.ts +0 -50
- package/packages/orq-rc/src/types/index.ts +0 -11
- package/packages/orq-rc/src/types/operations.ts +0 -105
- package/packages/orq-rc/src/types/rfcdate.ts +0 -54
- package/packages/orq-rc/src/types/streams.ts +0 -21
- package/packages/orq-rc/tsconfig.json +0 -41
- package/src/funcs/deploymentsStream.ts +0 -151
- package/src/lib/event-streams.ts +0 -264
- package/src/models/operations/deploymentstream.ts +0 -3062
|
@@ -1,534 +0,0 @@
|
|
|
1
|
-
# PromptSnippets
|
|
2
|
-
(*promptSnippets*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [list](#list) - List all prompts snippets
|
|
9
|
-
* [create](#create) - Create a prompt snippet
|
|
10
|
-
* [update](#update) - Update a prompt snippet
|
|
11
|
-
* [delete](#delete) - Delete a prompt snippet
|
|
12
|
-
* [get](#get) - Retrieve a prompt snippet
|
|
13
|
-
* [getByKey](#getbykey) - Retrieve a prompt snippet by key
|
|
14
|
-
|
|
15
|
-
## list
|
|
16
|
-
|
|
17
|
-
List all prompts snippets
|
|
18
|
-
|
|
19
|
-
### Example Usage
|
|
20
|
-
|
|
21
|
-
```typescript
|
|
22
|
-
import { Orq } from "@orq-ai/node";
|
|
23
|
-
|
|
24
|
-
const orq = new Orq({
|
|
25
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
async function run() {
|
|
29
|
-
const result = await orq.promptSnippets.list({});
|
|
30
|
-
|
|
31
|
-
// Handle the result
|
|
32
|
-
console.log(result);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
run();
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
### Standalone function
|
|
39
|
-
|
|
40
|
-
The standalone function version of this method:
|
|
41
|
-
|
|
42
|
-
```typescript
|
|
43
|
-
import { OrqCore } from "@orq-ai/node/core.js";
|
|
44
|
-
import { promptSnippetsList } from "@orq-ai/node/funcs/promptSnippetsList.js";
|
|
45
|
-
|
|
46
|
-
// Use `OrqCore` for best tree-shaking performance.
|
|
47
|
-
// You can create one instance of it to use across an application.
|
|
48
|
-
const orq = new OrqCore({
|
|
49
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
async function run() {
|
|
53
|
-
const res = await promptSnippetsList(orq, {});
|
|
54
|
-
|
|
55
|
-
if (!res.ok) {
|
|
56
|
-
throw res.error;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const { value: result } = res;
|
|
60
|
-
|
|
61
|
-
// Handle the result
|
|
62
|
-
console.log(result);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
run();
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
### Parameters
|
|
69
|
-
|
|
70
|
-
| Parameter | Type | Required | Description |
|
|
71
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
72
|
-
| `request` | [operations.GetAllPromptSnippetsRequest](../../models/operations/getallpromptsnippetsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
73
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
74
|
-
| `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. |
|
|
75
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
76
|
-
|
|
77
|
-
### Response
|
|
78
|
-
|
|
79
|
-
**Promise\<[operations.GetAllPromptSnippetsResponseBody](../../models/operations/getallpromptsnippetsresponsebody.md)\>**
|
|
80
|
-
|
|
81
|
-
### Errors
|
|
82
|
-
|
|
83
|
-
| Error Type | Status Code | Content Type |
|
|
84
|
-
| --------------- | --------------- | --------------- |
|
|
85
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
86
|
-
|
|
87
|
-
## create
|
|
88
|
-
|
|
89
|
-
Create a prompt snippet
|
|
90
|
-
|
|
91
|
-
### Example Usage
|
|
92
|
-
|
|
93
|
-
```typescript
|
|
94
|
-
import { Orq } from "@orq-ai/node";
|
|
95
|
-
|
|
96
|
-
const orq = new Orq({
|
|
97
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
async function run() {
|
|
101
|
-
const result = await orq.promptSnippets.create({
|
|
102
|
-
key: "<key>",
|
|
103
|
-
promptConfig: {
|
|
104
|
-
messages: [
|
|
105
|
-
{
|
|
106
|
-
role: "system",
|
|
107
|
-
content: "<value>",
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
role: "system",
|
|
111
|
-
content: [
|
|
112
|
-
{
|
|
113
|
-
type: "image_url",
|
|
114
|
-
imageUrl: {
|
|
115
|
-
url: "https://well-worn-formation.biz",
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
type: "text",
|
|
120
|
-
text: "<value>",
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
type: "text",
|
|
124
|
-
text: "<value>",
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
role: "assistant",
|
|
130
|
-
content: "<value>",
|
|
131
|
-
},
|
|
132
|
-
],
|
|
133
|
-
},
|
|
134
|
-
path: "Customer Service/Billing/Refund",
|
|
135
|
-
});
|
|
136
|
-
|
|
137
|
-
// Handle the result
|
|
138
|
-
console.log(result);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
run();
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### Standalone function
|
|
145
|
-
|
|
146
|
-
The standalone function version of this method:
|
|
147
|
-
|
|
148
|
-
```typescript
|
|
149
|
-
import { OrqCore } from "@orq-ai/node/core.js";
|
|
150
|
-
import { promptSnippetsCreate } from "@orq-ai/node/funcs/promptSnippetsCreate.js";
|
|
151
|
-
|
|
152
|
-
// Use `OrqCore` for best tree-shaking performance.
|
|
153
|
-
// You can create one instance of it to use across an application.
|
|
154
|
-
const orq = new OrqCore({
|
|
155
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
156
|
-
});
|
|
157
|
-
|
|
158
|
-
async function run() {
|
|
159
|
-
const res = await promptSnippetsCreate(orq, {
|
|
160
|
-
key: "<key>",
|
|
161
|
-
promptConfig: {
|
|
162
|
-
messages: [
|
|
163
|
-
{
|
|
164
|
-
role: "system",
|
|
165
|
-
content: "<value>",
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
role: "system",
|
|
169
|
-
content: [
|
|
170
|
-
{
|
|
171
|
-
type: "image_url",
|
|
172
|
-
imageUrl: {
|
|
173
|
-
url: "https://well-worn-formation.biz",
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
type: "text",
|
|
178
|
-
text: "<value>",
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
type: "text",
|
|
182
|
-
text: "<value>",
|
|
183
|
-
},
|
|
184
|
-
],
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
role: "assistant",
|
|
188
|
-
content: "<value>",
|
|
189
|
-
},
|
|
190
|
-
],
|
|
191
|
-
},
|
|
192
|
-
path: "Customer Service/Billing/Refund",
|
|
193
|
-
});
|
|
194
|
-
|
|
195
|
-
if (!res.ok) {
|
|
196
|
-
throw res.error;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
const { value: result } = res;
|
|
200
|
-
|
|
201
|
-
// Handle the result
|
|
202
|
-
console.log(result);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
run();
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
### Parameters
|
|
209
|
-
|
|
210
|
-
| Parameter | Type | Required | Description |
|
|
211
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
212
|
-
| `request` | [operations.CreatePromptSnippetRequestBody](../../models/operations/createpromptsnippetrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
213
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
214
|
-
| `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. |
|
|
215
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
216
|
-
|
|
217
|
-
### Response
|
|
218
|
-
|
|
219
|
-
**Promise\<[operations.CreatePromptSnippetResponseBody](../../models/operations/createpromptsnippetresponsebody.md)\>**
|
|
220
|
-
|
|
221
|
-
### Errors
|
|
222
|
-
|
|
223
|
-
| Error Type | Status Code | Content Type |
|
|
224
|
-
| --------------- | --------------- | --------------- |
|
|
225
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
226
|
-
|
|
227
|
-
## update
|
|
228
|
-
|
|
229
|
-
Update a prompt snippet
|
|
230
|
-
|
|
231
|
-
### Example Usage
|
|
232
|
-
|
|
233
|
-
```typescript
|
|
234
|
-
import { Orq } from "@orq-ai/node";
|
|
235
|
-
|
|
236
|
-
const orq = new Orq({
|
|
237
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
async function run() {
|
|
241
|
-
const result = await orq.promptSnippets.update({
|
|
242
|
-
id: "<id>",
|
|
243
|
-
requestBody: {
|
|
244
|
-
path: "Customer Service/Billing/Refund",
|
|
245
|
-
},
|
|
246
|
-
});
|
|
247
|
-
|
|
248
|
-
// Handle the result
|
|
249
|
-
console.log(result);
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
run();
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
### Standalone function
|
|
256
|
-
|
|
257
|
-
The standalone function version of this method:
|
|
258
|
-
|
|
259
|
-
```typescript
|
|
260
|
-
import { OrqCore } from "@orq-ai/node/core.js";
|
|
261
|
-
import { promptSnippetsUpdate } from "@orq-ai/node/funcs/promptSnippetsUpdate.js";
|
|
262
|
-
|
|
263
|
-
// Use `OrqCore` for best tree-shaking performance.
|
|
264
|
-
// You can create one instance of it to use across an application.
|
|
265
|
-
const orq = new OrqCore({
|
|
266
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
async function run() {
|
|
270
|
-
const res = await promptSnippetsUpdate(orq, {
|
|
271
|
-
id: "<id>",
|
|
272
|
-
requestBody: {
|
|
273
|
-
path: "Customer Service/Billing/Refund",
|
|
274
|
-
},
|
|
275
|
-
});
|
|
276
|
-
|
|
277
|
-
if (!res.ok) {
|
|
278
|
-
throw res.error;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
const { value: result } = res;
|
|
282
|
-
|
|
283
|
-
// Handle the result
|
|
284
|
-
console.log(result);
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
run();
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
### Parameters
|
|
291
|
-
|
|
292
|
-
| Parameter | Type | Required | Description |
|
|
293
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
294
|
-
| `request` | [operations.UpdatePromptSnippetRequest](../../models/operations/updatepromptsnippetrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
295
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
296
|
-
| `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. |
|
|
297
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
298
|
-
|
|
299
|
-
### Response
|
|
300
|
-
|
|
301
|
-
**Promise\<[operations.UpdatePromptSnippetResponseBody](../../models/operations/updatepromptsnippetresponsebody.md)\>**
|
|
302
|
-
|
|
303
|
-
### Errors
|
|
304
|
-
|
|
305
|
-
| Error Type | Status Code | Content Type |
|
|
306
|
-
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
307
|
-
| errors.UpdatePromptSnippetResponseBody | 404 | application/json |
|
|
308
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
309
|
-
|
|
310
|
-
## delete
|
|
311
|
-
|
|
312
|
-
Delete a prompt snippet
|
|
313
|
-
|
|
314
|
-
### Example Usage
|
|
315
|
-
|
|
316
|
-
```typescript
|
|
317
|
-
import { Orq } from "@orq-ai/node";
|
|
318
|
-
|
|
319
|
-
const orq = new Orq({
|
|
320
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
async function run() {
|
|
324
|
-
await orq.promptSnippets.delete({
|
|
325
|
-
id: "<id>",
|
|
326
|
-
});
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
run();
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
### Standalone function
|
|
335
|
-
|
|
336
|
-
The standalone function version of this method:
|
|
337
|
-
|
|
338
|
-
```typescript
|
|
339
|
-
import { OrqCore } from "@orq-ai/node/core.js";
|
|
340
|
-
import { promptSnippetsDelete } from "@orq-ai/node/funcs/promptSnippetsDelete.js";
|
|
341
|
-
|
|
342
|
-
// Use `OrqCore` for best tree-shaking performance.
|
|
343
|
-
// You can create one instance of it to use across an application.
|
|
344
|
-
const orq = new OrqCore({
|
|
345
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
346
|
-
});
|
|
347
|
-
|
|
348
|
-
async function run() {
|
|
349
|
-
const res = await promptSnippetsDelete(orq, {
|
|
350
|
-
id: "<id>",
|
|
351
|
-
});
|
|
352
|
-
|
|
353
|
-
if (!res.ok) {
|
|
354
|
-
throw res.error;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
const { value: result } = res;
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
run();
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
### Parameters
|
|
366
|
-
|
|
367
|
-
| Parameter | Type | Required | Description |
|
|
368
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
369
|
-
| `request` | [operations.DeletePromptSnippetRequest](../../models/operations/deletepromptsnippetrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
370
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
371
|
-
| `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. |
|
|
372
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
373
|
-
|
|
374
|
-
### Response
|
|
375
|
-
|
|
376
|
-
**Promise\<void\>**
|
|
377
|
-
|
|
378
|
-
### Errors
|
|
379
|
-
|
|
380
|
-
| Error Type | Status Code | Content Type |
|
|
381
|
-
| --------------- | --------------- | --------------- |
|
|
382
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
383
|
-
|
|
384
|
-
## get
|
|
385
|
-
|
|
386
|
-
Retrieve a prompt snippet
|
|
387
|
-
|
|
388
|
-
### Example Usage
|
|
389
|
-
|
|
390
|
-
```typescript
|
|
391
|
-
import { Orq } from "@orq-ai/node";
|
|
392
|
-
|
|
393
|
-
const orq = new Orq({
|
|
394
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
395
|
-
});
|
|
396
|
-
|
|
397
|
-
async function run() {
|
|
398
|
-
const result = await orq.promptSnippets.get({
|
|
399
|
-
id: "<id>",
|
|
400
|
-
});
|
|
401
|
-
|
|
402
|
-
// Handle the result
|
|
403
|
-
console.log(result);
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
run();
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
### Standalone function
|
|
410
|
-
|
|
411
|
-
The standalone function version of this method:
|
|
412
|
-
|
|
413
|
-
```typescript
|
|
414
|
-
import { OrqCore } from "@orq-ai/node/core.js";
|
|
415
|
-
import { promptSnippetsGet } from "@orq-ai/node/funcs/promptSnippetsGet.js";
|
|
416
|
-
|
|
417
|
-
// Use `OrqCore` for best tree-shaking performance.
|
|
418
|
-
// You can create one instance of it to use across an application.
|
|
419
|
-
const orq = new OrqCore({
|
|
420
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
421
|
-
});
|
|
422
|
-
|
|
423
|
-
async function run() {
|
|
424
|
-
const res = await promptSnippetsGet(orq, {
|
|
425
|
-
id: "<id>",
|
|
426
|
-
});
|
|
427
|
-
|
|
428
|
-
if (!res.ok) {
|
|
429
|
-
throw res.error;
|
|
430
|
-
}
|
|
431
|
-
|
|
432
|
-
const { value: result } = res;
|
|
433
|
-
|
|
434
|
-
// Handle the result
|
|
435
|
-
console.log(result);
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
run();
|
|
439
|
-
```
|
|
440
|
-
|
|
441
|
-
### Parameters
|
|
442
|
-
|
|
443
|
-
| Parameter | Type | Required | Description |
|
|
444
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
445
|
-
| `request` | [operations.FindOnePromptSnippetRequest](../../models/operations/findonepromptsnippetrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
446
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
447
|
-
| `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. |
|
|
448
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
449
|
-
|
|
450
|
-
### Response
|
|
451
|
-
|
|
452
|
-
**Promise\<[operations.FindOnePromptSnippetResponseBody](../../models/operations/findonepromptsnippetresponsebody.md)\>**
|
|
453
|
-
|
|
454
|
-
### Errors
|
|
455
|
-
|
|
456
|
-
| Error Type | Status Code | Content Type |
|
|
457
|
-
| --------------- | --------------- | --------------- |
|
|
458
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
459
|
-
|
|
460
|
-
## getByKey
|
|
461
|
-
|
|
462
|
-
Retrieve a prompt snippet by key
|
|
463
|
-
|
|
464
|
-
### Example Usage
|
|
465
|
-
|
|
466
|
-
```typescript
|
|
467
|
-
import { Orq } from "@orq-ai/node";
|
|
468
|
-
|
|
469
|
-
const orq = new Orq({
|
|
470
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
471
|
-
});
|
|
472
|
-
|
|
473
|
-
async function run() {
|
|
474
|
-
const result = await orq.promptSnippets.getByKey({
|
|
475
|
-
key: "<key>",
|
|
476
|
-
});
|
|
477
|
-
|
|
478
|
-
// Handle the result
|
|
479
|
-
console.log(result);
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
run();
|
|
483
|
-
```
|
|
484
|
-
|
|
485
|
-
### Standalone function
|
|
486
|
-
|
|
487
|
-
The standalone function version of this method:
|
|
488
|
-
|
|
489
|
-
```typescript
|
|
490
|
-
import { OrqCore } from "@orq-ai/node/core.js";
|
|
491
|
-
import { promptSnippetsGetByKey } from "@orq-ai/node/funcs/promptSnippetsGetByKey.js";
|
|
492
|
-
|
|
493
|
-
// Use `OrqCore` for best tree-shaking performance.
|
|
494
|
-
// You can create one instance of it to use across an application.
|
|
495
|
-
const orq = new OrqCore({
|
|
496
|
-
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
497
|
-
});
|
|
498
|
-
|
|
499
|
-
async function run() {
|
|
500
|
-
const res = await promptSnippetsGetByKey(orq, {
|
|
501
|
-
key: "<key>",
|
|
502
|
-
});
|
|
503
|
-
|
|
504
|
-
if (!res.ok) {
|
|
505
|
-
throw res.error;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
const { value: result } = res;
|
|
509
|
-
|
|
510
|
-
// Handle the result
|
|
511
|
-
console.log(result);
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
run();
|
|
515
|
-
```
|
|
516
|
-
|
|
517
|
-
### Parameters
|
|
518
|
-
|
|
519
|
-
| Parameter | Type | Required | Description |
|
|
520
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
521
|
-
| `request` | [operations.FindOneByKeyPromptSnippetRequest](../../models/operations/findonebykeypromptsnippetrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
522
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
523
|
-
| `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. |
|
|
524
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
525
|
-
|
|
526
|
-
### Response
|
|
527
|
-
|
|
528
|
-
**Promise\<[operations.FindOneByKeyPromptSnippetResponseBody](../../models/operations/findonebykeypromptsnippetresponsebody.md)\>**
|
|
529
|
-
|
|
530
|
-
### Errors
|
|
531
|
-
|
|
532
|
-
| Error Type | Status Code | Content Type |
|
|
533
|
-
| --------------- | --------------- | --------------- |
|
|
534
|
-
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -1,80 +0,0 @@
|
|
|
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 | \*/\* |
|
package/packages/orq-rc/jsr.json
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
{
|
|
4
|
-
"name": "@orq-ai/node",
|
|
5
|
-
"version": "3.1.0-rc.64",
|
|
6
|
-
"exports": {
|
|
7
|
-
".": "./src/index.ts",
|
|
8
|
-
"./models/errors": "./src/models/errors/index.ts",
|
|
9
|
-
"./models/components": "./src/models/components/index.ts",
|
|
10
|
-
"./models/operations": "./src/models/operations/index.ts",
|
|
11
|
-
"./lib/config": "./src/lib/config.ts",
|
|
12
|
-
"./lib/http": "./src/lib/http.ts",
|
|
13
|
-
"./lib/retries": "./src/lib/retries.ts",
|
|
14
|
-
"./lib/sdks": "./src/lib/sdks.ts",
|
|
15
|
-
"./lib/event-streams": "./src/lib/event-streams.ts",
|
|
16
|
-
"./types": "./src/types/index.ts"
|
|
17
|
-
},
|
|
18
|
-
"publish": {
|
|
19
|
-
"include": [
|
|
20
|
-
"LICENSE",
|
|
21
|
-
"README.md",
|
|
22
|
-
"RUNTIMES.md",
|
|
23
|
-
"USAGE.md",
|
|
24
|
-
"jsr.json",
|
|
25
|
-
"src/**/*.ts"
|
|
26
|
-
]
|
|
27
|
-
}
|
|
28
|
-
}
|