@robosystems/client 0.5.13 → 0.6.1

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/types.gen.d.ts CHANGED
@@ -113,6 +113,41 @@ export type AddPublishListMembersOperation = {
113
113
  */
114
114
  list_id: string;
115
115
  };
116
+ /**
117
+ * AnalyticalStatementFactRow
118
+ *
119
+ * A single fact row from the graph-backed statement analysis.
120
+ */
121
+ export type AnalyticalStatementFactRow = {
122
+ /**
123
+ * Canonical Concept
124
+ */
125
+ canonical_concept?: string | null;
126
+ /**
127
+ * Qname
128
+ */
129
+ qname: string;
130
+ /**
131
+ * Name
132
+ */
133
+ name: string;
134
+ /**
135
+ * Value
136
+ */
137
+ value?: number | null;
138
+ /**
139
+ * End Date
140
+ */
141
+ end_date?: string | null;
142
+ /**
143
+ * Period Type
144
+ */
145
+ period_type?: string | null;
146
+ /**
147
+ * Duration Type
148
+ */
149
+ duration_type?: string | null;
150
+ };
116
151
  /**
117
152
  * ArtifactResponse
118
153
  *
@@ -154,6 +189,151 @@ export type ArtifactResponse = {
154
189
  kind: 'forecast';
155
190
  } & ForecastMechanics);
156
191
  };
192
+ /**
193
+ * AssertMetricsRequest
194
+ *
195
+ * Request body for the ``assert-metrics`` operation.
196
+ *
197
+ * The observation sibling of ``compute-metrics``: writes externally-
198
+ * observed values (usage counts, marketing numbers, hand-carried
199
+ * figures) into the period's standing ``factset_type='metric'`` FactSet
200
+ * with ``AssertedProvenance``. Re-asserting a period replaces its facts
201
+ * — one standing FactSet per (structure, entity, period_end), the
202
+ * accumulating time series.
203
+ *
204
+ * Structures carrying ``Derive`` rules are compute-owned
205
+ * (``compute-metrics``) and rejected — asserted and derived metric
206
+ * series keep disjoint structures. Asserted series are actuals; there
207
+ * is no scenario axis.
208
+ */
209
+ export type AssertMetricsRequest = {
210
+ /**
211
+ * Structure Id
212
+ *
213
+ * Metric block structure (block_type='metric') to assert into.
214
+ */
215
+ structure_id: string;
216
+ /**
217
+ * Period End
218
+ *
219
+ * Period end the observations are for — instant concepts (a follower count at month end) land as of this date; duration concepts (monthly downloads) end on it.
220
+ */
221
+ period_end: string;
222
+ /**
223
+ * Period Start
224
+ *
225
+ * Window start for duration concepts and the standing FactSet's period_start. Instant concepts ignore it.
226
+ */
227
+ period_start?: string | null;
228
+ /**
229
+ * Entity Id
230
+ *
231
+ * Entity to assert for. Defaults to the graph's earliest-created entity (the primary entity for single-entity graphs).
232
+ */
233
+ entity_id?: string | null;
234
+ /**
235
+ * Source System
236
+ *
237
+ * Identifier of the asserting system (e.g. 'content-machine') — recorded as the AssertedProvenance source_system.
238
+ */
239
+ source_system: string;
240
+ /**
241
+ * Basis Note
242
+ *
243
+ * Free-text basis / source reference for the observations.
244
+ */
245
+ basis_note?: string | null;
246
+ /**
247
+ * Observations
248
+ *
249
+ * Observed values, one per metric concept — duplicates rejected.
250
+ */
251
+ observations: Array<MetricObservation>;
252
+ };
253
+ /**
254
+ * AssertMetricsResponse
255
+ *
256
+ * Response for the ``assert-metrics`` operation.
257
+ */
258
+ export type AssertMetricsResponse = {
259
+ /**
260
+ * Structure Id
261
+ */
262
+ structure_id: string;
263
+ /**
264
+ * Entity Id
265
+ */
266
+ entity_id: string;
267
+ /**
268
+ * Period End
269
+ */
270
+ period_end: string;
271
+ /**
272
+ * Fact Set Id
273
+ *
274
+ * Standing metric FactSet the observations were written to.
275
+ */
276
+ fact_set_id: string;
277
+ /**
278
+ * Asserted
279
+ */
280
+ asserted?: Array<AssertedMetricLite>;
281
+ /**
282
+ * Replaced
283
+ *
284
+ * True when a prior standing set existed for the period and its facts were replaced.
285
+ */
286
+ replaced?: boolean;
287
+ };
288
+ /**
289
+ * AssertedMetricLite
290
+ *
291
+ * One metric written by an ``assert-metrics`` run.
292
+ */
293
+ export type AssertedMetricLite = {
294
+ /**
295
+ * Element Id
296
+ *
297
+ * Metric element the fact was written for.
298
+ */
299
+ element_id: string;
300
+ /**
301
+ * Element Qname
302
+ *
303
+ * Metric element qname.
304
+ */
305
+ element_qname: string;
306
+ /**
307
+ * Name
308
+ *
309
+ * Metric display name.
310
+ */
311
+ name: string;
312
+ /**
313
+ * Value
314
+ *
315
+ * Asserted value.
316
+ */
317
+ value: number;
318
+ /**
319
+ * Unit
320
+ *
321
+ * Fact unit — 'USD' for monetary, 'days' for days, else 'pure'.
322
+ */
323
+ unit: string;
324
+ /**
325
+ * Period Type
326
+ *
327
+ * 'instant' or 'duration'.
328
+ */
329
+ period_type: string;
330
+ /**
331
+ * Item Type
332
+ *
333
+ * Format family from the metric element (monetary | ratio | percent | multiple | days). None means untyped; fall back to unit.
334
+ */
335
+ item_type?: string | null;
336
+ };
157
337
  /**
158
338
  * AssociationResponse
159
339
  *
@@ -1637,7 +1817,7 @@ export type ConnectionProviderInfo = {
1637
1817
  *
1638
1818
  * Provider identifier
1639
1819
  */
