ordercloud-javascript-sdk
    Preparing search index...

    Class SecurityProfiles

    Index
    • Returns this

      enables impersonation by calling the subsequent method with the stored impersonation token

      SecurityProfiles.As().List() // lists SecurityProfiles using the impersonated users' token
      
    • Delete a security profile Check out the docs for more info

      Parameters

      • securityProfileID: string

        ID of the security profile.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • Delete a security profile assignment Check out the docs for more info

      Parameters

      • securityProfileID: string

        ID of the security profile.

      • listOptions: { buyerID?: string; supplierID?: string; userGroupID?: string; userID?: string } = {}
        • OptionalbuyerID?: string

          ID of the buyer.

        • OptionalsupplierID?: string

          ID of the supplier.

        • OptionaluserGroupID?: string

          ID of the user group.

        • OptionaluserID?: string

          ID of the user.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>

    • List security profiles Check out the docs for more info

      Type Parameters

      Parameters

      • listOptions: {
            filters?: Filters;
            page?: number;
            pageSize?: number;
            search?: string;
            searchOn?: ("ID" | "Name")[];
            sortBy?: ("ID" | "Name" | "!ID" | "!Name")[];
        } = {}
        • Optionalfilters?: Filters

          An object or dictionary representing key/value pairs to apply as filters. Valid keys are top-level properties of the returned model or 'xp.???'

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

        • Optionalsearch?: string

          Word or phrase to search for.

        • OptionalsearchOn?: ("ID" | "Name")[]

          Comma-delimited list of fields to search on.

        • OptionalsortBy?: ("ID" | "Name" | "!ID" | "!Name")[]

          Comma-delimited list of fields to sort by.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredObjectDeep<ListPage<TSecurityProfile>>>

    • List security profile assignments Check out the docs for more info

      Type Parameters

      Parameters

      • listOptions: {
            buyerID?: string;
            commerceRole?: CommerceRole;
            level?: PartyType;
            page?: number;
            pageSize?: number;
            securityProfileID?: string;
            supplierID?: string;
            userGroupID?: string;
            userID?: string;
        } = {}
        • OptionalbuyerID?: string

          ID of the buyer.

        • OptionalcommerceRole?: CommerceRole

          Commerce role of the security profile assignment. Possible values: Buyer, Seller, Supplier.

        • Optionallevel?: PartyType

          Level of the security profile assignment. Possible values: User, Group, Company, BuyerGroup.

        • Optionalpage?: number

          Page of results to return. When paginating through many items (> page 30), we recommend the "Last ID" method, as outlined in the Advanced Querying documentation.

        • OptionalpageSize?: number

          Number of results to return per page.

        • OptionalsecurityProfileID?: string

          ID of the security profile.

        • OptionalsupplierID?: string

          ID of the supplier.

        • OptionaluserGroupID?: string

          ID of the user group.

        • OptionaluserID?: string

          ID of the user.

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<RequiredObjectDeep<ListPage<TSecurityProfileAssignment>>>

    • Create or update a security profile assignment Check out the docs for more info

      Parameters

      • securityProfileAssignment: SecurityProfileAssignment

        Required fields: SecurityProfileID

      • requestOptions: RequestOptions = {}
        • OptionalaccessToken?: string

          Alternative token to the one stored in the sdk instance (useful for impersonation).

        • OptionalcancelToken?: CancelToken

          Axios cancelToken that can be used to cancel the request.

        • OptionalrequestType?: string

          Identify the type of request. Useful for error logs.

      Returns Promise<void>