@sulimenkoas/metaclient 26.5.1-lib
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -0
- package/dist/client.d.ts +10 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +18 -0
- package/dist/client.js.map +1 -0
- package/dist/generated/schema.d.ts +620 -0
- package/dist/generated/schema.d.ts.map +1 -0
- package/dist/generated/schema.js +6 -0
- package/dist/generated/schema.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/openapi/facade.openapi.json +1053 -0
- package/package.json +29 -0
|
@@ -0,0 +1,1053 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.3",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "MetaTerminal Facade API",
|
|
5
|
+
"version": "1.0.0-alpha.1",
|
|
6
|
+
"description": "Typed public facade over the current MetaTerminal runtime. The facade keeps a stable contract while the legacy impress API remains an internal implementation detail."
|
|
7
|
+
},
|
|
8
|
+
"components": {
|
|
9
|
+
"securitySchemes": {
|
|
10
|
+
"bearerAuth": {
|
|
11
|
+
"type": "http",
|
|
12
|
+
"scheme": "bearer",
|
|
13
|
+
"bearerFormat": "Token"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"schemas": {}
|
|
17
|
+
},
|
|
18
|
+
"paths": {
|
|
19
|
+
"/v1/healthz": {
|
|
20
|
+
"get": {
|
|
21
|
+
"summary": "Facade health check",
|
|
22
|
+
"tags": [
|
|
23
|
+
"System"
|
|
24
|
+
],
|
|
25
|
+
"description": "Simple health endpoint for the TypeScript facade service.",
|
|
26
|
+
"responses": {
|
|
27
|
+
"200": {
|
|
28
|
+
"description": "Default Response",
|
|
29
|
+
"content": {
|
|
30
|
+
"application/json": {
|
|
31
|
+
"schema": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"required": [
|
|
34
|
+
"data"
|
|
35
|
+
],
|
|
36
|
+
"properties": {
|
|
37
|
+
"data": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"required": [
|
|
40
|
+
"status",
|
|
41
|
+
"service",
|
|
42
|
+
"version"
|
|
43
|
+
],
|
|
44
|
+
"properties": {
|
|
45
|
+
"status": {
|
|
46
|
+
"description": "Health indicator",
|
|
47
|
+
"type": "string",
|
|
48
|
+
"enum": [
|
|
49
|
+
"ok"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"service": {
|
|
53
|
+
"description": "Service name",
|
|
54
|
+
"type": "string",
|
|
55
|
+
"enum": [
|
|
56
|
+
"facade"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"version": {
|
|
60
|
+
"description": "Public API version",
|
|
61
|
+
"type": "string"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"/v1/auth/sign-in": {
|
|
74
|
+
"post": {
|
|
75
|
+
"summary": "Authenticate user via the legacy backend and issue facade bearer token",
|
|
76
|
+
"tags": [
|
|
77
|
+
"Auth"
|
|
78
|
+
],
|
|
79
|
+
"description": "Validates user credentials against the legacy auth API, then returns a facade bearer token backed by the shared terminal_tokens session store.",
|
|
80
|
+
"requestBody": {
|
|
81
|
+
"required": true,
|
|
82
|
+
"content": {
|
|
83
|
+
"application/json": {
|
|
84
|
+
"schema": {
|
|
85
|
+
"description": "Credentials used to create a facade bearer token",
|
|
86
|
+
"type": "object",
|
|
87
|
+
"required": [
|
|
88
|
+
"login",
|
|
89
|
+
"password"
|
|
90
|
+
],
|
|
91
|
+
"properties": {
|
|
92
|
+
"login": {
|
|
93
|
+
"minLength": 1,
|
|
94
|
+
"description": "User login used by the legacy auth backend",
|
|
95
|
+
"type": "string",
|
|
96
|
+
"example": "demo@example.com"
|
|
97
|
+
},
|
|
98
|
+
"password": {
|
|
99
|
+
"minLength": 1,
|
|
100
|
+
"description": "Plain-text password for the user account",
|
|
101
|
+
"type": "string",
|
|
102
|
+
"example": "secret"
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"description": "Credentials used to create a facade bearer token"
|
|
109
|
+
},
|
|
110
|
+
"responses": {
|
|
111
|
+
"200": {
|
|
112
|
+
"description": "Successful authentication response",
|
|
113
|
+
"content": {
|
|
114
|
+
"application/json": {
|
|
115
|
+
"schema": {
|
|
116
|
+
"description": "Successful authentication response",
|
|
117
|
+
"type": "object",
|
|
118
|
+
"required": [
|
|
119
|
+
"data"
|
|
120
|
+
],
|
|
121
|
+
"properties": {
|
|
122
|
+
"data": {
|
|
123
|
+
"description": "Created facade session",
|
|
124
|
+
"type": "object",
|
|
125
|
+
"required": [
|
|
126
|
+
"accessToken",
|
|
127
|
+
"tokenType",
|
|
128
|
+
"user"
|
|
129
|
+
],
|
|
130
|
+
"properties": {
|
|
131
|
+
"accessToken": {
|
|
132
|
+
"description": "Facade bearer token backed by the shared session table",
|
|
133
|
+
"type": "string"
|
|
134
|
+
},
|
|
135
|
+
"tokenType": {
|
|
136
|
+
"description": "Authorization scheme for the access token",
|
|
137
|
+
"type": "string",
|
|
138
|
+
"enum": [
|
|
139
|
+
"Bearer"
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
"user": {
|
|
143
|
+
"description": "Normalized facade user",
|
|
144
|
+
"type": "object",
|
|
145
|
+
"required": [
|
|
146
|
+
"id",
|
|
147
|
+
"login",
|
|
148
|
+
"type"
|
|
149
|
+
],
|
|
150
|
+
"properties": {
|
|
151
|
+
"id": {
|
|
152
|
+
"description": "Internal user identifier from the shared session store",
|
|
153
|
+
"anyOf": [
|
|
154
|
+
{
|
|
155
|
+
"type": "integer"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"type": "string"
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
"login": {
|
|
163
|
+
"description": "Login of the authenticated user",
|
|
164
|
+
"type": "string"
|
|
165
|
+
},
|
|
166
|
+
"type": {
|
|
167
|
+
"description": "User type from the legacy auth model",
|
|
168
|
+
"anyOf": [
|
|
169
|
+
{
|
|
170
|
+
"type": "string"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"type": "null"
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"401": {
|
|
187
|
+
"description": "Default Response",
|
|
188
|
+
"content": {
|
|
189
|
+
"application/json": {
|
|
190
|
+
"schema": {
|
|
191
|
+
"type": "object",
|
|
192
|
+
"required": [
|
|
193
|
+
"error"
|
|
194
|
+
],
|
|
195
|
+
"properties": {
|
|
196
|
+
"error": {
|
|
197
|
+
"type": "object",
|
|
198
|
+
"required": [
|
|
199
|
+
"code",
|
|
200
|
+
"message"
|
|
201
|
+
],
|
|
202
|
+
"properties": {
|
|
203
|
+
"code": {
|
|
204
|
+
"description": "Stable machine-readable error code",
|
|
205
|
+
"type": "string"
|
|
206
|
+
},
|
|
207
|
+
"message": {
|
|
208
|
+
"description": "Human-readable error message",
|
|
209
|
+
"type": "string"
|
|
210
|
+
},
|
|
211
|
+
"details": {
|
|
212
|
+
"description": "Optional structured details from the facade or upstream systems",
|
|
213
|
+
"anyOf": [
|
|
214
|
+
{
|
|
215
|
+
"additionalProperties": true,
|
|
216
|
+
"type": "object",
|
|
217
|
+
"properties": {}
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"type": "array",
|
|
221
|
+
"items": {}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"type": "string"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"type": "null"
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"409": {
|
|
239
|
+
"description": "Default Response",
|
|
240
|
+
"content": {
|
|
241
|
+
"application/json": {
|
|
242
|
+
"schema": {
|
|
243
|
+
"type": "object",
|
|
244
|
+
"required": [
|
|
245
|
+
"error"
|
|
246
|
+
],
|
|
247
|
+
"properties": {
|
|
248
|
+
"error": {
|
|
249
|
+
"type": "object",
|
|
250
|
+
"required": [
|
|
251
|
+
"code",
|
|
252
|
+
"message"
|
|
253
|
+
],
|
|
254
|
+
"properties": {
|
|
255
|
+
"code": {
|
|
256
|
+
"description": "Stable machine-readable error code",
|
|
257
|
+
"type": "string"
|
|
258
|
+
},
|
|
259
|
+
"message": {
|
|
260
|
+
"description": "Human-readable error message",
|
|
261
|
+
"type": "string"
|
|
262
|
+
},
|
|
263
|
+
"details": {
|
|
264
|
+
"description": "Optional structured details from the facade or upstream systems",
|
|
265
|
+
"anyOf": [
|
|
266
|
+
{
|
|
267
|
+
"additionalProperties": true,
|
|
268
|
+
"type": "object",
|
|
269
|
+
"properties": {}
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"type": "array",
|
|
273
|
+
"items": {}
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"type": "string"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"type": "null"
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
"503": {
|
|
291
|
+
"description": "Default Response",
|
|
292
|
+
"content": {
|
|
293
|
+
"application/json": {
|
|
294
|
+
"schema": {
|
|
295
|
+
"type": "object",
|
|
296
|
+
"required": [
|
|
297
|
+
"error"
|
|
298
|
+
],
|
|
299
|
+
"properties": {
|
|
300
|
+
"error": {
|
|
301
|
+
"type": "object",
|
|
302
|
+
"required": [
|
|
303
|
+
"code",
|
|
304
|
+
"message"
|
|
305
|
+
],
|
|
306
|
+
"properties": {
|
|
307
|
+
"code": {
|
|
308
|
+
"description": "Stable machine-readable error code",
|
|
309
|
+
"type": "string"
|
|
310
|
+
},
|
|
311
|
+
"message": {
|
|
312
|
+
"description": "Human-readable error message",
|
|
313
|
+
"type": "string"
|
|
314
|
+
},
|
|
315
|
+
"details": {
|
|
316
|
+
"description": "Optional structured details from the facade or upstream systems",
|
|
317
|
+
"anyOf": [
|
|
318
|
+
{
|
|
319
|
+
"additionalProperties": true,
|
|
320
|
+
"type": "object",
|
|
321
|
+
"properties": {}
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"type": "array",
|
|
325
|
+
"items": {}
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"type": "string"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"type": "null"
|
|
332
|
+
}
|
|
333
|
+
]
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
"/v1/auth/sign-out": {
|
|
346
|
+
"post": {
|
|
347
|
+
"summary": "Delete the current facade token from the shared session store",
|
|
348
|
+
"tags": [
|
|
349
|
+
"Auth"
|
|
350
|
+
],
|
|
351
|
+
"description": "Deletes the current token from the shared session store and clears the facade cookie if it was present in the request.",
|
|
352
|
+
"responses": {
|
|
353
|
+
"200": {
|
|
354
|
+
"description": "Default Response",
|
|
355
|
+
"content": {
|
|
356
|
+
"application/json": {
|
|
357
|
+
"schema": {
|
|
358
|
+
"type": "object",
|
|
359
|
+
"required": [
|
|
360
|
+
"data"
|
|
361
|
+
],
|
|
362
|
+
"properties": {
|
|
363
|
+
"data": {
|
|
364
|
+
"type": "object",
|
|
365
|
+
"required": [
|
|
366
|
+
"ok"
|
|
367
|
+
],
|
|
368
|
+
"properties": {
|
|
369
|
+
"ok": {
|
|
370
|
+
"type": "boolean"
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
},
|
|
379
|
+
"401": {
|
|
380
|
+
"description": "Default Response",
|
|
381
|
+
"content": {
|
|
382
|
+
"application/json": {
|
|
383
|
+
"schema": {
|
|
384
|
+
"type": "object",
|
|
385
|
+
"required": [
|
|
386
|
+
"error"
|
|
387
|
+
],
|
|
388
|
+
"properties": {
|
|
389
|
+
"error": {
|
|
390
|
+
"type": "object",
|
|
391
|
+
"required": [
|
|
392
|
+
"code",
|
|
393
|
+
"message"
|
|
394
|
+
],
|
|
395
|
+
"properties": {
|
|
396
|
+
"code": {
|
|
397
|
+
"description": "Stable machine-readable error code",
|
|
398
|
+
"type": "string"
|
|
399
|
+
},
|
|
400
|
+
"message": {
|
|
401
|
+
"description": "Human-readable error message",
|
|
402
|
+
"type": "string"
|
|
403
|
+
},
|
|
404
|
+
"details": {
|
|
405
|
+
"description": "Optional structured details from the facade or upstream systems",
|
|
406
|
+
"anyOf": [
|
|
407
|
+
{
|
|
408
|
+
"additionalProperties": true,
|
|
409
|
+
"type": "object",
|
|
410
|
+
"properties": {}
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"type": "array",
|
|
414
|
+
"items": {}
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"type": "string"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"type": "null"
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
"/v1/me": {
|
|
435
|
+
"get": {
|
|
436
|
+
"summary": "Resolve current user from the shared session store",
|
|
437
|
+
"tags": [
|
|
438
|
+
"Auth"
|
|
439
|
+
],
|
|
440
|
+
"description": "Reads the current bearer token or token cookie, resolves the shared session from Postgres, and returns a normalized user object.",
|
|
441
|
+
"security": [
|
|
442
|
+
{
|
|
443
|
+
"bearerAuth": []
|
|
444
|
+
}
|
|
445
|
+
],
|
|
446
|
+
"responses": {
|
|
447
|
+
"200": {
|
|
448
|
+
"description": "Current authenticated user",
|
|
449
|
+
"content": {
|
|
450
|
+
"application/json": {
|
|
451
|
+
"schema": {
|
|
452
|
+
"description": "Current authenticated user",
|
|
453
|
+
"type": "object",
|
|
454
|
+
"required": [
|
|
455
|
+
"data"
|
|
456
|
+
],
|
|
457
|
+
"properties": {
|
|
458
|
+
"data": {
|
|
459
|
+
"description": "Normalized facade user",
|
|
460
|
+
"type": "object",
|
|
461
|
+
"required": [
|
|
462
|
+
"id",
|
|
463
|
+
"login",
|
|
464
|
+
"type"
|
|
465
|
+
],
|
|
466
|
+
"properties": {
|
|
467
|
+
"id": {
|
|
468
|
+
"description": "Internal user identifier from the shared session store",
|
|
469
|
+
"anyOf": [
|
|
470
|
+
{
|
|
471
|
+
"type": "integer"
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"type": "string"
|
|
475
|
+
}
|
|
476
|
+
]
|
|
477
|
+
},
|
|
478
|
+
"login": {
|
|
479
|
+
"description": "Login of the authenticated user",
|
|
480
|
+
"type": "string"
|
|
481
|
+
},
|
|
482
|
+
"type": {
|
|
483
|
+
"description": "User type from the legacy auth model",
|
|
484
|
+
"anyOf": [
|
|
485
|
+
{
|
|
486
|
+
"type": "string"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"type": "null"
|
|
490
|
+
}
|
|
491
|
+
]
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
"401": {
|
|
501
|
+
"description": "Default Response",
|
|
502
|
+
"content": {
|
|
503
|
+
"application/json": {
|
|
504
|
+
"schema": {
|
|
505
|
+
"type": "object",
|
|
506
|
+
"required": [
|
|
507
|
+
"error"
|
|
508
|
+
],
|
|
509
|
+
"properties": {
|
|
510
|
+
"error": {
|
|
511
|
+
"type": "object",
|
|
512
|
+
"required": [
|
|
513
|
+
"code",
|
|
514
|
+
"message"
|
|
515
|
+
],
|
|
516
|
+
"properties": {
|
|
517
|
+
"code": {
|
|
518
|
+
"description": "Stable machine-readable error code",
|
|
519
|
+
"type": "string"
|
|
520
|
+
},
|
|
521
|
+
"message": {
|
|
522
|
+
"description": "Human-readable error message",
|
|
523
|
+
"type": "string"
|
|
524
|
+
},
|
|
525
|
+
"details": {
|
|
526
|
+
"description": "Optional structured details from the facade or upstream systems",
|
|
527
|
+
"anyOf": [
|
|
528
|
+
{
|
|
529
|
+
"additionalProperties": true,
|
|
530
|
+
"type": "object",
|
|
531
|
+
"properties": {}
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
"type": "array",
|
|
535
|
+
"items": {}
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"type": "string"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"type": "null"
|
|
542
|
+
}
|
|
543
|
+
]
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
},
|
|
555
|
+
"/v1/": {
|
|
556
|
+
"get": {
|
|
557
|
+
"summary": "Describe the facade entrypoint",
|
|
558
|
+
"tags": [
|
|
559
|
+
"System"
|
|
560
|
+
],
|
|
561
|
+
"description": "Returns links to the generated OpenAPI document and Swagger UI for the current facade instance.",
|
|
562
|
+
"responses": {
|
|
563
|
+
"200": {
|
|
564
|
+
"description": "Default Response",
|
|
565
|
+
"content": {
|
|
566
|
+
"application/json": {
|
|
567
|
+
"schema": {
|
|
568
|
+
"type": "object",
|
|
569
|
+
"required": [
|
|
570
|
+
"data"
|
|
571
|
+
],
|
|
572
|
+
"properties": {
|
|
573
|
+
"data": {
|
|
574
|
+
"type": "object",
|
|
575
|
+
"required": [
|
|
576
|
+
"name",
|
|
577
|
+
"version",
|
|
578
|
+
"docsUrl",
|
|
579
|
+
"openapiUrl"
|
|
580
|
+
],
|
|
581
|
+
"properties": {
|
|
582
|
+
"name": {
|
|
583
|
+
"description": "Facade service name",
|
|
584
|
+
"type": "string",
|
|
585
|
+
"enum": [
|
|
586
|
+
"MetaTerminal Facade API"
|
|
587
|
+
]
|
|
588
|
+
},
|
|
589
|
+
"version": {
|
|
590
|
+
"description": "Public API version",
|
|
591
|
+
"type": "string",
|
|
592
|
+
"enum": [
|
|
593
|
+
"v1"
|
|
594
|
+
]
|
|
595
|
+
},
|
|
596
|
+
"docsUrl": {
|
|
597
|
+
"description": "Swagger UI URL",
|
|
598
|
+
"type": "string"
|
|
599
|
+
},
|
|
600
|
+
"openapiUrl": {
|
|
601
|
+
"description": "Generated OpenAPI JSON URL",
|
|
602
|
+
"type": "string"
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
},
|
|
614
|
+
"/v1/accounts": {
|
|
615
|
+
"get": {
|
|
616
|
+
"summary": "List accounts from ptfin for the current user",
|
|
617
|
+
"tags": [
|
|
618
|
+
"Accounts"
|
|
619
|
+
],
|
|
620
|
+
"description": "Uses the authenticated facade session to resolve the current user and fetches account data from the ptfin upstream, then normalizes the result.",
|
|
621
|
+
"security": [
|
|
622
|
+
{
|
|
623
|
+
"bearerAuth": []
|
|
624
|
+
}
|
|
625
|
+
],
|
|
626
|
+
"responses": {
|
|
627
|
+
"200": {
|
|
628
|
+
"description": "List of user accounts",
|
|
629
|
+
"content": {
|
|
630
|
+
"application/json": {
|
|
631
|
+
"schema": {
|
|
632
|
+
"description": "List of user accounts",
|
|
633
|
+
"type": "object",
|
|
634
|
+
"required": [
|
|
635
|
+
"data"
|
|
636
|
+
],
|
|
637
|
+
"properties": {
|
|
638
|
+
"data": {
|
|
639
|
+
"description": "Accounts returned from ptfin and normalized by the facade",
|
|
640
|
+
"type": "array",
|
|
641
|
+
"items": {
|
|
642
|
+
"description": "Normalized account visible to the authenticated user",
|
|
643
|
+
"type": "object",
|
|
644
|
+
"required": [
|
|
645
|
+
"id",
|
|
646
|
+
"name",
|
|
647
|
+
"broker",
|
|
648
|
+
"status",
|
|
649
|
+
"currency"
|
|
650
|
+
],
|
|
651
|
+
"properties": {
|
|
652
|
+
"id": {
|
|
653
|
+
"description": "Account identifier normalized by the facade",
|
|
654
|
+
"anyOf": [
|
|
655
|
+
{
|
|
656
|
+
"type": "string"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"type": "null"
|
|
660
|
+
}
|
|
661
|
+
]
|
|
662
|
+
},
|
|
663
|
+
"name": {
|
|
664
|
+
"description": "Human-readable account name when available",
|
|
665
|
+
"anyOf": [
|
|
666
|
+
{
|
|
667
|
+
"type": "string"
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
"type": "null"
|
|
671
|
+
}
|
|
672
|
+
]
|
|
673
|
+
},
|
|
674
|
+
"broker": {
|
|
675
|
+
"description": "Broker or upstream source name",
|
|
676
|
+
"anyOf": [
|
|
677
|
+
{
|
|
678
|
+
"type": "string"
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"type": "null"
|
|
682
|
+
}
|
|
683
|
+
]
|
|
684
|
+
},
|
|
685
|
+
"status": {
|
|
686
|
+
"description": "Current account status from upstream data",
|
|
687
|
+
"anyOf": [
|
|
688
|
+
{
|
|
689
|
+
"type": "string"
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
"type": "null"
|
|
693
|
+
}
|
|
694
|
+
]
|
|
695
|
+
},
|
|
696
|
+
"currency": {
|
|
697
|
+
"description": "Base account currency",
|
|
698
|
+
"anyOf": [
|
|
699
|
+
{
|
|
700
|
+
"type": "string"
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
"type": "null"
|
|
704
|
+
}
|
|
705
|
+
]
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
},
|
|
715
|
+
"401": {
|
|
716
|
+
"description": "Default Response",
|
|
717
|
+
"content": {
|
|
718
|
+
"application/json": {
|
|
719
|
+
"schema": {
|
|
720
|
+
"type": "object",
|
|
721
|
+
"required": [
|
|
722
|
+
"error"
|
|
723
|
+
],
|
|
724
|
+
"properties": {
|
|
725
|
+
"error": {
|
|
726
|
+
"type": "object",
|
|
727
|
+
"required": [
|
|
728
|
+
"code",
|
|
729
|
+
"message"
|
|
730
|
+
],
|
|
731
|
+
"properties": {
|
|
732
|
+
"code": {
|
|
733
|
+
"description": "Stable machine-readable error code",
|
|
734
|
+
"type": "string"
|
|
735
|
+
},
|
|
736
|
+
"message": {
|
|
737
|
+
"description": "Human-readable error message",
|
|
738
|
+
"type": "string"
|
|
739
|
+
},
|
|
740
|
+
"details": {
|
|
741
|
+
"description": "Optional structured details from the facade or upstream systems",
|
|
742
|
+
"anyOf": [
|
|
743
|
+
{
|
|
744
|
+
"additionalProperties": true,
|
|
745
|
+
"type": "object",
|
|
746
|
+
"properties": {}
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"type": "array",
|
|
750
|
+
"items": {}
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"type": "string"
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
"type": "null"
|
|
757
|
+
}
|
|
758
|
+
]
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
"503": {
|
|
768
|
+
"description": "Default Response",
|
|
769
|
+
"content": {
|
|
770
|
+
"application/json": {
|
|
771
|
+
"schema": {
|
|
772
|
+
"type": "object",
|
|
773
|
+
"required": [
|
|
774
|
+
"error"
|
|
775
|
+
],
|
|
776
|
+
"properties": {
|
|
777
|
+
"error": {
|
|
778
|
+
"type": "object",
|
|
779
|
+
"required": [
|
|
780
|
+
"code",
|
|
781
|
+
"message"
|
|
782
|
+
],
|
|
783
|
+
"properties": {
|
|
784
|
+
"code": {
|
|
785
|
+
"description": "Stable machine-readable error code",
|
|
786
|
+
"type": "string"
|
|
787
|
+
},
|
|
788
|
+
"message": {
|
|
789
|
+
"description": "Human-readable error message",
|
|
790
|
+
"type": "string"
|
|
791
|
+
},
|
|
792
|
+
"details": {
|
|
793
|
+
"description": "Optional structured details from the facade or upstream systems",
|
|
794
|
+
"anyOf": [
|
|
795
|
+
{
|
|
796
|
+
"additionalProperties": true,
|
|
797
|
+
"type": "object",
|
|
798
|
+
"properties": {}
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
"type": "array",
|
|
802
|
+
"items": {}
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"type": "string"
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"type": "null"
|
|
809
|
+
}
|
|
810
|
+
]
|
|
811
|
+
}
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
},
|
|
822
|
+
"/v1/market-data/quotes": {
|
|
823
|
+
"get": {
|
|
824
|
+
"summary": "Get normalized quote snapshots",
|
|
825
|
+
"tags": [
|
|
826
|
+
"Market Data"
|
|
827
|
+
],
|
|
828
|
+
"description": "Requests quote snapshots from the legacy marketData API and maps the legacy quote fields into the public facade contract.",
|
|
829
|
+
"parameters": [
|
|
830
|
+
{
|
|
831
|
+
"schema": {
|
|
832
|
+
"minLength": 1,
|
|
833
|
+
"type": "string"
|
|
834
|
+
},
|
|
835
|
+
"example": "AAPL,MSFT,SPY",
|
|
836
|
+
"in": "query",
|
|
837
|
+
"name": "symbols",
|
|
838
|
+
"required": true,
|
|
839
|
+
"description": "Comma-separated symbols, e.g. AAPL,MSFT,SPY"
|
|
840
|
+
}
|
|
841
|
+
],
|
|
842
|
+
"responses": {
|
|
843
|
+
"200": {
|
|
844
|
+
"description": "Market data response payload",
|
|
845
|
+
"content": {
|
|
846
|
+
"application/json": {
|
|
847
|
+
"schema": {
|
|
848
|
+
"description": "Market data response payload",
|
|
849
|
+
"type": "object",
|
|
850
|
+
"required": [
|
|
851
|
+
"data"
|
|
852
|
+
],
|
|
853
|
+
"properties": {
|
|
854
|
+
"data": {
|
|
855
|
+
"description": "Quote snapshots for all requested symbols",
|
|
856
|
+
"type": "array",
|
|
857
|
+
"items": {
|
|
858
|
+
"description": "Normalized quote snapshot",
|
|
859
|
+
"type": "object",
|
|
860
|
+
"required": [
|
|
861
|
+
"symbol",
|
|
862
|
+
"price",
|
|
863
|
+
"prevClose",
|
|
864
|
+
"change",
|
|
865
|
+
"changePercent"
|
|
866
|
+
],
|
|
867
|
+
"properties": {
|
|
868
|
+
"symbol": {
|
|
869
|
+
"description": "Ticker symbol",
|
|
870
|
+
"type": "string"
|
|
871
|
+
},
|
|
872
|
+
"price": {
|
|
873
|
+
"description": "Latest traded price",
|
|
874
|
+
"type": "number"
|
|
875
|
+
},
|
|
876
|
+
"prevClose": {
|
|
877
|
+
"description": "Previous daily close when the upstream snapshot contains it",
|
|
878
|
+
"anyOf": [
|
|
879
|
+
{
|
|
880
|
+
"type": "number"
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
"type": "null"
|
|
884
|
+
}
|
|
885
|
+
]
|
|
886
|
+
},
|
|
887
|
+
"change": {
|
|
888
|
+
"description": "Absolute change relative to previous close when available",
|
|
889
|
+
"anyOf": [
|
|
890
|
+
{
|
|
891
|
+
"type": "number"
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
"type": "null"
|
|
895
|
+
}
|
|
896
|
+
]
|
|
897
|
+
},
|
|
898
|
+
"changePercent": {
|
|
899
|
+
"description": "Percentage change relative to previous close when available",
|
|
900
|
+
"anyOf": [
|
|
901
|
+
{
|
|
902
|
+
"type": "number"
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
"type": "null"
|
|
906
|
+
}
|
|
907
|
+
]
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
},
|
|
917
|
+
"400": {
|
|
918
|
+
"description": "Default Response",
|
|
919
|
+
"content": {
|
|
920
|
+
"application/json": {
|
|
921
|
+
"schema": {
|
|
922
|
+
"type": "object",
|
|
923
|
+
"required": [
|
|
924
|
+
"error"
|
|
925
|
+
],
|
|
926
|
+
"properties": {
|
|
927
|
+
"error": {
|
|
928
|
+
"type": "object",
|
|
929
|
+
"required": [
|
|
930
|
+
"code",
|
|
931
|
+
"message"
|
|
932
|
+
],
|
|
933
|
+
"properties": {
|
|
934
|
+
"code": {
|
|
935
|
+
"description": "Stable machine-readable error code",
|
|
936
|
+
"type": "string"
|
|
937
|
+
},
|
|
938
|
+
"message": {
|
|
939
|
+
"description": "Human-readable error message",
|
|
940
|
+
"type": "string"
|
|
941
|
+
},
|
|
942
|
+
"details": {
|
|
943
|
+
"description": "Optional structured details from the facade or upstream systems",
|
|
944
|
+
"anyOf": [
|
|
945
|
+
{
|
|
946
|
+
"additionalProperties": true,
|
|
947
|
+
"type": "object",
|
|
948
|
+
"properties": {}
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
"type": "array",
|
|
952
|
+
"items": {}
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
"type": "string"
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"type": "null"
|
|
959
|
+
}
|
|
960
|
+
]
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
},
|
|
969
|
+
"503": {
|
|
970
|
+
"description": "Default Response",
|
|
971
|
+
"content": {
|
|
972
|
+
"application/json": {
|
|
973
|
+
"schema": {
|
|
974
|
+
"type": "object",
|
|
975
|
+
"required": [
|
|
976
|
+
"error"
|
|
977
|
+
],
|
|
978
|
+
"properties": {
|
|
979
|
+
"error": {
|
|
980
|
+
"type": "object",
|
|
981
|
+
"required": [
|
|
982
|
+
"code",
|
|
983
|
+
"message"
|
|
984
|
+
],
|
|
985
|
+
"properties": {
|
|
986
|
+
"code": {
|
|
987
|
+
"description": "Stable machine-readable error code",
|
|
988
|
+
"type": "string"
|
|
989
|
+
},
|
|
990
|
+
"message": {
|
|
991
|
+
"description": "Human-readable error message",
|
|
992
|
+
"type": "string"
|
|
993
|
+
},
|
|
994
|
+
"details": {
|
|
995
|
+
"description": "Optional structured details from the facade or upstream systems",
|
|
996
|
+
"anyOf": [
|
|
997
|
+
{
|
|
998
|
+
"additionalProperties": true,
|
|
999
|
+
"type": "object",
|
|
1000
|
+
"properties": {}
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
"type": "array",
|
|
1004
|
+
"items": {}
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
"type": "string"
|
|
1008
|
+
},
|
|
1009
|
+
{
|
|
1010
|
+
"type": "null"
|
|
1011
|
+
}
|
|
1012
|
+
]
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
"/v1/openapi.json": {
|
|
1025
|
+
"get": {
|
|
1026
|
+
"responses": {
|
|
1027
|
+
"200": {
|
|
1028
|
+
"description": "Default Response"
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
},
|
|
1034
|
+
"servers": [
|
|
1035
|
+
{
|
|
1036
|
+
"url": "/"
|
|
1037
|
+
}
|
|
1038
|
+
],
|
|
1039
|
+
"tags": [
|
|
1040
|
+
{
|
|
1041
|
+
"name": "System"
|
|
1042
|
+
},
|
|
1043
|
+
{
|
|
1044
|
+
"name": "Auth"
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"name": "Accounts"
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"name": "Market Data"
|
|
1051
|
+
}
|
|
1052
|
+
]
|
|
1053
|
+
}
|