@orq-ai/node 3.1.2 → 3.1.4
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 +27 -42
- package/docs/sdks/deployments/README.md +86 -9
- package/docs/sdks/files/README.md +10 -182
- package/docs/sdks/orq/README.md +1 -1
- package/docs/sdks/prompts/README.md +135 -128
- package/docs/sdks/{remoteconfig → remoteconfigs}/README.md +8 -8
- package/funcs/deploymentsInvoke.d.ts +1 -7
- package/funcs/deploymentsInvoke.d.ts.map +1 -1
- package/funcs/deploymentsInvoke.js +10 -11
- 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} +5 -4
- package/funcs/deploymentsList.js.map +1 -0
- package/funcs/deploymentsStream.d.ts +16 -0
- package/funcs/deploymentsStream.d.ts.map +1 -0
- package/funcs/deploymentsStream.js +125 -0
- package/funcs/deploymentsStream.js.map +1 -0
- package/funcs/{filesUpload.d.ts → filesCreate.d.ts} +3 -3
- package/funcs/{filesUpload.d.ts.map → filesCreate.d.ts.map} +1 -1
- package/funcs/{filesUpload.js → filesCreate.js} +4 -4
- package/funcs/{filesUpload.js.map → filesCreate.js.map} +1 -1
- package/funcs/filesGet.d.ts +4 -1
- package/funcs/filesGet.d.ts.map +1 -1
- package/funcs/filesGet.js +4 -1
- package/funcs/filesGet.js.map +1 -1
- package/funcs/filesList.d.ts +3 -0
- package/funcs/filesList.d.ts.map +1 -1
- package/funcs/filesList.js +5 -3
- package/funcs/filesList.js.map +1 -1
- package/funcs/promptsCreate.d.ts +1 -1
- package/funcs/promptsCreate.js +2 -2
- package/funcs/promptsCreate.js.map +1 -1
- package/funcs/promptsDelete.js +1 -1
- package/funcs/promptsDelete.js.map +1 -1
- package/funcs/promptsGetVersion.d.ts +16 -0
- package/funcs/promptsGetVersion.d.ts.map +1 -0
- package/funcs/{promptsCreateVersion.js → promptsGetVersion.js} +23 -13
- package/funcs/promptsGetVersion.js.map +1 -0
- package/funcs/promptsList.d.ts +15 -0
- package/funcs/promptsList.d.ts.map +1 -0
- package/funcs/{promptsGetAll.js → promptsList.js} +17 -11
- package/funcs/promptsList.js.map +1 -0
- package/funcs/promptsListVersions.d.ts +15 -0
- package/funcs/promptsListVersions.d.ts.map +1 -0
- package/funcs/{promptsDuplicate.js → promptsListVersions.js} +19 -11
- package/funcs/promptsListVersions.js.map +1 -0
- package/funcs/{promptSnippetsFindOne.d.ts → promptsRetrieve.d.ts} +6 -3
- package/funcs/promptsRetrieve.d.ts.map +1 -0
- package/funcs/{promptsGetOne.js → promptsRetrieve.js} +10 -8
- package/funcs/promptsRetrieve.js.map +1 -0
- package/funcs/promptsUpdate.js +1 -1
- package/funcs/promptsUpdate.js.map +1 -1
- package/funcs/{remoteconfigGetConfig.d.ts → remoteconfigsRetrieve.d.ts} +3 -3
- package/funcs/{remoteconfigGetConfig.d.ts.map → remoteconfigsRetrieve.d.ts.map} +1 -1
- package/funcs/{remoteconfigGetConfig.js → remoteconfigsRetrieve.js} +4 -4
- package/funcs/{remoteconfigGetConfig.js.map → remoteconfigsRetrieve.js.map} +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +10 -2
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +2 -2
- package/lib/config.js.map +1 -1
- package/lib/env.d.ts +13 -0
- package/lib/env.d.ts.map +1 -1
- package/lib/env.js +17 -0
- package/lib/env.js.map +1 -1
- package/lib/sdks.js +1 -1
- package/lib/sdks.js.map +1 -1
- package/models/components/deployments.d.ts +0 -5
- package/models/components/deployments.d.ts.map +1 -1
- package/models/components/deployments.js +0 -2
- package/models/components/deployments.js.map +1 -1
- package/models/errors/getpromptversion.d.ts +36 -0
- package/models/errors/getpromptversion.d.ts.map +1 -0
- package/models/{operations/duplicateprompt.js → errors/getpromptversion.js} +33 -23
- package/models/errors/getpromptversion.js.map +1 -0
- package/models/errors/index.d.ts +1 -0
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +1 -0
- package/models/errors/index.js.map +1 -1
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createprompt.d.ts +406 -85
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +241 -78
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/deleteprompt.d.ts +1 -1
- package/models/operations/deploymentgetconfig.d.ts +39 -0
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +29 -4
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deploymentinvoke.d.ts +23 -683
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +23 -614
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +54 -8
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +44 -13
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/deploymentstream.d.ts +1622 -0
- package/models/operations/deploymentstream.d.ts.map +1 -0
- package/models/operations/deploymentstream.js +1571 -0
- package/models/operations/deploymentstream.js.map +1 -0
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.d.ts +14 -11
- package/models/operations/filelist.d.ts.map +1 -1
- package/models/operations/filelist.js +18 -18
- package/models/operations/filelist.js.map +1 -1
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getallprompts.d.ts +565 -9945
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +556 -8804
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getoneprompt.d.ts +1203 -1
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +1011 -1
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +1228 -0
- package/models/operations/getpromptversion.d.ts.map +1 -0
- package/models/operations/getpromptversion.js +1080 -0
- package/models/operations/getpromptversion.js.map +1 -0
- package/models/operations/index.d.ts +3 -6
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +3 -6
- package/models/operations/index.js.map +1 -1
- package/models/operations/listpromptversions.d.ts +1286 -0
- package/models/operations/listpromptversions.d.ts.map +1 -0
- package/models/operations/listpromptversions.js +1142 -0
- package/models/operations/listpromptversions.js.map +1 -0
- package/models/operations/updateprompt.d.ts +1123 -5981
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +1145 -5755
- package/models/operations/updateprompt.js.map +1 -1
- package/package.json +1 -1
- package/sdk/deployments.d.ts +10 -6
- package/sdk/deployments.d.ts.map +1 -1
- package/sdk/deployments.js +14 -6
- package/sdk/deployments.js.map +1 -1
- package/sdk/files.d.ts +9 -14
- package/sdk/files.d.ts.map +1 -1
- package/sdk/files.js +11 -22
- package/sdk/files.js.map +1 -1
- package/sdk/prompts.d.ts +26 -14
- package/sdk/prompts.d.ts.map +1 -1
- package/sdk/prompts.js +37 -25
- package/sdk/prompts.js.map +1 -1
- package/sdk/remoteconfigs.d.ts +9 -0
- package/sdk/remoteconfigs.d.ts.map +1 -0
- package/sdk/remoteconfigs.js +19 -0
- package/sdk/remoteconfigs.js.map +1 -0
- package/sdk/sdk.d.ts +3 -6
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +3 -7
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/deploymentsInvoke.ts +21 -16
- package/src/funcs/{deploymentsAll.ts → deploymentsList.ts} +3 -2
- package/src/funcs/{promptsCreateVersion.ts → deploymentsStream.ts} +37 -18
- package/src/funcs/{filesUpload.ts → filesCreate.ts} +2 -2
- package/src/funcs/filesGet.ts +4 -1
- package/src/funcs/filesList.ts +5 -3
- package/src/funcs/promptsCreate.ts +2 -2
- package/src/funcs/promptsDelete.ts +1 -1
- package/src/funcs/{promptSnippetsFindOne.ts → promptsGetVersion.ts} +30 -14
- package/src/funcs/{promptsGetAll.ts → promptsList.ts} +18 -13
- package/src/funcs/{promptsDuplicate.ts → promptsListVersions.ts} +22 -13
- package/src/funcs/{promptsGetOne.ts → promptsRetrieve.ts} +10 -8
- package/src/funcs/promptsUpdate.ts +1 -1
- package/src/funcs/{remoteconfigGetConfig.ts → remoteconfigsRetrieve.ts} +2 -2
- package/src/lib/config.ts +12 -2
- package/src/lib/env.ts +32 -0
- package/src/lib/sdks.ts +2 -2
- package/src/models/components/deployments.ts +0 -7
- package/src/models/errors/getpromptversion.ts +71 -0
- package/src/models/errors/index.ts +1 -0
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createprompt.ts +380 -124
- package/src/models/operations/deleteprompt.ts +1 -1
- package/src/models/operations/deploymentgetconfig.ts +44 -0
- package/src/models/operations/deploymentinvoke.ts +182 -1423
- package/src/models/operations/deployments.ts +68 -18
- package/src/models/operations/deploymentstream.ts +3062 -0
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +32 -29
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getallprompts.ts +1316 -17840
- package/src/models/operations/getoneprompt.ts +1914 -1
- package/src/models/operations/getpromptversion.ts +2012 -0
- package/src/models/operations/index.ts +3 -6
- package/src/models/operations/listpromptversions.ts +2146 -0
- package/src/models/operations/updateprompt.ts +2001 -12508
- package/src/sdk/deployments.ts +25 -11
- package/src/sdk/files.ts +11 -38
- package/src/sdk/prompts.ts +51 -39
- package/src/sdk/{remoteconfig.ts → remoteconfigs.ts} +5 -5
- package/src/sdk/sdk.ts +4 -10
- package/docs/sdks/prompt/README.md +0 -6
- package/docs/sdks/snippets/README.md +0 -84
- package/docs/sdks/templates/README.md +0 -80
- package/funcs/deploymentsAll.d.ts.map +0 -1
- package/funcs/deploymentsAll.js.map +0 -1
- package/funcs/filesBulkUpload.d.ts +0 -15
- package/funcs/filesBulkUpload.d.ts.map +0 -1
- package/funcs/filesBulkUpload.js +0 -109
- package/funcs/filesBulkUpload.js.map +0 -1
- package/funcs/filesUpdate.d.ts +0 -12
- package/funcs/filesUpdate.d.ts.map +0 -1
- package/funcs/filesUpdate.js +0 -110
- package/funcs/filesUpdate.js.map +0 -1
- package/funcs/promptSnippetsFindOne.d.ts.map +0 -1
- package/funcs/promptSnippetsFindOne.js +0 -109
- package/funcs/promptSnippetsFindOne.js.map +0 -1
- package/funcs/promptTemplatesGetAll.d.ts +0 -12
- package/funcs/promptTemplatesGetAll.d.ts.map +0 -1
- package/funcs/promptTemplatesGetAll.js +0 -109
- package/funcs/promptTemplatesGetAll.js.map +0 -1
- package/funcs/promptsCreateVersion.d.ts +0 -12
- package/funcs/promptsCreateVersion.d.ts.map +0 -1
- package/funcs/promptsCreateVersion.js.map +0 -1
- package/funcs/promptsDuplicate.d.ts +0 -12
- package/funcs/promptsDuplicate.d.ts.map +0 -1
- package/funcs/promptsDuplicate.js.map +0 -1
- package/funcs/promptsGetAll.d.ts +0 -12
- package/funcs/promptsGetAll.d.ts.map +0 -1
- package/funcs/promptsGetAll.js.map +0 -1
- package/funcs/promptsGetOne.d.ts +0 -12
- package/funcs/promptsGetOne.d.ts.map +0 -1
- package/funcs/promptsGetOne.js.map +0 -1
- package/models/operations/bulkfileupload.d.ts +0 -173
- package/models/operations/bulkfileupload.d.ts.map +0 -1
- package/models/operations/bulkfileupload.js +0 -210
- package/models/operations/bulkfileupload.js.map +0 -1
- package/models/operations/createpromptversion.d.ts +0 -2003
- package/models/operations/createpromptversion.d.ts.map +0 -1
- package/models/operations/createpromptversion.js +0 -1852
- package/models/operations/createpromptversion.js.map +0 -1
- package/models/operations/duplicateprompt.d.ts +0 -32
- package/models/operations/duplicateprompt.d.ts.map +0 -1
- package/models/operations/duplicateprompt.js.map +0 -1
- package/models/operations/fileupdate.d.ts +0 -143
- package/models/operations/fileupdate.d.ts.map +0 -1
- package/models/operations/fileupdate.js +0 -193
- package/models/operations/fileupdate.js.map +0 -1
- package/models/operations/findonepromptsnippet.d.ts +0 -6278
- package/models/operations/findonepromptsnippet.d.ts.map +0 -1
- package/models/operations/findonepromptsnippet.js +0 -5891
- package/models/operations/findonepromptsnippet.js.map +0 -1
- package/models/operations/getallprompttemplates.d.ts +0 -6607
- package/models/operations/getallprompttemplates.d.ts.map +0 -1
- package/models/operations/getallprompttemplates.js +0 -6225
- package/models/operations/getallprompttemplates.js.map +0 -1
- package/sdk/prompt.d.ts +0 -10
- package/sdk/prompt.d.ts.map +0 -1
- package/sdk/prompt.js +0 -19
- package/sdk/prompt.js.map +0 -1
- package/sdk/remoteconfig.d.ts +0 -9
- package/sdk/remoteconfig.d.ts.map +0 -1
- package/sdk/remoteconfig.js +0 -19
- package/sdk/remoteconfig.js.map +0 -1
- package/sdk/snippets.d.ts +0 -9
- package/sdk/snippets.d.ts.map +0 -1
- package/sdk/snippets.js +0 -19
- package/sdk/snippets.js.map +0 -1
- package/sdk/templates.d.ts +0 -9
- package/sdk/templates.d.ts.map +0 -1
- package/sdk/templates.js +0 -19
- package/sdk/templates.js.map +0 -1
- package/src/funcs/filesBulkUpload.ts +0 -129
- package/src/funcs/filesUpdate.ts +0 -130
- package/src/funcs/promptTemplatesGetAll.ts +0 -132
- package/src/models/operations/bulkfileupload.ts +0 -315
- package/src/models/operations/createpromptversion.ts +0 -3703
- package/src/models/operations/duplicateprompt.ts +0 -69
- package/src/models/operations/fileupdate.ts +0 -298
- package/src/models/operations/findonepromptsnippet.ts +0 -13629
- package/src/models/operations/getallprompttemplates.ts +0 -13690
- package/src/sdk/prompt.ts +0 -19
- package/src/sdk/snippets.ts +0 -24
- package/src/sdk/templates.ts +0 -24
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import * as z from "zod";
|
|
5
6
|
import { OrqCore } from "../core.js";
|
|
6
7
|
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
8
|
+
import { EventStream } from "../lib/event-streams.js";
|
|
7
9
|
import * as M from "../lib/matchers.js";
|
|
8
10
|
import { compactMap } from "../lib/primitives.js";
|
|
9
11
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -23,15 +25,18 @@ import * as operations from "../models/operations/index.js";
|
|
|
23
25
|
import { Result } from "../types/fp.js";
|
|
24
26
|
|
|
25
27
|
/**
|
|
26
|
-
*
|
|
28
|
+
* Stream
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* Stream deployment generation. Only supported for completions and chat completions.
|
|
27
32
|
*/
|
|
28
|
-
export async function
|
|
33
|
+
export async function deploymentsStream(
|
|
29
34
|
client: OrqCore,
|
|
30
|
-
request: operations.
|
|
35
|
+
request: operations.DeploymentStreamRequestBody,
|
|
31
36
|
options?: RequestOptions,
|
|
32
37
|
): Promise<
|
|
33
38
|
Result<
|
|
34
|
-
operations.
|
|
39
|
+
EventStream<operations.DeploymentStreamResponseBody>,
|
|
35
40
|
| APIError
|
|
36
41
|
| SDKValidationError
|
|
37
42
|
| UnexpectedClientError
|
|
@@ -44,27 +49,28 @@ export async function promptsCreateVersion(
|
|
|
44
49
|
const parsed = safeParse(
|
|
45
50
|
request,
|
|
46
51
|
(value) =>
|
|
47
|
-
operations.
|
|
52
|
+
operations.DeploymentStreamRequestBody$outboundSchema.parse(value),
|
|
48
53
|
"Input validation failed",
|
|
49
54
|
);
|
|
50
55
|
if (!parsed.ok) {
|
|
51
56
|
return parsed;
|
|
52
57
|
}
|
|
53
58
|
const payload = parsed.value;
|
|
54
|
-
const body = encodeJSON("body", payload
|
|
59
|
+
const body = encodeJSON("body", payload, { explode: true });
|
|
55
60
|
|
|
56
|
-
const
|
|
57
|
-
id: encodeSimple("id", payload.id, {
|
|
58
|
-
explode: false,
|
|
59
|
-
charEncoding: "percent",
|
|
60
|
-
}),
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const path = pathToFunc("/v2/resources/prompts/{id}/versions")(pathParams);
|
|
61
|
+
const path = pathToFunc("/v2/deployments/stream")();
|
|
64
62
|
|
|
65
63
|
const headers = new Headers(compactMap({
|
|
66
64
|
"Content-Type": "application/json",
|
|
67
|
-
Accept: "
|
|
65
|
+
Accept: "text/event-stream",
|
|
66
|
+
"contactId": encodeSimple("contactId", client._options.contactId, {
|
|
67
|
+
explode: false,
|
|
68
|
+
charEncoding: "none",
|
|
69
|
+
}),
|
|
70
|
+
"environment": encodeSimple("environment", client._options.environment, {
|
|
71
|
+
explode: false,
|
|
72
|
+
charEncoding: "none",
|
|
73
|
+
}),
|
|
68
74
|
}));
|
|
69
75
|
|
|
70
76
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
@@ -72,7 +78,7 @@ export async function promptsCreateVersion(
|
|
|
72
78
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
73
79
|
|
|
74
80
|
const context = {
|
|
75
|
-
operationID: "
|
|
81
|
+
operationID: "DeploymentStream",
|
|
76
82
|
oAuth2Scopes: [],
|
|
77
83
|
|
|
78
84
|
resolvedSecurity: requestSecurity,
|
|
@@ -110,7 +116,7 @@ export async function promptsCreateVersion(
|
|
|
110
116
|
const response = doResult.value;
|
|
111
117
|
|
|
112
118
|
const [result] = await M.match<
|
|
113
|
-
operations.
|
|
119
|
+
EventStream<operations.DeploymentStreamResponseBody>,
|
|
114
120
|
| APIError
|
|
115
121
|
| SDKValidationError
|
|
116
122
|
| UnexpectedClientError
|
|
@@ -119,7 +125,20 @@ export async function promptsCreateVersion(
|
|
|
119
125
|
| RequestTimeoutError
|
|
120
126
|
| ConnectionError
|
|
121
127
|
>(
|
|
122
|
-
M.
|
|
128
|
+
M.sse(
|
|
129
|
+
200,
|
|
130
|
+
z.instanceof(ReadableStream<Uint8Array>).transform(stream => {
|
|
131
|
+
return new EventStream({
|
|
132
|
+
stream,
|
|
133
|
+
decoder(rawEvent) {
|
|
134
|
+
const schema =
|
|
135
|
+
operations.DeploymentStreamResponseBody$inboundSchema;
|
|
136
|
+
return schema.parse(rawEvent);
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
}),
|
|
140
|
+
{ sseSentinel: "[DONE]" },
|
|
141
|
+
),
|
|
123
142
|
M.fail("4XX"),
|
|
124
143
|
M.fail("5XX"),
|
|
125
144
|
)(response);
|
|
@@ -26,12 +26,12 @@ import { Result } from "../types/fp.js";
|
|
|
26
26
|
import { isReadableStream } from "../types/streams.js";
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Create file
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
32
|
* Files are used to upload documents that can be used with features like [Deployments](https://docs.orq.ai/reference/post_v2-deployments-get-config).
|
|
33
33
|
*/
|
|
34
|
-
export async function
|
|
34
|
+
export async function filesCreate(
|
|
35
35
|
client: OrqCore,
|
|
36
36
|
request?: operations.FileUploadRequestBody | undefined,
|
|
37
37
|
options?: RequestOptions,
|
package/src/funcs/filesGet.ts
CHANGED
|
@@ -23,7 +23,10 @@ import * as operations from "../models/operations/index.js";
|
|
|
23
23
|
import { Result } from "../types/fp.js";
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Retrieve a file
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Retrieves the details of an existing file object. After you supply a unique file ID, orq.ai returns the corresponding file object
|
|
27
30
|
*/
|
|
28
31
|
export async function filesGet(
|
|
29
32
|
client: OrqCore,
|
package/src/funcs/filesList.ts
CHANGED
|
@@ -24,6 +24,9 @@ import { Result } from "../types/fp.js";
|
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* List all files
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* 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.
|
|
27
30
|
*/
|
|
28
31
|
export async function filesList(
|
|
29
32
|
client: OrqCore,
|
|
@@ -56,10 +59,9 @@ export async function filesList(
|
|
|
56
59
|
const path = pathToFunc("/v2/files")();
|
|
57
60
|
|
|
58
61
|
const query = encodeFormQuery({
|
|
59
|
-
"
|
|
60
|
-
"lastId": payload?.lastId,
|
|
62
|
+
"ending_before": payload?.ending_before,
|
|
61
63
|
"limit": payload?.limit,
|
|
62
|
-
"
|
|
64
|
+
"starting_after": payload?.starting_after,
|
|
63
65
|
});
|
|
64
66
|
|
|
65
67
|
const headers = new Headers(compactMap({
|
|
@@ -23,7 +23,7 @@ import * as operations from "../models/operations/index.js";
|
|
|
23
23
|
import { Result } from "../types/fp.js";
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
* Create a
|
|
26
|
+
* Create a prompt
|
|
27
27
|
*/
|
|
28
28
|
export async function promptsCreate(
|
|
29
29
|
client: OrqCore,
|
|
@@ -55,7 +55,7 @@ export async function promptsCreate(
|
|
|
55
55
|
? null
|
|
56
56
|
: encodeJSON("body", payload, { explode: true });
|
|
57
57
|
|
|
58
|
-
const path = pathToFunc("/v2/
|
|
58
|
+
const path = pathToFunc("/v2/prompts")();
|
|
59
59
|
|
|
60
60
|
const headers = new Headers(compactMap({
|
|
61
61
|
"Content-Type": "application/json",
|
|
@@ -18,20 +18,25 @@ import {
|
|
|
18
18
|
RequestTimeoutError,
|
|
19
19
|
UnexpectedClientError,
|
|
20
20
|
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import * as errors from "../models/errors/index.js";
|
|
21
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
23
|
import * as operations from "../models/operations/index.js";
|
|
23
24
|
import { Result } from "../types/fp.js";
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
|
-
*
|
|
27
|
+
* Retrieve a prompt version
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Retrieves a specific version of a prompt by its ID and version ID.
|
|
27
31
|
*/
|
|
28
|
-
export async function
|
|
32
|
+
export async function promptsGetVersion(
|
|
29
33
|
client: OrqCore,
|
|
30
|
-
request: operations.
|
|
34
|
+
request: operations.GetPromptVersionRequest,
|
|
31
35
|
options?: RequestOptions,
|
|
32
36
|
): Promise<
|
|
33
37
|
Result<
|
|
34
|
-
operations.
|
|
38
|
+
operations.GetPromptVersionResponseBody,
|
|
39
|
+
| errors.GetPromptVersionResponseBody
|
|
35
40
|
| APIError
|
|
36
41
|
| SDKValidationError
|
|
37
42
|
| UnexpectedClientError
|
|
@@ -43,8 +48,7 @@ export async function promptSnippetsFindOne(
|
|
|
43
48
|
> {
|
|
44
49
|
const parsed = safeParse(
|
|
45
50
|
request,
|
|
46
|
-
(value) =>
|
|
47
|
-
operations.FindOnePromptSnippetRequest$outboundSchema.parse(value),
|
|
51
|
+
(value) => operations.GetPromptVersionRequest$outboundSchema.parse(value),
|
|
48
52
|
"Input validation failed",
|
|
49
53
|
);
|
|
50
54
|
if (!parsed.ok) {
|
|
@@ -54,13 +58,19 @@ export async function promptSnippetsFindOne(
|
|
|
54
58
|
const body = null;
|
|
55
59
|
|
|
56
60
|
const pathParams = {
|
|
57
|
-
|
|
61
|
+
prompt_id: encodeSimple("prompt_id", payload.prompt_id, {
|
|
62
|
+
explode: false,
|
|
63
|
+
charEncoding: "percent",
|
|
64
|
+
}),
|
|
65
|
+
version_id: encodeSimple("version_id", payload.version_id, {
|
|
58
66
|
explode: false,
|
|
59
67
|
charEncoding: "percent",
|
|
60
68
|
}),
|
|
61
69
|
};
|
|
62
70
|
|
|
63
|
-
const path = pathToFunc("/v2/
|
|
71
|
+
const path = pathToFunc("/v2/prompts/{prompt_id}/versions/{version_id}")(
|
|
72
|
+
pathParams,
|
|
73
|
+
);
|
|
64
74
|
|
|
65
75
|
const headers = new Headers(compactMap({
|
|
66
76
|
Accept: "application/json",
|
|
@@ -71,7 +81,7 @@ export async function promptSnippetsFindOne(
|
|
|
71
81
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
72
82
|
|
|
73
83
|
const context = {
|
|
74
|
-
operationID: "
|
|
84
|
+
operationID: "GetPromptVersion",
|
|
75
85
|
oAuth2Scopes: [],
|
|
76
86
|
|
|
77
87
|
resolvedSecurity: requestSecurity,
|
|
@@ -99,7 +109,7 @@ export async function promptSnippetsFindOne(
|
|
|
99
109
|
|
|
100
110
|
const doResult = await client._do(req, {
|
|
101
111
|
context,
|
|
102
|
-
errorCodes: ["
|
|
112
|
+
errorCodes: ["404", "4XX", "5XX"],
|
|
103
113
|
retryConfig: context.retryConfig,
|
|
104
114
|
retryCodes: context.retryCodes,
|
|
105
115
|
});
|
|
@@ -108,8 +118,13 @@ export async function promptSnippetsFindOne(
|
|
|
108
118
|
}
|
|
109
119
|
const response = doResult.value;
|
|
110
120
|
|
|
121
|
+
const responseFields = {
|
|
122
|
+
HttpMeta: { Response: response, Request: req },
|
|
123
|
+
};
|
|
124
|
+
|
|
111
125
|
const [result] = await M.match<
|
|
112
|
-
operations.
|
|
126
|
+
operations.GetPromptVersionResponseBody,
|
|
127
|
+
| errors.GetPromptVersionResponseBody
|
|
113
128
|
| APIError
|
|
114
129
|
| SDKValidationError
|
|
115
130
|
| UnexpectedClientError
|
|
@@ -118,10 +133,11 @@ export async function promptSnippetsFindOne(
|
|
|
118
133
|
| RequestTimeoutError
|
|
119
134
|
| ConnectionError
|
|
120
135
|
>(
|
|
121
|
-
M.json(200, operations.
|
|
122
|
-
M.
|
|
136
|
+
M.json(200, operations.GetPromptVersionResponseBody$inboundSchema),
|
|
137
|
+
M.jsonErr(404, errors.GetPromptVersionResponseBody$inboundSchema),
|
|
138
|
+
M.fail("4XX"),
|
|
123
139
|
M.fail("5XX"),
|
|
124
|
-
)(response);
|
|
140
|
+
)(response, { extraFields: responseFields });
|
|
125
141
|
if (!result.ok) {
|
|
126
142
|
return result;
|
|
127
143
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { OrqCore } from "../core.js";
|
|
6
|
-
import {
|
|
6
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -23,11 +23,14 @@ import * as operations from "../models/operations/index.js";
|
|
|
23
23
|
import { Result } from "../types/fp.js";
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* List all prompts
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Returns a list of your prompts. The prompts are returned sorted by creation date, with the most recent prompts appearing first
|
|
27
30
|
*/
|
|
28
|
-
export async function
|
|
31
|
+
export async function promptsList(
|
|
29
32
|
client: OrqCore,
|
|
30
|
-
request?: operations.
|
|
33
|
+
request?: operations.GetAllPromptsRequest | undefined,
|
|
31
34
|
options?: RequestOptions,
|
|
32
35
|
): Promise<
|
|
33
36
|
Result<
|
|
@@ -44,23 +47,24 @@ export async function promptsGetAll(
|
|
|
44
47
|
const parsed = safeParse(
|
|
45
48
|
request,
|
|
46
49
|
(value) =>
|
|
47
|
-
operations.
|
|
48
|
-
value,
|
|
49
|
-
),
|
|
50
|
+
operations.GetAllPromptsRequest$outboundSchema.optional().parse(value),
|
|
50
51
|
"Input validation failed",
|
|
51
52
|
);
|
|
52
53
|
if (!parsed.ok) {
|
|
53
54
|
return parsed;
|
|
54
55
|
}
|
|
55
56
|
const payload = parsed.value;
|
|
56
|
-
const body =
|
|
57
|
-
? null
|
|
58
|
-
: encodeJSON("body", payload, { explode: true });
|
|
57
|
+
const body = null;
|
|
59
58
|
|
|
60
|
-
const path = pathToFunc("/v2/
|
|
59
|
+
const path = pathToFunc("/v2/prompts")();
|
|
60
|
+
|
|
61
|
+
const query = encodeFormQuery({
|
|
62
|
+
"ending_before": payload?.ending_before,
|
|
63
|
+
"limit": payload?.limit,
|
|
64
|
+
"starting_after": payload?.starting_after,
|
|
65
|
+
});
|
|
61
66
|
|
|
62
67
|
const headers = new Headers(compactMap({
|
|
63
|
-
"Content-Type": "application/json",
|
|
64
68
|
Accept: "application/json",
|
|
65
69
|
}));
|
|
66
70
|
|
|
@@ -83,10 +87,11 @@ export async function promptsGetAll(
|
|
|
83
87
|
|
|
84
88
|
const requestRes = client._createRequest(context, {
|
|
85
89
|
security: requestSecurity,
|
|
86
|
-
method: "
|
|
90
|
+
method: "GET",
|
|
87
91
|
baseURL: options?.serverURL,
|
|
88
92
|
path: path,
|
|
89
93
|
headers: headers,
|
|
94
|
+
query: query,
|
|
90
95
|
body: body,
|
|
91
96
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
92
97
|
}, options);
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as z from "zod";
|
|
6
5
|
import { OrqCore } from "../core.js";
|
|
7
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
8
7
|
import * as M from "../lib/matchers.js";
|
|
9
8
|
import { compactMap } from "../lib/primitives.js";
|
|
10
9
|
import { safeParse } from "../lib/schemas.js";
|
|
@@ -24,15 +23,18 @@ import * as operations from "../models/operations/index.js";
|
|
|
24
23
|
import { Result } from "../types/fp.js";
|
|
25
24
|
|
|
26
25
|
/**
|
|
27
|
-
*
|
|
26
|
+
* List all prompt versions
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Returns a list of your prompt versions. The prompt versions are returned sorted by creation date, with the most recent prompt versions appearing first
|
|
28
30
|
*/
|
|
29
|
-
export async function
|
|
31
|
+
export async function promptsListVersions(
|
|
30
32
|
client: OrqCore,
|
|
31
|
-
request: operations.
|
|
33
|
+
request: operations.ListPromptVersionsRequest,
|
|
32
34
|
options?: RequestOptions,
|
|
33
35
|
): Promise<
|
|
34
36
|
Result<
|
|
35
|
-
|
|
37
|
+
operations.ListPromptVersionsResponseBody,
|
|
36
38
|
| APIError
|
|
37
39
|
| SDKValidationError
|
|
38
40
|
| UnexpectedClientError
|
|
@@ -44,7 +46,7 @@ export async function promptsDuplicate(
|
|
|
44
46
|
> {
|
|
45
47
|
const parsed = safeParse(
|
|
46
48
|
request,
|
|
47
|
-
(value) => operations.
|
|
49
|
+
(value) => operations.ListPromptVersionsRequest$outboundSchema.parse(value),
|
|
48
50
|
"Input validation failed",
|
|
49
51
|
);
|
|
50
52
|
if (!parsed.ok) {
|
|
@@ -54,16 +56,22 @@ export async function promptsDuplicate(
|
|
|
54
56
|
const body = null;
|
|
55
57
|
|
|
56
58
|
const pathParams = {
|
|
57
|
-
|
|
59
|
+
prompt_id: encodeSimple("prompt_id", payload.prompt_id, {
|
|
58
60
|
explode: false,
|
|
59
61
|
charEncoding: "percent",
|
|
60
62
|
}),
|
|
61
63
|
};
|
|
62
64
|
|
|
63
|
-
const path = pathToFunc("/v2/
|
|
65
|
+
const path = pathToFunc("/v2/prompts/{prompt_id}/versions")(pathParams);
|
|
66
|
+
|
|
67
|
+
const query = encodeFormQuery({
|
|
68
|
+
"ending_before": payload.ending_before,
|
|
69
|
+
"limit": payload.limit,
|
|
70
|
+
"starting_after": payload.starting_after,
|
|
71
|
+
});
|
|
64
72
|
|
|
65
73
|
const headers = new Headers(compactMap({
|
|
66
|
-
Accept: "
|
|
74
|
+
Accept: "application/json",
|
|
67
75
|
}));
|
|
68
76
|
|
|
69
77
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
@@ -71,7 +79,7 @@ export async function promptsDuplicate(
|
|
|
71
79
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
72
80
|
|
|
73
81
|
const context = {
|
|
74
|
-
operationID: "
|
|
82
|
+
operationID: "ListPromptVersions",
|
|
75
83
|
oAuth2Scopes: [],
|
|
76
84
|
|
|
77
85
|
resolvedSecurity: requestSecurity,
|
|
@@ -89,6 +97,7 @@ export async function promptsDuplicate(
|
|
|
89
97
|
baseURL: options?.serverURL,
|
|
90
98
|
path: path,
|
|
91
99
|
headers: headers,
|
|
100
|
+
query: query,
|
|
92
101
|
body: body,
|
|
93
102
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
94
103
|
}, options);
|
|
@@ -109,7 +118,7 @@ export async function promptsDuplicate(
|
|
|
109
118
|
const response = doResult.value;
|
|
110
119
|
|
|
111
120
|
const [result] = await M.match<
|
|
112
|
-
|
|
121
|
+
operations.ListPromptVersionsResponseBody,
|
|
113
122
|
| APIError
|
|
114
123
|
| SDKValidationError
|
|
115
124
|
| UnexpectedClientError
|
|
@@ -118,7 +127,7 @@ export async function promptsDuplicate(
|
|
|
118
127
|
| RequestTimeoutError
|
|
119
128
|
| ConnectionError
|
|
120
129
|
>(
|
|
121
|
-
M.
|
|
130
|
+
M.json(200, operations.ListPromptVersionsResponseBody$inboundSchema),
|
|
122
131
|
M.fail("4XX"),
|
|
123
132
|
M.fail("5XX"),
|
|
124
133
|
)(response);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as z from "zod";
|
|
6
5
|
import { OrqCore } from "../core.js";
|
|
7
6
|
import { encodeSimple } from "../lib/encodings.js";
|
|
8
7
|
import * as M from "../lib/matchers.js";
|
|
@@ -24,15 +23,18 @@ import * as operations from "../models/operations/index.js";
|
|
|
24
23
|
import { Result } from "../types/fp.js";
|
|
25
24
|
|
|
26
25
|
/**
|
|
27
|
-
*
|
|
26
|
+
* Retrieve a prompt
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Retrieves a prompt object
|
|
28
30
|
*/
|
|
29
|
-
export async function
|
|
31
|
+
export async function promptsRetrieve(
|
|
30
32
|
client: OrqCore,
|
|
31
33
|
request: operations.GetOnePromptRequest,
|
|
32
34
|
options?: RequestOptions,
|
|
33
35
|
): Promise<
|
|
34
36
|
Result<
|
|
35
|
-
|
|
37
|
+
operations.GetOnePromptResponseBody,
|
|
36
38
|
| APIError
|
|
37
39
|
| SDKValidationError
|
|
38
40
|
| UnexpectedClientError
|
|
@@ -60,10 +62,10 @@ export async function promptsGetOne(
|
|
|
60
62
|
}),
|
|
61
63
|
};
|
|
62
64
|
|
|
63
|
-
const path = pathToFunc("/v2/
|
|
65
|
+
const path = pathToFunc("/v2/prompts/{id}")(pathParams);
|
|
64
66
|
|
|
65
67
|
const headers = new Headers(compactMap({
|
|
66
|
-
Accept: "
|
|
68
|
+
Accept: "application/json",
|
|
67
69
|
}));
|
|
68
70
|
|
|
69
71
|
const secConfig = await extractSecurity(client._options.apiKey);
|
|
@@ -109,7 +111,7 @@ export async function promptsGetOne(
|
|
|
109
111
|
const response = doResult.value;
|
|
110
112
|
|
|
111
113
|
const [result] = await M.match<
|
|
112
|
-
|
|
114
|
+
operations.GetOnePromptResponseBody,
|
|
113
115
|
| APIError
|
|
114
116
|
| SDKValidationError
|
|
115
117
|
| UnexpectedClientError
|
|
@@ -118,7 +120,7 @@ export async function promptsGetOne(
|
|
|
118
120
|
| RequestTimeoutError
|
|
119
121
|
| ConnectionError
|
|
120
122
|
>(
|
|
121
|
-
M.
|
|
123
|
+
M.json(200, operations.GetOnePromptResponseBody$inboundSchema),
|
|
122
124
|
M.fail("4XX"),
|
|
123
125
|
M.fail("5XX"),
|
|
124
126
|
)(response);
|
|
@@ -61,7 +61,7 @@ export async function promptsUpdate(
|
|
|
61
61
|
}),
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
const path = pathToFunc("/v2/
|
|
64
|
+
const path = pathToFunc("/v2/prompts/{id}")(pathParams);
|
|
65
65
|
|
|
66
66
|
const headers = new Headers(compactMap({
|
|
67
67
|
"Content-Type": "application/json",
|
|
@@ -23,9 +23,9 @@ import * as operations from "../models/operations/index.js";
|
|
|
23
23
|
import { Result } from "../types/fp.js";
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Retrieve a remote config
|
|
27
27
|
*/
|
|
28
|
-
export async function
|
|
28
|
+
export async function remoteconfigsRetrieve(
|
|
29
29
|
client: OrqCore,
|
|
30
30
|
request?: operations.RemoteConfigsGetConfigRequestBody | undefined,
|
|
31
31
|
options?: RequestOptions,
|
package/src/lib/config.ts
CHANGED
|
@@ -17,6 +17,16 @@ export const ServerList = [
|
|
|
17
17
|
export type SDKOptions = {
|
|
18
18
|
apiKey?: string | (() => Promise<string>);
|
|
19
19
|
|
|
20
|
+
/**
|
|
21
|
+
* Allows setting the contactId parameter for all supported operations
|
|
22
|
+
*/
|
|
23
|
+
contactId?: string | undefined;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Allows setting the environment parameter for all supported operations
|
|
27
|
+
*/
|
|
28
|
+
environment?: string | undefined;
|
|
29
|
+
|
|
20
30
|
httpClient?: HTTPClient;
|
|
21
31
|
/**
|
|
22
32
|
* Allows overriding the default server used by the SDK
|
|
@@ -54,7 +64,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
54
64
|
export const SDK_METADATA = {
|
|
55
65
|
language: "typescript",
|
|
56
66
|
openapiDocVersion: "2.0",
|
|
57
|
-
sdkVersion: "3.1.
|
|
67
|
+
sdkVersion: "3.1.4",
|
|
58
68
|
genVersion: "2.506.0",
|
|
59
|
-
userAgent: "speakeasy-sdk/typescript 3.1.
|
|
69
|
+
userAgent: "speakeasy-sdk/typescript 3.1.4 2.506.0 2.0 @orq-ai/node",
|
|
60
70
|
} as const;
|
package/src/lib/env.ts
CHANGED
|
@@ -5,16 +5,30 @@
|
|
|
5
5
|
import { dlv } from "./dlv.js";
|
|
6
6
|
|
|
7
7
|
import * as z from "zod";
|
|
8
|
+
import { SDKOptions } from "./config.js";
|
|
8
9
|
|
|
9
10
|
export interface Env {
|
|
10
11
|
ORQ_API_KEY?: string | undefined;
|
|
11
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Sets the contactId parameter for all supported operations
|
|
15
|
+
*/
|
|
16
|
+
ORQ_CONTACT_ID?: string | undefined;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Sets the environment parameter for all supported operations
|
|
20
|
+
*/
|
|
21
|
+
ORQ_ENVIRONMENT?: string | undefined;
|
|
22
|
+
|
|
12
23
|
ORQ_DEBUG?: boolean | undefined;
|
|
13
24
|
}
|
|
14
25
|
|
|
15
26
|
export const envSchema: z.ZodType<Env, z.ZodTypeDef, unknown> = z.object({
|
|
16
27
|
ORQ_API_KEY: z.string().optional(),
|
|
17
28
|
|
|
29
|
+
ORQ_CONTACT_ID: z.string().optional(),
|
|
30
|
+
ORQ_ENVIRONMENT: z.string().optional(),
|
|
31
|
+
|
|
18
32
|
ORQ_DEBUG: z.coerce.boolean().optional(),
|
|
19
33
|
});
|
|
20
34
|
|
|
@@ -39,3 +53,21 @@ export function env(): Env {
|
|
|
39
53
|
export function resetEnv() {
|
|
40
54
|
envMemo = undefined;
|
|
41
55
|
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Populates global parameters with environment variables.
|
|
59
|
+
*/
|
|
60
|
+
export function fillGlobals(options: SDKOptions): SDKOptions {
|
|
61
|
+
const clone = { ...options };
|
|
62
|
+
|
|
63
|
+
const envVars = env();
|
|
64
|
+
|
|
65
|
+
if (typeof envVars.ORQ_CONTACT_ID !== "undefined") {
|
|
66
|
+
clone.contactId ??= envVars.ORQ_CONTACT_ID;
|
|
67
|
+
}
|
|
68
|
+
if (typeof envVars.ORQ_ENVIRONMENT !== "undefined") {
|
|
69
|
+
clone.environment ??= envVars.ORQ_ENVIRONMENT;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return clone;
|
|
73
|
+
}
|
package/src/lib/sdks.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { ERR, OK, Result } from "../types/fp.js";
|
|
|
15
15
|
import { stringToBase64 } from "./base64.js";
|
|
16
16
|
import { SDK_METADATA, SDKOptions, serverURLFromOptions } from "./config.js";
|
|
17
17
|
import { encodeForm } from "./encodings.js";
|
|
18
|
-
import { env } from "./env.js";
|
|
18
|
+
import { env, fillGlobals } from "./env.js";
|
|
19
19
|
import {
|
|
20
20
|
HTTPClient,
|
|
21
21
|
isAbortError,
|
|
@@ -94,7 +94,7 @@ export class ClientSDK {
|
|
|
94
94
|
} else {
|
|
95
95
|
this.#hooks = new SDKHooks();
|
|
96
96
|
}
|
|
97
|
-
this._options = { ...options, hooks: this.#hooks };
|
|
97
|
+
this._options = { ...fillGlobals(options), hooks: this.#hooks };
|
|
98
98
|
|
|
99
99
|
const url = serverURLFromOptions(options);
|
|
100
100
|
if (url) {
|