@robosystems/client 0.5.3 → 0.5.4

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.ts CHANGED
@@ -1148,6 +1148,129 @@ export type ClosePeriodResponse = {
1148
1148
  evaluated_structure_ids?: Array<string>;
1149
1149
  };
1150
1150
 
1151
+ /**
1152
+ * ComputeMetricsRequest
1153
+ *
1154
+ * Request body for the ``compute-metrics`` operation.
1155
+ *
1156
+ * Resolves the ``Derive`` rules scoped to the metric block, binds each
1157
+ * rule's operands to the entity's most recent persisted report facts at
1158
+ * ``period_end``, evaluates, and upserts the period's standing
1159
+ * ``factset_type='metric'`` FactSet (re-running a period replaces its
1160
+ * facts). One standing FactSet per (structure, entity, period_end) — the
1161
+ * accumulating time series.
1162
+ */
1163
+ export type ComputeMetricsRequest = {
1164
+ /**
1165
+ * Structure Id
1166
+ *
1167
+ * Metric block structure (block_type='metric') to compute.
1168
+ */
1169
+ structure_id: string;
1170
+ /**
1171
+ * Period End
1172
+ *
1173
+ * Period end to compute at. Operands bind to report facts whose period_end matches exactly (instant balances as of this date; durations ending on it).
1174
+ */
1175
+ period_end: string;
1176
+ /**
1177
+ * Period Start
1178
+ *
1179
+ * Optional lower bound for duration-operand binding and the standing FactSet's period_start.
1180
+ */
1181
+ period_start?: string | null;
1182
+ /**
1183
+ * Entity Id
1184
+ *
1185
+ * Entity to compute for. Defaults to the graph's earliest-created entity (the primary entity for single-entity graphs).
1186
+ */
1187
+ entity_id?: string | null;
1188
+ };
1189
+
1190
+ /**
1191
+ * ComputeMetricsResponse
1192
+ *
1193
+ * Response for the ``compute-metrics`` operation.
1194
+ */
1195
+ export type ComputeMetricsResponse = {
1196
+ /**
1197
+ * Structure Id
1198
+ */
1199
+ structure_id: string;
1200
+ /**
1201
+ * Entity Id
1202
+ */
1203
+ entity_id: string;
1204
+ /**
1205
+ * Period End
1206
+ */
1207
+ period_end: string;
1208
+ /**
1209
+ * Fact Set Id
1210
+ *
1211
+ * Standing metric FactSet for the period — None when every metric was skipped and no prior set existed.
1212
+ */
1213
+ fact_set_id?: string | null;
1214
+ /**
1215
+ * Computed
1216
+ */
1217
+ computed?: Array<ComputedMetricLite>;
1218
+ /**
1219
+ * Skipped
1220
+ */
1221
+ skipped?: Array<SkippedMetricLite>;
1222
+ };
1223
+
1224
+ /**
1225
+ * ComputedMetricLite
1226
+ *
1227
+ * One metric computed by a ``compute-metrics`` run.
1228
+ */
1229
+ export type ComputedMetricLite = {
1230
+ /**
1231
+ * Rule Id
1232
+ *
1233
+ * Derive rule that produced the value.
1234
+ */
1235
+ rule_id: string;
1236
+ /**
1237
+ * Element Id
1238
+ *
1239
+ * Metric element the fact was written for.
1240
+ */
1241
+ element_id: string;
1242
+ /**
1243
+ * Element Qname
1244
+ *
1245
+ * Metric element qname (e.g. rs-metric:CurrentRatio).
1246
+ */
1247
+ element_qname?: string | null;
1248
+ /**
1249
+ * Name
1250
+ *
1251
+ * Metric display name.
1252
+ */
1253
+ name: string;
1254
+ /**
1255
+ * Value
1256
+ *
1257
+ * Computed value.
1258
+ */
1259
+ value: number;
1260
+ /**
1261
+ * Unit
1262
+ *
1263
+ * Fact unit — 'USD' for monetary, else 'pure'.
1264
+ */
1265
+ unit: string;
1266
+ /**
1267
+ * Period Type
1268
+ *
1269
+ * 'instant' or 'duration'.
1270
+ */
1271
+ period_type: string;
1272
+ };
1273
+
1151
1274
  /**
1152
1275
  * ConnectionLite
1153
1276
  *
@@ -7467,6 +7590,52 @@ export type OperationEnvelopeClosePeriodResponse = {
7467
7590
  idempotentReplay?: boolean;
7468
7591
  };
7469
7592
 
7593
+ /**
7594
+ * OperationEnvelope[ComputeMetricsResponse]
7595
+ */
7596
+ export type OperationEnvelopeComputeMetricsResponse = {
7597
+ /**
7598
+ * Operation
7599
+ *
7600
+ * Kebab-case operation name
7601
+ */
7602
+ operation: string;
7603
+ /**
7604
+ * Operationid
7605
+ *
7606
+ * op_-prefixed ULID for audit and SSE correlation
7607
+ */
7608
+ operationId: string;
7609
+ /**
7610
+ * Status
7611
+ *
7612
+ * Operation lifecycle state
7613
+ */
7614
+ status: 'completed' | 'pending' | 'failed';
7615
+ /**
7616
+ * Command-specific result payload
7617
+ */
7618
+ result?: ComputeMetricsResponse | null;
7619
+ /**
7620
+ * At
7621
+ *
7622
+ * ISO-8601 UTC timestamp
7623
+ */
7624
+ at: string;
7625
+ /**
7626
+ * Createdby
7627
+ *
7628
+ * User ID that initiated the operation (null for legacy callers)
7629
+ */
7630
+ createdBy?: string | null;
7631
+ /**
7632
+ * Idempotentreplay
7633
+ *
7634
+ * True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.
7635
+ */
7636
+ idempotentReplay?: boolean;
7637
+ };
7638
+
7470
7639
  /**
7471
7640
  * OperationEnvelope[DeleteInformationBlockResponse]
7472
7641
  */
