@orq-ai/node 3.1.7 → 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 +3 -3
- package/lib/config.js +3 -3
- 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 +3 -3
- 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 -506
- 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 -235
- 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/remoteconfigs/README.md +0 -80
- package/packages/orq-rc/jsr.json +0 -27
- 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 -127
- package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -135
- package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -143
- package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -142
- package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -135
- package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -127
- package/packages/orq-rc/src/funcs/filesCreate.ts +0 -150
- package/packages/orq-rc/src/funcs/filesDelete.ts +0 -131
- package/packages/orq-rc/src/funcs/filesGet.ts +0 -133
- package/packages/orq-rc/src/funcs/filesList.ts +0 -134
- package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -127
- package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -131
- package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -147
- package/packages/orq-rc/src/funcs/promptsList.ts +0 -134
- package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -140
- package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -133
- package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -139
- package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -128
- 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 -110
- 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/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 -322
- 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 -253
- 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 -10
- 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/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 -3717
- package/packages/orq-rc/src/models/operations/deleteprompt.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/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 -336
- package/packages/orq-rc/src/models/operations/fileupload.ts +0 -322
- package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2116
- 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 -22
- 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 -3900
- package/packages/orq-rc/src/sdk/contacts.ts +0 -27
- package/packages/orq-rc/src/sdk/deployments.ts +0 -70
- package/packages/orq-rc/src/sdk/feedback.ts +0 -27
- package/packages/orq-rc/src/sdk/files.ts +0 -78
- 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/remoteconfigs.ts +0 -24
- package/packages/orq-rc/src/sdk/sdk.ts +0 -43
- 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,27 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { contactsCreate } from "../funcs/contactsCreate.js";
|
|
6
|
-
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
-
import * as operations from "../models/operations/index.js";
|
|
8
|
-
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
-
|
|
10
|
-
export class Contacts extends ClientSDK {
|
|
11
|
-
/**
|
|
12
|
-
* Update user information
|
|
13
|
-
*
|
|
14
|
-
* @remarks
|
|
15
|
-
* Update or add user information to workspace
|
|
16
|
-
*/
|
|
17
|
-
async create(
|
|
18
|
-
request: operations.CreateContactRequestBody,
|
|
19
|
-
options?: RequestOptions,
|
|
20
|
-
): Promise<operations.CreateContactResponseBody> {
|
|
21
|
-
return unwrapAsync(contactsCreate(
|
|
22
|
-
this,
|
|
23
|
-
request,
|
|
24
|
-
options,
|
|
25
|
-
));
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { deploymentsGetConfig } from "../funcs/deploymentsGetConfig.js";
|
|
6
|
-
import { deploymentsInvoke } from "../funcs/deploymentsInvoke.js";
|
|
7
|
-
import { deploymentsList } from "../funcs/deploymentsList.js";
|
|
8
|
-
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
9
|
-
import * as components from "../models/components/index.js";
|
|
10
|
-
import * as operations from "../models/operations/index.js";
|
|
11
|
-
import { unwrapAsync } from "../types/fp.js";
|
|
12
|
-
import { Metrics } from "./metrics.js";
|
|
13
|
-
|
|
14
|
-
export class Deployments extends ClientSDK {
|
|
15
|
-
private _metrics?: Metrics;
|
|
16
|
-
get metrics(): Metrics {
|
|
17
|
-
return (this._metrics ??= new Metrics(this._options));
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* List all deployments
|
|
22
|
-
*
|
|
23
|
-
* @remarks
|
|
24
|
-
* Returns a list of your deployments. The deployments are returned sorted by creation date, with the most recent deployments appearing first.
|
|
25
|
-
*/
|
|
26
|
-
async list(
|
|
27
|
-
request?: operations.DeploymentsRequest | undefined,
|
|
28
|
-
options?: RequestOptions,
|
|
29
|
-
): Promise<operations.DeploymentsResponseBody> {
|
|
30
|
-
return unwrapAsync(deploymentsList(
|
|
31
|
-
this,
|
|
32
|
-
request,
|
|
33
|
-
options,
|
|
34
|
-
));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Get config
|
|
39
|
-
*
|
|
40
|
-
* @remarks
|
|
41
|
-
* Retrieve the deployment configuration
|
|
42
|
-
*/
|
|
43
|
-
async getConfig(
|
|
44
|
-
request: operations.DeploymentGetConfigRequestBody,
|
|
45
|
-
options?: RequestOptions,
|
|
46
|
-
): Promise<operations.DeploymentGetConfigResponseBody | undefined> {
|
|
47
|
-
return unwrapAsync(deploymentsGetConfig(
|
|
48
|
-
this,
|
|
49
|
-
request,
|
|
50
|
-
options,
|
|
51
|
-
));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Invoke
|
|
56
|
-
*
|
|
57
|
-
* @remarks
|
|
58
|
-
* Invoke a deployment with a given payload
|
|
59
|
-
*/
|
|
60
|
-
async invoke(
|
|
61
|
-
request: components.Deployments,
|
|
62
|
-
options?: RequestOptions,
|
|
63
|
-
): Promise<operations.DeploymentInvokeResponseBody | undefined> {
|
|
64
|
-
return unwrapAsync(deploymentsInvoke(
|
|
65
|
-
this,
|
|
66
|
-
request,
|
|
67
|
-
options,
|
|
68
|
-
));
|
|
69
|
-
}
|
|
70
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { feedbackCreate } from "../funcs/feedbackCreate.js";
|
|
6
|
-
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
-
import * as operations from "../models/operations/index.js";
|
|
8
|
-
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
-
|
|
10
|
-
export class Feedback extends ClientSDK {
|
|
11
|
-
/**
|
|
12
|
-
* Submit feedback
|
|
13
|
-
*
|
|
14
|
-
* @remarks
|
|
15
|
-
* Submit feedback for the LLM transaction via the API
|
|
16
|
-
*/
|
|
17
|
-
async create(
|
|
18
|
-
request: operations.CreateFeedbackRequestBody,
|
|
19
|
-
options?: RequestOptions,
|
|
20
|
-
): Promise<operations.CreateFeedbackResponseBody> {
|
|
21
|
-
return unwrapAsync(feedbackCreate(
|
|
22
|
-
this,
|
|
23
|
-
request,
|
|
24
|
-
options,
|
|
25
|
-
));
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { filesCreate } from "../funcs/filesCreate.js";
|
|
6
|
-
import { filesDelete } from "../funcs/filesDelete.js";
|
|
7
|
-
import { filesGet } from "../funcs/filesGet.js";
|
|
8
|
-
import { filesList } from "../funcs/filesList.js";
|
|
9
|
-
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
10
|
-
import * as operations from "../models/operations/index.js";
|
|
11
|
-
import { unwrapAsync } from "../types/fp.js";
|
|
12
|
-
|
|
13
|
-
export class Files extends ClientSDK {
|
|
14
|
-
/**
|
|
15
|
-
* Create file
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* Files are used to upload documents that can be used with features like [Deployments](https://docs.orq.ai/reference/post_v2-deployments-get-config).
|
|
19
|
-
*/
|
|
20
|
-
async create(
|
|
21
|
-
request?: operations.FileUploadRequestBody | undefined,
|
|
22
|
-
options?: RequestOptions,
|
|
23
|
-
): Promise<operations.FileUploadResponseBody> {
|
|
24
|
-
return unwrapAsync(filesCreate(
|
|
25
|
-
this,
|
|
26
|
-
request,
|
|
27
|
-
options,
|
|
28
|
-
));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* List all files
|
|
33
|
-
*
|
|
34
|
-
* @remarks
|
|
35
|
-
* Returns a list of the files that your account has access to. orq.ai sorts and returns the files by their creation dates, placing the most recently created files at the top.
|
|
36
|
-
*/
|
|
37
|
-
async list(
|
|
38
|
-
request?: operations.FileListRequest | undefined,
|
|
39
|
-
options?: RequestOptions,
|
|
40
|
-
): Promise<operations.FileListResponseBody> {
|
|
41
|
-
return unwrapAsync(filesList(
|
|
42
|
-
this,
|
|
43
|
-
request,
|
|
44
|
-
options,
|
|
45
|
-
));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Retrieve a file
|
|
50
|
-
*
|
|
51
|
-
* @remarks
|
|
52
|
-
* Retrieves the details of an existing file object. After you supply a unique file ID, orq.ai returns the corresponding file object
|
|
53
|
-
*/
|
|
54
|
-
async get(
|
|
55
|
-
request: operations.FileGetRequest,
|
|
56
|
-
options?: RequestOptions,
|
|
57
|
-
): Promise<operations.FileGetResponseBody> {
|
|
58
|
-
return unwrapAsync(filesGet(
|
|
59
|
-
this,
|
|
60
|
-
request,
|
|
61
|
-
options,
|
|
62
|
-
));
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Delete file
|
|
67
|
-
*/
|
|
68
|
-
async delete(
|
|
69
|
-
request: operations.FileDeleteRequest,
|
|
70
|
-
options?: RequestOptions,
|
|
71
|
-
): Promise<void> {
|
|
72
|
-
return unwrapAsync(filesDelete(
|
|
73
|
-
this,
|
|
74
|
-
request,
|
|
75
|
-
options,
|
|
76
|
-
));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { deploymentsMetricsCreate } from "../funcs/deploymentsMetricsCreate.js";
|
|
6
|
-
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
-
import * as operations from "../models/operations/index.js";
|
|
8
|
-
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
-
|
|
10
|
-
export class Metrics extends ClientSDK {
|
|
11
|
-
/**
|
|
12
|
-
* Add metrics
|
|
13
|
-
*
|
|
14
|
-
* @remarks
|
|
15
|
-
* Add metrics to a deployment
|
|
16
|
-
*/
|
|
17
|
-
async create(
|
|
18
|
-
request: operations.DeploymentCreateMetricRequest,
|
|
19
|
-
options?: RequestOptions,
|
|
20
|
-
): Promise<operations.DeploymentCreateMetricResponseBody> {
|
|
21
|
-
return unwrapAsync(deploymentsMetricsCreate(
|
|
22
|
-
this,
|
|
23
|
-
request,
|
|
24
|
-
options,
|
|
25
|
-
));
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { promptsCreate } from "../funcs/promptsCreate.js";
|
|
6
|
-
import { promptsDelete } from "../funcs/promptsDelete.js";
|
|
7
|
-
import { promptsGetVersion } from "../funcs/promptsGetVersion.js";
|
|
8
|
-
import { promptsList } from "../funcs/promptsList.js";
|
|
9
|
-
import { promptsListVersions } from "../funcs/promptsListVersions.js";
|
|
10
|
-
import { promptsRetrieve } from "../funcs/promptsRetrieve.js";
|
|
11
|
-
import { promptsUpdate } from "../funcs/promptsUpdate.js";
|
|
12
|
-
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
13
|
-
import * as operations from "../models/operations/index.js";
|
|
14
|
-
import { unwrapAsync } from "../types/fp.js";
|
|
15
|
-
|
|
16
|
-
export class Prompts extends ClientSDK {
|
|
17
|
-
/**
|
|
18
|
-
* List all prompts
|
|
19
|
-
*
|
|
20
|
-
* @remarks
|
|
21
|
-
* Returns a list of your prompts. The prompts are returned sorted by creation date, with the most recent prompts appearing first
|
|
22
|
-
*/
|
|
23
|
-
async list(
|
|
24
|
-
request?: operations.GetAllPromptsRequest | undefined,
|
|
25
|
-
options?: RequestOptions,
|
|
26
|
-
): Promise<operations.GetAllPromptsResponseBody> {
|
|
27
|
-
return unwrapAsync(promptsList(
|
|
28
|
-
this,
|
|
29
|
-
request,
|
|
30
|
-
options,
|
|
31
|
-
));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Create a prompt
|
|
36
|
-
*/
|
|
37
|
-
async create(
|
|
38
|
-
request?: operations.CreatePromptRequestBody | undefined,
|
|
39
|
-
options?: RequestOptions,
|
|
40
|
-
): Promise<operations.CreatePromptResponseBody> {
|
|
41
|
-
return unwrapAsync(promptsCreate(
|
|
42
|
-
this,
|
|
43
|
-
request,
|
|
44
|
-
options,
|
|
45
|
-
));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Retrieve a prompt
|
|
50
|
-
*
|
|
51
|
-
* @remarks
|
|
52
|
-
* Retrieves a prompt object
|
|
53
|
-
*/
|
|
54
|
-
async retrieve(
|
|
55
|
-
request: operations.GetOnePromptRequest,
|
|
56
|
-
options?: RequestOptions,
|
|
57
|
-
): Promise<operations.GetOnePromptResponseBody> {
|
|
58
|
-
return unwrapAsync(promptsRetrieve(
|
|
59
|
-
this,
|
|
60
|
-
request,
|
|
61
|
-
options,
|
|
62
|
-
));
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Update a prompt
|
|
67
|
-
*/
|
|
68
|
-
async update(
|
|
69
|
-
request: operations.UpdatePromptRequest,
|
|
70
|
-
options?: RequestOptions,
|
|
71
|
-
): Promise<operations.UpdatePromptResponseBody> {
|
|
72
|
-
return unwrapAsync(promptsUpdate(
|
|
73
|
-
this,
|
|
74
|
-
request,
|
|
75
|
-
options,
|
|
76
|
-
));
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Delete a prompt
|
|
81
|
-
*/
|
|
82
|
-
async delete(
|
|
83
|
-
request: operations.DeletePromptRequest,
|
|
84
|
-
options?: RequestOptions,
|
|
85
|
-
): Promise<void> {
|
|
86
|
-
return unwrapAsync(promptsDelete(
|
|
87
|
-
this,
|
|
88
|
-
request,
|
|
89
|
-
options,
|
|
90
|
-
));
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* List all prompt versions
|
|
95
|
-
*
|
|
96
|
-
* @remarks
|
|
97
|
-
* Returns a list of your prompt versions. The prompt versions are returned sorted by creation date, with the most recent prompt versions appearing first
|
|
98
|
-
*/
|
|
99
|
-
async listVersions(
|
|
100
|
-
request: operations.ListPromptVersionsRequest,
|
|
101
|
-
options?: RequestOptions,
|
|
102
|
-
): Promise<operations.ListPromptVersionsResponseBody> {
|
|
103
|
-
return unwrapAsync(promptsListVersions(
|
|
104
|
-
this,
|
|
105
|
-
request,
|
|
106
|
-
options,
|
|
107
|
-
));
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Retrieve a prompt version
|
|
112
|
-
*
|
|
113
|
-
* @remarks
|
|
114
|
-
* Retrieves a specific version of a prompt by its ID and version ID.
|
|
115
|
-
*/
|
|
116
|
-
async getVersion(
|
|
117
|
-
request: operations.GetPromptVersionRequest,
|
|
118
|
-
options?: RequestOptions,
|
|
119
|
-
): Promise<operations.GetPromptVersionResponseBody> {
|
|
120
|
-
return unwrapAsync(promptsGetVersion(
|
|
121
|
-
this,
|
|
122
|
-
request,
|
|
123
|
-
options,
|
|
124
|
-
));
|
|
125
|
-
}
|
|
126
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { remoteconfigsRetrieve } from "../funcs/remoteconfigsRetrieve.js";
|
|
6
|
-
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
-
import * as operations from "../models/operations/index.js";
|
|
8
|
-
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
-
|
|
10
|
-
export class Remoteconfigs extends ClientSDK {
|
|
11
|
-
/**
|
|
12
|
-
* Retrieve a remote config
|
|
13
|
-
*/
|
|
14
|
-
async retrieve(
|
|
15
|
-
request?: operations.RemoteConfigsGetConfigRequestBody | undefined,
|
|
16
|
-
options?: RequestOptions,
|
|
17
|
-
): Promise<operations.RemoteConfigsGetConfigResponseBody> {
|
|
18
|
-
return unwrapAsync(remoteconfigsRetrieve(
|
|
19
|
-
this,
|
|
20
|
-
request,
|
|
21
|
-
options,
|
|
22
|
-
));
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { ClientSDK } from "../lib/sdks.js";
|
|
6
|
-
import { Contacts } from "./contacts.js";
|
|
7
|
-
import { Deployments } from "./deployments.js";
|
|
8
|
-
import { Feedback } from "./feedback.js";
|
|
9
|
-
import { Files } from "./files.js";
|
|
10
|
-
import { Prompts } from "./prompts.js";
|
|
11
|
-
import { Remoteconfigs } from "./remoteconfigs.js";
|
|
12
|
-
|
|
13
|
-
export class Orq extends ClientSDK {
|
|
14
|
-
private _contacts?: Contacts;
|
|
15
|
-
get contacts(): Contacts {
|
|
16
|
-
return (this._contacts ??= new Contacts(this._options));
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
private _feedback?: Feedback;
|
|
20
|
-
get feedback(): Feedback {
|
|
21
|
-
return (this._feedback ??= new Feedback(this._options));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
private _deployments?: Deployments;
|
|
25
|
-
get deployments(): Deployments {
|
|
26
|
-
return (this._deployments ??= new Deployments(this._options));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
private _files?: Files;
|
|
30
|
-
get files(): Files {
|
|
31
|
-
return (this._files ??= new Files(this._options));
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
private _prompts?: Prompts;
|
|
35
|
-
get prompts(): Prompts {
|
|
36
|
-
return (this._prompts ??= new Prompts(this._options));
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
private _remoteconfigs?: Remoteconfigs;
|
|
40
|
-
get remoteconfigs(): Remoteconfigs {
|
|
41
|
-
return (this._remoteconfigs ??= new Remoteconfigs(this._options));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
|
|
7
|
-
export const blobLikeSchema: z.ZodType<Blob, z.ZodTypeDef, Blob> =
|
|
8
|
-
z.custom<Blob>(isBlobLike, {
|
|
9
|
-
message: "expected a Blob, File or Blob-like object",
|
|
10
|
-
fatal: true,
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
export function isBlobLike(val: unknown): val is Blob {
|
|
14
|
-
if (val instanceof Blob) {
|
|
15
|
-
return true;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const name = val[Symbol.toStringTag];
|
|
23
|
-
if (typeof name !== "string") {
|
|
24
|
-
return false;
|
|
25
|
-
}
|
|
26
|
-
if (name !== "Blob" && name !== "File") {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return "stream" in val && typeof val.stream === "function";
|
|
31
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
6
|
-
|
|
7
|
-
export function constDateTime(
|
|
8
|
-
val: string,
|
|
9
|
-
): z.ZodType<string, z.ZodTypeDef, unknown> {
|
|
10
|
-
return z.custom<string>((v) => {
|
|
11
|
-
return (
|
|
12
|
-
typeof v === "string" && new Date(v).getTime() === new Date(val).getTime()
|
|
13
|
-
);
|
|
14
|
-
}, `Value must be equivelant to ${val}`);
|
|
15
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
declare const __brand: unique symbol;
|
|
6
|
-
export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
|
|
7
|
-
|
|
8
|
-
export function catchUnrecognizedEnum<T>(value: T): Unrecognized<T> {
|
|
9
|
-
return value as Unrecognized<T>;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
type Prettify<T> = { [K in keyof T]: T[K] } & {};
|
|
13
|
-
export type ClosedEnum<T> = T[keyof T];
|
|
14
|
-
export type OpenEnum<T> =
|
|
15
|
-
| Prettify<T[keyof T]>
|
|
16
|
-
| Unrecognized<T[keyof T] extends number ? number : string>;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* A monad that captures the result of a function call or an error if it was not
|
|
7
|
-
* successful. Railway programming, enabled by this type, can be a nicer
|
|
8
|
-
* alternative to traditional exception throwing because it allows functions to
|
|
9
|
-
* declare all _known_ errors with static types and then check for them
|
|
10
|
-
* exhaustively in application code. Thrown exception have a type of `unknown`
|
|
11
|
-
* and break out of regular control flow of programs making them harder to
|
|
12
|
-
* inspect and more verbose work with due to try-catch blocks.
|
|
13
|
-
*/
|
|
14
|
-
export type Result<T, E = unknown> =
|
|
15
|
-
| { ok: true; value: T; error?: never }
|
|
16
|
-
| { ok: false; value?: never; error: E };
|
|
17
|
-
|
|
18
|
-
export function OK<V>(value: V): Result<V, never> {
|
|
19
|
-
return { ok: true, value };
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function ERR<E>(error: E): Result<never, E> {
|
|
23
|
-
return { ok: false, error };
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* unwrap is a convenience function for extracting a value from a result or
|
|
28
|
-
* throwing if there was an error.
|
|
29
|
-
*/
|
|
30
|
-
export function unwrap<T>(r: Result<T, unknown>): T {
|
|
31
|
-
if (!r.ok) {
|
|
32
|
-
throw r.error;
|
|
33
|
-
}
|
|
34
|
-
return r.value;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* unwrapAsync is a convenience function for resolving a value from a Promise
|
|
39
|
-
* of a result or rejecting if an error occurred.
|
|
40
|
-
*/
|
|
41
|
-
export async function unwrapAsync<T>(
|
|
42
|
-
pr: Promise<Result<T, unknown>>,
|
|
43
|
-
): Promise<T> {
|
|
44
|
-
const r = await pr;
|
|
45
|
-
if (!r.ok) {
|
|
46
|
-
throw r.error;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return r.value;
|
|
50
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export { blobLikeSchema, isBlobLike } from "./blobs.js";
|
|
6
|
-
export { catchUnrecognizedEnum } from "./enums.js";
|
|
7
|
-
export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js";
|
|
8
|
-
export type { Result } from "./fp.js";
|
|
9
|
-
export type { PageIterator, Paginator } from "./operations.js";
|
|
10
|
-
export { createPageIterator } from "./operations.js";
|
|
11
|
-
export { RFCDate } from "./rfcdate.js";
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { Result } from "./fp.js";
|
|
6
|
-
|
|
7
|
-
export type Paginator<V> = () => Promise<V & { next: Paginator<V> }> | null;
|
|
8
|
-
|
|
9
|
-
export type PageIterator<V, PageState = unknown> = V & {
|
|
10
|
-
next: Paginator<V>;
|
|
11
|
-
[Symbol.asyncIterator]: () => AsyncIterableIterator<V>;
|
|
12
|
-
"~next"?: PageState | undefined;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export function createPageIterator<V>(
|
|
16
|
-
page: V & { next: Paginator<V> },
|
|
17
|
-
halt: (v: V) => boolean,
|
|
18
|
-
): {
|
|
19
|
-
[Symbol.asyncIterator]: () => AsyncIterableIterator<V>;
|
|
20
|
-
} {
|
|
21
|
-
return {
|
|
22
|
-
[Symbol.asyncIterator]: async function* paginator() {
|
|
23
|
-
yield page;
|
|
24
|
-
if (halt(page)) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
let p: typeof page | null = page;
|
|
29
|
-
for (p = await p.next(); p != null; p = await p.next()) {
|
|
30
|
-
yield p;
|
|
31
|
-
if (halt(p)) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* This utility create a special iterator that yields a single value and
|
|
41
|
-
* terminates. It is useful in paginated SDK functions that have early return
|
|
42
|
-
* paths when things go wrong.
|
|
43
|
-
*/
|
|
44
|
-
export function haltIterator<V extends object>(
|
|
45
|
-
v: V,
|
|
46
|
-
): PageIterator<V, undefined> {
|
|
47
|
-
return {
|
|
48
|
-
...v,
|
|
49
|
-
next: () => null,
|
|
50
|
-
[Symbol.asyncIterator]: async function* paginator() {
|
|
51
|
-
yield v;
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Converts an async iterator of `Result<V, E>` into an async iterator of `V`.
|
|
58
|
-
* When error results occur, the underlying error value is thrown.
|
|
59
|
-
*/
|
|
60
|
-
export async function unwrapResultIterator<V, PageState>(
|
|
61
|
-
iteratorPromise: Promise<PageIterator<Result<V, unknown>, PageState>>,
|
|
62
|
-
): Promise<PageIterator<V, PageState>> {
|
|
63
|
-
const resultIter = await iteratorPromise;
|
|
64
|
-
|
|
65
|
-
if (!resultIter.ok) {
|
|
66
|
-
throw resultIter.error;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return {
|
|
70
|
-
...resultIter.value,
|
|
71
|
-
next: unwrapPaginator(resultIter.next),
|
|
72
|
-
"~next": resultIter["~next"],
|
|
73
|
-
[Symbol.asyncIterator]: async function* paginator() {
|
|
74
|
-
for await (const page of resultIter) {
|
|
75
|
-
if (!page.ok) {
|
|
76
|
-
throw page.error;
|
|
77
|
-
}
|
|
78
|
-
yield page.value;
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function unwrapPaginator<V>(
|
|
85
|
-
paginator: Paginator<Result<V, unknown>>,
|
|
86
|
-
): Paginator<V> {
|
|
87
|
-
return () => {
|
|
88
|
-
const nextResult = paginator();
|
|
89
|
-
if (nextResult == null) {
|
|
90
|
-
return null;
|
|
91
|
-
}
|
|
92
|
-
return nextResult.then((res) => {
|
|
93
|
-
if (!res.ok) {
|
|
94
|
-
throw res.error;
|
|
95
|
-
}
|
|
96
|
-
const out = {
|
|
97
|
-
...res.value,
|
|
98
|
-
next: unwrapPaginator(res.next),
|
|
99
|
-
};
|
|
100
|
-
return out;
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export const URL_OVERRIDE = Symbol("URL_OVERRIDE");
|