Class Inspection

Hierarchy

  • Inspection

Properties

admin?: any

Inspection Administration methods

attachments?: any

Inspection Administration methods

costs: any

Inspection Costing methods

Inspection Object Search Methods

  • Get the records on the basis of inspectionId, only populates InspectionId, InspTemplateName, and Location properties

    Returns

    Returns Promise that represents a collection of the matching (limited) inspection objects

    Parameters

    • inspectionId: string

      ???, see instance docs: /{subdirectory}/apidocs/#/service-info/Ams/Inspection

    Returns Promise<unknown>

Inspection Options Methods

  • Get cycle from

    Returns

    Returns Promise that represents ... I have no idea what this endpoint does

    Returns Promise<unknown>

  • Get cycle intervals

    Returns

    Returns Promise that represents a Dictionary of the cycle intervals available

    Returns Promise<unknown>

  • Get cycle types

    Returns

    Returns Promise that represents a Dictionary of the cycle types available

    Returns Promise<unknown>

  • Get districts

    Returns

    Returns Promise that represents an Array of the districts

    Returns Promise<unknown>

  • Get Inspection Employee lists. Abstraction done here, though only one employee list field, AFAIK.

    Returns

    Returns Promise that represents a collection of employees. See: /{subdirectory}/apidocs/#/data-type-info;dataType=EmployeeNameId

    Parameters

    • listType: string

      Which list (endpoint) to get. Includes only SubmitTos.

    • includeInactiveEmployees: boolean = false

      Whether to include inactive employees in the returned list. Defaults to false.

    • Optional domainIds: number[]

      Filter to certain domains within the Cityworks instance.

    Returns Promise<unknown>

  • Get list of statuses

    Returns

    Returns object that represents an array of all possible statuses for an Inspection

    Returns Promise<unknown>

  • Get inspection submit to list

    Returns

    Returns object that represents a collection of all possible employees for an Inspection's SubmitTo

    Parameters

    • Optional includeInactiveEmployees: boolean = false

      whether to include inactive employees in the return. Defaults to false.

    • Optional domainIds: number[]

      which domains to include in the return, default to All domains

    Returns Promise<unknown>

Inspection Search Methods

  • Search for inspections

    Returns

    Returns Promise that represents an array of the matching inspection IDs

    Parameters

    • searchData: Object

      The search information to retrieve matched inspections, see instance docs: /{subdirectory}/apidocs/#/service-info/Ams/Inspection

    Returns Promise<unknown>

Inspection Templates Methods

  • Get the questions and answers for inspection template(s)

    Returns

    Returns object that represents an array which contains a list of InspQuestionPanel for the template

    Parameters

    • inspTemplateIds: number[]

      An array of the IDs to reopen the matched inspections

    Returns Promise<unknown>

  • Get inspection template question conditions

    Returns

    Returns object that represents an array which contains a dictionary of InspQuestion IDs to configs

    Parameters

    • inspTemplateIds: number[]

      An array of template IDs to get the matched inspection template Question conditions for

    Returns Promise<unknown>

  • Get entity types for inspection template(s)

    Returns

    Returns object that represents an array of Entity Types

    Parameters

    • inspTemplateIds: number[]

      An array of the IDs to reopen the matched inspections

    Returns Promise<unknown>

  • Get inspection templates

    Returns

    Returns Promise that represents a collection of all Inspections matching the provided parameters

    Parameters

    • Optional entityTypes: string[]

      The Entity Type(s) to return potential inspections for

    • Optional canCreate: boolean

      If true, only return templates the user can create, ignored if false or null, default is true

    • Optional options: {
          IncludeInactive?: boolean;
          MaximumDateModified?: Date;
          MinimumDateModified?: Date;
          TemplateIds?: number[];
      }

      An object which can include: [IncludeInactive]: boolean, MaximumDateModified: Date, MinimumDateModified: Date, TemplateIds: Array

      • Optional IncludeInactive?: boolean
      • Optional MaximumDateModified?: Date
      • Optional MinimumDateModified?: Date
      • Optional TemplateIds?: number[]

    Returns Promise<unknown>

  • Get a list of templates by IDs

    Returns

    Returns object that represents an object describing the inspection

    Parameters

    • inspTemplateIds: number[]
    • Optional options: {
          MaximumDateModified?: Date;
          MinimumDateModified?: Date;
      }

      An object which can include: [IncludeInactive]: boolean, MaximumDateModified: Date, MinimumDateModified: Date, TemplateIds: Array

      • Optional MaximumDateModified?: Date
      • Optional MinimumDateModified?: Date

    Returns Promise<unknown>

