Skip to content

Commit f3fdf32

Browse files
author
rtkay123
committed
Merge remote-tracking branch 'origin/dev' into get-entity-conditions
2 parents b52ed21 + ab533b0 commit f3fdf32

17 files changed

+721
-253
lines changed

.npmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# SPDX-License-Identifier: Apache-2.0
2-
@frmscoe:registry=https://npm.pkg.github.com
2+
@tazama-lf:registry=https://npm.pkg.github.com
33
//npm.pkg.github.com/:_authToken=${GH_TOKEN}

README.md

+84-17
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,45 @@ GET
8787
#### Headers
8888
No specific headers required apart from standard authentication headers if needed.
8989
90-
### 2. `/v1/admin/event-flow-control/entity`
90+
### Request Example
91+
```http
92+
GET /v1/admin/reports/getreportbymsgid?msgid=1234567890 HTTP/1.1
93+
```
94+
95+
#### Response
96+
97+
- **Status 400 Bad Request:** When `msgid` is missing or invalid.
98+
```json
99+
{
100+
"statusCode": 400,
101+
"code": "FST_ERR_VALIDATION",
102+
"error": "Bad Request",
103+
"message": "querystring must have required property 'msgid'"
104+
}
105+
```
106+
107+
- **Status 204 Not Found:** When no report is found for the given `msgid`.
108+
```json
109+
{
110+
"statusCode": 204,
111+
}
112+
```
113+
114+
- **Status 500 Internal Server Error:** For server-side errors.
115+
```json
116+
{
117+
"status": "error",
118+
"message": "Internal server error occurred."
119+
}
120+
```
121+
122+
123+
### 2.
124+
##### a. `/v1/admin/event-flow-control/entity`
125+
##### b. `/v1/admin/event-flow-control/account`
91126

92127
#### Description
93-
This endpoint stores entity conditions and condition edges in ArangoDB as well as in an in-memory data storage system.
128+
Both endpoints are responsible for storing conditions related to their specific accounts or entities and are expected to store condition edges within the in-memory system.
94129

95130
#### Flow Diagram
96131
```mermaid
@@ -108,16 +143,24 @@ sequenceDiagram
108143
tmsapi->>clientsystem: writeOK(recordId)
109144
```
110145

111-
#### URL
146+
#### URL 1
112147
```
113148
/v1/admin/event-flow-control/entity
114149
```
115-
116-
#### Method
150+
#### Method 1
117151
```
118152
POST
119153
```
120154

155+
#### URL 2
156+
```
157+
/v1/admin/event-flow-control/account
158+
```
159+
#### Method 2
160+
```
161+
POST
162+
```
163+
**Both endpoints share all properties except for ntty and acct. These properties are specific to each endpoint and indicate the governing condition**
121164
#### Body
122165

123166
| Parameter | Type | Required | Description |
@@ -130,14 +173,21 @@ POST
130173
| `condRsn` | String | Yes | Reason code. |
131174
| `forceCret` | Boolean | Yes | Flag indicating whether the entity should be created if it does not exist. |
132175
| `usr` | String | Yes | User that triggered the operation. |
176+
#### URL 1
177+
| Parameter | Type | Required | Description |
178+
|-----------|--------|----------|---------------------------------|
133179
| `ntty` | Object | Yes | The entity object that the condition is governed by. |
180+
#### URL 2
181+
| Parameter | Type | Required | Description |
182+
|-----------|--------|----------|---------------------------------|
183+
| `acct` | Object | Yes | The account object that the condition is governed by. |
134184

135185
Possible values for some fields mention in the table above
136186
1. **evtTp** : [`'pacs.008.01.10'`,`'pacs.002.01.11'`,`'pain.001.001.11'`,`'pain.013.001.09'`]
137187
2. **condTp** : `non-overridable-block` or `override` or `overridable-block`
138188
3. **prsptv** : `both` or `creditor` or `debtor`
139189

140-
**ntty object type**
190+
**ntty object for :** `URL 1`
141191
```JSON
142192
{
143193
"id": "string",
@@ -147,30 +197,48 @@ Possible values for some fields mention in the table above
147197
}
148198
```
149199

200+
**acct object for :** `URL 2`
201+
```JSON
202+
{
203+
"id": "string",
204+
"schmeNm": {
205+
"prtry": "string"
206+
},
207+
"agt": {
208+
"finInstnId": {
209+
"clrSysMmbId": {
210+
"mmbId": "string"
211+
}
212+
}
213+
}
214+
}
215+
```
216+
150217
#### Headers
151-
No specific headers required apart from standard authentication headers if needed.
218+
No specific headers required for both endpoints.
219+
152220

153-
#### Request Example
154221
```http
155-
GET /v1/admin/reports/getreportbymsgid?msgid=1234567890 HTTP/1.1
222+
POST /v1/admin/event-flow-control/entity HTTP/1.1
156223
```
157224

158225
#### Response
159226

160-
- **Status 400 Bad Request:** When `msgid` is missing or invalid.
227+
- **Status 400 Bad Request:** When `prsptv` is missing or invalid.
161228
```json
162229
{
163230
"statusCode": 400,
164231
"code": "FST_ERR_VALIDATION",
165232
"error": "Bad Request",
166-
"message": "querystring must have required property 'msgid'"
233+
"message": "body must have required property 'prsptv'"
167234
}
168235
```
169236

170-
- **Status 204 Not Found:** When no report is found for the given `msgid`.
237+
- **Status 500 Not Found:** When account was not found in the database and forceCret was set to false
171238
```json
172239
{
173-
"statusCode": 204,
240+
"statusCode": 500,
241+
"message": "Error: account was not found and we could not create one because forceCret is set to false"
174242
}
175243
```
176244

@@ -182,20 +250,19 @@ GET /v1/admin/reports/getreportbymsgid?msgid=1234567890 HTTP/1.1
182250
}
183251
```
184252

185-
186253
```http
187-
POST /v1/admin/event-flow-control/entity HTTP/1.1
254+
POST /v1/admin/event-flow-control/account HTTP/1.1
188255
```
189256

190257
#### Response
191258

192-
- **Status 400 Bad Request:** When `prsptv` is missing or invalid.
259+
- **Status 400 Bad Request:** When `condTp` is missing or invalid.
193260
```json
194261
{
195262
"statusCode": 400,
196263
"code": "FST_ERR_VALIDATION",
197264
"error": "Bad Request",
198-
"message": "body must have required property 'prsptv'"
265+
"message": "body must have required property 'condTp'"
199266
}
200267
```
201268

0 commit comments

Comments
 (0)