@orq-ai/node 3.0.0-rc.19 → 3.1.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -10
- package/RUNTIMES.md +27 -1
- package/docs/sdks/deployments/README.md +195 -5
- package/docs/sdks/files/README.md +8 -4
- package/funcs/contactsCreate.d.ts.map +1 -1
- package/funcs/contactsCreate.js +8 -7
- package/funcs/contactsCreate.js.map +1 -1
- package/funcs/deploymentsGetConfig.d.ts.map +1 -1
- package/funcs/deploymentsGetConfig.js +8 -7
- package/funcs/deploymentsGetConfig.js.map +1 -1
- package/funcs/deploymentsGetLogs.d.ts +15 -0
- package/funcs/deploymentsGetLogs.d.ts.map +1 -0
- package/funcs/deploymentsGetLogs.js +113 -0
- package/funcs/deploymentsGetLogs.js.map +1 -0
- package/funcs/deploymentsInvalidate.d.ts +15 -0
- package/funcs/deploymentsInvalidate.d.ts.map +1 -0
- package/funcs/deploymentsInvalidate.js +113 -0
- package/funcs/deploymentsInvalidate.js.map +1 -0
- package/funcs/deploymentsInvoke.d.ts.map +1 -1
- package/funcs/deploymentsInvoke.js +9 -8
- package/funcs/deploymentsInvoke.js.map +1 -1
- package/funcs/{deploymentsAll.d.ts → deploymentsList.d.ts} +2 -2
- package/funcs/deploymentsList.d.ts.map +1 -0
- package/funcs/{deploymentsAll.js → deploymentsList.js} +14 -12
- package/funcs/deploymentsList.js.map +1 -0
- package/funcs/deploymentsMetricsCreate.d.ts.map +1 -1
- package/funcs/deploymentsMetricsCreate.js +8 -7
- package/funcs/deploymentsMetricsCreate.js.map +1 -1
- package/funcs/feedbackCreate.d.ts.map +1 -1
- package/funcs/feedbackCreate.js +8 -7
- package/funcs/feedbackCreate.js.map +1 -1
- package/funcs/filesBulkUpload.d.ts.map +1 -1
- package/funcs/filesBulkUpload.js +11 -9
- package/funcs/filesBulkUpload.js.map +1 -1
- package/funcs/filesDelete.d.ts.map +1 -1
- package/funcs/filesDelete.js +8 -7
- package/funcs/filesDelete.js.map +1 -1
- package/funcs/filesGet.d.ts.map +1 -1
- package/funcs/filesGet.js +8 -7
- package/funcs/filesGet.js.map +1 -1
- package/funcs/filesList.d.ts.map +1 -1
- package/funcs/filesList.js +12 -11
- package/funcs/filesList.js.map +1 -1
- package/funcs/filesUpdate.d.ts.map +1 -1
- package/funcs/filesUpdate.js +8 -7
- package/funcs/filesUpdate.js.map +1 -1
- package/funcs/filesUpload.d.ts.map +1 -1
- package/funcs/filesUpload.js +18 -16
- package/funcs/filesUpload.js.map +1 -1
- package/funcs/promptSnippetsFindOne.d.ts.map +1 -1
- package/funcs/promptSnippetsFindOne.js +8 -7
- package/funcs/promptSnippetsFindOne.js.map +1 -1
- package/funcs/promptTemplatesGetAll.d.ts.map +1 -1
- package/funcs/promptTemplatesGetAll.js +11 -10
- package/funcs/promptTemplatesGetAll.js.map +1 -1
- package/funcs/promptsCreate.d.ts.map +1 -1
- package/funcs/promptsCreate.js +8 -7
- package/funcs/promptsCreate.js.map +1 -1
- package/funcs/promptsCreateVersion.d.ts.map +1 -1
- package/funcs/promptsCreateVersion.js +8 -7
- package/funcs/promptsCreateVersion.js.map +1 -1
- package/funcs/promptsDelete.d.ts.map +1 -1
- package/funcs/promptsDelete.js +8 -7
- package/funcs/promptsDelete.js.map +1 -1
- package/funcs/promptsDuplicate.d.ts.map +1 -1
- package/funcs/promptsDuplicate.js +8 -7
- package/funcs/promptsDuplicate.js.map +1 -1
- package/funcs/promptsGetAll.d.ts.map +1 -1
- package/funcs/promptsGetAll.js +8 -7
- package/funcs/promptsGetAll.js.map +1 -1
- package/funcs/promptsGetOne.d.ts.map +1 -1
- package/funcs/promptsGetOne.js +8 -7
- package/funcs/promptsGetOne.js.map +1 -1
- package/funcs/promptsUpdate.d.ts.map +1 -1
- package/funcs/promptsUpdate.js +8 -7
- package/funcs/promptsUpdate.js.map +1 -1
- package/funcs/remoteconfigGetConfig.d.ts.map +1 -1
- package/funcs/remoteconfigGetConfig.js +8 -7
- package/funcs/remoteconfigGetConfig.js.map +1 -1
- package/jsr.json +28 -0
- 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/schemas.d.ts +1 -1
- package/lib/schemas.d.ts.map +1 -1
- package/lib/schemas.js +4 -1
- package/lib/schemas.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/models/operations/bulkfileupload.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createprompt.d.ts +12 -0
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +4 -0
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/createpromptversion.d.ts +12 -0
- package/models/operations/createpromptversion.d.ts.map +1 -1
- package/models/operations/createpromptversion.js +4 -0
- package/models/operations/createpromptversion.js.map +1 -1
- package/models/operations/deploymentgetlogs.d.ts +52406 -0
- package/models/operations/deploymentgetlogs.d.ts.map +1 -0
- package/models/operations/deploymentgetlogs.js +53803 -0
- package/models/operations/deploymentgetlogs.js.map +1 -0
- package/models/operations/deploymentinvoke.d.ts +6 -0
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +2 -0
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +15 -8
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +16 -10
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.d.ts +1 -5
- package/models/operations/filelist.d.ts.map +1 -1
- package/models/operations/filelist.js +4 -12
- package/models/operations/filelist.js.map +1 -1
- package/models/operations/fileupdate.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/findonepromptsnippet.d.ts +36 -0
- package/models/operations/findonepromptsnippet.d.ts.map +1 -1
- package/models/operations/findonepromptsnippet.js +18 -6
- package/models/operations/findonepromptsnippet.js.map +1 -1
- package/models/operations/getallprompts.d.ts +944 -912
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +1372 -1362
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getallprompttemplates.d.ts +151 -115
- package/models/operations/getallprompttemplates.d.ts.map +1 -1
- package/models/operations/getallprompttemplates.js +182 -173
- package/models/operations/getallprompttemplates.js.map +1 -1
- 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/invaliddeployment.d.ts +29 -0
- package/models/operations/invaliddeployment.d.ts.map +1 -0
- package/models/operations/invaliddeployment.js +78 -0
- package/models/operations/invaliddeployment.js.map +1 -0
- package/models/operations/updateprompt.d.ts +42 -0
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +20 -6
- package/models/operations/updateprompt.js.map +1 -1
- package/package.json +1 -1
- package/sdk/deployments.d.ts +15 -1
- package/sdk/deployments.d.ts.map +1 -1
- package/sdk/deployments.js +24 -5
- 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 +5 -3
- package/src/funcs/deploymentsGetConfig.ts +5 -3
- package/src/funcs/deploymentsGetLogs.ts +133 -0
- package/src/funcs/deploymentsInvalidate.ts +135 -0
- package/src/funcs/deploymentsInvoke.ts +5 -3
- package/src/funcs/{deploymentsAll.ts → deploymentsList.ts} +8 -5
- package/src/funcs/deploymentsMetricsCreate.ts +5 -3
- package/src/funcs/feedbackCreate.ts +5 -3
- package/src/funcs/filesBulkUpload.ts +8 -5
- package/src/funcs/filesDelete.ts +5 -3
- package/src/funcs/filesGet.ts +5 -3
- package/src/funcs/filesList.ts +5 -3
- package/src/funcs/filesUpdate.ts +5 -3
- package/src/funcs/filesUpload.ts +11 -7
- package/src/funcs/promptSnippetsFindOne.ts +5 -3
- package/src/funcs/promptTemplatesGetAll.ts +5 -3
- package/src/funcs/promptsCreate.ts +5 -3
- package/src/funcs/promptsCreateVersion.ts +5 -3
- package/src/funcs/promptsDelete.ts +5 -3
- package/src/funcs/promptsDuplicate.ts +5 -3
- package/src/funcs/promptsGetAll.ts +5 -3
- package/src/funcs/promptsGetOne.ts +5 -3
- package/src/funcs/promptsUpdate.ts +5 -3
- package/src/funcs/remoteconfigGetConfig.ts +5 -3
- package/src/lib/config.ts +4 -4
- package/src/lib/encodings.ts +95 -61
- package/src/lib/primitives.ts +14 -0
- package/src/lib/schemas.ts +5 -0
- package/src/lib/sdks.ts +4 -1
- package/src/lib/security.ts +1 -1
- package/src/models/operations/bulkfileupload.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createprompt.ts +4 -0
- package/src/models/operations/createpromptversion.ts +4 -0
- package/src/models/operations/deploymentgetlogs.ts +119430 -0
- package/src/models/operations/deploymentinvoke.ts +2 -0
- package/src/models/operations/deployments.ts +25 -18
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +5 -17
- package/src/models/operations/fileupdate.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/findonepromptsnippet.ts +18 -6
- package/src/models/operations/getallprompts.ts +2464 -2159
- package/src/models/operations/getallprompttemplates.ts +321 -232
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/invaliddeployment.ts +75 -0
- package/src/models/operations/updateprompt.ts +20 -6
- package/src/sdk/deployments.ts +39 -3
- package/tsconfig.json +41 -0
- package/funcs/deploymentsAll.d.ts.map +0 -1
- package/funcs/deploymentsAll.js.map +0 -1
package/README.md
CHANGED
|
@@ -9,11 +9,6 @@ Developer-friendly & type-safe Typescript SDK specifically catered to leverage *
|
|
|
9
9
|
</a>
|
|
10
10
|
</div>
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
<br /><br />
|
|
14
|
-
> [!IMPORTANT]
|
|
15
|
-
> This SDK is not yet ready for production use. To complete setup please follow the steps outlined in your [workspace](https://app.speakeasy.com/org/orq/orq). Delete this section before > publishing to a package manager.
|
|
16
|
-
|
|
17
12
|
<!-- Start Summary [summary] -->
|
|
18
13
|
## Summary
|
|
19
14
|
|
|
@@ -155,9 +150,11 @@ run();
|
|
|
155
150
|
|
|
156
151
|
### [deployments](docs/sdks/deployments/README.md)
|
|
157
152
|
|
|
158
|
-
* [
|
|
153
|
+
* [list](docs/sdks/deployments/README.md#list) - List all deployments
|
|
154
|
+
* [invalidate](docs/sdks/deployments/README.md#invalidate) - Invalidates cache
|
|
159
155
|
* [getConfig](docs/sdks/deployments/README.md#getconfig) - Get config
|
|
160
156
|
* [invoke](docs/sdks/deployments/README.md#invoke) - Invoke
|
|
157
|
+
* [getLogs](docs/sdks/deployments/README.md#getlogs) - Get Logs
|
|
161
158
|
|
|
162
159
|
#### [deployments.metrics](docs/sdks/metrics/README.md)
|
|
163
160
|
|
|
@@ -221,9 +218,11 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
221
218
|
<summary>Available standalone functions</summary>
|
|
222
219
|
|
|
223
220
|
- [`contactsCreate`](docs/sdks/contacts/README.md#create) - Update user information
|
|
224
|
-
- [`deploymentsAll`](docs/sdks/deployments/README.md#all) - List all deployments
|
|
225
221
|
- [`deploymentsGetConfig`](docs/sdks/deployments/README.md#getconfig) - Get config
|
|
222
|
+
- [`deploymentsGetLogs`](docs/sdks/deployments/README.md#getlogs) - Get Logs
|
|
223
|
+
- [`deploymentsInvalidate`](docs/sdks/deployments/README.md#invalidate) - Invalidates cache
|
|
226
224
|
- [`deploymentsInvoke`](docs/sdks/deployments/README.md#invoke) - Invoke
|
|
225
|
+
- [`deploymentsList`](docs/sdks/deployments/README.md#list) - List all deployments
|
|
227
226
|
- [`deploymentsMetricsCreate`](docs/sdks/metrics/README.md#create) - Add metrics
|
|
228
227
|
- [`feedbackCreate`](docs/sdks/feedback/README.md#create) - Submit feedback
|
|
229
228
|
- [`filesBulkUpload`](docs/sdks/files/README.md#bulkupload) - Bulk upload file
|
|
@@ -265,6 +264,7 @@ const orq = new Orq({
|
|
|
265
264
|
async function run() {
|
|
266
265
|
const result = await orq.deployments.invoke({
|
|
267
266
|
key: "<key>",
|
|
267
|
+
stream: false,
|
|
268
268
|
});
|
|
269
269
|
|
|
270
270
|
for await (const event of result) {
|
|
@@ -386,7 +386,7 @@ run();
|
|
|
386
386
|
<!-- Start Error Handling [errors] -->
|
|
387
387
|
## Error Handling
|
|
388
388
|
|
|
389
|
-
Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `
|
|
389
|
+
Some methods specify known errors which can be thrown. All the known errors are enumerated in the `models/errors/errors.ts` module. The known errors for a method are documented under the *Errors* tables in SDK docs. For example, the `list` method may throw the following errors:
|
|
390
390
|
|
|
391
391
|
| Error Type | Status Code | Content Type |
|
|
392
392
|
| ------------------- | ----------- | ---------------- |
|
|
@@ -406,7 +406,9 @@ const orq = new Orq({
|
|
|
406
406
|
async function run() {
|
|
407
407
|
let result;
|
|
408
408
|
try {
|
|
409
|
-
result = await orq.deployments.
|
|
409
|
+
result = await orq.deployments.list({
|
|
410
|
+
limit: 10,
|
|
411
|
+
});
|
|
410
412
|
|
|
411
413
|
// Handle the result
|
|
412
414
|
console.log(result);
|
|
@@ -460,7 +462,7 @@ The default server can also be overridden globally by passing a URL to the `serv
|
|
|
460
462
|
import { Orq } from "@orq-ai/node";
|
|
461
463
|
|
|
462
464
|
const orq = new Orq({
|
|
463
|
-
serverURL: "https://my.
|
|
465
|
+
serverURL: "https://my.orq.ai",
|
|
464
466
|
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
465
467
|
});
|
|
466
468
|
|
package/RUNTIMES.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Supported JavaScript runtimes
|
|
2
2
|
|
|
3
|
-
This SDK is intended to be used in JavaScript runtimes that support the following features:
|
|
3
|
+
This SDK is intended to be used in JavaScript runtimes that support ECMAScript 2020 or newer. The SDK uses the following features:
|
|
4
4
|
|
|
5
5
|
* [Web Fetch API][web-fetch]
|
|
6
6
|
* [Web Streams API][web-streams] and in particular `ReadableStream`
|
|
@@ -20,3 +20,29 @@ Runtime environments that are explicitly supported are:
|
|
|
20
20
|
- Note that Deno does not currently have native support for streaming file uploads backed by the filesystem ([issue link][deno-file-streaming])
|
|
21
21
|
|
|
22
22
|
[deno-file-streaming]: https://github.com/denoland/deno/issues/11018
|
|
23
|
+
|
|
24
|
+
## Recommended TypeScript compiler options
|
|
25
|
+
|
|
26
|
+
The following `tsconfig.json` options are recommended for projects using this
|
|
27
|
+
SDK in order to get static type support for features like async iterables,
|
|
28
|
+
streams and `fetch`-related APIs ([`for await...of`][for-await-of],
|
|
29
|
+
[`AbortSignal`][abort-signal], [`Request`][request], [`Response`][response] and
|
|
30
|
+
so on):
|
|
31
|
+
|
|
32
|
+
[for-await-of]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of
|
|
33
|
+
[abort-signal]: https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
|
|
34
|
+
[request]: https://developer.mozilla.org/en-US/docs/Web/API/Request
|
|
35
|
+
[response]: https://developer.mozilla.org/en-US/docs/Web/API/Response
|
|
36
|
+
|
|
37
|
+
```jsonc
|
|
38
|
+
{
|
|
39
|
+
"compilerOptions": {
|
|
40
|
+
"target": "es2020", // or higher
|
|
41
|
+
"lib": ["es2020", "dom", "dom.iterable"],
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
While `target` can be set to older ECMAScript versions, it may result in extra,
|
|
47
|
+
unnecessary compatibility code being generated if you are not targeting old
|
|
48
|
+
runtimes.
|
|
@@ -5,11 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
### Available Operations
|
|
7
7
|
|
|
8
|
-
* [
|
|
8
|
+
* [list](#list) - List all deployments
|
|
9
|
+
* [invalidate](#invalidate) - Invalidates cache
|
|
9
10
|
* [getConfig](#getconfig) - Get config
|
|
10
11
|
* [invoke](#invoke) - Invoke
|
|
12
|
+
* [getLogs](#getlogs) - Get Logs
|
|
11
13
|
|
|
12
|
-
##
|
|
14
|
+
## list
|
|
13
15
|
|
|
14
16
|
Returns a list of your deployments. The deployments are returned sorted by creation date, with the most recent deployments appearing first.
|
|
15
17
|
|
|
@@ -23,7 +25,9 @@ const orq = new Orq({
|
|
|
23
25
|
});
|
|
24
26
|
|
|
25
27
|
async function run() {
|
|
26
|
-
const result = await orq.deployments.
|
|
28
|
+
const result = await orq.deployments.list({
|
|
29
|
+
limit: 10,
|
|
30
|
+
});
|
|
27
31
|
|
|
28
32
|
// Handle the result
|
|
29
33
|
console.log(result);
|
|
@@ -38,7 +42,7 @@ The standalone function version of this method:
|
|
|
38
42
|
|
|
39
43
|
```typescript
|
|
40
44
|
import { OrqCore } from "@orq-ai/node/core.js";
|
|
41
|
-
import {
|
|
45
|
+
import { deploymentsList } from "@orq-ai/node/funcs/deploymentsList.js";
|
|
42
46
|
|
|
43
47
|
// Use `OrqCore` for best tree-shaking performance.
|
|
44
48
|
// You can create one instance of it to use across an application.
|
|
@@ -47,7 +51,9 @@ const orq = new OrqCore({
|
|
|
47
51
|
});
|
|
48
52
|
|
|
49
53
|
async function run() {
|
|
50
|
-
const res = await
|
|
54
|
+
const res = await deploymentsList(orq, {
|
|
55
|
+
limit: 10,
|
|
56
|
+
});
|
|
51
57
|
|
|
52
58
|
if (!res.ok) {
|
|
53
59
|
throw res.error;
|
|
@@ -82,6 +88,80 @@ run();
|
|
|
82
88
|
| errors.HonoApiError | 500 | application/json |
|
|
83
89
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
84
90
|
|
|
91
|
+
## invalidate
|
|
92
|
+
|
|
93
|
+
Explicitly invalidate a cache of a deployment
|
|
94
|
+
|
|
95
|
+
### Example Usage
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
import { Orq } from "@orq-ai/node";
|
|
99
|
+
|
|
100
|
+
const orq = new Orq({
|
|
101
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
async function run() {
|
|
105
|
+
await orq.deployments.invalidate({
|
|
106
|
+
deploymentId: "e1106c66-dcfb-4003-a0e1-3c49405187d4",
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
run();
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Standalone function
|
|
116
|
+
|
|
117
|
+
The standalone function version of this method:
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
121
|
+
import { deploymentsInvalidate } from "@orq-ai/node/funcs/deploymentsInvalidate.js";
|
|
122
|
+
|
|
123
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
124
|
+
// You can create one instance of it to use across an application.
|
|
125
|
+
const orq = new OrqCore({
|
|
126
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
async function run() {
|
|
130
|
+
const res = await deploymentsInvalidate(orq, {
|
|
131
|
+
deploymentId: "e1106c66-dcfb-4003-a0e1-3c49405187d4",
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
if (!res.ok) {
|
|
135
|
+
throw res.error;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const { value: result } = res;
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
run();
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Parameters
|
|
147
|
+
|
|
148
|
+
| Parameter | Type | Required | Description |
|
|
149
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
150
|
+
| `request` | [operations.InvalidDeploymentRequest](../../models/operations/invaliddeploymentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
151
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
152
|
+
| `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. |
|
|
153
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
154
|
+
|
|
155
|
+
### Response
|
|
156
|
+
|
|
157
|
+
**Promise\<void\>**
|
|
158
|
+
|
|
159
|
+
### Errors
|
|
160
|
+
|
|
161
|
+
| Error Type | Status Code | Content Type |
|
|
162
|
+
| --------------- | --------------- | --------------- |
|
|
163
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
164
|
+
|
|
85
165
|
## getConfig
|
|
86
166
|
|
|
87
167
|
Retrieve the deployment configuration
|
|
@@ -174,6 +254,7 @@ const orq = new Orq({
|
|
|
174
254
|
async function run() {
|
|
175
255
|
const result = await orq.deployments.invoke({
|
|
176
256
|
key: "<key>",
|
|
257
|
+
stream: false,
|
|
177
258
|
});
|
|
178
259
|
|
|
179
260
|
for await (const event of result) {
|
|
@@ -202,6 +283,7 @@ const orq = new OrqCore({
|
|
|
202
283
|
async function run() {
|
|
203
284
|
const res = await deploymentsInvoke(orq, {
|
|
204
285
|
key: "<key>",
|
|
286
|
+
stream: false,
|
|
205
287
|
});
|
|
206
288
|
|
|
207
289
|
if (!res.ok) {
|
|
@@ -234,6 +316,114 @@ run();
|
|
|
234
316
|
|
|
235
317
|
### Errors
|
|
236
318
|
|
|
319
|
+
| Error Type | Status Code | Content Type |
|
|
320
|
+
| --------------- | --------------- | --------------- |
|
|
321
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
322
|
+
|
|
323
|
+
## getLogs
|
|
324
|
+
|
|
325
|
+
Retrieve the logs based on deployment key
|
|
326
|
+
|
|
327
|
+
### Example Usage
|
|
328
|
+
|
|
329
|
+
```typescript
|
|
330
|
+
import { Orq } from "@orq-ai/node";
|
|
331
|
+
|
|
332
|
+
const orq = new Orq({
|
|
333
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
async function run() {
|
|
337
|
+
const result = await orq.deployments.getLogs({
|
|
338
|
+
deploymentKey: "<value>",
|
|
339
|
+
requestBody: {
|
|
340
|
+
filters: [
|
|
341
|
+
{
|
|
342
|
+
type: "id",
|
|
343
|
+
id: "<id>",
|
|
344
|
+
path: "/usr/include",
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
type: "search",
|
|
348
|
+
value: "<value>",
|
|
349
|
+
searchPaths: [
|
|
350
|
+
"<value>",
|
|
351
|
+
],
|
|
352
|
+
},
|
|
353
|
+
],
|
|
354
|
+
},
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
// Handle the result
|
|
358
|
+
console.log(result);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
run();
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### Standalone function
|
|
365
|
+
|
|
366
|
+
The standalone function version of this method:
|
|
367
|
+
|
|
368
|
+
```typescript
|
|
369
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
370
|
+
import { deploymentsGetLogs } from "@orq-ai/node/funcs/deploymentsGetLogs.js";
|
|
371
|
+
|
|
372
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
373
|
+
// You can create one instance of it to use across an application.
|
|
374
|
+
const orq = new OrqCore({
|
|
375
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
376
|
+
});
|
|
377
|
+
|
|
378
|
+
async function run() {
|
|
379
|
+
const res = await deploymentsGetLogs(orq, {
|
|
380
|
+
deploymentKey: "<value>",
|
|
381
|
+
requestBody: {
|
|
382
|
+
filters: [
|
|
383
|
+
{
|
|
384
|
+
type: "id",
|
|
385
|
+
id: "<id>",
|
|
386
|
+
path: "/usr/include",
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
type: "search",
|
|
390
|
+
value: "<value>",
|
|
391
|
+
searchPaths: [
|
|
392
|
+
"<value>",
|
|
393
|
+
],
|
|
394
|
+
},
|
|
395
|
+
],
|
|
396
|
+
},
|
|
397
|
+
});
|
|
398
|
+
|
|
399
|
+
if (!res.ok) {
|
|
400
|
+
throw res.error;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
const { value: result } = res;
|
|
404
|
+
|
|
405
|
+
// Handle the result
|
|
406
|
+
console.log(result);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
run();
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
### Parameters
|
|
413
|
+
|
|
414
|
+
| Parameter | Type | Required | Description |
|
|
415
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
416
|
+
| `request` | [operations.DeploymentGetLogsRequest](../../models/operations/deploymentgetlogsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
417
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
418
|
+
| `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. |
|
|
419
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
420
|
+
|
|
421
|
+
### Response
|
|
422
|
+
|
|
423
|
+
**Promise\<[operations.DeploymentGetLogsResponseBody](../../models/operations/deploymentgetlogsresponsebody.md)\>**
|
|
424
|
+
|
|
425
|
+
### Errors
|
|
426
|
+
|
|
237
427
|
| Error Type | Status Code | Content Type |
|
|
238
428
|
| --------------- | --------------- | --------------- |
|
|
239
429
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -98,7 +98,9 @@ const orq = new Orq({
|
|
|
98
98
|
});
|
|
99
99
|
|
|
100
100
|
async function run() {
|
|
101
|
-
const result = await orq.files.list(
|
|
101
|
+
const result = await orq.files.list({
|
|
102
|
+
limit: 50,
|
|
103
|
+
});
|
|
102
104
|
|
|
103
105
|
// Handle the result
|
|
104
106
|
console.log(result);
|
|
@@ -122,7 +124,9 @@ const orq = new OrqCore({
|
|
|
122
124
|
});
|
|
123
125
|
|
|
124
126
|
async function run() {
|
|
125
|
-
const res = await filesList(orq
|
|
127
|
+
const res = await filesList(orq, {
|
|
128
|
+
limit: 50,
|
|
129
|
+
});
|
|
126
130
|
|
|
127
131
|
if (!res.ok) {
|
|
128
132
|
throw res.error;
|
|
@@ -404,7 +408,7 @@ async function run() {
|
|
|
404
408
|
content: await openAsBlob("example.file"),
|
|
405
409
|
},
|
|
406
410
|
],
|
|
407
|
-
purpose: "
|
|
411
|
+
purpose: "knowledge_datasource",
|
|
408
412
|
});
|
|
409
413
|
|
|
410
414
|
// Handle the result
|
|
@@ -437,7 +441,7 @@ async function run() {
|
|
|
437
441
|
content: await openAsBlob("example.file"),
|
|
438
442
|
},
|
|
439
443
|
],
|
|
440
|
-
purpose: "
|
|
444
|
+
purpose: "knowledge_datasource",
|
|
441
445
|
});
|
|
442
446
|
|
|
443
447
|
if (!res.ok) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contactsCreate.d.ts","sourceRoot":"","sources":["../src/funcs/contactsCreate.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"contactsCreate.d.ts","sourceRoot":"","sources":["../src/funcs/contactsCreate.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAKrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,wBAAwB,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,yBAAyB,EAClC,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAgFA"}
|
package/funcs/contactsCreate.js
CHANGED
|
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.contactsCreate = contactsCreate;
|
|
40
40
|
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
41
|
const M = __importStar(require("../lib/matchers.js"));
|
|
42
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
42
43
|
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
44
|
const security_js_1 = require("../lib/security.js");
|
|
44
45
|
const url_js_1 = require("../lib/url.js");
|
|
@@ -57,10 +58,10 @@ async function contactsCreate(client, request, options) {
|
|
|
57
58
|
const payload = parsed.value;
|
|
58
59
|
const body = (0, encodings_js_1.encodeJSON)("body", payload, { explode: true });
|
|
59
60
|
const path = (0, url_js_1.pathToFunc)("/v2/contacts")();
|
|
60
|
-
const headers = new Headers({
|
|
61
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
61
62
|
"Content-Type": "application/json",
|
|
62
63
|
Accept: "application/json",
|
|
63
|
-
});
|
|
64
|
+
}));
|
|
64
65
|
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
65
66
|
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
66
67
|
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
@@ -69,19 +70,19 @@ async function contactsCreate(client, request, options) {
|
|
|
69
70
|
oAuth2Scopes: [],
|
|
70
71
|
resolvedSecurity: requestSecurity,
|
|
71
72
|
securitySource: client._options.apiKey,
|
|
72
|
-
retryConfig:
|
|
73
|
+
retryConfig: options?.retries
|
|
73
74
|
|| client._options.retryConfig
|
|
74
75
|
|| { strategy: "none" },
|
|
75
|
-
retryCodes:
|
|
76
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
76
77
|
};
|
|
77
78
|
const requestRes = client._createRequest(context, {
|
|
78
79
|
security: requestSecurity,
|
|
79
80
|
method: "POST",
|
|
80
|
-
baseURL: options
|
|
81
|
+
baseURL: options?.serverURL,
|
|
81
82
|
path: path,
|
|
82
83
|
headers: headers,
|
|
83
84
|
body: body,
|
|
84
|
-
timeoutMs:
|
|
85
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
85
86
|
}, options);
|
|
86
87
|
if (!requestRes.ok) {
|
|
87
88
|
return requestRes;
|
|
@@ -97,7 +98,7 @@ async function contactsCreate(client, request, options) {
|
|
|
97
98
|
return doResult;
|
|
98
99
|
}
|
|
99
100
|
const response = doResult.value;
|
|
100
|
-
const [result] = await M.match(M.json(200, operations.CreateContactResponseBody$inboundSchema), M.fail(
|
|
101
|
+
const [result] = await M.match(M.json(200, operations.CreateContactResponseBody$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response);
|
|
101
102
|
if (!result.ok) {
|
|
102
103
|
return result;
|
|
103
104
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contactsCreate.js","sourceRoot":"","sources":["../src/funcs/contactsCreate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"contactsCreate.js","sourceRoot":"","sources":["../src/funcs/contactsCreate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BH,wCA+FC;AAxHD,sDAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAU3C,0EAA4D;AAG5D;;;;;GAKG;AACI,KAAK,UAAU,cAAc,CAClC,MAAe,EACf,OAA4C,EAC5C,OAAwB;IAaxB,MAAM,MAAM,GAAG,IAAA,sB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"file":"deploymentsGetConfig.d.ts","sourceRoot":"","sources":["../src/funcs/deploymentsGetConfig.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"deploymentsGetConfig.d.ts","sourceRoot":"","sources":["../src/funcs/deploymentsGetConfig.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAKrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,8BAA8B,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,+BAA+B,GAAG,SAAS,EACpD,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAwFA"}
|
|
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.deploymentsGetConfig = deploymentsGetConfig;
|
|
40
40
|
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
41
|
const M = __importStar(require("../lib/matchers.js"));
|
|
42
|
+
const primitives_js_1 = require("../lib/primitives.js");
|
|
42
43
|
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
44
|
const security_js_1 = require("../lib/security.js");
|
|
44
45
|
const url_js_1 = require("../lib/url.js");
|
|
@@ -57,10 +58,10 @@ async function deploymentsGetConfig(client, request, options) {
|
|
|
57
58
|
const payload = parsed.value;
|
|
58
59
|
const body = (0, encodings_js_1.encodeJSON)("body", payload, { explode: true });
|
|
59
60
|
const path = (0, url_js_1.pathToFunc)("/v2/deployments/get_config")();
|
|
60
|
-
const headers = new Headers({
|
|
61
|
+
const headers = new Headers((0, primitives_js_1.compactMap)({
|
|
61
62
|
"Content-Type": "application/json",
|
|
62
63
|
Accept: "application/json",
|
|
63
|
-
});
|
|
64
|
+
}));
|
|
64
65
|
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
65
66
|
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
66
67
|
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
@@ -69,19 +70,19 @@ async function deploymentsGetConfig(client, request, options) {
|
|
|
69
70
|
oAuth2Scopes: [],
|
|
70
71
|
resolvedSecurity: requestSecurity,
|
|
71
72
|
securitySource: client._options.apiKey,
|
|
72
|
-
retryConfig:
|
|
73
|
+
retryConfig: options?.retries
|
|
73
74
|
|| client._options.retryConfig
|
|
74
75
|
|| { strategy: "none" },
|
|
75
|
-
retryCodes:
|
|
76
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
76
77
|
};
|
|
77
78
|
const requestRes = client._createRequest(context, {
|
|
78
79
|
security: requestSecurity,
|
|
79
80
|
method: "POST",
|
|
80
|
-
baseURL: options
|
|
81
|
+
baseURL: options?.serverURL,
|
|
81
82
|
path: path,
|
|
82
83
|
headers: headers,
|
|
83
84
|
body: body,
|
|
84
|
-
timeoutMs:
|
|
85
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
85
86
|
}, options);
|
|
86
87
|
if (!requestRes.ok) {
|
|
87
88
|
return requestRes;
|
|
@@ -97,7 +98,7 @@ async function deploymentsGetConfig(client, request, options) {
|
|
|
97
98
|
return doResult;
|
|
98
99
|
}
|
|
99
100
|
const response = doResult.value;
|
|
100
|
-
const [result] = await M.match(M.json(200, operations.DeploymentGetConfigResponseBody$inboundSchema.optional()), M.nil(204, operations.DeploymentGetConfigResponseBody$inboundSchema.optional()), M.fail([401, "4XX", "5XX"
|
|
101
|
+
const [result] = await M.match(M.json(200, operations.DeploymentGetConfigResponseBody$inboundSchema.optional()), M.nil(204, operations.DeploymentGetConfigResponseBody$inboundSchema.optional()), M.fail([401, "4XX"]), M.fail("5XX"))(response);
|
|
101
102
|
if (!result.ok) {
|
|
102
103
|
return result;
|
|
103
104
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploymentsGetConfig.js","sourceRoot":"","sources":["../src/funcs/deploymentsGetConfig.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"deploymentsGetConfig.js","sourceRoot":"","sources":["../src/funcs/deploymentsGetConfig.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BH,oDAuGC;AAhID,sDAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAU3C,0EAA4D;AAG5D;;;;;GAKG;AACI,KAAK,UAAU,oBAAoB,CACxC,MAAe,EACf,OAAkD,EAClD,OAAwB;IAaxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CACR,UAAU,CAAC,6CAA6C,CAAC,KAAK,CAAC,KAAK,CAAC,EACvE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;IAC7B,MAAM,IAAI,GAAG,IAA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AAC,SAAS,IAAI,MAAM;KACrE,EAAE,OAAO,CAAC,CAAC;IACZ,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;QACnB,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,MAAM,GAAG,GAAG,UAAU,CAAC,KAAK,CAAC;IAE7B,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE;QACrC,OAAO;QACP,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;QACjC,WAAW,EAAE,OAAO,CAAC,WAAW;QAChC,UAAU,EAAE,OAAO,CAAC,UAAU;KAC/B,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAU5B,CAAC,CAAC,IAAI,CACJ,GAAG,EACH,UAAU,CAAC,6CAA6C,CAAC,QAAQ,EAAE,CACpE,EACD,CAAC,CAAC,GAAG,CACH,GAAG,EACH,UAAU,CAAC,6CAA6C,CAAC,QAAQ,EAAE,CACpE,EACD,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,EACpB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,CAAC,CAAC;IACZ,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OrqCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { APIError } from "../models/errors/apierror.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
6
|
+
import * as operations from "../models/operations/index.js";
|
|
7
|
+
import { Result } from "../types/fp.js";
|
|
8
|
+
/**
|
|
9
|
+
* Get Logs
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* Retrieve the logs based on deployment key
|
|
13
|
+
*/
|
|
14
|
+
export declare function deploymentsGetLogs(client: OrqCore, request: operations.DeploymentGetLogsRequest, options?: RequestOptions): Promise<Result<operations.DeploymentGetLogsResponseBody, APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
15
|
+
//# sourceMappingURL=deploymentsGetLogs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploymentsGetLogs.d.ts","sourceRoot":"","sources":["../src/funcs/deploymentsGetLogs.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAKrC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,wBAAwB,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,6BAA6B,EACtC,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAuFA"}
|