Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/long-seahorses-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@equinor/mad-maintenance-api-ts-wrapper": major
---

Update API wrapper to support api version 1.37.0
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export type OpenAPIConfig = {

export const OpenAPI: OpenAPIConfig = {
BASE: 'https://api-test.gateway.equinor.com/maintenance-api',
VERSION: '1.35.0',
VERSION: '1.37.0',
WITH_CREDENTIALS: false,
CREDENTIALS: 'include',
TOKEN: undefined,
Expand Down
14 changes: 12 additions & 2 deletions packages/api/maintenance-api/src/lib/generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ export type { MaintenanceStrategy } from './models/MaintenanceStrategy';
export type { MaterialMinimal } from './models/MaterialMinimal';
export type { Measurement } from './models/Measurement';
export type { MeasurementCreate } from './models/MeasurementCreate';
export type { MeasurementFromMeasuringPointLookup } from './models/MeasurementFromMeasuringPointLookup';
export type { MeasurementUpdate } from './models/MeasurementUpdate';
export type { MeasuringPoint } from './models/MeasuringPoint';
export type { MeasuringPointAddClass } from './models/MeasuringPointAddClass';
Expand Down Expand Up @@ -221,6 +222,10 @@ 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 { OverheadMaintenanceWorkOrder } from './models/OverheadMaintenanceWorkOrder';
export type { OverheadMaintenanceWorkOrderBasic } from './models/OverheadMaintenanceWorkOrderBasic';
export type { OverheadMaintenanceWorkOrderSimple } from './models/OverheadMaintenanceWorkOrderSimple';
export type { OverheadMaintenanceWorkOrderWithOperationSelf } from './models/OverheadMaintenanceWorkOrderWithOperationSelf';
export type { page } from './models/page';
export type { perPage } from './models/perPage';
export type { PlannerGroup } from './models/PlannerGroup';
Expand All @@ -246,6 +251,7 @@ export type { ProjectWorkOrderCreate } from './models/ProjectWorkOrderCreate';
export type { ProjectWorkOrderSimple } from './models/ProjectWorkOrderSimple';
export type { ProjectWorkOrderSimpleWithRelationship } from './models/ProjectWorkOrderSimpleWithRelationship';
export type { ProjectWorkOrderWithOperationSelf } from './models/ProjectWorkOrderWithOperationSelf';
export type { PSVCertificationReportCreate } from './models/PSVCertificationReportCreate';
export type { QualitativeCode } from './models/QualitativeCode';
export type { RawEquipmentChange } from './models/RawEquipmentChange';
export type { RawEquipmentChangeReturn } from './models/RawEquipmentChangeReturn';
Expand Down Expand Up @@ -275,14 +281,15 @@ export type { ServiceOperation } from './models/ServiceOperation';
export type { SimpleMaintenanceRecordsList } from './models/SimpleMaintenanceRecordsList';
export type { StandardTextTemplate } from './models/StandardTextTemplate';
export type { Status } from './models/Status';
export type { StatusMinimal } from './models/StatusMinimal';
export type { StatusUpdate } from './models/StatusUpdate';
export type { StatusUpdateJsonPatch } from './models/StatusUpdateJsonPatch';
export type { subHierarchyLimit } from './models/subHierarchyLimit';
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 { SubseaWorkOrderMaterialForAddMaterialResponse } from './models/SubseaWorkOrderMaterialForAddMaterialResponse';
export type { SubseaWorkOrderOperation } from './models/SubseaWorkOrderOperation';
export type { SubseaWorkOrderSimple } from './models/SubseaWorkOrderSimple';
export type { SubseaWorkOrderSimpleWithRelationship } from './models/SubseaWorkOrderSimpleWithRelationship';
Expand Down Expand Up @@ -347,11 +354,12 @@ 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 { WorkOrderMaterialForAddMaterialResponse } from './models/WorkOrderMaterialForAddMaterialResponse';
export type { WorkOrderMaterialJsonPatch } from './models/WorkOrderMaterialJsonPatch';
export type { WorkOrderObjectMaintenanceRecordMinimal } from './models/WorkOrderObjectMaintenanceRecordMinimal';
export type { WorkOrderOperation } from './models/WorkOrderOperation';
export type { WorkOrderOperationCreate } from './models/WorkOrderOperationCreate';
export type { WorkOrderOperationForSearchFull } from './models/WorkOrderOperationForSearchFull';
export type { WorkOrderOperationInPlan } from './models/WorkOrderOperationInPlan';
export type { WorkOrderOperationJsonPatch } from './models/WorkOrderOperationJsonPatch';
export type { WorkOrderOperationJsonPatchDeprecated } from './models/WorkOrderOperationJsonPatchDeprecated';
Expand Down Expand Up @@ -387,6 +395,7 @@ export { ModificationProposalsService } from './services/ModificationProposalsSe
export { ModificationWorkOrdersService } from './services/ModificationWorkOrdersService';
export { ModifiedEndpointsService } from './services/ModifiedEndpointsService';
export { NewEndpointsService } from './services/NewEndpointsService';
export { OverheadMaintenanceWorkOrdersService } from './services/OverheadMaintenanceWorkOrdersService';
export { PreventiveWorkOrdersService } from './services/PreventiveWorkOrdersService';
export { ProjectWorkOrdersService } from './services/ProjectWorkOrdersService';
export { ReportsService } from './services/ReportsService';
Expand All @@ -396,6 +405,7 @@ export { TagService } from './services/TagService';
export { TechnicalClarificationsService } from './services/TechnicalClarificationsService';
export { TechnicalInformationUpdateRequestsService } from './services/TechnicalInformationUpdateRequestsService';
export { UpcomingModifiedEndpointsService } from './services/UpcomingModifiedEndpointsService';
export { UpcomingNewEndpointsService } from './services/UpcomingNewEndpointsService';
export { WorkOrderOperationsService } from './services/WorkOrderOperationsService';
export { WorkOrderRelationshipsService } from './services/WorkOrderRelationshipsService';
export { WorkOrdersService } from './services/WorkOrdersService';
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,6 @@ export type CorrectiveWorkOrderSimple = {
priorityId: 'L' | 'M' | 'H' | 'U' | 'D';
costs: number;
costsCurrency: string;
/**
* Criteria used by Equinor in CMR (Critical Maintenance Report):
* Corrective work orders where at least one item in the list or primary tag:
*
* - has the error classification "Dead" or "Seriously ill" or
* - has a "High" consequence classification for HSE or Production (one table for each) or
* - has received a "Hidden failure" code.
*
*/
cmrIndicator: boolean;
/**
* Indicates whether the Work Order is open or not.
*/
Expand All @@ -75,5 +65,9 @@ export type CorrectiveWorkOrderSimple = {
costWBS: string;
additionalCostWBSId: string;
additionalCostWBS: string;
/**
* Indicates whether the Work Order has communication
*/
hasCommunication?: boolean;
};

Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ export type GenericWorkOrderSimple = {
* - has a "High" consequence classification for HSE or Production (one table for each) or
* - has received a "Hidden failure" code.
*
* Deprecated as of 21.01.2025. For more information, please see STRY0261073 in ServiceNow.
*
* @deprecated
*/
cmrIndicator?: boolean;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@

export type MaintenanceRecordMinimal = {
recordId: string;
recordResource: 'maintenance-records/modification-proposals' | 'maintenance-records/failure-reports' | 'maintenance-records/activity-reports' | 'maintenance-records/technical-information-update-requests' | 'maintenance-records/technical-clarifications' | 'maintenance-records/certification-reports' | 'maintenance-records/unsupported-resource';
recordResource: 'maintenance-records/modification-proposals' | 'maintenance-records/failure-reports' | 'maintenance-records/activity-reports' | 'maintenance-records/technical-information-update-requests' | 'maintenance-records/technical-clarifications' | 'maintenance-records/certifications' | 'maintenance-records/unsupported-resource';
tagId: string | null;
tagPlantId: string;
tag: string;
/**
* Structured location within the plant where the tag is located
*/
locationId?: string;
location?: string;
equipmentId?: string;
equipment?: string;
title: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export type Measurement = {
maintenanceRecordId: string | null;
measuringPointId: string;
measurementDateTime: string;
/**
* Title of the measurement
*/
measurementTitle: string;
quantitativeReading: number;
quantitativeReadingUnitId: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,9 @@ export type MeasurementCreate = {
* The workOrderId of the related work order
*/
workOrderId?: string;
/**
* Long text for the measurement document
*/
text?: string;
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { Measurement } from './Measurement';

export type MeasurementFromMeasuringPointLookup = (Measurement & {
/**
* Long text for the measurement document
*/
text?: string | null;
});

Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,28 @@
export type MeasurementUpdate = {
/**
* JSON Patch operation according to RFC6902
*
* Operation `replace` is suitable for the following properties:
* - `/measurementTitle`
* - `/processingStatusId`
* - `/text`
*
* Operation `append` is suitable for the following properties:
* - `/text`
*
* Operation `prepend` is suitable for the following properties:
* - `/text`
*
*/
op: 'replace';
op: 'replace' | 'append' | 'prepend';
/**
* Path indicating the property to be impacted by the operation
*/
path: '/measurementTitle' | '/processingStatusId';
path: '/measurementTitle' | '/processingStatusId' | '/text';
/**
* Value to be assigned to a resource property based on the operation and path.
*
* "replace" supports following fields:
* Path specific information:
* - /measurementTitle - max-length 40 characters
* - /processingStatusId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
/* tslint:disable */
/* eslint-disable */

import type { Measurement } from './Measurement';
import type { MeasurementFromMeasuringPointLookup } from './MeasurementFromMeasuringPointLookup';
import type { MeasuringPointBasic } from './MeasuringPointBasic';
import type { MeasuringPointCharacteristic } from './MeasuringPointCharacteristic';
import type { QualitativeCode } from './QualitativeCode';

export type MeasuringPoint = (MeasuringPointBasic & {
lastMeasurement?: Measurement | null;
measurements?: Array<Measurement> | null;
lastMeasurement?: (MeasurementFromMeasuringPointLookup & {
/**
* Long text for the measurement document
*/
text?: string | null;
}) | null;
measurements?: Array<MeasurementFromMeasuringPointLookup> | null;
qualitativeCodes?: Array<QualitativeCode> | null;
characteristics?: Array<MeasuringPointCharacteristic> | null;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,6 @@ export type ModificationWorkOrderSimple = {
* Field used to assist in grouping/sorting Work orders. Unstructured field used non-consistently between plants
*/
sortField: string;
/**
* Criteria used by Equinor in CMR (Critical Maintenance Report):
* Corrective work orders where at least one item in the list or primary tag:
*
* - has the error classification "Dead" or "Seriously ill" or
* - has a "High" consequence classification for HSE or Production (one table for each) or
* - has received a "Hidden failure" code.
*
*/
cmrIndicator: boolean;
/**
* Indicates whether the Work Order is open or not.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { OverheadMaintenanceWorkOrderBasic } from './OverheadMaintenanceWorkOrderBasic';
import type { ServiceOperation } from './ServiceOperation';
import type { Status } from './Status';
import type { TagRelatedToWorkOrder } from './TagRelatedToWorkOrder';
import type { WorkOrderAttachment } from './WorkOrderAttachment';
import type { WorkOrderOperation } from './WorkOrderOperation';

export type OverheadMaintenanceWorkOrder = (OverheadMaintenanceWorkOrderBasic & {
operations?: Array<WorkOrderOperation>;
serviceOperations?: Array<ServiceOperation>;
/**
* All statuses possible with information about activation
*/
statuses?: Array<Status>;
/**
* Attachments for this Overhead Maintenance Work order
*/
attachments?: Array<WorkOrderAttachment>;
/**
* Related equipment
*/
tagsRelated?: Array<TagRelatedToWorkOrder>;
additionalCostWBSId: string;
additionalCostWBS: string;
costWBS: string;
isProductionCritical: string;
isHSECritical: string;
/**
* Value only returned if include-person-responsible=true. The internal id of the person responsible for the processing of the overhead maintenance work order. The id represents the employee id of the person.
*/
personResponsibleId: string | null;
/**
* Value only returned if include-person-responsible=true. The email of the person responsible for the processing of the overhead maintenance work order. This is the preferred way of identifying the person as it's consistent across systems.
*/
personResponsibleEmail: string | null;
});

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { OverheadMaintenanceWorkOrderSimple } from './OverheadMaintenanceWorkOrderSimple';

export type OverheadMaintenanceWorkOrderBasic = (OverheadMaintenanceWorkOrderSimple & {
text: string;
/**
* The type of work order it is an instance of
*/
workOrderTypeId: 'overheadMaintenanceWorkOrder';
plannerGroup: string;
workCenter: string;
/**
* If there is a person responsible assigned
*/
hasPersonResponsible: boolean;
costWBSId: string;
projectId: string;
costNetworkId: string;
costNetworkOperationId: string;
});

Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

export type OverheadMaintenanceWorkOrderSimple = {
workOrderId: string;
tagId: string | null;
tagPlantId: string;
tag: string;
title: string;
workCenterId: string;
workCenterPlantId: string;
/**
* Structured location within the plant where the tag is located
*/
locationId: string;
failureReportId: string;
plantId: string;
planningPlantId: string;
plannerGroupId: string;
/**
* Active statuses for the overhead maintenance order with space as separating character
*/
activeStatusIds: string;
maintenanceTypeId: string;
maintenanceType: string;
requiredEndDate: string | null;
/**
* An identifier to the revision (shutdown or campaign work) this work order is related to
*/
revisionId: string;
/**
* Name of the revision (shutdown or campaign work) this work order is related to
*/
revision: string;
basicStartDateTime: string | null;
basicEndDateTime: string | null;
createdDateTime: string | null;
/**
* Date and time of when the Work order was changed
*/
changedDateTime: string | null;
/**
* Field used to assist in grouping/sorting Work orders. Unstructured field used non-consistently between plants
*/
sortField: string;
/**
* Priority of Work order
* * `L` - Low priority
* * `M` - Medi. priority
* * `H` - High priority
* * `U` - Unprioritized
* * null - No priority assigned
*
*/
priorityId: 'L' | 'M' | 'H' | 'U' | null;
/**
* Indicates whether the Work Order is open or not.
*/
isOpen: boolean;
};

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { OverheadMaintenanceWorkOrderSimple } from './OverheadMaintenanceWorkOrderSimple';
import type { WorkOrderOperationSimpleForSearch } from './WorkOrderOperationSimpleForSearch';

export type OverheadMaintenanceWorkOrderWithOperationSelf = (OverheadMaintenanceWorkOrderSimple & {
text?: string | null;
requiredEndDate: string | null;
_links: {
self?: string;
};
operations?: Array<WorkOrderOperationSimpleForSearch> | null;
});

Loading
Loading