Skip to content

Instantly share code, notes, and snippets.

@bjhartin
Last active May 1, 2023 20:56
Show Gist options
  • Save bjhartin/5b19a223e8d6806eb5baf87339c1e1bc to your computer and use it in GitHub Desktop.
Save bjhartin/5b19a223e8d6806eb5baf87339c1e1bc to your computer and use it in GitHub Desktop.
{
"asyncapi": "2.4.0",
"info": {
"title": "Reporting Events Contract",
"version": "0.1.0",
"description": "This service is in charge of managing members of logistic teams"
},
"channels": {
"TeamJoin": {
"publish": {
"message": {
"$ref": "#/components/messages/TeamJoin"
}
}
}
},
"components": {
"messages": {
"TeamInfo": {
"payload": {
"type": "object",
"required": [
"version",
"orgId",
"displaySerialNumber",
"teamGuid",
"eventTimestamp"
],
"properties": {
"version": {
"type": "string",
"description": "Version of the message",
"enum": [
"1"
]
},
"orgId": {
"type": "integer",
"format": "int64",
"description": "Ops Center organization id that owns the display serial number and team"
},
"displaySerialNumber": {
"type": "string",
"description": "Serial number of the display"
},
"teamGuid": {
"type": "string",
"format": "uuid",
"description": "Team Guid for display"
},
"eventTimestamp": {
"type": "string",
"format": "date-time",
"description": "Version of the message"
}
}
}
},
"TeamJoin": {
"payload": {
"required": [
"reportingEvent",
"joinType",
"eventTime",
"teamingResult",
"workContributionGuid",
"teamWorkDefinitionGuid",
"operationTypes",
"currentActiveTeamSize",
"currentSessionCount",
"metadata"
],
"type": "object",
"properties": {
"reportingEvent": {
"type": "string",
"default": "TeamJoin"
},
"joinType": {
"$ref": "#/components/schemas/JoinType"
},
"eventTime": {
"type": "string",
"format": "date-time"
},
"teamingResult": {
"$ref": "#/components/schemas/TeamingResult"
},
"workContributionGuid": {
"type": "string"
},
"teamWorkDefinitionGuid": {
"type": "string"
},
"operationTypes": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"currentActiveTeamSize": {
"type": "integer"
},
"currentSessionCount": {
"type": "integer",
"description": "Count of Sessions currently in the Team"
},
"metadata": {
"$ref": "#/components/schemas/DisplayMetadata"
}
}
}
}
},
"schemas": {
"LogisticsRoutingType": {
"type": "string",
"description": "Logistics system routing type, aka MR_SNAPSHOTS_EXP, defined in [data/ISG_Shared/Protobuf/Common/ERoutingType.proto](https://github.deere.com/data/ISG_Shared/blob/4cb706fc28a4fa6ea0a1c79011c7bc8d56891794/Protobuf/Common/ERoutingType.proto#L51)",
"enum": [
"36"
]
},
"TeamInfoMessageType": {
"type": "string",
"description": "Logistics system routing type, aka MT_SNAPSHOTS_CMD_EXP, defined in [data/ISG_Shared/Protobuf/MessageFrame/MessageFrame.proto](https://github.deere.com/data/ISG_Shared/blob/4cb706fc28a4fa6ea0a1c79011c7bc8d56891794/Protobuf/MessageFrame/MessageFrame.proto#L184)",
"enum": [
"431"
]
},
"JoinType": {
"type": "string",
"description": "Whether the Display joined the team on automatic or manual mode",
"enum": [
"AutoJoin",
"ManualJoin"
]
},
"TeamingResult": {
"type": "object",
"oneOf": [
{
"$ref": "#/components/schemas/AlreadyTeamed"
},
{
"$ref": "#/components/schemas/CreatedNewTeam"
},
{
"$ref": "#/components/schemas/JoinedExistingTeam"
}
]
},
"AlreadyTeamed": {
"type": "object",
"required": [
"teamingActivity",
"teamingResult"
],
"description": "When Display is already a part of team",
"properties": {
"teamingResult": {
"type": "string",
"default": "AlreadyTeamed"
},
"teamingActivity": {
"$ref": "#/components/schemas/TeamingActivity"
}
}
},
"JoinedExistingTeam": {
"type": "object",
"required": [
"teamingActivity",
"teamingResult"
],
"description": "When Display Joins an existing team",
"properties": {
"teamingActivity": {
"$ref": "#/components/schemas/TeamingActivity"
},
"teamingResult": {
"type": "string",
"default": "JoinedExistingTeam"
}
}
},
"TeamingActivity": {
"type": "string",
"enum": [
"Active",
"RecentlyActive",
"Old"
]
},
"CreatedNewTeam": {
"type": "object",
"required": [
"teamingResult"
],
"description": "When Display creates a new team",
"properties": {
"teamingResult": {
"type": "string",
"default": "CreatedNewTeam"
}
}
},
"DisplayMetadata": {
"description": "Display Metadata",
"required": [
"orgId",
"sourceSerialNumber",
"cff",
"displaySoftwareVersion"
],
"type": "object",
"properties": {
"orgId": {
"type": "integer",
"format": "int64"
},
"sourceSerialNumber": {
"type": "string",
"description": "Source serial number of the display which indicates the source of the changes"
},
"cff": {
"type": "object",
"properties": {
"client": {
"type": "string"
},
"farm": {
"type": "string"
},
"field": {
"type": "string"
}
},
"description": "Display Client Farm Field value"
},
"displaySoftwareVersion": {
"type": "string",
"description": "Software version of the source display"
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment