Class Attachments

Hierarchy

  • Attachments

Properties

Methods - Attachments

Methods - Inspection Attachments

Properties

currentActivityType: string

Storage of object's active activityType

Attachments Methods

  • Download an attachment

    Returns

    Returns object that represents a file stream

    Parameters

    • attachmentId: number

      ID of an attachment to download

    Returns Promise<unknown>

  • Get attachment by ID (not implemented)

    Returns

    Returns object that represents an object that describes the matched inspection attachment

    Parameters

    • attachmentId: number

      An attachment ID to get info for

    Returns Promise<unknown>

  • Get attachment by node (Inspection, WorkOrder, Request, or Case) IDs

    Returns

    Returns object that represents a collection of attachments from the matched inspections

    Parameters

    • ids: number | number[]

      An array of IDs or a single ID (inspectionIds, WorkOrderSids, WorkOrderIds, RequestIds, or CaseIds) to get attachments for. Only one node (Inspection, WorkOrder, Request, or Case) type at a time. Don't mix-and-match WorkOrderIds with WorkOrderSids.

    Returns Promise<unknown>

Inspection Attachments Methods

  • Add inspection attachments (doesn't handle URL or Signature type properly, currently)

    Returns

    Returns object that represents a boolean for action resolution

    Parameters

    • node_id: string | number
    • the_file: string

      The loca path of the file to upload to the Cityworks instance

    • Optional filename: string

      The filename for the attachment

    • Optional attachment_type: string = 'attachment'

      The filename for the attachment, values: attachment, signature, url

    • Optional task_id: number

      ID of WorkOrder task, if current activity is a work order and the attachment should be on the task

    • Optional comments: string

      The filename for the attachment

    Returns Promise<unknown>

  • Delete inspection attachments

    Returns

    Returns object that represents a boolean for action resolution

    Parameters

    • attachmentIds: number | number[]

      An array of attachment IDs or a single attachment ID to delete.

    Returns Promise<unknown>