Skip to content

Commit 4a8518f

Browse files
committed
wip
1 parent 42ba087 commit 4a8518f

File tree

26 files changed

+672
-146
lines changed

26 files changed

+672
-146
lines changed

docs/api/README.md

Lines changed: 122 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,14 @@ Accept: application/json
341341
".pattern": "^[0-9]{16}$"
342342
}
343343
}
344-
}
344+
},
345+
"transactions": [
346+
{
347+
"id": "string",
348+
"description": "string",
349+
"script": "string"
350+
}
351+
]
345352
}
346353
```
347354

@@ -415,7 +422,14 @@ Accept: application/json
415422
".pattern": "^[0-9]{16}$"
416423
}
417424
}
418-
}
425+
},
426+
"transactions": [
427+
{
428+
"id": "string",
429+
"description": "string",
430+
"script": "string"
431+
}
432+
]
419433
}
420434
}
421435
}
@@ -484,7 +498,14 @@ Accept: application/json
484498
".pattern": "^[0-9]{16}$"
485499
}
486500
}
487-
}
501+
},
502+
"transactions": [
503+
{
504+
"id": "string",
505+
"description": "string",
506+
"script": "string"
507+
}
508+
]
488509
}
489510
}
490511
],
@@ -698,6 +719,7 @@ Accept: application/json
698719
}
699720
],
700721
"script": {
722+
"template": "CUSTOMER_DEPOSIT",
701723
"plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n",
702724
"vars": {
703725
"user": "users:042"
@@ -1532,6 +1554,7 @@ Idempotency-Key: string
15321554
}
15331555
],
15341556
"script": {
1557+
"template": "CUSTOMER_DEPOSIT",
15351558
"plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n",
15361559
"vars": {
15371560
"user": "users:042"
@@ -3942,6 +3965,7 @@ This operation does not require authentication
39423965
}
39433966
],
39443967
"script": {
3968+
"template": "CUSTOMER_DEPOSIT",
39453969
"plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n",
39463970
"vars": {
39473971
"user": "users:042"
@@ -3972,6 +3996,7 @@ This operation does not require authentication
39723996
|timestamp|string(date-time)|false|none|none|
39733997
|postings|[[V2Posting](#schemav2posting)]|false|none|none|
39743998
|script|object|false|none|none|
3999+
|» template|string|false|none|none|
39754000
|» plain|string|true|none|none|
39764001
|» vars|object|false|none|none|
39774002
|»» **additionalProperties**|string|false|none|none|
@@ -4674,6 +4699,7 @@ This operation does not require authentication
46744699
}
46754700
],
46764701
"script": {
4702+
"template": "CUSTOMER_DEPOSIT",
46774703
"plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n",
46784704
"vars": {
46794705
"user": "users:042"
@@ -4749,6 +4775,7 @@ This operation does not require authentication
47494775
}
47504776
],
47514777
"script": {
4778+
"template": "CUSTOMER_DEPOSIT",
47524779
"plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n",
47534780
"vars": {
47544781
"user": "users:042"
@@ -4821,6 +4848,7 @@ xor
48214848
}
48224849
],
48234850
"script": {
4851+
"template": "CUSTOMER_DEPOSIT",
48244852
"plain": "vars {\naccount $user\n}\nsend [COIN 10] (\n\tsource = @world\n\tdestination = $user\n)\n",
48254853
"vars": {
48264854
"user": "users:042"
@@ -5693,6 +5721,56 @@ Chart of account
56935721
|---|---|---|---|---|
56945722
|**additionalProperties**|[V2ChartSegment](#schemav2chartsegment)|false|none|Segment within a chart of account|
56955723

5724+
<h2 id="tocS_V2TransactionTemplate">V2TransactionTemplate</h2>
5725+
<!-- backwards compatibility -->
5726+
<a id="schemav2transactiontemplate"></a>
5727+
<a id="schema_V2TransactionTemplate"></a>
5728+
<a id="tocSv2transactiontemplate"></a>
5729+
<a id="tocsv2transactiontemplate"></a>
5730+
5731+
```json
5732+
{
5733+
"id": "string",
5734+
"description": "string",
5735+
"script": "string"
5736+
}
5737+
5738+
```
5739+
5740+
### Properties
5741+
5742+
|Name|Type|Required|Restrictions|Description|
5743+
|---|---|---|---|---|
5744+
|id|string|false|none|none|
5745+
|description|string|false|none|none|
5746+
|script|string|false|none|none|
5747+
5748+
<h2 id="tocS_V2TransactionTemplates">V2TransactionTemplates</h2>
5749+
<!-- backwards compatibility -->
5750+
<a id="schemav2transactiontemplates"></a>
5751+
<a id="schema_V2TransactionTemplates"></a>
5752+
<a id="tocSv2transactiontemplates"></a>
5753+
<a id="tocsv2transactiontemplates"></a>
5754+
5755+
```json
5756+
[
5757+
{
5758+
"id": "string",
5759+
"description": "string",
5760+
"script": "string"
5761+
}
5762+
]
5763+
5764+
```
5765+
5766+
Transaction templates
5767+
5768+
### Properties
5769+
5770+
|Name|Type|Required|Restrictions|Description|
5771+
|---|---|---|---|---|
5772+
|*anonymous*|[[V2TransactionTemplate](#schemav2transactiontemplate)]|false|none|Transaction templates|
5773+
56965774
<h2 id="tocS_V2SchemaData">V2SchemaData</h2>
56975775
<!-- backwards compatibility -->
56985776
<a id="schemav2schemadata"></a>
@@ -5708,7 +5786,14 @@ Chart of account
57085786
".pattern": "^[0-9]{16}$"
57095787
}
57105788
}
5711-
}
5789+
},
5790+
"transactions": [
5791+
{
5792+
"id": "string",
5793+
"description": "string",
5794+
"script": "string"
5795+
}
5796+
]
57125797
}
57135798

57145799
```
@@ -5720,6 +5805,7 @@ Schema data structure for ledger schemas
57205805
|Name|Type|Required|Restrictions|Description|
57215806
|---|---|---|---|---|
57225807
|chart|[V2ChartOfAccounts](#schemav2chartofaccounts)|true|none|Chart of account|
5808+
|transactions|[V2TransactionTemplates](#schemav2transactiontemplates)|false|none|Transaction templates|
57235809

57245810
<h2 id="tocS_V2Schema">V2Schema</h2>
57255811
<!-- backwards compatibility -->
@@ -5739,7 +5825,14 @@ Schema data structure for ledger schemas
57395825
".pattern": "^[0-9]{16}$"
57405826
}
57415827
}
5742-
}
5828+
},
5829+
"transactions": [
5830+
{
5831+
"id": "string",
5832+
"description": "string",
5833+
"script": "string"
5834+
}
5835+
]
57435836
}
57445837
}
57455838