@@ -11831,6 +12000,42 @@ export type ShareResultItem = {
11831
12000
  fact_count?: number;
11832
12001
  };
11833
12002
 
12003
+ /**
12004
+ * SkippedMetricLite
12005
+ *
12006
+ * One metric a ``compute-metrics`` run could not compute.
12007
+ *
12008
+ * Soft-fail by design: a missing operand fact (e.g. InterestExpense for a
12009
+ * debt-free entity) or an undefined ratio (division by zero) skips the
12010
+ * metric with a reason — it never errors the run.
12011
+ */
12012
+ export type SkippedMetricLite = {
12013
+ /**
12014
+ * Rule Id
12015
+ *
12016
+ * Derive rule that was skipped.
12017
+ */
12018
+ rule_id: string;
12019
+ /**
12020
+ * Element Qname
12021
+ *
12022
+ * Metric element qname the rule targets.
12023
+ */
12024
+ element_qname?: string | null;
12025
+ /**
12026
+ * Reason
12027
+ *
12028
+ * Why the metric was skipped.
12029
+ */
12030
+ reason: string;
12031
+ /**
12032
+ * Missing
12033
+ *
12034
+ * Operand qnames with no bound fact at the period, when applicable.
12035
+ */
12036
+ missing?: Array<string>;
12037
+ };
12038
+
11834
12039
  /**
11835
12040
  * SqlStatementRequest
11836
12041
  */
@@ -12020,6 +12225,11 @@ export type StructureSummary = {
12020
12225
  * StructureUpdatePatch
12021
12226
  *
12022
12227
  * Partial-update patch for a single structure, keyed by structure_id.
12228
+ *
12229
+ * ``concept_arrangement`` makes a mis-CAP'd structure repairable in
12230
+ * place (e.g. promoting a ``set`` note to ``roll_up`` so it gains a
12231
+ * footing rule); ``block_type`` stays immutable — it drives block-type
12232
+ * routing, so changing it is a re-create, not an edit.
12023
12233
  */
12024
12234
  export type StructureUpdatePatch = {
12025
12235
  /**
@@ -12040,6 +12250,10 @@ export type StructureUpdatePatch = {
12040
12250
  * Role Uri
12041
12251
  */
12042
12252
  role_uri?: string | null;
12253
+ /**
12254
+ * Concept Arrangement
12255
+ */
12256
+ concept_arrangement?: 'set' | 'roll_up' | 'roll_forward' | 'roll_forward_info' | 'adjustment' | 'variance' | 'arithmetic' | 'text_block' | 'level1_textblock' | 'level2_textblock' | 'level3_textblock' | 'level4_detail' | 'table_equivalent_textblock' | 'grid' | 'compound_fact' | null;
12043
12257
  /**
12044
12258
  * Metadata
12045
12259
  */
@@ -22022,6 +22236,70 @@ export type EvaluateRulesResponses = {
22022
22236
 
22023
22237
  export type EvaluateRulesResponse2 = EvaluateRulesResponses[keyof EvaluateRulesResponses];
22024
22238
 
22239
+ export type ComputeMetricsData = {
22240
+ body: ComputeMetricsRequest;
22241
+ headers?: {
22242
+ /**
22243
+ * Idempotency-Key
22244
+ */
22245
+ 'Idempotency-Key'?: string | null;
22246
+ };
22247
+ path: {
22248
+ /**
22249
+ * Graph Id
22250
+ */
22251
+ graph_id: string;
22252
+ };
22253
+ query?: never;
22254
+ url: '/extensions/roboledger/{graph_id}/operations/compute-metrics';
22255
+ };
22256
+
22257
+ export type ComputeMetricsErrors = {
22258
+ /**
22259
+ * Invalid request
22260
+ */
22261
+ 400: ErrorResponse;
22262
+ /**
22263
+ * Authentication required
22264
+ */
22265
+ 401: ErrorResponse;
22266
+ /**
22267
+ * Access denied
22268
+ */
22269
+ 403: ErrorResponse;
22270
+ /**
22271
+ * Resource not found
22272
+ */
22273
+ 404: ErrorResponse;
22274
+ /**
22275
+ * Idempotency-Key conflict — key reused with different body
22276
+ */
22277
+ 409: ErrorResponse;
22278
+ /**
22279
+ * Validation error
22280
+ */
22281
+ 422: ErrorResponse;
22282
+ /**
22283
+ * Rate limit exceeded
22284
+ */
22285
+ 429: ErrorResponse;
22286
+ /**
22287
+ * Internal server error
22288
+ */
22289
+ 500: ErrorResponse;
22290
+ };
22291
+
22292
+ export type ComputeMetricsError = ComputeMetricsErrors[keyof ComputeMetricsErrors];
22293
+
22294
+ export type ComputeMetricsResponses = {
22295
+ /**
22296
+ * Successful Response
22297
+ */
22298
+ 200: OperationEnvelopeComputeMetricsResponse;
22299
+ };
22300
+
22301
+ export type ComputeMetricsResponse2 = ComputeMetricsResponses[keyof ComputeMetricsResponses];
22302
+
22025
22303
  export type BindTextBlockData = {
22026
22304
  body: BindTextBlockRequest;
22027
22305
  headers?: {