Implements

Constructors

HandlerAndValidators

createAttachment: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    emailVerified: undefined | Predicate;
    validBody: undefined | Predicate;
} & Record<string, Predicate>>

Description

Create attachment handler and validators

handler: createAttachmentHandler

validators:

createChangeRequest: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    organizationExists: undefined | Predicate;
    validBody: undefined | Predicate;
    validateOwnerOrganizationNewNameNotDuplicate: undefined | Predicate;
} & Record<string, Predicate>>

Description

Create change request handler and validators

handler: createChangeRequestHandler

validators:

createFollow: HandlerAndValidators<{
    authentication: undefined | Predicate;
    isFollowExists: undefined | Predicate;
    validBody: undefined | Predicate;
    validFollowerId: undefined | Predicate;
    validFollowerType: undefined | Predicate;
    validUserType: undefined | Predicate;
} & Record<string, Predicate>>

Description

Create follower handler and validators

handler: createFollowerHandler

validators:

createOrganization: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    isParentIdValid: undefined | Predicate;
    validBody: undefined | Predicate;
    validateOwnerIdIsAnExistingUser: undefined | Predicate;
    validateOwnerOrganizationNameNotExist: undefined | Predicate;
    validateUserCanSetParentId: undefined | Predicate;
    validateUserTypeCanCreateOrganization: undefined | Predicate;
} & Record<string, Predicate>>

Description

Create organization handler and validators

handler: createOrganizationHandler

validators:

createUpdateManyOrgUsers: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    isNormalStatusOrganization: undefined | Predicate;
    isOrganizationChildless: undefined | Predicate;
    organizationExists: undefined | Predicate;
    preventOwnerChangingRole: undefined | Predicate;
    validBody: undefined | Predicate;
} & Record<string, Predicate>>

Description

Add or update users handler and validators

handler: createUpdateManyOrgUsersHandler

validators:

deleteAttachment: HandlerAndValidators<{
    attachmentExists: undefined | Predicate;
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    emailVerified: undefined | Predicate;
} & Record<string, Predicate>>

Description

Delete attachment handler and validators

handler: deleteAttachmentHandler

validators:

deleteFollow: HandlerAndValidators<{
    authentication: undefined | Predicate;
    validBody: undefined | Predicate;
    validFollowerId: undefined | Predicate;
    validFollowerType: undefined | Predicate;
    validUserType: undefined | Predicate;
} & Record<string, Predicate>>

Description

Delete follower handler and validators

handler: deleteFollowerHandler

validators:

deleteOrgUser: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    isNormalStatusOrganization: undefined | Predicate;
    isNotLastOwner: undefined | Predicate;
    organizationExists: undefined | Predicate;
} & Record<string, Predicate>>

Description

Delete users handler and validators

handler: deleteOrgUserHandler

validators:

deleteOrganization: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    isOrganizationChildless: undefined | Predicate;
    organizationExists: undefined | Predicate;
} & Record<string, Predicate>>

Description

Delete organization handler and validators

handler: deleteOrganizationHandler

validators:

getAttachment: HandlerAndValidators<{
    attachmentExists: undefined | Predicate;
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    emailVerified: undefined | Predicate;
} & Record<string, Predicate>>

Description

Get attachment handler and validators

handler: getAttachmentHandler

validators:

getAttachmentUploadUrl: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
} & Record<string, Predicate>>

Description

Get attachment upload url handler and validators

handler: getAttachmentUploadUrlHandler

validators:

  • authentication: UserDefaultAdapterAPI.createIsEmailVerifiedUserValidator
  • authorization: UserDefaultAdapterAPI.createIsAdminUserValidator || doesUserBelongToOrganization
getOrgUserExistence: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
} & Record<string, Predicate>>

Description

Check if user is in organization handler and validators

handler: getOrgUserExistenceHandler

validators:

getOrgUserRole: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
} & Record<string, Predicate>>

Description

Get user role handler and validators

handler: getOrgUserRoleHandler

validators:

getOrganization: HandlerAndValidators<{
    authentication: undefined | Predicate;
    organizationExists: undefined | Predicate;
} & Record<string, Predicate>>

Description

Logout handler and validators

handler: getOrganizationHandler

validators:

listAttachments: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
} & Record<string, Predicate>>

Description

Get attachments handler and validators

handler: getAttachmentsHandler

validators:

listAttachmentsForOrganization: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
} & Record<string, Predicate>>

Description

Get attachments by orgId handler and validators

handler: getAttachmentsByOwnerHandler

validators:

listChangeRequestsForOrganization: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    organizationExists: undefined | Predicate;
} & Record<string, Predicate>>

Description

Get change requests handler and validators

handler: listChangeRequestsForOrganizationHandler

validators:

listFollowers: HandlerAndValidators<{
    authentication: undefined | Predicate;
    validUserType: undefined | Predicate;
} & Record<string, Predicate>>

Description

Get followers handler and validators

handler: getFollowersHandler

validators:

listFollows: HandlerAndValidators<{
    authentication: undefined | Predicate;
    validUserType: undefined | Predicate;
} & Record<string, Predicate>>

Description

Get follows handler and validators

handler: getFollowsHandler

validators:

listOrgUsersForOrganization: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    organizationExists: undefined | Predicate;
} & Record<string, Predicate>>

Description

Get users handler and validators

handler: listOrgUsersForOrganizationHandler

validators:

listOrganizations: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
} & Record<string, Predicate>>

Description

Get organizations handler and validators

handler: listOrganizationsHandler

validators:

listOrganizationsForUser: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    isRolesValid: undefined | Predicate;
} & Record<string, Predicate>>

Description

Get user organizations handler and validators

handler: listOrganizationsForUserHandler

validators:

updateOrganization: HandlerAndValidators<{
    authentication: undefined | Predicate;
    authorization: undefined | Predicate;
    isParentIdValid: undefined | Predicate;
    organizationExists: undefined | Predicate;
    preventUserUpdateReviewStats: undefined | Predicate;
    validBody: undefined | Predicate;
    validateUserCanUpdateField: undefined | Predicate;
} & Record<string, Predicate>>

Description

Update organization handler and validators

handler: updateOrganizationHandler

validators:

Properties

adapterName: string = ADAPTER_NAME
authSecrets: AuthSecrets
dataServices: {
    attachment: AttachmentDefaultService;
    changeRequest: ChangeRequestDataService;
    follower: FollowerDefaultService;
    hierarchy: HierarchyDataService;
    orgUser: OrgUserDataService;
    organization: OrganizationDataService;
    upload: UploadDataService;
}

Type declaration

opts: Required<Omit<OrganizationDefaultAdapterOptions, keyof AuthSecrets>>

Generated using TypeDoc