diff --git a/.changeset/friendly-mugs-relate.md b/.changeset/friendly-mugs-relate.md new file mode 100644 index 000000000..f8006ea9b --- /dev/null +++ b/.changeset/friendly-mugs-relate.md @@ -0,0 +1,5 @@ +--- +"@equinor/mad-maintenance-api-ts-wrapper": minor +--- + +Updated wrapper to version 1.33.0 diff --git a/packages/api/maintenance-api/src/lib/generated/core/OpenAPI.ts b/packages/api/maintenance-api/src/lib/generated/core/OpenAPI.ts index baab5cd57..c97428628 100644 --- a/packages/api/maintenance-api/src/lib/generated/core/OpenAPI.ts +++ b/packages/api/maintenance-api/src/lib/generated/core/OpenAPI.ts @@ -21,7 +21,7 @@ export type OpenAPIConfig = { export const OpenAPI: OpenAPIConfig = { BASE: 'https://api-test.gateway.equinor.com/maintenance-api', - VERSION: '1.32.0', + VERSION: '1.33.0', WITH_CREDENTIALS: false, CREDENTIALS: 'include', TOKEN: undefined, diff --git a/packages/api/maintenance-api/src/lib/generated/core/request.ts b/packages/api/maintenance-api/src/lib/generated/core/request.ts index f27481cc3..10e00fca8 100644 --- a/packages/api/maintenance-api/src/lib/generated/core/request.ts +++ b/packages/api/maintenance-api/src/lib/generated/core/request.ts @@ -93,7 +93,7 @@ const getUrl = (config: OpenAPIConfig, options: ApiRequestOptions): string => { return substring; }); - const url = `${config.BASE}${path}` + (path.endsWith('/') ? '' : '/'); + const url = `${config.BASE}${path}`; if (options.query) { return `${url}${getQueryString(options.query)}`; diff --git a/packages/api/maintenance-api/src/lib/generated/index.ts b/packages/api/maintenance-api/src/lib/generated/index.ts index 6eea4fa6e..f5d5827f9 100644 --- a/packages/api/maintenance-api/src/lib/generated/index.ts +++ b/packages/api/maintenance-api/src/lib/generated/index.ts @@ -3,6 +3,7 @@ /* tslint:disable */ /* eslint-disable */ +export type { _return } from './models/_return'; export type { ActivityCode } from './models/ActivityCode'; export type { ActivityCodeGroup } from './models/ActivityCodeGroup'; export type { ActivityReport } from './models/ActivityReport'; @@ -34,23 +35,26 @@ export type { CharacteristicsUpdate } from './models/CharacteristicsUpdate'; export type { CharacteristicValues } from './models/CharacteristicValues'; export type { Class } from './models/Class'; export type { CodeGroup } from './models/CodeGroup'; -export type { Communication } from './models/Communication'; -export type { CommunicationBasic } from './models/CommunicationBasic'; -export type { CommunicationCreate } from './models/CommunicationCreate'; export type { ConceptActivities } from './models/ConceptActivities'; export type { Conflict } from './models/Conflict'; export type { CorrectiveWorkOrder } from './models/CorrectiveWorkOrder'; export type { CorrectiveWorkOrderBasic } from './models/CorrectiveWorkOrderBasic'; export type { CorrectiveWorkOrderCreate } from './models/CorrectiveWorkOrderCreate'; export type { CorrectiveWorkOrderJsonPatch } from './models/CorrectiveWorkOrderJsonPatch'; -export type { CorrectiveWorkOrderMaterial } from './models/CorrectiveWorkOrderMaterial'; export type { CorrectiveWorkOrderOperation } from './models/CorrectiveWorkOrderOperation'; -export type { CorrectiveWorkOrderServiceOperation } from './models/CorrectiveWorkOrderServiceOperation'; export type { CorrectiveWorkOrderSimple } from './models/CorrectiveWorkOrderSimple'; export type { CorrectiveWorkOrderSimpleWithRelationship } from './models/CorrectiveWorkOrderSimpleWithRelationship'; export type { CorrectiveWorkOrderWithOperationSelf } from './models/CorrectiveWorkOrderWithOperationSelf'; export type { costNetworkQuery } from './models/costNetworkQuery'; export type { costWbsQuery } from './models/costWbsQuery'; +export type { data_custom } from './models/data_custom'; +export type { data_customx } from './models/data_customx'; +export type { data_fleet } from './models/data_fleet'; +export type { data_fleetx } from './models/data_fleetx'; +export type { data_general } from './models/data_general'; +export type { data_generalx } from './models/data_generalx'; +export type { data_specific } from './models/data_specific'; +export type { data_specificx } from './models/data_specificx'; export type { DetectionMethod } from './models/DetectionMethod'; export type { DetectionMethodGroup } from './models/DetectionMethodGroup'; export type { DetectionMethodGroupWithText } from './models/DetectionMethodGroupWithText'; @@ -123,6 +127,7 @@ export type { includeStatusDetails } from './models/includeStatusDetails'; export type { includeSubEquipment } from './models/includeSubEquipment'; export type { includeTagCharacteristics } from './models/includeTagCharacteristics'; export type { includeTags } from './models/includeTags'; +export type { includeTaskResponsibleDetails } from './models/includeTaskResponsibleDetails'; export type { includeURLReferences } from './models/includeURLReferences'; export type { includeWorkOrders } from './models/includeWorkOrders'; export type { includeWorkOrderTypes } from './models/includeWorkOrderTypes'; @@ -170,6 +175,8 @@ export type { MaintenanceRecordOverridePriority } from './models/MaintenanceReco export type { MaintenanceRecordTask } from './models/MaintenanceRecordTask'; export type { MaintenanceRecordTaskCreate } from './models/MaintenanceRecordTaskCreate'; export type { MaintenanceRecordTaskUpdateJsonPatch } from './models/MaintenanceRecordTaskUpdateJsonPatch'; +export type { MaintenanceRecordTaskWithResponsibleDetails } from './models/MaintenanceRecordTaskWithResponsibleDetails'; +export type { MaintenanceRecordTypes } from './models/MaintenanceRecordTypes'; export type { MaintenanceStrategy } from './models/MaintenanceStrategy'; export type { MaterialMinimal } from './models/MaterialMinimal'; export type { Measurement } from './models/Measurement'; @@ -227,12 +234,19 @@ export type { ProjectWorkOrderSimple } from './models/ProjectWorkOrderSimple'; export type { ProjectWorkOrderSimpleWithRelationship } from './models/ProjectWorkOrderSimpleWithRelationship'; export type { ProjectWorkOrderWithOperationSelf } from './models/ProjectWorkOrderWithOperationSelf'; export type { QualitativeCode } from './models/QualitativeCode'; +export type { RawEquipmentChange } from './models/RawEquipmentChange'; +export type { RawEquipmentChangeReturn } from './models/RawEquipmentChangeReturn'; +export type { RawEquipmentCreate } from './models/RawEquipmentCreate'; +export type { RawEquipmentCreateReturn } from './models/RawEquipmentCreateReturn'; export type { RelationshipToDocument } from './models/RelationshipToDocument'; export type { RelationshipToDocumentsAdd } from './models/RelationshipToDocumentsAdd'; export type { RelationshipToEquipmentAdd } from './models/RelationshipToEquipmentAdd'; export type { RelationshipToMaintenanceRecordAdd } from './models/RelationshipToMaintenanceRecordAdd'; export type { RelationshipToTagAdd } from './models/RelationshipToTagAdd'; export type { RelationshipURLReferencesAdd } from './models/RelationshipURLReferencesAdd'; +export type { ResponsiblePerson } from './models/ResponsiblePerson'; +export type { return_commit } from './models/return_commit'; +export type { return_warranty } from './models/return_warranty'; export type { RevisionWorkOrderOperation } from './models/RevisionWorkOrderOperation'; export type { SafetyMeasure } from './models/SafetyMeasure'; export type { safetyMeasureDocumentIdPath } from './models/safetyMeasureDocumentIdPath'; @@ -259,6 +273,7 @@ export type { SubseaWorkOrderOperation } from './models/SubseaWorkOrderOperation export type { SubseaWorkOrderSimple } from './models/SubseaWorkOrderSimple'; export type { SubseaWorkOrderSimpleWithRelationship } from './models/SubseaWorkOrderSimpleWithRelationship'; export type { SubseaWorkOrderWithOperationSelf } from './models/SubseaWorkOrderWithOperationSelf'; +export type { SupportedStatusesWorkOrderPlan } from './models/SupportedStatusesWorkOrderPlan'; export type { SupportedStatusesWorkOrdersOptimizedForQuery } from './models/SupportedStatusesWorkOrdersOptimizedForQuery'; export type { SurfaceDegradationFactor } from './models/SurfaceDegradationFactor'; export type { Tag } from './models/Tag'; @@ -308,6 +323,7 @@ export type { URLReferenceWithCharacteristics } from './models/URLReferenceWithC export type { User } from './models/User'; export type { UserAuthorizations } from './models/UserAuthorizations'; export type { ValidationProblemDetails } from './models/ValidationProblemDetails'; +export type { warranty } from './models/warranty'; export type { WorkCenter } from './models/WorkCenter'; export type { WorkOrderAttachment } from './models/WorkOrderAttachment'; export type { WorkOrderChangeLogBasic } from './models/WorkOrderChangeLogBasic'; @@ -328,6 +344,8 @@ export type { WorkOrderOperationSimple } from './models/WorkOrderOperationSimple export type { WorkOrderOperationTimeTicketAdd } from './models/WorkOrderOperationTimeTicketAdd'; export type { WorkOrderOptimizedForQuery } from './models/WorkOrderOptimizedForQuery'; export type { WorkOrderServiceOperationJsonPatch } from './models/WorkOrderServiceOperationJsonPatch'; +export type { WorkOrderTypeId } from './models/WorkOrderTypeId'; +export type { WorkOrderTypes } from './models/WorkOrderTypes'; export type { WorkOrderWithOperationList } from './models/WorkOrderWithOperationList'; export { ActivityReportsService } from './services/ActivityReportsService'; diff --git a/packages/api/maintenance-api/src/lib/generated/models/ActivityReportJsonPatch.ts b/packages/api/maintenance-api/src/lib/generated/models/ActivityReportJsonPatch.ts index e0230f55f..ccf1555a2 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/ActivityReportJsonPatch.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/ActivityReportJsonPatch.ts @@ -14,8 +14,11 @@ export type ActivityReportJsonPatch = { * Operation `append` is suitable for the following properties: * - `/text` * + * Operation `prepend` is suitable for the following properties: + * - `/text` + * */ - op: 'replace' | 'append'; + op: 'replace' | 'append' | 'prepend'; /** * Path indicating the property to be impacted by the operation */ diff --git a/packages/api/maintenance-api/src/lib/generated/models/Communication.ts b/packages/api/maintenance-api/src/lib/generated/models/Communication.ts deleted file mode 100644 index e961684b3..000000000 --- a/packages/api/maintenance-api/src/lib/generated/models/Communication.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { Attachment } from './Attachment'; -import type { CommunicationBasic } from './CommunicationBasic'; - -export type Communication = (CommunicationBasic & { - attachments?: Array; -}); - diff --git a/packages/api/maintenance-api/src/lib/generated/models/CommunicationCreate.ts b/packages/api/maintenance-api/src/lib/generated/models/CommunicationCreate.ts deleted file mode 100644 index 0279f17b3..000000000 --- a/packages/api/maintenance-api/src/lib/generated/models/CommunicationCreate.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { CommunicationBasic } from './CommunicationBasic'; - -export type CommunicationCreate = (CommunicationBasic & { - /** - * If true, an email will be sent to the recipients. If false, no email will be sent. - * - */ - sendEmail: boolean; -}); - diff --git a/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrder.ts b/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrder.ts index d5f6fce37..a580f705b 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrder.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrder.ts @@ -5,10 +5,10 @@ import type { CorrectiveWorkOrderBasic } from './CorrectiveWorkOrderBasic'; import type { CorrectiveWorkOrderOperation } from './CorrectiveWorkOrderOperation'; -import type { CorrectiveWorkOrderServiceOperation } from './CorrectiveWorkOrderServiceOperation'; import type { EstimatedCosts } from './EstimatedCosts'; import type { MaintenanceRecordMinimalWithActiveStatusIds } from './MaintenanceRecordMinimalWithActiveStatusIds'; import type { Measurement } from './Measurement'; +import type { ServiceOperation } from './ServiceOperation'; import type { Status } from './Status'; import type { TagBasic } from './TagBasic'; import type { TagRelatedToWorkOrder } from './TagRelatedToWorkOrder'; @@ -16,7 +16,7 @@ import type { WorkOrderAttachment } from './WorkOrderAttachment'; export type CorrectiveWorkOrder = (CorrectiveWorkOrderBasic & { operations?: Array; - serviceOperations?: Array; + serviceOperations?: Array; /** * All statuses possible with information about activation */ diff --git a/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrderJsonPatch.ts b/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrderJsonPatch.ts index 31f9eef86..67696a4d8 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrderJsonPatch.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrderJsonPatch.ts @@ -29,8 +29,11 @@ export type CorrectiveWorkOrderJsonPatch = Array<{ * Operation `append` is suitable for the following properties: * - `/text` * + * Operation `prepend` is suitable for the following properties: + * - `/text` + * */ - op?: 'append' | 'replace'; + op?: 'append' | 'replace' | 'prepend'; /** * The property to be updated by the non-trivial patch operation. * `/workCenterId` and `/workCenterPlantId` must be provided in same request. diff --git a/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrderMaterial.ts b/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrderMaterial.ts deleted file mode 100644 index dab23aebd..000000000 --- a/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrderMaterial.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { Communication } from './Communication'; -import type { WorkOrderMaterial } from './WorkOrderMaterial'; - -export type CorrectiveWorkOrderMaterial = (WorkOrderMaterial & { - /** - * Communication between the work order responsible and the requisitioner - */ - communications?: Array | null; -}); - diff --git a/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrderOperation.ts b/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrderOperation.ts index 91858e4ae..7ef4bbbb7 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrderOperation.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrderOperation.ts @@ -3,9 +3,9 @@ /* tslint:disable */ /* eslint-disable */ -import type { CorrectiveWorkOrderMaterial } from './CorrectiveWorkOrderMaterial'; import type { MeasuringPointFromTagLookup } from './MeasuringPointFromTagLookup'; import type { TechnicalFeedback } from './TechnicalFeedback'; +import type { WorkOrderMaterial } from './WorkOrderMaterial'; import type { WorkOrderOperation } from './WorkOrderOperation'; export type CorrectiveWorkOrderOperation = (WorkOrderOperation & { @@ -17,6 +17,6 @@ export type CorrectiveWorkOrderOperation = (WorkOrderOperation & { * Technical feedback to be completed as part of work order execution */ technicalFeedback?: Array; - materials?: Array | null; + materials?: Array | null; }); diff --git a/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrderServiceOperation.ts b/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrderServiceOperation.ts deleted file mode 100644 index 01a8b1152..000000000 --- a/packages/api/maintenance-api/src/lib/generated/models/CorrectiveWorkOrderServiceOperation.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* generated using openapi-typescript-codegen -- do no edit */ -/* istanbul ignore file */ -/* tslint:disable */ -/* eslint-disable */ - -import type { Communication } from './Communication'; -import type { ServiceOperation } from './ServiceOperation'; - -export type CorrectiveWorkOrderServiceOperation = (ServiceOperation & { - /** - * Communication between the work order responsible and the requisitioner - */ - communications?: Array; -}); - diff --git a/packages/api/maintenance-api/src/lib/generated/models/FailureReport.ts b/packages/api/maintenance-api/src/lib/generated/models/FailureReport.ts index b86221f6e..a7bd4923e 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/FailureReport.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/FailureReport.ts @@ -8,7 +8,7 @@ import type { FailureReportBasic } from './FailureReportBasic'; import type { MaintenancePlanItemTaskNotification } from './MaintenancePlanItemTaskNotification'; import type { MaintenanceRecordActivity } from './MaintenanceRecordActivity'; import type { MaintenanceRecordItemMetadata } from './MaintenanceRecordItemMetadata'; -import type { MaintenanceRecordTask } from './MaintenanceRecordTask'; +import type { MaintenanceRecordTaskWithResponsibleDetails } from './MaintenanceRecordTaskWithResponsibleDetails'; import type { Measurement } from './Measurement'; import type { Status } from './Status'; import type { TagBasic } from './TagBasic'; @@ -39,7 +39,7 @@ export type FailureReport = (FailureReportBasic & { /** * Tasks for this failure report */ - tasks?: Array; + tasks?: Array; /** * Attachments for this failure report */ diff --git a/packages/api/maintenance-api/src/lib/generated/models/FailureReportJsonPatch.ts b/packages/api/maintenance-api/src/lib/generated/models/FailureReportJsonPatch.ts index 928da579c..7eec4e06f 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/FailureReportJsonPatch.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/FailureReportJsonPatch.ts @@ -32,8 +32,11 @@ export type FailureReportJsonPatch = { * Operation `append` is suitable for the following properties: * - `/text` * + * Operation `prepend` is suitable for the following properties: + * - `/text` + * */ - op: 'replace' | 'append'; + op: 'replace' | 'append' | 'prepend'; /** * Path indicating the property to be impacted by the operation */ diff --git a/packages/api/maintenance-api/src/lib/generated/models/GenericWorkOrderJsonPatch.ts b/packages/api/maintenance-api/src/lib/generated/models/GenericWorkOrderJsonPatch.ts index ef68e8276..154ee974f 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/GenericWorkOrderJsonPatch.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/GenericWorkOrderJsonPatch.ts @@ -23,8 +23,11 @@ export type GenericWorkOrderJsonPatch = Array<{ * Operation `append` is suitable for the following properties: * - `/text` * + * Operation `prepend` is suitable for the following properties: + * - `/text` + * */ - op?: 'append' | 'replace'; + op?: 'append' | 'replace' | 'prepend'; /** * The property to be updated by the non-trivial patch operation. * `/workCenterId` and `/workCenterPlantId` must be provided in same request. diff --git a/packages/api/maintenance-api/src/lib/generated/models/MaintenanceRecordTask.ts b/packages/api/maintenance-api/src/lib/generated/models/MaintenanceRecordTask.ts index f852aaf30..8fbbcda76 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/MaintenanceRecordTask.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/MaintenanceRecordTask.ts @@ -15,7 +15,7 @@ export type MaintenanceRecordTask = { title: string; text: string; /** - * Active statuses for the Failure report with space as separating character + * Active statuses for the Maintenance record with space as separating character */ activeStatusIds: string; /** @@ -34,18 +34,6 @@ export type MaintenanceRecordTask = { * Value is dependent on taskResponsibleType */ taskResponsibleId: string; - /** - * The full name of the person who is responsible for the task. - */ - taskResponsible?: string; - /** - * The email address of the person who is responsible for the task. - */ - taskResponsibleEmail?: string; - /** - * Date and time of when the the task was last changed. - */ - changedDateTime?: string | null; plannedStartDateTime: string | null; plannedEndDateTime: string | null; createdDateTime: string | null; diff --git a/packages/api/maintenance-api/src/lib/generated/models/MaintenanceRecordTaskWithResponsibleDetails.ts b/packages/api/maintenance-api/src/lib/generated/models/MaintenanceRecordTaskWithResponsibleDetails.ts new file mode 100644 index 000000000..1228b0ccd --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/MaintenanceRecordTaskWithResponsibleDetails.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { MaintenanceRecordTask } from './MaintenanceRecordTask'; + +export type MaintenanceRecordTaskWithResponsibleDetails = (MaintenanceRecordTask & { + /** + * The full name of the person who is responsible for the task. + */ + taskResponsible?: string | null; + /** + * The email address of the person who is responsible for the task. + */ + taskResponsibleEmail?: string | null; +}); + diff --git a/packages/api/maintenance-api/src/lib/generated/models/MaintenanceRecordTypes.ts b/packages/api/maintenance-api/src/lib/generated/models/MaintenanceRecordTypes.ts new file mode 100644 index 000000000..cc46bd114 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/MaintenanceRecordTypes.ts @@ -0,0 +1,13 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type MaintenanceRecordTypes = { + maintenanceRecordId?: string; + maintenanceRecordTypeId?: 'activityReport' | 'failureReport' | 'certificationReport' | 'technicalInformationUpdateRequest' | 'technicalClarification' | 'modificationProposal' | 'unsupportedRecordType'; + _links?: { + self?: string; + }; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/ModificationProposal.ts b/packages/api/maintenance-api/src/lib/generated/models/ModificationProposal.ts index 8243c6e89..f2add5eab 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/ModificationProposal.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/ModificationProposal.ts @@ -4,7 +4,7 @@ /* eslint-disable */ import type { Attachment } from './Attachment'; -import type { MaintenanceRecordTask } from './MaintenanceRecordTask'; +import type { MaintenanceRecordTaskWithResponsibleDetails } from './MaintenanceRecordTaskWithResponsibleDetails'; import type { ModificationProposalBasic } from './ModificationProposalBasic'; import type { Status } from './Status'; @@ -28,7 +28,7 @@ export type ModificationProposal = (ModificationProposalBasic & { /** * Tasks for this Modification Proposal */ - tasks?: Array; + tasks?: Array; /** * All statuses possible with information about activation */ diff --git a/packages/api/maintenance-api/src/lib/generated/models/Plant.ts b/packages/api/maintenance-api/src/lib/generated/models/Plant.ts index 9cfb90179..c312c9927 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/Plant.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/Plant.ts @@ -10,6 +10,7 @@ import type { Location } from './Location'; import type { PlannerGroup } from './PlannerGroup'; import type { PlanningPlantRevisionBasic } from './PlanningPlantRevisionBasic'; import type { PlantBasic } from './PlantBasic'; +import type { ResponsiblePerson } from './ResponsiblePerson'; import type { SurfaceDegradationFactor } from './SurfaceDegradationFactor'; import type { WorkCenter } from './WorkCenter'; @@ -50,5 +51,9 @@ export type Plant = (PlantBasic & { * An identifier to the revision (shutdown or campaign work) */ revisions?: Array; + /** + * Responsible persons for plant + */ + responsiblePersons?: Array; }); diff --git a/packages/api/maintenance-api/src/lib/generated/models/PreventiveWorkOrderBasic.ts b/packages/api/maintenance-api/src/lib/generated/models/PreventiveWorkOrderBasic.ts index 9c9517ea6..d9a5d9fff 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/PreventiveWorkOrderBasic.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/PreventiveWorkOrderBasic.ts @@ -6,11 +6,14 @@ import type { PreventiveWorkOrderSimple } from './PreventiveWorkOrderSimple'; export type PreventiveWorkOrderBasic = (PreventiveWorkOrderSimple & { + text: string; /** * The type of work order it is an instance of - */ - workOrderTypeId: 'preventiveWorkOrder'; - plannerGroup: string; - workCenter: string; - text: string; + */ + workOrderTypeId: 'preventiveWorkOrder'; + plannerGroup: string; + workCenter: string; + isProductionCritical?: string; + isHSECritical?: string; }); + diff --git a/packages/api/maintenance-api/src/lib/generated/models/PreventiveWorkOrderJsonPatch.ts b/packages/api/maintenance-api/src/lib/generated/models/PreventiveWorkOrderJsonPatch.ts index 36ccb2134..68f9c5b8e 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/PreventiveWorkOrderJsonPatch.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/PreventiveWorkOrderJsonPatch.ts @@ -23,8 +23,11 @@ export type PreventiveWorkOrderJsonPatch = Array<{ * Operation `append` is suitable for the following properties: * - `/text` * + * Operation `prepend` is suitable for the following properties: + * - `/text` + * */ - op?: 'append' | 'replace'; + op?: 'append' | 'replace' | 'prepend'; /** * The property to be updated by the non-trivial patch operation. * `/workCenterId` and `/workCenterPlantId` must be provided in same request. diff --git a/packages/api/maintenance-api/src/lib/generated/models/RawEquipmentChange.ts b/packages/api/maintenance-api/src/lib/generated/models/RawEquipmentChange.ts new file mode 100644 index 000000000..33b22fac5 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/RawEquipmentChange.ts @@ -0,0 +1,27 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { data_custom } from './data_custom'; +import type { data_customx } from './data_customx'; +import type { data_fleet } from './data_fleet'; +import type { data_fleetx } from './data_fleetx'; +import type { data_general } from './data_general'; +import type { data_generalx } from './data_generalx'; +import type { data_specific } from './data_specific'; +import type { data_specificx } from './data_specificx'; + +export type RawEquipmentChange = { + valid_time?: string; + valid_date?: string; + data_general?: data_general; + data_generalX?: data_generalx; + data_specificX?: data_specificx; + data_fleetX?: data_fleetx; + data_fleet?: data_fleet; + data_custom?: data_custom; + data_specific?: data_specific; + data_customX?: data_customx; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/RawEquipmentChangeReturn.ts b/packages/api/maintenance-api/src/lib/generated/models/RawEquipmentChangeReturn.ts new file mode 100644 index 000000000..6d188330e --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/RawEquipmentChangeReturn.ts @@ -0,0 +1,22 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import { _return } from './_return'; +import type { data_fleet } from './data_fleet'; +import type { data_general } from './data_general'; +import type { data_specific } from './data_specific'; +import type { return_commit } from './return_commit'; +import type { return_warranty } from './return_warranty'; + +export type RawEquipmentChangeReturn = { + return_text?: string; + return_commit?: return_commit; + return_warranty?: return_warranty; + return?: _return; + data_general?: data_general; + data_fleet?: data_fleet; + data_specific?: data_specific; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/RawEquipmentCreate.ts b/packages/api/maintenance-api/src/lib/generated/models/RawEquipmentCreate.ts new file mode 100644 index 000000000..331d6a81c --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/RawEquipmentCreate.ts @@ -0,0 +1,19 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { data_custom } from './data_custom'; +import type { data_fleet } from './data_fleet'; +import type { data_general } from './data_general'; +import type { data_specific } from './data_specific'; + +export type RawEquipmentCreate = { + valid_time?: string; + valid_date?: string; + data_general?: data_general; + data_fleet?: data_fleet; + data_custom?: data_custom; + data_specific?: data_specific; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/RawEquipmentCreateReturn.ts b/packages/api/maintenance-api/src/lib/generated/models/RawEquipmentCreateReturn.ts new file mode 100644 index 000000000..e60b13471 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/RawEquipmentCreateReturn.ts @@ -0,0 +1,23 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import { _return } from './_return'; +import type { data_fleet } from './data_fleet'; +import type { data_general } from './data_general'; +import type { data_specific } from './data_specific'; +import type { return_commit } from './return_commit'; +import type { return_warranty } from './return_warranty'; + +export type RawEquipmentCreateReturn = { + equipment?: string; + return_text?: string; + return_commit?: return_commit; + return_warranty?: return_warranty; + return?: _return; + data_general?: data_general; + data_fleet?: data_fleet; + data_specific?: data_specific; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/ResponsiblePerson.ts b/packages/api/maintenance-api/src/lib/generated/models/ResponsiblePerson.ts new file mode 100644 index 000000000..db3f8dc14 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/ResponsiblePerson.ts @@ -0,0 +1,20 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type ResponsiblePerson = { + /** + * Unique id of the responsible person + */ + responsiblePersonId?: string; + /** + * The name of the responsible person + */ + responsiblePerson?: string; + /** + * The email of the responsible person + */ + responsiblePersonEmail?: string; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/SupportedStatusesWorkOrderPlan.ts b/packages/api/maintenance-api/src/lib/generated/models/SupportedStatusesWorkOrderPlan.ts new file mode 100644 index 000000000..1b1c84478 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/SupportedStatusesWorkOrderPlan.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type SupportedStatusesWorkOrderPlan = Array<'STRT' | 'RDOP' | 'TECO' | 'REL' | 'CRTD'>; diff --git a/packages/api/maintenance-api/src/lib/generated/models/TechnicalClarification.ts b/packages/api/maintenance-api/src/lib/generated/models/TechnicalClarification.ts index f82f5f811..3da42b283 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/TechnicalClarification.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/TechnicalClarification.ts @@ -4,7 +4,7 @@ /* eslint-disable */ import type { Attachment } from './Attachment'; -import type { MaintenanceRecordTask } from './MaintenanceRecordTask'; +import type { MaintenanceRecordTaskWithResponsibleDetails } from './MaintenanceRecordTaskWithResponsibleDetails'; import type { Status } from './Status'; import type { TagBasic } from './TagBasic'; import type { TechnicalClarificationBasic } from './TechnicalClarificationBasic'; @@ -35,6 +35,6 @@ export type TechnicalClarification = (TechnicalClarificationBasic & { /** * Tasks for this technical clarification */ - tasks?: Array; + tasks?: Array; }); diff --git a/packages/api/maintenance-api/src/lib/generated/models/TechnicalInformationUpdateRequest.ts b/packages/api/maintenance-api/src/lib/generated/models/TechnicalInformationUpdateRequest.ts index 9d1cea0e8..4bb2e3c0d 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/TechnicalInformationUpdateRequest.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/TechnicalInformationUpdateRequest.ts @@ -4,7 +4,7 @@ /* eslint-disable */ import type { Attachment } from './Attachment'; -import type { MaintenanceRecordTask } from './MaintenanceRecordTask'; +import type { MaintenanceRecordTaskWithResponsibleDetails } from './MaintenanceRecordTaskWithResponsibleDetails'; import type { Status } from './Status'; import type { TagBasic } from './TagBasic'; import type { TechnicalInformationUpdateRequestBasic } from './TechnicalInformationUpdateRequestBasic'; @@ -39,6 +39,6 @@ export type TechnicalInformationUpdateRequest = (TechnicalInformationUpdateReque /** * Tasks for this technical information update request */ - tasks?: Array; + tasks?: Array; }); diff --git a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderInPlan.ts b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderInPlan.ts index 137df3c23..f83cff58b 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderInPlan.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderInPlan.ts @@ -4,10 +4,11 @@ /* eslint-disable */ import type { WorkOrderOperationInPlan } from './WorkOrderOperationInPlan'; +import type { WorkOrderTypeId } from './WorkOrderTypeId'; export type WorkOrderInPlan = { workOrderId: string; - workOrderTypeId: 'correctiveWorkOrder' | 'preventiveWorkOrder' | 'modificationWorkOrder' | 'sasChangeWorkOrder' | 'projectWorkOrder' | 'subseaWorkOrder'; + workOrderTypeId: WorkOrderTypeId; tagId: string | null; tagPlantId: string; tag: string; @@ -28,8 +29,15 @@ export type WorkOrderInPlan = { * */ cmrIndicator?: boolean; + /** + * Work center id from the operation + */ workCenterId: string; workCenterPlantId: string; + /** + * Main work center id on the header level + */ + mainWorkCenterId?: string; /** * Structured location within the plant where the tag is located */ @@ -67,6 +75,10 @@ export type WorkOrderInPlan = { * The internal id of the person responsible for the processing of the technical clarification. The id represents the employee id of the person. */ personResponsibleId: string | null; + /** + * Value only returned if include-person-responsible=true. The name of the person responsible. + */ + personResponsible?: string | null; /** * Value only returned if include-person-responsible=true. The email of the person responsible for the processing of the technical clarification. This is the preferred way of identifying the person as it's consistent across systems. */ diff --git a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderMaterialJsonPatch.ts b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderMaterialJsonPatch.ts index 1788134a5..efef0b2cf 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderMaterialJsonPatch.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderMaterialJsonPatch.ts @@ -11,7 +11,7 @@ export type WorkOrderMaterialJsonPatch = { /** * Path indicating the property to be impacted by the operation */ - path: '/finalLocation' | '/temporaryLocation' | '/price' | '/priceUnitId' | '/purchasingGroup' | '/goodsRecipient' | '/unloadingPoint' | '/materialGroup' | '/supplierId' | '/vendorsMaterialNumber' | '/deliveryTimeInDays' | '/requisitionerId' | '/holdDeliveryOnshore' | '/text'; + path: '/finalLocation' | '/temporaryLocation' | '/price' | '/priceUnitId' | '/purchasingGroup' | '/goodsRecipient' | '/unloadingPoint' | '/materialGroup' | '/supplierId' | '/vendorsMaterialNumber' | '/deliveryTimeInDays' | '/requisitionerId' | '/holdDeliveryOnshore' | '/text' | '/operationId' | '/quantity' | '/requiredDatetime'; /** * Value to be assigned to a resource property based on the operation and path. * diff --git a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderOptimizedForQuery.ts b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderOptimizedForQuery.ts index 68056f7a5..21e1363da 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderOptimizedForQuery.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderOptimizedForQuery.ts @@ -9,10 +9,11 @@ import type { FailureReportSimpleSelf } from './FailureReportSimpleSelf'; import type { ModificationProposalSimpleSelf } from './ModificationProposalSimpleSelf'; import type { TechnicalClarificationSimpleSelf } from './TechnicalClarificationSimpleSelf'; import type { TechnicalInformationUpdateRequestSimpleSelf } from './TechnicalInformationUpdateRequestSimpleSelf'; +import type { WorkOrderTypeId } from './WorkOrderTypeId'; export type WorkOrderOptimizedForQuery = { workOrderId: string; - workOrderTypeId: 'correctiveWorkOrder' | 'preventiveWorkOrder' | 'modificationWorkOrder' | 'sasChangeWorkOrder' | 'projectWorkOrder' | 'subseaWorkOrder'; + workOrderTypeId: WorkOrderTypeId; tagId: string | null; tagPlantId: string; title: string; diff --git a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderTypeId.ts b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderTypeId.ts new file mode 100644 index 000000000..0c0690908 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderTypeId.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type WorkOrderTypeId = 'correctiveWorkOrder' | 'preventiveWorkOrder' | 'modificationWorkOrder' | 'sasChangeWorkOrder' | 'projectWorkOrder' | 'subseaWorkOrder' | 'unsupportedWorkOrder'; diff --git a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderTypes.ts b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderTypes.ts new file mode 100644 index 000000000..649645826 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderTypes.ts @@ -0,0 +1,15 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { WorkOrderTypeId } from './WorkOrderTypeId'; + +export type WorkOrderTypes = { + workOrderId?: string; + workOrderTypeId?: WorkOrderTypeId; + _links?: { + self?: string; + }; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/_return.ts b/packages/api/maintenance-api/src/lib/generated/models/_return.ts new file mode 100644 index 000000000..94a08f496 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/_return.ts @@ -0,0 +1,22 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type _return = { + type?: string; + id?: string; + number?: number; + message?: string; + log_no?: string; + log_msg_no?: number; + message_v1?: string; + message_v2?: string; + message_v3?: string; + message_v4?: string; + parameter?: string; + row?: number; + field?: string; + system?: string; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/data_custom.ts b/packages/api/maintenance-api/src/lib/generated/models/data_custom.ts new file mode 100644 index 000000000..5188c3130 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/data_custom.ts @@ -0,0 +1,12 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { warranty } from './warranty'; + +export type data_custom = { + manuf_partno?: string; + warranty?: warranty; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/CommunicationBasic.ts b/packages/api/maintenance-api/src/lib/generated/models/data_customx.ts similarity index 59% rename from packages/api/maintenance-api/src/lib/generated/models/CommunicationBasic.ts rename to packages/api/maintenance-api/src/lib/generated/models/data_customx.ts index 110324f8f..d00046aab 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/CommunicationBasic.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/data_customx.ts @@ -3,8 +3,8 @@ /* tslint:disable */ /* eslint-disable */ -export type CommunicationBasic = { - reservationId?: string; - collaborationText: string; +export type data_customx = { + manuf_partno?: string; + warranty?: string; }; diff --git a/packages/api/maintenance-api/src/lib/generated/models/data_fleet.ts b/packages/api/maintenance-api/src/lib/generated/models/data_fleet.ts new file mode 100644 index 000000000..2d08091b2 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/data_fleet.ts @@ -0,0 +1,58 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type data_fleet = { + fleet_num?: string; + fleet_vin?: string; + chassis_num?: string; + license_num?: string; + expiry_date?: string; + fleet_hgt?: string; + fleet_wid?: string; + fleet_len?: string; + dim_unit?: string; + dim_unit_iso?: string; + pri_calc?: string; + repla_date?: string; + repla_odom?: string; + repla_oph?: string; + num_axle?: string; + max_occupants?: string; + card_num?: string; + key_num?: string; + fleet_use?: string; + engine_type?: string; + engine_power?: string; + unit_power?: string; + unit_power_iso?: string; + revolutions?: string; + engine_cyl?: string; + engine_cap?: string; + unit_cap?: string; + unit_cap_iso?: string; + engine_snr?: string; + fuel_pri?: string; + fuel_sec?: string; + oil_type?: string; + gross_wgt?: string; + load_wgt?: string; + wgt_unit?: string; + wgt_unit_iso?: string; + load_hgt?: string; + load_wid?: string; + load_len?: string; + load_dim_unit?: string; + load_dim_unit_iso?: string; + load_vol?: string; + vol_unit?: string; + vol_unit_iso?: string; + no_compart?: string; + speed_max?: string; + speed_unit?: string; + speed_unit_iso?: string; + consump_tol?: string; + consump_move?: string; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/data_fleetx.ts b/packages/api/maintenance-api/src/lib/generated/models/data_fleetx.ts new file mode 100644 index 000000000..71f6756a0 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/data_fleetx.ts @@ -0,0 +1,58 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type data_fleetx = { + fleet_num?: string; + fleet_vin?: string; + chassis_num?: string; + license_num?: string; + expiry_date?: string; + fleet_hgt?: string; + fleet_wid?: string; + fleet_len?: string; + dim_unit?: string; + dim_unit_iso?: string; + pri_calc?: string; + repla_date?: string; + repla_odom?: string; + repla_oph?: string; + num_axle?: string; + max_occupants?: string; + card_num?: string; + key_num?: string; + fleet_use?: string; + engine_type?: string; + engine_power?: string; + unit_power?: string; + unit_power_iso?: string; + revolutions?: string; + engine_cyl?: string; + engine_cap?: string; + unit_cap?: string; + unit_cap_iso?: string; + engine_snr?: string; + fuel_pri?: string; + fuel_sec?: string; + oil_type?: string; + gross_wgt?: string; + load_wgt?: string; + wgt_unit?: string; + wgt_unit_iso?: string; + load_hgt?: string; + load_wid?: string; + load_len?: string; + load_dim_unit?: string; + load_dim_unit_iso?: string; + load_vol?: string; + vol_unit?: string; + vol_unit_iso?: string; + no_compart?: string; + speed_max?: string; + speed_unit?: string; + speed_unit_iso?: string; + consump_tol?: string; + consump_move?: string; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/data_general.ts b/packages/api/maintenance-api/src/lib/generated/models/data_general.ts new file mode 100644 index 000000000..24b5626af --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/data_general.ts @@ -0,0 +1,87 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type data_general = { + authgrp?: string; + objecttype?: string; + inventory?: string; + obj_size?: string; + obj_weight?: string; + unit_of_wt?: string; + unit_iso?: string; + acqdate?: string; + acquisval?: string; + currency?: string; + currIso?: string; + manfacture?: string; + mancountry?: string; + countr_iso?: string; + manserno?: string; + manmodel?: string; + constyear?: string; + constmonth?: string; + start_from?: string; + planplant?: string; + consttype?: string; + manparno?: string; + plangroup?: string; + catprofile?: string; + work_ctr?: string; + descript?: string; + abcindic?: string; + sortfield?: string; + maintplant?: string; + maintloc?: string; + maintroom?: string; + plsectn?: string; + pp_wkctr?: string; + bus_area?: string; + costcenter?: string; + wbs_elem?: string; + comp_code?: string; + asset_no?: string; + sub_number?: string; + standorder?: string; + settlorder?: string; + sales_org?: string; + distr_chan?: string; + division?: string; + sales_off?: string; + sales_grp?: string; + read_crdat?: string; + read_crnam?: string; + read_chdat?: string; + read_chnam?: string; + read_adrnr?: string; + consttype_external?: string; + consttype_guid?: string; + consttype_version?: string; + read_objnr?: string; + shift_report_type?: string; + shift_note_notification_type?: string; + start_point?: string; + end_point?: string; + linear_length?: string; + linear_unit?: string; + first_offset_type_code?: string; + first_offset_value?: string; + first_offset_unit?: string; + second_offset_type_code?: string; + second_offset_value?: string; + second_offset_unit?: string; + second_offset_unit_iso?: string; + linear_unit_iso?: string; + first_offset_unit_iso?: string; + linear_reference_pattern?: string; + marker_start_point?: string; + marker_distance_start_point?: string; + marker_end_point?: string; + marker_distance_end_point?: string; + marker_distance_unit?: string; + marker_distance_unit_iso?: string; + consttype_long?: string; + end_to?: string; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/data_generalx.ts b/packages/api/maintenance-api/src/lib/generated/models/data_generalx.ts new file mode 100644 index 000000000..f9806260c --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/data_generalx.ts @@ -0,0 +1,87 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type data_generalx = { + authgrp?: string; + objecttype?: string; + inventory?: string; + obj_size?: string; + obj_weight?: string; + unit_of_wt?: string; + unit_iso?: string; + acqdate?: string; + acquisval?: string; + currency?: string; + currIso?: string; + manfacture?: string; + mancountry?: string; + countr_iso?: string; + manserno?: string; + manmodel?: string; + constyear?: string; + constmonth?: string; + start_from?: string; + planplant?: string; + consttype?: string; + manparno?: string; + plangroup?: string; + catprofile?: string; + work_ctr?: string; + descript?: string; + abcindic?: string; + sortfield?: string; + maintplant?: string; + maintloc?: string; + maintroom?: string; + plsectn?: string; + pp_wkctr?: string; + bus_area?: string; + costcenter?: string; + wbs_elem?: string; + comp_code?: string; + asset_no?: string; + sub_number?: string; + standorder?: string; + settlorder?: string; + sales_org?: string; + distr_chan?: string; + division?: string; + sales_off?: string; + sales_grp?: string; + read_crdat?: string; + read_crnam?: string; + read_chdat?: string; + read_chnam?: string; + read_adrnr?: string; + consttype_external?: string; + consttype_guid?: string; + consttype_version?: string; + read_objnr?: string; + shift_report_type?: string; + shift_note_notification_type?: string; + start_point?: string; + end_point?: string; + linear_length?: string; + linear_unit?: string; + first_offset_type_code?: string; + first_offset_value?: string; + first_offset_unit?: string; + second_offset_type_code?: string; + second_offset_value?: string; + second_offset_unit?: string; + second_offset_unit_iso?: string; + linear_unit_iso?: string; + first_offset_unit_iso?: string; + linear_reference_pattern?: string; + marker_start_point?: string; + marker_distance_start_point?: string; + marker_end_point?: string; + marker_distance_end_point?: string; + marker_distance_unit?: string; + marker_distance_unit_iso?: string; + consttype_long?: string; + end_to?: string; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/data_specific.ts b/packages/api/maintenance-api/src/lib/generated/models/data_specific.ts new file mode 100644 index 000000000..1566ba49c --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/data_specific.ts @@ -0,0 +1,46 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type data_specific = { + configmat?: string; + material?: string; + serialno?: string; + equicatgry?: string; + batch?: string; + mandrawno?: string; + delivdate?: string; + free_date1?: string; + free_note1?: string; + free_num1?: string; + techid?: string; + license?: string; + free_date2?: string; + free_note2?: string; + free_num2?: string; + read_cuobj?: string; + read_curef?: boolean; + read_supeq?: string; + read_floc?: string; + inst_pos?: string; + configmat_external?: string; + configmat_guid?: string; + configmat_version?: string; + material_external?: string; + material_guid?: string; + material_version?: string; + config_controlInd?: string; + ippe_guid?: string; + techs?: string; + func_id?: string; + uii?: string; + iuid_type?: string; + uii_plant?: string; + read_maintenance_plan?: string; + read_measuring_point?: string; + read_valid_from?: string; + configmat_long?: string; + material_long?: string; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/data_specificx.ts b/packages/api/maintenance-api/src/lib/generated/models/data_specificx.ts new file mode 100644 index 000000000..eab2157c8 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/data_specificx.ts @@ -0,0 +1,46 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type data_specificx = { + equipment?: string; + configmat?: string; + material?: string; + serialno?: string; + equicatgry?: string; + batch?: string; + mandrawno?: string; + delivdate?: string; + free_date1?: string; + free_note1?: string; + free_num1?: string; + techid?: string; + license?: string; + free_date2?: string; + free_note2?: string; + free_num2?: string; + read_cuobj?: string; + read_curef?: boolean; + read_supeq?: string; + read_floc?: string; + inst_pos?: string; + configmat_external?: string; + configmat_guid?: string; + configmat_version?: string; + material_external?: string; + material_guid?: string; + material_version?: string; + ippe_guid?: string; + techs?: string; + func_id?: string; + uii?: string; + iuid_type?: string; + uii_plant?: string; + read_maintenance_plan?: string; + read_measuring_point?: string; + read_valid_from?: string; + configmat_long?: string; + material_long?: string; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/includeTaskResponsibleDetails.ts b/packages/api/maintenance-api/src/lib/generated/models/includeTaskResponsibleDetails.ts new file mode 100644 index 000000000..d758ce725 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/includeTaskResponsibleDetails.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +/** + * Include task responsible details. Can have a slight performance impact. + */ +export type includeTaskResponsibleDetails = boolean; diff --git a/packages/api/maintenance-api/src/lib/generated/models/return_commit.ts b/packages/api/maintenance-api/src/lib/generated/models/return_commit.ts new file mode 100644 index 000000000..c566877d6 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/return_commit.ts @@ -0,0 +1,22 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type return_commit = { + type?: string; + id?: string; + number?: number; + message?: string; + log_no?: string; + log_msg_no?: number; + message_v1?: string; + message_v2?: string; + message_v3?: string; + message_v4?: string; + parameter?: string; + row?: number; + field?: string; + system?: string; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/return_warranty.ts b/packages/api/maintenance-api/src/lib/generated/models/return_warranty.ts new file mode 100644 index 000000000..8f3b18ca5 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/return_warranty.ts @@ -0,0 +1,17 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type return_warranty = { + msgty?: string; + msgid?: string; + msgno?: string; + msgv1?: string; + msgv2?: string; + msgv3?: string; + msgv4?: string; + msg_index?: number; + fieldname?: string; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/warranty.ts b/packages/api/maintenance-api/src/lib/generated/models/warranty.ts new file mode 100644 index 000000000..fe51c8eb8 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/warranty.ts @@ -0,0 +1,10 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type warranty = { + startdate?: string; + enddate?: string; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/services/ActivityReportsService.ts b/packages/api/maintenance-api/src/lib/generated/services/ActivityReportsService.ts index 98c75af97..b748fa550 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/ActivityReportsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/ActivityReportsService.ts @@ -151,6 +151,9 @@ export class ActivityReportsService { * ### Update release 1.32.0 * Added ability to append text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. * + * ### Update release 1.33.0 + * Added possibility to prepend text. Use the operation `prepend` in the request body to prepend text to the current text. + * * @returns ActivityReportBasic Success, the activity report has been updated * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError diff --git a/packages/api/maintenance-api/src/lib/generated/services/CorrectiveWorkOrdersService.ts b/packages/api/maintenance-api/src/lib/generated/services/CorrectiveWorkOrdersService.ts index 2ad332cf2..06f85caae 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/CorrectiveWorkOrdersService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/CorrectiveWorkOrdersService.ts @@ -2,7 +2,6 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CommunicationCreate } from '../models/CommunicationCreate'; import type { CorrectiveWorkOrder } from '../models/CorrectiveWorkOrder'; import type { CorrectiveWorkOrderBasic } from '../models/CorrectiveWorkOrderBasic'; import type { CorrectiveWorkOrderCreate } from '../models/CorrectiveWorkOrderCreate'; @@ -141,10 +140,8 @@ export class CorrectiveWorkOrdersService { * Added `agreement` & `agreementItem` on `serviceOperations` and `grossPrice`, `netValue` & `currency` on `services`. * * - * ### Upcoming changes + * ### Update release 1.33.0 * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials` . - * Added `include-communications` to query parameters. - * Added `communications` to the response. * * @returns CorrectiveWorkOrder Success * @returns ProblemDetails Response for other HTTP status codes @@ -166,7 +163,6 @@ export class CorrectiveWorkOrdersService { includeMeasurements = false, includeSafetyMeasures = false, includeEstimatedCosts = false, - includeCommunications = false, }: { workOrderId: string, /** @@ -225,10 +221,6 @@ export class CorrectiveWorkOrdersService { * Include estimated costs */ includeEstimatedCosts?: boolean, - /** - * Include communications to a reservation or service operation - */ - includeCommunications?: boolean, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', @@ -251,7 +243,6 @@ export class CorrectiveWorkOrdersService { 'include-measurements': includeMeasurements, 'include-safety-measures': includeSafetyMeasures, 'include-estimated-costs': includeEstimatedCosts, - 'include-communications': includeCommunications, }, errors: { 301: `If work-order-id exist, but is not a \`correctiveWorkOrder\`, the response is a HTTP 301 Moved Permanently with the url to the resource in the HTTP header Location. @@ -288,7 +279,7 @@ export class CorrectiveWorkOrdersService { * If the work order is released through Maintenance API, different values for costWBSId and additionalCostWBSId will result in an error. * If the work order is released directly in the ERP system, the user will receive a warning and can choose to continue. * - * Updating of `costWBSId` will trigger a new determination of the settlement rule in the ERP system. If a settlemet rule already exists, the updating of `costWBSId` will automatically update the settlement rule. Hence the `costWBSId` and settlement rule are allways aligned. + * Updating of `costWBSId` will trigger a new determination of the settlement rule in the ERP system. If a settlement rule already exists, the updating of `costWBSId` will automatically update the settlement rule. Hence the `costWBSId` and settlement rule are allways aligned. * * * ### Important information - Text @@ -332,6 +323,9 @@ export class CorrectiveWorkOrdersService { * * Updating of `costWBSId` from now on triggers the determination/updating of the settlement rule. * + * ### Update release 1.33.0 + * Added possibility to prepend text. Use the operation `prepend` in the request body to prepend text to the current work order text. + * * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ @@ -457,155 +451,6 @@ export class CorrectiveWorkOrdersService { }); } - /** - * Corrective Work Order - Add communication - * ### Overview - * - * Add communication to Corrective Work order. - * Purchaser and Requestor collaboration text used on the order for a material. - * - * ### Important information - * The communication is stored differently for each operation type PM01 (`operations`) or PM03 (`service-operations`). - * - * #### For PM01 (`operations`) - * The communication will be stored on a unique reservation, and the reservation id is used to identify the reservation. Reservation id can be found under `materials` for a given operation. - * - * #### For PM03 (`service-operations`) - * The communication will be stored on a unique service operation, and the service operation id is used to identify the service operation. Service operation id can be found under `serviceOperations` for a given work order. - * - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static addCorrectiveWorkOrderOperationCommunication({ - workOrderId, - operation, - requestBody, - }: { - workOrderId: string, - operation: string, - /** - * Communication to add to Corrective Work order - */ - requestBody: CommunicationCreate, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/work-orders/corrective-work-orders/{work-order-id}/operations/{operation}/communication', - path: { - 'work-order-id': workOrderId, - 'operation': operation, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 403: `User does not have sufficient rights to add communication to work order`, - 404: `The specified resource was not found`, - 409: `Work order is locked by other user`, - }, - }); - } - - /** - * Corrective Work Order Communication - Attachment upload - * ### Overview - * **Upload attachment for Corrective Work Order Communication and PM03 service-operations** - * - * ### Important information - * Limitations of Attachment upload endpoints: - * - No support for parallel calls (uploading multiple attachments at once). - * - Maximum file size is 60 MB. Files between 60.0MB - 99.9MB will give a 400 error. Files larger than 100MB will result in a `413 Request Entity Too Large' Error in HTML. This is due to constraints in the underlying system and is outside of our control. - * - There will be created a new DMS document for the communication, or reuse already existing document if an attachment is already uploaded. - * - * Please use the endpoint `/work-orders/corrective-work-orders/{work-order-id}/operations/{operation}/communication` to add communication before uploading attachments. - * - * Please use the endpoint `/documents/{document-id}/attachments/{attachment-id}` to download attachments. `attachment-id` can be found in the response of the LookupCorrectiveWorkOrder endpoint. - * - * - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static uploadCorrectiveWorkOrderOperationCommunicationAttachment({ - workOrderId, - operation, - formData, - }: { - workOrderId: string, - operation: string, - formData?: { - files?: Array; - }, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/work-orders/corrective-work-orders/{work-order-id}/operations/{operation}/communication/attachments', - path: { - 'work-order-id': workOrderId, - 'operation': operation, - }, - formData: formData, - mediaType: 'multipart/form-data', - errors: { - 403: `User does not have sufficient rights to upload attachment`, - 404: `The specified resource was not found`, - 413: `Request Entity Too Large. - This error occurs when the size of an attachment exceeds 100MB. - `, - }, - }); - } - - /** - * Corrective Work Order Material Communication - Attachment upload - * ### Overview - * **Upload attachment for Corrective Work Order Communication and PM01 operations** - * - * ### Important information - * Limitations of Attachment upload endpoints: - * - No support for parallel calls (uploading multiple attachments at once). - * - Maximum file size is 60 MB. Files between 60.0MB - 99.9MB will give a 400 error. Files larger than 100MB will result in a `413 Request Entity Too Large' Error in HTML. This is due to constraints in the underlying system and is outside of our control. - * - There will be created a new DMS document for the communication, or reuse already existing document if an attachment is already uploaded. - * - * Please use the endpoint `/work-orders/corrective-work-orders/{work-order-id}/operations/{operation}/communication` to add communication before uploading attachments. - * - * Please use the endpoint `/documents/{document-id}/attachments/{attachment-id}` to download attachments. `attachment-id` can be found in the response of the LookupCorrectiveWorkOrder endpoint. - * - * - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static uploadCorrectiveWorkOrderOperationCommunicationMaterialAttachment({ - workOrderId, - operation, - reservationId, - formData, - }: { - workOrderId: string, - operation: string, - reservationId: string, - formData?: { - files?: Array; - }, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/work-orders/corrective-work-orders/{work-order-id}/operations/{operation}/materials/{reservation-id}/communication/attachments', - path: { - 'work-order-id': workOrderId, - 'operation': operation, - 'reservation-id': reservationId, - }, - formData: formData, - mediaType: 'multipart/form-data', - errors: { - 403: `User does not have sufficient rights to upload attachment`, - 404: `The specified resource was not found`, - 413: `Request Entity Too Large. - This error occurs when the size of an attachment exceeds 100MB. - `, - }, - }); - } - /** * Corrective Work order - Update estimated costs * ### Overview diff --git a/packages/api/maintenance-api/src/lib/generated/services/EquipmentService.ts b/packages/api/maintenance-api/src/lib/generated/services/EquipmentService.ts index 8aee533d7..8b70746b1 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/EquipmentService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/EquipmentService.ts @@ -13,6 +13,10 @@ import type { EquipmentListItem } from '../models/EquipmentListItem'; import type { EquipmentSearchItem } from '../models/EquipmentSearchItem'; import type { InstallEquipment } from '../models/InstallEquipment'; import type { ProblemDetails } from '../models/ProblemDetails'; +import type { RawEquipmentChange } from '../models/RawEquipmentChange'; +import type { RawEquipmentChangeReturn } from '../models/RawEquipmentChangeReturn'; +import type { RawEquipmentCreate } from '../models/RawEquipmentCreate'; +import type { RawEquipmentCreateReturn } from '../models/RawEquipmentCreateReturn'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; @@ -31,7 +35,7 @@ export class EquipmentService { * For warehouse and logistics data of an equipment, use SCM Logistics API. * * ### Example usage - * `/equipment/11948620?include-maintenance-records=true&include-maintenance-record-types=failure-report&include-only-open-maintenance-records=true&include-work-orders=true&include-work-order-types=preventiveWorkOrders,subseaWorkOrders&include-only-open-work-orders=true&include-characteritics=true&include-status-details=true&api-version=v1` - Lookup equipment with status details and characteristics. Include open failure reports where the equipment is used as main reference. Include open subsea work orders and open preventive work orders where the equipment is either a material component or the main reference (`equipmentId` at work order header level). + * `/equipment/11948620?include-maintenance-records=true&include-maintenance-record-types=failure-report&include-only-open-maintenance-records=true&include-work-orders=true&include-work-order-types=preventiveWorkOrders,subseaWorkOrders&include-only-open-work-orders=true&include-characteristics=true&include-status-details=true&api-version=v1` - Lookup equipment with status details and characteristics. Include open failure reports where the equipment is used as main reference. Include open subsea work orders and open preventive work orders where the equipment is either a material component or the main reference (`equipmentId` at work order header level). * * ### Update release 1.4.0 * `include-work-orders` now include work orders where the `equipmentId` is the main reference (`equipmentId` at work order header level). @@ -319,7 +323,7 @@ export class EquipmentService { * ### Overview * Dismantle Equipment on a tag hierarchy. * - * An equipment can be either installed on a Tag, or an Equipment. + * An equipment can be dismantled from a tag, or an equipment. * The correct installation needs to be provided in the body to be successful. * * If `equipmentId` is provided in the body, the `equipmentId` from the path will be dismantled here. @@ -343,7 +347,7 @@ export class EquipmentService { */ equipmentId: string, /** - * Dismantle Equipment in a hierarchy. + * Dismantle equipment in a hierarchy. */ requestBody: InstallEquipment, /** @@ -902,4 +906,71 @@ export class EquipmentService { }); } + /** + * Equipment - Create + * ### Overview + * + * Create equipment - special intended usage for machine-to-machine integration. Fields are kept in their raw form, and mirror the data model in SAP. + * + * @returns ProblemDetails Response for other HTTP status codes + * @returns RawEquipmentCreateReturn Created Equipment - return SAP BAPI structure + * @throws ApiError + */ + public static rawEquipmentCreate({ + requestBody, + }: { + /** + * Create equipment - raw SAP BAPI data input. + */ + requestBody: RawEquipmentCreate, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/raw/equipment', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad Request - The resource provided in the body is not according to specification`, + 403: `User does not have sufficient rights to create a equipment`, + }, + }); + } + + /** + * Equipment - Change + * ### Overview + * + * Change equipment - special intended usage for machine-to-machine integration.. Fields are kept in their raw form, and mirror the data model in SAP. + * + * @returns ProblemDetails Response for other HTTP status codes + * @returns RawEquipmentChangeReturn Change equipment - return SAP BAPI structure + * @throws ApiError + */ + public static rawEquipmentChange({ + equipmentId, + requestBody, + }: { + /** + * Equipment number + */ + equipmentId: string, + /** + * Change equipment - raw SAP BAPI data input. + */ + requestBody: RawEquipmentChange, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PUT', + url: '/raw/equipment/{equipment-id}', + path: { + 'equipment-id': equipmentId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 404: `The specified resource was not found`, + }, + }); + } + } diff --git a/packages/api/maintenance-api/src/lib/generated/services/FailureReportsService.ts b/packages/api/maintenance-api/src/lib/generated/services/FailureReportsService.ts index 3d1b50bff..f8ceb4cfe 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/FailureReportsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/FailureReportsService.ts @@ -104,8 +104,8 @@ export class FailureReportsService { * * Added a query parameter `include-task-list` and `taskList` in the response. When a work order is created based on this notification, operations from the `taskList` will be automatically copied into the work order. * - * ### Upcoming changes - * Added `changedDateTime`, `taskResponsible` and `taskResponsibleEmail` for `tasks` in response. + * ### Update release 1.33.0 + * Added `taskResponsible` and `taskResponsibleEmail` for `tasks` in response when the new query parameter `include-task-responsible-details` is set to true. * * @returns FailureReport Success * @returns ProblemDetails Response for other HTTP status codes @@ -124,6 +124,7 @@ export class FailureReportsService { includeUrlReferences = false, includeMeasurements = false, includeTaskList = false, + includeTaskResponsibleDetails = false, }: { /** * The recordId of the failure report. @@ -173,6 +174,10 @@ export class FailureReportsService { * Include task list with task list operations */ includeTaskList?: boolean, + /** + * Include task responsible details. Can have a slight performance impact. + */ + includeTaskResponsibleDetails?: boolean, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', @@ -192,6 +197,7 @@ export class FailureReportsService { 'include-url-references': includeUrlReferences, 'include-measurements': includeMeasurements, 'include-task-list': includeTaskList, + 'include-task-responsible-details': includeTaskResponsibleDetails, }, errors: { 301: `The specified resource exists in another location @@ -244,6 +250,9 @@ export class FailureReportsService { * ### Update release 1.32.0 * Added ability to append text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. * + * ### Update release 1.33.0 + * Added possibility to prepend text. Use the operation `prepend` in the request body to prepend text to the current text. + * * @returns FailureReportBasic Success, the failure report has been updated * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -676,9 +685,6 @@ export class FailureReportsService { * Added ability to create text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a * configuration switch, which will initially be disabled, and when appropriate, enabled. * - * ### Upcoming changes - * Added `changedDateTime`, `taskResponsible` and `taskResponsibleEmail` for `tasks` in response. - * * @returns ProblemDetails Response for other HTTP status codes * @returns MaintenanceRecordTask Created * @throws ApiError @@ -778,7 +784,15 @@ export class FailureReportsService { * When a task is created, it will have status `TSOS - Outstanding task` and `CRTE - Created`. * The status `TSRL - Task Released` can be set afterwards. * - * ### Update release 1.33.0 + * Now it is possible to set following statuses: + * - TSRL Task Released + * - TSCO Task Completed + * - TSSC Task successful + * - TCMP WF when task completed + * - RIND Returned - Wait for info + * - CANC Cancelled + * + * ### Upcoming changes * Enabled activation of user statuses like `TCMP - WF when task completed`, `RIND - Returned - Wait for info` and `CANC - Cancelled` * * @returns ProblemDetails Response for other HTTP status codes diff --git a/packages/api/maintenance-api/src/lib/generated/services/MaintenanceRecordsService.ts b/packages/api/maintenance-api/src/lib/generated/services/MaintenanceRecordsService.ts index 8761b7da7..1bcac3f0d 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/MaintenanceRecordsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/MaintenanceRecordsService.ts @@ -4,6 +4,7 @@ /* eslint-disable */ import type { MaintenanceRecordChangeLogs } from '../models/MaintenanceRecordChangeLogs'; import type { MaintenanceRecordList } from '../models/MaintenanceRecordList'; +import type { MaintenanceRecordTypes } from '../models/MaintenanceRecordTypes'; import type { ProblemDetails } from '../models/ProblemDetails'; import type { CancelablePromise } from '../core/CancelablePromise'; @@ -121,6 +122,32 @@ export class MaintenanceRecordsService { }); } + /** + * Maintenance record - Types + * ### Overview + * Get type of a maintenance record based on the maintenance record id. + * + * @returns MaintenanceRecordTypes Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static getMaintenanceRecordType({ + maintenanceRecordIdsAnyOf, + }: { + /** + * The maintenance record ids as a comma separated list. + */ + maintenanceRecordIdsAnyOf: string, + }): CancelablePromise | ProblemDetails> { + return __request(OpenAPI, { + method: 'GET', + url: '/maintenance-record-types', + query: { + 'maintenance-record-ids-any-of': maintenanceRecordIdsAnyOf, + }, + }); + } + /** * Maintenance records change log - Search * ### Overview diff --git a/packages/api/maintenance-api/src/lib/generated/services/MasterDataForPlantsService.ts b/packages/api/maintenance-api/src/lib/generated/services/MasterDataForPlantsService.ts index 4aeacf78b..0a949398a 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/MasterDataForPlantsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/MasterDataForPlantsService.ts @@ -173,6 +173,9 @@ export class MasterDataForPlantsService { * ### Update version 1.20.0 * Added query parameter `include-baseline-plans` related to `OM104.01.06 - Prepare Work order plan` and `work-order-plan/`. * + * ### Upcoming change + * Added `include-responsible-persons` to the response. Added `responsiblePersons` to the response. + * * @returns Plant Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -189,6 +192,7 @@ export class MasterDataForPlantsService { includeRevisions = false, includeSystems = false, includeBaselinePlans = false, + includeResponsiblePersons = false, }: { plantId: string, /** @@ -232,6 +236,10 @@ export class MasterDataForPlantsService { * Include open baseline plans for the planning plant of this plant */ includeBaselinePlans?: boolean, + /** + * Include persons that are already responsible for objects on this plant + */ + includeResponsiblePersons?: boolean, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', @@ -250,6 +258,7 @@ export class MasterDataForPlantsService { 'include-revisions': includeRevisions, 'include-systems': includeSystems, 'include-baseline-plans': includeBaselinePlans, + 'include-responsible-persons': includeResponsiblePersons, }, errors: { 404: `The specified resource was not found`, @@ -280,7 +289,7 @@ export class MasterDataForPlantsService { * ### Update release 1.31.0 * Fixed enum values for `schedulingStartConstraintId` and `schedulingFinishConstraintId` * - * ### Update in an upcoming release + * ### Update release 1.33.0 * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials`. * * @returns PlanningPlantRevision Success @@ -363,7 +372,7 @@ export class MasterDataForPlantsService { * * Split parts of `location` on `materials` into `finalLocation` and `temporaryLocation` in the response. * - * ### Update in an upcoming release + * ### Update release 1.33.0 * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials`. * * @returns RevisionWorkOrderOperation Success @@ -442,6 +451,9 @@ export class MasterDataForPlantsService { * ### Update version 1.20.0 * Added query parameter `include-baseline-plans` related to `OM104.01.06 - Prepare Work order plan` and `work-order-plan/`. * + * ### Upcoming change + * Added `include-responsible-persons` to the response. Added `responsiblePersons` to the response. + * * @returns Plant Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -457,6 +469,7 @@ export class MasterDataForPlantsService { includeEquipmentCatalogProfiles = false, includeSurfaceDegradationFactors = false, includeBaselinePlans = false, + includeResponsiblePersons = false, }: { /** * Filter to limit plants by @@ -498,6 +511,10 @@ export class MasterDataForPlantsService { * Include open baseline plans for the planning plant of this plant */ includeBaselinePlans?: boolean, + /** + * Include persons that are already responsible for objects on this plant + */ + includeResponsiblePersons?: boolean, }): CancelablePromise | ProblemDetails> { return __request(OpenAPI, { method: 'GET', @@ -513,6 +530,7 @@ export class MasterDataForPlantsService { 'include-equipment-catalog-profiles': includeEquipmentCatalogProfiles, 'include-surface-degradation-factors': includeSurfaceDegradationFactors, 'include-baseline-plans': includeBaselinePlans, + 'include-responsible-persons': includeResponsiblePersons, }, errors: { 400: `Request is missing required parameters`, diff --git a/packages/api/maintenance-api/src/lib/generated/services/ModificationProposalsService.ts b/packages/api/maintenance-api/src/lib/generated/services/ModificationProposalsService.ts index 41ec7c759..b33c04e0f 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/ModificationProposalsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/ModificationProposalsService.ts @@ -53,8 +53,8 @@ export class ModificationProposalsService { * ### Update release 1.32.0 * Added `changedDateTime` for attachments. * - * ### Upcoming changes - * Added `changedDateTime`, `taskResponsible` and `taskResponsibleEmail` for `tasks` in response. + * ### Update release 1.33.0 + * Added `taskResponsible` and `taskResponsibleEmail` for `tasks` in response when the new query parameter `include-task-responsible-details` is set to true. * * @returns ModificationProposal Success * @returns ProblemDetails Response for other HTTP status codes @@ -66,6 +66,7 @@ export class ModificationProposalsService { includeStatusDetails = false, includeAttachments = false, includeCreatedByDetails = false, + includeTaskResponsibleDetails = false, }: { recordId: string, /** @@ -84,6 +85,10 @@ export class ModificationProposalsService { * Include name and email of user represented in `createdById`. If not supplied, `createdBy` and `createdByEmail` will have null value. */ includeCreatedByDetails?: boolean, + /** + * Include task responsible details. Can have a slight performance impact. + */ + includeTaskResponsibleDetails?: boolean, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', @@ -96,6 +101,7 @@ export class ModificationProposalsService { 'include-status-details': includeStatusDetails, 'include-attachments': includeAttachments, 'include-created-by-details': includeCreatedByDetails, + 'include-task-responsible-details': includeTaskResponsibleDetails, }, errors: { 301: `The specified resource exists in another location diff --git a/packages/api/maintenance-api/src/lib/generated/services/ModificationWorkOrdersService.ts b/packages/api/maintenance-api/src/lib/generated/services/ModificationWorkOrdersService.ts index 6a01113af..03d42f972 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/ModificationWorkOrdersService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/ModificationWorkOrdersService.ts @@ -286,6 +286,9 @@ export class ModificationWorkOrdersService { * Added ability to update text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a * configuration switch, which will initially be disabled, and when appropriate, enabled. * + * ### Update release 1.33.0 + * Added possibility to prepend text. Use the operation `prepend` in the request body to prepend text to the current work order text. + * * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ diff --git a/packages/api/maintenance-api/src/lib/generated/services/ModifiedEndpointsService.ts b/packages/api/maintenance-api/src/lib/generated/services/ModifiedEndpointsService.ts index a7e2f9206..0b9e66c9a 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/ModifiedEndpointsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/ModifiedEndpointsService.ts @@ -4,25 +4,25 @@ /* eslint-disable */ import type { ActivityReportBasic } from '../models/ActivityReportBasic'; import type { ActivityReportJsonPatch } from '../models/ActivityReportJsonPatch'; -import type { CertificationReport } from '../models/CertificationReport'; -import type { CorrectiveWorkOrderBasic } from '../models/CorrectiveWorkOrderBasic'; -import type { CorrectiveWorkOrderCreate } from '../models/CorrectiveWorkOrderCreate'; +import type { CorrectiveWorkOrder } from '../models/CorrectiveWorkOrder'; import type { CorrectiveWorkOrderJsonPatch } from '../models/CorrectiveWorkOrderJsonPatch'; -import type { Document } from '../models/Document'; -import type { DocumentBasic } from '../models/DocumentBasic'; -import type { DocumentCreate } from '../models/DocumentCreate'; -import type { Equipment } from '../models/Equipment'; import type { FailureReport } from '../models/FailureReport'; import type { FailureReportBasic } from '../models/FailureReportBasic'; import type { FailureReportJsonPatch } from '../models/FailureReportJsonPatch'; +import type { GenericWorkOrderJsonPatch } from '../models/GenericWorkOrderJsonPatch'; import type { ModificationProposal } from '../models/ModificationProposal'; +import type { PlanningPlantRevision } from '../models/PlanningPlantRevision'; +import type { PreventiveWorkOrder } from '../models/PreventiveWorkOrder'; +import type { PreventiveWorkOrderJsonPatch } from '../models/PreventiveWorkOrderJsonPatch'; import type { ProblemDetails } from '../models/ProblemDetails'; -import type { RelationshipToDocument } from '../models/RelationshipToDocument'; -import type { Tag } from '../models/Tag'; -import type { TagSearch } from '../models/TagSearch'; +import type { ProjectWorkOrder } from '../models/ProjectWorkOrder'; +import type { RevisionWorkOrderOperation } from '../models/RevisionWorkOrderOperation'; +import type { SubseaWorkOrderMaterial } from '../models/SubseaWorkOrderMaterial'; import type { TechnicalClarification } from '../models/TechnicalClarification'; import type { TechnicalInformationUpdateRequest } from '../models/TechnicalInformationUpdateRequest'; -import type { TextTemplate } from '../models/TextTemplate'; +import type { WorkOrderMaterial } from '../models/WorkOrderMaterial'; +import type { WorkOrderMaterialAdd } from '../models/WorkOrderMaterialAdd'; +import type { WorkOrderMaterialJsonPatch } from '../models/WorkOrderMaterialJsonPatch'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; @@ -31,185 +31,157 @@ import { request as __request } from '../core/request'; export class ModifiedEndpointsService { /** - * Tag - Lookup + * Revisions - Search * ### Overview - * Lookup a single tag with related information + * Search revisions for a single plant with related information. * - * ### Update release 0.9.0 - * Added `include-measuring-points` and `include-last-measurement` query parameters. - * - * ### Update release 1.1.0 - * Added additional characteristics with ids CRIT_MAIN_FUNCTION and CRIT_SUB_FUNCTION. - * - * Added certification-report, technical-information-update-requests and technical-clarifications for `include-maintenance-records` query parameter. - * - * Added `include-work-orders` to return work orders where the requested tag is the main reference. `include-work-order-types` can be used to limit to certain work order types. - * - * Added isOpen and completedDateTime properties for maintenance records if `include-maintenance-records` is true. - * - * Fixed bug for `include-installed-equipment`. - * - * ### Update release 1.3.0 - * Added `workCenterId`, `workCenterPlantId`, `workCenter`, `planningPlantId`,`plannerGroupId` and `plannerGroup` properties. - * - * Added `include-bill-of-materials` query parameter. - * - * ### Update release 1.5.0 - * Added `revisionId` and `revision` to related work orders (represents shutdown or campaign work). - * - * ### Update release 1.8.0 - * Added properties `hasUnsafeFailureMode` and `unsafeFailureModeStatus` for failure reports. - * - * ### Update release 1.10.0 - * Added property `maintenanceRecordId` to measurements of measuring points. - * - * ### Update release 1.11.0 - * Added property `costWBSId`. - * - * ### Update release 1.15.0 - * Added `workOrderId` to response. - * - * Added `include-linear-data` and `include-status-details` query parameters. - * - * Added properties `tagCategoryId`, `activeStatusIds`, `startUpDate` and `endOfUseDate`. - * - * Added `modification-proposal` as a maintenance record type to include with `include-maintenance-record-types` parameter. - * - * ### Update release 1.16.0 - * Added property `classId` to characteristics. - * - * Added query parameters `include-attachments` and `include-url-references`. + * ### Filter: by-revision-id + * Search by revision ids for a single plant * - * Added property `workCenterId` + * Parameters: + * - revision-id-any-of + * - include-work-order-operations (default: false) + * - include-work-order-operation-text (default: false) + * - include-only-work-order-operations-with-materials (default: false) * - * ### Update release 1.21.0 - * Added property `area`. - * - * ### Update release 1.24.0 - * `urlReferences` and `attachments` now include the property `documentCreatedDate` - * - * Added property `cmrIndicator` for WorkOrders + * ### Examples + * `/plants/1310/revisions?filter=by-revision-id&revision-id-any-of=OFP,OFP%202022,&include-work-order-operations=true&include-only-work-order-operations-with-materials=true&include-work-order-operation-text=true&api-version=v1` * - * ### Update release 1.27.0 - * Work orders now include the property 'isOpen' + * ### Update release 1.19.0 + * Added parameter `include-text-item-materials`. * - * ### Update release 1.28.0 - * `billOfMaterials` now include the property `parentMaterialId` + * ### Update release 1.31.0 + * Fixed enum values for `schedulingStartConstraintId` and `schedulingFinishConstraintId` * - * Added `materialId` and `material` to the response + * ### Update release 1.33.0 + * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials`. * - * ### Update release 1.32.0 - * Added `changedDateTime` for attachments. - * - * @returns Tag Success + * @returns PlanningPlantRevision Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static lookupTag({ + public static searchRevisions({ plantId, - tagId, - includeMaintenanceRecords = false, - includeMaintenanceRecordTypes, - includeWorkOrders = true, - includeWorkOrderTypes, - includeInstalledEquipment = false, - includeCatalogProfileDetails = false, - includeMaintenancePlanItems = false, - includeMeasuringPoints = false, - includeLastMeasurement = false, - includeCharacteristics = false, - includeBillOfMaterials = false, - includeAttachments = false, - includeUrlReferences = false, - includeStatusDetails = false, - includeLinearData = false, + filter, + revisionIdAnyOf, + includeWorkOrderOperations = false, + includeOnlyWorkOrderOperationsWithMaterials = false, + includeTextItemMaterials = false, }: { plantId: string, - tagId: string, - /** - * Include maintenance records. If include-maintenance-record-types is not supplied, all supported types are returned - */ - includeMaintenanceRecords?: boolean, /** - * Include which types of maintenance records + * Filter to limit revisions */ - includeMaintenanceRecordTypes?: Array<'failure-report' | 'activity-report' | 'certification-report' | 'technical-information-update-request' | 'technical-clarification' | 'modification-proposal'>, + filter: 'by-revision-id', /** - * Include work orders. If include-work-order-types is not supplied, all supported types are returned. + * Comma-separated list of revision-id */ - includeWorkOrders?: boolean, + revisionIdAnyOf?: string, /** - * Include which types of work orders. Use comma-separated list of entries. + * Include the work order operations */ - includeWorkOrderTypes?: Array<'correctiveWorkOrders' | 'preventiveWorkOrders' | 'modificationWorkOrders' | 'sasChangeWorkOrders' | 'projectWorkOrders' | 'subseaWorkOrders'>, + includeWorkOrderOperations?: boolean, /** - * Include installed equipment + * Limit the work order operations to only those which have material */ - includeInstalledEquipment?: boolean, + includeOnlyWorkOrderOperationsWithMaterials?: boolean, /** - * Include possible detection methods, failure modes and failure mechanisms + * Include text item materials */ - includeCatalogProfileDetails?: boolean, - /** - * Include Maintenance Plan items this functional location is part of - */ - includeMaintenancePlanItems?: boolean, - /** - * Include measuring points for this tag - */ - includeMeasuringPoints?: boolean, - /** - * Include last measurement for the measuring points (only relevant if include-measuring-points is true or if looking up measuring point) - */ - includeLastMeasurement?: boolean, - /** - * Include tag characteristics such as 'Function Fail Consequence' and 'Safety Critical Element (SCE)' - */ - includeCharacteristics?: boolean, - /** - * Include bill of materials (also known as structure list) for tag and installed equipment - */ - includeBillOfMaterials?: boolean, + includeTextItemMaterials?: boolean, + }): CancelablePromise | ProblemDetails> { + return __request(OpenAPI, { + method: 'GET', + url: '/plants/{plant-id}/revisions', + path: { + 'plant-id': plantId, + }, + query: { + 'filter': filter, + 'revision-id-any-of': revisionIdAnyOf, + 'include-work-order-operations': includeWorkOrderOperations, + 'include-only-work-order-operations-with-materials': includeOnlyWorkOrderOperationsWithMaterials, + 'include-text-item-materials': includeTextItemMaterials, + }, + errors: { + 404: `The specified resource was not found`, + }, + }); + } + + /** + * Revisions Work Order Operations - Search + * ### Overview + * Search revision work order operations on a plant. + * + * Parameters: + * - include-work-order-operation-text (default: false) + * - include-only-work-order-operations-with-materials (default: false) + * + * ### Examples + * `/plants/1310/revisions/PS01-23?include-only-work-order-operations-with-materials=true&include-work-order-operation-text=true&page=1&per-page=10&api-version=v1` + * + * ### Update version 1.28.0 + * Added `changedDateTime`,`changedById`, `changedBy`, `changedByEmail`. + * + * ### Update release 1.29.0 + * Added `progressChangedDateTime`, `progressChangedBy`, `progressChangedById` and `progressChangedByEmail` to response. These values represent the last update datetime for technical feedback. + * Altered `changedDateTime`, `changedBy`, `changedById` and `changedByEmail` to only represent last update to the operation. + * + * ### Update release 1.30.1 + * Added fields `confirmationDateTime`, `confirmationBy`, `confirmationByEmail` and `confirmationById`. + * + * ### Update release 1.31.0 + * Fixed enum values for `schedulingStartConstraintId` and `schedulingFinishConstraintId` + * + * Split parts of `location` on `materials` into `finalLocation` and `temporaryLocation` in the response. + * + * ### Update release 1.33.0 + * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials`. + * + * @returns RevisionWorkOrderOperation Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static searchRevisionWorkOrderOperations({ + plantId, + revisionId, + includeOnlyWorkOrderOperationsWithMaterials = false, + includeTextItemMaterials = false, + perPage, + page, + }: { + plantId: string, + revisionId: string, /** - * Include equipment or tag attachments + * Limit the work order operations to only those which have material */ - includeAttachments?: boolean, + includeOnlyWorkOrderOperationsWithMaterials?: boolean, /** - * Include URL references for object + * Include text item materials */ - includeUrlReferences?: boolean, + includeTextItemMaterials?: boolean, /** - * Include detailed information for statuses (both active and non-active) + * Results to return pr page */ - includeStatusDetails?: boolean, + perPage?: number, /** - * Include linear data + * Page to fetch */ - includeLinearData?: boolean, - }): CancelablePromise { + page?: number, + }): CancelablePromise | ProblemDetails> { return __request(OpenAPI, { method: 'GET', - url: '/plants/{plant-id}/tags/{tag-id}', + url: '/plants/{plant-id}/revisions/{revision-id}/work-order-operations', path: { 'plant-id': plantId, - 'tag-id': tagId, + 'revision-id': revisionId, }, query: { - 'include-maintenance-records': includeMaintenanceRecords, - 'include-maintenance-record-types': includeMaintenanceRecordTypes, - 'include-work-orders': includeWorkOrders, - 'include-work-order-types': includeWorkOrderTypes, - 'include-installed-equipment': includeInstalledEquipment, - 'include-catalog-profile-details': includeCatalogProfileDetails, - 'include-maintenance-plan-items': includeMaintenancePlanItems, - 'include-measuring-points': includeMeasuringPoints, - 'include-last-measurement': includeLastMeasurement, - 'include-characteristics': includeCharacteristics, - 'include-bill-of-materials': includeBillOfMaterials, - 'include-attachments': includeAttachments, - 'include-url-references': includeUrlReferences, - 'include-status-details': includeStatusDetails, - 'include-linear-data': includeLinearData, + 'include-only-work-order-operations-with-materials': includeOnlyWorkOrderOperationsWithMaterials, + 'include-text-item-materials': includeTextItemMaterials, + 'per-page': perPage, + 'page': page, }, errors: { 404: `The specified resource was not found`, @@ -218,160 +190,195 @@ export class ModifiedEndpointsService { } /** - * Equipment - Lookup + * Preventive Work order - Lookup * ### Overview - * Lookup a single equipment with related maintenance information. + * Lookup single Preventive Work order with related information. * - * The endpoint has several include query parameters which allows a client to retrieve only the information which is relevant for their use case. + * ### Technical feedback + * Technical feedback ensures a common and best practice maintenance based on the type of tag/equipment. It's mostly used by preventive work orders, but can in some cases be used in corrective work orders. + * As part of work order execution, the technical feedback items will need to be completed. * - * ### Important information - * For warehouse and logistics data of an equipment, use SCM Logistics API. + * The endpoint `/work-orders/technical-feedback-master-data` describes the business rules for when it's necessary to create a maintenance record based on the status(`feedbackStatusId`) and reason(`feedbackReasonId`) found for the technical feedback. + * + * The `include-technical-feedback` query parameter for preventive and corrective work order lookup endpoints will return the technical feedback for each operation of the provided work order. + * + * If a technical feedback has `isDetailedFeedback: true`, it requires a very specific feedback type currently not supported by the Maintenance API. + * + * When executing a technical feedback item, the end-user will complete the steps described in `maintenanceActivityText` and end up with a result in the form of a status(`feedbackStatusId`) and a reason(`feedbackReasonId`). Compare the result with the business rules defined by `/work-orders/technical-feedback-master-data`: + * + * * `hasRequiredMaintenanceRecord: true`: Create a new maintenance record for technical feedback using the `POST /maintenance-records/failure-reports` or `POST /maintenance-records/activity-reports` endpoints with the relatedWorkOrder properties in the request to specify the work order and technical feedback + * + * * `hasRequiredMaintenanceRecord: true` As no maintenance record is required, the technical feedback is completed using the endpoint `PATCH /work-order-operations/{operation-id}/technical-feedback/{feedback-id}` + * + * If you want to include the maintenance records of a technical feedback, one needs to apply both `include-technical-feedback=True`, and `include-maintenance-records=True`. + * + * ### Production Resources/Tool (PRT) + * Production resources/tools (PRT) are used for materials, tools and equipment that are needed to carry out the task and are to be returned after use. + * + * In Equinor, this is normally added as part of maintenance program. + * Maintenance API supports the following PRT resources: + * - Attachments (through query parameter `include-attachments=true`) + * - Measuring points (through query parameter `include-measuring-points=true`) + * - URL references (through query parameter `include-url-references=true`) + * + * For more information see governing document [GL1624 Guidelines for the establishment of a preventive maintenance programme in SAP](https://docmap.equinor.com/Docmap/page/doc/dmDocIndex.html?DOCKEYID=533758). + * + * ### Update release 1.0.0 + * Work order operation actualPercentageComplete now represents progress reported through technical feedback. + * If the Work order operation is completed, the value of actualPercentageComplete will always be 100. * - * ### Example usage - * `/equipment/11948620?include-maintenance-records=true&include-maintenance-record-types=failure-report&include-only-open-maintenance-records=true&include-work-orders=true&include-work-order-types=preventiveWorkOrders,subseaWorkOrders&include-only-open-work-orders=true&include-characteritics=true&include-status-details=true&api-version=v1` - Lookup equipment with status details and characteristics. Include open failure reports where the equipment is used as main reference. Include open subsea work orders and open preventive work orders where the equipment is either a material component or the main reference (`equipmentId` at work order header level). + * ### Update release 1.1.0 + * If work-order-id exist, but is not a `preventiveWorkOrder`, the response is a HTTP 301 Moved Permanently with the url to the resource in the HTTP header Location. + * + * ### Update release 1.3.0 + * Introduced holdDeliveryOnshore and requiredDatetime properties for materials. * * ### Update release 1.4.0 - * `include-work-orders` now include work orders where the `equipmentId` is the main reference (`equipmentId` at work order header level). + * Introduced property calculationKey for operations. * * ### Update release 1.5.0 - * Fixed known limitation for `include-work-orders` and `include-only-open-work-orders=false`. + * Added createdDateTime for attachments. * - * Bugfix for include-work-orders related to deleted equipment reservations. + * Added revisionId and revision to work order response (represents shutdown or campaign work). * - * Added revisionId and revision to related work orders (represents shutdown or campaign work). + * ### Update release 1.7.0 + * Added equipmentId and equipment to the response of tagsRelated. * - * ### Update release 1.6.0 - * For `include-work-orders`, add information on the relationship between the equipment and the work order (for example the id of the reservation) + * Added sourceId to related maintenance records. * - * ### Update release 1.7.0 - * Added property parentEquipmentId. + * Added isActive property for maintenance plan details. * * ### Update release 1.8.0 - * Added properties hasUnsafeFailureMode and unsafeFailureModeStatus for failure reports. + * Introduced property activeStatusIds for operations. * - * ### Update release 1.10.0 - * Added property `maintenanceRecordId` to measurements of measuring points. + * ### Update release 1.11.0 + * Added the following properties: + * + * * personResponsibleId and personResponsibleEmail + * * isProductionCritical and isHSECritical + * * workCenter + * * plannerGroup * * ### Update release 1.12.0 - * Added properties `equipmentCategoryId` and `quantityUnitId`. + * Added new query parameter `include-technical-feedback`. It returns related technical feedback required to be completed as part of work order execution. * - * ### Update release 1.15.0 - * Added `workOrderId` to the lastMeasurement. + * Introduced property `detectionMethodGroupId` and `detectionMethodId` for technical feedback. * - * Added query parameter `include-url-references`. - * - * `modification-proposal` in `include-maintenance-record-types` now includes modification proposals in the response. + * ### Update release 1.15.0 + * Added new query parameter `include-measurements` * * ### Update release 1.16.0 - * Added property `classId` to characteristics. - * - * Added properties `manufacturer` and `modelNumber`. + * Added new query parameters `include-measuring-points`, `include-last-measurement` and `include-url-references`. `include-attachments` extended to also return PRT attachments of an operation. `attachments` now include properties `documentType`, `documentNumber` and `documentTitle`. * - * `urlReferences` and `attachments` now include properties `documentType`, `documentNumber` and `documentTitle`. + * ### Update release 1.19.0 + * Added properties `systemCondition` and `isExcludedFromWorkOrderPlan` for operations. * - * Added property `workCenterId` to `maintenanceRecords.failureReports` + * ### Update release 1.21.0 + * Added property `area` to tag details. * - * ### Update release 1.17.0 - * Add property `characteristics` to `urlReferences` in response + * Added ability to create text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a + * configuration switch, which will initially be disabled, and when appropriate, enabled. * - * Add query parameter `include-url-characteristics` + * ### Update release 1.22.0 + * Added new query parameter `include-service-operations`. Operations of type Service - PM03 previously available in the `operations` have been moved to `serviceOperations`. * - * ### Update release 1.21.0 - * Added query parameter `include-person-responsible`, that expands work order response with person responsible. + * Added activeStatusIds to related maintenance records. * * ### Update release 1.24.0 - * `urlReferences` and `attachments` now include the property `documentCreatedDate` + * `attachments` now include the property `documentCreatedDate` * - * Added property `cmrIndicator` for WorkOrders + * Removed `urlReferences` field from response object, and removed `include-url-references` query parameter. URLReferences are only supported for Notifications. * - * ### Update release 1.25.0 - * Added query parameter `include-sub-equipment` + * Added property `cmrIndicator` in the response. * * ### Update release 1.26.0 - * Added properties `tagId` and `tagPlantId` + * Added property `isEquipmentRental` to services in serviceOperations. + * Added `materials` to serviceOperations. + * + * `tagDetails` object now includes the new field `maintenanceConceptId` * * ### Update release 1.27.0 * Work orders now include the property 'isOpen' * + * Added `tag` and `title` to `maintenanceRecords` expand. + * + * ### Update release 1.28.0 + * Added new query parameter `include-safety-measures`. + * * ### Update release 1.31.0 - * Added properties `manufacturerPartNumber`, `technicalIdentificationNumber`, `objectWeight` and `unitOfWeight`to response body. + * Fixed enum values for `schedulingStartConstraintId` and `schedulingFinishConstraintId` * - * ### Update release 1.32.0 - * Added `changedDateTime` for attachments. + * Split parts of `location` on `operations.materials` into `finalLocation` and `temporaryLocation` in the response. * - * @returns Equipment Success + * Added `agreement` & `agreementItem` on `serviceOperations` and `grossPrice`, `netValue` & `currency` on `services`. + * + * ### Update release 1.33.0 + * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials`. + * + * @returns PreventiveWorkOrder Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static lookupEquipment({ - equipmentId, + public static lookupPreventiveWorkOrder({ + workOrderId, + includeOperations = true, + includeServiceOperations = true, + includeTechnicalFeedback = false, + includeMaterials = false, includeMaintenanceRecords = false, - includeMaintenanceRecordTypes, - includeOnlyOpenMaintenanceRecords = false, - includeWorkOrders = true, - includeWorkOrderTypes, - includeOnlyOpenWorkOrders = false, - includeCatalogProfileDetails = false, - includeCharacteristics = false, + includeMaintenancePlanDetails = false, includeAttachments = false, - includeUrlReferences = false, - includeUrlCharacteristics = false, + includeStatusDetails = false, + includeTagDetails = false, + includeRelatedTags = false, includeMeasuringPoints = false, includeLastMeasurement = false, - includePersonResponsible = false, - includeSubEquipment = false, - includeStatusDetails = false, + includeMeasurements = false, + includeSafetyMeasures = false, }: { + workOrderId: string, /** - * The unique equipmentId in Equinor's system - */ - equipmentId: string, - /** - * Include maintenance records. If include-maintenance-record-types is not supplied, all supported types are returned - */ - includeMaintenanceRecords?: boolean, - /** - * Include which types of maintenance records + * Include Work order operations */ - includeMaintenanceRecordTypes?: Array<'failure-report' | 'activity-report' | 'certification-report' | 'technical-information-update-request' | 'technical-clarification' | 'modification-proposal'>, + includeOperations?: boolean, /** - * Limit include-maintenance-records to only open maintenance records + * Include Work order service operations */ - includeOnlyOpenMaintenanceRecords?: boolean, + includeServiceOperations?: boolean, /** - * Include work orders. If include-work-order-types is not supplied, all supported types are returned. + * Include technical feedback required to be completed as part of work order execution. */ - includeWorkOrders?: boolean, + includeTechnicalFeedback?: boolean, /** - * Include which types of work orders. Use comma-separated list of entries. + * Include materials for Work order operations */ - includeWorkOrderTypes?: Array<'correctiveWorkOrders' | 'preventiveWorkOrders' | 'modificationWorkOrders' | 'sasChangeWorkOrders' | 'projectWorkOrders' | 'subseaWorkOrders'>, + includeMaterials?: boolean, /** - * Limit include-work-orders to only open work order + * Include related maintenance records (from object list and technical feedback) */ - includeOnlyOpenWorkOrders?: boolean, + includeMaintenanceRecords?: boolean, /** - * Include possible detection methods, failure modes and failure mechanisms + * Include details for maintenance plan */ - includeCatalogProfileDetails?: boolean, + includeMaintenancePlanDetails?: boolean, /** - * Include equipment characteristics such as 'Kontrollkort gyldig til' and 'Equipment group' + * Include Work order attachments (including PRT attachments) */ - includeCharacteristics?: boolean, + includeAttachments?: boolean, /** - * Include equipment or tag attachments + * Include detailed information for statuses (both active and non-active) */ - includeAttachments?: boolean, + includeStatusDetails?: boolean, /** - * Include URL references for object + * Include detailed for the main tag of the Work order */ - includeUrlReferences?: boolean, + includeTagDetails?: boolean, /** - * Include characteristics for URL References + * Include related tags (from object list) */ - includeUrlCharacteristics?: boolean, + includeRelatedTags?: boolean, /** - * Include measuring points for this tag + * Include related measuring points from PRT */ includeMeasuringPoints?: boolean, /** @@ -379,406 +386,686 @@ export class ModifiedEndpointsService { */ includeLastMeasurement?: boolean, /** - * Include person responsible information in response + * Include related measurements */ - includePersonResponsible?: boolean, + includeMeasurements?: boolean, /** - * Include child equipment for an equipment. - * Limit to only the first level childs of the hierarchy. - * + * Include safety-measures in work order operations */ - includeSubEquipment?: boolean, - /** - * Include detailed information for statuses (both active and non-active) - */ - includeStatusDetails?: boolean, - }): CancelablePromise { + includeSafetyMeasures?: boolean, + }): CancelablePromise { return __request(OpenAPI, { method: 'GET', - url: '/equipment/{equipment-id}', + url: '/work-orders/preventive-work-orders/{work-order-id}', path: { - 'equipment-id': equipmentId, + 'work-order-id': workOrderId, }, query: { + 'include-operations': includeOperations, + 'include-service-operations': includeServiceOperations, + 'include-technical-feedback': includeTechnicalFeedback, + 'include-materials': includeMaterials, 'include-maintenance-records': includeMaintenanceRecords, - 'include-maintenance-record-types': includeMaintenanceRecordTypes, - 'include-only-open-maintenance-records': includeOnlyOpenMaintenanceRecords, - 'include-work-orders': includeWorkOrders, - 'include-work-order-types': includeWorkOrderTypes, - 'include-only-open-work-orders': includeOnlyOpenWorkOrders, - 'include-catalog-profile-details': includeCatalogProfileDetails, - 'include-characteristics': includeCharacteristics, + 'include-maintenance-plan-details': includeMaintenancePlanDetails, 'include-attachments': includeAttachments, - 'include-url-references': includeUrlReferences, - 'include-url-characteristics': includeUrlCharacteristics, + 'include-status-details': includeStatusDetails, + 'include-tag-details': includeTagDetails, + 'include-related-tags': includeRelatedTags, 'include-measuring-points': includeMeasuringPoints, 'include-last-measurement': includeLastMeasurement, - 'include-person-responsible': includePersonResponsible, - 'include-sub-equipment': includeSubEquipment, - 'include-status-details': includeStatusDetails, + 'include-measurements': includeMeasurements, + 'include-safety-measures': includeSafetyMeasures, }, errors: { + 301: `If work-order-id exist, but is not a \`preventiveWorkOrder\`, the response is a HTTP 301 Moved Permanently with the url to the resource in the HTTP header Location. + `, 404: `The specified resource was not found`, }, }); } /** - * Document - Search + * Preventive Work order - Update * ### Overview - * Search documents and include related information such as characteristics, materials, equipment and attachments. + * Update preventive work order. * + * Supports: + * - Append to text + * - Update workCenterId and workCenterPlantId + * - Update tagId and tagPlantId + * - Update basicStartDateTime and basicEndDateTime + * - Update sortField + * - Update externalPartnerWorkOrderId + * - Update title + * - Update plannerGroupId + * - Update revisionId (Use `/plants/{plant-id}?include-revisions=true&api-version=v1` to get a list of possible values) + * - Update locationId (Use `/plants/{plant-id}?include-locations=true&api-version=v1` to get a list of possible values) + * - Update systemId (Use `/plants/{plant-id}?include-systems=true&api-version=v1` to get a list of possible values) + * + * ### Important information + * Append to text follows requirement `I-103209 - Notation in long text field - Upstream offshore`. + * + * Newest information in text is added above existing information and is automatically signed with date and full name of logged on user. + * + * ***When Advanced ERP text is enabled, information is not automatically signed and has to be sent with the input when using append*** + * + * ### Update release 1.0.0 + * Added additional properties to update + * + * ### Update release 1.4.0 + * Adjusted logic for append text to work order. Newest information in text is now added above existing information. + * + * ### Update release 1.6.0 + * Added possibility for update of sortField and revisionId. + * + * ### Update release 1.7.0 + * Added possibility for update of locationId and systemId. + * + * ### Update release 1.18.0 + * Added possibility for update of `externalPartnerWorkOrderId`, `title` and `plannerGroupId`. + * + * ### Update release 1.21.0 + * Added ability to update text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a + * configuration switch, which will initially be disabled, and when appropriate, enabled. + * + * ### Update release 1.33.0 + * Added possibility to prepend text. Use the operation `prepend` in the request body to prepend text to the current work order text. + * + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static updatePreventiveWorkOrder({ + workOrderId, + requestBody, + }: { + workOrderId: string, + /** + * The information to be updated + */ + requestBody: PreventiveWorkOrderJsonPatch, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PATCH', + url: '/work-orders/preventive-work-orders/{work-order-id}', + path: { + 'work-order-id': workOrderId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Request is missing required parameters`, + 403: `User does not have sufficient rights to update work order operation`, + 404: `The specified resource was not found`, + 409: `Work order is locked by other user`, + }, + }); + } + + /** + * Corrective Work order - Lookup + * ### Overview + * Lookup single Corrective Work order with related information + * + * ### Technical feedback + * Technical feedback ensures a common and best practice maintenance based on the type of tag/equipment. It's mostly used by preventive work orders, but can in some cases be used in corrective work orders. + * As part of work order execution, the technical feedback will need to be completed. + * + * The endpoint `/work-orders/technical-feedback-master-data` describes the business rules for when it's necessary to create a maintenance record based on the status (`feedbackStatusId`) and reason (`feedbackReasonId`) found for the technical feedback. + * + * The `include-technical-feedback` query parameter for preventive and corrective work order lookup endpoints will return the technical feedback for each operation of the provided work order. + * + * If a technical feedback has `isDetailedFeedback: true`, it requires a very specific feedback type currently not supported by the Maintenance API. + * + * When executing a technical feedback item, the end-user will complete the steps described in `maintenanceActivityText` and end up with a result in the form of a status (`feedbackStatusId`) and a reason (`feedbackReasonId`). Compare the result with the business rules defined by `/work-orders/technical-feedback-master-data` and base the next step based on the value of `hasRequiredMaintenanceRecord`: + * + * * `hasRequiredMaintenanceRecord: true`: Create a new maintenance record for technical feedback using the `POST /maintenance-records/failure-reports` or `POST /maintenance-records/activity-reports` endpoints with the relatedWorkOrder properties in the request to specify the work order and technical feedback + * + * * `hasRequiredMaintenanceRecord: false` As no maintenance record is required, the technical feedback is completed using the endpoint `PATCH /work-order-operations/{operation-id}/technical-feedback/{feedback-id}` + * + * If you want to include the maintenance records of a technical feedback, one needs to apply both `include-technical-feedback=True`, and `include-maintenance-records=True`. + * + * ### Production Resources/Tool (PRT) + * Production resources/tools (PRT) are used for materials, tools and equipment that are needed to carry out the task and are to be returned after use. + * + * In Equinor, this is normally added as part of maintenance program. + * Maintenance API supports the following PRT resources: + * - Attachments (through query parameter `include-attachments=true`) + * - Measuring points (through query parameter `include-measuring-points=true`) + * - URL references (through query parameter `include-url-references=true`) + * + * For more information see governing document [GL1624 Guidelines for the establishment of a preventive maintenance programme in SAP](https://docmap.equinor.com/Docmap/page/doc/dmDocIndex.html?DOCKEYID=533758). + * + * ### Update release 1.0.0 + * Work order operation actualPercentageComplete now represents progress reported through technical feedback. + * If the Work order operation is completed, the value of actualPercentageComplete will always be 100. + * + * ### Update release 1.1.0 + * If work-order-id exist, but is not a `correctiveWorkOrder`, the response is a HTTP 301 Moved Permanently with the url to the resource in the HTTP header Location. + * + * ### Update release 1.3.0 + * Introduced holdDeliveryOnshore and requiredDatetime properties for materials. + * + * ### Update release 1.4.0 + * Introduced property calculationKey for operations. + * + * ### Update release 1.5.0 + * Added createdDateTime for attachments. + * + * Added revisionId and revision to work order response (represents shutdown or campaign work). + * + * ### Update release 1.7.0 + * Added equipmentId and equipment to the response of tagsRelated. + * + * Adding sourceId to related maintenance records. + * + * ### Update release 1.8.0 + * Introduced property activeStatusIds for operations. + * + * ### Update release 1.12.0 + * Added new query parameter `include-technical-feedback`. It returns related technical feedback required to be completed as part of work order execution. Technical feedback is mostly used for preventive work orders, but can also be used for corrective work orders. + * + * Introduced property `detectionMethodGroupId` and `detectionMethodId` for technical feedback. + * + * ### Update release 1.15.0 + * Added new query parameter `include-measurements`. + * + * ### Update release 1.16.0 + * Added new query parameters `include-measuring-points`, `include-last-measurement` and `include-url-references`. `include-attachments` extended to also return PRT attachments of an operation. `attachments` now include properties `documentType`, `documentNumber` and `documentTitle`. * - * The client must in the request provide at least one of the following search parameters: - * * `document-type-any-of` - * * `document-number-any-of` - * * `characteristic-value-any-of` + * ### Update release 1.19.0 + * Added properties `systemCondition` and `isExcludedFromWorkOrderPlan` for operations. + * + * ### Update release 1.21.0 + * Added properties `costs` and `costsCurrency`. + * Added property `area` to tag details. + * + * Added ability to read text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a + * configuration switch, which will initially be disabled, and when appropriate, enabled. + * + * ### Update release 1.22.0 + * Added new query parameter `include-service-operations`. Operations of type Service - PM03 previously available in the `operations` have been moved to `serviceOperations`. * - * **N.B** The link in the attachment object is in the first iteration always routed via the equipment attachment endpoint. - * In a future release we will implement a general endpoint `documents/attachment/{attachment-id}` for downloading attachments which will be displayed here. + * Added activeStatusIds to related maintenance records. + * + * ### Update release 1.24.0 + * `attachments` now include the property `documentCreatedDate` + * + * Removed 'urlReferences' field from response object, and removed 'include-url-references' query parameter. URLReferences are only supported for Notifications. + * + * Added property `cmrIndicator` in the response. + * + * ### Update release 1.26.0 + * Added property `isEquipmentRental` to services in serviceOperations. + * Added `materials` to serviceOperations. + * + * 'tagDetails' object now includes the new field 'maintenanceConceptId' + * + * ### Update release 1.27.0 + * Work orders now include the property 'isOpen' + * + * ### Update release 1.28.0 + * Added new query parameter `include-safety-measure`. + * + * Added new query parameter `include-estimated-costs`. + * + * Added `tag` and `title` to `maintenanceRecords` expand. + * + * ### Update release 1.29.0 + * Added new properties for `additionalCostWBSId` and `costWBSId`. * * ### Update release 1.31.0 - * Added `include-inventory-count` query parameter to include `equipmentInventoryCount` and `materialInventoryCount` property in the response. + * Fixed enum values for `schedulingStartConstraintId` and `schedulingFinishConstraintId` * - * Added support for including more business objects: `include-tags`, `include-measuring-points` and `include-maintenance-records`. + * Split parts of `location` on `operations.materials` into `finalLocation` and `temporaryLocation` in the response. * - * ### Update release 1.32.0 - * Added `include-url-references` query parameter to include URL references in the response. + * Added `agreement` & `agreementItem` on `serviceOperations` and `grossPrice`, `netValue` & `currency` on `services`. * - * Added properties `statusId` and `statusText` to the response. * - * Added properties `partNumber` & `manufacturer` to `material` in the response. + * ### Update release 1.33.0 + * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials` . * - * @returns Document Success + * @returns CorrectiveWorkOrder Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static searchDocuments({ - documentTypeAnyOf, - documentNumberAnyOf, - characteristicValueAnyOf, - characteristicId, - classId, - includeCharacteristics = false, - includeMaterial = false, - includeEquipment = false, - includeTags = false, + public static lookupCorrectiveWorkOrder({ + workOrderId, + includeOperations = true, + includeServiceOperations = true, + includeTechnicalFeedback = false, + includeMaterials = true, includeMaintenanceRecords = false, - includeMeasuringPoints = false, includeAttachments = false, - includeInventoryCount = false, - includeUrlReferences = false, - perPage = 50, - page = 1, + includeStatusDetails = false, + includeTagDetails = false, + includeRelatedTags = false, + includeMeasuringPoints = false, + includeLastMeasurement = false, + includeMeasurements = false, + includeSafetyMeasures = false, + includeEstimatedCosts = false, }: { + workOrderId: string, /** - * Search based on `documentType`. - */ - documentTypeAnyOf?: Array, - /** - * Search based on `documentNumber`. + * Include Work order operations */ - documentNumberAnyOf?: Array, + includeOperations?: boolean, /** - * Search based on characteristic values. Must be used in combination with `class-id` and `characteristic-id` Wildcards are not supported. Make sure to encode the parameters if they contain special characters. + * Include Work order service operations */ - characteristicValueAnyOf?: string, + includeServiceOperations?: boolean, /** - * Required field if `characteristic-value-any-of` is supplied. Endpoint [/characteristics/{class-id}](#operation/LookupClass) can be used to find characteristic ids + * Include technical feedback required to be completed as part of work order execution. */ - characteristicId?: string | null, + includeTechnicalFeedback?: boolean, /** - * Required field if `characteristic-value-any-of` is supplied. + * Include materials for Work order operations */ - classId?: string | null, + includeMaterials?: boolean, /** - * Include characteristics' + * Include related maintenance records (from object list) */ - includeCharacteristics?: boolean, + includeMaintenanceRecords?: boolean, /** - * Include material related to the object + * Include Work order attachments (including PRT attachments) */ - includeMaterial?: boolean, + includeAttachments?: boolean, /** - * Include equipment related to the object + * Include detailed information for statuses (both active and non-active) */ - includeEquipment?: boolean, + includeStatusDetails?: boolean, /** - * Include tags. + * Include detailed for the main tag of the Work order */ - includeTags?: boolean, + includeTagDetails?: boolean, /** - * Include maintenance records. If include-maintenance-record-types is not supplied, all supported types are returned + * Include related tags (from object list) */ - includeMaintenanceRecords?: boolean, + includeRelatedTags?: boolean, /** - * Include measuring points for this tag + * Include related measuring points from PRT */ includeMeasuringPoints?: boolean, /** - * Include equipment or tag attachments + * Include last measurement for the measuring points (only relevant if include-measuring-points is true or if looking up measuring point) */ - includeAttachments?: boolean, - includeInventoryCount?: boolean, + includeLastMeasurement?: boolean, /** - * Include URL references for object + * Include related measurements */ - includeUrlReferences?: boolean, + includeMeasurements?: boolean, /** - * Results to return pr page + * Include safety-measures in work order operations */ - perPage?: number, + includeSafetyMeasures?: boolean, /** - * Page to fetch + * Include estimated costs */ - page?: number, - }): CancelablePromise | ProblemDetails> { + includeEstimatedCosts?: boolean, + }): CancelablePromise { return __request(OpenAPI, { method: 'GET', - url: '/documents', + url: '/work-orders/corrective-work-orders/{work-order-id}', + path: { + 'work-order-id': workOrderId, + }, query: { - 'document-type-any-of': documentTypeAnyOf, - 'document-number-any-of': documentNumberAnyOf, - 'characteristic-value-any-of': characteristicValueAnyOf, - 'characteristic-id': characteristicId, - 'class-id': classId, - 'include-characteristics': includeCharacteristics, - 'include-material': includeMaterial, - 'include-equipment': includeEquipment, - 'include-tags': includeTags, + 'include-operations': includeOperations, + 'include-service-operations': includeServiceOperations, + 'include-technical-feedback': includeTechnicalFeedback, + 'include-materials': includeMaterials, 'include-maintenance-records': includeMaintenanceRecords, - 'include-measuring-points': includeMeasuringPoints, 'include-attachments': includeAttachments, - 'include-inventory-count': includeInventoryCount, - 'include-url-references': includeUrlReferences, - 'per-page': perPage, - 'page': page, + 'include-status-details': includeStatusDetails, + 'include-tag-details': includeTagDetails, + 'include-related-tags': includeRelatedTags, + 'include-measuring-points': includeMeasuringPoints, + 'include-last-measurement': includeLastMeasurement, + 'include-measurements': includeMeasurements, + 'include-safety-measures': includeSafetyMeasures, + 'include-estimated-costs': includeEstimatedCosts, }, errors: { - 400: `Request is missing required parameters`, - 403: `User does not have sufficient rights to view document`, + 301: `If work-order-id exist, but is not a \`correctiveWorkOrder\`, the response is a HTTP 301 Moved Permanently with the url to the resource in the HTTP header Location. + `, 404: `The specified resource was not found`, }, }); } /** - * Document - Create + * Corrective Work order - Update * ### Overview - * Create a new document. - * This document will not be linked to any business object, but can be linked afterwards by calling POST `/document-relationships/{relationship-type}/{source-id}`. + * Update a Corrective Work Order. + * + * Supports: + * - Append and replace text + * - Update workCenterId and workCenterPlantId + * - Update tagId and tagPlantId + * - Update basicStartDateTime and basicEndDateTime + * - Update sortField + * - Update title + * - Update plannerGroupId + * - Update revisionId (Use `/plants/{plant-id}?include-revisions=true&api-version=v1` to get a list of possible values) + * - Update locationId (Use `/plants/{plant-id}?include-locations=true&api-version=v1` to get a list of possible values) + * - Update systemId (Use `/plants/{plant-id}?include-systems=true&api-version=v1` to get a list of possible values) + * - Update costs + * - Update costWBSId and additionalCostWBSId + * - Update priorityId + * + * + * ### Important information - costWBSId and additionalCostWBSId + * It's generally recommended that the values of `costWBSId` and `additionalCostWBSId` match. + * When the work order is released (by setting status `REL`), there is Equinor business logic check to see if they match. + * If the work order is released through Maintenance API, different values for costWBSId and additionalCostWBSId will result in an error. + * If the work order is released directly in the ERP system, the user will receive a warning and can choose to continue. + * + * Updating of `costWBSId` will trigger a new determination of the settlement rule in the ERP system. If a settlement rule already exists, the updating of `costWBSId` will automatically update the settlement rule. Hence the `costWBSId` and settlement rule are allways aligned. + * + * + * ### Important information - Text + * Append to text follows requirement `I-103209 - Notation in long text field - Upstream offshore`. + * + * Newest information in text is added above existing information and is automatically signed with date and full name of logged on user. * - * **Note:** Documents of type 'B30' may only be created with one of the following `statusId`s: - * - `CV` (Current Version) - * - `WO` (Working) - * - `CA` (Cancelled) + * ***When Advanced ERP text is enabled, information is not automatically signed and has to be sent with the input when using append*** + * + * ### Important information - priorityId + * `priorityId` can only be updated if the Corrective Work Order has a different priority than the FailureReport connected to this workorder. + * + * ### Update release 1.0.0 + * Added additional properties to update + * + * ### Update release 1.4.0 + * Adjusted logic for append text to work order. Newest information in text is now added above existing information. + * + * ### Update release 1.6.0 + * Added possibility for update of sortField and revisionId. + * + * ### Update release 1.7.0 + * Added possibility for update of locationId and systemId. + * + * ### Update release 1.18.0 + * Added possibility for update of `title` and `plannerGroupId`. + * + * ### Update release 1.21.0 + * Added possibility for update of `costs`. + * + * Added ability to update text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a + * configuration switch, which will initially be disabled, and when appropriate, enabled. + * + * ### Update release 1.29.0 + * Added possibility for update of `costWBSId` and `additionalCostWBSId`. + * + * ### Update release 1.31.0 + * Added possibility for update of `priorityId`. * * ### Update release 1.32.0 - * Added property `statusId` to the request body schema to allow setting the status of a document during its creation. * - * Added properties `statusId` and `statusText` to the response. + * Updating of `costWBSId` from now on triggers the determination/updating of the settlement rule. + * + * ### Update release 1.33.0 + * Added possibility to prepend text. Use the operation `prepend` in the request body to prepend text to the current work order text. * * @returns ProblemDetails Response for other HTTP status codes - * @returns DocumentBasic Created * @throws ApiError */ - public static createDocument({ + public static updateCorrectiveWorkOrder({ + workOrderId, requestBody, }: { + workOrderId: string, /** - * Document to create + * The information to be updated */ - requestBody: DocumentCreate, - }): CancelablePromise { + requestBody: CorrectiveWorkOrderJsonPatch, + }): CancelablePromise { return __request(OpenAPI, { - method: 'POST', - url: '/documents', + method: 'PATCH', + url: '/work-orders/corrective-work-orders/{work-order-id}', + path: { + 'work-order-id': workOrderId, + }, body: requestBody, mediaType: 'application/json', errors: { - 400: `Bad request, for example documentType is invalid.`, - 403: `User does not have sufficient rights to create an equipment.`, + 400: `Request is missing required parameters`, + 403: `User does not have sufficient rights to update work order operation`, + 404: `The specified resource was not found`, + 409: `Work order is locked by other user`, }, }); } /** - * Document - Lookup + * Project Work order - Lookup * ### Overview - * Lookup document by id. Use the different include parameters to include additional information about the document. - * [POST document-relationships/{relationship-type}/{source-id}](#operation/AddRelationshipsToDocument) can be used to link the document to a business object. + * Lookup single Project Work order with related information * - * **N.B** The link in the attachment object is in the first iteration always routed via the equipment attachment endpoint. - * In a future release we will implement a general endpoint `documents/attachment/{attachment-id}` for downloading attachments which will be displayed here. + * ### Update release 1.0.0 + * Work order operation actualPercentageComplete now represents progress reported through technical feedback. + * If the Work order operation is completed, the value of actualPercentageComplete will always be 100. * - * ### Update release 1.31.0 - * Added `include-inventory-count` query parameter to include `equipmentInventoryCount` and `materialInventoryCount` property in the response. + * ### Update release 1.1.0 + * If work-order-id exist, but is not a `projectWorkOrder`, the response is a HTTP 301 Moved Permanently with the url to the resource in the HTTP header Location. * - * Added support for including more business objects: `include-tags`, `include-measuring-points` and `include-maintenance-records`. + * ### Update release 1.3.0 + * Introduced holdDeliveryOnshore and requiredDatetime properties for materials. * - * ### Update release 1.32.0 - * Added `include-url-references` query parameter to include URL references in the response. + * ### Update release 1.4.0 + * Introduced property calculationKey for operations. * - * Added `changedDateTime` for attachments. + * ### Update release 1.5.0 + * Added createdDateTime for attachments. + * + * Added revisionId and revision to work order response (represents shutdown or campaign work). + * + * ### Update release 1.7.0 + * Added equipmentId and equipment to the response of tagsRelated. + * + * Adding sourceId to related maintenance records. + * + * ### Update release 1.8.0 + * Introduced property activeStatusIds for operations. + * + * ### Update release 1.19.0 + * Added properties `systemCondition` and `isExcludedFromWorkOrderPlan` for operations. + * + * ### Update release 1.21.0 + * Added property `area` to tag details. + * + * Added ability to read text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a + * configuration switch, which will initially be disabled, and when appropriate, enabled. + * + * ### Update release 1.22.0 + * Added new query parameter `include-service-operations`. Operations of type Service - PM03 previously available in the `operations` have been moved to `serviceOperations`. + * + * ### Update release 1.24.0 + * Added property `cmrIndicator` in the response. + * + * ### Update release 1.26.0 + * Added property `isEquipmentRental` to services in serviceOperations. + * Added `materials` to serviceOperations. + * + * `tagDetails` object now includes the new field `maintenanceConceptId` * - * Added properties `statusId` and `statusText` to the response. + * ### Update release 1.27.0 + * Work orders now include the property `isOpen` + * + * Added `tag` and `title` to `maintenanceRecords` expand. + * + * ### Update release 1.28.0 + * Added new query parameter `include-safety-measures`. + * + * ### Update release 1.31.0 + * Fixed enum values for `schedulingStartConstraintId` and `schedulingFinishConstraintId` + * + * Split parts of `location` on `operations.materials` into `finalLocation` and `temporaryLocation` in the response. * - * Added properties `partNumber` & `manufacturer` to `material` in the response. + * Added `agreement` & `agreementItem` on `serviceOperations` and `grossPrice`, `netValue` & `currency` on `services`. * - * @returns Document Success + * ### Update release 1.33.0 + * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials`. + * + * @returns ProjectWorkOrder Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static lookupDocument({ - documentId, - includeCharacteristics = false, - includeMaterial = false, - includeEquipment = false, - includeTags = false, + public static lookupProjectWorkOrder({ + workOrderId, + includeOperations = true, + includeServiceOperations = true, + includeMaterials = true, includeMaintenanceRecords = false, - includeMeasuringPoints = false, includeAttachments = false, - includeInventoryCount = false, - includeUrlReferences = false, + includeStatusDetails = false, + includeTagDetails = false, + includeRelatedTags = false, + includeSafetyMeasures = false, }: { + workOrderId: string, /** - * Unique id for the document to be used against endpoints for the `/documents` resource + * Include Work order operations */ - documentId: string, + includeOperations?: boolean, /** - * Include characteristics' + * Include Work order service operations */ - includeCharacteristics?: boolean, + includeServiceOperations?: boolean, /** - * Include material related to the object + * Include materials for Work order operations */ - includeMaterial?: boolean, + includeMaterials?: boolean, /** - * Include equipment related to the object + * Include related maintenance records (from object list) */ - includeEquipment?: boolean, + includeMaintenanceRecords?: boolean, /** - * Include tags. + * Include Work order attachments (on header and for operation) */ - includeTags?: boolean, + includeAttachments?: boolean, /** - * Include maintenance records. If include-maintenance-record-types is not supplied, all supported types are returned + * Include detailed information for statuses (both active and non-active) */ - includeMaintenanceRecords?: boolean, + includeStatusDetails?: boolean, /** - * Include measuring points for this tag + * Include detailed for the main tag of the Work order */ - includeMeasuringPoints?: boolean, + includeTagDetails?: boolean, /** - * Include equipment or tag attachments + * Include related tags (from object list) */ - includeAttachments?: boolean, - includeInventoryCount?: boolean, + includeRelatedTags?: boolean, /** - * Include URL references for object + * Include safety-measures in work order operations */ - includeUrlReferences?: boolean, - }): CancelablePromise { + includeSafetyMeasures?: boolean, + }): CancelablePromise { return __request(OpenAPI, { method: 'GET', - url: '/documents/{document-id}', + url: '/work-orders/project-work-orders/{work-order-id}', path: { - 'document-id': documentId, + 'work-order-id': workOrderId, }, query: { - 'include-characteristics': includeCharacteristics, - 'include-material': includeMaterial, - 'include-equipment': includeEquipment, - 'include-tags': includeTags, + 'include-operations': includeOperations, + 'include-service-operations': includeServiceOperations, + 'include-materials': includeMaterials, 'include-maintenance-records': includeMaintenanceRecords, - 'include-measuring-points': includeMeasuringPoints, 'include-attachments': includeAttachments, - 'include-inventory-count': includeInventoryCount, - 'include-url-references': includeUrlReferences, + 'include-status-details': includeStatusDetails, + 'include-tag-details': includeTagDetails, + 'include-related-tags': includeRelatedTags, + 'include-safety-measures': includeSafetyMeasures, }, errors: { - 400: `Request is missing required parameters`, - 403: `User does not have sufficient rights to view document`, + 301: `If work-order-id exist, but is not a \`projectWorkOrder\`, the response is a HTTP 301 Moved Permanently with the url to the resource in the HTTP header Location. + `, 404: `The specified resource was not found`, }, }); } /** - * Document relationships - Get relationships + * Project Work order - Update * ### Overview - * Get relationship between a business object and documents. + * Update project work order. * - * Example urls: - * - Tags: `/document-relationships/tags/1100-AE5566?api-version=v1` - * - Equipment: `/document-relationships/equipment/11948620?api-version=v1` - * - Measuring points: `/document-relationships/measuring-points/14626974?api-version=v1` - * - Maintenance records: `/document-relationships/maintenance-records/45939208?api-version=v1` - * - Materials: `/document-relationships/materials/741466?api-version=v1` + * Supports: + * - Append and replace text + * - Update workCenterId and workCenterPlantId + * - Update tagId and tagPlantId + * - Update basicStartDateTime and basicEndDateTime + * - Update sortField + * - Update title + * - Update plannerGroupId + * - Update revisionId (Use `/plants/{plant-id}?include-revisions=true&api-version=v1` to get a list of possible values) + * - Update locationId (Use `/plants/{plant-id}?include-locations=true&api-version=v1` to get a list of possible values) + * - Update systemId (Use `/plants/{plant-id}?include-systems=true&api-version=v1` to get a list of possible values) * - * ### Update release 1.27.0 - * Added support for business objects: Equipment, Measuring points and Maintenance records. + * ### Important information + * Append to text follows requirement `I-103209 - Notation in long text field - Upstream offshore`. * - * Added `include-characteristics` and `include-attachments`. + * Newest information in text is added above existing information and is automatically signed with date and full name of logged on user. * - * Added property `documentTitle` to the response. + * ***When Advanced ERP text is enabled, information is not automatically signed and has to be sent with the input when using append*** * - * ### Update release 1.28.0 - * Added property `documentCreatedDate` to the response. + * ### Update release 1.0.0 + * Added additional properties to update * - * ### Update release 1.30.0 - * Added possibility to search by document relationship to material. + * ### Update release 1.4.0 + * Adjusted logic for append text to work order. Newest information in text is now added above existing information. * - * ### Update release 1.32.0 - * Added `changedDateTime` for attachments. + * ### Update release 1.6.0 + * Added possibility for update of sortField and revisionId. + * + * ### Update release 1.7.0 + * Added possibility for update of locationId and systemId. + * + * ### Update release 1.18.0 + * Added possibility for update of `title` and `plannerGroupId`. + * + * ### Update release 1.21.0 + * Added ability to update text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a + * configuration switch, which will initially be disabled, and when appropriate, enabled. + * + * ### Update release 1.33.0 + * Added possibility to prepend text. Use the operation `prepend` in the request body to prepend text to the current work order text. * - * @returns RelationshipToDocument Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static lookupRelationshipsToDocument({ - relationshipType, - sourceId, - includeCharacteristics = false, - includeAttachments = false, + public static updateProjectWorkOrder({ + workOrderId, + requestBody, }: { + workOrderId: string, /** - * Type of business object to replace relationships to documents for - */ - relationshipType: 'tags' | 'equipment' | 'measuring-points' | 'maintenance-records' | 'materials', - sourceId: string, - /** - * Include characteristics' - */ - includeCharacteristics?: boolean, - /** - * Include equipment or tag attachments + * The information to be updated */ - includeAttachments?: boolean, - }): CancelablePromise | ProblemDetails> { + requestBody: GenericWorkOrderJsonPatch, + }): CancelablePromise { return __request(OpenAPI, { - method: 'GET', - url: '/document-relationships/{relationship-type}/{source-id}', + method: 'PATCH', + url: '/work-orders/project-work-orders/{work-order-id}', path: { - 'relationship-type': relationshipType, - 'source-id': sourceId, - }, - query: { - 'include-characteristics': includeCharacteristics, - 'include-attachments': includeAttachments, + 'work-order-id': workOrderId, }, + body: requestBody, + mediaType: 'application/json', errors: { 400: `Request is missing required parameters`, - 403: `User does not have sufficient rights to view document`, + 403: `User does not have sufficient rights to update work order operation`, 404: `The specified resource was not found`, + 409: `Work order is locked by other user`, }, }); } /** - * Corrective Work order - Update + * Modification Work order - Update * ### Overview - * Update a Corrective Work Order. + * Update modification work order. * * Supports: * - Append and replace text @@ -791,30 +1078,14 @@ export class ModifiedEndpointsService { * - Update revisionId (Use `/plants/{plant-id}?include-revisions=true&api-version=v1` to get a list of possible values) * - Update locationId (Use `/plants/{plant-id}?include-locations=true&api-version=v1` to get a list of possible values) * - Update systemId (Use `/plants/{plant-id}?include-systems=true&api-version=v1` to get a list of possible values) - * - Update costs - * - Update costWBSId and additionalCostWBSId - * - Update priorityId - * - * - * ### Important information - costWBSId and additionalCostWBSId - * It's generally recommended that the values of `costWBSId` and `additionalCostWBSId` match. - * When the work order is released (by setting status `REL`), there is Equinor business logic check to see if they match. - * If the work order is released through Maintenance API, different values for costWBSId and additionalCostWBSId will result in an error. - * If the work order is released directly in the ERP system, the user will receive a warning and can choose to continue. * - * Updating of `costWBSId` will trigger a new determination of the settlement rule in the ERP system. If a settlemet rule already exists, the updating of `costWBSId` will automatically update the settlement rule. Hence the `costWBSId` and settlement rule are allways aligned. - * - * - * ### Important information - Text + * ### Important information * Append to text follows requirement `I-103209 - Notation in long text field - Upstream offshore`. * * Newest information in text is added above existing information and is automatically signed with date and full name of logged on user. * * ***When Advanced ERP text is enabled, information is not automatically signed and has to be sent with the input when using append*** * - * ### Important information - priorityId - * `priorityId` can only be updated if the Corrective Work Order has a different priority than the FailureReport connected to this workorder. - * * ### Update release 1.0.0 * Added additional properties to update * @@ -831,25 +1102,16 @@ export class ModifiedEndpointsService { * Added possibility for update of `title` and `plannerGroupId`. * * ### Update release 1.21.0 - * Added possibility for update of `costs`. - * * Added ability to update text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a * configuration switch, which will initially be disabled, and when appropriate, enabled. * - * ### Update release 1.29.0 - * Added possibility for update of `costWBSId` and `additionalCostWBSId`. - * - * ### Update release 1.31.0 - * Added possibility for update of `priorityId`. - * - * ### Update release 1.32.0 - * - * Updating of `costWBSId` from now on triggers the determination/updating of the settlement rule. + * ### Update release 1.33.0 + * Added possibility to prepend text. Use the operation `prepend` in the request body to prepend text to the current work order text. * * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static updateCorrectiveWorkOrder({ + public static updateModificationWorkOrder({ workOrderId, requestBody, }: { @@ -857,11 +1119,11 @@ export class ModifiedEndpointsService { /** * The information to be updated */ - requestBody: CorrectiveWorkOrderJsonPatch, + requestBody: GenericWorkOrderJsonPatch, }): CancelablePromise { return __request(OpenAPI, { method: 'PATCH', - url: '/work-orders/corrective-work-orders/{work-order-id}', + url: '/work-orders/modification-work-orders/{work-order-id}', path: { 'work-order-id': workOrderId, }, @@ -877,285 +1139,187 @@ export class ModifiedEndpointsService { } /** - * Corrective Work order - Create + * SAS Change Work order - Update * ### Overview - * Create new Corrective Work order based on a supplied failure report. - * - * It's possible to supply operations in the create operation. If no operations are passed, a default operation will be created automatically. + * Update SAS Change work order. * - * To lookup the created corrective work order use endpoint `/work-orders/corrective-work-orders/{work-order-id}` + * Supports: + * - Append to text + * - Update workCenterId and workCenterPlantId + * - Update tagId and tagPlantId + * - Update basicStartDateTime and basicEndDateTime + * - Update sortField + * - Update title + * - Update plannerGroupId + * - Update revisionId (Use `/plants/{plant-id}?include-revisions=true&api-version=v1` to get a list of possible values) + * - Update locationId (Use `/plants/{plant-id}?include-locations=true&api-version=v1` to get a list of possible values) + * - Update systemId (Use `/plants/{plant-id}?include-systems=true&api-version=v1` to get a list of possible values) * * ### Important information + * Append to text follows requirement `I-103209 - Notation in long text field - Upstream offshore`. * - * Up until release 1.32.0, we have enabled creating operations with `operationId` `0010` through the API, allowing the user to customize this operation during creation. - * - * Starting from release 1.32.0, the API logic for creating operations has been aligned with the new logic enforced by the SAP backend system. The new logic adds operations from the task list of any failure report that the work order is created from. - * - * As a result, creating an operation with a reserved `operationId` is no longer allowed. - * This always affects operations with `operationId` equal to `0010`, but can also apply to other operations. + * Newest information in text is added above existing information and is automatically signed with date and full name of logged on user. * - * To see which operations are already reserved, use `/maintenance-api/maintenance-records/failure-reports/{record-id}&include-task-list=true` + * ***When Advanced ERP text is enabled, information is not automatically signed and has to be sent with the input when using append*** * - * ### Update release 1.1.0 - * Added externalPartnerWorkOrderId property to be used as reference to work order in external partner system. + * ### Update release 1.0.0 + * Added additional properties to update * - * ### Update release 1.5.0 - * Added revisionId and revision to work order response (represents shutdown or campaign work). + * ### Update release 1.4.0 + * Adjusted logic for append text to work order. Newest information in text is now added above existing information. * * ### Update release 1.6.0 - * Added sortField and revisionId to create request. Use `/plants/{plant-id}?include-revisions=true&api-version=v1` to get a list of possible values for `revisionId`. + * Added possibility for update of sortField and revisionId. * - * ### Update release 1.8.0 - * Added support for calculation key on operation level. It determines the relationship between plannedWorkDuration, plannedWorkHours, and capacityCount. + * ### Update release 1.7.0 + * Added possibility for update of locationId and systemId. * - * ### Update release 1.21.0 - * Add property `IsExcludedFromWorkOrderPlan` to operations model. + * ### Update release 1.18.0 + * Added possibility for update of `title` and `plannerGroupId`. * - * Added ability to create text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a + * ### Update release 1.21.0 + * Added ability to update text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a * configuration switch, which will initially be disabled, and when appropriate, enabled. * - * ### Update release 1.24.0 - * Added property `cmrIndicator` in the response. + * ### Update release 1.33.0 + * Added possibility to prepend text. Use the operation `prepend` in the request body to prepend text to the current work order text. * - * ### Update release 1.27.0 - * Work orders now include the property 'isOpen' + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static updateSasChangeWorkOrder({ + workOrderId, + requestBody, + }: { + workOrderId: string, + /** + * The information to be updated + */ + requestBody: GenericWorkOrderJsonPatch, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PATCH', + url: '/work-orders/sas-change-work-orders/{work-order-id}', + path: { + 'work-order-id': workOrderId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Request is missing required parameters`, + 403: `User does not have sufficient rights to update work order operation`, + 404: `The specified resource was not found`, + 409: `Work order is locked by other user`, + }, + }); + } + + /** + * Work order - Add materials + * ### Overview + * Add materials to a work order operation (of any work order type). + * The ´operation-id´ parameter to use in the url can be found using the various lookup and search endpoints for work orders. ´operation-id´ consists of two internal ids from the ERP system called routing number and counter separated by the `-` character. + * + * There are three types of materials which can be added to work orders: + * 1. Material identified by `materialId` + * 2. Material identified by `equipmentId` (only for Subsea work orders) + * 3. Material identified only by the `material` field (also known as text items). + * + * Each item in the request must include one of `materialId`, `equipmentId` or `material`. + * + * ### Update release 1.22.0 + * Added possibility of adding materials without a materialId (also known as text items). + * In this case, the purchasing fields mentioned below need to be provided as input: + * - `material` + * - `price` + * - `priceUnitId` + * - `purchasingGroup` + * - `goodsRecipient` + * - `unloadingPoint` + * - `materialGroup` * * ### Update release 1.31.0 - * Fixed enum values for `schedulingStartConstraintId` and `schedulingFinishConstraintId` + * Split parts of `location` into `finalLocation` and `temporaryLocation` in the response. * - * ### Update release 1.32.0 - * Restriction to create a work order with operationId `0010` and other reserved operationIds. - * - * To see which operationIds are already reserved, use `/maintenance-api/maintenance-records/failure-reports/{record-id}&include-task-list=true` + * ### Update release 1.33.0 + * Added support for new properties `supplierId`, `vendorsMaterialNumber`, `deliveryTimeInDays`, `requisitionerId`, `holdDeliveryOnshore`, `text`. * * @returns ProblemDetails Response for other HTTP status codes - * @returns CorrectiveWorkOrderBasic Created + * @returns any Created * @throws ApiError */ - public static createCorrectiveWorkOrder({ + public static addMaterialToWorkOrderOperation({ + operationId, requestBody, }: { + operationId: string, /** - * Corrective Work order to create + * Add material details */ - requestBody: CorrectiveWorkOrderCreate, - }): CancelablePromise { + requestBody: Array, + }): CancelablePromise> { return __request(OpenAPI, { method: 'POST', - url: '/work-orders/corrective-work-orders', + url: '/work-order-operations/{operation-id}/materials', + path: { + 'operation-id': operationId, + }, body: requestBody, mediaType: 'application/json', errors: { - 400: `The request body is invalid`, - 403: `User does not have sufficient rights to create a Project Work order`, + 400: `Bad request, for example if both \`materialId\` and \`material\` is supplied for the same item`, + 403: `User does not have sufficient rights to update operation`, 404: `The specified resource was not found`, + 409: `Work order is locked by other user`, + 501: `(__Production environment only__) Not implemented yet`, }, }); } /** - * Tag - Search - * Search tags for a plant based on the first few characters of the tag. - * - * The results include key information for a tag. - * Additional information for each tag can be retrieved by using the endpoint `/plants/{plant-id}/tags/{tag-id}`. - * - * If there are no tags found for the search, the response will be HTTP 200 with an empty array as content. - * - * ### Important information - * - * The value of the tag-prefix parameter should be url-encoded in order to support special characters - * - * ### Examples - * `/plants/1219/tags?tag-prefix=44&api-version=v1` - * - * `/plants/1100/tags?tag-prefix=02%22-EC-%202525-M&api-version=v1` - * - * ### Update 1.14.0 - * Added support for filter `by-tag-ids` with accompanying parameter `tag-ids-any-of` - * Filter is not required and defaults to `by-tag-prefix` to keep backwards compatibility. - * - * Added options to include more data using the same data model as on `Tag - Lookup`, but all includes are defaulted - * to false. - * - * `by-tag-prefix` filter now supports wildcards (`*`) in the tag prefix - * - * Edited the response structure to support pagination if filter `by-tag-prefix` is set. Use the parameters `page` and `per-page` in the parameters to edit wanted response. - * - * ### Update release 1.15.0 - * Added `include-linear-data` and `include-status-details` query parameters. - * - * Added properties `tagCategoryId`, `activeStatusIds`, `startUpDate` and `endOfUseDate`. - * - * ### Update release 1.16.0 - * Added property `classId` to characteristics - * - * ### Update release 1.18.0 - * Added new filter `by-external-system-reference`. - * Added new property `semiModelId`. - * - * ### Update release 1.21.0 - * Added property `area`. - * - * ### Update release 1.24.0 - * Added query parameters `include-attachments` and `include-url-references`. - * `urlReferences` and `attachments` now include the property `documentCreatedDate` - * - * Added property `cmrIndicator` for WorkOrders - * - * ### Update release 1.27.0 - * Work orders now include the property 'isOpen' + * Work order operation - Update material + * ### Overview + * Update a material in a work order operation (of any work order type). * - * ### Update release 1.28.0 - * `billOfMaterials` now include the property `parentMaterialId` + * The ´operation-id´ parameter to use in the url can be found using the various lookup and search endpoints for work orders. ´operation-id´ consists of two internal ids from the ERP system called routing number and counter separated by the `-` character. * - * Added `materialId` and `material` to the response + * The ´reservation-id´ parameter to use in the url can be found using the include-materials query parameter to work order lookup. * - * ### Update release 1.32.0 - * Added `changedDateTime` for attachments. + * ### Update release 1.33.0 + * Added support for the same properties which can be used for material creation. * - * @returns TagSearch Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static searchTags({ - plantId, - filter = 'by-tag-prefix', - tagPrefix, - tagIdsAnyOf, - externalSystemReference, - includeMaintenanceRecords = false, - includeMaintenanceRecordTypes, - includeWorkOrders = true, - includeWorkOrderTypes, - includeInstalledEquipment = false, - includeCatalogProfileDetails = false, - includeMaintenancePlanItems = false, - includeMeasuringPoints = false, - includeLastMeasurement = false, - includeCharacteristics = false, - includeBillOfMaterials = false, - includeAttachments = false, - includeUrlReferences = false, - includeStatusDetails = false, - includeLinearData = false, - perPage = 100, - page = 1, + public static updateMaterialInWorkOrderOperation({ + operationId, + reservationId, + requestBody, }: { - plantId: string, - filter?: 'by-tag-ids' | 'by-tag-prefix' | 'by-external-system-reference' | null, - /** - * The first few characters of the tag, required if filter is empty or `by-tag-prefix` - */ - tagPrefix?: string | null, - /** - * The tagIds as a comma separated list, required if filter is `by-tag-ids` - */ - tagIdsAnyOf?: Array, - /** - * Required if filter is `by-external-system-reference` - */ - externalSystemReference?: string | null, + operationId: string, /** - * Include maintenance records. If include-maintenance-record-types is not supplied, all supported types are returned + * Reservation id for the material found through work order lookup with include-materials */ - includeMaintenanceRecords?: boolean, - /** - * Include which types of maintenance records - */ - includeMaintenanceRecordTypes?: Array<'failure-report' | 'activity-report' | 'certification-report' | 'technical-information-update-request' | 'technical-clarification' | 'modification-proposal'>, - /** - * Include work orders. If include-work-order-types is not supplied, all supported types are returned. - */ - includeWorkOrders?: boolean, - /** - * Include which types of work orders. Use comma-separated list of entries. - */ - includeWorkOrderTypes?: Array<'correctiveWorkOrders' | 'preventiveWorkOrders' | 'modificationWorkOrders' | 'sasChangeWorkOrders' | 'projectWorkOrders' | 'subseaWorkOrders'>, - /** - * Include installed equipment - */ - includeInstalledEquipment?: boolean, - /** - * Include possible detection methods, failure modes and failure mechanisms - */ - includeCatalogProfileDetails?: boolean, - /** - * Include Maintenance Plan items this functional location is part of - */ - includeMaintenancePlanItems?: boolean, - /** - * Include measuring points for this tag - */ - includeMeasuringPoints?: boolean, - /** - * Include last measurement for the measuring points (only relevant if include-measuring-points is true or if looking up measuring point) - */ - includeLastMeasurement?: boolean, - /** - * Include tag characteristics such as 'Function Fail Consequence' and 'Safety Critical Element (SCE)' - */ - includeCharacteristics?: boolean, - /** - * Include bill of materials (also known as structure list) for tag and installed equipment - */ - includeBillOfMaterials?: boolean, - /** - * Include equipment or tag attachments - */ - includeAttachments?: boolean, - /** - * Include URL references for object - */ - includeUrlReferences?: boolean, - /** - * Include detailed information for statuses (both active and non-active) - */ - includeStatusDetails?: boolean, - /** - * Include linear data - */ - includeLinearData?: boolean, - /** - * Results to return pr page - */ - perPage?: number, + reservationId: string, /** - * Page to fetch + * Update material details */ - page?: number, - }): CancelablePromise | ProblemDetails> { + requestBody: Array, + }): CancelablePromise { return __request(OpenAPI, { - method: 'GET', - url: '/plants/{plant-id}/tags', + method: 'PATCH', + url: '/work-order-operations/{operation-id}/materials/{reservation-id}', path: { - 'plant-id': plantId, - }, - query: { - 'filter': filter, - 'tag-prefix': tagPrefix, - 'tag-ids-any-of': tagIdsAnyOf, - 'external-system-reference': externalSystemReference, - 'include-maintenance-records': includeMaintenanceRecords, - 'include-maintenance-record-types': includeMaintenanceRecordTypes, - 'include-work-orders': includeWorkOrders, - 'include-work-order-types': includeWorkOrderTypes, - 'include-installed-equipment': includeInstalledEquipment, - 'include-catalog-profile-details': includeCatalogProfileDetails, - 'include-maintenance-plan-items': includeMaintenancePlanItems, - 'include-measuring-points': includeMeasuringPoints, - 'include-last-measurement': includeLastMeasurement, - 'include-characteristics': includeCharacteristics, - 'include-bill-of-materials': includeBillOfMaterials, - 'include-attachments': includeAttachments, - 'include-url-references': includeUrlReferences, - 'include-status-details': includeStatusDetails, - 'include-linear-data': includeLinearData, - 'per-page': perPage, - 'page': page, + 'operation-id': operationId, + 'reservation-id': reservationId, }, + body: requestBody, + mediaType: 'application/json', errors: { 400: `Request is missing required parameters`, + 403: `User does not have sufficient rights to update operation`, + 404: `The specified resource was not found`, + 409: `Work order is locked by other user`, }, }); } @@ -1235,8 +1399,8 @@ export class ModifiedEndpointsService { * * Added a query parameter `include-task-list` and `taskList` in the response. When a work order is created based on this notification, operations from the `taskList` will be automatically copied into the work order. * - * ### Upcoming changes - * Added `changedDateTime`, `taskResponsible` and `taskResponsibleEmail` for `tasks` in response. + * ### Update release 1.33.0 + * Added `taskResponsible` and `taskResponsibleEmail` for `tasks` in response when the new query parameter `include-task-responsible-details` is set to true. * * @returns FailureReport Success * @returns ProblemDetails Response for other HTTP status codes @@ -1255,6 +1419,7 @@ export class ModifiedEndpointsService { includeUrlReferences = false, includeMeasurements = false, includeTaskList = false, + includeTaskResponsibleDetails = false, }: { /** * The recordId of the failure report. @@ -1304,6 +1469,10 @@ export class ModifiedEndpointsService { * Include task list with task list operations */ includeTaskList?: boolean, + /** + * Include task responsible details. Can have a slight performance impact. + */ + includeTaskResponsibleDetails?: boolean, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', @@ -1323,6 +1492,7 @@ export class ModifiedEndpointsService { 'include-url-references': includeUrlReferences, 'include-measurements': includeMeasurements, 'include-task-list': includeTaskList, + 'include-task-responsible-details': includeTaskResponsibleDetails, }, errors: { 301: `The specified resource exists in another location @@ -1375,6 +1545,9 @@ export class ModifiedEndpointsService { * ### Update release 1.32.0 * Added ability to append text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. * + * ### Update release 1.33.0 + * Added possibility to prepend text. Use the operation `prepend` in the request body to prepend text to the current text. + * * @returns FailureReportBasic Success, the failure report has been updated * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -1422,6 +1595,9 @@ export class ModifiedEndpointsService { * ### Update release 1.32.0 * Added ability to append text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. * + * ### Update release 1.33.0 + * Added possibility to prepend text. Use the operation `prepend` in the request body to prepend text to the current text. + * * @returns ActivityReportBasic Success, the activity report has been updated * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -1492,8 +1668,8 @@ export class ModifiedEndpointsService { * ### Update release 1.32.0 * Added `changedDateTime` for attachments. * - * ### Upcoming changes - * Added `changedDateTime`, `taskResponsible` and `taskResponsibleEmail` for `tasks` in response. + * ### Update release 1.33.0 + * Added `taskResponsible` and `taskResponsibleEmail` for `tasks` in response when the new query parameter `include-task-responsible-details` is set to true. * * @returns ModificationProposal Success * @returns ProblemDetails Response for other HTTP status codes @@ -1505,6 +1681,7 @@ export class ModifiedEndpointsService { includeStatusDetails = false, includeAttachments = false, includeCreatedByDetails = false, + includeTaskResponsibleDetails = false, }: { recordId: string, /** @@ -1523,6 +1700,10 @@ export class ModifiedEndpointsService { * Include name and email of user represented in `createdById`. If not supplied, `createdBy` and `createdByEmail` will have null value. */ includeCreatedByDetails?: boolean, + /** + * Include task responsible details. Can have a slight performance impact. + */ + includeTaskResponsibleDetails?: boolean, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', @@ -1535,117 +1716,7 @@ export class ModifiedEndpointsService { 'include-status-details': includeStatusDetails, 'include-attachments': includeAttachments, 'include-created-by-details': includeCreatedByDetails, - }, - errors: { - 301: `The specified resource exists in another location - This can occur when requesting a resource which type does not match the route you are using. - - Example: \`/maintenance-api/resource-a/{resource-b-id}/\` gives \`301\` response. - `, - 404: `The specified resource was not found`, - }, - }); - } - - /** - * Certification report - Lookup - * ### Overview - * Lookup a single certification report. - * - * The certification report represents the results of PSV or lifting certification. - * - * For PSV certification, details are reported as measurements for 33 predefined measuring points. - * For lifting certification, details are stored in attachment and possibly as characteristics on the tag/equipment. - * - * ### Update release 1.5.0 - * Added createdDateTime for attachments. - * - * ### Update release 1.6.0 - * Added `301` response. - * - * ### Update release 1.11.0 - * Added properties `createdById`,`createdBy` and `createdByEmail`. - * `createdById` will always be have value in response. `createdBy` and `createdByEmail` will only have value in response if the `include-created-by-details` query parameter is `true`. - * - * ### Update release 1.16.0 - * `attachments` now include properties `documentType`, `documentNumber` and `documentTitle`. - * - * ### Update release 1.21.0 - * Added property `area` to tag details. - * - * ### Update release 1.24.0 - * `attachments` now include the property `documentCreatedDate` - * - * ### Update release 1.26.0 - * `tagDetails` object now includes the new field `maintenanceConceptId` - * - * ### Update release 1.27.0 - * Added `maintenanceRecordTypeId` to the response. - * - * ### Update release 1.28.0 - * Added ability to create text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a - * configuration switch, which will initially be disabled, and when appropriate, enabled. - * - * ### Update release 1.32.0 - * Added `changedDateTime` for attachments. - * - * Added properties `failureStartDateTime` and `failureEndDateTime` to response. - * - * @returns CertificationReport Success - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static lookupCertification({ - recordId, - includeStatusDetails = false, - includeTagDetails = false, - includeAttachments = false, - includeMeasuringPoints = false, - includeLastMeasurement = false, - includeCreatedByDetails = false, - }: { - /** - * The recordId of the certification report - */ - recordId: string, - /** - * Include detailed information for statuses (both active and non-active) - */ - includeStatusDetails?: boolean, - /** - * Include details about tag for failure report - */ - includeTagDetails?: boolean, - /** - * Include attachments - */ - includeAttachments?: boolean, - /** - * Include measuring points related to tagId/equipmentId - */ - includeMeasuringPoints?: boolean, - /** - * Include last measurement for the measuring points - */ - includeLastMeasurement?: boolean, - /** - * Include name and email of user represented in `createdById`. If not supplied, `createdBy` and `createdByEmail` will have null value. - */ - includeCreatedByDetails?: boolean, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/maintenance-records/certification-reports/{record-id}', - path: { - 'record-id': recordId, - }, - query: { - 'include-status-details': includeStatusDetails, - 'include-tag-details': includeTagDetails, - 'include-attachments': includeAttachments, - 'include-measuring-points': includeMeasuringPoints, - 'include-last-measurement': includeLastMeasurement, - 'include-created-by-details': includeCreatedByDetails, + 'include-task-responsible-details': includeTaskResponsibleDetails, }, errors: { 301: `The specified resource exists in another location @@ -1706,8 +1777,10 @@ export class ModifiedEndpointsService { * ### Update release 1.32.0 * Added `changedDateTime` for attachments. * - * ### Upcoming changes - * Added `changedDateTime`, `taskResponsible` and `taskResponsibleEmail` for `tasks` in response. + * ### Update release 1.33.0 + * Added `changedDateTime` to the response. + * + * Added `taskResponsible` and `taskResponsibleEmail` for `tasks` in response when the new query parameter `include-task-responsible-details` is set to true. * * @returns TechnicalInformationUpdateRequest Success * @returns ProblemDetails Response for other HTTP status codes @@ -1721,6 +1794,7 @@ export class ModifiedEndpointsService { includeTagDetails = false, includePersonResponsible = false, includeCreatedByDetails = false, + includeTaskResponsibleDetails = false, }: { /** * The recordId of the technical information update request @@ -1750,6 +1824,10 @@ export class ModifiedEndpointsService { * Include name and email of user represented in `createdById`. If not supplied, `createdBy` and `createdByEmail` will have null value. */ includeCreatedByDetails?: boolean, + /** + * Include task responsible details. Can have a slight performance impact. + */ + includeTaskResponsibleDetails?: boolean, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', @@ -1764,6 +1842,7 @@ export class ModifiedEndpointsService { 'include-tag-details': includeTagDetails, 'include-person-responsible': includePersonResponsible, 'include-created-by-details': includeCreatedByDetails, + 'include-task-responsible-details': includeTaskResponsibleDetails, }, errors: { 301: `The specified resource exists in another location @@ -1820,6 +1899,9 @@ export class ModifiedEndpointsService { * ### Update release 1.32.0 * Added `changedDateTime` for attachments. * + * ### update release 1.33.0 + * Added `taskResponsible` and `taskResponsibleEmail` for `tasks` in response when the new query parameter `include-task-responsible-details` is set to true. + * * @returns TechnicalClarification Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -1832,6 +1914,7 @@ export class ModifiedEndpointsService { includeTagDetails = false, includePersonResponsible = false, includeCreatedByDetails = false, + includeTaskResponsibleDetails = false, }: { /** * The recordId of the technical clarification @@ -1861,6 +1944,10 @@ export class ModifiedEndpointsService { * Include name and email of user represented in `createdById`. If not supplied, `createdBy` and `createdByEmail` will have null value. */ includeCreatedByDetails?: boolean, + /** + * Include task responsible details. Can have a slight performance impact. + */ + includeTaskResponsibleDetails?: boolean, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', @@ -1875,6 +1962,7 @@ export class ModifiedEndpointsService { 'include-tag-details': includeTagDetails, 'include-person-responsible': includePersonResponsible, 'include-created-by-details': includeCreatedByDetails, + 'include-task-responsible-details': includeTaskResponsibleDetails, }, errors: { 301: `The specified resource exists in another location @@ -1888,44 +1976,4 @@ export class ModifiedEndpointsService { }); } - /** - * Text templates - Search - * ### Overview - * Get one or more text templates to be used in maintenance records, work orders or maintenance program. - * - * There is an allowlist for which templates are available through this endpoint and it includes: - * - Failure report templates: Pattern `-M2-` such as `1100-M2` and `1100-M2-X` - * - Failure report task templates: `M2_TASK_EXTR`, `M2_TASK_TICO` and `M2_TASK_TICO_ENG` - * - * The text of the template follows the advanced formatting as described in [Resource text](#section/Modelling-of-resources/Resource-text). - * - * ### Update release 1.32.0 - * - * Added support for the following templates: - * - `M1_SIMPLIFIED_SAS` - * - `M1_ENKEL_SAS` - * - `M5N` - * - `M1N` - * - * @returns TextTemplate Success - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static searchTextTemplates({ - templateNameAnyOf = 'M2_Task,-M2-X', - }: { - /** - * Comma-separated list of text templates to return - */ - templateNameAnyOf?: string, - }): CancelablePromise | ProblemDetails> { - return __request(OpenAPI, { - method: 'GET', - url: '/text-templates', - query: { - 'template-name-any-of': templateNameAnyOf, - }, - }); - } - } diff --git a/packages/api/maintenance-api/src/lib/generated/services/NewEndpointsService.ts b/packages/api/maintenance-api/src/lib/generated/services/NewEndpointsService.ts index 0ceddb138..e5918369f 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/NewEndpointsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/NewEndpointsService.ts @@ -2,13 +2,11 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CatalogProfile } from '../models/CatalogProfile'; -import type { CatalogProfileWithText } from '../models/CatalogProfileWithText'; -import type { CertificationReportBasic } from '../models/CertificationReportBasic'; -import type { CertificationReportCreate } from '../models/CertificationReportCreate'; -import type { DocumentURLReferencesAdd } from '../models/DocumentURLReferencesAdd'; +import type { DocumentJsonPatch } from '../models/DocumentJsonPatch'; +import type { InstallEquipment } from '../models/InstallEquipment'; +import type { MaintenanceRecordTypes } from '../models/MaintenanceRecordTypes'; import type { ProblemDetails } from '../models/ProblemDetails'; -import type { TagHierarchyTree } from '../models/TagHierarchyTree'; +import type { WorkOrderTypes } from '../models/WorkOrderTypes'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; @@ -17,322 +15,197 @@ import { request as __request } from '../core/request'; export class NewEndpointsService { /** - * Tag hierarchy tree - Get - * Get the entire tag hierarchy for a plant in a tree structure. - * For each tag you will be provided with catalog profile and the parent tag. - * - * ### Important information - * The query parameter `root-tag-id` is mandatory and is the root tag for the hierarchy. - * Use the query parameter `sub-hierarchy-limit` to control how many levels below the root the response will contain. - * - * The data will be cached in the API and renewed on a daily basis. - * - * The property `subTagHierarchy` is an array of `TagHierarchyTree` objects, meaning that this is a recursive property. - * When the array is empty, either the sub-limit has restricted further levels to serialize, or the hierarchy has reached the bottom. - * The property `isEndNode` indicates if there are further tags in the hierarchy which can be looked up with a subsequent request. + * Maintenance record - Types + * ### Overview + * Get type of a maintenance record based on the maintenance record id. * - * @returns TagHierarchyTree Success + * @returns MaintenanceRecordTypes Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static getTagHierarchyTree({ - plantId, - rootTagId, - subHierarchyLimit = 4, + public static getMaintenanceRecordType({ + maintenanceRecordIdsAnyOf, }: { - plantId: string, - /** - * The root tag for the hierarchy - */ - rootTagId: string, /** - * Limit the response to a certain number of levels below the root tag. - * If this parameter is omitted, a maximum of 4 sub levels will be included. - * Setting this parameter to 0 will output the full depth of the hierarchy tree. - * + * The maintenance record ids as a comma separated list. */ - subHierarchyLimit?: number, - }): CancelablePromise { + maintenanceRecordIdsAnyOf: string, + }): CancelablePromise | ProblemDetails> { return __request(OpenAPI, { method: 'GET', - url: '/plants/{plant-id}/tag-hierarchy-tree', - path: { - 'plant-id': plantId, - }, + url: '/maintenance-record-types', query: { - 'root-tag-id': rootTagId, - 'sub-hierarchy-limit': subHierarchyLimit, - }, - errors: { - 404: `The specified resource was not found`, + 'maintenance-record-ids-any-of': maintenanceRecordIdsAnyOf, }, }); } /** - * Document - Add URL reference + * Equipment - Install * ### Overview - * Add a URL reference to a document. + * Install Equipment on a tag hierarchy. * - * URL references are stored in the Document Management System (DMS). + * An equipment can be either installed on a Tag, or an Equipment. * - * The following characteristicId can be used: - * - `DISCIPLINE_B30` - * - `ADDITIONAL_REFERENCE_B30` - * - `DATE_OF_DOCUMENT_B30` (Date of photo/report) + * If `equipmentId` is provided in the body, the `equipmentId` from the path will be installed here. + * If `tagPlantId`-`tagId` is provided in the body, the `equipmentId` from the path will be installed here. * - * Existing URL references are available through the lookup endpoints for documents. Examples: `GET /documents/{document-id}?include-url-references=true&api-version=v1` + * ### Important information + * Both of these cases cannot be supported at the same time. + * An equipment can not be installed at more than one place at a time. * * @returns ProblemDetails Response for other HTTP status codes + * @returns string Created - No body available for response. Use lookup from location header * @throws ApiError */ - public static addUrlReferenceToDocument({ - documentId, + public static installEquipment({ + equipmentId, requestBody, }: { /** - * Can be found by sending a GET request to: `/document-relationships/{relationship-type}/{source-id}` - * + * The unique equipmentId in Equinor's system */ - documentId: string, + equipmentId: string, /** - * Define URL reference to add + * Install Equipment in a hierarchy. */ - requestBody: DocumentURLReferencesAdd, - }): CancelablePromise { + requestBody: InstallEquipment, + }): CancelablePromise { return __request(OpenAPI, { method: 'POST', - url: '/documents/{document-id}/url-references', + url: '/equipment/{equipment-id}/install', path: { - 'document-id': documentId, + 'equipment-id': equipmentId, }, body: requestBody, mediaType: 'application/json', + responseHeader: 'Location', errors: { - 400: `Request is missing required parameters`, - 403: `User does not have sufficient rights for updating document`, - 404: `The specified resource was not found`, - 409: `Document is locked by other user, characteristicId used are not suitable for the document`, + 400: `Request is missing required parameters or \`equipmentId\` is located in the body alongside \`tagPlantId\`-\`tagId\``, + 403: `User does not have sufficient rights to install an equipment to a hierarchy`, }, }); } /** - * Document - Remove URL reference + * Equipment - Dismantle * ### Overview - * Remove a URL reference from an existing Document. + * Dismantle Equipment on a tag hierarchy. * - * Existing URL references can be found through the lookup endpoints for documents. Example: `GET /documents/{document-id}?include-url-references=true&api-version=v1` + * An equipment can be dismantled from a tag, or an equipment. + * The correct installation needs to be provided in the body to be successful. * - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static removeUrlReferenceFromDocument({ - documentId, - urlReferenceId, - }: { - /** - * Can be found by sending a GET request to: `/document-relationships/{relationship-type}/{source-id}` - * - */ - documentId: string, - /** - * Id of the URL reference - */ - urlReferenceId: string, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'DELETE', - url: '/documents/{document-id}/url-references/{url-reference-id}', - path: { - 'document-id': documentId, - 'url-reference-id': urlReferenceId, - }, - errors: { - 400: `Request is missing required parameters`, - 403: `User does not have sufficient rights to remove URL reference`, - 404: `The specified resource was not found`, - 409: `Document is locked by other user`, - }, - }); - } - - /** - * Catalog Profiles - Search - * ### Overview - * Returns a list of Catalog Profiles for the given `catalog-profile-id`s. This endpoint allows for including the following multi-line `helpText` properties if `include-text=true` is set in the request: - * - `failureModeHelpText` for `failureModes` - * - `detectionMethodHelpText` for `detectionMethods` - * - `failureMechanismHelpText` for `failureMechanisms` + * If `equipmentId` is provided in the body, the `equipmentId` from the path will be dismantled here. + * If `tagPlantId`-`tagId` is provided in the body, the `equipmentId` from the path will be dismantled here. * - * These are not included by default due to their detrimental effect on the performance of this endpoint. + * ### Important information + * Both of these cases cannot be supported at the same time. + * An equipment can not be installed at more than one place at a time. * - * @returns any Success * @returns ProblemDetails Response for other HTTP status codes + * @returns string Created - No body available for response. Use lookup from location header * @throws ApiError */ - public static searchCatalogProfiles({ - catalogProfileId, - includeText = false, + public static dismantleEquipment({ + equipmentId, + requestBody, + deleteEquipment = false, }: { /** - * List of `catalog-profile-id`s to search for + * The unique equipmentId in Equinor's system */ - catalogProfileId: string, + equipmentId: string, /** - * Include helpText properties for failureModes, detectionMethods and failureMechanisms in the response. Affects performance. + * Dismantle equipment in a hierarchy. */ - includeText?: boolean, - }): CancelablePromise | ProblemDetails> { + requestBody: InstallEquipment, + /** + * Delete the equipment after dismantling + */ + deleteEquipment?: boolean, + }): CancelablePromise { return __request(OpenAPI, { - method: 'GET', - url: '/catalogs/profiles', + method: 'POST', + url: '/equipment/{equipment-id}/dismantle', + path: { + 'equipment-id': equipmentId, + }, query: { - 'catalog-profile-id': catalogProfileId, - 'include-text': includeText, + 'delete-equipment': deleteEquipment, }, + body: requestBody, + mediaType: 'application/json', + responseHeader: 'Location', errors: { - 400: `The request was malformed or contained invalid parameters.`, - 404: `The specified resource was not found`, + 400: `Request is missing required parameters or \`equipmentId\` is located in the body alongside \`tagPlantId\`-\`tagId\``, + 403: `User does not have sufficient rights to dismantle an equipment to a hierarchy`, }, }); } /** - * Work order operation - Remove safety measure - * Remove a safety measure from a work order operation. - * - * The `operation-id` and `document-id` parameters to use in the request URL can be found using the various Lookup and Search endpoints for Work orders, typically by using the `include-operations` query parameter. + * Document - Update + * ### Overview + * Update a Document. * - * - `operation-id` consists of two internal ids from the ERP system called routing number and counter separated by the `-` character. - * - `document-id` consists of four parts separated by the `-` character: A `document number` of up to 25 characters (e.g. `WORK AT HEIGHT`), the `document type` (e.g. `B30`, `A01`), a 3-digit `document part` (e.g. `000`), and a 2-digit `document version` part (e.g. `01`). + * Supports updating the following properties: + * - `statusId` * * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static removeSafetyMeasure({ - operationId, + public static updateDocument({ documentId, + requestBody, }: { /** - * The `operation-id` of the Work order operation that has the safety measure document to remove. + * Unique id of the document that will be updated */ - operationId: string, + documentId: string, /** - * Unique id for the safety measure document to remove. + * The information to be updated */ - documentId: string, + requestBody: Array, }): CancelablePromise { return __request(OpenAPI, { - method: 'DELETE', - url: '/work-order-operations/{operation-id}/safety-measures/{document-id}', + method: 'PATCH', + url: '/documents/{document-id}', path: { - 'operation-id': operationId, 'document-id': documentId, }, + body: requestBody, + mediaType: 'application/json', errors: { 400: `Request is missing required parameters`, - 403: `User does not have sufficient rights to update work order operation`, + 403: `User does not have sufficient rights to update Document`, 404: `The specified resource was not found`, - 409: `Work order operation is locked by other user or it is not possible to remove the safety measure`, + 409: `Document is locked by other user`, }, }); } /** - * Certification report - Attachment upload - * Upload attachment for certification report - * - * Limitations of Attachment upload endpoints: - * - No support for parallel calls (uploading multiple attachments at once). - * - Maximum file size is 60 MB. Files between 60.0MB - 99.9MB will give a 400 error. Files larger than 100MB will result in a `413 Request Entity Too Large' Error in HTML. This is due to constraints in the underlying system and is outside of our control. - * - * ### Important information - * If `documentTitle` is supplied, the title is added to all files that are sent - * in the current request. If different titles are wanted for different files, they have to be sent in separately - * (one file, one document title per request). When supplying a document-title, a new document will always be created for the attachment - * - * If documentTitle is supplied both as form-data and query parameter, the query parameter - * will take precedence. - * - * If `document-id` is supplied, the attachment will be uploaded specifically to this document. `document-title` and `document-id` cannot be supplied together. + * Work orders - Types + * ### Overview + * Get type of a work order based on the work order id. * - * @returns any Success + * @returns WorkOrderTypes Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static uploadCertificationReportAttachment({ - recordId, - documentTitle = null, - documentId = null, - formData, + public static getWorkOrderType({ + workOrderIdsAnyOf, }: { - recordId: string, - documentTitle?: string | null, /** - * Can be found by sending a GET request to: `/document-relationships/{relationship-type}/{source-id}` - * + * The work orders as a comma separated list. */ - documentId?: string | null, - formData?: { - files: Array; - 'document-title'?: string | null; - }, - }): CancelablePromise { + workOrderIdsAnyOf: string, + }): CancelablePromise | ProblemDetails> { return __request(OpenAPI, { - method: 'POST', - url: '/maintenance-records/certification-reports/{record-id}/attachments', - path: { - 'record-id': recordId, - }, + method: 'GET', + url: '/work-order-types', query: { - 'document-title': documentTitle, - 'document-id': documentId, - }, - formData: formData, - mediaType: 'multipart/form-data', - errors: { - 403: `User does not have sufficient rights to upload attachment`, - 404: `The specified resource was not found`, - 413: `Request Entity Too Large. - This error occurs when the size of an attachment exceeds 100MB. - `, - }, - }); - } - - /** - * Certification report - Create - * Create new certification report. - * - * The following endpoints can be used to find possible values for input: - * 1. `workCenterId` - [/plants/{plant-id}?include-work-centers](#operation/LookupPlant) - * 1. `plannerGroupId` - [/plants/{plant-id}?include-planner-groups=true](#operation/LookupPlant) - * 1. `locationId` - [/plants/{plant-id}?include-locations=true](#operation/LookupPlant) - * 1. `detectionMethodId`, `failureMechanismId`, `failureModeId` - [/plants/{plant-id}/tags/{tag-id}?include-catalog-profile-details=true](#operation/LookupTag) or [/equipment/{equipment-id}?include-catalog-profile-details=true](#operation/LookupEquipment) - * - * ### Important information - * It is possible to create certification report for either tagId or equipmentId. - * - * @returns ProblemDetails Response for other HTTP status codes - * @returns CertificationReportBasic Created - * @throws ApiError - */ - public static createCertificationReport({ - requestBody, - }: { - /** - * Certification report to create - */ - requestBody: CertificationReportCreate, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/maintenance-records/certification-reports', - body: requestBody, - mediaType: 'application/json', - errors: { - 403: `User does not have sufficient rights to create a failure report`, + 'work-order-ids-any-of': workOrderIdsAnyOf, }, }); } diff --git a/packages/api/maintenance-api/src/lib/generated/services/PreventiveWorkOrdersService.ts b/packages/api/maintenance-api/src/lib/generated/services/PreventiveWorkOrdersService.ts index 2441ecd08..e8f71f774 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/PreventiveWorkOrdersService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/PreventiveWorkOrdersService.ts @@ -142,7 +142,7 @@ export class PreventiveWorkOrdersService { * * Added `agreement` & `agreementItem` on `serviceOperations` and `grossPrice`, `netValue` & `currency` on `services`. * - * ### Update in an upcoming release + * ### Update release 1.33.0 * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials`. * * @returns PreventiveWorkOrder Success @@ -298,6 +298,9 @@ export class PreventiveWorkOrdersService { * Added ability to update text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a * configuration switch, which will initially be disabled, and when appropriate, enabled. * + * ### Update release 1.33.0 + * Added possibility to prepend text. Use the operation `prepend` in the request body to prepend text to the current work order text. + * * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ diff --git a/packages/api/maintenance-api/src/lib/generated/services/ProjectWorkOrdersService.ts b/packages/api/maintenance-api/src/lib/generated/services/ProjectWorkOrdersService.ts index 88309ca6f..a431f2190 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/ProjectWorkOrdersService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/ProjectWorkOrdersService.ts @@ -111,7 +111,7 @@ export class ProjectWorkOrdersService { * * Added `agreement` & `agreementItem` on `serviceOperations` and `grossPrice`, `netValue` & `currency` on `services`. * - * ### Update in an upcoming release + * ### Update release 1.33.0 * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials`. * * @returns ProjectWorkOrder Success @@ -236,6 +236,9 @@ export class ProjectWorkOrdersService { * Added ability to update text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a * configuration switch, which will initially be disabled, and when appropriate, enabled. * + * ### Update release 1.33.0 + * Added possibility to prepend text. Use the operation `prepend` in the request body to prepend text to the current work order text. + * * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ diff --git a/packages/api/maintenance-api/src/lib/generated/services/SasChangeWorkOrdersService.ts b/packages/api/maintenance-api/src/lib/generated/services/SasChangeWorkOrdersService.ts index 9b3b46588..38e897354 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/SasChangeWorkOrdersService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/SasChangeWorkOrdersService.ts @@ -232,6 +232,9 @@ export class SasChangeWorkOrdersService { * Added ability to update text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a * configuration switch, which will initially be disabled, and when appropriate, enabled. * + * ### Update release 1.33.0 + * Added possibility to prepend text. Use the operation `prepend` in the request body to prepend text to the current work order text. + * * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ diff --git a/packages/api/maintenance-api/src/lib/generated/services/TagService.ts b/packages/api/maintenance-api/src/lib/generated/services/TagService.ts index 3c2712bf0..a5977965d 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/TagService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/TagService.ts @@ -384,7 +384,7 @@ export class TagService { }: { plantId: string, /** - * Filter to limit the tag hierachy by + * Filter to limit the tag hierarchy by */ filter?: 'filter-by-root-tags', /** @@ -484,8 +484,8 @@ export class TagService { * For each tag you will be provided with catalog profile and the parent tag. * * ### Important information - * The query parameter `root-tag-id` is mandatory and is the root tag for the hierarchy. - * Use the query parameter `sub-hierarchy-limit` to control how many levels below the root the response will contain. + * The optional query parameter `root-tag-id` specifies the root tag for the hierarchy. If omitted, the root tag of the plant will be used. + * Use the optional query parameter `sub-hierarchy-limit` to control how many levels below the root the response will contain. This is limited to values between 1 and 4. * * The data will be cached in the API and renewed on a daily basis. * @@ -506,11 +506,10 @@ export class TagService { /** * The root tag for the hierarchy */ - rootTagId: string, + rootTagId?: string, /** * Limit the response to a certain number of levels below the root tag. * If this parameter is omitted, a maximum of 4 sub levels will be included. - * Setting this parameter to 0 will output the full depth of the hierarchy tree. * */ subHierarchyLimit?: number, diff --git a/packages/api/maintenance-api/src/lib/generated/services/TechnicalClarificationsService.ts b/packages/api/maintenance-api/src/lib/generated/services/TechnicalClarificationsService.ts index 5a3c22bba..8f8ff5617 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/TechnicalClarificationsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/TechnicalClarificationsService.ts @@ -57,6 +57,9 @@ export class TechnicalClarificationsService { * ### Update release 1.32.0 * Added `changedDateTime` for attachments. * + * ### update release 1.33.0 + * Added `taskResponsible` and `taskResponsibleEmail` for `tasks` in response when the new query parameter `include-task-responsible-details` is set to true. + * * @returns TechnicalClarification Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -69,6 +72,7 @@ export class TechnicalClarificationsService { includeTagDetails = false, includePersonResponsible = false, includeCreatedByDetails = false, + includeTaskResponsibleDetails = false, }: { /** * The recordId of the technical clarification @@ -98,6 +102,10 @@ export class TechnicalClarificationsService { * Include name and email of user represented in `createdById`. If not supplied, `createdBy` and `createdByEmail` will have null value. */ includeCreatedByDetails?: boolean, + /** + * Include task responsible details. Can have a slight performance impact. + */ + includeTaskResponsibleDetails?: boolean, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', @@ -112,6 +120,7 @@ export class TechnicalClarificationsService { 'include-tag-details': includeTagDetails, 'include-person-responsible': includePersonResponsible, 'include-created-by-details': includeCreatedByDetails, + 'include-task-responsible-details': includeTaskResponsibleDetails, }, errors: { 301: `The specified resource exists in another location diff --git a/packages/api/maintenance-api/src/lib/generated/services/TechnicalInformationUpdateRequestsService.ts b/packages/api/maintenance-api/src/lib/generated/services/TechnicalInformationUpdateRequestsService.ts index 35354b3e3..6da006201 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/TechnicalInformationUpdateRequestsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/TechnicalInformationUpdateRequestsService.ts @@ -66,8 +66,10 @@ export class TechnicalInformationUpdateRequestsService { * ### Update release 1.32.0 * Added `changedDateTime` for attachments. * - * ### Upcoming changes - * Added `changedDateTime`, `taskResponsible` and `taskResponsibleEmail` for `tasks` in response. + * ### Update release 1.33.0 + * Added `changedDateTime` to the response. + * + * Added `taskResponsible` and `taskResponsibleEmail` for `tasks` in response when the new query parameter `include-task-responsible-details` is set to true. * * @returns TechnicalInformationUpdateRequest Success * @returns ProblemDetails Response for other HTTP status codes @@ -81,6 +83,7 @@ export class TechnicalInformationUpdateRequestsService { includeTagDetails = false, includePersonResponsible = false, includeCreatedByDetails = false, + includeTaskResponsibleDetails = false, }: { /** * The recordId of the technical information update request @@ -110,6 +113,10 @@ export class TechnicalInformationUpdateRequestsService { * Include name and email of user represented in `createdById`. If not supplied, `createdBy` and `createdByEmail` will have null value. */ includeCreatedByDetails?: boolean, + /** + * Include task responsible details. Can have a slight performance impact. + */ + includeTaskResponsibleDetails?: boolean, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', @@ -124,6 +131,7 @@ export class TechnicalInformationUpdateRequestsService { 'include-tag-details': includeTagDetails, 'include-person-responsible': includePersonResponsible, 'include-created-by-details': includeCreatedByDetails, + 'include-task-responsible-details': includeTaskResponsibleDetails, }, errors: { 301: `The specified resource exists in another location @@ -450,7 +458,7 @@ export class TechnicalInformationUpdateRequestsService { */ plannerGroupId?: string, /** - * Define how many days from the current day to include results for. 0 if only include for today + * Define how many days from the current day to include results for. 0 to only include results from today */ maxDaysSinceActivation?: number, /** @@ -545,9 +553,6 @@ export class TechnicalInformationUpdateRequestsService { * Added ability to create text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a * configuration switch, which will initially be disabled, and when appropriate, enabled. * - * ### Upcoming changes - * Added `changedDateTime`, `taskResponsible` and `taskResponsibleEmail` for `tasks` in response. - * * @returns ProblemDetails Response for other HTTP status codes * @returns MaintenanceRecordTask Success * @throws ApiError @@ -647,6 +652,18 @@ export class TechnicalInformationUpdateRequestsService { * When a task is created, it will have status `TSOS - Outstanding task` and `CRTE - Created`. * The status `TSRL - Task Released` can be set afterwards. * + * Now it is possible to set following statuses: + * - TSRL Task Released + * - TSCO Task Completed + * - TSSC Task successful + * - TCMP WF when task completed + * - RIND Returned - Wait for info + * - CANC Cancelled + * + * + * ### Upcoming changes + * Enabled activation of user statuses like `TCMP - WF when task completed`, `RIND - Returned - Wait for info` and `CANC - Cancelled` + * * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ diff --git a/packages/api/maintenance-api/src/lib/generated/services/UpcomingModifiedEndpointsService.ts b/packages/api/maintenance-api/src/lib/generated/services/UpcomingModifiedEndpointsService.ts index 537adee9a..8fda95f0d 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/UpcomingModifiedEndpointsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/UpcomingModifiedEndpointsService.ts @@ -2,22 +2,10 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CorrectiveWorkOrder } from '../models/CorrectiveWorkOrder'; -import type { FailureReport } from '../models/FailureReport'; -import type { MaintenanceRecordTask } from '../models/MaintenanceRecordTask'; -import type { MaintenanceRecordTaskCreate } from '../models/MaintenanceRecordTaskCreate'; -import type { ModificationProposal } from '../models/ModificationProposal'; -import type { PlanningPlantRevision } from '../models/PlanningPlantRevision'; -import type { PreventiveWorkOrder } from '../models/PreventiveWorkOrder'; +import type { Plant } from '../models/Plant'; import type { ProblemDetails } from '../models/ProblemDetails'; -import type { ProjectWorkOrder } from '../models/ProjectWorkOrder'; -import type { RevisionWorkOrderOperation } from '../models/RevisionWorkOrderOperation'; import type { StatusUpdateJsonPatch } from '../models/StatusUpdateJsonPatch'; -import type { SubseaWorkOrderMaterial } from '../models/SubseaWorkOrderMaterial'; -import type { TechnicalInformationUpdateRequest } from '../models/TechnicalInformationUpdateRequest'; -import type { WorkOrderMaterial } from '../models/WorkOrderMaterial'; -import type { WorkOrderMaterialAdd } from '../models/WorkOrderMaterialAdd'; -import type { WorkOrderMaterialJsonPatch } from '../models/WorkOrderMaterialJsonPatch'; +import type { WorkOrderInPlan } from '../models/WorkOrderInPlan'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; @@ -26,1121 +14,411 @@ import { request as __request } from '../core/request'; export class UpcomingModifiedEndpointsService { /** - * Revisions - Search + * Plants - Lookup * ### Overview - * Search revisions for a single plant with related information. + * Lookup a single plant with related information. * - * ### Filter: by-revision-id - * Search by revision ids for a single plant + * ### Update version 1.6.0 + * Added `include-revisions` for reading master data on revisions for the `planningPlantId` of the provided `plantId`. * - * Parameters: - * - revision-id-any-of - * - include-work-order-operations (default: false) - * - include-work-order-operation-text (default: false) - * - include-only-work-order-operations-with-materials (default: false) - * - * ### Examples - * `/plants/1310/revisions?filter=by-revision-id&revision-id-any-of=OFP,OFP%202022,&include-work-order-operations=true&include-only-work-order-operations-with-materials=true&include-work-order-operation-text=true&api-version=v1` - * - * ### Update release 1.19.0 - * Added parameter `include-text-item-materials`. - * - * ### Update release 1.31.0 - * Fixed enum values for `schedulingStartConstraintId` and `schedulingFinishConstraintId` - * - * ### Update in an upcoming release - * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials`. - * - * @returns PlanningPlantRevision Success - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static searchRevisions({ - plantId, - filter, - revisionIdAnyOf, - includeWorkOrderOperations = false, - includeOnlyWorkOrderOperationsWithMaterials = false, - includeTextItemMaterials = false, - }: { - plantId: string, - /** - * Filter to limit revisions - */ - filter: 'by-revision-id', - /** - * Comma-separated list of revision-id - */ - revisionIdAnyOf?: string, - /** - * Include the work order operations - */ - includeWorkOrderOperations?: boolean, - /** - * Limit the work order operations to only those which have material - */ - includeOnlyWorkOrderOperationsWithMaterials?: boolean, - /** - * Include text item materials - */ - includeTextItemMaterials?: boolean, - }): CancelablePromise | ProblemDetails> { - return __request(OpenAPI, { - method: 'GET', - url: '/plants/{plant-id}/revisions', - path: { - 'plant-id': plantId, - }, - query: { - 'filter': filter, - 'revision-id-any-of': revisionIdAnyOf, - 'include-work-order-operations': includeWorkOrderOperations, - 'include-only-work-order-operations-with-materials': includeOnlyWorkOrderOperationsWithMaterials, - 'include-text-item-materials': includeTextItemMaterials, - }, - errors: { - 404: `The specified resource was not found`, - }, - }); - } - - /** - * Revisions Work Order Operations - Search - * ### Overview - * Search revision work order operations on a plant. - * - * Parameters: - * - include-work-order-operation-text (default: false) - * - include-only-work-order-operations-with-materials (default: false) + * ### Update version 1.7.0 + * Added `include-systems` query parameter. * - * ### Examples - * `/plants/1310/revisions/PS01-23?include-only-work-order-operations-with-materials=true&include-work-order-operation-text=true&page=1&per-page=10&api-version=v1` + * ### Update version 1.13.0 + * Added `include-equipment-catalog-profiles` query parameter. * - * ### Update version 1.28.0 - * Added `changedDateTime`,`changedById`, `changedBy`, `changedByEmail`. + * ### Update version 1.14.0 + * Added `include-only-default-tag-catalog-profiles` query parameter to limit the response from `include-tag-catalog-profiles` and/or `include-equipment-catalog-profiles` * - * ### Update release 1.29.0 - * Added `progressChangedDateTime`, `progressChangedBy`, `progressChangedById` and `progressChangedByEmail` to response. These values represent the last update datetime for technical feedback. - * Altered `changedDateTime`, `changedBy`, `changedById` and `changedByEmail` to only represent last update to the operation. - * - * ### Update release 1.30.1 - * Added fields `confirmationDateTime`, `confirmationBy`, `confirmationByEmail` and `confirmationById`. + * ### Update version 1.17.0 + * Added the `allowSimplifiedTimeAndProgress` flag to represent is the plant is valid for Non-CATS time recording. * - * ### Update release 1.31.0 - * Fixed enum values for `schedulingStartConstraintId` and `schedulingFinishConstraintId` + * Updated PlanningPlantRevision-model. * - * Split parts of `location` on `materials` into `finalLocation` and `temporaryLocation` in the response. + * ### Update version 1.20.0 + * Added query parameter `include-baseline-plans` related to `OM104.01.06 - Prepare Work order plan` and `work-order-plan/`. * - * ### Update in an upcoming release - * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials`. + * ### Upcoming change + * Added `include-responsible-persons` to the response. Added `responsiblePersons` to the response. * - * @returns RevisionWorkOrderOperation Success + * @returns Plant Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static searchRevisionWorkOrderOperations({ + public static lookupPlant({ plantId, - revisionId, - includeOnlyWorkOrderOperationsWithMaterials = false, - includeTextItemMaterials = false, - perPage, - page, + includeLocations = false, + includeWorkCenters = false, + includePlannerGroups = false, + includeTagCatalogProfiles = false, + includeEquipmentCatalogProfiles = false, + includeOnlyDefaultCatalogProfiles = false, + includeSurfaceDegradationFactors = false, + includeRevisions = false, + includeSystems = false, + includeBaselinePlans = false, + includeResponsiblePersons = false, }: { plantId: string, - revisionId: string, - /** - * Limit the work order operations to only those which have material - */ - includeOnlyWorkOrderOperationsWithMaterials?: boolean, - /** - * Include text item materials - */ - includeTextItemMaterials?: boolean, - /** - * Results to return pr page - */ - perPage?: number, - /** - * Page to fetch - */ - page?: number, - }): CancelablePromise | ProblemDetails> { - return __request(OpenAPI, { - method: 'GET', - url: '/plants/{plant-id}/revisions/{revision-id}/work-order-operations', - path: { - 'plant-id': plantId, - 'revision-id': revisionId, - }, - query: { - 'include-only-work-order-operations-with-materials': includeOnlyWorkOrderOperationsWithMaterials, - 'include-text-item-materials': includeTextItemMaterials, - 'per-page': perPage, - 'page': page, - }, - errors: { - 404: `The specified resource was not found`, - }, - }); - } - - /** - * Preventive Work order - Lookup - * ### Overview - * Lookup single Preventive Work order with related information. - * - * ### Technical feedback - * Technical feedback ensures a common and best practice maintenance based on the type of tag/equipment. It's mostly used by preventive work orders, but can in some cases be used in corrective work orders. - * As part of work order execution, the technical feedback items will need to be completed. - * - * The endpoint `/work-orders/technical-feedback-master-data` describes the business rules for when it's necessary to create a maintenance record based on the status(`feedbackStatusId`) and reason(`feedbackReasonId`) found for the technical feedback. - * - * The `include-technical-feedback` query parameter for preventive and corrective work order lookup endpoints will return the technical feedback for each operation of the provided work order. - * - * If a technical feedback has `isDetailedFeedback: true`, it requires a very specific feedback type currently not supported by the Maintenance API. - * - * When executing a technical feedback item, the end-user will complete the steps described in `maintenanceActivityText` and end up with a result in the form of a status(`feedbackStatusId`) and a reason(`feedbackReasonId`). Compare the result with the business rules defined by `/work-orders/technical-feedback-master-data`: - * - * * `hasRequiredMaintenanceRecord: true`: Create a new maintenance record for technical feedback using the `POST /maintenance-records/failure-reports` or `POST /maintenance-records/activity-reports` endpoints with the relatedWorkOrder properties in the request to specify the work order and technical feedback - * - * * `hasRequiredMaintenanceRecord: true` As no maintenance record is required, the technical feedback is completed using the endpoint `PATCH /work-order-operations/{operation-id}/technical-feedback/{feedback-id}` - * - * If you want to include the maintenance records of a technical feedback, one needs to apply both `include-technical-feedback=True`, and `include-maintenance-records=True`. - * - * ### Production Resources/Tool (PRT) - * Production resources/tools (PRT) are used for materials, tools and equipment that are needed to carry out the task and are to be returned after use. - * - * In Equinor, this is normally added as part of maintenance program. - * Maintenance API supports the following PRT resources: - * - Attachments (through query parameter `include-attachments=true`) - * - Measuring points (through query parameter `include-measuring-points=true`) - * - URL references (through query parameter `include-url-references=true`) - * - * For more information see governing document [GL1624 Guidelines for the establishment of a preventive maintenance programme in SAP](https://docmap.equinor.com/Docmap/page/doc/dmDocIndex.html?DOCKEYID=533758). - * - * ### Update release 1.0.0 - * Work order operation actualPercentageComplete now represents progress reported through technical feedback. - * If the Work order operation is completed, the value of actualPercentageComplete will always be 100. - * - * ### Update release 1.1.0 - * If work-order-id exist, but is not a `preventiveWorkOrder`, the response is a HTTP 301 Moved Permanently with the url to the resource in the HTTP header Location. - * - * ### Update release 1.3.0 - * Introduced holdDeliveryOnshore and requiredDatetime properties for materials. - * - * ### Update release 1.4.0 - * Introduced property calculationKey for operations. - * - * ### Update release 1.5.0 - * Added createdDateTime for attachments. - * - * Added revisionId and revision to work order response (represents shutdown or campaign work). - * - * ### Update release 1.7.0 - * Added equipmentId and equipment to the response of tagsRelated. - * - * Added sourceId to related maintenance records. - * - * Added isActive property for maintenance plan details. - * - * ### Update release 1.8.0 - * Introduced property activeStatusIds for operations. - * - * ### Update release 1.11.0 - * Added the following properties: - * - * * personResponsibleId and personResponsibleEmail - * * isProductionCritical and isHSECritical - * * workCenter - * * plannerGroup - * - * ### Update release 1.12.0 - * Added new query parameter `include-technical-feedback`. It returns related technical feedback required to be completed as part of work order execution. - * - * Introduced property `detectionMethodGroupId` and `detectionMethodId` for technical feedback. - * - * ### Update release 1.15.0 - * Added new query parameter `include-measurements` - * - * ### Update release 1.16.0 - * Added new query parameters `include-measuring-points`, `include-last-measurement` and `include-url-references`. `include-attachments` extended to also return PRT attachments of an operation. `attachments` now include properties `documentType`, `documentNumber` and `documentTitle`. - * - * ### Update release 1.19.0 - * Added properties `systemCondition` and `isExcludedFromWorkOrderPlan` for operations. - * - * ### Update release 1.21.0 - * Added property `area` to tag details. - * - * Added ability to create text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a - * configuration switch, which will initially be disabled, and when appropriate, enabled. - * - * ### Update release 1.22.0 - * Added new query parameter `include-service-operations`. Operations of type Service - PM03 previously available in the `operations` have been moved to `serviceOperations`. - * - * Added activeStatusIds to related maintenance records. - * - * ### Update release 1.24.0 - * `attachments` now include the property `documentCreatedDate` - * - * Removed `urlReferences` field from response object, and removed `include-url-references` query parameter. URLReferences are only supported for Notifications. - * - * Added property `cmrIndicator` in the response. - * - * ### Update release 1.26.0 - * Added property `isEquipmentRental` to services in serviceOperations. - * Added `materials` to serviceOperations. - * - * `tagDetails` object now includes the new field `maintenanceConceptId` - * - * ### Update release 1.27.0 - * Work orders now include the property 'isOpen' - * - * Added `tag` and `title` to `maintenanceRecords` expand. - * - * ### Update release 1.28.0 - * Added new query parameter `include-safety-measures`. - * - * ### Update release 1.31.0 - * Fixed enum values for `schedulingStartConstraintId` and `schedulingFinishConstraintId` - * - * Split parts of `location` on `operations.materials` into `finalLocation` and `temporaryLocation` in the response. - * - * Added `agreement` & `agreementItem` on `serviceOperations` and `grossPrice`, `netValue` & `currency` on `services`. - * - * ### Update in an upcoming release - * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials`. - * - * @returns PreventiveWorkOrder Success - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static lookupPreventiveWorkOrder({ - workOrderId, - includeOperations = true, - includeServiceOperations = true, - includeTechnicalFeedback = false, - includeMaterials = false, - includeMaintenanceRecords = false, - includeMaintenancePlanDetails = false, - includeAttachments = false, - includeStatusDetails = false, - includeTagDetails = false, - includeRelatedTags = false, - includeMeasuringPoints = false, - includeLastMeasurement = false, - includeMeasurements = false, - includeSafetyMeasures = false, - }: { - workOrderId: string, - /** - * Include Work order operations - */ - includeOperations?: boolean, - /** - * Include Work order service operations - */ - includeServiceOperations?: boolean, - /** - * Include technical feedback required to be completed as part of work order execution. - */ - includeTechnicalFeedback?: boolean, /** - * Include materials for Work order operations + * Include location for plant */ - includeMaterials?: boolean, + includeLocations?: boolean, /** - * Include related maintenance records (from object list and technical feedback) + * Include work centers for plant */ - includeMaintenanceRecords?: boolean, + includeWorkCenters?: boolean, /** - * Include details for maintenance plan + * Include planner groups for plant */ - includeMaintenancePlanDetails?: boolean, + includePlannerGroups?: boolean, /** - * Include Work order attachments (including PRT attachments) + * Include tag catalog profiles in use for plant */ - includeAttachments?: boolean, + includeTagCatalogProfiles?: boolean, /** - * Include detailed information for statuses (both active and non-active) + * Include equipment catalog profiles in use for plant */ - includeStatusDetails?: boolean, + includeEquipmentCatalogProfiles?: boolean, /** - * Include detailed for the main tag of the Work order + * Use this in combination with `include-tag-catalog-profiles=true` and/or `include-equipment-catalog-profiles=true` to improve performance. + * */ - includeTagDetails?: boolean, + includeOnlyDefaultCatalogProfiles?: boolean, /** - * Include related tags (from object list) + * Include surface degradations for plant */ - includeRelatedTags?: boolean, + includeSurfaceDegradationFactors?: boolean, /** - * Include related measuring points from PRT + * Include revisions for plant */ - includeMeasuringPoints?: boolean, + includeRevisions?: boolean, /** - * Include last measurement for the measuring points (only relevant if include-measuring-points is true or if looking up measuring point) + * Include systems for plant */ - includeLastMeasurement?: boolean, + includeSystems?: boolean, /** - * Include related measurements + * Include open baseline plans for the planning plant of this plant */ - includeMeasurements?: boolean, + includeBaselinePlans?: boolean, /** - * Include safety-measures in work order operations + * Include persons that are already responsible for objects on this plant */ - includeSafetyMeasures?: boolean, - }): CancelablePromise { + includeResponsiblePersons?: boolean, + }): CancelablePromise { return __request(OpenAPI, { method: 'GET', - url: '/work-orders/preventive-work-orders/{work-order-id}', + url: '/plants/{plant-id}', path: { - 'work-order-id': workOrderId, + 'plant-id': plantId, }, query: { - 'include-operations': includeOperations, - 'include-service-operations': includeServiceOperations, - 'include-technical-feedback': includeTechnicalFeedback, - 'include-materials': includeMaterials, - 'include-maintenance-records': includeMaintenanceRecords, - 'include-maintenance-plan-details': includeMaintenancePlanDetails, - 'include-attachments': includeAttachments, - 'include-status-details': includeStatusDetails, - 'include-tag-details': includeTagDetails, - 'include-related-tags': includeRelatedTags, - 'include-measuring-points': includeMeasuringPoints, - 'include-last-measurement': includeLastMeasurement, - 'include-measurements': includeMeasurements, - 'include-safety-measures': includeSafetyMeasures, + 'include-locations': includeLocations, + 'include-work-centers': includeWorkCenters, + 'include-planner-groups': includePlannerGroups, + 'include-tag-catalog-profiles': includeTagCatalogProfiles, + 'include-equipment-catalog-profiles': includeEquipmentCatalogProfiles, + 'include-only-default-catalog-profiles': includeOnlyDefaultCatalogProfiles, + 'include-surface-degradation-factors': includeSurfaceDegradationFactors, + 'include-revisions': includeRevisions, + 'include-systems': includeSystems, + 'include-baseline-plans': includeBaselinePlans, + 'include-responsible-persons': includeResponsiblePersons, }, errors: { - 301: `If work-order-id exist, but is not a \`preventiveWorkOrder\`, the response is a HTTP 301 Moved Permanently with the url to the resource in the HTTP header Location. - `, 404: `The specified resource was not found`, }, }); } /** - * Corrective Work order - Lookup + * Plants - Search * ### Overview - * Lookup single Corrective Work order with related information - * - * ### Technical feedback - * Technical feedback ensures a common and best practice maintenance based on the type of tag/equipment. It's mostly used by preventive work orders, but can in some cases be used in corrective work orders. - * As part of work order execution, the technical feedback will need to be completed. - * - * The endpoint `/work-orders/technical-feedback-master-data` describes the business rules for when it's necessary to create a maintenance record based on the status (`feedbackStatusId`) and reason (`feedbackReasonId`) found for the technical feedback. - * - * The `include-technical-feedback` query parameter for preventive and corrective work order lookup endpoints will return the technical feedback for each operation of the provided work order. - * - * If a technical feedback has `isDetailedFeedback: true`, it requires a very specific feedback type currently not supported by the Maintenance API. - * - * When executing a technical feedback item, the end-user will complete the steps described in `maintenanceActivityText` and end up with a result in the form of a status (`feedbackStatusId`) and a reason (`feedbackReasonId`). Compare the result with the business rules defined by `/work-orders/technical-feedback-master-data` and base the next step based on the value of `hasRequiredMaintenanceRecord`: - * - * * `hasRequiredMaintenanceRecord: true`: Create a new maintenance record for technical feedback using the `POST /maintenance-records/failure-reports` or `POST /maintenance-records/activity-reports` endpoints with the relatedWorkOrder properties in the request to specify the work order and technical feedback - * - * * `hasRequiredMaintenanceRecord: false` As no maintenance record is required, the technical feedback is completed using the endpoint `PATCH /work-order-operations/{operation-id}/technical-feedback/{feedback-id}` - * - * If you want to include the maintenance records of a technical feedback, one needs to apply both `include-technical-feedback=True`, and `include-maintenance-records=True`. - * - * ### Production Resources/Tool (PRT) - * Production resources/tools (PRT) are used for materials, tools and equipment that are needed to carry out the task and are to be returned after use. - * - * In Equinor, this is normally added as part of maintenance program. - * Maintenance API supports the following PRT resources: - * - Attachments (through query parameter `include-attachments=true`) - * - Measuring points (through query parameter `include-measuring-points=true`) - * - URL references (through query parameter `include-url-references=true`) - * - * For more information see governing document [GL1624 Guidelines for the establishment of a preventive maintenance programme in SAP](https://docmap.equinor.com/Docmap/page/doc/dmDocIndex.html?DOCKEYID=533758). - * - * ### Update release 1.0.0 - * Work order operation actualPercentageComplete now represents progress reported through technical feedback. - * If the Work order operation is completed, the value of actualPercentageComplete will always be 100. - * - * ### Update release 1.1.0 - * If work-order-id exist, but is not a `correctiveWorkOrder`, the response is a HTTP 301 Moved Permanently with the url to the resource in the HTTP header Location. - * - * ### Update release 1.3.0 - * Introduced holdDeliveryOnshore and requiredDatetime properties for materials. - * - * ### Update release 1.4.0 - * Introduced property calculationKey for operations. - * - * ### Update release 1.5.0 - * Added createdDateTime for attachments. - * - * Added revisionId and revision to work order response (represents shutdown or campaign work). - * - * ### Update release 1.7.0 - * Added equipmentId and equipment to the response of tagsRelated. - * - * Adding sourceId to related maintenance records. - * - * ### Update release 1.8.0 - * Introduced property activeStatusIds for operations. - * - * ### Update release 1.12.0 - * Added new query parameter `include-technical-feedback`. It returns related technical feedback required to be completed as part of work order execution. Technical feedback is mostly used for preventive work orders, but can also be used for corrective work orders. - * - * Introduced property `detectionMethodGroupId` and `detectionMethodId` for technical feedback. + * Search for plants through predefined filters. * - * ### Update release 1.15.0 - * Added new query parameter `include-measurements`. + * ### Filter: by-plant + * Search plant based on one or more `plant-id` * - * ### Update release 1.16.0 - * Added new query parameters `include-measuring-points`, `include-last-measurement` and `include-url-references`. `include-attachments` extended to also return PRT attachments of an operation. `attachments` now include properties `documentType`, `documentNumber` and `documentTitle`. - * - * ### Update release 1.19.0 - * Added properties `systemCondition` and `isExcludedFromWorkOrderPlan` for operations. - * - * ### Update release 1.21.0 - * Added properties `costs` and `costsCurrency`. - * Added property `area` to tag details. - * - * Added ability to read text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a - * configuration switch, which will initially be disabled, and when appropriate, enabled. - * - * ### Update release 1.22.0 - * Added new query parameter `include-service-operations`. Operations of type Service - PM03 previously available in the `operations` have been moved to `serviceOperations`. - * - * Added activeStatusIds to related maintenance records. - * - * ### Update release 1.24.0 - * `attachments` now include the property `documentCreatedDate` - * - * Removed 'urlReferences' field from response object, and removed 'include-url-references' query parameter. URLReferences are only supported for Notifications. - * - * Added property `cmrIndicator` in the response. - * - * ### Update release 1.26.0 - * Added property `isEquipmentRental` to services in serviceOperations. - * Added `materials` to serviceOperations. - * - * 'tagDetails' object now includes the new field 'maintenanceConceptId' - * - * ### Update release 1.27.0 - * Work orders now include the property 'isOpen' - * - * ### Update release 1.28.0 - * Added new query parameter `include-safety-measure`. - * - * Added new query parameter `include-estimated-costs`. - * - * Added `tag` and `title` to `maintenanceRecords` expand. + * Parameters: + * - plant-id (supports comma-separated list) * - * ### Update release 1.29.0 - * Added new properties for `additionalCostWBSId` and `costWBSId`. + * ### Filter: by-planning-plant + * Search plant based on one or more `planning-plant-id` * - * ### Update release 1.31.0 - * Fixed enum values for `schedulingStartConstraintId` and `schedulingFinishConstraintId` + * Parameters: + * - planning-plant-id (supports comma-separated list) * - * Split parts of `location` on `operations.materials` into `finalLocation` and `temporaryLocation` in the response. + * ### Update version 1.13.0 + * Added `include-equipment-catalog-profiles` query parameter. * - * Added `agreement` & `agreementItem` on `serviceOperations` and `grossPrice`, `netValue` & `currency` on `services`. + * ### Update version 1.17.0 + * Added the `allowSimplifiedTimeAndProgress` flag to represent is the plant is valid for Non-CATS time recording. * + * ### Update version 1.20.0 + * Added query parameter `include-baseline-plans` related to `OM104.01.06 - Prepare Work order plan` and `work-order-plan/`. * - * ### Upcoming changes - * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials` . - * Added `include-communications` to query parameters. - * Added `communications` to the response. + * ### Upcoming change + * Added `include-responsible-persons` to the response. Added `responsiblePersons` to the response. * - * @returns CorrectiveWorkOrder Success + * @returns Plant Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static lookupCorrectiveWorkOrder({ - workOrderId, - includeOperations = true, - includeServiceOperations = true, - includeTechnicalFeedback = false, - includeMaterials = true, - includeMaintenanceRecords = false, - includeAttachments = false, - includeStatusDetails = false, - includeTagDetails = false, - includeRelatedTags = false, - includeMeasuringPoints = false, - includeLastMeasurement = false, - includeMeasurements = false, - includeSafetyMeasures = false, - includeEstimatedCosts = false, - includeCommunications = false, + public static searchPlant({ + filter, + plantId, + planningPlantId, + includeLocations = false, + includeWorkCenters = false, + includePlannerGroups = false, + includeTagCatalogProfiles = false, + includeEquipmentCatalogProfiles = false, + includeSurfaceDegradationFactors = false, + includeBaselinePlans = false, + includeResponsiblePersons = false, }: { - workOrderId: string, - /** - * Include Work order operations - */ - includeOperations?: boolean, /** - * Include Work order service operations + * Filter to limit plants by */ - includeServiceOperations?: boolean, + filter: 'by-plant' | 'by-planning-plant', /** - * Include technical feedback required to be completed as part of work order execution. + * Plant identifier */ - includeTechnicalFeedback?: boolean, + plantId?: string, /** - * Include materials for Work order operations + * Plant used to plan the maintenance work. Usually same as `plantId`, but there are some cases were one `planningPlantId` is used across multiple `plantId`. */ - includeMaterials?: boolean, + planningPlantId?: string, /** - * Include related maintenance records (from object list) + * Include location for plant */ - includeMaintenanceRecords?: boolean, + includeLocations?: boolean, /** - * Include Work order attachments (including PRT attachments) + * Include work centers for plant */ - includeAttachments?: boolean, + includeWorkCenters?: boolean, /** - * Include detailed information for statuses (both active and non-active) + * Include planner groups for plant */ - includeStatusDetails?: boolean, + includePlannerGroups?: boolean, /** - * Include detailed for the main tag of the Work order + * Include tag catalog profiles in use for plant */ - includeTagDetails?: boolean, + includeTagCatalogProfiles?: boolean, /** - * Include related tags (from object list) + * Include equipment catalog profiles in use for plant */ - includeRelatedTags?: boolean, + includeEquipmentCatalogProfiles?: boolean, /** - * Include related measuring points from PRT + * Include surface degradations for plant */ - includeMeasuringPoints?: boolean, + includeSurfaceDegradationFactors?: boolean, /** - * Include last measurement for the measuring points (only relevant if include-measuring-points is true or if looking up measuring point) + * Include open baseline plans for the planning plant of this plant */ - includeLastMeasurement?: boolean, + includeBaselinePlans?: boolean, /** - * Include related measurements + * Include persons that are already responsible for objects on this plant */ - includeMeasurements?: boolean, - /** - * Include safety-measures in work order operations - */ - includeSafetyMeasures?: boolean, - /** - * Include estimated costs - */ - includeEstimatedCosts?: boolean, - /** - * Include communications to a reservation or service operation - */ - includeCommunications?: boolean, - }): CancelablePromise { + includeResponsiblePersons?: boolean, + }): CancelablePromise | ProblemDetails> { return __request(OpenAPI, { method: 'GET', - url: '/work-orders/corrective-work-orders/{work-order-id}', - path: { - 'work-order-id': workOrderId, - }, + url: '/plants', query: { - 'include-operations': includeOperations, - 'include-service-operations': includeServiceOperations, - 'include-technical-feedback': includeTechnicalFeedback, - 'include-materials': includeMaterials, - 'include-maintenance-records': includeMaintenanceRecords, - 'include-attachments': includeAttachments, - 'include-status-details': includeStatusDetails, - 'include-tag-details': includeTagDetails, - 'include-related-tags': includeRelatedTags, - 'include-measuring-points': includeMeasuringPoints, - 'include-last-measurement': includeLastMeasurement, - 'include-measurements': includeMeasurements, - 'include-safety-measures': includeSafetyMeasures, - 'include-estimated-costs': includeEstimatedCosts, - 'include-communications': includeCommunications, + 'filter': filter, + 'plant-id': plantId, + 'planning-plant-id': planningPlantId, + 'include-locations': includeLocations, + 'include-work-centers': includeWorkCenters, + 'include-planner-groups': includePlannerGroups, + 'include-tag-catalog-profiles': includeTagCatalogProfiles, + 'include-equipment-catalog-profiles': includeEquipmentCatalogProfiles, + 'include-surface-degradation-factors': includeSurfaceDegradationFactors, + 'include-baseline-plans': includeBaselinePlans, + 'include-responsible-persons': includeResponsiblePersons, }, errors: { - 301: `If work-order-id exist, but is not a \`correctiveWorkOrder\`, the response is a HTTP 301 Moved Permanently with the url to the resource in the HTTP header Location. - `, + 400: `Request is missing required parameters`, 404: `The specified resource was not found`, }, }); } /** - * Project Work order - Lookup + * Work order plan - Get * ### Overview - * Lookup single Project Work order with related information - * - * ### Update release 1.0.0 - * Work order operation actualPercentageComplete now represents progress reported through technical feedback. - * If the Work order operation is completed, the value of actualPercentageComplete will always be 100. - * - * ### Update release 1.1.0 - * If work-order-id exist, but is not a `projectWorkOrder`, the response is a HTTP 301 Moved Permanently with the url to the resource in the HTTP header Location. - * - * ### Update release 1.3.0 - * Introduced holdDeliveryOnshore and requiredDatetime properties for materials. - * - * ### Update release 1.4.0 - * Introduced property calculationKey for operations. + * Get work order activities planned to be performed for a single planning plant. + * The response is normally based on the planned scheduling of work order operations through the properties `earliestStartDateTime` and `earliestFinishDateTime`. It does not use assignment to baseline plan as a source as this does not cover all work. * - * ### Update release 1.5.0 - * Added createdDateTime for attachments. + * It is possible to use the defined periods from the baseline plans as basis for the query parameters `planPeriodStartDate` and `planPeriodDuration`. Use `/plants/{plant-id}?include-baseline-plan=true&api-version=v1` for this purpose. * - * Added revisionId and revision to work order response (represents shutdown or campaign work). + * `personResponsibleId` will normally not be populated as planning is performed on the work center as a whole. * - * ### Update release 1.7.0 - * Added equipmentId and equipment to the response of tagsRelated. + * This endpoint returns only Work Order with status 'PLAN'. The field `requiredEndDate` is dependent on workOrderType. * - * Adding sourceId to related maintenance records. * - * ### Update release 1.8.0 - * Introduced property activeStatusIds for operations. - * - * ### Update release 1.19.0 - * Added properties `systemCondition` and `isExcludedFromWorkOrderPlan` for operations. - * - * ### Update release 1.21.0 - * Added property `area` to tag details. - * - * Added ability to read text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a - * configuration switch, which will initially be disabled, and when appropriate, enabled. - * - * ### Update release 1.22.0 - * Added new query parameter `include-service-operations`. Operations of type Service - PM03 previously available in the `operations` have been moved to `serviceOperations`. - * - * ### Update release 1.24.0 - * Added property `cmrIndicator` in the response. + * ### Filter: by-plan-period + * Provide the plan for a specific planning plant based on a defined plan period. This is the main usage of this endpoint. + * Parameters: + * - plan-period-start-date + * - plan-period-duration + * - location-id-any-of (optional) + * - revision-id-any-of (optional) + * - work-center-id-any-of (optional, supports * wildcard at the end) + * - main-work-center-id-any-of (optional, supports * wildcard at the end) + * - status-any-of (optional) + * - status-not (optional) + * - operation-notes-any-of (optional) + * - person-responsible-id (optional) + * + * Example of usage: + * - `/work-order-plan/{planning-plant-id}?filter=by-plan-period&plan-period-start-date=2023-03-02&plan-period-duration=P21D&location-id-any-of=CD00&include-completed-work-order-operations=false&work-order-types-any-of=preventiveWorkOrders,correctiveWorkOrders&api-version=v1` + * - `/work-order-plan/{planning-plant-id}?filter=by-plan-period&plan-period-start-date=2023-03-02&plan-period-duration=P21D&work-center-id-any-of=C31*&include-completed-work-order-operations=false&api-version=v1` + * + * ### Filter: by-person-responsible + * Get the work order plan for a specific planning plant, but only for work orders assigned to a specific user. + * Normally, work orders will not be assigned directly to a user, but in some work processes (such as inspection), this occurs. + * Parameters: + * - person-responsible-id + * - plan-period-start-date (optional) + * - plan-period-duration (optional) + * - person-responsible-email (value should be URL encoded) (optional) + * - location-id-any-of (optional) + * - revision-id-any-of (optional) + * - work-center-id-any-of (optional, supports * wildcard at the end) + * - main-work-center-id-any-of (optional, supports * wildcard at the end) + * - status-any-of (optional) + * - status-not (optional) + * - operation-notes-any-of (optional) + * + * Example of usage: + * - `/work-order-plan/{planning-plant-id}?filter=by-person-responsible&person-responsible-email=shortname@equinor.com&include-completed-work-order-operations=false&work-order-types-any-of=preventiveWorkOrders,correctiveWorkOrders&api-version=v1` * * ### Update release 1.26.0 - * Added property `isEquipmentRental` to services in serviceOperations. - * Added `materials` to serviceOperations. - * - * `tagDetails` object now includes the new field `maintenanceConceptId` - * - * ### Update release 1.27.0 - * Work orders now include the property `isOpen` - * - * Added `tag` and `title` to `maintenanceRecords` expand. - * - * ### Update release 1.28.0 - * Added new query parameter `include-safety-measures`. - * - * ### Update release 1.31.0 - * Fixed enum values for `schedulingStartConstraintId` and `schedulingFinishConstraintId` - * - * Split parts of `location` on `operations.materials` into `finalLocation` and `temporaryLocation` in the response. - * - * Added `agreement` & `agreementItem` on `serviceOperations` and `grossPrice`, `netValue` & `currency` on `services`. - * - * ### Update in an upcoming release - * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials`. - * - * @returns ProjectWorkOrder Success - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static lookupProjectWorkOrder({ - workOrderId, - includeOperations = true, - includeServiceOperations = true, - includeMaterials = true, - includeMaintenanceRecords = false, - includeAttachments = false, - includeStatusDetails = false, - includeTagDetails = false, - includeRelatedTags = false, - includeSafetyMeasures = false, - }: { - workOrderId: string, - /** - * Include Work order operations - */ - includeOperations?: boolean, - /** - * Include Work order service operations - */ - includeServiceOperations?: boolean, - /** - * Include materials for Work order operations - */ - includeMaterials?: boolean, - /** - * Include related maintenance records (from object list) - */ - includeMaintenanceRecords?: boolean, - /** - * Include Work order attachments (on header and for operation) - */ - includeAttachments?: boolean, - /** - * Include detailed information for statuses (both active and non-active) - */ - includeStatusDetails?: boolean, - /** - * Include detailed for the main tag of the Work order - */ - includeTagDetails?: boolean, - /** - * Include related tags (from object list) - */ - includeRelatedTags?: boolean, - /** - * Include safety-measures in work order operations - */ - includeSafetyMeasures?: boolean, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/work-orders/project-work-orders/{work-order-id}', - path: { - 'work-order-id': workOrderId, - }, - query: { - 'include-operations': includeOperations, - 'include-service-operations': includeServiceOperations, - 'include-materials': includeMaterials, - 'include-maintenance-records': includeMaintenanceRecords, - 'include-attachments': includeAttachments, - 'include-status-details': includeStatusDetails, - 'include-tag-details': includeTagDetails, - 'include-related-tags': includeRelatedTags, - 'include-safety-measures': includeSafetyMeasures, - }, - errors: { - 301: `If work-order-id exist, but is not a \`projectWorkOrder\`, the response is a HTTP 301 Moved Permanently with the url to the resource in the HTTP header Location. - `, - 404: `The specified resource was not found`, - }, - }); - } - - /** - * Work order - Add materials - * ### Overview - * Add materials to a work order operation (of any work order type). - * The ´operation-id´ parameter to use in the url can be found using the various lookup and search endpoints for work orders. ´operation-id´ consists of two internal ids from the ERP system called routing number and counter separated by the `-` character. - * - * There are three types of materials which can be added to work orders: - * 1. Material identified by `materialId` - * 2. Material identified by `equipmentId` (only for Subsea work orders) - * 3. Material identified only by the `material` field (also known as text items). + * Added query parameter `work-center-id-any-of`. * - * Each item in the request must include one of `materialId`, `equipmentId` or `material`. - * - * ### Update release 1.22.0 - * Added possibility of adding materials without a materialId (also known as text items). - * In this case, the purchasing fields mentioned below need to be provided as input: - * - `material` - * - `price` - * - `priceUnitId` - * - `purchasingGroup` - * - `goodsRecipient` - * - `unloadingPoint` - * - `materialGroup` + * ### Update release 1.29.0 + * Added properties `cmrIndicator` and `maintenanceRecordId`. * - * ### Update release 1.31.0 - * Split parts of `location` into `finalLocation` and `temporaryLocation` in the response. + * ### Upcoming changes + * Added following filter options: + * - `main-work-center-id-any-of` + * - `status-any-of` + * - `status-not` + * - `operation-notes-any-of` * - * ### Update in an upcoming release - * Added support for new properties `supplierId`, `vendorsMaterialNumber`, `deliveryTimeInDays`, `requisitionerId`, `holdDeliveryOnshore`, and `text`. + * Added following fields to the response: + * - `personResponsible` + * - `mainWorkCenterId` * + * @returns WorkOrderInPlan Success * @returns ProblemDetails Response for other HTTP status codes - * @returns any Created * @throws ApiError */ - public static addMaterialToWorkOrderOperation({ - operationId, - requestBody, + public static getWorkOrderPlan({ + planningPlantId, + filter, + planPeriodStartDate, + planPeriodDuration, + personResponsibleEmail, + includeCompletedWorkOrderOperations = false, + includePersonResponsible = false, + workOrderTypesAnyOf, + workCenterIdAnyOf, + mainWorkCenterIdAnyOf, + revisionIdAnyOf, + locationIdAnyOf, + statusAnyOf, + statusNot, + operationNotesAnyOf, }: { - operationId: string, /** - * Add material details + * Planning plant to retrieve work order plan for */ - requestBody: Array, - }): CancelablePromise> { - return __request(OpenAPI, { - method: 'POST', - url: '/work-order-operations/{operation-id}/materials', - path: { - 'operation-id': operationId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Bad request, for example if both \`materialId\` and \`material\` is supplied for the same item`, - 403: `User does not have sufficient rights to update operation`, - 404: `The specified resource was not found`, - 409: `Work order is locked by other user`, - 501: `(__Production environment only__) Not implemented yet`, - }, - }); - } - - /** - * Work order operation - Update material - * ### Overview - * Update a material in a work order operation (of any work order type). - * - * The ´operation-id´ parameter to use in the url can be found using the various lookup and search endpoints for work orders. ´operation-id´ consists of two internal ids from the ERP system called routing number and counter separated by the `-` character. - * - * The ´reservation-id´ parameter to use in the url can be found using the include-materials query parameter to work order lookup. - * - * ### Update in an upcoming release - * Added support for the same properties which can be used for material creation. - * - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static updateMaterialInWorkOrderOperation({ - operationId, - reservationId, - requestBody, - }: { - operationId: string, + planningPlantId: string, /** - * Reservation id for the material found through work order lookup with include-materials + * Filter to limit the work order plan by */ - reservationId: string, + filter: 'by-plan-period' | 'by-person-responsible', /** - * Update material details + * Start of plan period (`/plants/{plant-id}?include-baseline-plans=true` can be used as a reference ) */ - requestBody: Array, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'PATCH', - url: '/work-order-operations/{operation-id}/materials/{reservation-id}', - path: { - 'operation-id': operationId, - 'reservation-id': reservationId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Request is missing required parameters`, - 403: `User does not have sufficient rights to update operation`, - 404: `The specified resource was not found`, - 409: `Work order is locked by other user`, - }, - }); - } - - /** - * Failure report - Lookup - * ### Overview - * Lookup a single failure report - * - * ### Update release 0.9.0 - * Added failureMechanismId,failureMechanismGroupId to additionalMetadata. - * - * ### Update release 1.0.0 - * Added tasks for failure reports through query option include-tasks. - * Added properties plannerGroupId, plannerGroup and planningPlantId. - * - * ### Update release 1.1.0 - * Added isOpen and completedDateTime. - * - * Added hasUnsafeFailureMode and unsafeFailureModeStatus properties according to business process requirement `R-12137 - Give immediate warning of unsafe failure modes`. - * ### Update release 1.3.0 - * Added `priorityId` to response. - * - * ### Update release 1.4.0 - * Added `workCenter` and `equipment` to response. Fields include descriptions of workCenterId and equipmentId - * - * ### Update release 1.5.0 - * Added `createdDateTime` for attachments. - * - * ### Update release 1.6.0 - * Added `301` response. - * - * ### Update release 1.10.0 - * Added query parameter `include-url-references`. - * - * ### Update release 1.11.0 - * Added `quantity` for tasks. - * - * Added properties `createdById`,`createdBy` and `createdByEmail`. - * `createdById` will always be have value in response. `createdBy` and `createdByEmail` will only have value in response if the `include-created-by-details` query parameter is `true`. - * - * ### Update release 1.15.0 - * Added property `documentTitle` to `urlReferences`. - * - * ### Update release 1.16.0 - * `urlReferences` and `attachments` now include properties `documentType`, `documentNumber` and `documentTitle`. - * - * ### Update release 1.17.0 - * Added query parameter `include-measurements`. - * - * ### Update release 1.19.0 - * Added query parameter `include-additional-data-characteristics`. - * - * ### Update release 1.21.0 - * Added property `area` to tag details. - * - * ### Update release 1.24.0 - * `urlReferences` and `attachments` now include the property `documentCreatedDate` - * - * ### Update release 1.26.0 - * `tagDetails` object now includes the new field `maintenanceConceptId` - * - * ### Update release 1.27.0 - * Added `maintenanceRecordTypeId` to the response. - * - * ### Update release 1.28.0 - * Added ability to create text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a - * configuration switch, which will initially be disabled, and when appropriate, enabled. - * - * Added properties `codingGroupId` and `codingId`. - * - * ### Update release 1.31.0 - * Added `isReadonlyText` property to `activities` in the response. - * - * ### Update release 1.32.0 - * Added `changedDateTime` for attachments. - * - * Added a query parameter `include-task-list` and `taskList` in the response. When a work order is created based on this notification, operations from the `taskList` will be automatically copied into the work order. - * - * ### Upcoming changes - * Added `changedDateTime`, `taskResponsible` and `taskResponsibleEmail` for `tasks` in response. - * - * @returns FailureReport Success - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static lookupFailureReport({ - recordId, - includeStatusDetails = false, - includeTagDetails = false, - includeActivities = false, - includeTasks = false, - includeAttachments = false, - includeAdditionalMetadata = false, - includeAdditionalDataCharacteristics = false, - includeCreatedByDetails = false, - includeUrlReferences = false, - includeMeasurements = false, - includeTaskList = false, - }: { + planPeriodStartDate?: string, /** - * The recordId of the failure report. + * Duration of plan period */ - recordId: string, + planPeriodDuration?: string, /** - * Include detailed information for statuses (both active and non-active) + * Email address for responsible person */ - includeStatusDetails?: boolean, + personResponsibleEmail?: string, /** - * Include details about tag for failure report + * Include completed work order operations */ - includeTagDetails?: boolean, + includeCompletedWorkOrderOperations?: boolean, /** - * Include detailed information for activities + * Include person responsible information in response */ - includeActivities?: boolean, + includePersonResponsible?: boolean, /** - * Include detailed information for tasks + * Limit to specific work order types (any-of). Default includes all types */ - includeTasks?: boolean, + workOrderTypesAnyOf?: Array<'correctiveWorkOrders' | 'preventiveWorkOrders' | 'modificationWorkOrders' | 'sasChangeWorkOrders' | 'projectWorkOrders' | 'subseaWorkOrders'>, /** - * Include attachments + * Comma-separated list of work-center-id */ - includeAttachments?: boolean, + workCenterIdAnyOf?: string, /** - * Include extra metadata related to additional failure modes and detection modes. This is only used in rare cases + * Comma-separated list of main-work-center-id */ - includeAdditionalMetadata?: boolean, + mainWorkCenterIdAnyOf?: string, /** - * Include characteristics for additional metadata + * Comma-separated list of revision-id */ - includeAdditionalDataCharacteristics?: boolean, + revisionIdAnyOf?: string, /** - * Include name and email of user represented in `createdById`. If not supplied, `createdBy` and `createdByEmail` will have null value. + * Comma-separated list of location-id */ - includeCreatedByDetails?: boolean, + locationIdAnyOf?: string, /** - * Include URL references for failure report. See `POST /maintenance-record-relationships/{record-id}/url-references` + * Query based on statusIds (not all statuses are supported) */ - includeUrlReferences?: boolean, + statusAnyOf?: Array<'STRT' | 'RDOP' | 'TECO' | 'REL' | 'CRTD'>, /** - * Include related measurements + * Query based on statusIds (not all statuses are supported) */ - includeMeasurements?: boolean, + statusNot?: Array<'STRT' | 'RDOP' | 'TECO' | 'REL' | 'CRTD'>, /** - * Include task list with task list operations + * Query based on operation planNotes */ - includeTaskList?: boolean, - }): CancelablePromise { + operationNotesAnyOf?: string, + }): CancelablePromise | ProblemDetails> { return __request(OpenAPI, { method: 'GET', - url: '/maintenance-records/failure-reports/{record-id}', + url: '/work-order-plan/{planning-plant-id}', path: { - 'record-id': recordId, + 'planning-plant-id': planningPlantId, }, query: { - 'include-status-details': includeStatusDetails, - 'include-tag-details': includeTagDetails, - 'include-activities': includeActivities, - 'include-tasks': includeTasks, - 'include-attachments': includeAttachments, - 'include-additional-metadata': includeAdditionalMetadata, - 'include-additional-data-characteristics': includeAdditionalDataCharacteristics, - 'include-created-by-details': includeCreatedByDetails, - 'include-url-references': includeUrlReferences, - 'include-measurements': includeMeasurements, - 'include-task-list': includeTaskList, - }, - errors: { - 301: `The specified resource exists in another location - This can occur when requesting a resource which type does not match the route you are using. - - Example: \`/maintenance-api/resource-a/{resource-b-id}/\` gives \`301\` response. - `, - 404: `The specified resource was not found`, - }, - }); - } - - /** - * Failure report - Add tasks - * ### Overview - * Add task to failure report. - * - * If taskResponsibleEmail is provided and has a valid Equinor email address, the taskResponsibleId will be set to the employee id of the user. - * - * To find possible taskCodeGroupId and taskCodeId use the `/maintenance-records/task-codes?maintenance-record-id=...`. - * ### Update release 1.8.0 - * Response type change to return the created tasks. - * - * ### Update release 1.28.0 - * Added ability to create text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a - * configuration switch, which will initially be disabled, and when appropriate, enabled. - * - * ### Upcoming changes - * Added `changedDateTime`, `taskResponsible` and `taskResponsibleEmail` for `tasks` in response. - * - * @returns ProblemDetails Response for other HTTP status codes - * @returns MaintenanceRecordTask Created - * @throws ApiError - */ - public static addFailureReportTasks({ - recordId, - requestBody, - }: { - /** - * Id of the failure report - */ - recordId: string, - /** - * Tasks to add to existing failure report - */ - requestBody: Array, - }): CancelablePromise> { - return __request(OpenAPI, { - method: 'POST', - url: '/maintenance-records/failure-reports/{record-id}/tasks', - path: { - 'record-id': recordId, + 'filter': filter, + 'plan-period-start-date': planPeriodStartDate, + 'plan-period-duration': planPeriodDuration, + 'person-responsible-email': personResponsibleEmail, + 'include-completed-work-order-operations': includeCompletedWorkOrderOperations, + 'include-person-responsible': includePersonResponsible, + 'work-order-types-any-of': workOrderTypesAnyOf, + 'work-center-id-any-of': workCenterIdAnyOf, + 'main-work-center-id-any-of': mainWorkCenterIdAnyOf, + 'revision-id-any-of': revisionIdAnyOf, + 'location-id-any-of': locationIdAnyOf, + 'status-any-of': statusAnyOf, + 'status-not': statusNot, + 'operation-notes-any-of': operationNotesAnyOf, }, - body: requestBody, - mediaType: 'application/json', errors: { - 400: `The request body is invalid. May occur if taskResponsibleEmail is not an Equinor email address.`, - 403: `User does not have sufficient rights to add tasks to failure report`, - 404: `The specified resource was not found`, - 409: `Failure report is locked by other user`, + 400: `Request is missing required parameters`, + 403: `User does not have sufficient rights`, }, }); } @@ -1155,7 +433,15 @@ export class UpcomingModifiedEndpointsService { * When a task is created, it will have status `TSOS - Outstanding task` and `CRTE - Created`. * The status `TSRL - Task Released` can be set afterwards. * - * ### Update release 1.33.0 + * Now it is possible to set following statuses: + * - TSRL Task Released + * - TSCO Task Completed + * - TSSC Task successful + * - TCMP WF when task completed + * - RIND Returned - Wait for info + * - CANC Cancelled + * + * ### Upcoming changes * Enabled activation of user statuses like `TCMP - WF when task completed`, `RIND - Returned - Wait for info` and `CANC - Cancelled` * * @returns ProblemDetails Response for other HTTP status codes @@ -1203,264 +489,65 @@ export class UpcomingModifiedEndpointsService { } /** - * Modification Proposal - Lookup - * ### Overview - * Modification proposal initiates the processing of a modification, replacement or maintenance project. - * In Equinor for upstream offshore, a modification proposal initiates the business processes 'OM103.01 - Initiate projects on plants in operation' or 'OM103.70.01 - Propose simple modifications in safety and automation systems'. - * This request looks up a single Modification proposal. - * - * ### Update release 1.5.0 - * Added createdDateTime for attachments. - * - * ### Update release 1.6.0 - * Added `301` response. - * - * ### Update release 1.9.0 - * Renamed property plannerGroupPlantId to planningPlantId. - * - * ### Update release 1.11.0 - * Added `quantity` for tasks. - * - * Added properties `createdById`,`createdBy` and `createdByEmail`. - * `createdById` will always be have value in response. `createdBy` and `createdByEmail` will only have value in response if the `include-created-by-details` query parameter is `true`. - * - * ### Update release 1.16.0 - * `attachments` now include properties `documentType`, `documentNumber` and `documentTitle`. - * - * ### Update release 1.24.0 - * `attachments` now include the property `documentCreatedDate` - * - * ### Update release 1.27.0 - * Added `maintenanceRecordTypeId` to the response. - * - * ### Update release 1.28.0 - * Added ability to create text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a - * configuration switch, which will initially be disabled, and when appropriate, enabled. - * - * ### Update release 1.32.0 - * Added `changedDateTime` for attachments. - * - * ### Upcoming changes - * Added `changedDateTime`, `taskResponsible` and `taskResponsibleEmail` for `tasks` in response. - * - * @returns ModificationProposal Success - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static getModificationProposal({ - recordId, - includeTasks = true, - includeStatusDetails = false, - includeAttachments = false, - includeCreatedByDetails = false, - }: { - recordId: string, - /** - * Include detailed information for tasks - */ - includeTasks?: boolean, - /** - * Include detailed information for statuses (both active and non-active) - */ - includeStatusDetails?: boolean, - /** - * Include attachments - */ - includeAttachments?: boolean, - /** - * Include name and email of user represented in `createdById`. If not supplied, `createdBy` and `createdByEmail` will have null value. - */ - includeCreatedByDetails?: boolean, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/maintenance-records/modification-proposals/{record-id}', - path: { - 'record-id': recordId, - }, - query: { - 'include-tasks': includeTasks, - 'include-status-details': includeStatusDetails, - 'include-attachments': includeAttachments, - 'include-created-by-details': includeCreatedByDetails, - }, - errors: { - 301: `The specified resource exists in another location - This can occur when requesting a resource which type does not match the route you are using. - - Example: \`/maintenance-api/resource-a/{resource-b-id}/\` gives \`301\` response. - `, - 404: `The specified resource was not found`, - }, - }); - } - - /** - * Technical information update request - Lookup + * Technical information update request - Update task status * ### Overview - * Lookup a single technical information update request. - * - * A technical information update request represents a notice of change to initiate, distribute and follow up work to update technical information. - * - * Examples of usage: - * - Updating blueprints or other technical documentation - * - Changing spare parts lists (BOM- Bill of Materials) and storage management information - * - Updating maintenance program - * - Updating classification such as criticality, containment, selected safety critical equipment, etc. - * - Updating master data/management information in SAP, e.g. Equipment details, work centre, Planner Group, WBS, measuring points, etc. - * - Updating maintenance concept - * - * Equinor's governing document [GL1561 - Work orders and notifications types](https://docmap.equinor.com/Docmap/page/doc/dmDocAll.html?DOCVIEW=FALSE?DOCKEYID=525791) provides additional information for this maintenance record type. - * - * ### Update release 1.5.0 - * Added `createdDateTime` for attachments. + * Update status of an existing task for technical information update request. * - * ### Update release 1.6.0 - * Added `301` response. + * To find tasks available on a technical information update request, use the `/maintenance-records/technical-information-update-requests/{record-id}?include-tasks=true`. * - * ### Update release 1.11.0 - * Added `quantity` for tasks. - * - * Added properties `createdById`,`createdBy` and `createdByEmail`. - * `createdById` will always be have value in response. `createdBy` and `createdByEmail` will only have value in response if the `include-created-by-details` query parameter is `true`. - * - * ### Update release 1.16.0 - * `attachments` now include properties `documentType`, `documentNumber` and `documentTitle`. - * - * ### Update release 1.21.0 - * Added property `area` to tag details. - * - * ### Update release 1.26.0 - * `tagDetails` object now includes the new field `maintenanceConceptId` - * - * ### Update release 1.27.0 - * Added `maintenanceRecordTypeId` to the response. + * When a task is created, it will have status `TSOS - Outstanding task` and `CRTE - Created`. + * The status `TSRL - Task Released` can be set afterwards. * - * ### Update release 1.28.0 - * Added ability to create text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a - * configuration switch, which will initially be disabled, and when appropriate, enabled. + * Now it is possible to set following statuses: + * - TSRL Task Released + * - TSCO Task Completed + * - TSSC Task successful + * - TCMP WF when task completed + * - RIND Returned - Wait for info + * - CANC Cancelled * - * ### Update release 1.32.0 - * Added `changedDateTime` for attachments. * * ### Upcoming changes - * Added `changedDateTime`, `taskResponsible` and `taskResponsibleEmail` for `tasks` in response. + * Enabled activation of user statuses like `TCMP - WF when task completed`, `RIND - Returned - Wait for info` and `CANC - Cancelled` * - * @returns TechnicalInformationUpdateRequest Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static lookupTechnicalInformationUpdateRequest({ + public static updateTechnicalInformationUpdateRequestTaskStatuses({ recordId, - includeStatusDetails = false, - includeTasks = false, - includeAttachments = false, - includeTagDetails = false, - includePersonResponsible = false, - includeCreatedByDetails = false, + taskId, + statusId, + requestBody, }: { /** - * The recordId of the technical information update request + * id of the technical information update request */ recordId: string, /** - * Include detailed information for statuses (both active and non-active) - */ - includeStatusDetails?: boolean, - /** - * Include detailed information for tasks - */ - includeTasks?: boolean, - /** - * Include attachments - */ - includeAttachments?: boolean, - /** - * Include details about tag for failure report - */ - includeTagDetails?: boolean, - /** - * Include person responsible information in response - */ - includePersonResponsible?: boolean, - /** - * Include name and email of user represented in `createdById`. If not supplied, `createdBy` and `createdByEmail` will have null value. + * id of the task */ - includeCreatedByDetails?: boolean, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/maintenance-records/technical-information-update-requests/{record-id}', - path: { - 'record-id': recordId, - }, - query: { - 'include-status-details': includeStatusDetails, - 'include-tasks': includeTasks, - 'include-attachments': includeAttachments, - 'include-tag-details': includeTagDetails, - 'include-person-responsible': includePersonResponsible, - 'include-created-by-details': includeCreatedByDetails, - }, - errors: { - 301: `The specified resource exists in another location - This can occur when requesting a resource which type does not match the route you are using. - - Example: \`/maintenance-api/resource-a/{resource-b-id}/\` gives \`301\` response. - `, - 403: `User does not have sufficient rights to read technical information update request`, - 404: `The specified resource was not found`, - }, - }); - } - - /** - * Technical information update request - Add tasks - * ### Overview - * Add task to technical information update request. - * - * If taskResponsibleEmail is provided and has a valid Equinor email address, the taskResponsibleId will be set to the employee id of the user. - * - * To find possible taskCodeGroupId and taskCodeId use the `/maintenance-records/task-codes?maintenance-record-id=...`. - * - * ### Update release 1.8.0 - * Response type change to return the created tasks. - * - * ### Update release 1.28.0 - * Added ability to create text with advanced formatting. See the heading [Resource text](#section/Modelling-of-resources/Resource-text) in the description for more info. This feature is controlled by a - * configuration switch, which will initially be disabled, and when appropriate, enabled. - * - * ### Upcoming changes - * Added `changedDateTime`, `taskResponsible` and `taskResponsibleEmail` for `tasks` in response. - * - * @returns ProblemDetails Response for other HTTP status codes - * @returns MaintenanceRecordTask Success - * @throws ApiError - */ - public static addTechnicalInformationUpdateRequestTasks({ - recordId, - requestBody, - }: { + taskId: string, /** - * Id of the technical information update request + * id of the status */ - recordId: string, + statusId: string, /** - * Tasks to add to existing technical information update request + * Task status to update */ - requestBody: Array, - }): CancelablePromise> { + requestBody: Array, + }): CancelablePromise { return __request(OpenAPI, { - method: 'POST', - url: '/maintenance-records/technical-information-update-requests/{record-id}/tasks', + method: 'PATCH', + url: '/maintenance-records/technical-information-update-requests/{record-id}/tasks/{task-id}/statuses/{status-id}', path: { 'record-id': recordId, + 'task-id': taskId, + 'status-id': statusId, }, body: requestBody, mediaType: 'application/json', errors: { - 400: `The request body is invalid. May occur if taskResponsibleEmail is not an Equinor email address.`, - 403: `User does not have sufficient rights to add tasks technical information update request`, + 403: `User does not have sufficient rights to update technical information update request`, 404: `The specified resource was not found`, 409: `Technical information update request is locked by other user`, }, diff --git a/packages/api/maintenance-api/src/lib/generated/services/UpcomingNewEndpointsService.ts b/packages/api/maintenance-api/src/lib/generated/services/UpcomingNewEndpointsService.ts index bad0a1063..4ab5cf9d4 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/UpcomingNewEndpointsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/UpcomingNewEndpointsService.ts @@ -2,10 +2,11 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { CommunicationCreate } from '../models/CommunicationCreate'; -import type { DocumentJsonPatch } from '../models/DocumentJsonPatch'; -import type { InstallEquipment } from '../models/InstallEquipment'; import type { ProblemDetails } from '../models/ProblemDetails'; +import type { RawEquipmentChange } from '../models/RawEquipmentChange'; +import type { RawEquipmentChangeReturn } from '../models/RawEquipmentChangeReturn'; +import type { RawEquipmentCreate } from '../models/RawEquipmentCreate'; +import type { RawEquipmentCreateReturn } from '../models/RawEquipmentCreateReturn'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; @@ -14,294 +15,68 @@ import { request as __request } from '../core/request'; export class UpcomingNewEndpointsService { /** - * Equipment - Install + * Equipment - Create * ### Overview - * Install Equipment on a tag hierarchy. * - * An equipment can be either installed on a Tag, or an Equipment. - * - * If `equipmentId` is provided in the body, the `equipmentId` from the path will be installed here. - * If `tagPlantId`-`tagId` is provided in the body, the `equipmentId` from the path will be installed here. - * - * ### Important information - * Both of these cases cannot be supported at the same time. - * An equipment can not be installed at more than one place at a time. + * Create equipment - special intended usage for machine-to-machine integration. Fields are kept in their raw form, and mirror the data model in SAP. * * @returns ProblemDetails Response for other HTTP status codes - * @returns string Created - No body available for response. Use lookup from location header + * @returns RawEquipmentCreateReturn Created Equipment - return SAP BAPI structure * @throws ApiError */ - public static installEquipment({ - equipmentId, + public static rawEquipmentCreate({ requestBody, }: { /** - * The unique equipmentId in Equinor's system + * Create equipment - raw SAP BAPI data input. */ - equipmentId: string, - /** - * Install Equipment in a hierarchy. - */ - requestBody: InstallEquipment, - }): CancelablePromise { + requestBody: RawEquipmentCreate, + }): CancelablePromise { return __request(OpenAPI, { method: 'POST', - url: '/equipment/{equipment-id}/install', - path: { - 'equipment-id': equipmentId, - }, + url: '/raw/equipment', body: requestBody, mediaType: 'application/json', - responseHeader: 'Location', errors: { - 400: `Request is missing required parameters or \`equipmentId\` is located in the body alongside \`tagPlantId\`-\`tagId\``, - 403: `User does not have sufficient rights to install an equipment to a hierarchy`, + 400: `Bad Request - The resource provided in the body is not according to specification`, + 403: `User does not have sufficient rights to create a equipment`, }, }); } /** - * Equipment - Dismantle + * Equipment - Change * ### Overview - * Dismantle Equipment on a tag hierarchy. - * - * An equipment can be either installed on a Tag, or an Equipment. - * The correct installation needs to be provided in the body to be successful. - * - * If `equipmentId` is provided in the body, the `equipmentId` from the path will be dismantled here. - * If `tagPlantId`-`tagId` is provided in the body, the `equipmentId` from the path will be dismantled here. * - * ### Important information - * Both of these cases cannot be supported at the same time. - * An equipment can not be installed at more than one place at a time. + * Change equipment - special intended usage for machine-to-machine integration.. Fields are kept in their raw form, and mirror the data model in SAP. * * @returns ProblemDetails Response for other HTTP status codes - * @returns string Created - No body available for response. Use lookup from location header + * @returns RawEquipmentChangeReturn Change equipment - return SAP BAPI structure * @throws ApiError */ - public static dismantleEquipment({ + public static rawEquipmentChange({ equipmentId, requestBody, - deleteEquipment = false, }: { /** - * The unique equipmentId in Equinor's system + * Equipment number */ equipmentId: string, /** - * Dismantle Equipment in a hierarchy. + * Change equipment - raw SAP BAPI data input. */ - requestBody: InstallEquipment, - /** - * Delete the equipment after dismantling - */ - deleteEquipment?: boolean, - }): CancelablePromise { + requestBody: RawEquipmentChange, + }): CancelablePromise { return __request(OpenAPI, { - method: 'POST', - url: '/equipment/{equipment-id}/dismantle', + method: 'PUT', + url: '/raw/equipment/{equipment-id}', path: { 'equipment-id': equipmentId, }, - query: { - 'delete-equipment': deleteEquipment, - }, - body: requestBody, - mediaType: 'application/json', - responseHeader: 'Location', - errors: { - 400: `Request is missing required parameters or \`equipmentId\` is located in the body alongside \`tagPlantId\`-\`tagId\``, - 403: `User does not have sufficient rights to dismantle an equipment to a hierarchy`, - }, - }); - } - - /** - * Document - Update - * ### Overview - * Update a Document. - * - * Supports updating the following properties: - * - `statusId` - * - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static updateDocument({ - documentId, - requestBody, - }: { - /** - * Unique id of the document that will be updated - */ - documentId: string, - /** - * The information to be updated - */ - requestBody: Array, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'PATCH', - url: '/documents/{document-id}', - path: { - 'document-id': documentId, - }, - body: requestBody, - mediaType: 'application/json', - errors: { - 400: `Request is missing required parameters`, - 403: `User does not have sufficient rights to update Document`, - 404: `The specified resource was not found`, - 409: `Document is locked by other user`, - }, - }); - } - - /** - * Corrective Work Order - Add communication - * ### Overview - * - * Add communication to Corrective Work order. - * Purchaser and Requestor collaboration text used on the order for a material. - * - * ### Important information - * The communication is stored differently for each operation type PM01 (`operations`) or PM03 (`service-operations`). - * - * #### For PM01 (`operations`) - * The communication will be stored on a unique reservation, and the reservation id is used to identify the reservation. Reservation id can be found under `materials` for a given operation. - * - * #### For PM03 (`service-operations`) - * The communication will be stored on a unique service operation, and the service operation id is used to identify the service operation. Service operation id can be found under `serviceOperations` for a given work order. - * - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static addCorrectiveWorkOrderOperationCommunication({ - workOrderId, - operation, - requestBody, - }: { - workOrderId: string, - operation: string, - /** - * Communication to add to Corrective Work order - */ - requestBody: CommunicationCreate, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/work-orders/corrective-work-orders/{work-order-id}/operations/{operation}/communication', - path: { - 'work-order-id': workOrderId, - 'operation': operation, - }, body: requestBody, mediaType: 'application/json', errors: { - 403: `User does not have sufficient rights to add communication to work order`, - 404: `The specified resource was not found`, - 409: `Work order is locked by other user`, - }, - }); - } - - /** - * Corrective Work Order Communication - Attachment upload - * ### Overview - * **Upload attachment for Corrective Work Order Communication and PM03 service-operations** - * - * ### Important information - * Limitations of Attachment upload endpoints: - * - No support for parallel calls (uploading multiple attachments at once). - * - Maximum file size is 60 MB. Files between 60.0MB - 99.9MB will give a 400 error. Files larger than 100MB will result in a `413 Request Entity Too Large' Error in HTML. This is due to constraints in the underlying system and is outside of our control. - * - There will be created a new DMS document for the communication, or reuse already existing document if an attachment is already uploaded. - * - * Please use the endpoint `/work-orders/corrective-work-orders/{work-order-id}/operations/{operation}/communication` to add communication before uploading attachments. - * - * Please use the endpoint `/documents/{document-id}/attachments/{attachment-id}` to download attachments. `attachment-id` can be found in the response of the LookupCorrectiveWorkOrder endpoint. - * - * - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static uploadCorrectiveWorkOrderOperationCommunicationAttachment({ - workOrderId, - operation, - formData, - }: { - workOrderId: string, - operation: string, - formData?: { - files?: Array; - }, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/work-orders/corrective-work-orders/{work-order-id}/operations/{operation}/communication/attachments', - path: { - 'work-order-id': workOrderId, - 'operation': operation, - }, - formData: formData, - mediaType: 'multipart/form-data', - errors: { - 403: `User does not have sufficient rights to upload attachment`, - 404: `The specified resource was not found`, - 413: `Request Entity Too Large. - This error occurs when the size of an attachment exceeds 100MB. - `, - }, - }); - } - - /** - * Corrective Work Order Material Communication - Attachment upload - * ### Overview - * **Upload attachment for Corrective Work Order Communication and PM01 operations** - * - * ### Important information - * Limitations of Attachment upload endpoints: - * - No support for parallel calls (uploading multiple attachments at once). - * - Maximum file size is 60 MB. Files between 60.0MB - 99.9MB will give a 400 error. Files larger than 100MB will result in a `413 Request Entity Too Large' Error in HTML. This is due to constraints in the underlying system and is outside of our control. - * - There will be created a new DMS document for the communication, or reuse already existing document if an attachment is already uploaded. - * - * Please use the endpoint `/work-orders/corrective-work-orders/{work-order-id}/operations/{operation}/communication` to add communication before uploading attachments. - * - * Please use the endpoint `/documents/{document-id}/attachments/{attachment-id}` to download attachments. `attachment-id` can be found in the response of the LookupCorrectiveWorkOrder endpoint. - * - * - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static uploadCorrectiveWorkOrderOperationCommunicationMaterialAttachment({ - workOrderId, - operation, - reservationId, - formData, - }: { - workOrderId: string, - operation: string, - reservationId: string, - formData?: { - files?: Array; - }, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'POST', - url: '/work-orders/corrective-work-orders/{work-order-id}/operations/{operation}/materials/{reservation-id}/communication/attachments', - path: { - 'work-order-id': workOrderId, - 'operation': operation, - 'reservation-id': reservationId, - }, - formData: formData, - mediaType: 'multipart/form-data', - errors: { - 403: `User does not have sufficient rights to upload attachment`, 404: `The specified resource was not found`, - 413: `Request Entity Too Large. - This error occurs when the size of an attachment exceeds 100MB. - `, }, }); } diff --git a/packages/api/maintenance-api/src/lib/generated/services/WorkOrderOperationsService.ts b/packages/api/maintenance-api/src/lib/generated/services/WorkOrderOperationsService.ts index 1e1256f8b..87bebef97 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/WorkOrderOperationsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/WorkOrderOperationsService.ts @@ -250,8 +250,8 @@ export class WorkOrderOperationsService { * ### Update release 1.31.0 * Split parts of `location` into `finalLocation` and `temporaryLocation` in the response. * - * ### Update in an upcoming release - * Added support for new properties `supplierId`, `vendorsMaterialNumber`, `deliveryTimeInDays`, `requisitionerId`, `holdDeliveryOnshore`, and `text`. + * ### Update release 1.33.0 + * Added support for new properties `supplierId`, `vendorsMaterialNumber`, `deliveryTimeInDays`, `requisitionerId`, `holdDeliveryOnshore`, `text`. * * @returns ProblemDetails Response for other HTTP status codes * @returns any Created @@ -330,7 +330,7 @@ export class WorkOrderOperationsService { * * The ´reservation-id´ parameter to use in the url can be found using the include-materials query parameter to work order lookup. * - * ### Update in an upcoming release + * ### Update release 1.33.0 * Added support for the same properties which can be used for material creation. * * @returns ProblemDetails Response for other HTTP status codes diff --git a/packages/api/maintenance-api/src/lib/generated/services/WorkOrdersService.ts b/packages/api/maintenance-api/src/lib/generated/services/WorkOrdersService.ts index 5c4fe3471..e4507b40c 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/WorkOrdersService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/WorkOrdersService.ts @@ -6,6 +6,7 @@ import type { ProblemDetails } from '../models/ProblemDetails'; import type { WorkOrderChangeLogs } from '../models/WorkOrderChangeLogs'; import type { WorkOrderInPlan } from '../models/WorkOrderInPlan'; import type { WorkOrderOptimizedForQuery } from '../models/WorkOrderOptimizedForQuery'; +import type { WorkOrderTypes } from '../models/WorkOrderTypes'; import type { WorkOrderWithOperationList } from '../models/WorkOrderWithOperationList'; import type { CancelablePromise } from '../core/CancelablePromise'; @@ -35,6 +36,11 @@ export class WorkOrdersService { * - location-id-any-of (optional) * - revision-id-any-of (optional) * - work-center-id-any-of (optional, supports * wildcard at the end) + * - main-work-center-id-any-of (optional, supports * wildcard at the end) + * - status-any-of (optional) + * - status-not (optional) + * - operation-notes-any-of (optional) + * - person-responsible-id (optional) * * Example of usage: * - `/work-order-plan/{planning-plant-id}?filter=by-plan-period&plan-period-start-date=2023-03-02&plan-period-duration=P21D&location-id-any-of=CD00&include-completed-work-order-operations=false&work-order-types-any-of=preventiveWorkOrders,correctiveWorkOrders&api-version=v1` @@ -48,6 +54,13 @@ export class WorkOrdersService { * - plan-period-start-date (optional) * - plan-period-duration (optional) * - person-responsible-email (value should be URL encoded) (optional) + * - location-id-any-of (optional) + * - revision-id-any-of (optional) + * - work-center-id-any-of (optional, supports * wildcard at the end) + * - main-work-center-id-any-of (optional, supports * wildcard at the end) + * - status-any-of (optional) + * - status-not (optional) + * - operation-notes-any-of (optional) * * Example of usage: * - `/work-order-plan/{planning-plant-id}?filter=by-person-responsible&person-responsible-email=shortname@equinor.com&include-completed-work-order-operations=false&work-order-types-any-of=preventiveWorkOrders,correctiveWorkOrders&api-version=v1` @@ -58,6 +71,17 @@ export class WorkOrdersService { * ### Update release 1.29.0 * Added properties `cmrIndicator` and `maintenanceRecordId`. * + * ### Upcoming changes + * Added following filter options: + * - `main-work-center-id-any-of` + * - `status-any-of` + * - `status-not` + * - `operation-notes-any-of` + * + * Added following fields to the response: + * - `personResponsible` + * - `mainWorkCenterId` + * * @returns WorkOrderInPlan Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -72,8 +96,12 @@ export class WorkOrdersService { includePersonResponsible = false, workOrderTypesAnyOf, workCenterIdAnyOf, + mainWorkCenterIdAnyOf, revisionIdAnyOf, locationIdAnyOf, + statusAnyOf, + statusNot, + operationNotesAnyOf, }: { /** * Planning plant to retrieve work order plan for @@ -111,6 +139,10 @@ export class WorkOrdersService { * Comma-separated list of work-center-id */ workCenterIdAnyOf?: string, + /** + * Comma-separated list of main-work-center-id + */ + mainWorkCenterIdAnyOf?: string, /** * Comma-separated list of revision-id */ @@ -119,6 +151,18 @@ export class WorkOrdersService { * Comma-separated list of location-id */ locationIdAnyOf?: string, + /** + * Query based on statusIds (not all statuses are supported) + */ + statusAnyOf?: Array<'STRT' | 'RDOP' | 'TECO' | 'REL' | 'CRTD'>, + /** + * Query based on statusIds (not all statuses are supported) + */ + statusNot?: Array<'STRT' | 'RDOP' | 'TECO' | 'REL' | 'CRTD'>, + /** + * Query based on operation planNotes + */ + operationNotesAnyOf?: string, }): CancelablePromise | ProblemDetails> { return __request(OpenAPI, { method: 'GET', @@ -135,8 +179,12 @@ export class WorkOrdersService { 'include-person-responsible': includePersonResponsible, 'work-order-types-any-of': workOrderTypesAnyOf, 'work-center-id-any-of': workCenterIdAnyOf, + 'main-work-center-id-any-of': mainWorkCenterIdAnyOf, 'revision-id-any-of': revisionIdAnyOf, 'location-id-any-of': locationIdAnyOf, + 'status-any-of': statusAnyOf, + 'status-not': statusNot, + 'operation-notes-any-of': operationNotesAnyOf, }, errors: { 400: `Request is missing required parameters`, @@ -317,6 +365,32 @@ export class WorkOrdersService { }); } + /** + * Work orders - Types + * ### Overview + * Get type of a work order based on the work order id. + * + * @returns WorkOrderTypes Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static getWorkOrderType({ + workOrderIdsAnyOf, + }: { + /** + * The work orders as a comma separated list. + */ + workOrderIdsAnyOf: string, + }): CancelablePromise | ProblemDetails> { + return __request(OpenAPI, { + method: 'GET', + url: '/work-order-types', + query: { + 'work-order-ids-any-of': workOrderIdsAnyOf, + }, + }); + } + /** * Work orders - Optimized for query * ### Overview