import { ActionResponse } from '../../content/content.type'; import { PeopleActionOpts } from '../shared.types'; import { InvokeDeps } from '../_invoke'; import { PeopleEffectiveRevisionData } from './ct.types'; /** `register_legal_entity` (factory on legal_entity). One atomic execution: * row creation + first effective_revision in one transaction. */ export interface PeopleRegisterLegalEntityParams { code: string; displayName: string; timezone: string; registeredAddress?: { lines?: string[]; city?: string; country?: string; postalCode?: string; }; legalIds?: Array<{ kind: 'tax' | 'business_reg' | 'other'; value: string; issuedBy?: string; }>; } /** `schedule_branch` (factory on registered_branch). * Carries the same v1 readiness snapshot as a separate `activate_now` review. */ export interface PeopleScheduleBranchParams { branchCode?: string; displayName?: string; readiness?: { valid?: boolean; licenseExpires?: string; checkedAt?: string; notes?: string; }; effectiveFrom: string; } /** `reschedule_branch` mutates effectiveFrom (US2 TC16). */ export interface PeopleRescheduleBranchParams { effectiveFrom: string; } /** `correct_code` controlled post-activation branch-code correction. */ export interface PeopleCorrectCodeParams { branchCode: string; reason: string; } /** `reactivate` (LE or branch). Closed → Active. Reason required. */ export interface PeopleReactivateParams { reason: string; } /** `archive_visibility` / `restore_visibility` — operate on * `metadata.recordVisibility` (a FIELD, never a state). */ export interface PeopleArchiveVisibilityParams { reason?: string; } /** `schedule_revision` (factory on effective_revision). */ export type PeopleScheduleRevisionParams = Pick; /** `closure_submit` requires explicit acknowledgement of non-empty impact. */ export interface PeopleClosureSubmitParams { acknowledged: boolean; } /** `closure_approve` may carry an optional decision note. */ export interface PeopleClosureApproveParams { decision?: string; } /** `closure_complete` may surface per-precondition detail in the output. */ export interface PeopleClosureCompleteOutput { closedBranches?: number; preconditionFailures?: string[]; } /** `closure_reject` may carry a reason (audit). */ export interface PeopleClosureRejectParams { reason?: string; } /** `closure_cancel` — for LE targets, cascades to spawned branch drafts. */ export interface PeopleClosureCancelParams { reason?: string; } /** `schedule_assignment` (factory on policy_assignment). */ export interface PeopleScheduleAssignmentParams { policyRef: string; policyKind: string; targetType: 'legal_entity' | 'registered_branch'; targetRef: string; effectiveFrom: string; effectiveTo?: string | null; overrideAllowed?: boolean; } /** `cs_submit` — author reason required; BE revalidates `changes[]`. */ export interface PeopleCsSubmitParams { reason: string; changes?: unknown[]; } /** `cs_schedule` — Effective At required. */ export interface PeopleCsScheduleParams { effectiveAt: string; } /** `cs_cancel` — audited reason required (spec §4.4a: terminal * transitions carry an audited reason; guard `reason_required`). */ export interface PeopleCsCancelParams { reason: string; } /** `cs_close_failed` — "close with reason": the closure record carries * the operator's reason (FE dialog collects it as required input). */ export interface PeopleCsCloseFailedParams { reason: string; } /** `cs_reject` — approval lane (FEAT-010); may carry a reason. */ export interface PeopleCsRejectParams { reason?: string; } /** `cs_return_for_correction` — may carry the correction note. */ export interface PeopleCsReturnForCorrectionParams { reason?: string; } /** `cancel_branch` — may carry an audited reason. */ export interface PeopleCancelBranchParams { reason?: string; } /** `cancel_revision` — may carry an audited reason. */ export interface PeopleCancelRevisionParams { reason?: string; } export interface LegalAndOrgActions { registerLegalEntity(params: PeopleRegisterLegalEntityParams, opts?: PeopleActionOpts): Promise; reactivate(leOrBranchUuid: string, params: PeopleReactivateParams, opts?: PeopleActionOpts): Promise; archiveVisibility(leOrBranchUuid: string, params?: PeopleArchiveVisibilityParams, opts?: PeopleActionOpts): Promise; restoreVisibility(leOrBranchUuid: string, params?: PeopleArchiveVisibilityParams, opts?: PeopleActionOpts): Promise; scheduleBranch(branchUuid: string, params: PeopleScheduleBranchParams, opts?: PeopleActionOpts): Promise; activateNow(branchUuid: string, opts?: PeopleActionOpts): Promise; cancelBranch(branchUuid: string, params?: PeopleCancelBranchParams, opts?: PeopleActionOpts): Promise; rescheduleBranch(branchUuid: string, params: PeopleRescheduleBranchParams, opts?: PeopleActionOpts): Promise; correctCode(branchUuid: string, params: PeopleCorrectCodeParams, opts?: PeopleActionOpts): Promise; scheduleRevision(revisionUuid: string, params?: PeopleScheduleRevisionParams, opts?: PeopleActionOpts): Promise; /** `schedule_revision` FACTORY lane on `effective_revision` — creates the * row + schedules it atomically (api_references §3.3; no pre-made draft). */ createRevision(params: PeopleScheduleRevisionParams, opts?: PeopleActionOpts): Promise; cancelRevision(revisionUuid: string, params?: PeopleCancelRevisionParams, opts?: PeopleActionOpts): Promise; closureSubmit(caseUuid: string, params: PeopleClosureSubmitParams, opts?: PeopleActionOpts): Promise; closureApprove(caseUuid: string, params?: PeopleClosureApproveParams, opts?: PeopleActionOpts): Promise; closureComplete(caseUuid: string, opts?: PeopleActionOpts): Promise; closureReject(caseUuid: string, params?: PeopleClosureRejectParams, opts?: PeopleActionOpts): Promise; closureRetryFailed(caseUuid: string, opts?: PeopleActionOpts): Promise; closureCancel(caseUuid: string, params?: PeopleClosureCancelParams, opts?: PeopleActionOpts): Promise; scheduleAssignment(params: PeopleScheduleAssignmentParams, opts?: PeopleActionOpts): Promise; cancelAssignment(assignmentUuid: string, opts?: PeopleActionOpts): Promise; discontinueUnitType(unitTypeUuid: string, opts?: PeopleActionOpts): Promise; restoreUnitType(unitTypeUuid: string, opts?: PeopleActionOpts): Promise; discontinueLocationType(locationTypeUuid: string, opts?: PeopleActionOpts): Promise; restoreLocationType(locationTypeUuid: string, opts?: PeopleActionOpts): Promise; csSubmit(changeSetUuid: string, params: PeopleCsSubmitParams, opts?: PeopleActionOpts): Promise; csReturnForCorrection(changeSetUuid: string, params?: PeopleCsReturnForCorrectionParams, opts?: PeopleActionOpts): Promise; csApprove(changeSetUuid: string, opts?: PeopleActionOpts): Promise; csReject(changeSetUuid: string, params?: PeopleCsRejectParams, opts?: PeopleActionOpts): Promise; csSchedule(changeSetUuid: string, params: PeopleCsScheduleParams, opts?: PeopleActionOpts): Promise; csApply(changeSetUuid: string, opts?: PeopleActionOpts): Promise; csRetryFailed(changeSetUuid: string, opts?: PeopleActionOpts): Promise; csCloseFailed(changeSetUuid: string, params: PeopleCsCloseFailedParams, opts?: PeopleActionOpts): Promise; csCreateReplacement(changeSetUuid: string, opts?: PeopleActionOpts): Promise; csCancel(changeSetUuid: string, params: PeopleCsCancelParams, opts?: PeopleActionOpts): Promise; } export declare function buildLegalActions(deps: InvokeDeps): LegalAndOrgActions; //# sourceMappingURL=actions.d.ts.map