@sudoplatform/sudo-entitlements-admin
    Preparing search index...

    Class DefaultSudoEntitlementsAdminClientBeta

    Client responsible for establishing entitlements of federated identities.

    Implements

    Index

    Constructors

    Methods

    • Apply entitlements sequence directly to a user

      If a record for that user's entitlements sequence does not yet exist it will be created.

      Parameters

      • externalId: string

        External IDP user ID of user to apply entitlements sequence to

      • entitlementsSequenceName: string

        Name of the entitlements sequence to apply to the user

      • OptionaltransitionsRelativeTo: Date
      • Optionalversion: number

        If specified, version of any current entitlements that must be matched

      Returns Promise<ExternalUserEntitlements>

      The effective entitlements for the user

      AlreadyUpdatedError

      • if the user's entitlements have been updated with a later version

      EntitlementsSequenceNotFoundError

      • If the entitlements sequence named is not defined

      AlreadyUpdatedError

      • Specified version is less than the current entitlements version

      IllegalArgumentError

      • Specified version is greater than the current entitlements version
    • Apply entitlements set to a user

      If a record for that user's entitlements does not yet exist it will be created.

      Parameters

      • externalId: string

        External IDP user ID of user to retrieve entitlements for

      • entitlementsSetName: string

        Name of the entitlements set to apply to the user

      • Optionalversion: number

        If specified, version of any current entitlements that must be matched

      Returns Promise<ExternalUserEntitlements>

      The effective entitlements for the user

      EntitlementSetNotFoundError

      • If the named entitlements set does not exist

      AlreadyUpdatedError

      • if the user's entitlements have been updated with a later version

      AlreadyUpdatedError

      • Specified version is less than the current entitlements version

      IllegalArgumentError

      • Specified version is greater than the current entitlements version
    • Apply an expendable entitlements delta to a user

      If a record for the user's entitlements does not yet exist a NoEntitlementsForUserError is thrown. Call an applyEntitlements* method to assign entitlements before calling this method.

      Parameters

      • externalId: string

        External IDP user ID of user to retrieve entitlements for

      • expendableEntitlements: Entitlement[]

        The expendable entitlements delta to apply to the user

      • requestId: string

        Request of this delta. Repetition of requests for the same external ID with the same requestId are idempotent

      Returns Promise<ExternalUserEntitlements>

      The effective entitlements for the user

      InvalidEntitlementsError Entitlements contains one or more entitlements with unrecognized names or that are not expendable entitlements.

      NoEntitlementsForUserError User has not previously been assigned entitlements.

      DuplicateEntitlementError expendableEntitlements refers to the same entitlement more than once.

      NegativeEntitlementError expendableEntitlements would cause an expendable entitlement for the user to go negative.

      OverflowedEntitlementError expendableEntitlements would cause an expendable entitlement for the user to exceed the maximum allowable value.