@robosystems/client 2.5.3 → 2.6.0
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/artifacts/InvestorClient.d.ts +7 -1
- package/artifacts/InvestorClient.js +24 -14
- package/artifacts/InvestorClient.ts +46 -27
- package/artifacts/LedgerClient.d.ts +23 -17
- package/artifacts/LedgerClient.js +116 -123
- package/artifacts/LedgerClient.ts +180 -242
- package/artifacts/OperationClient.js +24 -1
- package/artifacts/OperationClient.ts +24 -1
- package/artifacts/OperatorClient.d.ts +10 -0
- package/artifacts/OperatorClient.js +72 -17
- package/artifacts/OperatorClient.ts +79 -21
- package/artifacts/QueryClient.d.ts +2 -1
- package/artifacts/QueryClient.js +17 -58
- package/artifacts/QueryClient.ts +21 -68
- package/artifacts/SSEClient.d.ts +1 -0
- package/artifacts/SSEClient.js +56 -7
- package/artifacts/SSEClient.ts +57 -7
- package/artifacts/config.js +18 -4
- package/artifacts/config.ts +18 -4
- package/artifacts/graphql/client.d.ts +10 -0
- package/artifacts/graphql/client.js +29 -21
- package/artifacts/graphql/client.ts +34 -23
- package/artifacts/index.d.ts +2 -2
- package/artifacts/index.js +6 -6
- package/artifacts/index.ts +8 -8
- package/artifacts/rest.d.ts +22 -0
- package/artifacts/rest.js +27 -0
- package/artifacts/rest.ts +54 -0
- package/artifacts/retry.js +8 -3
- package/artifacts/retry.ts +8 -3
- package/package.json +9 -1
- package/sdk/types.gen.d.ts +7 -1
- package/sdk/types.gen.ts +7 -1
- package/types.gen.d.ts +7 -1
- package/types.gen.ts +7 -1
|
@@ -165,10 +165,39 @@ function createTimeoutFetch(timeoutMs: number): typeof fetch {
|
|
|
165
165
|
* sending a JWT as `X-API-Key` or an API key as Bearer both 401.
|
|
166
166
|
*/
|
|
167
167
|
function applyAuthHeader(headers: Headers, token: string): void {
|
|
168
|
-
|
|
169
|
-
headers.set(
|
|
170
|
-
}
|
|
171
|
-
|
|
168
|
+
for (const [name, value] of Object.entries(authHeaderFor(token))) {
|
|
169
|
+
headers.set(name, value)
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** The auth header for a credential — see {@link applyAuthHeader} for the rule. */
|
|
174
|
+
export function authHeaderFor(token: string): Record<string, string> {
|
|
175
|
+
return token.startsWith('rfs') ? { 'X-API-Key': token } : { Authorization: `Bearer ${token}` }
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The credential for one request: the `tokenProvider` result when one is
|
|
180
|
+
* configured (`null` means send unauthenticated), otherwise the static
|
|
181
|
+
* `token`. A throwing provider fails the request fast — the caller meant
|
|
182
|
+
* to authenticate, and an unauthenticated request would surface as a
|
|
183
|
+
* confusing 401 far from the real failure (matches the Python client).
|
|
184
|
+
*/
|
|
185
|
+
export async function resolveCredential(
|
|
186
|
+
config: Pick<GraphQLClientConfig, 'token' | 'tokenProvider'>
|
|
187
|
+
): Promise<string | null> {
|
|
188
|
+
if (!config.tokenProvider) {
|
|
189
|
+
return config.token ?? null
|
|
190
|
+
}
|
|
191
|
+
try {
|
|
192
|
+
return (await config.tokenProvider()) ?? null
|
|
193
|
+
} catch (err) {
|
|
194
|
+
const detail = err instanceof Error ? err.message : String(err)
|
|
195
|
+
throw new Error(
|
|
196
|
+
`RoboSystems SDK: tokenProvider threw while resolving the request credential (${detail}). ` +
|
|
197
|
+
'Fix the tokenProvider passed in the client config (or via setSDKClientConfig) so it ' +
|
|
198
|
+
'returns the current token, or null to send an unauthenticated (cookie-based) request.',
|
|
199
|
+
{ cause: err }
|
|
200
|
+
)
|
|
172
201
|
}
|
|
173
202
|
}
|
|
174
203
|
|
|
@@ -204,25 +233,7 @@ export function createGraphQLClient(config: GraphQLClientConfig, graphId: string
|
|
|
204
233
|
credentials: config.credentials,
|
|
205
234
|
fetch: timeoutFetch,
|
|
206
235
|
requestMiddleware: async (request) => {
|
|
207
|
-
|
|
208
|
-
try {
|
|
209
|
-
token = await providerFn()
|
|
210
|
-
} catch (err) {
|
|
211
|
-
// Fail fast — a throwing provider means the caller *intended*
|
|
212
|
-
// to authenticate but couldn't produce a credential. Sending
|
|
213
|
-
// the request unauthenticated would surface as a confusing
|
|
214
|
-
// 401 far from the real failure. (Matches the Python client,
|
|
215
|
-
// which raises when its credential is missing.) A provider
|
|
216
|
-
// that deliberately has no credential should return `null`
|
|
217
|
-
// instead — that still sends an unauthenticated request.
|
|
218
|
-
const detail = err instanceof Error ? err.message : String(err)
|
|
219
|
-
throw new Error(
|
|
220
|
-
`RoboSystems SDK: tokenProvider threw while resolving the request credential (${detail}). ` +
|
|
221
|
-
'Fix the tokenProvider passed in the client config (or via setSDKClientConfig) so it ' +
|
|
222
|
-
'returns the current token, or null to send an unauthenticated (cookie-based) request.',
|
|
223
|
-
{ cause: err }
|
|
224
|
-
)
|
|
225
|
-
}
|
|
236
|
+
const token = await resolveCredential({ tokenProvider: providerFn })
|
|
226
237
|
if (!token) {
|
|
227
238
|
return request
|
|
228
239
|
}
|
package/artifacts/index.d.ts
CHANGED
|
@@ -23,8 +23,8 @@ export interface RoboSystemsClientConfig {
|
|
|
23
23
|
*/
|
|
24
24
|
token?: string;
|
|
25
25
|
/**
|
|
26
|
-
* Dynamic credential callback invoked on every GraphQL request
|
|
27
|
-
* every SSE connect. When set, JWT refreshes are picked up
|
|
26
|
+
* Dynamic credential callback invoked on every GraphQL request, every
|
|
27
|
+
* facade REST write, and every SSE connect. When set, JWT refreshes are picked up
|
|
28
28
|
* automatically — no need to rebuild or clear cached clients after a
|
|
29
29
|
* refresh. Browser sessions need this: the backend revokes the previous
|
|
30
30
|
* JWT on each refresh, so a static `token` captured at construction
|
package/artifacts/index.js
CHANGED
|
@@ -54,10 +54,10 @@ class RoboSystemsClients {
|
|
|
54
54
|
constructor(config = {}) {
|
|
55
55
|
// Get base URL from SDK client config or use provided/default
|
|
56
56
|
const sdkConfig = client_gen_1.client.getConfig();
|
|
57
|
-
// Facade REST calls run through the generated ops
|
|
58
|
-
//
|
|
59
|
-
//
|
|
60
|
-
// supplied one keeps it; we never override an explicit choice.
|
|
57
|
+
// Facade REST calls run through the generated ops on this module-level
|
|
58
|
+
// client. They pass their own baseUrl, credential and headers per call,
|
|
59
|
+
// but the transport is still this client's `fetch`. A caller that
|
|
60
|
+
// already supplied one keeps it; we never override an explicit choice.
|
|
61
61
|
if (!sdkConfig.fetch) {
|
|
62
62
|
client_gen_1.client.setConfig({
|
|
63
63
|
fetch: (0, retry_1.createRetryingFetch)({
|
|
@@ -78,8 +78,8 @@ class RoboSystemsClients {
|
|
|
78
78
|
token,
|
|
79
79
|
tokenProvider,
|
|
80
80
|
headers: config.headers,
|
|
81
|
-
maxRetries: config.maxRetries
|
|
82
|
-
retryDelay: config.retryDelay
|
|
81
|
+
maxRetries: config.maxRetries ?? 5,
|
|
82
|
+
retryDelay: config.retryDelay ?? 1000,
|
|
83
83
|
timeout: config.timeout,
|
|
84
84
|
};
|
|
85
85
|
// Every client that opens an SSE stream gets the tokenProvider too:
|
package/artifacts/index.ts
CHANGED
|
@@ -47,8 +47,8 @@ export interface RoboSystemsClientConfig {
|
|
|
47
47
|
*/
|
|
48
48
|
token?: string
|
|
49
49
|
/**
|
|
50
|
-
* Dynamic credential callback invoked on every GraphQL request
|
|
51
|
-
* every SSE connect. When set, JWT refreshes are picked up
|
|
50
|
+
* Dynamic credential callback invoked on every GraphQL request, every
|
|
51
|
+
* facade REST write, and every SSE connect. When set, JWT refreshes are picked up
|
|
52
52
|
* automatically — no need to rebuild or clear cached clients after a
|
|
53
53
|
* refresh. Browser sessions need this: the backend revokes the previous
|
|
54
54
|
* JWT on each refresh, so a static `token` captured at construction
|
|
@@ -95,10 +95,10 @@ export class RoboSystemsClients {
|
|
|
95
95
|
// Get base URL from SDK client config or use provided/default
|
|
96
96
|
const sdkConfig = client.getConfig()
|
|
97
97
|
|
|
98
|
-
// Facade REST calls run through the generated ops
|
|
99
|
-
//
|
|
100
|
-
//
|
|
101
|
-
// supplied one keeps it; we never override an explicit choice.
|
|
98
|
+
// Facade REST calls run through the generated ops on this module-level
|
|
99
|
+
// client. They pass their own baseUrl, credential and headers per call,
|
|
100
|
+
// but the transport is still this client's `fetch`. A caller that
|
|
101
|
+
// already supplied one keeps it; we never override an explicit choice.
|
|
102
102
|
if (!sdkConfig.fetch) {
|
|
103
103
|
client.setConfig({
|
|
104
104
|
fetch: createRetryingFetch({
|
|
@@ -122,8 +122,8 @@ export class RoboSystemsClients {
|
|
|
122
122
|
token,
|
|
123
123
|
tokenProvider,
|
|
124
124
|
headers: config.headers,
|
|
125
|
-
maxRetries: config.maxRetries
|
|
126
|
-
retryDelay: config.retryDelay
|
|
125
|
+
maxRetries: config.maxRetries ?? 5,
|
|
126
|
+
retryDelay: config.retryDelay ?? 1000,
|
|
127
127
|
timeout: config.timeout,
|
|
128
128
|
}
|
|
129
129
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-call transport options for the facades' REST calls.
|
|
3
|
+
*
|
|
4
|
+
* The generated ops default to the module-level `client` from
|
|
5
|
+
* `../sdk/client.gen`, which knows nothing of a facade's own `baseUrl` or
|
|
6
|
+
* credential. Facade REST calls (writes, Cypher queries, operator runs,
|
|
7
|
+
* operation status) pass these options per call instead, so they reach
|
|
8
|
+
* the same server, with the same credential, as the facade's GraphQL
|
|
9
|
+
* reads. They still run through the shared client, so
|
|
10
|
+
* its `fetch` (the retrying one `RoboSystemsClients` installs),
|
|
11
|
+
* interceptors and default headers keep applying underneath.
|
|
12
|
+
*/
|
|
13
|
+
import type { GraphQLClientConfig } from './graphql/client';
|
|
14
|
+
export interface RestCallOptions {
|
|
15
|
+
baseUrl: string;
|
|
16
|
+
headers: Record<string, string>;
|
|
17
|
+
credentials?: 'include' | 'same-origin' | 'omit';
|
|
18
|
+
}
|
|
19
|
+
export type RestCallConfig = Pick<GraphQLClientConfig, 'baseUrl' | 'headers' | 'credentials' | 'token' | 'tokenProvider'>;
|
|
20
|
+
export declare function restCallOptions(config: RestCallConfig): Promise<RestCallOptions>;
|
|
21
|
+
/** Per-call options plus an `Idempotency-Key` header when one is given. */
|
|
22
|
+
export declare function withIdempotencyKey(options: RestCallOptions, idempotencyKey?: string | null): RestCallOptions;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.restCallOptions = restCallOptions;
|
|
5
|
+
exports.withIdempotencyKey = withIdempotencyKey;
|
|
6
|
+
const client_1 = require("./graphql/client");
|
|
7
|
+
async function restCallOptions(config) {
|
|
8
|
+
const headers = { ...(config.headers ?? {}) };
|
|
9
|
+
const token = await (0, client_1.resolveCredential)(config);
|
|
10
|
+
if (token) {
|
|
11
|
+
Object.assign(headers, (0, client_1.authHeaderFor)(token));
|
|
12
|
+
}
|
|
13
|
+
const options = { baseUrl: config.baseUrl.replace(/\/$/, ''), headers };
|
|
14
|
+
// Set only when configured: an explicit `undefined` would override the
|
|
15
|
+
// shared client's own `credentials`.
|
|
16
|
+
if (config.credentials) {
|
|
17
|
+
options.credentials = config.credentials;
|
|
18
|
+
}
|
|
19
|
+
return options;
|
|
20
|
+
}
|
|
21
|
+
/** Per-call options plus an `Idempotency-Key` header when one is given. */
|
|
22
|
+
function withIdempotencyKey(options, idempotencyKey) {
|
|
23
|
+
if (!idempotencyKey) {
|
|
24
|
+
return options;
|
|
25
|
+
}
|
|
26
|
+
return { ...options, headers: { ...options.headers, 'Idempotency-Key': idempotencyKey } };
|
|
27
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
'use client'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Per-call transport options for the facades' REST calls.
|
|
5
|
+
*
|
|
6
|
+
* The generated ops default to the module-level `client` from
|
|
7
|
+
* `../sdk/client.gen`, which knows nothing of a facade's own `baseUrl` or
|
|
8
|
+
* credential. Facade REST calls (writes, Cypher queries, operator runs,
|
|
9
|
+
* operation status) pass these options per call instead, so they reach
|
|
10
|
+
* the same server, with the same credential, as the facade's GraphQL
|
|
11
|
+
* reads. They still run through the shared client, so
|
|
12
|
+
* its `fetch` (the retrying one `RoboSystemsClients` installs),
|
|
13
|
+
* interceptors and default headers keep applying underneath.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import type { GraphQLClientConfig } from './graphql/client'
|
|
17
|
+
import { authHeaderFor, resolveCredential } from './graphql/client'
|
|
18
|
+
|
|
19
|
+
export interface RestCallOptions {
|
|
20
|
+
baseUrl: string
|
|
21
|
+
headers: Record<string, string>
|
|
22
|
+
credentials?: 'include' | 'same-origin' | 'omit'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type RestCallConfig = Pick<
|
|
26
|
+
GraphQLClientConfig,
|
|
27
|
+
'baseUrl' | 'headers' | 'credentials' | 'token' | 'tokenProvider'
|
|
28
|
+
>
|
|
29
|
+
|
|
30
|
+
export async function restCallOptions(config: RestCallConfig): Promise<RestCallOptions> {
|
|
31
|
+
const headers: Record<string, string> = { ...(config.headers ?? {}) }
|
|
32
|
+
const token = await resolveCredential(config)
|
|
33
|
+
if (token) {
|
|
34
|
+
Object.assign(headers, authHeaderFor(token))
|
|
35
|
+
}
|
|
36
|
+
const options: RestCallOptions = { baseUrl: config.baseUrl.replace(/\/$/, ''), headers }
|
|
37
|
+
// Set only when configured: an explicit `undefined` would override the
|
|
38
|
+
// shared client's own `credentials`.
|
|
39
|
+
if (config.credentials) {
|
|
40
|
+
options.credentials = config.credentials
|
|
41
|
+
}
|
|
42
|
+
return options
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** Per-call options plus an `Idempotency-Key` header when one is given. */
|
|
46
|
+
export function withIdempotencyKey(
|
|
47
|
+
options: RestCallOptions,
|
|
48
|
+
idempotencyKey?: string | null
|
|
49
|
+
): RestCallOptions {
|
|
50
|
+
if (!idempotencyKey) {
|
|
51
|
+
return options
|
|
52
|
+
}
|
|
53
|
+
return { ...options, headers: { ...options.headers, 'Idempotency-Key': idempotencyKey } }
|
|
54
|
+
}
|
package/artifacts/retry.js
CHANGED
|
@@ -100,20 +100,25 @@ function createRetryingFetch(options = {}) {
|
|
|
100
100
|
const retryDelay = Math.max(1, options.retryDelay ?? exports.DEFAULT_RETRY_DELAY_MS);
|
|
101
101
|
const inner = options.fetch;
|
|
102
102
|
return async (input, init) => {
|
|
103
|
-
|
|
103
|
+
// The generated SDK passes a `Request`, whose body a send consumes.
|
|
104
|
+
// Each attempt sends a clone, so the original stays readable for the
|
|
105
|
+
// next one.
|
|
106
|
+
const template = typeof Request !== 'undefined' && input instanceof Request ? input : null;
|
|
107
|
+
const signal = init?.signal ?? template?.signal;
|
|
108
|
+
const send = () => (inner ?? fetch)(template && maxRetries > 0 ? template.clone() : input, init);
|
|
104
109
|
let response = await send();
|
|
105
110
|
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
106
111
|
if (!exports.RETRY_STATUS_CODES.has(response.status) || !isReplayable(init)) {
|
|
107
112
|
return response;
|
|
108
113
|
}
|
|
109
|
-
if (
|
|
114
|
+
if (signal?.aborted) {
|
|
110
115
|
return response;
|
|
111
116
|
}
|
|
112
117
|
const delay = backoffMs(attempt, retryDelay, retryAfterMs(response));
|
|
113
118
|
// The rejection body goes unused, but leaving it undrained keeps
|
|
114
119
|
// the connection pinned in some runtimes.
|
|
115
120
|
await response.body?.cancel().catch(() => { });
|
|
116
|
-
await sleep(delay,
|
|
121
|
+
await sleep(delay, signal);
|
|
117
122
|
response = await send();
|
|
118
123
|
}
|
|
119
124
|
return response;
|
package/artifacts/retry.ts
CHANGED
|
@@ -111,21 +111,26 @@ export function createRetryingFetch(options: RetryOptions = {}): typeof fetch {
|
|
|
111
111
|
const inner = options.fetch
|
|
112
112
|
|
|
113
113
|
return async (input, init) => {
|
|
114
|
-
|
|
114
|
+
// The generated SDK passes a `Request`, whose body a send consumes.
|
|
115
|
+
// Each attempt sends a clone, so the original stays readable for the
|
|
116
|
+
// next one.
|
|
117
|
+
const template = typeof Request !== 'undefined' && input instanceof Request ? input : null
|
|
118
|
+
const signal = init?.signal ?? template?.signal
|
|
119
|
+
const send = () => (inner ?? fetch)(template && maxRetries > 0 ? template.clone() : input, init)
|
|
115
120
|
let response = await send()
|
|
116
121
|
|
|
117
122
|
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
118
123
|
if (!RETRY_STATUS_CODES.has(response.status) || !isReplayable(init)) {
|
|
119
124
|
return response
|
|
120
125
|
}
|
|
121
|
-
if (
|
|
126
|
+
if (signal?.aborted) {
|
|
122
127
|
return response
|
|
123
128
|
}
|
|
124
129
|
const delay = backoffMs(attempt, retryDelay, retryAfterMs(response))
|
|
125
130
|
// The rejection body goes unused, but leaving it undrained keeps
|
|
126
131
|
// the connection pinned in some runtimes.
|
|
127
132
|
await response.body?.cancel().catch(() => {})
|
|
128
|
-
await sleep(delay,
|
|
133
|
+
await sleep(delay, signal)
|
|
129
134
|
response = await send()
|
|
130
135
|
}
|
|
131
136
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robosystems/client",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "TypeScript client library for the RoboSystems financial intelligence platform",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -169,5 +169,13 @@
|
|
|
169
169
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
170
170
|
"graphql": "^16.13.2",
|
|
171
171
|
"graphql-request": "^7.4.0"
|
|
172
|
+
},
|
|
173
|
+
"peerDependencies": {
|
|
174
|
+
"react": ">=16.8.0"
|
|
175
|
+
},
|
|
176
|
+
"peerDependenciesMeta": {
|
|
177
|
+
"react": {
|
|
178
|
+
"optional": true
|
|
179
|
+
}
|
|
172
180
|
}
|
|
173
181
|
}
|
package/sdk/types.gen.d.ts
CHANGED
|
@@ -158,6 +158,12 @@ export type AnalyticalStatementFactRow = {
|
|
|
158
158
|
* Value
|
|
159
159
|
*/
|
|
160
160
|
value?: number | null;
|
|
161
|
+
/**
|
|
162
|
+
* Unit
|
|
163
|
+
*
|
|
164
|
+
* The fact's unit, e.g. `USD` or `USD/shares`. A line a filer reports in two units (its own currency and a US-dollar translation) comes back once per unit.
|
|
165
|
+
*/
|
|
166
|
+
unit?: string | null;
|
|
161
167
|
/**
|
|
162
168
|
* Start Date
|
|
163
169
|
*/
|
|
@@ -3350,7 +3356,7 @@ export type CreateViewRequest = {
|
|
|
3350
3356
|
/**
|
|
3351
3357
|
* Include Summary
|
|
3352
3358
|
*
|
|
3353
|
-
* Include summary statistics per element
|
|
3359
|
+
* Include summary statistics per element. An element reported in more than one unit has none.
|
|
3354
3360
|
*/
|
|
3355
3361
|
include_summary?: boolean;
|
|
3356
3362
|
/**
|
package/sdk/types.gen.ts
CHANGED
|
@@ -166,6 +166,12 @@ export type AnalyticalStatementFactRow = {
|
|
|
166
166
|
* Value
|
|
167
167
|
*/
|
|
168
168
|
value?: number | null;
|
|
169
|
+
/**
|
|
170
|
+
* Unit
|
|
171
|
+
*
|
|
172
|
+
* The fact's unit, e.g. `USD` or `USD/shares`. A line a filer reports in two units (its own currency and a US-dollar translation) comes back once per unit.
|
|
173
|
+
*/
|
|
174
|
+
unit?: string | null;
|
|
169
175
|
/**
|
|
170
176
|
* Start Date
|
|
171
177
|
*/
|
|
@@ -3431,7 +3437,7 @@ export type CreateViewRequest = {
|
|
|
3431
3437
|
/**
|
|
3432
3438
|
* Include Summary
|
|
3433
3439
|
*
|
|
3434
|
-
* Include summary statistics per element
|
|
3440
|
+
* Include summary statistics per element. An element reported in more than one unit has none.
|
|
3435
3441
|
*/
|
|
3436
3442
|
include_summary?: boolean;
|
|
3437
3443
|
/**
|
package/types.gen.d.ts
CHANGED
|
@@ -158,6 +158,12 @@ export type AnalyticalStatementFactRow = {
|
|
|
158
158
|
* Value
|
|
159
159
|
*/
|
|
160
160
|
value?: number | null;
|
|
161
|
+
/**
|
|
162
|
+
* Unit
|
|
163
|
+
*
|
|
164
|
+
* The fact's unit, e.g. `USD` or `USD/shares`. A line a filer reports in two units (its own currency and a US-dollar translation) comes back once per unit.
|
|
165
|
+
*/
|
|
166
|
+
unit?: string | null;
|
|
161
167
|
/**
|
|
162
168
|
* Start Date
|
|
163
169
|
*/
|
|
@@ -3350,7 +3356,7 @@ export type CreateViewRequest = {
|
|
|
3350
3356
|
/**
|
|
3351
3357
|
* Include Summary
|
|
3352
3358
|
*
|
|
3353
|
-
* Include summary statistics per element
|
|
3359
|
+
* Include summary statistics per element. An element reported in more than one unit has none.
|
|
3354
3360
|
*/
|
|
3355
3361
|
include_summary?: boolean;
|
|
3356
3362
|
/**
|
package/types.gen.ts
CHANGED
|
@@ -166,6 +166,12 @@ export type AnalyticalStatementFactRow = {
|
|
|
166
166
|
* Value
|
|
167
167
|
*/
|
|
168
168
|
value?: number | null;
|
|
169
|
+
/**
|
|
170
|
+
* Unit
|
|
171
|
+
*
|
|
172
|
+
* The fact's unit, e.g. `USD` or `USD/shares`. A line a filer reports in two units (its own currency and a US-dollar translation) comes back once per unit.
|
|
173
|
+
*/
|
|
174
|
+
unit?: string | null;
|
|
169
175
|
/**
|
|
170
176
|
* Start Date
|
|
171
177
|
*/
|
|
@@ -3431,7 +3437,7 @@ export type CreateViewRequest = {
|
|
|
3431
3437
|
/**
|
|
3432
3438
|
* Include Summary
|
|
3433
3439
|
*
|
|
3434
|
-
* Include summary statistics per element
|
|
3440
|
+
* Include summary statistics per element. An element reported in more than one unit has none.
|
|
3435
3441
|
*/
|
|
3436
3442
|
include_summary?: boolean;
|
|
3437
3443
|
/**
|