- embeddingPresignCreateEmbeddingPresignToken - Create embedding presign token
- embeddingPresignVerifyEmbeddingPresignToken - Verify embedding presign token
Creates a presign token for embedding operations with configurable expiration time
import { Documenso } from "@documenso/sdk-typescript";
const documenso = new Documenso({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const result = await documenso.embedding.embeddingPresignCreateEmbeddingPresignToken({});
console.log(result);
}
run();The standalone function version of this method:
import { DocumensoCore } from "@documenso/sdk-typescript/core.js";
import { embeddingEmbeddingPresignCreateEmbeddingPresignToken } from "@documenso/sdk-typescript/funcs/embeddingEmbeddingPresignCreateEmbeddingPresignToken.js";
// Use `DocumensoCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const documenso = new DocumensoCore({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const res = await embeddingEmbeddingPresignCreateEmbeddingPresignToken(documenso, {});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("embeddingEmbeddingPresignCreateEmbeddingPresignToken failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.EmbeddingPresignCreateEmbeddingPresignTokenRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.EmbeddingPresignCreateEmbeddingPresignTokenResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.EmbeddingPresignCreateEmbeddingPresignTokenBadRequestError | 400 | application/json |
| errors.EmbeddingPresignCreateEmbeddingPresignTokenUnauthorizedError | 401 | application/json |
| errors.EmbeddingPresignCreateEmbeddingPresignTokenForbiddenError | 403 | application/json |
| errors.EmbeddingPresignCreateEmbeddingPresignTokenInternalServerError | 500 | application/json |
| errors.APIError | 4XX, 5XX | */* |
Verifies a presign token for embedding operations and returns the associated API token
import { Documenso } from "@documenso/sdk-typescript";
const documenso = new Documenso({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const result = await documenso.embedding.embeddingPresignVerifyEmbeddingPresignToken({
token: "<value>",
});
console.log(result);
}
run();The standalone function version of this method:
import { DocumensoCore } from "@documenso/sdk-typescript/core.js";
import { embeddingEmbeddingPresignVerifyEmbeddingPresignToken } from "@documenso/sdk-typescript/funcs/embeddingEmbeddingPresignVerifyEmbeddingPresignToken.js";
// Use `DocumensoCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const documenso = new DocumensoCore({
apiKey: process.env["DOCUMENSO_API_KEY"] ?? "",
});
async function run() {
const res = await embeddingEmbeddingPresignVerifyEmbeddingPresignToken(documenso, {
token: "<value>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("embeddingEmbeddingPresignVerifyEmbeddingPresignToken failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.EmbeddingPresignVerifyEmbeddingPresignTokenRequest | ✔️ | The request object to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<operations.EmbeddingPresignVerifyEmbeddingPresignTokenResponse>
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.EmbeddingPresignVerifyEmbeddingPresignTokenBadRequestError | 400 | application/json |
| errors.EmbeddingPresignVerifyEmbeddingPresignTokenUnauthorizedError | 401 | application/json |
| errors.EmbeddingPresignVerifyEmbeddingPresignTokenForbiddenError | 403 | application/json |
| errors.EmbeddingPresignVerifyEmbeddingPresignTokenInternalServerError | 500 | application/json |
| errors.APIError | 4XX, 5XX | */* |