AbstractThe resource type that extends OslcResource
ProtectedapiAPI base path (e.g., '/maximo/api')
ProtectedloggerProtectedhttpThe HTTP client for making requests
ProtectedapiAPI home path (e.g., '/maximo/api/os')
OptionaluniqueUnique column name for the object (e.g., 'autoscriptid', 'workorderid')
OptionalappMaximo App Name for generating Web URLs (e.g., 'autoscript', 'wotrack')
ProtectedobjectThe Maximo object structure name (e.g., 'mxapiasset')
Returns the current logger used by this service instance.
ProtectedformatOptionalproperties: string | string[]ProtectedhandleError handler
the error to process
Gets the unique column name for this resource.
Gets the unique column ID value from a resource object.
The resource object.
Generates a Maximo UI URL for a record.
The specific internal ID of the record.
OptionalappNameOverride: stringOptional. Provide or override the Maximo App Name.
OptionalchangeTab: stringOptional. Tab id to switch to within the app, e.g. 'relationships'.
InternalExecutes a ResourceCreate request. This is called internally by ResourceCreate.execute().
The ResourceCreate builder to execute
A promise resolving to the created resource
InternalExecutes a ResourceUpdate request. This is called internally by ResourceUpdate.execute().
The ResourceUpdate builder to execute
A promise resolving to a response object with success status
InternalExecutes a ResourceDelete request. This is called internally by ResourceDelete.execute().
The ResourceDelete builder to execute
A promise that resolves when the resource is deleted
InternalExecutes a ResourceFetch request. This is called internally by ResourceFetch.execute().
The ResourceFetch builder to execute
A promise resolving to the resource
Executes a WebMethod action on a specific resource
Optionalpayload: anyOptionalreturnProperties: string | string[]Executes a workflow action on a specific resource
Optionalpayload: anyOptionalreturnProperties: string | string[]Executes an action on an arbitrary endpoint Useful for service endpoints that don't follow the standard resource/ID pattern Supports both GET and POST methods based on payload presence
The endpoint to call the action on (e.g., 'service/logging')
The name of the action to execute (e.g., 'wsmethod:streamLog')
Optionalpayload: anyOptional payload data for the action (if provided, uses POST, otherwise GET)
OptionalreturnProperties: string | string[]Optional properties to return in the response
A promise resolving to a response object containing success status and optional data
Returns a fluent builder for update payloads
Returns a fluent builder for create payloads (alias for updateBuilder)
ProtectedprimaryPrimary key columns for this resource type
Sets the API home path
The API home path to use
ProtectedgetGets the primary columns for this resource type Can be overridden by subclasses to specify their primary key columns
Array of primary key column names
ProtectedencodeEncodes resource ID from primary key values Format: {col1}:{value1}|{col2}:{value2}
Object containing primary key values
Encoded resource ID string
ProtecteddecodeDecodes resource ID into primary key values
Encoded resource ID string
Object with primary key values
Creates a fluent builder for creating a new resource. Provides fine-grained control over the POST request headers and parameters.
The data for the new resource
A ResourceCreate builder instance
Creates a fluent builder for updating an existing resource. Provides fine-grained control over the PATCH request headers and parameters.
The ID of the resource to update
The data to update
A ResourceUpdate builder instance
Creates a new resource (Simple Version)
The data for the new resource
OptionalreturnProperties: string | string[]Optional properties to return in the response (string or string array)
OptionalgetCreatedResult: booleanIf true, fetches and returns the created resource after creation (default: false)
A promise resolving to the created resource
Creates a new resource
The data for the new resource
Optionalparams: Record<string, string>Optional query parameters (e.g., { ignorecollectionref: '1' })
Optionalheaders: Record<string, string>Optional HTTP headers (e.g., { properties: 'field1,field2', 'x-allow-events': '0' })
A promise resolving to the created resource
Updates an existing resource (simple version)
The ID of the resource to update
The data to update
OptionalreturnProperties: string | string[]Optional properties to return in the response (string or string array)
A promise resolving to a response object containing success status and optional data
Updates an existing resource
The ID of the resource to update
The data to update
Optionalparams: Record<string, string>Optional query parameters
Optionalheaders: Record<string, string>Optional HTTP headers (e.g., { patchtype: 'MERGE', 'x-allow-events': '0' })
A promise resolving to a response object containing success status and optional data
Merges changes into an existing resource (simple version)
The ID of the resource to update
The data to merge, including child objects
OptionalreturnProperties: string | string[]Optional properties to return in the response (string or string array)
A promise resolving to a response object containing success status and optional data
Merges changes into an existing resource (e.g., for updating child objects) Uses MERGE patch type to avoid deleting unspecified child objects
The ID of the resource to update
The data to merge, including child objects
Optionalparams: Record<string, string>Optional query parameters
Optionalheaders: Record<string, string>Optional HTTP headers
A promise resolving to a response object containing success status and optional data
Synchronizes a resource: Creates it if it doesn't exist (based on primary keys), or updates it if it does. Uses the SYNC method override.
The data for the resource, including primary key fields.
Optionalparams: Record<string, string>Optional query parameters
Optionalheaders: Record<string, string>Optional HTTP headers (e.g., { patchtype: 'MERGE' })
A promise resolving to a response object containing success status and optional data.
Deletes a resource
The ID of the resource to delete or the resource object itself
Optionalparams: Record<string, string>Optional query parameters
Optionalheaders: Record<string, string>Optional HTTP headers
A promise that resolves when the resource is deleted
Creates a fluent builder for deleting a single resource by ID. Provides fine-grained control over the DELETE request headers.
The ID of the resource to delete
A ResourceDelete builder instance
Retrieves a resource by its ID
The ID of the resource to retrieve
Optionalselect: string | string[]Optional oslc.select to return in the response (string or string array)
A promise resolving to the resource
Creates a fluent builder for fetching a single resource by ID. Provides fine-grained control over the GET request parameters.
The ID of the resource to fetch
A ResourceFetch builder instance
Executes a query built by QueryBuilder
The QueryBuilder instance to execute
A promise resolving to a paginated result
Finds all resources matching the given condition
OptionalwhereOrBuilder: string | QueryBuilder<T>Optional OSLC where condition or a QueryBuilder instance
Optionalselect: SelectableField<T> | SelectableField<T>[]Optional fields to select (ignored if whereOrBuilder is a QueryBuilder)
OptionalorderBy: string | string[]Optional fields to order by (ignored if whereOrBuilder is a QueryBuilder)
A promise resolving to an array of resources
Finds resources with pagination
OptionalwhereOrBuilder: string | QueryBuilder<T>Optional OSLC where condition or a QueryBuilder instance
Page number (1-based) (ignored if whereOrBuilder is a QueryBuilder)
Number of items per page (ignored if whereOrBuilder is a QueryBuilder)
Optionalselect: SelectableField<T> | SelectableField<T>[]Optional fields to select (ignored if whereOrBuilder is a QueryBuilder)
OptionalorderBy: string | string[]Optional fields to order by (ignored if whereOrBuilder is a QueryBuilder)
A promise resolving to a paginated result
Counts resources matching the given condition
OptionalwhereOrBuilder: string | QueryBuilder<T>Optional OSLC where condition or a QueryBuilder instance
A promise resolving to the count
Finds a resource by its ID
The ID of the resource
Optionalproperties: string | string[]Optional properties to return (string or string array)
A promise resolving to the resource
Finds resources using a saved query
The name of the saved query or a QueryBuilder with a saved query
Optionalselect: SelectableField<T> | SelectableField<T>[]Optional fields to select (ignored if queryNameOrBuilder is a QueryBuilder)
OptionalorderBy: string | string[]Optional fields to order by (ignored if queryNameOrBuilder is a QueryBuilder)
A promise resolving to a paginated result
Finds distinct values for a field
The field to get distinct values for or a QueryBuilder with distinct field
Optionalwhere: stringOptional OSLC where condition (ignored if fieldOrBuilder is a QueryBuilder)
A promise resolving to an array of distinct values
Creates a new bulk operation builder for this resource
A BulkOperationBuilder instance
Executes a bulk operation
The BulkOperationBuilder instance to execute or an array of partial resource objects
OptionalactionName: stringOptional action name to execute (for object methods)
Optionalparams: Record<string, string>Optionalheaders: Record<string, string>A promise resolving to the bulk operation result
Retrieves allowed actions for a specific resource
The ID of the resource to get allowed actions for
A promise resolving to the resource with allowed actions information
Executes an action on a specific resource Supports both GET and POST methods based on payload presence
The ID of the resource to execute the action on
The name of the action to execute
Optionalpayload: anyOptional payload data for the action (if provided, uses POST, otherwise GET)
OptionalreturnProperties: string | string[]Optional properties to return in the response
A promise resolving to a response object containing success status and optional data
Executes a global action on the object structure (not tied to a specific resource)
The name of the action to execute
Optionalpayload: anyOptional payload data for the action (if provided, uses POST, otherwise GET)
OptionalreturnProperties: string | string[]Optional properties to return in the response
A promise resolving to a response object containing success status and optional data
Returns the object structure name for this service.
Creates a new ResourceService for a specific Maximo object structure
The resource type that extends OslcResource
The HTTP client for making requests
The Maximo object structure name (e.g., 'mxapiasset')
OptionalprimaryKeys: string[]Optionallogger: ILoggerLists available BIRT reports for this object structure
A promise resolving to an array of report descriptors
Generates a BIRT report
The name of the report to generate (e.g., 'woprint.rptdesign')
The output format (default: 'pdf'). Other options: 'xls', 'html', etc.
OptionaladditionalParams: Record<string, any>Optional additional parameters (e.g., oslc.where, or report parameters)
A promise resolving to the report content as a buffer (or appropriate type based on environment)
Base service class for Maximo resources Provides CRUD operations and query capabilities for any Maximo resource