Skip to content

Commit

Permalink
complete implementation of transaction result
Browse files Browse the repository at this point in the history
  • Loading branch information
milindchidrawar committed Jun 22, 2022
1 parent 2213c26 commit c05af21
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/context/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ The following are standard FDC3 context types:
- [`fdc3.position`](ref/Position) ([schema](/schemas/next/position.schema.json))
- [`fdc3.nothing`](ref/Nothing) ([schema](/schemas/next/nothing.schema.json))
- [`fdc3.timerange`](ref/TimeRange) ([schema](/schemas/next/timerange.schema.json))
- [`fdc3.transactionResult`](ref/TransactionResult) ([schema](/schemas/next/transactionresult.schema.json))
- [`fdc3.valuation`](ref/Valuation) ([schema](/schemas/next/valuation.schema.json))

__Note:__ The below examples show how the base context data interface can be used to define specific context data objects.
Expand Down
1 change: 1 addition & 0 deletions src/context/ContextType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export enum ContextTypes {
Position = 'fdc3.position',
Nothing = 'fdc3.nothing',
TimeRange = 'fdc3.timerange',
TransactionResult = 'fdc3.transactionResult',
Valuation = 'fdc3.valuation',
}

Expand Down
1 change: 1 addition & 0 deletions src/context/schemas.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"Position": ["https://fdc3.finos.org/schemas/next/position.schema.json"],
"Nothing": ["https://fdc3.finos.org/schemas/next/nothing.schema.json"],
"TimeRange": ["https://fdc3.finos.org/schemas/next/timerange.schema.json"],
"TransactionResult": ["https://fdc3.finos.org/schemas/next/transactionresult.schema.json"],
"Valuation": ["https://fdc3.finos.org/schemas/next/valuation.schema.json"]
}
23 changes: 23 additions & 0 deletions src/context/schemas/transactionresult.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://fdc3.finos.org/schemas/next/transactionresult.schema.json",
"type": "object",
"title": "TransactionResult",
"allOf": [{ "$ref": "context.schema.json#" }],
"properties": {
"type": { "const": "fdc3.transactionResult" },
"status": {
"anyOf": [
{
"type": "string",
"enum": ["Created", "Deleted", "Updated"]
},
{
"type": "string"
}
]
},
"context": { "$ref": "context.schema.json#" }
},
"required": ["status", "context"]
}
1 change: 1 addition & 0 deletions website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"context/ref/Portfolio",
"context/ref/Position",
"context/ref/TimeRange",
"context/ref/TransactionResult",
"context/ref/Valuation"
]
}
Expand Down

0 comments on commit c05af21

Please sign in to comment.