Files
speckle-server/packages/server/modules/cross-server-sync/domain/operations.ts
T
Gergő Jedlicska 73cc7e67d3 gergo/webhookRegions (#3459)
* feat(webhooks): multi region webhook resolver

* feat(webhooks): multi region webhook cleanup

* fix(webhooks): DI fixes

* feat(activitystream): region aware save activity

* feat(accessrequests): multi region

* feat(cli): allow multi region project and commit download

* feat(postgres): make docker postgres 0 day multi region ready

* feat(cli): allow multi region project and commit download properly

* fix(cross-server-sync): di fix

* feat(activitystream): non region aware activities, they are not project data

* fix(webhooks): triggers need to be included

* feat(stream/projectCreate): activity save is not needed any more, its all event based

* feat(multiRegion): get all registered db clients

* fix(regions): test equal in any order

* fix(projectDownload): need to await
2024-11-08 10:45:39 +01:00

75 lines
1.8 KiB
TypeScript

import { type Logger } from '@/logging/logging'
import { StreamRecord } from '@/modules/core/helpers/types'
export type DownloadCommit = (
argv: {
/**
* A FE1 commit URL or an FE2 model/version URL
*/
commitUrl: string
/**
* ID of the local stream that should receive the commit
*/
targetStreamId: string
/**
* Stream branch that should receive the commit. Defaults to 'main'
*/
branchName?: string
/**
* Specify if target commit is private
*/
token?: string
/**
* Specify if you want comments to be pulled in also
*/
commentAuthorId?: string
/**
* Specify if you want to sync in automation statuses. If set to true, the Project.version
* query will be used, which might not be supported if you're targetting an old server instance.
*/
loadAutomations?: boolean
},
options?: Partial<{
logger: Logger
}>
) => Promise<{
linkToNewCommit: string
streamId: string
commitId: string
branchId: string
}>
export type DownloadProject = (
params: {
/**
* An FE2 project URL (must be publicly accessible)
*/
projectUrl: string
/**
* ID of user that should own the project locally
*/
authorId: string
syncComments?: boolean
/**
* Specify if target project is private
*/
token?: string
/**
* Specify a target workspace to download into
* The author needs to be member of the workspace
*/
workspaceId?: string
},
options?: Partial<{
logger: Logger
}>
) => Promise<{
newProjectUrl: string
projectId: string
project: StreamRecord
}>
export type GetOnboardingBaseProject = () => Promise<StreamRecord | undefined>
export type EnsureOnboardingProject = () => Promise<StreamRecord | undefined>