@@ -5774,7 +5867,14 @@ Complete schema structure with metadata
57745867
".pattern": "^[0-9]{16}$"
57755868
}
57765869
}
5777-
}
5870+
},
5871+
"transactions": [
5872+
{
5873+
"id": "string",
5874+
"description": "string",
5875+
"script": "string"
5876+
}
5877+
]
57785878
}
57795879
}
57805880
}
@@ -5808,7 +5908,14 @@ Complete schema structure with metadata
58085908
".pattern": "^[0-9]{16}$"
58095909
}
58105910
}
5811-
}
5911+
},
5912+
"transactions": [
5913+
{
5914+
"id": "string",
5915+
"description": "string",
5916+
"script": "string"
5917+
}
5918+
]
58125919
}
58135920
}
58145921
],
@@ -5846,7 +5953,14 @@ Complete schema structure with metadata
58465953
".pattern": "^[0-9]{16}$"
58475954
}
58485955
}
5849-
}
5956+
},
5957+
"transactions": [
5958+
{
5959+
"id": "string",
5960+
"description": "string",
5961+
"script": "string"
5962+
}
5963+
]
58505964
}
58515965
}
58525966
],

docs/events/UpdatedSchema.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@
101101
"chart": {
102102
"$ref": "#/$defs/ChartOfAccounts"
103103
},
104+
"transactions": {
105+
"$ref": "#/$defs/TransactionTemplates"
106+
},
104107
"version": {
105108
"type": "string"
106109
},
@@ -112,6 +115,7 @@
112115
"type": "object",
113116
"required": [
114117
"chart",
118+
"transactions",
115119
"version",
116120
"createdAt"
117121
]
@@ -121,6 +125,32 @@
121125
"format": "date-time",
122126
"title": "Normalized date"
123127
},
128+
"TransactionTemplate": {
129+
"properties": {
130+
"Description": {
131+
"type": "string"
132+
},
133+
"Script": {
134+
"type": "string"
135+
},
136+
"Runtime": {
137+
"type": "string"
138+
}
139+
},
140+
"additionalProperties": false,
141+
"type": "object",
142+
"required": [
143+
"Description",
144+
"Script",
145+
"Runtime"
146+
]
147+
},
148+
"TransactionTemplates": {
149+
"additionalProperties": {
150+
"$ref": "#/$defs/TransactionTemplate"
151+
},
152+
"type": "object"
153+
},
124154
"UpdatedSchema": {
125155
"properties": {
126156
"ledger": {

0 commit comments

Comments
 (0)