@aashil/pipeshub
v0.1.1
Published
<!-- Start Summary [summary] --> ## Summary
Readme
pipeshub-sdk-typescript
Summary
PipesHub API: Unified API documentation for PipesHub services.
PipesHub is an enterprise-grade platform providing:
- User authentication and management
- Document storage and version control
- Knowledge base management
- Enterprise search and conversational AI
- Third-party integrations via connectors
- System configuration management
- Crawling job scheduling
- Email services
Authentication
Most endpoints require JWT Bearer token authentication. Some internal endpoints use scoped tokens for service-to-service communication.
Base URLs
All endpoints use the /api/v1 prefix unless otherwise noted.
Table of Contents
SDK Installation
[!TIP] To finish publishing your SDK to npm and others you must run your first generation action.
The SDK can be installed with either npm, pnpm, bun or yarn package managers.
NPM
npm add <UNSET>PNPM
pnpm add <UNSET>Bun
bun add <UNSET>Yarn
yarn add <UNSET>[!NOTE] This package is published with CommonJS and ES Modules (ESM) support.
Requirements
For supported JavaScript runtimes, please consult RUNTIMES.md.
SDK Example Usage
Example
import { Pipeshub } from "pipeshub";
const pipeshub = new Pipeshub({
serverURL: "https://api.example.com",
});
async function run() {
const result = await pipeshub.userAccount.initializeAuth({
email: "[email protected]",
});
console.log(result);
}
run();
Authentication
Per-Client Security Schemes
This SDK supports the following security scheme globally:
| Name | Type | Scheme | Environment Variable |
| ------------ | ---- | ----------- | ---------------------- |
| bearerAuth | http | HTTP Bearer | PIPESHUB_BEARER_AUTH |
To authenticate with the API the bearerAuth parameter must be set when initializing the SDK client instance. For example:
import { Pipeshub } from "pipeshub";
const pipeshub = new Pipeshub({
serverURL: "https://api.example.com",
bearerAuth: process.env["PIPESHUB_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await pipeshub.userAccount.initializeAuth({
email: "[email protected]",
});
console.log(result);
}
run();
Per-Operation Security Schemes
Some operations in this SDK require the security scheme to be specified at the request level. For example:
import { Pipeshub } from "pipeshub";
const pipeshub = new Pipeshub({
serverURL: "https://api.example.com",
});
async function run() {
const result = await pipeshub.userAccount.resetPasswordWithToken({
scopedToken: process.env["PIPESHUB_SCOPED_TOKEN"] ?? "",
}, {
password: "H9GEHoL829GXj06",
});
console.log(result);
}
run();
Available Resources and Operations
AgentConversations
- list - List agent conversations
- start - Create agent conversation
- stream - Create agent conversation with streaming
- get - Get agent conversation
- delete - Delete agent conversation
- addMessage - Add message to agent conversation
- streamMessage - Add message with streaming
- regenerate - Regenerate agent response
Agents
- list - List agents
- create - Create agent
- listTools - List available tools
- get - Get agent
- update - Update agent
- delete - Delete agent
- getPermissions - Get agent permissions
- updatePermissions - Update agent permissions
- share - Share agent
- unshare - Revoke agent access
AgentTemplates
- list - List agent templates
- create - Create agent template
- get - Get agent template
- update - Update agent template
- delete - Delete agent template
AiModelsConfiguration
AiModelsProviders
- list - Get all AI model providers
- getByType - Get models by type
- getAvailableModelsByType - Get available models for selection
- add - Add new AI model provider
- update - Update AI model provider
- delete - Delete AI model provider
- setDefault - Set default AI model
AuthConfig
- getMicrosoft - Get Microsoft authentication configuration
AuthenticationConfiguration
- setAzureAdAuthConfig - Configure Azure AD authentication
- getAzureAd - Get Azure AD configuration
- setGoogleAuthConfig - Configure Google authentication
- getGoogle - Get Google authentication configuration
- setupSso - Configure SAML SSO authentication
- getSsoConfig - Get SAML SSO configuration
- setupOAuth - Configure generic OAuth provider
- getOAuth - Get generic OAuth configuration
AuthenticationConfigurations
- configureMicrosoft - Configure Microsoft authentication
Connector
- reindex - Reindex single record
- reindexRecordGroup - Reindex record group
- reindexFailed - Reindex failed connector records
- resync - Resync connector
- getStats - Get connector statistics
ConnectorConfiguration
- get - Get connector configuration
- update - Update connector configuration
- updateFiltersSync - Update filters and sync configuration
ConnectorConfigurations
- updateAuth - Update authentication configuration
- getGoogleWorkspaceCredentials - Get Google Workspace credentials status
ConnectorControl
- toggle - Toggle connector sync or agent
ConnectorFilters
- getOptions - Get filter options
- save - Save filter selections
- getFieldOptions - Get dynamic filter options
ConnectorInstances
- list - List connector instances
- create - Create connector instance
- listActive - List active connector instances
- listInactive - List inactive connector instances
- listConfigured - List configured connector instances
- getActiveAgents - List active agent connectors
- get - Get connector instance
- delete - Delete connector instance
- updateName - Update connector instance name
ConnectorOAuth
- getTokenFromCode - Exchange authorization code for tokens (legacy)
- getAuthorizationUrl - Get OAuth authorization URL
- handleCallback - OAuth callback handler
ConnectorOauthConfiguration
- getAtlassianConfig - Get Atlassian OAuth configuration
- getOneDriveConfig - Get OneDrive configuration
ConnectorOAuthConfiguration
- createGoogleWorkspaceCredentials - Upload Google Workspace credentials
- getGoogleWorkspace - Get Google Workspace OAuth configuration
- setAtlassianConfig - Configure Atlassian OAuth
- getSharePointConfig - Get SharePoint configuration
ConnectorOAuthConfigurations
- setGoogleWorkspaceOauth - Configure Google Workspace OAuth
- configureOneDrive - Configure OneDrive connector
- setSharePointConfig - Configure SharePoint connector
ConnectorRegistry
ConnectorService
- checkHealth - [Connector Service] Health check
- postDrive - [Connector Service] Google Drive webhook
- internalStreamRecord - [Connector Service] Internal stream record
- convertRecordBuffer - [Connector Service] Convert record buffer
- getStats - [Connector Service] Get connector statistics
- getSignedUrl - [Connector Service] Get signed URL for record
ConnectorServices
- reindexFailedRecords - [Connector Service] Reindex all failed records
Conversations
- create - Create a new AI conversation
- stream - Create conversation with streaming response
- list - List all conversations
- listArchived - List archived conversations
- get - Get conversation by ID
- delete - Delete conversation
- addMessage - Add message to conversation
- addMessageStream - Add message with streaming response
- share - Share conversation with users
- unshare - Revoke conversation access
- updateTitle - Update conversation title
- patchArchive - Archive conversation
- unarchive - Unarchive conversation
- regenerateAnswer - Regenerate AI response
- updateMessageFeedback - Submit feedback on AI response
CrawlingJobs
- schedule - Schedule a crawling job
- getStatus - Get crawling job status
- remove - Remove a crawling job
- pause - Pause a crawling job
- resume - Resume a paused crawling job
- list - Get all crawling job statuses
- removeAll - Remove all crawling jobs
DoclingService
- healthCheck - [Docling Service] Health check
- processPdf - [Docling Service] Process PDF document
- parsePdf - [Docling Service] Parse PDF (Phase 1)
- createBlocks - [Docling Service] Create blocks from parse result (Phase 2)
DocumentBuffer
DocumentManagement
DocumentUpload
- upload - Upload a new document
- createPlaceholder - Create document placeholder
- getDirectUploadUrl - Get direct upload URL
EmailOperations
- send - Send a transactional email
Folders
- create - Create root folder
- getContents - Get folder contents
- update - Update folder
- delete - Delete folder
- createSubfolder - Create subfolder
IndexingService
- health - [Indexing Service] Health check
KnowledgeBases
- create - Create a new knowledge base
- list - List all knowledge bases
- get - Get knowledge base by ID
- update - Update knowledge base
- delete - Delete knowledge base
- getRootNodes - Get knowledge hub root nodes
- getHubChildNodes - Get knowledge hub child nodes
MailConfiguration
- updateSmtp - Reload SMTP configuration
MetricsCollection
- getConfiguration - Get metrics collection configuration
- setPushInterval - Configure metrics push interval
- setServerUrl - Configure metrics server URL
MetricsCollections
- toggle - Enable or disable metrics collection
Oauth
- exchangeCode - Exchange OAuth authorization code for tokens
OauthApps
- list - List OAuth apps
- create - Create OAuth app
- listScopes - List available scopes
- get - Get OAuth app details
- update - Update OAuth app
- delete - Delete OAuth app
- regenerateSecret - Regenerate client secret
- suspend - Suspend OAuth app
- activate - Activate suspended OAuth app
- listTokens - List app tokens
- revokeAllTokens - Revoke all app tokens
OauthConfiguration
- getRegistry - List OAuth-capable connector types
- list - List OAuth configurations
- listConfigsByType - List OAuth configs for connector type
- get - Get OAuth configuration
- update - Update OAuth configuration
OAuthConfiguration
- create - Create OAuth configuration
OauthConfigurations
- getConnectorType - Get OAuth connector type details
- deleteConfiguration - Delete OAuth configuration
OauthProvider
- authorize - Initiate OAuth authorization flow
- submitConsent - Submit authorization consent
- exchange - Exchange authorization code for tokens
- revokeToken - Revoke an access or refresh token
- introspect - Introspect a token
OpenIDConnect
- getUserInfo - Get authenticated user information
- getConfiguration - OpenID Connect Discovery
- jwks - JSON Web Key Set
OrganizationAuthConfig
- getAuthMethods - Get organization authentication methods
OrganizationAuthConfigs
- create - Create organization authentication configuration
OrganizationAuthConfiguration
- updateMethod - Update organization authentication methods
Organizations
- checkExists - Check if organization exists
- create - Create organization
- getCurrent - Get current organization
- update - Update organization
- delete - Delete organization
- uploadLogo - Upload organization logo
- getLogo - Get organization logo
- deleteLogo - Delete organization logo
- getOnboardingStatus - Get onboarding status
- updateOnboardingStatus - Update onboarding status
Permissions
- grant - Grant permissions
- list - List permissions
- update - Update permissions
- remove - Remove permissions
PlatformSettings
- update - Update platform settings
- get - Get platform settings
- getFeatureFlags - Get available feature flags
- updateSystemPrompt - Update custom system prompt
- getCustomSystemPrompt - Get custom system prompt
PublicUrls
- setFrontendUrl - Set frontend public URL
- getFrontend - Get frontend public URL
- setConnector - Set connector public URL
- getConnector - Get connector public URL
QueryService
- search - [Query Service] Semantic search
- chat - [Query Service] Chat with knowledge base
- chatStream - [Query Service] Streaming chat with knowledge base
- healthCheck - [Query Service] AI model health check
- listTools - [Query Service] List available agent tools
QueryServices
- getHealth - [Query Service] Health check
QueueManagement
- getStats - Get queue statistics
Records
- get - Get all records across knowledge bases
- list - Get records for a knowledge base
- getById - Get record by ID
- update - Update record
- delete - Delete record
- streamContent - Stream record content
- move - Move a record to another folder
Saml
- signIn - Initiate SAML sign-in flow
- callback - SAML authentication callback
- updateAppConfig - Reload SAML application configuration (Internal)
SemanticSearch
- postSearch - Perform semantic search
- getHistory - Get search history
- deleteAllHistory - Clear all search history
- getById - Get search by ID
- delete - Delete search
- patchShare - Share search results
- unshare - Revoke search access
- archive - Archive search
- unarchive - Unarchive search
SmtpConfiguration
- createOrUpdate - Create or update SMTP configuration
- get - Get SMTP configuration
StorageConfiguration
- configureLocal - Configure Local Storage
- createS3StorageConfig - Configure AWS S3 Storage
- createAzureBlob - Configure Azure Blob Storage
- get - Get current storage configuration
Teams
- create - Create a team
- list - List teams
- get - Get team by ID
- update - Update team
- delete - Delete team
- getUsers - Get team members
- addUsers - Add users to team
- removeUsers - Remove users from team
- updatePermissions - Update user role in team
- getUser - Get current user's teams
- getCreatedByUser - Get teams created by current user
Upload
- files - Upload files to knowledge base
- toFolder - Upload files to folder
- getLimits - Get upload limits
UserAccount
- initializeAuth - Initialize authentication session
- authenticate - Authenticate user with credentials
- generateLoginOtp - Generate and send OTP for login
- resetPassword - Reset password (authenticated user)
- forgotPassword - Request password reset email
- resetPasswordWithToken - Reset password with email token
- checkPasswordStatus - Check if user has password set (Internal)
- refresh - Refresh access token
- logout - Logout current session
UserGroups
- create - Create user group
- list - Get all user groups
- getById - Get user group by ID
- update - Update user group
- delete - Delete user group
- addUsers - Add users to group
- removeUsers - Remove users from group
- getUsers - Get users in a group
- getUserGroups - Get groups for a user
- getStats - Get user group statistics
Users
- get - Get all users
- create - Create a new user
- getById - Get user by ID
- update - Update user
- delete - Delete user
- fetchWithGroups - Get all users with their groups
- getEmail - Get user email by ID
- getByIds - Get users by IDs (bulk)
- checkExistsByEmail - Check if user exists by email
- getInternal - Get user (internal service-to-service)
- updateFullName - Update user full name
- updateFirstName - Update user first name
- updateLastName - Update user last name
- updateDesignation - Update user designation
- checkIsAdmin - Check if user is admin
- uploadDisplayPicture - Upload display picture
- getDisplayPicture - Get display picture
- removeDisplayPicture - Remove display picture
- bulkInvite - Bulk invite users
- resendInvite - Resend user invite
- listGraph - List users (paginated with graph data)
- listTeams - Get current user's teams
VersionControl
- uploadNext - Upload next version
- rollBack - Rollback to previous version
- checkModified - Check if document is modified
Webhooks
- verifyGmail - [Connector Service] Gmail webhook verification
- postGmail - [Connector Service] Gmail webhook
- handle - [Connector Service] Google Workspace Admin webhook
Standalone functions
All the methods listed above are available as standalone functions. These functions are ideal for use in applications running in the browser, serverless runtimes or other environments where application bundle size is a primary concern. When using a bundler to build your application, all unused functionality will be either excluded from the final bundle or tree-shaken away.
To read more about standalone functions, check FUNCTIONS.md.
agentConversationsAddMessage- Add message to agent conversationagentConversationsDelete- Delete agent conversationagentConversationsGet- Get agent conversationagentConversationsList- List agent conversationsagentConversationsRegenerate- Regenerate agent responseagentConversationsStart- Create agent conversationagentConversationsStream- Create agent conversation with streamingagentConversationsStreamMessage- Add message with streamingagentsCreate- Create agentagentsDelete- Delete agentagentsGet- Get agentagentsGetPermissions- Get agent permissionsagentsList- List agentsagentsListTools- List available toolsagentsShare- Share agentagentsUnshare- Revoke agent accessagentsUpdate- Update agentagentsUpdatePermissions- Update agent permissionsagentTemplatesCreate- Create agent templateagentTemplatesDelete- Delete agent templateagentTemplatesGet- Get agent templateagentTemplatesList- List agent templatesagentTemplatesUpdate- Update agent templateaiModelsConfigurationCreate- Bulk create AI models configurationaiModelsConfigurationGetAll- Get all AI models configurationaiModelsProvidersAdd- Add new AI model provideraiModelsProvidersDelete- Delete AI model provideraiModelsProvidersGetAvailableModelsByType- Get available models for selectionaiModelsProvidersGetByType- Get models by typeaiModelsProvidersList- Get all AI model providersaiModelsProvidersSetDefault- Set default AI modelaiModelsProvidersUpdate- Update AI model providerauthConfigGetMicrosoft- Get Microsoft authentication configurationauthenticationConfigurationGetAzureAd- Get Azure AD configurationauthenticationConfigurationGetGoogle- Get Google authentication configurationauthenticationConfigurationGetOAuth- Get generic OAuth configurationauthenticationConfigurationGetSsoConfig- Get SAML SSO configurationauthenticationConfigurationsConfigureMicrosoft- Configure Microsoft authenticationauthenticationConfigurationSetAzureAdAuthConfig- Configure Azure AD authenticationauthenticationConfigurationSetGoogleAuthConfig- Configure Google authenticationauthenticationConfigurationSetupOAuth- Configure generic OAuth providerauthenticationConfigurationSetupSso- Configure SAML SSO authenticationconnectorConfigurationGet- Get connector configurationconnectorConfigurationsGetGoogleWorkspaceCredentials- Get Google Workspace credentials statusconnectorConfigurationsUpdateAuth- Update authentication configurationconnectorConfigurationUpdate- Update connector configurationconnectorConfigurationUpdateFiltersSync- Update filters and sync configurationconnectorControlToggle- Toggle connector sync or agentconnectorFiltersGetFieldOptions- Get dynamic filter optionsconnectorFiltersGetOptions- Get filter optionsconnectorFiltersSave- Save filter selectionsconnectorGetStats- Get connector statisticsconnectorInstancesCreate- Create connector instanceconnectorInstancesDelete- Delete connector instanceconnectorInstancesGet- Get connector instanceconnectorInstancesGetActiveAgents- List active agent connectorsconnectorInstancesList- List connector instancesconnectorInstancesListActive- List active connector instancesconnectorInstancesListConfigured- List configured connector instancesconnectorInstancesListInactive- List inactive connector instancesconnectorInstancesUpdateName- Update connector instance nameconnectorOAuthConfigurationCreateGoogleWorkspaceCredentials- Upload Google Workspace credentialsconnectorOauthConfigurationGetAtlassianConfig- Get Atlassian OAuth configurationconnectorOAuthConfigurationGetGoogleWorkspace- Get Google Workspace OAuth configurationconnectorOauthConfigurationGetOneDriveConfig- Get OneDrive configurationconnectorOAuthConfigurationGetSharePointConfig- Get SharePoint configurationconnectorOAuthConfigurationsConfigureOneDrive- Configure OneDrive connectorconnectorOAuthConfigurationSetAtlassianConfig- Configure Atlassian OAuthconnectorOAuthConfigurationsSetGoogleWorkspaceOauth- Configure Google Workspace OAuthconnectorOAuthConfigurationsSetSharePointConfig- Configure SharePoint connectorconnectorOAuthGetAuthorizationUrl- Get OAuth authorization URLconnectorOAuthGetTokenFromCode- Exchange authorization code for tokens (legacy)connectorOAuthHandleCallback- OAuth callback handlerconnectorRegistryGetSchema- Get connector configuration schemaconnectorRegistryList- List available connector typesconnectorReindex- Reindex single recordconnectorReindexFailed- Reindex failed connector recordsconnectorReindexRecordGroup- Reindex record groupconnectorResync- Resync connectorconnectorServiceCheckHealth- [Connector Service] Health checkconnectorServiceConvertRecordBuffer- [Connector Service] Convert record bufferconnectorServiceGetSignedUrl- [Connector Service] Get signed URL for recordconnectorServiceGetStats- [Connector Service] Get connector statisticsconnectorServiceInternalStreamRecord- [Connector Service] Internal stream recordconnectorServicePostDrive- [Connector Service] Google Drive webhookconnectorServicesReindexFailedRecords- [Connector Service] Reindex all failed recordsconversationsAddMessage- Add message to conversationconversationsAddMessageStream- Add message with streaming responseconversationsCreate- Create a new AI conversationconversationsDelete- Delete conversationconversationsGet- Get conversation by IDconversationsList- List all conversationsconversationsListArchived- List archived conversationsconversationsPatchArchive- Archive conversationconversationsRegenerateAnswer- Regenerate AI responseconversationsShare- Share conversation with usersconversationsStream- Create conversation with streaming responseconversationsUnarchive- Unarchive conversationconversationsUnshare- Revoke conversation accessconversationsUpdateMessageFeedback- Submit feedback on AI responseconversationsUpdateTitle- Update conversation titlecrawlingJobsGetStatus- Get crawling job statuscrawlingJobsList- Get all crawling job statusescrawlingJobsPause- Pause a crawling jobcrawlingJobsRemove- Remove a crawling jobcrawlingJobsRemoveAll- Remove all crawling jobscrawlingJobsResume- Resume a paused crawling jobcrawlingJobsSchedule- Schedule a crawling jobdoclingServiceCreateBlocks- [Docling Service] Create blocks from parse result (Phase 2)doclingServiceHealthCheck- [Docling Service] Health checkdoclingServiceParsePdf- [Docling Service] Parse PDF (Phase 1)doclingServiceProcessPdf- [Docling Service] Process PDF documentdocumentBufferGet- Get document bufferdocumentBufferUpdate- Update document bufferdocumentManagementDelete- Delete documentdocumentManagementDownload- Download documentdocumentManagementGetById- Get document by IDdocumentUploadCreatePlaceholder- Create document placeholderdocumentUploadGetDirectUploadUrl- Get direct upload URLdocumentUploadUpload- Upload a new documentemailOperationsSend- Send a transactional emailfoldersCreate- Create root folderfoldersCreateSubfolder- Create subfolderfoldersDelete- Delete folderfoldersGetContents- Get folder contentsfoldersUpdate- Update folderindexingServiceHealth- [Indexing Service] Health checkknowledgeBasesCreate- Create a new knowledge baseknowledgeBasesDelete- Delete knowledge baseknowledgeBasesGet- Get knowledge base by IDknowledgeBasesGetHubChildNodes- Get knowledge hub child nodesknowledgeBasesGetRootNodes- Get knowledge hub root nodesknowledgeBasesList- List all knowledge basesknowledgeBasesUpdate- Update knowledge basemailConfigurationUpdateSmtp- Reload SMTP configurationmetricsCollectionGetConfiguration- Get metrics collection configurationmetricsCollectionSetPushInterval- Configure metrics push intervalmetricsCollectionSetServerUrl- Configure metrics server URLmetricsCollectionsToggle- Enable or disable metrics collectionoauthAppsActivate- Activate suspended OAuth appoauthAppsCreate- Create OAuth appoauthAppsDelete- Delete OAuth appoauthAppsGet- Get OAuth app detailsoauthAppsList- List OAuth appsoauthAppsListScopes- List available scopesoauthAppsListTokens- List app tokensoauthAppsRegenerateSecret- Regenerate client secretoauthAppsRevokeAllTokens- Revoke all app tokensoauthAppsSuspend- Suspend OAuth appoauthAppsUpdate- Update OAuth appoAuthConfigurationCreate- Create OAuth configurationoauthConfigurationGet- Get OAuth configurationoauthConfigurationGetRegistry- List OAuth-capable connector typesoauthConfigurationList- List OAuth configurationsoauthConfigurationListConfigsByType- List OAuth configs for connector typeoauthConfigurationsDeleteConfiguration- Delete OAuth configurationoauthConfigurationsGetConnectorType- Get OAuth connector type detailsoauthConfigurationUpdate- Update OAuth configurationoauthExchangeCode- Exchange OAuth authorization code for tokensoauthProviderAuthorize- Initiate OAuth authorization flowoauthProviderExchange- Exchange authorization code for tokensoauthProviderIntrospect- Introspect a tokenoauthProviderRevokeToken- Revoke an access or refresh tokenoauthProviderSubmitConsent- Submit authorization consentopenIDConnectGetConfiguration- OpenID Connect DiscoveryopenIDConnectGetUserInfo- Get authenticated user informationopenIDConnectJwks- JSON Web Key SetorganizationAuthConfigGetAuthMethods- Get organization authentication methodsorganizationAuthConfigsCreate- Create organization authentication configurationorganizationAuthConfigurationUpdateMethod- Update organization authentication methodsorganizationsCheckExists- Check if organization existsorganizationsCreate- Create organizationorganizationsDelete- Delete organizationorganizationsDeleteLogo- Delete organization logoorganizationsGetCurrent- Get current organizationorganizationsGetLogo- Get organization logoorganizationsGetOnboardingStatus- Get onboarding statusorganizationsUpdate- Update organizationorganizationsUpdateOnboardingStatus- Update onboarding statusorganizationsUploadLogo- Upload organization logopermissionsGrant- Grant permissionspermissionsList- List permissionspermissionsRemove- Remove permissionspermissionsUpdate- Update permissionsplatformSettingsGet- Get platform settingsplatformSettingsGetCustomSystemPrompt- Get custom system promptplatformSettingsGetFeatureFlags- Get available feature flagsplatformSettingsUpdate- Update platform settingsplatformSettingsUpdateSystemPrompt- Update custom system promptpublicUrlsGetConnector- Get connector public URLpublicUrlsGetFrontend- Get frontend public URLpublicUrlsSetConnector- Set connector public URLpublicUrlsSetFrontendUrl- Set frontend public URLqueryServiceChat- [Query Service] Chat with knowledge basequeryServiceChatStream- [Query Service] Streaming chat with knowledge basequeryServiceHealthCheck- [Query Service] AI model health checkqueryServiceListTools- [Query Service] List available agent toolsqueryServiceSearch- [Query Service] Semantic searchqueryServicesGetHealth- [Query Service] Health checkqueueManagementGetStats- Get queue statisticsrecordsDelete- Delete recordrecordsGet- Get all records across knowledge basesrecordsGetById- Get record by IDrecordsList- Get records for a knowledge baserecordsMove- Move a record to another folderrecordsStreamContent- Stream record contentrecordsUpdate- Update recordsamlCallback- SAML authentication callbacksamlSignIn- Initiate SAML sign-in flowsamlUpdateAppConfig- Reload SAML application configuration (Internal)semanticSearchArchive- Archive searchsemanticSearchDelete- Delete searchsemanticSearchDeleteAllHistory- Clear all search historysemanticSearchGetById- Get search by IDsemanticSearchGetHistory- Get search historysemanticSearchPatchShare- Share search resultssemanticSearchPostSearch- Perform semantic searchsemanticSearchUnarchive- Unarchive searchsemanticSearchUnshare- Revoke search accesssmtpConfigurationCreateOrUpdate- Create or update SMTP configurationsmtpConfigurationGet- Get SMTP configurationstorageConfigurationConfigureLocal- Configure Local StoragestorageConfigurationCreateAzureBlob- Configure Azure Blob StoragestorageConfigurationCreateS3StorageConfig- Configure AWS S3 StoragestorageConfigurationGet- Get current storage configurationteamsAddUsers- Add users to teamteamsCreate- Create a teamteamsDelete- Delete teamteamsGet- Get team by IDteamsGetCreatedByUser- Get teams created by current userteamsGetUser- Get current user's teamsteamsGetUsers- Get team membersteamsList- List teamsteamsRemoveUsers- Remove users from teamteamsUpdate- Update teamteamsUpdatePermissions- Update user role in teamuploadFiles- Upload files to knowledge baseuploadGetLimits- Get upload limitsuploadToFolder- Upload files to folderuserAccountAuthenticate- Authenticate user with credentialsuserAccountCheckPasswordStatus- Check if user has password set (Internal)userAccountForgotPassword- Request password reset emailuserAccountGenerateLoginOtp- Generate and send OTP for loginuserAccountInitializeAuth- Initialize authentication sessionuserAccountLogout- Logout current sessionuserAccountRefresh- Refresh access tokenuserAccountResetPassword- Reset password (authenticated user)userAccountResetPasswordWithToken- Reset password with email tokenuserGroupsAddUsers- Add users to groupuserGroupsCreate- Create user groupuserGroupsDelete- Delete user groupuserGroupsGetById- Get user group by IDuserGroupsGetStats- Get user group statisticsuserGroupsGetUserGroups- Get groups for a useruserGroupsGetUsers- Get users in a groupuserGroupsList- Get all user groupsuserGroupsRemoveUsers- Remove users from groupuserGroupsUpdate- Update user groupusersBulkInvite- Bulk invite usersusersCheckExistsByEmail- Check if user exists by emailusersCheckIsAdmin- Check if user is adminusersCreate- Create a new userusersDelete- Delete userusersFetchWithGroups- Get all users with their groupsusersGet- Get all usersusersGetById- Get user by IDusersGetByIds- Get users by IDs (bulk)usersGetDisplayPicture- Get display pictureusersGetEmail- Get user email by IDusersGetInternal- Get user (internal service-to-service)usersListGraph- List users (paginated with graph data)usersListTeams- Get current user's teamsusersRemoveDisplayPicture- Remove display pictureusersResendInvite- Resend user inviteusersUpdate- Update userusersUpdateDesignation- Update user designationusersUpdateFirstName- Update user first nameusersUpdateFullName- Update user full nameusersUpdateLastName- Update user last nameusersUploadDisplayPicture- Upload display pictureversionControlCheckModified- Check if document is modifiedversionControlRollBack- Rollback to previous versionversionControlUploadNext- Upload next versionwebhooksHandle- [Connector Service] Google Workspace Admin webhookwebhooksPostGmail- [Connector Service] Gmail webhookwebhooksVerifyGmail- [Connector Service] Gmail webhook verification
Server-sent event streaming
[Server-sent events][mdn-sse] are used to stream content from certain
operations. These operations will expose the stream as an async iterable that
can be consumed using a [for await...of][mdn-for-await-of] loop. The loop will
terminate when the server no longer has any events to send and closes the
underlying connection.
import { Pipeshub } from "pipeshub";
const pipeshub = new Pipeshub({
serverURL: "https://api.example.com",
bearerAuth: process.env["PIPESHUB_BEARER_AUTH"] ?? "",
});
async function run() {
const result = await pipeshub.conversations.stream({
query: "What are the key findings from our Q4 financial report?",
recordIds: [
"507f1f77bcf86cd799439011",
"507f1f77bcf86cd799439012",
],
modelKey: "gpt-4-turbo",
model