diff --git a/.changeset/sweet-penguins-compare.md b/.changeset/sweet-penguins-compare.md new file mode 100644 index 000000000..13b2f9a7d --- /dev/null +++ b/.changeset/sweet-penguins-compare.md @@ -0,0 +1,5 @@ +--- +"@equinor/mad-maintenance-api-ts-wrapper": minor +--- + +Update wrapper to 1.35.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 99eb911c4..1c74e0433 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.34.0', + VERSION: '1.35.0', WITH_CREDENTIALS: false, CREDENTIALS: 'include', TOKEN: undefined, diff --git a/packages/api/maintenance-api/src/lib/generated/index.ts b/packages/api/maintenance-api/src/lib/generated/index.ts index b7ed44162..361e19f97 100644 --- a/packages/api/maintenance-api/src/lib/generated/index.ts +++ b/packages/api/maintenance-api/src/lib/generated/index.ts @@ -29,11 +29,13 @@ export type { CertificationReportSimpleSelf } from './models/CertificationReport export type { Characteristic } from './models/Characteristic'; export type { CharacteristicAdd } from './models/CharacteristicAdd'; export type { CharacteristicAddActivityReport } from './models/CharacteristicAddActivityReport'; +export type { CharacteristicForSearch } from './models/CharacteristicForSearch'; export type { CharacteristicMinimal } from './models/CharacteristicMinimal'; export type { CharacteristicsJsonPatch } from './models/CharacteristicsJsonPatch'; export type { CharacteristicsUpdate } from './models/CharacteristicsUpdate'; export type { CharacteristicValues } from './models/CharacteristicValues'; export type { Class } from './models/Class'; +export type { classTypeQuery } from './models/classTypeQuery'; export type { CodeGroup } from './models/CodeGroup'; export type { ConceptActivities } from './models/ConceptActivities'; export type { Conflict } from './models/Conflict'; @@ -45,6 +47,7 @@ export type { CorrectiveWorkOrderOperation } from './models/CorrectiveWorkOrderO export type { CorrectiveWorkOrderSimple } from './models/CorrectiveWorkOrderSimple'; export type { CorrectiveWorkOrderSimpleWithRelationship } from './models/CorrectiveWorkOrderSimpleWithRelationship'; export type { CorrectiveWorkOrderWithOperationSelf } from './models/CorrectiveWorkOrderWithOperationSelf'; +export type { CostCategory } from './models/CostCategory'; export type { costNetworkQuery } from './models/costNetworkQuery'; export type { costWbsQuery } from './models/costWbsQuery'; export type { data_custom } from './models/data_custom'; @@ -72,6 +75,7 @@ export type { documentRelationshipSourceId } from './models/documentRelationship export type { DocumentRelationshipToBusinessObjectsAdd } from './models/DocumentRelationshipToBusinessObjectsAdd'; export type { documentRelationshipType } from './models/documentRelationshipType'; export type { DocumentURLReferencesAdd } from './models/DocumentURLReferencesAdd'; +export type { EqHubAndSemiUsage } from './models/EqHubAndSemiUsage'; export type { Equipment } from './models/Equipment'; export type { EquipmentAddClass } from './models/EquipmentAddClass'; export type { EquipmentAttachment } from './models/EquipmentAttachment'; @@ -102,7 +106,9 @@ export type { FailureReportBasic } from './models/FailureReportBasic'; export type { FailureReportCreate } from './models/FailureReportCreate'; export type { FailureReportJsonPatch } from './models/FailureReportJsonPatch'; export type { FailureReportSimple } from './models/FailureReportSimple'; +export type { FailureReportSimpleForSearch } from './models/FailureReportSimpleForSearch'; export type { FailureReportSimpleSelf } from './models/FailureReportSimpleSelf'; +export type { FailureReportSimpleSelfForMaintenanceRecordSearch } from './models/FailureReportSimpleSelfForMaintenanceRecordSearch'; export type { FunctionalSystem } from './models/FunctionalSystem'; export type { GenericWorkOrderJsonPatch } from './models/GenericWorkOrderJsonPatch'; export type { GenericWorkOrderSimple } from './models/GenericWorkOrderSimple'; @@ -112,6 +118,7 @@ export type { includeCatalogProfiles } from './models/includeCatalogProfiles'; export type { includeCharacteristics } from './models/includeCharacteristics'; export type { includeCostDataForMaterials } from './models/includeCostDataForMaterials'; export type { includeEquipment } from './models/includeEquipment'; +export type { includeEstimatedCosts } from './models/includeEstimatedCosts'; export type { includeInstalledEquipment } from './models/includeInstalledEquipment'; export type { includeInventoryCount } from './models/includeInventoryCount'; export type { includeLastMeasurement } from './models/includeLastMeasurement'; @@ -214,6 +221,8 @@ export type { ModificationWorkOrderWithOperationSelf } from './models/Modificati export type { NotFoundDetails } from './models/NotFoundDetails'; export type { ObjectLinkageCreate } from './models/ObjectLinkageCreate'; export type { operationIdPath } from './models/operationIdPath'; +export type { page } from './models/page'; +export type { perPage } from './models/perPage'; export type { PlannerGroup } from './models/PlannerGroup'; export type { PlanningPlantRevision } from './models/PlanningPlantRevision'; export type { PlanningPlantRevisionBasic } from './models/PlanningPlantRevisionBasic'; @@ -273,6 +282,7 @@ export type { SubseaServiceOperation } from './models/SubseaServiceOperation'; export type { SubseaWorkOrder } from './models/SubseaWorkOrder'; export type { SubseaWorkOrderBasic } from './models/SubseaWorkOrderBasic'; export type { SubseaWorkOrderMaterial } from './models/SubseaWorkOrderMaterial'; +export type { SubseaWorkOrderMaterialForAddMaterialRespone } from './models/SubseaWorkOrderMaterialForAddMaterialRespone'; export type { SubseaWorkOrderOperation } from './models/SubseaWorkOrderOperation'; export type { SubseaWorkOrderSimple } from './models/SubseaWorkOrderSimple'; export type { SubseaWorkOrderSimpleWithRelationship } from './models/SubseaWorkOrderSimpleWithRelationship'; @@ -337,6 +347,7 @@ export type { WorkOrderCreateAbstract } from './models/WorkOrderCreateAbstract'; export type { WorkOrderInPlan } from './models/WorkOrderInPlan'; export type { WorkOrderMaterial } from './models/WorkOrderMaterial'; export type { WorkOrderMaterialAdd } from './models/WorkOrderMaterialAdd'; +export type { WorkOrderMaterialForAddMaterialRespone } from './models/WorkOrderMaterialForAddMaterialRespone'; export type { WorkOrderMaterialJsonPatch } from './models/WorkOrderMaterialJsonPatch'; export type { WorkOrderObjectMaintenanceRecordMinimal } from './models/WorkOrderObjectMaintenanceRecordMinimal'; export type { WorkOrderOperation } from './models/WorkOrderOperation'; @@ -356,6 +367,7 @@ export type { WorkOrderWithOperationList } from './models/WorkOrderWithOperation export { ActivityReportsService } from './services/ActivityReportsService'; export { CertificationReportsService } from './services/CertificationReportsService'; +export { CharacteristicsService } from './services/CharacteristicsService'; export { CorrectiveWorkOrdersService } from './services/CorrectiveWorkOrdersService'; export { DocumentsService } from './services/DocumentsService'; export { EquipmentService } from './services/EquipmentService'; @@ -374,6 +386,7 @@ export { MeasuringPointsService } from './services/MeasuringPointsService'; export { ModificationProposalsService } from './services/ModificationProposalsService'; export { ModificationWorkOrdersService } from './services/ModificationWorkOrdersService'; export { ModifiedEndpointsService } from './services/ModifiedEndpointsService'; +export { NewEndpointsService } from './services/NewEndpointsService'; export { PreventiveWorkOrdersService } from './services/PreventiveWorkOrdersService'; export { ProjectWorkOrdersService } from './services/ProjectWorkOrdersService'; export { ReportsService } from './services/ReportsService'; diff --git a/packages/api/maintenance-api/src/lib/generated/models/CertificationReportBasic.ts b/packages/api/maintenance-api/src/lib/generated/models/CertificationReportBasic.ts index ca7f08e47..14e9cdb4a 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/CertificationReportBasic.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/CertificationReportBasic.ts @@ -10,10 +10,10 @@ export type CertificationReportBasic = (CertificationReportSimple & { /** * The point in time when the failure started */ - failureStartDateTime: string; + failureStartDateTime: string | null; /** * The point in time when the failure was resolved */ - failureEndDateTime: string; + failureEndDateTime: string | null; }); diff --git a/packages/api/maintenance-api/src/lib/generated/models/CharacteristicForSearch.ts b/packages/api/maintenance-api/src/lib/generated/models/CharacteristicForSearch.ts new file mode 100644 index 000000000..1cc910a07 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/CharacteristicForSearch.ts @@ -0,0 +1,11 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { Characteristic } from './Characteristic'; + +export type CharacteristicForSearch = (Characteristic & { + classTypeKey: string; +}); + diff --git a/packages/api/maintenance-api/src/lib/generated/models/CostCategory.ts b/packages/api/maintenance-api/src/lib/generated/models/CostCategory.ts new file mode 100644 index 000000000..112bf3cc9 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/CostCategory.ts @@ -0,0 +1,16 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type CostCategory = { + /** + * Unique ID for the cost category + */ + costCategoryId?: string; + /** + * Name of the cost category + */ + costCategory?: string; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/EqHubAndSemiUsage.ts b/packages/api/maintenance-api/src/lib/generated/models/EqHubAndSemiUsage.ts new file mode 100644 index 000000000..496e86839 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/EqHubAndSemiUsage.ts @@ -0,0 +1,42 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type EqHubAndSemiUsage = { + semiId?: string | null; + documentType?: string | null; + documentNumber?: string | null; + objectNumber?: string | null; + category?: string | null; + status?: string | null; + documentTitle?: string | null; + documentCreatedDate?: string | null; + objectType?: string | null; + objectTypeText?: string | null; + objectDescription?: string | null; + objectBom?: boolean | null; + createdOnDateTime?: string | null; + createdById?: string | null; + changedOnDateTime?: string | null; + changedById?: string | null; + manufacturer?: string | null; + model?: string | null; + manufacturerPartNumber?: string | null; + serialNumber?: string | null; + constructionType?: string | null; + constructionTypeText?: string | null; + equipmentFunctionalLocationId?: string | null; + equipmentFunctionalLocationABCid?: string | null; + equipmentFunctionalLocationPlantId?: string | null; + equipmentFunctionalLocationPlant?: string | null; + equipmentStatuses?: { + systemStatus?: string | null; + userStatus?: string | null; + }; + functionalLocationStatuses?: { + systemStatus?: string | null; + userStatus?: string | null; + }; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/EquipmentBasicV2.ts b/packages/api/maintenance-api/src/lib/generated/models/EquipmentBasicV2.ts index 4fb8e7acd..5a85c3671 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/EquipmentBasicV2.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/EquipmentBasicV2.ts @@ -56,5 +56,10 @@ export type EquipmentBasicV2 = (EquipmentMinimal & { technicalIdentificationNumber?: string; objectWeight?: string; unitOfWeight?: string; + maintenancePlantId?: string; + equipmentCategoryId?: string; + maintenanceConceptId?: string; + createdOnDate?: string; + changedOnDate?: string; }); diff --git a/packages/api/maintenance-api/src/lib/generated/models/FailureReportBasic.ts b/packages/api/maintenance-api/src/lib/generated/models/FailureReportBasic.ts index fff4eb005..572465a4d 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/FailureReportBasic.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/FailureReportBasic.ts @@ -4,6 +4,7 @@ /* eslint-disable */ import type { failureImpactId } from './failureImpactId'; +import type { WorkOrderTypeId } from './WorkOrderTypeId'; export type FailureReportBasic = { recordId: string; @@ -60,6 +61,8 @@ export type FailureReportBasic = { codingGroupId: string | null; correctiveWorkOrderExist: boolean; correctiveWorkOrderId: string; + workOrderTypeId: WorkOrderTypeId; + workOrderId: string; /** * Active statuses for the Failure report with space as separating character */ diff --git a/packages/api/maintenance-api/src/lib/generated/models/FailureReportSimpleForSearch.ts b/packages/api/maintenance-api/src/lib/generated/models/FailureReportSimpleForSearch.ts new file mode 100644 index 000000000..8f9669b0e --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/FailureReportSimpleForSearch.ts @@ -0,0 +1,13 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { FailureReportSimple } from './FailureReportSimple'; +import type { WorkOrderTypeId } from './WorkOrderTypeId'; + +export type FailureReportSimpleForSearch = (FailureReportSimple & { + workOrderTypeId?: WorkOrderTypeId; + workOrderId?: string; +}); + diff --git a/packages/api/maintenance-api/src/lib/generated/models/FailureReportSimpleSelfForMaintenanceRecordSearch.ts b/packages/api/maintenance-api/src/lib/generated/models/FailureReportSimpleSelfForMaintenanceRecordSearch.ts new file mode 100644 index 000000000..fdc3bac14 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/FailureReportSimpleSelfForMaintenanceRecordSearch.ts @@ -0,0 +1,13 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { FailureReportSimpleSelf } from './FailureReportSimpleSelf'; +import type { WorkOrderTypeId } from './WorkOrderTypeId'; + +export type FailureReportSimpleSelfForMaintenanceRecordSearch = (FailureReportSimpleSelf & { + workOrderTypeId?: WorkOrderTypeId; + workOrderId?: string; +}); + diff --git a/packages/api/maintenance-api/src/lib/generated/models/MaintenanceRecordList.ts b/packages/api/maintenance-api/src/lib/generated/models/MaintenanceRecordList.ts index c11eb1fa0..e96241da0 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/MaintenanceRecordList.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/MaintenanceRecordList.ts @@ -5,14 +5,14 @@ import type { ActivityReportSimpleSelf } from './ActivityReportSimpleSelf'; import type { CertificationReportSimpleSelf } from './CertificationReportSimpleSelf'; -import type { FailureReportSimpleSelf } from './FailureReportSimpleSelf'; +import type { FailureReportSimpleSelfForMaintenanceRecordSearch } from './FailureReportSimpleSelfForMaintenanceRecordSearch'; import type { ModificationProposalSimpleSelf } from './ModificationProposalSimpleSelf'; import type { TechnicalClarificationSimpleSelf } from './TechnicalClarificationSimpleSelf'; import type { TechnicalInformationUpdateRequestSimpleSelf } from './TechnicalInformationUpdateRequestSimpleSelf'; export type MaintenanceRecordList = { modificationProposals?: Array; - failureReports?: Array; + failureReports?: Array; activityReports?: Array; certificationReports?: Array; technicalInformationUpdateRequests?: Array; diff --git a/packages/api/maintenance-api/src/lib/generated/models/PreventiveWorkOrder.ts b/packages/api/maintenance-api/src/lib/generated/models/PreventiveWorkOrder.ts index 2f2e9e327..31bef040c 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/PreventiveWorkOrder.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/PreventiveWorkOrder.ts @@ -3,6 +3,7 @@ /* tslint:disable */ /* eslint-disable */ +import type { EstimatedCosts } from './EstimatedCosts'; import type { MaintenancePlanSimple } from './MaintenancePlanSimple'; import type { MaintenanceRecordMinimalWithActiveStatusIds } from './MaintenanceRecordMinimalWithActiveStatusIds'; import type { Measurement } from './Measurement'; @@ -39,6 +40,10 @@ export type PreventiveWorkOrder = (PreventiveWorkOrderBasic & { * Related measurements */ measurements?: Array; + /** + * Estimated Costs + */ + estimatedCosts?: Array; additionalCostWBSId: string; additionalCostWBS: string; costWBSId: string; 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 e0c8f46bd..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,13 +6,13 @@ import type { PreventiveWorkOrderSimple } from './PreventiveWorkOrderSimple'; export type PreventiveWorkOrderBasic = (PreventiveWorkOrderSimple & { - workCenter: string; - plannerGroup: string; text: string; /** * The type of work order it is an instance of */ workOrderTypeId: 'preventiveWorkOrder'; + plannerGroup: string; + workCenter: string; isProductionCritical?: string; isHSECritical?: string; }); diff --git a/packages/api/maintenance-api/src/lib/generated/models/PreventiveWorkOrderWithOperationSelf.ts b/packages/api/maintenance-api/src/lib/generated/models/PreventiveWorkOrderWithOperationSelf.ts index ad7c54d22..a21677a17 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/PreventiveWorkOrderWithOperationSelf.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/PreventiveWorkOrderWithOperationSelf.ts @@ -8,7 +8,6 @@ import type { WorkOrderOperationSimpleForSearch } from './WorkOrderOperationSimp export type PreventiveWorkOrderWithOperationSelf = (PreventiveWorkOrderSimple & { text?: string | null; - requiredEndDate: string | null; _links: { self?: string; }; diff --git a/packages/api/maintenance-api/src/lib/generated/models/ServiceOperation.ts b/packages/api/maintenance-api/src/lib/generated/models/ServiceOperation.ts index 353874583..47d6dc542 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/ServiceOperation.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/ServiceOperation.ts @@ -35,6 +35,7 @@ export type ServiceOperation = { scopeOfWork?: string; agreement?: string; agreementItem?: string; + requisitionerId?: string; services?: Array; materials?: Array | null; }; diff --git a/packages/api/maintenance-api/src/lib/generated/models/SubseaWorkOrderMaterialForAddMaterialRespone.ts b/packages/api/maintenance-api/src/lib/generated/models/SubseaWorkOrderMaterialForAddMaterialRespone.ts new file mode 100644 index 000000000..d268973e7 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/SubseaWorkOrderMaterialForAddMaterialRespone.ts @@ -0,0 +1,13 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +import type { WorkOrderMaterialForAddMaterialRespone } from './WorkOrderMaterialForAddMaterialRespone'; + +export type SubseaWorkOrderMaterialForAddMaterialRespone = (WorkOrderMaterialForAddMaterialRespone & { + equipmentId: string; + equipment: string; + supplyingPlantId: string; +}); + diff --git a/packages/api/maintenance-api/src/lib/generated/models/Tag.ts b/packages/api/maintenance-api/src/lib/generated/models/Tag.ts index 070b3b738..fe2955db3 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/Tag.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/Tag.ts @@ -52,6 +52,9 @@ export type Tag = (TagBasic & { * Material for the asset */ material?: string; + maintenancePlantId?: string; + createdOnDate?: string | null; + changedOnDate?: string | null; characteristics?: Array; maintenanceRecords?: SimpleMaintenanceRecordsList; workOrders?: { diff --git a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderMaterial.ts b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderMaterial.ts index a97940cbe..6393feb6b 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderMaterial.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderMaterial.ts @@ -3,52 +3,9 @@ /* tslint:disable */ /* eslint-disable */ -export type WorkOrderMaterial = { - reservationId: string; - materialId: string; - material: string; - quantity: number; - /** - * *This field is deprecated, use `quantityUnitId` instead. - * Typically is one of: - * - PC - Pieces - * - L - Liters - * - KG - Kilograms - * - M - Meters - * - * @deprecated - */ - quantityUnit?: string; - /** - * Typically is any of: - * - PC - Pieces - * - L - Liters - * - KG - Kilograms - * - M - Meters - * - */ - quantityUnitId: string; - location: string; - /** - * The final location of the material. - * Extracted from `location`. - * - */ - finalLocation: string; - /** - * Temporary location of the material. - * Extracted from `location`. - * - */ - temporaryLocation: string; - /** - * Flag to indicate the delivery should be held at supplying base instead of immediately being delivered to its destination - */ - holdDeliveryOnshore: boolean; - /** - * Specifies the date and time for when the material is needed at its destination - */ - requiredDatetime: string | null; +import type { WorkOrderMaterialForAddMaterialRespone } from './WorkOrderMaterialForAddMaterialRespone'; + +export type WorkOrderMaterial = (WorkOrderMaterialForAddMaterialRespone & { /** * Specifies the recipient for whom the material is destined */ @@ -63,5 +20,9 @@ export type WorkOrderMaterial = { * Key for a buyer or a group of buyers, who is/are responsible for certain purchasing activities */ purchasingGroup?: string; -}; + /** + * Flag to indicate if the delivery is complete + */ + deliveryComplete: boolean; +}); diff --git a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderMaterialForAddMaterialRespone.ts b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderMaterialForAddMaterialRespone.ts new file mode 100644 index 000000000..ece2a924d --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderMaterialForAddMaterialRespone.ts @@ -0,0 +1,57 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type WorkOrderMaterialForAddMaterialRespone = { + reservationId: string; + materialId: string; + material: string; + quantity: number; + /** + * *This field is deprecated, use `quantityUnitId` instead. + * Typically is one of: + * - PC - Pieces + * - L - Liters + * - KG - Kilograms + * - M - Meters + * + * @deprecated + */ + quantityUnit?: string; + /** + * Typically is any of: + * - PC - Pieces + * - L - Liters + * - KG - Kilograms + * - M - Meters + * + */ + quantityUnitId: string; + location: string; + /** + * The final location of the material. + * Extracted from `location`. + * + */ + finalLocation: string; + /** + * Temporary location of the material. + * Extracted from `location`. + * + */ + temporaryLocation: string; + /** + * Flag to indicate the delivery should be held at supplying base instead of immediately being delivered to its destination + */ + holdDeliveryOnshore: boolean; + /** + * Specifies the date and time for when the material is needed at its destination + */ + requiredDatetime: string | null; + /** + * Indicates for whom the material is to be ordered + */ + requisitionerId?: string; +}; + diff --git a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderOperation.ts b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderOperation.ts index 500f7f57b..318148ab5 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderOperation.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderOperation.ts @@ -19,5 +19,17 @@ export type WorkOrderOperation = (WorkOrderOperationSimple & { * Safety measures for the work order operation */ safetyMeasures?: Array | null; + /** + * The internal id of the person assigned as responsible for the Work Order Operation. The id represents the employee id of the person. + */ + personResponsibleId?: string | null; + /** + * The name of the person assigned as responsible for the Work Order Operation. + */ + personResponsible?: string | null; + /** + * The email of the person assigned as responsible for the Work Order Operation. This is the preferred way of identifying the person as it's consistent across systems. + */ + personResponsibleEmail?: string | null; }); diff --git a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderOperationJsonPatch.ts b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderOperationJsonPatch.ts index 4a32cfe5c..f6579b891 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderOperationJsonPatch.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderOperationJsonPatch.ts @@ -11,7 +11,7 @@ export type WorkOrderOperationJsonPatch = { /** * Path indicating the property to be impacted by the operation */ - path: '/isCompleted' | '/actualPercentageComplete' | '/schedulingStartConstraintId' | '/schedulingStartConstraintDateTime' | '/schedulingFinishConstraintId' | '/schedulingFinishConstraintDateTime' | '/systemCondition' | '/operationId' | '/title' | '/text' | '/workCenterId' | '/workCenterPlantId' | '/standardTextTemplate' | '/plannedWorkHours' | '/plannedWorkDuration' | '/capacityCount' | '/calculationKey'; + path: '/isCompleted' | '/actualPercentageComplete' | '/schedulingStartConstraintId' | '/schedulingStartConstraintDateTime' | '/schedulingFinishConstraintId' | '/schedulingFinishConstraintDateTime' | '/systemCondition' | '/operationId' | '/title' | '/text' | '/workCenterId' | '/workCenterPlantId' | '/standardTextTemplate' | '/plannedWorkHours' | '/plannedWorkDuration' | '/capacityCount' | '/calculationKey' | '/isExcludedFromWorkOrderPlan' | '/personResponsibleEmail'; /** * 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/WorkOrderOperationSimpleForSearch.ts b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderOperationSimpleForSearch.ts index acd898fdf..bfe6a1f80 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderOperationSimpleForSearch.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderOperationSimpleForSearch.ts @@ -10,5 +10,7 @@ export type WorkOrderOperationSimpleForSearch = (WorkOrderOperationSimple & { * Id of the Confirmation (from 'Confirmation Data'). This Id does not change even if the operation (activity) number changes. */ confirmationId: string | null; + remainingWork: number; + remainingWorkUnit: 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 index 0c0690908..896b142e6 100644 --- a/packages/api/maintenance-api/src/lib/generated/models/WorkOrderTypeId.ts +++ b/packages/api/maintenance-api/src/lib/generated/models/WorkOrderTypeId.ts @@ -3,4 +3,4 @@ /* tslint:disable */ /* eslint-disable */ -export type WorkOrderTypeId = 'correctiveWorkOrder' | 'preventiveWorkOrder' | 'modificationWorkOrder' | 'sasChangeWorkOrder' | 'projectWorkOrder' | 'subseaWorkOrder' | 'unsupportedWorkOrder'; +export type WorkOrderTypeId = 'correctiveWorkOrder' | 'preventiveWorkOrder' | 'modificationWorkOrder' | 'sasChangeWorkOrder' | 'projectWorkOrder' | 'subseaWorkOrder' | 'unsupportedOrderType'; diff --git a/packages/api/maintenance-api/src/lib/generated/models/classTypeQuery.ts b/packages/api/maintenance-api/src/lib/generated/models/classTypeQuery.ts new file mode 100644 index 000000000..38b6e166b --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/classTypeQuery.ts @@ -0,0 +1,6 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +export type classTypeQuery = '002' | '003' | '015' | '037'; diff --git a/packages/api/maintenance-api/src/lib/generated/models/includeEstimatedCosts.ts b/packages/api/maintenance-api/src/lib/generated/models/includeEstimatedCosts.ts new file mode 100644 index 000000000..9b19e54bb --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/includeEstimatedCosts.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +/** + * Include estimated costs + */ +export type includeEstimatedCosts = boolean; diff --git a/packages/api/maintenance-api/src/lib/generated/models/page.ts b/packages/api/maintenance-api/src/lib/generated/models/page.ts new file mode 100644 index 000000000..0010d6caa --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/page.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +/** + * Page to fetch + */ +export type page = number; diff --git a/packages/api/maintenance-api/src/lib/generated/models/perPage.ts b/packages/api/maintenance-api/src/lib/generated/models/perPage.ts new file mode 100644 index 000000000..6b3196797 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/models/perPage.ts @@ -0,0 +1,9 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ + +/** + * Results to return per page + */ +export type perPage = number; diff --git a/packages/api/maintenance-api/src/lib/generated/services/CharacteristicsService.ts b/packages/api/maintenance-api/src/lib/generated/services/CharacteristicsService.ts new file mode 100644 index 000000000..3cc8b9182 --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/services/CharacteristicsService.ts @@ -0,0 +1,80 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CharacteristicForSearch } from '../models/CharacteristicForSearch'; +import type { ProblemDetails } from '../models/ProblemDetails'; + +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; + +export class CharacteristicsService { + + /** + * Search characteristics + * ### Overview + * Search for characteristics by class type and class id. + * + * The class-type can be any of the following: + * | class-type | Description | + * |-----------------------|---------------------------------| + * | 002 | Equipment | + * | 003 | Tags | + * | 015 | Notification Item | + * | 017 | Equipment | + * | 037 | Measuring Point | + * + * @returns CharacteristicForSearch Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static searchCharacteristics({ + filter, + classType, + characteristicIdsAnyOf, + classTypeKeyPrefix, + perPage = 100, + page = 1, + }: { + filter: 'by-characteristic-ids-any-of', + classType: '002' | '003' | '015' | '037', + /** + * Required if filter is `by-characteristic-id-any-of` + * + */ + characteristicIdsAnyOf?: string, + /** + * Pre-fix of the object key, if searching for class type "003" (Tags) this may be set to "1100" to fetch all + * characteristics from Tags starting with 1100, which would mean all tags for this plant. + * + */ + classTypeKeyPrefix?: string, + /** + * Results to return per page + */ + perPage?: number, + /** + * Page to fetch + */ + page?: number, + }): CancelablePromise | ProblemDetails> { + return __request(OpenAPI, { + method: 'GET', + url: '/characteristics', + query: { + 'filter': filter, + 'characteristic-ids-any-of': characteristicIdsAnyOf, + 'class-type-key-prefix': classTypeKeyPrefix, + 'class-type': classType, + 'per-page': perPage, + 'page': page, + }, + errors: { + 400: `Request is missing required parameters`, + 404: `The specified resource was not found`, + }, + }); + } + +} 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 77b1b3820..cbd72afdf 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/CorrectiveWorkOrdersService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/CorrectiveWorkOrdersService.ts @@ -153,6 +153,13 @@ export class CorrectiveWorkOrdersService { * * Added new properties `isHSECritical` and `isProductionCritical` to the response. * + * ### Update release 1.35.0 + * Added new properties `requisitionerId` and `deliveryComplete` to `materials` in `operations`. + * + * Added new properties `personResponsible`, `personResponsibleId` and `personResponsibleEmail` to `operations`. + * + * Added new property `requisitionerId` to `serviceOperations`. + * * @returns CorrectiveWorkOrder Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -656,15 +663,15 @@ export class CorrectiveWorkOrdersService { * - PMSG - Purchasing Message * - MLTI - Multi discipline * - * ### Update version 0.9.0 + * ### Update release 0.9.0 * Support for releasing a work order by setting the REL status. * * Support for complete-outstanding-maintenance-records query parameter for TECO and CLSD statuses. * - * ### Update version 1.1.0 + * ### Update release 1.1.0 * Support for deactivating TECO status * - * ### Update version 1.6.0 + * ### Update release 1.6.0 * Support for ActivatedDateTime for TECO status. It is an optional parameter which allows to overwrite the default reference date for TECO. If no value is provided, the value will be set to current timestamp. * * Parameter complete-outstanding-maintenance-records set to true will close maintenance records which have a relationship to the work order via the `ObjectList`. diff --git a/packages/api/maintenance-api/src/lib/generated/services/DocumentsService.ts b/packages/api/maintenance-api/src/lib/generated/services/DocumentsService.ts index ac0e53bcc..4de7af3a8 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/DocumentsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/DocumentsService.ts @@ -46,6 +46,9 @@ export class DocumentsService { * * Added properties `partNumber` & `manufacturer` to `material` in the response. * + * ### Update release 1.35.0 + * Added new fields `maintenancePlantId`, `equipmentCategoryId`, `maintenanceConceptId`, `createdOnDate` and `changedOnDate` for `equipment`. + * * @returns Document Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -222,6 +225,9 @@ export class DocumentsService { * * Added properties `partNumber` & `manufacturer` to `material` in the response. * + * ### Update release 1.35.0 + * Added new fields `maintenancePlantId`, `equipmentCategoryId`, `maintenanceConceptId`, `createdOnDate` and `changedOnDate` for `equipment`. + * * @returns Document Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError 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 b9b0ce047..ac8ff07de 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/EquipmentService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/EquipmentService.ts @@ -111,6 +111,9 @@ export class EquipmentService { * * Added boolean property `hasLinkageToEquipment` that will be true if the equipment has any linked equipment. * + * ### Update release 1.35.0 + * Added new fields `maintenancePlantId`, `createdOnDate` and `changedOnDate`. + * * @returns Equipment Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -565,7 +568,10 @@ export class EquipmentService { * Added properties `tagId` and `tagPlantId` to response body. * * ### Update release 1.31.0 - * Added properties `manufacturerPartNumber`, `technicalIdentificationNumber`, `objectWeight` and `unitOfWeight`to response body. + * Added properties `manufacturerPartNumber`, `technicalIdentificationNumber`, `objectWeight` and `unitOfWeight` to response body. + * + * ### Update release 1.35.0 + * Added new fields `maintenancePlantId`, `equipmentCategoryId`, `maintenanceConceptId`, `createdOnDate` and `changedOnDate` to response body. * * @returns ProblemDetails Response for other HTTP status codes * @returns EquipmentBasicV2 Created @@ -605,11 +611,13 @@ export class EquipmentService { * * `material-id-any-of` * * `characteristic-value-any-of` * * `equipment-any-of` - * * `technical-id-any-of` + * * `technical-identification-number-any-of` + * * `maintenance-concept-id-any-of` + * * `equipment-category-id-any-of` * * These parameters allow a comma-separated list of entries. * - * If more than one of these parameters are supplied in the same request, the equipment in the response will need to fulfill all parameters (ie. operator AND is used between the parameter). + * If more than one of these parameters are supplied in the same request, the equipment in the response will need to fulfill all parameters (the 'AND' operator will be used between the parameters). * * Query parameters `include-only-open-maintenance-records` and `include-only-open-work-orders` have a recommended value of `true` in order to improve performance (default value `false`). * @@ -691,6 +699,10 @@ export class EquipmentService { * ### Update release 1.35.0 * Added support for including attachments on equipments in the response by setting the new query parameter `include-attachments` to true. * + * Added new fields `maintenancePlantId`, `equipmentCategoryId`, `maintenanceConceptId`, `createdOnDate` and `changedOnDate` to response body. + * + * Added new filters based on the new fields - `maintenancePlantId`, `equipmentCategoryId`, `maintenanceConceptId`, `createdOnDate` and `changedOnDate`. + * * @returns EquipmentSearchItem Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -706,6 +718,12 @@ export class EquipmentService { technicalIdentificationNumberAnyOf, characteristicId, classId, + equipmentCategoryIdAnyOf, + maintenanceConceptIdAnyOf, + createdBeforeDate, + createdAfterDate, + changedBeforeDate, + changedAfterDate, includeMaintenanceRecords = false, includeMaintenanceRecordTypes, includeOnlyOpenMaintenanceRecords = false, @@ -744,7 +762,7 @@ export class EquipmentService { */ characteristicValueAnyOf?: string, /** - * Optional comma separated string array of plant-ids to filter your result to one or more plants. Wildcards are not supported. This query parameter can not be used on its own. + * Optional comma separated string array of plant-ids to filter your result to one or more plants (`plantId`) or maintenance plants (`maintenancePlantId`). Wildcards are not supported. This query parameter can not be used on its own. */ plantIdAnyOf?: string, /** @@ -763,6 +781,30 @@ export class EquipmentService { * Required field if `characteristic-value-any-of` is supplied. */ classId?: string | null, + /** + * Optional comma separated string array of equipment category Id (`equipmentCategoryId` in response model). Wildcards are not supported. + */ + equipmentCategoryIdAnyOf?: Array, + /** + * Optional comma separated string array of Maintenance Concept Ids (`maintenanceConceptId` in response model). Wildcards are not supported. + */ + maintenanceConceptIdAnyOf?: Array, + /** + * Latest `createdOnDate` date to include. Use together with `created-after-date` to get Equipment created in the given time period. + */ + createdBeforeDate?: string | null, + /** + * Earliest `createdOnDate` date to include. Use together with `created-before-date` to get Equipment created in the given time period. + */ + createdAfterDate?: string | null, + /** + * Latest `changedOnDate` date to include. Use together with `changed-after-date` to get Equipment changed in the given time period. + */ + changedBeforeDate?: string | null, + /** + * Earliest `changedOnDate` date to include. Use together with `changed-before-date` to get Equipment changed in the given time period. + */ + changedAfterDate?: string | null, /** * Include maintenance records. If include-maintenance-record-types is not supplied, all supported types are returned */ @@ -844,6 +886,12 @@ export class EquipmentService { 'technical-identification-number-any-of': technicalIdentificationNumberAnyOf, 'characteristic-id': characteristicId, 'class-id': classId, + 'equipment-category-id-any-of': equipmentCategoryIdAnyOf, + 'maintenance-concept-id-any-of': maintenanceConceptIdAnyOf, + 'created-before-date': createdBeforeDate, + 'created-after-date': createdAfterDate, + 'changed-before-date': changedBeforeDate, + 'changed-after-date': changedAfterDate, 'include-maintenance-records': includeMaintenanceRecords, 'include-maintenance-record-types': includeMaintenanceRecordTypes, 'include-only-open-maintenance-records': includeOnlyOpenMaintenanceRecords, 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 141422827..c48dbd591 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/FailureReportsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/FailureReportsService.ts @@ -7,7 +7,7 @@ import type { FailureReport } from '../models/FailureReport'; import type { FailureReportBasic } from '../models/FailureReportBasic'; import type { FailureReportCreate } from '../models/FailureReportCreate'; import type { FailureReportJsonPatch } from '../models/FailureReportJsonPatch'; -import type { FailureReportSimple } from '../models/FailureReportSimple'; +import type { FailureReportSimpleForSearch } from '../models/FailureReportSimpleForSearch'; import type { MaintenanceRecordActivity } from '../models/MaintenanceRecordActivity'; import type { MaintenanceRecordActivityCreate } from '../models/MaintenanceRecordActivityCreate'; import type { MaintenanceRecordActivityJsonPatch } from '../models/MaintenanceRecordActivityJsonPatch'; @@ -107,6 +107,10 @@ export class FailureReportsService { * ### 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. * + * ### Update release 1.35.0 + * Added `workOrderTypeId` and `workOrderId` to the response. `workOrderId` includes the id of work orders, not constrained to only showing corrective work orders. + * `correctiveWorkOrderId` has been corrected to only show the work order id if it is a corrective work order. + * * @returns FailureReport Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -253,6 +257,10 @@ export class FailureReportsService { * ### 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. * + * ### Update release 1.35.0 + * Added `workOrderTypeId` and `workOrderId` to the response. `workOrderId` includes the id of work orders, not constrained to only showing corrective work orders. + * `correctiveWorkOrderId` has been corrected to only show the work order id if it is a corrective work order. + * * @returns FailureReportBasic Success, the failure report has been updated * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -486,7 +494,11 @@ export class FailureReportsService { * * Added property `workCenterId` * - * @returns FailureReportSimple Success + * ### Update release 1.35.0 + * Added `workOrderTypeId` and `workOrderId` to the response. `workOrderId` includes the id of work orders, not constrained to only showing corrective work orders. + * `correctiveWorkOrderId` has been corrected to only show the work order id if it is a corrective work order. + * + * @returns FailureReportSimpleForSearch Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ @@ -527,7 +539,7 @@ export class FailureReportsService { * Comma separated list of work center IDs to filter by */ workCenterIds?: Array, - }): CancelablePromise | ProblemDetails> { + }): CancelablePromise | ProblemDetails> { return __request(OpenAPI, { method: 'GET', url: '/maintenance-records/failure-reports', @@ -593,6 +605,10 @@ export class FailureReportsService { * ### Update release 1.31.0 * Removed requirement for providing `reasonId` as part of the `technicalFeedbackParameters` when `source` is `TechnicalFeedback`. * + * ### Update release 1.35.0 + * Added `workOrderTypeId` and `workOrderId` to the response. `workOrderId` includes the id of work orders, not constrained to only showing corrective work orders. + * `correctiveWorkOrderId` has been corrected to only show the work order id if it is a corrective work order. + * * @returns ProblemDetails Response for other HTTP status codes * @returns FailureReportBasic Created * @throws ApiError diff --git a/packages/api/maintenance-api/src/lib/generated/services/MaintenancePlansService.ts b/packages/api/maintenance-api/src/lib/generated/services/MaintenancePlansService.ts index 12d7df270..9d543c11b 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/MaintenancePlansService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/MaintenancePlansService.ts @@ -27,13 +27,13 @@ export class MaintenancePlansService { * Maintenance Plan - Lookup * Lookup single Maintenance Plan * - * ### Update version 1.8.0 + * ### Update release 1.8.0 * Added isActive property. * - * ### Update version 1.13.0 + * ### Update release 1.13.0 * Added uniqueKey in TaskListOperations. * - * ### Update version 1.14.0 + * ### Update release 1.14.0 * Removed `taskList` and `objectList` properties from the response schema. They were never included in the actual * response, so this change has no implication on the data received from the API. * @@ -448,7 +448,7 @@ export class MaintenancePlansService { * ### Examples * `/maintenance-plans?filter=by-task-id&task-id=T-10012713-02&api-version=v1`. * - * ### Update version 1.8.0 + * ### Update release 1.8.0 * Added isActive property. * * @returns MaintenancePlanForSearchByTask Success 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 1bcac3f0d..01f07da00 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/MaintenanceRecordsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/MaintenanceRecordsService.ts @@ -61,6 +61,10 @@ export class MaintenanceRecordsService { * ### Update release 1.16.0 * Added property `workCenterId` to `maintenanceRecords.failureReports` * + * ### Update release 1.35.0 + * Added `workOrderTypeId` and `workOrderId` to the response for failure reports. `workOrderId` + * includes the id of work orders, not constrained to only showing corrective work orders. + * * @returns MaintenanceRecordList Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError 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 fb0785cc8..c15bb46a2 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/MasterDataForPlantsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/MasterDataForPlantsService.ts @@ -153,27 +153,27 @@ export class MasterDataForPlantsService { * ### Overview * Lookup a single plant with related information. * - * ### Update version 1.6.0 + * ### Update release 1.6.0 * Added `include-revisions` for reading master data on revisions for the `planningPlantId` of the provided `plantId`. * - * ### Update version 1.7.0 + * ### Update release 1.7.0 * Added `include-systems` query parameter. * - * ### Update version 1.13.0 + * ### Update release 1.13.0 * Added `include-equipment-catalog-profiles` query parameter. * - * ### Update version 1.14.0 + * ### Update release 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 version 1.17.0 + * ### Update release 1.17.0 * Added the `allowSimplifiedTimeAndProgress` flag to represent is the plant is valid for Non-CATS time recording. * * Updated PlanningPlantRevision-model. * - * ### Update version 1.20.0 + * ### Update release 1.20.0 * Added query parameter `include-baseline-plans` related to `OM104.01.06 - Prepare Work order plan` and `work-order-plan/`. * - * ### Update version 1.34.0 + * ### Update release 1.34.0 * Added `include-responsible-persons` to the response. Added `responsiblePersons` to the response. * * @returns Plant Success @@ -296,6 +296,9 @@ export class MasterDataForPlantsService { * Added `include-cost-data-for-materials` query parameter. * When this parameter is set to `true`, the following properties will be included in `materials` expand: `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup`. * + * ### Update release 1.35.0 + * Added new properties `requisitionerId` and `deliveryComplete` to `materials` in `operations`. + * * @returns PlanningPlantRevision Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -367,7 +370,7 @@ export class MasterDataForPlantsService { * ### 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 + * ### Update release 1.28.0 * Added `changedDateTime`,`changedById`, `changedBy`, `changedByEmail`. * * ### Update release 1.29.0 @@ -389,6 +392,9 @@ export class MasterDataForPlantsService { * Added `include-cost-data-for-materials` query parameter. * When this parameter is set to `true`, the following properties will be included in `materials` expand: `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup`. * + * ### Update release 1.35.0 + * Added new properties `requisitionerId` and `deliveryComplete` to `materials` in `operations`. + * * @returns RevisionWorkOrderOperation Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -400,7 +406,7 @@ export class MasterDataForPlantsService { includeTextItemMaterials = false, includeCostDataForMaterials = false, perPage, - page, + page = 1, }: { plantId: string, revisionId: string, @@ -462,16 +468,16 @@ export class MasterDataForPlantsService { * Parameters: * - planning-plant-id (supports comma-separated list) * - * ### Update version 1.13.0 + * ### Update release 1.13.0 * Added `include-equipment-catalog-profiles` query parameter. * - * ### Update version 1.17.0 + * ### Update release 1.17.0 * Added the `allowSimplifiedTimeAndProgress` flag to represent is the plant is valid for Non-CATS time recording. * - * ### Update version 1.20.0 + * ### Update release 1.20.0 * Added query parameter `include-baseline-plans` related to `OM104.01.06 - Prepare Work order plan` and `work-order-plan/`. * - * ### Upcoming change + * ### Update release 1.34.0 * Added `include-responsible-persons` to the response. Added `responsiblePersons` to the response. * * @returns Plant Success diff --git a/packages/api/maintenance-api/src/lib/generated/services/MasterDataForWorkOrdersService.ts b/packages/api/maintenance-api/src/lib/generated/services/MasterDataForWorkOrdersService.ts index 620aad38f..474b59e08 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/MasterDataForWorkOrdersService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/MasterDataForWorkOrdersService.ts @@ -2,6 +2,7 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { CostCategory } from '../models/CostCategory'; import type { ProblemDetails } from '../models/ProblemDetails'; import type { SafetyMeasure } from '../models/SafetyMeasure'; import type { StandardTextTemplate } from '../models/StandardTextTemplate'; @@ -86,6 +87,26 @@ export class MasterDataForWorkOrdersService { }); } + /** + * Work orders - Get cost categories + * ### Overview + * Get a list of cost categories. They can be added to a work order when it requires special cost tracking. + * + * @returns CostCategory Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static getCostCategories(): CancelablePromise | ProblemDetails> { + return __request(OpenAPI, { + method: 'GET', + url: '/work-orders/cost-categories', + errors: { + 400: `Request is missing required parameters`, + 403: `User does not have sufficient rights`, + }, + }); + } + /** * Technical feedback - Master data * ### Overview 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 705b3b380..19c85eda5 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/ModificationWorkOrdersService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/ModificationWorkOrdersService.ts @@ -174,6 +174,13 @@ export class ModificationWorkOrdersService { * * Added property `requiredEndDate`, `isHSECritical` and `isProductionCritical` to the response. * + * ### Update release 1.35.0 + * Added new properties `requisitionerId` and `deliveryComplete` to `materials` in `operations`. + * + * Added new properties `personResponsible`, `personResponsibleId` and `personResponsibleEmail` to `operations`. + * + * Added new property `requisitionerId` to `serviceOperations`. + * * @returns ModificationWorkOrder Success * @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 b9f901fbf..9aaf9d5cf 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/ModifiedEndpointsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/ModifiedEndpointsService.ts @@ -2,9 +2,31 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ +import type { CorrectiveWorkOrder } from '../models/CorrectiveWorkOrder'; +import type { Document } from '../models/Document'; +import type { Equipment } from '../models/Equipment'; +import type { EquipmentBasicV2 } from '../models/EquipmentBasicV2'; +import type { EquipmentCreate } from '../models/EquipmentCreate'; import type { EquipmentSearchItem } from '../models/EquipmentSearchItem'; +import type { FailureReport } from '../models/FailureReport'; +import type { FailureReportBasic } from '../models/FailureReportBasic'; +import type { FailureReportCreate } from '../models/FailureReportCreate'; +import type { FailureReportJsonPatch } from '../models/FailureReportJsonPatch'; +import type { FailureReportSimpleForSearch } from '../models/FailureReportSimpleForSearch'; +import type { MaintenanceRecordList } from '../models/MaintenanceRecordList'; +import type { ModificationWorkOrder } from '../models/ModificationWorkOrder'; +import type { PlanningPlantRevision } from '../models/PlanningPlantRevision'; import type { PreventiveWorkOrder } from '../models/PreventiveWorkOrder'; import type { ProblemDetails } from '../models/ProblemDetails'; +import type { ProjectWorkOrder } from '../models/ProjectWorkOrder'; +import type { RevisionWorkOrderOperation } from '../models/RevisionWorkOrderOperation'; +import type { SASChangeWorkOrder } from '../models/SASChangeWorkOrder'; +import type { SubseaWorkOrder } from '../models/SubseaWorkOrder'; +import type { SubseaWorkOrderMaterialForAddMaterialRespone } from '../models/SubseaWorkOrderMaterialForAddMaterialRespone'; +import type { Tag } from '../models/Tag'; +import type { TagSearch } from '../models/TagSearch'; +import type { WorkOrderMaterialAdd } from '../models/WorkOrderMaterialAdd'; +import type { WorkOrderMaterialForAddMaterialRespone } from '../models/WorkOrderMaterialForAddMaterialRespone'; import type { WorkOrderOptimizedForQuery } from '../models/WorkOrderOptimizedForQuery'; import type { WorkOrderWithOperationList } from '../models/WorkOrderWithOperationList'; @@ -15,177 +37,220 @@ import { request as __request } from '../core/request'; export class ModifiedEndpointsService { /** - * Equipment - Search + * Maintenance records - Search * ### Overview - * Search for equipment and include related maintenance information. + * Search for Maintenance records regardless of type through predefined filters. + * Each filter has a defined action and a set of parameters as described below. * - * The endpoint has several include query parameters which allows a client to retrieve only the information which is relevant for their use case. + * ### Response + * The response does not include all details for each Maintenance record. + * This can be found by subsequent call to lookup for the respective maintenance record resource type * - * The client must in the request provide at least one of the following search parameters: - * * `equipment-id-any-of` - * * `serial-number-any-of` - * * `vendor-part-number-any-of` - * * `material-id-any-of` - * * `characteristic-value-any-of` - * * `equipment-any-of` - * * `technical-id-any-of` + * ### Filter: by-external-partner-record-id + * Find open Maintenance records for an id in an external partner system. Note: In theory different external system could have the same `external-partner-record-id` but it's very unlikely. Clients are recommended to filter the response based on the plants they are interested in to avoid any issues. * - * These parameters allow a comma-separated list of entries. + * Parameters: + * - external-partner-record-id * - * If more than one of these parameters are supplied in the same request, the equipment in the response will need to fulfill all parameters (ie. operator AND is used between the parameter). + * ### Filter: my-recent-maintenance-records + * Find maintenance record created by the logged in user. * - * Query parameters `include-only-open-maintenance-records` and `include-only-open-work-orders` have a recommended value of `true` in order to improve performance (default value `false`). + * Parameters: + * - created-after-datetime (optional) * - * ### Important information - * For warehouse and logistics data of an equipment, use SCM Logistics API. + * ### Filter: recently-changed + * Find maintenance records which have been recently changed (created or updated) for a given plant. Normally, clients will provide parameters changed-since-datetime and plant-id and in this case the endpoint will return any changed maintenance record from changed-since-datetime and to now. It is also possible to add before-datetime query parameter and the endpoint will then return any changed maintenance between changed-since-datetime and before-datetime. * - * ### Example usage - * `/equipment?serial-number-any-of=4500695422-20-003,4500695422-20-004&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&api-version=v1` - Search equipment based on serialNumber with characteritics. 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). + * Parameters: + * - plant-id + * - changed-since-datetime + * - before-datetime (optional) * - * When using the `characteristic-value-any-of` it is important to URI Encode the input data especially when there are special characters as part of the input: + * ### Update release 1.2.0 + * Added filter `my-recent-maintenance-records`. * - * `/equipment?characteristic-value-any-of=%3D17445%2F9818,%3D17433/6333&class-id=L_PART&characteristic-id=L_E3DREF&plant-id=1201&api-version=v1` + * ### Update release 1.5.0 + * Added filter `recently-changed` and maintenance record types `modification-proposal`, `certification-report`,`technical-information-update-request` and `technical-clarification`. * - * ### 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). + * ### Update release 1.8.0 + * Added properties hasUnsafeFailureMode and unsafeFailureModeStatus for failure reports. * - * ### Update release 1.5.0 - * Fixed known limitation for `include-work-orders` and `include-only-open-work-orders=false`. + * ### Update release 1.9.0 + * Renamed property plannerGroupPlantId to planningPlantId. * - * Bugfix for include-work-orders related to deleted equipment reservations. + * ### Update release 1.12.0 + * Added property `maintenanceRecordTypeId`. * - * Added revisionId and revision to related work orders (represents shutdown or campaign work). + * ### Update release 1.16.0 + * Added property `workCenterId` to `maintenanceRecords.failureReports` * - * ### 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) + * ### Update release 1.35.0 + * Added `workOrderTypeId` and `workOrderId` to the response for failure reports. `workOrderId` + * includes the id of work orders, not constrained to only showing corrective work orders. * - * ### Update release 1.7.0 - * Added property parentEquipmentId. + * @returns MaintenanceRecordList Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static searchMaintenanceRecords({ + filter, + externalPartnerRecordId, + createdAfterDatetime, + plantId, + changedSinceDatetime, + beforeDatetime, + includeMaintenanceRecordTypes, + }: { + /** + * Filter to limit the failure reports by + */ + filter: 'by-external-partner-record-id' | 'my-recent-maintenance-records' | 'recently-changed', + /** + * If failure report was initially created in an external system, this represent the unique id of it + */ + externalPartnerRecordId?: string, + /** + * Optional parameter to limit the response to only maintenance records changed after changed-since-datetime but before this datetime + */ + createdAfterDatetime?: string, + /** + * Plant identifier + */ + plantId?: string, + /** + * Earliest datetime to returned changed work orders for + */ + changedSinceDatetime?: string, + /** + * Optional parameter to limit the response to only work orders changed after changed-since-datetime but before this datetime + */ + beforeDatetime?: string, + /** + * Include which types of maintenance records + */ + includeMaintenanceRecordTypes?: Array<'failure-report' | 'activity-report' | 'certification-report' | 'technical-information-update-request' | 'technical-clarification' | 'modification-proposal'>, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/maintenance-records', + query: { + 'filter': filter, + 'external-partner-record-id': externalPartnerRecordId, + 'created-after-datetime': createdAfterDatetime, + 'plant-id': plantId, + 'changed-since-datetime': changedSinceDatetime, + 'before-datetime': beforeDatetime, + 'include-maintenance-record-types': includeMaintenanceRecordTypes, + }, + errors: { + 400: `Bad request, for example if \`before-datetime\` is before \`changed-since-datetime\``, + 404: `The specified resource was not found`, + }, + }); + } + + /** + * Tag - Lookup + * ### Overview + * Lookup a single tag 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. + * Added properties `hasUnsafeFailureMode` and `unsafeFailureModeStatus` for failure reports. * - * ### Update release 1.12.0 - * Added property `quantityUnitId` + * ### 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 - * `modification-proposal` in `include-maintenance-record-types` now includes modification proposals in the response. + * Added `workOrderId` to response. * - * ### Update release 1.16.0 - * Added property `classId` to characteristics. + * Added `include-linear-data` and `include-status-details` query parameters. * - * Added properties `manufacturer` and `modelNumber`. + * Added properties `tagCategoryId`, `activeStatusIds`, `startUpDate` and `endOfUseDate`. * - * ### Update release 1.21.0 - * Added query parameter `include-person-responsible`, that expands work order response with person responsible. + * Added `modification-proposal` as a maintenance record type to include with `include-maintenance-record-types` parameter. * - * ### Update release 1.22.0 - * Added `include-measuring-points` and `include-last-measurement` query parameters. + * ### Update release 1.16.0 + * Added property `classId` to characteristics. * - * ### Update release 1.24.0 - * Added `characteristic-value-any-of`, `class-id`, `characteristic-id` and `plant-id-any-of` query parameters. - * Can be used to search for equipment based on values of a characteristic. - * In addition, an optional filter on a plant can be supplied. + * Added query parameters `include-attachments` and `include-url-references`. * - * Added property `cmrIndicator` for WorkOrders. + * Added property `workCenterId` * - * Added query parameter `equipment-any-of`, a wildcard search based on `equipment` + * ### Update release 1.21.0 + * Added property `area`. * - * ### Update release 1.25.0 - * Added query parameter `include-sub-equipment` + * ### Update release 1.24.0 + * `urlReferences` and `attachments` now include the property `documentCreatedDate` * - * ### Update release 1.26.0 - * Added query parameter `include-status-details`. - * Added properties `tagId` and `tagPlantId` + * Added property `cmrIndicator` for WorkOrders * * ### Update release 1.27.0 * Work orders now include the property 'isOpen' * - * ### Update release 1.31.0 - * Added properties `manufacturerPartNumber`, `technicalIdentificationNumber`, `objectWeight` and `unitOfWeight`to response body. - * - * Added query parameter `technical-identification-number-any-of` to allow searching based on `technicalIdentificationNumber`. + * ### Update release 1.28.0 + * `billOfMaterials` now include the property `parentMaterialId` * - * ### Update release 1.34.0 - * Added property `linkedEquipment`, which can be included in each equipment in the response by using the new query parameter `include-linked-equipment`. + * Added `materialId` and `material` to the response * - * Added boolean property `hasLinkageToEquipment` that will be true if the equipment has any linked equipment. + * ### Update release 1.32.0 + * Added `changedDateTime` for attachments. * * ### Update release 1.35.0 - * Added support for including attachments on equipments in the response by setting the new query parameter `include-attachments` to true. + * Added new fields `maintenancePlantId`, `createdOnDate` and `changedOnDate`. * - * @returns EquipmentSearchItem Success + * @returns Tag Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static searchEquipment({ - equipmentIdAnyOf, - serialNumberAnyOf, - vendorPartNumberAnyOf, - materialIdAnyOf, - characteristicValueAnyOf, - plantIdAnyOf, - equipmentAnyOf, - technicalIdentificationNumberAnyOf, - characteristicId, - classId, + public static lookupTag({ + plantId, + tagId, includeMaintenanceRecords = false, includeMaintenanceRecordTypes, - includeOnlyOpenMaintenanceRecords = false, includeWorkOrders = true, - includePersonResponsible = false, + includeWorkOrderTypes, + includeInstalledEquipment = false, + includeCatalogProfileDetails = false, + includeMaintenancePlanItems = false, includeMeasuringPoints = false, includeLastMeasurement = false, - includeSubEquipment = false, - includeStatusDetails = false, - includeWorkOrderTypes, - includeOnlyOpenWorkOrders = false, includeCharacteristics = false, - includeLinkedEquipment = false, + includeBillOfMaterials = false, includeAttachments = false, - perPage = 20, - page = 1, + includeUrlReferences = false, + includeStatusDetails = false, + includeLinearData = false, }: { /** - * Search based on equipmentIds. Wildcards are supported - */ - equipmentIdAnyOf?: Array, - /** - * Search based on serialNumber. Wildcards are supported - */ - serialNumberAnyOf?: Array, - /** - * Search based on partNumber. Wildcards are supported - */ - vendorPartNumberAnyOf?: Array, - /** - * Search based on materialId. Wildcards are supported - */ - materialIdAnyOf?: Array, - /** - * 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. - */ - characteristicValueAnyOf?: string, - /** - * Optional comma separated string array of plant-ids to filter your result to one or more plants. Wildcards are not supported. This query parameter can not be used on its own. - */ - plantIdAnyOf?: string, - /** - * Optional comma separated string array of equipment descriptions/titles (`equipment` in response model). Wildcards are supported. - */ - equipmentAnyOf?: string | null, - /** - * Optional comma separated string array of technical identification numbers (`technicalIdentificationNumber` in response model). Wildcards are not supported. - */ - technicalIdentificationNumberAnyOf?: string, - /** - * Required field if `characteristic-value-any-of` is supplied. Endpoint [/characteristics/{class-id}](#operation/LookupClass) can be used to find characteristic ids - */ - characteristicId?: string | null, - /** - * Required field if `characteristic-value-any-of` is supplied. + * Plants or maintenance plants to include tags from. */ - classId?: string | null, + plantId: string, + tagId: string, /** * Include maintenance records. If include-maintenance-record-types is not supplied, all supported types are returned */ @@ -194,314 +259,253 @@ export class ModifiedEndpointsService { * Include which types of maintenance records */ includeMaintenanceRecordTypes?: Array<'failure-report' | 'activity-report' | 'certification-report' | 'technical-information-update-request' | 'technical-clarification' | 'modification-proposal'>, - /** - * Limit include-maintenance-records to only open maintenance records. Recommend using `true` in order to improve performance. - */ - includeOnlyOpenMaintenanceRecords?: boolean, /** * Include work orders. If include-work-order-types is not supplied, all supported types are returned. */ includeWorkOrders?: boolean, /** - * Include person responsible information in response, for example the email or name of the person responsible. May have a slight performance impact. - */ - includePersonResponsible?: boolean, - /** - * Include measuring points for this tag + * Include which types of work orders. Use comma-separated list of entries. */ - includeMeasuringPoints?: boolean, + includeWorkOrderTypes?: Array<'correctiveWorkOrders' | 'preventiveWorkOrders' | 'modificationWorkOrders' | 'sasChangeWorkOrders' | 'projectWorkOrders' | 'subseaWorkOrders'>, /** - * Include last measurement for the measuring points (only relevant if include-measuring-points is true or if looking up measuring point) + * Include installed equipment */ - includeLastMeasurement?: boolean, + includeInstalledEquipment?: boolean, /** - * Include child equipment for an equipment. - * Limit to only the first level childs of the hierarchy. - * + * Include possible detection methods, failure modes and failure mechanisms */ - includeSubEquipment?: boolean, + includeCatalogProfileDetails?: boolean, /** - * Include detailed information for statuses (both active and non-active) + * Include Maintenance Plan items this functional location is part of */ - includeStatusDetails?: boolean, + includeMaintenancePlanItems?: boolean, /** - * Include which types of work orders. Use comma-separated list of entries. + * Include measuring points for this tag */ - includeWorkOrderTypes?: Array<'correctiveWorkOrders' | 'preventiveWorkOrders' | 'modificationWorkOrders' | 'sasChangeWorkOrders' | 'projectWorkOrders' | 'subseaWorkOrders'>, + includeMeasuringPoints?: boolean, /** - * Limit include-work-orders to only open work order + * Include last measurement for the measuring points (only relevant if include-measuring-points is true or if looking up measuring point) */ - includeOnlyOpenWorkOrders?: boolean, + includeLastMeasurement?: boolean, /** - * Include equipment characteristics such as 'Kontrollkort gyldig til' and 'Equipment group' + * Include tag characteristics such as 'Function Fail Consequence' and 'Safety Critical Element (SCE)' */ includeCharacteristics?: boolean, /** - * Include list of equipment that are physically linked to this equipment. + * Include bill of materials (also known as structure list) for tag and installed equipment */ - includeLinkedEquipment?: boolean, + includeBillOfMaterials?: boolean, /** * Include equipment or tag attachments */ includeAttachments?: boolean, /** - * Results to return pr page + * Include URL references for object */ - perPage?: number, + includeUrlReferences?: boolean, /** - * Page to fetch + * Include detailed information for statuses (both active and non-active) */ - page?: number, - }): CancelablePromise | ProblemDetails> { + includeStatusDetails?: boolean, + /** + * Include linear data + */ + includeLinearData?: boolean, + }): CancelablePromise { return __request(OpenAPI, { method: 'GET', - url: '/equipment', + url: '/plants/{plant-id}/tags/{tag-id}', + path: { + 'plant-id': plantId, + 'tag-id': tagId, + }, query: { - 'equipment-id-any-of': equipmentIdAnyOf, - 'serial-number-any-of': serialNumberAnyOf, - 'vendor-part-number-any-of': vendorPartNumberAnyOf, - 'material-id-any-of': materialIdAnyOf, - 'characteristic-value-any-of': characteristicValueAnyOf, - 'plant-id-any-of': plantIdAnyOf, - 'equipment-any-of': equipmentAnyOf, - 'technical-identification-number-any-of': technicalIdentificationNumberAnyOf, - 'characteristic-id': characteristicId, - 'class-id': classId, 'include-maintenance-records': includeMaintenanceRecords, 'include-maintenance-record-types': includeMaintenanceRecordTypes, - 'include-only-open-maintenance-records': includeOnlyOpenMaintenanceRecords, 'include-work-orders': includeWorkOrders, - 'include-person-responsible': includePersonResponsible, + '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-sub-equipment': includeSubEquipment, - 'include-status-details': includeStatusDetails, - 'include-work-order-types': includeWorkOrderTypes, - 'include-only-open-work-orders': includeOnlyOpenWorkOrders, 'include-characteristics': includeCharacteristics, - 'include-linked-equipment': includeLinkedEquipment, + 'include-bill-of-materials': includeBillOfMaterials, 'include-attachments': includeAttachments, - 'per-page': perPage, - 'page': page, + 'include-url-references': includeUrlReferences, + 'include-status-details': includeStatusDetails, + 'include-linear-data': includeLinearData, }, errors: { - 400: `Request is missing required parameters`, 404: `The specified resource was not found`, }, }); } /** - * Preventive Work order - Lookup + * Equipment - 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). + * Lookup a single equipment with related maintenance 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. + * The endpoint has several include query parameters which allows a client to retrieve only the information which is relevant for their use case. * - * ### 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. + * ### Important information + * For warehouse and logistics data of an equipment, use SCM Logistics API. * - * ### Update release 1.3.0 - * Introduced holdDeliveryOnshore and requiredDatetime properties for materials. + * ### 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-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 - * Introduced property calculationKey for operations. + * `include-work-orders` now include work orders where the `equipmentId` is the main reference (`equipmentId` at work order header level). * * ### Update release 1.5.0 - * Added createdDateTime for attachments. + * Fixed known limitation for `include-work-orders` and `include-only-open-work-orders=false`. * - * Added revisionId and revision to work order response (represents shutdown or campaign work). + * Bugfix for include-work-orders related to deleted equipment reservations. * - * ### Update release 1.7.0 - * Added equipmentId and equipment to the response of tagsRelated. + * Added revisionId and revision to related work orders (represents shutdown or campaign work). * - * Added sourceId to related maintenance records. + * ### 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 isActive property for maintenance plan details. + * ### Update release 1.7.0 + * Added property parentEquipmentId. * * ### Update release 1.8.0 - * Introduced property activeStatusIds for operations. - * - * ### Update release 1.11.0 - * Added the following properties: + * Added properties hasUnsafeFailureMode and unsafeFailureModeStatus for failure reports. * - * * `personResponsibleId` and `personResponsibleEmail` - * * `isProductionCritical` and `isHSECritical` - * * `workCenter` - * * `plannerGroup` + * ### Update release 1.10.0 + * Added property `maintenanceRecordId` to measurements of measuring points. * * ### 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. + * Added properties `equipmentCategoryId` and `quantityUnitId`. * * ### Update release 1.15.0 - * Added new query parameter `include-measurements` + * Added `workOrderId` to the lastMeasurement. + * + * Added query parameter `include-url-references`. + * + * `modification-proposal` in `include-maintenance-record-types` now includes modification proposals in the response. * * ### 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`. + * Added property `classId` to characteristics. * - * ### Update release 1.19.0 - * Added properties `systemCondition` and `isExcludedFromWorkOrderPlan` for operations. + * Added properties `manufacturer` and `modelNumber`. * - * ### Update release 1.21.0 - * Added property `area` to tag details. + * `urlReferences` and `attachments` now include properties `documentType`, `documentNumber` and `documentTitle`. * - * 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 property `workCenterId` to `maintenanceRecords.failureReports` * - * ### 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.17.0 + * Add property `characteristics` to `urlReferences` in response * - * Added activeStatusIds to related maintenance records. + * Add query parameter `include-url-characteristics` + * + * ### Update release 1.21.0 + * Added query parameter `include-person-responsible`, that expands work order response with person responsible. * * ### Update release 1.24.0 - * `attachments` now include the property `documentCreatedDate` + * `urlReferences` and `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` for WorkOrders * - * Added property `cmrIndicator` in the response. + * ### Update release 1.25.0 + * Added query parameter `include-sub-equipment` * * ### 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 `tagId` and `tagPlantId` * * ### 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 release 1.33.0 - * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials`. + * Added properties `manufacturerPartNumber`, `technicalIdentificationNumber`, `objectWeight` and `unitOfWeight`to response body. * - * ### Update release 1.33.1 - * Added `include-cost-data-for-materials` query parameter. - * When this parameter is set to `true`, the following properties will be included in `materials` expand: `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup`. + * ### Update release 1.32.0 + * Added `changedDateTime` for attachments. * * ### Update release 1.34.0 - * Added new properties `callNumber`, `previousCall`, and `completionDate` to `maintenancePlan`. - * - * Added new property `relatedOperations` to `maintenanceRecords` and `tagsRelated`. - * Also added query parameter `include-related-operations` to include the property `relatedOperations`. + * Added property `linkedEquipment`, which can be included in the response by using the new query parameter `include-linked-equipment`. * - * Added properties `additionalCostWBSId`, `additionalCostWBS`, `costWBS`, `costWBSId` and `requiredEndDate` to the response. + * Added boolean property `hasLinkageToEquipment` that will be true if the equipment has any linked equipment. * * ### Update release 1.35.0 - * Added new property `dueDate` to the response. Removed the property `requiredEndDate`. + * Added new fields `maintenancePlantId`, `createdOnDate` and `changedOnDate`. * - * @returns PreventiveWorkOrder Success + * @returns Equipment Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static lookupPreventiveWorkOrder({ - workOrderId, - includeOperations = true, - includeServiceOperations = true, - includeTechnicalFeedback = false, - includeMaterials = false, - includeCostDataForMaterials = false, + public static lookupEquipment({ + equipmentId, includeMaintenanceRecords = false, - includeMaintenancePlanDetails = false, + includeMaintenanceRecordTypes, + includeOnlyOpenMaintenanceRecords = false, + includeWorkOrders = true, + includeWorkOrderTypes, + includeOnlyOpenWorkOrders = false, + includeCatalogProfileDetails = false, + includeCharacteristics = false, includeAttachments = false, - includeStatusDetails = false, - includeTagDetails = false, - includeRelatedTags = false, + includeUrlReferences = false, + includeUrlCharacteristics = false, includeMeasuringPoints = false, includeLastMeasurement = false, - includeMeasurements = false, - includeSafetyMeasures = false, - includeRelatedOperations = false, + includePersonResponsible = false, + includeSubEquipment = false, + includeStatusDetails = false, + includeLinkedEquipment = false, }: { - workOrderId: string, /** - * Include Work order operations + * The unique equipmentId in Equinor's system */ - includeOperations?: boolean, + equipmentId: string, /** - * Include Work order service operations + * Include maintenance records. If include-maintenance-record-types is not supplied, all supported types are returned */ - includeServiceOperations?: boolean, + includeMaintenanceRecords?: boolean, /** - * Include technical feedback required to be completed as part of work order execution. + * Include which types of maintenance records */ - includeTechnicalFeedback?: boolean, + includeMaintenanceRecordTypes?: Array<'failure-report' | 'activity-report' | 'certification-report' | 'technical-information-update-request' | 'technical-clarification' | 'modification-proposal'>, /** - * Include materials for Work order operations + * Limit include-maintenance-records to only open maintenance records */ - includeMaterials?: boolean, + includeOnlyOpenMaintenanceRecords?: boolean, /** - * Include cost data for materials. Additional authorization will be required to retrieve these fields. + * Include work orders. If include-work-order-types is not supplied, all supported types are returned. */ - includeCostDataForMaterials?: boolean, + includeWorkOrders?: boolean, /** - * Include related maintenance records (from object list and technical feedback) + * Include which types of work orders. Use comma-separated list of entries. */ - includeMaintenanceRecords?: boolean, + includeWorkOrderTypes?: Array<'correctiveWorkOrders' | 'preventiveWorkOrders' | 'modificationWorkOrders' | 'sasChangeWorkOrders' | 'projectWorkOrders' | 'subseaWorkOrders'>, /** - * Include details for maintenance plan + * Limit include-work-orders to only open work order */ - includeMaintenancePlanDetails?: boolean, + includeOnlyOpenWorkOrders?: boolean, /** - * Include Work order attachments (including PRT attachments) + * Include possible detection methods, failure modes and failure mechanisms */ - includeAttachments?: boolean, + includeCatalogProfileDetails?: boolean, /** - * Include detailed information for statuses (both active and non-active) + * Include equipment characteristics such as 'Kontrollkort gyldig til' and 'Equipment group' */ - includeStatusDetails?: boolean, + includeCharacteristics?: boolean, /** - * Include detailed for the main tag of the Work order + * Include equipment or tag attachments */ - includeTagDetails?: boolean, + includeAttachments?: boolean, /** - * Include related tags (from object list) + * Include URL references for object */ - includeRelatedTags?: boolean, + includeUrlReferences?: boolean, /** - * Include related measuring points from PRT + * Include characteristics for URL References + */ + includeUrlCharacteristics?: boolean, + /** + * Include measuring points for this tag */ includeMeasuringPoints?: boolean, /** @@ -509,475 +513,523 @@ export class ModifiedEndpointsService { */ includeLastMeasurement?: boolean, /** - * Include related measurements + * Include person responsible information in response, for example the email or name of the person responsible. May have a slight performance impact. */ - includeMeasurements?: boolean, + includePersonResponsible?: boolean, /** - * Include safety-measures in work order operations + * Include child equipment for an equipment. + * Limit to only the first level childs of the hierarchy. + * */ - includeSafetyMeasures?: boolean, + includeSubEquipment?: boolean, /** - * Includes the property `relatedOperations` in the response to expose operations that are related to an object in the objectlist (only relevant for related tags and related maintenance records). + * Include detailed information for statuses (both active and non-active) */ - includeRelatedOperations?: boolean, - }): CancelablePromise { + includeStatusDetails?: boolean, + /** + * Include list of equipment that are physically linked to this equipment. + */ + includeLinkedEquipment?: boolean, + }): CancelablePromise { return __request(OpenAPI, { method: 'GET', - url: '/work-orders/preventive-work-orders/{work-order-id}', + url: '/equipment/{equipment-id}', path: { - 'work-order-id': workOrderId, + 'equipment-id': equipmentId, }, query: { - 'include-operations': includeOperations, - 'include-service-operations': includeServiceOperations, - 'include-technical-feedback': includeTechnicalFeedback, - 'include-materials': includeMaterials, - 'include-cost-data-for-materials': includeCostDataForMaterials, 'include-maintenance-records': includeMaintenanceRecords, - 'include-maintenance-plan-details': includeMaintenancePlanDetails, + '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-attachments': includeAttachments, - 'include-status-details': includeStatusDetails, - 'include-tag-details': includeTagDetails, - 'include-related-tags': includeRelatedTags, + 'include-url-references': includeUrlReferences, + 'include-url-characteristics': includeUrlCharacteristics, 'include-measuring-points': includeMeasuringPoints, 'include-last-measurement': includeLastMeasurement, - 'include-measurements': includeMeasurements, - 'include-safety-measures': includeSafetyMeasures, - 'include-related-operations': includeRelatedOperations, + 'include-person-responsible': includePersonResponsible, + 'include-sub-equipment': includeSubEquipment, + 'include-status-details': includeStatusDetails, + 'include-linked-equipment': includeLinkedEquipment, }, 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`, }, }); } /** - * Work orders - Search + * Equipment - Create * ### Overview - * Search for Work orders regardless of type through predefined filters. - * Each filter has a defined action and a set of parameters as described below. + * Create equipment and possibly install at tag. * - * ### Response - * The response can include most of the details for each work order. - * If additional data is needed, it can be retrieved by using the endpoint represented in the `_links.self` property. + * ### Important information + * In the current version of the endpoint, it's only possible to create equipment with equipmentCategoryId `R` = Process Equipment. * + * If the request includes `installedAtTag`, the equipment will inherit properties such as `planningPlantId`, `plannerGroupId`, `workCenterId`, `ABCId`, `systemId` and `locationId`from the tag. * - * ### Filter: recently-changed - * Find Work orders which have been recently changed (created or updated) for a given plant. Normally, clients will provide the parameters `changed-since-datetime` and `plant-id` to return any changed Work order from `changed-since-datetime` to now. It is also possible to add `before-datetime` query parameter - the endpoint will then return any work order changed between `changed-since-datetime` and `before-datetime`. + * Access to the role `YO059 - Static Process Equipment Data Establisher (SAPP03)` is required. * - * Parameters: - * - `plant-id` - * - `changed-since-datetime` - * - `before-datetime` (optional) - * - * ### Filter: before-basic-end-date - * Find open Work orders before the `basic-end-date`. `basic-end-date` should be a date in the future so that already finished work orders will not be presented. - * - * Parameters: - * - `plant-id` - * - `basic-end-date` - * - `location-id` (optional) + * ### Update release 1.26.0 + * Added properties `tagId` and `tagPlantId` to response body. * - * ### Filter: by-external-partner-work-order-id - * Find Work orders for a 'work-order-id' in an external partner system. Note: In theory, different external systems could have the same `external-partner-id` but this is very unlikely. Clients are recommended to filter the response based on the plants they are interested in to avoid any issues. + * ### Update release 1.31.0 + * Added properties `manufacturerPartNumber`, `technicalIdentificationNumber`, `objectWeight` and `unitOfWeight` to response body. * - * Parameters: - * - `external-partner-work-order-id` + * ### Update release 1.35.0 + * Added new fields `maintenancePlantId`, `equipmentCategoryId`, `maintenanceConceptId`, `createdOnDate` and `changedOnDate` to response body. * - * ### Filter: by-cost-network - * Find Work orders based on Cost Network Id. + * @returns ProblemDetails Response for other HTTP status codes + * @returns EquipmentBasicV2 Created + * @throws ApiError + */ + public static createEquipment({ + requestBody, + }: { + /** + * Equipment to create + */ + requestBody: EquipmentCreate, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/equipment', + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad request, for example if missing required properties, \`equipmentCategoryId\` is not \`R\` or if \`installedAtTag\` is invalid or is not in service.`, + 403: `User does not have sufficient rights to create an equipment.`, + }, + }); + } + + /** + * Equipment - Search + * ### Overview + * Search for equipment and include related maintenance information. * - * Parameters: - * - `cost-network-id` - * - `plant-id` (optional) + * The endpoint has several include query parameters which allows a client to retrieve only the information which is relevant for their use case. * - * ### Filter: by-cost-wbs - * Find Work orders based on Cost WBS Id. + * The client must in the request provide at least one of the following search parameters: + * * `equipment-id-any-of` + * * `serial-number-any-of` + * * `vendor-part-number-any-of` + * * `material-id-any-of` + * * `characteristic-value-any-of` + * * `equipment-any-of` + * * `technical-identification-number-any-of` + * * `maintenance-concept-id-any-of` + * * `equipment-category-id-any-of` * - * Parameters: - * - `cost-wbs-id` - * - `plant-id` (optional) + * These parameters allow a comma-separated list of entries. * - * ### Filter: by-work-center-id - * Find Work orders based on their `workCenterId`. + * If more than one of these parameters are supplied in the same request, the equipment in the response will need to fulfill all parameters (the 'AND' operator will be used between the parameters). * - * Parameters: - * - `work-center-id-any-of` - * - `plant-id` (optional) + * Query parameters `include-only-open-maintenance-records` and `include-only-open-work-orders` have a recommended value of `true` in order to improve performance (default value `false`). * - * ### Filter: by-work-order-id - * Find Work orders based on their `workOrderId`. + * ### Important information + * For warehouse and logistics data of an equipment, use SCM Logistics API. * - * Parameters: - * - `work-order-ids-any-of` - * - `plant-id` (optional) + * ### Example usage + * `/equipment?serial-number-any-of=4500695422-20-003,4500695422-20-004&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&api-version=v1` - Search equipment based on serialNumber with characteritics. 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 0.11.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. + * When using the `characteristic-value-any-of` it is important to URI Encode the input data especially when there are special characters as part of the input: * - * Filter by-external-partner-work-order-id added. - * ### Update release 1.3.0 - * Bugfix related to plantId source. + * `/equipment?characteristic-value-any-of=%3D17445%2F9818,%3D17433/6333&class-id=L_PART&characteristic-id=L_E3DREF&plant-id=1201&api-version=v1` * * ### Update release 1.4.0 - * Introduced property calculationKey for operations. + * `include-work-orders` now include work orders where the `equipmentId` is the main reference (`equipmentId` at work order header level). * * ### Update release 1.5.0 - * Added revisionId and revision to work order response (represents shutdown or campaign work). + * Fixed known limitation for `include-work-orders` and `include-only-open-work-orders=false`. + * + * Bugfix for include-work-orders related to deleted equipment reservations. + * + * Added revisionId and revision to related work orders (represents shutdown or campaign work). + * + * ### 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) + * + * ### Update release 1.7.0 + * Added property parentEquipmentId. + * + * ### Update release 1.8.0 + * Added properties hasUnsafeFailureMode and unsafeFailureModeStatus for failure reports. * * ### Update release 1.12.0 - * Improved performance of endpoint. + * Added property `quantityUnitId` * - * ### Update release 1.19.0 - * Added properties `systemCondition` and `isExcludedFromWorkOrderPlan` for operations. + * ### Update release 1.15.0 + * `modification-proposal` in `include-maintenance-record-types` now includes modification proposals in the response. + * + * ### Update release 1.16.0 + * Added property `classId` to characteristics. + * + * Added properties `manufacturer` and `modelNumber`. * * ### 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. + * Added query parameter `include-person-responsible`, that expands work order response with person responsible. + * + * ### Update release 1.22.0 + * Added `include-measuring-points` and `include-last-measurement` query parameters. * * ### Update release 1.24.0 - * Added filter `by-cost-wbs`, with required parameter `cost-wbs-id`. Can be used in combination with the optional parameter `plant-id` - * This filter only includes work orders where the WBS is represented on the work order level. It does not include work orders where WBS is only represented in the settlement rules. + * Added `characteristic-value-any-of`, `class-id`, `characteristic-id` and `plant-id-any-of` query parameters. + * Can be used to search for equipment based on values of a characteristic. + * In addition, an optional filter on a plant can be supplied. * - * Added filter `by-cost-network`, with required parameter `cost-network-id`. Can be used in combination with the optional parameter `plant-id` + * Added property `cmrIndicator` for WorkOrders. * - * Added property `cmrIndicator` to the top level objects in the response. + * Added query parameter `equipment-any-of`, a wildcard search based on `equipment` * - * ### Update release 1.27.0 - * Work orders now include the property `isOpen` + * ### Update release 1.25.0 + * Added query parameter `include-sub-equipment` * - * ### Update release 1.30.0 - * Modified GET work order to fetch data from Maintenance plant from the sap field `swerk`. + * ### Update release 1.26.0 + * Added query parameter `include-status-details`. + * Added properties `tagId` and `tagPlantId` + * + * ### Update release 1.27.0 + * Work orders now include the property 'isOpen' * * ### Update release 1.31.0 - * Fixed enum values for `schedulingStartConstraintId` and `schedulingFinishConstraintId` + * Added properties `manufacturerPartNumber`, `technicalIdentificationNumber`, `objectWeight` and `unitOfWeight`to response body. * - * ### Update release 1.35.0 - * Added filter `by-work-center-id` with the required parameter `work-center-id-any-of`. Can optionally be combined with the parameter `plant-id` + * Added query parameter `technical-identification-number-any-of` to allow searching based on `technicalIdentificationNumber`. * - * Added filter `by-work-order-id` with the required parameter `work-order-ids-any-of`. Can optionally be combined with the parameter `plant-id` + * ### Update release 1.34.0 + * Added property `linkedEquipment`, which can be included in each equipment in the response by using the new query parameter `include-linked-equipment`. * - * Added option to not include operations for the Work Orders by setting the optional parameter `include-operations` to `false` (default is `true`). This can improve performance for the endpoint. + * Added boolean property `hasLinkageToEquipment` that will be true if the equipment has any linked equipment. * - * Added property `requiredEndDate` to the top level objects in the response. + * ### Update release 1.35.0 + * Added support for including attachments on equipments in the response by setting the new query parameter `include-attachments` to true. * - * Added property `confirmationId` to `operations` + * Added new fields `maintenancePlantId`, `equipmentCategoryId`, `maintenanceConceptId`, `createdOnDate` and `changedOnDate` to response body. * - * @returns WorkOrderWithOperationList Success + * Added new filters based on the new fields - `maintenancePlantId`, `equipmentCategoryId`, `maintenanceConceptId`, `createdOnDate` and `changedOnDate`. + * + * @returns EquipmentSearchItem Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static searchWorkOrders({ - filter, - plantId, - changedSinceDatetime, - beforeDatetime, - includeWorkOrderText, - includeWorkOrderOperationText, + public static searchEquipment({ + equipmentIdAnyOf, + serialNumberAnyOf, + vendorPartNumberAnyOf, + materialIdAnyOf, + characteristicValueAnyOf, + plantIdAnyOf, + equipmentAnyOf, + technicalIdentificationNumberAnyOf, + characteristicId, + classId, + equipmentCategoryIdAnyOf, + maintenanceConceptIdAnyOf, + createdBeforeDate, + createdAfterDate, + changedBeforeDate, + changedAfterDate, + includeMaintenanceRecords = false, + includeMaintenanceRecordTypes, + includeOnlyOpenMaintenanceRecords = false, + includeWorkOrders = true, + includePersonResponsible = false, + includeMeasuringPoints = false, + includeLastMeasurement = false, + includeSubEquipment = false, + includeStatusDetails = false, includeWorkOrderTypes, - includeOperations = true, - basicEndDate, - locationId, - externalPartnerWorkOrderId, - costWbsId, - costNetworkId, - workCenterIdAnyOf, - workOrderIdsAnyOf, + includeOnlyOpenWorkOrders = false, + includeCharacteristics = false, + includeLinkedEquipment = false, + includeAttachments = false, + perPage = 20, + page = 1, }: { /** - * Filter to limit the work order by + * Search based on equipmentIds. Wildcards are supported */ - filter: 'recently-changed' | 'before-basic-end-date' | 'by-external-partner-work-order-id' | 'by-cost-network' | 'by-cost-wbs' | 'by-work-center-id' | 'by-work-order-id', + equipmentIdAnyOf?: Array, /** - * Plant identifier + * Search based on serialNumber. Wildcards are supported */ - plantId?: string, + serialNumberAnyOf?: Array, /** - * Earliest datetime to returned changed work orders for + * Search based on partNumber. Wildcards are supported */ - changedSinceDatetime?: string, + vendorPartNumberAnyOf?: Array, /** - * Optional parameter to limit the response to only work orders changed after changed-since-datetime but before this datetime + * Search based on materialId. Wildcards are supported */ - beforeDatetime?: string, + materialIdAnyOf?: Array, /** - * The text of the Work order is time-consuming to retrieve. Set to false to avoid returning it + * 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. */ - includeWorkOrderText?: boolean, + characteristicValueAnyOf?: string, /** - * The text of the Work order operation is time-consuming to retrieve. Set to false to avoid returning it + * Optional comma separated string array of plant-ids to filter your result to one or more plants (`plantId`) or maintenance plants (`maintenancePlantId`). Wildcards are not supported. This query parameter can not be used on its own. */ - includeWorkOrderOperationText?: boolean, + plantIdAnyOf?: string, /** - * Include which types of work orders. Use comma-separated list of entries. + * Optional comma separated string array of equipment descriptions/titles (`equipment` in response model). Wildcards are supported. */ - includeWorkOrderTypes?: Array<'correctiveWorkOrders' | 'preventiveWorkOrders' | 'modificationWorkOrders' | 'sasChangeWorkOrders' | 'projectWorkOrders' | 'subseaWorkOrders'>, + equipmentAnyOf?: string | null, /** - * Include operations for the Work orders in the response. + * Optional comma separated string array of technical identification numbers (`technicalIdentificationNumber` in response model). Wildcards are not supported. */ - includeOperations?: boolean, + technicalIdentificationNumberAnyOf?: string, /** - * Earliest date to find maintenance plan history for (optional for filter) + * Required field if `characteristic-value-any-of` is supplied. Endpoint [/characteristics/{class-id}](#operation/LookupClass) can be used to find characteristic ids */ - basicEndDate?: string, + characteristicId?: string | null, /** - * Structured location within the plant. Use /plants/{plant-id}/locations for possible values + * Required field if `characteristic-value-any-of` is supplied. */ - locationId?: string, + classId?: string | null, /** - * If work order was initially created in an external system, this represent the unique id of it + * Optional comma separated string array of equipment category Id (`equipmentCategoryId` in response model). Wildcards are not supported. */ - externalPartnerWorkOrderId?: string, + equipmentCategoryIdAnyOf?: Array, /** - * Required parameter if `filter=by-cost-wbs` + * Optional comma separated string array of Maintenance Concept Ids (`maintenanceConceptId` in response model). Wildcards are not supported. */ - costWbsId?: string, + maintenanceConceptIdAnyOf?: Array, /** - * Required parameter if `filter=by-cost-network` + * Latest `createdOnDate` date to include. Use together with `created-after-date` to get Equipment created in the given time period. */ - costNetworkId?: string, + createdBeforeDate?: string | null, /** - * Comma-separated list of `work-center-id`. + * Earliest `createdOnDate` date to include. Use together with `created-before-date` to get Equipment created in the given time period. */ - workCenterIdAnyOf?: string, + createdAfterDate?: string | null, /** - * Comma-separated list of `work-order-id`. + * Latest `changedOnDate` date to include. Use together with `changed-after-date` to get Equipment changed in the given time period. */ - workOrderIdsAnyOf?: string, - }): CancelablePromise { - return __request(OpenAPI, { - method: 'GET', - url: '/work-orders', - query: { - 'filter': filter, - 'plant-id': plantId, - 'changed-since-datetime': changedSinceDatetime, - 'before-datetime': beforeDatetime, - 'include-work-order-text': includeWorkOrderText, - 'include-work-order-operation-text': includeWorkOrderOperationText, - 'include-work-order-types': includeWorkOrderTypes, - 'include-operations': includeOperations, - 'basic-end-date': basicEndDate, - 'location-id': locationId, - 'external-partner-work-order-id': externalPartnerWorkOrderId, - 'cost-wbs-id': costWbsId, - 'cost-network-id': costNetworkId, - 'work-center-id-any-of': workCenterIdAnyOf, - 'work-order-ids-any-of': workOrderIdsAnyOf, - }, - }); - } - - /** - * Work orders - Optimized for query - * ### Overview - * Query work orders for potentially complicated patterns where speed is of the essence. - * - * `planning-plants` is the only mandatory fields, but clients should normally provide at least one more query criteria. - * - * A normal use case would be to first provide an initial query criteria based on user input. Then allow the end-users based on the resulting data select unwanted results based on specific attributes. The unwanted results should then be added to the exclusion list (for example `keywords-not` or `work-centers-not)` and the API call repeated. - * - * `max-results` have a default value of 1000 and is necessary to provide a quick response. - * - * The multi-line `text` property is not included by default, but can included by setting `include-text=true` in the request. This will influence performance significantly. - * - * Pagination is supported for this endpoint by setting values for `page` and `per-page`. If these parameteres are omitted, the result will be returned without pagination. - * - * ### Response - * The response schema differs slightly from the other work order endpoints as a result of the optimization for speed. - * - * ### Examples - * `/work-orders-optimized-for-query?api-version=v1&planning-plants=1100,1101,1102&tags-all-of=10B9` - Return work orders where tag is 10B9 - * - * `/work-orders-optimized-for-query?api-version=v1&planning-plants=1100,1101,1102&tags-all-of=AA15*&tags-not=AA15002` - Return work orders where tag has pattern `AA15*` but is not AA15002 - * - * `/work-orders-optimized-for-query?api-version=v1&planning-plants=1100,1101,1102&keywords-all-of=heli,male` - Return work orders where the title contains both `heli` and `male` - * - * `/work-orders-optimized-for-query?api-version=v1&planning-plants=1100,1101,1102&status-any-of=PREP,RDEX&created-after-date=2021-06-01` - Return work orders with status PREP or RDEX and created after a certain date - * - * ### Update release 1.5.0 - * Added revisionId to work order response (represents shutdown or campaign work). - * - * ### Update release 1.12.0 - * Added query parameter `include-maintenance-record`. - * - * ### Update release 1.16.0 - * Added property `workCenterId` to `maintenanceRecords.failureReports` - * - * ### Update release 1.29.0 - * Added properties `revision` and `changedDatetime`. - * - * Allow searching by `changedOnDay` when `is-open` is set. Search by using the new query parameters `changed-after-date` and `changed-before-date`. - * - * ### Update release 1.31.0 - * Added list of supported statuses for `status-all-of`, `status-any-of` and `status-not` query parameters. Status `REL` is now supported. - * - * Added property `hasStatusREL` to the response. - * - * ### Update release 1.35.0 - * Added optional pagination support. - * - * @returns WorkOrderOptimizedForQuery Success - * @returns ProblemDetails Response for other HTTP status codes - * @throws ApiError - */ - public static queryWorkOrdersOptimized({ - planningPlants, - keywordsAllOf, - keywordsAnyOf, - keywordsNot, - tagsAllOf, - tagsAnyOf, - tagsNot, - workCentersAnyOf, - workCentersNot, - systemsAnyOf, - systemsNot, - locationsAnyOf, - locationsNot, - sortFieldAnyOf, - sortFieldNot, - revisionCodeAnyOf, - revisionCodeNot, - statusAllOf, - statusAnyOf, - statusNot, - isOpen, - createdAfterDate, - createdBeforeDate, - changedAfterDate, - changedBeforeDate, - workOrderTypes, - sortBy, - includeText = false, - includeMaintenanceRecord = false, - maxResults, - perPage, - page, - }: { + changedBeforeDate?: string | null, /** - * Query based on planningPlantIds (any-of) + * Earliest `changedOnDate` date to include. Use together with `changed-before-date` to get Equipment changed in the given time period. */ - planningPlants: Array, + changedAfterDate?: string | null, /** - * Query based on keywords in title (case insensitive) + * Include maintenance records. If include-maintenance-record-types is not supplied, all supported types are returned */ - keywordsAllOf?: Array, + includeMaintenanceRecords?: boolean, /** - * Query based on keywords in title (case insensitive) + * Include which types of maintenance records */ - keywordsAnyOf?: Array, + includeMaintenanceRecordTypes?: Array<'failure-report' | 'activity-report' | 'certification-report' | 'technical-information-update-request' | 'technical-clarification' | 'modification-proposal'>, /** - * Query based on keywords in title (case insensitive) + * Limit include-maintenance-records to only open maintenance records. Recommend using `true` in order to improve performance. */ - keywordsNot?: Array, + includeOnlyOpenMaintenanceRecords?: boolean, /** - * Query based on tagIds. Expressions with wildcards can be used for example `1A*-6A`. Ensure the tagIds are url-encoded in order to handle special characters + * Include work orders. If include-work-order-types is not supplied, all supported types are returned. */ - tagsAllOf?: Array, + includeWorkOrders?: boolean, /** - * Query based on tagIds. Expressions with wildcards can be used for example `1A*-6A`. Ensure the tagIds are url-encoded in order to handle special characters + * Include person responsible information in response, for example the email or name of the person responsible. May have a slight performance impact. */ - tagsAnyOf?: Array, + includePersonResponsible?: boolean, /** - * Query based on tagIds. Expressions with wildcards can be used for example `AE55*`. Ensure the tagIds are url-encoded in order to handle special characters + * Include measuring points for this tag */ - tagsNot?: Array, + includeMeasuringPoints?: boolean, /** - * Query based on workCenterIds + * Include last measurement for the measuring points (only relevant if include-measuring-points is true or if looking up measuring point) */ - workCentersAnyOf?: Array, + includeLastMeasurement?: boolean, /** - * Query based on workCenterIds + * Include child equipment for an equipment. + * Limit to only the first level childs of the hierarchy. + * */ - workCentersNot?: Array, + includeSubEquipment?: boolean, /** - * Query based on systemIds + * Include detailed information for statuses (both active and non-active) */ - systemsAnyOf?: Array, + includeStatusDetails?: boolean, /** - * Query based on systemIds + * Include which types of work orders. Use comma-separated list of entries. */ - systemsNot?: Array, + includeWorkOrderTypes?: Array<'correctiveWorkOrders' | 'preventiveWorkOrders' | 'modificationWorkOrders' | 'sasChangeWorkOrders' | 'projectWorkOrders' | 'subseaWorkOrders'>, /** - * Query based on locationIds + * Limit include-work-orders to only open work order */ - locationsAnyOf?: Array, + includeOnlyOpenWorkOrders?: boolean, /** - * Query based on locationIds + * Include equipment characteristics such as 'Kontrollkort gyldig til' and 'Equipment group' */ - locationsNot?: Array, + includeCharacteristics?: boolean, /** - * Query based on sortField ()used for grouping work orders) + * Include list of equipment that are physically linked to this equipment. */ - sortFieldAnyOf?: Array, + includeLinkedEquipment?: boolean, /** - * Query based on sortField (used for grouping work orders) + * Include equipment or tag attachments */ - sortFieldNot?: Array, + includeAttachments?: boolean, /** - * Query based on revisionCode + * Results to return pr page */ - revisionCodeAnyOf?: Array, + perPage?: number, /** - * Query based on sortField (often used for revision codes) + * Page to fetch */ - revisionCodeNot?: Array, + page?: number, + }): CancelablePromise | ProblemDetails> { + return __request(OpenAPI, { + method: 'GET', + url: '/equipment', + query: { + 'equipment-id-any-of': equipmentIdAnyOf, + 'serial-number-any-of': serialNumberAnyOf, + 'vendor-part-number-any-of': vendorPartNumberAnyOf, + 'material-id-any-of': materialIdAnyOf, + 'characteristic-value-any-of': characteristicValueAnyOf, + 'plant-id-any-of': plantIdAnyOf, + 'equipment-any-of': equipmentAnyOf, + 'technical-identification-number-any-of': technicalIdentificationNumberAnyOf, + 'characteristic-id': characteristicId, + 'class-id': classId, + 'equipment-category-id-any-of': equipmentCategoryIdAnyOf, + 'maintenance-concept-id-any-of': maintenanceConceptIdAnyOf, + 'created-before-date': createdBeforeDate, + 'created-after-date': createdAfterDate, + 'changed-before-date': changedBeforeDate, + 'changed-after-date': changedAfterDate, + 'include-maintenance-records': includeMaintenanceRecords, + 'include-maintenance-record-types': includeMaintenanceRecordTypes, + 'include-only-open-maintenance-records': includeOnlyOpenMaintenanceRecords, + 'include-work-orders': includeWorkOrders, + 'include-person-responsible': includePersonResponsible, + 'include-measuring-points': includeMeasuringPoints, + 'include-last-measurement': includeLastMeasurement, + 'include-sub-equipment': includeSubEquipment, + 'include-status-details': includeStatusDetails, + 'include-work-order-types': includeWorkOrderTypes, + 'include-only-open-work-orders': includeOnlyOpenWorkOrders, + 'include-characteristics': includeCharacteristics, + 'include-linked-equipment': includeLinkedEquipment, + 'include-attachments': includeAttachments, + 'per-page': perPage, + 'page': page, + }, + errors: { + 400: `Request is missing required parameters`, + 404: `The specified resource was not found`, + }, + }); + } + + /** + * Document - Search + * ### Overview + * Search documents and include related information such as characteristics, materials, equipment and attachments. + * + * + * 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` + * + * **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.31.0 + * Added `include-inventory-count` query parameter to include `equipmentInventoryCount` and `materialInventoryCount` property in the response. + * + * Added support for including more business objects: `include-tags`, `include-measuring-points` and `include-maintenance-records`. + * + * ### Update release 1.32.0 + * Added `include-url-references` query parameter to include URL references in the response. + * + * Added properties `statusId` and `statusText` to the response. + * + * Added properties `partNumber` & `manufacturer` to `material` in the response. + * + * ### Update release 1.35.0 + * Added new fields `maintenancePlantId`, `equipmentCategoryId`, `maintenanceConceptId`, `createdOnDate` and `changedOnDate` for `equipment`. + * + * @returns Document 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, + includeMaintenanceRecords = false, + includeMeasuringPoints = false, + includeAttachments = false, + includeInventoryCount = false, + includeUrlReferences = false, + perPage = 50, + page = 1, + }: { /** - * Query based on statusIds (not all statuses are supported) + * Search based on `documentType`. */ - statusAllOf?: Array<'PREP' | 'PRCO' | 'RDEX' | 'STRT' | 'CANC' | 'RDOP' | 'CRTD' | 'TECO' | 'REL'>, + documentTypeAnyOf?: Array, /** - * Query based on statusIds (not all statuses are supported) + * Search based on `documentNumber`. */ - statusAnyOf?: Array<'PREP' | 'PRCO' | 'RDEX' | 'STRT' | 'CANC' | 'RDOP' | 'CRTD' | 'TECO' | 'REL'>, + documentNumberAnyOf?: Array, /** - * Query based on statusIds (not all statuses are supported) + * 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. */ - statusNot?: Array<'PREP' | 'PRCO' | 'RDEX' | 'STRT' | 'CANC' | 'RDOP' | 'CRTD' | 'TECO' | 'REL'>, + characteristicValueAnyOf?: string, /** - * Include only open work orders or only closed work orders. By default, all work orders are included. + * Required field if `characteristic-value-any-of` is supplied. Endpoint [/characteristics/{class-id}](#operation/LookupClass) can be used to find characteristic ids */ - isOpen?: boolean, + characteristicId?: string | null, /** - * Earliest creation date to include + * Required field if `characteristic-value-any-of` is supplied. */ - createdAfterDate?: string, + classId?: string | null, /** - * Latest creation date to include + * Include characteristics' */ - createdBeforeDate?: string, + includeCharacteristics?: boolean, /** - * Earliest `changedOnDay` date to include. Query parameter `is-open` must be set to `true` or `false` to use this parameter. + * Include material related to the object */ - changedAfterDate?: string, + includeMaterial?: boolean, /** - * Latest `changedOnDay` date to include. Query parameter `is-open` must be set to `true` or `false` to use this parameter. + * Include equipment related to the object */ - changedBeforeDate?: string, + includeEquipment?: boolean, /** - * Limit to specific work order types (one-of) + * Include tags. */ - workOrderTypes?: Array<'correctiveWorkOrders' | 'preventiveWorkOrders' | 'modificationWorkOrders' | 'sasChangeWorkOrders' | 'projectWorkOrders' | 'subseaWorkOrders'>, + includeTags?: boolean, /** - * Property to sort the results by + * Include maintenance records. If include-maintenance-record-types is not supplied, all supported types are returned */ - sortBy?: Array<'createdDateTime desc' | 'createdDateTime asc' | 'workOrderId desc' | 'workOrderId asc' | 'systemId desc' | 'systemId asc' | 'locationId desc' | 'locationId asc' | 'sortField desc' | 'sortField asc' | 'title desc' | 'title asc'>, + includeMaintenanceRecords?: boolean, /** - * Include the multi-line text of the work order (will cause the endpoint to go significantly slower) + * Include measuring points for this tag */ - includeText?: boolean, + includeMeasuringPoints?: boolean, /** - * Include the main maintenance record linked to the work order (if any) + * Include equipment or tag attachments */ - includeMaintenanceRecord?: boolean, + includeAttachments?: boolean, + includeInventoryCount?: boolean, /** - * Maximum number of results to include. Default is 1000. + * Include URL references for object */ - maxResults?: number, + includeUrlReferences?: boolean, /** * Results to return pr page */ @@ -986,44 +1038,2766 @@ export class ModifiedEndpointsService { * Page to fetch */ page?: number, - }): CancelablePromise | ProblemDetails> { + }): CancelablePromise | ProblemDetails> { return __request(OpenAPI, { method: 'GET', - url: '/work-orders-optimized-for-query', + url: '/documents', query: { - 'planning-plants': planningPlants, - 'keywords-all-of': keywordsAllOf, - 'keywords-any-of': keywordsAnyOf, - 'keywords-not': keywordsNot, - 'tags-all-of': tagsAllOf, - 'tags-any-of': tagsAnyOf, - 'tags-not': tagsNot, - 'work-centers-any-of': workCentersAnyOf, - 'work-centers-not': workCentersNot, - 'systems-any-of': systemsAnyOf, - 'systems-not': systemsNot, - 'locations-any-of': locationsAnyOf, - 'locations-not': locationsNot, - 'sort-field-any-of': sortFieldAnyOf, - 'sort-field-not': sortFieldNot, - 'revision-code-any-of': revisionCodeAnyOf, - 'revision-code-not': revisionCodeNot, - 'status-all-of': statusAllOf, - 'status-any-of': statusAnyOf, - 'status-not': statusNot, - 'is-open': isOpen, - 'created-after-date': createdAfterDate, - 'created-before-date': createdBeforeDate, - 'changed-after-date': changedAfterDate, - 'changed-before-date': changedBeforeDate, - 'work-order-types': workOrderTypes, - 'sort-by': sortBy, - 'include-text': includeText, - 'include-maintenance-record': includeMaintenanceRecord, - 'max-results': maxResults, + '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-maintenance-records': includeMaintenanceRecords, + 'include-measuring-points': includeMeasuringPoints, + 'include-attachments': includeAttachments, + 'include-inventory-count': includeInventoryCount, + 'include-url-references': includeUrlReferences, + 'per-page': perPage, + 'page': page, + }, + errors: { + 400: `Request is missing required parameters`, + 403: `User does not have sufficient rights to view document`, + 404: `The specified resource was not found`, + }, + }); + } + + /** + * Document - 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. + * + * **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.31.0 + * Added `include-inventory-count` query parameter to include `equipmentInventoryCount` and `materialInventoryCount` property in the response. + * + * Added support for including more business objects: `include-tags`, `include-measuring-points` and `include-maintenance-records`. + * + * ### Update release 1.32.0 + * Added `include-url-references` query parameter to include URL references in the response. + * + * Added `changedDateTime` for attachments. + * + * Added properties `statusId` and `statusText` to the response. + * + * Added properties `partNumber` & `manufacturer` to `material` in the response. + * + * ### Update release 1.35.0 + * Added new fields `maintenancePlantId`, `equipmentCategoryId`, `maintenanceConceptId`, `createdOnDate` and `changedOnDate` for `equipment`. + * + * @returns Document Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static lookupDocument({ + documentId, + includeCharacteristics = false, + includeMaterial = false, + includeEquipment = false, + includeTags = false, + includeMaintenanceRecords = false, + includeMeasuringPoints = false, + includeAttachments = false, + includeInventoryCount = false, + includeUrlReferences = false, + }: { + /** + * Unique id for the document to be used against endpoints for the `/documents` resource + */ + documentId: string, + /** + * Include characteristics' + */ + includeCharacteristics?: boolean, + /** + * Include material related to the object + */ + includeMaterial?: boolean, + /** + * Include equipment related to the object + */ + includeEquipment?: boolean, + /** + * Include tags. + */ + includeTags?: boolean, + /** + * Include maintenance records. If include-maintenance-record-types is not supplied, all supported types are returned + */ + includeMaintenanceRecords?: boolean, + /** + * Include measuring points for this tag + */ + includeMeasuringPoints?: boolean, + /** + * Include equipment or tag attachments + */ + includeAttachments?: boolean, + includeInventoryCount?: boolean, + /** + * Include URL references for object + */ + includeUrlReferences?: boolean, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/documents/{document-id}', + path: { + 'document-id': documentId, + }, + query: { + 'include-characteristics': includeCharacteristics, + 'include-material': includeMaterial, + 'include-equipment': includeEquipment, + 'include-tags': includeTags, + 'include-maintenance-records': includeMaintenanceRecords, + 'include-measuring-points': includeMeasuringPoints, + 'include-attachments': includeAttachments, + 'include-inventory-count': includeInventoryCount, + 'include-url-references': includeUrlReferences, + }, + errors: { + 400: `Request is missing required parameters`, + 403: `User does not have sufficient rights to view document`, + 404: `The specified resource was not found`, + }, + }); + } + + /** + * Revisions - Search + * ### Overview + * Search revisions for a single plant with related information. + * + * ### Filter: by-revision-id + * Search by revision ids for a single plant + * + * 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 release 1.33.0 + * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials`. + * + * ### Update release 1.33.1 + * Added `include-cost-data-for-materials` query parameter. + * When this parameter is set to `true`, the following properties will be included in `materials` expand: `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup`. + * + * ### Update release 1.35.0 + * Added new properties `requisitionerId` and `deliveryComplete` to `materials` in `operations`. + * + * @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, + includeCostDataForMaterials = 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, + /** + * Include cost data for materials. Additional authorization will be required to retrieve these fields. + */ + includeCostDataForMaterials?: 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, + 'include-cost-data-for-materials': includeCostDataForMaterials, + }, + 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 release 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`. + * + * ### Update release 1.33.1 + * Added `include-cost-data-for-materials` query parameter. + * When this parameter is set to `true`, the following properties will be included in `materials` expand: `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup`. + * + * ### Update release 1.35.0 + * Added new properties `requisitionerId` and `deliveryComplete` to `materials` in `operations`. + * + * @returns RevisionWorkOrderOperation Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static searchRevisionWorkOrderOperations({ + plantId, + revisionId, + includeOnlyWorkOrderOperationsWithMaterials = false, + includeTextItemMaterials = false, + includeCostDataForMaterials = false, + perPage, + page = 1, + }: { + plantId: string, + revisionId: string, + /** + * Limit the work order operations to only those which have material + */ + includeOnlyWorkOrderOperationsWithMaterials?: boolean, + /** + * Include text item materials + */ + includeTextItemMaterials?: boolean, + /** + * Include cost data for materials. Additional authorization will be required to retrieve these fields. + */ + includeCostDataForMaterials?: 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, + 'include-cost-data-for-materials': includeCostDataForMaterials, '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 release 1.33.0 + * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials`. + * + * ### Update release 1.33.1 + * Added `include-cost-data-for-materials` query parameter. + * When this parameter is set to `true`, the following properties will be included in `materials` expand: `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup`. + * + * ### Update release 1.34.0 + * Added new properties `callNumber`, `previousCall`, and `completionDate` to `maintenancePlan`. + * + * Added new property `relatedOperations` to `maintenanceRecords` and `tagsRelated`. + * Also added query parameter `include-related-operations` to include the property `relatedOperations`. + * + * Added properties `additionalCostWBSId`, `additionalCostWBS`, `costWBS`, `costWBSId` and `requiredEndDate` to the response. + * + * ### Update release 1.35.0 + * Added new property `dueDate` to the response. Removed the property `requiredEndDate`. + * + * Added new properties `requisitionerId` and `deliveryComplete` to `materials` in `operations`. + * + * Added new properties `personResponsible`, `personResponsibleId` and `personResponsibleEmail` to `operations`. + * + * Added new property `requisitionerId` to `serviceOperations`. + * + * Added new query parameter `include-estimated-costs`. Set to `true` to include `estimatedCosts` array in the response. + * + * @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, + includeCostDataForMaterials = false, + includeMaintenanceRecords = false, + includeMaintenancePlanDetails = false, + includeAttachments = false, + includeStatusDetails = false, + includeTagDetails = false, + includeRelatedTags = false, + includeMeasuringPoints = false, + includeLastMeasurement = false, + includeMeasurements = false, + includeSafetyMeasures = false, + includeRelatedOperations = false, + includeEstimatedCosts = 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 + */ + includeMaterials?: boolean, + /** + * Include cost data for materials. Additional authorization will be required to retrieve these fields. + */ + includeCostDataForMaterials?: boolean, + /** + * Include related maintenance records (from object list and technical feedback) + */ + includeMaintenanceRecords?: boolean, + /** + * Include details for maintenance plan + */ + includeMaintenancePlanDetails?: boolean, + /** + * Include Work order attachments (including PRT attachments) + */ + 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 related measuring points from PRT + */ + 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 related measurements + */ + includeMeasurements?: boolean, + /** + * Include safety-measures in work order operations + */ + includeSafetyMeasures?: boolean, + /** + * Includes the property `relatedOperations` in the response to expose operations that are related to an object in the objectlist (only relevant for related tags and related maintenance records). + */ + includeRelatedOperations?: boolean, + /** + * Include estimated costs + */ + includeEstimatedCosts?: boolean, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/work-orders/preventive-work-orders/{work-order-id}', + path: { + 'work-order-id': workOrderId, + }, + query: { + 'include-operations': includeOperations, + 'include-service-operations': includeServiceOperations, + 'include-technical-feedback': includeTechnicalFeedback, + 'include-materials': includeMaterials, + 'include-cost-data-for-materials': includeCostDataForMaterials, + '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-related-operations': includeRelatedOperations, + 'include-estimated-costs': includeEstimatedCosts, + }, + 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 + * ### 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`. + * + * ### 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. + * + * ### Update release 1.29.0 + * Added new properties for `additionalCostWBSId` and `costWBSId`. + * + * ### 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 release 1.33.0 + * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials` + * + * ### Update release 1.33.1 + * Added `include-cost-data-for-materials` query parameter. + * When this parameter is set to `true`, the following properties will be included in `materials` expand: `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup`. + * + * ### Update release 1.34.0 + * Added new property `relatedOperations` to `maintenanceRecords` and `tagsRelated`. + * Also added query parameter `include-related-operations` to include the property `relatedOperations`. + * + * Added new properties `isHSECritical` and `isProductionCritical` to the response. + * + * ### Update release 1.35.0 + * Added new properties `requisitionerId` and `deliveryComplete` to `materials` in `operations`. + * + * Added new properties `personResponsible`, `personResponsibleId` and `personResponsibleEmail` to `operations`. + * + * Added new property `requisitionerId` to `serviceOperations`. + * + * @returns CorrectiveWorkOrder Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static lookupCorrectiveWorkOrder({ + workOrderId, + includeOperations = true, + includeServiceOperations = true, + includeTechnicalFeedback = false, + includeMaterials = true, + includeCostDataForMaterials = false, + includeMaintenanceRecords = false, + includeAttachments = false, + includeStatusDetails = false, + includeTagDetails = false, + includeRelatedTags = false, + includeMeasuringPoints = false, + includeLastMeasurement = false, + includeMeasurements = false, + includeSafetyMeasures = false, + includeEstimatedCosts = false, + includeRelatedOperations = 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 + */ + includeMaterials?: boolean, + /** + * Include cost data for materials. Additional authorization will be required to retrieve these fields. + */ + includeCostDataForMaterials?: boolean, + /** + * Include related maintenance records (from object list) + */ + includeMaintenanceRecords?: boolean, + /** + * Include Work order attachments (including PRT attachments) + */ + 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 related measuring points from PRT + */ + 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 related measurements + */ + includeMeasurements?: boolean, + /** + * Include safety-measures in work order operations + */ + includeSafetyMeasures?: boolean, + /** + * Include estimated costs + */ + includeEstimatedCosts?: boolean, + /** + * Includes the property `relatedOperations` in the response to expose operations that are related to an object in the objectlist (only relevant for related tags and related maintenance records). + */ + includeRelatedOperations?: boolean, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/work-orders/corrective-work-orders/{work-order-id}', + path: { + 'work-order-id': workOrderId, + }, + query: { + 'include-operations': includeOperations, + 'include-service-operations': includeServiceOperations, + 'include-technical-feedback': includeTechnicalFeedback, + 'include-materials': includeMaterials, + 'include-cost-data-for-materials': includeCostDataForMaterials, + '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-related-operations': includeRelatedOperations, + }, + 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. + `, + 404: `The specified resource was not found`, + }, + }); + } + + /** + * Project Work order - Lookup + * ### 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. + * + * ### 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` + * + * ### 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 release 1.33.0 + * Added new properties `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup` to `materials`. + * + * ### Update release 1.33.1 + * Added `include-cost-data-for-materials` query parameter. + * When this parameter is set to `true`, the following properties will be included in `materials` expand: `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup`. + * + * ### Update release 1.34.0 + * Added new property `relatedOperations` to `maintenanceRecords` and `tagsRelated`. + * Also added query parameter `include-related-operations` to include the property `relatedOperations`. + * + * Added properties `additionalCostWBSId`, `additionalCostWBS`, `requiredEndDate`, `isHSECritical` and `isProductionCritical` to the response. + * + * ### Update release 1.35.0 + * Added new properties `requisitionerId` and `deliveryComplete` to `materials` in `operations`. + * + * Added new properties `personResponsible`, `personResponsibleId` and `personResponsibleEmail` to `operations`. + * + * Added new property `requisitionerId` to `serviceOperations`. + * + * @returns ProjectWorkOrder Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static lookupProjectWorkOrder({ + workOrderId, + includeOperations = true, + includeServiceOperations = true, + includeMaterials = true, + includeCostDataForMaterials = false, + includeMaintenanceRecords = false, + includeAttachments = false, + includeStatusDetails = false, + includeTagDetails = false, + includeRelatedTags = false, + includeSafetyMeasures = false, + includeRelatedOperations = 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 cost data for materials. Additional authorization will be required to retrieve these fields. + */ + includeCostDataForMaterials?: 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, + /** + * Includes the property `relatedOperations` in the response to expose operations that are related to an object in the objectlist (only relevant for related tags and related maintenance records). + */ + includeRelatedOperations?: 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-cost-data-for-materials': includeCostDataForMaterials, + 'include-maintenance-records': includeMaintenanceRecords, + 'include-attachments': includeAttachments, + 'include-status-details': includeStatusDetails, + 'include-tag-details': includeTagDetails, + 'include-related-tags': includeRelatedTags, + 'include-safety-measures': includeSafetyMeasures, + 'include-related-operations': includeRelatedOperations, + }, + 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`, + }, + }); + } + + /** + * Modification Work order - Lookup + * ### Overview + * Lookup single Modification Work order with related information. + * + * ### Update release 1.1.0 + * If work-order-id exist, but is not a `modificationWorkOrder`, 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.11.0 + * Added properties `additionalCostWBSId` and `additionalCostWBS`. + * + * ### 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` + * + * ### 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 release 1.33.1 + * Added `include-cost-data-for-materials` query parameter. + * When this parameter is set to `true`, the following properties will be included in `materials` expand: `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup`. + * + * ### Update release 1.34.0 + * Added new property `relatedOperations` to `maintenanceRecords` and `tagsRelated`. + * Also added query parameter `include-related-operations` to include the property `relatedOperations`. + * + * Added property `requiredEndDate`, `isHSECritical` and `isProductionCritical` to the response. + * + * ### Update release 1.35.0 + * Added new properties `requisitionerId` and `deliveryComplete` to `materials` in `operations`. + * + * Added new properties `personResponsible`, `personResponsibleId` and `personResponsibleEmail` to `operations`. + * + * Added new property `requisitionerId` to `serviceOperations`. + * + * @returns ModificationWorkOrder Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static lookupModificationWorkOrder({ + workOrderId, + includeOperations = true, + includeServiceOperations = true, + includeMaterials = true, + includeCostDataForMaterials = false, + includeMaintenanceRecords = false, + includeAttachments = false, + includeStatusDetails = false, + includeTagDetails = false, + includeRelatedTags = false, + includeSafetyMeasures = false, + includeRelatedOperations = 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 cost data for materials. Additional authorization will be required to retrieve these fields. + */ + includeCostDataForMaterials?: 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, + /** + * Includes the property `relatedOperations` in the response to expose operations that are related to an object in the objectlist (only relevant for related tags and related maintenance records). + */ + includeRelatedOperations?: boolean, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/work-orders/modification-work-orders/{work-order-id}', + path: { + 'work-order-id': workOrderId, + }, + query: { + 'include-operations': includeOperations, + 'include-service-operations': includeServiceOperations, + 'include-materials': includeMaterials, + 'include-cost-data-for-materials': includeCostDataForMaterials, + 'include-maintenance-records': includeMaintenanceRecords, + 'include-attachments': includeAttachments, + 'include-status-details': includeStatusDetails, + 'include-tag-details': includeTagDetails, + 'include-related-tags': includeRelatedTags, + 'include-safety-measures': includeSafetyMeasures, + 'include-related-operations': includeRelatedOperations, + }, + errors: { + 301: `If work-order-id exist, but is not a \`modificationWorkOrder\`, 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`, + }, + }); + } + + /** + * Subsea Work order - Lookup + * ### Overview + * Lookup single Subsea Work order with related information. + * + * ### Important information + * By default `include-person-responsible` is false and then the fields `personResponsibleId` and `personResponsibleEmail` will always have null value. + * + * ### 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 tagsRelated to the response. + * + * 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 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. + * + * ### Update release 1.27.0 + * Work orders now include the property `isOpen` + * + * ### 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 release 1.33.1 + * Added `include-cost-data-for-materials` query parameter. + * When this parameter is set to `true`, the following properties will be included in `materials` expand: `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup`. + * + * ### Update release 1.34.0 + * Added properties `additionalCostWBSId`, `additionalCostWBS`, `costWBS`, `isHSECritical` and `isProductionCritical` to the response. + * + * ### Update release 1.35.0 + * Added new properties `requisitionerId` and `deliveryComplete` to `materials` in `operations`. + * + * Added new properties `personResponsible`, `personResponsibleId` and `personResponsibleEmail` to `operations`. + * + * Added new property `requisitionerId` to `serviceOperations`. + * + * @returns SubseaWorkOrder Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static lookupSubseaWorkOrder({ + workOrderId, + includeOperations = true, + includeServiceOperations = true, + includeMaterials = true, + includeCostDataForMaterials = false, + includeAttachments = false, + includePersonResponsible = false, + includeStatusDetails = 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 cost data for materials. Additional authorization will be required to retrieve these fields. + */ + includeCostDataForMaterials?: boolean, + /** + * Include Work order attachments (on header and for operation) + */ + includeAttachments?: boolean, + /** + * Include person responsible information in response, for example the email or name of the person responsible. May have a slight performance impact. + */ + includePersonResponsible?: boolean, + /** + * Include detailed information for statuses (both active and non-active) + */ + includeStatusDetails?: 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/subsea-work-orders/{work-order-id}', + path: { + 'work-order-id': workOrderId, + }, + query: { + 'include-operations': includeOperations, + 'include-service-operations': includeServiceOperations, + 'include-materials': includeMaterials, + 'include-cost-data-for-materials': includeCostDataForMaterials, + 'include-attachments': includeAttachments, + 'include-person-responsible': includePersonResponsible, + 'include-status-details': includeStatusDetails, + 'include-related-tags': includeRelatedTags, + 'include-safety-measures': includeSafetyMeasures, + }, + errors: { + 301: `If work-order-id exist, but is not a \`subseaWorkOrder\`, 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`, + }, + }); + } + + /** + * 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' + * + * ### Update release 1.28.0 + * `billOfMaterials` now include the property `parentMaterialId` + * + * Added `materialId` and `material` to the response + * + * ### Update release 1.32.0 + * Added `changedDateTime` for attachments. + * + * ### Update release 1.35.0 + * Added new fields `maintenancePlantId`, `createdOnDate` and `changedOnDate`. + * + * Added new filters for use in combination with the `by-tag-prefix` and `by-tag-ids` filters: + * - `tag-category-id-any-of` + * - `maintenance-concept-id-any-of` + * - `created-before-date` + * - `created-after-date` + * - `changed-before-date` + * - `changed-after-date` + * + * @returns TagSearch Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static searchTags({ + plantId, + filter = 'by-tag-prefix', + tagPrefix, + tagIdsAnyOf, + externalSystemReference, + tagCategoryIdAnyOf, + maintenanceConceptIdAnyOf, + createdBeforeDate, + createdAfterDate, + changedBeforeDate, + changedAfterDate, + 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, + }: { + /** + * Plant to include tags from. + */ + 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, + /** + * Optional comma separated string array of tag category ids to filter your result to one or more tag categories (`tagCategoryId`). Wildcards are not supported. May only be used in combination with the `by-tag-prefix` and `by-tag-ids` filters. + */ + tagCategoryIdAnyOf?: Array | null, + /** + * Optional comma separated string array of Maintenance Concept Ids (`maintenanceConceptId` in response model). Wildcards are not supported. May only be used in combination with the `by-tag-prefix` and `by-tag-ids` filters. + */ + maintenanceConceptIdAnyOf?: Array, + /** + * Latest `createdOnDate` date to include. Use together with `created-after-date` to get Tags created in the given time period. May only be used in combination with the `by-tag-prefix` and `by-tag-ids` filters. + */ + createdBeforeDate?: string | null, + /** + * Earliest `createdOnDate` date to include. Use together with `created-before-date` to get Tags created in the given time period. May only be used in combination with the `by-tag-prefix` and `by-tag-ids` filters. + */ + createdAfterDate?: string | null, + /** + * Latest `changedOnDate` date to include. Use together with `changed-after-date` to get Tags changed in the given time period. May only be used in combination with the `by-tag-prefix` and `by-tag-ids` filters. + */ + changedBeforeDate?: string | null, + /** + * Earliest `changedOnDate` date to include. Use together with `changed-before-date` to get Tags changed in the given time period. May only be used in combination with the `by-tag-prefix` and `by-tag-ids` filters. + */ + changedAfterDate?: string | null, + /** + * Include maintenance records. If include-maintenance-record-types is not supplied, all supported types are returned + */ + 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 per page + */ + perPage?: number, + /** + * Page to fetch + */ + page?: number, + }): CancelablePromise | ProblemDetails> { + return __request(OpenAPI, { + method: 'GET', + url: '/plants/{plant-id}/tags', + path: { + 'plant-id': plantId, + }, + query: { + 'filter': filter, + 'tag-prefix': tagPrefix, + 'tag-ids-any-of': tagIdsAnyOf, + 'external-system-reference': externalSystemReference, + 'tag-category-id-any-of': tagCategoryIdAnyOf, + 'maintenance-concept-id-any-of': maintenanceConceptIdAnyOf, + 'created-before-date': createdBeforeDate, + 'created-after-date': createdAfterDate, + 'changed-before-date': changedBeforeDate, + 'changed-after-date': changedAfterDate, + '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, + }, + errors: { + 400: `Request is missing required parameters`, + }, + }); + } + + /** + * SAS Change Work order - Lookup + * ### Overview + * Lookup single SAS Change 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 `sasChangeWorkOrder`, 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.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` + * + * ### 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 release 1.33.1 + * Added `include-cost-data-for-materials` query parameter. + * When this parameter is set to `true`, the following properties will be included in `materials` expand: `goodsRecipientId`, `price`, `priceCurrency`, `unloadingPoint`, and `purchasingGroup`. + * + * ### Update release 1.34.0 + * Added new property `relatedOperations` to `maintenanceRecords` and `tagsRelated`. + * Also added query parameter `include-related-operations` to include the property `relatedOperations`. + * + * Added properties `additionalCostWBSId`, `additionalCostWBS`, `requiredEndDate`, `isHSECritical` and `isProductionCritical` to the response. + * + * ### Update release 1.35.0 + * Added new properties `requisitionerId` and `deliveryComplete` to `materials` in `operations`. + * + * Added new properties `personResponsible`, `personResponsibleId` and `personResponsibleEmail` to `operations`. + * + * Added new property `requisitionerId` to `serviceOperations`. + * + * @returns SASChangeWorkOrder Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static lookupSasChangeWorkOrder({ + workOrderId, + includeOperations = true, + includeServiceOperations = true, + includeMaterials = true, + includeCostDataForMaterials = false, + includeMaintenanceRecords = false, + includeAttachments = false, + includeStatusDetails = false, + includeTagDetails = false, + includeRelatedTags = false, + includeSafetyMeasures = false, + includeRelatedOperations = 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 cost data for materials. Additional authorization will be required to retrieve these fields. + */ + includeCostDataForMaterials?: 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, + /** + * Includes the property `relatedOperations` in the response to expose operations that are related to an object in the objectlist (only relevant for related tags and related maintenance records). + */ + includeRelatedOperations?: boolean, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/work-orders/sas-change-work-orders/{work-order-id}', + path: { + 'work-order-id': workOrderId, + }, + query: { + 'include-operations': includeOperations, + 'include-service-operations': includeServiceOperations, + 'include-materials': includeMaterials, + 'include-cost-data-for-materials': includeCostDataForMaterials, + 'include-maintenance-records': includeMaintenanceRecords, + 'include-attachments': includeAttachments, + 'include-status-details': includeStatusDetails, + 'include-tag-details': includeTagDetails, + 'include-related-tags': includeRelatedTags, + 'include-safety-measures': includeSafetyMeasures, + 'include-related-operations': includeRelatedOperations, + }, + errors: { + 301: `If work-order-id exist, but is not a \`sasChangeWorkOrder\`, 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 orders - Search + * ### Overview + * Search for Work orders regardless of type through predefined filters. + * Each filter has a defined action and a set of parameters as described below. + * + * ### Response + * The response can include most of the details for each work order. + * If additional data is needed, it can be retrieved by using the endpoint represented in the `_links.self` property. + * + * + * ### Filter: recently-changed + * Find Work orders which have been recently changed (created or updated) for a given plant. Normally, clients will provide the parameters `changed-since-datetime` and `plant-id` to return any changed Work order from `changed-since-datetime` to now. It is also possible to add `before-datetime` query parameter - the endpoint will then return any work order changed between `changed-since-datetime` and `before-datetime`. + * + * Parameters: + * - `plant-id` + * - `changed-since-datetime` + * - `before-datetime` (optional) + * + * ### Filter: before-basic-end-date + * Find open Work orders before the `basic-end-date`. `basic-end-date` should be a date in the future so that already finished work orders will not be presented. + * + * Parameters: + * - `plant-id` + * - `basic-end-date` + * - `location-id` (optional) + * + * ### Filter: by-external-partner-work-order-id + * Find Work orders for a 'work-order-id' in an external partner system. Note: In theory, different external systems could have the same `external-partner-id` but this is very unlikely. Clients are recommended to filter the response based on the plants they are interested in to avoid any issues. + * + * Parameters: + * - `external-partner-work-order-id` + * + * ### Filter: by-cost-network + * Find Work orders based on Cost Network Id. + * + * Parameters: + * - `cost-network-id` + * - `plant-id` (optional) + * + * ### Filter: by-cost-wbs + * Find Work orders based on Cost WBS Id. + * + * Parameters: + * - `cost-wbs-id` + * - `plant-id` (optional) + * + * ### Filter: by-work-center-id + * Find Work orders based on their `workCenterId`. + * + * Parameters: + * - `work-center-id-any-of` + * - `plant-id` (optional) + * + * ### Filter: by-work-order-id + * Find Work orders based on their `workOrderId`. + * + * Parameters: + * - `work-order-ids-any-of` + * - `plant-id` (optional) + * + * ### Update release 0.11.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. + * + * Filter by-external-partner-work-order-id added. + * ### Update release 1.3.0 + * Bugfix related to plantId source. + * + * ### Update release 1.4.0 + * Introduced property calculationKey for operations. + * + * ### Update release 1.5.0 + * Added revisionId and revision to work order response (represents shutdown or campaign work). + * + * ### Update release 1.12.0 + * Improved performance of endpoint. + * + * ### Update release 1.19.0 + * Added properties `systemCondition` and `isExcludedFromWorkOrderPlan` for operations. + * + * ### 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 filter `by-cost-wbs`, with required parameter `cost-wbs-id`. Can be used in combination with the optional parameter `plant-id` + * This filter only includes work orders where the WBS is represented on the work order level. It does not include work orders where WBS is only represented in the settlement rules. + * + * Added filter `by-cost-network`, with required parameter `cost-network-id`. Can be used in combination with the optional parameter `plant-id` + * + * Added property `cmrIndicator` to the top level objects in the response. + * + * ### Update release 1.27.0 + * Work orders now include the property `isOpen` + * + * ### Update release 1.30.0 + * Modified GET work order to fetch data from Maintenance plant from the sap field `swerk`. + * + * ### Update release 1.31.0 + * Fixed enum values for `schedulingStartConstraintId` and `schedulingFinishConstraintId` + * + * ### Update release 1.35.0 + * Added filter `by-work-center-id` with the required parameter `work-center-id-any-of`. Can optionally be combined with the parameter `plant-id` + * + * Added filter `by-work-order-id` with the required parameter `work-order-ids-any-of`. Can optionally be combined with the parameter `plant-id` + * + * Added option to not include operations for the Work Orders by setting the optional parameter `include-operations` to `false` (default is `true`). This can improve performance for the endpoint. + * + * Added property `requiredEndDate` to the top level objects in the response (Not including preventive work orders). + * + * Added property `confirmationId`, `RemainingWork` and `RemainingWorkUnit` to `operations` + * + * @returns WorkOrderWithOperationList Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static searchWorkOrders({ + filter, + plantId, + changedSinceDatetime, + beforeDatetime, + includeWorkOrderText, + includeWorkOrderOperationText, + includeWorkOrderTypes, + includeOperations = true, + basicEndDate, + locationId, + externalPartnerWorkOrderId, + costWbsId, + costNetworkId, + workCenterIdAnyOf, + workOrderIdsAnyOf, + }: { + /** + * Filter to limit the work order by + */ + filter: 'recently-changed' | 'before-basic-end-date' | 'by-external-partner-work-order-id' | 'by-cost-network' | 'by-cost-wbs' | 'by-work-center-id' | 'by-work-order-id', + /** + * Plant identifier + */ + plantId?: string, + /** + * Earliest datetime to returned changed work orders for + */ + changedSinceDatetime?: string, + /** + * Optional parameter to limit the response to only work orders changed after changed-since-datetime but before this datetime + */ + beforeDatetime?: string, + /** + * The text of the Work order is time-consuming to retrieve. Set to false to avoid returning it + */ + includeWorkOrderText?: boolean, + /** + * The text of the Work order operation is time-consuming to retrieve. Set to false to avoid returning it + */ + includeWorkOrderOperationText?: boolean, + /** + * Include which types of work orders. Use comma-separated list of entries. + */ + includeWorkOrderTypes?: Array<'correctiveWorkOrders' | 'preventiveWorkOrders' | 'modificationWorkOrders' | 'sasChangeWorkOrders' | 'projectWorkOrders' | 'subseaWorkOrders'>, + /** + * Include operations for the Work orders in the response. + */ + includeOperations?: boolean, + /** + * Earliest date to find maintenance plan history for (optional for filter) + */ + basicEndDate?: string, + /** + * Structured location within the plant. Use /plants/{plant-id}/locations for possible values + */ + locationId?: string, + /** + * If work order was initially created in an external system, this represent the unique id of it + */ + externalPartnerWorkOrderId?: string, + /** + * Required parameter if `filter=by-cost-wbs` + */ + costWbsId?: string, + /** + * Required parameter if `filter=by-cost-network` + */ + costNetworkId?: string, + /** + * Comma-separated list of `work-center-id`. + */ + workCenterIdAnyOf?: string, + /** + * Comma-separated list of `work-order-id`. + */ + workOrderIdsAnyOf?: string, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'GET', + url: '/work-orders', + query: { + 'filter': filter, + 'plant-id': plantId, + 'changed-since-datetime': changedSinceDatetime, + 'before-datetime': beforeDatetime, + 'include-work-order-text': includeWorkOrderText, + 'include-work-order-operation-text': includeWorkOrderOperationText, + 'include-work-order-types': includeWorkOrderTypes, + 'include-operations': includeOperations, + 'basic-end-date': basicEndDate, + 'location-id': locationId, + 'external-partner-work-order-id': externalPartnerWorkOrderId, + 'cost-wbs-id': costWbsId, + 'cost-network-id': costNetworkId, + 'work-center-id-any-of': workCenterIdAnyOf, + 'work-order-ids-any-of': workOrderIdsAnyOf, + }, + }); + } + + /** + * Work orders - Optimized for query + * ### Overview + * Query work orders for potentially complicated patterns where speed is of the essence. + * + * `planning-plants` is the only mandatory fields, but clients should normally provide at least one more query criteria. + * + * A normal use case would be to first provide an initial query criteria based on user input. Then allow the end-users based on the resulting data select unwanted results based on specific attributes. The unwanted results should then be added to the exclusion list (for example `keywords-not` or `work-centers-not)` and the API call repeated. + * + * `max-results` have a default value of 1000 and is necessary to provide a quick response. + * + * The multi-line `text` property is not included by default, but can included by setting `include-text=true` in the request. This will influence performance significantly. + * + * Pagination is supported for this endpoint by setting values for `page` and `per-page`. If these parameteres are omitted, the result will be returned without pagination. + * + * ### Response + * The response schema differs slightly from the other work order endpoints as a result of the optimization for speed. + * + * ### Examples + * `/work-orders-optimized-for-query?api-version=v1&planning-plants=1100,1101,1102&tags-all-of=10B9` - Return work orders where tag is 10B9 + * + * `/work-orders-optimized-for-query?api-version=v1&planning-plants=1100,1101,1102&tags-all-of=AA15*&tags-not=AA15002` - Return work orders where tag has pattern `AA15*` but is not AA15002 + * + * `/work-orders-optimized-for-query?api-version=v1&planning-plants=1100,1101,1102&keywords-all-of=heli,male` - Return work orders where the title contains both `heli` and `male` + * + * `/work-orders-optimized-for-query?api-version=v1&planning-plants=1100,1101,1102&status-any-of=PREP,RDEX&created-after-date=2021-06-01` - Return work orders with status PREP or RDEX and created after a certain date + * + * ### Update release 1.5.0 + * Added revisionId to work order response (represents shutdown or campaign work). + * + * ### Update release 1.12.0 + * Added query parameter `include-maintenance-record`. + * + * ### Update release 1.16.0 + * Added property `workCenterId` to `maintenanceRecords.failureReports` + * + * ### Update release 1.29.0 + * Added properties `revision` and `changedDatetime`. + * + * Allow searching by `changedOnDay` when `is-open` is set. Search by using the new query parameters `changed-after-date` and `changed-before-date`. + * + * ### Update release 1.31.0 + * Added list of supported statuses for `status-all-of`, `status-any-of` and `status-not` query parameters. Status `REL` is now supported. + * + * Added property `hasStatusREL` to the response. + * + * ### Update release 1.35.0 + * Added support for optional pagination. + * + * @returns WorkOrderOptimizedForQuery Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static queryWorkOrdersOptimized({ + planningPlants, + keywordsAllOf, + keywordsAnyOf, + keywordsNot, + tagsAllOf, + tagsAnyOf, + tagsNot, + workCentersAnyOf, + workCentersNot, + systemsAnyOf, + systemsNot, + locationsAnyOf, + locationsNot, + sortFieldAnyOf, + sortFieldNot, + revisionCodeAnyOf, + revisionCodeNot, + statusAllOf, + statusAnyOf, + statusNot, + isOpen, + createdAfterDate, + createdBeforeDate, + changedAfterDate, + changedBeforeDate, + workOrderTypes, + sortBy, + includeText = false, + includeMaintenanceRecord = false, + maxResults, + perPage, + page = 1, + }: { + /** + * Query based on planningPlantIds (any-of) + */ + planningPlants: Array, + /** + * Query based on keywords in title (case insensitive) + */ + keywordsAllOf?: Array, + /** + * Query based on keywords in title (case insensitive) + */ + keywordsAnyOf?: Array, + /** + * Query based on keywords in title (case insensitive) + */ + keywordsNot?: Array, + /** + * Query based on tagIds. Expressions with wildcards can be used for example `1A*-6A`. Ensure the tagIds are url-encoded in order to handle special characters + */ + tagsAllOf?: Array, + /** + * Query based on tagIds. Expressions with wildcards can be used for example `1A*-6A`. Ensure the tagIds are url-encoded in order to handle special characters + */ + tagsAnyOf?: Array, + /** + * Query based on tagIds. Expressions with wildcards can be used for example `AE55*`. Ensure the tagIds are url-encoded in order to handle special characters + */ + tagsNot?: Array, + /** + * Query based on workCenterIds + */ + workCentersAnyOf?: Array, + /** + * Query based on workCenterIds + */ + workCentersNot?: Array, + /** + * Query based on systemIds + */ + systemsAnyOf?: Array, + /** + * Query based on systemIds + */ + systemsNot?: Array, + /** + * Query based on locationIds + */ + locationsAnyOf?: Array, + /** + * Query based on locationIds + */ + locationsNot?: Array, + /** + * Query based on sortField ()used for grouping work orders) + */ + sortFieldAnyOf?: Array, + /** + * Query based on sortField (used for grouping work orders) + */ + sortFieldNot?: Array, + /** + * Query based on revisionCode + */ + revisionCodeAnyOf?: Array, + /** + * Query based on sortField (often used for revision codes) + */ + revisionCodeNot?: Array, + /** + * Query based on statusIds (not all statuses are supported) + */ + statusAllOf?: Array<'PREP' | 'PRCO' | 'RDEX' | 'STRT' | 'CANC' | 'RDOP' | 'CRTD' | 'TECO' | 'REL'>, + /** + * Query based on statusIds (not all statuses are supported) + */ + statusAnyOf?: Array<'PREP' | 'PRCO' | 'RDEX' | 'STRT' | 'CANC' | 'RDOP' | 'CRTD' | 'TECO' | 'REL'>, + /** + * Query based on statusIds (not all statuses are supported) + */ + statusNot?: Array<'PREP' | 'PRCO' | 'RDEX' | 'STRT' | 'CANC' | 'RDOP' | 'CRTD' | 'TECO' | 'REL'>, + /** + * Include only open work orders or only closed work orders. By default, all work orders are included. + */ + isOpen?: boolean, + /** + * Earliest creation date to include + */ + createdAfterDate?: string, + /** + * Latest creation date to include + */ + createdBeforeDate?: string, + /** + * Earliest `changedOnDay` date to include. Query parameter `is-open` must be set to `true` or `false` to use this parameter. + */ + changedAfterDate?: string, + /** + * Latest `changedOnDay` date to include. Query parameter `is-open` must be set to `true` or `false` to use this parameter. + */ + changedBeforeDate?: string, + /** + * Limit to specific work order types (one-of) + */ + workOrderTypes?: Array<'correctiveWorkOrders' | 'preventiveWorkOrders' | 'modificationWorkOrders' | 'sasChangeWorkOrders' | 'projectWorkOrders' | 'subseaWorkOrders'>, + /** + * Property to sort the results by + */ + sortBy?: Array<'createdDateTime desc' | 'createdDateTime asc' | 'workOrderId desc' | 'workOrderId asc' | 'systemId desc' | 'systemId asc' | 'locationId desc' | 'locationId asc' | 'sortField desc' | 'sortField asc' | 'title desc' | 'title asc'>, + /** + * Include the multi-line text of the work order (will cause the endpoint to go significantly slower) + */ + includeText?: boolean, + /** + * Include the main maintenance record linked to the work order (if any) + */ + includeMaintenanceRecord?: boolean, + /** + * Maximum number of results to include. Default is 1000. + */ + maxResults?: number, + /** + * Results to return pr page + */ + perPage?: number, + /** + * Page to fetch + */ + page?: number, + }): CancelablePromise | ProblemDetails> { + return __request(OpenAPI, { + method: 'GET', + url: '/work-orders-optimized-for-query', + query: { + 'planning-plants': planningPlants, + 'keywords-all-of': keywordsAllOf, + 'keywords-any-of': keywordsAnyOf, + 'keywords-not': keywordsNot, + 'tags-all-of': tagsAllOf, + 'tags-any-of': tagsAnyOf, + 'tags-not': tagsNot, + 'work-centers-any-of': workCentersAnyOf, + 'work-centers-not': workCentersNot, + 'systems-any-of': systemsAnyOf, + 'systems-not': systemsNot, + 'locations-any-of': locationsAnyOf, + 'locations-not': locationsNot, + 'sort-field-any-of': sortFieldAnyOf, + 'sort-field-not': sortFieldNot, + 'revision-code-any-of': revisionCodeAnyOf, + 'revision-code-not': revisionCodeNot, + 'status-all-of': statusAllOf, + 'status-any-of': statusAnyOf, + 'status-not': statusNot, + 'is-open': isOpen, + 'created-after-date': createdAfterDate, + 'created-before-date': createdBeforeDate, + 'changed-after-date': changedAfterDate, + 'changed-before-date': changedBeforeDate, + 'work-order-types': workOrderTypes, + 'sort-by': sortBy, + 'include-text': includeText, + 'include-maintenance-record': includeMaintenanceRecord, + 'max-results': maxResults, + 'per-page': perPage, + 'page': page, + }, + }); + } + + /** + * 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 + * Split parts of `location` into `finalLocation` and `temporaryLocation` in the response. + * + * ### Update release 1.33.0 + * Added support for new properties `supplierId`, `vendorsMaterialNumber`, `deliveryTimeInDays`, `requisitionerId`, `holdDeliveryOnshore`, `text`. + * + * ### Update release 1.35.0 + * Added new property `requisitionerId` to the response. + * + * @returns ProblemDetails Response for other HTTP status codes + * @returns any Created + * @throws ApiError + */ + public static addMaterialToWorkOrderOperation({ + operationId, + requestBody, + }: { + operationId: string, + /** + * Add material details + */ + 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`, + }, + }); + } + + /** + * 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. + * + * ### 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. + * + * ### Update release 1.35.0 + * Added `workOrderTypeId` and `workOrderId` to the response. `workOrderId` includes the id of work orders, not constrained to only showing corrective work orders. + * `correctiveWorkOrderId` has been corrected to only show the work order id if it is a corrective work order. + * + * @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, + includeTaskResponsibleDetails = false, + }: { + /** + * The recordId of the failure 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 detailed information for activities + */ + includeActivities?: boolean, + /** + * Include detailed information for tasks + */ + includeTasks?: boolean, + /** + * Include attachments + */ + includeAttachments?: boolean, + /** + * Include extra metadata related to additional failure modes and detection modes. This is only used in rare cases + */ + includeAdditionalMetadata?: boolean, + /** + * Include characteristics for additional metadata + */ + includeAdditionalDataCharacteristics?: boolean, + /** + * Include name and email of user represented in `createdById`. If not supplied, `createdBy` and `createdByEmail` will have null value. + */ + includeCreatedByDetails?: boolean, + /** + * Include URL references for failure report. See `POST /maintenance-record-relationships/{record-id}/url-references` + */ + includeUrlReferences?: boolean, + /** + * Include related measurements + */ + includeMeasurements?: boolean, + /** + * 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', + url: '/maintenance-records/failure-reports/{record-id}', + path: { + 'record-id': recordId, + }, + 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, + 'include-task-responsible-details': includeTaskResponsibleDetails, + }, + 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 - Update + * ## Overview + * Update key fields of a failure 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) + * 1. `codingId` - [/catalogs/{catalog-id}/code-groups](#operation/SearchCodeGroup) + * + * + * ## Important information + * To avoid accidentally overwriting the multi-line text property, the endpoint will reject any requests with an empty text property. + * + * ### Update release 1.0.0 + * Added possibility to update plannerGroupId. + * + * ### Update release 1.1.0 + * Added hasUnsafeFailureMode and unsafeFailureModeStatus properties to response 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.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.29.0 + * Deprecated update of the property `failureImpactId`. See [Deprecation](#section/Deprecation/Deprecation-policy) for more information. + * + * ### 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. + * + * ### Update release 1.35.0 + * Added `workOrderTypeId` and `workOrderId` to the response. `workOrderId` includes the id of work orders, not constrained to only showing corrective work orders. + * `correctiveWorkOrderId` has been corrected to only show the work order id if it is a corrective work order. + * + * @returns FailureReportBasic Success, the failure report has been updated + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static updateFailureReport({ + recordId, + requestBody, + }: { + /** + * The recordId of the failure report. + */ + recordId: string, + /** + * Details on how to update the Failure Report + */ + requestBody: Array, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'PATCH', + url: '/maintenance-records/failure-reports/{record-id}', + path: { + 'record-id': recordId, + }, + body: requestBody, + mediaType: 'application/json', + errors: { + 400: `Bad request. For example that an empty text property was supplied`, + 403: `User does not have sufficient rights to update the failure report`, + }, + }); + } + + /** + * Failure report - Search + * ### Overview + * Search for Failure reports through predefined filters. + * Each filter has a defined action and a set of parameters as described below. + * + * ### Response + * The response does not include status details for each failure report. + * This can be found by performing a subsequent request to Lookup failure-reports. + * + * + * ### Filter: recent-status-activations + * Failure reports based on recent status activations for the failure reports. + * Parameters: + * - status-id + * - plant-id + * - max-days-since-activation + * - work-center-ids (optional) + * + * ### Filter: open-by-plant + * Find open Failure reports by plant + * Parameters: + * - plant-id + * - location-id (optional) + * - system-id (optional) + * - work-center-ids (optional) + * + * ### Update release 1.1.0 + * Added open-by-plant filter and properties systemId and locationId. + * + * ### Update release 1.8.0 + * Added properties hasUnsafeFailureMode and unsafeFailureModeStatus. + * + * ### Update release 1.16.0 + * Added property `work-center-ids` to filters `recent-status-activations` and `open-by-plant` + * + * Added property `workCenterId` + * + * ### Update release 1.35.0 + * Added `workOrderTypeId` and `workOrderId` to the response. `workOrderId` includes the id of work orders, not constrained to only showing corrective work orders. + * `correctiveWorkOrderId` has been corrected to only show the work order id if it is a corrective work order. + * + * @returns FailureReportSimpleForSearch Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static searchFailureReports({ + filter, + statusId, + plantId, + locationId, + systemId, + maxDaysSinceActivation, + workCenterIds, + }: { + /** + * Filter to limit the failure reports by + */ + filter: 'recent-status-activations' | 'open-by-plant', + /** + * Status + */ + statusId?: string, + /** + * Plant identifier + */ + plantId?: string, + /** + * Structured location within the plant. Use /plants/{plant-id}/locations for possible values + */ + locationId?: string, + /** + * System id to filter by + */ + systemId?: string, + /** + * Define how many days from the current day to include results for. 0 if only include for today + */ + maxDaysSinceActivation?: number, + /** + * Comma separated list of work center IDs to filter by + */ + workCenterIds?: Array, + }): CancelablePromise | ProblemDetails> { + return __request(OpenAPI, { + method: 'GET', + url: '/maintenance-records/failure-reports', + query: { + 'filter': filter, + 'status-id': statusId, + 'plant-id': plantId, + 'location-id': locationId, + 'system-id': systemId, + 'max-days-since-activation': maxDaysSinceActivation, + 'work-center-ids': workCenterIds, + }, + }); + } + + /** + * Failure report - Create + * Create new failure 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) + * 1. `codingId` - [/catalogs/{catalog-id}/code-groups](#operation/SearchCodeGroup) + * + * ### Important information + * Equinor governing documents states that failure reports should be created at the lowest possible level in the tag hierarchy. + * + * It is possible to create failure report for either tagId or equipmentId. + * + * If `hasUnsafeFailureMode` is true after creation, operations supervisor must be contacted immediately in accordance with business process requirement `R-12137 - Give immediate warning of unsafe failure modes` + * + * ### Update release 0.9.0 + * Added failureMechanismId,failureMechanismGroupId properties to additionalMetadata on creation. + * + * ### Update release 1.1.0 + * Added hasUnsafeFailureMode and unsafeFailureModeStatus properties according to business process requirement `R-12137 - Give immediate warning of unsafe failure modes`. + * + * Added `relatedWorkOrder` to create endpoint. This will allow a relationship to be established on creation to either technical feedback or object list of a work order. + * + * ### Update release 1.2.0 + * Added `externalPartnerId`. + * + * ### 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.7.0 + * Implemented create with property `equipmentId`. + * + * ### Update release 1.15.0 + * Fixed issue with `relatedWorkOrder` `source` `ObjectList`. + * + * ### 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 + * Removed requirement for providing `reasonId` as part of the `technicalFeedbackParameters` when `source` is `TechnicalFeedback`. + * + * ### Update release 1.35.0 + * Added `workOrderTypeId` and `workOrderId` to the response. `workOrderId` includes the id of work orders, not constrained to only showing corrective work orders. + * `correctiveWorkOrderId` has been corrected to only show the work order id if it is a corrective work order. + * + * @returns ProblemDetails Response for other HTTP status codes + * @returns FailureReportBasic Created + * @throws ApiError + */ + public static createFailureReport({ + requestBody, + }: { + /** + * Failure report to create + */ + requestBody: FailureReportCreate, + }): CancelablePromise { + return __request(OpenAPI, { + method: 'POST', + url: '/maintenance-records/failure-reports', + body: requestBody, + mediaType: 'application/json', + errors: { + 403: `User does not have sufficient rights to create a failure report`, + }, }); } diff --git a/packages/api/maintenance-api/src/lib/generated/services/NewEndpointsService.ts b/packages/api/maintenance-api/src/lib/generated/services/NewEndpointsService.ts new file mode 100644 index 000000000..ef6fa280e --- /dev/null +++ b/packages/api/maintenance-api/src/lib/generated/services/NewEndpointsService.ts @@ -0,0 +1,162 @@ +/* generated using openapi-typescript-codegen -- do no edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { CharacteristicForSearch } from '../models/CharacteristicForSearch'; +import type { CostCategory } from '../models/CostCategory'; +import type { EqHubAndSemiUsage } from '../models/EqHubAndSemiUsage'; +import type { ProblemDetails } from '../models/ProblemDetails'; + +import type { CancelablePromise } from '../core/CancelablePromise'; +import { OpenAPI } from '../core/OpenAPI'; +import { request as __request } from '../core/request'; + +export class NewEndpointsService { + + /** + * Search characteristics + * ### Overview + * Search for characteristics by class type and class id. + * + * The class-type can be any of the following: + * | class-type | Description | + * |-----------------------|---------------------------------| + * | 002 | Equipment | + * | 003 | Tags | + * | 015 | Notification Item | + * | 017 | Equipment | + * | 037 | Measuring Point | + * + * @returns CharacteristicForSearch Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static searchCharacteristics({ + filter, + classType, + characteristicIdsAnyOf, + classTypeKeyPrefix, + perPage = 100, + page = 1, + }: { + filter: 'by-characteristic-ids-any-of', + classType: '002' | '003' | '015' | '037', + /** + * Required if filter is `by-characteristic-id-any-of` + * + */ + characteristicIdsAnyOf?: string, + /** + * Pre-fix of the object key, if searching for class type "003" (Tags) this may be set to "1100" to fetch all + * characteristics from Tags starting with 1100, which would mean all tags for this plant. + * + */ + classTypeKeyPrefix?: string, + /** + * Results to return per page + */ + perPage?: number, + /** + * Page to fetch + */ + page?: number, + }): CancelablePromise | ProblemDetails> { + return __request(OpenAPI, { + method: 'GET', + url: '/characteristics', + query: { + 'filter': filter, + 'characteristic-ids-any-of': characteristicIdsAnyOf, + 'class-type-key-prefix': classTypeKeyPrefix, + 'class-type': classType, + 'per-page': perPage, + 'page': page, + }, + errors: { + 400: `Request is missing required parameters`, + 404: `The specified resource was not found`, + }, + }); + } + + /** + * Work orders - Get cost categories + * ### Overview + * Get a list of cost categories. They can be added to a work order when it requires special cost tracking. + * + * @returns CostCategory Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static getCostCategories(): CancelablePromise | ProblemDetails> { + return __request(OpenAPI, { + method: 'GET', + url: '/work-orders/cost-categories', + errors: { + 400: `Request is missing required parameters`, + 403: `User does not have sufficient rights`, + }, + }); + } + + /** + * Report for EqHub and SEMI usage - Get + * ### Overview + * + * Get the list of EqHub and SEMI usage. T-code in backend system `ZOMPM_SEMI_USAGE`. + * + * @returns EqHubAndSemiUsage Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static getEqHubAndSemiUsage({ + eqhubIdAnyOf, + semiIdAnyOf, + filter, + includeStatus = false, + perPage = 100, + page = 1, + }: { + /** + * Comma-separated List of eqhub id's + */ + eqhubIdAnyOf?: string, + /** + * Comma-separated List of SEMI id's + */ + semiIdAnyOf?: string, + /** + * Filter between eqhub or SEMI + */ + filter?: 'eqhub' | 'SEMI', + /** + * Include status in response + */ + includeStatus?: boolean, + /** + * Results to return per page + */ + perPage?: number, + /** + * Page to fetch + */ + page?: number, + }): CancelablePromise | ProblemDetails> { + return __request(OpenAPI, { + method: 'GET', + url: '/reports/eqhub-and-semi-usage', + query: { + 'eqhub-id-any-of': eqhubIdAnyOf, + 'SEMI-id-any-of': semiIdAnyOf, + 'filter': filter, + 'include-status': includeStatus, + 'per-page': perPage, + 'page': page, + }, + errors: { + 403: `User does not have sufficient rights to use T-code ZOMPM_SEMI_USAGE`, + }, + }); + } + +} 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 106ab2891..c53fca2d8 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/PreventiveWorkOrdersService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/PreventiveWorkOrdersService.ts @@ -160,6 +160,14 @@ export class PreventiveWorkOrdersService { * ### Update release 1.35.0 * Added new property `dueDate` to the response. Removed the property `requiredEndDate`. * + * Added new properties `requisitionerId` and `deliveryComplete` to `materials` in `operations`. + * + * Added new properties `personResponsible`, `personResponsibleId` and `personResponsibleEmail` to `operations`. + * + * Added new property `requisitionerId` to `serviceOperations`. + * + * Added new query parameter `include-estimated-costs`. Set to `true` to include `estimatedCosts` array in the response. + * * @returns PreventiveWorkOrder Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -182,6 +190,7 @@ export class PreventiveWorkOrdersService { includeMeasurements = false, includeSafetyMeasures = false, includeRelatedOperations = false, + includeEstimatedCosts = false, }: { workOrderId: string, /** @@ -248,6 +257,10 @@ export class PreventiveWorkOrdersService { * Includes the property `relatedOperations` in the response to expose operations that are related to an object in the objectlist (only relevant for related tags and related maintenance records). */ includeRelatedOperations?: boolean, + /** + * Include estimated costs + */ + includeEstimatedCosts?: boolean, }): CancelablePromise { return __request(OpenAPI, { method: 'GET', @@ -272,6 +285,7 @@ export class PreventiveWorkOrdersService { 'include-measurements': includeMeasurements, 'include-safety-measures': includeSafetyMeasures, 'include-related-operations': includeRelatedOperations, + 'include-estimated-costs': includeEstimatedCosts, }, 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. @@ -590,13 +604,13 @@ export class PreventiveWorkOrdersService { * - PMSG - Purchasing Message * - MLTI - Multi discipline * - * ### Update version 0.9.0 + * ### Update release 0.9.0 * Support for releasing a work order by setting the REL status. * - * ### Update version 1.1.0 + * ### Update release 1.1.0 * Support for deactivating TECO status * - * ### Update version 1.6.0 + * ### Update release 1.6.0 * Support for ActivatedDateTime for TECO status. It is an optional parameter which allows to overwrite the default reference date for TECO. If no value is provided, the value will be set to current timestamp. * * @returns ProblemDetails Response for other HTTP status codes 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 9260c3cc3..15140c8b4 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/ProjectWorkOrdersService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/ProjectWorkOrdersService.ts @@ -124,6 +124,13 @@ export class ProjectWorkOrdersService { * * Added properties `additionalCostWBSId`, `additionalCostWBS`, `requiredEndDate`, `isHSECritical` and `isProductionCritical` to the response. * + * ### Update release 1.35.0 + * Added new properties `requisitionerId` and `deliveryComplete` to `materials` in `operations`. + * + * Added new properties `personResponsible`, `personResponsibleId` and `personResponsibleEmail` to `operations`. + * + * Added new property `requisitionerId` to `serviceOperations`. + * * @returns ProjectWorkOrder Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -302,7 +309,7 @@ export class ProjectWorkOrdersService { * 1. RDEX - Ready for execution * 2. CLSD - Business close * - * ### Update version 1.6.0 + * ### Update release 1.6.0 * Support for ActivatedDateTime for TECO status. It is an optional parameter which allows to overwrite the default reference date for TECO. If no value is provided, the value will be set to current timestamp. * * @returns ProblemDetails Response for other HTTP status codes diff --git a/packages/api/maintenance-api/src/lib/generated/services/ReportsService.ts b/packages/api/maintenance-api/src/lib/generated/services/ReportsService.ts index 5f3f35293..1ac6f9ca5 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/ReportsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/ReportsService.ts @@ -3,6 +3,7 @@ /* tslint:disable */ /* eslint-disable */ import type { ConceptActivities } from '../models/ConceptActivities'; +import type { EqHubAndSemiUsage } from '../models/EqHubAndSemiUsage'; import type { ProblemDetails } from '../models/ProblemDetails'; import type { CancelablePromise } from '../core/CancelablePromise'; @@ -50,4 +51,64 @@ export class ReportsService { }); } + /** + * Report for EqHub and SEMI usage - Get + * ### Overview + * + * Get the list of EqHub and SEMI usage. T-code in backend system `ZOMPM_SEMI_USAGE`. + * + * @returns EqHubAndSemiUsage Success + * @returns ProblemDetails Response for other HTTP status codes + * @throws ApiError + */ + public static getEqHubAndSemiUsage({ + eqhubIdAnyOf, + semiIdAnyOf, + filter, + includeStatus = false, + perPage = 100, + page = 1, + }: { + /** + * Comma-separated List of eqhub id's + */ + eqhubIdAnyOf?: string, + /** + * Comma-separated List of SEMI id's + */ + semiIdAnyOf?: string, + /** + * Filter between eqhub or SEMI + */ + filter?: 'eqhub' | 'SEMI', + /** + * Include status in response + */ + includeStatus?: boolean, + /** + * Results to return per page + */ + perPage?: number, + /** + * Page to fetch + */ + page?: number, + }): CancelablePromise | ProblemDetails> { + return __request(OpenAPI, { + method: 'GET', + url: '/reports/eqhub-and-semi-usage', + query: { + 'eqhub-id-any-of': eqhubIdAnyOf, + 'SEMI-id-any-of': semiIdAnyOf, + 'filter': filter, + 'include-status': includeStatus, + 'per-page': perPage, + 'page': page, + }, + errors: { + 403: `User does not have sufficient rights to use T-code ZOMPM_SEMI_USAGE`, + }, + }); + } + } 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 945b0a686..92b7d4d49 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/SasChangeWorkOrdersService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/SasChangeWorkOrdersService.ts @@ -120,6 +120,13 @@ export class SasChangeWorkOrdersService { * * Added properties `additionalCostWBSId`, `additionalCostWBS`, `requiredEndDate`, `isHSECritical` and `isProductionCritical` to the response. * + * ### Update release 1.35.0 + * Added new properties `requisitionerId` and `deliveryComplete` to `materials` in `operations`. + * + * Added new properties `personResponsible`, `personResponsibleId` and `personResponsibleEmail` to `operations`. + * + * Added new property `requisitionerId` to `serviceOperations`. + * * @returns SASChangeWorkOrder Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -298,7 +305,7 @@ export class SasChangeWorkOrdersService { * 1. RDEX - Ready for execution * 2. CLSD - Business close * - * ### Update version 1.6.0 + * ### Update release 1.6.0 * Support for ActivatedDateTime for TECO status. It is an optional parameter which allows to overwrite the default reference date for TECO. If no value is provided, the value will be set to current timestamp. * * @returns ProblemDetails Response for other HTTP status codes diff --git a/packages/api/maintenance-api/src/lib/generated/services/SubseaWorkOrdersService.ts b/packages/api/maintenance-api/src/lib/generated/services/SubseaWorkOrdersService.ts index a574c7953..6e80fdd54 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/SubseaWorkOrdersService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/SubseaWorkOrdersService.ts @@ -72,6 +72,13 @@ export class SubseaWorkOrdersService { * ### Update release 1.34.0 * Added properties `additionalCostWBSId`, `additionalCostWBS`, `costWBS`, `isHSECritical` and `isProductionCritical` to the response. * + * ### Update release 1.35.0 + * Added new properties `requisitionerId` and `deliveryComplete` to `materials` in `operations`. + * + * Added new properties `personResponsible`, `personResponsibleId` and `personResponsibleEmail` to `operations`. + * + * Added new property `requisitionerId` to `serviceOperations`. + * * @returns SubseaWorkOrder Success * @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 a5977965d..1016ddfb5 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/TagService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/TagService.ts @@ -91,6 +91,9 @@ export class TagService { * ### Update release 1.32.0 * Added `changedDateTime` for attachments. * + * ### Update release 1.35.0 + * Added new fields `maintenancePlantId`, `createdOnDate` and `changedOnDate`. + * * @returns Tag Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -114,6 +117,9 @@ export class TagService { includeStatusDetails = false, includeLinearData = false, }: { + /** + * Plants or maintenance plants to include tags from. + */ plantId: string, tagId: string, /** @@ -645,6 +651,17 @@ export class TagService { * ### Update release 1.32.0 * Added `changedDateTime` for attachments. * + * ### Update release 1.35.0 + * Added new fields `maintenancePlantId`, `createdOnDate` and `changedOnDate`. + * + * Added new filters for use in combination with the `by-tag-prefix` and `by-tag-ids` filters: + * - `tag-category-id-any-of` + * - `maintenance-concept-id-any-of` + * - `created-before-date` + * - `created-after-date` + * - `changed-before-date` + * - `changed-after-date` + * * @returns TagSearch Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError @@ -655,6 +672,12 @@ export class TagService { tagPrefix, tagIdsAnyOf, externalSystemReference, + tagCategoryIdAnyOf, + maintenanceConceptIdAnyOf, + createdBeforeDate, + createdAfterDate, + changedBeforeDate, + changedAfterDate, includeMaintenanceRecords = false, includeMaintenanceRecordTypes, includeWorkOrders = true, @@ -673,6 +696,9 @@ export class TagService { perPage = 100, page = 1, }: { + /** + * Plant to include tags from. + */ plantId: string, filter?: 'by-tag-ids' | 'by-tag-prefix' | 'by-external-system-reference' | null, /** @@ -687,6 +713,30 @@ export class TagService { * Required if filter is `by-external-system-reference` */ externalSystemReference?: string | null, + /** + * Optional comma separated string array of tag category ids to filter your result to one or more tag categories (`tagCategoryId`). Wildcards are not supported. May only be used in combination with the `by-tag-prefix` and `by-tag-ids` filters. + */ + tagCategoryIdAnyOf?: Array | null, + /** + * Optional comma separated string array of Maintenance Concept Ids (`maintenanceConceptId` in response model). Wildcards are not supported. May only be used in combination with the `by-tag-prefix` and `by-tag-ids` filters. + */ + maintenanceConceptIdAnyOf?: Array, + /** + * Latest `createdOnDate` date to include. Use together with `created-after-date` to get Tags created in the given time period. May only be used in combination with the `by-tag-prefix` and `by-tag-ids` filters. + */ + createdBeforeDate?: string | null, + /** + * Earliest `createdOnDate` date to include. Use together with `created-before-date` to get Tags created in the given time period. May only be used in combination with the `by-tag-prefix` and `by-tag-ids` filters. + */ + createdAfterDate?: string | null, + /** + * Latest `changedOnDate` date to include. Use together with `changed-after-date` to get Tags changed in the given time period. May only be used in combination with the `by-tag-prefix` and `by-tag-ids` filters. + */ + changedBeforeDate?: string | null, + /** + * Earliest `changedOnDate` date to include. Use together with `changed-before-date` to get Tags changed in the given time period. May only be used in combination with the `by-tag-prefix` and `by-tag-ids` filters. + */ + changedAfterDate?: string | null, /** * Include maintenance records. If include-maintenance-record-types is not supplied, all supported types are returned */ @@ -748,7 +798,7 @@ export class TagService { */ includeLinearData?: boolean, /** - * Results to return pr page + * Results to return per page */ perPage?: number, /** @@ -767,6 +817,12 @@ export class TagService { 'tag-prefix': tagPrefix, 'tag-ids-any-of': tagIdsAnyOf, 'external-system-reference': externalSystemReference, + 'tag-category-id-any-of': tagCategoryIdAnyOf, + 'maintenance-concept-id-any-of': maintenanceConceptIdAnyOf, + 'created-before-date': createdBeforeDate, + 'created-after-date': createdAfterDate, + 'changed-before-date': changedBeforeDate, + 'changed-after-date': changedAfterDate, 'include-maintenance-records': includeMaintenanceRecords, 'include-maintenance-record-types': includeMaintenanceRecordTypes, 'include-work-orders': includeWorkOrders, 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 9f0af05f5..60a8f0ffe 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/UpcomingModifiedEndpointsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/UpcomingModifiedEndpointsService.ts @@ -2,9 +2,9 @@ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -import type { Plant } from '../models/Plant'; import type { ProblemDetails } from '../models/ProblemDetails'; import type { StatusUpdateJsonPatch } from '../models/StatusUpdateJsonPatch'; +import type { WorkOrderOperationJsonPatch } from '../models/WorkOrderOperationJsonPatch'; import type { CancelablePromise } from '../core/CancelablePromise'; import { OpenAPI } from '../core/OpenAPI'; @@ -13,115 +13,83 @@ import { request as __request } from '../core/request'; export class UpcomingModifiedEndpointsService { /** - * Plants - Search + * Work order - Update operation * ### Overview - * Search for plants through predefined filters. + * Update the work order operation for all work order types. + * 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 following fields are possible to update: + * - actualPercentageComplete + * - isCompleted + * - schedulingStartConstraintId - Value one of: `MSO` - Must start on, `SNET` - Start no earlier than or `SNLT` - Start no later than + * - schedulingStartConstraintDateTime + * - schedulingFinishConstraintId - Value one of: `MFO ` - Must finish on, `FNET` - Finish no earlier than or `FNLT` - Finish no later than + * - schedulingFinishConstraintDateTime + * - systemCondition + * - operationId + * - title + * - text + * - workCenterId + * - workCenterPlantId + * - standardTextTemplate + * - plannedWorkHours + * - plannedWorkDuration + * - capacityCount + * - calculationKey + * + * Individual operations can be updated with relevant codes for `systemCondition` to describe required process conditions for each operation. Possible values for the `systemCondition`: + * - 0 - Unit shutdown + * - 1 – In operation + * - 2 – System shutdown + * - 3 – Partial production shutdown + * - 4 – Full production shutdown + * - 5 - Reset condition value + * + * ### Update release 1.19.0 + * Added support for `operationId`, `title`, `text`, `workCenterId`, `workCenterPlantId`, `standardTextTemplate`, `plannedWorkHours`, `plannedWorkDuration`, `capacityCount`, `calculationKey`, `systemCondition,` and `isExcludedFromWorkOrderPlan`. + * + * ### 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.22.0 + * Added support to reset `systemCondition` by passing in the value `5`. + * + * ### Update release 1.31.0 + * Fixed enum values for `schedulingStartConstraintId` and `schedulingFinishConstraintId` + * + * ### Update release 1.35.0 + * Added support for updating the person responsible for the operation by using the path `personResponsibleEmail`. The value used for this path should be the equinor email of an employee with a SAP user. * - * ### Filter: by-plant - * Search plant based on one or more `plant-id` - * - * Parameters: - * - plant-id (supports comma-separated list) - * - * ### Filter: by-planning-plant - * Search plant based on one or more `planning-plant-id` - * - * Parameters: - * - planning-plant-id (supports comma-separated list) - * - * ### Update version 1.13.0 - * Added `include-equipment-catalog-profiles` query parameter. - * - * ### 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 change - * Added `include-responsible-persons` to the response. Added `responsiblePersons` to the response. + * ### Upcoming changes + * Added support for updating property `isExcludedFromWorkOrderPlan`. * - * @returns Plant Success * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ - public static searchPlant({ - filter, - plantId, - planningPlantId, - includeLocations = false, - includeWorkCenters = false, - includePlannerGroups = false, - includeTagCatalogProfiles = false, - includeEquipmentCatalogProfiles = false, - includeSurfaceDegradationFactors = false, - includeBaselinePlans = false, - includeResponsiblePersons = false, + public static updateWorkOrderOperation({ + operationId, + requestBody, }: { + operationId: string, /** - * Filter to limit plants by - */ - filter: 'by-plant' | 'by-planning-plant', - /** - * Plant identifier - */ - plantId?: string, - /** - * Plant used to plan the maintenance work. Usually same as `plantId`, but there are some cases were one `planningPlantId` is used across multiple `plantId`. - */ - planningPlantId?: string, - /** - * Include location for plant - */ - includeLocations?: boolean, - /** - * Include work centers for plant + * Update of Work order details */ - includeWorkCenters?: boolean, - /** - * Include planner groups for plant - */ - includePlannerGroups?: boolean, - /** - * Include tag catalog profiles in use for plant - */ - includeTagCatalogProfiles?: boolean, - /** - * Include equipment catalog profiles in use for plant - */ - includeEquipmentCatalogProfiles?: boolean, - /** - * Include surface degradations for plant - */ - includeSurfaceDegradationFactors?: boolean, - /** - * 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> { + requestBody: Array, + }): CancelablePromise { return __request(OpenAPI, { - method: 'GET', - url: '/plants', - query: { - '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, + method: 'PATCH', + url: '/work-order-operations/{operation-id}', + path: { + 'operation-id': operationId, }, + 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`, }, }); } 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 87bebef97..05a1ec357 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/WorkOrderOperationsService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/WorkOrderOperationsService.ts @@ -5,10 +5,10 @@ import type { AddSafetyMeasure } from '../models/AddSafetyMeasure'; import type { ProblemDetails } from '../models/ProblemDetails'; import type { SafetyMeasure } from '../models/SafetyMeasure'; -import type { SubseaWorkOrderMaterial } from '../models/SubseaWorkOrderMaterial'; +import type { SubseaWorkOrderMaterialForAddMaterialRespone } from '../models/SubseaWorkOrderMaterialForAddMaterialRespone'; import type { TechnicalFeedbackJsonPatch } from '../models/TechnicalFeedbackJsonPatch'; -import type { WorkOrderMaterial } from '../models/WorkOrderMaterial'; import type { WorkOrderMaterialAdd } from '../models/WorkOrderMaterialAdd'; +import type { WorkOrderMaterialForAddMaterialRespone } from '../models/WorkOrderMaterialForAddMaterialRespone'; import type { WorkOrderMaterialJsonPatch } from '../models/WorkOrderMaterialJsonPatch'; import type { WorkOrderOperationJsonPatch } from '../models/WorkOrderOperationJsonPatch'; import type { WorkOrderServiceOperationJsonPatch } from '../models/WorkOrderServiceOperationJsonPatch'; @@ -65,6 +65,12 @@ export class WorkOrderOperationsService { * ### Update release 1.31.0 * Fixed enum values for `schedulingStartConstraintId` and `schedulingFinishConstraintId` * + * ### Update release 1.35.0 + * Added support for updating the person responsible for the operation by using the path `personResponsibleEmail`. The value used for this path should be the equinor email of an employee with a SAP user. + * + * ### Upcoming changes + * Added support for updating property `isExcludedFromWorkOrderPlan`. + * * @returns ProblemDetails Response for other HTTP status codes * @throws ApiError */ @@ -253,6 +259,9 @@ export class WorkOrderOperationsService { * ### Update release 1.33.0 * Added support for new properties `supplierId`, `vendorsMaterialNumber`, `deliveryTimeInDays`, `requisitionerId`, `holdDeliveryOnshore`, `text`. * + * ### Update release 1.35.0 + * Added new property `requisitionerId` to the response. + * * @returns ProblemDetails Response for other HTTP status codes * @returns any Created * @throws ApiError @@ -266,7 +275,7 @@ export class WorkOrderOperationsService { * Add material details */ requestBody: Array, - }): CancelablePromise> { + }): CancelablePromise> { return __request(OpenAPI, { method: 'POST', url: '/work-order-operations/{operation-id}/materials', 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 601006a4b..b90c8bad6 100644 --- a/packages/api/maintenance-api/src/lib/generated/services/WorkOrdersService.ts +++ b/packages/api/maintenance-api/src/lib/generated/services/WorkOrdersService.ts @@ -112,7 +112,7 @@ export class WorkOrdersService { */ personResponsibleId?: string, /** - * Include completed work order operations + * Include Work Order Plans with completed work order operations */ includeCompletedWorkOrderOperations?: boolean, /** @@ -291,9 +291,9 @@ export class WorkOrdersService { * * Added option to not include operations for the Work Orders by setting the optional parameter `include-operations` to `false` (default is `true`). This can improve performance for the endpoint. * - * Added property `requiredEndDate` to the top level objects in the response. + * Added property `requiredEndDate` to the top level objects in the response (Not including preventive work orders). * - * Added property `confirmationId` to `operations` + * Added property `confirmationId`, `RemainingWork` and `RemainingWorkUnit` to `operations` * * @returns WorkOrderWithOperationList Success * @returns ProblemDetails Response for other HTTP status codes @@ -473,7 +473,7 @@ export class WorkOrdersService { * Added property `hasStatusREL` to the response. * * ### Update release 1.35.0 - * Added optional pagination support. + * Added support for optional pagination. * * @returns WorkOrderOptimizedForQuery Success * @returns ProblemDetails Response for other HTTP status codes @@ -511,7 +511,7 @@ export class WorkOrdersService { includeMaintenanceRecord = false, maxResults, perPage, - page, + page = 1, }: { /** * Query based on planningPlantIds (any-of)