1640
- provider: 'sec' | 'quickbooks';
1820
+ provider: 'sec' | 'quickbooks' | 'external';
1641
1821
  /**
1642
1822
  * Display Name
1643
1823
  *
@@ -1759,6 +1939,12 @@ export type ConnectionResponse = {
1759
1939
  * Source-of-truth write policy: 'native' (RoboSystems is authoritative; no outbound write-back) or 'qb_authoritative' (QuickBooks is authoritative; RoboSystems-originated entries publish to QB). Set via the write-policy endpoint.
1760
1940
  */
1761
1941
  write_policy?: string | null;
1942
+ /**
1943
+ * Source Name
1944
+ *
1945
+ * External-provider registered source slug — the value the integration stamps on the events it emits. Null for platform providers.
1946
+ */
1947
+ source_name?: string | null;
1762
1948
  /**
1763
1949
  * Metadata
1764
1950
  *
@@ -2018,7 +2204,7 @@ export type CreateConnectionRequest = {
2018
2204
  *
2019
2205
  * Connection provider type
2020
2206
  */
2021
- provider: 'sec' | 'quickbooks';
2207
+ provider: 'sec' | 'quickbooks' | 'external';
2022
2208
  /**
2023
2209
  * Entity Id
2024
2210
  *
@@ -2027,6 +2213,7 @@ export type CreateConnectionRequest = {
2027
2213
  entity_id?: string | null;
2028
2214
  sec_config?: SecConnectionConfig | null;
2029
2215
  quickbooks_config?: QuickBooksConnectionConfig | null;
2216
+ external_config?: ExternalConnectionConfig | null;
2030
2217
  };
2031
2218
  /**
2032
2219
  * CreateEventBlockRequest
@@ -2091,7 +2278,7 @@ export type CreateEventBlockRequest = {
2091
2278
  /**
2092
2279
  * Source
2093
2280
  *
2094
- * 'manual' | 'system' | 'schedule' | 'quickbooks' | 'xero' | 'plaid'
2281
+ * 'manual' | 'system' | 'schedule', a connected provider name (e.g. 'quickbooks'), or a source_name registered via an 'external' connection. Validated against the graph's registered connections.
2095
2282
  */
