SmartTask Developers
Main Website
  • Overview
  • Authentication
    • Basics
    • Details
  • Endpoints
    • Organization
      • Fetch Organizations
    • Task
      • Create a Task
    • Record Activity
      • Fetch Activities
      • Add Comment
    • Project
      • Fetch Projects
    • Organization User
      • Filter Users
    • Webhooks
      • Subscribe to an Event
      • Unsubscribe from a Webhook
  • Models
    • Organization
      • Organization User
    • Group
    • Project
    • Record
    • Record Activity
    • Task
    • Contact
    • Webhook
    • Membership
    • File
    • Custom Field
      • Custom Field Value
    • User
Powered by GitBook
On this page
  • TaskModel
  • TaskSubType
  • RecordAccessTypeEnum
  • PriorityEnum
  • DateModel
  • More Details
  1. Models

Task

TaskModel

{
    record_id?: string;

    organization_id: number;
    created_by_user_id: number;
    
    record_sub_type = RecordSubTypeEnum.task;
    access_type = RecordAccessTypeEnum.default;
    is_template = false;

    name?: string;
    description?: string;
    
    assigned_user?: OrganizationUserModel;

    priority?: RecordPriorityEnum;

    date_info: RecordDateModel = new RecordDateModel();

    planned_start?: Date;
    planned_due?: Date;

    status = RecordStatusEnum.incomplete;
    status_modified_at?: Date;
    completed_at?: Date;

    estimated_time?: number;
    actual_time?: number;
    billable: boolean = true;
    cost?: number;
    billable_amount?: number;

    parent?: RecordIdNameModel;

    member_role = MembershipRoleEnum.edit;      //Can only be edit / view

    sub_records_unarchived_count: number;
    sub_records_archived_count: number;

    archived = false;

    projects = new Array<ProjectRecordModel>();

    followers = new Array<OrganizationUserModel>();

    files = new Array<FileModel>(); 

    dependencies = new Array<RecordDependencyModel>();

    contacts = new Array<ContactTypeaheadModel>();
    contact_email?: string; //To link contact while import
    contact_phone?: string; //To link contact while import

    custom_field_values = new Array<CustomFieldValueModel>();

    created_at: Date;
    modified_at: Date;
}

TaskSubType

  • Defines the type of record this is - task or milestone

{
    task = 'task',
    milestone = 'milestone',
}

RecordAccessTypeEnum

  • If its `core_members` it means this task is only visible to internal members and not to the guest user

{
    default = "default",
    core_members = "core_members"
}

PriorityEnum

{
    high = 'high',
    medium = 'medium',
    low = 'low',
}

DateModel

{
    start_date?: Date;
    due_date?: Date;
    duration?: number; //In days

    recurr_type: RecurrTypeEnum = RecurrTypeEnum.never_repeat;
    recurr_on: RecurrOnEnum = RecurrOnEnum.on_completion;
    recurr_interval = 1; 
    recurr_weekdays = new Array<DayOfWeek>(); 
    recurr_day_of_month = 1;
}

RecurrTypeEnum

{
    never_repeat = 'never_repeat',
    days = 'days',
    weeks = 'weeks',
    months = 'months',
    years = 'years',
}

RecurrOnEnum

{
    on_completion = "on_completion",
    on_schedule = "on_schedule"
}

More Details

  • For ProjectRecordModel please refer to Project

  • For FileModel please refer to File

  • For RecordStatusEnum please refer to Record

  • For OrganizationUserModel please refer to Organization User

PreviousRecord ActivityNextContact

Last updated 7 days ago