@taskforcehq/taskforce 0.3.302 → 0.3.304
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/dist/Taskforce.module.css +113 -5
- package/dist/TaskforceCore.js +560 -208
- package/dist/TaskforceCore.test.js +1833 -91
- package/dist/annotatedAttachments/service.d.ts +1 -1
- package/dist/annotatedAttachments/types.d.ts +1 -1
- package/dist/components/features/AgentsModule.js +1 -1
- package/dist/components/features/AgentsModule.test.js +1 -1
- package/dist/components/features/TaskSettings.js +58 -38
- package/dist/components/features/TaskSettings.test.js +139 -40
- package/dist/components/task/TaskActionHeader.d.ts +2 -1
- package/dist/components/task/TaskActionHeader.js +3 -3
- package/dist/components/task/TaskActionHeader.test.js +8 -0
- package/dist/components/task/TaskCard.js +16 -1
- package/dist/components/task/TaskCard.test.js +31 -0
- package/dist/components/task/TaskForm.d.ts +2 -1
- package/dist/components/task/TaskForm.js +22 -4
- package/dist/components/task/TaskForm.test.js +46 -0
- package/dist/components/task/TaskKanban.d.ts +1 -1
- package/dist/components/task/TaskKanban.js +31 -160
- package/dist/components/task/TaskKanban.test.js +17 -0
- package/dist/components/task/TaskStatusActions.d.ts +6 -1
- package/dist/components/task/TaskStatusActions.js +8 -3
- package/dist/components/task/TaskStatusActions.test.js +9 -0
- package/dist/components/task/taskKanbanDropRules.d.ts +58 -0
- package/dist/components/task/taskKanbanDropRules.js +187 -0
- package/dist/components/task/taskKanbanDropRules.test.d.ts +1 -0
- package/dist/components/task/taskKanbanDropRules.test.js +114 -0
- package/dist/components/ui/Modal.d.ts +1 -1
- package/dist/components/ui/Modal.js +1 -0
- package/dist/components/views/AppShellHeader.js +5 -1
- package/dist/components/views/AppShellHeader.test.js +4 -0
- package/dist/components/views/PlanComparisonPage.d.ts +3 -2
- package/dist/components/views/PlanComparisonPage.js +4 -2
- package/dist/components/views/PlanComparisonPage.test.js +4 -0
- package/dist/components/views/PlansPage.d.ts +7 -1
- package/dist/components/views/PlansPage.js +139 -53
- package/dist/components/views/PlansPage.test.d.ts +1 -0
- package/dist/components/views/PlansPage.test.js +157 -0
- package/dist/components/views/StandaloneLayout.d.ts +1 -0
- package/dist/components/views/StandaloneLayout.js +216 -186
- package/dist/components/views/WidgetView.js +11 -2
- package/dist/components/views/standalone/modals/AccountHubModal.d.ts +8 -3
- package/dist/components/views/standalone/modals/AccountHubModal.js +16 -2
- package/dist/components/views/standalone/modals/AccountHubModal.test.d.ts +1 -0
- package/dist/components/views/standalone/modals/AccountHubModal.test.js +26 -0
- package/dist/components/views/standalone/modals/SyncStatusModal.js +1 -1
- package/dist/core/DeletedTaskLifecycleService.d.ts +2 -1
- package/dist/core/EntitlementsPolicy.test.js +2 -2
- package/dist/core/GlobalSettingsService.js +78 -18
- package/dist/core/PlanEntitlementService.d.ts +31 -5
- package/dist/core/PlanEntitlementService.js +350 -222
- package/dist/core/SignupMonetizationSettings.test.js +208 -49
- package/dist/core/SystemAdmin.test.js +186 -96
- package/dist/core/TaskActivityService.d.ts +4 -1
- package/dist/core/TaskActivityService.js +45 -0
- package/dist/core/TaskAuditTimeline.test.js +52 -1
- package/dist/core/Taskforce.d.ts +65 -20
- package/dist/core/Taskforce.js +261 -51
- package/dist/core/Taskforce.mcpAuth.test.js +0 -2
- package/dist/core/UserProfileAvatarDrafts.test.js +12 -3
- package/dist/core/WorkspacePlanMode.test.js +65 -0
- package/dist/core/types.d.ts +11 -12
- package/dist/documentReviews/service.d.ts +1 -1
- package/dist/documentReviews/types.d.ts +1 -1
- package/dist/hooks/auth/useTaskforceAuthBootstrap.d.ts +48 -0
- package/dist/hooks/auth/useTaskforceAuthBootstrap.js +219 -0
- package/dist/hooks/sync/auth.d.ts +37 -0
- package/dist/hooks/sync/auth.js +61 -0
- package/dist/hooks/sync/bootstrap.d.ts +34 -0
- package/dist/hooks/sync/bootstrap.js +52 -0
- package/dist/hooks/sync/orchestratorShared.d.ts +36 -0
- package/dist/hooks/sync/orchestratorShared.js +209 -0
- package/dist/hooks/sync/orchestratorShared.test.d.ts +1 -0
- package/dist/hooks/sync/orchestratorShared.test.js +49 -0
- package/dist/hooks/sync/realtime.d.ts +25 -0
- package/dist/hooks/sync/realtime.js +60 -0
- package/dist/hooks/sync/recovery.d.ts +69 -0
- package/dist/hooks/sync/recovery.js +118 -0
- package/dist/hooks/sync/transfers.d.ts +122 -0
- package/dist/hooks/sync/transfers.js +431 -0
- package/dist/hooks/sync/useDataVersionRefresh.d.ts +16 -0
- package/dist/hooks/sync/useDataVersionRefresh.js +73 -0
- package/dist/hooks/ui/useResourceExport.d.ts +3 -1
- package/dist/hooks/ui/useResourceExport.js +5 -2
- package/dist/hooks/ui/useWorkflowTemplates.js +11 -6
- package/dist/hooks/useRealtimeSync.js +2 -1
- package/dist/hooks/useSyncOrchestrator.aiProfiles.test.js +8 -0
- package/dist/hooks/useSyncOrchestrator.context-assets.test.d.ts +1 -0
- package/dist/hooks/useSyncOrchestrator.context-assets.test.js +228 -0
- package/dist/hooks/useSyncOrchestrator.d.ts +5 -4
- package/dist/hooks/useSyncOrchestrator.js +315 -860
- package/dist/hooks/useSyncOrchestrator.retry-closure.test.js +665 -8
- package/dist/hooks/useTaskMutations.js +45 -6
- package/dist/hooks/useTaskMutations.test.js +147 -0
- package/dist/hooks/useTaskforce.d.ts +11 -2
- package/dist/hooks/useTaskforce.js +290 -812
- package/dist/hooks/useWorkspaceSyncController.d.ts +1 -0
- package/dist/hooks/useWorkspaceSyncController.js +22 -10
- package/dist/hooks/workspace/useTaskforceApiRouting.test.js +17 -0
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.d.ts +166 -0
- package/dist/hooks/workspace/useTaskforceWorkspaceBootstrap.js +434 -0
- package/dist/hooks/workspace/workspaceLocalState.d.ts +19 -0
- package/dist/hooks/workspace/workspaceLocalState.js +100 -0
- package/dist/hooks/workspace/workspaceLocalState.test.d.ts +1 -0
- package/dist/hooks/workspace/workspaceLocalState.test.js +59 -0
- package/dist/localization/locales/en-US.js +2 -2
- package/dist/mcp/canonicalAssetHelpers.d.ts +70 -0
- package/dist/mcp/canonicalAssetHelpers.js +259 -0
- package/dist/mcp/clientIntegrations.d.ts +12 -1
- package/dist/mcp/clientIntegrations.js +161 -6
- package/dist/mcp/clientIntegrations.test.js +76 -4
- package/dist/mcp/documentHelpers.d.ts +100 -0
- package/dist/mcp/documentHelpers.js +161 -0
- package/dist/mcp/runtime.js +264 -505
- package/dist/mcp/runtime.test.js +353 -89
- package/dist/mcp/taskAttachmentHelpers.d.ts +41 -0
- package/dist/mcp/taskAttachmentHelpers.js +60 -0
- package/dist/mcp/taskAttachmentTypes.d.ts +37 -0
- package/dist/mcp/taskAttachmentTypes.js +1 -0
- package/dist/migrations/billingSchemaParity.test.js +3 -0
- package/dist/migrations/taskSchemaMigrations.js +15 -0
- package/dist/plugins/vite.js +1 -1
- package/dist/runtime/appGateDefinitions.d.ts +1 -1
- package/dist/runtime/appGateDefinitions.js +1 -1
- package/dist/server/index.cookieProxy.test.js +1 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +48 -3
- package/dist/server/index.test.js +14 -2
- package/dist/server/mockStripe.d.ts +1 -0
- package/dist/server/mockStripe.js +2 -0
- package/dist/server/routes/admin.js +91 -40
- package/dist/server/routes/auth.d.ts +1 -0
- package/dist/server/routes/auth.js +231 -55
- package/dist/server/routes/billing.js +473 -39
- package/dist/server/routes/billing.test.js +972 -37
- package/dist/server/routes/shared.d.ts +30 -0
- package/dist/server/routes/shared.js +31 -3
- package/dist/server/routes/sync.integration.test.js +180 -0
- package/dist/server/routes/sync.js +125 -242
- package/dist/server/routes/tasks.js +49 -7
- package/dist/server/routes.js +11 -22
- package/dist/server/routes.test.js +530 -81
- package/dist/shared/taskActor.d.ts +10 -0
- package/dist/shared/taskActor.js +1 -0
- package/dist/sync/cloudSyncApi.d.ts +1 -0
- package/dist/sync/collaborationSyncPayload.js +4 -0
- package/dist/sync/collaborationSyncPayload.test.js +8 -0
- package/dist/sync/collaborationSyncState.d.ts +3 -1
- package/dist/sync/collaborationSyncState.js +19 -0
- package/dist/sync/contentSyncState.d.ts +10 -0
- package/dist/sync/contentSyncState.js +277 -14
- package/dist/sync/syncApplyHandlers.d.ts +87 -1
- package/dist/sync/syncApplyHandlers.js +370 -8
- package/dist/sync/syncApplyHandlers.test.d.ts +1 -0
- package/dist/sync/syncApplyHandlers.test.js +377 -0
- package/dist/sync/syncService.d.ts +9 -1
- package/dist/sync/syncService.js +57 -10
- package/dist/sync/syncService.test.js +48 -0
- package/dist/sync/workspacePullFeed.d.ts +11 -0
- package/dist/sync/workspacePullFeed.js +123 -68
- package/dist/sync/workspacePullFeed.test.js +180 -0
- package/dist/sync/workspaceSyncModel.d.ts +22 -1
- package/dist/sync/workspaceSyncModel.js +65 -0
- package/dist/sync/workspaceSyncModel.test.js +119 -0
- package/dist/types.d.ts +2 -10
- package/dist/ui/assets/AgentsModule-BLWVbuKP.js +1 -0
- package/dist/ui/assets/{AnnotatedAttachmentWorkspace-Dvi02Y7q.js → AnnotatedAttachmentWorkspace-BlS-cqnl.js} +1 -1
- package/dist/ui/assets/{DocumentWorkspace-iys3zfca.js → DocumentWorkspace-BH_6DF6x.js} +1 -1
- package/dist/ui/assets/{InitiativesModule-DJvLJI3A.js → InitiativesModule-BjR6iBf9.js} +1 -1
- package/dist/ui/assets/{PlansPage-BlVC_lRq.css → PlansPage-C2dd2n1X.css} +1 -1
- package/dist/ui/assets/PlansPage-CSDQ4sLa.js +1 -0
- package/dist/ui/assets/TaskSettings-CEDy34Jo.js +9 -0
- package/dist/ui/assets/{WorkflowsModule-BguHeQaV.js → WorkflowsModule-DnFqdUME.js} +1 -1
- package/dist/ui/assets/index-DXUdtH1B.js +6 -0
- package/dist/ui/assets/index-Ii0B0rTO.css +1 -0
- package/dist/ui/assets/{vendor-icons-C8EED3Oh.js → vendor-icons-I7ZwG1z_.js} +1 -1
- package/dist/ui/index.html +4 -4
- package/dist/utils/accountProfileSummaryCache.d.ts +31 -0
- package/dist/utils/accountProfileSummaryCache.js +97 -0
- package/dist/utils/accountProfileSummaryCache.test.d.ts +1 -0
- package/dist/utils/accountProfileSummaryCache.test.js +63 -0
- package/dist/utils/taskActivity.js +4 -0
- package/dist/utils/taskActivity.test.js +25 -1
- package/package.json +5 -3
- package/scripts/playwright-auth.sh +4 -0
- package/dist/ui/assets/AgentsModule-JG5jc3he.js +0 -1
- package/dist/ui/assets/PlansPage-BMPlpFpw.js +0 -1
- package/dist/ui/assets/TaskSettings-Bqd4cCzW.js +0 -8
- package/dist/ui/assets/index-MXeWoebC.css +0 -1
- package/dist/ui/assets/index-YJ4k5QNa.js +0 -6
- package/dist/utils/billingStatusCache.d.ts +0 -21
- package/dist/utils/billingStatusCache.js +0 -70
|
@@ -36,6 +36,7 @@ export declare function useWorkspaceSyncController(input: UseWorkspaceSyncContro
|
|
|
36
36
|
minDelayMs?: number;
|
|
37
37
|
}) => void;
|
|
38
38
|
persistWorkspaceSyncPatch: (patch: Partial<WorkspaceSyncStateV2>) => Promise<WorkspaceSyncStateV2>;
|
|
39
|
+
applyWorkspaceSyncPatchLocally: (patch: Partial<WorkspaceSyncStateV2>) => WorkspaceSyncStateV2;
|
|
39
40
|
loadWorkspaceSyncState: () => Promise<void>;
|
|
40
41
|
applyWorkspaceSyncStateSnapshot: (nextState: Partial<WorkspaceSyncStateV2> & {
|
|
41
42
|
enabled: boolean;
|
|
@@ -2,6 +2,7 @@ import { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
2
2
|
import { calculateWorkspaceRetryDelayMs } from '../sync/syncService';
|
|
3
3
|
import { normalizeWorkspaceSyncStateCompat } from '../compat/workspaceSyncCompat';
|
|
4
4
|
import { createDefaultWorkspaceSyncState } from '../sync/workspaceSyncState';
|
|
5
|
+
import { persistRemoteUiState } from './workspace/workspaceLocalState';
|
|
5
6
|
const WORKSPACE_SYNC_LEASE_KEY_PREFIX = 'taskforce.sync.lease.v1';
|
|
6
7
|
const WORKSPACE_SYNC_LEASE_CHANNEL = 'taskforce.sync.lease.v1';
|
|
7
8
|
const WORKSPACE_SYNC_LEASE_HEARTBEAT_MS = 2500;
|
|
@@ -274,21 +275,31 @@ export function useWorkspaceSyncController(input) {
|
|
|
274
275
|
setWorkspaceLastPushAt,
|
|
275
276
|
setWorkspaceLastErrorMessage
|
|
276
277
|
]);
|
|
278
|
+
const applyWorkspaceSyncPatchLocally = useCallback((patch) => {
|
|
279
|
+
const next = buildWorkspaceSyncStatePatch(workspaceSyncStateRef.current, patch);
|
|
280
|
+
applyWorkspaceSyncStateSnapshot(next);
|
|
281
|
+
return next;
|
|
282
|
+
}, [applyWorkspaceSyncStateSnapshot]);
|
|
277
283
|
const persistWorkspaceSyncPatch = useCallback(async (patch) => {
|
|
278
284
|
const next = buildWorkspaceSyncStatePatch(workspaceSyncStateRef.current, patch);
|
|
279
285
|
workspaceSyncStateRef.current = next;
|
|
280
286
|
workspacePullCursorRef.current = next.pullCursor;
|
|
281
|
-
const
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
stateKey: 'workspace-sync',
|
|
288
|
-
patch: next
|
|
289
|
-
})
|
|
287
|
+
const result = await persistRemoteUiState({
|
|
288
|
+
workspaceId: currentWorkspaceId,
|
|
289
|
+
stateKey: 'workspace-sync',
|
|
290
|
+
patch: next,
|
|
291
|
+
throwOnError: true,
|
|
292
|
+
respectFailureCooldown: false
|
|
290
293
|
});
|
|
291
|
-
const
|
|
294
|
+
const res = result.response;
|
|
295
|
+
const payload = result.payload;
|
|
296
|
+
if (result.skipped) {
|
|
297
|
+
applyWorkspaceSyncStateSnapshot(next);
|
|
298
|
+
return next;
|
|
299
|
+
}
|
|
300
|
+
if (!res) {
|
|
301
|
+
throw new Error('Failed to persist workspace sync state (missing response)');
|
|
302
|
+
}
|
|
292
303
|
if (!res.ok || payload?.success === false) {
|
|
293
304
|
throw new Error(payload?.error || `Failed to persist workspace sync state (${res.status})`);
|
|
294
305
|
}
|
|
@@ -406,6 +417,7 @@ export function useWorkspaceSyncController(input) {
|
|
|
406
417
|
clearWorkspaceRetry,
|
|
407
418
|
scheduleWorkspaceRetry,
|
|
408
419
|
persistWorkspaceSyncPatch,
|
|
420
|
+
applyWorkspaceSyncPatchLocally,
|
|
409
421
|
loadWorkspaceSyncState,
|
|
410
422
|
applyWorkspaceSyncStateSnapshot,
|
|
411
423
|
saveWorkspaceCloudSyncSettings,
|
|
@@ -57,4 +57,21 @@ describe('useTaskforceApiRouting', () => {
|
|
|
57
57
|
expect(headers.get('x-taskforce-workspace-id')).toBe('workspace-2');
|
|
58
58
|
expect(headers.get('x-taskforce-workspace-authoritative')).toBe('1');
|
|
59
59
|
});
|
|
60
|
+
it('stops injecting the workspace header when the live ref resets to default', async () => {
|
|
61
|
+
const fetchMock = vi.fn(async (_input, init) => new Response(null, { status: 204 }));
|
|
62
|
+
vi.stubGlobal('fetch', fetchMock);
|
|
63
|
+
const currentWorkspaceIdRef = createRef();
|
|
64
|
+
currentWorkspaceIdRef.current = 'workspace-1';
|
|
65
|
+
renderHook(() => useTaskforceApiRouting({
|
|
66
|
+
currentWorkspaceIdRef,
|
|
67
|
+
runtimeMode: 'cloud',
|
|
68
|
+
resolveApiUrl: (path) => `https://cloud.example.com${path}`
|
|
69
|
+
}));
|
|
70
|
+
currentWorkspaceIdRef.current = 'default';
|
|
71
|
+
await window.fetch('/api/taskforce/tasks');
|
|
72
|
+
const [, init] = fetchMock.mock.calls.at(-1);
|
|
73
|
+
const headers = init.headers;
|
|
74
|
+
expect(headers.get('x-taskforce-workspace-id')).toBeNull();
|
|
75
|
+
expect(headers.get('x-taskforce-workspace-authoritative')).toBeNull();
|
|
76
|
+
});
|
|
60
77
|
});
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { type MutableRefObject } from 'react';
|
|
2
|
+
import type { TaskAssigneeOption } from '../../utils/assignees';
|
|
3
|
+
export type BootstrapPhase = 'idle' | 'auth' | 'workspace' | 'config' | 'ready' | 'stalled';
|
|
4
|
+
export type WorkspaceRole = 'owner' | 'admin' | 'member' | 'read-only';
|
|
5
|
+
export interface WorkspaceSummary {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
role: WorkspaceRole;
|
|
9
|
+
slug?: string | null;
|
|
10
|
+
description?: string | null;
|
|
11
|
+
status?: string;
|
|
12
|
+
betaAccess?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface UseTaskforceWorkspaceBootstrapArgs {
|
|
15
|
+
shouldDeferProtectedApiCalls: boolean;
|
|
16
|
+
shouldBlockProtectedApiCalls: boolean;
|
|
17
|
+
getWorkspaceRequestState: () => {
|
|
18
|
+
workspaceId: string;
|
|
19
|
+
epoch: number;
|
|
20
|
+
};
|
|
21
|
+
isWorkspaceRequestStale: (requestState: {
|
|
22
|
+
workspaceId: string;
|
|
23
|
+
epoch: number;
|
|
24
|
+
}) => boolean;
|
|
25
|
+
isWorkspaceEpochStale: (requestState: {
|
|
26
|
+
workspaceId: string;
|
|
27
|
+
epoch: number;
|
|
28
|
+
}) => boolean;
|
|
29
|
+
isAbortError: (error: unknown) => boolean;
|
|
30
|
+
isBootstrapTimeoutError: (error: unknown) => boolean;
|
|
31
|
+
fetchWithTimeout: (url: string, init?: RequestInit, timeoutMs?: number, options?: {
|
|
32
|
+
signal?: AbortSignal;
|
|
33
|
+
}) => Promise<Response>;
|
|
34
|
+
handleUnauthorized: () => void;
|
|
35
|
+
applyBootstrapConfig: (data: any) => void;
|
|
36
|
+
loadPersistedUiState: (workspaceIdOverride?: string) => Promise<void>;
|
|
37
|
+
fetchBuildInfo: () => Promise<void>;
|
|
38
|
+
markBootstrapPhase: (phase: Exclude<BootstrapPhase, 'stalled'>) => void;
|
|
39
|
+
markBootstrapStalled: (message: string) => void;
|
|
40
|
+
fetchWorkflows: () => Promise<void>;
|
|
41
|
+
fetchInitiativeTemplates: () => Promise<void>;
|
|
42
|
+
loadAvailableEnvironments: () => Promise<void>;
|
|
43
|
+
setReferenceDataLoaded: (value: boolean) => void;
|
|
44
|
+
setCustomCategories: (value: any[]) => void;
|
|
45
|
+
setCustomTypes: (value: any[]) => void;
|
|
46
|
+
setPriorities: (value: any[]) => void;
|
|
47
|
+
setTaxonomies: (value: any[]) => void;
|
|
48
|
+
setTaxonomyDisplayLabels: (value: any) => void;
|
|
49
|
+
setConfigLoaded: (value: boolean) => void;
|
|
50
|
+
hasLoadedUiStateRef: MutableRefObject<boolean>;
|
|
51
|
+
currentWorkspaceIdRef: MutableRefObject<string>;
|
|
52
|
+
referenceDataRequestRef: MutableRefObject<{
|
|
53
|
+
workspaceId: string;
|
|
54
|
+
promise: Promise<void>;
|
|
55
|
+
} | null>;
|
|
56
|
+
referenceDataAbortRef: MutableRefObject<AbortController | null>;
|
|
57
|
+
bootstrapConfigAbortRef: MutableRefObject<AbortController | null>;
|
|
58
|
+
workspaceListAbortRef: MutableRefObject<AbortController | null>;
|
|
59
|
+
assigneeOptionsAbortRef: MutableRefObject<AbortController | null>;
|
|
60
|
+
workspaceListHydratedRef: MutableRefObject<boolean>;
|
|
61
|
+
setAvailableWorkspaces: (value: any[]) => void;
|
|
62
|
+
runtimeMode: 'local' | 'cloud';
|
|
63
|
+
applyResolvedWorkspaceId: (workspaceId: string, options?: {
|
|
64
|
+
preserveNonDefaultDefault?: boolean;
|
|
65
|
+
}) => void;
|
|
66
|
+
workspaceSwitchingEnabled: boolean;
|
|
67
|
+
authSessionResolved: boolean;
|
|
68
|
+
isAuthenticated: boolean;
|
|
69
|
+
authUserId: string;
|
|
70
|
+
setHydratedWorkspaceRole: (value: WorkspaceRole | null) => void;
|
|
71
|
+
setAssigneeOptions: (value: TaskAssigneeOption[]) => void;
|
|
72
|
+
setAssigneeOptionsLoaded: (value: boolean) => void;
|
|
73
|
+
commitCurrentWorkspaceId: (workspaceId: string, options?: {
|
|
74
|
+
clearExplicitSelection?: boolean;
|
|
75
|
+
}) => void;
|
|
76
|
+
currentWorkspaceId: string;
|
|
77
|
+
workspaceSelectionScope: string;
|
|
78
|
+
abortWorkspaceScopedRequests: () => void;
|
|
79
|
+
setWorkspaceBootstrapPending: (value: boolean) => void;
|
|
80
|
+
checkAuthSession: (options?: {
|
|
81
|
+
force?: boolean;
|
|
82
|
+
}) => Promise<boolean>;
|
|
83
|
+
lastConfigRefreshKeyRef: MutableRefObject<string>;
|
|
84
|
+
lastAssigneeOptionsLoadKeyRef: MutableRefObject<string>;
|
|
85
|
+
lastWorkspaceSyncStateLoadKeyRef: MutableRefObject<string>;
|
|
86
|
+
lastTaskSurfaceLoadKeyRef: MutableRefObject<string>;
|
|
87
|
+
lastSettingsSurfaceLoadKeyRef: MutableRefObject<string>;
|
|
88
|
+
isOpen: boolean;
|
|
89
|
+
activeTab: string;
|
|
90
|
+
showArchive: boolean;
|
|
91
|
+
taskScope: string;
|
|
92
|
+
settingsSection: string | null;
|
|
93
|
+
fetchTasks: (isSilent?: boolean, options?: {
|
|
94
|
+
ignoreAuthGuard?: boolean;
|
|
95
|
+
}) => Promise<void>;
|
|
96
|
+
fetchArchive: (isSilent?: boolean, options?: {
|
|
97
|
+
ignoreAuthGuard?: boolean;
|
|
98
|
+
}) => Promise<void>;
|
|
99
|
+
fetchPlanningEntities: (options?: {
|
|
100
|
+
ignoreAuthGuard?: boolean;
|
|
101
|
+
}) => Promise<void>;
|
|
102
|
+
refreshTaskCollections: (options?: {
|
|
103
|
+
isSilent?: boolean;
|
|
104
|
+
ignoreAuthGuard?: boolean;
|
|
105
|
+
}) => Promise<void>;
|
|
106
|
+
loadWorkspaceSyncState: () => Promise<void>;
|
|
107
|
+
archiveBootstrapTimerRef: MutableRefObject<number | null>;
|
|
108
|
+
hasBootstrappedDataRef: MutableRefObject<boolean>;
|
|
109
|
+
}
|
|
110
|
+
export declare function useTaskforceWorkspaceBootstrap(args: UseTaskforceWorkspaceBootstrapArgs): {
|
|
111
|
+
fetchReferenceData: (options?: {
|
|
112
|
+
ignoreAuthGuard?: boolean;
|
|
113
|
+
force?: boolean;
|
|
114
|
+
}) => Promise<void>;
|
|
115
|
+
fetchBootstrapConfig: (options?: {
|
|
116
|
+
ignoreAuthGuard?: boolean;
|
|
117
|
+
}) => Promise<void>;
|
|
118
|
+
fetchConfig: (options?: {
|
|
119
|
+
ignoreAuthGuard?: boolean;
|
|
120
|
+
}) => Promise<void>;
|
|
121
|
+
fetchWorkspaces: () => Promise<{
|
|
122
|
+
success: boolean;
|
|
123
|
+
error?: string;
|
|
124
|
+
workspaces?: WorkspaceSummary[];
|
|
125
|
+
}>;
|
|
126
|
+
fetchAssigneeOptions: () => Promise<{
|
|
127
|
+
success: boolean;
|
|
128
|
+
error?: string;
|
|
129
|
+
}>;
|
|
130
|
+
switchWorkspace: (workspaceId: string, options?: {
|
|
131
|
+
hydrate?: boolean;
|
|
132
|
+
}) => Promise<{
|
|
133
|
+
success: boolean;
|
|
134
|
+
error?: string;
|
|
135
|
+
code?: string;
|
|
136
|
+
}>;
|
|
137
|
+
resolveWorkspaceAfterAuth: (options?: {
|
|
138
|
+
preferredWorkspaceId?: string | null;
|
|
139
|
+
}) => Promise<{
|
|
140
|
+
success: boolean;
|
|
141
|
+
workspaceSetupRequired: boolean;
|
|
142
|
+
workspaceId: string;
|
|
143
|
+
error?: undefined;
|
|
144
|
+
code?: undefined;
|
|
145
|
+
} | {
|
|
146
|
+
success: boolean;
|
|
147
|
+
workspaceSetupRequired: boolean;
|
|
148
|
+
error: string;
|
|
149
|
+
workspaceId?: undefined;
|
|
150
|
+
code?: undefined;
|
|
151
|
+
} | {
|
|
152
|
+
success: boolean;
|
|
153
|
+
workspaceSetupRequired: boolean;
|
|
154
|
+
workspaceId?: undefined;
|
|
155
|
+
error?: undefined;
|
|
156
|
+
code?: undefined;
|
|
157
|
+
} | {
|
|
158
|
+
success: boolean;
|
|
159
|
+
workspaceSetupRequired: boolean;
|
|
160
|
+
error: string;
|
|
161
|
+
code: string | undefined;
|
|
162
|
+
workspaceId?: undefined;
|
|
163
|
+
}>;
|
|
164
|
+
retryBootstrapChecks: () => Promise<void>;
|
|
165
|
+
};
|
|
166
|
+
export {};
|