This lambda fetches estates from Immobilienscout24 or FlowFact, compares the results with Contentful and triggers webhooks if the estates in Contentful are not up to date.
-
Poll estates from portal (estate-portal-aggregator)
- Filter estates from portal (JSONPATH)
-
Poll estates from Contentful by
contentTypeIdwith fieldssys.id,sys.updatedAt- Filter estates from Contentful (JSONPATH)
-
Compare estates by
internalID(portal) /sys.id(Contentful) andupdatedAt(portal) /sys.updatedAt(Contentful)-
Loop portal estates
-
If
internalIDnot in Contentful (sys.id)- Add portal estate to webhook payload - array property
created
- Add portal estate to webhook payload - array property
-
Else if
updatedAt>sys.updatedAt- Add portal estate to webhook payload - array property
updated
- Add portal estate to webhook payload - array property
-
-
Loop Contentful estates
- If
sys.idnot in portal (internalID)- Add estate
sys.idto webhook payload - array propertydeleted
- Add estate
- If
-
-
If
created/updated/deletedlength >= 1- POST webhook with payload
- CiCd
- Tests
- E2E Tests
- Scheduling
- development / production deploys