All files / lib/packages/shared-types actions.ts

100% Statements 14/14
100% Branches 2/2
100% Functions 2/2
100% Lines 13/13

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28      186x 85x 85x 85x 85x 85x 85x 85x 85x 85x 85x 85x 85x                        
import { IPackageCheck } from "shared-utils";
import { CognitoUserAttributes } from "./user";
 
export enum Action {
  UPLOAD_SUBSEQUENT_DOCUMENTS = "upload-subsequent-documents",
  RESPOND_TO_RAI = "respond-to-rai",
  ENABLE_RAI_WITHDRAW = "enable-rai-withdraw",
  DISABLE_RAI_WITHDRAW = "disable-rai-withdraw",
  REMOVE_APPK_CHILD = "remove-appk-child",
  TEMP_EXTENSION = "temporary-extension",
  AMEND_WAIVER = "amend-waiver",
  UPDATE_ID = "update-id",
  LEGACY_ADMIN_CHANGE = "legacy-admin-change",
  LEGACY_WITHDRAW_RAI_REQUEST = "legacy-withdraw-rai-request",
  WITHDRAW_RAI = "withdraw-rai",
  WITHDRAW_PACKAGE = "withdraw-package",
}
 
export type ActionRule = {
  action: Action;
  check: (
    checker: IPackageCheck,
    user: CognitoUserAttributes,
    /** Keep excess parameters to a minimum **/
    ...any: any[]
  ) => boolean;
};