{"version":3,"sources":["Datasource/LocalDB/LocalDB.ts","Datasource/LocalDB/syncHelpers.ts","utils/BEM.ts","Datasource/LocalDB/Transformers/signingKeyChanges.ts","Datasource/LocalDB/Transformers/signedDatas.ts","Datasource/LocalDB/Transformers/aircraftMaintenanceLimitExtensions.ts","Datasource/LocalDB/syncSubscriptions.ts","utils/Authentication/InitReauthFlow.ts","Datasource/LocalDB/DbSyncer.ts","Datasource/LocalDB/standardItemHandler.ts","reducers/tlbUserReducer.ts","reducers/cognitoUserReducer.ts","utils/maybe.ts","Datasource/LocalDB/Transformers/flightLegs.ts","Datasource/AircraftDocuments/AircraftDocuments.ts","Datasource/Aircrafts/AircraftsDatasource.ts","utils/ErrorLog/ErrorLog.ts","Datasource/CountableChanges/types.ts","Datasource/FlightLegs/FlightLeg.ts","utils/arrayUtils.ts","Datasource/LocalDB/Transformers/flights.ts","Datasource/LocalDB/Transformers/aircrafts.ts","Datasource/LocalDB/Transformers/countableChanges.ts","rootReducer.ts","wrappers/WithStore.tsx","Datasource/LocalDB/Transformers/flightDocuments.ts","utils/BackendSwitcher.ts","components/LoadingScreenOverlay.tsx","Admin/Utils/LinkPrefix.tsx","Admin/Scheduling/model/PerformanceProfileTypes.ts","Datasource/Contacts/ContactsDatasource.ts","Datasource/FlightDocuments/FlightDocumentsDatasource.ts","Datasource/datasourceUtils.ts","Datasource/LocalDB/Transformers/squawks.ts","Datasource/LocalDB/Transformers/squawkDeferrals.ts","Datasource/LocalDB/Transformers/releaseToServices.ts","Admin/AircraftMaintenanceLimitExtensions/AircraftMaintenanceLimitExtension.ts","Datasource/Users/UserDatasource.ts","components/FormFields/InputTextField.tsx","Datasource/Resource.ts","Datasource/CountableChanges/CountableChangeDatasource.ts","Admin/Datasources/AircraftMaintenanceLimitExtensions.ts","Datasource/FlightLegs/FlightLegDatasource.ts","Datasource/Squawks/SquawksDatasource.ts","reducers/syncReducer.ts","Datasource/LocalDB/Transformers/contacts.ts","components/FormFields/FieldErrorMessage.tsx","components/FormFields/GenericField.tsx","stylekit/colors.ts","Datasource/LocalDB/Transformers/dutyItems.ts","Datasource/ReleaseToService/ReleaseToServiceDatasource.ts","components/FormFields/FormErrors.ts","utils/numbers.ts","utils/objectKeys.ts","utils/string.ts","utils/format.ts","utils/index.ts","Admin/Utils/ComplianceMode/ComplianceModeReducer.ts","Datasource/Aircrafts/types.ts","Datasource/CountableChanges/CountableChange.ts","installationData.js","Datasource/Flights/Flight.ts","Datasource/ReleaseToService/types.ts","aws-exports.js","MainMenu/reducer.ts","Datasource/LocalDB/Transformers/logbookRecords.ts","reducers/supplementalDataSyncReducer.ts","utils/Authentication/Reauthenticate.ts","Datasource/LogbookRecords/LogbookRecordsDatasource.ts","Admin/Datasources/AdminDatasource.ts","utils/timeUtils.ts","Datasource/FlightLegs/FlightOpsTypes.ts","components/FormFields/InputCheckboxField.tsx","utils/NumberToPrecision.ts","components/FormFields/Suggester.tsx","Datasource/FlightLegs/CrewRoleTypes.ts","graphql/mutations.ts","Datasource/FlightDocuments/FlightDocument.ts","components/FormFields/FieldDetailedValue.ts","Datasource/SigningKeyChanges/SigningKeyChangeDatasource.ts","utils/Signing/SignatureGenerator.ts","Datasource/SignedData/SignedDataDatasource.ts","Datasource/Logbook/SaveFlightLogbookRecords.ts","Datasource/Flights/FlightsDatasource.ts","utils/idGenerator.ts","Datasource/Squawks/types.ts","Admin/AircraftMaintenanceLimits/AircraftMaintenanceLimit.ts","utils/colors.ts","Datasource/Logbook/InLegLogbook.ts","Datasource/FlightDocuments/LocalDocumentContent.ts","screens/LoginScreen/logo.svg","Datasource/util/whenOnline.ts","AppSelector.tsx","screens/LoginScreen/LoginForm.tsx","screens/LoginScreen/CompleteNewPasswordForm.tsx","screens/LoginScreen/LoginScreen.tsx","screens/LoginScreen/CredentialStore.ts","wrappers/WithAuthenticatedUser.tsx","index.tsx"],"names":["LocalDB","Dexie","constructor","super","aircrafts","aircraftDocuments","aircraftDocumentsDownloaded","aircraftMaintenanceLimits","aircraftMaintenanceLimitExtensions","flights","legs","documents","localDocumentContents","countableChanges","squawks","squawkDeferrals","releaseToServices","dutyItems","contacts","logbookRecords","airportCoordinates","scratchStartLegState","scratchFinishLegState","syncItems","signingKeyChanges","signedData","initPromise","errorLogs","flightSupplementalData","this","version","stores","table","init","Promise","all","clear","db","getDb","wrapHandlerWithAccumulator","handler","accumulator","resolver","rejecter","promise","resolve","reject","wrap","items","push","start","async","length","e","getStandardSyncerFields","commandName","c","returnFields","mutationName","inputKey","query","syncUpCommandsToMutation","commands","inputPairs","mutations","parameters","validCommands","map","input","inputType","console","error","join","BEM","name","BEMHelper","mergeClasses","classes","className","pageClasses","formClasses","formRowClass","undefined","counter","signingKeyChangeTransform","id","deleted","signedDataTransform","aircraftsResyncSubscription","getQuery","nextToken","aircraftItemFields","flightItemFields","flightLegItemFields","flightDocumentItemFields","squawkItemFields","squawkDeferralItemFields","countableChangeItemFields","releaseToServiceItemFields","key","onNewItems","aircraftFromDb","dbHandlers","getDbHandlers","flightHandler","legHandler","aircraftHandler","squawkHandler","squawkDeferralHandler","releaseToServiceHandler","countableChangeChandler","flightDocumentHandler","promises","forEach","aircraft","flightTransform","flight","flightLegFromDb","flightDocuments","squawkFromDb","squawk","squawkDeferralFromDb","countableChangeFromDb","releaseToServiceFromDb","releaseToService","Object","values","handlerWrapper","getStandardItemHandler","flightDocumentItemHandler","aircraftsSubscription","flightsSubscription","flightDocumentsSubscription","flightLegsSubscription","squawksSubscription","squawkDeferralsSubscription","releaseToServicesSubscription","countableChangesSubscription","aircraftDocumentsSubscription","aircraftMaintenanceLimitsSubscription","aircraftMaintenanceLimitExtensionItemFields","itemsBare","extensionsBare","item","extensions","bare","aircraftMaintenanceLimitExtensionFromDb","aircraftMaintenanceLimitFromDb","aircraftMaintenanceLimitExtensionsSubscription","dutyItemsSubscription","currentUserId","isInitialSync","dutyItemItemFields","nextTokenGetter","data","meta","lastItem","oldestRequired","Date","now","startDate","toISOString","dutyItemTransform","contactsResyncSubscription","contactItemFields","contactsSubscription","crewables","filter","i","isActiveCrew","logbookRecordsSubscription","logbookRecordItemFields","dbSyncerUpDefintions","Map","set","flightToDb","flightLegSyncerDefinition","countableChangeSyncerDefinition","squawkSyncerDefinition","squawkDeferralToDb","releaseToServiceSyncerDefinition","flightDocumentToDb","dutyItemToDb","remoteToLocalTransform","queryName","appendOnly","logbookRecordToDb","record","_version","aircraftMaintenanceLimitExtensionToDb","dbSyncerResyncSubscriptions","dbSyncerUpdateSubscriptions","reauthFlowPromise","initReauthFlow","log","Auth","currentAuthenticatedUser","store","dispatch","type","TLB_USER_SIGN_OUT","COGNITO_USER_SIGN_OUT","finally","LOCAL_STORAGE_KEY_LAST_SYNC","LOCAL_STORAGE_KEY_DB_VERSION","DbSyncer","lastSyncTime","parseInt","window","localStorage","getItem","timeout","syncInterval","currentSync","wipe","setItem","removeItem","sync","setInterval","indices","tableName","has","Error","itemId","bulkPut","updateSyncState","setLengthUp","setTimeout","params","isInProgress","lengthUpIncrement","setLengthDown","syncState","getState","queueLength","queueLengthUp","inProgress","queueLengthDown","newState","time","offline","SYNC_CHANGE","isStale","shouldDoCompleteResync","setLastSyncTime","force","startTime","warn","clearTimeout","navigator","onLine","whenOnline","syncUp","syncDown","toCollection","toArray","syncItemToCommand","si","logError","toString","remoteResponse","commandResult","executeSyncUpCommands","result","code","errors","successfulCommands","index","indexOf","command","syncItem","message","returned","commandError","find","path","createNotReturned","errorType","updateNotReturned","splice","maybeResult","attemptRetryWithVersion","transaction","localDataStructure","needsResync","getNeedsResync","executionPromises","delete","put","lengthUp","Math","max","messages","getErrorMessagesFromSyncResult","forceSetVersion","get","definition","gqlo","graphqlOperation","API","graphql","info","getCurrentUserId","dateStart","subscriptionListToUse","lastSync","additionalData","queue","subscription","promiseList","queries","initialResult","queueItem","q","resultData","existingVersion","retryCommand","retryResult","maybeUser","cognitoUser","cognitoUserIsSignedIn","dbSyncer","getDbSyncer","wipeDbSyncer","syncResult","JSON","stringify","transform","toDelete","toPut","bulkDelete","LOCAL_STORAGE_KEY","TLB_USER_STATE_SIGNED_OUT","TLB_USER_STATE_PROCESSING","tlbUserInitialState","getInitialState","TLB_USER_SIGN_IN","TLB_USER_SIGN_PROCESS_START","TLB_USER_AUTH_ERROR","TlbUserReducer","state","action","persistState","isPilot","user","userId","aircraftId","isAircraft","isAdmin","isPilotOrAircraft","isTechnician","dataIsStale","useSignedTlbUserState","useAnyTlbUserState","tlbUserIsSignedIn","useSelector","maybeLocalStorageData","parse","COGNITO_USER_GROUP_ADMIN","COGNITO_USER_GROUP_TLB_USER","COGNITO_USER_GROUP_TECH","COGNITO_USER_GROUP_SALES","COGNITO_USER_GROUP_OPS","COGNITO_USER_GROUP_REPORT","COGNITO_USER_GROUP_ACCOUNTANT","COGNITO_USER_STATE_SIGNED_OUT","COGNITO_USER_STATE_PROCESSING","cognitoUserInitialState","COGNITO_USER_SIGN_IN","COGNITO_USER_SIGN_PROCESS_START","COGNITO_USER_AUTH_ERROR","CognitoUserReducer","groups","slice","includes","useCognitoSignedUserState","useCognitoAnyUserState","cognitoState","isUserInRole","role","some","g","isSome","value","isNone","IsNoneOrEmpty","trim","flightLegToDb","leg","createdAt","flightId","airportOffIcao","ops","securityCheckDate","securityCheckName","preflightCheckDate","preflightCheckName","picName","picId","picRoles","sicName","sicId","sicRoles","deicing","notes","startSignature","phase","startedAt","upliftCountableChangeId","timeOut","inputSources","keys","reservationId","reservationEventId","ticketId","isLegFinished","airportOnIcao","timeOff","timeOn","timeIn","finishNotes","finishSignature","consumptionCountableChangeId","logbookFields","startedFLightLeg","deicingFromJson","editableByUserIds","FLIGHT_LEG_PHASE_FINISH","json","raw","holdOverTime","getAircraftDocumentsForAircraft","where","getAircraftsForPicker","getAircraft","getAircraftMaintenanceLimits","getAircraftMaintenanceLimitExtensionsForLimits","maintenanceLimitIds","anyOf","getAircraftForFlight","lastCountableChange","releases","getFlightsForAircraft","getSquawksForAircraft","getLastCountableChangeForAircraft","getReleaseToServicesForAircraft","aml","getAircraftsByIdLocalAndOnline","offlineAircrafts","getAircraftsById","aircraftIds","then","f","Boolean","offlineAircraftIds","Set","a","aircraftIdsToRequest","acId","onlineAircrafts","getAircraftsByIdOnline","bulkGet","aircraftsQuery","sanitizeId","aircraftsResult","getAircraftForUserId","shift","MCC_OPTIONAL","getAircraftIsMcc","tags","AircraftTag","multiPilot","mutiPilotCat","FlightOps","CAT","useAircraft","setAircraft","useState","useEffect","cancelled","logErrorLocal","place","uuid","date","logErrorRemote","location","hostname","createErrorReport","variables","startsWith","logErrorEvent","event","lineno","colno","filename","errorStack","stack","COUNTABLE_CHANGE_CONSUMPTION","COUNTABLE_CHANGE_UPLIFT","COUNTABLE_CHANGE_CORRECTION","COUNTABLE_CHANGE_MAINTENANCE","AIRCRAFT_COUNTABLE_TACH_TIME","AIRCRAFT_COUNTABLE_HOBBS_TIME","AIRCRAFT_COUNTABLE_FLIGHT_TIME","AIRCRAFT_COUNTABLE_ANY_FLIGHT_TIME","AIRCRAFT_COUNTABLE_LANDINGS","AIRCRAFT_COUNTABLE_CYCLES","AIRCRAFT_COUNTABLE_CYCLES_L","AIRCRAFT_COUNTABLE_CYCLES_R","AIRCRAFT_COUNTABLE_FUEL_GAL","AIRCRAFT_COUNTABLE_FUEL_KG","AIRCRAFT_COUNTABLE_FUEL_LB","AIRCRAFT_COUNTABLE_OIL_LEGACY","AIRCRAFT_COUNTABLE_OIL_QUARTS","AIRCRAFT_COUNTABLE_OIL_PERCENT","AIRCRAFT_COUNTABLE_OIL_L_LEGACY","AIRCRAFT_COUNTABLE_OIL_R_LEGACY","AIRCRAFT_COUNTABLE_OIL_L_QUARTS","AIRCRAFT_COUNTABLE_OIL_R_QUARTS","AIRCRAFT_COUNTABLE_OIL_L_PERCENT","AIRCRAFT_COUNTABLE_OIL_R_PERCENT","AIRCRAFT_COUNTABLE_PRIST","AIRCRAFT_COUNTABLE_TKS","AIRCRAFT_COUNTABLE_OXYGEN","AIRCRAFT_COUNTABLE_FUEL_LITERS","AIRCRAFT_COUNTABLES","AIRCRAFT_UPLIFTABLES","AIRCRAFT_FLIGHT_TIME_COUNTABLES","AIRCRAFT_FUEL_COUNTABLES","countableTypeIsFuel","ct","FUEL_LITERS_TO_GAL","FUEL_LITERS_TO_LB","FUEL_LITERS_TO_KG","AIRCRAFT_IGNORED_CONSUMABLES_ON_INPUT","AIRCRAFT_IGNORED_CONSUMABLES_ON_DISPLAY","TAG_FUEL_BEFORE_UPLIFT","TAG_LABELS_FOR_UPLIFT","TAG_LABELS_FOR_CONSUMABLES","getLabelForCountable","fuelString","getFuelUnit","getIsCountableOil","getLabelForCountableShort","getUnitForCountable","COUNTABLE_BEHAVIOR_ADDITIVE","COUNTABLE_BEHAVIOR_ABSOLUTE","COUNTABLE_TYPES_ADDITIVE","COUNTABLE_TYPES_ABSOLUTE","getCountableTypeBehavior","getFormattedValueForCountable","decimalToHoursMinutes","toFixed","numberToPrecision","FLIGHT_LEG_PHASE_START","isSupervisingInstructorOnLeg","crewId","CREW_ROLE_SUPERVISING_INSTRUCTOR","last","arr","sum","reduce","previousValue","currentValue","toMap","mergeToMap","arrayOnlyValues","arrayOf","num","mappingFunction","Array","arrayToObjByKey","keyBy","reduceSumArr","acc","val","groupBy","xs","prev","current","stringArrayEqualValues","arr1","arr2","sortedArr1","sort","sortedArr2","every","acceptanceNotes","registration","friendlyType","serialNumber","imageUrl","countableTypes","upliftableTypes","aircraftTypeId","performanceProfile","parsePerformanceProfileJson","callsign","additionalTlbData","parseAircraftAdditionalData","countableChange","countableChangeToDb","legId","createdByName","changeTypes","changeValues","countableValuesBefore","countableValuesAfter","migrateTypes","inputTypes","remote","local","changeTypesDeduped","from","countableTypesDeduped","deduplicate","uniqueTypes","types","uniqueType","lastIndexOf","initialState","menu","mainMenuInitialState","syncInitialState","supplementalDataSync","supplementalDataSyncInitialState","complianceMode","complianceModeInitialState","createStore","MainMenuReducer","SyncReducer","SupplementalDataSyncReducer","ComplianceModeReducer","WithStore","children","document","contentKey","isFlightDocumentSaved","content","getLocalFlightDocumentContent","suffix","mime","expires","setFullYear","getFullYear","Storage","contentType","newDocument","uploadDocument","squawkId","deferralId","releaseToServiceId","maintenanceRecordId","title","mediaFileId","flightDocumentTransform","standardHanlingPromise","deletePromise","AppEnvironment","getPreferredEnvironment","OPS","TLB","stringIsEnvironment","setPreferredEnvironment","signOut","LoadingScreenOverlay","LoadingScreenSvg","LoadingSuspense","fallback","width","height","viewBox","xmlns","cx","cy","rx","ry","fill","d","stroke","strokeWidth","fillRule","ADMIN_LINK_PREFIX","navigateA","link","navigate","LinkA","props","to","otherProps","toA","PERF_PROFILE_STRING_KEYS","profile","castedKey","safeNumberOrString","getCrewableContact","crewableContacts","getContactIsCrewable","hasDutyTracking","aircraftVisiblityLimitations","fullReadAccessToAircrafts","accessRights","getContactById","contact","getContactByCrewId","getCrewableContacts","saveFlightDocuments","injectDocumentRemoteData","documentsTable","markToSync","ids","existingDoc","existingDocsById","doc","existing","getFlightDocumentsForLeg","getFlightDocumentsForFlight","getFlightDocumentsForFlightCount","count","getFlightDocumentsForSquawk","getFlightDocumentsForRelease","docsById","maintenanceRecordIds","uniqueMXRIds","docsForRelease","loadFlightDocumentsWithSameMxRecord","replace","sanitizeString","squawkToDb","description","airworthinessAffected","reviewedDate","reviewedName","reviewedId","releaseDate","releaseAircraftFlightTime","releaseName","releaseLicenseNumber","releaseText","releaseSignature","squawkDeferral","createdByLicenseNumber","createdBySignature","text","deferredUntil","melType","actionsRequired","actionPerformedText","releaseToServiceToDb","releaseType","releasedByName","releasedByLicenseNumber","releasedByOrganization","releasedBySignature","aircraftFlightTime","validUntilDate","createEmptyMaintenanceLimitExtension","maintenance","maintenanceLimitId","maintenanceLimitVersion","createdByUserId","extendedByName","validUntilCountableValues","getUser","maybeContact","getUserFromContact","maybeAircraft","getUserIdForAircraft","parsedLimitations","aircraftLimitations","fullAccessAircratIds","contactId","baseAirportIcaos","hasAccessToCustomerDatabase","InputTextField","control","controlProps","controlModifiers","wrapPromise","refreshRequested","onLoadMoreRequested","sourceQualityIndex","maxQualityIndex","refreshId","status","creationTime","resolveTime","suspender","r","read","readMaxQuality","refresh","loadMore","getStatus","getCreationTime","getResolveTime","wrapVariable","loadMoreNotSupported","getCountableChange","getCountableChanges","getCountableChangesForLeg","getLastCountableChangeForLeg","maybeCountableChange","getInitialCountableChange","changes","legsMap","flightsMap","valid","b","refA","diff","getTime","typeIndexA","countableChangeTypeSuccession","putCountableChange","saveFlightLeg","existingDocuments","existingSquawks","existingCountableChanges","getSquawksForLeg","documentIntersection","intersectItems","onlyLocalDocumentIds","oldOnly","newOnly","squawkIntersection","onlyLocalSquawkIds","squawkDeferralIntersection","onlyLocalSquawkDeferralIds","squawksToPut","both","existingSquawkDeferrals","s","getSquawkDeferralsForSquawk","flat","squawksDeferralsToPut","upliftToSync","uplift","cc","valuesDiffer","typesAreSame","documentsToSync","getIdsFromIntersection","squawksToSync","squawkDeferralsToSync","toIdSet","oldItems","newItems","oldIds","newIds","intersection","getFlightLegsForFlight","equals","lastCountables","getFlightLeg","getFlightLegAndAircraft","deleteFlightLeg","getCrewFlightLegsOnline","legsQuery","legsResult","legsByPicId","legsBySicId","sortBy","squawkIds","deferrals","deferralsAndReleases","injectReleasesToDeferrals","deferral","getSquawk","getSquawkAndAircraft","getReleaseToServicesForSquawk","saveDeferral","flightDeferral","aircraftUserId","flightDeferralToDeferral","maybeStoredSyncTime","ls","useSyncState","getErrorMessage","FieldErrorMessage","standardSuggesterFilter","availableValues","inputClean","accents","toLowerCase","regex","RegExp","av","match","GenericField","innerValue","setInnerValue","mutated","setMutated","focused","setFocused","focusedCount","setFocusedCount","blurredCount","setBlurredCount","touched","setTouched","onNewValue","newValue","onChange","useId","idPrefix","tiny","defaultTiny","small","defaultSmall","label","tinyLabel","canShowErrors","forceErrorDisplay","showErrors","errorClass","errorIsCaution","getFormErrorSeverity","FORM_SEVERITY_CAUTION","modifiers","fieldModifiers","classNames","pointerEventsOff","htmlFor","labelSuffixComponent","inputModifiers","evt","target","onFocus","onBlur","onChangeComplete","autoFocus","disabled","placeholder","autoComplete","style","backgroundColor","bgColor","COLORS","suggestions","Suggester","options","onSelected","suggestion","negativeTabIndex","suggestionsNegativeTabIndex","transparent","white","black","gray","gray128","gray160","gray200","gray240","grayF9","greenLight","greenLight2","greenLight3","green","greenDark","blueLight","blue","blueDark","blueInput","brownLight","brown","brownDark","purpleLight","purple","purpleDark","yellow","yellowLight","yellowLight2","orange","pink","red","redLight","redLight2","primary","warning","danger","success","dutyItem","endDate","forceRestAfter","sectorCount","endPlaceIcao","flightLegIds","logbookRecordIds","note","blockTimeMinutes","plannedFdpExtension","linkedDutyItemIds","reportIds","reports","getReleaseToService","saveReleaseToService","release","FORM_SEVERITY_WARNING","formError","severity","scrollToFirstError","errorElement","querySelector","scrollIntoView","behavior","confirmErrors","errorEntries","entries","errorText","countable","getLabelForMaybeCountable","confirm","parseFloatSafe","parsed","Number","parseFloat","isNaN","safeNumber","number","fallbackValue","parseNumber","limitNumber","min","roundNumber","decimalPlaces","mode","factor","pow","fn","objectKeys","startOfString","nubmerOfChars","res","toUpperCase","truncate","maxLength","substring","formatUTCdate","moment","utc","format","isHtmlEmpty","html","jsonParseSafe","str","ComplianceMode","compliance","experimental","ComplianceModeActionType","useComplianceModeState","opsAto","opsCat","complex","multiEngine","aircraftTagLabelsMap","aircraftTagLabels","generateLabels","setConsumption","changeType","changeValue","stateIndex","changeIndex","zeroes","getDerivedCountableChange","appliedByName","getCountableBeforeAfter","counableChange","getCountableChangeTypeHuman","areCountableChangesCompatible","cc1","cc2","installationData","flightDetailOperatorLine","camoData","approval","officialAddress","vat","contactAddress","email","phone","cam","flightBriefData","opsPhone","opsEmail","salesPhone","salesEmail","invoicesEmail","FLIGHT_STATE_ACCEPTED","FLIGHT_STATE_FINISHED","RELEASE_TYPE_IN_APP","RELEASE_TYPE_BY_DOCUMENT","createEmptyFlightReleaseToService","createEmptyReleaseToService","flightReleaseToReleaseToService","flightReleaseToService","awsmobile","visible","ACTION_MAIN_MENU_HIDE","ACTION_MAIN_MENU_TOGGLE","SUPPLEMENTAL_DATA_SYNC_CHANGE","reauthenticate","amplifyUser","cognitoGroups","getSignInUserSession","getAccessToken","decodePayload","isNotPilot","isOnPcLike","screen","getUsername","getTlbUserDataOnline","pathname","tryCreateTlbUser","initComplete","response","executeQuery2","getListContacsByUserIdQuery","listContactsByUserId","userData","getLogbookRecordsByLegId","putLogbookRecord","noop","getData","queryFactory","executeQuery","queryFactoryVariables","postProcess","executeQuery2WithRepetitions","nextLoadOptions","output","loops","maybeNextVariables","getNextQueryVariables","mergeResult","useAdminResource","variablesFactory","useMemo","setPromise","setRefreshId","promiseFactory","useCallback","onRefresh","rId","onMore","nextQueryVariables","newPromise","newData","neverPromise","resource","setResource","autoload","useMappedResource","source","mapper","mapped","mappedRefreshId","original","hours","floor","minutes","abs","round","padStart","DAY","setTimesToStartDate","referenceDate","datesList","lastValidDate","setTime","getMidnightDate","midnightUTC","setUTCHours","dateDifferenceToHumanHoursMinutes","d1","d2","minutesToHumanHoursMinutes","getMinutesDiffFromDates","minutesDiff","minutesToHumanDaysHoursMinutes","daysOnlyWhenAbove","days","getDatesOverlap","start1","end1","start2","end2","getValidityClassName","validity","toDateString","toLocaleDateString","timeZone","toDateStringShort","substr","toDateTimeString","toLocaleString","toTimeString","toLocaleTimeString","toTimeStringShort","toTimeStringShortRounded","h","getUTCHours","m","getUTCMinutes","getUTCSeconds","VALIDITY_PERIOD_YEAR","VALIDITY_PERIOD_MONTH","VALIDITY_PERIOD_DAY","getDateFromDate","unit","untilEnd","fromStart","setUTCFullYear","getUTCFullYear","setUTCMonth","getUTCMonth","setUTCDate","getUTCDate","timestampToDate","timestampSeconds","out","getTurnaroundTimeHuman","date1","date2","turnaroundMinutes","turnaroundDays","turnaroundHours","turnaroundMinutesRemainder","minutesToTimeString","remainingMinutes","getAllFlightOpsTypes","ATO_NCC","ATO_NCO","NCC","NCO","SPO","isOpsAto","isOpsCommercial","isOpsCommercialOrComplex","isOpsCatOrComplex","flightOpsLabels","InputCheckboxField","change","checked","inputLabel","precision","forceZeroes","stringy","split","pop","SuggestionValue","string","classModifiers","_string","option","onClick","preventDefault","tabIndex","CrewRole","CREW_ROLE_PF","PF","CREW_ROLE_PM","PM","CREW_ROLE_FI","FI","CREW_ROLE_FE","FE","CREW_ROLE_LTI","LTI","CREW_ROLE_LTE","LTE","CREW_ROLE_STUDENT_SOLO","studentSolo","CREW_ROLE_STUDENT_DUAL","studentDual","CREW_ROLE_SPIC","SPIC","CREW_ROLE_PICUS","PICUS","CREW_ROLE_SICUS","SICUS","supervisinginstructor","getAllRoles","getPfPmRoles","getPicRoles","isAto","isCatAble","getSicRoles","isMcc","isRoleInstructorLike","isRoleLineTrainingInstructorLike","createCountableChange","deleteDevice","updateReservation","deleteCustomFilter","deletePriceProfileApplication","deleteMediaFile2DocumentRecord","DOCUMENT_TYPE_UNKNOWN","DOCUMENT_TYPE_SQUAWK_RELEASE","DOCUMENT_TYPE_CRS","DOCUMENT_TYPE_WORK_REPORT","DOCUMENT_TYPE_CAMO_ORDER","labelMap","generateFieldDetailedValueMap","mapStringsToFieldDetailedValues","strings","o","encoder","TextEncoder","getOperationalStorage","setOperationalStorage","generateNewKeys","deviceKey","nsign","keyPair","deviceKeyUuid","temporaryKey","temporaryKeyUuid","deviceSecretKeyString","uintToBase64","secretKey","temporarySecretKeyString","deviceSecretKey","devicePublicKey","publicKey","temporarySecretKey","temporaryPublicKey","temporaryKeyTimestamp","persistNewKeys","updateLocalStorage","signature","createTemporaryKeySignature","persistToDb","localStorageToOperational","base64ToUint","fromSecretKey","operational","maybeItem","validateJson","localData","oldSecretKey","oldKeyUuid","detached","signatureKeyUuid","regenerateTemporaryKey","newPair","keyUuid","oldKey","oldUuid","newOperational","putSigningChange","deviceKeyId","temporaryKeyId","temporaryKeySignature","signedByKeyId","ints","atob","charCodeAt","Uint8Array","btoa","String","fromCharCode","stringToUint","encode","signAndPut","optionalData","inputUint","deviceSignature","temporarySignature","sign","putSignedData","saveFlightLogbookRecords","getContactCache","getCachedContact","maybePromise","existingRecordContactIds","lr","crewIds","contactIds","userIds","contactsMap","inLegLogbookToRecord","putFlight","getOpenFlightsForUser","flightForUsers","getAllFlightsForCrew","flightLegs","l","flightIds","flightsAndLegs","ac","sortFlightsAndlegs","getAllFlightsForCrewOnline","getFlightsByIdsLocalAndOnline","getFlightsAndLegsForAircraft","legsPromise","flightsPromise","aircraftPromise","aRef","offlineFlights","getFlightsByIds","offlineFlightIds","flightIdsToRequest","fId","onlineFlights","getFlightsByIdsOnline","flightsQuery","flightsResult","getCompleteFlight","flightDocumentsCount","sortFlightLegs","getCompleteFlightOnline","flightResult","getFlight","legInput","ccIdToFind","ccToUse","getLegReferenceTime","finishFlight","waitForSync","bareFlight","createBareFlight","flightForExport","getFlightForExport","deleteFlight","existingGenerators","createIdGenerator","prefix","generator","SQUAWK_DEFERRAL_ACTION_OPERATIONAL","SQUAWK_DEFERRAL_ACTION_MAINTENANCE","flightSquawksToSquawks","flightSquawks","allSquawks","allDocuments","allDeferrals","allReleases","flightSquawk","squawkParams","flightRelease","deferalRelease","releaseDocuments","newDeferrals","newDeferralDocs","deferralReleases","flightDeferrals","squawkDeferralParams","createEmptySquawk","createEmptySquawkDeferral","createEmptyMaintenanceLimit","validUntilDateToleranceSeconds","validUntilCountableTypes","validUntilCountableValuesTolerance","customWarningRules","limitExtensionRules","limitExtensionRulesFromDb","maintenanceProgramTaskWid","aircraftMaintenanceLimitToDb","dateExtension","fixedIntervalReferenceDate","colorToRgba","color","opacity","hexToRgba","cssHexColor","csscolors","getCssHexColor","getRgbaColor","colorRaw","colorKey","createEmptyInLegLogbook","totalFlightTime","landingsTotal","landingsNight","nightTime","ifrTime","remarks","crossCountryTime","instrumentActualTime","instrumentSimulatedTime","instrumentApproachDetails","holdings","inLeg","documentId","putLocalFlightDocumentContent","deleteLocalFlightDocumentContent","addEventListener","AppSelector","tlbUser","userGroups","TlbApp","React","lazy","TechApp","OpsApp","isInOps","isTech","LoginForm","busy","formData","setFormData","username","password","rememberPassword","CompleteNewPasswordForm","resetPassword","LoginScreen","useAmplify","setUseAmplify","completeNewPasswordData","setCompleteNewPasswordData","errorMessage","setErrorMessage","setBusy","login","completeNewPassword","signIn","challengeName","cred","PasswordCredential","credentials","saveCredentials","maybeCreds","credential","mediation","getCredentials","AmplifyLoginScreen","onSubmit","src","logo","alt","WithAuthenticatedUser","useDispatch","onAuth","payload","Hub","listen","remove","Amplify","configure","awsconfig","updateLocale","week","dow","ReactDOM","createRoot","getElementById","render","StrictMode"],"mappings":"yGAAA,+CA+BO,MAAMA,UAAgBC,IA2BzBC,cACIC,MAAM,YADI,KA1BdC,eA0Bc,OAzBdC,uBAyBc,OAxBdC,iCAwBc,OAvBdC,+BAuBc,OAtBdC,wCAsBc,OArBdC,aAqBc,OApBdC,UAoBc,OAnBdC,eAmBc,OAlBdC,2BAkBc,OAjBdC,sBAiBc,OAhBdC,aAgBc,OAfdC,qBAec,OAddC,uBAcc,OAbdC,eAac,OAZdC,cAYc,OAXdC,oBAWc,OAVdC,wBAUc,OATdC,0BASc,OARdC,2BAQc,OAPdC,eAOc,OANdC,uBAMc,OALdC,gBAKc,OAJdC,iBAIc,OAHdC,eAGc,OAFdC,4BAEc,EAEVC,KAAKC,QA/BmB,IA+BOC,OAAO,CAClCtB,QAAS,+BACTL,UAAW,aACXC,kBAAmB,iBACnBC,4BAA6B,eAC7BC,0BAA2B,iBAC3BC,mCAAoC,yBACpCY,mBAAoB,gBACpBC,qBAAsB,0BACtBC,sBAAuB,0BACvBZ,KAAM,wCACNG,iBAAkB,uCAClBF,UAAW,6FACXC,sBAAuB,MACvBE,QAAS,gCACTC,gBAAiB,eACjBC,kBAAmB,0BACnBC,UAAW,aACXC,SAAU,oBACVC,eAAgB,6BAChBK,kBAAmB,MACnBC,WAAY,MACZF,UAAW,MACXI,UAAW,MACXC,uBAAwB,oCAG5BC,KAAKzB,UAAYyB,KAAKG,MAAM,aAC5BH,KAAKxB,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dylC,EAAUhnC,cACV3J,EAAWuzC,cAyBjB,OAxBA/hC,qBAAU,KACNgnB,YAAex4B,GACf,MAAMwzC,EAAS38C,UACX,GAAIE,EAAE08C,QAAQphC,MACV,OAAQtb,EAAE08C,QAAQphC,OACd,IAAK,gBACKrc,cAAQgL,OACd6G,cACA7H,EAAS,CAACC,KAAMC,MAChBF,EAAS,CAACC,KAAME,MAChB8c,iBAAwBrkB,GACxB,MACJ,IAAK,SACD4/B,YAAex4B,KAM/B,OADA0zC,IAAIC,OAAO,OAAQH,GACZ,KACHE,IAAIE,OAAO,OAAQJ,MAExB,CAACxzC,IAEAyH,IAAgB+C,KAAiCmmC,IAAYpoC,IACtD,cAAC4U,EAAA,EAAD,IACA,kBAAoB1V,GAAeA,EAAYqD,OAC/C,mCAAGsQ,IAEH,cAAC,EAAD,K,QC7Cfy4B,UAAQC,UAAUC,KAClB1tC,IAAIytC,UAAUC,KAEdrf,IAAOsf,aAAa,KAAM,CACtBC,KAAM,CACFC,IAAK,KAIZC,IAAiBC,WAAW/4B,SAASg5B,eAAe,SAASC,OAC1D,cAAC,IAAMC,WAAP,UACI,cAACp5B,EAAA,EAAD,UACI,cAAC,EAAD,UACI,cAAC,EAAD,a","file":"static/js/main.6b4c77fe.chunk.js","sourcesContent":["import Dexie from 'dexie';\nimport { Flight } from '../Flights/Flight';\nimport { AirportCoordinates } from '../AirportCoordinates/AirportCoordinateDatasource';\nimport { StartLegState } from '../../screens/Flight/StartLeg';\nimport { FlightLeg } from '../FlightLegs/FlightLeg';\nimport { FinishLegState } from '../../screens/Flight/FinishLeg';\nimport { Squawk, SquawkDeferral } from '../Squawks/types';\nimport { CountableChange } from '../CountableChanges/types';\nimport { SyncItem } from './syncHelpers';\nimport { ErrorLog } from '../../utils/ErrorLog/types';\nimport {\n CreateAircraftDocumentInput,\n CreateLogbookRecordInput,\n CreateSignedDataInput,\n CreateSigningKeyChangeInput,\n} from '../../API';\nimport { DownloadedDocument } from '../AircraftDocuments/types';\nimport { ReleaseToService } from '../ReleaseToService/types';\nimport { DutyItem } from '../Duties/types';\nimport { ContactInput } from '../../APIExtensions';\nimport { WithId } from './types';\nimport { FlightDocument } from '../FlightDocuments/FlightDocument';\nimport { LocalDocumentContent } from '../FlightDocuments/LocalDocumentContent';\nimport { AircraftMaintenanceLimit } from '../../Admin/AircraftMaintenanceLimits/AircraftMaintenanceLimit';\nimport { AircraftMaintenanceLimitExtension } from '../../Admin/AircraftMaintenanceLimitExtensions/AircraftMaintenanceLimitExtension';\nimport { FlightSupplementalData } from '../FlightSupplementalData/FlightSupplementalDataTypes';\n\nimport { Aircraft } from '../Aircrafts/types';\n\nexport const LOCAL_DB_VERSION = 38;\n\nexport class LocalDB extends Dexie {\n aircrafts: Dexie.Table;\n aircraftDocuments: Dexie.Table;\n aircraftDocumentsDownloaded: Dexie.Table; // to be deprecated\n aircraftMaintenanceLimits: Dexie.Table;\n aircraftMaintenanceLimitExtensions: Dexie.Table;\n flights: Dexie.Table;\n legs: Dexie.Table;\n documents: Dexie.Table;\n localDocumentContents: Dexie.Table;\n countableChanges: Dexie.Table;\n squawks: Dexie.Table;\n squawkDeferrals: Dexie.Table;\n releaseToServices: Dexie.Table;\n dutyItems: Dexie.Table;\n contacts: Dexie.Table;\n logbookRecords: Dexie.Table;\n airportCoordinates: Dexie.Table;\n scratchStartLegState: Dexie.Table;\n scratchFinishLegState: Dexie.Table;\n syncItems: Dexie.Table;\n signingKeyChanges: Dexie.Table;\n signedData: Dexie.Table;\n initPromise: Promise;\n errorLogs: Dexie.Table;\n flightSupplementalData: Dexie.Table;\n\n constructor() {\n super('alol_tlb');\n this.version(LOCAL_DB_VERSION).stores({\n flights: '&id,aircraftId,reservationId',\n aircrafts: '&id,userId',\n aircraftDocuments: '&id,aircraftId',\n aircraftDocumentsDownloaded: '&id,sourceId',\n aircraftMaintenanceLimits: '&id,aircraftId',\n aircraftMaintenanceLimitExtensions: '&id,maintenanceLimitId',\n airportCoordinates: '&icao,lat,lng',\n scratchStartLegState: '&id,flightId,aircraftId',\n scratchFinishLegState: '&id,flightId,aircraftId',\n legs: '&id,flightId,aircraftId,reservationId',\n countableChanges: '&id,aircraftId,flightId,[legId+type]',\n documents: '&id,flightId,aircraftId,[legId+phase],squawkId,releaseToServiceId,maintenanceRecordId,type',\n localDocumentContents: '&id',\n squawks: '&id,aircraftId,flightId,legId',\n squawkDeferrals: '&id,squawkId',\n releaseToServices: '&id,squawkId,aircraftId',\n dutyItems: '&id,userId',\n contacts: '&id,userId,crewId',\n logbookRecords: '&id,legId,contactId,crewId',\n signingKeyChanges: '&id',\n signedData: '&id',\n syncItems: '&id',\n errorLogs: '&id',\n flightSupplementalData: '&id,type,flightId,reservationId',\n });\n\n this.aircrafts = this.table('aircrafts');\n this.aircraftDocuments = this.table('aircraftDocuments');\n this.aircraftDocumentsDownloaded = this.table('aircraftDocumentsDownloaded');\n this.aircraftMaintenanceLimits = this.table('aircraftMaintenanceLimits');\n this.aircraftMaintenanceLimitExtensions = this.table('aircraftMaintenanceLimitExtensions');\n this.flights = this.table('flights');\n this.legs = this.table('legs');\n this.countableChanges = this.table('countableChanges');\n this.documents = this.table('documents');\n this.localDocumentContents = this.table('localDocumentContents');\n this.squawks = this.table('squawks');\n this.squawkDeferrals = this.table('squawkDeferrals');\n this.releaseToServices = this.table('releaseToServices');\n this.dutyItems = this.table('dutyItems');\n this.contacts = this.table('contacts');\n this.logbookRecords = this.table('logbookRecords');\n this.airportCoordinates = this.table('airportCoordinates');\n this.scratchStartLegState = this.table('scratchStartLegState');\n this.scratchFinishLegState = this.table('scratchFinishLegState');\n this.signingKeyChanges = this.table('signingKeyChanges');\n this.signedData = this.table('signedData');\n this.syncItems = this.table('syncItems');\n this.errorLogs = this.table('errorLogs');\n this.flightSupplementalData = this.table('flightSupplementalData');\n this.initPromise = this.init();\n }\n\n async init(): Promise {\n return this;\n }\n\n async initComplete(): Promise {\n return this.initPromise;\n }\n\n async wipe(): Promise {\n await Promise.all([\n this.aircrafts.clear(),\n this.aircraftDocuments.clear(),\n this.aircraftDocumentsDownloaded.clear(),\n this.aircraftMaintenanceLimits.clear(),\n this.aircraftMaintenanceLimitExtensions.clear(),\n this.flights.clear(),\n this.legs.clear(),\n this.countableChanges.clear(),\n this.documents.clear(),\n this.localDocumentContents.clear(),\n this.squawks.clear(),\n this.squawkDeferrals.clear(),\n this.releaseToServices.clear(),\n this.dutyItems.clear(),\n this.contacts.clear(),\n this.logbookRecords.clear(),\n this.airportCoordinates.clear(),\n this.scratchStartLegState.clear(),\n this.scratchFinishLegState.clear(),\n this.signingKeyChanges.clear(),\n this.signedData.clear(),\n this.syncItems.clear(),\n this.flightSupplementalData.clear(),\n ]);\n return this;\n }\n}\n\nlet db: LocalDB | null = null;\n\nexport const getDb = (): LocalDB => {\n if (!db) {\n db = new LocalDB();\n }\n return db;\n};\n","export type DbSyncSubscriptionAdditionalData = {\n currentUserId?: string;\n isInitialSync?: boolean;\n};\n\nexport type DbSyncSubscription = {\n getQuery: (nextToken: string | undefined, meta: DbSyncSubscriptionAdditionalData) => string;\n nextTokenGetter?: (result: any, meta: DbSyncSubscriptionAdditionalData) => string | undefined;\n key: string;\n onNewItems: (item: any[]) => Promise;\n};\n\nexport type WrappedHandler = ((items: T[]) => Promise) & { start: () => Promise };\nexport const wrapHandlerWithAccumulator = (handler: (items: T[]) => Promise): WrappedHandler => {\n const accumulator: T[] = [];\n let resolver: () => void;\n let rejecter: (params: any) => void;\n let promise = new Promise((resolve, reject) => {\n resolver = resolve;\n rejecter = reject;\n });\n const wrap = (items: T[]) => {\n accumulator.push(...items);\n return promise;\n };\n wrap.start = async (): Promise => {\n try {\n if (accumulator.length) {\n await handler(accumulator);\n }\n resolver();\n } catch (e) {\n rejecter(e);\n throw e;\n }\n };\n\n return wrap;\n};\n\nexport type SyncableTable =\n | 'aircrafts'\n | 'flights'\n | 'legs'\n | 'documents'\n | 'countableChanges'\n | 'squawks'\n | 'squawkDeferrals'\n | 'releaseToServices'\n | 'contacts'\n | 'dutyItems'\n | 'signingKeyChanges'\n | 'signedData'\n | 'logbookRecords'\n | 'aircraftMaintenanceLimitExtensions';\n\nexport type SyncItem = {\n id: string;\n tableName: SyncableTable;\n itemId: string;\n};\n\nexport const getStandardSyncerFields = function (commandName: string, c: number, returnFields: string) {\n const mutationName = `${commandName}${c}`;\n const inputKey = `${commandName}Input${c}`;\n const query = `\n ${mutationName}: ${commandName}(input: $${inputKey}) {\n ${returnFields}\n }\n `;\n return { mutationName, inputKey, query };\n};\n\nexport type DbSyncerUpCommand = {\n query: string;\n input: any | (() => Promise);\n inputKey: string;\n inputType: string;\n mutationName: string;\n remoteToLocalTransform: (input: any) => any;\n getNeedsResync?: (remote: any, local: any) => boolean;\n queryName: string;\n appendOnly?: boolean;\n};\n\nexport type DbSyncerUpDefinition = (input: any) => DbSyncerUpCommand;\n\nexport const syncUpCommandsToMutation = async (\n commands: DbSyncerUpCommand[],\n mutationName: string\n): Promise<{ query: string; parameters: any; validCommands: DbSyncerUpCommand[] }> => {\n const inputPairs: string[] = [];\n const mutations: string[] = [];\n const parameters: any = {};\n const validCommands: DbSyncerUpCommand[] = [];\n await Promise.all(\n commands.map(async (c) => {\n try {\n parameters[c.inputKey] = typeof c.input === 'function' ? await c.input() : c.input;\n inputPairs.push(`$${c.inputKey}: ${c.inputType}!`);\n mutations.push(c.query);\n validCommands.push(c);\n } catch (e) {\n console.error(e);\n }\n })\n );\n\n const query = `\n mutation ${mutationName}(\n ${inputPairs.join('\\n')}\n ) {\n ${mutations.join('\\n')}\n }\n `;\n return { query, parameters, validCommands };\n};\n","import BEMHelper from \"react-bem-helper\";\nimport '../sharedStyles/page.sass'\nimport '../sharedStyles/form.sass'\n\nexport type BEMObject = BEMHelper<{ className: string }>\nexport type BEMModifiers = { [key: string]: boolean } | string[] | string;\n\nconst BEM = (name: string): BEMObject => {\n return new BEMHelper({\n name\n });\n};\n\nexport const mergeClasses = (...classes: ({ className: string } | string)[]) => {\n return {\n className: classes.map(c => typeof c === 'string' ? c : c.className).join(' ')\n };\n};\nexport default BEM;\n\nexport const pageClasses = BEM(\"page\");\nexport const formClasses = BEM(\"form\");\nexport const formRowClass = formClasses('fieldlike', undefined, 'row');\n","import { DbSyncerUpDefinition, getStandardSyncerFields } from '../syncHelpers';\nimport { CreateSigningKeyChangeInput } from '../../../API';\nimport { DbCreated, WithId } from '../types';\n\nlet counter = 0;\n\nconst signingKeyChangeItemFields = 'id';\n\nexport const signingKeyChangeToDb: DbSyncerUpDefinition = (input: CreateSigningKeyChangeInput & WithId) => {\n const c = ++counter;\n const commandName = 'createSigningKeyChange';\n const inputType = 'CreateSigningKeyChangeInput';\n const {mutationName, inputKey, query} = getStandardSyncerFields(commandName, c, signingKeyChangeItemFields);\n return {\n query,\n input,\n inputKey,\n inputType,\n mutationName,\n remoteToLocalTransform: signingKeyChangeTransform,\n queryName: 'getSigningKeyChange',\n appendOnly: true,\n };\n};\n\nconst signingKeyChangeTransform = (input: CreateSigningKeyChangeInput & DbCreated): { id: string, deleted: boolean } => {\n // only delete local data\n return {id: input.id, deleted: true};\n};\n","import { DbSyncerUpDefinition, getStandardSyncerFields } from '../syncHelpers';\nimport { CreateSignedDataInput, CreateSigningKeyChangeInput } from '../../../API';\nimport { DbCreated, WithId } from '../types';\n\nlet counter = 0;\n\nconst signedDataItemFields = 'id';\n\nexport const signedDataToDb: DbSyncerUpDefinition = (input: CreateSignedDataInput & WithId) => {\n const c = ++counter;\n const commandName = 'createSignedData';\n const inputType = 'CreateSignedDataInput';\n const {mutationName, inputKey, query} = getStandardSyncerFields(commandName, c, signedDataItemFields);\n return {\n query,\n input,\n inputKey,\n inputType,\n mutationName,\n remoteToLocalTransform: signedDataTransform,\n queryName: 'getSignedData',\n appendOnly: true,\n };\n};\n\nconst signedDataTransform = (input: CreateSigningKeyChangeInput & DbCreated): { id: string, deleted: boolean } => {\n // only delete local data\n return {id: input.id, deleted: true};\n};\n","import { DbSyncerUpDefinition, getStandardSyncerFields } from '../syncHelpers';\nimport {\n aircraftMaintenanceLimitExtensionItemFields\n} from '../../../Admin/Datasources/AircraftMaintenanceLimitExtensions';\nimport {\n AircraftMaintenanceLimitExtension,\n aircraftMaintenanceLimitExtensionFromDb,\n aircraftMaintenanceLimitExtensionToDb\n} from '../../../Admin/AircraftMaintenanceLimitExtensions/AircraftMaintenanceLimitExtension';\n\nlet counter = 0;\n\nexport const aircraftMaintenanceLimitExtensionSyncerDefinition: DbSyncerUpDefinition = (record: AircraftMaintenanceLimitExtension) => {\n const c = ++counter;\n const [commandName, inputType] = !record._version\n ? ['createAircraftMaintenanceLimitExtension', 'CreateAircraftMaintenanceLimitExtensionInput']\n : ['updateAircraftMaintenanceLimitExtension', 'UpdateAircraftMaintenanceLimitExtensionInput'];\n const {\n mutationName,\n inputKey,\n query\n } = getStandardSyncerFields(commandName, c, aircraftMaintenanceLimitExtensionItemFields);\n const input = aircraftMaintenanceLimitExtensionToDb(record);\n return {\n query,\n input,\n inputKey,\n inputType,\n mutationName,\n remoteToLocalTransform: aircraftMaintenanceLimitExtensionFromDb,\n queryName: 'getAircraftMaintenanceLimitExtension',\n };\n};\n","import {\n DbSyncerUpDefinition,\n DbSyncSubscription,\n DbSyncSubscriptionAdditionalData,\n SyncableTable,\n wrapHandlerWithAccumulator,\n} from './syncHelpers';\nimport { getDb } from './LocalDB';\nimport { flightItemFields, flightToDb, flightTransform } from './Transformers/flights';\nimport { flightLegFromDb, flightLegItemFields, flightLegSyncerDefinition } from './Transformers/flightLegs';\nimport {\n countableChangeFromDb,\n countableChangeItemFields,\n countableChangeSyncerDefinition,\n} from './Transformers/countableChanges';\nimport { squawkFromDb, squawkItemFields, squawkSyncerDefinition } from './Transformers/squawks';\nimport {\n flightDocumentItemFields,\n flightDocumentItemHandler,\n flightDocumentToDb,\n} from './Transformers/flightDocuments';\nimport { aircraftFromDb, aircraftItemFields } from './Transformers/aircrafts';\nimport { squawkDeferralFromDb, squawkDeferralItemFields, squawkDeferralToDb } from './Transformers/squawkDeferrals';\nimport {\n releaseToServiceFromDb,\n releaseToServiceItemFields,\n releaseToServiceSyncerDefinition,\n} from './Transformers/releaseToServices';\nimport { dutyItemItemFields, dutyItemToDb, dutyItemTransform } from './Transformers/dutyItems';\nimport { signingKeyChangeToDb } from './Transformers/signingKeyChanges';\nimport { signedDataToDb } from './Transformers/signedDatas';\nimport { contactItemFields } from './Transformers/contacts';\nimport { ContactInput } from '../../APIExtensions';\nimport { logbookRecordItemFields, logbookRecordToDb } from './Transformers/logbookRecords';\nimport { getStandardItemHandler } from './standardItemHandler';\nimport { aircraftMaintenanceLimitFromDb } from '../../Admin/AircraftMaintenanceLimits/AircraftMaintenanceLimit';\nimport { aircraftMaintenanceLimitExtensionItemFields } from '../../Admin/Datasources/AircraftMaintenanceLimitExtensions';\nimport { aircraftMaintenanceLimitExtensionFromDb } from '../../Admin/AircraftMaintenanceLimitExtensions/AircraftMaintenanceLimitExtension';\nimport { CreateAircraftMaintenanceLimitExtensionInput, CreateAircraftMaintenanceLimitInput } from '../../API';\nimport { DbCreated, DbItems } from './types';\nimport { aircraftMaintenanceLimitExtensionSyncerDefinition } from './Transformers/aircraftMaintenanceLimitExtensions';\n\nexport const aircraftsResyncSubscription: DbSyncSubscription = {\n getQuery: (nextToken) => {\n const nextTokenString = nextToken ? `\"${nextToken}\"` : `null`;\n return `\n syncAircraft(lastSync:$lastSync,limit:9999,nextToken:${nextTokenString}) {\n items {\n ${aircraftItemFields}\n flights(limit:10, sortDirection: DESC) {\n items {\n ${flightItemFields}\n legs(limit: 99) {\n items {\n ${flightLegItemFields}\n }\n }\n flightDocuments(limit:10, sortDirection: DESC) {\n items {\n ${flightDocumentItemFields}\n }\n }\n }\n }\n squawks(limit:20, sortDirection: DESC) {\n items {\n ${squawkItemFields}\n squawkDeferrals(limit: 100) {\n items {\n ${squawkDeferralItemFields}\n }\n }\n flightDocuments(limit:100, sortDirection: DESC) {\n items {\n ${flightDocumentItemFields}\n }\n }\n }\n }\n countableChanges(limit:20, sortDirection: DESC) {\n items {\n ${countableChangeItemFields}\n }\n }\n releaseToServices(limit: 5) {\n items {\n ${releaseToServiceItemFields}\n flightDocuments(limit:100, sortDirection: DESC) {\n items {\n ${flightDocumentItemFields}\n }\n }\n }\n }\n }\n }`;\n },\n key: 'syncAircraft',\n onNewItems: async (items) => {\n const aircrafts = items.map(aircraftFromDb);\n const dbHandlers = getDbHandlers();\n const {\n flightHandler,\n legHandler,\n aircraftHandler,\n squawkHandler,\n squawkDeferralHandler,\n releaseToServiceHandler,\n countableChangeChandler,\n flightDocumentHandler,\n } = dbHandlers;\n const promises: Promise[] = [];\n promises.push(aircraftHandler(aircrafts));\n items.forEach((aircraft) => {\n if (aircraft.flights.items && aircraft.flights.items.length) {\n const flights = aircraft.flights.items.map(flightTransform);\n aircraft.flights.items.forEach((flight: any) => {\n if (flight.legs && flight.legs.items && flight.legs.items.length) {\n const legs = flight.legs.items.map(flightLegFromDb);\n promises.push(legHandler(legs));\n }\n if (flight.flightDocuments && flight.flightDocuments.items && flight.flightDocuments.items.length) {\n promises.push(flightDocumentHandler(flight.flightDocuments.items));\n }\n });\n promises.push(flightHandler(flights));\n }\n if (aircraft.squawks.items && aircraft.squawks.items.length) {\n const squawks = aircraft.squawks.items.map(squawkFromDb);\n promises.push(squawkHandler(squawks));\n aircraft.squawks.items.forEach((squawk: any) => {\n if (squawk.flightDocuments.items && squawk.flightDocuments.items.length) {\n promises.push(flightDocumentHandler(squawk.flightDocuments.items));\n }\n if (squawk.squawkDeferrals.items && squawk.squawkDeferrals.items.length) {\n const squawkDeferrals = squawk.squawkDeferrals.items.map(squawkDeferralFromDb);\n promises.push(squawkDeferralHandler(squawkDeferrals));\n }\n });\n }\n if (aircraft.countableChanges.items && aircraft.countableChanges.items.length) {\n const countableChanges = aircraft.countableChanges.items.map(countableChangeFromDb);\n promises.push(countableChangeChandler(countableChanges));\n }\n if (aircraft.releaseToServices.items && aircraft.releaseToServices.items.length) {\n const releaseToServices = aircraft.releaseToServices.items.map(releaseToServiceFromDb);\n promises.push(releaseToServiceHandler(releaseToServices));\n for (const releaseToService of aircraft.releaseToServices.items) {\n if (releaseToService.flightDocuments.items && releaseToService.flightDocuments.items.length) {\n promises.push(flightDocumentHandler(releaseToService.flightDocuments.items));\n }\n }\n }\n });\n Object.values(dbHandlers).forEach((handlerWrapper) => handlerWrapper.start());\n await Promise.all(promises);\n },\n};\n\nconst getDbHandlers = function () {\n const db = getDb();\n const flightHandler = wrapHandlerWithAccumulator(getStandardItemHandler(db.flights));\n const legHandler = wrapHandlerWithAccumulator(getStandardItemHandler(db.legs));\n const aircraftHandler = wrapHandlerWithAccumulator(getStandardItemHandler(db.aircrafts));\n const squawkHandler = wrapHandlerWithAccumulator(getStandardItemHandler(db.squawks));\n const countableChangeChandler = wrapHandlerWithAccumulator(getStandardItemHandler(db.countableChanges));\n const squawkDeferralHandler = wrapHandlerWithAccumulator(getStandardItemHandler(db.squawkDeferrals));\n const releaseToServiceHandler = wrapHandlerWithAccumulator(getStandardItemHandler(db.releaseToServices));\n const flightDocumentHandler = wrapHandlerWithAccumulator(flightDocumentItemHandler);\n return {\n flightHandler,\n legHandler,\n aircraftHandler,\n squawkHandler,\n squawkDeferralHandler,\n releaseToServiceHandler,\n countableChangeChandler,\n flightDocumentHandler,\n };\n};\n\nexport const aircraftsSubscription: DbSyncSubscription = {\n getQuery: (nextToken) => {\n const nextTokenString = nextToken ? `\"${nextToken}\"` : `null`;\n return `\n syncAircraft(lastSync:$lastSync,limit:9999,nextToken:${nextTokenString}) {\n items {\n ${aircraftItemFields}\n }\n nextToken\n startedAt\n }`;\n },\n key: 'syncAircraft',\n onNewItems: getStandardItemHandler(getDb().aircrafts, aircraftFromDb),\n};\n\nexport const flightsSubscription: DbSyncSubscription = {\n getQuery: (nextToken) => {\n const nextTokenString = nextToken ? `\"${nextToken}\"` : `null`;\n return `\n syncFlights(lastSync:$lastSync,limit:9999,nextToken:${nextTokenString}) {\n items {\n ${flightItemFields}\n }\n nextToken\n startedAt\n }`;\n },\n key: 'syncFlights',\n onNewItems: getStandardItemHandler(getDb().flights, flightTransform),\n};\n\nexport const flightDocumentsSubscription: DbSyncSubscription = {\n getQuery: (nextToken) => {\n const nextTokenString = nextToken ? `\"${nextToken}\"` : `null`;\n return `\n syncFlightDocuments(lastSync:$lastSync,limit:9999,nextToken:${nextTokenString}) {\n items {\n ${flightDocumentItemFields}\n }\n nextToken\n startedAt\n }`;\n },\n key: 'syncFlightDocuments',\n onNewItems: flightDocumentItemHandler,\n};\n\nexport const flightLegsSubscription: DbSyncSubscription = {\n getQuery: (nextToken) => {\n const nextTokenString = nextToken ? `\"${nextToken}\"` : `null`;\n return `\n syncLegs(lastSync:$lastSync,limit:9999,nextToken:${nextTokenString}) {\n items {\n ${flightLegItemFields}\n }\n nextToken\n startedAt\n }`;\n },\n key: 'syncLegs',\n onNewItems: getStandardItemHandler(getDb().legs, flightLegFromDb),\n};\n\nexport const squawksSubscription: DbSyncSubscription = {\n getQuery: (nextToken) => {\n const nextTokenString = nextToken ? `\"${nextToken}\"` : `null`;\n return `\n syncSquawks(lastSync:$lastSync,limit:9999,nextToken:${nextTokenString}) {\n items {\n ${squawkItemFields}\n }\n nextToken\n startedAt\n }`;\n },\n key: 'syncSquawks',\n onNewItems: getStandardItemHandler(getDb().squawks, squawkFromDb),\n};\n\nexport const squawkDeferralsSubscription: DbSyncSubscription = {\n getQuery: (nextToken) => {\n const nextTokenString = nextToken ? `\"${nextToken}\"` : `null`;\n return `\n syncSquawkDeferrals(lastSync:$lastSync,limit:9999,nextToken:${nextTokenString}) {\n items {\n ${squawkDeferralItemFields}\n }\n nextToken\n startedAt\n }`;\n },\n key: 'syncSquawkDeferrals',\n onNewItems: getStandardItemHandler(getDb().squawkDeferrals, squawkDeferralFromDb),\n};\n\nexport const releaseToServicesSubscription: DbSyncSubscription = {\n getQuery: (nextToken) => {\n const nextTokenString = nextToken ? `\"${nextToken}\"` : `null`;\n return `\n syncReleaseToServices(lastSync:$lastSync,limit:9999,nextToken:${nextTokenString}) {\n items {\n ${releaseToServiceItemFields}\n }\n nextToken\n startedAt\n }`;\n },\n key: 'syncReleaseToServices',\n onNewItems: getStandardItemHandler(getDb().releaseToServices, releaseToServiceFromDb),\n};\n\nexport const countableChangesSubscription: DbSyncSubscription = {\n getQuery: (nextToken) => {\n const nextTokenString = nextToken ? `\"${nextToken}\"` : `null`;\n return `\n syncCountableChanges(lastSync:$lastSync,limit:9999,nextToken:${nextTokenString}) {\n items {\n ${countableChangeItemFields}\n }\n nextToken\n startedAt\n }`;\n },\n key: 'syncCountableChanges',\n onNewItems: getStandardItemHandler(getDb().countableChanges, countableChangeFromDb),\n};\n\nconst aircraftDocumentItemFields = `id\n deleted\n createdAt\n aircraftId\n contentKey\n name\n documentNumber\n issueDate\n validUntilDate\n validUntilDateToleranceSeconds\n validUntilCountableTypes\n validUntilCountableValues\n validUntilCountableValuesTolerance\n _version`;\n\nexport const aircraftDocumentsSubscription: DbSyncSubscription = {\n getQuery: (nextToken) => {\n const nextTokenString = nextToken ? `\"${nextToken}\"` : `null`;\n return `\n syncAircraftDocuments(lastSync:$lastSync,limit:9999,nextToken:${nextTokenString},filter:{deleted: {eq: false}}) {\n items {\n ${aircraftDocumentItemFields}\n }\n nextToken\n startedAt\n }`;\n },\n key: 'syncAircraftDocuments',\n onNewItems: getStandardItemHandler(getDb().aircraftDocuments),\n};\nconst aircraftMaintenanceLimitItemFields = `id\n deleted\n createdAt\n aircraftId\n name\n validUntilDate\n validUntilDateToleranceSeconds\n validUntilCountableTypes\n validUntilCountableValues\n validUntilCountableValuesTolerance\n customWarningRules\n limitExtensionRules\n _version`;\nexport const aircraftMaintenanceLimitsSubscription: DbSyncSubscription = {\n getQuery: (nextToken) => {\n const nextTokenString = nextToken ? `\"${nextToken}\"` : `null`;\n return `\n syncAircraftMaintenanceLimits(lastSync:$lastSync,limit:9999,nextToken:${nextTokenString},filter:{deleted: {eq: false}}) {\n items {\n ${aircraftMaintenanceLimitItemFields}\n extensions(sortDirection: DESC) {\n items {\n ${aircraftMaintenanceLimitExtensionItemFields}\n }\n }\n }\n nextToken\n startedAt\n }`;\n },\n key: 'syncAircraftMaintenanceLimits',\n onNewItems: async (\n items: (CreateAircraftMaintenanceLimitInput &\n DbCreated & { extensions: DbItems })[]\n ) => {\n const itemsBare: (CreateAircraftMaintenanceLimitInput & DbCreated)[] = [];\n const extensionsBare: (CreateAircraftMaintenanceLimitExtensionInput & DbCreated)[] = [];\n for (const item of items) {\n const { extensions, ...bare } = item;\n itemsBare.push(bare);\n extensionsBare.push(...extensions.items);\n }\n await Promise.all([\n getStandardItemHandler(\n getDb().aircraftMaintenanceLimitExtensions,\n aircraftMaintenanceLimitExtensionFromDb\n )(extensionsBare),\n getStandardItemHandler(getDb().aircraftMaintenanceLimits, aircraftMaintenanceLimitFromDb)(itemsBare),\n ]);\n },\n};\n\nexport const aircraftMaintenanceLimitExtensionsSubscription: DbSyncSubscription = {\n getQuery: (nextToken) => {\n const nextTokenString = nextToken ? `\"${nextToken}\"` : `null`;\n return `\n syncAircraftMaintenanceLimitExtensions(lastSync:$lastSync,limit:9999,nextToken:${nextTokenString},filter:{deleted: {eq: false}}) {\n items {\n ${aircraftMaintenanceLimitExtensionItemFields}\n }\n nextToken\n startedAt\n }`;\n },\n key: 'syncAircraftMaintenanceLimitExtensions',\n onNewItems: getStandardItemHandler(\n getDb().aircraftMaintenanceLimitExtensions,\n aircraftMaintenanceLimitExtensionFromDb\n ),\n};\n\nexport const dutyItemsSubscription: DbSyncSubscription = {\n getQuery: (nextToken, { currentUserId, isInitialSync }) => {\n const nextTokenString = nextToken ? `\"${nextToken}\"` : `null`;\n const userIdString = currentUserId ? `\"${currentUserId}\"` : 'null';\n const limit = isInitialSync ? 300 : 10;\n return `\n syncDutyItems: dutyItemByUserId(userId:${userIdString},sortDirection: DESC,limit:${limit},nextToken:${nextTokenString},filter:{deleted: {eq: false}}) {\n items {\n ${dutyItemItemFields}\n reports {\n items {\n id\n }\n }\n }\n nextToken\n startedAt\n }`;\n },\n key: 'syncDutyItems',\n nextTokenGetter: (data: any, meta: DbSyncSubscriptionAdditionalData) => {\n if (!meta.isInitialSync) {\n return undefined;\n }\n\n const { nextToken, items } = data;\n if (!nextToken) {\n return undefined;\n }\n if (items.length) {\n const lastItem = items[items.length - 1];\n const oldestRequired = new Date(Date.now() - 366 * 86400 * 1e3);\n if (lastItem.startDate > oldestRequired.toISOString()) {\n return nextToken;\n }\n }\n return undefined;\n },\n onNewItems: getStandardItemHandler(getDb().dutyItems, dutyItemTransform),\n};\n\nexport const contactsResyncSubscription: DbSyncSubscription = {\n getQuery: (nextToken) => {\n const nextTokenString = nextToken ? `\"${nextToken}\"` : `null`;\n return `\n listContactsByIsCrew(isActiveCrew: \"x\",limit:9999,nextToken:${nextTokenString}) {\n items {\n ${contactItemFields}\n }\n nextToken\n startedAt\n }`;\n },\n key: 'listContactsByIsCrew',\n onNewItems: (items) => getStandardItemHandler(getDb().contacts)(items),\n};\n\nexport const contactsSubscription: DbSyncSubscription = {\n getQuery: (nextToken) => {\n const nextTokenString = nextToken ? `\"${nextToken}\"` : `null`;\n return `\n syncContacts(lastSync:$lastSync,limit:9999,nextToken:${nextTokenString}) {\n items {\n ${contactItemFields}\n }\n nextToken\n startedAt\n }`;\n },\n key: 'syncContacts',\n onNewItems: (items: ContactInput[]) => {\n const crewables = items.filter((i) => i.isActiveCrew);\n return getStandardItemHandler(getDb().contacts)(crewables);\n },\n};\n\nexport const logbookRecordsSubscription: DbSyncSubscription = {\n getQuery: (nextToken) => {\n const nextTokenString = nextToken ? `\"${nextToken}\"` : `null`;\n return `\n syncLogbookRecords(lastSync:$lastSync,limit:20,nextToken:${nextTokenString}) {\n items {\n ${logbookRecordItemFields}\n }\n startedAt\n }`;\n },\n key: 'syncLogbookRecords',\n onNewItems: getStandardItemHandler(getDb().logbookRecords),\n};\n\nexport const dbSyncerUpDefintions: Map = new Map<\n SyncableTable,\n DbSyncerUpDefinition\n>();\n\ndbSyncerUpDefintions.set('flights', flightToDb);\ndbSyncerUpDefintions.set('legs', flightLegSyncerDefinition);\ndbSyncerUpDefintions.set('countableChanges', countableChangeSyncerDefinition);\ndbSyncerUpDefintions.set('squawks', squawkSyncerDefinition);\ndbSyncerUpDefintions.set('squawkDeferrals', squawkDeferralToDb);\ndbSyncerUpDefintions.set('releaseToServices', releaseToServiceSyncerDefinition);\ndbSyncerUpDefintions.set('documents', flightDocumentToDb);\ndbSyncerUpDefintions.set('dutyItems', dutyItemToDb);\ndbSyncerUpDefintions.set('signingKeyChanges', signingKeyChangeToDb);\ndbSyncerUpDefintions.set('signedData', signedDataToDb);\ndbSyncerUpDefintions.set('logbookRecords', logbookRecordToDb);\ndbSyncerUpDefintions.set('aircraftMaintenanceLimitExtensions', aircraftMaintenanceLimitExtensionSyncerDefinition);\n\nexport const dbSyncerResyncSubscriptions: DbSyncSubscription[] = [\n contactsResyncSubscription,\n aircraftsResyncSubscription,\n aircraftDocumentsSubscription,\n aircraftMaintenanceLimitsSubscription,\n dutyItemsSubscription,\n logbookRecordsSubscription,\n];\n\nexport const dbSyncerUpdateSubscriptions: DbSyncSubscription[] = [\n contactsSubscription,\n aircraftsSubscription,\n aircraftDocumentsSubscription,\n aircraftMaintenanceLimitsSubscription,\n aircraftMaintenanceLimitExtensionsSubscription,\n countableChangesSubscription,\n flightLegsSubscription,\n flightDocumentsSubscription,\n flightsSubscription,\n squawksSubscription,\n releaseToServicesSubscription,\n squawkDeferralsSubscription,\n dutyItemsSubscription,\n logbookRecordsSubscription,\n];\n","import { Auth } from 'aws-amplify';\nimport { COGNITO_USER_SIGN_OUT } from '../../reducers/cognitoUserReducer';\nimport { store } from '../../wrappers/WithStore';\nimport { TLB_USER_SIGN_OUT } from '../../reducers/tlbUserReducer';\n\nlet reauthFlowPromise: Promise | null = null;\n\nexport function initReauthFlow() {\n if (!reauthFlowPromise) {\n reauthFlowPromise = new Promise(async (resolve, reject) => {\n try {\n console.log('reauth');\n await Auth.currentAuthenticatedUser();\n resolve();\n } catch (e) {\n if (e === \"not authenticated\") {\n store.dispatch({type: TLB_USER_SIGN_OUT});\n store.dispatch({type: COGNITO_USER_SIGN_OUT});\n resolve();\n return;\n }\n reject(e);\n }\n });\n reauthFlowPromise.finally(() => {\n console.log('reauth reset');\n reauthFlowPromise = null;\n })\n }\n return reauthFlowPromise;\n}\n","import Dexie from 'dexie';\nimport { API, graphqlOperation } from 'aws-amplify';\nimport { getDb } from './LocalDB';\nimport {\n DbSyncerUpCommand,\n DbSyncSubscription,\n DbSyncSubscriptionAdditionalData,\n SyncableTable,\n SyncItem,\n syncUpCommandsToMutation,\n} from './syncHelpers';\nimport { dbSyncerResyncSubscriptions, dbSyncerUpdateSubscriptions, dbSyncerUpDefintions } from './syncSubscriptions';\nimport { store } from '../../wrappers/WithStore';\nimport { SYNC_CHANGE, SyncState } from '../../reducers/syncReducer';\nimport { logError } from '../../utils/ErrorLog/ErrorLog';\nimport { initReauthFlow } from '../../utils/Authentication/InitReauthFlow';\nimport { whenOnline } from '../util/whenOnline';\nimport { cognitoUserIsSignedIn } from '../../reducers/cognitoUserReducer';\n\ntype QueueItem = {\n subscription: DbSyncSubscription;\n nextToken?: string;\n};\n\nconst LOCAL_STORAGE_KEY_LAST_SYNC = 'alol_synctime';\nconst LOCAL_STORAGE_KEY_DB_VERSION = 'alol_syncversion';\nconst LOCAL_DB_MAJOR_VERSION = '1';\n\ntype CurrentSyncData = {\n startTime: number;\n promise: Promise;\n};\nexport class DbSyncer {\n initPromise: Promise;\n lastSyncTime: number = parseInt(window.localStorage.getItem(LOCAL_STORAGE_KEY_LAST_SYNC) || '0', 10);\n timeout: number | null = null;\n syncInterval: number | null = null;\n currentSync: CurrentSyncData | null = null;\n\n constructor() {\n this.initPromise = this.init();\n }\n\n async init(): Promise {\n if (window.localStorage.getItem(LOCAL_STORAGE_KEY_DB_VERSION) !== LOCAL_DB_MAJOR_VERSION) {\n await getDb().wipe();\n window.localStorage.setItem(LOCAL_STORAGE_KEY_DB_VERSION, LOCAL_DB_MAJOR_VERSION);\n window.localStorage.removeItem(LOCAL_STORAGE_KEY_LAST_SYNC);\n this.lastSyncTime = 0;\n }\n try {\n await this.sync();\n } catch (e) {\n console.error(e);\n }\n this.syncInterval = window.setInterval(() => this.sync(), 30000);\n return this;\n }\n\n async initComplete(): Promise {\n return this.initPromise;\n }\n\n async markToSync(table: Dexie.Table, ...indices: string[]) {\n if (!indices.length) {\n return;\n }\n const tableName = table.name as SyncableTable;\n if (!dbSyncerUpDefintions.has(tableName)) {\n throw new Error('Trying to sync item with no definition: ' + tableName);\n }\n const syncItems: SyncItem[] = indices.map((itemId): SyncItem => {\n const id = tableName + ':' + itemId;\n return { id, itemId, tableName };\n });\n await getDb().syncItems.bulkPut(syncItems);\n this.updateSyncState({ setLengthUp: syncItems.length });\n if (!this.timeout) {\n this.timeout = window.setTimeout(() => {\n this.timeout = null;\n return this.sync();\n }, 1000);\n }\n }\n\n updateSyncState(params: {\n isInProgress?: boolean;\n lengthUpIncrement?: number;\n setLengthUp?: number;\n setLengthDown?: number;\n offline?: boolean;\n }) {\n const { isInProgress, lengthUpIncrement, setLengthUp, setLengthDown } = params;\n const syncState = store.getState().sync;\n const queueLength =\n setLengthUp !== undefined\n ? setLengthUp\n : lengthUpIncrement !== undefined\n ? syncState.queueLengthUp + lengthUpIncrement\n : syncState.queueLengthUp;\n const inProgress = isInProgress !== undefined ? isInProgress : syncState.inProgress;\n const queueLengthDown = setLengthDown !== undefined ? setLengthDown : syncState.queueLengthDown;\n const time = !inProgress && queueLengthDown === 0 && queueLength === 0 ? Date.now() : syncState.time;\n const newState: SyncState = {\n inProgress,\n queueLengthUp: queueLength,\n queueLengthDown: queueLengthDown,\n time,\n offline: params.offline || false,\n };\n store.dispatch({ type: SYNC_CHANGE, data: newState });\n }\n\n isStale(): boolean {\n return Date.now() - this.lastSyncTime > 30000;\n }\n\n shouldDoCompleteResync(): boolean {\n return Date.now() - this.lastSyncTime > 60 * 60000;\n }\n\n async wipe() {\n this.setLastSyncTime(0);\n }\n\n async wipeSync() {\n this.lastSyncTime = 0;\n await this.sync(true);\n }\n\n sync(force?: boolean): Promise {\n const startTime = Date.now();\n if (this.currentSync && startTime - this.currentSync.startTime < 29000) {\n console.warn('Other sync in progress, aborting');\n return this.currentSync.promise;\n }\n const promise = new Promise(async (resolve) => {\n if (this.timeout) {\n window.clearTimeout(this.timeout);\n this.timeout = null;\n }\n // noinspection PointlessBooleanExpressionJS - for when navigator doesn't support onLine property and it is udefined\n if (navigator.onLine === false) {\n this.updateSyncState({ offline: true });\n await whenOnline();\n }\n await this.syncUp();\n this.updateSyncState({ isInProgress: true });\n await this.syncDown(force);\n this.updateSyncState({ isInProgress: false });\n this.currentSync = null;\n resolve();\n });\n this.currentSync = { startTime, promise };\n return this.currentSync.promise;\n }\n\n async syncUp() {\n const db = getDb();\n const syncItems = await db.syncItems.toCollection().toArray();\n if (!syncItems.length) {\n return;\n }\n this.updateSyncState({ isInProgress: true, setLengthUp: syncItems.length });\n const commands = (\n await Promise.all(\n syncItems.map(async (si) => {\n try {\n return await this.syncItemToCommand(si);\n } catch (e: any) {\n console.error(e);\n logError(e.toString(), 'dbsyncer/verylow/1');\n return null;\n }\n })\n )\n ).filter((c) => c !== null) as DbSyncerUpCommand[];\n let remoteResponse: any = { data: {} };\n let validCommands: DbSyncerUpCommand[] = commands; // may be rewritten if some commands fail to start execution\n try {\n const commandResult = await this.executeSyncUpCommands(commands);\n remoteResponse = commandResult.result;\n validCommands = commandResult.commands;\n } catch (e: any) {\n if (e === 'No current user') {\n initReauthFlow();\n return;\n }\n if (e && e.code && e.code === 'NetworkError') {\n console.warn('DbSyncer: offline');\n return;\n }\n if (e && e.errors) {\n remoteResponse = e;\n } else {\n console.error(e);\n logError(e.toString(), 'dbsyncer/verylow/2');\n throw e;\n }\n } finally {\n let successfulCommands = 0;\n await Promise.all(\n validCommands.map(async (command): Promise => {\n const index = commands.indexOf(command);\n const syncItem = syncItems[index];\n if (!db[syncItem.tableName]) {\n const message = `Trying to finish syncing with non-existing table name ${syncItem.tableName}`;\n console.error(message);\n logError(message, 'dbsyncer/low/1');\n return;\n }\n let returned = remoteResponse.data && remoteResponse.data[command.mutationName];\n if (!returned) {\n if (remoteResponse.errors) {\n // if the error is because local record has no _version information, attempt forcing the _version = 1\n // because commonly this is caused when an update succeeds, but the returned data with version information\n // is lost or discarded\n const commandError = remoteResponse.errors.find(\n (e: any) => e.path && e.path[0] === command.mutationName\n );\n const createNotReturned =\n commandError &&\n commandError.errorType === 'ConditionalCheckFailedException' &&\n !command.input._version;\n const updateNotReturned =\n commandError && commandError.errorType === 'InternalFailure' && command.input._version;\n if (createNotReturned || updateNotReturned) {\n if (!command.appendOnly) {\n const maybeResult = await this.attemptRetryWithVersion(command, syncItem);\n if (maybeResult) {\n returned = maybeResult;\n remoteResponse.errors.splice(remoteResponse.errors.indexOf(commandError), 1);\n successfulCommands++;\n }\n // otherwise an error will be thrown from remoteResponse.error\n } else {\n // if append-only, the item already exists but is not readable. So assume the item was\n // returned so that it will be deleted/processed in transaction.\n returned = command.input;\n remoteResponse.errors.splice(remoteResponse.errors.indexOf(commandError), 1);\n successfulCommands++;\n }\n }\n } else {\n const message = `Command result not found ${command.mutationName}`;\n logError(message, 'dbsyncer/low/2');\n throw new Error(message);\n }\n }\n if (!returned) {\n // retry was unsuccessful\n return;\n }\n await db.transaction('rw', [db[syncItem.tableName], db.syncItems], async () => {\n const localDataStructure = command.remoteToLocalTransform(returned);\n const needsResync = command.getNeedsResync\n ? command.getNeedsResync(returned, localDataStructure)\n : false;\n const putOrDeletePromise = returned.deleted\n ? db[syncItem.tableName].delete(returned.id)\n : db[syncItem.tableName].put(localDataStructure);\n const executionPromises = [putOrDeletePromise as Promise];\n if (!needsResync) {\n executionPromises.push(db.syncItems.delete(syncItem.id));\n }\n await Promise.all(executionPromises);\n if (!needsResync) {\n successfulCommands++;\n this.updateSyncState({ isInProgress: true, lengthUpIncrement: -1 });\n } else {\n const message = `Item needs resync ${syncItem.tableName}; ${syncItem.itemId}`;\n console.warn(message);\n logError(message, 'dbsyncer/resync');\n }\n });\n })\n );\n const lengthUp = Math.max(commands.length - successfulCommands, 0);\n this.updateSyncState({ isInProgress: false, setLengthUp: lengthUp });\n }\n if (remoteResponse.errors && remoteResponse.errors.length) {\n const messages = getErrorMessagesFromSyncResult(remoteResponse);\n logError(messages, 'dbsyncer/high');\n throw remoteResponse;\n }\n }\n\n async syncItemToCommand(syncItem: SyncItem, forceSetVersion?: number): Promise {\n const db = getDb();\n const tableName = syncItem.tableName;\n const item = await db[tableName]?.get(syncItem.itemId);\n if (!item) {\n throw new Error(`Error when syncing, object ${syncItem.itemId} no longer exist in table ${tableName}`);\n }\n if (forceSetVersion) {\n (item as any)._version = forceSetVersion;\n }\n const definition = dbSyncerUpDefintions.get(tableName);\n if (!definition) {\n throw new Error(`No syncer up-definition exists for table ${tableName}`);\n }\n return definition(item);\n }\n\n async executeSyncUpCommands(\n commands: DbSyncerUpCommand[]\n ): Promise<{ result: any; commands: DbSyncerUpCommand[] }> {\n const { query, parameters, validCommands } = await syncUpCommandsToMutation(commands, 'syncUp');\n const gqlo = graphqlOperation(query, parameters);\n if (validCommands.length) {\n const result = await API.graphql(gqlo);\n return { result, commands: validCommands };\n } else {\n return {\n result: {\n data: null,\n errors: [{ message: 'No valid commands in batch', path: '-' }],\n },\n commands: validCommands,\n };\n }\n }\n\n async syncDown(force?: boolean) {\n if (!this.isStale() && !force) {\n console.info('sync is not stale enough');\n return;\n }\n const currentUserId = this.getCurrentUserId() || undefined;\n\n const dateStart = Date.now();\n const [subscriptionListToUse, lastSync] = this.shouldDoCompleteResync()\n ? [dbSyncerResyncSubscriptions, 0]\n : [dbSyncerUpdateSubscriptions, this.lastSyncTime];\n\n console.info(\n 'Sync start, ref',\n new Date(this.lastSyncTime),\n 'using ',\n subscriptionListToUse === dbSyncerResyncSubscriptions ? 'complete' : 'partial',\n 'resync'\n );\n const additionalData: DbSyncSubscriptionAdditionalData = {\n currentUserId,\n isInitialSync: subscriptionListToUse === dbSyncerResyncSubscriptions,\n };\n try {\n let queue: QueueItem[] = subscriptionListToUse.map((subscription) => ({\n subscription,\n }));\n const promiseList: Promise[] = [];\n this.updateSyncState({ isInProgress: true, setLengthDown: queue.length });\n while (queue.length) {\n const queries = queue.map((queue) => queue.subscription.getQuery(queue.nextToken, additionalData));\n const query = `query Sync($lastSync: AWSTimestamp){${queries.join(',')}}`;\n const initialResult: any = await API.graphql(graphqlOperation(query, { lastSync }));\n for (const queueItem of queue) {\n const { nextToken, items } = initialResult.data[queueItem.subscription.key];\n if (items.length) {\n promiseList.push(queueItem.subscription.onNewItems(items));\n }\n if (queueItem.subscription.nextTokenGetter) {\n queueItem.nextToken = queueItem.subscription.nextTokenGetter(\n initialResult.data[queueItem.subscription.key],\n additionalData\n );\n } else {\n queueItem.nextToken = nextToken || undefined;\n }\n }\n queue = queue.filter((q) => q.nextToken);\n this.updateSyncState({ setLengthDown: queue.length });\n }\n await Promise.all(promiseList);\n console.info('Sync complete');\n this.setLastSyncTime(dateStart);\n } catch (e: any) {\n if (e === 'No current user') {\n initReauthFlow();\n return;\n }\n if (e && e.code && e.code === 'NetworkError') {\n console.warn('DbSyncer: offline');\n return;\n }\n console.error('Error in DbSyncer/Down: ', e);\n logError(getErrorMessagesFromSyncResult(e), 'dbsyncer/down');\n }\n }\n\n private async attemptRetryWithVersion(command: DbSyncerUpCommand, syncItem: SyncItem): Promise {\n try {\n const query = `query getVersion {${command.queryName}(id:\"${syncItem.itemId}\") { _version}}`;\n const result = (await API.graphql(graphqlOperation(query))) as any;\n const resultData = result.data && result.data[command.queryName];\n if (resultData === null) {\n const message = `Retry with force-version failed for ${syncItem.tableName} - no result for record`;\n console.error(message);\n logError(message, 'dbsyncer/retry/1');\n }\n const existingVersion = resultData._version;\n const retryCommand = await this.syncItemToCommand(syncItem, existingVersion || 1);\n const retryResult = await this.executeSyncUpCommands([retryCommand]);\n const returned = retryResult.result.data && retryResult.result.data[retryCommand.mutationName];\n if (!returned) {\n console.log(retryResult);\n const message = getErrorMessagesFromSyncResult(retryResult.result);\n console.error(\n `Retry with force-version failed for ${syncItem.tableName} ${syncItem.itemId}\\n\\n${message}`\n );\n console.error(retryResult, retryCommand);\n logError(message, 'dbsyncer/retry/2');\n } else {\n console.warn(`Had to force-set version for ${syncItem.tableName} ${syncItem.itemId}`);\n return returned;\n }\n } catch (e: any) {\n // log only, as this is a non-critical retry attempt\n if (e.errors) {\n const message = getErrorMessagesFromSyncResult(e);\n console.error(\n `Retry with force-version failed for ${syncItem.tableName} ${syncItem.itemId}\\n\\n${message}`\n );\n logError(message, 'dbsyncer/retry-low');\n } else {\n console.error(e);\n logError(e.toString(), 'dbsyncer/retry-verylow');\n }\n }\n return false;\n }\n\n private setLastSyncTime(time: number) {\n this.lastSyncTime = time;\n window.localStorage.setItem(LOCAL_STORAGE_KEY_LAST_SYNC, this.lastSyncTime.toString());\n }\n\n private getCurrentUserId(): string | null {\n const maybeUser = store.getState().cognitoUser;\n if (cognitoUserIsSignedIn(maybeUser)) {\n return maybeUser.id;\n }\n return null;\n }\n}\n\nlet dbSyncer: DbSyncer | null;\n\nexport const getDbSyncer = (): DbSyncer => {\n if (!dbSyncer) {\n dbSyncer = new DbSyncer();\n }\n return dbSyncer;\n};\n\nexport const wipeDbSyncer = () => {\n window.localStorage.setItem(LOCAL_STORAGE_KEY_LAST_SYNC, '0');\n};\n\nconst getErrorMessagesFromSyncResult = function (syncResult: any): string {\n if (syncResult.errors) {\n return syncResult.errors.map((e: any) => e.message + '@' + e.path).join('\\n----\\n');\n } else if (typeof syncResult === 'object') {\n try {\n return JSON.stringify(syncResult);\n } catch (e) {\n return syncResult.toString();\n }\n } else {\n return syncResult.toString();\n }\n};\n","import Dexie from 'dexie';\n\nexport const getStandardItemHandler = (table: Dexie.Table, transform?: (input: any) => any): (items: T[]) => Promise => {\n return async (items: T[]) => {\n const toDelete = items.filter(i => i.deleted);\n let toPut = items.filter(i => !i.deleted);\n if (transform) {\n toPut = toPut.map(transform);\n }\n await Promise.all([\n table.bulkDelete(toDelete.map(i => i.id)),\n table.bulkPut(toPut)\n ]);\n }\n};\n","import { User } from '../Datasource/Users/User';\nimport { useSelector } from 'react-redux';\nimport { RootState } from '../rootReducer';\n\nexport type TlbSignedUserState = {\n data: User;\n isAdmin: boolean;\n isPilotOrAircraft: boolean;\n isPilot: boolean;\n isAircraft: boolean;\n isTechnician: boolean;\n dataIsStale: boolean;\n};\nconst LOCAL_STORAGE_KEY = 'alol_user_tlb';\n\nexport const TLB_USER_STATE_SIGNED_OUT = 'signed-out';\nexport const TLB_USER_STATE_PROCESSING = 'processing';\ntype UnsignedTlbUserState = typeof TLB_USER_STATE_SIGNED_OUT;\ntype ProcessingTlbUserState = typeof TLB_USER_STATE_PROCESSING;\n\nexport type TlbUserState = TlbSignedUserState | UnsignedTlbUserState | ProcessingTlbUserState;\n\nexport const tlbUserInitialState: TlbUserState = getInitialState();\n\nexport const TLB_USER_SIGN_IN = 'TLB_USER_SIGN_IN';\nexport const TLB_USER_SIGN_PROCESS_START = 'TLB_USER_SIGN_PROCESS_START';\nexport const TLB_USER_SIGN_OUT = 'TLB_USER_SIGN_OUT';\nexport const TLB_USER_AUTH_ERROR = 'TLB_USER_AUTH_ERROR';\n\nexport const TlbUserReducer = (\n state: TlbUserState | undefined,\n action: TlbUserActionTypes | any = undefined\n): TlbUserState => {\n switch (action.type) {\n case TLB_USER_SIGN_IN:\n const data = action.data as TlbSignInData;\n persistState(data);\n const isPilot = !!data.user.userId && !data.user.aircraftId;\n const isAircraft = !!data.user.aircraftId;\n return {\n data: data.user,\n isAdmin: data.isAdmin,\n isPilotOrAircraft: data.isPilot,\n isPilot,\n isAircraft,\n isTechnician: data.isTechnician,\n dataIsStale: false,\n };\n case TLB_USER_SIGN_OUT:\n clearState();\n return TLB_USER_STATE_SIGNED_OUT;\n case TLB_USER_SIGN_PROCESS_START:\n if (state && 'object' === typeof state) {\n return state;\n } else {\n return TLB_USER_STATE_PROCESSING;\n }\n case TLB_USER_AUTH_ERROR:\n if (state && 'object' === typeof state) {\n return state;\n } else {\n return TLB_USER_STATE_SIGNED_OUT;\n }\n default:\n return state || getInitialState();\n }\n};\n\ntype TlbSignInData = {\n user: User;\n isAdmin: boolean;\n isPilot: boolean;\n isTechnician: boolean;\n};\nexport type TlbUserActionTypes =\n | {\n type: typeof TLB_USER_SIGN_IN;\n data: TlbSignInData;\n }\n | { type: typeof TLB_USER_SIGN_OUT | typeof TLB_USER_SIGN_PROCESS_START | typeof TLB_USER_AUTH_ERROR };\n\nexport const useSignedTlbUserState = (): TlbSignedUserState => {\n const state = useAnyTlbUserState();\n if (!tlbUserIsSignedIn(state)) {\n throw new Error('TLB User is not signed in');\n }\n return state;\n};\n\nexport const tlbUserIsSignedIn = (state: TlbUserState): state is TlbSignedUserState => {\n return state && 'string' !== typeof state;\n};\n\nexport const useAnyTlbUserState = (): TlbUserState => {\n return useSelector((state) => state.user);\n};\n\nfunction persistState(state: TlbSignInData) {\n window.localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(state));\n}\n\nfunction clearState() {\n window.localStorage.removeItem(LOCAL_STORAGE_KEY);\n}\n\nfunction getInitialState(): TlbUserState {\n try {\n const maybeLocalStorageData = window.localStorage.getItem(LOCAL_STORAGE_KEY);\n if (maybeLocalStorageData) {\n const data: TlbSignInData = JSON.parse(maybeLocalStorageData);\n const isPilot = !!data.user.userId && !data.user.aircraftId;\n const isAircraft = !!data.user.aircraftId;\n return {\n data: data.user,\n isAdmin: data.isAdmin,\n isPilotOrAircraft: data.isPilot,\n isTechnician: data.isTechnician,\n isPilot,\n isAircraft,\n dataIsStale: true,\n };\n } else {\n return TLB_USER_STATE_PROCESSING;\n }\n } catch (e) {\n console.error('Error reloading TLB User State', e);\n return TLB_USER_STATE_PROCESSING;\n }\n}\n","import { useSelector } from 'react-redux';\nimport { RootState } from '../rootReducer';\n\nexport type CognitoUserData = {\n groups: string[];\n id: string;\n};\nexport type CognitoSignedUserState = {\n groups: string[];\n id: string;\n isAdmin: boolean;\n dataIsStale: boolean;\n};\n\nconst LOCAL_STORAGE_KEY = 'alol_user_cognito';\nexport const COGNITO_USER_GROUP_ADMIN = 'adm';\nexport const COGNITO_USER_GROUP_TLB_USER = 'usr';\nexport const COGNITO_USER_GROUP_TECH = 'tch';\nexport const COGNITO_USER_GROUP_SALES = 'sls';\nexport const COGNITO_USER_GROUP_OPS = 'ops';\n\nexport const COGNITO_USER_GROUP_REPORT = 'rpt';\nexport const COGNITO_USER_GROUP_ACCOUNTANT = 'act';\n\nexport const COGNITO_USER_STATE_SIGNED_OUT = 'signed-out';\nexport const COGNITO_USER_STATE_PROCESSING = 'processing';\n\ntype CognitoUnsignedUserState = typeof COGNITO_USER_STATE_SIGNED_OUT;\ntype CognitoProcessingUserState = typeof COGNITO_USER_STATE_PROCESSING;\n\nexport type CognitoUserState = CognitoSignedUserState | CognitoUnsignedUserState | CognitoProcessingUserState;\n\nexport const cognitoUserInitialState = getInitialState();\n\nexport const COGNITO_USER_SIGN_IN = 'COGNITO_USER_SIGN_IN';\nexport const COGNITO_USER_SIGN_PROCESS_START = 'COGNITO_USER_SIGN_PROCESS_START';\nexport const COGNITO_USER_SIGN_OUT = 'COGNITO_USER_SIGN_OUT';\nexport const COGNITO_USER_AUTH_ERROR = 'COGNITO_USER_AUTH_ERROR';\nexport type CognitoUserActionTypes =\n | {\n type: typeof COGNITO_USER_SIGN_IN;\n data: CognitoUserData;\n }\n | {\n type: typeof COGNITO_USER_SIGN_OUT | typeof COGNITO_USER_SIGN_PROCESS_START | typeof COGNITO_USER_AUTH_ERROR;\n };\n\nexport const CognitoUserReducer = (\n state: CognitoUserState | undefined,\n action: CognitoUserActionTypes | any\n): CognitoUserState => {\n switch (action.type) {\n case COGNITO_USER_SIGN_IN:\n const data = action.data as CognitoSignedUserState;\n persistState(data);\n return {\n groups: data.groups.slice(),\n id: data.id,\n isAdmin: data.groups.includes(COGNITO_USER_GROUP_ADMIN),\n dataIsStale: false,\n };\n case COGNITO_USER_SIGN_OUT:\n clearState();\n return COGNITO_USER_STATE_SIGNED_OUT;\n case COGNITO_USER_SIGN_PROCESS_START:\n if (state && state !== COGNITO_USER_STATE_SIGNED_OUT) {\n return state;\n } else {\n return COGNITO_USER_STATE_PROCESSING;\n }\n case COGNITO_USER_AUTH_ERROR:\n if (state && 'object' === typeof state) {\n return state;\n } else {\n return COGNITO_USER_STATE_SIGNED_OUT;\n }\n default:\n return state || getInitialState();\n }\n};\n\nexport const useCognitoSignedUserState = (): CognitoSignedUserState => {\n const state = useCognitoAnyUserState();\n if (!cognitoUserIsSignedIn(state)) {\n throw new Error('User is not signed in');\n }\n return state;\n};\n\nexport function cognitoUserIsSignedIn(cognitoState: CognitoUserState): cognitoState is CognitoSignedUserState {\n return cognitoState && 'string' !== typeof cognitoState;\n}\n\nexport const useCognitoAnyUserState = (): CognitoUserState => {\n return useSelector((state) => state.cognitoUser);\n};\n\nexport const isUserInRole = (user: CognitoSignedUserState, role: string[]): boolean => {\n return user.groups.some((g) => role.includes(g));\n};\n\nfunction persistState(state: CognitoSignedUserState) {\n window.localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(state));\n}\n\nfunction clearState() {\n window.localStorage.removeItem(LOCAL_STORAGE_KEY);\n}\n\nfunction getInitialState(): CognitoUserState {\n try {\n const maybeLocalStorageData = window.localStorage.getItem(LOCAL_STORAGE_KEY);\n if (maybeLocalStorageData) {\n const data: CognitoSignedUserState = JSON.parse(maybeLocalStorageData);\n return {\n groups: data.groups.slice(),\n id: data.id,\n isAdmin: data.groups.includes(COGNITO_USER_GROUP_ADMIN),\n dataIsStale: true,\n };\n } else {\n return COGNITO_USER_STATE_PROCESSING;\n }\n } catch (e) {\n console.error('Error reloading Cognito User State', e);\n return COGNITO_USER_STATE_PROCESSING;\n }\n}\n","export type Some = NonNullable;\nexport type None = null | undefined;\nexport type Maybe = T | None;\n\n/**\n * Checks if a value is not null or undefined.\n */\nexport function isSome(value: T): value is Some {\n return value !== null && value !== undefined;\n}\n/**\n * Checks if value is null or undefined.\n */\nexport function isNone(value: unknown): value is None {\n return value === null || value === undefined;\n}\n/**\n * Checks if a value is not null, undefined or empty.\n */\nexport function IsNoneOrEmpty(value: String): value is Some {\n return isNone(value) || value === '';\n}\n","import { DbSyncerUpDefinition, getStandardSyncerFields } from '../syncHelpers';\nimport {\n Deicing,\n FinishedFlightLeg,\n FLIGHT_LEG_PHASE_FINISH,\n FlightLeg,\n FlightLegPhase,\n isLegFinished,\n StartedFlightLeg,\n} from '../../FlightLegs/FlightLeg';\nimport { CreateLegInput } from '../../../API';\nimport { FlightOps } from '../../FlightLegs/FlightOpsTypes';\nimport { CrewRoleTypes } from '../../FlightLegs/CrewRoleTypes';\nimport { WithId } from '../types';\n\nlet counter = 0;\n\nexport const flightLegItemFields = `\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n _version\n logbookFields\n inputSources\n ticketId\n`.trim(); // billingData is not included in the list, but is instead added only on queries that specifically require it\n\nexport const flightLegToDb = function (leg: StartedFlightLeg | FinishedFlightLeg): CreateLegInput & WithId {\n const input: CreateLegInput & WithId = {\n id: leg.id,\n deleted: leg.deleted,\n createdAt: leg.createdAt.toISOString(),\n flightId: leg.flightId,\n aircraftId: leg.aircraftId,\n airportOffIcao: leg.airportOffIcao,\n ops: leg.ops,\n securityCheckDate: leg.securityCheckDate?.toISOString(),\n securityCheckName: leg.securityCheckName,\n preflightCheckDate: leg.preflightCheckDate?.toISOString(),\n preflightCheckName: leg.preflightCheckName,\n picName: leg.picName,\n picId: leg.picId || undefined,\n picRoles: leg.picRoles.length ? leg.picRoles : null,\n sicName: leg.sicName,\n sicId: leg.sicId || undefined,\n sicRoles: leg.sicRoles.length ? leg.sicRoles : null,\n deicing: JSON.stringify(leg.deicing),\n notes: leg.notes,\n startSignature: leg.startSignature ? JSON.stringify(leg.startSignature) : null,\n phase: leg.phase,\n startedAt: leg.startedAt.toISOString(),\n upliftCountableChangeId: leg.upliftCountableChangeId,\n timeOut: leg.timeOut.toISOString(),\n inputSources: Object.keys(leg.inputSources).length ? JSON.stringify(leg.inputSources) : null,\n reservationId: leg.reservationId || (leg._version ? null : undefined),\n reservationEventId: leg.reservationEventId || (leg._version ? null : undefined),\n ticketId: leg.ticketId ?? 'x',\n _version: leg._version,\n };\n if (isLegFinished(leg)) {\n return {\n ...input,\n airportOnIcao: leg.airportOnIcao,\n timeOut: leg.timeOut.toISOString(),\n timeOff: leg.timeOff.toISOString(),\n timeOn: leg.timeOn.toISOString(),\n timeIn: leg.timeIn.toISOString(),\n finishNotes: leg.finishNotes,\n finishSignature: leg.finishSignature ? JSON.stringify(leg.finishSignature) : null,\n consumptionCountableChangeId: leg.consumptionCountableChangeId,\n logbookFields: leg.logbookFields ? JSON.stringify(leg.logbookFields) : null,\n };\n } else {\n return input;\n }\n};\nexport const flightLegSyncerDefinition: DbSyncerUpDefinition = (leg: FlightLeg) => {\n const c = ++counter;\n const [commandName, inputType] = !leg._version ? ['createLeg', 'CreateLegInput'] : ['updateLeg', 'UpdateLegInput'];\n let input: CreateLegInput = flightLegToDb(leg);\n\n const { mutationName, inputKey, query } = getStandardSyncerFields(commandName, c, flightLegItemFields);\n return {\n query,\n input,\n inputKey,\n inputType,\n mutationName,\n remoteToLocalTransform: flightLegFromDb,\n queryName: 'getLeg',\n };\n};\n\nexport const flightLegFromDb = (input: CreateLegInput): FlightLeg => {\n const startedFLightLeg: StartedFlightLeg = {\n id: input.id!,\n deleted: input.deleted,\n _version: input._version!,\n createdAt: new Date(input.createdAt!),\n flightId: input.flightId,\n aircraftId: input.aircraftId,\n airportOffIcao: input.airportOffIcao,\n ops: input.ops as FlightOps,\n securityCheckDate: input.securityCheckDate ? new Date(input.securityCheckDate) : null,\n securityCheckName: input.securityCheckName || null,\n preflightCheckDate: input.preflightCheckDate ? new Date(input.preflightCheckDate) : null,\n preflightCheckName: input.preflightCheckName || null,\n picName: input.picName,\n picId: input.picId || null,\n picRoles: input.picRoles ? (input.picRoles as CrewRoleTypes[]) : [],\n sicName: input.sicName || null,\n sicId: input.sicId || null,\n sicRoles: input.sicRoles ? (input.sicRoles as CrewRoleTypes[]) : [],\n deicing: input.deicing ? deicingFromJson(input.deicing) : null,\n notes: input.notes,\n startSignature: input.startSignature ? JSON.parse(input.startSignature) : null,\n phase: input.phase as FlightLegPhase,\n startedAt: new Date(input.startedAt),\n upliftCountableChangeId: input.upliftCountableChangeId,\n editableByUserIds: input.editableByUserIds || [],\n timeOut: new Date(input.timeOut),\n inputSources: input.inputSources ? JSON.parse(input.inputSources) : {},\n reservationId: input.reservationId || undefined,\n reservationEventId: input.reservationEventId || undefined,\n ticketId: input.ticketId,\n };\n if (input.phase === FLIGHT_LEG_PHASE_FINISH) {\n // noinspection UnnecessaryLocalVariableJS\n const finishLeg: FinishedFlightLeg = {\n ...startedFLightLeg,\n phase: input.phase,\n airportOnIcao: input.airportOnIcao!,\n timeOut: new Date(input.timeOut!),\n timeOff: new Date(input.timeOff!),\n timeOn: new Date(input.timeOn!),\n timeIn: new Date(input.timeIn!),\n finishNotes: input.finishNotes!,\n logbookFields: input.logbookFields ? JSON.parse(input.logbookFields) : null,\n finishSignature: input.finishSignature ? JSON.parse(input.finishSignature) : null,\n consumptionCountableChangeId: input.consumptionCountableChangeId!,\n };\n return finishLeg;\n } else {\n return startedFLightLeg;\n }\n};\n\nfunction deicingFromJson(json: string): Deicing {\n const raw = JSON.parse(json) as Deicing;\n if (raw.startTime) {\n raw.startTime = new Date(raw.startTime);\n }\n if (raw.holdOverTime) {\n raw.holdOverTime = new Date(raw.holdOverTime);\n }\n return raw;\n}\n","import {CreateAircraftDocumentInput} from \"../../API\";\nimport {getDb} from \"../LocalDB/LocalDB\";\n\nexport const getAircraftDocumentsForAircraft = async (aircraftId: string): Promise => {\n return await getDb().aircraftDocuments.where({aircraftId}).toArray();\n};\n","import { getDb } from '../LocalDB/LocalDB';\nimport { Aircraft, AircraftForPicker, AircraftTag } from './types';\nimport { getFlightsForAircraft } from '../Flights/FlightsDatasource';\nimport { getSquawksForAircraft } from '../Squawks/SquawksDatasource';\nimport { getLastCountableChangeForAircraft } from '../CountableChanges/CountableChangeDatasource';\nimport { DbCreated } from '../LocalDB/types';\nimport { CreateAircraftInput } from '../../API';\nimport { getAircraftDocumentsForAircraft } from '../AircraftDocuments/AircraftDocuments';\nimport { sanitizeId } from '../datasourceUtils';\nimport { aircraftFromDb, aircraftItemFields } from '../LocalDB/Transformers/aircrafts';\nimport { API, graphqlOperation } from 'aws-amplify';\nimport { getReleaseToServicesForAircraft } from '../ReleaseToService/ReleaseToServiceDatasource';\nimport { AircraftMaintenanceLimit } from '../../Admin/AircraftMaintenanceLimits/AircraftMaintenanceLimit';\nimport { AircraftMaintenanceLimitExtension } from '../../Admin/AircraftMaintenanceLimitExtensions/AircraftMaintenanceLimitExtension';\nimport { FlightOps } from '../FlightLegs/FlightOpsTypes';\nimport { useEffect, useState } from 'react';\nimport { AircraftForFlight } from './AircraftForFlight';\n\nexport const getAircraftsForPicker = async (): Promise => {\n return await getDb().aircrafts.toArray();\n};\n\nexport type GetAircraftParams = [string];\nexport const getAircraft = async (aircraftId: GetAircraftParams[0]): Promise => {\n return (await getDb().aircrafts.get(aircraftId)) || null;\n};\n\nconst getAircraftMaintenanceLimits = async (aircraftId: string): Promise => {\n return await getDb().aircraftMaintenanceLimits.where({ aircraftId }).toArray();\n};\n\nconst getAircraftMaintenanceLimitExtensionsForLimits = async (\n maintenanceLimitIds: string[]\n): Promise => {\n if (maintenanceLimitIds.length === 0) {\n return [];\n }\n return await getDb()\n .aircraftMaintenanceLimitExtensions.where('maintenanceLimitId')\n .anyOf(maintenanceLimitIds)\n .toArray();\n};\n\nexport type GetAircraftForFlightParams = [string];\nexport const getAircraftForFlight = async (\n aircraftId: GetAircraftForFlightParams[0]\n): Promise => {\n const aircraft = await getAircraft(aircraftId);\n if (aircraft === null) {\n return null;\n }\n const [flights, squawks, lastCountableChange, aircraftMaintenanceLimits, releases] = await Promise.all([\n getFlightsForAircraft(aircraftId),\n getSquawksForAircraft(aircraftId),\n getLastCountableChangeForAircraft(aircraftId),\n getAircraftMaintenanceLimits(aircraftId),\n getReleaseToServicesForAircraft(aircraftId),\n ]);\n const maintenanceLimitIds = aircraftMaintenanceLimits.map((aml) => aml.id);\n const [aircraftDocuments, aircraftMaintenanceLimitExtensions] = await Promise.all([\n getAircraftDocumentsForAircraft(aircraftId),\n await getAircraftMaintenanceLimitExtensionsForLimits(maintenanceLimitIds),\n ]);\n return {\n ...aircraft,\n flights: flights,\n squawks: squawks,\n lastCountableChange: lastCountableChange,\n aircraftDocuments: aircraftDocuments,\n aircraftMaintenanceLimits: aircraftMaintenanceLimits,\n aircraftMaintenanceLimitExtensions,\n releases: releases,\n };\n};\n\nexport const getAircraftsByIdLocalAndOnline = async (aircraftIds: string[]): Promise => {\n const offlineAircrafts = (await getAircraftsById(aircraftIds).then((f) => f.filter(Boolean))) as Aircraft[];\n const offlineAircraftIds = new Set(offlineAircrafts.map((a) => a.id));\n const aircraftIdsToRequest = aircraftIds.filter((acId) => !offlineAircraftIds.has(acId));\n const onlineAircrafts = await getAircraftsByIdOnline(aircraftIdsToRequest);\n return [...offlineAircrafts, ...onlineAircrafts];\n};\n\nexport const getAircraftsById = async (aircraftIds: string[]): Promise<(Aircraft | null)[]> => {\n const db = getDb();\n return db.aircrafts.bulkGet(aircraftIds);\n};\n\nexport const getAircraftsByIdOnline = async (aircraftIds: string[]): Promise => {\n if (aircraftIds.length === 0) {\n return [];\n }\n const aircraftsQuery = `query getFlights {\n ${aircraftIds.map(\n (aircraftId, index) => `\n getAircraft${index}: getAircraft(id: \"${sanitizeId(aircraftId)}\") {\n ${aircraftItemFields}\n }\n `\n )}\n }`;\n const gqlo = graphqlOperation(aircraftsQuery);\n const aircraftsResult = (await API.graphql(gqlo)) as {\n data: { [key: string]: (CreateAircraftInput & DbCreated) | null };\n };\n return (Object.values(aircraftsResult.data).filter(Boolean) as (CreateAircraftInput & DbCreated)[]).map(\n aircraftFromDb\n );\n};\n\nexport const getAircraftForUserId = async (userId: string): Promise => {\n const ac = await getDb().aircrafts.where({ userId }).toArray();\n return ac.shift();\n};\n\nexport const MCC_OPTIONAL = 'optional';\nexport type aircraftMccOptions = true | false | typeof MCC_OPTIONAL;\nexport const getAircraftIsMcc = (aircraft: Aircraft, ops: FlightOps | undefined): aircraftMccOptions => {\n if (aircraft.tags.includes(AircraftTag.multiPilot)) {\n return true;\n }\n if (aircraft.tags.includes(AircraftTag.mutiPilotCat)) {\n if (ops === FlightOps.CAT) {\n return true;\n } else {\n return MCC_OPTIONAL;\n }\n }\n return false;\n};\n\nexport function useAircraft(aircraftId: string): Aircraft | null | undefined {\n const [aircraft, setAircraft] = useState(undefined);\n useEffect(() => {\n let cancelled = false;\n getAircraft(aircraftId).then((aircraft) => {\n if (!cancelled) {\n setAircraft(aircraft);\n }\n });\n return () => {\n cancelled = true;\n };\n }, [aircraftId]);\n return aircraft;\n}\n","import * as uuid from 'uuid';\nimport { ErrorLog } from \"./types\";\nimport { getDb } from \"../../Datasource/LocalDB/LocalDB\";\nimport { API } from 'aws-amplify';\nimport { createErrorReport } from '../../graphql/mutations';\nimport { CreateErrorReportInput } from '../../API';\nimport { QueryResult } from '../../Admin/Datasources/QueryFactory';\n\nexport const logErrorLocal = (message: string, place: string, additionalData?: any) => {\n const log: ErrorLog = {\n id: uuid.v4(),\n message,\n place,\n date: new Date(),\n additionalData\n };\n getDb().errorLogs.put(log);\n};\n\nexport const logErrorRemote = async (message: string, place: string, additionalData?: any) => {\n if (window.location.hostname === 'localhost') {\n return;\n }\n const input: CreateErrorReportInput = {\n message,\n place,\n data: JSON.stringify(additionalData)\n };\n const query = createErrorReport;\n const variables = {input};\n const result = await API.graphql({query, variables}) as QueryResult;\n if (result.errors && result.errors.length) {\n throw result.errors;\n }\n await API.graphql({query, variables});\n}\n\nexport const logError = (message: string, place: string, additionalData?: any) => {\n if ((typeof message as any) === 'string' && message.startsWith('Network Error')) {\n return;\n }\n try {\n logErrorLocal(message, place, additionalData);\n } catch (e) {\n console.error('Error when locally saving error');\n console.error(e);\n }\n try {\n logErrorRemote(message, place, additionalData);\n } catch (e) {\n console.error('Error when remotely saving error');\n console.error(e);\n }\n}\n\nexport const logErrorEvent = (event: ErrorEvent) => {\n const data = {\n lineno: event.lineno,\n colno: event.colno,\n filename: event.filename,\n errorStack: event.error?.stack\n }\n logError(event.message, 'error-event', data);\n}\n","import { DbSaveable } from '../LocalDB/types';\nimport { numberToPrecision } from '../../utils/NumberToPrecision';\nimport { decimalToHoursMinutes } from '../../utils/timeUtils';\n\nexport const COUNTABLE_CHANGE_CONSUMPTION = 'consumption';\nexport const COUNTABLE_CHANGE_UPLIFT = 'uplift';\nexport const COUNTABLE_CHANGE_CORRECTION = 'correction';\nexport const COUNTABLE_CHANGE_MAINTENANCE = 'maintenance';\n\nexport type CountableChangeType =\n | typeof COUNTABLE_CHANGE_CONSUMPTION\n | typeof COUNTABLE_CHANGE_UPLIFT\n | typeof COUNTABLE_CHANGE_CORRECTION\n | typeof COUNTABLE_CHANGE_MAINTENANCE;\n\nexport const AIRCRAFT_COUNTABLE_TACH_TIME = 'TACH_TIME';\nexport const AIRCRAFT_COUNTABLE_HOBBS_TIME = 'HOBBS_TIME';\nexport const AIRCRAFT_COUNTABLE_FLIGHT_TIME = 'FLIGHT_TIME';\nexport const AIRCRAFT_COUNTABLE_ANY_FLIGHT_TIME = 'ANY_FLIGHT_TIME'; // virtual for available of tach/flight/hobbs time\nexport const AIRCRAFT_COUNTABLE_LANDINGS = 'LANDINGS';\nexport const AIRCRAFT_COUNTABLE_CYCLES = 'CYCLES';\nexport const AIRCRAFT_COUNTABLE_CYCLES_L = 'CYCLES_L';\nexport const AIRCRAFT_COUNTABLE_CYCLES_R = 'CYCLES_R';\nexport const AIRCRAFT_COUNTABLE_FUEL_GAL = 'FUEL_GAL';\n\nexport const AIRCRAFT_COUNTABLE_FUEL_KG = 'FUEL_KG';\nexport const AIRCRAFT_COUNTABLE_FUEL_LB = 'FUEL_LB';\nexport const AIRCRAFT_COUNTABLE_OIL_LEGACY = 'OIL';\nexport const AIRCRAFT_COUNTABLE_OIL_QUARTS = 'OIL_QUARTS';\nexport const AIRCRAFT_COUNTABLE_OIL_PERCENT = 'OIL_PERCENT';\nexport const AIRCRAFT_COUNTABLE_OIL_L_LEGACY = 'OIL_L';\nexport const AIRCRAFT_COUNTABLE_OIL_R_LEGACY = 'OIL_R';\nexport const AIRCRAFT_COUNTABLE_OIL_L_QUARTS = 'OIL_L_QUARTS';\nexport const AIRCRAFT_COUNTABLE_OIL_R_QUARTS = 'OIL_R_QUARTS';\nexport const AIRCRAFT_COUNTABLE_OIL_L_PERCENT = 'OIL_L_PERCENT';\nexport const AIRCRAFT_COUNTABLE_OIL_R_PERCENT = 'OIL_R_PERCENT';\nexport const AIRCRAFT_COUNTABLE_PRIST = 'PRIST'; // uplift only\nexport const AIRCRAFT_COUNTABLE_TKS = 'TKS';\nexport const AIRCRAFT_COUNTABLE_OXYGEN = 'OXYGEN';\nexport const AIRCRAFT_COUNTABLE_FUEL_LITERS = 'FUEL_LITERS';\nexport type AircraftCountableType =\n | typeof AIRCRAFT_COUNTABLE_TACH_TIME\n | typeof AIRCRAFT_COUNTABLE_FLIGHT_TIME\n | typeof AIRCRAFT_COUNTABLE_HOBBS_TIME\n | typeof AIRCRAFT_COUNTABLE_ANY_FLIGHT_TIME\n | typeof AIRCRAFT_COUNTABLE_LANDINGS\n | typeof AIRCRAFT_COUNTABLE_CYCLES\n | typeof AIRCRAFT_COUNTABLE_CYCLES_L\n | typeof AIRCRAFT_COUNTABLE_CYCLES_R\n | typeof AIRCRAFT_COUNTABLE_FUEL_GAL\n | typeof AIRCRAFT_COUNTABLE_FUEL_LB\n | typeof AIRCRAFT_COUNTABLE_FUEL_KG\n | typeof AIRCRAFT_COUNTABLE_OIL_LEGACY\n | typeof AIRCRAFT_COUNTABLE_OIL_L_LEGACY\n | typeof AIRCRAFT_COUNTABLE_OIL_R_LEGACY\n | typeof AIRCRAFT_COUNTABLE_OIL_QUARTS\n | typeof AIRCRAFT_COUNTABLE_OIL_L_QUARTS\n | typeof AIRCRAFT_COUNTABLE_OIL_R_QUARTS\n | typeof AIRCRAFT_COUNTABLE_OIL_PERCENT\n | typeof AIRCRAFT_COUNTABLE_OIL_L_PERCENT\n | typeof AIRCRAFT_COUNTABLE_OIL_R_PERCENT\n | typeof AIRCRAFT_COUNTABLE_TKS\n | typeof AIRCRAFT_COUNTABLE_OXYGEN\n | typeof AIRCRAFT_COUNTABLE_FUEL_LITERS;\n\nexport const AIRCRAFT_COUNTABLES: AircraftCountableType[] = [\n AIRCRAFT_COUNTABLE_TACH_TIME,\n AIRCRAFT_COUNTABLE_FLIGHT_TIME,\n AIRCRAFT_COUNTABLE_HOBBS_TIME,\n AIRCRAFT_COUNTABLE_LANDINGS,\n AIRCRAFT_COUNTABLE_CYCLES,\n AIRCRAFT_COUNTABLE_CYCLES_L,\n AIRCRAFT_COUNTABLE_CYCLES_R,\n AIRCRAFT_COUNTABLE_FUEL_GAL,\n AIRCRAFT_COUNTABLE_FUEL_LB,\n AIRCRAFT_COUNTABLE_FUEL_KG,\n AIRCRAFT_COUNTABLE_FUEL_LITERS,\n AIRCRAFT_COUNTABLE_OIL_QUARTS,\n AIRCRAFT_COUNTABLE_OIL_L_QUARTS,\n AIRCRAFT_COUNTABLE_OIL_R_QUARTS,\n AIRCRAFT_COUNTABLE_OIL_PERCENT,\n AIRCRAFT_COUNTABLE_OIL_L_PERCENT,\n AIRCRAFT_COUNTABLE_OIL_R_PERCENT,\n AIRCRAFT_COUNTABLE_TKS,\n AIRCRAFT_COUNTABLE_OXYGEN,\n];\n\nexport type AircraftUpliftableType =\n | typeof AIRCRAFT_COUNTABLE_OIL_LEGACY\n | typeof AIRCRAFT_COUNTABLE_OIL_L_LEGACY\n | typeof AIRCRAFT_COUNTABLE_OIL_R_LEGACY\n | typeof AIRCRAFT_COUNTABLE_OIL_QUARTS\n | typeof AIRCRAFT_COUNTABLE_OIL_L_QUARTS\n | typeof AIRCRAFT_COUNTABLE_OIL_R_QUARTS\n | typeof AIRCRAFT_COUNTABLE_PRIST\n | typeof AIRCRAFT_COUNTABLE_FUEL_LITERS\n | typeof AIRCRAFT_COUNTABLE_TKS\n | typeof AIRCRAFT_COUNTABLE_OXYGEN;\n\nexport const AIRCRAFT_UPLIFTABLES: (AircraftCountableType | AircraftUpliftableType)[] = [\n AIRCRAFT_COUNTABLE_OIL_QUARTS,\n AIRCRAFT_COUNTABLE_OIL_L_QUARTS,\n AIRCRAFT_COUNTABLE_OIL_R_QUARTS,\n AIRCRAFT_COUNTABLE_PRIST,\n AIRCRAFT_COUNTABLE_FUEL_LITERS,\n AIRCRAFT_COUNTABLE_TKS,\n AIRCRAFT_COUNTABLE_OXYGEN,\n];\n\nexport const AIRCRAFT_FLIGHT_TIME_COUNTABLES: AircraftCountableType[] = [\n AIRCRAFT_COUNTABLE_FLIGHT_TIME,\n AIRCRAFT_COUNTABLE_TACH_TIME,\n];\n\nexport type AircraftFuelCountableType =\n | typeof AIRCRAFT_COUNTABLE_FUEL_LB\n | typeof AIRCRAFT_COUNTABLE_FUEL_KG\n | typeof AIRCRAFT_COUNTABLE_FUEL_GAL\n | typeof AIRCRAFT_COUNTABLE_FUEL_LITERS;\n\nexport const AIRCRAFT_FUEL_COUNTABLES: AircraftFuelCountableType[] = [\n AIRCRAFT_COUNTABLE_FUEL_LB,\n AIRCRAFT_COUNTABLE_FUEL_KG,\n AIRCRAFT_COUNTABLE_FUEL_GAL,\n AIRCRAFT_COUNTABLE_FUEL_LITERS,\n];\n\nexport function countableTypeIsFuel(ct: string): ct is AircraftFuelCountableType {\n return (AIRCRAFT_FUEL_COUNTABLES as string[]).includes(ct);\n}\n\nexport const FUEL_LITERS_TO_GAL = 0.264172;\nexport const FUEL_LITERS_TO_LB = 1.77;\nexport const FUEL_LITERS_TO_KG = 0.8;\nexport const AIRCRAFT_IGNORED_CONSUMABLES_ON_INPUT: (AircraftCountableType | AircraftUpliftableType)[] = [\n AIRCRAFT_COUNTABLE_TACH_TIME,\n AIRCRAFT_COUNTABLE_FLIGHT_TIME,\n AIRCRAFT_COUNTABLE_HOBBS_TIME,\n AIRCRAFT_COUNTABLE_LANDINGS,\n AIRCRAFT_COUNTABLE_CYCLES,\n AIRCRAFT_COUNTABLE_CYCLES_L,\n AIRCRAFT_COUNTABLE_CYCLES_R,\n];\n\nexport const AIRCRAFT_IGNORED_CONSUMABLES_ON_DISPLAY: (AircraftCountableType | AircraftUpliftableType)[] = [\n AIRCRAFT_COUNTABLE_TACH_TIME,\n AIRCRAFT_COUNTABLE_FLIGHT_TIME,\n AIRCRAFT_COUNTABLE_HOBBS_TIME,\n AIRCRAFT_COUNTABLE_CYCLES,\n AIRCRAFT_COUNTABLE_CYCLES_L,\n AIRCRAFT_COUNTABLE_CYCLES_R,\n];\n\nexport type CountableChange = {\n id: string;\n editableByUserIds: string[];\n aircraftId: string;\n flightId?: string;\n legId?: string;\n createdAt: Date;\n createdByName: string;\n place?: string;\n type: CountableChangeType;\n note?: string;\n changeTypes: (AircraftUpliftableType | AircraftCountableType)[];\n changeValues: (number | null)[];\n countableTypes: AircraftCountableType[];\n countableValuesBefore: number[];\n countableValuesAfter: number[];\n} & DbSaveable;\nexport const TAG_FUEL_BEFORE_UPLIFT = 'FUEL_IS_BEFORE_UPLIFT';\nexport const TAG_LABELS_FOR_UPLIFT = 'TAG_LABELS_FOR_UPLIFT';\nexport const TAG_LABELS_FOR_CONSUMABLES = 'TAG_LABELS_FOR_CONSUMABLES';\nexport type CountablesOverviewTags =\n | typeof TAG_FUEL_BEFORE_UPLIFT\n | typeof TAG_LABELS_FOR_UPLIFT\n | typeof TAG_LABELS_FOR_CONSUMABLES;\n\nexport const getLabelForCountable = (\n type: AircraftCountableType | AircraftUpliftableType,\n tags: CountablesOverviewTags[] = []\n): string => {\n switch (type) {\n case 'TACH_TIME':\n return 'Tach time';\n case 'HOBBS_TIME':\n return 'Hobbs time';\n case AIRCRAFT_COUNTABLE_FLIGHT_TIME:\n return 'Flight time';\n case AIRCRAFT_COUNTABLE_ANY_FLIGHT_TIME:\n return 'Flight hours';\n case 'LANDINGS':\n return 'Landings';\n case 'CYCLES':\n return 'Number of cycles';\n case AIRCRAFT_COUNTABLE_CYCLES_L:\n return 'Number of cycles (L)';\n case AIRCRAFT_COUNTABLE_CYCLES_R:\n return 'Number of cycles (R)';\n case AIRCRAFT_COUNTABLE_FUEL_GAL:\n case AIRCRAFT_COUNTABLE_FUEL_LB:\n case AIRCRAFT_COUNTABLE_FUEL_KG:\n case AIRCRAFT_COUNTABLE_FUEL_LITERS:\n let fuelString;\n if (tags.includes(TAG_FUEL_BEFORE_UPLIFT)) {\n fuelString = 'Fuel before uplift';\n } else if (tags.includes(TAG_LABELS_FOR_CONSUMABLES) || tags.includes(TAG_LABELS_FOR_UPLIFT)) {\n fuelString = 'Fuel';\n } else {\n fuelString = 'Fuel on board';\n }\n\n return `${fuelString} (${getFuelUnit(type)})`;\n\n case 'FUEL_LITERS':\n return 'Fuel (liters)';\n case 'OIL':\n return 'Oil';\n case 'OIL_L':\n return 'Oil Left';\n case 'OIL_R':\n return 'Oil Right';\n case 'OIL_QUARTS':\n return 'Oil (quarts)';\n case 'OIL_L_QUARTS':\n return 'Oil Left (quarts)';\n case 'OIL_R_QUARTS':\n return 'Oil Right (quarts)';\n case 'OIL_PERCENT':\n return 'Oil (percent)';\n case 'OIL_L_PERCENT':\n return 'Oil Left (percent)';\n case 'OIL_R_PERCENT':\n return 'Oil Right (percent)';\n case 'PRIST':\n return 'Prist';\n case 'TKS':\n return 'TKS (gallons)';\n case 'OXYGEN':\n return 'Oxygen';\n }\n};\n\nconst getFuelUnit = (\n type:\n | typeof AIRCRAFT_COUNTABLE_FUEL_GAL\n | typeof AIRCRAFT_COUNTABLE_FUEL_LB\n | typeof AIRCRAFT_COUNTABLE_FUEL_KG\n | typeof AIRCRAFT_COUNTABLE_FUEL_LITERS\n): string => {\n if (type === AIRCRAFT_COUNTABLE_FUEL_GAL) {\n return 'USG';\n }\n if (type === AIRCRAFT_COUNTABLE_FUEL_LB) {\n return 'Lbs';\n }\n if (type === AIRCRAFT_COUNTABLE_FUEL_KG) {\n return 'Kg';\n }\n if (type === AIRCRAFT_COUNTABLE_FUEL_LITERS) {\n return 'L';\n }\n throw new Error(`Unknown fuel unit ${type}`);\n};\n\nexport const getIsCountableOil = (type: AircraftCountableType | AircraftUpliftableType): boolean => {\n return type.includes('OIL');\n};\nexport const getLabelForCountableShort = (type: AircraftCountableType | AircraftUpliftableType): string => {\n switch (type) {\n case AIRCRAFT_COUNTABLE_FUEL_LITERS:\n case AIRCRAFT_COUNTABLE_FUEL_LB:\n case AIRCRAFT_COUNTABLE_FUEL_GAL:\n case AIRCRAFT_COUNTABLE_FUEL_KG:\n return 'Fuel';\n case AIRCRAFT_COUNTABLE_CYCLES:\n return 'Cycles';\n case AIRCRAFT_COUNTABLE_CYCLES_L:\n return 'Cycles (L)';\n case AIRCRAFT_COUNTABLE_CYCLES_R:\n return 'Cycles (R)';\n case AIRCRAFT_COUNTABLE_LANDINGS:\n return 'Landings';\n case AIRCRAFT_COUNTABLE_HOBBS_TIME:\n return 'Hobbs';\n case AIRCRAFT_COUNTABLE_TACH_TIME:\n return 'Tach';\n case AIRCRAFT_COUNTABLE_TKS:\n return 'TKS';\n default:\n return getLabelForCountable(type);\n }\n};\n// noinspection JSUnusedLocalSymbols\nexport const getUnitForCountable = (\n type: AircraftCountableType | AircraftUpliftableType,\n tags: CountablesOverviewTags[] = []\n): string | null => {\n switch (type) {\n case 'FUEL_GAL':\n case 'TKS':\n return 'usg';\n case 'PRIST':\n case 'FUEL_LITERS':\n return 'l';\n case AIRCRAFT_COUNTABLE_FUEL_KG:\n return 'kg';\n case 'TACH_TIME':\n case 'HOBBS_TIME':\n return 'hours';\n case 'FUEL_LB':\n return 'lb';\n case 'OIL':\n case 'OIL_L':\n case 'OIL_R':\n return 'quarts/%';\n case 'OIL_QUARTS':\n case 'OIL_L_QUARTS':\n case 'OIL_R_QUARTS':\n return 'quarts';\n case 'OIL_PERCENT':\n case 'OIL_L_PERCENT':\n case 'OIL_R_PERCENT':\n return '%';\n case AIRCRAFT_COUNTABLE_OXYGEN:\n return 'PSI';\n default:\n return null;\n }\n};\n\nexport const COUNTABLE_BEHAVIOR_ADDITIVE = 'additive';\nexport const COUNTABLE_BEHAVIOR_ABSOLUTE = 'absolute';\nexport const COUNTABLE_BEHAVIOR_INDETERMINATE = 'indeterminate';\n\nexport type COUNTABLE_BEHAVIOR =\n | typeof COUNTABLE_BEHAVIOR_ADDITIVE\n | typeof COUNTABLE_BEHAVIOR_ABSOLUTE\n | typeof COUNTABLE_BEHAVIOR_INDETERMINATE;\n\nexport const COUNTABLE_TYPES_ADDITIVE: AircraftCountableType[] = [\n AIRCRAFT_COUNTABLE_LANDINGS,\n AIRCRAFT_COUNTABLE_CYCLES,\n AIRCRAFT_COUNTABLE_CYCLES_L,\n AIRCRAFT_COUNTABLE_CYCLES_R,\n AIRCRAFT_COUNTABLE_FLIGHT_TIME,\n];\n\nexport const COUNTABLE_TYPES_ABSOLUTE: AircraftCountableType[] = [\n AIRCRAFT_COUNTABLE_TACH_TIME,\n AIRCRAFT_COUNTABLE_HOBBS_TIME,\n];\nexport const getCountableTypeBehavior = (type: AircraftCountableType | AircraftUpliftableType): COUNTABLE_BEHAVIOR => {\n if ((COUNTABLE_TYPES_ABSOLUTE as string[]).includes(type)) {\n return COUNTABLE_BEHAVIOR_ABSOLUTE;\n }\n if ((COUNTABLE_TYPES_ADDITIVE as string[]).includes(type)) {\n return COUNTABLE_BEHAVIOR_ADDITIVE;\n }\n return COUNTABLE_BEHAVIOR_INDETERMINATE;\n};\n\nexport const getFormattedValueForCountable = (\n value: number,\n type: AircraftCountableType | AircraftUpliftableType\n): string => {\n if (type === AIRCRAFT_COUNTABLE_FLIGHT_TIME) {\n return decimalToHoursMinutes(value);\n } else if (type === AIRCRAFT_COUNTABLE_TACH_TIME) {\n return value.toFixed(1);\n } else {\n return numberToPrecision(value, 1);\n }\n};\n","import { FlightOps } from './FlightOpsTypes';\nimport { CREW_ROLE_SUPERVISING_INSTRUCTOR, CrewRoleTypes } from './CrewRoleTypes';\nimport { CountableChange } from '../CountableChanges/types';\nimport { DbSaveable } from '../LocalDB/types';\nimport { HandSignature } from '../util/SignatureTypes';\nimport { InLegLogbook } from '../Logbook/InLegLogbook';\nimport { InputSources } from '../../utils/InputSources';\n\nexport const FLIGHT_LEG_PHASE_START = 'start';\nexport const FLIGHT_LEG_PHASE_FINISH = 'end';\n\nexport type FlightLegPhase = typeof FLIGHT_LEG_PHASE_START | typeof FLIGHT_LEG_PHASE_FINISH;\n\nexport interface StartedFlightLeg extends DbSaveable {\n id: string;\n createdAt: Date;\n flightId: string;\n aircraftId: string;\n airportOffIcao: string;\n ops: FlightOps | undefined;\n securityCheckDate: Date | null;\n securityCheckName: string | null;\n preflightCheckDate: Date | null;\n preflightCheckName: string | null;\n picName: string;\n picId: string | null;\n picRoles: CrewRoleTypes[];\n sicName: string | null;\n sicId: string | null;\n sicRoles: CrewRoleTypes[];\n deicing: Deicing | null;\n notes: string;\n startSignature: HandSignature | null;\n phase: FlightLegPhase;\n startedAt: Date;\n upliftCountableChangeId: string;\n editableByUserIds: string[];\n inputSources: InputSources;\n timeOut: Date; // so that secondary index on DynamoDB table works\n reservationId?: string;\n reservationEventId?: string;\n ticketId?: string | null;\n}\n\nexport type WithLastCountableChange = {\n lastCountableChange: CountableChange;\n};\n\nexport interface FinishedFlightLeg extends StartedFlightLeg {\n phase: typeof FLIGHT_LEG_PHASE_FINISH;\n airportOnIcao: string;\n timeOff: Date;\n timeOn: Date;\n timeIn: Date;\n logbookFields: InLegLogbook | null;\n finishNotes: string;\n finishSignature: HandSignature | null;\n consumptionCountableChangeId: string;\n}\n\nexport type FlightLeg = StartedFlightLeg | FinishedFlightLeg;\nexport const isLegFinished = (leg: FlightLeg): leg is FinishedFlightLeg => leg.phase === FLIGHT_LEG_PHASE_FINISH;\n\nexport type Deicing = {\n startTime: Date | null;\n fluidType: string;\n ratio: string;\n holdOverTime: Date | null;\n};\n\nexport function isSupervisingInstructorOnLeg(leg: FinishedFlightLeg, crewId: string | undefined): boolean {\n return leg.sicId === crewId && leg.sicRoles && leg.sicRoles.includes(CREW_ROLE_SUPERVISING_INSTRUCTOR);\n}\n","import { isNone, isSome, Maybe } from './maybe';\nimport { keyBy } from 'lodash';\n\nexport function last(arr: T[]): T | undefined {\n return arr[arr.length - 1];\n}\n\nexport function sum(input: number[]): number {\n return input.reduce((previousValue, currentValue) => previousValue + currentValue, 0);\n}\n\nexport const toMap = (\n input: T[],\n mergeToMap?: Map\n): Map => {\n const map = mergeToMap ? mergeToMap : new Map();\n for (const item of input) {\n if (item.id) {\n map.set(item.id, item);\n }\n }\n return map;\n};\n\nexport function arrayOnlyValues(arr: Array>): Array {\n return arr.filter((item) => isSome(item)) as Array;\n}\n\n/**\n * Function that returns an array of numbers.\n *\n * @param num size of array, elements are [0, ... , num - 1]\n * @param mappingFunction function to map array elements\n * @returns an array of numbers that could be mapped, or not.\n */\nexport function arrayOf(num: number, mappingFunction?: (x: number) => number): Array {\n return isNone(mappingFunction) ? [...Array(num).keys()] : [...Array(num).keys()].map((i) => mappingFunction(i));\n}\n\nexport function arrayToObjByKey(arr: Array, key: keyof T) {\n return keyBy(arr, key);\n}\n\nexport function reduceSumArr(acc: number | undefined, val: number | undefined) {\n return (acc ?? 0) + (val ?? 0);\n}\n\nexport function groupBy[]>(xs: T, key: string): Record {\n return xs.reduce((prev, current) => {\n (prev[current[key]] = prev[current[key]] || []).push(current);\n return prev;\n }, {});\n}\n\n/**\n * Compares two arrays of strings to determine if they contain the same values,\n * regardless of order.\n *\n * @param arr1 - The first array of strings to compare.\n * @param arr2 - The second array of strings to compare.\n * @returns A boolean indicating whether the two arrays contain the same values.\n */\nexport function stringArrayEqualValues(arr1: Array, arr2: Array): boolean {\n const sortedArr1 = [...arr1].sort();\n const sortedArr2 = [...arr2].sort();\n if (sortedArr1.length !== sortedArr2.length) {\n return false;\n } else {\n return sortedArr1.every((id, index) => id === sortedArr2[index]);\n }\n}\n","import { AcceptedFlight, Flight, FlightState } from '../../Flights/Flight';\nimport { CreateFlightInput } from '../../../API';\nimport { DbSyncerUpDefinition, getStandardSyncerFields } from '../syncHelpers';\n\nlet counter = 0;\n\nexport const flightItemFields = `\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n`.trim();\n\nexport const flightToDb: DbSyncerUpDefinition = (flight: Flight | AcceptedFlight) => {\n const c = ++counter;\n const [commandName, inputType] = !flight._version\n ? ['createFlight', 'CreateFlightInput']\n : ['updateFlight', 'UpdateFlightInput'];\n const input: CreateFlightInput = {\n id: flight.id,\n deleted: flight.deleted,\n createdAt: flight.createdAt.toISOString(),\n aircraftId: flight.aircraftId,\n acceptanceNotes: flight.acceptanceNotes,\n picName: flight.picName,\n picId: flight.picId,\n state: flight.state,\n reservationId: flight.reservationId ? flight.reservationId : flight._version ? null : undefined,\n _version: flight._version,\n };\n\n const { mutationName, inputKey, query } = getStandardSyncerFields(commandName, c, flightItemFields);\n return {\n query,\n input,\n inputKey,\n inputType,\n mutationName,\n remoteToLocalTransform: flightTransform,\n queryName: 'getFlight',\n };\n};\n\nexport const flightTransform = (input: CreateFlightInput): Flight | AcceptedFlight => {\n return {\n id: input.id!,\n deleted: input.deleted,\n createdAt: new Date(input.createdAt!),\n aircraftId: input.aircraftId,\n acceptanceNotes: input.acceptanceNotes,\n picName: input.picName,\n picId: input.picId!,\n editableByUserIds: input.editableByUserIds ? input.editableByUserIds : [],\n state: input.state as FlightState,\n reservationId: input.reservationId || undefined,\n _version: input._version!,\n };\n};\n","import { CreateAircraftInput } from '../../../API';\nimport { DbCreated } from '../types';\nimport { AircraftCountableType, AircraftUpliftableType } from '../../CountableChanges/types';\nimport { Aircraft, AircraftAdditionalTlbData, AircraftTag } from '../../Aircrafts/types';\nimport { parsePerformanceProfileJson } from '../../../Admin/Scheduling/model/PerformanceProfileTypes';\n\nexport const aircraftItemFields = `\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n aircraftTypeId\n tags\n userId\n performanceProfile\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n`.trim();\n\nexport const aircraftFromDb = (input: CreateAircraftInput & DbCreated): Aircraft => {\n return {\n id: input.id,\n registration: input.registration,\n friendlyType: input.friendlyType,\n serialNumber: input.serialNumber,\n imageUrl: input.imageUrl || undefined,\n countableTypes: input.countableTypes ? (input.countableTypes as AircraftCountableType[]) : [],\n upliftableTypes: input.upliftableTypes ? (input.upliftableTypes as AircraftUpliftableType[]) : [],\n tags: input.tags ? (input.tags as AircraftTag[]) : [],\n userId: input.userId || undefined,\n aircraftTypeId: input.aircraftTypeId || null,\n deleted: input.deleted,\n performanceProfile: (input.performanceProfile && parsePerformanceProfileJson(input.performanceProfile)) || null,\n callsign: input.callsign || null,\n additionalTlbData: parseAircraftAdditionalData(input.additionalTlbData),\n _version: input._version,\n };\n};\n\nexport function parseAircraftAdditionalData(input: string | null | undefined): AircraftAdditionalTlbData {\n if (!input) {\n return {};\n }\n try {\n return JSON.parse(input);\n } catch (e) {\n return {};\n }\n}\n\nexport const aircraftToDb = (ac: Aircraft): CreateAircraftInput & DbCreated => {\n return {\n id: ac.id,\n deleted: ac.deleted,\n registration: ac.registration,\n friendlyType: ac.friendlyType,\n serialNumber: ac.serialNumber,\n imageUrl: ac.imageUrl,\n countableTypes: ac.countableTypes,\n upliftableTypes: ac.upliftableTypes,\n tags: ac.tags,\n category: '(not implemented)',\n aircraftTypeId: ac._version ? ac.aircraftTypeId : undefined,\n performanceProfile: ac.performanceProfile\n ? JSON.stringify(ac.performanceProfile)\n : ac._version\n ? null\n : undefined,\n callsign: ac.callsign ? ac.callsign : ac._version ? null : undefined,\n additionalTlbData: Object.keys(ac.additionalTlbData).length ? JSON.stringify(ac.additionalTlbData) : null,\n _version: ac._version || 0,\n _lastChangedAt: ac._lastChangedAt || 0,\n };\n};\n","import { DbSyncerUpDefinition, getStandardSyncerFields } from \"../syncHelpers\";\nimport {\n AIRCRAFT_COUNTABLE_FLIGHT_TIME,\n AIRCRAFT_COUNTABLE_TACH_TIME,\n AircraftCountableType,\n AircraftUpliftableType,\n CountableChange,\n CountableChangeType\n} from \"../../CountableChanges/types\";\nimport { CreateCountableChangeInput } from \"../../../API\";\nimport { DbCreated } from '../types';\n\nlet counter = 0;\n\nexport const countableChangeItemFields = `\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n`.trim();\n\nexport const countableChangeSyncerDefinition: DbSyncerUpDefinition = (countableChange: CountableChange) => {\n const c = ++counter;\n const [commandName, inputType] = !countableChange._version\n ? ['createCountableChange', 'CreateCountableChangeInput']\n : ['updateCountableChange', 'UpdateCountableChangeInput'];\n const input = countableChangeToDb(countableChange);\n const {mutationName, inputKey, query} = getStandardSyncerFields(commandName, c, countableChangeItemFields);\n return {\n query,\n input,\n inputKey,\n inputType,\n mutationName,\n remoteToLocalTransform: countableChangeFromDb,\n getNeedsResync,\n queryName: \"getCountableChange\"\n };\n};\n\nexport const countableChangeToDb = (countableChange: CountableChange): CreateCountableChangeInput => {\n return {\n id: countableChange.id,\n deleted: countableChange.deleted,\n aircraftId: countableChange.aircraftId,\n flightId: countableChange.flightId,\n legId: countableChange.legId,\n createdAt: countableChange.createdAt.toISOString(),\n createdByName: countableChange.createdByName,\n place: countableChange.place,\n type: countableChange.type as any,\n // note: countableChange.note, // todo\n changeTypes: countableChange.changeTypes.length ? countableChange.changeTypes : null,\n changeValues: countableChange.changeValues.length ? countableChange.changeValues : null,\n countableTypes: countableChange.countableTypes,\n countableValuesBefore: countableChange.countableValuesBefore,\n countableValuesAfter: countableChange.countableValuesAfter,\n _version: countableChange._version,\n };\n};\n\nconst migrateTypes = (inputTypes: T[], aircraftId: string): T[] => {\n if (aircraftId !== \"98a19ab5-292c-4d96-8721-56295bdab607\") { // OK-TEST\n return inputTypes;\n }\n return inputTypes.map(type => type === AIRCRAFT_COUNTABLE_TACH_TIME ? AIRCRAFT_COUNTABLE_FLIGHT_TIME : type) as any;\n};\n\nconst getNeedsResync = (remote: CreateCountableChangeInput, local: CountableChange): boolean => {\n if (remote.changeTypes) {\n if (local.changeTypes.length !== remote.changeTypes.length) {\n return true;\n }\n }\n if (remote.countableTypes) {\n if (local.countableTypes.length !== remote.countableTypes.length) {\n return true;\n }\n }\n return false;\n};\n\nexport const countableChangeFromDb = (input: CreateCountableChangeInput & DbCreated): CountableChange => {\n const changeTypes = input.changeTypes ? (input.changeTypes as (AircraftUpliftableType | AircraftCountableType)[]) : [];\n const changeTypesDeduped = Array.from(new Set(changeTypes));\n const countableTypes = input.countableTypes ? input.countableTypes as AircraftCountableType[] : [];\n const countableTypesDeduped = Array.from(new Set(countableTypes));\n const changeValues = input.changeValues ? input.changeValues : [];\n const countableValuesBefore = input.countableValuesBefore;\n const countableValuesAfter = input.countableValuesAfter;\n return {\n id: input.id,\n deleted: input.deleted,\n _version: input._version,\n editableByUserIds: input.editableByUserIds || [],\n aircraftId: input.aircraftId,\n flightId: input.flightId || undefined,\n legId: input.legId || undefined,\n createdAt: new Date(input.createdAt!),\n createdByName: input.createdByName,\n place: input.place || undefined,\n type: input.type as CountableChangeType,\n // note: input.note, // todo\n changeTypes: migrateTypes(changeTypesDeduped, input.aircraftId),\n changeValues: deduplicate(changeTypesDeduped, changeTypes, changeValues),\n countableTypes: migrateTypes(countableTypesDeduped, input.aircraftId),\n countableValuesBefore: deduplicate(countableTypesDeduped, countableTypes, countableValuesBefore),\n countableValuesAfter: deduplicate(countableTypesDeduped, countableTypes, countableValuesAfter),\n };\n};\n\nconst deduplicate = (uniqueTypes: string[], types: string[], values: T): T => {\n return uniqueTypes.map(uniqueType => {\n const index = types.lastIndexOf(uniqueType);\n return values[index];\n }) as T;\n};\n","import { MainMenuActionTypes, mainMenuInitialState, MainMenuReducer, MainMenuState } from './MainMenu/reducer';\nimport { Action } from 'redux';\nimport { tlbUserInitialState, TlbUserReducer, TlbUserState } from './reducers/tlbUserReducer';\nimport { syncInitialState, SyncReducer, SyncState } from './reducers/syncReducer';\nimport { cognitoUserInitialState, CognitoUserReducer, CognitoUserState } from './reducers/cognitoUserReducer';\nimport {\n complianceModeInitialState,\n ComplianceModeReducer,\n ComplianceModeState,\n} from './Admin/Utils/ComplianceMode/ComplianceModeReducer';\nimport {\n supplementalDataSyncInitialState,\n SupplementalDataSyncReducer,\n SupplementalDataSyncState,\n} from './reducers/supplementalDataSyncReducer';\n\nexport type RootState = {\n menu: MainMenuState;\n user: TlbUserState;\n cognitoUser: CognitoUserState;\n sync: SyncState;\n supplementalDataSync: SupplementalDataSyncState;\n complianceMode: ComplianceModeState;\n};\nexport const initialState: RootState = {\n menu: mainMenuInitialState,\n user: tlbUserInitialState,\n cognitoUser: cognitoUserInitialState,\n sync: syncInitialState,\n supplementalDataSync: supplementalDataSyncInitialState,\n complianceMode: complianceModeInitialState,\n};\n\nexport type RootActionTypes = Action | MainMenuActionTypes;\n\nexport const rootReducer = (state: RootState = initialState, action: RootActionTypes): RootState => {\n return {\n menu: MainMenuReducer(state.menu, action),\n user: TlbUserReducer(state.user, action),\n cognitoUser: CognitoUserReducer(state.cognitoUser, action),\n sync: SyncReducer(state.sync, action),\n supplementalDataSync: SupplementalDataSyncReducer(state.supplementalDataSync, action),\n complianceMode: ComplianceModeReducer(state.complianceMode, action),\n };\n};\n","import React, {FunctionComponent} from \"react\";\nimport {Provider} from 'react-redux';\nimport {createStore, Store} from 'redux';\n\nimport {RootActionTypes, rootReducer, RootState} from \"../rootReducer\";\n\nexport const store: Store = createStore(rootReducer);\n\nconst WithStore: FunctionComponent = ({children}) => {\n return (\n \n {children}\n \n );\n};\n\nexport default WithStore;\n","import { Storage } from 'aws-amplify';\nimport { DbSyncerUpDefinition, getStandardSyncerFields } from '../syncHelpers';\nimport { FlightLegPhase } from '../../FlightLegs/FlightLeg';\nimport { CreateFlightDocumentInput } from '../../../API';\nimport * as mime from 'mime';\nimport { getDb } from '../LocalDB';\nimport { logError } from '../../../utils/ErrorLog/ErrorLog';\nimport {\n FlightDocument,\n FlightDocumentType,\n isFlightDocumentSaved,\n LocalFlightDocument,\n SavedFlightDocument,\n} from '../../FlightDocuments/FlightDocument';\nimport { getLocalFlightDocumentContent } from '../../FlightDocuments/LocalDocumentContent';\nimport { DbCreated } from '../types';\nimport { getStandardItemHandler } from '../standardItemHandler';\n\nlet counter = 0;\n\nexport const flightDocumentItemFields = `\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n contentKey\n type\n phase\n title\n mediaFileId\n _version\n`.trim();\n\nasync function uploadDocument(document: LocalFlightDocument): Promise {\n try {\n const content = await getLocalFlightDocumentContent(document.id);\n if (!content) {\n // noinspection ExceptionCaughtLocallyJS\n throw new Error('Cannot find local document content when uploading new document');\n }\n const suffix = mime.getExtension(content.type);\n const filename = document.id + '.' + suffix;\n const expires = new Date();\n expires.setFullYear(expires.getFullYear() + 1);\n const result = (await Storage.put(filename, content, {\n contentType: content.type,\n expires,\n })) as { key: string };\n const newDocument: SavedFlightDocument = {\n ...document,\n contentKey: result.key,\n };\n await getDb().documents.put(newDocument);\n return result.key;\n } catch (e: any) {\n logError(e.message, 'flightDocuments/upload');\n throw e;\n }\n}\n\nexport const flightDocumentToDb: DbSyncerUpDefinition = (document: FlightDocument) => {\n const c = ++counter;\n const [commandName, inputType] = !document._version\n ? ['createFlightDocument', 'CreateFlightDocumentInput']\n : ['updateFlightDocument', 'UpdateFlightDocumentInput'];\n const input = async (): Promise => {\n const contentKey = isFlightDocumentSaved(document) ? document.contentKey : await uploadDocument(document);\n // noinspection UnnecessaryLocalVariableJS\n const input: CreateFlightDocumentInput = {\n id: document.id,\n deleted: document.deleted,\n createdAt: document.createdAt.toISOString(),\n aircraftId: document.aircraftId,\n flightId: document.flightId,\n legId: document.legId,\n squawkId: document.squawkId,\n deferralId: document.deferralId,\n releaseToServiceId: document.releaseToServiceId,\n maintenanceRecordId: document.maintenanceRecordId,\n contentKey,\n type: document.type,\n phase: document.phase,\n title: document.title,\n _version: document._version,\n mediaFileId: document.mediaFileId ?? 'x',\n };\n return input;\n };\n\n const { mutationName, inputKey, query } = getStandardSyncerFields(commandName, c, flightDocumentItemFields);\n const remoteToLocalTransform = flightDocumentTransform;\n return { query, input, inputKey, inputType, mutationName, remoteToLocalTransform, queryName: 'getFlightDocument' };\n};\n\nexport const flightDocumentTransform = (input: CreateFlightDocumentInput): SavedFlightDocument => {\n return {\n id: input.id!,\n aircraftId: input.aircraftId,\n createdAt: new Date(input.createdAt!),\n flightId: input.flightId || undefined,\n legId: input.legId || undefined,\n squawkId: input.squawkId || undefined,\n deferralId: input.deferralId || undefined,\n releaseToServiceId: input.releaseToServiceId || undefined,\n maintenanceRecordId: input.maintenanceRecordId || undefined,\n contentKey: input.contentKey,\n type: input.type as FlightDocumentType,\n phase: input.phase as FlightLegPhase,\n deleted: input.deleted,\n title: input.title,\n _version: input._version!,\n editableByUserIds: input.editableByUserIds || [],\n mediaFileId: input.mediaFileId || undefined,\n };\n};\n\nexport const flightDocumentItemHandler = async (items: (CreateFlightDocumentInput & DbCreated)[]): Promise => {\n const db = getDb();\n const standardHanlingPromise = getStandardItemHandler(db.documents, flightDocumentTransform)(items);\n const toDelete = items.filter((i) => i.deleted);\n const deletePromise = db.localDocumentContents.bulkDelete(toDelete.map((i) => i.id!));\n await Promise.all([standardHanlingPromise, deletePromise]);\n};\n","import { Auth } from 'aws-amplify';\n\nconst LOCAL_STORAGE_KEY = 'alol_backend_off';\n\nexport enum AppEnvironment {\n TLB= \"tlb\",\n OPS= 'ops',\n}\n\nlet stringIsEnvironment = function (value: string): value is AppEnvironment {\n return value === AppEnvironment.OPS || value === AppEnvironment.TLB;\n};\nexport const getPreferredEnvironment = (): AppEnvironment | undefined => {\n const value = window.localStorage.getItem(LOCAL_STORAGE_KEY);\n if(value && stringIsEnvironment(value)) {\n return value;\n }\n return undefined;\n};\n\nexport const setPreferredEnvironment = (value: AppEnvironment | undefined) => {\n if (value) {\n window.localStorage.setItem(LOCAL_STORAGE_KEY, value);\n } else {\n window.localStorage.removeItem(LOCAL_STORAGE_KEY);\n }\n};\n\nexport const signOut = () => {\n setPreferredEnvironment(undefined);\n Auth.signOut();\n}\n","import React, { FunctionComponent, ReactNode, Suspense } from 'react';\nimport BEM from '../utils/BEM';\nimport './LoadingScreenOverlay.sass';\n\nconst classes = BEM('loading-screen-overlay');\n\nconst LoadingScreenOverlay: FunctionComponent = () => {\n return (\n
\n
\n
\n
\n \n
\n
Loading...
\n
\n
\n
\n );\n};\n\ntype LoadingSuspenseProps = {\n fallback?: NonNullable;\n};\nexport const LoadingSuspense: FunctionComponent = ({ children, fallback }) => {\n return }>{children};\n};\n\nexport const LoadingScreenSvg: FunctionComponent = () => {\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n );\n};\n\nexport default LoadingScreenOverlay;\n","import { Link, LinkProps, navigate } from '@reach/router';\nimport React from \"react\";\n\nexport const ADMIN_LINK_PREFIX = '/ops';\n\nexport const navigateA = (link: string) => {\n return navigate(ADMIN_LINK_PREFIX + link);\n}\n\n\nexport function LinkA(props: React.PropsWithoutRef> & React.RefAttributes) {\n const {to, ...otherProps} = props;\n const toA = ADMIN_LINK_PREFIX + to;\n return (\n \n )\n}\n","import { Currency } from 'utils/currency';\nimport { isNone, safeNumberOrString } from '../../../utils';\nimport { ManagementFees, PricingProfile, LeaseCharges } from './AircraftPricing';\n\nexport type PerformanceProfile = {\n weight_emptyMass_lbs?: number;\n weight_cgArm_lbs?: number;\n weight_maxZeroFuelMass_lbs?: number;\n weight_maxTakeOffMass_lbs?: number;\n weight_maxLandingMass_lbs?: number;\n weight_crewWeight_lbs?: number;\n weight_standardMale_lbs?: number;\n weight_standardFemale_lbs?: number;\n weight_standardChild_lbs?: number;\n weight_cateringEquipment_lbs?: number;\n weight_maximumPassengers_count?: number;\n weight_minimumCrew_count?: number;\n weight_maximumCargo_lbs?: number;\n weight_unit?: 'kgs' | 'lbs';\n //\n fuel_type?: 'jet' | 'avgas';\n fuel_unit?: 'kgs' | 'lbs' | 'liters' | 'usg';\n fuel_maximumFuel_unit?: number;\n fuel_taxiFuel_lbs?: number;\n fuel_consumption1stHour_unit?: number;\n fuel_consumption2ndHourPlus_unit?: number;\n fuel_standardFuelReserve_unit?: number;\n //\n perf_climbSpeed_ktas?: number;\n perf_climbTime_minutes?: number;\n perf_cruiseSpeed_ktas?: number;\n perf_landingTime_minutes?: number;\n perf_flightTimeReserve_percent?: number;\n perf_cruiseLevel_ft?: number;\n //\n runway_type?: 'paved' | 'pavedPlusGrass';\n runway_nonCommercialMinimum_meters?: number;\n runway_commercialMinimum_meters?: number;\n // \n takeoff_rvr_limit?: number;\n takeoff_alternate_distance?: number;\n //\n pricing_hourlyRate?: number;\n pricing_hourlyRateCurrency?: Currency;\n pricing_minimumHoursPerDay?: number;\n pricing_minimumHoursPerDayCurrency?: Currency;\n pricing_airplaneWaitPerDay?: number;\n pricing_airplaneWaitPerDayCurrency?: Currency;\n pricing_landingFeePerLeg?: number;\n pricing_landingFeePerLegCurrency?: Currency;\n pricing_approachFeePerLeg?: number;\n pricing_approachFeePerLegCurrency?: Currency;\n pricing_crewFlyingDayPerDay?: number;\n pricing_crewFlyingDayPerDayCurrency?: Currency;\n pricing_crewNonFlyingDayPerDay?: number;\n pricing_crewNonFlyingDayPerDayCurrency?: Currency;\n pricing_crewOvernightPerNight?: number;\n pricing_crewOvernightPerNightCurrency?: Currency;\n pricing_paxFeePerPaxPerLeg?: number;\n pricing_paxFeePerPaxPerLegCurrency?: Currency;\n pricing_ferryRate?: number;\n pricing_ferryRateCurrency?: Currency;\n pricing_dryHourCost?: number;\n pricing_dryHourCostCurrency?: Currency;\n pricing_ferryHourDryCost?: number;\n pricing_ferryHourDryCostCurrency?: Currency;\n pricing_eurocontrol?: number;\n pricing_eurocontrolCurrency?: Currency;\n pricing_copilotFlyingDay?: number;\n pricing_copilotFlyingDayCurrency?: Currency;\n pricing_copilotNonflyingDay?: number;\n pricing_copilotNonflyingDayCurrency?: Currency;\n pricing_copilotPerHour?: number;\n pricing_copilotPerHourCurrency?: Currency;\n pricing_commanderPerHour?: number;\n pricing_commanderPerHourCurrency?: Currency;\n //\n crewProfile?: 'perhour' | 'perday' | 'dayandhour';\n //\n ownerApproval?: 'yes' | 'no';\n exportEmptyLegs?: 'yes' | 'no';\n dispatchGroup?: '1' | '2';\n\n pricing?: PricingProfile;\n managementFees?: ManagementFees;\n leaseCharges?: LeaseCharges;\n ownerId?: string;\n customerAccountId?: string;\n};\n\n// Which keys handle as a string. All others will be a number.\nexport const PERF_PROFILE_STRING_KEYS: Array = [\n 'fuel_type',\n 'fuel_unit',\n 'runway_type',\n 'ownerApproval',\n 'weight_unit',\n];\n\nexport function parsePerformanceProfileJson(profile: string | null | undefined): PerformanceProfile | undefined {\n if (isNone(profile)) {\n return undefined;\n }\n try {\n return JSON.parse(profile, (key, value: string) => {\n const castedKey = key as keyof PerformanceProfile;\n if (PERF_PROFILE_STRING_KEYS.includes(castedKey)) {\n return value;\n } else {\n return safeNumberOrString(value);\n }\n });\n } catch (e) {\n return undefined;\n }\n}\n","import { getDb } from '../LocalDB/LocalDB';\nimport { ContactInput } from '../../APIExtensions';\nimport { CreateContactInput } from '../../API';\n\nexport const getCrewableContact = async (\n userId: string\n): Promise<(ContactInput & { crewId: string; name: string; hasDutyTracking: boolean }) | null> => {\n const contacts = await getDb().contacts.where({ userId }).toArray();\n const crewableContacts = contacts.filter(getContactIsCrewable) as (ContactInput & {\n crewId: string;\n name: string;\n })[];\n if (crewableContacts[0]) {\n return {\n crewId: crewableContacts[0].crewId,\n name: crewableContacts[0].name,\n hasDutyTracking: crewableContacts[0].hasDutyTracking || false,\n deleted: false,\n id: crewableContacts[0].id,\n aircraftVisiblityLimitations: crewableContacts[0].aircraftVisiblityLimitations,\n fullReadAccessToAircrafts: crewableContacts[0].fullReadAccessToAircrafts,\n accessRights: crewableContacts[0].accessRights,\n };\n } else {\n return null;\n }\n};\n\nexport const getContactById = async (id: string): Promise<(ContactInput & { crewId: string }) | null> => {\n const contact = await getDb().contacts.get(id);\n if (!contact) {\n return null;\n }\n return contact as ContactInput & { crewId: string };\n};\n\nexport const getContactByCrewId = async (crewId: string): Promise<(ContactInput & { crewId: string }) | null> => {\n const contacts = await getDb().contacts.where({ crewId }).toArray();\n if (contacts.length) {\n return contacts[0] as ContactInput & { crewId: string };\n } else {\n return null;\n }\n};\n\nexport const getCrewableContacts = async (): Promise => {\n return getDb().contacts.toArray();\n};\n\nexport type WithCrewableUserFields = {\n crewId: string;\n name: string;\n hasDutyTracking: boolean;\n};\n\nexport const getContactIsCrewable = (input: T): input is T & WithCrewableUserFields => {\n return Boolean(input.crewId && input.name);\n};\n","import { FlightLegPhase } from '../FlightLegs/FlightLeg';\nimport { getDb } from '../LocalDB/LocalDB';\nimport { getDbSyncer } from '../LocalDB/DbSyncer';\nimport { toMap } from '../../utils/arrayUtils';\nimport { FlightDocument } from './FlightDocument';\n\nexport const saveFlightDocuments = async (documents: FlightDocument[]): Promise => {\n await injectDocumentRemoteData(documents);\n const documentsTable = getDb().documents;\n await documentsTable.bulkPut(documents);\n getDbSyncer().markToSync(documentsTable, ...documents.map(d => d.id));\n};\n/**\n * Makes sure that if document was saved on the background, it will not have to be reuploaded again\n * @param documents\n */\nconst injectDocumentRemoteData = async (documents: FlightDocument[]) => {\n const ids = documents.map(d => d.id);\n const existingDoc = (await getDb().documents.bulkGet(ids)).filter(Boolean);\n const existingDocsById = toMap(existingDoc);\n documents.forEach(doc => {\n const existing = existingDocsById.get(doc.id);\n if (existing) {\n doc._version = existing._version;\n doc.contentKey = existing.contentKey;\n }\n });\n};\n\nexport const getFlightDocumentsForLeg = async (legId: string, phase: FlightLegPhase): Promise => {\n const allDocuments = await getDb().documents\n .where({legId, phase})\n .toArray();\n\n return allDocuments.filter(doc => !doc.squawkId);\n};\n\nexport const getFlightDocumentsForFlight = async (flightId: string): Promise => {\n return getDb().documents.where({flightId}).toArray();\n};\n\nexport const getFlightDocumentsForFlightCount = async (flightId: string): Promise => {\n return getDb().documents.where({flightId}).count();\n};\n\nexport const getFlightDocumentsForSquawk = async (squawkId: string): Promise => {\n return getDb().documents.where({squawkId}).toArray();\n};\n\nexport const getFlightDocumentsForRelease = async (releaseToServiceId: string): Promise => {\n const docs = await getDb().documents.where({releaseToServiceId}).toArray();\n return loadFlightDocumentsWithSameMxRecord(docs);\n};\n\nasync function loadFlightDocumentsWithSameMxRecord(documents: FlightDocument[]): Promise {\n const docsById = toMap(documents);\n const maintenanceRecordIds = documents.map(doc => doc.maintenanceRecordId).filter(Boolean);\n const uniqueMXRIds = Array.from(new Set(maintenanceRecordIds));\n if(uniqueMXRIds.length) {\n await Promise.all(uniqueMXRIds.map(async (maintenanceRecordId) => {\n const docsForRelease = await getDb().documents.where({maintenanceRecordId}).toArray();\n toMap(docsForRelease, docsById);\n }))\n }\n return Array.from(docsById.values());\n}\n","export const sanitizeId = (id: string) => id.replace(/[^-0-9a-f]/g, '');\nexport const sanitizeString = (id: string) => id.replace(/[^-0-9a-zA-Z]/g, '');\n","import { DbSyncerUpDefinition, getStandardSyncerFields } from \"../syncHelpers\";\nimport { Squawk } from \"../../Squawks/types\";\nimport { CreateSquawkInput } from \"../../../API\";\n\nlet counter = 0;\n\nexport const squawkItemFields = `\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n title\n description\n companyDescription\n airworthinessAffected\n deferralDate\n deferralText\n releaseDate\n releaseAircraftFlightTime\n releaseName\n releaseLicenseNumber\n releaseText\n releaseSignature\n reviewedDate\n reviewedName\n reviewedId\n _version\n`.trim();\n\n\nexport const squawkSyncerDefinition: DbSyncerUpDefinition = (squawk: Squawk) => {\n const c = ++counter;\n const [commandName, inputType] = !squawk._version\n ? ['createSquawk', 'CreateSquawkInput']\n : ['updateSquawk', 'UpdateSquawkInput'];\n\n const input = squawkToDb(squawk);\n const {mutationName, inputKey, query} = getStandardSyncerFields(commandName, c, squawkItemFields);\n return {\n query,\n input,\n inputKey,\n inputType,\n mutationName,\n remoteToLocalTransform: squawkFromDb,\n queryName: 'getSquawk'\n }\n};\n\nexport const squawkToDb = (squawk: Squawk): CreateSquawkInput => {\n return {\n id: squawk.id,\n deleted: squawk.deleted,\n aircraftId: squawk.aircraftId,\n flightId: squawk.flightId,\n legId: squawk.legId,\n createdAt: squawk.createdAt.toISOString(),\n createdByName: squawk.createdByName,\n description: squawk.description,\n airworthinessAffected: squawk.airworthinessAffected,\n reviewedDate: squawk.reviewedDate,\n reviewedName: squawk.reviewedName,\n reviewedId: squawk.reviewedId,\n releaseDate: squawk.releaseDate ? squawk.releaseDate.toISOString() : null,\n releaseAircraftFlightTime: squawk.releaseAircraftFlightTime,\n releaseName: squawk.releaseName,\n releaseLicenseNumber: squawk.releaseLicenseNumber,\n releaseText: squawk.releaseText,\n releaseSignature: squawk.releaseSignature ? JSON.stringify(squawk.releaseSignature) : null,\n _version: squawk._version,\n };\n}\n\n\nexport const squawkFromDb = (input: CreateSquawkInput): Squawk => {\n return {\n id: input.id!,\n deleted: input.deleted,\n _version: input._version!,\n aircraftId: input.aircraftId,\n flightId: input.flightId || undefined,\n legId: input.legId || undefined,\n createdAt: new Date(input.createdAt!),\n createdByName: input.createdByName,\n description: input.description,\n airworthinessAffected: input.airworthinessAffected,\n reviewedDate: input.reviewedDate || null,\n reviewedName: input.reviewedName || null,\n reviewedId: input.reviewedId || null,\n editableByUserIds: input.editableByUserIds || [],\n releaseDate: input.releaseDate ? new Date(input.releaseDate) : null,\n releaseAircraftFlightTime: input.releaseAircraftFlightTime || null,\n releaseName: input.releaseName || null,\n releaseLicenseNumber: input.releaseLicenseNumber || null,\n releaseText: input.releaseText || null,\n releaseSignature: input.releaseSignature ? JSON.parse(input.releaseSignature) : null,\n }\n};\n\n","import { CreateSquawkDeferralInput } from \"../../../API\";\nimport { SquawkDeferral, SquawkDeferralActionRequired } from \"../../Squawks/types\";\nimport { DbSyncerUpDefinition, getStandardSyncerFields } from \"../syncHelpers\";\n\nexport const squawkDeferralItemFields = `\n id\n deleted\n editableByUserIds\n squawkId\n createdAt\n createdByName\n createdByLicenseNumber\n createdBySignature\n text\n deferredUntil\n melType\n actionsRequired\n actionPerformedText\n _version\n`;\n\n\nlet counter = 0;\n\nexport const squawkDeferralToDb: DbSyncerUpDefinition = (squawkDeferral: SquawkDeferral) => {\n const c = ++counter;\n const [commandName, inputType] = !squawkDeferral._version\n ? ['createSquawkDeferral', 'CreateSquawkDeferralInput']\n : ['updateSquawkDeferral', 'UpdateSquawkDeferralInput'];\n const input: CreateSquawkDeferralInput = {\n id: squawkDeferral.id,\n deleted: squawkDeferral.deleted,\n squawkId: squawkDeferral.squawkId,\n createdAt: squawkDeferral.createdAt.toISOString(),\n createdByName: squawkDeferral.createdByName,\n createdByLicenseNumber: squawkDeferral.createdByLicenseNumber,\n createdBySignature: squawkDeferral.createdBySignature ? JSON.stringify(squawkDeferral.createdBySignature) : null,\n text: squawkDeferral.text,\n deferredUntil: squawkDeferral.deferredUntil.toISOString(),\n melType: squawkDeferral.melType,\n actionsRequired: squawkDeferral.actionsRequired.length ? squawkDeferral.actionsRequired : null,\n actionPerformedText: squawkDeferral.actionPerformedText,\n _version: squawkDeferral._version\n };\n const {mutationName, inputKey, query} = getStandardSyncerFields(commandName, c, squawkDeferralItemFields);\n return {\n query,\n input,\n inputKey,\n inputType,\n mutationName,\n remoteToLocalTransform: squawkDeferralFromDb,\n queryName: 'getSquawkDeferral'\n }\n};\n\nexport const squawkDeferralFromDb = (input: CreateSquawkDeferralInput): SquawkDeferral => {\n return {\n id: input.id!,\n editableByUserIds: input.editableByUserIds || [],\n createdAt: new Date(input.createdAt!),\n createdByName: input.createdByName || null,\n createdByLicenseNumber: input.createdByLicenseNumber || null,\n createdBySignature: input.createdBySignature ? JSON.parse(input.createdBySignature) : null,\n text: input.text || null,\n deleted: input.deleted,\n melType: input.melType || null,\n actionsRequired: input.actionsRequired ? (input.actionsRequired as SquawkDeferralActionRequired[]) : [],\n actionPerformedText: input.actionPerformedText || null,\n squawkId: input.squawkId,\n _version: input._version!,\n deferredUntil: new Date(input.deferredUntil),\n }\n};\n","import { CreateReleaseToServiceInput } from '../../../API';\nimport { DbSyncerUpDefinition, getStandardSyncerFields } from '../syncHelpers';\nimport { ReleaseToService, ReleaseToServiceType } from '../../ReleaseToService/types';\nimport { WithId } from '../types';\n\nexport const releaseToServiceItemFields = `\n id\n deleted\n editableByUserIds\n aircraftId\n squawkId\n deferralId\n maintenanceRecordId\n createdAt\n releaseType\n releasedByName\n releasedByLicenseNumber\n releasedBySignature\n releasedByOrganization\n text\n aircraftFlightTime\n _version\n`;\n\n\nlet counter = 0;\n\nexport const releaseToServiceSyncerDefinition: DbSyncerUpDefinition = (releaseToService: ReleaseToService) => {\n const c = ++counter;\n const [commandName, inputType] = !releaseToService._version\n ? ['createReleaseToService', 'CreateReleaseToServiceInput']\n : ['updateReleaseToService', 'UpdateReleaseToServiceInput'];\n const input: CreateReleaseToServiceInput = releaseToServiceToDb(releaseToService);\n const {mutationName, inputKey, query} = getStandardSyncerFields(commandName, c, releaseToServiceItemFields);\n return {\n query,\n input,\n inputKey,\n inputType,\n mutationName,\n remoteToLocalTransform: releaseToServiceFromDb,\n queryName: 'getReleaseToService'\n };\n};\n\nexport function releaseToServiceToDb(releaseToService: ReleaseToService): CreateReleaseToServiceInput & WithId {\n return {\n id: releaseToService.id,\n deleted: releaseToService.deleted,\n aircraftId: releaseToService.aircraftId,\n squawkId: releaseToService.squawkId,\n deferralId: releaseToService.deferralId || undefined,\n createdAt: releaseToService.createdAt.toISOString(),\n releaseType: releaseToService.releaseType,\n releasedByName: releaseToService.releasedByName,\n releasedByLicenseNumber: releaseToService.releasedByLicenseNumber,\n releasedByOrganization: releaseToService.releasedByOrganization,\n releasedBySignature: JSON.stringify(releaseToService.releasedBySignature),\n text: releaseToService.text,\n aircraftFlightTime: releaseToService.aircraftFlightTime,\n _version: releaseToService._version,\n };\n}\n\nexport const releaseToServiceFromDb = (input: CreateReleaseToServiceInput): ReleaseToService => {\n return {\n id: input.id!,\n aircraftId: input.aircraftId,\n squawkId: input.squawkId || null,\n deferralId: input.deferralId || null,\n maintenanceRecordId: input.maintenanceRecordId || null,\n createdAt: new Date(input.createdAt!),\n releaseType: input.releaseType as ReleaseToServiceType,\n releasedByName: input.releasedByName || null,\n releasedByLicenseNumber: input.releasedByLicenseNumber || null,\n releasedBySignature: input.releasedBySignature ? JSON.parse(input.releasedBySignature) : null,\n releasedByOrganization: input.releasedByOrganization || null,\n text: input.text || null,\n aircraftFlightTime: input.aircraftFlightTime,\n _version: input._version!,\n deleted: input.deleted,\n }\n};\n","import { CreateAircraftMaintenanceLimitExtensionInput } from '../../API';\nimport { WithId } from '../../Datasource/LocalDB/types';\nimport * as uuid from 'uuid';\nimport { AircraftMaintenanceLimit } from '../AircraftMaintenanceLimits/AircraftMaintenanceLimit';\n\nexport type AircraftMaintenanceLimitExtension = Omit<\n CreateAircraftMaintenanceLimitExtensionInput & WithId,\n 'validUntilDate' | 'createdAt'\n> & {\n createdAt: Date;\n validUntilDate: Date | null;\n};\n\nexport function aircraftMaintenanceLimitExtensionFromDb(\n input: CreateAircraftMaintenanceLimitExtensionInput & WithId\n): AircraftMaintenanceLimitExtension {\n return {\n ...input,\n createdAt: new Date(input.createdAt!),\n validUntilDate: input.validUntilDate ? new Date(input.validUntilDate) : null,\n };\n}\n\nexport function aircraftMaintenanceLimitExtensionToDb(\n record: AircraftMaintenanceLimitExtension\n): CreateAircraftMaintenanceLimitExtensionInput & WithId {\n return {\n ...record,\n createdAt: record.createdAt.toISOString(),\n validUntilDate: record.validUntilDate ? record.validUntilDate.toISOString() : null,\n };\n}\n\nexport function createEmptyMaintenanceLimitExtension(\n maintenance: AircraftMaintenanceLimit,\n userId: string\n): AircraftMaintenanceLimitExtension {\n return {\n id: uuid.v4(),\n deleted: false,\n createdAt: new Date(),\n maintenanceLimitId: maintenance.id,\n maintenanceLimitVersion: maintenance._version!,\n maintenanceRecordId: null,\n createdByUserId: userId,\n extendedByName: '',\n validUntilDate: null,\n validUntilCountableValues: null,\n };\n}\n","import { ContactUser, User } from './User';\nimport { getDb } from '../LocalDB/LocalDB';\nimport { getCrewableContact, WithCrewableUserFields } from '../Contacts/ContactsDatasource';\nimport { getAircraftForUserId } from '../Aircrafts/AircraftsDatasource';\nimport { CreateContactInput } from '../../API';\nimport { WithId } from '../LocalDB/types';\nimport { AccessRights } from '../../Datasource/Contacts/AccessRights';\n\nexport const getUser = async (userId: string): Promise => {\n const maybeContact = await getCrewableContact(userId);\n if (maybeContact) {\n return getUserFromContact(maybeContact, userId);\n }\n const maybeAircraft = await getAircraftForUserId(userId);\n if (maybeAircraft) {\n return {\n name: maybeAircraft.registration,\n userId,\n aircraftId: maybeAircraft.id,\n };\n }\n return null;\n};\n\nexport const getUserIdForAircraft = async (aircraftId: string): Promise => {\n const maybeAircraft = await getDb().aircrafts.get(aircraftId);\n if (maybeAircraft && maybeAircraft.userId) {\n return maybeAircraft.userId;\n }\n return undefined;\n};\n\nexport const getUserFromContact = (\n maybeContact: CreateContactInput & WithId & WithCrewableUserFields,\n userId: string\n): ContactUser => {\n let aircraftVisiblityLimitations = null;\n if (maybeContact.aircraftVisiblityLimitations) {\n try {\n aircraftVisiblityLimitations = JSON.parse(maybeContact.aircraftVisiblityLimitations);\n } catch (e) {\n console.error('Error parsing contact AC visibility limitations');\n console.error(e);\n }\n }\n\n const parsedLimitations = maybeContact.accessRights\n ? (JSON.parse(maybeContact.accessRights) as AccessRights)\n : undefined;\n\n let aircraftLimitations = maybeContact.fullReadAccessToAircrafts ?? parsedLimitations?.fullAccessAircratIds;\n\n aircraftLimitations = aircraftLimitations?.length === 0 ? undefined : aircraftLimitations;\n\n return {\n name: maybeContact.name,\n contactId: maybeContact.id,\n userId: userId,\n crewId: maybeContact.crewId,\n hasDutyTracking: Boolean(maybeContact.hasDutyTracking),\n aircraftVisiblityLimitations,\n fullReadAccessToAircrafts: aircraftLimitations || null,\n baseAirportIcaos: maybeContact.baseAirportIcaos || [],\n hasAccessToCustomerDatabase: parsedLimitations?.hasAccessToCustomerDatabase ?? true,\n };\n};\n","import React, { FunctionComponent } from \"react\";\nimport GenericField, { GenericFieldProps } from \"./GenericField\";\n\nexport interface InputTextFieldProps extends Omit {\n type?: string;\n name?: string\n}\n\nconst InputTextField: FunctionComponent = (props) => {\n return }\n controlModifiers={{'input': true, 'input-text': true, ...props.controlModifiers}}\n />\n};\n\nexport default InputTextField;\n","export type Resource = {\n read: () => T;\n readMaxQuality: () => T;\n refresh: () => void;\n loadMore: () => Promise; // true if next data is still available (\"load more\" button shouldn't be disabled\n promise: Promise;\n sourceQualityIndex: number;\n maxQualityIndex: number;\n refreshId: number;\n getStatus: () => PromiseStatus;\n getCreationTime: () => number;\n getResolveTime: () => number | null;\n}\ntype PromiseStatus = \"pending\" | \"success\" | \"refreshing\" | \"error\";\n\nexport const wrapPromise = (promise: Promise,\n refreshRequested: () => void,\n onLoadMoreRequested: () => Promise,\n sourceQualityIndex: number,\n maxQualityIndex: number,\n refreshId: number): Resource => {\n let status: PromiseStatus = \"pending\";\n let result: T | any;\n let creationTime = Date.now();\n let resolveTime: number | null = null;\n\n let suspender = promise.then(\n r => {\n status = \"success\";\n result = r;\n resolveTime = Date.now();\n },\n e => {\n status = \"error\";\n result = e;\n resolveTime = Date.now();\n }\n );\n\n return {\n read(): T {\n if (status === \"pending\") {\n throw suspender;\n } else if (status === \"error\") {\n throw (result);\n } else if (status === \"success\" || status === \"refreshing\") {\n return (result as T);\n }\n throw new Error(\"Unspecified status\");\n },\n readMaxQuality(): T {\n if (sourceQualityIndex === maxQualityIndex) {\n return this.read();\n } else {\n throw suspender;\n }\n },\n refresh: () => {\n if (status === 'success') {\n status = 'refreshing';\n return refreshRequested()\n }\n },\n loadMore: onLoadMoreRequested,\n promise,\n sourceQualityIndex,\n maxQualityIndex,\n refreshId,\n getStatus: () => status,\n getCreationTime: () => creationTime,\n getResolveTime: () => resolveTime,\n };\n};\n\nexport const wrapVariable = (input: T): Resource => {\n const read = () => input;\n const now = Date.now();\n return {\n read,\n readMaxQuality: read,\n refresh: () => null,\n loadMore: async () => false,\n promise: Promise.resolve(input),\n sourceQualityIndex: 99,\n maxQualityIndex: 99,\n refreshId: 0,\n getStatus: () => 'success',\n getCreationTime: () => now,\n getResolveTime: () => now,\n }\n};\n\nexport const loadMoreNotSupported = (): Promise => {\n throw new Error('Load more not supported on this method');\n}\n","import {\n COUNTABLE_CHANGE_CONSUMPTION,\n COUNTABLE_CHANGE_CORRECTION,\n COUNTABLE_CHANGE_UPLIFT,\n CountableChange,\n} from './types';\nimport { getDb } from '../LocalDB/LocalDB';\nimport { FlightLeg, isLegFinished } from '../FlightLegs/FlightLeg';\nimport { getAircraft } from '../Aircrafts/AircraftsDatasource';\nimport { getInitialCountableChange } from './CountableChange';\nimport { getDbSyncer } from '../LocalDB/DbSyncer';\nimport { toMap } from '../../utils/arrayUtils';\n\nexport const getCountableChange = async (id: string): Promise => {\n return (await getDb().countableChanges.get(id)) || null;\n};\n\nexport const getCountableChanges = async (ids: string[]): Promise<(CountableChange | undefined)[]> => {\n return getDb().countableChanges.bulkGet(ids);\n};\n\nexport const getCountableChangesForLeg = async (legId: string): Promise => {\n return await getDb().countableChanges.where({ legId }).toArray();\n};\n\nexport const getLastCountableChangeForLeg = async (leg: FlightLeg): Promise => {\n const maybeCountableChange = isLegFinished(leg)\n ? await getCountableChange(leg.consumptionCountableChangeId)\n : await getCountableChange(leg.upliftCountableChangeId);\n if (maybeCountableChange) {\n return maybeCountableChange;\n }\n const aircraft = await getAircraft(leg.aircraftId);\n if (!aircraft) {\n throw new Error('Trying to get last countable change for non-existing aircraft');\n }\n return getInitialCountableChange(aircraft, leg.editableByUserIds);\n};\n\nexport const getLastCountableChangeForAircraft = async (aircraftId: string): Promise => {\n const db = getDb();\n const [changes, legs, flights] = await Promise.all([\n db.countableChanges.where({ aircraftId }).toArray(),\n db.legs.where({ aircraftId }).toArray(),\n db.flights.where({ aircraftId }).toArray(),\n ]);\n const legsMap = toMap(legs);\n const flightsMap = toMap(flights);\n const combined = changes.map((countableChange) => {\n const leg = countableChange.legId ? legsMap.get(countableChange.legId) : undefined;\n const flight = countableChange.flightId ? flightsMap.get(countableChange.flightId) : undefined;\n return { countableChange, leg, flight };\n });\n const valid = combined.filter((a) => {\n return !a.countableChange.deleted && (!a.leg || !a.leg.deleted) && (!a.flight || !a.flight.deleted);\n });\n valid.sort((a, b) => {\n const refA = a.leg ? a.leg.timeOut : a.countableChange.createdAt;\n const refB = b.leg ? b.leg.timeOut : b.countableChange.createdAt;\n const diff = refB.getTime() - refA.getTime();\n if (diff) {\n return diff;\n }\n const typeIndexA = countableChangeTypeSuccession.indexOf(a.countableChange.type);\n const typeIndexB = countableChangeTypeSuccession.indexOf(b.countableChange.type);\n return typeIndexB - typeIndexA;\n });\n if (valid.length) {\n return valid[0].countableChange;\n } else {\n const aircraft = await getAircraft(aircraftId);\n if (!aircraft) {\n throw new Error('Trying to get last countable change for non-existing aircraft');\n }\n return getInitialCountableChange(aircraft);\n }\n};\n\nexport const putCountableChange = async (countableChange: CountableChange): Promise => {\n let db = getDb();\n await db.countableChanges.put(countableChange);\n getDbSyncer().markToSync(db.countableChanges, countableChange.id);\n};\n\nconst countableChangeTypeSuccession = [\n COUNTABLE_CHANGE_CORRECTION,\n COUNTABLE_CHANGE_UPLIFT,\n COUNTABLE_CHANGE_CONSUMPTION,\n];\n","export const aircraftMaintenanceLimitExtensionItemFields = `id\ndeleted\ncreatedAt\nmaintenanceLimitId\nmaintenanceLimitVersion\nmaintenanceRecordId\ncreatedByUserId\nextendedByName\nvalidUntilDate\nvalidUntilCountableValues\n_version\n_deleted\n_lastChangedAt\nupdatedAt`;\n","import { FLIGHT_LEG_PHASE_FINISH, FlightLeg, FlightLegPhase, WithLastCountableChange } from './FlightLeg';\nimport { getDb } from '../LocalDB/LocalDB';\nimport { Squawk, SquawkDeferral } from '../Squawks/types';\nimport { getSquawkDeferralsForSquawk, getSquawksForLeg } from '../Squawks/SquawksDatasource';\nimport { COUNTABLE_CHANGE_UPLIFT, CountableChange } from '../CountableChanges/types';\nimport { getCountableChangesForLeg, getLastCountableChangeForLeg } from '../CountableChanges/CountableChangeDatasource';\nimport { getFlightDocumentsForLeg } from '../FlightDocuments/FlightDocumentsDatasource';\nimport { getDbSyncer } from '../LocalDB/DbSyncer';\nimport { getAircraft } from '../Aircrafts/AircraftsDatasource';\nimport { CreateLegInput } from '../../API';\nimport { flightLegFromDb, flightLegItemFields } from '../LocalDB/Transformers/flightLegs';\nimport { API, graphqlOperation } from 'aws-amplify';\nimport { sanitizeId } from '../datasourceUtils';\nimport { FlightDocument } from '../FlightDocuments/FlightDocument';\n\nimport { Aircraft } from '../Aircrafts/types';\n\nexport const saveFlightLeg = async (\n leg: FlightLeg,\n phase: FlightLegPhase,\n countableChange: CountableChange,\n documents: FlightDocument[],\n squawks?: Squawk[],\n squawkDeferrals?: SquawkDeferral[]\n): Promise => {\n const db = getDb();\n await db.transaction(\n 'rw',\n [db.legs, db.countableChanges, db.documents, db.squawks, db.squawkDeferrals, db.syncItems],\n async () => {\n const [existingDocuments, existingSquawks, existingCountableChanges] = await Promise.all([\n getFlightDocumentsForLeg(leg.id, phase),\n getSquawksForLeg(leg.id),\n getCountableChangesForLeg(leg.id),\n ]);\n\n const documentIntersection = intersectItems(existingDocuments, documents);\n // documents can not be updated, so no need to PUT them\n const promises: Promise[] = [];\n const onlyLocalDocumentIds: string[] = [];\n if (documentIntersection.oldOnly.length) {\n documentIntersection.oldOnly.forEach((doc) => {\n if (doc._version !== undefined) {\n doc.deleted = true;\n } else {\n onlyLocalDocumentIds.push(doc.id);\n }\n });\n promises.push(db.documents.where('id').anyOf(onlyLocalDocumentIds).delete());\n }\n if (documentIntersection.newOnly.length) {\n promises.push(db.documents.bulkPut(documentIntersection.newOnly));\n }\n let squawkIntersection = null;\n const onlyLocalSquawkIds: string[] = [];\n let squawkDeferralIntersection = null;\n const onlyLocalSquawkDeferralIds: string[] = [];\n if (squawks !== undefined) {\n squawkIntersection = intersectItems(existingSquawks, squawks);\n const squawksToPut = [...squawkIntersection.newOnly, ...squawkIntersection.both];\n if (squawkIntersection.oldOnly.length) {\n squawkIntersection.oldOnly.forEach((squawk) => {\n if (squawk._version !== undefined) {\n squawk.deleted = true;\n } else {\n onlyLocalSquawkIds.push(squawk.id);\n }\n });\n promises.push(db.squawks.where('id').anyOf(onlyLocalSquawkIds).delete());\n }\n if (squawksToPut.length) {\n promises.push(db.squawks.bulkPut(squawksToPut));\n }\n if (squawkDeferrals !== undefined) {\n const existingSquawkDeferrals = (\n await Promise.all(squawks.map((s) => getSquawkDeferralsForSquawk(s.id)))\n ).flat();\n squawkDeferralIntersection = intersectItems(existingSquawkDeferrals, squawkDeferrals);\n const squawksDeferralsToPut = [\n ...squawkDeferralIntersection.newOnly,\n ...squawkDeferralIntersection.both,\n ];\n if (squawkDeferralIntersection.oldOnly.length) {\n squawkDeferralIntersection.oldOnly.forEach((squawkDeferral) => {\n if (squawkDeferral._version !== undefined) {\n squawkDeferral.deleted = true;\n } else {\n onlyLocalSquawkDeferralIds.push(squawkDeferral.id);\n }\n });\n promises.push(db.squawkDeferrals.where('id').anyOf(onlyLocalSquawkDeferralIds).delete());\n }\n if (squawksDeferralsToPut.length) {\n promises.push(db.squawkDeferrals.bulkPut(squawksDeferralsToPut));\n }\n }\n }\n let upliftToSync: string | null = null;\n if (phase === FLIGHT_LEG_PHASE_FINISH) {\n const uplift = existingCountableChanges.find((cc) => cc.type === COUNTABLE_CHANGE_UPLIFT);\n if (uplift) {\n const valuesDiffer = uplift.countableValuesAfter.some((value, index) => {\n return value !== countableChange.countableValuesBefore[index];\n });\n const typesAreSame = uplift.countableTypes.join('-') === countableChange.countableTypes.join('-');\n if (valuesDiffer && typesAreSame) {\n uplift.countableValuesAfter = countableChange.countableValuesBefore.slice();\n promises.push(db.countableChanges.put(uplift));\n upliftToSync = uplift.id;\n }\n }\n }\n\n promises.push(db.countableChanges.put(countableChange));\n promises.push(db.legs.put(leg));\n await Promise.all(promises);\n const dbSyncer = getDbSyncer();\n dbSyncer.markToSync(db.legs, leg.id);\n const documentsToSync = getIdsFromIntersection(documentIntersection).filter(\n (id) => !onlyLocalDocumentIds.includes(id)\n );\n dbSyncer.markToSync(db.documents, ...documentsToSync);\n if (squawkIntersection !== null) {\n const squawksToSync = getIdsFromIntersection(squawkIntersection).filter(\n (id) => !onlyLocalSquawkIds.includes(id)\n );\n dbSyncer.markToSync(db.squawks, ...squawksToSync);\n }\n if (squawkDeferralIntersection !== null) {\n const squawkDeferralsToSync = getIdsFromIntersection(squawkDeferralIntersection).filter(\n (id) => !onlyLocalSquawkDeferralIds.includes(id)\n );\n dbSyncer.markToSync(db.squawkDeferrals, ...squawkDeferralsToSync);\n }\n dbSyncer.markToSync(db.countableChanges, countableChange.id);\n if (upliftToSync !== null) {\n dbSyncer.markToSync(db.countableChanges, upliftToSync);\n }\n }\n );\n};\n\nconst toIdSet = (input: { id: string }[]): Set => {\n return new Set(input.map((i) => i.id));\n};\n\ntype Intersection = {\n oldOnly: T[];\n newOnly: T[];\n both: T[];\n};\nconst intersectItems = (oldItems: T[], newItems: T[]): Intersection => {\n const oldOnly: T[] = [];\n const newOnly: T[] = [];\n const both: T[] = [];\n const oldIds = toIdSet(oldItems);\n const newIds = toIdSet(newItems);\n for (const item of oldItems) {\n if (!newIds.has(item.id)) {\n oldOnly.push(item);\n }\n }\n for (const item of newItems) {\n if (oldIds.has(item.id)) {\n both.push(item);\n } else {\n newOnly.push(item);\n }\n }\n return { oldOnly, newOnly, both };\n};\n\nconst getIdsFromIntersection = (intersection: Intersection): string[] => {\n return [\n ...intersection.oldOnly.map((i) => i.id),\n ...intersection.newOnly.map((i) => i.id),\n ...intersection.both.map((i) => i.id),\n ];\n};\n\nexport const getFlightLegsForFlight = async (flightId: string): Promise<(FlightLeg & WithLastCountableChange)[]> => {\n const legs = (await getDb().legs.where('flightId').equals(flightId).toArray()).filter((leg) => !leg.deleted);\n const lastCountables = await Promise.all(legs.map(getLastCountableChangeForLeg));\n return legs.map((leg, index) => ({\n ...leg,\n lastCountableChange: lastCountables[index],\n }));\n};\n\nexport type GetFlightLegParams = [string];\n\nexport const getFlightLeg = async (legId: GetFlightLegParams[0]): Promise => {\n const maybeLeg = await getDb().legs.get(legId);\n return maybeLeg || null;\n};\n\nexport const getFlightLegsById = async (legIds: GetFlightLegParams[0][]): Promise<(FlightLeg | null)[]> => {\n return getDb().legs.bulkGet(legIds);\n};\n\nexport type FlightLegAndAircraft = { leg: FlightLeg; aircraft: Aircraft };\n\nexport const getFlightLegAndAircraft = async (legId: GetFlightLegParams[0]): Promise => {\n const leg = await getFlightLeg(legId);\n if (!leg) {\n return null;\n }\n const aircraft = await getAircraft(leg.aircraftId);\n if (!aircraft) {\n return null;\n }\n return { leg, aircraft };\n};\n\nexport const deleteFlightLeg = async (legId: string): Promise => {\n const db = getDb();\n await db.transaction('rw', db.legs, db.countableChanges, db.documents, db.squawks, db.syncItems, async () => {\n const leg = await db.legs.get(legId);\n if (!leg) {\n return;\n }\n const [existingDocuments, existingCountableChanges, existingSquawks] = await Promise.all([\n db.documents.where({ legId }).toArray(),\n db.countableChanges.where({ legId }).toArray(),\n db.squawks.where({ legId }).toArray(),\n ]);\n leg.deleted = true;\n existingDocuments.forEach((doc) => (doc.deleted = true));\n existingCountableChanges.forEach((cc) => (cc.deleted = true));\n existingSquawks.forEach((s) => (s.deleted = true));\n\n await Promise.all([\n db.legs.put(leg),\n db.countableChanges.bulkPut(existingCountableChanges),\n db.squawks.bulkPut(existingSquawks),\n db.documents.bulkPut(existingDocuments),\n ]);\n const dbSyncer = getDbSyncer();\n dbSyncer.markToSync(db.documents, ...existingDocuments.map((d) => d.id));\n dbSyncer.markToSync(db.squawks, ...existingSquawks.map((s) => s.id));\n dbSyncer.markToSync(db.countableChanges, ...existingCountableChanges.map((cc) => cc.id));\n dbSyncer.markToSync(db.legs, legId);\n });\n};\n\nexport const getCrewFlightLegsOnline = async (crewId: string): Promise => {\n const legsQuery = `query ListLegs($crewId: ID) {\n legsByPicId(picId: $crewId, limit: 400, sortDirection: DESC) {\n items {\n ${flightLegItemFields}\n }\n }\n legsBySicId(sicId: $crewId, limit: 400, sortDirection: DESC) {\n items {\n ${flightLegItemFields}\n }\n }\n }`;\n const gqlo = graphqlOperation(legsQuery, { crewId: crewId });\n const legsResult = (await API.graphql(gqlo)) as {\n data: { legsByPicId: { items: CreateLegInput[] }; legsBySicId: { items: CreateLegInput[] } };\n };\n const legInputs = [...legsResult.data.legsByPicId.items, ...legsResult.data.legsBySicId.items];\n return legInputs.map(flightLegFromDb) as FlightLeg[];\n};\n\nexport const getFlightLegsByIdOnline = async (ids: GetFlightLegParams[0][]): Promise => {\n if (!ids.length) {\n return [];\n }\n\n const queryItems = ids.map(\n (id, index) => `\n getLeg${index}: getLeg(id: \"${sanitizeId(id)}\") {\n ${flightLegItemFields}\n }`\n );\n const query = `\n query GetFlightLegs {\n ${queryItems.join('\\n')}\n } \n `;\n\n const gqlo = graphqlOperation(query);\n const legsResult = (await API.graphql(gqlo)) as { data: { [key: string]: CreateLegInput } };\n const legInputs = Object.values(legsResult.data);\n console.log(legInputs);\n return legInputs.map(flightLegFromDb) as FlightLeg[];\n};\n","import {\n flightDeferralToDeferral,\n FlightSquawkDeferral,\n Squawk,\n SquawkAndAircraft,\n SquawkAndDeferrals,\n SquawkDeferral,\n SquawkDeferralAndReleases,\n} from './types';\nimport { getDb } from '../LocalDB/LocalDB';\nimport { getAircraftForFlight } from '../Aircrafts/AircraftsDatasource';\nimport { getDbSyncer } from '../LocalDB/DbSyncer';\nimport { getFlightDocumentsForSquawk } from '../FlightDocuments/FlightDocumentsDatasource';\nimport { ReleaseToService } from '../ReleaseToService/types';\nimport { getReleaseToServicesForSquawk } from '../ReleaseToService/ReleaseToServiceDatasource';\nimport { getUserIdForAircraft } from '../Users/UserDatasource';\n\nexport const getSquawksForAircraft = async (aircraftId: string): Promise => {\n const db = getDb();\n const squawks = await db.squawks.where({ aircraftId: aircraftId }).sortBy('createdAt');\n const squawkIds = squawks.map((s) => s.id);\n const [deferrals, releases] = await Promise.all([\n db.squawkDeferrals.where('squawkId').anyOf(squawkIds).toArray(),\n db.releaseToServices.where('squawkId').anyOf(squawkIds).toArray(),\n ]);\n const deferralsAndReleases = injectReleasesToDeferrals(deferrals, releases);\n return squawks.map((squawk): SquawkAndDeferrals => {\n return {\n ...squawk,\n deferrals: deferralsAndReleases.filter((d) => d.squawkId === squawk.id),\n releases: releases.filter((r) => r.squawkId === squawk.id && r.deferralId === null),\n };\n });\n};\n\nconst injectReleasesToDeferrals = (\n deferrals: SquawkDeferral[],\n releases: ReleaseToService[]\n): SquawkDeferralAndReleases[] => {\n return deferrals.map((deferral): SquawkDeferralAndReleases => {\n return {\n ...deferral,\n releases: releases.filter((r) => r.deferralId === deferral.id),\n };\n });\n};\n\nexport const getSquawksForLeg = async (legId: string): Promise => {\n return getDb().squawks.where({ legId: legId }).sortBy('createdAt');\n};\n\nexport const getSquawkDeferralsForSquawk = async (squawkId: string): Promise => {\n return getDb().squawkDeferrals.where({ squawkId }).toArray();\n};\n\nexport type GetSquawkParams = [string];\n\nexport const getSquawk = async (squawkId: GetSquawkParams[0]): Promise => {\n const maybeSquawk = await getDb().squawks.get(squawkId);\n return maybeSquawk || null;\n};\n\nexport type GetSquawkAndAircraftParams = GetSquawkParams;\nexport const getSquawkAndAircraft = async (\n squawkId: GetSquawkAndAircraftParams[0]\n): Promise => {\n const [squawk, documents, deferrals, releases] = await Promise.all([\n getSquawk(squawkId),\n getFlightDocumentsForSquawk(squawkId),\n getSquawkDeferralsForSquawk(squawkId),\n getReleaseToServicesForSquawk(squawkId),\n ]);\n if (!squawk) {\n return null;\n }\n const aircraft = await getAircraftForFlight(squawk.aircraftId);\n if (!aircraft) {\n return null;\n }\n return {\n ...squawk,\n documents: documents!,\n deferrals: injectReleasesToDeferrals(deferrals!, releases!),\n releases: releases!.filter((r) => r.deferralId === null),\n aircraft,\n };\n};\n\nexport const saveSquawk = async (squawk: Squawk): Promise => {\n const db = getDb();\n await db.squawks.put(squawk);\n getDbSyncer().markToSync(db.squawks, squawk.id);\n};\n\nexport const getPureSquawk = (squawk: Squawk): Squawk => {\n const {\n id,\n aircraftId,\n flightId,\n legId,\n createdAt,\n createdByName,\n description,\n airworthinessAffected,\n deleted,\n editableByUserIds,\n reviewedDate,\n reviewedName,\n reviewedId,\n releaseDate,\n releaseAircraftFlightTime,\n releaseName,\n releaseLicenseNumber,\n releaseText,\n releaseSignature,\n _version,\n } = squawk;\n return {\n id,\n aircraftId,\n flightId,\n legId,\n createdAt,\n createdByName,\n description,\n airworthinessAffected,\n deleted,\n editableByUserIds: editableByUserIds.slice(),\n reviewedDate,\n reviewedName,\n reviewedId,\n releaseDate,\n releaseAircraftFlightTime,\n releaseName,\n releaseLicenseNumber,\n releaseText,\n releaseSignature,\n _version,\n };\n};\n\nexport const saveDeferral = async (\n flightDeferral: FlightSquawkDeferral,\n squawk: Squawk,\n userId: string\n): Promise => {\n const editableByUserIds = [userId];\n const aircraftUserId = await getUserIdForAircraft(squawk.aircraftId);\n if (aircraftUserId) {\n editableByUserIds.push(aircraftUserId);\n }\n const [deferrals, documents, releaseToServices] = flightDeferralToDeferral([flightDeferral], editableByUserIds);\n const db = getDb();\n await db.transaction('rw', [db.squawkDeferrals, db.releaseToServices, db.documents, db.syncItems], async () => {\n await Promise.all([\n db.squawkDeferrals.bulkPut(deferrals),\n db.documents.bulkPut(documents),\n db.releaseToServices.bulkPut(releaseToServices),\n ]);\n const dbSyncer = getDbSyncer();\n dbSyncer.markToSync(db.squawkDeferrals, ...deferrals.map((d) => d.id));\n dbSyncer.markToSync(db.documents, ...documents.map((d) => d.id));\n dbSyncer.markToSync(db.releaseToServices, ...releaseToServices.map((d) => d.id));\n });\n};\n","import { useSelector } from 'react-redux';\nimport { RootState } from '../rootReducer';\n\nexport type SyncState = {\n inProgress: boolean;\n queueLengthUp: number;\n queueLengthDown: number;\n time: number | null;\n offline: boolean;\n};\n\nconst LOCAL_STORAGE_KEY = 'alol_syncstate';\n\nlet maybeStoredSyncTime: number | null = null;\ntry {\n const ls = window.localStorage.getItem(LOCAL_STORAGE_KEY);\n if (ls) {\n maybeStoredSyncTime = parseInt(ls, 10);\n }\n} catch (e) {\n console.warn('When parsing stored sync state', e);\n}\n\nexport const syncInitialState: SyncState = {\n inProgress: false,\n queueLengthUp: 0,\n queueLengthDown: 0,\n time: maybeStoredSyncTime ? maybeStoredSyncTime : null,\n offline: false,\n};\n\nexport const SYNC_CHANGE = 'SYNC_CHANGE';\nexport type SyncActionTypes = {\n type: typeof SYNC_CHANGE;\n data: SyncState;\n};\n\nexport const SyncReducer = (\n state: SyncState | undefined = syncInitialState,\n action: SyncActionTypes | any = undefined\n): SyncState => {\n switch (action.type) {\n case SYNC_CHANGE:\n window.localStorage.setItem(LOCAL_STORAGE_KEY, action.data.time);\n return action.data;\n default:\n return state;\n }\n};\n\nexport function useSyncState() {\n return useSelector((state) => state.sync);\n}\n","export const contactItemFields = `\n id\n userId\n isActiveCrew\n aircraftVisiblityLimitations\n fullReadAccessToAircrafts\n crewId\n hasDutyTracking\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n isReservationResource\n avinodeId\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n`;\n","import React, { FunctionComponent } from \"react\";\nimport { FormErrorLike } from './FormErrors';\nimport { formClasses } from '../../utils/BEM';\n\ntype FieldErrorMessageProps = {\n error?: FormErrorLike;\n}\nconst FieldErrorMessage: FunctionComponent = ({error}) => {\n if (!error) {\n return null;\n }\n\n return (\n
\n {getErrorMessage(error)}\n
\n );\n}\n\nconst getErrorMessage = (error: FormErrorLike): string => {\n if (error === false) {\n return \"\";\n }\n if (error === true) {\n return \"Please fill this field\";\n }\n if (typeof error === 'string') {\n return (\n error\n )\n }\n return error.text;\n};\n\nexport default FieldErrorMessage;\n","import React, { ChangeEvent, FunctionComponent, useState } from \"react\";\nimport { formClasses } from \"../../utils/BEM\";\nimport { useId } from \"../../utils/idGenerator\";\nimport BEMHelper from \"react-bem-helper\";\nimport Suggester, { Suggestable } from \"./Suggester\";\nimport * as accents from \"remove-accents\";\nimport { FORM_SEVERITY_CAUTION, FormErrorLike, getFormErrorSeverity } from './FormErrors';\nimport FieldErrorMessage from './FieldErrorMessage';\nimport { ColorKey, COLORS } from \"stylekit\";\nimport classNames from \"classnames\";\n\nexport interface GenericFieldProps {\n label: string | null;\n tinyLabel?: string;\n placeholder?: string;\n idPrefix?: string;\n defaultSmall?: boolean;\n defaultTiny?: boolean;\n onChange?: (newValue: string) => void;\n onChangeComplete?: (newValue: string) => void;\n control: (props: PropsPassedToControl) => JSX.Element;\n disabled?: boolean;\n controlModifiers?: BEMHelper.PredicateSet;\n fieldModifiers?: BEMHelper.PredicateSet;\n inputModifiers?: BEMHelper.PredicateSet;\n autoFocus?: boolean;\n value?: string;\n suggestions?: Suggestable[];\n suggestionsNegativeTabIndex?: boolean;\n errorClass?: boolean;\n error?: FormErrorLike;\n forceErrorDisplay?: boolean;\n autoComplete?: 'on' | 'off' | 'username' | 'current-password';\n name?: string;\n bgColor?: ColorKey;\n pointerEventsOff?: boolean;\n labelSuffixComponent?: React.ReactNode;\n}\n\nexport type PropsPassedToControl = {\n className: string;\n value: string;\n id: string;\n onChange: (evt: ChangeEvent) => void;\n onFocus: () => void;\n onBlur: () => void;\n autoFocus?: boolean;\n disabled?: boolean;\n error?: FormErrorLike;\n placeholder?: string;\n}\n\nconst GenericField: FunctionComponent = (props) => {\n const [innerValue, setInnerValue] = useState(props.value || \"\");\n const value = props.value !== undefined ? props.value : innerValue;\n const [mutated, setMutated] = useState(false);\n const [focused, setFocused] = useState(false);\n const [focusedCount, setFocusedCount] = useState(0);\n const [blurredCount, setBlurredCount] = useState(0);\n const [touched, setTouched] = useState(false);\n const onChange = (evt: ChangeEvent) => {\n onNewValue(evt.target.value);\n };\n const onNewValue = (newValue: string) => {\n setInnerValue(newValue);\n if (!mutated) {\n setMutated(true);\n }\n props.onChange && props.onChange(newValue);\n };\n const onFocus = () => {\n setFocused(true);\n setFocusedCount(focusedCount + 1);\n setTouched(true);\n };\n const onBlur = () => {\n setFocused(false);\n setBlurredCount(blurredCount + 1);\n props.onChangeComplete && props.onChangeComplete(value);\n };\n const [id] = useId(props.idPrefix);\n const tiny = !!(props.defaultTiny && (!focused && !innerValue));\n const small = !!(props.defaultSmall && (!focused && !innerValue));\n const label = tiny && props.tinyLabel ? props.tinyLabel : props.label;\n const canShowErrors = blurredCount > 0 || props.forceErrorDisplay;\n const showErrors = canShowErrors && (props.error || props.errorClass);\n const errorIsCaution = props.error && getFormErrorSeverity(props.error) === FORM_SEVERITY_CAUTION;\n const modifiers = {\n ...props.fieldModifiers,\n mutated,\n focused,\n touched,\n tiny,\n small,\n 'no-label': label === null,\n error: !!(showErrors),\n 'error-caution': !!(showErrors && errorIsCaution),\n };\n\n const onSuggestionSelected = (suggestion: string) => {\n setTouched(true);\n onNewValue(suggestion);\n props.onChangeComplete && props.onChangeComplete(suggestion);\n };\n\n return (\n
\n {label !== null && (\n
\n \n {props.labelSuffixComponent}\n
\n )}\n
\n {props.control({\n ...formClasses('control', {...modifiers, ...props.controlModifiers}),\n ...{\n onChange,\n value,\n onFocus,\n onBlur,\n id,\n autoFocus: props.autoFocus,\n disabled: props.disabled,\n placeholder: props.placeholder,\n autoComplete: props.autoComplete,\n name: props.name,\n style: {\n backgroundColor: props.bgColor ? COLORS[props.bgColor ?? ''] : undefined,\n },\n }\n })}\n {canShowErrors && (\n \n )}\n {(props.suggestions && props.suggestions.length > 0) && (\n \n )}\n
\n\n
\n )\n};\n\nexport const standardSuggesterFilter = (currentValue: string, availableValues: string[]): string[] => {\n if (currentValue.length < 2) {\n return [];\n }\n const inputClean = accents.remove(currentValue).toLowerCase();\n const regex = new RegExp(`\\\\b${inputClean}`, 'i');\n return availableValues.filter(av => {\n const clean = accents.remove(av).toLowerCase();\n return clean.match(regex) && av !== currentValue;\n });\n};\n\nexport default GenericField;\n","// https://getbootstrap.com/docs/5.0/customize/color/\nexport const COLORS = {\n transparent: 'transparent',\n white: '#FFFFFF',\n black: '#000000',\n gray: '#E0E0E0',\n gray128: '#808080',\n gray160: '#A0A0A0',\n gray200: '#C8C8C8',\n gray240: '#F0F0F0',\n grayF9: '#F9F9F9',\n greenLight: '#C6EBC9',\n greenLight2: '#e2f5e4',\n greenLight3: '#f3fbf4',\n green: '#A0D3A8',\n greenDark: '#70AF85',\n blueLight: '#9AD0EC',\n blue: '#6096B4',\n blueDark: '#1572A1',\n blueInput: '#147EFB',\n brownLight: '#EEE3CB',\n brown: '#D7C0AE',\n brownDark: '#967E76',\n purpleLight: '#D1B9E4',\n purple: '#BA94D1',\n purpleDark: '#8A6BBE',\n yellow: '#ffda6a', // yellow-300\n yellowLight: '#FCE8B3',\n yellowLight2: '#FDF5E6',\n orange: '#feb272', // orange-300\n pink: '#e685b5', // pink-300\n red: '#ea868f', // red-300\n redLight: '#f1aeb5', // red-200\n redLight2: '#f8d7da', // red-100\n //\n primary: '#0d6efd',\n warning: '#ffc107',\n danger: '#dc3545',\n success: '#198754',\n info: '#0dcaf0',\n} as const;\n\nexport type ColorKey = keyof typeof COLORS;\nexport type Color = (typeof COLORS)[ColorKey];\n","import { DbSyncerUpDefinition, getStandardSyncerFields } from '../syncHelpers';\nimport { DutyItem, DutyItemState, DutyItemType } from '../../Duties/types';\nimport { CreateDutyItemInput } from '../../../API';\n\nlet counter = 0;\nexport const dutyItemItemFields = `\n id\n userId\n state\n editableByUserIds\n deleted\n type\n startDate\n endDate\n forceRestAfter\n sectorCount\n endPlaceIcao\n blockTimeMinutes\n flightLegIds\n logbookRecordIds\n linkedDutyItemIds\n plannedFdpExtension\n note\n _version\n`;\n\ntype WithReportIds = {\n reports: { items: { id: string }[] };\n};\n\nexport const dutyItemToDb: DbSyncerUpDefinition = (dutyItem: DutyItem) => {\n const c = ++counter;\n const [commandName, inputType] = !dutyItem._version\n ? ['createDutyItem', 'CreateDutyItemInput']\n : ['updateDutyItem', 'UpdateDutyItemInput'];\n const { mutationName, inputKey, query } = getStandardSyncerFields(\n commandName,\n c,\n dutyItemItemFields + ' reports { items { id } }'\n );\n if (!dutyItem.userId) {\n throw new Error('Duty Item does not have userId');\n }\n const input: CreateDutyItemInput = {\n id: dutyItem.id,\n userId: dutyItem.userId,\n state: dutyItem.state,\n deleted: dutyItem.deleted,\n type: dutyItem.type,\n startDate: dutyItem.startDate.toISOString(),\n endDate: dutyItem.endDate.toISOString(),\n forceRestAfter: dutyItem.forceRestAfter,\n sectorCount: dutyItem.sectorCount,\n endPlaceIcao: dutyItem.endPlaceIcao.length ? dutyItem.endPlaceIcao : undefined,\n flightLegIds: dutyItem.flightLegIds.length ? dutyItem.flightLegIds : null,\n logbookRecordIds: dutyItem.logbookRecordIds.length ? dutyItem.logbookRecordIds : null,\n note: dutyItem.note || null,\n blockTimeMinutes: dutyItem.blockTimeMinutes,\n plannedFdpExtension: dutyItem.plannedFdpExtension,\n _version: dutyItem._version,\n };\n return {\n query,\n input,\n inputKey,\n inputType,\n mutationName,\n remoteToLocalTransform: dutyItemTransform,\n queryName: 'getDutyItem',\n };\n};\n\nexport const dutyItemTransform = (input: CreateDutyItemInput): DutyItem => {\n return {\n id: input.id!,\n type: input.type as DutyItemType,\n state: input.state as DutyItemState,\n userId: input.userId,\n crewId: input.crewId ? input.crewId : input.userId,\n startDate: new Date(input.startDate),\n endDate: new Date(input.endDate),\n sectorCount: input.sectorCount || 0,\n forceRestAfter: input.forceRestAfter || false,\n endPlaceIcao: input.endPlaceIcao || '',\n flightLegIds: input.flightLegIds || [],\n logbookRecordIds: input.logbookRecordIds || [],\n linkedDutyItemIds: input.linkedDutyItemIds || [],\n blockTimeMinutes: input.blockTimeMinutes || undefined,\n note: input.note || null,\n _version: input._version || undefined,\n deleted: input.deleted,\n editableByUserIds: input.editableByUserIds || [],\n plannedFdpExtension: input.plannedFdpExtension || false,\n reportIds: (input as CreateDutyItemInput & WithReportIds).reports?.items?.map((r) => r.id),\n } as DutyItem; // TODO: Fix with some DutyItemWithReportIds type\n};\n","import { getDb } from '../LocalDB/LocalDB';\nimport { ReleaseToService } from './types';\nimport { getDbSyncer } from '../LocalDB/DbSyncer';\n\nexport const getReleaseToServicesForSquawk = async (squawkId: string): Promise => {\n return getDb().releaseToServices.where({squawkId}).toArray();\n};\n\nexport type GetReleaseToServiceParams = [string];\nexport const getReleaseToService = async (id: string): Promise => {\n return getDb().releaseToServices.get(id);\n};\n\n\nexport const saveReleaseToService = async (release: ReleaseToService): Promise => {\n const db = getDb();\n await db.releaseToServices.put(release);\n getDbSyncer().markToSync(db.releaseToServices, release.id);\n};\n\nexport const getReleaseToServicesForAircraft = async (aircraftId: string): Promise => {\n return getDb().releaseToServices.where({aircraftId}).toArray();\n};\n","import { getLabelForCountableShort } from '../../Datasource/CountableChanges/types';\n\nexport const FORM_SEVERITY_WARNING = 'warning';\nexport const FORM_SEVERITY_CAUTION = 'caution';\nexport type FormSeverity = typeof FORM_SEVERITY_WARNING | typeof FORM_SEVERITY_CAUTION;\n\nexport type FormErrorLike = FormError | string | boolean;\n\nexport type FormError = {\n severity: FormSeverity;\n text: string;\n};\n\nexport const getFormErrorSeverity = (formError: FormErrorLike): FormSeverity => {\n if ('boolean' === typeof formError) {\n return FORM_SEVERITY_WARNING;\n }\n if ('string' === typeof formError) {\n return FORM_SEVERITY_WARNING;\n }\n return formError.severity;\n};\n\nexport const scrollToFirstError = () => {\n const errorElement = document.querySelector('*[data-has-error]');\n if (!errorElement) {\n return;\n }\n setTimeout(() => {\n errorElement.scrollIntoView({\n behavior: 'smooth',\n });\n }, 50); // allow for react redraw\n};\n\nexport function confirmErrors(errors: { [key: string]: FormErrorLike }): boolean | null {\n const errorEntries = Object.entries(errors);\n if (errorEntries.length) {\n const errorText = errorEntries\n .map(([key, error]): string => {\n const errorText =\n 'string' === typeof error ? error : 'boolean' === typeof error ? 'is unexpected value' : error.text;\n const label = getLabelForMaybeCountable(key);\n return `- ${label}: ${errorText}`;\n })\n .join('\\n');\n return window.confirm(`Some values are unusual. Confirm you have double-checked them?\\n\\n${errorText}`);\n }\n return null;\n}\n\nfunction getLabelForMaybeCountable(countable: string): string {\n try {\n return getLabelForCountableShort(countable as any) ?? countable;\n } catch (e) {\n return countable;\n }\n}\n","import { isNone } from './maybe';\n\nexport function parseIntSafe(text?: string, radix?: number): number | undefined {\n try {\n if (text == null) {\n return undefined;\n }\n const parsed = Number.parseInt(text, radix ?? 10);\n\n return Number.isInteger(parsed) ? parsed : undefined;\n } catch (e) {\n return undefined;\n }\n}\n\nexport function parseFloatSafe(text?: string): number | undefined {\n try {\n if (text == null) {\n return undefined;\n }\n const parsed = Number.parseFloat(text);\n\n return Number.isNaN(parsed) ? undefined : parsed;\n } catch (e) {\n return undefined;\n }\n}\n\nexport function safeNumber(number?: string | number | null, fallbackValue?: number): number {\n const fallback = fallbackValue ?? 0;\n try {\n if (isNone(number)) {\n return fallback;\n }\n if (typeof number === 'number') {\n return number;\n }\n const parsed = Number.parseFloat(number);\n return Number.isNaN(parsed) ? fallback : parsed;\n } catch (e) {\n return fallback;\n }\n}\n\nexport function parseNumber(\n number: string | number | null | undefined,\n fallback?: number | undefined\n): number | undefined {\n try {\n if (isNone(number)) {\n return fallback;\n }\n if (typeof number === 'number') {\n return number;\n }\n const parsed = Number.parseFloat(number);\n return Number.isNaN(parsed) ? fallback : parsed;\n } catch (e) {\n return fallback;\n }\n}\n\nexport function safeNumberOrString(number?: string | number | null): number | string {\n const fallback = number ?? '';\n try {\n if (isNone(number)) {\n return fallback;\n }\n if (typeof number === 'number') {\n return number;\n }\n const parsed = Number.parseFloat(number);\n return Number.isNaN(parsed) ? fallback : parsed;\n } catch (e) {\n return fallback;\n }\n}\n\nexport function limitNumber(value: number, params: { min?: number; max?: number }) {\n let result = value;\n if (params.min != null) {\n result = Math.max(result, params.min);\n }\n if (params.max != null) {\n result = Math.min(result, params.max);\n }\n return result;\n}\n\nexport function roundNumber(\n num: T,\n decimalPlaces: number = 0,\n mode: 'ceil' | 'floor' | 'round' = 'round'\n): T {\n if (typeof num !== 'number') {\n return num;\n }\n const factor = Math.pow(10, decimalPlaces);\n const fn = Math[mode];\n //@ts-ignore\n return fn(num * factor) / factor;\n}\n","/* eslint-disable @typescript-eslint/ban-types */\n\nexport type ObjectKeys = `${Exclude}`;\n\n/**\nA strongly-typed version of `Object.keys()`.\n\nThis is useful since `Object.keys()` always returns an array of strings. This function returns a strongly-typed array of the keys of the given object.\n\n- [Explanation](https://stackoverflow.com/questions/55012174/why-doesnt-object-keys-return-a-keyof-type-in-typescript)\n- [TypeScript issues about this](https://github.com/microsoft/TypeScript/issues/45390)\n\n@example\n```\nimport {objectKeys} from 'ts-extras';\n\nconst stronglyTypedItems = objectKeys({a: 1, b: 2, c: 3}); // => Array<'a' | 'b' | 'c'>\nconst untypedItems = Object.keys(items); // => Array\n```\n\n@category Improved builtin\n@category Type guard\n*/\nexport const objectKeys = Object.keys as (value: Type) => Array>;\n","export function startOfString(\n text: string | undefined,\n nubmerOfChars: number,\n transform?: 'lowercase' | 'uppercase'\n): string {\n const res = (text ?? '').slice(0, nubmerOfChars);\n\n if (transform === 'lowercase') {\n return res.toLowerCase();\n } else if (transform === 'uppercase') {\n return res.toUpperCase();\n } else {\n return res;\n }\n}\n\nexport function truncate(text: string, maxLength = 40) {\n if (!text) return '';\n if (text.length <= maxLength) return text;\n return `${text.substring(0, maxLength)}…`;\n}\n","import moment from 'moment';\nimport { isNone } from './maybe';\n\nexport function formatUTCdate(date: Date | undefined, options?: { showTime: boolean }): string {\n if (isNone(date)) {\n return 'UTC'\n }\n return moment(date).utc().format('DD.MM.YYYY HH:mm:ss') + ' UTC';\n}\n","import { isNone } from './maybe';\n\nexport * from './maybe';\nexport * from './arrayUtils';\nexport * from './numbers';\nexport * from './colors';\nexport * from './objectKeys';\nexport * from './string';\nexport * from './format';\nexport * as uuid from 'uuid';\n\nexport function isHtmlEmpty(html: string | undefined) {\n return !html?.replace(/<[^>]*>/g, '').trim();\n}\n\nexport function sleepAsync(milliseconds: number) {\n return new Promise((resolve) => setTimeout(resolve, milliseconds));\n}\n\nexport function jsonParseSafe(str: string | undefined | null, fallback: T): T {\n try {\n if (isNone(str)) {\n return fallback;\n } else {\n return JSON.parse(str ?? '');\n }\n } catch {\n return fallback;\n }\n}\n","import { useSelector } from 'react-redux';\nimport { RootState } from '../../../rootReducer';\n\nexport enum ComplianceMode {\n compliance = 'compliance',\n experimental = 'experimental',\n}\n\nexport type ComplianceModeState = ComplianceMode;\n\nconst LOCAL_STORAGE_KEY = 'alol_compliance_mode';\n\nexport const complianceModeInitialState = window.localStorage.getItem(LOCAL_STORAGE_KEY) === ComplianceMode.compliance\n ? ComplianceMode.compliance\n : ComplianceMode.experimental;\n\nexport const ComplianceModeActionType = 'ComplianceMode';\nexport type ComplianceModeActionTypes = {\n type: typeof ComplianceModeActionType,\n complianceMode: ComplianceMode\n};\nexport const ComplianceModeReducer = (state: ComplianceModeState | undefined, action: ComplianceModeActionTypes | any) => {\n if (action.type === ComplianceModeActionType) {\n switch (action.complianceMode) {\n case ComplianceMode.compliance:\n case ComplianceMode.experimental:\n persistState(action.complianceMode);\n return action.complianceMode;\n }\n }\n return state || complianceModeInitialState;\n};\n\nfunction persistState(state: ComplianceModeState) {\n if (state === ComplianceMode.compliance) {\n window.localStorage.setItem(LOCAL_STORAGE_KEY, ComplianceMode.compliance);\n } else {\n window.localStorage.removeItem(LOCAL_STORAGE_KEY);\n }\n}\n\nexport function useComplianceModeState(): ComplianceModeState {\n return useSelector(s => s.complianceMode);\n}\n","import { generateLabels } from '../../components/FormFields/FieldDetailedValue';\nimport { AircraftCountableType, AircraftUpliftableType } from '../CountableChanges/types';\nimport { PerformanceProfile } from '../../Admin/Scheduling/model/PerformanceProfileTypes';\nimport { DbSaveable } from '../LocalDB/types';\n\nexport enum AircraftTag {\n opsAto = 'ops_ato',\n opsCat = 'ops_cat',\n complex = 'complex',\n multiPilot = 'mcc',\n mutiPilotCat = 'mcc_cat',\n multiEngine = 'me',\n}\n\nexport const AIRCRAFT_TAGS: AircraftTag[] = [\n AircraftTag.opsAto,\n AircraftTag.opsCat,\n AircraftTag.complex,\n AircraftTag.multiPilot,\n AircraftTag.mutiPilotCat,\n AircraftTag.multiEngine,\n];\n\nexport const aircraftTagLabelsMap = new Map([\n [AircraftTag.opsAto, 'ATO'],\n [AircraftTag.opsCat, 'CAT'],\n [AircraftTag.complex, 'Complex'],\n [AircraftTag.multiPilot, 'Multi-pilot always'],\n [AircraftTag.mutiPilotCat, 'Multi-pilot in CAT'],\n [AircraftTag.multiEngine, 'ME'],\n]);\n\nexport const aircraftTagLabels = generateLabels(aircraftTagLabelsMap);\n\nexport type Aircraft = {\n id: string;\n registration: string;\n friendlyType: string;\n serialNumber: string;\n imageUrl?: string;\n countableTypes: AircraftCountableType[];\n upliftableTypes: AircraftUpliftableType[];\n tags: AircraftTag[];\n userId: string | undefined;\n aircraftTypeId: string | null;\n performanceProfile: PerformanceProfile | null;\n callsign: string | null;\n additionalTlbData: AircraftAdditionalTlbData;\n} & DbSaveable;\n\nexport type AircraftAdditionalTlbData = {\n tachMeterOffset?: number;\n};\n\nexport type AircraftForPicker = Pick;\n","import { AircraftCountableType, COUNTABLE_CHANGE_CORRECTION, CountableChange, CountableChangeType } from './types';\nimport * as uuid from 'uuid';\n\nimport { Aircraft } from '../Aircrafts/types';\n\nexport const setConsumption = (\n countableChange: CountableChange,\n changeType: AircraftCountableType,\n changeValue: number | null\n): CountableChange => {\n const stateIndex = countableChange.countableTypes.indexOf(changeType);\n const changeTypes = countableChange.changeTypes.slice();\n const changeIndex = changeTypes.indexOf(changeType);\n const changeValues = countableChange.changeValues.slice();\n if (changeIndex >= 0) {\n if (changeValue !== null) {\n changeValues[changeIndex] = changeValue;\n } else {\n changeValues.splice(changeIndex, 1);\n changeTypes.splice(changeIndex, 1);\n }\n } else {\n if (changeValue !== null) {\n changeValues.push(changeValue);\n changeTypes.push(changeType);\n }\n }\n const countableValuesAfter = countableChange.countableValuesAfter.slice();\n if (stateIndex >= 0) {\n countableValuesAfter[stateIndex] = countableChange.countableValuesBefore[stateIndex] + (changeValue || 0);\n }\n return { ...countableChange, changeTypes, changeValues, countableValuesAfter };\n};\n\nexport const getInitialCountableChange = (aircraft: Aircraft, editableByUserIds?: string[]): CountableChange => {\n const zeroes = new Array(aircraft.countableTypes.length).fill(0);\n return {\n id: uuid.v4(),\n editableByUserIds: editableByUserIds || [],\n countableTypes: aircraft.countableTypes,\n countableValuesBefore: zeroes,\n countableValuesAfter: zeroes,\n changeValues: [],\n changeTypes: [],\n aircraftId: aircraft.id,\n createdAt: new Date(),\n createdByName: '(system initial status)',\n type: COUNTABLE_CHANGE_CORRECTION,\n deleted: false,\n };\n};\n\ntype GetDerivedCountableChangeParams = {\n type: CountableChangeType;\n appliedByName: string;\n place: string;\n flightId?: string;\n legId?: string;\n};\n\nexport const getDerivedCountableChange = (\n lastCountableChange: CountableChange,\n params: GetDerivedCountableChangeParams,\n editableByUserIds?: string[]\n): CountableChange => {\n return {\n id: uuid.v4(),\n type: params.type,\n createdByName: params.appliedByName,\n createdAt: new Date(),\n aircraftId: lastCountableChange.aircraftId,\n place: params.place,\n flightId: params.flightId,\n legId: params.legId,\n changeTypes: [],\n changeValues: [],\n countableValuesBefore: lastCountableChange.countableValuesAfter.slice(),\n countableTypes: lastCountableChange.countableTypes.slice(),\n countableValuesAfter: lastCountableChange.countableValuesAfter.slice(),\n deleted: false,\n editableByUserIds: editableByUserIds || [],\n };\n};\n\nexport const getCountableBeforeAfter = (\n counableChange: CountableChange,\n type: AircraftCountableType\n): [number, number, number] | [null, null, null] => {\n const index = counableChange.countableTypes.indexOf(type);\n if (index >= 0) {\n const before = counableChange.countableValuesBefore[index];\n const after = counableChange.countableValuesAfter[index];\n return [before, after, index];\n } else {\n return [null, null, null];\n }\n};\n\nexport const getCountableChangeTypeHuman = (type: CountableChangeType) => {\n switch (type) {\n case 'consumption':\n return 'consumption after flight';\n case 'uplift':\n return 'uplift';\n case 'correction':\n return 'correction';\n }\n};\n\nexport const areCountableChangesCompatible = (cc1: CountableChange, cc2: CountableChange) => {\n return cc1.countableTypes.join('-') === cc2.countableTypes.join('-');\n};\n","export const installationData = {\n name: 'Alpha Aviation',\n flightDetailOperatorLine:\n 'Operator: Alpha Aviation s.r.o. | Hulkova 31, Prague 9, 19700 Czech Republic | ops@alpha-aviation.aero | +420 702 161 575',\n};\n\nexport const camoData = {\n name: 'Alpha Aviation s.r.o.',\n approval: 'CZ.CAMO.0085',\n officialAddress: 'Na Tržišti 731\\n39 470 Kamenice nad Lipou',\n vat: '28137370',\n contactAddress: 'Prague Ruzyně Airport (LKPR)\\nK letišti 1040/10, 161 00 Praha 6',\n email: 'camo@alpha-aviation.aero',\n phone: '+420211150560',\n cam: 'Marek Babic',\n};\n\nexport const flightBriefData = {\n opsPhone: '+420 211 150 520',\n opsEmail: 'ops@alpha-aviation.aero',\n salesPhone: '+420 211 150 510',\n salesEmail: 'sales@alpha-aviation.aero',\n invoicesEmail: 'invoices@alpha-aviation.aero',\n};\n","import { CountableChange } from '../CountableChanges/types';\nimport { DbSaveable } from '../LocalDB/types';\n\nexport const FLIGHT_STATE_ACCEPTED = 'accepted';\nexport const FLIGHT_STATE_FINISHED = 'finished';\nexport type FlightState = typeof FLIGHT_STATE_ACCEPTED | typeof FLIGHT_STATE_FINISHED;\n\nexport interface Flight extends DbSaveable {\n id: string;\n createdAt: Date;\n aircraftId: string;\n reservationId?: string;\n acceptanceNotes: string;\n picName: string;\n picId: string | null;\n editableByUserIds: string[];\n state: FlightState;\n}\n\nexport interface AcceptedFlight extends Flight {\n state: typeof FLIGHT_STATE_ACCEPTED;\n acceptedCountables: CountableChange;\n}\n","import { DbSaveable } from \"../LocalDB/types\";\nimport * as uuid from \"uuid\";\nimport { HandSignature } from '../util/SignatureTypes';\nimport { FlightDocument } from '../FlightDocuments/FlightDocument';\n\nexport type ReleaseToService = DbSaveable & {\n id: string;\n aircraftId: string;\n squawkId: string | null;\n deferralId: string | null;\n createdAt: Date;\n releaseType: ReleaseToServiceType;\n releasedByName: string | null;\n releasedByLicenseNumber: string | null;\n releasedBySignature: HandSignature | null;\n releasedByOrganization: string | null;\n maintenanceRecordId: string | null;\n text: string | null;\n aircraftFlightTime: number;\n};\n\nexport const RELEASE_TYPE_IN_APP = 'in-app';\nexport const RELEASE_TYPE_BY_DOCUMENT = 'by-document';\nexport type ReleaseToServiceType = typeof RELEASE_TYPE_IN_APP | typeof RELEASE_TYPE_BY_DOCUMENT;\n\nexport type EmptyReleaseToServiceProps =\n Partial\n & Pick;\nexport const createEmptyReleaseToService = (props: EmptyReleaseToServiceProps): ReleaseToService => {\n return {\n id: uuid.v4(),\n deleted: false,\n aircraftId: props.aircraftId,\n squawkId: props.squawkId || null,\n deferralId: props.deferralId || null,\n maintenanceRecordId: props.maintenanceRecordId || null,\n createdAt: props.createdAt || new Date(),\n releaseType: props.releaseType,\n releasedByName: props.releasedByName || null,\n releasedByLicenseNumber: props.releasedByLicenseNumber || null,\n releasedBySignature: props.releasedBySignature || null,\n releasedByOrganization: props.releasedByOrganization || null,\n text: props.text || null,\n aircraftFlightTime: props.aircraftFlightTime,\n }\n};\n\nexport type FlightReleaseToService = Omit & {\n documents: FlightDocument[]\n}\n\nexport const createEmptyFlightReleaseToService = (props: EmptyReleaseToServiceProps): FlightReleaseToService => {\n const release = createEmptyReleaseToService(props);\n return {\n ...release,\n documents: []\n }\n};\n\nexport const flightReleaseToReleaseToService = (flightReleaseToService: FlightReleaseToService): [ReleaseToService, FlightDocument[]] => {\n const {documents, ...release} = flightReleaseToService;\n return [release, documents];\n};\n","/* eslint-disable */\n// WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. It will be overwritten.\n\nconst awsmobile = {\n \"aws_project_region\": \"eu-central-1\",\n \"aws_appsync_graphqlEndpoint\": \"https://y4o6cc4iujdlxb6pnoayoda57m.appsync-api.eu-central-1.amazonaws.com/graphql\",\n \"aws_appsync_region\": \"eu-central-1\",\n \"aws_appsync_authenticationType\": \"AMAZON_COGNITO_USER_POOLS\",\n \"aws_cloud_logic_custom\": [\n {\n \"name\": \"schedulingApi\",\n \"endpoint\": \"https://mlwolcu4ad.execute-api.eu-central-1.amazonaws.com/dev\",\n \"region\": \"eu-central-1\"\n }\n ],\n \"aws_cognito_identity_pool_id\": \"eu-central-1:00e1b3d1-acd7-4797-912f-2bd351f84d9f\",\n \"aws_cognito_region\": \"eu-central-1\",\n \"aws_user_pools_id\": \"eu-central-1_5kc0D2tOp\",\n \"aws_user_pools_web_client_id\": \"5nrcgbaskbdi9sakqh9t6vfe2c\",\n \"oauth\": {},\n \"aws_cognito_username_attributes\": [\n \"EMAIL\"\n ],\n \"aws_cognito_social_providers\": [],\n \"aws_cognito_signup_attributes\": [\n \"EMAIL\"\n ],\n \"aws_cognito_mfa_configuration\": \"OFF\",\n \"aws_cognito_mfa_types\": [\n \"SMS\"\n ],\n \"aws_cognito_password_protection_settings\": {\n \"passwordPolicyMinLength\": 8,\n \"passwordPolicyCharacters\": []\n },\n \"aws_cognito_verification_mechanisms\": [\n \"EMAIL\"\n ],\n \"aws_user_files_s3_bucket\": \"alol-tlb-docs214021-dev\",\n \"aws_user_files_s3_bucket_region\": \"eu-central-1\"\n};\n\n\nexport default awsmobile;\n","export type MainMenuState = {\n visible: boolean;\n}\n\nexport const mainMenuInitialState: MainMenuState = {\n visible: false\n};\n\nexport const ACTION_MAIN_MENU_SHOW = 'MAIN_MENU_SHOW';\nexport const ACTION_MAIN_MENU_HIDE = 'MAIN_MENU_HIDE';\nexport const ACTION_MAIN_MENU_TOGGLE = 'MAIN_MENU_TOGGLE';\n\nexport const MainMenuReducer = (state: MainMenuState | undefined = mainMenuInitialState, action: MainMenuActionTypes | any = undefined): MainMenuState => {\n switch (action.type) {\n case \"MAIN_MENU_SHOW\":\n return {visible: true};\n case \"MAIN_MENU_HIDE\":\n return {visible: false};\n case \"MAIN_MENU_TOGGLE\":\n return {visible: !state.visible};\n default:\n return state\n }\n};\n\nexport type MainMenuActionTypes = {\n type: typeof ACTION_MAIN_MENU_SHOW | typeof ACTION_MAIN_MENU_HIDE | typeof ACTION_MAIN_MENU_TOGGLE\n}\n","import { DbSyncerUpDefinition, getStandardSyncerFields } from '../syncHelpers';\nimport { CreateSignedDataInput } from '../../../API';\nimport { WithId } from '../types';\n\nlet counter = 0;\n\nexport const logbookRecordItemFields = `\n id\n contactId\n crewId\n editableByUserIds\n date\n deleted\n legId\n departurePlace\n departureTime\n arrivalPlace\n arrivalTime\n aircraftMake\n aircraftRegistration\n airplaneSeMeMcc\n totalFlightTime\n picName\n landingsTotal\n landingsNight\n nightTime\n ifrTime\n picTime\n copilotTime\n dualTime\n instructorTime\n isFstd\n remarks\n crossCountryTime\n instrumentActualTime\n instrumentSimulatedTime\n instrumentApproachPlace\n instrumentApproachType\n instrumentApproachCount\n instrumentApproachDetails\n holdings\n customData\n signature\n _version\n`;\n\nexport const logbookRecordToDb: DbSyncerUpDefinition = (input: CreateSignedDataInput & WithId) => {\n const c = ++counter;\n const [commandName, inputType] = !input._version\n ? ['createLogbookRecord', 'CreateLogbookRecordInput']\n : ['updateLogbookRecord', 'UpdateLogbookRecordInput'];\n const {mutationName, inputKey, query} = getStandardSyncerFields(commandName, c, logbookRecordItemFields);\n return {\n query,\n input,\n inputKey,\n inputType,\n mutationName,\n remoteToLocalTransform: i => i, // stored locally same as on remote\n queryName: 'getLogbookRecord',\n };\n};\n","import { useSelector } from 'react-redux';\nimport { RootState } from '../rootReducer';\n\nexport type SupplementalDataSyncState = {\n inProgress: boolean;\n time: number | null;\n};\n\nexport const supplementalDataSyncInitialState: SupplementalDataSyncState = {\n inProgress: false,\n time: null,\n};\n\nexport const SUPPLEMENTAL_DATA_SYNC_CHANGE = 'SUPPLEMENTAL_DATA_SYNC_CHANGE';\n\nexport type SupplementalDataSyncActionTypes = {\n type: typeof SUPPLEMENTAL_DATA_SYNC_CHANGE;\n data: SupplementalDataSyncState;\n};\n\nexport const SupplementalDataSyncReducer = (\n state: SupplementalDataSyncState | undefined = supplementalDataSyncInitialState,\n action: SupplementalDataSyncActionTypes | any = undefined\n): SupplementalDataSyncState => {\n switch (action.type) {\n case SUPPLEMENTAL_DATA_SYNC_CHANGE:\n return action.data;\n default:\n return state;\n }\n};\n\nexport function useSupplementalDataSyncState() {\n return useSelector((state) => state.supplementalDataSync);\n}\n","import { Dispatch } from 'react';\nimport {\n TLB_USER_AUTH_ERROR,\n TLB_USER_SIGN_IN,\n TLB_USER_SIGN_OUT,\n TLB_USER_SIGN_PROCESS_START,\n TlbUserActionTypes\n} from '../../reducers/tlbUserReducer';\nimport {\n COGNITO_USER_AUTH_ERROR,\n COGNITO_USER_SIGN_IN,\n COGNITO_USER_SIGN_PROCESS_START,\n CognitoUserActionTypes\n} from '../../reducers/cognitoUserReducer';\nimport { Auth } from 'aws-amplify';\nimport { AppEnvironment, getPreferredEnvironment, setPreferredEnvironment } from '../BackendSwitcher';\nimport { ADMIN_LINK_PREFIX, navigateA } from '../../Admin/Utils/LinkPrefix';\nimport { getUser, getUserFromContact } from '../../Datasource/Users/UserDatasource';\nimport { getDbSyncer } from '../../Datasource/LocalDB/DbSyncer';\nimport { User } from '../../Datasource/Users/User';\nimport { executeQuery2 } from '../../Admin/Datasources/AdminDatasource';\nimport { getContactIsCrewable } from '../../Datasource/Contacts/ContactsDatasource';\nimport { CreateContactInput } from '../../API';\nimport { DbCreated } from '../../Datasource/LocalDB/types';\nimport { QueryFactory2 } from '../../Admin/Datasources/QueryFactory';\nimport { contactItemFields } from '../../Datasource/LocalDB/Transformers/contacts';\n\nexport const reauthenticate = async (dispatch: Dispatch): Promise => {\n dispatch({type: TLB_USER_SIGN_PROCESS_START});\n dispatch({type: COGNITO_USER_SIGN_PROCESS_START});\n try {\n const amplifyUser = await Auth.currentAuthenticatedUser();\n const userData = amplifyUser.getSignInUserSession().getAccessToken().decodePayload();\n const cognitoGroups: string[] = userData['cognito:groups'] || [];\n const isAdmin = cognitoGroups.includes('adm');\n const isPilot = cognitoGroups.includes('usr');\n const isTechnician = cognitoGroups.includes('tch');\n const isNotPilot = isAdmin && !(isPilot || isTechnician);\n const isOnPcLike = window.screen.width > 1040;\n const userId: string = amplifyUser.getUsername();\n\n dispatch({type: COGNITO_USER_SIGN_IN, data: {groups: cognitoGroups, id: userId}});\n if (getPreferredEnvironment() !== AppEnvironment.TLB && (isNotPilot || isOnPcLike)) {\n setPreferredEnvironment(AppEnvironment.OPS);\n dispatch({type: TLB_USER_SIGN_OUT});\n getTlbUserDataOnline(dispatch, userId)\n .then((user) => {\n if (user) {\n dispatch({type: TLB_USER_SIGN_IN, data: {user, isAdmin, isPilot, isTechnician}})\n }\n });\n if (!window.location.pathname.startsWith(ADMIN_LINK_PREFIX)) {\n navigateA('/');\n }\n return;\n }\n await tryCreateTlbUser(dispatch, amplifyUser);\n } catch (e) {\n console.error('Error when authenticating: ', e);\n if (e === 'not authenticated') {\n Auth.signOut();\n }\n dispatch({type: TLB_USER_AUTH_ERROR});\n dispatch({type: COGNITO_USER_AUTH_ERROR});\n\n }\n};\n\nconst tryCreateTlbUser = async (dispatch: Dispatch, amplifyUser: any) => {\n const userId = amplifyUser.getUsername();\n const userData = amplifyUser.getSignInUserSession().getAccessToken().decodePayload();\n const cognitoGroups = userData['cognito:groups'] || [];\n const isAdmin = cognitoGroups.includes('adm');\n const isPilot = cognitoGroups.includes('usr');\n const isTechnician = cognitoGroups.includes('tch');\n // try it quickly from cache\n let user = await getUser(userId);\n if (user) {\n dispatch({type: TLB_USER_SIGN_IN, data: {user, isAdmin, isPilot, isTechnician}});\n return;\n }\n // otherwise, wait for full sync\n await getDbSyncer().initComplete();\n user = await getUser(userId);\n if (user) {\n dispatch({type: TLB_USER_SIGN_IN, data: {user, isAdmin, isPilot, isTechnician}});\n return;\n }\n throw new Error(`User ${userId} not found`)\n};\n\n\nconst getTlbUserDataOnline = async (dispatch: Dispatch, userId: string): Promise => {\n const response = await executeQuery2(getListContacsByUserIdQuery, {userId});\n if (response.data.listContactsByUserId.items.length) {\n const userData = response.data.listContactsByUserId.items[0];\n if (getContactIsCrewable(userData)) {\n return getUserFromContact(userData, userId);\n }\n }\n return null;\n};\n\n\ntype GetListContacsByUserIdQueryReturnType = {\n listContactsByUserId: {\n items: (CreateContactInput & DbCreated)[]\n };\n};\n\nconst getListContacsByUserIdQuery: QueryFactory2 = (variables => {\n const query = `\n query ListContactsByUserId(\n $userId: ID!\n ) { \n listContactsByUserId(\n userId: $userId\n limit: 1\n )\n {\n items {\n ${contactItemFields}\n }\n }\n }\n `;\n return {query, variables};\n});\n","import { getDb } from '../LocalDB/LocalDB';\nimport { CreateLogbookRecordInput } from '../../API';\nimport { WithId } from '../LocalDB/types';\nimport { getDbSyncer } from '../LocalDB/DbSyncer';\n\nexport async function getLogbookRecordsByLegId(legId: string): Promise<(CreateLogbookRecordInput & WithId)[]> {\n return await getDb().logbookRecords.where({legId}).toArray();\n}\n\nexport async function putLogbookRecord(record: CreateLogbookRecordInput & WithId) {\n const db = getDb();\n await Promise.all([\n db.logbookRecords.put(record),\n getDbSyncer().markToSync(db.logbookRecords, record.id)\n ]);\n}\n","import { API, graphqlOperation } from \"@aws-amplify/api\";\nimport { loadMoreNotSupported, Resource, wrapPromise } from \"../../Datasource/Resource\";\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport { QueryFactory, QueryFactory2, QueryNextLoadOptions, QueryResult } from './QueryFactory';\n\nconst noop = () => {\n console.error(\"Refreshing data is not supported on getData. Use useAdminResource if you need refresh functionality.\");\n return null;\n};\n\nexport const getData = (queryFactory: QueryFactory, nextToken?: string): Resource> => {\n const response = executeQuery(queryFactory, nextToken);\n return wrapPromise(response, noop, loadMoreNotSupported, 0, 0, 0);\n};\n\nexport const executeQuery = async (queryFactory: QueryFactory, nextToken?: string): Promise> => {\n const query = queryFactory(nextToken);\n return (API.graphql(graphqlOperation(query))) as unknown as Promise>;\n};\n\nexport const executeQuery2 = (queryFactory: QueryFactory2, queryFactoryVariables?: V, options?: O): Promise> => {\n const {query, variables, postProcess} = queryFactory(queryFactoryVariables, options);\n if (query === null) {\n return Promise.resolve({\n data: {} as T,\n errors: null\n });\n }\n const promise = API.graphql(({query, variables})) as unknown as Promise>;\n if (!postProcess) {\n return promise;\n } else {\n return promise.then(postProcess);\n }\n};\n\nexport const executeQuery2WithRepetitions = async (queryFactory: QueryFactory2, queryFactoryVariables: V, options?: O, nextLoadOptions?: QueryNextLoadOptions): Promise> => {\n let variables = queryFactoryVariables;\n let output: QueryResult | undefined = undefined;\n let loops = 0;\n do {\n loops += 1;\n const response = await executeQuery2(queryFactory, variables, options);\n if (nextLoadOptions) {\n const maybeNextVariables = nextLoadOptions.getNextQueryVariables(response, variables);\n output = output\n ? nextLoadOptions.mergeResult(output, response)\n : response;\n if (!maybeNextVariables) {\n return output;\n }\n variables = maybeNextVariables;\n } else {\n return response;\n }\n } while (loops < 100);\n throw new Error('Max limit for executeQuery2WithRepetition reached');\n};\n\nexport const useAdminResource = (query: QueryFactory2, variablesFactory: [() => V, any[]], options?: O, nextLoadOptions?: QueryNextLoadOptions): Resource> => {\n /* eslint-disable react-hooks/exhaustive-deps */\n const variables = useMemo(variablesFactory[0], variablesFactory[1]);\n /* eslint-enable react-hooks/exhaustive-deps */\n const [promise, setPromise] = useState> | null>(null);\n const [refreshId, setRefreshId] = useState(0);\n const promiseFactory = useCallback(() => {\n const promise = executeQuery2(query, variables, options);\n setPromise(promise);\n }, [query, variables, options, setPromise]);\n const onRefresh = useCallback(() => {\n promiseFactory();\n setRefreshId(rId => rId + 1);\n }, [promiseFactory]);\n const onMore = useCallback(async (): Promise => {\n if (!nextLoadOptions) {\n throw new Error('Query did not supply nextLoad parameters');\n }\n if (!promise) {\n throw new Error('Request not yet initialized');\n }\n const data = await promise;\n const nextQueryVariables = nextLoadOptions.getNextQueryVariables(data, variables);\n if (nextQueryVariables !== null) {\n const newPromise = executeQuery2(query, nextQueryVariables, options)\n .then(newData => nextLoadOptions!.mergeResult(data, newData));\n setRefreshId(rId => rId + 1);\n setPromise(newPromise);\n return true;\n } else {\n return false;\n }\n }, [promise, nextLoadOptions, setRefreshId, setPromise, query, options, variables]);\n\n useEffect(() => {\n onRefresh();\n }, [onRefresh]);\n\n const neverPromise = useMemo(() => new Promise>(() => null), []);\n const [resource, setResource] = useState>>(wrapPromise(neverPromise, onRefresh, onMore, -1, 0, refreshId));\n useEffect(() => {\n let cancelled = false;\n if (promise !== null) {\n promise.then(() => {\n if (cancelled) {\n return;\n }\n if (resource.refreshId !== refreshId) {\n if (resource.promise !== promise) {\n setResource(wrapPromise(promise, onRefresh, onMore, 1, 1, refreshId))\n }\n }\n });\n return () => {\n cancelled = true;\n }\n }\n }, [promise, onRefresh, onMore, refreshId, resource, setResource]);\n useEffect(() => {\n if (nextLoadOptions && nextLoadOptions.autoload && promise !== null) {\n onMore();\n }\n }, [nextLoadOptions, promise, onMore]);\n return resource;\n};\n\nexport const useMappedResource = (source: Resource, mapper: (source: S) => T): Resource => {\n return useMemo(() => {\n let mapped: T | null = null;\n let mappedRefreshId: number | null = null;\n return {\n ...source,\n read(): T {\n if (!mapped || mappedRefreshId !== source.refreshId) {\n const original = source.read();\n mapped = mapper(original);\n mappedRefreshId = source.refreshId;\n }\n return mapped;\n },\n readMaxQuality(): T {\n return mapper(source.readMaxQuality());\n },\n get promise() {\n return source.promise.then(mapper);\n },\n }\n }, [source, mapper]);\n};\n","import { MaintenanceTaskCalendarUnit } from '../Admin/MaintenancePrograms/MaintenanceTaskCalendarUnit';\nimport { roundNumber } from './numbers';\n\nexport const decimalToHoursMinutes = (input: number): string => {\n let hours = Math.floor(input);\n let minutes = Math.abs(Math.round((input % 1) * 60)); // abs to prevent double minus, as in -1:-05 -> -1:05\n if (minutes >= 60) {\n hours += 1;\n minutes -= 60;\n }\n return `${hours}:${minutes.toString().padStart(2, '0')}`;\n};\n\nconst DAY = 86400 * 1e3;\n\n/**\n * Sets date of first date in datesList to be same as referenceDate. All other dates in datesLists will be forced\n * to be in ascending order and less than 24 hours apart, ie. when #1 == 23:00 and #2 == 01:00, #2 will be a day after\n * #1.\n * @param referenceDate\n * @param datesList\n */\nexport const setTimesToStartDate = (referenceDate: Date, ...datesList: (Date | null)[]): void => {\n let lastValidDate = referenceDate;\n datesList.forEach((date) => {\n if (date === null) {\n return;\n }\n while (date.getTime() < lastValidDate.getTime()) {\n date.setTime(date.getTime() + DAY);\n }\n while (date.getTime() >= lastValidDate.getTime() + DAY) {\n date.setTime(date.getTime() - DAY);\n }\n lastValidDate = date;\n });\n};\n\nexport const getMidnightDate = (date: Date): Date => {\n const midnightUTC = new Date(date.getTime());\n midnightUTC.setUTCHours(0, 0, 0, 0);\n return midnightUTC;\n};\n\nexport const dateDifferenceToHumanHoursMinutes = (d1: Date, d2: Date): string => {\n return minutesToHumanHoursMinutes(getMinutesDiffFromDates(d1, d2));\n};\n\nexport const getMinutesDiffFromDates = (d1: Date, d2: Date) => {\n return Math.floor(d2.getTime() / 60000) - Math.floor(d1.getTime() / 60000);\n};\n\nexport const minutesToHumanHoursMinutes = (minutesDiff: number): string => {\n const hours = Math.floor(minutesDiff / 60);\n const minutes = minutesDiff % 60;\n return hours.toString() + ':' + minutes.toString().padStart(2, '0');\n};\n\nexport const minutesToHumanDaysHoursMinutes = (minutesDiff: number, daysOnlyWhenAbove = 0): string => {\n const days = Math.floor(minutesDiff / (60 * 24));\n if (days > daysOnlyWhenAbove) {\n const remainingHours = Math.floor((minutesDiff % (60 * 24)) / 60);\n return `${days}d ${remainingHours}h`;\n } else {\n return minutesToHumanHoursMinutes(minutesDiff);\n }\n};\n\nexport const getDatesOverlap = (start1: Date, end1: Date, start2: Date, end2: Date): boolean => {\n const isBefore = start1 < start2 && end1 <= start2;\n const isAfter = start1 >= end2 && end1 > end2;\n return !(isBefore || isAfter);\n};\n\nexport const getValidityClassName = (validity: Date): string => {\n const now = Date.now();\n if (validity.getTime() < now) {\n return 'danger';\n }\n if (validity.getTime() < now + 30 * 86400 * 1e3) {\n // 1 month\n return 'warning';\n }\n return 'success';\n};\n\nexport const toDateString = (date: Date): string => {\n return date.toLocaleDateString('en-GB', { timeZone: 'Etc/UTC' });\n};\n\nexport const toDateStringShort = (date: Date): string => {\n return date.toLocaleDateString('en-GB', { timeZone: 'Etc/UTC' }).substr(0, 5);\n};\n\nexport const toDateTimeString = (date: Date): string => {\n return date.toLocaleString('en-GB', { timeZone: 'Etc/UTC' });\n};\n\nexport const toTimeString = (date: Date): string => {\n return date.toLocaleTimeString('en-GB', { timeZone: 'Etc/UTC' });\n};\n\nexport const toTimeStringShort = (date: Date, timeZone?: string): string => {\n timeZone = timeZone || 'Etc/UTC';\n return date.toLocaleTimeString('en-GB', { timeZone }).substr(0, 5);\n};\n\nexport const toTimeStringShortRounded = (date: Date): string => {\n let h = date.getUTCHours();\n let m = date.getUTCMinutes();\n if (date.getUTCSeconds() >= 30) {\n m += 1;\n }\n if (m >= 60) {\n h += 1;\n m = 0;\n }\n if (h > 24) {\n h = h % 24;\n }\n return h.toString().padStart(2, '0') + ':' + m.toString().padStart(2, '0');\n};\n\nexport const VALIDITY_PERIOD_YEAR = 'year';\nexport const VALIDITY_PERIOD_MONTH = 'month';\nexport const VALIDITY_PERIOD_DAY = 'day';\nexport type ValidityPeriod = typeof VALIDITY_PERIOD_YEAR | typeof VALIDITY_PERIOD_MONTH | typeof VALIDITY_PERIOD_DAY;\nexport const getDateFromDate = (\n referenceDate: Date,\n length: number,\n unit: ValidityPeriod | MaintenanceTaskCalendarUnit,\n untilEnd: boolean,\n fromStart?: boolean\n): Date => {\n const date = new Date(referenceDate.getTime());\n switch (unit) {\n case VALIDITY_PERIOD_YEAR:\n date.setUTCFullYear(date.getUTCFullYear() + length);\n break;\n case VALIDITY_PERIOD_MONTH:\n date.setUTCMonth(date.getUTCMonth() + length);\n break;\n case VALIDITY_PERIOD_DAY:\n date.setUTCDate(date.getUTCDate() + length);\n break;\n }\n if (untilEnd) {\n switch (unit) {\n case VALIDITY_PERIOD_YEAR:\n date.setUTCMonth(11, 31);\n date.setUTCHours(12, 0, 0, 0);\n break;\n case VALIDITY_PERIOD_MONTH:\n date.setUTCMonth(date.getUTCMonth() + 1, 0);\n date.setUTCHours(12, 0, 0, 0);\n break;\n case VALIDITY_PERIOD_DAY:\n date.setUTCHours(23, 59, 59, 0);\n break;\n }\n }\n if (fromStart) {\n switch (unit) {\n case VALIDITY_PERIOD_YEAR:\n date.setUTCMonth(0, 1);\n date.setUTCHours(12, 0, 0, 0);\n break;\n case VALIDITY_PERIOD_MONTH:\n date.setUTCDate(1);\n date.setUTCHours(12, 0, 0, 0);\n break;\n case VALIDITY_PERIOD_DAY:\n date.setUTCHours(0, 0, 0, 0);\n break;\n }\n }\n return date;\n};\n\nexport function timestampToDate(timestampSeconds: number): Date {\n const out = new Date();\n out.setTime(timestampSeconds * 1e3);\n return out;\n}\n\nexport function getTurnaroundTimeHuman(date1: Date, date2: Date): string {\n const turnaroundMinutes = Math.round(Math.abs(date2.getTime() - date1.getTime()) / 1e3 / 60);\n const turnaroundDays = Math.floor(turnaroundMinutes / 60 / 24);\n const turnaroundHours = Math.floor(turnaroundMinutes / 60) % 24;\n const turnaroundMinutesRemainder = turnaroundMinutes % 60;\n if (turnaroundDays) {\n return `${turnaroundDays}d ${turnaroundHours}h`;\n } else if (turnaroundHours) {\n return `${turnaroundHours}h ${turnaroundMinutesRemainder}m`;\n } else {\n return `${turnaroundMinutesRemainder}m`;\n }\n}\n\nexport function minutesToTimeString(minutes: number): string {\n const hours = Math.floor(minutes / 60);\n const remainingMinutes = roundNumber(minutes % 60, 0);\n\n return `${hours.toString().padStart(2, '0')}:${remainingMinutes.toString().padStart(2, '0')}`;\n}\n","export enum FlightOps {\n CAT = 'CAT',\n SPO = 'SPO',\n ATO_NCC = 'ATO/NCC',\n ATO_NCO = 'ATO/NCO',\n NCC = 'NCC',\n NCO = 'NCO',\n}\n\nexport const getAllFlightOpsTypes = (): FlightOps[] => [\n FlightOps.CAT,\n FlightOps.ATO_NCC,\n FlightOps.ATO_NCO,\n FlightOps.NCC,\n FlightOps.NCO,\n FlightOps.SPO,\n];\n\nexport const stringIsOps = (maybeOps: string): maybeOps is FlightOps => {\n return getAllFlightOpsTypes().includes(maybeOps as any);\n};\n\nexport const isOpsAto = (ops: FlightOps) => ops === FlightOps.ATO_NCO || ops === FlightOps.ATO_NCC;\n\nexport function isOpsCommercial(ops: FlightOps) {\n return isOpsAto(ops) || ops === FlightOps.CAT;\n}\n\nexport function isOpsCommercialOrComplex(ops: FlightOps) {\n return isOpsCommercial(ops) || ops === FlightOps.NCC;\n}\n\nexport function isOpsCatOrComplex(ops: FlightOps) {\n return ops === FlightOps.CAT || ops === FlightOps.NCC;\n}\n\nexport const flightOpsLabels = new Map([\n [FlightOps.CAT, 'CAT'],\n [FlightOps.SPO, 'SPO'],\n [FlightOps.ATO_NCC, 'ATO/NCC'],\n [FlightOps.ATO_NCO, 'ATO/NCO'],\n [FlightOps.NCC, 'NCC'],\n [FlightOps.NCO, 'NCO'],\n]);\n","import React, { FunctionComponent } from \"react\";\nimport GenericField, { GenericFieldProps } from \"./GenericField\";\nimport { formClasses } from \"../../utils/BEM\";\n\ninterface InputCheckboxFieldProps extends Omit {\n inputLabel: string;\n value: boolean;\n onChange: (newValue: boolean) => void;\n}\n\nconst InputCheckboxField: FunctionComponent = (props) => {\n const onChange = (change: string) => {\n props.onChange(change !== '1');\n };\n const value = props.value ? '1' : '';\n return {\n const inputModifiers = {\n ...props.inputModifiers,\n disabled: !!controlProps.disabled\n };\n return (\n
\n
\n \n \n {props.inputLabel}\n \n
\n
\n );\n }}\n controlModifiers={{...props.controlModifiers, ...{'checkbox-list': true}}}\n />\n};\n\nexport default InputCheckboxField;\n","export const numberToPrecision = (value: number, precision: number, forceZeroes?: boolean): string => {\n const stringy = value.toString();\n if ((stringy.includes('.') && stringy.split('.').pop()!.length > precision) || forceZeroes) {\n return value.toFixed(precision);\n } else {\n return stringy;\n }\n};\n","import React, { FunctionComponent } from \"react\";\nimport { formClasses } from \"../../utils/BEM\";\n\nexport interface Suggestable {\n toString: () => string;\n readonly value?: string;\n readonly classModifiers?: string[];\n}\n\nexport class SuggestionValue implements Suggestable {\n readonly value: string;\n readonly classModifiers: string[] | undefined;\n private _string: string;\n\n constructor(string: string, value: string, classModifiers?: string[]) {\n this._string = string;\n this.value = value;\n this.classModifiers = classModifiers;\n }\n\n toString() {\n return this._string;\n }\n}\n\ntype SuggesterProps = {\n options: Suggestable[];\n onSelected: (value: string, index: number) => void;\n classModifiers?: string[];\n negativeTabIndex?: boolean;\n}\n\nconst Suggester: FunctionComponent = ({options, onSelected, classModifiers, negativeTabIndex}) => {\n return (\n
\n {options.map((option, i) => (\n \n ))}\n
\n )\n};\n\nexport default Suggester;\n","export enum CrewRole {\n PF = 'PF',\n PM = 'PM',\n FI = 'FI',\n FE = 'FE',\n LTI = 'LTI',\n LTE = 'LTE',\n studentSolo = 'STUDENT-SOLO',\n studentDual = 'STUDENT-DUAL',\n SPIC = 'SPIC',\n PICUS = 'PICUS',\n SICUS = 'SICUS',\n supervisinginstructor = 'SUPERVISING-INSTRUCTOR',\n}\n\n// back-compatibility\nexport const CREW_ROLE_PF = CrewRole.PF;\nexport const CREW_ROLE_PM = CrewRole.PM;\n\nexport const CREW_ROLE_FI = CrewRole.FI;\nexport const CREW_ROLE_FE = CrewRole.FE;\n\nexport const CREW_ROLE_LTI = CrewRole.LTI;\nexport const CREW_ROLE_LTE = CrewRole.LTE;\n\nexport const CREW_ROLE_STUDENT_SOLO = CrewRole.studentSolo;\nexport const CREW_ROLE_STUDENT_DUAL = CrewRole.studentDual;\nexport const CREW_ROLE_SPIC = CrewRole.SPIC;\nexport const CREW_ROLE_PICUS = CrewRole.PICUS;\nexport const CREW_ROLE_SICUS = CrewRole.SICUS;\nexport const CREW_ROLE_SUPERVISING_INSTRUCTOR = CrewRole.supervisinginstructor;\n\nexport type CrewRoleTypes =\n | typeof CREW_ROLE_PF\n | typeof CREW_ROLE_PM\n | typeof CREW_ROLE_FI\n | typeof CREW_ROLE_FE\n | typeof CREW_ROLE_LTI\n | typeof CREW_ROLE_LTE\n | typeof CREW_ROLE_STUDENT_SOLO\n | typeof CREW_ROLE_STUDENT_DUAL\n | typeof CREW_ROLE_SPIC\n | typeof CREW_ROLE_PICUS\n | typeof CREW_ROLE_SICUS\n | typeof CREW_ROLE_SUPERVISING_INSTRUCTOR;\n\nexport const getAllRoles = (): CrewRoleTypes[] => [\n CREW_ROLE_PF,\n CREW_ROLE_PM,\n CREW_ROLE_FI,\n CREW_ROLE_FE,\n CREW_ROLE_LTI,\n CREW_ROLE_LTE,\n CREW_ROLE_STUDENT_SOLO,\n CREW_ROLE_STUDENT_DUAL,\n CREW_ROLE_SPIC,\n CREW_ROLE_PICUS,\n CREW_ROLE_SICUS,\n CREW_ROLE_SUPERVISING_INSTRUCTOR,\n];\n\nexport const getPfPmRoles = (): CrewRoleTypes[] => [CREW_ROLE_PF, CREW_ROLE_PM];\nexport const getPicRoles = (isAto: boolean, isCatAble: boolean): CrewRoleTypes[] => {\n if (isAto) {\n return [CREW_ROLE_STUDENT_SOLO, CREW_ROLE_FI, CREW_ROLE_FE];\n } else if (isCatAble) {\n return [CREW_ROLE_LTI, CREW_ROLE_LTE];\n } else {\n return [];\n }\n};\nexport const getSicRoles = (isAto: boolean, picRoles: CrewRoleTypes[], isMcc: boolean): CrewRoleTypes[] => {\n if (isAto) {\n if (picRoles.some(isRoleInstructorLike)) {\n return [CREW_ROLE_STUDENT_DUAL, CREW_ROLE_SPIC];\n } else if (picRoles.includes(CREW_ROLE_STUDENT_SOLO)) {\n return [CREW_ROLE_SUPERVISING_INSTRUCTOR];\n } else {\n return [];\n }\n } else if (picRoles.some(isRoleLineTrainingInstructorLike)) {\n if (isMcc) {\n return [CREW_ROLE_PICUS, CREW_ROLE_SICUS];\n } else {\n return [CREW_ROLE_PICUS];\n }\n } else {\n return [];\n }\n};\n\nexport const isRoleInstructorLike = (role: CrewRoleTypes): boolean => {\n return [CREW_ROLE_FI, CREW_ROLE_FE].includes(role);\n};\n\nexport const isRoleLineTrainingInstructorLike = (role: CrewRoleTypes): boolean => {\n return [CREW_ROLE_LTI, CREW_ROLE_LTE].includes(role);\n};\n","/* tslint:disable */\n/* eslint-disable */\n// this is an auto generated file. This will be overwritten\n\nexport const userSetForgottenPassword = /* GraphQL */ `\n mutation UserSetForgottenPassword($userId: ID!, $newPassword: String!) {\n userSetForgottenPassword(userId: $userId, newPassword: $newPassword) {\n statusCode\n responseData\n }\n }\n`;\nexport const userDisable = /* GraphQL */ `\n mutation UserDisable($userId: ID!) {\n userDisable(userId: $userId) {\n statusCode\n responseData\n }\n }\n`;\nexport const userEnable = /* GraphQL */ `\n mutation UserEnable($userId: ID!) {\n userEnable(userId: $userId) {\n statusCode\n responseData\n }\n }\n`;\nexport const userCreate = /* GraphQL */ `\n mutation UserCreate($email: String!, $tempPassword: String!, $phone: String) {\n userCreate(email: $email, tempPassword: $tempPassword, phone: $phone) {\n statusCode\n responseData\n }\n }\n`;\nexport const userAddToGroup = /* GraphQL */ `\n mutation UserAddToGroup($userId: ID!, $groupName: String!) {\n userAddToGroup(userId: $userId, groupName: $groupName) {\n statusCode\n responseData\n }\n }\n`;\nexport const userRemoveFromGroup = /* GraphQL */ `\n mutation UserRemoveFromGroup($userId: ID!, $groupName: String!) {\n userRemoveFromGroup(userId: $userId, groupName: $groupName) {\n statusCode\n responseData\n }\n }\n`;\nexport const sendToBackup = /* GraphQL */ `\n mutation SendToBackup($contactDocumentId: ID, $documentSnippetId: ID) {\n sendToBackup(\n contactDocumentId: $contactDocumentId\n documentSnippetId: $documentSnippetId\n ) {\n success\n message\n }\n }\n`;\nexport const createAirportDatabaseExport = /* GraphQL */ `\n mutation CreateAirportDatabaseExport {\n createAirportDatabaseExport {\n success\n message\n }\n }\n`;\nexport const sendEmail = /* GraphQL */ `\n mutation SendEmail(\n $toAddresses: [String!]!\n $ccAddresses: [String!]\n $bccAddresses: [String!]\n $subject: String!\n $messageHtml: String!\n $fromAddress: String!\n $messageText: String\n $attachmentKeys: [String!]\n $attachmentNames: [String]\n $replyToAddresses: [String!]\n ) {\n sendEmail(\n toAddresses: $toAddresses\n ccAddresses: $ccAddresses\n bccAddresses: $bccAddresses\n subject: $subject\n messageHtml: $messageHtml\n fromAddress: $fromAddress\n messageText: $messageText\n attachmentKeys: $attachmentKeys\n attachmentNames: $attachmentNames\n replyToAddresses: $replyToAddresses\n ) {\n success\n message\n }\n }\n`;\nexport const sendSms = /* GraphQL */ `\n mutation SendSms($toNumbers: [String!]!, $content: String!) {\n sendSms(toNumbers: $toNumbers, content: $content) {\n success\n message\n }\n }\n`;\nexport const createCrew = /* GraphQL */ `\n mutation CreateCrew(\n $input: CreateCrewInput!\n $condition: ModelCrewConditionInput\n ) {\n createCrew(input: $input, condition: $condition) {\n id\n deleted\n userId\n name\n homeBaseIcaos\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateCrew = /* GraphQL */ `\n mutation UpdateCrew(\n $input: UpdateCrewInput!\n $condition: ModelCrewConditionInput\n ) {\n updateCrew(input: $input, condition: $condition) {\n id\n deleted\n userId\n name\n homeBaseIcaos\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteCrew = /* GraphQL */ `\n mutation DeleteCrew(\n $input: DeleteCrewInput!\n $condition: ModelCrewConditionInput\n ) {\n deleteCrew(input: $input, condition: $condition) {\n id\n deleted\n userId\n name\n homeBaseIcaos\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createUser = /* GraphQL */ `\n mutation CreateUser(\n $input: CreateUserInput!\n $condition: ModelUserConditionInput\n ) {\n createUser(input: $input, condition: $condition) {\n id\n deleted\n name\n type\n aircraftId\n legsPic {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n legsSic {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n dutyItems {\n items {\n id\n editableByUserIds\n deleted\n userId\n crewId\n state\n dutyPeriodId\n forceRestAfter\n note\n type\n startDate\n endDate\n sectorCount\n endPlaceIcao\n blockTimeMinutes\n plannedFdpExtension\n flightLegIds\n logbookRecordIds\n linkedDutyItemIds\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateUser = /* GraphQL */ `\n mutation UpdateUser(\n $input: UpdateUserInput!\n $condition: ModelUserConditionInput\n ) {\n updateUser(input: $input, condition: $condition) {\n id\n deleted\n name\n type\n aircraftId\n legsPic {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n legsSic {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n dutyItems {\n items {\n id\n editableByUserIds\n deleted\n userId\n crewId\n state\n dutyPeriodId\n forceRestAfter\n note\n type\n startDate\n endDate\n sectorCount\n endPlaceIcao\n blockTimeMinutes\n plannedFdpExtension\n flightLegIds\n logbookRecordIds\n linkedDutyItemIds\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteUser = /* GraphQL */ `\n mutation DeleteUser(\n $input: DeleteUserInput!\n $condition: ModelUserConditionInput\n ) {\n deleteUser(input: $input, condition: $condition) {\n id\n deleted\n name\n type\n aircraftId\n legsPic {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n legsSic {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n dutyItems {\n items {\n id\n editableByUserIds\n deleted\n userId\n crewId\n state\n dutyPeriodId\n forceRestAfter\n note\n type\n startDate\n endDate\n sectorCount\n endPlaceIcao\n blockTimeMinutes\n plannedFdpExtension\n flightLegIds\n logbookRecordIds\n linkedDutyItemIds\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createAircraft = /* GraphQL */ `\n mutation CreateAircraft(\n $input: CreateAircraftInput!\n $condition: ModelAircraftConditionInput\n ) {\n createAircraft(input: $input, condition: $condition) {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n squawks {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n title\n description\n companyDescription\n airworthinessAffected\n deferralDate\n deferralText\n reviewedDate\n reviewedName\n reviewedId\n releaseDate\n releaseAircraftFlightTime\n releaseName\n releaseLicenseNumber\n releaseText\n releaseSignature\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n countableChanges {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n aircraftDocuments {\n items {\n id\n deleted\n createdAt\n aircraftId\n contentKey\n name\n documentNumber\n issueDate\n validUntilDate\n validUntilDateToleranceSeconds\n validUntilCountableTypes\n validUntilCountableValues\n validUntilCountableValuesTolerance\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n items {\n id\n deleted\n createdAt\n aircraftId\n name\n validUntilDate\n validUntilDateToleranceSeconds\n validUntilCountableTypes\n validUntilCountableValues\n validUntilCountableValuesTolerance\n customWarningRules\n limitExtensionRules\n maintenanceProgramTaskWid\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n items {\n id\n deleted\n aircraftId\n createdAt\n maintenanceProgramId\n maintenanceRecordId\n maintenanceEventId\n intervals\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n items {\n id\n createdAt\n deleted\n aircraftId\n maintenanceEventId\n maintenanceStartDate\n data\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n maintenanceRecords {\n items {\n id\n createdAt\n deleted\n aircraftId\n relatedReleaseToServiceIds\n relatedSquawkIds\n title\n hasReleaseToService\n crsFlightDocumentIds\n workReportFlightDocumentIds\n camoOrderFlightDocumentIds\n beforeMaintenanceCountableChangeId\n maintenanceCountableChangeId\n beforeMaintenanceCountableValuesOverrides\n afterMaintenanceCountableValuesOverrides\n displayInAircraftLogIds\n displayInAircraftLogTypes\n maintenanceIntervalChangeData\n maintenanceEventId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n maintenanceTasks {\n nextToken\n startedAt\n }\n aircrafts {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n squawkId\n deferralId\n maintenanceRecordId\n createdAt\n releaseType\n releasedByName\n releasedByOrganization\n releasedByLicenseNumber\n releasedBySignature\n text\n aircraftFlightTime\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n items {\n id\n title\n type\n reservationId\n aircraftId\n contactId\n externalId\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n settlementTickets {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n priceProfileApplications {\n items {\n id\n contactId\n aircraftId\n priceProfileId\n isPriorityForAircraft\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n costItems {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n acronym\n unit\n rate\n currency\n amountInDocumentCurrency\n airportIcaoOrDesc\n note\n isAddedToTicket\n documentRecordId\n legId\n aircraftId\n ticketId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateAircraft = /* GraphQL */ `\n mutation UpdateAircraft(\n $input: UpdateAircraftInput!\n $condition: ModelAircraftConditionInput\n ) {\n updateAircraft(input: $input, condition: $condition) {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n squawks {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n title\n description\n companyDescription\n airworthinessAffected\n deferralDate\n deferralText\n reviewedDate\n reviewedName\n reviewedId\n releaseDate\n releaseAircraftFlightTime\n releaseName\n releaseLicenseNumber\n releaseText\n releaseSignature\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n countableChanges {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n aircraftDocuments {\n items {\n id\n deleted\n createdAt\n aircraftId\n contentKey\n name\n documentNumber\n issueDate\n validUntilDate\n validUntilDateToleranceSeconds\n validUntilCountableTypes\n validUntilCountableValues\n validUntilCountableValuesTolerance\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n items {\n id\n deleted\n createdAt\n aircraftId\n name\n validUntilDate\n validUntilDateToleranceSeconds\n validUntilCountableTypes\n validUntilCountableValues\n validUntilCountableValuesTolerance\n customWarningRules\n limitExtensionRules\n maintenanceProgramTaskWid\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n items {\n id\n deleted\n aircraftId\n createdAt\n maintenanceProgramId\n maintenanceRecordId\n maintenanceEventId\n intervals\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n items {\n id\n createdAt\n deleted\n aircraftId\n maintenanceEventId\n maintenanceStartDate\n data\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n maintenanceRecords {\n items {\n id\n createdAt\n deleted\n aircraftId\n relatedReleaseToServiceIds\n relatedSquawkIds\n title\n hasReleaseToService\n crsFlightDocumentIds\n workReportFlightDocumentIds\n camoOrderFlightDocumentIds\n beforeMaintenanceCountableChangeId\n maintenanceCountableChangeId\n beforeMaintenanceCountableValuesOverrides\n afterMaintenanceCountableValuesOverrides\n displayInAircraftLogIds\n displayInAircraftLogTypes\n maintenanceIntervalChangeData\n maintenanceEventId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n maintenanceTasks {\n nextToken\n startedAt\n }\n aircrafts {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n squawkId\n deferralId\n maintenanceRecordId\n createdAt\n releaseType\n releasedByName\n releasedByOrganization\n releasedByLicenseNumber\n releasedBySignature\n text\n aircraftFlightTime\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n items {\n id\n title\n type\n reservationId\n aircraftId\n contactId\n externalId\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n settlementTickets {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n priceProfileApplications {\n items {\n id\n contactId\n aircraftId\n priceProfileId\n isPriorityForAircraft\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n costItems {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n acronym\n unit\n rate\n currency\n amountInDocumentCurrency\n airportIcaoOrDesc\n note\n isAddedToTicket\n documentRecordId\n legId\n aircraftId\n ticketId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteAircraft = /* GraphQL */ `\n mutation DeleteAircraft(\n $input: DeleteAircraftInput!\n $condition: ModelAircraftConditionInput\n ) {\n deleteAircraft(input: $input, condition: $condition) {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n squawks {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n title\n description\n companyDescription\n airworthinessAffected\n deferralDate\n deferralText\n reviewedDate\n reviewedName\n reviewedId\n releaseDate\n releaseAircraftFlightTime\n releaseName\n releaseLicenseNumber\n releaseText\n releaseSignature\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n countableChanges {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n aircraftDocuments {\n items {\n id\n deleted\n createdAt\n aircraftId\n contentKey\n name\n documentNumber\n issueDate\n validUntilDate\n validUntilDateToleranceSeconds\n validUntilCountableTypes\n validUntilCountableValues\n validUntilCountableValuesTolerance\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n items {\n id\n deleted\n createdAt\n aircraftId\n name\n validUntilDate\n validUntilDateToleranceSeconds\n validUntilCountableTypes\n validUntilCountableValues\n validUntilCountableValuesTolerance\n customWarningRules\n limitExtensionRules\n maintenanceProgramTaskWid\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n items {\n id\n deleted\n aircraftId\n createdAt\n maintenanceProgramId\n maintenanceRecordId\n maintenanceEventId\n intervals\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n items {\n id\n createdAt\n deleted\n aircraftId\n maintenanceEventId\n maintenanceStartDate\n data\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n maintenanceRecords {\n items {\n id\n createdAt\n deleted\n aircraftId\n relatedReleaseToServiceIds\n relatedSquawkIds\n title\n hasReleaseToService\n crsFlightDocumentIds\n workReportFlightDocumentIds\n camoOrderFlightDocumentIds\n beforeMaintenanceCountableChangeId\n maintenanceCountableChangeId\n beforeMaintenanceCountableValuesOverrides\n afterMaintenanceCountableValuesOverrides\n displayInAircraftLogIds\n displayInAircraftLogTypes\n maintenanceIntervalChangeData\n maintenanceEventId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n maintenanceTasks {\n nextToken\n startedAt\n }\n aircrafts {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n squawkId\n deferralId\n maintenanceRecordId\n createdAt\n releaseType\n releasedByName\n releasedByOrganization\n releasedByLicenseNumber\n releasedBySignature\n text\n aircraftFlightTime\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n items {\n id\n title\n type\n reservationId\n aircraftId\n contactId\n externalId\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n settlementTickets {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n priceProfileApplications {\n items {\n id\n contactId\n aircraftId\n priceProfileId\n isPriorityForAircraft\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n costItems {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n acronym\n unit\n rate\n currency\n amountInDocumentCurrency\n airportIcaoOrDesc\n note\n isAddedToTicket\n documentRecordId\n legId\n aircraftId\n ticketId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createAircraftType = /* GraphQL */ `\n mutation CreateAircraftType(\n $input: CreateAircraftTypeInput!\n $condition: ModelAircraftTypeConditionInput\n ) {\n createAircraftType(input: $input, condition: $condition) {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateAircraftType = /* GraphQL */ `\n mutation UpdateAircraftType(\n $input: UpdateAircraftTypeInput!\n $condition: ModelAircraftTypeConditionInput\n ) {\n updateAircraftType(input: $input, condition: $condition) {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteAircraftType = /* GraphQL */ `\n mutation DeleteAircraftType(\n $input: DeleteAircraftTypeInput!\n $condition: ModelAircraftTypeConditionInput\n ) {\n deleteAircraftType(input: $input, condition: $condition) {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createFlight = /* GraphQL */ `\n mutation CreateFlight(\n $input: CreateFlightInput!\n $condition: ModelFlightConditionInput\n ) {\n createFlight(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n squawks {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n title\n description\n companyDescription\n airworthinessAffected\n deferralDate\n deferralText\n reviewedDate\n reviewedName\n reviewedId\n releaseDate\n releaseAircraftFlightTime\n releaseName\n releaseLicenseNumber\n releaseText\n releaseSignature\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n countableChanges {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n legs {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n mediaFiles {\n items {\n id\n createdAt\n updatedAt\n uploadedAt\n removed\n readableByUserIds\n month\n name\n type\n contentKey\n fileData\n status\n aircraftId\n flightId\n legId\n contactId\n flightDocumentId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateFlight = /* GraphQL */ `\n mutation UpdateFlight(\n $input: UpdateFlightInput!\n $condition: ModelFlightConditionInput\n ) {\n updateFlight(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n squawks {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n title\n description\n companyDescription\n airworthinessAffected\n deferralDate\n deferralText\n reviewedDate\n reviewedName\n reviewedId\n releaseDate\n releaseAircraftFlightTime\n releaseName\n releaseLicenseNumber\n releaseText\n releaseSignature\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n countableChanges {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n legs {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n mediaFiles {\n items {\n id\n createdAt\n updatedAt\n uploadedAt\n removed\n readableByUserIds\n month\n name\n type\n contentKey\n fileData\n status\n aircraftId\n flightId\n legId\n contactId\n flightDocumentId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteFlight = /* GraphQL */ `\n mutation DeleteFlight(\n $input: DeleteFlightInput!\n $condition: ModelFlightConditionInput\n ) {\n deleteFlight(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n squawks {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n title\n description\n companyDescription\n airworthinessAffected\n deferralDate\n deferralText\n reviewedDate\n reviewedName\n reviewedId\n releaseDate\n releaseAircraftFlightTime\n releaseName\n releaseLicenseNumber\n releaseText\n releaseSignature\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n countableChanges {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n legs {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n mediaFiles {\n items {\n id\n createdAt\n updatedAt\n uploadedAt\n removed\n readableByUserIds\n month\n name\n type\n contentKey\n fileData\n status\n aircraftId\n flightId\n legId\n contactId\n flightDocumentId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createLeg = /* GraphQL */ `\n mutation CreateLeg(\n $input: CreateLegInput!\n $condition: ModelLegConditionInput\n ) {\n createLeg(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n reservationData\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservationCode\n flightType\n quotationId\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n avinodeRfqId\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n notifications\n ticketInfo\n tickets {\n nextToken\n startedAt\n }\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n upliftCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n countableChanges {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n squawks {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n title\n description\n companyDescription\n airworthinessAffected\n deferralDate\n deferralText\n reviewedDate\n reviewedName\n reviewedId\n releaseDate\n releaseAircraftFlightTime\n releaseName\n releaseLicenseNumber\n releaseText\n releaseSignature\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n externalDocuments {\n items {\n id\n createdAt\n identifyingData\n contentData\n flightDocumentId\n flightId\n legId\n reservationId\n reservationEventId\n notIdentified\n contentKey\n ocrJobId\n deleted\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n costItems {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n acronym\n unit\n rate\n currency\n amountInDocumentCurrency\n airportIcaoOrDesc\n note\n isAddedToTicket\n documentRecordId\n legId\n aircraftId\n ticketId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n legs {\n nextToken\n startedAt\n }\n mediaFiles {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n billingData\n ticketId\n ticket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n customerAccountId\n customerAccount {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n description\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n legs {\n nextToken\n startedAt\n }\n settlementTicketLegs {\n nextToken\n startedAt\n }\n accountingMonthId\n accountingMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n isChildTicket\n parentTicketId\n childTickets {\n nextToken\n startedAt\n }\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentCostItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n settlementTicketId\n settlementTicket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n customerAccountId\n customerAccount {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n description\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n legs {\n nextToken\n startedAt\n }\n settlementTicketLegs {\n nextToken\n startedAt\n }\n accountingMonthId\n accountingMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n isChildTicket\n parentTicketId\n childTickets {\n nextToken\n startedAt\n }\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentCostItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateLeg = /* GraphQL */ `\n mutation UpdateLeg(\n $input: UpdateLegInput!\n $condition: ModelLegConditionInput\n ) {\n updateLeg(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n reservationData\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservationCode\n flightType\n quotationId\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n avinodeRfqId\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n notifications\n ticketInfo\n tickets {\n nextToken\n startedAt\n }\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n upliftCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n countableChanges {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n squawks {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n title\n description\n companyDescription\n airworthinessAffected\n deferralDate\n deferralText\n reviewedDate\n reviewedName\n reviewedId\n releaseDate\n releaseAircraftFlightTime\n releaseName\n releaseLicenseNumber\n releaseText\n releaseSignature\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n externalDocuments {\n items {\n id\n createdAt\n identifyingData\n contentData\n flightDocumentId\n flightId\n legId\n reservationId\n reservationEventId\n notIdentified\n contentKey\n ocrJobId\n deleted\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n costItems {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n acronym\n unit\n rate\n currency\n amountInDocumentCurrency\n airportIcaoOrDesc\n note\n isAddedToTicket\n documentRecordId\n legId\n aircraftId\n ticketId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n legs {\n nextToken\n startedAt\n }\n mediaFiles {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n billingData\n ticketId\n ticket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n customerAccountId\n customerAccount {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n description\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n legs {\n nextToken\n startedAt\n }\n settlementTicketLegs {\n nextToken\n startedAt\n }\n accountingMonthId\n accountingMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n isChildTicket\n parentTicketId\n childTickets {\n nextToken\n startedAt\n }\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentCostItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n settlementTicketId\n settlementTicket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n customerAccountId\n customerAccount {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n description\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n legs {\n nextToken\n startedAt\n }\n settlementTicketLegs {\n nextToken\n startedAt\n }\n accountingMonthId\n accountingMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n isChildTicket\n parentTicketId\n childTickets {\n nextToken\n startedAt\n }\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentCostItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteLeg = /* GraphQL */ `\n mutation DeleteLeg(\n $input: DeleteLegInput!\n $condition: ModelLegConditionInput\n ) {\n deleteLeg(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n reservationData\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservationCode\n flightType\n quotationId\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n avinodeRfqId\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n notifications\n ticketInfo\n tickets {\n nextToken\n startedAt\n }\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n upliftCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n countableChanges {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n squawks {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n title\n description\n companyDescription\n airworthinessAffected\n deferralDate\n deferralText\n reviewedDate\n reviewedName\n reviewedId\n releaseDate\n releaseAircraftFlightTime\n releaseName\n releaseLicenseNumber\n releaseText\n releaseSignature\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n externalDocuments {\n items {\n id\n createdAt\n identifyingData\n contentData\n flightDocumentId\n flightId\n legId\n reservationId\n reservationEventId\n notIdentified\n contentKey\n ocrJobId\n deleted\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n costItems {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n acronym\n unit\n rate\n currency\n amountInDocumentCurrency\n airportIcaoOrDesc\n note\n isAddedToTicket\n documentRecordId\n legId\n aircraftId\n ticketId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n legs {\n nextToken\n startedAt\n }\n mediaFiles {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n billingData\n ticketId\n ticket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n customerAccountId\n customerAccount {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n description\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n legs {\n nextToken\n startedAt\n }\n settlementTicketLegs {\n nextToken\n startedAt\n }\n accountingMonthId\n accountingMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n isChildTicket\n parentTicketId\n childTickets {\n nextToken\n startedAt\n }\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentCostItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n settlementTicketId\n settlementTicket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n customerAccountId\n customerAccount {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n description\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n legs {\n nextToken\n startedAt\n }\n settlementTicketLegs {\n nextToken\n startedAt\n }\n accountingMonthId\n accountingMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n isChildTicket\n parentTicketId\n childTickets {\n nextToken\n startedAt\n }\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentCostItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createSquawk = /* GraphQL */ `\n mutation CreateSquawk(\n $input: CreateSquawkInput!\n $condition: ModelSquawkConditionInput\n ) {\n createSquawk(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n title\n description\n companyDescription\n airworthinessAffected\n deferralDate\n deferralText\n reviewedDate\n reviewedName\n reviewedId\n releaseDate\n releaseAircraftFlightTime\n releaseName\n releaseLicenseNumber\n releaseText\n releaseSignature\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n squawkDeferrals {\n items {\n id\n deleted\n editableByUserIds\n squawkId\n createdAt\n createdByName\n createdByLicenseNumber\n createdBySignature\n text\n deferredUntil\n melType\n actionsRequired\n actionPerformedText\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n releaseToServices {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n squawkId\n deferralId\n maintenanceRecordId\n createdAt\n releaseType\n releasedByName\n releasedByOrganization\n releasedByLicenseNumber\n releasedBySignature\n text\n aircraftFlightTime\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n reminders {\n items {\n id\n crewQualificationId\n squawkId\n sentDate\n mailingTextId\n customData\n method\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateSquawk = /* GraphQL */ `\n mutation UpdateSquawk(\n $input: UpdateSquawkInput!\n $condition: ModelSquawkConditionInput\n ) {\n updateSquawk(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n title\n description\n companyDescription\n airworthinessAffected\n deferralDate\n deferralText\n reviewedDate\n reviewedName\n reviewedId\n releaseDate\n releaseAircraftFlightTime\n releaseName\n releaseLicenseNumber\n releaseText\n releaseSignature\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n squawkDeferrals {\n items {\n id\n deleted\n editableByUserIds\n squawkId\n createdAt\n createdByName\n createdByLicenseNumber\n createdBySignature\n text\n deferredUntil\n melType\n actionsRequired\n actionPerformedText\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n releaseToServices {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n squawkId\n deferralId\n maintenanceRecordId\n createdAt\n releaseType\n releasedByName\n releasedByOrganization\n releasedByLicenseNumber\n releasedBySignature\n text\n aircraftFlightTime\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n reminders {\n items {\n id\n crewQualificationId\n squawkId\n sentDate\n mailingTextId\n customData\n method\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteSquawk = /* GraphQL */ `\n mutation DeleteSquawk(\n $input: DeleteSquawkInput!\n $condition: ModelSquawkConditionInput\n ) {\n deleteSquawk(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n title\n description\n companyDescription\n airworthinessAffected\n deferralDate\n deferralText\n reviewedDate\n reviewedName\n reviewedId\n releaseDate\n releaseAircraftFlightTime\n releaseName\n releaseLicenseNumber\n releaseText\n releaseSignature\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n squawkDeferrals {\n items {\n id\n deleted\n editableByUserIds\n squawkId\n createdAt\n createdByName\n createdByLicenseNumber\n createdBySignature\n text\n deferredUntil\n melType\n actionsRequired\n actionPerformedText\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n releaseToServices {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n squawkId\n deferralId\n maintenanceRecordId\n createdAt\n releaseType\n releasedByName\n releasedByOrganization\n releasedByLicenseNumber\n releasedBySignature\n text\n aircraftFlightTime\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n reminders {\n items {\n id\n crewQualificationId\n squawkId\n sentDate\n mailingTextId\n customData\n method\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createSquawkDeferral = /* GraphQL */ `\n mutation CreateSquawkDeferral(\n $input: CreateSquawkDeferralInput!\n $condition: ModelSquawkDeferralConditionInput\n ) {\n createSquawkDeferral(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n squawkId\n createdAt\n createdByName\n createdByLicenseNumber\n createdBySignature\n text\n deferredUntil\n melType\n actionsRequired\n actionPerformedText\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n releaseToServices {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n squawkId\n deferralId\n maintenanceRecordId\n createdAt\n releaseType\n releasedByName\n releasedByOrganization\n releasedByLicenseNumber\n releasedBySignature\n text\n aircraftFlightTime\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateSquawkDeferral = /* GraphQL */ `\n mutation UpdateSquawkDeferral(\n $input: UpdateSquawkDeferralInput!\n $condition: ModelSquawkDeferralConditionInput\n ) {\n updateSquawkDeferral(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n squawkId\n createdAt\n createdByName\n createdByLicenseNumber\n createdBySignature\n text\n deferredUntil\n melType\n actionsRequired\n actionPerformedText\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n releaseToServices {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n squawkId\n deferralId\n maintenanceRecordId\n createdAt\n releaseType\n releasedByName\n releasedByOrganization\n releasedByLicenseNumber\n releasedBySignature\n text\n aircraftFlightTime\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteSquawkDeferral = /* GraphQL */ `\n mutation DeleteSquawkDeferral(\n $input: DeleteSquawkDeferralInput!\n $condition: ModelSquawkDeferralConditionInput\n ) {\n deleteSquawkDeferral(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n squawkId\n createdAt\n createdByName\n createdByLicenseNumber\n createdBySignature\n text\n deferredUntil\n melType\n actionsRequired\n actionPerformedText\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n releaseToServices {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n squawkId\n deferralId\n maintenanceRecordId\n createdAt\n releaseType\n releasedByName\n releasedByOrganization\n releasedByLicenseNumber\n releasedBySignature\n text\n aircraftFlightTime\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createReleaseToService = /* GraphQL */ `\n mutation CreateReleaseToService(\n $input: CreateReleaseToServiceInput!\n $condition: ModelReleaseToServiceConditionInput\n ) {\n createReleaseToService(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n aircraftId\n squawkId\n deferralId\n maintenanceRecordId\n createdAt\n releaseType\n releasedByName\n releasedByOrganization\n releasedByLicenseNumber\n releasedBySignature\n text\n aircraftFlightTime\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateReleaseToService = /* GraphQL */ `\n mutation UpdateReleaseToService(\n $input: UpdateReleaseToServiceInput!\n $condition: ModelReleaseToServiceConditionInput\n ) {\n updateReleaseToService(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n aircraftId\n squawkId\n deferralId\n maintenanceRecordId\n createdAt\n releaseType\n releasedByName\n releasedByOrganization\n releasedByLicenseNumber\n releasedBySignature\n text\n aircraftFlightTime\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteReleaseToService = /* GraphQL */ `\n mutation DeleteReleaseToService(\n $input: DeleteReleaseToServiceInput!\n $condition: ModelReleaseToServiceConditionInput\n ) {\n deleteReleaseToService(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n aircraftId\n squawkId\n deferralId\n maintenanceRecordId\n createdAt\n releaseType\n releasedByName\n releasedByOrganization\n releasedByLicenseNumber\n releasedBySignature\n text\n aircraftFlightTime\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createCountableChange = /* GraphQL */ `\n mutation CreateCountableChange(\n $input: CreateCountableChangeInput!\n $condition: ModelCountableChangeConditionInput\n ) {\n createCountableChange(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n legs {\n nextToken\n startedAt\n }\n mediaFiles {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n upliftCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n countableChanges {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n externalDocuments {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n billingData\n ticketId\n ticket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n settlementTicketId\n settlementTicket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateCountableChange = /* GraphQL */ `\n mutation UpdateCountableChange(\n $input: UpdateCountableChangeInput!\n $condition: ModelCountableChangeConditionInput\n ) {\n updateCountableChange(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n legs {\n nextToken\n startedAt\n }\n mediaFiles {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n upliftCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n countableChanges {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n externalDocuments {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n billingData\n ticketId\n ticket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n settlementTicketId\n settlementTicket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteCountableChange = /* GraphQL */ `\n mutation DeleteCountableChange(\n $input: DeleteCountableChangeInput!\n $condition: ModelCountableChangeConditionInput\n ) {\n deleteCountableChange(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n legs {\n nextToken\n startedAt\n }\n mediaFiles {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n upliftCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n countableChanges {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n externalDocuments {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n billingData\n ticketId\n ticket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n settlementTicketId\n settlementTicket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createFlightDocument = /* GraphQL */ `\n mutation CreateFlightDocument(\n $input: CreateFlightDocumentInput!\n $condition: ModelFlightDocumentConditionInput\n ) {\n createFlightDocument(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n mediaFile {\n id\n createdAt\n updatedAt\n uploadedAt\n removed\n readableByUserIds\n month\n name\n type\n contentKey\n fileData\n status\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightId\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n legId\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightDocumentId\n flightDocument {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateFlightDocument = /* GraphQL */ `\n mutation UpdateFlightDocument(\n $input: UpdateFlightDocumentInput!\n $condition: ModelFlightDocumentConditionInput\n ) {\n updateFlightDocument(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n mediaFile {\n id\n createdAt\n updatedAt\n uploadedAt\n removed\n readableByUserIds\n month\n name\n type\n contentKey\n fileData\n status\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightId\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n legId\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightDocumentId\n flightDocument {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteFlightDocument = /* GraphQL */ `\n mutation DeleteFlightDocument(\n $input: DeleteFlightDocumentInput!\n $condition: ModelFlightDocumentConditionInput\n ) {\n deleteFlightDocument(input: $input, condition: $condition) {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n mediaFile {\n id\n createdAt\n updatedAt\n uploadedAt\n removed\n readableByUserIds\n month\n name\n type\n contentKey\n fileData\n status\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightId\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n legId\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightDocumentId\n flightDocument {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createExternalDocument = /* GraphQL */ `\n mutation CreateExternalDocument(\n $input: CreateExternalDocumentInput!\n $condition: ModelExternalDocumentConditionInput\n ) {\n createExternalDocument(input: $input, condition: $condition) {\n id\n createdAt\n identifyingData\n contentData\n flightDocumentId\n flightId\n legId\n reservationId\n reservationEventId\n notIdentified\n contentKey\n ocrJobId\n deleted\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateExternalDocument = /* GraphQL */ `\n mutation UpdateExternalDocument(\n $input: UpdateExternalDocumentInput!\n $condition: ModelExternalDocumentConditionInput\n ) {\n updateExternalDocument(input: $input, condition: $condition) {\n id\n createdAt\n identifyingData\n contentData\n flightDocumentId\n flightId\n legId\n reservationId\n reservationEventId\n notIdentified\n contentKey\n ocrJobId\n deleted\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteExternalDocument = /* GraphQL */ `\n mutation DeleteExternalDocument(\n $input: DeleteExternalDocumentInput!\n $condition: ModelExternalDocumentConditionInput\n ) {\n deleteExternalDocument(input: $input, condition: $condition) {\n id\n createdAt\n identifyingData\n contentData\n flightDocumentId\n flightId\n legId\n reservationId\n reservationEventId\n notIdentified\n contentKey\n ocrJobId\n deleted\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createAircraftDocument = /* GraphQL */ `\n mutation CreateAircraftDocument(\n $input: CreateAircraftDocumentInput!\n $condition: ModelAircraftDocumentConditionInput\n ) {\n createAircraftDocument(input: $input, condition: $condition) {\n id\n deleted\n createdAt\n aircraftId\n contentKey\n name\n documentNumber\n issueDate\n validUntilDate\n validUntilDateToleranceSeconds\n validUntilCountableTypes\n validUntilCountableValues\n validUntilCountableValuesTolerance\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateAircraftDocument = /* GraphQL */ `\n mutation UpdateAircraftDocument(\n $input: UpdateAircraftDocumentInput!\n $condition: ModelAircraftDocumentConditionInput\n ) {\n updateAircraftDocument(input: $input, condition: $condition) {\n id\n deleted\n createdAt\n aircraftId\n contentKey\n name\n documentNumber\n issueDate\n validUntilDate\n validUntilDateToleranceSeconds\n validUntilCountableTypes\n validUntilCountableValues\n validUntilCountableValuesTolerance\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteAircraftDocument = /* GraphQL */ `\n mutation DeleteAircraftDocument(\n $input: DeleteAircraftDocumentInput!\n $condition: ModelAircraftDocumentConditionInput\n ) {\n deleteAircraftDocument(input: $input, condition: $condition) {\n id\n deleted\n createdAt\n aircraftId\n contentKey\n name\n documentNumber\n issueDate\n validUntilDate\n validUntilDateToleranceSeconds\n validUntilCountableTypes\n validUntilCountableValues\n validUntilCountableValuesTolerance\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createAircraftMaintenanceLimit = /* GraphQL */ `\n mutation CreateAircraftMaintenanceLimit(\n $input: CreateAircraftMaintenanceLimitInput!\n $condition: ModelAircraftMaintenanceLimitConditionInput\n ) {\n createAircraftMaintenanceLimit(input: $input, condition: $condition) {\n id\n deleted\n createdAt\n aircraftId\n name\n validUntilDate\n validUntilDateToleranceSeconds\n validUntilCountableTypes\n validUntilCountableValues\n validUntilCountableValuesTolerance\n customWarningRules\n limitExtensionRules\n maintenanceProgramTaskWid\n extensions {\n items {\n id\n deleted\n createdAt\n maintenanceLimitId\n maintenanceLimitVersion\n maintenanceRecordId\n createdByUserId\n extendedByName\n validUntilDate\n validUntilCountableValues\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateAircraftMaintenanceLimit = /* GraphQL */ `\n mutation UpdateAircraftMaintenanceLimit(\n $input: UpdateAircraftMaintenanceLimitInput!\n $condition: ModelAircraftMaintenanceLimitConditionInput\n ) {\n updateAircraftMaintenanceLimit(input: $input, condition: $condition) {\n id\n deleted\n createdAt\n aircraftId\n name\n validUntilDate\n validUntilDateToleranceSeconds\n validUntilCountableTypes\n validUntilCountableValues\n validUntilCountableValuesTolerance\n customWarningRules\n limitExtensionRules\n maintenanceProgramTaskWid\n extensions {\n items {\n id\n deleted\n createdAt\n maintenanceLimitId\n maintenanceLimitVersion\n maintenanceRecordId\n createdByUserId\n extendedByName\n validUntilDate\n validUntilCountableValues\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteAircraftMaintenanceLimit = /* GraphQL */ `\n mutation DeleteAircraftMaintenanceLimit(\n $input: DeleteAircraftMaintenanceLimitInput!\n $condition: ModelAircraftMaintenanceLimitConditionInput\n ) {\n deleteAircraftMaintenanceLimit(input: $input, condition: $condition) {\n id\n deleted\n createdAt\n aircraftId\n name\n validUntilDate\n validUntilDateToleranceSeconds\n validUntilCountableTypes\n validUntilCountableValues\n validUntilCountableValuesTolerance\n customWarningRules\n limitExtensionRules\n maintenanceProgramTaskWid\n extensions {\n items {\n id\n deleted\n createdAt\n maintenanceLimitId\n maintenanceLimitVersion\n maintenanceRecordId\n createdByUserId\n extendedByName\n validUntilDate\n validUntilCountableValues\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createAircraftMaintenanceLimitExtension = /* GraphQL */ `\n mutation CreateAircraftMaintenanceLimitExtension(\n $input: CreateAircraftMaintenanceLimitExtensionInput!\n $condition: ModelAircraftMaintenanceLimitExtensionConditionInput\n ) {\n createAircraftMaintenanceLimitExtension(\n input: $input\n condition: $condition\n ) {\n id\n deleted\n createdAt\n maintenanceLimitId\n maintenanceLimitVersion\n maintenanceRecordId\n createdByUserId\n extendedByName\n validUntilDate\n validUntilCountableValues\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateAircraftMaintenanceLimitExtension = /* GraphQL */ `\n mutation UpdateAircraftMaintenanceLimitExtension(\n $input: UpdateAircraftMaintenanceLimitExtensionInput!\n $condition: ModelAircraftMaintenanceLimitExtensionConditionInput\n ) {\n updateAircraftMaintenanceLimitExtension(\n input: $input\n condition: $condition\n ) {\n id\n deleted\n createdAt\n maintenanceLimitId\n maintenanceLimitVersion\n maintenanceRecordId\n createdByUserId\n extendedByName\n validUntilDate\n validUntilCountableValues\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteAircraftMaintenanceLimitExtension = /* GraphQL */ `\n mutation DeleteAircraftMaintenanceLimitExtension(\n $input: DeleteAircraftMaintenanceLimitExtensionInput!\n $condition: ModelAircraftMaintenanceLimitExtensionConditionInput\n ) {\n deleteAircraftMaintenanceLimitExtension(\n input: $input\n condition: $condition\n ) {\n id\n deleted\n createdAt\n maintenanceLimitId\n maintenanceLimitVersion\n maintenanceRecordId\n createdByUserId\n extendedByName\n validUntilDate\n validUntilCountableValues\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createMaintenanceProgram = /* GraphQL */ `\n mutation CreateMaintenanceProgram(\n $input: CreateMaintenanceProgramInput!\n $condition: ModelMaintenanceProgramConditionInput\n ) {\n createMaintenanceProgram(input: $input, condition: $condition) {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n maintenanceTasks {\n items {\n id\n wid\n deleted\n createdAt\n maintenanceProgramId\n title\n description\n type\n taskClass\n isPerformableByPilot\n taskNumber\n groups\n ataNumber\n intervals\n completesTaskIds\n requiresTaskIds\n applicableToAircraftIds\n applicabilityNote\n applicabilityGroup\n files\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n aircrafts {\n items {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateMaintenanceProgram = /* GraphQL */ `\n mutation UpdateMaintenanceProgram(\n $input: UpdateMaintenanceProgramInput!\n $condition: ModelMaintenanceProgramConditionInput\n ) {\n updateMaintenanceProgram(input: $input, condition: $condition) {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n maintenanceTasks {\n items {\n id\n wid\n deleted\n createdAt\n maintenanceProgramId\n title\n description\n type\n taskClass\n isPerformableByPilot\n taskNumber\n groups\n ataNumber\n intervals\n completesTaskIds\n requiresTaskIds\n applicableToAircraftIds\n applicabilityNote\n applicabilityGroup\n files\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n aircrafts {\n items {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteMaintenanceProgram = /* GraphQL */ `\n mutation DeleteMaintenanceProgram(\n $input: DeleteMaintenanceProgramInput!\n $condition: ModelMaintenanceProgramConditionInput\n ) {\n deleteMaintenanceProgram(input: $input, condition: $condition) {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n maintenanceTasks {\n items {\n id\n wid\n deleted\n createdAt\n maintenanceProgramId\n title\n description\n type\n taskClass\n isPerformableByPilot\n taskNumber\n groups\n ataNumber\n intervals\n completesTaskIds\n requiresTaskIds\n applicableToAircraftIds\n applicabilityNote\n applicabilityGroup\n files\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n aircrafts {\n items {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createMaintenanceProgramTask = /* GraphQL */ `\n mutation CreateMaintenanceProgramTask(\n $input: CreateMaintenanceProgramTaskInput!\n $condition: ModelMaintenanceProgramTaskConditionInput\n ) {\n createMaintenanceProgramTask(input: $input, condition: $condition) {\n id\n wid\n deleted\n createdAt\n maintenanceProgramId\n title\n description\n type\n taskClass\n isPerformableByPilot\n taskNumber\n groups\n ataNumber\n intervals\n completesTaskIds\n requiresTaskIds\n applicableToAircraftIds\n applicabilityNote\n applicabilityGroup\n files\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateMaintenanceProgramTask = /* GraphQL */ `\n mutation UpdateMaintenanceProgramTask(\n $input: UpdateMaintenanceProgramTaskInput!\n $condition: ModelMaintenanceProgramTaskConditionInput\n ) {\n updateMaintenanceProgramTask(input: $input, condition: $condition) {\n id\n wid\n deleted\n createdAt\n maintenanceProgramId\n title\n description\n type\n taskClass\n isPerformableByPilot\n taskNumber\n groups\n ataNumber\n intervals\n completesTaskIds\n requiresTaskIds\n applicableToAircraftIds\n applicabilityNote\n applicabilityGroup\n files\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteMaintenanceProgramTask = /* GraphQL */ `\n mutation DeleteMaintenanceProgramTask(\n $input: DeleteMaintenanceProgramTaskInput!\n $condition: ModelMaintenanceProgramTaskConditionInput\n ) {\n deleteMaintenanceProgramTask(input: $input, condition: $condition) {\n id\n wid\n deleted\n createdAt\n maintenanceProgramId\n title\n description\n type\n taskClass\n isPerformableByPilot\n taskNumber\n groups\n ataNumber\n intervals\n completesTaskIds\n requiresTaskIds\n applicableToAircraftIds\n applicabilityNote\n applicabilityGroup\n files\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createAircraftMaintenanceIntervalChange = /* GraphQL */ `\n mutation CreateAircraftMaintenanceIntervalChange(\n $input: CreateAircraftMaintenanceIntervalChangeInput!\n $condition: ModelAircraftMaintenanceIntervalChangeConditionInput\n ) {\n createAircraftMaintenanceIntervalChange(\n input: $input\n condition: $condition\n ) {\n id\n deleted\n aircraftId\n createdAt\n maintenanceProgramId\n maintenanceRecordId\n maintenanceEventId\n intervals\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateAircraftMaintenanceIntervalChange = /* GraphQL */ `\n mutation UpdateAircraftMaintenanceIntervalChange(\n $input: UpdateAircraftMaintenanceIntervalChangeInput!\n $condition: ModelAircraftMaintenanceIntervalChangeConditionInput\n ) {\n updateAircraftMaintenanceIntervalChange(\n input: $input\n condition: $condition\n ) {\n id\n deleted\n aircraftId\n createdAt\n maintenanceProgramId\n maintenanceRecordId\n maintenanceEventId\n intervals\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteAircraftMaintenanceIntervalChange = /* GraphQL */ `\n mutation DeleteAircraftMaintenanceIntervalChange(\n $input: DeleteAircraftMaintenanceIntervalChangeInput!\n $condition: ModelAircraftMaintenanceIntervalChangeConditionInput\n ) {\n deleteAircraftMaintenanceIntervalChange(\n input: $input\n condition: $condition\n ) {\n id\n deleted\n aircraftId\n createdAt\n maintenanceProgramId\n maintenanceRecordId\n maintenanceEventId\n intervals\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createDutyItem = /* GraphQL */ `\n mutation CreateDutyItem(\n $input: CreateDutyItemInput!\n $condition: ModelDutyItemConditionInput\n ) {\n createDutyItem(input: $input, condition: $condition) {\n id\n editableByUserIds\n deleted\n userId\n crewId\n state\n dutyPeriodId\n forceRestAfter\n note\n type\n startDate\n endDate\n sectorCount\n endPlaceIcao\n blockTimeMinutes\n plannedFdpExtension\n flightLegIds\n logbookRecordIds\n linkedDutyItemIds\n reports {\n items {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n anonymous\n userMessage\n assets\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateDutyItem = /* GraphQL */ `\n mutation UpdateDutyItem(\n $input: UpdateDutyItemInput!\n $condition: ModelDutyItemConditionInput\n ) {\n updateDutyItem(input: $input, condition: $condition) {\n id\n editableByUserIds\n deleted\n userId\n crewId\n state\n dutyPeriodId\n forceRestAfter\n note\n type\n startDate\n endDate\n sectorCount\n endPlaceIcao\n blockTimeMinutes\n plannedFdpExtension\n flightLegIds\n logbookRecordIds\n linkedDutyItemIds\n reports {\n items {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n anonymous\n userMessage\n assets\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteDutyItem = /* GraphQL */ `\n mutation DeleteDutyItem(\n $input: DeleteDutyItemInput!\n $condition: ModelDutyItemConditionInput\n ) {\n deleteDutyItem(input: $input, condition: $condition) {\n id\n editableByUserIds\n deleted\n userId\n crewId\n state\n dutyPeriodId\n forceRestAfter\n note\n type\n startDate\n endDate\n sectorCount\n endPlaceIcao\n blockTimeMinutes\n plannedFdpExtension\n flightLegIds\n logbookRecordIds\n linkedDutyItemIds\n reports {\n items {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n anonymous\n userMessage\n assets\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createContact = /* GraphQL */ `\n mutation CreateContact(\n $input: CreateContactInput!\n $condition: ModelContactConditionInput\n ) {\n createContact(input: $input, condition: $condition) {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n items {\n id\n deleted\n accessibleByUserIds\n type\n priority\n userId\n contactId\n nameFirst\n nameMiddle\n nameLast\n companyName\n vatNumber\n contactType\n identificationNumber\n displayName\n dateOfBirth\n placeOfBirth\n passportNumber\n nationality\n passportExpirtyDate\n contactPhone\n contactEmail\n contactAddressStreet\n contactAddressStreetNumber\n contactAddressCity\n contactAddressState\n contactAddressZipCode\n contactAddressCountry\n communicationPreferenceTags\n preferredLocales\n billingData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n contactDocuments {\n items {\n id\n deleted\n deletedPages\n editableByUserId\n createdAt\n contactId\n crewQualificationId\n type\n contentKey\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n documentSnippets {\n items {\n id\n name\n contactId\n crewQualificationId\n deleted\n contentKey\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n crewQualifications {\n items {\n id\n searchId\n deleted\n contactId\n userId\n qualificationTypeId\n title\n qualificationData\n dependsOnQualificationId\n licenseNumber\n issuedDate\n validUntilDate\n noHighlighWhenExpired\n isWaived\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n tags {\n items {\n id\n contactId\n tagId\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n crewRoles {\n items {\n id\n contactId\n crewRoleId\n roleEarliestExpiration\n rolePrivileges\n rolePrivilegeEarliestExpiration\n created\n isNotActive\n isInTraining\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n logbookRecords {\n items {\n id\n contactId\n crewId\n editableByUserIds\n date\n deleted\n legId\n departurePlace\n departureTime\n arrivalPlace\n arrivalTime\n aircraftMake\n aircraftRegistration\n airplaneSeMeMcc\n totalFlightTime\n picName\n landingsTotal\n landingsNight\n nightTime\n ifrTime\n picTime\n copilotTime\n dualTime\n instructorTime\n isFstd\n fstdTime\n remarks\n crossCountryTime\n instrumentActualTime\n instrumentSimulatedTime\n instrumentApproachPlace\n instrumentApproachType\n instrumentApproachCount\n instrumentApproachDetails\n holdings\n customData\n signature\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n reservations {\n items {\n id\n title\n type\n reservationId\n aircraftId\n contactId\n externalId\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n reports {\n items {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n anonymous\n userMessage\n assets\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n items {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n editableByUserId\n contactId\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n mitigationEffectivenessReview\n effective\n effectivePersonId\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n hazardsAsApprover {\n items {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n editableByUserId\n contactId\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n mitigationEffectivenessReview\n effective\n effectivePersonId\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n items {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n editableByUserId\n contactId\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n mitigationEffectivenessReview\n effective\n effectivePersonId\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n items {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n editableByUserId\n contactId\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n mitigationEffectivenessReview\n effective\n effectivePersonId\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n customerAccounts {\n items {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n description\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n documentRecords {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n docPrefix\n month\n year\n number\n documentType\n status\n amount\n currency\n amountInCZK\n note\n internalCenter\n costs\n invoiceAndTaxInfo\n payment\n supplierId\n aircraftId\n contactId\n allocationMonthId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n priceProfileApplications {\n items {\n id\n contactId\n aircraftId\n priceProfileId\n isPriorityForAircraft\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateContact = /* GraphQL */ `\n mutation UpdateContact(\n $input: UpdateContactInput!\n $condition: ModelContactConditionInput\n ) {\n updateContact(input: $input, condition: $condition) {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n items {\n id\n deleted\n accessibleByUserIds\n type\n priority\n userId\n contactId\n nameFirst\n nameMiddle\n nameLast\n companyName\n vatNumber\n contactType\n identificationNumber\n displayName\n dateOfBirth\n placeOfBirth\n passportNumber\n nationality\n passportExpirtyDate\n contactPhone\n contactEmail\n contactAddressStreet\n contactAddressStreetNumber\n contactAddressCity\n contactAddressState\n contactAddressZipCode\n contactAddressCountry\n communicationPreferenceTags\n preferredLocales\n billingData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n contactDocuments {\n items {\n id\n deleted\n deletedPages\n editableByUserId\n createdAt\n contactId\n crewQualificationId\n type\n contentKey\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n documentSnippets {\n items {\n id\n name\n contactId\n crewQualificationId\n deleted\n contentKey\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n crewQualifications {\n items {\n id\n searchId\n deleted\n contactId\n userId\n qualificationTypeId\n title\n qualificationData\n dependsOnQualificationId\n licenseNumber\n issuedDate\n validUntilDate\n noHighlighWhenExpired\n isWaived\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n tags {\n items {\n id\n contactId\n tagId\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n crewRoles {\n items {\n id\n contactId\n crewRoleId\n roleEarliestExpiration\n rolePrivileges\n rolePrivilegeEarliestExpiration\n created\n isNotActive\n isInTraining\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n logbookRecords {\n items {\n id\n contactId\n crewId\n editableByUserIds\n date\n deleted\n legId\n departurePlace\n departureTime\n arrivalPlace\n arrivalTime\n aircraftMake\n aircraftRegistration\n airplaneSeMeMcc\n totalFlightTime\n picName\n landingsTotal\n landingsNight\n nightTime\n ifrTime\n picTime\n copilotTime\n dualTime\n instructorTime\n isFstd\n fstdTime\n remarks\n crossCountryTime\n instrumentActualTime\n instrumentSimulatedTime\n instrumentApproachPlace\n instrumentApproachType\n instrumentApproachCount\n instrumentApproachDetails\n holdings\n customData\n signature\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n reservations {\n items {\n id\n title\n type\n reservationId\n aircraftId\n contactId\n externalId\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n reports {\n items {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n anonymous\n userMessage\n assets\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n items {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n editableByUserId\n contactId\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n mitigationEffectivenessReview\n effective\n effectivePersonId\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n hazardsAsApprover {\n items {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n editableByUserId\n contactId\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n mitigationEffectivenessReview\n effective\n effectivePersonId\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n items {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n editableByUserId\n contactId\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n mitigationEffectivenessReview\n effective\n effectivePersonId\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n items {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n editableByUserId\n contactId\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n mitigationEffectivenessReview\n effective\n effectivePersonId\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n customerAccounts {\n items {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n description\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n documentRecords {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n docPrefix\n month\n year\n number\n documentType\n status\n amount\n currency\n amountInCZK\n note\n internalCenter\n costs\n invoiceAndTaxInfo\n payment\n supplierId\n aircraftId\n contactId\n allocationMonthId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n priceProfileApplications {\n items {\n id\n contactId\n aircraftId\n priceProfileId\n isPriorityForAircraft\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteContact = /* GraphQL */ `\n mutation DeleteContact(\n $input: DeleteContactInput!\n $condition: ModelContactConditionInput\n ) {\n deleteContact(input: $input, condition: $condition) {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n items {\n id\n deleted\n accessibleByUserIds\n type\n priority\n userId\n contactId\n nameFirst\n nameMiddle\n nameLast\n companyName\n vatNumber\n contactType\n identificationNumber\n displayName\n dateOfBirth\n placeOfBirth\n passportNumber\n nationality\n passportExpirtyDate\n contactPhone\n contactEmail\n contactAddressStreet\n contactAddressStreetNumber\n contactAddressCity\n contactAddressState\n contactAddressZipCode\n contactAddressCountry\n communicationPreferenceTags\n preferredLocales\n billingData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n contactDocuments {\n items {\n id\n deleted\n deletedPages\n editableByUserId\n createdAt\n contactId\n crewQualificationId\n type\n contentKey\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n documentSnippets {\n items {\n id\n name\n contactId\n crewQualificationId\n deleted\n contentKey\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n crewQualifications {\n items {\n id\n searchId\n deleted\n contactId\n userId\n qualificationTypeId\n title\n qualificationData\n dependsOnQualificationId\n licenseNumber\n issuedDate\n validUntilDate\n noHighlighWhenExpired\n isWaived\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n tags {\n items {\n id\n contactId\n tagId\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n crewRoles {\n items {\n id\n contactId\n crewRoleId\n roleEarliestExpiration\n rolePrivileges\n rolePrivilegeEarliestExpiration\n created\n isNotActive\n isInTraining\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n logbookRecords {\n items {\n id\n contactId\n crewId\n editableByUserIds\n date\n deleted\n legId\n departurePlace\n departureTime\n arrivalPlace\n arrivalTime\n aircraftMake\n aircraftRegistration\n airplaneSeMeMcc\n totalFlightTime\n picName\n landingsTotal\n landingsNight\n nightTime\n ifrTime\n picTime\n copilotTime\n dualTime\n instructorTime\n isFstd\n fstdTime\n remarks\n crossCountryTime\n instrumentActualTime\n instrumentSimulatedTime\n instrumentApproachPlace\n instrumentApproachType\n instrumentApproachCount\n instrumentApproachDetails\n holdings\n customData\n signature\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n reservations {\n items {\n id\n title\n type\n reservationId\n aircraftId\n contactId\n externalId\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n reports {\n items {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n anonymous\n userMessage\n assets\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n items {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n editableByUserId\n contactId\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n mitigationEffectivenessReview\n effective\n effectivePersonId\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n hazardsAsApprover {\n items {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n editableByUserId\n contactId\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n mitigationEffectivenessReview\n effective\n effectivePersonId\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n items {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n editableByUserId\n contactId\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n mitigationEffectivenessReview\n effective\n effectivePersonId\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n items {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n editableByUserId\n contactId\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n mitigationEffectivenessReview\n effective\n effectivePersonId\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n customerAccounts {\n items {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n description\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n documentRecords {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n docPrefix\n month\n year\n number\n documentType\n status\n amount\n currency\n amountInCZK\n note\n internalCenter\n costs\n invoiceAndTaxInfo\n payment\n supplierId\n aircraftId\n contactId\n allocationMonthId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n priceProfileApplications {\n items {\n id\n contactId\n aircraftId\n priceProfileId\n isPriorityForAircraft\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createContactDocument = /* GraphQL */ `\n mutation CreateContactDocument(\n $input: CreateContactDocumentInput!\n $condition: ModelContactDocumentConditionInput\n ) {\n createContactDocument(input: $input, condition: $condition) {\n id\n deleted\n deletedPages\n editableByUserId\n createdAt\n contactId\n crewQualificationId\n type\n contentKey\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateContactDocument = /* GraphQL */ `\n mutation UpdateContactDocument(\n $input: UpdateContactDocumentInput!\n $condition: ModelContactDocumentConditionInput\n ) {\n updateContactDocument(input: $input, condition: $condition) {\n id\n deleted\n deletedPages\n editableByUserId\n createdAt\n contactId\n crewQualificationId\n type\n contentKey\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteContactDocument = /* GraphQL */ `\n mutation DeleteContactDocument(\n $input: DeleteContactDocumentInput!\n $condition: ModelContactDocumentConditionInput\n ) {\n deleteContactDocument(input: $input, condition: $condition) {\n id\n deleted\n deletedPages\n editableByUserId\n createdAt\n contactId\n crewQualificationId\n type\n contentKey\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createContactInformation = /* GraphQL */ `\n mutation CreateContactInformation(\n $input: CreateContactInformationInput!\n $condition: ModelContactInformationConditionInput\n ) {\n createContactInformation(input: $input, condition: $condition) {\n id\n deleted\n accessibleByUserIds\n type\n priority\n userId\n contactId\n nameFirst\n nameMiddle\n nameLast\n companyName\n vatNumber\n contactType\n identificationNumber\n displayName\n dateOfBirth\n placeOfBirth\n passportNumber\n nationality\n passportExpirtyDate\n contactPhone\n contactEmail\n contactAddressStreet\n contactAddressStreetNumber\n contactAddressCity\n contactAddressState\n contactAddressZipCode\n contactAddressCountry\n communicationPreferenceTags\n preferredLocales\n billingData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateContactInformation = /* GraphQL */ `\n mutation UpdateContactInformation(\n $input: UpdateContactInformationInput!\n $condition: ModelContactInformationConditionInput\n ) {\n updateContactInformation(input: $input, condition: $condition) {\n id\n deleted\n accessibleByUserIds\n type\n priority\n userId\n contactId\n nameFirst\n nameMiddle\n nameLast\n companyName\n vatNumber\n contactType\n identificationNumber\n displayName\n dateOfBirth\n placeOfBirth\n passportNumber\n nationality\n passportExpirtyDate\n contactPhone\n contactEmail\n contactAddressStreet\n contactAddressStreetNumber\n contactAddressCity\n contactAddressState\n contactAddressZipCode\n contactAddressCountry\n communicationPreferenceTags\n preferredLocales\n billingData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteContactInformation = /* GraphQL */ `\n mutation DeleteContactInformation(\n $input: DeleteContactInformationInput!\n $condition: ModelContactInformationConditionInput\n ) {\n deleteContactInformation(input: $input, condition: $condition) {\n id\n deleted\n accessibleByUserIds\n type\n priority\n userId\n contactId\n nameFirst\n nameMiddle\n nameLast\n companyName\n vatNumber\n contactType\n identificationNumber\n displayName\n dateOfBirth\n placeOfBirth\n passportNumber\n nationality\n passportExpirtyDate\n contactPhone\n contactEmail\n contactAddressStreet\n contactAddressStreetNumber\n contactAddressCity\n contactAddressState\n contactAddressZipCode\n contactAddressCountry\n communicationPreferenceTags\n preferredLocales\n billingData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createCrewQualification = /* GraphQL */ `\n mutation CreateCrewQualification(\n $input: CreateCrewQualificationInput!\n $condition: ModelCrewQualificationConditionInput\n ) {\n createCrewQualification(input: $input, condition: $condition) {\n id\n searchId\n deleted\n contactId\n userId\n qualificationTypeId\n title\n qualificationData\n dependsOnQualificationId\n licenseNumber\n issuedDate\n validUntilDate\n noHighlighWhenExpired\n isWaived\n contactDocuments {\n items {\n id\n deleted\n deletedPages\n editableByUserId\n createdAt\n contactId\n crewQualificationId\n type\n contentKey\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n documentSnippets {\n items {\n id\n name\n contactId\n crewQualificationId\n deleted\n contentKey\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n dependingQualifications {\n items {\n id\n searchId\n deleted\n contactId\n userId\n qualificationTypeId\n title\n qualificationData\n dependsOnQualificationId\n licenseNumber\n issuedDate\n validUntilDate\n noHighlighWhenExpired\n isWaived\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n reminders {\n items {\n id\n crewQualificationId\n squawkId\n sentDate\n mailingTextId\n customData\n method\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateCrewQualification = /* GraphQL */ `\n mutation UpdateCrewQualification(\n $input: UpdateCrewQualificationInput!\n $condition: ModelCrewQualificationConditionInput\n ) {\n updateCrewQualification(input: $input, condition: $condition) {\n id\n searchId\n deleted\n contactId\n userId\n qualificationTypeId\n title\n qualificationData\n dependsOnQualificationId\n licenseNumber\n issuedDate\n validUntilDate\n noHighlighWhenExpired\n isWaived\n contactDocuments {\n items {\n id\n deleted\n deletedPages\n editableByUserId\n createdAt\n contactId\n crewQualificationId\n type\n contentKey\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n documentSnippets {\n items {\n id\n name\n contactId\n crewQualificationId\n deleted\n contentKey\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n dependingQualifications {\n items {\n id\n searchId\n deleted\n contactId\n userId\n qualificationTypeId\n title\n qualificationData\n dependsOnQualificationId\n licenseNumber\n issuedDate\n validUntilDate\n noHighlighWhenExpired\n isWaived\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n reminders {\n items {\n id\n crewQualificationId\n squawkId\n sentDate\n mailingTextId\n customData\n method\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteCrewQualification = /* GraphQL */ `\n mutation DeleteCrewQualification(\n $input: DeleteCrewQualificationInput!\n $condition: ModelCrewQualificationConditionInput\n ) {\n deleteCrewQualification(input: $input, condition: $condition) {\n id\n searchId\n deleted\n contactId\n userId\n qualificationTypeId\n title\n qualificationData\n dependsOnQualificationId\n licenseNumber\n issuedDate\n validUntilDate\n noHighlighWhenExpired\n isWaived\n contactDocuments {\n items {\n id\n deleted\n deletedPages\n editableByUserId\n createdAt\n contactId\n crewQualificationId\n type\n contentKey\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n documentSnippets {\n items {\n id\n name\n contactId\n crewQualificationId\n deleted\n contentKey\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n dependingQualifications {\n items {\n id\n searchId\n deleted\n contactId\n userId\n qualificationTypeId\n title\n qualificationData\n dependsOnQualificationId\n licenseNumber\n issuedDate\n validUntilDate\n noHighlighWhenExpired\n isWaived\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n reminders {\n items {\n id\n crewQualificationId\n squawkId\n sentDate\n mailingTextId\n customData\n method\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createCrewQualificationType = /* GraphQL */ `\n mutation CreateCrewQualificationType(\n $input: CreateCrewQualificationTypeInput!\n $condition: ModelCrewQualificationTypeConditionInput\n ) {\n createCrewQualificationType(input: $input, condition: $condition) {\n id\n title\n category\n dependsOnTypeIds\n deleted\n defaultValidity\n hasFixedTitle\n hasNoLicenseNumber\n hasNoIssueDate\n description\n files\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateCrewQualificationType = /* GraphQL */ `\n mutation UpdateCrewQualificationType(\n $input: UpdateCrewQualificationTypeInput!\n $condition: ModelCrewQualificationTypeConditionInput\n ) {\n updateCrewQualificationType(input: $input, condition: $condition) {\n id\n title\n category\n dependsOnTypeIds\n deleted\n defaultValidity\n hasFixedTitle\n hasNoLicenseNumber\n hasNoIssueDate\n description\n files\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteCrewQualificationType = /* GraphQL */ `\n mutation DeleteCrewQualificationType(\n $input: DeleteCrewQualificationTypeInput!\n $condition: ModelCrewQualificationTypeConditionInput\n ) {\n deleteCrewQualificationType(input: $input, condition: $condition) {\n id\n title\n category\n dependsOnTypeIds\n deleted\n defaultValidity\n hasFixedTitle\n hasNoLicenseNumber\n hasNoIssueDate\n description\n files\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createDocumentSnippet = /* GraphQL */ `\n mutation CreateDocumentSnippet(\n $input: CreateDocumentSnippetInput!\n $condition: ModelDocumentSnippetConditionInput\n ) {\n createDocumentSnippet(input: $input, condition: $condition) {\n id\n name\n contactId\n crewQualificationId\n deleted\n contentKey\n pages {\n items {\n id\n documentSnippetId\n page\n sourceContactDocumentId\n sourceContentKey\n sourcePage\n definition\n contentKey\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateDocumentSnippet = /* GraphQL */ `\n mutation UpdateDocumentSnippet(\n $input: UpdateDocumentSnippetInput!\n $condition: ModelDocumentSnippetConditionInput\n ) {\n updateDocumentSnippet(input: $input, condition: $condition) {\n id\n name\n contactId\n crewQualificationId\n deleted\n contentKey\n pages {\n items {\n id\n documentSnippetId\n page\n sourceContactDocumentId\n sourceContentKey\n sourcePage\n definition\n contentKey\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteDocumentSnippet = /* GraphQL */ `\n mutation DeleteDocumentSnippet(\n $input: DeleteDocumentSnippetInput!\n $condition: ModelDocumentSnippetConditionInput\n ) {\n deleteDocumentSnippet(input: $input, condition: $condition) {\n id\n name\n contactId\n crewQualificationId\n deleted\n contentKey\n pages {\n items {\n id\n documentSnippetId\n page\n sourceContactDocumentId\n sourceContentKey\n sourcePage\n definition\n contentKey\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createDocumentSnippetPage = /* GraphQL */ `\n mutation CreateDocumentSnippetPage(\n $input: CreateDocumentSnippetPageInput!\n $condition: ModelDocumentSnippetPageConditionInput\n ) {\n createDocumentSnippetPage(input: $input, condition: $condition) {\n id\n documentSnippetId\n page\n sourceContactDocumentId\n sourceContentKey\n sourcePage\n definition\n contentKey\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateDocumentSnippetPage = /* GraphQL */ `\n mutation UpdateDocumentSnippetPage(\n $input: UpdateDocumentSnippetPageInput!\n $condition: ModelDocumentSnippetPageConditionInput\n ) {\n updateDocumentSnippetPage(input: $input, condition: $condition) {\n id\n documentSnippetId\n page\n sourceContactDocumentId\n sourceContentKey\n sourcePage\n definition\n contentKey\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteDocumentSnippetPage = /* GraphQL */ `\n mutation DeleteDocumentSnippetPage(\n $input: DeleteDocumentSnippetPageInput!\n $condition: ModelDocumentSnippetPageConditionInput\n ) {\n deleteDocumentSnippetPage(input: $input, condition: $condition) {\n id\n documentSnippetId\n page\n sourceContactDocumentId\n sourceContentKey\n sourcePage\n definition\n contentKey\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createAirport = /* GraphQL */ `\n mutation CreateAirport(\n $input: CreateAirportInput!\n $condition: ModelAirportConditionInput\n ) {\n createAirport(input: $input, condition: $condition) {\n id\n icao\n icaoFirstOne\n icaoFirstTwo\n name\n latitude\n longitude\n public\n closed\n instrument\n instrumentLowestCeilingFt\n instrumentLowestRvrM\n night\n elevation\n requestPeriodDays\n timezone\n dataSources\n priceProfile\n suitableToAlternate\n isEUAirport\n earlySlotWaitingList\n providersData\n runways {\n items {\n id\n airportId\n designationLow\n designationHigh\n surface\n lighted\n closed\n instrumentApproachPrecision\n instrumentApproachNonPrecision\n length\n width\n toraLow\n todaLow\n asdaLow\n ldaLow\n toraHigh\n todaHigh\n asdaHigh\n ldaHigh\n headingTrueLow\n headingTrueHigh\n thresholdLatitudeLow\n thresholdLongitudeLow\n thresholdLatitudeHigh\n thresholdLongitudeHigh\n thresholdElevationLow\n thresholdElevationHigh\n dataSources\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n categorizations {\n items {\n id\n name\n icao\n categorizationData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n dispatchNotes {\n items {\n id\n airportId\n createdDate\n formData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n dispatchNoteCustomPages {\n items {\n id\n title\n content\n htmlContent\n pilotNoteAirportCategorizationId\n dispatchNoteAirportId\n createdByUserId\n createdDate\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateAirport = /* GraphQL */ `\n mutation UpdateAirport(\n $input: UpdateAirportInput!\n $condition: ModelAirportConditionInput\n ) {\n updateAirport(input: $input, condition: $condition) {\n id\n icao\n icaoFirstOne\n icaoFirstTwo\n name\n latitude\n longitude\n public\n closed\n instrument\n instrumentLowestCeilingFt\n instrumentLowestRvrM\n night\n elevation\n requestPeriodDays\n timezone\n dataSources\n priceProfile\n suitableToAlternate\n isEUAirport\n earlySlotWaitingList\n providersData\n runways {\n items {\n id\n airportId\n designationLow\n designationHigh\n surface\n lighted\n closed\n instrumentApproachPrecision\n instrumentApproachNonPrecision\n length\n width\n toraLow\n todaLow\n asdaLow\n ldaLow\n toraHigh\n todaHigh\n asdaHigh\n ldaHigh\n headingTrueLow\n headingTrueHigh\n thresholdLatitudeLow\n thresholdLongitudeLow\n thresholdLatitudeHigh\n thresholdLongitudeHigh\n thresholdElevationLow\n thresholdElevationHigh\n dataSources\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n categorizations {\n items {\n id\n name\n icao\n categorizationData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n dispatchNotes {\n items {\n id\n airportId\n createdDate\n formData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n dispatchNoteCustomPages {\n items {\n id\n title\n content\n htmlContent\n pilotNoteAirportCategorizationId\n dispatchNoteAirportId\n createdByUserId\n createdDate\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteAirport = /* GraphQL */ `\n mutation DeleteAirport(\n $input: DeleteAirportInput!\n $condition: ModelAirportConditionInput\n ) {\n deleteAirport(input: $input, condition: $condition) {\n id\n icao\n icaoFirstOne\n icaoFirstTwo\n name\n latitude\n longitude\n public\n closed\n instrument\n instrumentLowestCeilingFt\n instrumentLowestRvrM\n night\n elevation\n requestPeriodDays\n timezone\n dataSources\n priceProfile\n suitableToAlternate\n isEUAirport\n earlySlotWaitingList\n providersData\n runways {\n items {\n id\n airportId\n designationLow\n designationHigh\n surface\n lighted\n closed\n instrumentApproachPrecision\n instrumentApproachNonPrecision\n length\n width\n toraLow\n todaLow\n asdaLow\n ldaLow\n toraHigh\n todaHigh\n asdaHigh\n ldaHigh\n headingTrueLow\n headingTrueHigh\n thresholdLatitudeLow\n thresholdLongitudeLow\n thresholdLatitudeHigh\n thresholdLongitudeHigh\n thresholdElevationLow\n thresholdElevationHigh\n dataSources\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n categorizations {\n items {\n id\n name\n icao\n categorizationData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n dispatchNotes {\n items {\n id\n airportId\n createdDate\n formData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n dispatchNoteCustomPages {\n items {\n id\n title\n content\n htmlContent\n pilotNoteAirportCategorizationId\n dispatchNoteAirportId\n createdByUserId\n createdDate\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createAirportRunway = /* GraphQL */ `\n mutation CreateAirportRunway(\n $input: CreateAirportRunwayInput!\n $condition: ModelAirportRunwayConditionInput\n ) {\n createAirportRunway(input: $input, condition: $condition) {\n id\n airportId\n designationLow\n designationHigh\n surface\n lighted\n closed\n instrumentApproachPrecision\n instrumentApproachNonPrecision\n length\n width\n toraLow\n todaLow\n asdaLow\n ldaLow\n toraHigh\n todaHigh\n asdaHigh\n ldaHigh\n headingTrueLow\n headingTrueHigh\n thresholdLatitudeLow\n thresholdLongitudeLow\n thresholdLatitudeHigh\n thresholdLongitudeHigh\n thresholdElevationLow\n thresholdElevationHigh\n dataSources\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateAirportRunway = /* GraphQL */ `\n mutation UpdateAirportRunway(\n $input: UpdateAirportRunwayInput!\n $condition: ModelAirportRunwayConditionInput\n ) {\n updateAirportRunway(input: $input, condition: $condition) {\n id\n airportId\n designationLow\n designationHigh\n surface\n lighted\n closed\n instrumentApproachPrecision\n instrumentApproachNonPrecision\n length\n width\n toraLow\n todaLow\n asdaLow\n ldaLow\n toraHigh\n todaHigh\n asdaHigh\n ldaHigh\n headingTrueLow\n headingTrueHigh\n thresholdLatitudeLow\n thresholdLongitudeLow\n thresholdLatitudeHigh\n thresholdLongitudeHigh\n thresholdElevationLow\n thresholdElevationHigh\n dataSources\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteAirportRunway = /* GraphQL */ `\n mutation DeleteAirportRunway(\n $input: DeleteAirportRunwayInput!\n $condition: ModelAirportRunwayConditionInput\n ) {\n deleteAirportRunway(input: $input, condition: $condition) {\n id\n airportId\n designationLow\n designationHigh\n surface\n lighted\n closed\n instrumentApproachPrecision\n instrumentApproachNonPrecision\n length\n width\n toraLow\n todaLow\n asdaLow\n ldaLow\n toraHigh\n todaHigh\n asdaHigh\n ldaHigh\n headingTrueLow\n headingTrueHigh\n thresholdLatitudeLow\n thresholdLongitudeLow\n thresholdLatitudeHigh\n thresholdLongitudeHigh\n thresholdElevationLow\n thresholdElevationHigh\n dataSources\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createAirportCategorization = /* GraphQL */ `\n mutation CreateAirportCategorization(\n $input: CreateAirportCategorizationInput!\n $condition: ModelAirportCategorizationConditionInput\n ) {\n createAirportCategorization(input: $input, condition: $condition) {\n id\n name\n icao\n categorizationData\n pilotNotes {\n items {\n id\n title\n content\n htmlContent\n pilotNoteAirportCategorizationId\n dispatchNoteAirportId\n createdByUserId\n createdDate\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n airports {\n items {\n id\n icao\n icaoFirstOne\n icaoFirstTwo\n name\n latitude\n longitude\n public\n closed\n instrument\n instrumentLowestCeilingFt\n instrumentLowestRvrM\n night\n elevation\n requestPeriodDays\n timezone\n dataSources\n priceProfile\n suitableToAlternate\n isEUAirport\n earlySlotWaitingList\n providersData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateAirportCategorization = /* GraphQL */ `\n mutation UpdateAirportCategorization(\n $input: UpdateAirportCategorizationInput!\n $condition: ModelAirportCategorizationConditionInput\n ) {\n updateAirportCategorization(input: $input, condition: $condition) {\n id\n name\n icao\n categorizationData\n pilotNotes {\n items {\n id\n title\n content\n htmlContent\n pilotNoteAirportCategorizationId\n dispatchNoteAirportId\n createdByUserId\n createdDate\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n airports {\n items {\n id\n icao\n icaoFirstOne\n icaoFirstTwo\n name\n latitude\n longitude\n public\n closed\n instrument\n instrumentLowestCeilingFt\n instrumentLowestRvrM\n night\n elevation\n requestPeriodDays\n timezone\n dataSources\n priceProfile\n suitableToAlternate\n isEUAirport\n earlySlotWaitingList\n providersData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteAirportCategorization = /* GraphQL */ `\n mutation DeleteAirportCategorization(\n $input: DeleteAirportCategorizationInput!\n $condition: ModelAirportCategorizationConditionInput\n ) {\n deleteAirportCategorization(input: $input, condition: $condition) {\n id\n name\n icao\n categorizationData\n pilotNotes {\n items {\n id\n title\n content\n htmlContent\n pilotNoteAirportCategorizationId\n dispatchNoteAirportId\n createdByUserId\n createdDate\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n airports {\n items {\n id\n icao\n icaoFirstOne\n icaoFirstTwo\n name\n latitude\n longitude\n public\n closed\n instrument\n instrumentLowestCeilingFt\n instrumentLowestRvrM\n night\n elevation\n requestPeriodDays\n timezone\n dataSources\n priceProfile\n suitableToAlternate\n isEUAirport\n earlySlotWaitingList\n providersData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createAirportDispatchNote = /* GraphQL */ `\n mutation CreateAirportDispatchNote(\n $input: CreateAirportDispatchNoteInput!\n $condition: ModelAirportDispatchNoteConditionInput\n ) {\n createAirportDispatchNote(input: $input, condition: $condition) {\n id\n airportId\n createdDate\n formData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateAirportDispatchNote = /* GraphQL */ `\n mutation UpdateAirportDispatchNote(\n $input: UpdateAirportDispatchNoteInput!\n $condition: ModelAirportDispatchNoteConditionInput\n ) {\n updateAirportDispatchNote(input: $input, condition: $condition) {\n id\n airportId\n createdDate\n formData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteAirportDispatchNote = /* GraphQL */ `\n mutation DeleteAirportDispatchNote(\n $input: DeleteAirportDispatchNoteInput!\n $condition: ModelAirportDispatchNoteConditionInput\n ) {\n deleteAirportDispatchNote(input: $input, condition: $condition) {\n id\n airportId\n createdDate\n formData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createCustomPage = /* GraphQL */ `\n mutation CreateCustomPage(\n $input: CreateCustomPageInput!\n $condition: ModelCustomPageConditionInput\n ) {\n createCustomPage(input: $input, condition: $condition) {\n id\n title\n content\n htmlContent\n pilotNoteAirportCategorizationId\n dispatchNoteAirportId\n createdByUserId\n createdDate\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateCustomPage = /* GraphQL */ `\n mutation UpdateCustomPage(\n $input: UpdateCustomPageInput!\n $condition: ModelCustomPageConditionInput\n ) {\n updateCustomPage(input: $input, condition: $condition) {\n id\n title\n content\n htmlContent\n pilotNoteAirportCategorizationId\n dispatchNoteAirportId\n createdByUserId\n createdDate\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteCustomPage = /* GraphQL */ `\n mutation DeleteCustomPage(\n $input: DeleteCustomPageInput!\n $condition: ModelCustomPageConditionInput\n ) {\n deleteCustomPage(input: $input, condition: $condition) {\n id\n title\n content\n htmlContent\n pilotNoteAirportCategorizationId\n dispatchNoteAirportId\n createdByUserId\n createdDate\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createSigningKeyChange = /* GraphQL */ `\n mutation CreateSigningKeyChange(\n $input: CreateSigningKeyChangeInput!\n $condition: ModelSigningKeyChangeConditionInput\n ) {\n createSigningKeyChange(input: $input, condition: $condition) {\n id\n devicePublicKey\n deviceKeyId\n temporaryPublicKey\n temporaryKeyId\n temporaryKeySignature\n signedByKeyId\n createdAt\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateSigningKeyChange = /* GraphQL */ `\n mutation UpdateSigningKeyChange(\n $input: UpdateSigningKeyChangeInput!\n $condition: ModelSigningKeyChangeConditionInput\n ) {\n updateSigningKeyChange(input: $input, condition: $condition) {\n id\n devicePublicKey\n deviceKeyId\n temporaryPublicKey\n temporaryKeyId\n temporaryKeySignature\n signedByKeyId\n createdAt\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteSigningKeyChange = /* GraphQL */ `\n mutation DeleteSigningKeyChange(\n $input: DeleteSigningKeyChangeInput!\n $condition: ModelSigningKeyChangeConditionInput\n ) {\n deleteSigningKeyChange(input: $input, condition: $condition) {\n id\n devicePublicKey\n deviceKeyId\n temporaryPublicKey\n temporaryKeyId\n temporaryKeySignature\n signedByKeyId\n createdAt\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createSignedData = /* GraphQL */ `\n mutation CreateSignedData(\n $input: CreateSignedDataInput!\n $condition: ModelSignedDataConditionInput\n ) {\n createSignedData(input: $input, condition: $condition) {\n id\n data\n deviceSignature\n temporarySignature\n deviceKeyId\n temporaryKeyId\n createdAt\n flightId\n userId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateSignedData = /* GraphQL */ `\n mutation UpdateSignedData(\n $input: UpdateSignedDataInput!\n $condition: ModelSignedDataConditionInput\n ) {\n updateSignedData(input: $input, condition: $condition) {\n id\n data\n deviceSignature\n temporarySignature\n deviceKeyId\n temporaryKeyId\n createdAt\n flightId\n userId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteSignedData = /* GraphQL */ `\n mutation DeleteSignedData(\n $input: DeleteSignedDataInput!\n $condition: ModelSignedDataConditionInput\n ) {\n deleteSignedData(input: $input, condition: $condition) {\n id\n data\n deviceSignature\n temporarySignature\n deviceKeyId\n temporaryKeyId\n createdAt\n flightId\n userId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createSystemText = /* GraphQL */ `\n mutation CreateSystemText(\n $input: CreateSystemTextInput!\n $condition: ModelSystemTextConditionInput\n ) {\n createSystemText(input: $input, condition: $condition) {\n id\n type\n createdDate\n text\n locale\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateSystemText = /* GraphQL */ `\n mutation UpdateSystemText(\n $input: UpdateSystemTextInput!\n $condition: ModelSystemTextConditionInput\n ) {\n updateSystemText(input: $input, condition: $condition) {\n id\n type\n createdDate\n text\n locale\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteSystemText = /* GraphQL */ `\n mutation DeleteSystemText(\n $input: DeleteSystemTextInput!\n $condition: ModelSystemTextConditionInput\n ) {\n deleteSystemText(input: $input, condition: $condition) {\n id\n type\n createdDate\n text\n locale\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createMailingText = /* GraphQL */ `\n mutation CreateMailingText(\n $input: CreateMailingTextInput!\n $condition: ModelMailingTextConditionInput\n ) {\n createMailingText(input: $input, condition: $condition) {\n id\n type\n createdDate\n title\n customPageEditorContent\n subject\n smsContent\n htmlContent\n customData\n attachmentKeys\n attachmentNames\n locale\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateMailingText = /* GraphQL */ `\n mutation UpdateMailingText(\n $input: UpdateMailingTextInput!\n $condition: ModelMailingTextConditionInput\n ) {\n updateMailingText(input: $input, condition: $condition) {\n id\n type\n createdDate\n title\n customPageEditorContent\n subject\n smsContent\n htmlContent\n customData\n attachmentKeys\n attachmentNames\n locale\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteMailingText = /* GraphQL */ `\n mutation DeleteMailingText(\n $input: DeleteMailingTextInput!\n $condition: ModelMailingTextConditionInput\n ) {\n deleteMailingText(input: $input, condition: $condition) {\n id\n type\n createdDate\n title\n customPageEditorContent\n subject\n smsContent\n htmlContent\n customData\n attachmentKeys\n attachmentNames\n locale\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createMailingReminder = /* GraphQL */ `\n mutation CreateMailingReminder(\n $input: CreateMailingReminderInput!\n $condition: ModelMailingReminderConditionInput\n ) {\n createMailingReminder(input: $input, condition: $condition) {\n id\n crewQualificationId\n squawkId\n sentDate\n mailingTextId\n customData\n method\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateMailingReminder = /* GraphQL */ `\n mutation UpdateMailingReminder(\n $input: UpdateMailingReminderInput!\n $condition: ModelMailingReminderConditionInput\n ) {\n updateMailingReminder(input: $input, condition: $condition) {\n id\n crewQualificationId\n squawkId\n sentDate\n mailingTextId\n customData\n method\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteMailingReminder = /* GraphQL */ `\n mutation DeleteMailingReminder(\n $input: DeleteMailingReminderInput!\n $condition: ModelMailingReminderConditionInput\n ) {\n deleteMailingReminder(input: $input, condition: $condition) {\n id\n crewQualificationId\n squawkId\n sentDate\n mailingTextId\n customData\n method\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createErrorReport = /* GraphQL */ `\n mutation CreateErrorReport(\n $input: CreateErrorReportInput!\n $condition: ModelErrorReportConditionInput\n ) {\n createErrorReport(input: $input, condition: $condition) {\n id\n userId\n message\n place\n data\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateErrorReport = /* GraphQL */ `\n mutation UpdateErrorReport(\n $input: UpdateErrorReportInput!\n $condition: ModelErrorReportConditionInput\n ) {\n updateErrorReport(input: $input, condition: $condition) {\n id\n userId\n message\n place\n data\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteErrorReport = /* GraphQL */ `\n mutation DeleteErrorReport(\n $input: DeleteErrorReportInput!\n $condition: ModelErrorReportConditionInput\n ) {\n deleteErrorReport(input: $input, condition: $condition) {\n id\n userId\n message\n place\n data\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createLogbookRecord = /* GraphQL */ `\n mutation CreateLogbookRecord(\n $input: CreateLogbookRecordInput!\n $condition: ModelLogbookRecordConditionInput\n ) {\n createLogbookRecord(input: $input, condition: $condition) {\n id\n contactId\n crewId\n editableByUserIds\n date\n deleted\n legId\n departurePlace\n departureTime\n arrivalPlace\n arrivalTime\n aircraftMake\n aircraftRegistration\n airplaneSeMeMcc\n totalFlightTime\n picName\n landingsTotal\n landingsNight\n nightTime\n ifrTime\n picTime\n copilotTime\n dualTime\n instructorTime\n isFstd\n fstdTime\n remarks\n crossCountryTime\n instrumentActualTime\n instrumentSimulatedTime\n instrumentApproachPlace\n instrumentApproachType\n instrumentApproachCount\n instrumentApproachDetails\n holdings\n customData\n signature\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateLogbookRecord = /* GraphQL */ `\n mutation UpdateLogbookRecord(\n $input: UpdateLogbookRecordInput!\n $condition: ModelLogbookRecordConditionInput\n ) {\n updateLogbookRecord(input: $input, condition: $condition) {\n id\n contactId\n crewId\n editableByUserIds\n date\n deleted\n legId\n departurePlace\n departureTime\n arrivalPlace\n arrivalTime\n aircraftMake\n aircraftRegistration\n airplaneSeMeMcc\n totalFlightTime\n picName\n landingsTotal\n landingsNight\n nightTime\n ifrTime\n picTime\n copilotTime\n dualTime\n instructorTime\n isFstd\n fstdTime\n remarks\n crossCountryTime\n instrumentActualTime\n instrumentSimulatedTime\n instrumentApproachPlace\n instrumentApproachType\n instrumentApproachCount\n instrumentApproachDetails\n holdings\n customData\n signature\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteLogbookRecord = /* GraphQL */ `\n mutation DeleteLogbookRecord(\n $input: DeleteLogbookRecordInput!\n $condition: ModelLogbookRecordConditionInput\n ) {\n deleteLogbookRecord(input: $input, condition: $condition) {\n id\n contactId\n crewId\n editableByUserIds\n date\n deleted\n legId\n departurePlace\n departureTime\n arrivalPlace\n arrivalTime\n aircraftMake\n aircraftRegistration\n airplaneSeMeMcc\n totalFlightTime\n picName\n landingsTotal\n landingsNight\n nightTime\n ifrTime\n picTime\n copilotTime\n dualTime\n instructorTime\n isFstd\n fstdTime\n remarks\n crossCountryTime\n instrumentActualTime\n instrumentSimulatedTime\n instrumentApproachPlace\n instrumentApproachType\n instrumentApproachCount\n instrumentApproachDetails\n holdings\n customData\n signature\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createHandWrittenSignature = /* GraphQL */ `\n mutation CreateHandWrittenSignature(\n $input: CreateHandWrittenSignatureInput!\n $condition: ModelHandWrittenSignatureConditionInput\n ) {\n createHandWrittenSignature(input: $input, condition: $condition) {\n id\n userId\n contactId\n crewId\n signature\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateHandWrittenSignature = /* GraphQL */ `\n mutation UpdateHandWrittenSignature(\n $input: UpdateHandWrittenSignatureInput!\n $condition: ModelHandWrittenSignatureConditionInput\n ) {\n updateHandWrittenSignature(input: $input, condition: $condition) {\n id\n userId\n contactId\n crewId\n signature\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteHandWrittenSignature = /* GraphQL */ `\n mutation DeleteHandWrittenSignature(\n $input: DeleteHandWrittenSignatureInput!\n $condition: ModelHandWrittenSignatureConditionInput\n ) {\n deleteHandWrittenSignature(input: $input, condition: $condition) {\n id\n userId\n contactId\n crewId\n signature\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createContact2Tag = /* GraphQL */ `\n mutation CreateContact2Tag(\n $input: CreateContact2TagInput!\n $condition: ModelContact2TagConditionInput\n ) {\n createContact2Tag(input: $input, condition: $condition) {\n id\n contactId\n tagId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n tag {\n id\n title\n description\n color\n type\n contacts {\n nextToken\n startedAt\n }\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateContact2Tag = /* GraphQL */ `\n mutation UpdateContact2Tag(\n $input: UpdateContact2TagInput!\n $condition: ModelContact2TagConditionInput\n ) {\n updateContact2Tag(input: $input, condition: $condition) {\n id\n contactId\n tagId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n tag {\n id\n title\n description\n color\n type\n contacts {\n nextToken\n startedAt\n }\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteContact2Tag = /* GraphQL */ `\n mutation DeleteContact2Tag(\n $input: DeleteContact2TagInput!\n $condition: ModelContact2TagConditionInput\n ) {\n deleteContact2Tag(input: $input, condition: $condition) {\n id\n contactId\n tagId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n tag {\n id\n title\n description\n color\n type\n contacts {\n nextToken\n startedAt\n }\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createTag = /* GraphQL */ `\n mutation CreateTag(\n $input: CreateTagInput!\n $condition: ModelTagConditionInput\n ) {\n createTag(input: $input, condition: $condition) {\n id\n title\n description\n color\n type\n contacts {\n items {\n id\n contactId\n tagId\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateTag = /* GraphQL */ `\n mutation UpdateTag(\n $input: UpdateTagInput!\n $condition: ModelTagConditionInput\n ) {\n updateTag(input: $input, condition: $condition) {\n id\n title\n description\n color\n type\n contacts {\n items {\n id\n contactId\n tagId\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteTag = /* GraphQL */ `\n mutation DeleteTag(\n $input: DeleteTagInput!\n $condition: ModelTagConditionInput\n ) {\n deleteTag(input: $input, condition: $condition) {\n id\n title\n description\n color\n type\n contacts {\n items {\n id\n contactId\n tagId\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createCrewRole = /* GraphQL */ `\n mutation CreateCrewRole(\n $input: CreateCrewRoleInput!\n $condition: ModelCrewRoleConditionInput\n ) {\n createCrewRole(input: $input, condition: $condition) {\n id\n title\n description\n ops\n aircraftTypeId\n crewFunction\n requirements\n deleted\n contacts {\n items {\n id\n contactId\n crewRoleId\n roleEarliestExpiration\n rolePrivileges\n rolePrivilegeEarliestExpiration\n created\n isNotActive\n isInTraining\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateCrewRole = /* GraphQL */ `\n mutation UpdateCrewRole(\n $input: UpdateCrewRoleInput!\n $condition: ModelCrewRoleConditionInput\n ) {\n updateCrewRole(input: $input, condition: $condition) {\n id\n title\n description\n ops\n aircraftTypeId\n crewFunction\n requirements\n deleted\n contacts {\n items {\n id\n contactId\n crewRoleId\n roleEarliestExpiration\n rolePrivileges\n rolePrivilegeEarliestExpiration\n created\n isNotActive\n isInTraining\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteCrewRole = /* GraphQL */ `\n mutation DeleteCrewRole(\n $input: DeleteCrewRoleInput!\n $condition: ModelCrewRoleConditionInput\n ) {\n deleteCrewRole(input: $input, condition: $condition) {\n id\n title\n description\n ops\n aircraftTypeId\n crewFunction\n requirements\n deleted\n contacts {\n items {\n id\n contactId\n crewRoleId\n roleEarliestExpiration\n rolePrivileges\n rolePrivilegeEarliestExpiration\n created\n isNotActive\n isInTraining\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createContact2CrewRole = /* GraphQL */ `\n mutation CreateContact2CrewRole(\n $input: CreateContact2CrewRoleInput!\n $condition: ModelContact2CrewRoleConditionInput\n ) {\n createContact2CrewRole(input: $input, condition: $condition) {\n id\n contactId\n crewRoleId\n roleEarliestExpiration\n rolePrivileges\n rolePrivilegeEarliestExpiration\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n crewRole {\n id\n title\n description\n ops\n aircraftTypeId\n crewFunction\n requirements\n deleted\n contacts {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n created\n isNotActive\n isInTraining\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateContact2CrewRole = /* GraphQL */ `\n mutation UpdateContact2CrewRole(\n $input: UpdateContact2CrewRoleInput!\n $condition: ModelContact2CrewRoleConditionInput\n ) {\n updateContact2CrewRole(input: $input, condition: $condition) {\n id\n contactId\n crewRoleId\n roleEarliestExpiration\n rolePrivileges\n rolePrivilegeEarliestExpiration\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n crewRole {\n id\n title\n description\n ops\n aircraftTypeId\n crewFunction\n requirements\n deleted\n contacts {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n created\n isNotActive\n isInTraining\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteContact2CrewRole = /* GraphQL */ `\n mutation DeleteContact2CrewRole(\n $input: DeleteContact2CrewRoleInput!\n $condition: ModelContact2CrewRoleConditionInput\n ) {\n deleteContact2CrewRole(input: $input, condition: $condition) {\n id\n contactId\n crewRoleId\n roleEarliestExpiration\n rolePrivileges\n rolePrivilegeEarliestExpiration\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n crewRole {\n id\n title\n description\n ops\n aircraftTypeId\n crewFunction\n requirements\n deleted\n contacts {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n created\n isNotActive\n isInTraining\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createDocumentSegment = /* GraphQL */ `\n mutation CreateDocumentSegment(\n $input: CreateDocumentSegmentInput!\n $condition: ModelDocumentSegmentConditionInput\n ) {\n createDocumentSegment(input: $input, condition: $condition) {\n id\n code\n name\n version\n content\n htmlContent\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateDocumentSegment = /* GraphQL */ `\n mutation UpdateDocumentSegment(\n $input: UpdateDocumentSegmentInput!\n $condition: ModelDocumentSegmentConditionInput\n ) {\n updateDocumentSegment(input: $input, condition: $condition) {\n id\n code\n name\n version\n content\n htmlContent\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteDocumentSegment = /* GraphQL */ `\n mutation DeleteDocumentSegment(\n $input: DeleteDocumentSegmentInput!\n $condition: ModelDocumentSegmentConditionInput\n ) {\n deleteDocumentSegment(input: $input, condition: $condition) {\n id\n code\n name\n version\n content\n htmlContent\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createMaintenanceRecord = /* GraphQL */ `\n mutation CreateMaintenanceRecord(\n $input: CreateMaintenanceRecordInput!\n $condition: ModelMaintenanceRecordConditionInput\n ) {\n createMaintenanceRecord(input: $input, condition: $condition) {\n id\n createdAt\n deleted\n aircraftId\n relatedReleaseToServiceIds\n relatedSquawkIds\n title\n hasReleaseToService\n crsFlightDocumentIds\n workReportFlightDocumentIds\n camoOrderFlightDocumentIds\n beforeMaintenanceCountableChangeId\n maintenanceCountableChangeId\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n beforeMaintenanceCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n beforeMaintenanceCountableValuesOverrides\n maintenanceCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n afterMaintenanceCountableValuesOverrides\n displayInAircraftLogIds\n displayInAircraftLogTypes\n releaseToServices {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n squawkId\n deferralId\n maintenanceRecordId\n createdAt\n releaseType\n releasedByName\n releasedByOrganization\n releasedByLicenseNumber\n releasedBySignature\n text\n aircraftFlightTime\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n maintenanceIntervalChangeData\n maintenanceEventId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateMaintenanceRecord = /* GraphQL */ `\n mutation UpdateMaintenanceRecord(\n $input: UpdateMaintenanceRecordInput!\n $condition: ModelMaintenanceRecordConditionInput\n ) {\n updateMaintenanceRecord(input: $input, condition: $condition) {\n id\n createdAt\n deleted\n aircraftId\n relatedReleaseToServiceIds\n relatedSquawkIds\n title\n hasReleaseToService\n crsFlightDocumentIds\n workReportFlightDocumentIds\n camoOrderFlightDocumentIds\n beforeMaintenanceCountableChangeId\n maintenanceCountableChangeId\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n beforeMaintenanceCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n beforeMaintenanceCountableValuesOverrides\n maintenanceCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n afterMaintenanceCountableValuesOverrides\n displayInAircraftLogIds\n displayInAircraftLogTypes\n releaseToServices {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n squawkId\n deferralId\n maintenanceRecordId\n createdAt\n releaseType\n releasedByName\n releasedByOrganization\n releasedByLicenseNumber\n releasedBySignature\n text\n aircraftFlightTime\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n maintenanceIntervalChangeData\n maintenanceEventId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteMaintenanceRecord = /* GraphQL */ `\n mutation DeleteMaintenanceRecord(\n $input: DeleteMaintenanceRecordInput!\n $condition: ModelMaintenanceRecordConditionInput\n ) {\n deleteMaintenanceRecord(input: $input, condition: $condition) {\n id\n createdAt\n deleted\n aircraftId\n relatedReleaseToServiceIds\n relatedSquawkIds\n title\n hasReleaseToService\n crsFlightDocumentIds\n workReportFlightDocumentIds\n camoOrderFlightDocumentIds\n beforeMaintenanceCountableChangeId\n maintenanceCountableChangeId\n flightDocuments {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n beforeMaintenanceCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n beforeMaintenanceCountableValuesOverrides\n maintenanceCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n afterMaintenanceCountableValuesOverrides\n displayInAircraftLogIds\n displayInAircraftLogTypes\n releaseToServices {\n items {\n id\n deleted\n editableByUserIds\n aircraftId\n squawkId\n deferralId\n maintenanceRecordId\n createdAt\n releaseType\n releasedByName\n releasedByOrganization\n releasedByLicenseNumber\n releasedBySignature\n text\n aircraftFlightTime\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n maintenanceIntervalChangeData\n maintenanceEventId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createMaintenanceWorkOrder = /* GraphQL */ `\n mutation CreateMaintenanceWorkOrder(\n $input: CreateMaintenanceWorkOrderInput!\n $condition: ModelMaintenanceWorkOrderConditionInput\n ) {\n createMaintenanceWorkOrder(input: $input, condition: $condition) {\n id\n createdAt\n deleted\n aircraftId\n maintenanceEventId\n maintenanceStartDate\n data\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateMaintenanceWorkOrder = /* GraphQL */ `\n mutation UpdateMaintenanceWorkOrder(\n $input: UpdateMaintenanceWorkOrderInput!\n $condition: ModelMaintenanceWorkOrderConditionInput\n ) {\n updateMaintenanceWorkOrder(input: $input, condition: $condition) {\n id\n createdAt\n deleted\n aircraftId\n maintenanceEventId\n maintenanceStartDate\n data\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteMaintenanceWorkOrder = /* GraphQL */ `\n mutation DeleteMaintenanceWorkOrder(\n $input: DeleteMaintenanceWorkOrderInput!\n $condition: ModelMaintenanceWorkOrderConditionInput\n ) {\n deleteMaintenanceWorkOrder(input: $input, condition: $condition) {\n id\n createdAt\n deleted\n aircraftId\n maintenanceEventId\n maintenanceStartDate\n data\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createAircraftLogEvent = /* GraphQL */ `\n mutation CreateAircraftLogEvent(\n $input: CreateAircraftLogEventInput!\n $condition: ModelAircraftLogEventConditionInput\n ) {\n createAircraftLogEvent(input: $input, condition: $condition) {\n id\n aircraftId\n createdAt\n logType\n eventType\n beforeCountableChangeId\n eventData\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateAircraftLogEvent = /* GraphQL */ `\n mutation UpdateAircraftLogEvent(\n $input: UpdateAircraftLogEventInput!\n $condition: ModelAircraftLogEventConditionInput\n ) {\n updateAircraftLogEvent(input: $input, condition: $condition) {\n id\n aircraftId\n createdAt\n logType\n eventType\n beforeCountableChangeId\n eventData\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteAircraftLogEvent = /* GraphQL */ `\n mutation DeleteAircraftLogEvent(\n $input: DeleteAircraftLogEventInput!\n $condition: ModelAircraftLogEventConditionInput\n ) {\n deleteAircraftLogEvent(input: $input, condition: $condition) {\n id\n aircraftId\n createdAt\n logType\n eventType\n beforeCountableChangeId\n eventData\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createControlledDocument = /* GraphQL */ `\n mutation CreateControlledDocument(\n $input: CreateControlledDocumentInput!\n $condition: ModelControlledDocumentConditionInput\n ) {\n createControlledDocument(input: $input, condition: $condition) {\n id\n createdAt\n deleted\n title\n files\n documentData\n accessRights\n isForTlb\n deviceIds {\n items {\n id\n createdAt\n controlledDocumentId\n deviceId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateControlledDocument = /* GraphQL */ `\n mutation UpdateControlledDocument(\n $input: UpdateControlledDocumentInput!\n $condition: ModelControlledDocumentConditionInput\n ) {\n updateControlledDocument(input: $input, condition: $condition) {\n id\n createdAt\n deleted\n title\n files\n documentData\n accessRights\n isForTlb\n deviceIds {\n items {\n id\n createdAt\n controlledDocumentId\n deviceId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteControlledDocument = /* GraphQL */ `\n mutation DeleteControlledDocument(\n $input: DeleteControlledDocumentInput!\n $condition: ModelControlledDocumentConditionInput\n ) {\n deleteControlledDocument(input: $input, condition: $condition) {\n id\n createdAt\n deleted\n title\n files\n documentData\n accessRights\n isForTlb\n deviceIds {\n items {\n id\n createdAt\n controlledDocumentId\n deviceId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createControlledDocument2DeviceId = /* GraphQL */ `\n mutation CreateControlledDocument2DeviceId(\n $input: CreateControlledDocument2DeviceIdInput!\n $condition: ModelControlledDocument2DeviceIdConditionInput\n ) {\n createControlledDocument2DeviceId(input: $input, condition: $condition) {\n id\n createdAt\n controlledDocumentId\n deviceId\n controlledDocument {\n id\n createdAt\n deleted\n title\n files\n documentData\n accessRights\n isForTlb\n deviceIds {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateControlledDocument2DeviceId = /* GraphQL */ `\n mutation UpdateControlledDocument2DeviceId(\n $input: UpdateControlledDocument2DeviceIdInput!\n $condition: ModelControlledDocument2DeviceIdConditionInput\n ) {\n updateControlledDocument2DeviceId(input: $input, condition: $condition) {\n id\n createdAt\n controlledDocumentId\n deviceId\n controlledDocument {\n id\n createdAt\n deleted\n title\n files\n documentData\n accessRights\n isForTlb\n deviceIds {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteControlledDocument2DeviceId = /* GraphQL */ `\n mutation DeleteControlledDocument2DeviceId(\n $input: DeleteControlledDocument2DeviceIdInput!\n $condition: ModelControlledDocument2DeviceIdConditionInput\n ) {\n deleteControlledDocument2DeviceId(input: $input, condition: $condition) {\n id\n createdAt\n controlledDocumentId\n deviceId\n controlledDocument {\n id\n createdAt\n deleted\n title\n files\n documentData\n accessRights\n isForTlb\n deviceIds {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createControlledDocumentNotification = /* GraphQL */ `\n mutation CreateControlledDocumentNotification(\n $input: CreateControlledDocumentNotificationInput!\n $condition: ModelControlledDocumentNotificationConditionInput\n ) {\n createControlledDocumentNotification(input: $input, condition: $condition) {\n id\n controlledDocumentId\n contactId\n createdAt\n readAt\n state\n revision\n controlledDocument {\n id\n createdAt\n deleted\n title\n files\n documentData\n accessRights\n isForTlb\n deviceIds {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateControlledDocumentNotification = /* GraphQL */ `\n mutation UpdateControlledDocumentNotification(\n $input: UpdateControlledDocumentNotificationInput!\n $condition: ModelControlledDocumentNotificationConditionInput\n ) {\n updateControlledDocumentNotification(input: $input, condition: $condition) {\n id\n controlledDocumentId\n contactId\n createdAt\n readAt\n state\n revision\n controlledDocument {\n id\n createdAt\n deleted\n title\n files\n documentData\n accessRights\n isForTlb\n deviceIds {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteControlledDocumentNotification = /* GraphQL */ `\n mutation DeleteControlledDocumentNotification(\n $input: DeleteControlledDocumentNotificationInput!\n $condition: ModelControlledDocumentNotificationConditionInput\n ) {\n deleteControlledDocumentNotification(input: $input, condition: $condition) {\n id\n controlledDocumentId\n contactId\n createdAt\n readAt\n state\n revision\n controlledDocument {\n id\n createdAt\n deleted\n title\n files\n documentData\n accessRights\n isForTlb\n deviceIds {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createDevice = /* GraphQL */ `\n mutation CreateDevice(\n $input: CreateDeviceInput!\n $condition: ModelDeviceConditionInput\n ) {\n createDevice(input: $input, condition: $condition) {\n id\n createdAt\n deviceId\n assignments\n deviceData\n name\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateDevice = /* GraphQL */ `\n mutation UpdateDevice(\n $input: UpdateDeviceInput!\n $condition: ModelDeviceConditionInput\n ) {\n updateDevice(input: $input, condition: $condition) {\n id\n createdAt\n deviceId\n assignments\n deviceData\n name\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteDevice = /* GraphQL */ `\n mutation DeleteDevice(\n $input: DeleteDeviceInput!\n $condition: ModelDeviceConditionInput\n ) {\n deleteDevice(input: $input, condition: $condition) {\n id\n createdAt\n deviceId\n assignments\n deviceData\n name\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createReservationResource = /* GraphQL */ `\n mutation CreateReservationResource(\n $input: CreateReservationResourceInput!\n $condition: ModelReservationResourceConditionInput\n ) {\n createReservationResource(input: $input, condition: $condition) {\n id\n title\n type\n reservationId\n aircraftId\n contactId\n externalId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n reservationData\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservationCode\n flightType\n quotationId\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n avinodeRfqId\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n notifications\n ticketInfo\n tickets {\n nextToken\n startedAt\n }\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateReservationResource = /* GraphQL */ `\n mutation UpdateReservationResource(\n $input: UpdateReservationResourceInput!\n $condition: ModelReservationResourceConditionInput\n ) {\n updateReservationResource(input: $input, condition: $condition) {\n id\n title\n type\n reservationId\n aircraftId\n contactId\n externalId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n reservationData\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservationCode\n flightType\n quotationId\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n avinodeRfqId\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n notifications\n ticketInfo\n tickets {\n nextToken\n startedAt\n }\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteReservationResource = /* GraphQL */ `\n mutation DeleteReservationResource(\n $input: DeleteReservationResourceInput!\n $condition: ModelReservationResourceConditionInput\n ) {\n deleteReservationResource(input: $input, condition: $condition) {\n id\n title\n type\n reservationId\n aircraftId\n contactId\n externalId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n reservationData\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservationCode\n flightType\n quotationId\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n avinodeRfqId\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n notifications\n ticketInfo\n tickets {\n nextToken\n startedAt\n }\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createReservation = /* GraphQL */ `\n mutation CreateReservation(\n $input: CreateReservationInput!\n $condition: ModelReservationConditionInput\n ) {\n createReservation(input: $input, condition: $condition) {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n items {\n id\n title\n type\n reservationId\n aircraftId\n contactId\n externalId\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n contactId\n isExternal\n reservationData\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservationCode\n flightType\n quotationId\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n notifications\n ticketInfo\n tickets {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateReservation = /* GraphQL */ `\n mutation UpdateReservation(\n $input: UpdateReservationInput!\n $condition: ModelReservationConditionInput\n ) {\n updateReservation(input: $input, condition: $condition) {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n items {\n id\n title\n type\n reservationId\n aircraftId\n contactId\n externalId\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n contactId\n isExternal\n reservationData\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservationCode\n flightType\n quotationId\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n notifications\n ticketInfo\n tickets {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteReservation = /* GraphQL */ `\n mutation DeleteReservation(\n $input: DeleteReservationInput!\n $condition: ModelReservationConditionInput\n ) {\n deleteReservation(input: $input, condition: $condition) {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n items {\n id\n title\n type\n reservationId\n aircraftId\n contactId\n externalId\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n contactId\n isExternal\n reservationData\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservationCode\n flightType\n quotationId\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n notifications\n ticketInfo\n tickets {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createTrendMonitoringDocument = /* GraphQL */ `\n mutation CreateTrendMonitoringDocument(\n $input: CreateTrendMonitoringDocumentInput!\n $condition: ModelTrendMonitoringDocumentConditionInput\n ) {\n createTrendMonitoringDocument(input: $input, condition: $condition) {\n id\n createdAt\n aircraftId\n contentKey\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateTrendMonitoringDocument = /* GraphQL */ `\n mutation UpdateTrendMonitoringDocument(\n $input: UpdateTrendMonitoringDocumentInput!\n $condition: ModelTrendMonitoringDocumentConditionInput\n ) {\n updateTrendMonitoringDocument(input: $input, condition: $condition) {\n id\n createdAt\n aircraftId\n contentKey\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteTrendMonitoringDocument = /* GraphQL */ `\n mutation DeleteTrendMonitoringDocument(\n $input: DeleteTrendMonitoringDocumentInput!\n $condition: ModelTrendMonitoringDocumentConditionInput\n ) {\n deleteTrendMonitoringDocument(input: $input, condition: $condition) {\n id\n createdAt\n aircraftId\n contentKey\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createQuotationResource = /* GraphQL */ `\n mutation CreateQuotationResource(\n $input: CreateQuotationResourceInput!\n $condition: ModelQuotationResourceConditionInput\n ) {\n createQuotationResource(input: $input, condition: $condition) {\n id\n title\n type\n quotationId\n aircraftId\n contactId\n externalId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateQuotationResource = /* GraphQL */ `\n mutation UpdateQuotationResource(\n $input: UpdateQuotationResourceInput!\n $condition: ModelQuotationResourceConditionInput\n ) {\n updateQuotationResource(input: $input, condition: $condition) {\n id\n title\n type\n quotationId\n aircraftId\n contactId\n externalId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteQuotationResource = /* GraphQL */ `\n mutation DeleteQuotationResource(\n $input: DeleteQuotationResourceInput!\n $condition: ModelQuotationResourceConditionInput\n ) {\n deleteQuotationResource(input: $input, condition: $condition) {\n id\n title\n type\n quotationId\n aircraftId\n contactId\n externalId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createQuotation = /* GraphQL */ `\n mutation CreateQuotation(\n $input: CreateQuotationInput!\n $condition: ModelQuotationConditionInput\n ) {\n createQuotation(input: $input, condition: $condition) {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n items {\n id\n title\n type\n quotationId\n aircraftId\n contactId\n externalId\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateQuotation = /* GraphQL */ `\n mutation UpdateQuotation(\n $input: UpdateQuotationInput!\n $condition: ModelQuotationConditionInput\n ) {\n updateQuotation(input: $input, condition: $condition) {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n items {\n id\n title\n type\n quotationId\n aircraftId\n contactId\n externalId\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteQuotation = /* GraphQL */ `\n mutation DeleteQuotation(\n $input: DeleteQuotationInput!\n $condition: ModelQuotationConditionInput\n ) {\n deleteQuotation(input: $input, condition: $condition) {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n items {\n id\n title\n type\n quotationId\n aircraftId\n contactId\n externalId\n created\n deleted\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createTrendMonitoringExceeding = /* GraphQL */ `\n mutation CreateTrendMonitoringExceeding(\n $input: CreateTrendMonitoringExceedingInput!\n $condition: ModelTrendMonitoringExceedingConditionInput\n ) {\n createTrendMonitoringExceeding(input: $input, condition: $condition) {\n id\n documentId\n dateFrom\n dateTo\n startValue\n endValue\n minValue\n topValue\n limitValue\n propertyName\n description\n document {\n id\n createdAt\n aircraftId\n contentKey\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateTrendMonitoringExceeding = /* GraphQL */ `\n mutation UpdateTrendMonitoringExceeding(\n $input: UpdateTrendMonitoringExceedingInput!\n $condition: ModelTrendMonitoringExceedingConditionInput\n ) {\n updateTrendMonitoringExceeding(input: $input, condition: $condition) {\n id\n documentId\n dateFrom\n dateTo\n startValue\n endValue\n minValue\n topValue\n limitValue\n propertyName\n description\n document {\n id\n createdAt\n aircraftId\n contentKey\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteTrendMonitoringExceeding = /* GraphQL */ `\n mutation DeleteTrendMonitoringExceeding(\n $input: DeleteTrendMonitoringExceedingInput!\n $condition: ModelTrendMonitoringExceedingConditionInput\n ) {\n deleteTrendMonitoringExceeding(input: $input, condition: $condition) {\n id\n documentId\n dateFrom\n dateTo\n startValue\n endValue\n minValue\n topValue\n limitValue\n propertyName\n description\n document {\n id\n createdAt\n aircraftId\n contentKey\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createSequence = /* GraphQL */ `\n mutation CreateSequence(\n $input: CreateSequenceInput!\n $condition: ModelSequenceConditionInput\n ) {\n createSequence(input: $input, condition: $condition) {\n id\n lastNumber\n code\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateSequence = /* GraphQL */ `\n mutation UpdateSequence(\n $input: UpdateSequenceInput!\n $condition: ModelSequenceConditionInput\n ) {\n updateSequence(input: $input, condition: $condition) {\n id\n lastNumber\n code\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteSequence = /* GraphQL */ `\n mutation DeleteSequence(\n $input: DeleteSequenceInput!\n $condition: ModelSequenceConditionInput\n ) {\n deleteSequence(input: $input, condition: $condition) {\n id\n lastNumber\n code\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createBankAccount = /* GraphQL */ `\n mutation CreateBankAccount(\n $input: CreateBankAccountInput!\n $condition: ModelBankAccountConditionInput\n ) {\n createBankAccount(input: $input, condition: $condition) {\n id\n created\n currency\n account\n name\n iban\n swift\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateBankAccount = /* GraphQL */ `\n mutation UpdateBankAccount(\n $input: UpdateBankAccountInput!\n $condition: ModelBankAccountConditionInput\n ) {\n updateBankAccount(input: $input, condition: $condition) {\n id\n created\n currency\n account\n name\n iban\n swift\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteBankAccount = /* GraphQL */ `\n mutation DeleteBankAccount(\n $input: DeleteBankAccountInput!\n $condition: ModelBankAccountConditionInput\n ) {\n deleteBankAccount(input: $input, condition: $condition) {\n id\n created\n currency\n account\n name\n iban\n swift\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createInvoice = /* GraphQL */ `\n mutation CreateInvoice(\n $input: CreateInvoiceInput!\n $condition: ModelInvoiceConditionInput\n ) {\n createInvoice(input: $input, condition: $condition) {\n id\n createdAt\n number\n issueDate\n dueDate\n contactId\n type\n invoiceData\n quotationId\n reservationId\n contentKey\n fileTitle\n created\n aircraftId\n state\n auditData\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateInvoice = /* GraphQL */ `\n mutation UpdateInvoice(\n $input: UpdateInvoiceInput!\n $condition: ModelInvoiceConditionInput\n ) {\n updateInvoice(input: $input, condition: $condition) {\n id\n createdAt\n number\n issueDate\n dueDate\n contactId\n type\n invoiceData\n quotationId\n reservationId\n contentKey\n fileTitle\n created\n aircraftId\n state\n auditData\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteInvoice = /* GraphQL */ `\n mutation DeleteInvoice(\n $input: DeleteInvoiceInput!\n $condition: ModelInvoiceConditionInput\n ) {\n deleteInvoice(input: $input, condition: $condition) {\n id\n createdAt\n number\n issueDate\n dueDate\n contactId\n type\n invoiceData\n quotationId\n reservationId\n contentKey\n fileTitle\n created\n aircraftId\n state\n auditData\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createCustomFilter = /* GraphQL */ `\n mutation CreateCustomFilter(\n $input: CreateCustomFilterInput!\n $condition: ModelCustomFilterConditionInput\n ) {\n createCustomFilter(input: $input, condition: $condition) {\n id\n userId\n name\n createdAt\n filterData\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateCustomFilter = /* GraphQL */ `\n mutation UpdateCustomFilter(\n $input: UpdateCustomFilterInput!\n $condition: ModelCustomFilterConditionInput\n ) {\n updateCustomFilter(input: $input, condition: $condition) {\n id\n userId\n name\n createdAt\n filterData\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteCustomFilter = /* GraphQL */ `\n mutation DeleteCustomFilter(\n $input: DeleteCustomFilterInput!\n $condition: ModelCustomFilterConditionInput\n ) {\n deleteCustomFilter(input: $input, condition: $condition) {\n id\n userId\n name\n createdAt\n filterData\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createExchangeRate = /* GraphQL */ `\n mutation CreateExchangeRate(\n $input: CreateExchangeRateInput!\n $condition: ModelExchangeRateConditionInput\n ) {\n createExchangeRate(input: $input, condition: $condition) {\n id\n date\n exchangeRateData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateExchangeRate = /* GraphQL */ `\n mutation UpdateExchangeRate(\n $input: UpdateExchangeRateInput!\n $condition: ModelExchangeRateConditionInput\n ) {\n updateExchangeRate(input: $input, condition: $condition) {\n id\n date\n exchangeRateData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteExchangeRate = /* GraphQL */ `\n mutation DeleteExchangeRate(\n $input: DeleteExchangeRateInput!\n $condition: ModelExchangeRateConditionInput\n ) {\n deleteExchangeRate(input: $input, condition: $condition) {\n id\n date\n exchangeRateData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createAvinodeQuoteRequest = /* GraphQL */ `\n mutation CreateAvinodeQuoteRequest(\n $input: CreateAvinodeQuoteRequestInput!\n $condition: ModelAvinodeQuoteRequestConditionInput\n ) {\n createAvinodeQuoteRequest(input: $input, condition: $condition) {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateAvinodeQuoteRequest = /* GraphQL */ `\n mutation UpdateAvinodeQuoteRequest(\n $input: UpdateAvinodeQuoteRequestInput!\n $condition: ModelAvinodeQuoteRequestConditionInput\n ) {\n updateAvinodeQuoteRequest(input: $input, condition: $condition) {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteAvinodeQuoteRequest = /* GraphQL */ `\n mutation DeleteAvinodeQuoteRequest(\n $input: DeleteAvinodeQuoteRequestInput!\n $condition: ModelAvinodeQuoteRequestConditionInput\n ) {\n deleteAvinodeQuoteRequest(input: $input, condition: $condition) {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createAvinodeMessage = /* GraphQL */ `\n mutation CreateAvinodeMessage(\n $input: CreateAvinodeMessageInput!\n $condition: ModelAvinodeMessageConditionInput\n ) {\n createAvinodeMessage(input: $input, condition: $condition) {\n id\n createdOn\n externalRfqId\n externalIdentifier\n message\n type\n sellerCompanyDisplayName\n sellerCompanyId\n sellerAccountDisplayName\n sellerAccountId\n buyerCompanyDisplayName\n buyerCompanyId\n buyerAccountDisplayName\n buyerAccountId\n rfqAccepted\n tripId\n responseUserId\n avinodeUserName\n state\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateAvinodeMessage = /* GraphQL */ `\n mutation UpdateAvinodeMessage(\n $input: UpdateAvinodeMessageInput!\n $condition: ModelAvinodeMessageConditionInput\n ) {\n updateAvinodeMessage(input: $input, condition: $condition) {\n id\n createdOn\n externalRfqId\n externalIdentifier\n message\n type\n sellerCompanyDisplayName\n sellerCompanyId\n sellerAccountDisplayName\n sellerAccountId\n buyerCompanyDisplayName\n buyerCompanyId\n buyerAccountDisplayName\n buyerAccountId\n rfqAccepted\n tripId\n responseUserId\n avinodeUserName\n state\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteAvinodeMessage = /* GraphQL */ `\n mutation DeleteAvinodeMessage(\n $input: DeleteAvinodeMessageInput!\n $condition: ModelAvinodeMessageConditionInput\n ) {\n deleteAvinodeMessage(input: $input, condition: $condition) {\n id\n createdOn\n externalRfqId\n externalIdentifier\n message\n type\n sellerCompanyDisplayName\n sellerCompanyId\n sellerAccountDisplayName\n sellerAccountId\n buyerCompanyDisplayName\n buyerCompanyId\n buyerAccountDisplayName\n buyerAccountId\n rfqAccepted\n tripId\n responseUserId\n avinodeUserName\n state\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createAvinodeQuoteResponse = /* GraphQL */ `\n mutation CreateAvinodeQuoteResponse(\n $input: CreateAvinodeQuoteResponseInput!\n $condition: ModelAvinodeQuoteResponseConditionInput\n ) {\n createAvinodeQuoteResponse(input: $input, condition: $condition) {\n id\n createdAt\n sentDate\n state\n type\n reason\n message\n externalId\n quotationId\n responseUserId\n responseDate\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateAvinodeQuoteResponse = /* GraphQL */ `\n mutation UpdateAvinodeQuoteResponse(\n $input: UpdateAvinodeQuoteResponseInput!\n $condition: ModelAvinodeQuoteResponseConditionInput\n ) {\n updateAvinodeQuoteResponse(input: $input, condition: $condition) {\n id\n createdAt\n sentDate\n state\n type\n reason\n message\n externalId\n quotationId\n responseUserId\n responseDate\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteAvinodeQuoteResponse = /* GraphQL */ `\n mutation DeleteAvinodeQuoteResponse(\n $input: DeleteAvinodeQuoteResponseInput!\n $condition: ModelAvinodeQuoteResponseConditionInput\n ) {\n deleteAvinodeQuoteResponse(input: $input, condition: $condition) {\n id\n createdAt\n sentDate\n state\n type\n reason\n message\n externalId\n quotationId\n responseUserId\n responseDate\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createAvinodeQuoteDownloadQueue = /* GraphQL */ `\n mutation CreateAvinodeQuoteDownloadQueue(\n $input: CreateAvinodeQuoteDownloadQueueInput!\n $condition: ModelAvinodeQuoteDownloadQueueConditionInput\n ) {\n createAvinodeQuoteDownloadQueue(input: $input, condition: $condition) {\n id\n date\n state\n externalId\n href\n tripId\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateAvinodeQuoteDownloadQueue = /* GraphQL */ `\n mutation UpdateAvinodeQuoteDownloadQueue(\n $input: UpdateAvinodeQuoteDownloadQueueInput!\n $condition: ModelAvinodeQuoteDownloadQueueConditionInput\n ) {\n updateAvinodeQuoteDownloadQueue(input: $input, condition: $condition) {\n id\n date\n state\n externalId\n href\n tripId\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteAvinodeQuoteDownloadQueue = /* GraphQL */ `\n mutation DeleteAvinodeQuoteDownloadQueue(\n $input: DeleteAvinodeQuoteDownloadQueueInput!\n $condition: ModelAvinodeQuoteDownloadQueueConditionInput\n ) {\n deleteAvinodeQuoteDownloadQueue(input: $input, condition: $condition) {\n id\n date\n state\n externalId\n href\n tripId\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createIntegrationLastLoadedRecord = /* GraphQL */ `\n mutation CreateIntegrationLastLoadedRecord(\n $input: CreateIntegrationLastLoadedRecordInput!\n $condition: ModelIntegrationLastLoadedRecordConditionInput\n ) {\n createIntegrationLastLoadedRecord(input: $input, condition: $condition) {\n id\n key\n value\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateIntegrationLastLoadedRecord = /* GraphQL */ `\n mutation UpdateIntegrationLastLoadedRecord(\n $input: UpdateIntegrationLastLoadedRecordInput!\n $condition: ModelIntegrationLastLoadedRecordConditionInput\n ) {\n updateIntegrationLastLoadedRecord(input: $input, condition: $condition) {\n id\n key\n value\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteIntegrationLastLoadedRecord = /* GraphQL */ `\n mutation DeleteIntegrationLastLoadedRecord(\n $input: DeleteIntegrationLastLoadedRecordInput!\n $condition: ModelIntegrationLastLoadedRecordConditionInput\n ) {\n deleteIntegrationLastLoadedRecord(input: $input, condition: $condition) {\n id\n key\n value\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createPriceProfile = /* GraphQL */ `\n mutation CreatePriceProfile(\n $input: CreatePriceProfileInput!\n $condition: ModelPriceProfileConditionInput\n ) {\n createPriceProfile(input: $input, condition: $condition) {\n id\n name\n pricingTable\n contactTable\n salaryType\n salaryCategory\n contractType\n currency\n friendlyTypes\n registrations\n applications {\n items {\n id\n contactId\n aircraftId\n priceProfileId\n isPriorityForAircraft\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n created\n updatedAt\n removed\n _version\n _deleted\n _lastChangedAt\n createdAt\n }\n }\n`;\nexport const updatePriceProfile = /* GraphQL */ `\n mutation UpdatePriceProfile(\n $input: UpdatePriceProfileInput!\n $condition: ModelPriceProfileConditionInput\n ) {\n updatePriceProfile(input: $input, condition: $condition) {\n id\n name\n pricingTable\n contactTable\n salaryType\n salaryCategory\n contractType\n currency\n friendlyTypes\n registrations\n applications {\n items {\n id\n contactId\n aircraftId\n priceProfileId\n isPriorityForAircraft\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n created\n updatedAt\n removed\n _version\n _deleted\n _lastChangedAt\n createdAt\n }\n }\n`;\nexport const deletePriceProfile = /* GraphQL */ `\n mutation DeletePriceProfile(\n $input: DeletePriceProfileInput!\n $condition: ModelPriceProfileConditionInput\n ) {\n deletePriceProfile(input: $input, condition: $condition) {\n id\n name\n pricingTable\n contactTable\n salaryType\n salaryCategory\n contractType\n currency\n friendlyTypes\n registrations\n applications {\n items {\n id\n contactId\n aircraftId\n priceProfileId\n isPriorityForAircraft\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n nextToken\n startedAt\n }\n created\n updatedAt\n removed\n _version\n _deleted\n _lastChangedAt\n createdAt\n }\n }\n`;\nexport const createPriceProfileApplication = /* GraphQL */ `\n mutation CreatePriceProfileApplication(\n $input: CreatePriceProfileApplicationInput!\n $condition: ModelPriceProfileApplicationConditionInput\n ) {\n createPriceProfileApplication(input: $input, condition: $condition) {\n id\n contactId\n aircraftId\n priceProfileId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n isPriorityForAircraft\n priceProfile {\n id\n name\n pricingTable\n contactTable\n salaryType\n salaryCategory\n contractType\n currency\n friendlyTypes\n registrations\n applications {\n nextToken\n startedAt\n }\n created\n updatedAt\n removed\n _version\n _deleted\n _lastChangedAt\n createdAt\n }\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updatePriceProfileApplication = /* GraphQL */ `\n mutation UpdatePriceProfileApplication(\n $input: UpdatePriceProfileApplicationInput!\n $condition: ModelPriceProfileApplicationConditionInput\n ) {\n updatePriceProfileApplication(input: $input, condition: $condition) {\n id\n contactId\n aircraftId\n priceProfileId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n isPriorityForAircraft\n priceProfile {\n id\n name\n pricingTable\n contactTable\n salaryType\n salaryCategory\n contractType\n currency\n friendlyTypes\n registrations\n applications {\n nextToken\n startedAt\n }\n created\n updatedAt\n removed\n _version\n _deleted\n _lastChangedAt\n createdAt\n }\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deletePriceProfileApplication = /* GraphQL */ `\n mutation DeletePriceProfileApplication(\n $input: DeletePriceProfileApplicationInput!\n $condition: ModelPriceProfileApplicationConditionInput\n ) {\n deletePriceProfileApplication(input: $input, condition: $condition) {\n id\n contactId\n aircraftId\n priceProfileId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n isPriorityForAircraft\n priceProfile {\n id\n name\n pricingTable\n contactTable\n salaryType\n salaryCategory\n contractType\n currency\n friendlyTypes\n registrations\n applications {\n nextToken\n startedAt\n }\n created\n updatedAt\n removed\n _version\n _deleted\n _lastChangedAt\n createdAt\n }\n created\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createEntityStatistics = /* GraphQL */ `\n mutation CreateEntityStatistics(\n $input: CreateEntityStatisticsInput!\n $condition: ModelEntityStatisticsConditionInput\n ) {\n createEntityStatistics(input: $input, condition: $condition) {\n id\n count\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateEntityStatistics = /* GraphQL */ `\n mutation UpdateEntityStatistics(\n $input: UpdateEntityStatisticsInput!\n $condition: ModelEntityStatisticsConditionInput\n ) {\n updateEntityStatistics(input: $input, condition: $condition) {\n id\n count\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteEntityStatistics = /* GraphQL */ `\n mutation DeleteEntityStatistics(\n $input: DeleteEntityStatisticsInput!\n $condition: ModelEntityStatisticsConditionInput\n ) {\n deleteEntityStatistics(input: $input, condition: $condition) {\n id\n count\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createMessagingMessage = /* GraphQL */ `\n mutation CreateMessagingMessage(\n $input: CreateMessagingMessageInput!\n $condition: ModelMessagingMessageConditionInput\n ) {\n createMessagingMessage(input: $input, condition: $condition) {\n id\n createdAt\n authorName\n textRepresentation\n messageData\n userId\n replyToMessageId\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n reservationData\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservationCode\n flightType\n quotationId\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n avinodeRfqId\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n notifications\n ticketInfo\n tickets {\n nextToken\n startedAt\n }\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n replies {\n items {\n id\n createdAt\n authorName\n textRepresentation\n messageData\n userId\n replyToMessageId\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateMessagingMessage = /* GraphQL */ `\n mutation UpdateMessagingMessage(\n $input: UpdateMessagingMessageInput!\n $condition: ModelMessagingMessageConditionInput\n ) {\n updateMessagingMessage(input: $input, condition: $condition) {\n id\n createdAt\n authorName\n textRepresentation\n messageData\n userId\n replyToMessageId\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n reservationData\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservationCode\n flightType\n quotationId\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n avinodeRfqId\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n notifications\n ticketInfo\n tickets {\n nextToken\n startedAt\n }\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n replies {\n items {\n id\n createdAt\n authorName\n textRepresentation\n messageData\n userId\n replyToMessageId\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteMessagingMessage = /* GraphQL */ `\n mutation DeleteMessagingMessage(\n $input: DeleteMessagingMessageInput!\n $condition: ModelMessagingMessageConditionInput\n ) {\n deleteMessagingMessage(input: $input, condition: $condition) {\n id\n createdAt\n authorName\n textRepresentation\n messageData\n userId\n replyToMessageId\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n reservationData\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservationCode\n flightType\n quotationId\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n avinodeRfqId\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n notifications\n ticketInfo\n tickets {\n nextToken\n startedAt\n }\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n replies {\n items {\n id\n createdAt\n authorName\n textRepresentation\n messageData\n userId\n replyToMessageId\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createDutyReport = /* GraphQL */ `\n mutation CreateDutyReport(\n $input: CreateDutyReportInput!\n $condition: ModelDutyReportConditionInput\n ) {\n createDutyReport(input: $input, condition: $condition) {\n id\n createdAt\n editableByUserId\n registration\n typeOfExceedance\n typeOfDuty\n currentFdpStart\n currentFdpEnd\n acftType\n description\n airportOffIcao\n route\n airportOnIcao\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateDutyReport = /* GraphQL */ `\n mutation UpdateDutyReport(\n $input: UpdateDutyReportInput!\n $condition: ModelDutyReportConditionInput\n ) {\n updateDutyReport(input: $input, condition: $condition) {\n id\n createdAt\n editableByUserId\n registration\n typeOfExceedance\n typeOfDuty\n currentFdpStart\n currentFdpEnd\n acftType\n description\n airportOffIcao\n route\n airportOnIcao\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteDutyReport = /* GraphQL */ `\n mutation DeleteDutyReport(\n $input: DeleteDutyReportInput!\n $condition: ModelDutyReportConditionInput\n ) {\n deleteDutyReport(input: $input, condition: $condition) {\n id\n createdAt\n editableByUserId\n registration\n typeOfExceedance\n typeOfDuty\n currentFdpStart\n currentFdpEnd\n acftType\n description\n airportOffIcao\n route\n airportOnIcao\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const createReport = /* GraphQL */ `\n mutation CreateReport(\n $input: CreateReportInput!\n $condition: ModelReportConditionInput\n ) {\n createReport(input: $input, condition: $condition) {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n anonymous\n userMessage\n assets\n hazards {\n items {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n editableByUserId\n contactId\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n mitigationEffectivenessReview\n effective\n effectivePersonId\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n complianceFindings {\n items {\n id\n createdAt\n updatedAt\n removed\n concept\n headline\n status\n progress\n findingSource\n findingDate\n auditReference\n auditOrFindingReference\n findingClassification\n area\n category\n description\n descriptionHtml\n files\n correctiveActionRequired\n contactId\n correctiveActionProposalDueDate\n rootCauseAnalysis\n rootCauseAnalysisDate\n correctiveActionProposal\n correctiveActionProposalDate\n rootCauseCorrection\n correctiveActionPlanAccepted\n correctiveActionPlan\n correctiveActionImplementation\n correctiveActionImplementationDate\n rootCauseCorrectionImplementation\n rootCauseCorrectionImplementationDate\n correctiveActionImplementationAccepted\n correctiveActionImplementationDescription\n reportId\n auditId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyItem {\n id\n editableByUserIds\n deleted\n userId\n crewId\n state\n dutyPeriodId\n forceRestAfter\n note\n type\n startDate\n endDate\n sectorCount\n endPlaceIcao\n blockTimeMinutes\n plannedFdpExtension\n flightLegIds\n logbookRecordIds\n linkedDutyItemIds\n reports {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const updateReport = /* GraphQL */ `\n mutation UpdateReport(\n $input: UpdateReportInput!\n $condition: ModelReportConditionInput\n ) {\n updateReport(input: $input, condition: $condition) {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n anonymous\n userMessage\n assets\n hazards {\n items {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n editableByUserId\n contactId\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n mitigationEffectivenessReview\n effective\n effectivePersonId\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n complianceFindings {\n items {\n id\n createdAt\n updatedAt\n removed\n concept\n headline\n status\n progress\n findingSource\n findingDate\n auditReference\n auditOrFindingReference\n findingClassification\n area\n category\n description\n descriptionHtml\n files\n correctiveActionRequired\n contactId\n correctiveActionProposalDueDate\n rootCauseAnalysis\n rootCauseAnalysisDate\n correctiveActionProposal\n correctiveActionProposalDate\n rootCauseCorrection\n correctiveActionPlanAccepted\n correctiveActionPlan\n correctiveActionImplementation\n correctiveActionImplementationDate\n rootCauseCorrectionImplementation\n rootCauseCorrectionImplementationDate\n correctiveActionImplementationAccepted\n correctiveActionImplementationDescription\n reportId\n auditId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyItem {\n id\n editableByUserIds\n deleted\n userId\n crewId\n state\n dutyPeriodId\n forceRestAfter\n note\n type\n startDate\n endDate\n sectorCount\n endPlaceIcao\n blockTimeMinutes\n plannedFdpExtension\n flightLegIds\n logbookRecordIds\n linkedDutyItemIds\n reports {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const deleteReport = /* GraphQL */ `\n mutation DeleteReport(\n $input: DeleteReportInput!\n $condition: ModelReportConditionInput\n ) {\n deleteReport(input: $input, condition: $condition) {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n anonymous\n userMessage\n assets\n hazards {\n items {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n editableByUserId\n contactId\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n mitigationEffectivenessReview\n effective\n effectivePersonId\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n complianceFindings {\n items {\n id\n createdAt\n updatedAt\n removed\n concept\n headline\n status\n progress\n findingSource\n findingDate\n auditReference\n auditOrFindingReference\n findingClassification\n area\n category\n description\n descriptionHtml\n files\n correctiveActionRequired\n contactId\n correctiveActionProposalDueDate\n rootCauseAnalysis\n rootCauseAnalysisDate\n correctiveActionProposal\n correctiveActionProposalDate\n rootCauseCorrection\n correctiveActionPlanAccepted\n correctiveActionPlan\n correctiveActionImplementation\n correctiveActionImplementationDate\n rootCauseCorrectionImplementation\n rootCauseCorrectionImplementationDate\n correctiveActionImplementationAccepted\n correctiveActionImplementationDescription\n reportId\n auditId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyItem {\n id\n editableByUserIds\n deleted\n userId\n crewId\n state\n dutyPeriodId\n forceRestAfter\n note\n type\n startDate\n endDate\n sectorCount\n endPlaceIcao\n blockTimeMinutes\n plannedFdpExtension\n flightLegIds\n logbookRecordIds\n linkedDutyItemIds\n reports {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const createHazard = /* GraphQL */ `\n mutation CreateHazard(\n $input: CreateHazardInput!\n $condition: ModelHazardConditionInput\n ) {\n createHazard(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n report {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n anonymous\n userMessage\n assets\n hazards {\n nextToken\n startedAt\n }\n complianceFindings {\n nextToken\n startedAt\n }\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyItem {\n id\n editableByUserIds\n deleted\n userId\n crewId\n state\n dutyPeriodId\n forceRestAfter\n note\n type\n startDate\n endDate\n sectorCount\n endPlaceIcao\n blockTimeMinutes\n plannedFdpExtension\n flightLegIds\n logbookRecordIds\n linkedDutyItemIds\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n editableByUserId\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n approvedBy {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n responsiblePerson {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n mitigationEffectivenessReview\n effective\n effectivePersonId\n effectivePerson {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const updateHazard = /* GraphQL */ `\n mutation UpdateHazard(\n $input: UpdateHazardInput!\n $condition: ModelHazardConditionInput\n ) {\n updateHazard(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n report {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n anonymous\n userMessage\n assets\n hazards {\n nextToken\n startedAt\n }\n complianceFindings {\n nextToken\n startedAt\n }\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyItem {\n id\n editableByUserIds\n deleted\n userId\n crewId\n state\n dutyPeriodId\n forceRestAfter\n note\n type\n startDate\n endDate\n sectorCount\n endPlaceIcao\n blockTimeMinutes\n plannedFdpExtension\n flightLegIds\n logbookRecordIds\n linkedDutyItemIds\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n editableByUserId\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n approvedBy {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n responsiblePerson {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n mitigationEffectivenessReview\n effective\n effectivePersonId\n effectivePerson {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const deleteHazard = /* GraphQL */ `\n mutation DeleteHazard(\n $input: DeleteHazardInput!\n $condition: ModelHazardConditionInput\n ) {\n deleteHazard(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n status\n title\n hazard\n unsafeEvent\n reportId\n report {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n anonymous\n userMessage\n assets\n hazards {\n nextToken\n startedAt\n }\n complianceFindings {\n nextToken\n startedAt\n }\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyItem {\n id\n editableByUserIds\n deleted\n userId\n crewId\n state\n dutyPeriodId\n forceRestAfter\n note\n type\n startDate\n endDate\n sectorCount\n endPlaceIcao\n blockTimeMinutes\n plannedFdpExtension\n flightLegIds\n logbookRecordIds\n linkedDutyItemIds\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n editableByUserId\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n threadsRaw\n consequencesRaw\n outcome\n severity\n probability\n riskLevel\n approvedById\n approvedBy {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n review\n additionalMitigationMeasures\n mitigationMeasure\n monitoringRequired\n monitoringReview\n whenAt\n responsiblePersonId\n responsiblePerson {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n mitigationEffectivenessReview\n effective\n effectivePersonId\n effectivePerson {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n assessedByPersonIds\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const createComplianceFinding = /* GraphQL */ `\n mutation CreateComplianceFinding(\n $input: CreateComplianceFindingInput!\n $condition: ModelComplianceFindingConditionInput\n ) {\n createComplianceFinding(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n concept\n headline\n status\n progress\n findingSource\n findingDate\n auditReference\n auditOrFindingReference\n findingClassification\n area\n category\n description\n descriptionHtml\n files\n correctiveActionRequired\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n correctiveActionProposalDueDate\n rootCauseAnalysis\n rootCauseAnalysisDate\n correctiveActionProposal\n correctiveActionProposalDate\n rootCauseCorrection\n correctiveActionPlanAccepted\n correctiveActionPlan\n correctiveActionImplementation\n correctiveActionImplementationDate\n rootCauseCorrectionImplementation\n rootCauseCorrectionImplementationDate\n correctiveActionImplementationAccepted\n correctiveActionImplementationDescription\n reportId\n report {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n anonymous\n userMessage\n assets\n hazards {\n nextToken\n startedAt\n }\n complianceFindings {\n nextToken\n startedAt\n }\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyItem {\n id\n editableByUserIds\n deleted\n userId\n crewId\n state\n dutyPeriodId\n forceRestAfter\n note\n type\n startDate\n endDate\n sectorCount\n endPlaceIcao\n blockTimeMinutes\n plannedFdpExtension\n flightLegIds\n logbookRecordIds\n linkedDutyItemIds\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n auditId\n audit {\n id\n auditNumber\n createdAt\n updatedAt\n auditProgressStartTimeStamp\n removed\n name\n auditDate\n type\n area\n status\n auditPlanId\n auditPlan {\n id\n createdAt\n updatedAt\n year\n removed\n _version\n _deleted\n _lastChangedAt\n }\n checklistId\n checklistRevision\n periodicity\n responsiblePerson\n otherResponsiblePersons\n auditPerforms {\n nextToken\n startedAt\n }\n files\n note\n responsibleEntity\n complianceFindings {\n nextToken\n startedAt\n }\n aircraft\n _version\n _deleted\n _lastChangedAt\n }\n auditPerforms {\n items {\n id\n createdAt\n updatedAt\n removed\n groupItem\n compliance\n note\n files\n auditId\n complianceFindingId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const updateComplianceFinding = /* GraphQL */ `\n mutation UpdateComplianceFinding(\n $input: UpdateComplianceFindingInput!\n $condition: ModelComplianceFindingConditionInput\n ) {\n updateComplianceFinding(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n concept\n headline\n status\n progress\n findingSource\n findingDate\n auditReference\n auditOrFindingReference\n findingClassification\n area\n category\n description\n descriptionHtml\n files\n correctiveActionRequired\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n correctiveActionProposalDueDate\n rootCauseAnalysis\n rootCauseAnalysisDate\n correctiveActionProposal\n correctiveActionProposalDate\n rootCauseCorrection\n correctiveActionPlanAccepted\n correctiveActionPlan\n correctiveActionImplementation\n correctiveActionImplementationDate\n rootCauseCorrectionImplementation\n rootCauseCorrectionImplementationDate\n correctiveActionImplementationAccepted\n correctiveActionImplementationDescription\n reportId\n report {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n anonymous\n userMessage\n assets\n hazards {\n nextToken\n startedAt\n }\n complianceFindings {\n nextToken\n startedAt\n }\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyItem {\n id\n editableByUserIds\n deleted\n userId\n crewId\n state\n dutyPeriodId\n forceRestAfter\n note\n type\n startDate\n endDate\n sectorCount\n endPlaceIcao\n blockTimeMinutes\n plannedFdpExtension\n flightLegIds\n logbookRecordIds\n linkedDutyItemIds\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n auditId\n audit {\n id\n auditNumber\n createdAt\n updatedAt\n auditProgressStartTimeStamp\n removed\n name\n auditDate\n type\n area\n status\n auditPlanId\n auditPlan {\n id\n createdAt\n updatedAt\n year\n removed\n _version\n _deleted\n _lastChangedAt\n }\n checklistId\n checklistRevision\n periodicity\n responsiblePerson\n otherResponsiblePersons\n auditPerforms {\n nextToken\n startedAt\n }\n files\n note\n responsibleEntity\n complianceFindings {\n nextToken\n startedAt\n }\n aircraft\n _version\n _deleted\n _lastChangedAt\n }\n auditPerforms {\n items {\n id\n createdAt\n updatedAt\n removed\n groupItem\n compliance\n note\n files\n auditId\n complianceFindingId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const deleteComplianceFinding = /* GraphQL */ `\n mutation DeleteComplianceFinding(\n $input: DeleteComplianceFindingInput!\n $condition: ModelComplianceFindingConditionInput\n ) {\n deleteComplianceFinding(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n concept\n headline\n status\n progress\n findingSource\n findingDate\n auditReference\n auditOrFindingReference\n findingClassification\n area\n category\n description\n descriptionHtml\n files\n correctiveActionRequired\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n correctiveActionProposalDueDate\n rootCauseAnalysis\n rootCauseAnalysisDate\n correctiveActionProposal\n correctiveActionProposalDate\n rootCauseCorrection\n correctiveActionPlanAccepted\n correctiveActionPlan\n correctiveActionImplementation\n correctiveActionImplementationDate\n rootCauseCorrectionImplementation\n rootCauseCorrectionImplementationDate\n correctiveActionImplementationAccepted\n correctiveActionImplementationDescription\n reportId\n report {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n anonymous\n userMessage\n assets\n hazards {\n nextToken\n startedAt\n }\n complianceFindings {\n nextToken\n startedAt\n }\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyItem {\n id\n editableByUserIds\n deleted\n userId\n crewId\n state\n dutyPeriodId\n forceRestAfter\n note\n type\n startDate\n endDate\n sectorCount\n endPlaceIcao\n blockTimeMinutes\n plannedFdpExtension\n flightLegIds\n logbookRecordIds\n linkedDutyItemIds\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n auditId\n audit {\n id\n auditNumber\n createdAt\n updatedAt\n auditProgressStartTimeStamp\n removed\n name\n auditDate\n type\n area\n status\n auditPlanId\n auditPlan {\n id\n createdAt\n updatedAt\n year\n removed\n _version\n _deleted\n _lastChangedAt\n }\n checklistId\n checklistRevision\n periodicity\n responsiblePerson\n otherResponsiblePersons\n auditPerforms {\n nextToken\n startedAt\n }\n files\n note\n responsibleEntity\n complianceFindings {\n nextToken\n startedAt\n }\n aircraft\n _version\n _deleted\n _lastChangedAt\n }\n auditPerforms {\n items {\n id\n createdAt\n updatedAt\n removed\n groupItem\n compliance\n note\n files\n auditId\n complianceFindingId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const createChecklist = /* GraphQL */ `\n mutation CreateChecklist(\n $input: CreateChecklistInput!\n $condition: ModelChecklistConditionInput\n ) {\n createChecklist(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n current\n revisions\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const updateChecklist = /* GraphQL */ `\n mutation UpdateChecklist(\n $input: UpdateChecklistInput!\n $condition: ModelChecklistConditionInput\n ) {\n updateChecklist(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n current\n revisions\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const deleteChecklist = /* GraphQL */ `\n mutation DeleteChecklist(\n $input: DeleteChecklistInput!\n $condition: ModelChecklistConditionInput\n ) {\n deleteChecklist(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n current\n revisions\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const createAuditPlan = /* GraphQL */ `\n mutation CreateAuditPlan(\n $input: CreateAuditPlanInput!\n $condition: ModelAuditPlanConditionInput\n ) {\n createAuditPlan(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n year\n removed\n audits {\n items {\n id\n auditNumber\n createdAt\n updatedAt\n auditProgressStartTimeStamp\n removed\n name\n auditDate\n type\n area\n status\n auditPlanId\n checklistId\n checklistRevision\n periodicity\n responsiblePerson\n otherResponsiblePersons\n files\n note\n responsibleEntity\n aircraft\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const updateAuditPlan = /* GraphQL */ `\n mutation UpdateAuditPlan(\n $input: UpdateAuditPlanInput!\n $condition: ModelAuditPlanConditionInput\n ) {\n updateAuditPlan(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n year\n removed\n audits {\n items {\n id\n auditNumber\n createdAt\n updatedAt\n auditProgressStartTimeStamp\n removed\n name\n auditDate\n type\n area\n status\n auditPlanId\n checklistId\n checklistRevision\n periodicity\n responsiblePerson\n otherResponsiblePersons\n files\n note\n responsibleEntity\n aircraft\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const deleteAuditPlan = /* GraphQL */ `\n mutation DeleteAuditPlan(\n $input: DeleteAuditPlanInput!\n $condition: ModelAuditPlanConditionInput\n ) {\n deleteAuditPlan(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n year\n removed\n audits {\n items {\n id\n auditNumber\n createdAt\n updatedAt\n auditProgressStartTimeStamp\n removed\n name\n auditDate\n type\n area\n status\n auditPlanId\n checklistId\n checklistRevision\n periodicity\n responsiblePerson\n otherResponsiblePersons\n files\n note\n responsibleEntity\n aircraft\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const createAudit = /* GraphQL */ `\n mutation CreateAudit(\n $input: CreateAuditInput!\n $condition: ModelAuditConditionInput\n ) {\n createAudit(input: $input, condition: $condition) {\n id\n auditNumber\n createdAt\n updatedAt\n auditProgressStartTimeStamp\n removed\n name\n auditDate\n type\n area\n status\n auditPlanId\n auditPlan {\n id\n createdAt\n updatedAt\n year\n removed\n audits {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n checklistId\n checklistRevision\n periodicity\n responsiblePerson\n otherResponsiblePersons\n auditPerforms {\n items {\n id\n createdAt\n updatedAt\n removed\n groupItem\n compliance\n note\n files\n auditId\n complianceFindingId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n files\n note\n responsibleEntity\n complianceFindings {\n items {\n id\n createdAt\n updatedAt\n removed\n concept\n headline\n status\n progress\n findingSource\n findingDate\n auditReference\n auditOrFindingReference\n findingClassification\n area\n category\n description\n descriptionHtml\n files\n correctiveActionRequired\n contactId\n correctiveActionProposalDueDate\n rootCauseAnalysis\n rootCauseAnalysisDate\n correctiveActionProposal\n correctiveActionProposalDate\n rootCauseCorrection\n correctiveActionPlanAccepted\n correctiveActionPlan\n correctiveActionImplementation\n correctiveActionImplementationDate\n rootCauseCorrectionImplementation\n rootCauseCorrectionImplementationDate\n correctiveActionImplementationAccepted\n correctiveActionImplementationDescription\n reportId\n auditId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n aircraft\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const updateAudit = /* GraphQL */ `\n mutation UpdateAudit(\n $input: UpdateAuditInput!\n $condition: ModelAuditConditionInput\n ) {\n updateAudit(input: $input, condition: $condition) {\n id\n auditNumber\n createdAt\n updatedAt\n auditProgressStartTimeStamp\n removed\n name\n auditDate\n type\n area\n status\n auditPlanId\n auditPlan {\n id\n createdAt\n updatedAt\n year\n removed\n audits {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n checklistId\n checklistRevision\n periodicity\n responsiblePerson\n otherResponsiblePersons\n auditPerforms {\n items {\n id\n createdAt\n updatedAt\n removed\n groupItem\n compliance\n note\n files\n auditId\n complianceFindingId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n files\n note\n responsibleEntity\n complianceFindings {\n items {\n id\n createdAt\n updatedAt\n removed\n concept\n headline\n status\n progress\n findingSource\n findingDate\n auditReference\n auditOrFindingReference\n findingClassification\n area\n category\n description\n descriptionHtml\n files\n correctiveActionRequired\n contactId\n correctiveActionProposalDueDate\n rootCauseAnalysis\n rootCauseAnalysisDate\n correctiveActionProposal\n correctiveActionProposalDate\n rootCauseCorrection\n correctiveActionPlanAccepted\n correctiveActionPlan\n correctiveActionImplementation\n correctiveActionImplementationDate\n rootCauseCorrectionImplementation\n rootCauseCorrectionImplementationDate\n correctiveActionImplementationAccepted\n correctiveActionImplementationDescription\n reportId\n auditId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n aircraft\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const deleteAudit = /* GraphQL */ `\n mutation DeleteAudit(\n $input: DeleteAuditInput!\n $condition: ModelAuditConditionInput\n ) {\n deleteAudit(input: $input, condition: $condition) {\n id\n auditNumber\n createdAt\n updatedAt\n auditProgressStartTimeStamp\n removed\n name\n auditDate\n type\n area\n status\n auditPlanId\n auditPlan {\n id\n createdAt\n updatedAt\n year\n removed\n audits {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n checklistId\n checklistRevision\n periodicity\n responsiblePerson\n otherResponsiblePersons\n auditPerforms {\n items {\n id\n createdAt\n updatedAt\n removed\n groupItem\n compliance\n note\n files\n auditId\n complianceFindingId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n files\n note\n responsibleEntity\n complianceFindings {\n items {\n id\n createdAt\n updatedAt\n removed\n concept\n headline\n status\n progress\n findingSource\n findingDate\n auditReference\n auditOrFindingReference\n findingClassification\n area\n category\n description\n descriptionHtml\n files\n correctiveActionRequired\n contactId\n correctiveActionProposalDueDate\n rootCauseAnalysis\n rootCauseAnalysisDate\n correctiveActionProposal\n correctiveActionProposalDate\n rootCauseCorrection\n correctiveActionPlanAccepted\n correctiveActionPlan\n correctiveActionImplementation\n correctiveActionImplementationDate\n rootCauseCorrectionImplementation\n rootCauseCorrectionImplementationDate\n correctiveActionImplementationAccepted\n correctiveActionImplementationDescription\n reportId\n auditId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n aircraft\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const createAuditPerform = /* GraphQL */ `\n mutation CreateAuditPerform(\n $input: CreateAuditPerformInput!\n $condition: ModelAuditPerformConditionInput\n ) {\n createAuditPerform(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n groupItem\n compliance\n note\n files\n auditId\n audit {\n id\n auditNumber\n createdAt\n updatedAt\n auditProgressStartTimeStamp\n removed\n name\n auditDate\n type\n area\n status\n auditPlanId\n auditPlan {\n id\n createdAt\n updatedAt\n year\n removed\n _version\n _deleted\n _lastChangedAt\n }\n checklistId\n checklistRevision\n periodicity\n responsiblePerson\n otherResponsiblePersons\n auditPerforms {\n nextToken\n startedAt\n }\n files\n note\n responsibleEntity\n complianceFindings {\n nextToken\n startedAt\n }\n aircraft\n _version\n _deleted\n _lastChangedAt\n }\n complianceFindingId\n complianceFinding {\n id\n createdAt\n updatedAt\n removed\n concept\n headline\n status\n progress\n findingSource\n findingDate\n auditReference\n auditOrFindingReference\n findingClassification\n area\n category\n description\n descriptionHtml\n files\n correctiveActionRequired\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n correctiveActionProposalDueDate\n rootCauseAnalysis\n rootCauseAnalysisDate\n correctiveActionProposal\n correctiveActionProposalDate\n rootCauseCorrection\n correctiveActionPlanAccepted\n correctiveActionPlan\n correctiveActionImplementation\n correctiveActionImplementationDate\n rootCauseCorrectionImplementation\n rootCauseCorrectionImplementationDate\n correctiveActionImplementationAccepted\n correctiveActionImplementationDescription\n reportId\n report {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n anonymous\n userMessage\n assets\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n auditId\n audit {\n id\n auditNumber\n createdAt\n updatedAt\n auditProgressStartTimeStamp\n removed\n name\n auditDate\n type\n area\n status\n auditPlanId\n checklistId\n checklistRevision\n periodicity\n responsiblePerson\n otherResponsiblePersons\n files\n note\n responsibleEntity\n aircraft\n _version\n _deleted\n _lastChangedAt\n }\n auditPerforms {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const updateAuditPerform = /* GraphQL */ `\n mutation UpdateAuditPerform(\n $input: UpdateAuditPerformInput!\n $condition: ModelAuditPerformConditionInput\n ) {\n updateAuditPerform(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n groupItem\n compliance\n note\n files\n auditId\n audit {\n id\n auditNumber\n createdAt\n updatedAt\n auditProgressStartTimeStamp\n removed\n name\n auditDate\n type\n area\n status\n auditPlanId\n auditPlan {\n id\n createdAt\n updatedAt\n year\n removed\n _version\n _deleted\n _lastChangedAt\n }\n checklistId\n checklistRevision\n periodicity\n responsiblePerson\n otherResponsiblePersons\n auditPerforms {\n nextToken\n startedAt\n }\n files\n note\n responsibleEntity\n complianceFindings {\n nextToken\n startedAt\n }\n aircraft\n _version\n _deleted\n _lastChangedAt\n }\n complianceFindingId\n complianceFinding {\n id\n createdAt\n updatedAt\n removed\n concept\n headline\n status\n progress\n findingSource\n findingDate\n auditReference\n auditOrFindingReference\n findingClassification\n area\n category\n description\n descriptionHtml\n files\n correctiveActionRequired\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n correctiveActionProposalDueDate\n rootCauseAnalysis\n rootCauseAnalysisDate\n correctiveActionProposal\n correctiveActionProposalDate\n rootCauseCorrection\n correctiveActionPlanAccepted\n correctiveActionPlan\n correctiveActionImplementation\n correctiveActionImplementationDate\n rootCauseCorrectionImplementation\n rootCauseCorrectionImplementationDate\n correctiveActionImplementationAccepted\n correctiveActionImplementationDescription\n reportId\n report {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n anonymous\n userMessage\n assets\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n auditId\n audit {\n id\n auditNumber\n createdAt\n updatedAt\n auditProgressStartTimeStamp\n removed\n name\n auditDate\n type\n area\n status\n auditPlanId\n checklistId\n checklistRevision\n periodicity\n responsiblePerson\n otherResponsiblePersons\n files\n note\n responsibleEntity\n aircraft\n _version\n _deleted\n _lastChangedAt\n }\n auditPerforms {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const deleteAuditPerform = /* GraphQL */ `\n mutation DeleteAuditPerform(\n $input: DeleteAuditPerformInput!\n $condition: ModelAuditPerformConditionInput\n ) {\n deleteAuditPerform(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n groupItem\n compliance\n note\n files\n auditId\n audit {\n id\n auditNumber\n createdAt\n updatedAt\n auditProgressStartTimeStamp\n removed\n name\n auditDate\n type\n area\n status\n auditPlanId\n auditPlan {\n id\n createdAt\n updatedAt\n year\n removed\n _version\n _deleted\n _lastChangedAt\n }\n checklistId\n checklistRevision\n periodicity\n responsiblePerson\n otherResponsiblePersons\n auditPerforms {\n nextToken\n startedAt\n }\n files\n note\n responsibleEntity\n complianceFindings {\n nextToken\n startedAt\n }\n aircraft\n _version\n _deleted\n _lastChangedAt\n }\n complianceFindingId\n complianceFinding {\n id\n createdAt\n updatedAt\n removed\n concept\n headline\n status\n progress\n findingSource\n findingDate\n auditReference\n auditOrFindingReference\n findingClassification\n area\n category\n description\n descriptionHtml\n files\n correctiveActionRequired\n contactId\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n correctiveActionProposalDueDate\n rootCauseAnalysis\n rootCauseAnalysisDate\n correctiveActionProposal\n correctiveActionProposalDate\n rootCauseCorrection\n correctiveActionPlanAccepted\n correctiveActionPlan\n correctiveActionImplementation\n correctiveActionImplementationDate\n rootCauseCorrectionImplementation\n rootCauseCorrectionImplementationDate\n correctiveActionImplementationAccepted\n correctiveActionImplementationDescription\n reportId\n report {\n id\n status\n reportType\n createdAt\n updatedAt\n flight\n editableByUserId\n contactId\n anonymous\n userMessage\n assets\n severity\n probability\n occurrenceType\n occurrenceTitle\n occurrenceCategory\n aircraftDamageType\n aircraftDamageDescription\n otherDamage\n otherDamageDescription\n personInjuryType\n personInjuryDescription\n dutyType\n dutyStartDate\n dutyEndDate\n dutyItemId\n dutyAuthor\n dutyAircrafts\n fdpType\n fdpFirstDepLoc\n fdpLastLndLoc\n fdpRoute\n fdpSplitBreakStart\n fdpSplitBreakEnd\n fdpSectors\n fdpActual\n fdpMax\n fdpIncrease\n previousDutyEndDate\n previousDutyDuration\n restRequired\n actualFdpStart\n actualFdpStartLoc\n actualRest\n restReduceBy\n affectedPerformance\n reportedToOperations\n cancelledDuty\n cancelledDutyReason\n fatigueComment\n internalMessage\n internalMessageHtml\n managerFeedback\n managerFeedbackHtml\n feedbackUpdatedBy\n feedbackUpdateDate\n area\n areaOps\n reportedToCAA\n reportedToUZPLN\n reportedToUZPLNAssets\n reportableOccurrence\n reportableOccurrenceCategory\n _version\n _deleted\n _lastChangedAt\n }\n auditId\n audit {\n id\n auditNumber\n createdAt\n updatedAt\n auditProgressStartTimeStamp\n removed\n name\n auditDate\n type\n area\n status\n auditPlanId\n checklistId\n checklistRevision\n periodicity\n responsiblePerson\n otherResponsiblePersons\n files\n note\n responsibleEntity\n aircraft\n _version\n _deleted\n _lastChangedAt\n }\n auditPerforms {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const createTicket = /* GraphQL */ `\n mutation CreateTicket(\n $input: CreateTicketInput!\n $condition: ModelTicketConditionInput\n ) {\n createTicket(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n customerAccountId\n customerAccount {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n description\n tickets {\n nextToken\n startedAt\n }\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n legs {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n settlementTicketLegs {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n accountingMonthId\n accountingMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n tickets {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n tickets {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n isChildTicket\n parentTicketId\n childTickets {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n reservationData\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservationCode\n flightType\n quotationId\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n avinodeRfqId\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n notifications\n ticketInfo\n tickets {\n nextToken\n startedAt\n }\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentCostItems {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n acronym\n unit\n rate\n currency\n amountInDocumentCurrency\n airportIcaoOrDesc\n note\n isAddedToTicket\n documentRecordId\n legId\n aircraftId\n ticketId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const updateTicket = /* GraphQL */ `\n mutation UpdateTicket(\n $input: UpdateTicketInput!\n $condition: ModelTicketConditionInput\n ) {\n updateTicket(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n customerAccountId\n customerAccount {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n description\n tickets {\n nextToken\n startedAt\n }\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n legs {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n settlementTicketLegs {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n accountingMonthId\n accountingMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n tickets {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n tickets {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n isChildTicket\n parentTicketId\n childTickets {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n reservationData\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservationCode\n flightType\n quotationId\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n avinodeRfqId\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n notifications\n ticketInfo\n tickets {\n nextToken\n startedAt\n }\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentCostItems {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n acronym\n unit\n rate\n currency\n amountInDocumentCurrency\n airportIcaoOrDesc\n note\n isAddedToTicket\n documentRecordId\n legId\n aircraftId\n ticketId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const deleteTicket = /* GraphQL */ `\n mutation DeleteTicket(\n $input: DeleteTicketInput!\n $condition: ModelTicketConditionInput\n ) {\n deleteTicket(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n customerAccountId\n customerAccount {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n description\n tickets {\n nextToken\n startedAt\n }\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n legs {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n settlementTicketLegs {\n items {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n accountingMonthId\n accountingMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n tickets {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n tickets {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n isChildTicket\n parentTicketId\n childTickets {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n resources {\n nextToken\n startedAt\n }\n contactId\n isExternal\n reservationData\n paxData\n contact {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservationCode\n flightType\n quotationId\n quotation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n quotationData\n quotationCalculation\n paxData\n avinodeRfqId\n quotationCode\n flightType\n aircraftId\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n avinodeRfqId\n avinodeRfq {\n id\n dateFrom\n dateTo\n aircraftRegistration\n sellerLiftId\n state\n externalId\n quoteRequestData\n confirmedPrice\n requestedPrice\n currency\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n notifications\n ticketInfo\n tickets {\n nextToken\n startedAt\n }\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentCostItems {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n acronym\n unit\n rate\n currency\n amountInDocumentCurrency\n airportIcaoOrDesc\n note\n isAddedToTicket\n documentRecordId\n legId\n aircraftId\n ticketId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const createCustomerAccount = /* GraphQL */ `\n mutation CreateCustomerAccount(\n $input: CreateCustomerAccountInput!\n $condition: ModelCustomerAccountConditionInput\n ) {\n createCustomerAccount(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n description\n tickets {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const updateCustomerAccount = /* GraphQL */ `\n mutation UpdateCustomerAccount(\n $input: UpdateCustomerAccountInput!\n $condition: ModelCustomerAccountConditionInput\n ) {\n updateCustomerAccount(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n description\n tickets {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const deleteCustomerAccount = /* GraphQL */ `\n mutation DeleteCustomerAccount(\n $input: DeleteCustomerAccountInput!\n $condition: ModelCustomerAccountConditionInput\n ) {\n deleteCustomerAccount(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n description\n tickets {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const createAccountingMonth = /* GraphQL */ `\n mutation CreateAccountingMonth(\n $input: CreateAccountingMonthInput!\n $condition: ModelAccountingMonthConditionInput\n ) {\n createAccountingMonth(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n tickets {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n documentRecords {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n docPrefix\n month\n year\n number\n documentType\n status\n amount\n currency\n amountInCZK\n note\n internalCenter\n costs\n invoiceAndTaxInfo\n payment\n supplierId\n aircraftId\n contactId\n allocationMonthId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const updateAccountingMonth = /* GraphQL */ `\n mutation UpdateAccountingMonth(\n $input: UpdateAccountingMonthInput!\n $condition: ModelAccountingMonthConditionInput\n ) {\n updateAccountingMonth(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n tickets {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n documentRecords {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n docPrefix\n month\n year\n number\n documentType\n status\n amount\n currency\n amountInCZK\n note\n internalCenter\n costs\n invoiceAndTaxInfo\n payment\n supplierId\n aircraftId\n contactId\n allocationMonthId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const deleteAccountingMonth = /* GraphQL */ `\n mutation DeleteAccountingMonth(\n $input: DeleteAccountingMonthInput!\n $condition: ModelAccountingMonthConditionInput\n ) {\n deleteAccountingMonth(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n tickets {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n documentRecords {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n docPrefix\n month\n year\n number\n documentType\n status\n amount\n currency\n amountInCZK\n note\n internalCenter\n costs\n invoiceAndTaxInfo\n payment\n supplierId\n aircraftId\n contactId\n allocationMonthId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const createTicketOverviewFilter = /* GraphQL */ `\n mutation CreateTicketOverviewFilter(\n $input: CreateTicketOverviewFilterInput!\n $condition: ModelTicketOverviewFilterConditionInput\n ) {\n createTicketOverviewFilter(input: $input, condition: $condition) {\n id\n type\n removed\n data\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const updateTicketOverviewFilter = /* GraphQL */ `\n mutation UpdateTicketOverviewFilter(\n $input: UpdateTicketOverviewFilterInput!\n $condition: ModelTicketOverviewFilterConditionInput\n ) {\n updateTicketOverviewFilter(input: $input, condition: $condition) {\n id\n type\n removed\n data\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const deleteTicketOverviewFilter = /* GraphQL */ `\n mutation DeleteTicketOverviewFilter(\n $input: DeleteTicketOverviewFilterInput!\n $condition: ModelTicketOverviewFilterConditionInput\n ) {\n deleteTicketOverviewFilter(input: $input, condition: $condition) {\n id\n type\n removed\n data\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n }\n`;\nexport const createDocumentRecord = /* GraphQL */ `\n mutation CreateDocumentRecord(\n $input: CreateDocumentRecordInput!\n $condition: ModelDocumentRecordConditionInput\n ) {\n createDocumentRecord(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n docPrefix\n month\n year\n number\n documentType\n status\n amount\n currency\n amountInCZK\n note\n internalCenter\n costs\n invoiceAndTaxInfo\n payment\n supplierId\n supplier {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n tickets {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n mediaFiles {\n items {\n id\n mediaFileId\n documentRecordId\n createdAt\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n costItems {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n acronym\n unit\n rate\n currency\n amountInDocumentCurrency\n airportIcaoOrDesc\n note\n isAddedToTicket\n documentRecordId\n legId\n aircraftId\n ticketId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const updateDocumentRecord = /* GraphQL */ `\n mutation UpdateDocumentRecord(\n $input: UpdateDocumentRecordInput!\n $condition: ModelDocumentRecordConditionInput\n ) {\n updateDocumentRecord(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n docPrefix\n month\n year\n number\n documentType\n status\n amount\n currency\n amountInCZK\n note\n internalCenter\n costs\n invoiceAndTaxInfo\n payment\n supplierId\n supplier {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n tickets {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n mediaFiles {\n items {\n id\n mediaFileId\n documentRecordId\n createdAt\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n costItems {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n acronym\n unit\n rate\n currency\n amountInDocumentCurrency\n airportIcaoOrDesc\n note\n isAddedToTicket\n documentRecordId\n legId\n aircraftId\n ticketId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const deleteDocumentRecord = /* GraphQL */ `\n mutation DeleteDocumentRecord(\n $input: DeleteDocumentRecordInput!\n $condition: ModelDocumentRecordConditionInput\n ) {\n deleteDocumentRecord(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n docPrefix\n month\n year\n number\n documentType\n status\n amount\n currency\n amountInCZK\n note\n internalCenter\n costs\n invoiceAndTaxInfo\n payment\n supplierId\n supplier {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n tickets {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n mediaFiles {\n items {\n id\n mediaFileId\n documentRecordId\n createdAt\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n costItems {\n items {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n acronym\n unit\n rate\n currency\n amountInDocumentCurrency\n airportIcaoOrDesc\n note\n isAddedToTicket\n documentRecordId\n legId\n aircraftId\n ticketId\n _version\n _deleted\n _lastChangedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const createDocumentCostItem = /* GraphQL */ `\n mutation CreateDocumentCostItem(\n $input: CreateDocumentCostItemInput!\n $condition: ModelDocumentCostItemConditionInput\n ) {\n createDocumentCostItem(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n acronym\n unit\n rate\n currency\n amountInDocumentCurrency\n airportIcaoOrDesc\n note\n isAddedToTicket\n documentRecordId\n documentRecord {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n docPrefix\n month\n year\n number\n documentType\n status\n amount\n currency\n amountInCZK\n note\n internalCenter\n costs\n invoiceAndTaxInfo\n payment\n supplierId\n supplier {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n mediaFiles {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n legId\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n upliftCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n countableChanges {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n externalDocuments {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n billingData\n ticketId\n ticket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n settlementTicketId\n settlementTicket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n ticketId\n ticket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n customerAccountId\n customerAccount {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n description\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n legs {\n nextToken\n startedAt\n }\n settlementTicketLegs {\n nextToken\n startedAt\n }\n accountingMonthId\n accountingMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n isChildTicket\n parentTicketId\n childTickets {\n nextToken\n startedAt\n }\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentCostItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const updateDocumentCostItem = /* GraphQL */ `\n mutation UpdateDocumentCostItem(\n $input: UpdateDocumentCostItemInput!\n $condition: ModelDocumentCostItemConditionInput\n ) {\n updateDocumentCostItem(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n acronym\n unit\n rate\n currency\n amountInDocumentCurrency\n airportIcaoOrDesc\n note\n isAddedToTicket\n documentRecordId\n documentRecord {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n docPrefix\n month\n year\n number\n documentType\n status\n amount\n currency\n amountInCZK\n note\n internalCenter\n costs\n invoiceAndTaxInfo\n payment\n supplierId\n supplier {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n mediaFiles {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n legId\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n upliftCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n countableChanges {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n externalDocuments {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n billingData\n ticketId\n ticket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n settlementTicketId\n settlementTicket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n ticketId\n ticket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n customerAccountId\n customerAccount {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n description\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n legs {\n nextToken\n startedAt\n }\n settlementTicketLegs {\n nextToken\n startedAt\n }\n accountingMonthId\n accountingMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n isChildTicket\n parentTicketId\n childTickets {\n nextToken\n startedAt\n }\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentCostItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const deleteDocumentCostItem = /* GraphQL */ `\n mutation DeleteDocumentCostItem(\n $input: DeleteDocumentCostItemInput!\n $condition: ModelDocumentCostItemConditionInput\n ) {\n deleteDocumentCostItem(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n acronym\n unit\n rate\n currency\n amountInDocumentCurrency\n airportIcaoOrDesc\n note\n isAddedToTicket\n documentRecordId\n documentRecord {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n docPrefix\n month\n year\n number\n documentType\n status\n amount\n currency\n amountInCZK\n note\n internalCenter\n costs\n invoiceAndTaxInfo\n payment\n supplierId\n supplier {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n mediaFiles {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n legId\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n upliftCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n countableChanges {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n externalDocuments {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n billingData\n ticketId\n ticket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n settlementTicketId\n settlementTicket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n ticketId\n ticket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customer {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n customerAccountId\n customerAccount {\n id\n createdAt\n updatedAt\n removed\n locked\n isDefault\n name\n currency\n balance\n contactId\n description\n ownerUserId\n _version\n _deleted\n _lastChangedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n legs {\n nextToken\n startedAt\n }\n settlementTicketLegs {\n nextToken\n startedAt\n }\n accountingMonthId\n accountingMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n isChildTicket\n parentTicketId\n childTickets {\n nextToken\n startedAt\n }\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentCostItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const createMediaFile = /* GraphQL */ `\n mutation CreateMediaFile(\n $input: CreateMediaFileInput!\n $condition: ModelMediaFileConditionInput\n ) {\n createMediaFile(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n uploadedAt\n removed\n readableByUserIds\n month\n name\n type\n contentKey\n fileData\n status\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightId\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n legs {\n nextToken\n startedAt\n }\n mediaFiles {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n legId\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n upliftCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n countableChanges {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n externalDocuments {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n billingData\n ticketId\n ticket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n settlementTicketId\n settlementTicket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightDocumentId\n flightDocument {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n mediaFile {\n id\n createdAt\n updatedAt\n uploadedAt\n removed\n readableByUserIds\n month\n name\n type\n contentKey\n fileData\n status\n aircraftId\n flightId\n legId\n contactId\n flightDocumentId\n _version\n _deleted\n _lastChangedAt\n }\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentRecords {\n items {\n id\n mediaFileId\n documentRecordId\n createdAt\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const updateMediaFile = /* GraphQL */ `\n mutation UpdateMediaFile(\n $input: UpdateMediaFileInput!\n $condition: ModelMediaFileConditionInput\n ) {\n updateMediaFile(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n uploadedAt\n removed\n readableByUserIds\n month\n name\n type\n contentKey\n fileData\n status\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightId\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n legs {\n nextToken\n startedAt\n }\n mediaFiles {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n legId\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n upliftCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n countableChanges {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n externalDocuments {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n billingData\n ticketId\n ticket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n settlementTicketId\n settlementTicket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightDocumentId\n flightDocument {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n mediaFile {\n id\n createdAt\n updatedAt\n uploadedAt\n removed\n readableByUserIds\n month\n name\n type\n contentKey\n fileData\n status\n aircraftId\n flightId\n legId\n contactId\n flightDocumentId\n _version\n _deleted\n _lastChangedAt\n }\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentRecords {\n items {\n id\n mediaFileId\n documentRecordId\n createdAt\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const deleteMediaFile = /* GraphQL */ `\n mutation DeleteMediaFile(\n $input: DeleteMediaFileInput!\n $condition: ModelMediaFileConditionInput\n ) {\n deleteMediaFile(input: $input, condition: $condition) {\n id\n createdAt\n updatedAt\n uploadedAt\n removed\n readableByUserIds\n month\n name\n type\n contentKey\n fileData\n status\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n flights {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n aircraftDocuments {\n nextToken\n startedAt\n }\n aircraftMaintenanceLimits {\n nextToken\n startedAt\n }\n aircraftMaintenanceIntervalChanges {\n nextToken\n startedAt\n }\n maintenanceWorkOrders {\n nextToken\n startedAt\n }\n maintenanceRecords {\n nextToken\n startedAt\n }\n maintenanceProgram {\n id\n deleted\n title\n revision\n issueDate\n effectiveDate\n approvedBy\n tasks\n nextDueRules\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n releaseToServices {\n nextToken\n startedAt\n }\n aircraftType {\n id\n manufacturer\n type\n category\n engineType\n engineCount\n multiPilot\n highPerformance\n complex\n variants\n deleted\n crewQualificationId\n logbookTimeInTypesNames\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n reservations {\n nextToken\n startedAt\n }\n settlementTickets {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightId\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n countableChanges {\n nextToken\n startedAt\n }\n legs {\n nextToken\n startedAt\n }\n mediaFiles {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n legId\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservation {\n id\n createdAt\n deleted\n isActive\n dateFrom\n dateTo\n contactId\n isExternal\n reservationData\n paxData\n reservationCode\n flightType\n quotationId\n avinodeRfqId\n aircraftId\n notifications\n ticketInfo\n state\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n upliftCountableChange {\n id\n deleted\n editableByUserIds\n aircraftId\n flightId\n legId\n createdAt\n createdByName\n place\n type\n note\n changeTypes\n changeValues\n countableTypes\n countableValuesBefore\n countableValuesAfter\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n countableChanges {\n nextToken\n startedAt\n }\n squawks {\n nextToken\n startedAt\n }\n flightDocuments {\n nextToken\n startedAt\n }\n externalDocuments {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n billingData\n ticketId\n ticket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n settlementTicketId\n settlementTicket {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n name\n reservationDate\n status\n flightType\n type\n priceTable\n year\n number\n note\n totalPrice\n currency\n contactId\n customerAccountId\n aircraftId\n accountingMonthId\n allocationMonthId\n isChildTicket\n parentTicketId\n reservationId\n _version\n _deleted\n _lastChangedAt\n }\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n contactInformations {\n nextToken\n startedAt\n }\n contactDocuments {\n nextToken\n startedAt\n }\n documentSnippets {\n nextToken\n startedAt\n }\n crewQualifications {\n nextToken\n startedAt\n }\n tags {\n nextToken\n startedAt\n }\n crewRoles {\n nextToken\n startedAt\n }\n logbookRecords {\n nextToken\n startedAt\n }\n reservations {\n nextToken\n startedAt\n }\n reports {\n nextToken\n startedAt\n }\n hazardsAsAuthor {\n nextToken\n startedAt\n }\n hazardsAsApprover {\n nextToken\n startedAt\n }\n hazardsAsResponsiblePerson {\n nextToken\n startedAt\n }\n hazardsAsEffectivePerson {\n nextToken\n startedAt\n }\n customerAccounts {\n nextToken\n startedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n priceProfileApplications {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightDocumentId\n flightDocument {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n mediaFile {\n id\n createdAt\n updatedAt\n uploadedAt\n removed\n readableByUserIds\n month\n name\n type\n contentKey\n fileData\n status\n aircraftId\n flightId\n legId\n contactId\n flightDocumentId\n _version\n _deleted\n _lastChangedAt\n }\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentRecords {\n items {\n id\n mediaFileId\n documentRecordId\n createdAt\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n }\n`;\nexport const createMediaFile2DocumentRecord = /* GraphQL */ `\n mutation CreateMediaFile2DocumentRecord(\n $input: CreateMediaFile2DocumentRecordInput!\n $condition: ModelMediaFile2DocumentRecordConditionInput\n ) {\n createMediaFile2DocumentRecord(input: $input, condition: $condition) {\n id\n mediaFileId\n documentRecordId\n mediaFile {\n id\n createdAt\n updatedAt\n uploadedAt\n removed\n readableByUserIds\n month\n name\n type\n contentKey\n fileData\n status\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightId\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n legId\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightDocumentId\n flightDocument {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n documentRecord {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n docPrefix\n month\n year\n number\n documentType\n status\n amount\n currency\n amountInCZK\n note\n internalCenter\n costs\n invoiceAndTaxInfo\n payment\n supplierId\n supplier {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n mediaFiles {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n createdAt\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const updateMediaFile2DocumentRecord = /* GraphQL */ `\n mutation UpdateMediaFile2DocumentRecord(\n $input: UpdateMediaFile2DocumentRecordInput!\n $condition: ModelMediaFile2DocumentRecordConditionInput\n ) {\n updateMediaFile2DocumentRecord(input: $input, condition: $condition) {\n id\n mediaFileId\n documentRecordId\n mediaFile {\n id\n createdAt\n updatedAt\n uploadedAt\n removed\n readableByUserIds\n month\n name\n type\n contentKey\n fileData\n status\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightId\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n legId\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightDocumentId\n flightDocument {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n documentRecord {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n docPrefix\n month\n year\n number\n documentType\n status\n amount\n currency\n amountInCZK\n note\n internalCenter\n costs\n invoiceAndTaxInfo\n payment\n supplierId\n supplier {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n mediaFiles {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n createdAt\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\nexport const deleteMediaFile2DocumentRecord = /* GraphQL */ `\n mutation DeleteMediaFile2DocumentRecord(\n $input: DeleteMediaFile2DocumentRecordInput!\n $condition: ModelMediaFile2DocumentRecordConditionInput\n ) {\n deleteMediaFile2DocumentRecord(input: $input, condition: $condition) {\n id\n mediaFileId\n documentRecordId\n mediaFile {\n id\n createdAt\n updatedAt\n uploadedAt\n removed\n readableByUserIds\n month\n name\n type\n contentKey\n fileData\n status\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightId\n flight {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n acceptanceNotes\n picName\n picId\n state\n reservationId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n legId\n leg {\n id\n deleted\n editableByUserIds\n createdAt\n flightId\n aircraftId\n reservationId\n reservationEventId\n airportOffIcao\n ops\n securityCheckDate\n securityCheckName\n preflightCheckDate\n preflightCheckName\n picName\n picId\n picRoles\n sicName\n sicId\n sicRoles\n deicing\n notes\n startSignature\n phase\n startedAt\n upliftCountableChangeId\n airportOnIcao\n timeOut\n timeOff\n timeOn\n timeIn\n finishNotes\n finishSignature\n consumptionCountableChangeId\n logbookFields\n inputSources\n billingData\n ticketId\n settlementTicketId\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n flightDocumentId\n flightDocument {\n id\n deleted\n editableByUserIds\n createdAt\n aircraftId\n flightId\n legId\n squawkId\n deferralId\n releaseToServiceId\n maintenanceRecordId\n mediaFileId\n contentKey\n type\n phase\n title\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n documentRecords {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n documentRecord {\n id\n createdAt\n updatedAt\n removed\n readableByUserIds\n docPrefix\n month\n year\n number\n documentType\n status\n amount\n currency\n amountInCZK\n note\n internalCenter\n costs\n invoiceAndTaxInfo\n payment\n supplierId\n supplier {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n aircraftId\n aircraft {\n id\n deleted\n registration\n friendlyType\n serialNumber\n imageUrl\n countableTypes\n upliftableTypes\n tags\n category\n userId\n logbookParameters\n aircraftTypeId\n maintenanceProgramId\n manufactureDate\n isReservationResource\n calendarId\n performanceProfile\n baseAirportIcao\n payload\n crewComposition\n callsign\n additionalTlbData\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n contactId\n author {\n id\n userId\n abbreviation\n isActiveCrew\n aircraftVisiblityLimitations\n crewId\n hasDutyTracking\n fullReadAccessToAircrafts\n deleted\n nameOfficialFirst\n nameOfficialLast\n name\n notes\n isReservationResource\n isCustomer\n calendarId\n baseAirportIcaos\n dispatchGroup\n accessRights\n avinodeId\n type\n birthDate\n birthPlace\n nationality\n documentNumber\n documentExpiration\n companyIdNumber\n companyVatNumber\n _version\n _deleted\n _lastChangedAt\n createdAt\n updatedAt\n }\n allocationMonthId\n allocationMonth {\n id\n createdAt\n updatedAt\n removed\n closed\n name\n monthStartDate\n monthEndDate\n _version\n _deleted\n _lastChangedAt\n }\n mediaFiles {\n nextToken\n startedAt\n }\n costItems {\n nextToken\n startedAt\n }\n _version\n _deleted\n _lastChangedAt\n }\n createdAt\n _version\n _deleted\n _lastChangedAt\n updatedAt\n }\n }\n`;\n","import { DbSaveable } from '../LocalDB/types';\nimport { FlightLegPhase } from '../FlightLegs/FlightLeg';\n\nexport const DOCUMENT_TYPE_UNKNOWN = 'unknown';\nexport const DOCUMENT_TYPE_MFD_SCREEN = 'mfd';\nexport const DOCUMENT_TYPE_SQUAWK_RELEASE = 'squawk-release';\nexport const DOCUMENT_TYPE_SQUAWK_DEFERRAL = 'squawk-deferral';\nexport const DOCUMENT_TYPE_CRS = 'crs';\nexport const DOCUMENT_TYPE_WORK_REPORT = 'work-report';\nexport const DOCUMENT_TYPE_CAMO_ORDER = 'camo-order';\nexport type FlightDocumentType =\n | typeof DOCUMENT_TYPE_UNKNOWN\n | typeof DOCUMENT_TYPE_MFD_SCREEN\n | typeof DOCUMENT_TYPE_SQUAWK_RELEASE\n | typeof DOCUMENT_TYPE_SQUAWK_DEFERRAL\n | typeof DOCUMENT_TYPE_CRS\n | typeof DOCUMENT_TYPE_WORK_REPORT\n | typeof DOCUMENT_TYPE_CAMO_ORDER;\n\nexport interface LocalFlightDocument extends DbSaveable {\n id: string;\n aircraftId: string;\n createdAt: Date;\n flightId?: string;\n legId?: string;\n squawkId?: string;\n deferralId?: string;\n releaseToServiceId?: string;\n maintenanceRecordId?: string;\n contentKey?: string;\n type: FlightDocumentType;\n phase?: FlightLegPhase;\n editableByUserIds: string[];\n title?: string | null;\n mediaFileId?: string;\n}\n\nexport interface SavedFlightDocument extends LocalFlightDocument {\n contentKey: string;\n}\n\nexport type FlightDocument = LocalFlightDocument | SavedFlightDocument;\nexport const isFlightDocumentSaved = (document: FlightDocument): document is SavedFlightDocument => {\n return document.contentKey !== undefined;\n};\n","import BEMHelper from 'react-bem-helper';\n\nexport type FieldDetailedValueGroup = {\n label: string;\n values: FieldDetailedValue[];\n};\n\nexport type FieldDetailedValue = {\n value: CT;\n label?: string;\n labelComponent?: React.ReactNode;\n disabled?: boolean;\n group?: string;\n classModifiers?: BEMHelper.PredicateSet | string[];\n title?: string;\n};\n\nexport function generateLabels(labelMap: Map): FieldDetailedValue[] {\n return Array.from(labelMap.entries()).map(([value, label]) => ({ value, label }));\n}\n\nexport function generateFieldDetailedValueMap(values: FieldDetailedValue[]): Map {\n return new Map(values.map((value) => [value.value, value]));\n}\n\nexport function mapStringsToFieldDetailedValues(\n strings: string[],\n options: FieldDetailedValue[]\n): FieldDetailedValue[] {\n return strings.map((value) => options.find((o) => o.value === value)).filter(Boolean) as FieldDetailedValue[];\n}\n","import { CreateSigningKeyChangeInput } from '../../API';\nimport { getDb } from '../LocalDB/LocalDB';\nimport { getDbSyncer } from '../LocalDB/DbSyncer';\nimport { WithId } from '../LocalDB/types';\n\nexport const putSigningChange = async (input: CreateSigningKeyChangeInput & WithId) => {\n const table = getDb().signingKeyChanges;\n await table.put(input);\n await getDbSyncer().markToSync(table, input.id);\n};\n","import { sign as nsign } from 'tweetnacl';\nimport * as uuid from 'uuid';\nimport { CreateSigningKeyChangeInput } from '../../API';\nimport { putSigningChange } from '../../Datasource/SigningKeyChanges/SigningKeyChangeDatasource';\nimport { WithId } from '../../Datasource/LocalDB/types';\n\ninterface SignatureLocalStorage {\n deviceSecretKeyString: string;\n deviceKeyUuid: string;\n temporarySecretKeyString: string;\n temporaryKeyTimestamp: number;\n temporaryKeyUuid: string;\n}\n\ninterface SignatureOperationalStorage extends SignatureLocalStorage {\n deviceSecretKey: Uint8Array;\n temporarySecretKey: Uint8Array;\n devicePublicKey: Uint8Array;\n temporaryPublicKey: Uint8Array;\n}\n\ntype TemporaryKeyGenerationResult = {\n publicKey: Uint8Array;\n signature: Uint8Array;\n signatureKeyUuid: string;\n}\n\nexport type Signature = {\n deviceSignature: string;\n temporarySignature: string;\n deviceKeyUuid: string;\n temporaryKeyUuid: string;\n};\n\nconst LOCAL_STORAGE_KEY = 'alol_signature';\nconst encoder = new TextEncoder();\n\nexport const sign = (input: string): Signature => {\n const inputUint = stringToUint(input);\n regenerateTemporaryKey();\n const operational = getOperationalStorage();\n const deviceSignature = nsign.detached(inputUint, operational.deviceSecretKey);\n const temporarySignature = nsign.detached(inputUint, operational.temporarySecretKey);\n const {deviceKeyUuid, temporaryKeyUuid} = operational;\n return {\n deviceSignature: uintToBase64(deviceSignature),\n temporarySignature: uintToBase64(temporarySignature),\n deviceKeyUuid,\n temporaryKeyUuid\n };\n};\n\n// init-related functions\nconst {getOperationalStorage, setOperationalStorage} = (() => {\n const generateNewKeys = (): SignatureOperationalStorage => {\n const deviceKey = nsign.keyPair();\n const deviceKeyUuid = uuid.v4();\n const temporaryKey = nsign.keyPair();\n const temporaryKeyUuid = uuid.v4();\n const data: SignatureOperationalStorage = {\n deviceKeyUuid,\n deviceSecretKeyString: uintToBase64(deviceKey.secretKey),\n temporarySecretKeyString: uintToBase64(temporaryKey.secretKey),\n deviceSecretKey: deviceKey.secretKey,\n devicePublicKey: deviceKey.publicKey,\n temporarySecretKey: temporaryKey.secretKey,\n temporaryPublicKey: temporaryKey.publicKey,\n temporaryKeyTimestamp: Date.now(),\n temporaryKeyUuid\n };\n persistNewKeys(data);\n return data;\n };\n\n const persistNewKeys = (keys: SignatureOperationalStorage) => {\n updateLocalStorage(keys);\n const signature = createTemporaryKeySignature(keys.temporaryPublicKey, keys.deviceSecretKey, keys.deviceKeyUuid);\n persistToDb(keys, signature);\n };\n\n\n const init = (): SignatureOperationalStorage => {\n const maybeItem = localStorage.getItem(LOCAL_STORAGE_KEY);\n if (!maybeItem) {\n return generateNewKeys();\n }\n try {\n const json = JSON.parse(maybeItem);\n if (validateJson(json)) {\n return localStorageToOperational(json);\n } else {\n return generateNewKeys();\n }\n } catch (e) {\n console.error(e);\n return generateNewKeys();\n }\n };\n\n const localStorageToOperational = function (json: SignatureLocalStorage) {\n const deviceSecretKey = base64ToUint(json.deviceSecretKeyString);\n const temporarySecretKey = base64ToUint(json.temporarySecretKeyString);\n return {\n ...json,\n deviceSecretKey,\n temporarySecretKey,\n temporaryPublicKey: nsign.keyPair.fromSecretKey(temporarySecretKey).publicKey,\n devicePublicKey: nsign.keyPair.fromSecretKey(deviceSecretKey).publicKey,\n };\n };\n\n\n let operational: SignatureOperationalStorage | undefined;\n const getOperationalStorage = (): SignatureOperationalStorage => {\n if (!operational) {\n operational = init()\n }\n return operational;\n };\n const setOperationalStorage = (data: Partial) => {\n operational = {\n ...getOperationalStorage(),\n ...data\n };\n updateLocalStorage(operational);\n return operational;\n };\n\n\n const validateJson = (json: any): json is SignatureLocalStorage => {\n const keys = [\n 'deviceSecretKey',\n 'deviceKeyUuid',\n 'temporarySecretKey',\n 'temporaryKeyTimestamp',\n 'temporaryKeyUuid'\n ];\n return keys.some(key => !json[key]);\n };\n\n const updateLocalStorage = function (keys: SignatureOperationalStorage) {\n const {\n deviceKeyUuid,\n temporaryKeyTimestamp,\n temporaryKeyUuid,\n deviceSecretKeyString,\n temporarySecretKeyString,\n } = keys;\n const localData: SignatureLocalStorage = {\n deviceKeyUuid,\n deviceSecretKeyString,\n temporarySecretKeyString,\n temporaryKeyTimestamp,\n temporaryKeyUuid\n };\n const json = JSON.stringify(localData);\n localStorage.setItem(LOCAL_STORAGE_KEY, json);\n };\n\n return {getOperationalStorage, setOperationalStorage};\n})();\n\nconst createTemporaryKeySignature = (temporaryPublicKey: Uint8Array, oldSecretKey: Uint8Array, oldKeyUuid: string): TemporaryKeyGenerationResult => {\n const signature = nsign.detached(temporaryPublicKey, oldSecretKey);\n return {\n publicKey: temporaryPublicKey,\n signature,\n signatureKeyUuid: oldKeyUuid\n }\n};\n\nconst regenerateTemporaryKey = () => {\n const newPair = nsign.keyPair();\n const keyUuid = uuid.v4();\n const operational = getOperationalStorage();\n const oldKey = operational.temporarySecretKey;\n const oldUuid = operational.temporaryKeyUuid;\n const signature = createTemporaryKeySignature(newPair.publicKey, oldKey, oldUuid);\n const newOperational = setOperationalStorage({\n temporarySecretKeyString: uintToBase64(newPair.secretKey),\n temporaryKeyTimestamp: Date.now(),\n temporaryKeyUuid: keyUuid,\n temporarySecretKey: newPair.secretKey,\n temporaryPublicKey: newPair.publicKey\n });\n persistToDb(newOperational, signature);\n};\n\nconst persistToDb = (keys: SignatureOperationalStorage, signature: TemporaryKeyGenerationResult) => {\n const keyChange: CreateSigningKeyChangeInput & WithId = {\n id: uuid.v4(),\n devicePublicKey: uintToBase64(keys.devicePublicKey),\n deviceKeyId: keys.deviceKeyUuid,\n temporaryPublicKey: uintToBase64(keys.temporaryPublicKey),\n temporaryKeyId: keys.temporaryKeyUuid,\n temporaryKeySignature: uintToBase64(signature.signature),\n signedByKeyId: signature.signatureKeyUuid,\n createdAt: new Date().toISOString()\n };\n putSigningChange(keyChange);\n};\n\nexport const base64ToUint = (input: string) => {\n const ints = atob(input)\n .split(\"\")\n .map(c => c.charCodeAt(0));\n return new Uint8Array(ints);\n};\n\nexport const uintToBase64 = (input: Uint8Array) => {\n return btoa(String.fromCharCode(...Array.from(input)));\n};\n\nexport const stringToUint = (input: string) => {\n return encoder.encode(input);\n};\n","import { CreateSignedDataInput } from '../../API';\nimport { WithId } from '../LocalDB/types';\nimport { getDb } from '../LocalDB/LocalDB';\nimport { getDbSyncer } from '../LocalDB/DbSyncer';\nimport { sign } from '../../utils/Signing/SignatureGenerator';\nimport * as uuid from 'uuid';\n\nexport const putSignedData = async (input: CreateSignedDataInput & WithId) => {\n const table = getDb().signedData;\n await Promise.all([\n table.put(input),\n getDbSyncer().markToSync(table, input.id)\n ]);\n};\n\nexport const signAndPut = async (data: string, optionalData: Pick) => {\n const signature = sign(data);\n const input: CreateSignedDataInput & WithId = {\n id: uuid.v4(),\n data: data,\n deviceSignature: signature.deviceSignature,\n temporarySignature: signature.temporarySignature,\n deviceKeyId: signature.deviceKeyUuid,\n temporaryKeyId: signature.temporaryKeyUuid,\n createdAt: new Date().toISOString(),\n flightId: optionalData.flightId\n };\n return putSignedData(input);\n};\n","import { CompleteFlight } from '../Flights/FlightsDatasource';\nimport { CreateLogbookRecordInput } from '../../API';\nimport { WithId } from '../LocalDB/types';\nimport { isLegFinished } from '../FlightLegs/FlightLeg';\nimport { ContactInput } from '../../APIExtensions';\nimport { getLogbookRecordsByLegId, putLogbookRecord } from '../LogbookRecords/LogbookRecordsDatasource';\nimport { inLegLogbookToRecord } from './InLegLogbook';\nimport * as uuid from 'uuid';\nimport { getContactByCrewId } from '../Contacts/ContactsDatasource';\nimport { toMap } from '../../utils/arrayUtils';\n\nexport async function saveFlightLogbookRecords(flight: CompleteFlight): Promise {\n const getContactCache = new Map>();\n const getCachedContact = (crewId: string): Promise => {\n let maybePromise = getContactCache.get(crewId);\n if (!maybePromise) {\n maybePromise = getContactByCrewId(crewId);\n getContactCache.set(crewId, maybePromise);\n }\n return maybePromise;\n }\n await Promise.all(flight.legs.map(async leg => {\n if (!isLegFinished(leg)) {\n return;\n }\n if (!leg.logbookFields) {\n return;\n }\n const existingLogbookRecords = await getLogbookRecordsByLegId(leg.id);\n const existingRecordContactIds = existingLogbookRecords.map(lr => lr.contactId);\n const crewIds = [leg.picId, leg.sicId]\n .filter(Boolean) as string[];\n const contacts = (await Promise.all(crewIds.map(getCachedContact)))\n .filter(Boolean) as ContactInput[];\n const contactIds = contacts.map(c => c.id);\n const userIds = contacts.map(c => c.userId).filter(Boolean) as string[];\n const contactsMap = toMap(contacts);\n const promises: Promise[] = [];\n for (const contactId of contactIds) {\n if (existingRecordContactIds.includes(contactId)) {\n continue;\n }\n const crewId = contactsMap.get(contactId)?.crewId;\n if (!crewId) {\n continue;\n }\n const record: CreateLogbookRecordInput & WithId = {\n ...inLegLogbookToRecord(leg.logbookFields, leg),\n id: uuid.v4(),\n contactId,\n crewId,\n editableByUserIds: userIds,\n };\n promises.push(putLogbookRecord(record));\n }\n await Promise.all(promises);\n }));\n\n}\n","import { Flight, FLIGHT_STATE_FINISHED } from './Flight';\nimport { getDb } from '../LocalDB/LocalDB';\nimport { getAircraftForFlight, getAircraftsByIdLocalAndOnline } from '../Aircrafts/AircraftsDatasource';\nimport { FlightLeg, isLegFinished, WithLastCountableChange } from '../FlightLegs/FlightLeg';\nimport { deleteFlightLeg, getCrewFlightLegsOnline, getFlightLegsForFlight } from '../FlightLegs/FlightLegDatasource';\nimport { getDbSyncer } from '../LocalDB/DbSyncer';\nimport { getFlightDocumentsForFlightCount } from '../FlightDocuments/FlightDocumentsDatasource';\nimport { API, graphqlOperation } from 'aws-amplify';\nimport { CreateAircraftInput, CreateCountableChangeInput, CreateFlightInput, CreateLegInput } from '../../API';\nimport { flightItemFields, flightTransform } from '../LocalDB/Transformers/flights';\nimport { sanitizeId } from '../datasourceUtils';\nimport { aircraftItemFields } from '../LocalDB/Transformers/aircrafts';\nimport { flightLegFromDb, flightLegItemFields } from '../LocalDB/Transformers/flightLegs';\nimport { countableChangeFromDb, countableChangeItemFields } from '../LocalDB/Transformers/countableChanges';\nimport { signAndPut } from '../SignedData/SignedDataDatasource';\nimport { CountableChange } from '../CountableChanges/types';\nimport { Squawk } from '../Squawks/types';\nimport { ReleaseToService } from '../ReleaseToService/types';\nimport { DbCreated } from '../LocalDB/types';\nimport { saveFlightLogbookRecords } from '../Logbook/SaveFlightLogbookRecords';\nimport { AircraftMaintenanceLimit } from '../../Admin/AircraftMaintenanceLimits/AircraftMaintenanceLimit';\nimport { AircraftForFlight } from '../Aircrafts/AircraftForFlight';\nimport { Aircraft } from '../Aircrafts/types';\n\nexport const putFlight = async (flight: Flight): Promise => {\n const db = getDb();\n await Promise.all([db.flights.put(flight), getDbSyncer().markToSync(db.flights, flight.id)]);\n};\n\nexport interface FlightAndAircraft extends Flight {\n aircraft: AircraftForFlight | null;\n}\n\nexport interface FlightAndAircraftAndLegs extends Flight {\n aircraft: Aircraft | null;\n legs: FlightLeg[];\n}\n\nexport interface CompleteFlight extends Flight {\n aircraft: AircraftForFlight | null;\n legs: FlightLeg[];\n flightDocumentsCount: number;\n}\n\nexport type GetOpenFlightsForUserParams = [string];\nexport const getOpenFlightsForUser = async (\n userId: GetOpenFlightsForUserParams[0]\n): Promise => {\n const flights = await getDb()\n .flights.filter((f) => f.state !== FLIGHT_STATE_FINISHED && f.editableByUserIds.includes(userId) && !f.deleted)\n .toArray();\n const flightForUsers = flights.map(async (flight): Promise => {\n const [aircraft, legs] = await Promise.all([\n getAircraftForFlight(flight.aircraftId),\n getFlightLegsForFlight(flight.id),\n ]);\n return { ...flight, aircraft, legs };\n });\n return Promise.all(flightForUsers);\n};\n\nexport type GetAllFlightsForCrewParams = [string];\nexport const getAllFlightsForCrew = async (\n crewId: GetAllFlightsForCrewParams[0]\n): Promise => {\n const db = getDb();\n const flightLegs = await db.legs.filter((l) => !l.deleted && (l.picId === crewId || l.sicId === crewId)).toArray();\n const flightIds = new Set(flightLegs.map((l) => l.flightId));\n const aircraftIds = new Set(flightLegs.map((l) => l.aircraftId));\n const [flights, aircrafts] = await Promise.all([\n db.flights.bulkGet(Array.from(flightIds)),\n db.aircrafts.bulkGet(Array.from(aircraftIds)),\n ]);\n const validFlights = flights.filter((f) => f && !f.deleted);\n const flightsAndLegs = validFlights.map(\n (flight): FlightAndAircraftAndLegs => ({\n ...flight,\n aircraft: aircrafts.find((ac) => ac?.id === flight.aircraftId) || null,\n legs: flightLegs.filter((l) => l.flightId === flight.id),\n })\n );\n sortFlightsAndlegs(flightsAndLegs);\n return flightsAndLegs;\n};\n\nexport const getAllFlightsForCrewOnline = async (\n crewId: GetAllFlightsForCrewParams[0]\n): Promise => {\n const flightLegs = (await getCrewFlightLegsOnline(crewId)).filter((l) => !l.deleted);\n const flightIds = Array.from(new Set(flightLegs.map((l) => l.flightId)));\n const aircraftIds = Array.from(new Set(flightLegs.map((l) => l.aircraftId)));\n\n const [flights, aircrafts] = await Promise.all([\n getFlightsByIdsLocalAndOnline(flightIds),\n getAircraftsByIdLocalAndOnline(aircraftIds),\n ]);\n\n const flightsAndLegs = flights.map((flight): FlightAndAircraftAndLegs => {\n const legs = flightLegs.filter((l) => l.flightId === flight.id && l.timeOut);\n legs.sort((a, b) => a.timeOut.getTime() - b.timeOut.getTime());\n return {\n ...flight,\n aircraft: aircrafts.find((ac) => ac.id === flight.aircraftId) || null,\n legs,\n };\n });\n sortFlightsAndlegs(flightsAndLegs);\n return flightsAndLegs;\n};\nexport type GetFlightsAndLegsForAircraftParams = [string];\nexport const getFlightsAndLegsForAircraft = async (\n aircraftId: GetFlightsAndLegsForAircraftParams[0]\n): Promise => {\n const db = getDb();\n const legsPromise = db.legs\n .where({ aircraftId })\n .filter((l) => !l.deleted)\n .toArray();\n const flightsPromise = db.flights\n .where({ aircraftId })\n .filter((l) => !l.deleted)\n .toArray();\n const aircraftPromise = db.aircrafts.get(aircraftId);\n const [flightLegs, flights, aircraft] = await Promise.all([legsPromise, flightsPromise, aircraftPromise]);\n if (!aircraft) {\n throw new Error('Trying to get flights for non-existing aircraft');\n }\n const flightsAndLegs = flights.map((flight): FlightAndAircraftAndLegs => {\n const legs = flightLegs.filter((l) => l.flightId === flight.id && l.timeOut);\n legs.sort((a, b) => a.timeOut.getTime() - b.timeOut.getTime());\n return {\n ...flight,\n aircraft,\n legs,\n };\n });\n sortFlightsAndlegs(flightsAndLegs);\n return flightsAndLegs;\n};\n\nconst sortFlightsAndlegs = (flights: (Flight & { legs: FlightLeg[] })[]) => {\n flights.sort((a, b) => {\n const aRef = a.legs[0] ? a.legs[0].timeOut : a.createdAt;\n const bRef = b.legs[0] ? b.legs[0].timeOut : b.createdAt;\n return bRef.getTime() - aRef.getTime();\n });\n};\n\nexport const getFlightsByIdsLocalAndOnline = async (flightIds: string[]): Promise => {\n const offlineFlights = (await getFlightsByIds(flightIds).then((f) => f.filter(Boolean))) as Flight[];\n const offlineFlightIds = new Set(offlineFlights.map((f) => f.id));\n const flightIdsToRequest = flightIds.filter((fId) => !offlineFlightIds.has(fId));\n const onlineFlights = await getFlightsByIdsOnline(flightIdsToRequest);\n return [...offlineFlights, ...onlineFlights].filter((f) => !f.deleted);\n};\n\nexport const getFlightsByIds = async (flightIds: string[]): Promise<(Flight | null)[]> => {\n return getDb().flights.bulkGet(flightIds);\n};\n\nexport const getFlightById = async (flightId: string): Promise => {\n return getDb().flights.get(flightId);\n};\n\nexport const getFlightsByIdsOnline = async (flightIds: string[]): Promise => {\n if (flightIds.length === 0) {\n return [];\n }\n const flightsQuery = `query getFlights {\n ${flightIds.map(\n (flightId, index) => `\n getFlight${index}: getFlight(id: \"${sanitizeId(flightId)}\") {\n ${flightItemFields}\n }\n `\n )}\n }`;\n const gqlo = graphqlOperation(flightsQuery);\n const flightsResult = (await API.graphql(gqlo)) as { data: { [key: string]: CreateFlightInput | null } };\n return (Object.values(flightsResult.data).filter(Boolean) as CreateFlightInput[]).map((flight) =>\n flightTransform(flight)\n );\n};\n\nexport type GetCompleteFlightParams = [string];\nexport const getCompleteFlight = async (flightId: GetCompleteFlightParams[0]): Promise => {\n const [flight, legs, flightDocumentsCount] = await Promise.all([\n getDb().flights.get(flightId),\n getFlightLegsForFlight(flightId),\n getFlightDocumentsForFlightCount(flightId),\n ]);\n if (!flight) {\n return null;\n }\n if (legs) {\n sortFlightLegs(legs);\n }\n const aircraft = await getAircraftForFlight(flight.aircraftId);\n return { ...flight, aircraft, legs: legs || [], flightDocumentsCount: flightDocumentsCount || 0 };\n};\n\nexport type FlightForExport = {\n aircraft: Aircraft | undefined;\n aircraftMaintenanceLimits: AircraftMaintenanceLimit[] | undefined;\n flight: Flight | undefined;\n legs: FlightLeg[] | undefined;\n countableChanges: CountableChange[] | undefined;\n squawks: Squawk[] | undefined;\n releaseToServices: ReleaseToService[] | undefined;\n};\nexport const getFlightForExport = async (flightId: string, aircraftId: string): Promise => {\n const db = getDb();\n const [aircraft, aircraftMaintenanceLimits, flight, legs, countableChanges, squawks, releaseToServices] =\n await Promise.all([\n db.aircrafts.get(aircraftId)!,\n db.aircraftMaintenanceLimits.where({ aircraftId }).toArray(),\n db.flights.get(flightId)!,\n db.legs.where({ flightId }).toArray(),\n db.countableChanges.where({ flightId }).toArray(),\n db.squawks.where({ aircraftId }).toArray(),\n db.releaseToServices.where({ aircraftId }).toArray(),\n ]);\n\n return {\n aircraft,\n aircraftMaintenanceLimits,\n flight,\n legs,\n countableChanges,\n squawks,\n releaseToServices,\n };\n};\n\nexport const getCompleteFlightOnline = async (flightId: GetCompleteFlightParams[0]): Promise => {\n const query = `query completeFlight($flightId: ID!) {\n getFlight(id: $flightId) {\n ${flightItemFields}\n aircraft {\n ${aircraftItemFields}\n }\n legs {\n items {\n ${flightLegItemFields}\n countableChanges {\n items {\n ${countableChangeItemFields}\n }\n }\n }\n }\n }\n }`;\n const gqlo = graphqlOperation(query, { flightId });\n const flightResult = (await API.graphql(gqlo)) as {\n data: {\n getFlight:\n | null\n | (CreateFlightInput & {\n aircraft: CreateAircraftInput;\n legs: {\n items: (CreateLegInput & {\n countableChanges: {\n items: (CreateCountableChangeInput & DbCreated)[];\n };\n })[];\n };\n });\n };\n };\n\n if (flightResult.data.getFlight === null) {\n return null;\n } else {\n const flight = flightTransform(flightResult.data.getFlight);\n const legs = flightResult.data.getFlight.legs.items.map((legInput): FlightLeg & WithLastCountableChange => {\n const leg = flightLegFromDb(legInput);\n const ccIdToFind = legInput.consumptionCountableChangeId || legInput.upliftCountableChangeId;\n const ccToUse = legInput.countableChanges.items.find((cc) => cc.id === ccIdToFind);\n if (!ccToUse) {\n throw new Error('Cannot find required countable change for one of the legs');\n }\n return {\n ...leg,\n lastCountableChange: countableChangeFromDb(ccToUse),\n };\n });\n return {\n ...flight,\n legs,\n aircraft: await getAircraftForFlight(flight.aircraftId),\n flightDocumentsCount: 0,\n };\n }\n};\n\nconst sortFlightLegs = function (legs: FlightLeg[]) {\n legs.sort((a, b) => {\n return getLegReferenceTime(a).getTime() - getLegReferenceTime(b).getTime();\n });\n};\n\nconst getLegReferenceTime = (leg: FlightLeg): Date => {\n if (isLegFinished(leg)) {\n return leg.timeOut;\n } else {\n return leg.createdAt;\n }\n};\n\nexport const getFlightsForAircraft = async (aircraftId: string): Promise => {\n return getDb().flights.where('aircraftId').equals(aircraftId).sortBy('createdAt');\n};\n\nexport const finishFlight = async (flight: CompleteFlight, waitForSync: boolean = false): Promise => {\n const bareFlight = createBareFlight(flight);\n bareFlight.state = FLIGHT_STATE_FINISHED;\n const flightForExport = await getFlightForExport(flight.id, flight.aircraftId);\n await Promise.all([\n signAndPut(JSON.stringify(flightForExport), { flightId: flight.id }),\n putFlight(bareFlight),\n saveFlightLogbookRecords(flight),\n ]);\n if (waitForSync) {\n await getDbSyncer().sync();\n }\n};\n\nexport const deleteFlight = async (flightId: string): Promise => {\n const flight = await getCompleteFlight(flightId);\n if (!flight) {\n throw new Error(`Flight to delete not found: ${flightId}`);\n }\n await Promise.all(flight.legs.map((l) => deleteFlightLeg(l.id)));\n flight.deleted = true;\n const db = getDb();\n await db.flights.put(flight);\n getDbSyncer().markToSync(db.flights, flightId);\n};\n\nexport const createBareFlight = (flight: T): Flight => {\n const {\n id,\n createdAt,\n aircraftId,\n acceptanceNotes,\n picName,\n picId,\n editableByUserIds,\n state,\n reservationId,\n deleted,\n _version,\n } = flight;\n return {\n id,\n createdAt,\n aircraftId,\n acceptanceNotes,\n picName,\n picId,\n editableByUserIds,\n state,\n reservationId,\n deleted,\n _version,\n };\n};\n","import {useState} from \"react\";\n\ntype IdGenerator = () => string;\nconst existingGenerators = new Map();\n\n\nexport const createIdGenerator = (prefix: string): IdGenerator => {\n if (existingGenerators.has(prefix)) {\n return existingGenerators.get(prefix)!;\n }\n\n let id = 0;\n const generator = () => {\n return `prefix-${++id}`;\n };\n existingGenerators.set(prefix, generator);\n return generator;\n};\n\nexport const useId = (prefix = 'rnd'): [string] => {\n const generator = createIdGenerator(prefix);\n const [id] = useState(generator());\n return [id];\n};\n\nconst defaultGenerator = createIdGenerator('rnd');\nexport default defaultGenerator;\n","import { DbSaveable } from '../LocalDB/types';\nimport * as uuid from 'uuid';\nimport { flightReleaseToReleaseToService, FlightReleaseToService, ReleaseToService } from '../ReleaseToService/types';\nimport { HandSignature } from '../util/SignatureTypes';\nimport { FlightDocument } from '../FlightDocuments/FlightDocument';\n\nimport { AircraftForFlight } from '../Aircrafts/AircraftForFlight';\n\nexport type Squawk = {\n id: string;\n aircraftId: string;\n flightId?: string;\n legId?: string;\n createdAt: Date;\n createdByName: string;\n description: string;\n airworthinessAffected: boolean;\n reviewedDate: string | null;\n reviewedName: string | null;\n reviewedId: string | null;\n editableByUserIds: string[];\n releaseDate: Date | null;\n releaseAircraftFlightTime: number | null;\n releaseName: string | null;\n releaseLicenseNumber: string | null;\n releaseText: string | null;\n releaseSignature: HandSignature | null;\n} & DbSaveable;\n\nexport type SquawkDeferral = {\n id: string;\n squawkId: string;\n editableByUserIds: string[];\n createdAt: Date;\n createdByName: string | null;\n createdByLicenseNumber: string | null;\n createdBySignature: HandSignature | null;\n deferredUntil: Date;\n actionsRequired: SquawkDeferralActionRequired[];\n actionPerformedText: string | null;\n melType: string | null;\n text: string | null;\n} & DbSaveable;\n\nexport type SquawkDeferralAndReleases = SquawkDeferral & {\n releases: ReleaseToService[];\n};\n\nexport const SQUAWK_DEFERRAL_ACTION_OPERATIONAL = 'operational';\nexport const SQUAWK_DEFERRAL_ACTION_MAINTENANCE = 'maintenance';\nexport type SquawkDeferralActionRequired =\n | typeof SQUAWK_DEFERRAL_ACTION_MAINTENANCE\n | typeof SQUAWK_DEFERRAL_ACTION_OPERATIONAL;\n\nexport type SquawkAndDeferrals = Squawk & {\n deferrals: SquawkDeferralAndReleases[];\n releases: ReleaseToService[];\n};\nexport type SquawkAndAircraft = Squawk & {\n documents: FlightDocument[];\n deferrals: SquawkDeferralAndReleases[];\n releases: ReleaseToService[];\n aircraft: AircraftForFlight;\n};\n\nexport const flightSquawksToSquawks = (\n flightSquawks: FlightSquawk[],\n editableByUserIds: string[]\n): [Squawk[], SquawkDeferral[], FlightDocument[], ReleaseToService[]] => {\n const allSquawks: Squawk[] = [];\n const allDocuments: FlightDocument[] = [];\n const allDeferrals: SquawkDeferral[] = [];\n const allReleases: ReleaseToService[] = [];\n flightSquawks.forEach((flightSquawk) => {\n const { documents, deferrals, releases, ...squawkParams } = flightSquawk;\n const squawk: Squawk = {\n ...squawkParams,\n editableByUserIds,\n };\n releases.forEach((flightRelease) => {\n const [deferalRelease, releaseDocuments] = flightReleaseToReleaseToService(flightRelease);\n deferalRelease.editableByUserIds = editableByUserIds.slice();\n allReleases.push(deferalRelease);\n documents.push(...releaseDocuments);\n });\n documents.forEach((doc) => (doc.editableByUserIds = editableByUserIds.slice()));\n allDocuments.push(...documents);\n allSquawks.push(squawk);\n const [newDeferrals, newDeferralDocs, deferralReleases] = flightDeferralToDeferral(\n deferrals,\n editableByUserIds\n );\n allDocuments.push(...newDeferralDocs);\n allDeferrals.push(...newDeferrals);\n allReleases.push(...deferralReleases);\n });\n return [allSquawks, allDeferrals, allDocuments, allReleases];\n};\n\nexport const flightDeferralToDeferral = (\n flightDeferrals: FlightSquawkDeferral[],\n editableByUserIds: string[]\n): [SquawkDeferral[], FlightDocument[], ReleaseToService[]] => {\n const allDeferrals: SquawkDeferral[] = [];\n const allDocuments: FlightDocument[] = [];\n const allReleases: ReleaseToService[] = [];\n flightDeferrals.forEach((flightDeferral) => {\n const { documents, releases, ...squawkDeferralParams } = flightDeferral;\n const squawkDeferral: SquawkDeferral = {\n ...squawkDeferralParams,\n editableByUserIds: editableByUserIds.slice(),\n };\n releases.forEach((flightRelease) => {\n const [deferalRelease, releaseDocuments] = flightReleaseToReleaseToService(flightRelease);\n deferalRelease.editableByUserIds = editableByUserIds.slice();\n allReleases.push(deferalRelease);\n documents.push(...releaseDocuments);\n });\n documents.forEach((d) => (d.editableByUserIds = editableByUserIds.slice()));\n allDeferrals.push(squawkDeferral);\n\n allDocuments.push(...documents);\n });\n return [allDeferrals, allDocuments, allReleases];\n};\nexport type FlightSquawk = Omit & {\n documents: FlightDocument[];\n deferrals: FlightSquawkDeferral[];\n releases: FlightReleaseToService[];\n};\n\nexport type FlightSquawkDeferral = Omit & {\n documents: FlightDocument[];\n releases: FlightReleaseToService[];\n};\n\nexport type EmptySquawkProps = {\n aircraftId: string;\n flightId?: string;\n legId?: string;\n picName?: string;\n};\n\nexport const createEmptySquawk = ({ aircraftId, flightId, legId, picName }: EmptySquawkProps): FlightSquawk => ({\n id: uuid.v4(),\n aircraftId,\n flightId,\n legId,\n createdAt: new Date(),\n createdByName: picName || '',\n description: '',\n airworthinessAffected: false,\n documents: [],\n deferrals: [],\n releases: [],\n deleted: false,\n reviewedDate: null,\n reviewedName: null,\n reviewedId: null,\n releaseDate: null,\n releaseAircraftFlightTime: null,\n releaseName: null,\n releaseLicenseNumber: null,\n releaseText: null,\n releaseSignature: null,\n});\n\nexport type EmptySquawkDeferralProps = {\n squawkId: string;\n createdByName?: string;\n};\nexport const createEmptySquawkDeferral = ({\n squawkId,\n createdByName,\n}: EmptySquawkDeferralProps): FlightSquawkDeferral => {\n return {\n id: uuid.v4(),\n squawkId,\n createdAt: new Date(),\n createdByName: createdByName || '',\n createdByLicenseNumber: '',\n createdBySignature: null,\n deferredUntil: new Date(),\n melType: null,\n text: null,\n actionsRequired: [],\n actionPerformedText: null,\n deleted: false,\n documents: [],\n releases: [],\n };\n};\n","import { CreateAircraftMaintenanceLimitInput } from '../../API';\nimport { WithId } from '../../Datasource/LocalDB/types';\nimport * as uuid from 'uuid';\nimport { AircraftCountableType } from '../../Datasource/CountableChanges/types';\nimport { AircraftMaintenanceLimitExtensionMode } from './AircraftMaintenanceLimitExtensionMode';\nimport { MaintenanceTaskCalendarUnit } from '../MaintenancePrograms/MaintenanceTaskCalendarUnit';\n\nexport const createEmptyMaintenanceLimit = (aircraftId: string): CreateAircraftMaintenanceLimitInput & WithId => {\n return {\n id: uuid.v4(),\n deleted: false,\n createdAt: new Date().toISOString(),\n aircraftId,\n name: '',\n validUntilDate: null,\n validUntilDateToleranceSeconds: null,\n validUntilCountableTypes: null,\n validUntilCountableValues: null,\n validUntilCountableValuesTolerance: null,\n }\n};\n\nexport type AircraftMaintenanceLimit =\n Omit\n & {\n createdAt: Date;\n customWarningRules: AircraftMaintenanceLimitCustomWarningRules;\n limitExtensionRules: AircraftMaintenanceLimitExtensionRules;\n validUntilDate: Date | null;\n validUntilCountableTypes: AircraftCountableType[] | null;\n}\n\nexport type AircraftMaintenanceLimitExtensionRules = {\n extendableByPilot?: boolean;\n mode?: AircraftMaintenanceLimitExtensionMode,\n dateExtension?: {\n amount: number;\n unit: MaintenanceTaskCalendarUnit;\n untilEndOfUnit: boolean;\n fixedIntervalReferenceDate?: Date;\n }\n countableValuesExtension?: (number | null)[];\n}\nexport type AircraftMaintenanceLimitCustomWarningRules = {\n validUntilDateCautionSeconds?: number;\n}\n\nexport function aircraftMaintenanceLimitFromDb(input: CreateAircraftMaintenanceLimitInput & WithId): AircraftMaintenanceLimit {\n return {\n id: input.id,\n deleted: input.deleted,\n createdAt: new Date(input.createdAt!),\n aircraftId: input.aircraftId,\n name: input.name,\n validUntilDateToleranceSeconds: input.validUntilDateToleranceSeconds,\n validUntilCountableTypes: input.validUntilCountableTypes as AircraftCountableType[] | null,\n validUntilCountableValues: input.validUntilCountableValues,\n validUntilCountableValuesTolerance: input.validUntilCountableValuesTolerance,\n _version: input._version,\n validUntilDate: input.validUntilDate ? new Date(input.validUntilDate) : null,\n customWarningRules: input.customWarningRules ? JSON.parse(input.customWarningRules) : {},\n limitExtensionRules: input.limitExtensionRules ? limitExtensionRulesFromDb(input.limitExtensionRules) : {},\n maintenanceProgramTaskWid: input.maintenanceProgramTaskWid,\n };\n}\n\nexport function aircraftMaintenanceLimitToDb(record: AircraftMaintenanceLimit): CreateAircraftMaintenanceLimitInput & WithId {\n return {\n ...record,\n createdAt: record.createdAt.toISOString(),\n validUntilDate: record.validUntilDate ? record.validUntilDate.toISOString() : null,\n customWarningRules: Object.keys(record.customWarningRules).length ? JSON.stringify(record.customWarningRules) : null,\n limitExtensionRules: Object.keys(record.limitExtensionRules).length ? JSON.stringify(record.limitExtensionRules) : null,\n };\n}\n\nfunction limitExtensionRulesFromDb(json: string): AircraftMaintenanceLimitExtensionRules {\n const out: AircraftMaintenanceLimitExtensionRules = JSON.parse(json);\n if (out.dateExtension?.fixedIntervalReferenceDate) {\n out.dateExtension.fixedIntervalReferenceDate = new Date(out.dateExtension.fixedIntervalReferenceDate);\n }\n return out;\n}\n","import hexToRgba from 'hex-to-rgba';\nimport csscolors from 'css-color-names';\nimport { isNone, Maybe } from './maybe';\nimport { ColorKey, COLORS } from 'stylekit';\n\nfunction getCssHexColor(color: string): Maybe {\n // @ts-ignore\n return csscolors[color];\n}\n\nexport function colorToRgba(color: string | undefined, opacity?: number) {\n if (isNone(color)) {\n return undefined;\n }\n if (color.startsWith('#') && color.length > 6) {\n return hexToRgba(color, opacity);\n }\n const cssHexColor = getCssHexColor(color);\n if (isNone(cssHexColor)) {\n return undefined;\n } else {\n return hexToRgba(cssHexColor, opacity);\n }\n}\n\nexport function getRgbaColor(params: { colorKey?: ColorKey; colorRaw?: string; opacity?: number }) {\n return (\n params.colorRaw ??\n colorToRgba(params.colorKey ? COLORS[params.colorKey] ?? params.colorKey : undefined, params.opacity)\n );\n}\n","import { CreateLogbookRecordInput } from '../../API';\nimport { LogbookInstrumentApproach } from './LogbookInstrumentApproach';\nimport { FinishedFlightLeg } from '../FlightLegs/FlightLeg';\n\ntype OmittedFields =\n 'id'\n | 'date'\n | 'contactId'\n | 'crewId'\n | 'deleted'\n | 'legId'\n | 'departurePlace'\n | 'departureTime'\n | 'arrivalPlace'\n | 'arrivalTime'\n | 'aircraftMake'\n | 'aircraftRegistration'\n | 'airplaneSeMeMcc'\n | 'picName'\n | 'picTime'\n | 'copilotTime'\n | 'dualTime'\n | 'instructorTime'\n | 'isFstd'\n | 'instrumentApproachDetails'\n | '_version';\n\nexport type InLegLogbook = Omit & {\n instrumentApproachDetails: LogbookInstrumentApproach[];\n}\n\nexport const createEmptyInLegLogbook = (): InLegLogbook => ({\n totalFlightTime: null,\n landingsTotal: null,\n landingsNight: null,\n nightTime: null,\n ifrTime: null,\n remarks: null,\n crossCountryTime: null,\n instrumentActualTime: null,\n instrumentSimulatedTime: null,\n instrumentApproachDetails: [],\n holdings: null,\n});\n\nexport function inLegLogbookToRecord(inLeg: InLegLogbook, leg: FinishedFlightLeg): Omit {\n return {\n date: leg.timeOut.toISOString(),\n deleted: false,\n legId: leg.id,\n editableByUserIds: inLeg.editableByUserIds\n }\n}\n","import { getDb } from '../LocalDB/LocalDB';\n\nexport const getLocalFlightDocumentContent = async (documentId: string): Promise => {\n const document = await getDb().localDocumentContents.get(documentId);\n if (!document) {\n return null;\n }\n return document.content;\n}\n\nexport const putLocalFlightDocumentContent = async (documentId: string, content: Blob): Promise => {\n await getDb().localDocumentContents.put({id: documentId, content});\n}\n\nexport const deleteLocalFlightDocumentContent = async (documentId: string): Promise => {\n await getDb().localDocumentContents.delete(documentId);\n}\n\nexport type LocalDocumentContent = {\n id: string;\n content: Blob;\n}\n","export default __webpack_public_path__ + \"static/media/logo.75dd6943.svg\";","export function whenOnline(): Promise {\n return new Promise((resolve, reject) => {\n if (navigator.onLine) {\n resolve();\n } else {\n window.addEventListener('online', () => resolve());\n }\n });\n}\n","import React, { FunctionComponent, Suspense } from \"react\";\nimport LoadingScreenOverlay from \"./components/LoadingScreenOverlay\";\nimport { ADMIN_LINK_PREFIX, navigateA } from './Admin/Utils/LinkPrefix';\nimport { useCognitoSignedUserState } from './reducers/cognitoUserReducer';\nimport { tlbUserIsSignedIn, useAnyTlbUserState } from './reducers/tlbUserReducer';\n\ntype AppSelectorProps = {}\n\nconst AppSelector: FunctionComponent = () => {\n const user = useCognitoSignedUserState();\n const tlbUser = useAnyTlbUserState();\n const userGroups = user.groups;\n\n const TlbApp = React.lazy(() => import('./App'));\n const TechApp = React.lazy(() => import('./Technicians/TechnicianApp'))\n const OpsApp = React.lazy(() => import(\"./Admin/Admin\"));\n\n const isInOps = window.location.pathname.startsWith(ADMIN_LINK_PREFIX);\n const isPilot = userGroups.includes('usr');\n const isTech = userGroups.includes('tch');\n\n if (!isInOps && !tlbUserIsSignedIn(tlbUser)) {\n navigateA('/');\n }\n return (\n }>\n {isInOps ? (\n \n ) : (isTech && !isPilot) ? (\n \n ) : (\n \n )}\n \n )\n\n};\n\nexport default AppSelector;\n","import React from \"react\";\nimport { formClasses } from '../../utils/BEM';\nimport InputTextField from '../../components/FormFields/InputTextField';\nimport InputCheckboxField from '../../components/FormFields/InputCheckboxField';\n\nexport type LoginFormData = {\n username: string;\n password: string;\n rememberPassword: boolean;\n};\ntype LoginFormProps = {\n busy: boolean;\n formData: T;\n setFormData: (formData: T) => void;\n\n}\n\nfunction LoginForm({busy, formData, setFormData}: LoginFormProps) {\n return (\n <>\n setFormData({...formData, username})}\n />\n setFormData({...formData, password})}\n />\n
\n setFormData({...formData, rememberPassword})}\n label={'Remember password'}/>\n
\n
\n \n
\n \n );\n}\n\nexport default LoginForm;\n","import React from \"react\";\nimport { formClasses } from '../../utils/BEM';\nimport InputTextField from '../../components/FormFields/InputTextField';\n\nexport type CompleteNewPasswordFormData = { resetPassword: string };\ntype CompleteNewPasswordFormProps = {\n busy: boolean;\n formData: T;\n setFormData: (formData: T) => void;\n\n}\n\nfunction CompleteNewPasswordForm({\n busy,\n formData,\n setFormData\n }: CompleteNewPasswordFormProps) {\n return (\n <>\n setFormData({\n ...formData,\n resetPassword\n })}\n />\n
\n \n
\n \n );\n}\n\nexport default CompleteNewPasswordForm;\n","import React, { FunctionComponent, Suspense, useEffect, useState } from 'react';\nimport '../../Bootstrap.sass';\nimport '../../App.sass';\nimport { formClasses, pageClasses } from '../../utils/BEM';\nimport LoadingScreenOverlay from '../../components/LoadingScreenOverlay';\nimport { Auth } from 'aws-amplify';\nimport { getCredentials, saveCredentials } from './CredentialStore';\nimport logo from './logo.svg';\nimport LoginForm, { LoginFormData } from './LoginForm';\nimport CompleteNewPasswordForm, { CompleteNewPasswordFormData } from './CompleteNewPasswordForm';\nimport { installationData } from '../../installationData';\n\ntype LoginScreenProps = {};\nconst LoginScreen: FunctionComponent = () => {\n const [useAmplify, setUseAmplify] = useState(false);\n const [completeNewPasswordData, setCompleteNewPasswordData] = useState(false);\n const [formData, setFormData] = useState({\n username: '',\n password: '',\n resetPassword: '',\n rememberPassword: true,\n });\n const [errorMessage, setErrorMessage] = useState(undefined);\n const [busy, setBusy] = useState(false);\n const login = async () => {\n try {\n setBusy(true);\n if (!completeNewPasswordData) {\n const signIn = await Auth.signIn(formData.username, formData.password);\n if (signIn.challengeName === 'NEW_PASSWORD_REQUIRED') {\n setCompleteNewPasswordData(signIn);\n }\n } else {\n await Auth.completeNewPassword(completeNewPasswordData, formData.resetPassword, {});\n }\n if (formData.rememberPassword) {\n await saveCredentials(formData.username, formData.password);\n }\n } catch (e: any) {\n console.error(e);\n setErrorMessage(e.message);\n } finally {\n setBusy(false);\n }\n };\n useEffect(() => {\n let cancelled = false;\n (async () => {\n const maybeCreds = await getCredentials();\n if (cancelled) {\n return;\n }\n if (maybeCreds) {\n try {\n setBusy(true);\n await Auth.signIn(maybeCreds.username, maybeCreds.password);\n } catch (e: any) {\n console.error(e);\n setErrorMessage(e.message);\n } finally {\n setBusy(false);\n }\n }\n })();\n return () => {\n cancelled = true;\n };\n }, []);\n const AmplifyLoginScreen = React.lazy(() => import('./AmplifyLoginScreen'));\n return (\n {\n evt.preventDefault();\n await login();\n }}\n >\n
\n
\n
\n {`${installationData.name}\n {!useAmplify ? (\n <>\n
\n {!errorMessage ? (\n

\n {!completeNewPasswordData\n ? `Welcome to ${installationData.name} e-flight system. Please use the form below to log in. If you don't have an account yet, please contact our dispatching.`\n : \"You have logged in with a temporary password. Please set a new, permanent one. Please choose a password that you don't use on other services.\"}\n

\n ) : (\n

{errorMessage}

\n )}\n
\n {!completeNewPasswordData ? (\n <>\n \n
\n {\n evt.preventDefault();\n setUseAmplify(true);\n }}\n >\n Forgot password?\n \n
\n \n ) : (\n \n )}\n \n ) : (\n }>\n \n \n )}\n
\n
\n
\n \n );\n};\n\nexport default LoginScreen;\n","export const saveCredentials = async (username: string, password: string) => {\n if ('credentials' in navigator) {\n try {\n const cred = new (window as any).PasswordCredential({\n id: username,\n password\n });\n await navigator.credentials.store(cred);\n } catch (e) {\n console.error(e);\n }\n }\n};\n\nexport const getCredentials = async (): Promise<{ username: string; password: string } | null> => {\n try {\n if ('credentials' in navigator) {\n const credential = await (navigator.credentials.get as any)({password: true, mediation: 'required'});\n if (credential) {\n return {username: credential.id, password: credential.password};\n }\n }\n return null;\n } catch (e) {\n console.error(e);\n return null;\n }\n};\n","import React, { Dispatch, FunctionComponent, useEffect } from \"react\";\nimport { Hub } from \"aws-amplify\";\nimport { useDispatch } from \"react-redux\";\nimport {\n TLB_USER_SIGN_OUT,\n TLB_USER_STATE_PROCESSING,\n TlbUserActionTypes,\n useAnyTlbUserState\n} from \"../reducers/tlbUserReducer\";\nimport { setPreferredEnvironment } from \"../utils/BackendSwitcher\";\nimport LoadingScreenOverlay from '../components/LoadingScreenOverlay';\nimport {\n COGNITO_USER_SIGN_OUT,\n COGNITO_USER_STATE_PROCESSING,\n CognitoUserActionTypes,\n useCognitoAnyUserState\n} from '../reducers/cognitoUserReducer';\nimport LoginScreen from '../screens/LoginScreen/LoginScreen';\nimport { reauthenticate } from '../utils/Authentication/Reauthenticate';\nimport { getDb } from '../Datasource/LocalDB/LocalDB';\nimport { wipeDbSyncer } from '../Datasource/LocalDB/DbSyncer';\n\nconst WithAuthenticatedUser: FunctionComponent = ({children}) => {\n const cognitoUser = useCognitoAnyUserState();\n const tlbUser = useAnyTlbUserState();\n const dispatch = useDispatch>();\n useEffect(() => {\n reauthenticate(dispatch);\n const onAuth = async (e: any) => {\n if (e.payload.event) {\n switch (e.payload.event) {\n case 'signOut':\n await getDb().wipe();\n wipeDbSyncer();\n dispatch({type: TLB_USER_SIGN_OUT});\n dispatch({type: COGNITO_USER_SIGN_OUT});\n setPreferredEnvironment(undefined);\n break;\n case 'signIn':\n reauthenticate(dispatch);\n break;\n }\n }\n };\n Hub.listen('auth', onAuth);\n return () => {\n Hub.remove('auth', onAuth);\n }\n }, [dispatch]);\n\n if (cognitoUser === COGNITO_USER_STATE_PROCESSING || tlbUser === TLB_USER_STATE_PROCESSING) {\n return \n } else if ('object' === typeof cognitoUser && cognitoUser.groups) {\n return <>{children};\n } else {\n return \n }\n\n};\n\nexport default WithAuthenticatedUser;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport Amplify, { API } from 'aws-amplify';\nimport awsconfig from './aws-exports';\nimport moment from 'moment';\n\nimport WithStore from './wrappers/WithStore';\nimport AppSelector from './AppSelector';\nimport WithAuthenticatedUser from './wrappers/WithAuthenticatedUser';\n\nAmplify.configure(awsconfig);\nAPI.configure(awsconfig);\n\nmoment.updateLocale('en', {\n week: {\n dow: 1, // Set the First day of week to Monday\n },\n});\n\n(ReactDOM as any).createRoot(document.getElementById('root')).render(\n \n \n \n \n \n \n \n);\nexport { parsePerformanceProfileJson } from './Admin/Scheduling/model/PerformanceProfileTypes';\nexport { PERF_PROFILE_STRING_KEYS } from './Admin/Scheduling/model/PerformanceProfileTypes';\n"],"sourceRoot":""}