2096
2283
  source: string;
2097
2284
  /**
@@ -4445,7 +4632,7 @@ export type EventBlockEnvelope = {
4445
4632
  /**
4446
4633
  * Source
4447
4634
  *
4448
- * Capture source (`manual`, `system`, `schedule`, `quickbooks`, `xero`, `plaid`). Used for adapter routing.
4635
+ * Capture source: `manual`, `system`, `schedule`, a connected provider name (e.g. `quickbooks`), or a registered external source_name. Used for adapter routing.
4449
4636
  */
4450
4637
  source: string;
4451
4638
  /**
@@ -4710,6 +4897,31 @@ export type ExecuteEventBlockResponse = {
4710
4897
  [key: string]: unknown;
4711
4898
  } | null;
4712
4899
  };
4900
+ /**
4901
+ * ExternalConnectionConfig
4902
+ *
4903
+ * External-integration connection configuration.
4904
+ *
4905
+ * Registers a source namespace for an integration the platform does not
4906
+ * run: the connection is registration + telemetry, not execution config.
4907
+ * The platform holds no credentials for the external source — the
4908
+ * integration authenticates to its own source and writes here through
4909
+ * the public API, stamping ``source_name`` on everything it emits.
4910
+ */
4911
+ export type ExternalConnectionConfig = {
4912
+ /**
4913
+ * Source Name
4914
+ *
4915
+ * Source slug the integration stamps on the events it emits (lowercase letters, digits, '-', '_'; must start with a letter). Unique per graph among live connections.
4916
+ */
4917
+ source_name: string;
4918
+ /**
4919
+ * Display Name
4920
+ *
4921
+ * Human-readable label for the connections UI.
4922
+ */
4923
+ display_name?: string | null;
4924
+ };
4713
4925
  /**
4714
4926
  * FactLite
4715
4927
  *
@@ -5019,6 +5231,38 @@ export type FinancialStatementAnalysisRequest = {
5019
5231
  */
5020
5232
  limit?: number;
5021
5233
  };
5234
+ /**
5235
+ * FinancialStatementAnalysisResponse
5236
+ *
5237
+ * Results of the financial-statement-analysis view op.
5238
+ */
5239
+ export type FinancialStatementAnalysisResponse = {
5240
+ /**
5241
+ * Graph Id
5242
+ */
5243
+ graph_id: string;
5244
+ /**
5245
+ * Statement Type
5246
+ */
5247
+ statement_type: string;
5248
+ /**
5249
+ * Ticker
5250
+ */
5251
+ ticker?: string | null;
5252
+ /**
5253
+ * Report Id
5254
+ */
5255
+ report_id?: string | null;
5256
+ resolved_report?: ResolvedReportInfo | null;
5257
+ /**
5258
+ * Facts
5259
+ */
5260
+ facts: Array<AnalyticalStatementFactRow>;
5261
+ /**
5262
+ * Fact Count
5263
+ */
5264
+ fact_count: number;
5265
+ };
5022
5266
  /**
5023
5267
  * FiscalCalendarResponse
5024
5268
  *
@@ -7721,7 +7965,7 @@ export type MaterializeOp = {
7721
7965
  /**
7722
7966
  * Rebuild
7723
7967
  *
7724
- * Rebuild the graph from scratch, dropping existing data
7968
+ * Rebuild the graph from scratch, dropping existing data. Required (staged source) when materializing new uploads into a graph that already contains materialized data — staging replays all uploaded files, so a non-rebuild pass would re-copy ingested rows (409).
7725
7969
  */
7726
7970
  rebuild?: boolean;
7727
7971
  /**
@@ -7890,6 +8134,25 @@ export type MetricMechanics = {
7890
8134
  */
7891
8135
  unit?: string;
7892
8136
  };
8137
+ /**
8138
+ * MetricObservation
8139
+ *
8140
+ * One externally-observed value in an ``assert-metrics`` request.
8141
+ */
8142
+ export type MetricObservation = {
8143
+ /**
8144
+ * Qname
8145
+ *
8146
+ * Metric element qname (e.g. rsx:GithubStars). Must resolve to a concept on the structure's presentation catalog.
8147
+ */
8148
+ qname: string;
8149
+ /**
8150
+ * Value
8151
+ *
8152
+ * Observed value.
8153
+ */
8154
+ value: number;
8155
+ };
7893
8156
  /**
7894
8157
  * OAuthCallbackRequest
7895
8158
  *
@@ -8182,6 +8445,51 @@ export type OperationEnvelope = {
8182
8445
  */
