cityworks
    Preparing search index...

    Class Attachments

    Index

    Attachments

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

      Parameters

      • node_id: string | number
      • the_file: string

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

      • Optionalfilename: string

        The filename for the attachment

      • Optionalattachment_type: string = 'attachment'

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

      • Optionaltask_id: number

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

      • Optionalcomments: string

        The filename for the attachment

      • Optionallabel: string

        The label to apply to the (PLL only)

      Returns Promise<unknown>

      Returns object that represents a boolean for action resolution

    • Download an attachment

      Parameters

      • attachmentId: number

        ID of an attachment to download

      Returns Promise<unknown>

      Returns object that represents a file stream

    • Get attachments related to Inspection, WorkOrder, or Request

      Parameters

      • ids: number | number[]

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

      Returns Promise<unknown>

      Returns Promise that represents a collection of attachments from the matched inspections, service requests, or work orders

    • Get attachment by ID (not implemented)

      Parameters

      • attachmentId: number

        An attachment ID to get info for

      Returns Promise<unknown>

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

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

      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>

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

    • Get Doc labels for a case template

      Parameters

      • busCaseId: number

        The ID of the Business Case to get Document Labels for

      Returns Promise<unknown>

      Returns Promise that represents a collection of tags that can be added to attachments

    • Get Related Documents from Case

      Parameters

      • id: number

        An array of CaseIDs or a single CaseID for which to get related documents.

      Returns Promise<unknown>

      Returns Promise that represents a collection of related documents from the matched cases

    • Get Tags available with which to tag attachments

      Returns Promise<unknown>

      Returns Promise that represents a collection of tags that can be added to attachments

    • Set Tags on an attachment

      Parameters

      • attachmentId: number
      • tags: { tagid: number; tagtext: string }[]
      • activityType: string

      Returns Promise<unknown>

      Returns Promise that represents a collection of tags that can be added to attachments

    • Set Tags on an many attachments

      Parameters

      • attachmentIds: number[]

        An array of attachment IDs to add tags to.

      • tags: { tagid: number; tagtext: string }[]

        An array of tag objects to add to the attachments

      Returns Promise<unknown>

      Returns Promise that represents a collection of documents which have had their tags set

    • Update attachment

      Parameters

      • attachment_id: number
      • Optionaltitle: string

        The filename for the attachment

      • Optionaldescription: string

        The filename for the attachment

      • Optionallabel: string

        The label to apply to the (PLL only)

      Returns Promise<unknown>

      Returns object that represents a boolean for action resolution

    • Get attachment URLs in array

      Returns string[]

      Returns array of attachment URLs

    Inspection Attachments

    • Delete inspection attachments

      Parameters

      • attachmentIds: number | number[]

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

      Returns Promise<unknown>

      Returns object that represents a boolean for action resolution

    Other

    currentActivityType: string

    Storage of object's active activityType