FDC3
FDC3 copied to clipboard
Trade, Order, Product and RFQ context types
Describe your change
@mistryvinay here is a first pass at a PR to fulfill the context issues you've raised. Its a draft as it needs attention from an expert in order types/modelling or to be rethought based on the use of the Common Domain Model (CDM) to define the product. I don't propose to complete this PR myself, but thought creating a draft might help get the call rolling... @kriswest
Extends the order, trade and product types to support a notes field. Extends the product context type to have a type field Extends the product context type to be able to describe a wider range of order types Creates an RFQ type that wraps a product.
Preview links:
- Product: https://deploy-preview-1503--fdc3.netlify.app/docs/next/context/ref/Product (schema)
- Order: https://deploy-preview-1503--fdc3.netlify.app/docs/next/context/ref/Order (schema)
- Trade: https://deploy-preview-1503--fdc3.netlify.app/docs/next/context/ref/Trade (schema)
- RFQ: https://deploy-preview-1503--fdc3.netlify.app/docs/next/context/ref/RFQ (schema)
Related Issue
resolves: #1373 resolves #1374 resolves #1461
Contributor License Agreement
- [x] I acknowledge that a contributor license agreement is required and that I have one in place or will seek to put one in place ASAP.
Review Checklist
- [x] Issue: If a change was made to the FDC3 Standard, was an issue linked above?
- [ ] CHANGELOG: Is a CHANGELOG.md entry included?
- [ ] API changes: Does this PR include changes to any of the FDC3 APIs (
DesktopAgent,Channel,PrivateChannel,Listener,Bridging)?- [ ] Docs & Sources: If yes, were both documentation (/docs) and sources updated?
JSDoc comments on interfaces and types should be matched to the main documentation in /docs - [ ] Conformance tests: If yes, are conformance test definitions (/toolbox/fdc3-conformance) still correct and complete?
Conformance test definitions should cover all required aspects of an FDC3 Desktop Agent implementation, which are usually marked with a MUST keyword, and optional features (SHOULD or MAY) where the format of those features is defined - [ ] Schemas: If yes, were changes applied to the Bridging and FDC3 for Web protocol schemas?
The Web Connection protocol and Desktop Agent Communication Protocol schemas must be able to support all necessary aspects of the Desktop Agent API, while Bridging must support those aspects necessary for Desktop Agents to communicate with each other- [ ] If yes, was code generation (
npm run build) run and the results checked in?
Generated code will be found at/src/api/BrowserTypes.tsand/or/src/bridging/BridgingTypes.ts
- [ ] If yes, was code generation (
- [ ] Docs & Sources: If yes, were both documentation (/docs) and sources updated?
- [x] Context types: Were new Context type schemas created or modified in this PR?
- [ ] Were the field type conventions adhered to?
- [ ] Was the
BaseContextschema applied viaallOf(as it is in existing types)? - [ ] Was a
titleanddescriptionprovided for all properties defined in the schema? - [ ] Was at least one example provided?
- [ ] Was code generation (
npm run build) run and the results checked in?
Generated code will be found at/src/context/ContextTypes.ts
- [ ] Intents: Were new Intents created in this PR?
- [ ] Were the intent name prefixes and other naming conventions & characteristics adhered to?
- [ ] Was the new intent added to the list in the Intents Overview?
Deploy Preview for fdc3 ready!
| Name | Link |
|---|---|
| Latest commit | 7a113d399e1c8d796db096188ea039344bea3c7f |
| Latest deploy log | https://app.netlify.com/sites/fdc3/deploys/679bc01cbdd56800084c2c2f |
| Deploy Preview | https://deploy-preview-1503--fdc3.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Coverage Report
Commit: 7a113d3 Base: main@003faaa
| Type | Base | This PR |
|---|---|---|
| Total Statements Coverage | ||
| Total Branches Coverage | ||
| Total Functions Coverage | ||
| Total Lines Coverage |
Details (changed files)
| File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|
| packages/fdc3-agent-proxy/src/DesktopAgentProxy.ts | ||||
| packages/fdc3-agent-proxy/src/index.ts | ||||
| packages/fdc3-agent-proxy/src/apps/DefaultAppSupport.ts | ||||
| packages/fdc3-agent-proxy/src/channels/DefaultChannel.ts | ||||
| packages/fdc3-agent-proxy/src/channels/DefaultChannelSupport.ts | ||||
| packages/fdc3-agent-proxy/src/channels/DefaultPrivateChannel.ts | ||||
| packages/fdc3-agent-proxy/src/heartbeat/DefaultHeartbeatSupport.ts | ||||
| packages/fdc3-agent-proxy/src/intents/DefaultIntentResolution.ts | ||||
| packages/fdc3-agent-proxy/src/intents/DefaultIntentSupport.ts | ||||
| packages/fdc3-agent-proxy/src/listeners/AbstractListener.ts | ||||
| packages/fdc3-agent-proxy/src/listeners/DefaultContextListener.ts | ||||
| packages/fdc3-agent-proxy/src/listeners/DefaultIntentListener.ts | ||||
| packages/fdc3-agent-proxy/src/listeners/EventListener.ts | ||||
| packages/fdc3-agent-proxy/src/listeners/HeartbeatListener.ts | ||||
| packages/fdc3-agent-proxy/src/listeners/PrivateChannelEventListener.ts | ||||
| packages/fdc3-agent-proxy/src/messaging/AbstractMessaging.ts | ||||
| packages/fdc3-agent-proxy/src/util/AbstractFDC3Logger.ts | ||||
| packages/fdc3-agent-proxy/src/util/Logger.ts | ||||
| packages/fdc3-agent-proxy/src/util/throwIfUndefined.ts | ||||
| packages/fdc3-get-agent/src/index.ts | ||||
| packages/fdc3-get-agent/src/messaging/MessagePortMessaging.ts | ||||
| packages/fdc3-get-agent/src/messaging/message-port.ts | ||||
| packages/fdc3-get-agent/src/sessionStorage/DesktopAgentDetails.ts | ||||
| packages/fdc3-get-agent/src/strategies/DesktopAgentPreloadLoader.ts | ||||
| packages/fdc3-get-agent/src/strategies/FailoverHandler.ts | ||||
| packages/fdc3-get-agent/src/strategies/HelloHandler.ts | ||||
| packages/fdc3-get-agent/src/strategies/IdentityValidationHandler.ts | ||||
| packages/fdc3-get-agent/src/strategies/PostMessageLoader.ts | ||||
| packages/fdc3-get-agent/src/strategies/Timeouts.ts | ||||
| packages/fdc3-get-agent/src/strategies/getAgent.ts | ||||
| packages/fdc3-get-agent/src/ui/AbstractUIComponent.ts | ||||
| packages/fdc3-get-agent/src/ui/DefaultDesktopAgentChannelSelector.ts | ||||
| packages/fdc3-get-agent/src/ui/DefaultDesktopAgentIntentResolver.ts | ||||
| packages/fdc3-get-agent/src/ui/NullChannelSelector.ts | ||||
| packages/fdc3-get-agent/src/ui/NullIntentResolver.ts | ||||
| packages/fdc3-get-agent/src/util/Logger.ts | ||||
| packages/fdc3-get-agent/src/util/Uuid.ts | ||||
| packages/fdc3-standard/src/index.ts | ||||
| packages/fdc3-standard/src/api/Errors.ts | ||||
| packages/fdc3-standard/src/api/GetAgent.ts | ||||
| packages/fdc3-standard/src/api/Methods.ts | ||||
| packages/fdc3-standard/src/api/RecommendedChannels.ts | ||||
| packages/fdc3-standard/src/context/ContextType.ts | ||||
| packages/fdc3-standard/src/intents/Intents.ts | ||||
| packages/fdc3-standard/src/internal/contextConfiguration.ts | ||||
| packages/fdc3-standard/src/internal/intentConfiguration.ts | ||||
| packages/fdc3-standard/src/internal/typeHelpers.ts | ||||
| toolbox/fdc3-for-web/fdc3-web-impl/src/BasicFDC3Server.ts | ||||
| toolbox/fdc3-for-web/fdc3-web-impl/src/ServerContext.ts | ||||
| toolbox/fdc3-for-web/fdc3-web-impl/src/directory/BasicDirectory.ts | ||||
| toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/BroadcastHandler.ts | ||||
| toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/HeartbeatHandler.ts | ||||
| toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/IntentHandler.ts | ||||
| toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/OpenHandler.ts | ||||
| toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/support.ts |
Details (all files)
| File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|
| packages/fdc3-agent-proxy/src/DesktopAgentProxy.ts | ||||
| packages/fdc3-agent-proxy/src/index.ts | ||||
| packages/fdc3-agent-proxy/src/apps/DefaultAppSupport.ts | ||||
| packages/fdc3-agent-proxy/src/channels/DefaultChannel.ts | ||||
| packages/fdc3-agent-proxy/src/channels/DefaultChannelSupport.ts | ||||
| packages/fdc3-agent-proxy/src/channels/DefaultPrivateChannel.ts | ||||
| packages/fdc3-agent-proxy/src/heartbeat/DefaultHeartbeatSupport.ts | ||||
| packages/fdc3-agent-proxy/src/intents/DefaultIntentResolution.ts | ||||
| packages/fdc3-agent-proxy/src/intents/DefaultIntentSupport.ts | ||||
| packages/fdc3-agent-proxy/src/listeners/AbstractListener.ts | ||||
| packages/fdc3-agent-proxy/src/listeners/DefaultContextListener.ts | ||||
| packages/fdc3-agent-proxy/src/listeners/DefaultIntentListener.ts | ||||
| packages/fdc3-agent-proxy/src/listeners/EventListener.ts | ||||
| packages/fdc3-agent-proxy/src/listeners/HeartbeatListener.ts | ||||
| packages/fdc3-agent-proxy/src/listeners/PrivateChannelEventListener.ts | ||||
| packages/fdc3-agent-proxy/src/messaging/AbstractMessaging.ts | ||||
| packages/fdc3-agent-proxy/src/util/AbstractFDC3Logger.ts | ||||
| packages/fdc3-agent-proxy/src/util/Logger.ts | ||||
| packages/fdc3-agent-proxy/src/util/throwIfUndefined.ts | ||||
| packages/fdc3-get-agent/src/index.ts | ||||
| packages/fdc3-get-agent/src/messaging/MessagePortMessaging.ts | ||||
| packages/fdc3-get-agent/src/messaging/message-port.ts | ||||
| packages/fdc3-get-agent/src/sessionStorage/DesktopAgentDetails.ts | ||||
| packages/fdc3-get-agent/src/strategies/DesktopAgentPreloadLoader.ts | ||||
| packages/fdc3-get-agent/src/strategies/FailoverHandler.ts | ||||
| packages/fdc3-get-agent/src/strategies/HelloHandler.ts | ||||
| packages/fdc3-get-agent/src/strategies/IdentityValidationHandler.ts | ||||
| packages/fdc3-get-agent/src/strategies/PostMessageLoader.ts | ||||
| packages/fdc3-get-agent/src/strategies/Timeouts.ts | ||||
| packages/fdc3-get-agent/src/strategies/getAgent.ts | ||||
| packages/fdc3-get-agent/src/ui/AbstractUIComponent.ts | ||||
| packages/fdc3-get-agent/src/ui/DefaultDesktopAgentChannelSelector.ts | ||||
| packages/fdc3-get-agent/src/ui/DefaultDesktopAgentIntentResolver.ts | ||||
| packages/fdc3-get-agent/src/ui/NullChannelSelector.ts | ||||
| packages/fdc3-get-agent/src/ui/NullIntentResolver.ts | ||||
| packages/fdc3-get-agent/src/util/Logger.ts | ||||
| packages/fdc3-get-agent/src/util/Uuid.ts | ||||
| packages/fdc3-standard/src/index.ts | ||||
| packages/fdc3-standard/src/api/Errors.ts | ||||
| packages/fdc3-standard/src/api/GetAgent.ts | ||||
| packages/fdc3-standard/src/api/Methods.ts | ||||
| packages/fdc3-standard/src/api/RecommendedChannels.ts | ||||
| packages/fdc3-standard/src/context/ContextType.ts | ||||
| packages/fdc3-standard/src/intents/Intents.ts | ||||
| packages/fdc3-standard/src/internal/contextConfiguration.ts | ||||
| packages/fdc3-standard/src/internal/intentConfiguration.ts | ||||
| packages/fdc3-standard/src/internal/typeHelpers.ts | ||||
| toolbox/fdc3-for-web/fdc3-web-impl/src/BasicFDC3Server.ts | ||||
| toolbox/fdc3-for-web/fdc3-web-impl/src/ServerContext.ts | ||||
| toolbox/fdc3-for-web/fdc3-web-impl/src/directory/BasicDirectory.ts | ||||
| toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/BroadcastHandler.ts | ||||
| toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/HeartbeatHandler.ts | ||||
| toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/IntentHandler.ts | ||||
| toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/OpenHandler.ts | ||||
| toolbox/fdc3-for-web/fdc3-web-impl/src/handlers/support.ts |
@VedPrakashJha-FMR @nemery @dominicgifford Perhaps you could contribute your expertise to this. I can't help much with the field definitions (I've done my best to figure them out from Vinay's example) but I can facilitate on schema definition etc.
Product is where we most need input, where need to be able model all possible product types:
- Product: https://deploy-preview-1503--fdc3.netlify.app/docs/next/context/ref/Product (schema).
@VedPrakashJha-FMR @nemery @dominicgifford Perhaps you could contribute your expertise to this. I can't help much with the field definitions (I've done my best to figure them out from Vinay's example) but I can facilitate on schema definition etc.
Product is where we most need input, where need to be able model all possible product types:
- Product: https://deploy-preview-1503--fdc3.netlify.app/docs/next/context/ref/Product (schema).
I'm not sure I am up-to-date with current discussions on this area but we've previously discussed trade-offs between simplicity, which potentially aids adoption, and complexity (sometimes provided by prior art), which potentially provides better coverage.
As noted above, the Common Domain Model under FINOS already has a schema for product: https://cdm.finos.org/docs/product-model
Is there a reason why FDC3 couldn't adopt this?
Additionally, I would question if an RFQ should be a wrapper around a product or a proposed transaction (Order). For example, if I am trading an EFP such as sell ETF/buy Future, I would want quotes for the entire transaction, not just one of the products. Equity Program Trades and Bond Portfolio Trades would be similar since they contain multiple products.
Is there a reason why FDC3 couldn't adopt this?
We've been talking a bit about this in @mistryvinay's Workflows meeting - I think it's the only sane way to go to avoid duplicating work