@@ -544,11 +544,6 @@ export interface OptionalFeatures {
544544 * feature is implemented by the Desktop Agent.
545545 */
546546 DesktopAgentBridging : boolean ;
547- /**
548- * Used to indicate whether the exposure of 'originating app metadata' for
549- * context and intent messages is supported by the Desktop Agent.
550- */
551- OriginatingAppMetadata : boolean ;
552547 /**
553548 * Used to indicate whether the optional `fdc3.joinUserChannel`,
554549 * `fdc3.getCurrentChannel` and `fdc3.leaveCurrentChannel` are implemented by
@@ -689,12 +684,10 @@ export interface AddContextListenerRequestMeta {
689684 * Field that represents the source application that the request being responded to was
690685 * received from, for debugging purposes.
691686 *
692- * Details of the application instance that broadcast the context.
687+ * Identifier for the app instance that sent the context and/or intent .
693688 *
694689 * The App resolution option chosen.
695690 *
696- * Details of the application instance that raised the intent.
697- *
698691 * Identifier for the app instance that was selected (or started) to resolve the intent.
699692 * `source.instanceId` MUST be set, indicating the specific app instance that
700693 * received the intent.
@@ -1192,10 +1185,7 @@ export interface BroadcastEventPayload {
11921185 * The context object that was broadcast.
11931186 */
11941187 context : Context ;
1195- /**
1196- * Details of the application instance that broadcast the context.
1197- */
1198- originatingApp ?: AppIdentifier ;
1188+ metadata : ContextMetadata ;
11991189}
12001190
12011191/**
@@ -1262,6 +1252,34 @@ export interface Context {
12621252 [ property : string ] : any ;
12631253}
12641254
1255+ /**
1256+ * Metadata relating to a broadcastEvent or intentEvent, which may include metadata provided
1257+ * by the Desktop Agent or the App that initiated the broadcast, raise intent or open
1258+ * request.
1259+ */
1260+ export interface ContextMetadata {
1261+ /**
1262+ * Custom metadata that can be used to provide additional information about the context or
1263+ * intent. This allows for individuals to use metadata fields that have yet to be
1264+ * standardized.
1265+ */
1266+ custom ?: { [ key : string ] : any } ;
1267+ /**
1268+ * Identifier for the app instance that sent the context and/or intent.
1269+ */
1270+ source : AppIdentifier ;
1271+ /**
1272+ * The timestamp when the context or intent was created, encoded according to [ISO
1273+ * 8601-1:2019](https://www.iso.org/standard/70907.html) with a timezone indicator.
1274+ */
1275+ timestamp : Date ;
1276+ /**
1277+ * A unique identifier for the context or intent that can be used to trace the context or
1278+ * intent through the system.
1279+ */
1280+ traceId : string ;
1281+ }
1282+
12651283/**
12661284 * Identifies the type of the message and it is typically set to the FDC3 function name that
12671285 * the message relates to, e.g. 'findIntent', with 'Response' appended.
@@ -1300,6 +1318,16 @@ export interface BroadcastRequestPayload {
13001318 * The context object that is to be broadcast.
13011319 */
13021320 context : Context ;
1321+ metadata : AppProvidableContextMetadata ;
1322+ }
1323+
1324+ /**
1325+ * Metadata that can be provided by an app as part of a broadcast, raise intent or open API
1326+ * call.
1327+ */
1328+ export interface AppProvidableContextMetadata {
1329+ custom ?: { [ key : string ] : any } ;
1330+ traceId ?: string ;
13031331}
13041332
13051333/**
@@ -3032,10 +3060,7 @@ export interface IntentEventPayload {
30323060 * The intent that was raised.
30333061 */
30343062 intent : string ;
3035- /**
3036- * Details of the application instance that raised the intent.
3037- */
3038- originatingApp ?: AppIdentifier ;
3063+ metadata : ContextMetadata ;
30393064 /**
30403065 * The requestUuid value of the raiseIntentRequest that the intentEvent being sent relates
30413066 * to.
@@ -3366,6 +3391,7 @@ export interface OpenRequestPayload {
33663391 * target app with no context and broadcasting the context directly to it.
33673392 */
33683393 context ?: Context ;
3394+ metadata : AppProvidableContextMetadata ;
33693395}
33703396
33713397/**
@@ -3804,6 +3830,7 @@ export interface RaiseIntentForContextRequest {
38043830export interface RaiseIntentForContextRequestPayload {
38053831 app ?: AppIdentifier ;
38063832 context : Context ;
3833+ metadata : AppProvidableContextMetadata ;
38073834}
38083835
38093836/**
@@ -3944,15 +3971,7 @@ export interface RaiseIntentRequestPayload {
39443971 app ?: AppIdentifier ;
39453972 context : Context ;
39463973 intent : string ;
3947- }
3948-
3949- /**
3950- * Metadata that can be provided by an app.
3951- */
3952- export interface AppProvidableContextMetadata {
3953- hostParams ?: { [ key : string ] : any } ;
3954- signature ?: string ;
3955- traceId ?: string ;
3974+ metadata : AppProvidableContextMetadata ;
39563975}
39573976
39583977/**
@@ -5070,7 +5089,6 @@ const typeMap: any = {
50705089 OptionalFeatures : o (
50715090 [
50725091 { json : 'DesktopAgentBridging' , js : 'DesktopAgentBridging' , typ : true } ,
5073- { json : 'OriginatingAppMetadata' , js : 'OriginatingAppMetadata' , typ : true } ,
50745092 { json : 'UserChannelMembershipAPIs' , js : 'UserChannelMembershipAPIs' , typ : true } ,
50755093 ] ,
50765094 false
@@ -5272,7 +5290,7 @@ const typeMap: any = {
52725290 [
52735291 { json : 'channelId' , js : 'channelId' , typ : u ( null , '' ) } ,
52745292 { json : 'context' , js : 'context' , typ : r ( 'Context' ) } ,
5275- { json : 'originatingApp ' , js : 'originatingApp ' , typ : u ( undefined , r ( 'AppIdentifier' ) ) } ,
5293+ { json : 'metadata ' , js : 'metadata ' , typ : r ( 'ContextMetadata' ) } ,
52765294 ] ,
52775295 false
52785296 ) ,
@@ -5284,6 +5302,15 @@ const typeMap: any = {
52845302 ] ,
52855303 'any'
52865304 ) ,
5305+ ContextMetadata : o (
5306+ [
5307+ { json : 'custom' , js : 'custom' , typ : u ( undefined , m ( 'any' ) ) } ,
5308+ { json : 'source' , js : 'source' , typ : r ( 'AppIdentifier' ) } ,
5309+ { json : 'timestamp' , js : 'timestamp' , typ : Date } ,
5310+ { json : 'traceId' , js : 'traceId' , typ : '' } ,
5311+ ] ,
5312+ false
5313+ ) ,
52875314 BroadcastRequest : o (
52885315 [
52895316 { json : 'meta' , js : 'meta' , typ : r ( 'AddContextListenerRequestMeta' ) } ,
@@ -5296,6 +5323,14 @@ const typeMap: any = {
52965323 [
52975324 { json : 'channelId' , js : 'channelId' , typ : '' } ,
52985325 { json : 'context' , js : 'context' , typ : r ( 'Context' ) } ,
5326+ { json : 'metadata' , js : 'metadata' , typ : r ( 'AppProvidableContextMetadata' ) } ,
5327+ ] ,
5328+ false
5329+ ) ,
5330+ AppProvidableContextMetadata : o (
5331+ [
5332+ { json : 'custom' , js : 'custom' , typ : u ( undefined , m ( 'any' ) ) } ,
5333+ { json : 'traceId' , js : 'traceId' , typ : u ( undefined , '' ) } ,
52995334 ] ,
53005335 false
53015336 ) ,
@@ -5850,7 +5885,7 @@ const typeMap: any = {
58505885 [
58515886 { json : 'context' , js : 'context' , typ : r ( 'Context' ) } ,
58525887 { json : 'intent' , js : 'intent' , typ : '' } ,
5853- { json : 'originatingApp ' , js : 'originatingApp ' , typ : u ( undefined , r ( 'AppIdentifier' ) ) } ,
5888+ { json : 'metadata ' , js : 'metadata ' , typ : r ( 'ContextMetadata' ) } ,
58545889 { json : 'raiseIntentRequestUuid' , js : 'raiseIntentRequestUuid' , typ : '' } ,
58555890 ] ,
58565891 false
@@ -5951,6 +5986,7 @@ const typeMap: any = {
59515986 [
59525987 { json : 'app' , js : 'app' , typ : r ( 'AppIdentifier' ) } ,
59535988 { json : 'context' , js : 'context' , typ : u ( undefined , r ( 'Context' ) ) } ,
5989+ { json : 'metadata' , js : 'metadata' , typ : r ( 'AppProvidableContextMetadata' ) } ,
59545990 ] ,
59555991 false
59565992 ) ,
@@ -6091,6 +6127,7 @@ const typeMap: any = {
60916127 [
60926128 { json : 'app' , js : 'app' , typ : u ( undefined , r ( 'AppIdentifier' ) ) } ,
60936129 { json : 'context' , js : 'context' , typ : r ( 'Context' ) } ,
6130+ { json : 'metadata' , js : 'metadata' , typ : r ( 'AppProvidableContextMetadata' ) } ,
60946131 ] ,
60956132 false
60966133 ) ,
@@ -6130,14 +6167,7 @@ const typeMap: any = {
61306167 { json : 'app' , js : 'app' , typ : u ( undefined , r ( 'AppIdentifier' ) ) } ,
61316168 { json : 'context' , js : 'context' , typ : r ( 'Context' ) } ,
61326169 { json : 'intent' , js : 'intent' , typ : '' } ,
6133- ] ,
6134- false
6135- ) ,
6136- AppProvidableContextMetadata : o (
6137- [
6138- { json : 'hostParams' , js : 'hostParams' , typ : u ( undefined , m ( 'any' ) ) } ,
6139- { json : 'signature' , js : 'signature' , typ : u ( undefined , '' ) } ,
6140- { json : 'traceId' , js : 'traceId' , typ : u ( undefined , '' ) } ,
6170+ { json : 'metadata' , js : 'metadata' , typ : r ( 'AppProvidableContextMetadata' ) } ,
61416171 ] ,
61426172 false
61436173 ) ,
@@ -6426,6 +6456,7 @@ const typeMap: any = {
64266456 RaiseIntentResponseType : [ 'raiseIntentResponse' ] ,
64276457 RaiseIntentResultResponseType : [ 'raiseIntentResultResponse' ] ,
64286458} ;
6459+
64296460export type AppRequestMessage =
64306461 | AddContextListenerRequest
64316462 | AddEventListenerRequest
0 commit comments