8183
8446
  idempotentReplay?: boolean;
8184
8447
  };
8448
+ /**
8449
+ * OperationEnvelope[AssertMetricsResponse]
8450
+ */
8451
+ export type OperationEnvelopeAssertMetricsResponse = {
8452
+ /**
8453
+ * Operation
8454
+ *
8455
+ * Kebab-case operation name
8456
+ */
8457
+ operation: string;
8458
+ /**
8459
+ * Operationid
8460
+ *
8461
+ * op_-prefixed ULID for audit and SSE correlation
8462
+ */
8463
+ operationId: string;
8464
+ /**
8465
+ * Status
8466
+ *
8467
+ * Operation lifecycle state
8468
+ */
8469
+ status: 'completed' | 'pending' | 'failed';
8470
+ /**
8471
+ * Command-specific result payload
8472
+ */
8473
+ result?: AssertMetricsResponse | null;
8474
+ /**
8475
+ * At
8476
+ *
8477
+ * ISO-8601 UTC timestamp
8478
+ */
8479
+ at: string;
8480
+ /**
8481
+ * Createdby
8482
+ *
8483
+ * User ID that initiated the operation (null for legacy callers)
8484
+ */
8485
+ createdBy?: string | null;
8486
+ /**
8487
+ * Idempotentreplay
8488
+ *
8489
+ * True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.
8490
+ */
8491
+ idempotentReplay?: boolean;
8492
+ };
8185
8493
  /**
8186
8494
  * OperationEnvelope[AssociationResponse]
8187
8495
  */
@@ -8902,6 +9210,51 @@ export type OperationEnvelopeExecuteEventBlockResponse = {
8902
9210
  */
8903
9211
  idempotentReplay?: boolean;
8904
9212
  };
9213
+ /**
9214
+ * OperationEnvelope[FinancialStatementAnalysisResponse]
9215
+ */
9216
+ export type OperationEnvelopeFinancialStatementAnalysisResponse = {
9217
+ /**
9218
+ * Operation
9219
+ *
9220
+ * Kebab-case operation name
9221
+ */
9222
+ operation: string;
9223
+ /**
9224
+ * Operationid
9225
+ *
9226
+ * op_-prefixed ULID for audit and SSE correlation
9227
+ */
9228
+ operationId: string;
9229
+ /**
9230
+ * Status
9231
+ *
9232
+ * Operation lifecycle state
9233
+ */
9234
+ status: 'completed' | 'pending' | 'failed';
9235
+ /**
9236
+ * Command-specific result payload
9237
+ */
9238
+ result?: FinancialStatementAnalysisResponse | null;
9239
+ /**
9240
+ * At
9241
+ *
9242
+ * ISO-8601 UTC timestamp
9243
+ */
9244
+ at: string;
9245
+ /**
9246
+ * Createdby
9247
+ *
9248
+ * User ID that initiated the operation (null for legacy callers)
9249
+ */
9250
+ createdBy?: string | null;
9251
+ /**
9252
+ * Idempotentreplay
9253
+ *
9254
+ * True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.
9255
+ */
9256
+ idempotentReplay?: boolean;
9257
+ };
8905
9258
  /**
8906
9259
  * OperationEnvelope[FiscalCalendarResponse]
8907
9260
  */
@@ -9622,6 +9975,51 @@ export type OperationEnvelopeTaxonomyBlockEnvelope = {
9622
9975
  */
9623
9976
  idempotentReplay?: boolean;
9624
9977
  };
