Job Functions

On this page, we describe how to create a user, view users, view user applications, and edit user properties.

Initializing the User Functions

Initialization

  const {createUser, viewUser, grabAllUsers, retrieveApplications} = wrangle.userFunctions;

Create User

Create a user and upload their resume.

Parameters

  • Name
    name
    Type
    string
    Description

    Full name of the user.

  • Name
    email
    Type
    string
    Description

    User's email.

  • Name
    phone
    Type
    string
    Description

    Phone number in string form, following either '1234567890' or '(123)-456-7890'.

  • Name
    address
    Type
    string
    Description

    Address of the user (eg: 150 Example Lane, City, State).

  • Name
    portfolio
    Type
    string
    Description

    Link to a portfolio website (optional).

  • Name
    filename
    Type
    string
    Description

    Filename of the user's resume. Must be .pdf, .docx, or .txt.

  • Name
    resumeLink
    Type
    string
    Description

    Publically accessable link to the user's resume. Resume must be .pdf, .docx, or .txt, and below 5mb.

  • Name
    keyInfo
    Type
    string
    Description

    Brief summary of the user's experience for the model, maximum 400 words.

  • Name
    linkedin
    Type
    string
    Description

    Link to user's LinkedIn profile. Optional (pass null if not included).

  • Name
    github
    Type
    string
    Description

    Link to user's Github profile. Optional (pass null if not included).

  • Name
    twitter
    Type
    string
    Description

    Link to user's Twitter profile. Optional (pass null if not included).

  • Name
    figma
    Type
    string
    Description

    Link to user's Figma profile. Optional (pass null if not included).

  • Name
    github
    Type
    string
    Description

    Link to user's Github profile. Optional (pass null if not included).

  • Name
    dribbble
    Type
    string
    Description

    Link to user's Dribbble profile. Optional (pass null if not included).

  • Name
    stackoverflow
    Type
    string
    Description

    Link to user's Stackoverflow profile. Optional (pass null if not included).

Call

  const user = await createUser(name, email, phone, address, portfolio, filename, 
    resumeLink, keyInfo, linkedin, github, twitter, figma, dribbble, stackoverflow);

Response

  User {
    // user schema
    uid: "example_uid" // uid of the new user is present in the user object
  }

View User

View a user by uid.

  • Name
    uid
    Type
    string
    Description

    Uid of the user to view.

Call

  const user = await viewUser(uid);

Response

  User {
    // user schema
  }

Retrieve all Users

This function retrieves all users from a company. Try to use this minimally.

Call

  const user = await grabAllUsers();

Response

  [
    User {
      // user schema
    },
    User {
      //...
    }...
  ]

Retrieve User Applications

Retrieve all applications from a user by uid.

  • Name
    uid
    Type
    string
    Description

    Uid of the user's applications to return'.

Call

  const user = await retrieveApplications();

Response

  [
    Application {
      // application schema
    },
    Application {
      //...
    }...
  ]

Edit User Property

Input property must be a valid property from the user object. Uid is unchangable. Note that this is a purely cosmetic change. To actually change the User object, you must first use editProperty and then call editUser with the edited User object.

  • Name
    property
    Type
    string
    Description

    Category of the user object to edit.

  • Name
    value
    Type
    string
    Description

    New value for that property.

Call

  // user is a User object
  user.editProperty("email", "newemail@example.com");

Edit User

This function will edit the user's properties on Wrangle's end. First use editProperty to change select fields, and then call editUser. Note that this function will not edit resumeLike or filename. To upload a new resume, utilize editUserResume (shown next).

Call

  // user is a User object
  user.editUser();

Response

  User {
    // user schema
  }

Edit User Resume

This function will edit the user's resume, resumeLink, and filename on Wrangle's end. First use editProperty to change resumeLink and filename, and then call editUserResume.

Call

  // user is a User object
  user.editUserResume();

Response

  User {
    // user schema
  }

Was this page helpful?