Class Request

Hierarchy

  • Request

Properties

admin?: any

Request Administration methods

attachments: any

Attachments methods

comment: any

Request Comments methods

costs: any

Request Costing methods

Request Categorization Methods

  • Get a list of problem nodes for a domain

    Returns

    Returns Promise that represents a collection of problem node objects.

    Parameters

    • domainId: number

      The domain ID for which to retrieve problem nodes.

    • viewOnly: boolean = false

      Return only view only problem nodes. Defaults to false.

    • Optional displayMode: Object

      Object that should contain two properties if you provide it: DisplayTextMode: string (C = Code, D = Description, CD = Code ~ Description). DisplayTextDelimeter: string, only impacts CD display text mode.

    • includeCancelled: boolean = false

      Return only cancelled problem nodes as well. Defaults to false.

    Returns Promise<unknown>

Request Object Search Methods

  • Get the records on the basis of RequestId, only populates RequestId, Description, ProblemCode properties

    Returns

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

    Parameters

    • requestId: string

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

    Returns Promise<unknown>

Request Options Methods

  • Get custom field templates for problem code

    Returns

    Returns Promise that represents a collection of custom fields

    Parameters

    • problemSid: number

      The problemSid whose template custom fields should be returned

    Returns Promise<unknown>

  • Get a list of possible DispatchTo values

    Returns

    Returns Promise that represents an Array of dispatchTo options.

    Parameters

    • domainId: number

      Domain to return possible dispatchTo values for

    Returns Promise<unknown>

  • Get a list of possible Employee values

    Returns

    Returns Promise that represents an Array of Employee options.

    Parameters

    • listType: string

      Which list (endpoint) to get. Includes only DispatchTo & SubmitTo.

    • domainId: number

      Domain to return possible dispatchTo values for

    Returns Promise<unknown>

  • Get a list of a problem code's priorities

    Returns

    Returns Promise that represents an Array of priorities

    Parameters

    • problemSid: number

      Return priorities for given problemSid

    Returns Promise<unknown>

  • Get problem leaf (template) by Sid

    Returns

    Returns Promise that represents an Object that describes the problem leaf (template)

    Parameters

    • problemSid: number

      Return problem leaf for given problemSid

    Returns Promise<unknown>

  • Get a list of problem codes

    Returns

    Returns Promise that represents an Array of problem name objects.

    Parameters

    • forPublicOnly: boolean = false

      Return only publicly-available service requests. Defaults to false.

    • onlyActiveTemplates: boolean = true

      Return only active templates. Defaults to true.

    • Optional domainIds: number[]

    Returns Promise<unknown>

  • Get a list of problem codes by keywords

    Returns

    Returns Promise that represents an Array of problem name objects.

    Parameters

    • keywords: string

      Keywords to search for potential problem codes

    Returns Promise<unknown>

  • Get the questions and answer options for a problem code

    Returns

    Returns Promise that represents a collection of questions and answer settings

    Parameters

    • problemSid: number

      The problemSid whose Q&A should be returned

    Returns Promise<unknown>

  • Get a list of default statuses

    Returns

    Returns Promise that represents an Array of statuses.

    Parameters

    • domainIds: number[]

      List of domains to return default statuses for

    Returns Promise<unknown>

  • Get a list of possible SubmitTo values

    Returns

    Returns Promise that represents an Array of submitTo options.

    Parameters

    • domainId: number

      Domain to return possible submitTo values for

    Returns Promise<unknown>

  • Get street codes

    Returns

    Returns Promise that represents an Array of Street Codes.

    Returns Promise<unknown>

Request Search Methods

  • Search for requests

    Returns

    Returns Promise that represents an Array of the matching request IDs

    Parameters

    • searchData: Object

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

    Returns Promise<unknown>

