const _ = require('lodash');
// RequestedDateTimeHelper is a helper related to requested times.
// Requested dates can be either datetime or time (military).
class RequestedDateTimeHelper {
/**
* isDateTimeDifferent method returns true if datetime/time is different
*
* Time can change from:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<TransportCoordination xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://tr02-wiki.dakosy.de/dokumentation/TR02XMLv14.3/TransportCoordination.xsd"> | |
<Transaction code="TR02XML" version="14" type="TransportCoordination"/> | |
<Interchange> | |
<CreationTime>2024-11-07T15:35:49</CreationTime> | |
<ExchangeNumber>N6Q2B1P4749057</ExchangeNumber> | |
<MessageCount>1</MessageCount> | |
<Sender> | |
<ParticipantCode agencyID="DAKOSY">NIEL</ParticipantCode> | |
</Sender> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<TransportCoordination xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation="http://tr02-wiki.dakosy.de/dokumentation/TR02XMLv14.3/TransportCoordination.xsd"> | |
<Transaction code="TR02XML" version="14" type="TransportCoordination" /> | |
<Interchange> | |
<CreationTime>2024-10-18T00:00:00</CreationTime> | |
<!--Incorrect Timestamp --> | |
<ExchangeNumber>2001456789</ExchangeNumber> | |
<TestIndicator>1</TestIndicator> | |
<MessageCount>1</MessageCount> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const upsertAuthUser = async (result: { | |
email: string | null; | |
userId: string | null; | |
token: string | null; | |
refreshToken: string | null; | |
name: string | null; | |
meta: any; | |
}, providerType: ProviderTypes): Promise<Result> => { | |
let foundSocialUser: null | SocialAuthUser = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let htmlString = ` | |
<script type="text/javascript"> | |
if (typeof (smartWeb) == 'undefined') smartWeb = {}; | |
if (typeof (smartWeb.Appointment) == 'undefined') smartWeb.Appointment = {}; | |
smartWeb.Appointment.Constants = { | |
NL_VALUE: 99999, | |
NL: 'NL', | |
NR: 'NR', | |
DEFAULT_LIMIT_DATA: '0-0-0', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"lastIndex": 110016362472800256, | |
"clientSegment": [ | |
0, | |
128 | |
], | |
"updates": [ | |
{ | |
"index": 110015715536535552, | |
"timestamp": "2023-03-13T11:23:16.887Z", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let update8 = { | |
lastIndex: 110016159375425536, | |
clientSegment: [0, 128], | |
updates: [ | |
{ | |
index: 110015715536535552, | |
timestamp: '2023-03-13T11:23:16.887Z', | |
before: null, | |
after: { | |
voyageId: 'b0571ec1-ff7c-4b67-b00d-0121bd8dc372', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let updates3 = { | |
lastIndex: 110014217503309824, | |
clientSegment: [0, 128], | |
updates: [ | |
{ | |
index: 110014180472848384, | |
timestamp: '2023-03-13T04:52:53.677Z', | |
before: { | |
voyageId: '5a21e768-9670-48e6-8522-551e4eef7f00', | |
declarant: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"@class": "com.portbase.hinterland.api.common.Terminal", | |
"shortName": "NONPCS_ROTTERDAM", | |
"ean": null, | |
"bicsCode": "00RHB", | |
"quayName": "Rotterdams Haven Bedrijf", | |
"smdgCode": null, | |
"location": { | |
"name": "Rotterdam", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let updates2 = { | |
lastIndex: 110014179357687808, | |
clientSegment: [0, 128], | |
updates: [ | |
{ | |
index: 110013966679998464, | |
timestamp: '2023-03-13T03:58:31.456Z', | |
before: { | |
voyageId: 'b4ee3a61-ede9-43bd-aef8-0eb65e19cfaf', | |
declarant: { |
NewerOlder