@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
package/README.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Metaclient
|
|
2
|
+
|
|
3
|
+
Минимальный TypeScript-клиент для HTTP API MetaTerminal.
|
|
4
|
+
|
|
5
|
+
## Установка
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @ptfin/metaclient
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Использование
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { createMetaClient } from '@ptfin/metaclient';
|
|
15
|
+
|
|
16
|
+
const client = createMetaClient({
|
|
17
|
+
baseUrl: 'https://meta.example.com',
|
|
18
|
+
getToken: () => localStorage.getItem('metaToken'),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const response = await client.POST('/v1/auth/sign-in', {
|
|
22
|
+
body: {
|
|
23
|
+
login: 'user',
|
|
24
|
+
password: 'password',
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Разработка
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install
|
|
33
|
+
npm run generate
|
|
34
|
+
npm run build
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
OpenAPI-контракт лежит в `openapi/facade.openapi.json`.
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type Client } from 'openapi-fetch';
|
|
2
|
+
import type { paths } from './generated/schema.js';
|
|
3
|
+
export interface MetaClientOptions {
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
getToken?: () => string | null | undefined;
|
|
6
|
+
fetch?: typeof fetch;
|
|
7
|
+
}
|
|
8
|
+
export type MetaClient = Client<paths>;
|
|
9
|
+
export declare const createMetaClient: (options: MetaClientOptions) => MetaClient;
|
|
10
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAqB,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAEvC,eAAO,MAAM,gBAAgB,GAAI,SAAS,iBAAiB,KAAG,UAmB7D,CAAC"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import createClient from 'openapi-fetch';
|
|
2
|
+
export const createMetaClient = (options) => {
|
|
3
|
+
const client = createClient({
|
|
4
|
+
baseUrl: options.baseUrl,
|
|
5
|
+
fetch: options.fetch,
|
|
6
|
+
});
|
|
7
|
+
client.use({
|
|
8
|
+
async onRequest({ request }) {
|
|
9
|
+
const token = options.getToken?.();
|
|
10
|
+
if (token) {
|
|
11
|
+
request.headers.set('Authorization', `Bearer ${token}`);
|
|
12
|
+
}
|
|
13
|
+
return request;
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
return client;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,YAA6B,MAAM,eAAe,CAAC;AAY1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,OAA0B,EAAc,EAAE;IACzE,MAAM,MAAM,GAAG,YAAY,CAAQ;QACjC,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,KAAK,EAAE,OAAO,CAAC,KAAK;KACrB,CAAC,CAAC;IAEH,MAAM,CAAC,GAAG,CAAC;QACT,KAAK,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE;YACzB,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;YAEnC,IAAI,KAAK,EAAE,CAAC;gBACV,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,KAAK,EAAE,CAAC,CAAC;YAC1D,CAAC;YAED,OAAO,OAAO,CAAC;QACjB,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -0,0 +1,620 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/v1/healthz": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Facade health check
|
|
15
|
+
* @description Simple health endpoint for the TypeScript facade service.
|
|
16
|
+
*/
|
|
17
|
+
get: {
|
|
18
|
+
parameters: {
|
|
19
|
+
query?: never;
|
|
20
|
+
header?: never;
|
|
21
|
+
path?: never;
|
|
22
|
+
cookie?: never;
|
|
23
|
+
};
|
|
24
|
+
requestBody?: never;
|
|
25
|
+
responses: {
|
|
26
|
+
/** @description Default Response */
|
|
27
|
+
200: {
|
|
28
|
+
headers: {
|
|
29
|
+
[name: string]: unknown;
|
|
30
|
+
};
|
|
31
|
+
content: {
|
|
32
|
+
"application/json": {
|
|
33
|
+
data: {
|
|
34
|
+
/**
|
|
35
|
+
* @description Health indicator
|
|
36
|
+
* @enum {string}
|
|
37
|
+
*/
|
|
38
|
+
status: "ok";
|
|
39
|
+
/**
|
|
40
|
+
* @description Service name
|
|
41
|
+
* @enum {string}
|
|
42
|
+
*/
|
|
43
|
+
service: "facade";
|
|
44
|
+
/** @description Public API version */
|
|
45
|
+
version: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
put?: never;
|
|
53
|
+
post?: never;
|
|
54
|
+
delete?: never;
|
|
55
|
+
options?: never;
|
|
56
|
+
head?: never;
|
|
57
|
+
patch?: never;
|
|
58
|
+
trace?: never;
|
|
59
|
+
};
|
|
60
|
+
"/v1/auth/sign-in": {
|
|
61
|
+
parameters: {
|
|
62
|
+
query?: never;
|
|
63
|
+
header?: never;
|
|
64
|
+
path?: never;
|
|
65
|
+
cookie?: never;
|
|
66
|
+
};
|
|
67
|
+
get?: never;
|
|
68
|
+
put?: never;
|
|
69
|
+
/**
|
|
70
|
+
* Authenticate user via the legacy backend and issue facade bearer token
|
|
71
|
+
* @description Validates user credentials against the legacy auth API, then returns a facade bearer token backed by the shared terminal_tokens session store.
|
|
72
|
+
*/
|
|
73
|
+
post: {
|
|
74
|
+
parameters: {
|
|
75
|
+
query?: never;
|
|
76
|
+
header?: never;
|
|
77
|
+
path?: never;
|
|
78
|
+
cookie?: never;
|
|
79
|
+
};
|
|
80
|
+
/** @description Credentials used to create a facade bearer token */
|
|
81
|
+
requestBody: {
|
|
82
|
+
content: {
|
|
83
|
+
"application/json": {
|
|
84
|
+
/**
|
|
85
|
+
* @description User login used by the legacy auth backend
|
|
86
|
+
* @example demo@example.com
|
|
87
|
+
*/
|
|
88
|
+
login: string;
|
|
89
|
+
/**
|
|
90
|
+
* @description Plain-text password for the user account
|
|
91
|
+
* @example secret
|
|
92
|
+
*/
|
|
93
|
+
password: string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
responses: {
|
|
98
|
+
/** @description Successful authentication response */
|
|
99
|
+
200: {
|
|
100
|
+
headers: {
|
|
101
|
+
[name: string]: unknown;
|
|
102
|
+
};
|
|
103
|
+
content: {
|
|
104
|
+
"application/json": {
|
|
105
|
+
/** @description Created facade session */
|
|
106
|
+
data: {
|
|
107
|
+
/** @description Facade bearer token backed by the shared session table */
|
|
108
|
+
accessToken: string;
|
|
109
|
+
/**
|
|
110
|
+
* @description Authorization scheme for the access token
|
|
111
|
+
* @enum {string}
|
|
112
|
+
*/
|
|
113
|
+
tokenType: "Bearer";
|
|
114
|
+
/** @description Normalized facade user */
|
|
115
|
+
user: {
|
|
116
|
+
/** @description Internal user identifier from the shared session store */
|
|
117
|
+
id: number | string;
|
|
118
|
+
/** @description Login of the authenticated user */
|
|
119
|
+
login: string;
|
|
120
|
+
/** @description User type from the legacy auth model */
|
|
121
|
+
type: string | null;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
/** @description Default Response */
|
|
128
|
+
401: {
|
|
129
|
+
headers: {
|
|
130
|
+
[name: string]: unknown;
|
|
131
|
+
};
|
|
132
|
+
content: {
|
|
133
|
+
"application/json": {
|
|
134
|
+
error: {
|
|
135
|
+
/** @description Stable machine-readable error code */
|
|
136
|
+
code: string;
|
|
137
|
+
/** @description Human-readable error message */
|
|
138
|
+
message: string;
|
|
139
|
+
/** @description Optional structured details from the facade or upstream systems */
|
|
140
|
+
details?: {
|
|
141
|
+
[key: string]: unknown;
|
|
142
|
+
} | unknown[] | string | null;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
/** @description Default Response */
|
|
148
|
+
409: {
|
|
149
|
+
headers: {
|
|
150
|
+
[name: string]: unknown;
|
|
151
|
+
};
|
|
152
|
+
content: {
|
|
153
|
+
"application/json": {
|
|
154
|
+
error: {
|
|
155
|
+
/** @description Stable machine-readable error code */
|
|
156
|
+
code: string;
|
|
157
|
+
/** @description Human-readable error message */
|
|
158
|
+
message: string;
|
|
159
|
+
/** @description Optional structured details from the facade or upstream systems */
|
|
160
|
+
details?: {
|
|
161
|
+
[key: string]: unknown;
|
|
162
|
+
} | unknown[] | string | null;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
/** @description Default Response */
|
|
168
|
+
503: {
|
|
169
|
+
headers: {
|
|
170
|
+
[name: string]: unknown;
|
|
171
|
+
};
|
|
172
|
+
content: {
|
|
173
|
+
"application/json": {
|
|
174
|
+
error: {
|
|
175
|
+
/** @description Stable machine-readable error code */
|
|
176
|
+
code: string;
|
|
177
|
+
/** @description Human-readable error message */
|
|
178
|
+
message: string;
|
|
179
|
+
/** @description Optional structured details from the facade or upstream systems */
|
|
180
|
+
details?: {
|
|
181
|
+
[key: string]: unknown;
|
|
182
|
+
} | unknown[] | string | null;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
delete?: never;
|
|
190
|
+
options?: never;
|
|
191
|
+
head?: never;
|
|
192
|
+
patch?: never;
|
|
193
|
+
trace?: never;
|
|
194
|
+
};
|
|
195
|
+
"/v1/auth/sign-out": {
|
|
196
|
+
parameters: {
|
|
197
|
+
query?: never;
|
|
198
|
+
header?: never;
|
|
199
|
+
path?: never;
|
|
200
|
+
cookie?: never;
|
|
201
|
+
};
|
|
202
|
+
get?: never;
|
|
203
|
+
put?: never;
|
|
204
|
+
/**
|
|
205
|
+
* Delete the current facade token from the shared session store
|
|
206
|
+
* @description Deletes the current token from the shared session store and clears the facade cookie if it was present in the request.
|
|
207
|
+
*/
|
|
208
|
+
post: {
|
|
209
|
+
parameters: {
|
|
210
|
+
query?: never;
|
|
211
|
+
header?: never;
|
|
212
|
+
path?: never;
|
|
213
|
+
cookie?: never;
|
|
214
|
+
};
|
|
215
|
+
requestBody?: never;
|
|
216
|
+
responses: {
|
|
217
|
+
/** @description Default Response */
|
|
218
|
+
200: {
|
|
219
|
+
headers: {
|
|
220
|
+
[name: string]: unknown;
|
|
221
|
+
};
|
|
222
|
+
content: {
|
|
223
|
+
"application/json": {
|
|
224
|
+
data: {
|
|
225
|
+
ok: boolean;
|
|
226
|
+
};
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
/** @description Default Response */
|
|
231
|
+
401: {
|
|
232
|
+
headers: {
|
|
233
|
+
[name: string]: unknown;
|
|
234
|
+
};
|
|
235
|
+
content: {
|
|
236
|
+
"application/json": {
|
|
237
|
+
error: {
|
|
238
|
+
/** @description Stable machine-readable error code */
|
|
239
|
+
code: string;
|
|
240
|
+
/** @description Human-readable error message */
|
|
241
|
+
message: string;
|
|
242
|
+
/** @description Optional structured details from the facade or upstream systems */
|
|
243
|
+
details?: {
|
|
244
|
+
[key: string]: unknown;
|
|
245
|
+
} | unknown[] | string | null;
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
delete?: never;
|
|
253
|
+
options?: never;
|
|
254
|
+
head?: never;
|
|
255
|
+
patch?: never;
|
|
256
|
+
trace?: never;
|
|
257
|
+
};
|
|
258
|
+
"/v1/me": {
|
|
259
|
+
parameters: {
|
|
260
|
+
query?: never;
|
|
261
|
+
header?: never;
|
|
262
|
+
path?: never;
|
|
263
|
+
cookie?: never;
|
|
264
|
+
};
|
|
265
|
+
/**
|
|
266
|
+
* Resolve current user from the shared session store
|
|
267
|
+
* @description Reads the current bearer token or token cookie, resolves the shared session from Postgres, and returns a normalized user object.
|
|
268
|
+
*/
|
|
269
|
+
get: {
|
|
270
|
+
parameters: {
|
|
271
|
+
query?: never;
|
|
272
|
+
header?: never;
|
|
273
|
+
path?: never;
|
|
274
|
+
cookie?: never;
|
|
275
|
+
};
|
|
276
|
+
requestBody?: never;
|
|
277
|
+
responses: {
|
|
278
|
+
/** @description Current authenticated user */
|
|
279
|
+
200: {
|
|
280
|
+
headers: {
|
|
281
|
+
[name: string]: unknown;
|
|
282
|
+
};
|
|
283
|
+
content: {
|
|
284
|
+
"application/json": {
|
|
285
|
+
/** @description Normalized facade user */
|
|
286
|
+
data: {
|
|
287
|
+
/** @description Internal user identifier from the shared session store */
|
|
288
|
+
id: number | string;
|
|
289
|
+
/** @description Login of the authenticated user */
|
|
290
|
+
login: string;
|
|
291
|
+
/** @description User type from the legacy auth model */
|
|
292
|
+
type: string | null;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
};
|
|
297
|
+
/** @description Default Response */
|
|
298
|
+
401: {
|
|
299
|
+
headers: {
|
|
300
|
+
[name: string]: unknown;
|
|
301
|
+
};
|
|
302
|
+
content: {
|
|
303
|
+
"application/json": {
|
|
304
|
+
error: {
|
|
305
|
+
/** @description Stable machine-readable error code */
|
|
306
|
+
code: string;
|
|
307
|
+
/** @description Human-readable error message */
|
|
308
|
+
message: string;
|
|
309
|
+
/** @description Optional structured details from the facade or upstream systems */
|
|
310
|
+
details?: {
|
|
311
|
+
[key: string]: unknown;
|
|
312
|
+
} | unknown[] | string | null;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
put?: never;
|
|
320
|
+
post?: never;
|
|
321
|
+
delete?: never;
|
|
322
|
+
options?: never;
|
|
323
|
+
head?: never;
|
|
324
|
+
patch?: never;
|
|
325
|
+
trace?: never;
|
|
326
|
+
};
|
|
327
|
+
"/v1/": {
|
|
328
|
+
parameters: {
|
|
329
|
+
query?: never;
|
|
330
|
+
header?: never;
|
|
331
|
+
path?: never;
|
|
332
|
+
cookie?: never;
|
|
333
|
+
};
|
|
334
|
+
/**
|
|
335
|
+
* Describe the facade entrypoint
|
|
336
|
+
* @description Returns links to the generated OpenAPI document and Swagger UI for the current facade instance.
|
|
337
|
+
*/
|
|
338
|
+
get: {
|
|
339
|
+
parameters: {
|
|
340
|
+
query?: never;
|
|
341
|
+
header?: never;
|
|
342
|
+
path?: never;
|
|
343
|
+
cookie?: never;
|
|
344
|
+
};
|
|
345
|
+
requestBody?: never;
|
|
346
|
+
responses: {
|
|
347
|
+
/** @description Default Response */
|
|
348
|
+
200: {
|
|
349
|
+
headers: {
|
|
350
|
+
[name: string]: unknown;
|
|
351
|
+
};
|
|
352
|
+
content: {
|
|
353
|
+
"application/json": {
|
|
354
|
+
data: {
|
|
355
|
+
/**
|
|
356
|
+
* @description Facade service name
|
|
357
|
+
* @enum {string}
|
|
358
|
+
*/
|
|
359
|
+
name: "MetaTerminal Facade API";
|
|
360
|
+
/**
|
|
361
|
+
* @description Public API version
|
|
362
|
+
* @enum {string}
|
|
363
|
+
*/
|
|
364
|
+
version: "v1";
|
|
365
|
+
/** @description Swagger UI URL */
|
|
366
|
+
docsUrl: string;
|
|
367
|
+
/** @description Generated OpenAPI JSON URL */
|
|
368
|
+
openapiUrl: string;
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
};
|
|
375
|
+
put?: never;
|
|
376
|
+
post?: never;
|
|
377
|
+
delete?: never;
|
|
378
|
+
options?: never;
|
|
379
|
+
head?: never;
|
|
380
|
+
patch?: never;
|
|
381
|
+
trace?: never;
|
|
382
|
+
};
|
|
383
|
+
"/v1/accounts": {
|
|
384
|
+
parameters: {
|
|
385
|
+
query?: never;
|
|
386
|
+
header?: never;
|
|
387
|
+
path?: never;
|
|
388
|
+
cookie?: never;
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* List accounts from ptfin for the current user
|
|
392
|
+
* @description Uses the authenticated facade session to resolve the current user and fetches account data from the ptfin upstream, then normalizes the result.
|
|
393
|
+
*/
|
|
394
|
+
get: {
|
|
395
|
+
parameters: {
|
|
396
|
+
query?: never;
|
|
397
|
+
header?: never;
|
|
398
|
+
path?: never;
|
|
399
|
+
cookie?: never;
|
|
400
|
+
};
|
|
401
|
+
requestBody?: never;
|
|
402
|
+
responses: {
|
|
403
|
+
/** @description List of user accounts */
|
|
404
|
+
200: {
|
|
405
|
+
headers: {
|
|
406
|
+
[name: string]: unknown;
|
|
407
|
+
};
|
|
408
|
+
content: {
|
|
409
|
+
"application/json": {
|
|
410
|
+
/** @description Accounts returned from ptfin and normalized by the facade */
|
|
411
|
+
data: {
|
|
412
|
+
/** @description Account identifier normalized by the facade */
|
|
413
|
+
id: string | null;
|
|
414
|
+
/** @description Human-readable account name when available */
|
|
415
|
+
name: string | null;
|
|
416
|
+
/** @description Broker or upstream source name */
|
|
417
|
+
broker: string | null;
|
|
418
|
+
/** @description Current account status from upstream data */
|
|
419
|
+
status: string | null;
|
|
420
|
+
/** @description Base account currency */
|
|
421
|
+
currency: string | null;
|
|
422
|
+
}[];
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
/** @description Default Response */
|
|
427
|
+
401: {
|
|
428
|
+
headers: {
|
|
429
|
+
[name: string]: unknown;
|
|
430
|
+
};
|
|
431
|
+
content: {
|
|
432
|
+
"application/json": {
|
|
433
|
+
error: {
|
|
434
|
+
/** @description Stable machine-readable error code */
|
|
435
|
+
code: string;
|
|
436
|
+
/** @description Human-readable error message */
|
|
437
|
+
message: string;
|
|
438
|
+
/** @description Optional structured details from the facade or upstream systems */
|
|
439
|
+
details?: {
|
|
440
|
+
[key: string]: unknown;
|
|
441
|
+
} | unknown[] | string | null;
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
};
|
|
446
|
+
/** @description Default Response */
|
|
447
|
+
503: {
|
|
448
|
+
headers: {
|
|
449
|
+
[name: string]: unknown;
|
|
450
|
+
};
|
|
451
|
+
content: {
|
|
452
|
+
"application/json": {
|
|
453
|
+
error: {
|
|
454
|
+
/** @description Stable machine-readable error code */
|
|
455
|
+
code: string;
|
|
456
|
+
/** @description Human-readable error message */
|
|
457
|
+
message: string;
|
|
458
|
+
/** @description Optional structured details from the facade or upstream systems */
|
|
459
|
+
details?: {
|
|
460
|
+
[key: string]: unknown;
|
|
461
|
+
} | unknown[] | string | null;
|
|
462
|
+
};
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
};
|
|
467
|
+
};
|
|
468
|
+
put?: never;
|
|
469
|
+
post?: never;
|
|
470
|
+
delete?: never;
|
|
471
|
+
options?: never;
|
|
472
|
+
head?: never;
|
|
473
|
+
patch?: never;
|
|
474
|
+
trace?: never;
|
|
475
|
+
};
|
|
476
|
+
"/v1/market-data/quotes": {
|
|
477
|
+
parameters: {
|
|
478
|
+
query?: never;
|
|
479
|
+
header?: never;
|
|
480
|
+
path?: never;
|
|
481
|
+
cookie?: never;
|
|
482
|
+
};
|
|
483
|
+
/**
|
|
484
|
+
* Get normalized quote snapshots
|
|
485
|
+
* @description Requests quote snapshots from the legacy marketData API and maps the legacy quote fields into the public facade contract.
|
|
486
|
+
*/
|
|
487
|
+
get: {
|
|
488
|
+
parameters: {
|
|
489
|
+
query: {
|
|
490
|
+
/**
|
|
491
|
+
* @description Comma-separated symbols, e.g. AAPL,MSFT,SPY
|
|
492
|
+
* @example AAPL,MSFT,SPY
|
|
493
|
+
*/
|
|
494
|
+
symbols: string;
|
|
495
|
+
};
|
|
496
|
+
header?: never;
|
|
497
|
+
path?: never;
|
|
498
|
+
cookie?: never;
|
|
499
|
+
};
|
|
500
|
+
requestBody?: never;
|
|
501
|
+
responses: {
|
|
502
|
+
/** @description Market data response payload */
|
|
503
|
+
200: {
|
|
504
|
+
headers: {
|
|
505
|
+
[name: string]: unknown;
|
|
506
|
+
};
|
|
507
|
+
content: {
|
|
508
|
+
"application/json": {
|
|
509
|
+
/** @description Quote snapshots for all requested symbols */
|
|
510
|
+
data: {
|
|
511
|
+
/** @description Ticker symbol */
|
|
512
|
+
symbol: string;
|
|
513
|
+
/** @description Latest traded price */
|
|
514
|
+
price: number;
|
|
515
|
+
/** @description Previous daily close when the upstream snapshot contains it */
|
|
516
|
+
prevClose: number | null;
|
|
517
|
+
/** @description Absolute change relative to previous close when available */
|
|
518
|
+
change: number | null;
|
|
519
|
+
/** @description Percentage change relative to previous close when available */
|
|
520
|
+
changePercent: number | null;
|
|
521
|
+
}[];
|
|
522
|
+
};
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
/** @description Default Response */
|
|
526
|
+
400: {
|
|
527
|
+
headers: {
|
|
528
|
+
[name: string]: unknown;
|
|
529
|
+
};
|
|
530
|
+
content: {
|
|
531
|
+
"application/json": {
|
|
532
|
+
error: {
|
|
533
|
+
/** @description Stable machine-readable error code */
|
|
534
|
+
code: string;
|
|
535
|
+
/** @description Human-readable error message */
|
|
536
|
+
message: string;
|
|
537
|
+
/** @description Optional structured details from the facade or upstream systems */
|
|
538
|
+
details?: {
|
|
539
|
+
[key: string]: unknown;
|
|
540
|
+
} | unknown[] | string | null;
|
|
541
|
+
};
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
/** @description Default Response */
|
|
546
|
+
503: {
|
|
547
|
+
headers: {
|
|
548
|
+
[name: string]: unknown;
|
|
549
|
+
};
|
|
550
|
+
content: {
|
|
551
|
+
"application/json": {
|
|
552
|
+
error: {
|
|
553
|
+
/** @description Stable machine-readable error code */
|
|
554
|
+
code: string;
|
|
555
|
+
/** @description Human-readable error message */
|
|
556
|
+
message: string;
|
|
557
|
+
/** @description Optional structured details from the facade or upstream systems */
|
|
558
|
+
details?: {
|
|
559
|
+
[key: string]: unknown;
|
|
560
|
+
} | unknown[] | string | null;
|
|
561
|
+
};
|
|
562
|
+
};
|
|
563
|
+
};
|
|
564
|
+
};
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
put?: never;
|
|
568
|
+
post?: never;
|
|
569
|
+
delete?: never;
|
|
570
|
+
options?: never;
|
|
571
|
+
head?: never;
|
|
572
|
+
patch?: never;
|
|
573
|
+
trace?: never;
|
|
574
|
+
};
|
|
575
|
+
"/v1/openapi.json": {
|
|
576
|
+
parameters: {
|
|
577
|
+
query?: never;
|
|
578
|
+
header?: never;
|
|
579
|
+
path?: never;
|
|
580
|
+
cookie?: never;
|
|
581
|
+
};
|
|
582
|
+
get: {
|
|
583
|
+
parameters: {
|
|
584
|
+
query?: never;
|
|
585
|
+
header?: never;
|
|
586
|
+
path?: never;
|
|
587
|
+
cookie?: never;
|
|
588
|
+
};
|
|
589
|
+
requestBody?: never;
|
|
590
|
+
responses: {
|
|
591
|
+
/** @description Default Response */
|
|
592
|
+
200: {
|
|
593
|
+
headers: {
|
|
594
|
+
[name: string]: unknown;
|
|
595
|
+
};
|
|
596
|
+
content?: never;
|
|
597
|
+
};
|
|
598
|
+
};
|
|
599
|
+
};
|
|
600
|
+
put?: never;
|
|
601
|
+
post?: never;
|
|
602
|
+
delete?: never;
|
|
603
|
+
options?: never;
|
|
604
|
+
head?: never;
|
|
605
|
+
patch?: never;
|
|
606
|
+
trace?: never;
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
export type webhooks = Record<string, never>;
|
|
610
|
+
export interface components {
|
|
611
|
+
schemas: never;
|
|
612
|
+
responses: never;
|
|
613
|
+
parameters: never;
|
|
614
|
+
requestBodies: never;
|
|
615
|
+
headers: never;
|
|
616
|
+
pathItems: never;
|
|
617
|
+
}
|
|
618
|
+
export type $defs = Record<string, never>;
|
|
619
|
+
export type operations = Record<string, never>;
|
|
620
|
+
//# sourceMappingURL=schema.d.ts.map
|