9978
+ /**
9979
+ * OperationEnvelope[ViewResponse]
9980
+ */
9981
+ export type OperationEnvelopeViewResponse = {
9982
+ /**
9983
+ * Operation
9984
+ *
9985
+ * Kebab-case operation name
9986
+ */
9987
+ operation: string;
9988
+ /**
9989
+ * Operationid
9990
+ *
9991
+ * op_-prefixed ULID for audit and SSE correlation
9992
+ */
9993
+ operationId: string;
9994
+ /**
9995
+ * Status
9996
+ *
9997
+ * Operation lifecycle state
9998
+ */
9999
+ status: 'completed' | 'pending' | 'failed';
10000
+ /**
10001
+ * Command-specific result payload
10002
+ */
10003
+ result?: ViewResponse | null;
10004
+ /**
10005
+ * At
10006
+ *
10007
+ * ISO-8601 UTC timestamp
10008
+ */
10009
+ at: string;
10010
+ /**
10011
+ * Createdby
10012
+ *
10013
+ * User ID that initiated the operation (null for legacy callers)
10014
+ */
10015
+ createdBy?: string | null;
10016
+ /**
10017
+ * Idempotentreplay
10018
+ *
10019
+ * True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.
10020
+ */
10021
+ idempotentReplay?: boolean;
10022
+ };
9625
10023
  /**
9626
10024
  * OperationEnvelope[list[PublishListMemberResponse]]
9627
10025
  */
@@ -11741,6 +12139,33 @@ export type ResetPasswordValidateResponse = {
11741
12139
  */
11742
12140
  email?: string | null;
11743
12141
  };
12142
+ /**
12143
+ * ResolvedReportInfo
12144
+ *
12145
+ * Information about the auto-resolved report.
12146
+ */
12147
+ export type ResolvedReportInfo = {
12148
+ /**
12149
+ * Report Id
12150
+ */
12151
+ report_id: string;
12152
+ /**
12153
+ * Form
12154
+ */
12155
+ form?: string | null;
12156
+ /**
12157
+ * Filing Date
12158
+ */
12159
+ filing_date?: string | null;
12160
+ /**
12161
+ * Fiscal Year
12162
+ */
12163
+ fiscal_year?: number | null;
12164
+ /**
12165
+ * Fiscal Period
12166
+ */
12167
+ fiscal_period?: string | null;
12168
+ };
11744
12169
  /**
11745
12170
  * ResponseMode
11746
12171
  *
@@ -15370,6 +15795,47 @@ export type ViewConfig = {
15370
15795
  */
15371
15796
  fill_value?: number;
15372
15797
  };
15798
+ /**
15799
+ * ViewMetadata
15800
+ */
15801
+ export type ViewMetadata = {
15802
+ /**
15803
+ * View Id
15804
+ *
15805
+ * Unique view identifier
15806
+ */
15807
+ view_id: string;
15808
+ /**
15809
+ * Facts Processed
15810
+ *
15811
+ * Number of facts processed
15812
+ */
15813
+ facts_processed: number;
15814
+ /**
15815
+ * Construction Time Ms
15816
+ *
15817
+ * Time to build view in milliseconds
15818
+ */
15819
+ construction_time_ms: number;
15820
+ /**
15821
+ * Source
15822
+ *
15823
+ * Data source type
15824
+ */
15825
+ source: string;
15826
+ /**
15827
+ * Period Start
15828
+ *
15829
+ * Period start date
15830
+ */
15831
+ period_start?: string | null;
15832
+ /**
15833
+ * Period End
15834
+ *
15835
+ * Period end date
15836
+ */
15837
+ period_end?: string | null;
15838
+ };
15373
15839
  /**
15374
15840
  * ViewProjections
15375
15841
  *
@@ -15394,6 +15860,23 @@ export type ViewProjections = {
15394
15860
  rendering?: RenderingLite | null;
15395
15861
  chart?: ChartLite | null;
15396
15862
  };
15863
+ /**
15864
+ * ViewResponse
15865
+ */
15866
+ export type ViewResponse = {
15867
+ /**
15868
+ * View metadata
15869
+ */
15870
+ metadata: ViewMetadata;
15871
+ /**
15872
+ * Presentations
15873
+ *
15874
+ * Presentation formats (pivot_table, narrative, etc.)
15875
+ */
15876
+ presentations: {
15877
+ [key: string]: unknown;
15878
+ };
15879
+ };
15397
15880
  /**
15398
15881
  * _CreateForecastArm
15399
15882
  *
@@ -17249,7 +17732,7 @@ export type ListConnectionsData = {
17249
17732
  *
17250
17733
  * Filter by provider type
17251
17734
  */
