@opengeni/core 2.7.5-canary.2 → 2.7.5-canary.3

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.
@@ -124,4 +124,5 @@ export declare function controlHumanWorkspace(deps: {
124
124
  } & SessionCommandPostCommitDeps, context: Omit<HumanSessionCommandContext, "sessionId">, input: WorkspaceInferenceControlRequest): Promise<WorkspaceInferenceControlResponse>;
125
125
  export declare function getHumanComposerDraft(deps: SessionAuthorizationCommandDeps, context: HumanSessionCommandContext): Promise<ComposerDraft>;
126
126
  export declare function saveHumanComposerDraft(deps: SessionAuthorizationCommandDeps, context: HumanSessionCommandContext, input: SaveComposerDraftRequest): Promise<ComposerDraft>;
127
+ export declare function controlHumanWorkspaceTimer(deps: Parameters<typeof controlHumanWorkspace>[0], context: Parameters<typeof controlHumanWorkspace>[1], input: import("@opengeni/contracts").WorkspacePauseTimerRequest): Promise<void>;
127
128
  export {};
package/dist/index.js CHANGED
@@ -15285,6 +15285,7 @@ import {
15285
15285
  moveQueuedTurnInTransaction,
15286
15286
  mutateSessionControlInTransaction,
15287
15287
  mutateWorkspaceControlInTransaction,
15288
+ setWorkspacePauseTimerInTransaction,
15288
15289
  projectEffectiveControlForRelatedAccess,
15289
15290
  runIdempotentPersistenceTransaction as runIdempotentPersistenceTransaction2,
15290
15291
  saveComposerDraftInTransaction,
@@ -16015,6 +16016,31 @@ async function saveHumanComposerDraft(deps, context, input) {
16015
16016
  );
16016
16017
  return composerDraft(row);
16017
16018
  }
16019
+ async function controlHumanWorkspaceTimer(deps, context, input) {
16020
+ const result = await withWorkspaceRls2(
16021
+ deps.db,
16022
+ context.workspaceId,
16023
+ (scoped) => scoped.transaction(
16024
+ (tx) => setWorkspacePauseTimerInTransaction(tx, {
16025
+ ...input,
16026
+ ...context
16027
+ })
16028
+ )
16029
+ );
16030
+ scheduleSessionCommandPostCommit(deps, "human_workspace_timer", [
16031
+ ...result.workspaceControlEventId ? [
16032
+ {
16033
+ kind: "workspace_control_fanout",
16034
+ run: async () => await publishWorkspaceControlEvent(
16035
+ deps,
16036
+ context.workspaceId,
16037
+ result.workspaceControlEventId
16038
+ )
16039
+ }
16040
+ ] : [],
16041
+ { kind: "workflow_wake", run: async () => await requestControlWakeDispatch(deps, 1) }
16042
+ ]);
16043
+ }
16018
16044
 
16019
16045
  // src/application/user-resource-grants.ts
16020
16046
  import {
@@ -16442,6 +16468,7 @@ export {
16442
16468
  controlHumanSessionWorkstream,
16443
16469
  controlHumanSessionWorkstreamWithOutcome,
16444
16470
  controlHumanWorkspace,
16471
+ controlHumanWorkspaceTimer,
16445
16472
  conversationDeliveryNextAction,
16446
16473
  correctWorkspaceMemoryWithSlackPublication,
16447
16474
  createAndStartSession,