@orq-ai/node 1.31.1 → 1.31.11
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 +17 -45
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/models/errors/index.d.ts +0 -1
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +0 -1
- package/models/errors/index.js.map +1 -1
- package/models/operations/bulkfileupload.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/deploymentgetconfig.d.ts +96 -96
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +135 -136
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deploymentinvoke.d.ts +49 -46
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +63 -61
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +53 -53
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +67 -66
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/fileupload.js +2 -2
- package/models/operations/index.d.ts +0 -9
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -9
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/sdk.d.ts +0 -6
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +0 -10
- package/sdk/sdk.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/errors/index.ts +0 -1
- package/src/models/operations/bulkfileupload.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/deploymentgetconfig.ts +188 -255
- package/src/models/operations/deploymentinvoke.ts +81 -95
- package/src/models/operations/deployments.ts +88 -101
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/index.ts +0 -9
- package/src/sdk/sdk.ts +0 -12
- package/docs/sdks/prompt/README.md +0 -6
- package/docs/sdks/prompts/README.md +0 -533
- package/docs/sdks/snippets/README.md +0 -84
- package/docs/sdks/templates/README.md +0 -80
- package/funcs/promptSnippetsFindOne.d.ts +0 -12
- package/funcs/promptSnippetsFindOne.d.ts.map +0 -1
- package/funcs/promptSnippetsFindOne.js +0 -107
- 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 -107
- package/funcs/promptTemplatesGetAll.js.map +0 -1
- package/funcs/promptsCreate.d.ts +0 -12
- package/funcs/promptsCreate.d.ts.map +0 -1
- package/funcs/promptsCreate.js +0 -104
- package/funcs/promptsCreate.js.map +0 -1
- package/funcs/promptsCreateVersion.d.ts +0 -12
- package/funcs/promptsCreateVersion.d.ts.map +0 -1
- package/funcs/promptsCreateVersion.js +0 -108
- package/funcs/promptsCreateVersion.js.map +0 -1
- package/funcs/promptsDelete.d.ts +0 -12
- package/funcs/promptsDelete.d.ts.map +0 -1
- package/funcs/promptsDelete.js +0 -108
- package/funcs/promptsDelete.js.map +0 -1
- package/funcs/promptsDuplicate.d.ts +0 -12
- package/funcs/promptsDuplicate.d.ts.map +0 -1
- package/funcs/promptsDuplicate.js +0 -108
- 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 +0 -107
- 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 +0 -108
- package/funcs/promptsGetOne.js.map +0 -1
- package/funcs/promptsUpdate.d.ts +0 -13
- package/funcs/promptsUpdate.d.ts.map +0 -1
- package/funcs/promptsUpdate.js +0 -112
- package/funcs/promptsUpdate.js.map +0 -1
- package/models/errors/updateprompt.d.ts +0 -36
- package/models/errors/updateprompt.d.ts.map +0 -1
- package/models/errors/updateprompt.js +0 -79
- package/models/errors/updateprompt.js.map +0 -1
- package/models/operations/createprompt.d.ts +0 -2035
- package/models/operations/createprompt.d.ts.map +0 -1
- package/models/operations/createprompt.js +0 -1853
- package/models/operations/createprompt.js.map +0 -1
- package/models/operations/createpromptversion.d.ts +0 -2001
- package/models/operations/createpromptversion.d.ts.map +0 -1
- package/models/operations/createpromptversion.js +0 -1848
- package/models/operations/createpromptversion.js.map +0 -1
- package/models/operations/deleteprompt.d.ts +0 -32
- package/models/operations/deleteprompt.d.ts.map +0 -1
- package/models/operations/deleteprompt.js +0 -69
- package/models/operations/deleteprompt.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 +0 -69
- package/models/operations/duplicateprompt.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/getallprompts.d.ts +0 -6613
- package/models/operations/getallprompts.d.ts.map +0 -1
- package/models/operations/getallprompts.js +0 -6161
- package/models/operations/getallprompts.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/models/operations/getoneprompt.d.ts +0 -32
- package/models/operations/getoneprompt.d.ts.map +0 -1
- package/models/operations/getoneprompt.js +0 -69
- package/models/operations/getoneprompt.js.map +0 -1
- package/models/operations/updateprompt.d.ts +0 -7251
- package/models/operations/updateprompt.d.ts.map +0 -1
- package/models/operations/updateprompt.js +0 -6678
- package/models/operations/updateprompt.js.map +0 -1
- package/sdk/prompt.d.ts +0 -10
- package/sdk/prompt.d.ts.map +0 -1
- package/sdk/prompt.js +0 -21
- package/sdk/prompt.js.map +0 -1
- package/sdk/prompts.d.ts +0 -33
- package/sdk/prompts.d.ts.map +0 -1
- package/sdk/prompts.js +0 -61
- package/sdk/prompts.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/promptSnippetsFindOne.ts +0 -127
- package/src/funcs/promptTemplatesGetAll.ts +0 -129
- package/src/funcs/promptsCreate.ts +0 -123
- package/src/funcs/promptsCreateVersion.ts +0 -128
- package/src/funcs/promptsDelete.ts +0 -127
- package/src/funcs/promptsDuplicate.ts +0 -127
- package/src/funcs/promptsGetAll.ts +0 -127
- package/src/funcs/promptsGetOne.ts +0 -127
- package/src/funcs/promptsUpdate.ts +0 -135
- package/src/models/errors/updateprompt.ts +0 -71
- package/src/models/operations/createprompt.ts +0 -3455
- package/src/models/operations/createpromptversion.ts +0 -3697
- package/src/models/operations/deleteprompt.ts +0 -69
- package/src/models/operations/duplicateprompt.ts +0 -69
- package/src/models/operations/findonepromptsnippet.ts +0 -13629
- package/src/models/operations/getallprompts.ts +0 -13390
- package/src/models/operations/getallprompttemplates.ts +0 -13690
- package/src/models/operations/getoneprompt.ts +0 -69
- package/src/models/operations/updateprompt.ts +0 -14407
- package/src/sdk/prompt.ts +0 -19
- package/src/sdk/prompts.ts +0 -114
- package/src/sdk/snippets.ts +0 -24
- package/src/sdk/templates.ts +0 -24
package/funcs/promptsDelete.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.promptsDelete = promptsDelete;
|
|
40
|
-
const z = __importStar(require("zod"));
|
|
41
|
-
const encodings_js_1 = require("../lib/encodings.js");
|
|
42
|
-
const M = __importStar(require("../lib/matchers.js"));
|
|
43
|
-
const schemas_js_1 = require("../lib/schemas.js");
|
|
44
|
-
const security_js_1 = require("../lib/security.js");
|
|
45
|
-
const url_js_1 = require("../lib/url.js");
|
|
46
|
-
const operations = __importStar(require("../models/operations/index.js"));
|
|
47
|
-
/**
|
|
48
|
-
* Delete a prompt
|
|
49
|
-
*/
|
|
50
|
-
async function promptsDelete(client, request, options) {
|
|
51
|
-
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.DeletePromptRequest$outboundSchema.parse(value), "Input validation failed");
|
|
52
|
-
if (!parsed.ok) {
|
|
53
|
-
return parsed;
|
|
54
|
-
}
|
|
55
|
-
const payload = parsed.value;
|
|
56
|
-
const body = null;
|
|
57
|
-
const pathParams = {
|
|
58
|
-
id: (0, encodings_js_1.encodeSimple)("id", payload.id, {
|
|
59
|
-
explode: false,
|
|
60
|
-
charEncoding: "percent",
|
|
61
|
-
}),
|
|
62
|
-
};
|
|
63
|
-
const path = (0, url_js_1.pathToFunc)("/v2/resources/prompts/{id}")(pathParams);
|
|
64
|
-
const headers = new Headers({
|
|
65
|
-
Accept: "*/*",
|
|
66
|
-
});
|
|
67
|
-
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
68
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
69
|
-
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
70
|
-
const context = {
|
|
71
|
-
operationID: "DeletePrompt",
|
|
72
|
-
oAuth2Scopes: [],
|
|
73
|
-
resolvedSecurity: requestSecurity,
|
|
74
|
-
securitySource: client._options.apiKey,
|
|
75
|
-
retryConfig: (options === null || options === void 0 ? void 0 : options.retries)
|
|
76
|
-
|| client._options.retryConfig
|
|
77
|
-
|| { strategy: "none" },
|
|
78
|
-
retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"],
|
|
79
|
-
};
|
|
80
|
-
const requestRes = client._createRequest(context, {
|
|
81
|
-
security: requestSecurity,
|
|
82
|
-
method: "DELETE",
|
|
83
|
-
path: path,
|
|
84
|
-
headers: headers,
|
|
85
|
-
body: body,
|
|
86
|
-
timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client._options.timeoutMs || 600000,
|
|
87
|
-
}, options);
|
|
88
|
-
if (!requestRes.ok) {
|
|
89
|
-
return requestRes;
|
|
90
|
-
}
|
|
91
|
-
const req = requestRes.value;
|
|
92
|
-
const doResult = await client._do(req, {
|
|
93
|
-
context,
|
|
94
|
-
errorCodes: ["4XX", "5XX"],
|
|
95
|
-
retryConfig: context.retryConfig,
|
|
96
|
-
retryCodes: context.retryCodes,
|
|
97
|
-
});
|
|
98
|
-
if (!doResult.ok) {
|
|
99
|
-
return doResult;
|
|
100
|
-
}
|
|
101
|
-
const response = doResult.value;
|
|
102
|
-
const [result] = await M.match(M.nil(200, z.void()), M.fail(["4XX", "5XX"]))(response);
|
|
103
|
-
if (!result.ok) {
|
|
104
|
-
return result;
|
|
105
|
-
}
|
|
106
|
-
return result;
|
|
107
|
-
}
|
|
108
|
-
//# sourceMappingURL=promptsDelete.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptsDelete.js","sourceRoot":"","sources":["../src/funcs/promptsDelete.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBH,sCAmGC;AA1HD,uCAAyB;AAEzB,sDAAmD;AACnD,sDAAwC;AACxC,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAU3C,0EAA4D;AAG5D;;GAEG;AACI,KAAK,UAAU,aAAa,CACjC,MAAe,EACf,OAAuC,EACvC,OAAwB;IAaxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,kCAAkC,CAAC,KAAK,CAAC,KAAK,CAAC,EACrE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,M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AAE,QAAQ;QAChB,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,IAAI;QACV,SAAS,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,KAAI,MAAM,CAAC,QAAQ,CAAC,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,CAAC;QAC1B,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,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EACpB,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CACvB,CAAC,QAAQ,CAAC,CAAC;IACZ,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
* Duplicate a prompt
|
|
10
|
-
*/
|
|
11
|
-
export declare function promptsDuplicate(client: OrqCore, request: operations.DuplicatePromptRequest, options?: RequestOptions): Promise<Result<void, APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
12
|
-
//# sourceMappingURL=promptsDuplicate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptsDuplicate.d.ts","sourceRoot":"","sources":["../src/funcs/promptsDuplicate.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,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;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,IAAI,EACF,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAoFA"}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.promptsDuplicate = promptsDuplicate;
|
|
40
|
-
const z = __importStar(require("zod"));
|
|
41
|
-
const encodings_js_1 = require("../lib/encodings.js");
|
|
42
|
-
const M = __importStar(require("../lib/matchers.js"));
|
|
43
|
-
const schemas_js_1 = require("../lib/schemas.js");
|
|
44
|
-
const security_js_1 = require("../lib/security.js");
|
|
45
|
-
const url_js_1 = require("../lib/url.js");
|
|
46
|
-
const operations = __importStar(require("../models/operations/index.js"));
|
|
47
|
-
/**
|
|
48
|
-
* Duplicate a prompt
|
|
49
|
-
*/
|
|
50
|
-
async function promptsDuplicate(client, request, options) {
|
|
51
|
-
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.DuplicatePromptRequest$outboundSchema.parse(value), "Input validation failed");
|
|
52
|
-
if (!parsed.ok) {
|
|
53
|
-
return parsed;
|
|
54
|
-
}
|
|
55
|
-
const payload = parsed.value;
|
|
56
|
-
const body = null;
|
|
57
|
-
const pathParams = {
|
|
58
|
-
id: (0, encodings_js_1.encodeSimple)("id", payload.id, {
|
|
59
|
-
explode: false,
|
|
60
|
-
charEncoding: "percent",
|
|
61
|
-
}),
|
|
62
|
-
};
|
|
63
|
-
const path = (0, url_js_1.pathToFunc)("/v2/resources/prompts/{id}/duplicate")(pathParams);
|
|
64
|
-
const headers = new Headers({
|
|
65
|
-
Accept: "*/*",
|
|
66
|
-
});
|
|
67
|
-
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
68
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
69
|
-
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
70
|
-
const context = {
|
|
71
|
-
operationID: "DuplicatePrompt",
|
|
72
|
-
oAuth2Scopes: [],
|
|
73
|
-
resolvedSecurity: requestSecurity,
|
|
74
|
-
securitySource: client._options.apiKey,
|
|
75
|
-
retryConfig: (options === null || options === void 0 ? void 0 : options.retries)
|
|
76
|
-
|| client._options.retryConfig
|
|
77
|
-
|| { strategy: "none" },
|
|
78
|
-
retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"],
|
|
79
|
-
};
|
|
80
|
-
const requestRes = client._createRequest(context, {
|
|
81
|
-
security: requestSecurity,
|
|
82
|
-
method: "GET",
|
|
83
|
-
path: path,
|
|
84
|
-
headers: headers,
|
|
85
|
-
body: body,
|
|
86
|
-
timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client._options.timeoutMs || 600000,
|
|
87
|
-
}, options);
|
|
88
|
-
if (!requestRes.ok) {
|
|
89
|
-
return requestRes;
|
|
90
|
-
}
|
|
91
|
-
const req = requestRes.value;
|
|
92
|
-
const doResult = await client._do(req, {
|
|
93
|
-
context,
|
|
94
|
-
errorCodes: ["4XX", "5XX"],
|
|
95
|
-
retryConfig: context.retryConfig,
|
|
96
|
-
retryCodes: context.retryCodes,
|
|
97
|
-
});
|
|
98
|
-
if (!doResult.ok) {
|
|
99
|
-
return doResult;
|
|
100
|
-
}
|
|
101
|
-
const response = doResult.value;
|
|
102
|
-
const [result] = await M.match(M.nil(200, z.void()), M.fail(["4XX", "5XX"]))(response);
|
|
103
|
-
if (!result.ok) {
|
|
104
|
-
return result;
|
|
105
|
-
}
|
|
106
|
-
return result;
|
|
107
|
-
}
|
|
108
|
-
//# sourceMappingURL=promptsDuplicate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptsDuplicate.js","sourceRoot":"","sources":["../src/funcs/promptsDuplicate.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBH,4CAmGC;AA1HD,uCAAyB;AAEzB,sDAAmD;AACnD,sDAAwC;AACxC,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAU3C,0EAA4D;AAG5D;;GAEG;AACI,KAAK,UAAU,gBAAgB,CACpC,MAAe,EACf,OAA0C,EAC1C,OAAwB;IAaxB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AE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/funcs/promptsGetAll.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
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 all prompts
|
|
10
|
-
*/
|
|
11
|
-
export declare function promptsGetAll(client: OrqCore, request?: operations.GetAllPromptsRequest | undefined, options?: RequestOptions): Promise<Result<operations.GetAllPromptsResponseBody, APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
12
|
-
//# sourceMappingURL=promptsGetAll.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptsGetAll.d.ts","sourceRoot":"","sources":["../src/funcs/promptsGetAll.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,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;;GAEG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,OAAO,EACf,OAAO,CAAC,EAAE,UAAU,CAAC,oBAAoB,GAAG,SAAS,EACrD,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,CAqFA"}
|
package/funcs/promptsGetAll.js
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.promptsGetAll = promptsGetAll;
|
|
40
|
-
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
-
const M = __importStar(require("../lib/matchers.js"));
|
|
42
|
-
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
|
-
const security_js_1 = require("../lib/security.js");
|
|
44
|
-
const url_js_1 = require("../lib/url.js");
|
|
45
|
-
const operations = __importStar(require("../models/operations/index.js"));
|
|
46
|
-
/**
|
|
47
|
-
* Get all prompts
|
|
48
|
-
*/
|
|
49
|
-
async function promptsGetAll(client, request, options) {
|
|
50
|
-
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.GetAllPromptsRequest$outboundSchema.optional().parse(value), "Input validation failed");
|
|
51
|
-
if (!parsed.ok) {
|
|
52
|
-
return parsed;
|
|
53
|
-
}
|
|
54
|
-
const payload = parsed.value;
|
|
55
|
-
const body = (0, encodings_js_1.encodeJSON)("body", payload === null || payload === void 0 ? void 0 : payload.RequestBody, { explode: true });
|
|
56
|
-
const path = (0, url_js_1.pathToFunc)("/v2/resources/prompts/query")();
|
|
57
|
-
const query = (0, encodings_js_1.encodeFormQuery)({
|
|
58
|
-
"limit": payload === null || payload === void 0 ? void 0 : payload.limit,
|
|
59
|
-
"page": payload === null || payload === void 0 ? void 0 : payload.page,
|
|
60
|
-
});
|
|
61
|
-
const headers = new Headers({
|
|
62
|
-
"Content-Type": "application/json",
|
|
63
|
-
Accept: "application/json",
|
|
64
|
-
});
|
|
65
|
-
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
66
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
67
|
-
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
68
|
-
const context = {
|
|
69
|
-
operationID: "GetAllPrompts",
|
|
70
|
-
oAuth2Scopes: [],
|
|
71
|
-
resolvedSecurity: requestSecurity,
|
|
72
|
-
securitySource: client._options.apiKey,
|
|
73
|
-
retryConfig: (options === null || options === void 0 ? void 0 : options.retries)
|
|
74
|
-
|| client._options.retryConfig
|
|
75
|
-
|| { strategy: "none" },
|
|
76
|
-
retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"],
|
|
77
|
-
};
|
|
78
|
-
const requestRes = client._createRequest(context, {
|
|
79
|
-
security: requestSecurity,
|
|
80
|
-
method: "POST",
|
|
81
|
-
path: path,
|
|
82
|
-
headers: headers,
|
|
83
|
-
query: query,
|
|
84
|
-
body: body,
|
|
85
|
-
timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client._options.timeoutMs || 600000,
|
|
86
|
-
}, options);
|
|
87
|
-
if (!requestRes.ok) {
|
|
88
|
-
return requestRes;
|
|
89
|
-
}
|
|
90
|
-
const req = requestRes.value;
|
|
91
|
-
const doResult = await client._do(req, {
|
|
92
|
-
context,
|
|
93
|
-
errorCodes: ["4XX", "5XX"],
|
|
94
|
-
retryConfig: context.retryConfig,
|
|
95
|
-
retryCodes: context.retryCodes,
|
|
96
|
-
});
|
|
97
|
-
if (!doResult.ok) {
|
|
98
|
-
return doResult;
|
|
99
|
-
}
|
|
100
|
-
const response = doResult.value;
|
|
101
|
-
const [result] = await M.match(M.json(200, operations.GetAllPromptsResponseBody$inboundSchema), M.fail(["4XX", "5XX"]))(response);
|
|
102
|
-
if (!result.ok) {
|
|
103
|
-
return result;
|
|
104
|
-
}
|
|
105
|
-
return result;
|
|
106
|
-
}
|
|
107
|
-
//# sourceMappingURL=promptsGetAll.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptsGetAll.js","sourceRoot":"","sources":["../src/funcs/promptsGetAll.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBH,sCAoGC;AAzHD,sDAAkE;AAClE,sDAAwC;AACxC,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAU3C,0EAA4D;AAG5D;;GAEG;AACI,KAAK,UAAU,aAAa,CACjC,MAAe,EACf,OAAqD,EACrD,OAAwB;IAaxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CACR,UAAU,CAAC,mCAAmC,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EACxE,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,IAAA,yBAAU,EAAC,MAAM,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAEzE,MAAM,IAAI,GAAG,IAAA,mBAAU,EAAC,6BAA6B,CAAC,EAAE,CAAC;IAEzD,MAAM,KAAK,GAAG,IAAA,8BAAe,EAAC;QAC5B,OAAO,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,KAAK;QACvB,MAAM,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI;KACtB,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC;QAC1B,cAAc,EAAE,kBAAkB;QAClC,MAAM,EAAE,kBAAkB;KAC3B,CAAC,C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,MAAM,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE;QACrC,OAAO;QACP,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC;QAC1B,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,CAAC,GAAG,EAAE,UAAU,CAAC,uCAAuC,CAAC,EAC/D,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CACvB,CAAC,QAAQ,CAAC,CAAC;IACZ,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/funcs/promptsGetOne.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
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 one prompt
|
|
10
|
-
*/
|
|
11
|
-
export declare function promptsGetOne(client: OrqCore, request: operations.GetOnePromptRequest, options?: RequestOptions): Promise<Result<void, APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
12
|
-
//# sourceMappingURL=promptsGetOne.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptsGetOne.d.ts","sourceRoot":"","sources":["../src/funcs/promptsGetOne.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,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;;GAEG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,IAAI,EACF,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAoFA"}
|
package/funcs/promptsGetOne.js
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.promptsGetOne = promptsGetOne;
|
|
40
|
-
const z = __importStar(require("zod"));
|
|
41
|
-
const encodings_js_1 = require("../lib/encodings.js");
|
|
42
|
-
const M = __importStar(require("../lib/matchers.js"));
|
|
43
|
-
const schemas_js_1 = require("../lib/schemas.js");
|
|
44
|
-
const security_js_1 = require("../lib/security.js");
|
|
45
|
-
const url_js_1 = require("../lib/url.js");
|
|
46
|
-
const operations = __importStar(require("../models/operations/index.js"));
|
|
47
|
-
/**
|
|
48
|
-
* Get one prompt
|
|
49
|
-
*/
|
|
50
|
-
async function promptsGetOne(client, request, options) {
|
|
51
|
-
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.GetOnePromptRequest$outboundSchema.parse(value), "Input validation failed");
|
|
52
|
-
if (!parsed.ok) {
|
|
53
|
-
return parsed;
|
|
54
|
-
}
|
|
55
|
-
const payload = parsed.value;
|
|
56
|
-
const body = null;
|
|
57
|
-
const pathParams = {
|
|
58
|
-
id: (0, encodings_js_1.encodeSimple)("id", payload.id, {
|
|
59
|
-
explode: false,
|
|
60
|
-
charEncoding: "percent",
|
|
61
|
-
}),
|
|
62
|
-
};
|
|
63
|
-
const path = (0, url_js_1.pathToFunc)("/v2/resources/prompts/{id}")(pathParams);
|
|
64
|
-
const headers = new Headers({
|
|
65
|
-
Accept: "*/*",
|
|
66
|
-
});
|
|
67
|
-
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
68
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
69
|
-
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
70
|
-
const context = {
|
|
71
|
-
operationID: "GetOnePrompt",
|
|
72
|
-
oAuth2Scopes: [],
|
|
73
|
-
resolvedSecurity: requestSecurity,
|
|
74
|
-
securitySource: client._options.apiKey,
|
|
75
|
-
retryConfig: (options === null || options === void 0 ? void 0 : options.retries)
|
|
76
|
-
|| client._options.retryConfig
|
|
77
|
-
|| { strategy: "none" },
|
|
78
|
-
retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"],
|
|
79
|
-
};
|
|
80
|
-
const requestRes = client._createRequest(context, {
|
|
81
|
-
security: requestSecurity,
|
|
82
|
-
method: "GET",
|
|
83
|
-
path: path,
|
|
84
|
-
headers: headers,
|
|
85
|
-
body: body,
|
|
86
|
-
timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client._options.timeoutMs || 600000,
|
|
87
|
-
}, options);
|
|
88
|
-
if (!requestRes.ok) {
|
|
89
|
-
return requestRes;
|
|
90
|
-
}
|
|
91
|
-
const req = requestRes.value;
|
|
92
|
-
const doResult = await client._do(req, {
|
|
93
|
-
context,
|
|
94
|
-
errorCodes: ["4XX", "5XX"],
|
|
95
|
-
retryConfig: context.retryConfig,
|
|
96
|
-
retryCodes: context.retryCodes,
|
|
97
|
-
});
|
|
98
|
-
if (!doResult.ok) {
|
|
99
|
-
return doResult;
|
|
100
|
-
}
|
|
101
|
-
const response = doResult.value;
|
|
102
|
-
const [result] = await M.match(M.nil(200, z.void()), M.fail(["4XX", "5XX"]))(response);
|
|
103
|
-
if (!result.ok) {
|
|
104
|
-
return result;
|
|
105
|
-
}
|
|
106
|
-
return result;
|
|
107
|
-
}
|
|
108
|
-
//# sourceMappingURL=promptsGetOne.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptsGetOne.js","sourceRoot":"","sources":["../src/funcs/promptsGetOne.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBH,sCAmGC;AA1HD,uCAAyB;AAEzB,sDAAmD;AACnD,sDAAwC;AACxC,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAU3C,0EAA4D;AAG5D;;GAEG;AACI,KAAK,UAAU,aAAa,CACjC,MAAe,EACf,OAAuC,EACvC,OAAwB;IAaxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,kCAAkC,CAAC,KAAK,CAAC,KAAK,CAAC,EACrE,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,IAAI,CAAC;IAElB,MAAM,UAAU,GAAG;QACjB,EAAE,EAAE,IAA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AAP,OAAO,CAAE,SAAS,KAAI,MAAM,CAAC,QAAQ,CAAC,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,CAAC;QAC1B,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,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,EACpB,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CACvB,CAAC,QAAQ,CAAC,CAAC;IACZ,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/funcs/promptsUpdate.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
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 * as errors from "../models/errors/index.js";
|
|
6
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
7
|
-
import * as operations from "../models/operations/index.js";
|
|
8
|
-
import { Result } from "../types/fp.js";
|
|
9
|
-
/**
|
|
10
|
-
* Update a prompt
|
|
11
|
-
*/
|
|
12
|
-
export declare function promptsUpdate(client: OrqCore, request: operations.UpdatePromptRequest, options?: RequestOptions): Promise<Result<operations.UpdatePromptResponseBody, errors.UpdatePromptResponseBody | APIError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
13
|
-
//# sourceMappingURL=promptsUpdate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"promptsUpdate.d.ts","sourceRoot":"","sources":["../src/funcs/promptsUpdate.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,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,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;GAEG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,OAAO,EACf,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,wBAAwB,EACjC,MAAM,CAAC,wBAAwB,GAC/B,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CA2FA"}
|
package/funcs/promptsUpdate.js
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
-
*/
|
|
5
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
-
}
|
|
11
|
-
Object.defineProperty(o, k2, desc);
|
|
12
|
-
}) : (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
o[k2] = m[k];
|
|
15
|
-
}));
|
|
16
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
-
}) : function(o, v) {
|
|
19
|
-
o["default"] = v;
|
|
20
|
-
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
-
var ownKeys = function(o) {
|
|
23
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
-
var ar = [];
|
|
25
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
-
return ar;
|
|
27
|
-
};
|
|
28
|
-
return ownKeys(o);
|
|
29
|
-
};
|
|
30
|
-
return function (mod) {
|
|
31
|
-
if (mod && mod.__esModule) return mod;
|
|
32
|
-
var result = {};
|
|
33
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
-
__setModuleDefault(result, mod);
|
|
35
|
-
return result;
|
|
36
|
-
};
|
|
37
|
-
})();
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.promptsUpdate = promptsUpdate;
|
|
40
|
-
const encodings_js_1 = require("../lib/encodings.js");
|
|
41
|
-
const M = __importStar(require("../lib/matchers.js"));
|
|
42
|
-
const schemas_js_1 = require("../lib/schemas.js");
|
|
43
|
-
const security_js_1 = require("../lib/security.js");
|
|
44
|
-
const url_js_1 = require("../lib/url.js");
|
|
45
|
-
const errors = __importStar(require("../models/errors/index.js"));
|
|
46
|
-
const operations = __importStar(require("../models/operations/index.js"));
|
|
47
|
-
/**
|
|
48
|
-
* Update a prompt
|
|
49
|
-
*/
|
|
50
|
-
async function promptsUpdate(client, request, options) {
|
|
51
|
-
const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.UpdatePromptRequest$outboundSchema.parse(value), "Input validation failed");
|
|
52
|
-
if (!parsed.ok) {
|
|
53
|
-
return parsed;
|
|
54
|
-
}
|
|
55
|
-
const payload = parsed.value;
|
|
56
|
-
const body = (0, encodings_js_1.encodeJSON)("body", payload.RequestBody, { explode: true });
|
|
57
|
-
const pathParams = {
|
|
58
|
-
id: (0, encodings_js_1.encodeSimple)("id", payload.id, {
|
|
59
|
-
explode: false,
|
|
60
|
-
charEncoding: "percent",
|
|
61
|
-
}),
|
|
62
|
-
};
|
|
63
|
-
const path = (0, url_js_1.pathToFunc)("/v2/resources/prompts/{id}")(pathParams);
|
|
64
|
-
const headers = new Headers({
|
|
65
|
-
"Content-Type": "application/json",
|
|
66
|
-
Accept: "application/json",
|
|
67
|
-
});
|
|
68
|
-
const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKey);
|
|
69
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
70
|
-
const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
|
|
71
|
-
const context = {
|
|
72
|
-
operationID: "UpdatePrompt",
|
|
73
|
-
oAuth2Scopes: [],
|
|
74
|
-
resolvedSecurity: requestSecurity,
|
|
75
|
-
securitySource: client._options.apiKey,
|
|
76
|
-
retryConfig: (options === null || options === void 0 ? void 0 : options.retries)
|
|
77
|
-
|| client._options.retryConfig
|
|
78
|
-
|| { strategy: "none" },
|
|
79
|
-
retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"],
|
|
80
|
-
};
|
|
81
|
-
const requestRes = client._createRequest(context, {
|
|
82
|
-
security: requestSecurity,
|
|
83
|
-
method: "PATCH",
|
|
84
|
-
path: path,
|
|
85
|
-
headers: headers,
|
|
86
|
-
body: body,
|
|
87
|
-
timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client._options.timeoutMs || 600000,
|
|
88
|
-
}, options);
|
|
89
|
-
if (!requestRes.ok) {
|
|
90
|
-
return requestRes;
|
|
91
|
-
}
|
|
92
|
-
const req = requestRes.value;
|
|
93
|
-
const doResult = await client._do(req, {
|
|
94
|
-
context,
|
|
95
|
-
errorCodes: ["404", "4XX", "5XX"],
|
|
96
|
-
retryConfig: context.retryConfig,
|
|
97
|
-
retryCodes: context.retryCodes,
|
|
98
|
-
});
|
|
99
|
-
if (!doResult.ok) {
|
|
100
|
-
return doResult;
|
|
101
|
-
}
|
|
102
|
-
const response = doResult.value;
|
|
103
|
-
const responseFields = {
|
|
104
|
-
HttpMeta: { Response: response, Request: req },
|
|
105
|
-
};
|
|
106
|
-
const [result] = await M.match(M.json(200, operations.UpdatePromptResponseBody$inboundSchema), M.jsonErr(404, errors.UpdatePromptResponseBody$inboundSchema), M.fail(["4XX", "5XX"]))(response, { extraFields: responseFields });
|
|
107
|
-
if (!result.ok) {
|
|
108
|
-
return result;
|
|
109
|
-
}
|
|
110
|
-
return result;
|
|
111
|
-
}
|
|
112
|
-
//# sourceMappingURL=promptsUpdate.js.map
|