Request Templates Methods

  • 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. See: /{subdirectory}/apidocs/#/data-type-info;dataType=CWMetadata

    Parameters

    • searchData: Object

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

    • 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.

    Returns Promise<unknown>

  • Get the questions and answers for a(many) request template(s)

    Returns

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

    Parameters

    • problemSids: number[]

      An array list of problemSids to retrieve templates for

    • Optional minimumDateModified: Date
    • Optional maximumDateModified: Date

    Returns Promise<unknown>

  • Get request templates (problem leaf[s])

    Returns

    Returns Promise that represents a collection of Problem Leafs. See /{subdirectory}/apidocs/#/data-type-info;dataType=ProblemLeaf

    Parameters

    • Optional templateIds: number[]

      Array of specific template IDs to retrieve

    • canCreate: boolean = false

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

    • includeInactiveIf: boolean = false

      If true, returns inactive templates, default is false

    • Optional minimumDateModified: Date

      ?

    • Optional maximumDateModified: Date

      ?

    Returns Promise<unknown>

  • Get a list of templates

    Returns

    Returns Promise that represents

    Parameters

    • problemSids: number[]

      An array list of problemSids to retrieve templates for

    • Optional minimumDateModified: Date

      ?

    • Optional maximumDateModified: Date

      ?

    Returns Promise<unknown>

  • Get WorkOrder templates that are associated to this request template type

    Returns

    Returns Promise that represents a collection of Problem WO Templates. See /{subdirectory}/apidocs/#/data-type-info;dataType=ProblemWOTemplate

    Parameters

    • problemSids: number[]

      An array list of problemSids to retrieve Problem WO templates for

    • includeInactive: boolean = false

    Returns Promise<unknown>

  • Get a list of template id results for a provided search parameters

    Returns

    Returns Promise that represents a list of template IDs.

    Parameters

    • searchData: Object

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

    Returns Promise<unknown>

Requests Methods

  • Cancel requests

    Returns

    Returns object that represents a collection of requests

    Parameters

    • requestIds: number[]

      An array of the IDs to cancel the matched requests

    • Optional cancelReason: string

      A reason for cancelling the request(s)

    • Optional dateCancelled: Date

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

    Returns Promise<unknown>

  • Change custom field category for provided requests

    Returns

    Returns Promise that represents a collection of requests

    Parameters

    • requestIds: number[]

      The RequestIds whose custom fields should be returned

    • categoryId: number

      The new custom field grouping/category which should be assigned to the provided requests

    Returns Promise<unknown>

  • Change a request's problem code

    Returns

    Returns Promise that represents an object describing the updated request

    Parameters

    • requestId: number

      The request ID to change

    • problemSid: number

      The request's new ProblemSID

    Returns Promise<unknown>

  • Close requests

    Returns

    Returns object that represents a collection of requests

    Parameters

    • requestIds: number[]

      An array of the IDs to close the matched requests

    Returns Promise<unknown>

  • Create new requests

    Returns

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

    Parameters

    • sr_data: Object

      See /{subdirectory}/apidocs/#/data-type-infodataType=RequestBase on the 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/ServiceRequest

    • 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 requests

    Returns

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

    Parameters

    • requestIds: number[]

      An array of the IDs to delete the matched requests

    Returns Promise<unknown>

  • Delete Map Layer Fields

    Returns

    Returns Promise that represents a collection of Objects describing the deleted map layer fields

    Parameters

    • requestId: number

      The request ID to delete the map layer fields for.

    Returns Promise<unknown>

  • Get the audit log for a specific request

    Returns

    Returns Promise that represents a collection of Cityworks Metadata Objects

    Parameters

    • requestId: number

      A Request ID to get the audit log for

    Returns Promise<unknown>

  • Get a request by ID

    Returns

    Returns Promise that represents an object describing the request

    Parameters

    • requestId: number

      The ID of the request to retrieve

    Returns Promise<unknown>

  • Get requests by array of IDs

    Returns

    Returns Promise that represents a collection of Objects describing the requests

    Parameters

    • requestIds: number[]

      The request IDs to retrieve

    Returns Promise<unknown>

  • Get custom fields for provided requests

    Returns

    Returns Promise that represents a collection of custom fields

    Parameters

    • requestIds: number[]

      The RequestIds whose custom fields should be returned

    Returns Promise<unknown>

  • Get Map Layer Fields

    Returns

    Returns Promise that represents a collection of Objects describing the request map layer fields

    Parameters

    • requestId: number

      The request ID to get the map layer fields for.

    Returns Promise<unknown>

  • Move a request's point

    Returns

    Returns Promise that represents an object describing the updated GISPoint

    Parameters

    • requestId: number
    • x: number
    • y: number
    • 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

      Optional Z coordinate

    Returns Promise<unknown>

  • Reopen closed requests

    Returns

    Returns object that represents a collection of requests

    Parameters

    • requestIds: number[]

      An array of the IDs to reopen the matched requests

    Returns Promise<unknown>

  • Uncancel requests

    Returns

    Returns object that represents a collection of requests

    Parameters

    • requestIds: number[]

      An array of the IDs to uncancel the matched requests

    Returns Promise<unknown>

  • Update a request

    Returns

    Returns Promise that represents an object describing the updated request

    Parameters

    • sr_data: Object

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

    Returns Promise<unknown>

  • Update request's map layer fields

    Returns

    Returns Promise that represents an object describing the updated map layer fields

    Parameters

    • requestId: number

    Returns Promise<unknown>

  • Update Map Layer Fields

    Returns

    Returns Promise that represents a ...

    Parameters

    • requestId: number

      The service request 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>