Inspections Methods

  • Cancel inspections

    Returns

    Returns object that represents a collection of inspections

    Parameters

    • inspectionIds: number[]

      An array of the IDs to cancel the matched inspections

    • Optional cancelReason: string

      A reason for cancelling the inspection(s)

    • Optional dateCancelled: Date

      The date/time that it should be indicated the inspection was cancelled

    Returns Promise<unknown>

  • Close inspections

    Returns

    Returns object that represents a collection of inspections

    Parameters

    • inspectionIds: number[]

      An array of the IDs to close the matched inspections

    Returns Promise<unknown>

  • Add an entity to an existing inspection This method requires an Entity/Asset to be specified. You can either specify the Entity Type and its UID or a WorkOrderEntityBase Object.

    Returns

    Returns object that represents an object which describes an Inspection Entity

    Parameters

    • entity: {
          Entity?: Object;
          EntityType?: string;
          EntityUid?: string;
      }

      Either of two attribute combinations are valid: entityType & entityUid OR Entity as a fully-inflated WorkOrderEntity (WorkOrderEntityBase) object.

      • Optional Entity?: Object
      • Optional EntityType?: string
      • Optional EntityUid?: string
    • inspectionId: number

      An Inspection ID to attach the entity/asset to.

    • updateXY: boolean = true

      Provide a boolean to whether the inspection's X/Y coordinates should be updated. Default is true.

    • facility: {
          Facility_Id?: string;
          Level_Id?: string;
      } = {}

      Add Facility_Id for the Facility Identifier and Level_id for the Facility Level Identifier. Defaults to empty so that no facility is specified.

      • Optional Facility_Id?: string
      • Optional Level_Id?: string

    Returns Promise<unknown>

  • Create new inspection

    Returns

    Returns Promise that represents an object describing the newly-created inspection

    Parameters

    • insp_data: Object

      See /{subdirectory}/apidocs/#/data-type-infodataType=InspectionBase on your Cityworks instance

    Returns Promise<unknown>

  • Create inspections from an array of entities

    Returns

    Returns Promise that represents a collection of objects describing the newly-created inspections

    Parameters

    • insp_data: Object

      See /{subdirectory}/apidocs/#/data-type-infodataType=InspectionBase on your Cityworks instance

    Returns Promise<unknown>

  • Create an inspection from a parent inspection (TODO: what parent!?)

    Returns

    Returns object that represents an object describing the newly-created inspection

    Parameters

    • insp_data: Object

      See /{subdirectory}/apidocs/#/data-type-infodataType=InspectionBase on your Cityworks instance

    Returns Promise<unknown>

  • Create an inspection from a service request

    Returns

    Returns object that represents an object describing the newly-created inspection

    Parameters

    • insp_data: Object

      See /{subdirectory}/apidocs/#/data-type-infodataType=InspectionBase on your Cityworks instance

    Returns Promise<unknown>

  • Create an inspection from a WorkOrder

    Returns

    Returns object that represents an object describing the newly-created inspection

    Parameters

    • insp_data: Object

      See /{subdirectory}/apidocs/#/data-type-infodataType=InspectionBase on your Cityworks instance

    Returns Promise<unknown>

  • Create a search definition. Save the definition by setting SaveDefinition = true and supplying a SearchName.

    Returns

    Returns Promise that represents a collection of Cityworks Metadata Objects

    Parameters

    • searchData: Object

      Search data variables. See /{subdirectory}/apidocs/#/service-info/Ams/Inspection

    • Optional searchName: string

      What to name your search (if it should be saved)

    • Optional sharedWithin: number

      What group or domain to share the search to.

    • saveDefinition: boolean = true

      Whether or not to save the search definition. Defaults to true when a search name is specified.

    • enableEurl: boolean = true

      Whether or not to enable EURL for the saved search. Defaults to true.

    Returns Promise<unknown>

  • Delete inspections

    Returns

    Returns object that represents a collection of inspection Ids which have been deleted

    Parameters

    • inspectionIds: number[]

      An array of the IDs to delete the matched inspections

    Returns Promise<unknown>

  • Delete Map Layer Fields

    Returns

    Returns Promise that represents a collection of Objects describing the workorders

    Parameters

    • inspectionId: number

      The inspection ID to delete the map layer fields for.

    Returns Promise<unknown>

  • Get the answers for inspections

    Returns

    Returns Promise that represents a collection of Inspection Answers

    Parameters

    • inspections: number[]

      An Array of one or more Inspection IDs

    Returns Promise<unknown>

  • Get the audit log for a specific Inspection

    Returns

    Returns Promise that represents a collection of Cityworks Metadata Objects

    Parameters

    • inspectionId: number

      An Inspection ID to get the audit log for

    Returns Promise<unknown>

  • Get an inspection by ID

    Returns

    Returns Promise that represents an object describing the inspection

    Parameters

    • inspectionId: number

      The inspection ID to retrieve

    Returns Promise<unknown>

  • Get inspections by array of IDs

    Returns

    Returns Promise that represents a collection of Objects describing the inspections

    Parameters

    • inspectionIds: number[]

      The inspection IDs to retrieve

    Returns Promise<unknown>

  • Get Map Layer Fields

    Returns

    Returns Promise that represents a collection of Objects describing the inspections

    Parameters

    • requestId: number

      The inspection ID to get the map layer fields for.

    Returns Promise<unknown>

  • Move inspection by InspectionId. Must provide well known id (WKID) or well known text (WKT)

    Returns

    Returns Promise that represents an object describing the updated GISPoint

    Parameters

    • inspectionId: number

      The ID of the inspection that should be moved

    • x: number

      The X coordinate for the move

    • y: number

      The Y coordinate for the move

    • projection: {
          VcsWKID?: string;
          WKID?: string;
          WKT?: string;
      }

      Should include at least WKT or WKID attribute. Can also include VcsWKID attribute.

      • Optional VcsWKID?: string
      • Optional WKID?: string
      • Optional WKT?: string
    • Optional z: number

      the optional Z coordinate for the move

    Returns Promise<unknown>

  • Reopen closed inspections

    Returns

    Returns object that represents a collection of inspections

    Parameters

    • inspectionIds: number[]

      An array of the IDs to reopen the matched inspections

    Returns Promise<unknown>

  • Update an inspection

    Returns

    Returns Promise that represents an object describing the updated inspection

    Parameters

    • insp_data: Object

      See /{subdirectory}/apidocs/#/data-type-infodataType=InspectionBase on the Cityworks instance

    Returns Promise<unknown>

  • Update Map Layer Fields

    Returns

    Returns Promise that represents a ...

    Parameters

    • requestId: number

      The inspection ID to get the map layer fields for.

    • Optional x: number
    • Optional y: number
    • Optional domainId: number

      Domain ID

    • Optional z: number

      Optional Z coordinate

    Returns Promise<unknown>

Requests Methods

  • Uncancel inspections

    Returns

    Returns object that represents a collection of requests

    Parameters

    • inspectionIds: number[]

      An array of the IDs to uncancel the matched requests

    Returns Promise<unknown>

WorkOrder Options Methods

  • Get SubmitTo list

    Returns

    Returns Promise that represents a collection of employees. See: /{subdirectory}/apidocs/#/data-type-info;dataType=EmployeeNameId

    Parameters

    • includeInactiveEmployees: boolean = false

      Whether to include inactive employees in the returned list. Defaults to false.

    • Optional domainIds: number[]

      Filter to certain domains within the Cityworks instance.

    Returns Promise<unknown>