17252
- provider?: 'sec' | 'quickbooks' | null;
17735
+ provider?: 'sec' | 'quickbooks' | 'external' | null;
17253
17736
  };
17254
17737
  url: '/v1/graphs/{graph_id}/connections';
17255
17738
  };
@@ -22551,6 +23034,65 @@ export type ComputeMetricsResponses = {
22551
23034
  200: OperationEnvelopeComputeMetricsResponse;
22552
23035
  };
22553
23036
  export type ComputeMetricsResponse2 = ComputeMetricsResponses[keyof ComputeMetricsResponses];
23037
+ export type AssertMetricsData = {
23038
+ body: AssertMetricsRequest;
23039
+ headers?: {
23040
+ /**
23041
+ * Idempotency-Key
23042
+ */
23043
+ 'Idempotency-Key'?: string | null;
23044
+ };
23045
+ path: {
23046
+ /**
23047
+ * Graph Id
23048
+ */
23049
+ graph_id: string;
23050
+ };
23051
+ query?: never;
23052
+ url: '/extensions/roboledger/{graph_id}/operations/assert-metrics';
23053
+ };
23054
+ export type AssertMetricsErrors = {
23055
+ /**
23056
+ * Invalid request
23057
+ */
23058
+ 400: ErrorResponse;
23059
+ /**
23060
+ * Authentication required
23061
+ */
23062
+ 401: ErrorResponse;
23063
+ /**
23064
+ * Access denied
23065
+ */
23066
+ 403: ErrorResponse;
23067
+ /**
23068
+ * Resource not found
23069
+ */
23070
+ 404: ErrorResponse;
23071
+ /**
23072
+ * Idempotency-Key conflict — key reused with different body
23073
+ */
23074
+ 409: ErrorResponse;
23075
+ /**
23076
+ * Validation error
23077
+ */
23078
+ 422: ErrorResponse;
23079
+ /**
23080
+ * Rate limit exceeded
23081
+ */
23082
+ 429: ErrorResponse;
23083
+ /**
23084
+ * Internal server error
23085
+ */
23086
+ 500: ErrorResponse;
23087
+ };
23088
+ export type AssertMetricsError = AssertMetricsErrors[keyof AssertMetricsErrors];
23089
+ export type AssertMetricsResponses = {
23090
+ /**
23091
+ * Successful Response
23092
+ */
23093
+ 200: OperationEnvelopeAssertMetricsResponse;
23094
+ };
23095
+ export type AssertMetricsResponse2 = AssertMetricsResponses[keyof AssertMetricsResponses];
22554
23096
  export type ComputeForecastData = {
22555
23097
  body: ComputeForecastRequest;
22556
23098
  headers?: {
@@ -24377,7 +24919,7 @@ export type BuildFactGridResponses = {
24377
24919
  /**
24378
24920
  * Successful Response
24379
24921
  */
24380
- 200: OperationEnvelope;
24922
+ 200: OperationEnvelopeViewResponse;
24381
24923
  };
24382
24924
  export type BuildFactGridResponse = BuildFactGridResponses[keyof BuildFactGridResponses];
24383
24925
  export type FinancialStatementAnalysisData = {
@@ -24436,9 +24978,9 @@ export type FinancialStatementAnalysisResponses = {
24436
24978
  /**
24437
24979
  * Successful Response
24438
24980
  */
24439
- 200: OperationEnvelope;
24981
+ 200: OperationEnvelopeFinancialStatementAnalysisResponse;
24440
24982
  };
24441
- export type FinancialStatementAnalysisResponse = FinancialStatementAnalysisResponses[keyof FinancialStatementAnalysisResponses];
24983
+ export type FinancialStatementAnalysisResponse2 = FinancialStatementAnalysisResponses[keyof FinancialStatementAnalysisResponses];
24442
24984
  export type CreatePortfolioBlockData = {
24443
24985
  body: CreatePortfolioBlockRequest;
24444
24986
  headers?: {