MissionBookingsThresholdIncreased
v2.0.0

Event represents when the booking threshold of a Mission has been increased

Details

This event is emitted when a the maximum number of bookings for a mission (booking threshold) has been increased to allow more bookings to be created. It is consumed by the Mission Service to recalculate the bookings.areAllowed value.

Related Events

None

Consumer / Producer Diagram

Event Example

MissionBookingsThresholdIncreased Schema (json)
{
    "version": "3.0",
    "id": "676ddc84-11d2-587b-34a3-bb0d7c1ac7f3",
    "detail-type": "MissionBookingsThresholdIncreased",
    "source": "flatsy.service.mission",
    "account": "221760190323",
    "time": "2023-04-13T07:37:58Z",
    "region": "eu-west-3",
    "resources": [],
    "detail": {
        "metadata": {
            "application": "Admin",
            "service": "flatsy.service.mission",
            "actor": "Admin",
            "actorID": "f2bb4633-95ba-4e94-a53a-7986d7150a3d",
            "entity": "Mission",
            "correlationID": null,
            "entityID": "d8a310f2-76db-4472-b32c-03cda359b067"
        },
        "data": {
            "mission": {
                "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "version": "2.0",
                "type": "INSPECTION",
                "operations": {
                    "bookings": {
                        "areAllowed": true,
                        "currentThreshold": 14,
                        "initialThreshold": 7,
                        "validCount": 5
                    }
                },
                "currentState": {
                    "state": "ACCEPTED",
                    "changedAt": "2023-12-30T10:00:00+02:00",
                    "reason": "",
                    "actor": "OPS",
                    "actorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                    "optionalComment": ""
                },
                "previousStates": [
                    {
                        "state": "ORDERED",
                        "changedAt": "2023-12-29T18:00:00+02:00",
                        "reason": "",
                        "actor": "CUSTOMER",
                        "actorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                        "optionalComment": ""
                    }
                ],
                "propertyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "customerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "createdAt": "2023-05-02T08:56:42.794Z",
                "updatedAt": "2023-05-02T08:56:42.794Z",
                "completedAt": null,
                "inspection": {
                    "type": "ENTRY",
                    "preferredAt": "2023-05-02T08:56:42.794Z",
                    "visit": null,
                    "flatguide": null
                },
                "property": {
                    "location": {
                        "latitude": 12.4,
                        "longitude": 12.4,
                        "countryCode": "FRA",
                        "postalCode": "75002",
                        "locality": "Paris",
                        "route": "rue d'Aboukir",
                        "streetAddress": "50 rue d'Aboukir",
                        "streetNumber": "50",
                        "entrance": "bte 2",
                        "unit": "Résidence les platanes",
                        "placeName": "Dumonceau",
                        "floorNumber": 3
                    },
                    "estateType": "HOUSE",
                    "publication": {
                        "reference": "XDr34"
                    },
                    "spaces": {
                        "residential": {
                            "livingSpace": 120
                        }
                    },
                    "structure": {
                        "rooms": {
                            "numberOfBedrooms": 1,
                            "numberOfRooms": 2
                        }
                    },
                    "isFurnished": true,
                    "heating": {
                        "energyEquipmentKind": "ELECTRICITY",
                        "isCommunal": true
                    },
                    "hotWater": {
                        "energyEquipmentKind": "ELECTRICITY",
                        "isCommunal": true
                    }
                },
                "tenant": {
                    "firstName": "Olivier",
                    "lastName": "Dupont",
                    "email": "odupont@example.com",
                    "address": "52 rue d'aboukir",
                    "postalCode": "75002",
                    "locality": "Paris"
                },
                "landlord": {
                    "firstName": "Olivier",
                    "lastName": "Dupont",
                    "email": "odupont@example.com",
                    "address": "52 rue d'aboukir",
                    "postalCode": "75002",
                    "locality": "Paris"
                },
                "thirdParty": {
                    "id": "492ddc84-11d2-587b-34a3-bb0d7c1acdc4",
                    "state": null
                }
            },
            "previous": {
                "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "version": "2.0",
                "type": "INSPECTION",
                "operations": {
                    "bookings": {
                        "areAllowed": true,
                        "currentThreshold": 7,
                        "initialThreshold": 7,
                        "validCount": 5
                    }
                },
                "currentState": {
                    "state": "ACCEPTED",
                    "changedAt": "2023-12-30T10:00:00+02:00",
                    "reason": "",
                    "actor": "OPS",
                    "actorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                    "optionalComment": ""
                },
                "previousStates": [
                    {
                        "state": "ORDERED",
                        "changedAt": "2023-12-29T18:00:00+02:00",
                        "reason": "",
                        "actor": "CUSTOMER",
                        "actorId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                        "optionalComment": ""
                    }
                ],
                "propertyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "customerId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
                "createdAt": "2023-05-02T08:56:42.794Z",
                "updatedAt": "2023-05-02T08:56:42.794Z",
                "completedAt": null,
                "inspection": {
                    "type": "ENTRY",
                    "preferredAt": "2023-05-02T08:56:42.794Z",
                    "visit": null,
                    "flatguide": null
                },
                "property": {
                    "location": {
                        "latitude": 12.4,
                        "longitude": 12.4,
                        "countryCode": "FRA",
                        "postalCode": "75002",
                        "locality": "Paris",
                        "route": "rue d'Aboukir",
                        "streetAddress": "50 rue d'Aboukir",
                        "streetNumber": "50",
                        "entrance": "bte 2",
                        "unit": "Résidence les platanes",
                        "placeName": "Dumonceau",
                        "floorNumber": 3
                    },
                    "estateType": "HOUSE",
                    "publication": {
                        "reference": "XDr34"
                    },
                    "spaces": {
                        "residential": {
                            "livingSpace": 120
                        }
                    },
                    "structure": {
                        "rooms": {
                            "numberOfBedrooms": 1,
                            "numberOfRooms": 2
                        }
                    },
                    "isFurnished": true,
                    "heating": {
                        "energyEquipmentKind": "ELECTRICITY",
                        "isCommunal": true
                    },
                    "hotWater": {
                        "energyEquipmentKind": "ELECTRICITY",
                        "isCommunal": true
                    }
                },
                "tenant": {
                    "firstName": "Olivier",
                    "lastName": "Dupont",
                    "email": "odupont@example.com",
                    "address": "52 rue d'aboukir",
                    "postalCode": "75002",
                    "locality": "Paris"
                },
                "landlord": {
                    "firstName": "Olivier",
                    "lastName": "Dupont",
                    "email": "odupont@example.com",
                    "address": "52 rue d'aboukir",
                    "postalCode": "75002",
                    "locality": "Paris"
                },
                "thirdParty": {
                    "id": "492ddc84-11d2-587b-34a3-bb0d7c1acdc4",
                    "state": null
                }
            }
        }
    }
}
Edit this pageLast updated on 2023/11/3