@orq-ai/node 0.0.1
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 +556 -0
- package/core.d.ts +10 -0
- package/core.d.ts.map +1 -0
- package/core.js +17 -0
- package/core.js.map +1 -0
- package/docs/sdks/contacts/README.md +84 -0
- package/docs/sdks/deployments/README.md +314 -0
- package/docs/sdks/feedback/README.md +92 -0
- package/docs/sdks/files/README.md +171 -0
- package/docs/sdks/metrics/README.md +86 -0
- package/docs/sdks/orq/README.md +10 -0
- package/docs/sdks/prompt/README.md +6 -0
- package/docs/sdks/prompts/README.md +533 -0
- package/docs/sdks/remoteconfig/README.md +80 -0
- package/docs/sdks/snippets/README.md +84 -0
- package/docs/sdks/templates/README.md +80 -0
- package/funcs/contactsCreate.d.ts +15 -0
- package/funcs/contactsCreate.d.ts.map +1 -0
- package/funcs/contactsCreate.js +105 -0
- package/funcs/contactsCreate.js.map +1 -0
- package/funcs/deploymentsAll.d.ts +16 -0
- package/funcs/deploymentsAll.d.ts.map +1 -0
- package/funcs/deploymentsAll.js +113 -0
- package/funcs/deploymentsAll.js.map +1 -0
- package/funcs/deploymentsGetConfig.d.ts +15 -0
- package/funcs/deploymentsGetConfig.d.ts.map +1 -0
- package/funcs/deploymentsGetConfig.js +105 -0
- package/funcs/deploymentsGetConfig.js.map +1 -0
- package/funcs/deploymentsInvalidate.d.ts +15 -0
- package/funcs/deploymentsInvalidate.d.ts.map +1 -0
- package/funcs/deploymentsInvalidate.js +111 -0
- package/funcs/deploymentsInvalidate.js.map +1 -0
- package/funcs/deploymentsInvoke.d.ts +22 -0
- package/funcs/deploymentsInvoke.d.ts.map +1 -0
- package/funcs/deploymentsInvoke.js +115 -0
- package/funcs/deploymentsInvoke.js.map +1 -0
- package/funcs/deploymentsMetricsCreate.d.ts +15 -0
- package/funcs/deploymentsMetricsCreate.d.ts.map +1 -0
- package/funcs/deploymentsMetricsCreate.js +111 -0
- package/funcs/deploymentsMetricsCreate.js.map +1 -0
- package/funcs/feedbackCreate.d.ts +15 -0
- package/funcs/feedbackCreate.d.ts.map +1 -0
- package/funcs/feedbackCreate.js +105 -0
- package/funcs/feedbackCreate.js.map +1 -0
- package/funcs/filesBulkUpload.d.ts +15 -0
- package/funcs/filesBulkUpload.d.ts.map +1 -0
- package/funcs/filesBulkUpload.js +106 -0
- package/funcs/filesBulkUpload.js.map +1 -0
- package/funcs/filesUpload.d.ts +15 -0
- package/funcs/filesUpload.d.ts.map +1 -0
- package/funcs/filesUpload.js +122 -0
- package/funcs/filesUpload.js.map +1 -0
- package/funcs/promptSnippetsFindOne.d.ts +12 -0
- package/funcs/promptSnippetsFindOne.d.ts.map +1 -0
- package/funcs/promptSnippetsFindOne.js +107 -0
- package/funcs/promptSnippetsFindOne.js.map +1 -0
- package/funcs/promptTemplatesGetAll.d.ts +12 -0
- package/funcs/promptTemplatesGetAll.d.ts.map +1 -0
- package/funcs/promptTemplatesGetAll.js +107 -0
- package/funcs/promptTemplatesGetAll.js.map +1 -0
- package/funcs/promptsCreate.d.ts +12 -0
- package/funcs/promptsCreate.d.ts.map +1 -0
- package/funcs/promptsCreate.js +104 -0
- package/funcs/promptsCreate.js.map +1 -0
- package/funcs/promptsCreateVersion.d.ts +12 -0
- package/funcs/promptsCreateVersion.d.ts.map +1 -0
- package/funcs/promptsCreateVersion.js +108 -0
- package/funcs/promptsCreateVersion.js.map +1 -0
- package/funcs/promptsDelete.d.ts +12 -0
- package/funcs/promptsDelete.d.ts.map +1 -0
- package/funcs/promptsDelete.js +108 -0
- package/funcs/promptsDelete.js.map +1 -0
- package/funcs/promptsDuplicate.d.ts +12 -0
- package/funcs/promptsDuplicate.d.ts.map +1 -0
- package/funcs/promptsDuplicate.js +108 -0
- package/funcs/promptsDuplicate.js.map +1 -0
- package/funcs/promptsGetAll.d.ts +12 -0
- package/funcs/promptsGetAll.d.ts.map +1 -0
- package/funcs/promptsGetAll.js +107 -0
- package/funcs/promptsGetAll.js.map +1 -0
- package/funcs/promptsGetOne.d.ts +12 -0
- package/funcs/promptsGetOne.d.ts.map +1 -0
- package/funcs/promptsGetOne.js +108 -0
- package/funcs/promptsGetOne.js.map +1 -0
- package/funcs/promptsUpdate.d.ts +13 -0
- package/funcs/promptsUpdate.d.ts.map +1 -0
- package/funcs/promptsUpdate.js +112 -0
- package/funcs/promptsUpdate.js.map +1 -0
- package/funcs/remoteconfigGetConfig.d.ts +12 -0
- package/funcs/remoteconfigGetConfig.d.ts.map +1 -0
- package/funcs/remoteconfigGetConfig.js +105 -0
- package/funcs/remoteconfigGetConfig.js.map +1 -0
- package/hooks/hooks.d.ts +24 -0
- package/hooks/hooks.d.ts.map +1 -0
- package/hooks/hooks.js +68 -0
- package/hooks/hooks.js.map +1 -0
- package/hooks/index.d.ts +3 -0
- package/hooks/index.d.ts.map +1 -0
- package/hooks/index.js +22 -0
- package/hooks/index.js.map +1 -0
- package/hooks/registration.d.ts +3 -0
- package/hooks/registration.d.ts.map +1 -0
- package/hooks/registration.js +15 -0
- package/hooks/registration.js.map +1 -0
- package/hooks/types.d.ts +76 -0
- package/hooks/types.d.ts.map +1 -0
- package/hooks/types.js +6 -0
- package/hooks/types.js.map +1 -0
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -0
- package/index.js +46 -0
- package/index.js.map +1 -0
- package/lib/base64.d.ts +10 -0
- package/lib/base64.d.ts.map +1 -0
- package/lib/base64.js +71 -0
- package/lib/base64.js.map +1 -0
- package/lib/config.d.ts +34 -0
- package/lib/config.d.ts.map +1 -0
- package/lib/config.js +36 -0
- package/lib/config.js.map +1 -0
- package/lib/dlv.d.ts +14 -0
- package/lib/dlv.d.ts.map +1 -0
- package/lib/dlv.js +49 -0
- package/lib/dlv.js.map +1 -0
- package/lib/encodings.d.ts +51 -0
- package/lib/encodings.d.ts.map +1 -0
- package/lib/encodings.js +343 -0
- package/lib/encodings.js.map +1 -0
- package/lib/env.d.ts +15 -0
- package/lib/env.d.ts.map +1 -0
- package/lib/env.js +66 -0
- package/lib/env.js.map +1 -0
- package/lib/event-streams.d.ts +17 -0
- package/lib/event-streams.d.ts.map +1 -0
- package/lib/event-streams.js +221 -0
- package/lib/event-streams.js.map +1 -0
- package/lib/files.d.ts +8 -0
- package/lib/files.d.ts.map +1 -0
- package/lib/files.js +36 -0
- package/lib/files.js.map +1 -0
- package/lib/http.d.ts +67 -0
- package/lib/http.d.ts.map +1 -0
- package/lib/http.js +218 -0
- package/lib/http.js.map +1 -0
- package/lib/is-plain-object.d.ts +2 -0
- package/lib/is-plain-object.d.ts.map +1 -0
- package/lib/is-plain-object.js +41 -0
- package/lib/is-plain-object.js.map +1 -0
- package/lib/logger.d.ts +6 -0
- package/lib/logger.d.ts.map +1 -0
- package/lib/logger.js +6 -0
- package/lib/logger.js.map +1 -0
- package/lib/matchers.d.ts +64 -0
- package/lib/matchers.d.ts.map +1 -0
- package/lib/matchers.js +208 -0
- package/lib/matchers.js.map +1 -0
- package/lib/primitives.d.ts +22 -0
- package/lib/primitives.d.ts.map +1 -0
- package/lib/primitives.js +94 -0
- package/lib/primitives.js.map +1 -0
- package/lib/retries.d.ts +38 -0
- package/lib/retries.d.ts.map +1 -0
- package/lib/retries.js +155 -0
- package/lib/retries.js.map +1 -0
- package/lib/schemas.d.ts +19 -0
- package/lib/schemas.d.ts.map +1 -0
- package/lib/schemas.js +59 -0
- package/lib/schemas.js.map +1 -0
- package/lib/sdks.d.ts +56 -0
- package/lib/sdks.d.ts.map +1 -0
- package/lib/sdks.js +277 -0
- package/lib/sdks.js.map +1 -0
- package/lib/security.d.ts +82 -0
- package/lib/security.d.ts.map +1 -0
- package/lib/security.js +140 -0
- package/lib/security.js.map +1 -0
- package/lib/url.d.ts +5 -0
- package/lib/url.d.ts.map +1 -0
- package/lib/url.js +25 -0
- package/lib/url.js.map +1 -0
- package/models/components/deployments.d.ts +890 -0
- package/models/components/deployments.d.ts.map +1 -0
- package/models/components/deployments.js +918 -0
- package/models/components/deployments.js.map +1 -0
- package/models/components/index.d.ts +3 -0
- package/models/components/index.d.ts.map +1 -0
- package/models/components/index.js +22 -0
- package/models/components/index.js.map +1 -0
- package/models/components/security.d.ts +29 -0
- package/models/components/security.d.ts.map +1 -0
- package/models/components/security.js +78 -0
- package/models/components/security.js.map +1 -0
- package/models/errors/apierror.d.ts +8 -0
- package/models/errors/apierror.d.ts.map +1 -0
- package/models/errors/apierror.js +21 -0
- package/models/errors/apierror.js.map +1 -0
- package/models/errors/honoapierror.d.ts +42 -0
- package/models/errors/honoapierror.d.ts.map +1 -0
- package/models/errors/honoapierror.js +80 -0
- package/models/errors/honoapierror.js.map +1 -0
- package/models/errors/httpclienterrors.d.ts +44 -0
- package/models/errors/httpclienterrors.d.ts.map +1 -0
- package/models/errors/httpclienterrors.js +78 -0
- package/models/errors/httpclienterrors.js.map +1 -0
- package/models/errors/index.d.ts +6 -0
- package/models/errors/index.d.ts.map +1 -0
- package/models/errors/index.js +25 -0
- package/models/errors/index.js.map +1 -0
- package/models/errors/sdkvalidationerror.d.ts +20 -0
- package/models/errors/sdkvalidationerror.d.ts.map +1 -0
- package/models/errors/sdkvalidationerror.js +115 -0
- package/models/errors/sdkvalidationerror.js.map +1 -0
- package/models/errors/updateprompt.d.ts +36 -0
- package/models/errors/updateprompt.d.ts.map +1 -0
- package/models/errors/updateprompt.js +79 -0
- package/models/errors/updateprompt.js.map +1 -0
- package/models/operations/bulkfileupload.d.ts +162 -0
- package/models/operations/bulkfileupload.d.ts.map +1 -0
- package/models/operations/bulkfileupload.js +204 -0
- package/models/operations/bulkfileupload.js.map +1 -0
- package/models/operations/createcontact.d.ts +139 -0
- package/models/operations/createcontact.d.ts.map +1 -0
- package/models/operations/createcontact.js +149 -0
- package/models/operations/createcontact.js.map +1 -0
- package/models/operations/createfeedback.d.ts +136 -0
- package/models/operations/createfeedback.d.ts.map +1 -0
- package/models/operations/createfeedback.js +172 -0
- package/models/operations/createfeedback.js.map +1 -0
- package/models/operations/createprompt.d.ts +2023 -0
- package/models/operations/createprompt.d.ts.map +1 -0
- package/models/operations/createprompt.js +1849 -0
- package/models/operations/createprompt.js.map +1 -0
- package/models/operations/createpromptversion.d.ts +1989 -0
- package/models/operations/createpromptversion.d.ts.map +1 -0
- package/models/operations/createpromptversion.js +1844 -0
- package/models/operations/createpromptversion.js.map +1 -0
- package/models/operations/deleteprompt.d.ts +32 -0
- package/models/operations/deleteprompt.d.ts.map +1 -0
- package/models/operations/deleteprompt.js +69 -0
- package/models/operations/deleteprompt.js.map +1 -0
- package/models/operations/deploymentcreatemetric.d.ts +957 -0
- package/models/operations/deploymentcreatemetric.d.ts.map +1 -0
- package/models/operations/deploymentcreatemetric.js +954 -0
- package/models/operations/deploymentcreatemetric.js.map +1 -0
- package/models/operations/deploymentgetconfig.d.ts +1852 -0
- package/models/operations/deploymentgetconfig.d.ts.map +1 -0
- package/models/operations/deploymentgetconfig.js +1751 -0
- package/models/operations/deploymentgetconfig.js.map +1 -0
- package/models/operations/deploymentinvoke.d.ts +1344 -0
- package/models/operations/deploymentinvoke.d.ts.map +1 -0
- package/models/operations/deploymentinvoke.js +1208 -0
- package/models/operations/deploymentinvoke.js.map +1 -0
- package/models/operations/deployments.d.ts +1223 -0
- package/models/operations/deployments.d.ts.map +1 -0
- package/models/operations/deployments.js +1101 -0
- package/models/operations/deployments.js.map +1 -0
- package/models/operations/duplicateprompt.d.ts +32 -0
- package/models/operations/duplicateprompt.d.ts.map +1 -0
- package/models/operations/duplicateprompt.js +69 -0
- package/models/operations/duplicateprompt.js.map +1 -0
- package/models/operations/fileupload.d.ts +168 -0
- package/models/operations/fileupload.d.ts.map +1 -0
- package/models/operations/fileupload.js +206 -0
- package/models/operations/fileupload.js.map +1 -0
- package/models/operations/findonepromptsnippet.d.ts +6242 -0
- package/models/operations/findonepromptsnippet.d.ts.map +1 -0
- package/models/operations/findonepromptsnippet.js +5879 -0
- package/models/operations/findonepromptsnippet.js.map +1 -0
- package/models/operations/getallprompts.d.ts +6577 -0
- package/models/operations/getallprompts.d.ts.map +1 -0
- package/models/operations/getallprompts.js +6149 -0
- package/models/operations/getallprompts.js.map +1 -0
- package/models/operations/getallprompttemplates.d.ts +6571 -0
- package/models/operations/getallprompttemplates.d.ts.map +1 -0
- package/models/operations/getallprompttemplates.js +6213 -0
- package/models/operations/getallprompttemplates.js.map +1 -0
- package/models/operations/getoneprompt.d.ts +32 -0
- package/models/operations/getoneprompt.d.ts.map +1 -0
- package/models/operations/getoneprompt.js +69 -0
- package/models/operations/getoneprompt.js.map +1 -0
- package/models/operations/index.d.ts +20 -0
- package/models/operations/index.d.ts.map +1 -0
- package/models/operations/index.js +39 -0
- package/models/operations/index.js.map +1 -0
- package/models/operations/invaliddeployment.d.ts +29 -0
- package/models/operations/invaliddeployment.d.ts.map +1 -0
- package/models/operations/invaliddeployment.js +78 -0
- package/models/operations/invaliddeployment.js.map +1 -0
- package/models/operations/remoteconfigsgetconfig.d.ts +121 -0
- package/models/operations/remoteconfigsgetconfig.d.ts.map +1 -0
- package/models/operations/remoteconfigsgetconfig.js +126 -0
- package/models/operations/remoteconfigsgetconfig.js.map +1 -0
- package/models/operations/updateprompt.d.ts +7209 -0
- package/models/operations/updateprompt.d.ts.map +1 -0
- package/models/operations/updateprompt.js +6664 -0
- package/models/operations/updateprompt.js.map +1 -0
- package/package.json +33 -0
- package/sdk/contacts.d.ts +12 -0
- package/sdk/contacts.d.ts.map +1 -0
- package/sdk/contacts.js +22 -0
- package/sdk/contacts.js.map +1 -0
- package/sdk/deployments.d.ts +41 -0
- package/sdk/deployments.d.ts.map +1 -0
- package/sdk/deployments.js +59 -0
- package/sdk/deployments.js.map +1 -0
- package/sdk/feedback.d.ts +12 -0
- package/sdk/feedback.d.ts.map +1 -0
- package/sdk/feedback.js +22 -0
- package/sdk/feedback.js.map +1 -0
- package/sdk/files.d.ts +19 -0
- package/sdk/files.d.ts.map +1 -0
- package/sdk/files.js +32 -0
- package/sdk/files.js.map +1 -0
- package/sdk/index.d.ts +2 -0
- package/sdk/index.d.ts.map +1 -0
- package/sdk/index.js +21 -0
- package/sdk/index.js.map +1 -0
- package/sdk/metrics.d.ts +12 -0
- package/sdk/metrics.d.ts.map +1 -0
- package/sdk/metrics.js +22 -0
- package/sdk/metrics.js.map +1 -0
- package/sdk/prompt.d.ts +10 -0
- package/sdk/prompt.d.ts.map +1 -0
- package/sdk/prompt.js +21 -0
- package/sdk/prompt.js.map +1 -0
- package/sdk/prompts.d.ts +33 -0
- package/sdk/prompts.d.ts.map +1 -0
- package/sdk/prompts.js +61 -0
- package/sdk/prompts.js.map +1 -0
- package/sdk/remoteconfig.d.ts +9 -0
- package/sdk/remoteconfig.d.ts.map +1 -0
- package/sdk/remoteconfig.js +19 -0
- package/sdk/remoteconfig.js.map +1 -0
- package/sdk/sdk.d.ts +25 -0
- package/sdk/sdk.d.ts.map +1 -0
- package/sdk/sdk.js +46 -0
- package/sdk/sdk.js.map +1 -0
- package/sdk/snippets.d.ts +9 -0
- package/sdk/snippets.d.ts.map +1 -0
- package/sdk/snippets.js +19 -0
- package/sdk/snippets.js.map +1 -0
- package/sdk/templates.d.ts +9 -0
- package/sdk/templates.d.ts.map +1 -0
- package/sdk/templates.js +19 -0
- package/sdk/templates.js.map +1 -0
- package/src/core.ts +13 -0
- package/src/funcs/contactsCreate.ts +123 -0
- package/src/funcs/deploymentsAll.ts +137 -0
- package/src/funcs/deploymentsGetConfig.ts +131 -0
- package/src/funcs/deploymentsInvalidate.ts +132 -0
- package/src/funcs/deploymentsInvoke.ts +134 -0
- package/src/funcs/deploymentsMetricsCreate.ts +131 -0
- package/src/funcs/feedbackCreate.ts +123 -0
- package/src/funcs/filesBulkUpload.ts +125 -0
- package/src/funcs/filesUpload.ts +144 -0
- package/src/funcs/promptSnippetsFindOne.ts +127 -0
- package/src/funcs/promptTemplatesGetAll.ts +129 -0
- package/src/funcs/promptsCreate.ts +123 -0
- package/src/funcs/promptsCreateVersion.ts +128 -0
- package/src/funcs/promptsDelete.ts +127 -0
- package/src/funcs/promptsDuplicate.ts +127 -0
- package/src/funcs/promptsGetAll.ts +127 -0
- package/src/funcs/promptsGetOne.ts +127 -0
- package/src/funcs/promptsUpdate.ts +135 -0
- package/src/funcs/remoteconfigGetConfig.ts +124 -0
- package/src/hooks/hooks.ts +112 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/registration.ts +14 -0
- package/src/hooks/types.ts +102 -0
- package/src/index.ts +7 -0
- package/src/lib/base64.ts +37 -0
- package/src/lib/config.ts +60 -0
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +449 -0
- package/src/lib/env.ts +41 -0
- package/src/lib/event-streams.ts +264 -0
- package/src/lib/files.ts +40 -0
- package/src/lib/http.ts +323 -0
- package/src/lib/is-plain-object.ts +43 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +325 -0
- package/src/lib/primitives.ts +122 -0
- package/src/lib/retries.ts +219 -0
- package/src/lib/schemas.ts +86 -0
- package/src/lib/sdks.ts +392 -0
- package/src/lib/security.ts +254 -0
- package/src/lib/url.ts +33 -0
- package/src/models/components/deployments.ts +1607 -0
- package/src/models/components/index.ts +6 -0
- package/src/models/components/security.ts +71 -0
- package/src/models/errors/apierror.ts +27 -0
- package/src/models/errors/honoapierror.ts +82 -0
- package/src/models/errors/httpclienterrors.ts +62 -0
- package/src/models/errors/index.ts +9 -0
- package/src/models/errors/sdkvalidationerror.ts +97 -0
- package/src/models/errors/updateprompt.ts +71 -0
- package/src/models/operations/bulkfileupload.ts +304 -0
- package/src/models/operations/createcontact.ts +256 -0
- package/src/models/operations/createfeedback.ts +286 -0
- package/src/models/operations/createprompt.ts +3451 -0
- package/src/models/operations/createpromptversion.ts +3693 -0
- package/src/models/operations/deleteprompt.ts +69 -0
- package/src/models/operations/deploymentcreatemetric.ts +1790 -0
- package/src/models/operations/deploymentgetconfig.ts +3416 -0
- package/src/models/operations/deploymentinvoke.ts +2383 -0
- package/src/models/operations/deployments.ts +2084 -0
- package/src/models/operations/duplicateprompt.ts +69 -0
- package/src/models/operations/fileupload.ts +311 -0
- package/src/models/operations/findonepromptsnippet.ts +13617 -0
- package/src/models/operations/getallprompts.ts +13378 -0
- package/src/models/operations/getallprompttemplates.ts +13678 -0
- package/src/models/operations/getoneprompt.ts +69 -0
- package/src/models/operations/index.ts +23 -0
- package/src/models/operations/invaliddeployment.ts +75 -0
- package/src/models/operations/remoteconfigsgetconfig.ts +190 -0
- package/src/models/operations/updateprompt.ts +14393 -0
- package/src/sdk/contacts.ts +27 -0
- package/src/sdk/deployments.ts +93 -0
- package/src/sdk/feedback.ts +27 -0
- package/src/sdk/files.ts +45 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/metrics.ts +27 -0
- package/src/sdk/prompt.ts +19 -0
- package/src/sdk/prompts.ts +114 -0
- package/src/sdk/remoteconfig.ts +24 -0
- package/src/sdk/sdk.ts +49 -0
- package/src/sdk/snippets.ts +24 -0
- package/src/sdk/templates.ts +24 -0
- package/src/types/blobs.ts +31 -0
- package/src/types/constdatetime.ts +15 -0
- package/src/types/enums.ts +16 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +11 -0
- package/src/types/operations.ts +105 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/streams.ts +21 -0
- package/types/blobs.d.ts +4 -0
- package/types/blobs.d.ts.map +1 -0
- package/types/blobs.js +62 -0
- package/types/blobs.js.map +1 -0
- package/types/constdatetime.d.ts +3 -0
- package/types/constdatetime.d.ts.map +1 -0
- package/types/constdatetime.js +46 -0
- package/types/constdatetime.js.map +1 -0
- package/types/enums.d.ts +12 -0
- package/types/enums.d.ts.map +1 -0
- package/types/enums.js +10 -0
- package/types/enums.js.map +1 -0
- package/types/fp.d.ts +31 -0
- package/types/fp.d.ts.map +1 -0
- package/types/fp.js +37 -0
- package/types/fp.js.map +1 -0
- package/types/index.d.ts +8 -0
- package/types/index.d.ts.map +1 -0
- package/types/index.js +16 -0
- package/types/index.js.map +1 -0
- package/types/operations.d.ts +27 -0
- package/types/operations.d.ts.map +1 -0
- package/types/operations.js +83 -0
- package/types/operations.js.map +1 -0
- package/types/rfcdate.d.ts +21 -0
- package/types/rfcdate.d.ts.map +1 -0
- package/types/rfcdate.js +46 -0
- package/types/rfcdate.js.map +1 -0
- package/types/streams.d.ts +2 -0
- package/types/streams.d.ts.map +1 -0
- package/types/streams.js +18 -0
- package/types/streams.js.map +1 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
# Deployments
|
|
2
|
+
(*deployments*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [all](#all) - List all deployments
|
|
9
|
+
* [invalidate](#invalidate) - Invalidates cache
|
|
10
|
+
* [getConfig](#getconfig) - Get config
|
|
11
|
+
* [invoke](#invoke) - Invoke
|
|
12
|
+
|
|
13
|
+
## all
|
|
14
|
+
|
|
15
|
+
Returns a list of your deployments. The deployments are returned sorted by creation date, with the most recent deployments appearing first.
|
|
16
|
+
|
|
17
|
+
### Example Usage
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { Orq } from "@orq-ai/node";
|
|
21
|
+
|
|
22
|
+
const orq = new Orq({
|
|
23
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
async function run() {
|
|
27
|
+
const result = await orq.deployments.all();
|
|
28
|
+
|
|
29
|
+
// Handle the result
|
|
30
|
+
console.log(result);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
run();
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Standalone function
|
|
37
|
+
|
|
38
|
+
The standalone function version of this method:
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
42
|
+
import { deploymentsAll } from "@orq-ai/node/funcs/deploymentsAll.js";
|
|
43
|
+
|
|
44
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
45
|
+
// You can create one instance of it to use across an application.
|
|
46
|
+
const orq = new OrqCore({
|
|
47
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
async function run() {
|
|
51
|
+
const res = await deploymentsAll(orq);
|
|
52
|
+
|
|
53
|
+
if (!res.ok) {
|
|
54
|
+
throw res.error;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const { value: result } = res;
|
|
58
|
+
|
|
59
|
+
// Handle the result
|
|
60
|
+
console.log(result);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
run();
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Parameters
|
|
67
|
+
|
|
68
|
+
| Parameter | Type | Required | Description |
|
|
69
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
70
|
+
| `request` | [operations.DeploymentsRequest](../../models/operations/deploymentsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
71
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
72
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
73
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
74
|
+
|
|
75
|
+
### Response
|
|
76
|
+
|
|
77
|
+
**Promise\<[operations.DeploymentsResponseBody](../../models/operations/deploymentsresponsebody.md)\>**
|
|
78
|
+
|
|
79
|
+
### Errors
|
|
80
|
+
|
|
81
|
+
| Error Type | Status Code | Content Type |
|
|
82
|
+
| ------------------- | ------------------- | ------------------- |
|
|
83
|
+
| errors.HonoApiError | 500 | application/json |
|
|
84
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
85
|
+
|
|
86
|
+
## invalidate
|
|
87
|
+
|
|
88
|
+
Explicitly invalidate a cache of a deployment
|
|
89
|
+
|
|
90
|
+
### Example Usage
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
import { Orq } from "@orq-ai/node";
|
|
94
|
+
|
|
95
|
+
const orq = new Orq({
|
|
96
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
async function run() {
|
|
100
|
+
await orq.deployments.invalidate({
|
|
101
|
+
deploymentId: "e1106c66-dcfb-4003-a0e1-3c49405187d4",
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
run();
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Standalone function
|
|
111
|
+
|
|
112
|
+
The standalone function version of this method:
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
116
|
+
import { deploymentsInvalidate } from "@orq-ai/node/funcs/deploymentsInvalidate.js";
|
|
117
|
+
|
|
118
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
119
|
+
// You can create one instance of it to use across an application.
|
|
120
|
+
const orq = new OrqCore({
|
|
121
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
async function run() {
|
|
125
|
+
const res = await deploymentsInvalidate(orq, {
|
|
126
|
+
deploymentId: "e1106c66-dcfb-4003-a0e1-3c49405187d4",
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
if (!res.ok) {
|
|
130
|
+
throw res.error;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
const { value: result } = res;
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
run();
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Parameters
|
|
142
|
+
|
|
143
|
+
| Parameter | Type | Required | Description |
|
|
144
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
145
|
+
| `request` | [operations.InvalidDeploymentRequest](../../models/operations/invaliddeploymentrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
146
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
147
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
148
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
149
|
+
|
|
150
|
+
### Response
|
|
151
|
+
|
|
152
|
+
**Promise\<void\>**
|
|
153
|
+
|
|
154
|
+
### Errors
|
|
155
|
+
|
|
156
|
+
| Error Type | Status Code | Content Type |
|
|
157
|
+
| --------------- | --------------- | --------------- |
|
|
158
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
159
|
+
|
|
160
|
+
## getConfig
|
|
161
|
+
|
|
162
|
+
Retrieve the deployment configuration
|
|
163
|
+
|
|
164
|
+
### Example Usage
|
|
165
|
+
|
|
166
|
+
```typescript
|
|
167
|
+
import { Orq } from "@orq-ai/node";
|
|
168
|
+
|
|
169
|
+
const orq = new Orq({
|
|
170
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
async function run() {
|
|
174
|
+
const result = await orq.deployments.getConfig({
|
|
175
|
+
key: "<key>",
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
// Handle the result
|
|
179
|
+
console.log(result);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
run();
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Standalone function
|
|
186
|
+
|
|
187
|
+
The standalone function version of this method:
|
|
188
|
+
|
|
189
|
+
```typescript
|
|
190
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
191
|
+
import { deploymentsGetConfig } from "@orq-ai/node/funcs/deploymentsGetConfig.js";
|
|
192
|
+
|
|
193
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
194
|
+
// You can create one instance of it to use across an application.
|
|
195
|
+
const orq = new OrqCore({
|
|
196
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
async function run() {
|
|
200
|
+
const res = await deploymentsGetConfig(orq, {
|
|
201
|
+
key: "<key>",
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
if (!res.ok) {
|
|
205
|
+
throw res.error;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const { value: result } = res;
|
|
209
|
+
|
|
210
|
+
// Handle the result
|
|
211
|
+
console.log(result);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
run();
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Parameters
|
|
218
|
+
|
|
219
|
+
| Parameter | Type | Required | Description |
|
|
220
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
221
|
+
| `request` | [operations.DeploymentGetConfigRequestBody](../../models/operations/deploymentgetconfigrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
222
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
223
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
224
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
225
|
+
|
|
226
|
+
### Response
|
|
227
|
+
|
|
228
|
+
**Promise\<[operations.DeploymentGetConfigResponseBody](../../models/operations/deploymentgetconfigresponsebody.md)\>**
|
|
229
|
+
|
|
230
|
+
### Errors
|
|
231
|
+
|
|
232
|
+
| Error Type | Status Code | Content Type |
|
|
233
|
+
| --------------- | --------------- | --------------- |
|
|
234
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
235
|
+
|
|
236
|
+
## invoke
|
|
237
|
+
|
|
238
|
+
Invoke a deployment with a given payload
|
|
239
|
+
|
|
240
|
+
### Example Usage
|
|
241
|
+
|
|
242
|
+
```typescript
|
|
243
|
+
import { Orq } from "@orq-ai/node";
|
|
244
|
+
|
|
245
|
+
const orq = new Orq({
|
|
246
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
247
|
+
});
|
|
248
|
+
|
|
249
|
+
async function run() {
|
|
250
|
+
const result = await orq.deployments.invoke({
|
|
251
|
+
key: "<key>",
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
for await (const event of result) {
|
|
255
|
+
// Handle the event
|
|
256
|
+
console.log(event);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
run();
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Standalone function
|
|
264
|
+
|
|
265
|
+
The standalone function version of this method:
|
|
266
|
+
|
|
267
|
+
```typescript
|
|
268
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
269
|
+
import { deploymentsInvoke } from "@orq-ai/node/funcs/deploymentsInvoke.js";
|
|
270
|
+
|
|
271
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
272
|
+
// You can create one instance of it to use across an application.
|
|
273
|
+
const orq = new OrqCore({
|
|
274
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
async function run() {
|
|
278
|
+
const res = await deploymentsInvoke(orq, {
|
|
279
|
+
key: "<key>",
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
if (!res.ok) {
|
|
283
|
+
throw res.error;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
const { value: result } = res;
|
|
287
|
+
|
|
288
|
+
for await (const event of result) {
|
|
289
|
+
// Handle the event
|
|
290
|
+
console.log(event);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
run();
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Parameters
|
|
298
|
+
|
|
299
|
+
| Parameter | Type | Required | Description |
|
|
300
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
301
|
+
| `request` | [components.Deployments](../../models/components/deployments.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
302
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
303
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
304
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
305
|
+
|
|
306
|
+
### Response
|
|
307
|
+
|
|
308
|
+
**Promise\<[operations.DeploymentInvokeResponse](../../models/operations/deploymentinvokeresponse.md)\>**
|
|
309
|
+
|
|
310
|
+
### Errors
|
|
311
|
+
|
|
312
|
+
| Error Type | Status Code | Content Type |
|
|
313
|
+
| --------------- | --------------- | --------------- |
|
|
314
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Feedback
|
|
2
|
+
(*feedback*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [create](#create) - Submit feedback
|
|
9
|
+
|
|
10
|
+
## create
|
|
11
|
+
|
|
12
|
+
Submit feedback for the LLM transaction via the API
|
|
13
|
+
|
|
14
|
+
### Example Usage
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { Orq } from "@orq-ai/node";
|
|
18
|
+
|
|
19
|
+
const orq = new Orq({
|
|
20
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
async function run() {
|
|
24
|
+
const result = await orq.feedback.create({
|
|
25
|
+
field: "rating",
|
|
26
|
+
value: [
|
|
27
|
+
"good",
|
|
28
|
+
],
|
|
29
|
+
traceId: "67HTZ65Z9W91HSF51CW68KK1QH",
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
// Handle the result
|
|
33
|
+
console.log(result);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
run();
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Standalone function
|
|
40
|
+
|
|
41
|
+
The standalone function version of this method:
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
45
|
+
import { feedbackCreate } from "@orq-ai/node/funcs/feedbackCreate.js";
|
|
46
|
+
|
|
47
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
48
|
+
// You can create one instance of it to use across an application.
|
|
49
|
+
const orq = new OrqCore({
|
|
50
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
async function run() {
|
|
54
|
+
const res = await feedbackCreate(orq, {
|
|
55
|
+
field: "rating",
|
|
56
|
+
value: [
|
|
57
|
+
"good",
|
|
58
|
+
],
|
|
59
|
+
traceId: "67HTZ65Z9W91HSF51CW68KK1QH",
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
if (!res.ok) {
|
|
63
|
+
throw res.error;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const { value: result } = res;
|
|
67
|
+
|
|
68
|
+
// Handle the result
|
|
69
|
+
console.log(result);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
run();
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Parameters
|
|
76
|
+
|
|
77
|
+
| Parameter | Type | Required | Description |
|
|
78
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
79
|
+
| `request` | [operations.CreateFeedbackRequestBody](../../models/operations/createfeedbackrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
80
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
81
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
82
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
83
|
+
|
|
84
|
+
### Response
|
|
85
|
+
|
|
86
|
+
**Promise\<[operations.CreateFeedbackResponseBody](../../models/operations/createfeedbackresponsebody.md)\>**
|
|
87
|
+
|
|
88
|
+
### Errors
|
|
89
|
+
|
|
90
|
+
| Error Type | Status Code | Content Type |
|
|
91
|
+
| --------------- | --------------- | --------------- |
|
|
92
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# Files
|
|
2
|
+
(*files*)
|
|
3
|
+
|
|
4
|
+
## Overview
|
|
5
|
+
|
|
6
|
+
### Available Operations
|
|
7
|
+
|
|
8
|
+
* [upload](#upload) - Upload file
|
|
9
|
+
* [bulkUpload](#bulkupload) - Bulk upload file
|
|
10
|
+
|
|
11
|
+
## upload
|
|
12
|
+
|
|
13
|
+
Files are used to upload documents that can be used with features like [Deployments](https://docs.orq.ai/reference/post_v2-deployments-get-config).
|
|
14
|
+
|
|
15
|
+
### Example Usage
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { Orq } from "@orq-ai/node";
|
|
19
|
+
|
|
20
|
+
const orq = new Orq({
|
|
21
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
async function run() {
|
|
25
|
+
const result = await orq.files.upload();
|
|
26
|
+
|
|
27
|
+
// Handle the result
|
|
28
|
+
console.log(result);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
run();
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Standalone function
|
|
35
|
+
|
|
36
|
+
The standalone function version of this method:
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
40
|
+
import { filesUpload } from "@orq-ai/node/funcs/filesUpload.js";
|
|
41
|
+
|
|
42
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
43
|
+
// You can create one instance of it to use across an application.
|
|
44
|
+
const orq = new OrqCore({
|
|
45
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
async function run() {
|
|
49
|
+
const res = await filesUpload(orq);
|
|
50
|
+
|
|
51
|
+
if (!res.ok) {
|
|
52
|
+
throw res.error;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const { value: result } = res;
|
|
56
|
+
|
|
57
|
+
// Handle the result
|
|
58
|
+
console.log(result);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
run();
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Parameters
|
|
65
|
+
|
|
66
|
+
| Parameter | Type | Required | Description |
|
|
67
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
68
|
+
| `request` | [operations.FileUploadRequestBody](../../models/operations/fileuploadrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
69
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
70
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
71
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
72
|
+
|
|
73
|
+
### Response
|
|
74
|
+
|
|
75
|
+
**Promise\<[operations.FileUploadResponseBody](../../models/operations/fileuploadresponsebody.md)\>**
|
|
76
|
+
|
|
77
|
+
### Errors
|
|
78
|
+
|
|
79
|
+
| Error Type | Status Code | Content Type |
|
|
80
|
+
| --------------- | --------------- | --------------- |
|
|
81
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
82
|
+
|
|
83
|
+
## bulkUpload
|
|
84
|
+
|
|
85
|
+
Files are used to upload documents that can be used with features like [Deployments](https://docs.orq.ai/reference/post_v2-deployments-get-config).
|
|
86
|
+
|
|
87
|
+
### Example Usage
|
|
88
|
+
|
|
89
|
+
```typescript
|
|
90
|
+
import { Orq } from "@orq-ai/node";
|
|
91
|
+
import { openAsBlob } from "node:fs";
|
|
92
|
+
|
|
93
|
+
const orq = new Orq({
|
|
94
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
async function run() {
|
|
98
|
+
const result = await orq.files.bulkUpload({
|
|
99
|
+
files: [
|
|
100
|
+
{
|
|
101
|
+
fileName: "example.file",
|
|
102
|
+
content: await openAsBlob("example.file"),
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
purpose: "retrieval",
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
// Handle the result
|
|
109
|
+
console.log(result);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
run();
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Standalone function
|
|
116
|
+
|
|
117
|
+
The standalone function version of this method:
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
import { OrqCore } from "@orq-ai/node/core.js";
|
|
121
|
+
import { filesBulkUpload } from "@orq-ai/node/funcs/filesBulkUpload.js";
|
|
122
|
+
import { openAsBlob } from "node:fs";
|
|
123
|
+
|
|
124
|
+
// Use `OrqCore` for best tree-shaking performance.
|
|
125
|
+
// You can create one instance of it to use across an application.
|
|
126
|
+
const orq = new OrqCore({
|
|
127
|
+
apiKey: process.env["ORQ_API_KEY"] ?? "",
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
async function run() {
|
|
131
|
+
const res = await filesBulkUpload(orq, {
|
|
132
|
+
files: [
|
|
133
|
+
{
|
|
134
|
+
fileName: "example.file",
|
|
135
|
+
content: await openAsBlob("example.file"),
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
purpose: "retrieval",
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
if (!res.ok) {
|
|
142
|
+
throw res.error;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
const { value: result } = res;
|
|
146
|
+
|
|
147
|
+
// Handle the result
|
|
148
|
+
console.log(result);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
run();
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Parameters
|
|
155
|
+
|
|
156
|
+
| Parameter | Type | Required | Description |
|
|
157
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
158
|
+
| `request` | [operations.BulkFileUploadRequestBody](../../models/operations/bulkfileuploadrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
159
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
160
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
161
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
162
|
+
|
|
163
|
+
### Response
|
|
164
|
+
|
|
165
|
+
**Promise\<[operations.ResponseBody[]](../../models/.md)\>**
|
|
166
|
+
|
|
167
|
+
### Errors
|
|
168
|
+
|
|
169
|
+
| Error Type | Status Code | Content Type |
|
|
170
|
+
| --------------- | --------------- | --------------- |
|
|
171
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|