@robosystems/client 1.17.1 → 2.0.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/sdk.gen.js CHANGED
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.resendOrgInvitation = exports.revokeOrgInvitation = exports.createOrgInvitation = exports.listOrgInvitations = exports.updateOrgMemberRole = exports.removeOrgMember = exports.listOrgMembers = exports.listOrgGraphs = exports.updateOrg = exports.getOrg = exports.listUserOrgs = exports.revokeUserOAuthGrant = exports.listUserOAuthGrants = exports.updateUserApiKey = exports.revokeUserApiKey = exports.createUserApiKey = exports.listUserApiKeys = exports.updateUserPassword = exports.updateUser = exports.getCurrentUser = exports.getServiceStatus = exports.getAuthProviders = exports.getCaptchaConfig = exports.regenerateMfaRecoveryCodes = exports.getMfaStatus = exports.verifyMfa = exports.getMfaOptions = exports.verifyPasskeyLogin = exports.getPasskeyLoginOptions = exports.deleteUserPasskey = exports.getPasskeyReauthOptions = exports.listUserPasskeys = exports.verifyPasskeyRegistration = exports.getPasskeyRegistrationOptions = exports.completeSsoAuth = exports.ssoTokenExchange = exports.generateSsoToken = exports.resetPassword = exports.validateResetToken = exports.forgotPassword = exports.checkPasswordStrength = exports.getPasswordPolicy = exports.getInvitationPreview = exports.verifyEmail = exports.resendVerificationEmail = exports.refreshAuthSession = exports.getCurrentAuthUser = exports.logoutUser = exports.loginUser = exports.registerUser = void 0;
5
5
  exports.deleteGraph = exports.deleteSubgraph = exports.createSubgraph = exports.recallMemory = exports.getMemory = exports.listMemories = exports.getDocument = exports.listDocuments = exports.getDocumentSection = exports.searchDocuments = exports.listTables = exports.cancelRepositorySubscription = exports.createRepositorySubscription = exports.changeSubscriptionPlan = exports.getGraphSubscription = exports.getSubgraphInfo = exports.listSubgraphs = exports.updateGraphMemberRole = exports.removeGraphMember = exports.addGraphMember = exports.listGraphMembers = exports.getGraphLimits = exports.getDatabaseInfo = exports.getDatabaseHealth = exports.listCreditTransactions = exports.getCreditSummary = exports.exportGraphSchema = exports.getGraphSchema = exports.executeSql = exports.executeCypher = exports.getGraphUsage = exports.getGraphMetrics = exports.getBackupStats = exports.getBackupDownloadUrl = exports.listBackups = exports.executeSpecificOperator = exports.getOperatorMetadata = exports.autoSelectOperator = exports.listOperators = exports.setConnectionWritePolicy = exports.getConnection = exports.deleteConnection = exports.createConnection = exports.listConnections = exports.oauthCallback = exports.initOAuth = exports.getConnectionOptions = exports.syncConnection = exports.getOrgUsage = exports.getOrgLimits = void 0;
6
- exports.updateInformationBlock = exports.createInformationBlock = exports.autoMapElements = exports.deleteMappingAssociation = exports.createMappingAssociation = exports.linkEntityTaxonomy = exports.deleteTaxonomyBlock = exports.updateTaxonomyBlock = exports.initializeChartOfAccounts = exports.createTaxonomyBlock = exports.changeReportingStyle = exports.updateEntity = exports.initializeLedger = exports.handleHttpPostExtensionsGraphIdGraphqlPost = exports.handleHttpGetExtensionsGraphIdGraphqlGet = exports.getCheckoutStatus = exports.createCheckoutSession = exports.getOrgUpcomingInvoice = exports.listOrgInvoices = exports.cancelOrgSubscription = exports.getOrgSubscription = exports.listOrgSubscriptions = exports.createPortalSession = exports.getOrgBillingCustomer = exports.resumeOperation = exports.cancelOperation = exports.getOperationStatus = exports.streamOperationEvents = exports.getServiceOfferings = exports.validateSchema = exports.selectGraph = exports.getGraphCapacity = exports.getAvailableGraphTiers = exports.getAvailableExtensions = exports.createGraph = exports.getGraphs = exports.getFile = exports.listFiles = exports.deleteFile = exports.ingestFile = exports.createFileUpload = exports.deleteDocument = exports.indexDocument = exports.updateMemory = exports.forget = exports.remember = exports.materialize = exports.updateGraphMetadata = exports.changeTier = exports.createBackup = void 0;
7
- exports.deleteSecurity = exports.updateSecurity = exports.createSecurity = exports.deletePortfolioBlock = exports.updatePortfolioBlock = exports.createPortfolioBlock = exports.informationBlock = exports.disclosures = exports.financialStatementAnalysis = exports.buildFactGrid = exports.liveFinancialStatement = exports.unblockSourceGraph = exports.blockSourceGraph = exports.removePublishListMember = exports.addPublishListMembers = exports.deletePublishList = exports.updatePublishList = exports.createPublishList = exports.transitionFilingStatus = exports.fileReport = exports.revokeReportShare = exports.shareReport = exports.deleteReport = exports.regenerateReport = exports.createReport = exports.backfillPlanHistory = exports.reopenPeriod = exports.closePeriod = exports.setCloseTarget = exports.terminateSchedule = exports.rebuildSchedule = exports.promoteObligations = exports.deleteJournalEntry = exports.updateJournalEntry = exports.resolveReconcilingItem = exports.previewReconcilingItem = exports.previewEventBlock = exports.updateEventHandler = exports.createEventHandler = exports.executeEventBlock = exports.updateEventBlock = exports.createEventBlock = exports.updateAgent = exports.createAgent = exports.bindTextBlock = exports.computeForecast = exports.assertMetrics = exports.computeMetrics = exports.evaluateRules = exports.deleteInformationBlock = void 0;
6
+ exports.updateInformationBlock = exports.createInformationBlock = exports.autoMapElements = exports.deleteMappingAssociation = exports.createMappingAssociation = exports.linkEntityTaxonomy = exports.deleteTaxonomyBlock = exports.updateTaxonomyBlock = exports.createTaxonomyBlock = exports.changeReportingStyle = exports.updateEntity = exports.initializeChartOfAccounts = exports.initializeLedger = exports.handleHttpPostExtensionsGraphIdGraphqlPost = exports.handleHttpGetExtensionsGraphIdGraphqlGet = exports.getCheckoutStatus = exports.createCheckoutSession = exports.getOrgUpcomingInvoice = exports.listOrgInvoices = exports.cancelOrgSubscription = exports.getOrgSubscription = exports.listOrgSubscriptions = exports.createPortalSession = exports.getOrgBillingCustomer = exports.resumeOperation = exports.cancelOperation = exports.getOperationStatus = exports.streamOperationEvents = exports.getServiceOfferings = exports.validateSchema = exports.selectGraph = exports.getGraphCapacity = exports.getAvailableGraphTiers = exports.getAvailableExtensions = exports.createGraph = exports.getGraphs = exports.getFile = exports.listFiles = exports.deleteFile = exports.ingestFile = exports.createFileUpload = exports.deleteDocument = exports.indexDocument = exports.updateMemory = exports.forget = exports.remember = exports.materialize = exports.updateGraphMetadata = exports.changeTier = exports.createBackup = void 0;
7
+ exports.deleteSecurity = exports.updateSecurity = exports.createSecurity = exports.deletePortfolioBlock = exports.updatePortfolioBlock = exports.createPortfolioBlock = exports.informationBlock = exports.disclosures = exports.financialStatementAnalysis = exports.buildFactGrid = exports.liveFinancialStatement = exports.unblockSourceGraph = exports.blockSourceGraph = exports.removePublishListMember = exports.addPublishListMembers = exports.deletePublishList = exports.updatePublishList = exports.createPublishList = exports.revokeReportShare = exports.shareReport = exports.transitionFilingStatus = exports.fileReport = exports.deleteReport = exports.regenerateReport = exports.createReport = exports.terminateSchedule = exports.rebuildSchedule = exports.promoteObligations = exports.backfillPlanHistory = exports.reopenPeriod = exports.closePeriod = exports.setCloseTarget = exports.deleteJournalEntry = exports.updateJournalEntry = exports.resolveReconcilingItem = exports.previewReconcilingItem = exports.previewEventBlock = exports.updateEventHandler = exports.createEventHandler = exports.executeEventBlock = exports.updateEventBlock = exports.createEventBlock = exports.updateAgent = exports.createAgent = exports.bindTextBlock = exports.computeForecast = exports.assertMetrics = exports.computeMetrics = exports.evaluateRules = exports.deleteInformationBlock = void 0;
8
8
  const client_gen_1 = require("./client.gen");
9
9
  /**
10
10
  * Register New User
@@ -1665,6 +1665,23 @@ const initializeLedger = (options) => (options.client ?? client_gen_1.client).po
1665
1665
  }
1666
1666
  });
1667
1667
  exports.initializeLedger = initializeLedger;
1668
+ /**
1669
+ * Initialize Chart of Accounts
1670
+ *
1671
+ * Create the graph's chart of accounts from a shipped template — the fresh-company path to native books. Use when the graph has NO chart (a QuickBooks-synced tenant never needs this: its chart arrives with the sync and stays after a sever) and before connecting a bank feed, which needs a chart to resolve against. Templates: `saas` (subscription software), `services` (professional services), `product` (inventory and COGS) — the `chartTemplates` GraphQL field lists them with names and account counts. Creates the chart, its `coa_mapping` structure and the template's CoA → rs-gaap mapping associations in one transaction, with the equity rows mapped by the entity's legal form (`entity_type`, defaulting to the graph's primary entity). One-time: 409 once a chart exists — a chart is never replaced. Customize afterwards with update-taxonomy-block; accounts that carry activity are never deleted.
1672
+ *
1673
+ * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
1674
+ */
1675
+ const initializeChartOfAccounts = (options) => (options.client ?? client_gen_1.client).post({
1676
+ security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
1677
+ url: '/extensions/roboledger/{graph_id}/operations/initialize-chart-of-accounts',
1678
+ ...options,
1679
+ headers: {
1680
+ 'Content-Type': 'application/json',
1681
+ ...options.headers
1682
+ }
1683
+ });
1684
+ exports.initializeChartOfAccounts = initializeChartOfAccounts;
1668
1685
  /**
1669
1686
  * Update Entity
1670
1687
  *
@@ -1716,23 +1733,6 @@ const createTaxonomyBlock = (options) => (options.client ?? client_gen_1.client)
1716
1733
  }
1717
1734
  });
1718
1735
  exports.createTaxonomyBlock = createTaxonomyBlock;
1719
- /**
1720
- * Initialize Chart of Accounts
1721
- *
1722
- * Create the graph's chart of accounts from a shipped template — the fresh-company path to native books. Use when the graph has NO chart (a QuickBooks-synced tenant never needs this: its chart arrives with the sync and stays after a sever) and before connecting a bank feed, which needs a chart to resolve against. Templates: `saas` (subscription software), `services` (professional services), `product` (inventory and COGS) — the `chartTemplates` GraphQL field lists them with names and account counts. Creates the chart, its `coa_mapping` structure and the template's CoA → rs-gaap mapping associations in one transaction, with the equity rows mapped by the entity's legal form (`entity_type`, defaulting to the graph's primary entity). One-time: 409 once a chart exists — a chart is never replaced. Customize afterwards with update-taxonomy-block; accounts that carry activity are never deleted.
1723
- *
1724
- * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
1725
- */
1726
- const initializeChartOfAccounts = (options) => (options.client ?? client_gen_1.client).post({
1727
- security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
1728
- url: '/extensions/roboledger/{graph_id}/operations/initialize-chart-of-accounts',
1729
- ...options,
1730
- headers: {
1731
- 'Content-Type': 'application/json',
1732
- ...options.headers
1733
- }
1734
- });
1735
- exports.initializeChartOfAccounts = initializeChartOfAccounts;
1736
1736
  /**
1737
1737
  * Update Taxonomy Block
1738
1738
  *
@@ -2025,7 +2025,7 @@ exports.createEventBlock = createEventBlock;
2025
2025
  /**
2026
2026
  * Update Event Block
2027
2027
  *
2028
- * Apply a status transition (captured → classified | committed | voided) and/or field corrections (description, effective_at, metadata_patch) to an existing event block. Only supplied fields are updated. captured → classified records an account choice without posting — for a bank-feed line, patch metadata.classified_element_id (or accept_suggestion: true) in the same call. When the transition is captured/classified → committed, the registered Python handler fires against the captured metadata to produce the GL rows; a bank-feed line with no account chosen and no matching rule is refused. Errors from the handler (validation, element resolution, closed period, unbalanced lines) surface as 422 here so the inbox UI can display the failure reason without retry.
2028
+ * Apply a status transition (captured → classified | committed | voided) and/or field corrections (description, effective_at, metadata_patch) to an existing event block. Only supplied fields are updated. captured → classified records an account choice without posting — for a bank-feed line, patch metadata.classified_element_id (or accept_suggestion: true) in the same call. When the transition is captured/classified → committed, the registered Python handler fires against the captured metadata to produce the GL rows, unless it already wrote them when the event was created; a bank-feed line with no account chosen and no matching rule is refused. Errors from the handler (validation, element resolution, closed period, unbalanced lines) surface as 422 here so the inbox UI can display the failure reason without retry.
2029
2029
  *
2030
2030
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2031
2031
  */
@@ -2176,124 +2176,124 @@ const deleteJournalEntry = (options) => (options.client ?? client_gen_1.client).
2176
2176
  });
2177
2177
  exports.deleteJournalEntry = deleteJournalEntry;
2178
2178
  /**
2179
- * Promote Due Schedule Obligations
2179
+ * Set Close Target
2180
2180
  *
2181
- * Promote matured pending schedule obligations (schedule_entry_due events whose period boundary has passed) to 'classified', and — when dispatch_handlers=true (default) — draft their closing entries in the same transaction. Also reaches stranded obligations: events already 'classified' (by an earlier flip-only sweep) whose closing entry was never drafted are dispatched in the same pass, and reported via stranded_count. This is the on-demand form of the background obligation-promotion sweep; run it before close-period when a schedule was just created or when you can't wait for the Dagster sensor. Idempotent: re-running skips already-classified obligations and reconciles to existing drafts.
2181
+ * Set the user-controlled goal period for closing (`close_target`). Format: YYYY-MM. Distinct from `closed_through` (what's actually locked) — setting a target doesn't close anything; call `close-period` for that. The catch-up sequence between `closed_through` and this target appears on the response's `fiscal_calendar.catch_up_sequence`.
2182
2182
  *
2183
2183
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2184
2184
  */
2185
- const promoteObligations = (options) => (options.client ?? client_gen_1.client).post({
2185
+ const setCloseTarget = (options) => (options.client ?? client_gen_1.client).post({
2186
2186
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
2187
- url: '/extensions/roboledger/{graph_id}/operations/promote-obligations',
2187
+ url: '/extensions/roboledger/{graph_id}/operations/set-close-target',
2188
2188
  ...options,
2189
2189
  headers: {
2190
2190
  'Content-Type': 'application/json',
2191
2191
  ...options.headers
2192
2192
  }
2193
2193
  });
2194
- exports.promoteObligations = promoteObligations;
2194
+ exports.setCloseTarget = setCloseTarget;
2195
2195
  /**
2196
- * Rebuild Schedule In Place
2196
+ * Close Fiscal Period
2197
2197
  *
2198
- * Re-run the schedule generator in place on an existing schedule. Atomic alternative to delete-then-recreate (which orphans pending obligations): preserves the structure id + element associations + taxonomy, voids the old pending obligation chain, deletes the old facts and SumEquals rules, and regenerates fresh forward facts + a fresh obligation chain from the schedule's stored definition (entry_template / schedule_metadata / monthly_amount / period bounds). The historical-vs-in-scope split is re-derived from the CURRENT fiscal calendar closed_through. Use this to pick up a fixed generator (e.g. the roll-forward direction fix) without orphaning obligations.
2198
+ * Lock a single fiscal period. Posts draft entries, runs the balance-sheet equation check, advances `closed_through` by one, auto-advances `close_target` if this close caught up to it, and stamps the period's canonical statement FactSets from the posted ledger (`statements_stamped` / `stamped_statement_sets` in the response; soft-skipped with `statement_stamp_note` when reporting isn't set up). Period must be exactly `closed_through + 1` — sequence violations return 422 with structured `blockers`. Common blockers: `sync_stale` (override with `allow_stale_sync=true` after manual verification), `period_incomplete` (draft entries unbalanced), `sequence_violation` (out-of-order).
2199
2199
  *
2200
2200
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2201
2201
  */
2202
- const rebuildSchedule = (options) => (options.client ?? client_gen_1.client).post({
2202
+ const closePeriod = (options) => (options.client ?? client_gen_1.client).post({
2203
2203
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
2204
- url: '/extensions/roboledger/{graph_id}/operations/rebuild-schedule',
2204
+ url: '/extensions/roboledger/{graph_id}/operations/close-period',
2205
2205
  ...options,
2206
2206
  headers: {
2207
2207
  'Content-Type': 'application/json',
2208
2208
  ...options.headers
2209
2209
  }
2210
2210
  });
2211
- exports.rebuildSchedule = rebuildSchedule;
2211
+ exports.closePeriod = closePeriod;
2212
2212
  /**
2213
- * Terminate Schedule Early
2213
+ * Reopen Fiscal Period
2214
2214
  *
2215
- * End a schedule early at a month-end cutoff without booking any entry. In one transaction: deletes forward facts past the cutoff (refusing when posted entries exist past it; stale drafts past it are deleted), voids the remaining obligation chain past the cutoff (pending and classified rows), and rewrites the SumEquals rule to prove the truncated curve. History at or before the cutoff is untouched, so open months the schedule still covers close normally. Use this when the termination's GL effect is already booked (an asset transferred via a manual entry, a prepaid refunded in the source system) or none is wanted; when the derecognition entry still needs to be booked, use create-event-block(event_type='asset_disposed') instead — the disposal handler posts it atomically with the same obligation void. Run BEFORE promote-obligations at close so terminated periods are never drafted.
2215
+ * Reopen a closed period for adjustment. Only the latest closed period (`closed_through`) can be reopened; it decrements by one and the period's entries become writable again. To reach an earlier month, reopen latest-first down to it, then re-close forward — an out-of-order reopen is refused (422) with the ordered list, because every later closed month carries statements stamped from the earlier month's numbers. Retracts the month's canonical statement FactSets (a reopened month is no longer a closed assertion; re-closing restamps them). The required `reason` is captured in the audit log. Use sparingly — reopen invalidates downstream artifacts that trusted the closed state (reports, shared filings).
2216
2216
  *
2217
2217
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2218
2218
  */
2219
- const terminateSchedule = (options) => (options.client ?? client_gen_1.client).post({
2219
+ const reopenPeriod = (options) => (options.client ?? client_gen_1.client).post({
2220
2220
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
2221
- url: '/extensions/roboledger/{graph_id}/operations/terminate-schedule',
2221
+ url: '/extensions/roboledger/{graph_id}/operations/reopen-period',
2222
2222
  ...options,
2223
2223
  headers: {
2224
2224
  'Content-Type': 'application/json',
2225
2225
  ...options.headers
2226
2226
  }
2227
2227
  });
2228
- exports.terminateSchedule = terminateSchedule;
2228
+ exports.reopenPeriod = reopenPeriod;
2229
2229
  /**
2230
- * Set Close Target
2230
+ * Backfill Plan History
2231
2231
  *
2232
- * Set the user-controlled goal period for closing (`close_target`). Format: YYYY-MM. Distinct from `closed_through` (what's actually locked) — setting a target doesn't close anything; call `close-period` for that. The catch-up sequence between `closed_through` and this target appears on the response's `fiscal_calendar.catch_up_sequence`.
2232
+ * Compile monthly statement history behind the close boundary — the plan's historical columns. Seeds any missing FiscalPeriod rows (baseline-closed) back to the clamped `start_period`, then restamps each month lacking canonical statement FactSets by running the real reopen → reclose cycle (balance validation, statement rules, and audit events per month). Chunked: at most `max_periods` months per call, oldest first — loop until `remaining_periods` comes back empty. Idempotent: already-stamped months are never touched. Months holding draft entries are skipped, never posted. `start_period` is clamped to the earliest month with ledger data, so deep-history tenants only backfill what actually exists.
2233
2233
  *
2234
2234
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2235
2235
  */
2236
- const setCloseTarget = (options) => (options.client ?? client_gen_1.client).post({
2236
+ const backfillPlanHistory = (options) => (options.client ?? client_gen_1.client).post({
2237
2237
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
2238
- url: '/extensions/roboledger/{graph_id}/operations/set-close-target',
2238
+ url: '/extensions/roboledger/{graph_id}/operations/backfill-plan-history',
2239
2239
  ...options,
2240
2240
  headers: {
2241
2241
  'Content-Type': 'application/json',
2242
2242
  ...options.headers
2243
2243
  }
2244
2244
  });
2245
- exports.setCloseTarget = setCloseTarget;
2245
+ exports.backfillPlanHistory = backfillPlanHistory;
2246
2246
  /**
2247
- * Close Fiscal Period
2247
+ * Promote Due Schedule Obligations
2248
2248
  *
2249
- * Lock a single fiscal period. Posts draft entries, runs the balance-sheet equation check, advances `closed_through` by one, auto-advances `close_target` if this close caught up to it, and stamps the period's canonical statement FactSets from the posted ledger (`statements_stamped` / `stamped_statement_sets` in the response; soft-skipped with `statement_stamp_note` when reporting isn't set up). Period must be exactly `closed_through + 1` — sequence violations return 422 with structured `blockers`. Common blockers: `sync_stale` (override with `allow_stale_sync=true` after manual verification), `period_incomplete` (draft entries unbalanced), `sequence_violation` (out-of-order).
2249
+ * Promote matured pending schedule obligations (schedule_entry_due events whose period boundary has passed) to 'classified', and — when dispatch_handlers=true (default) — draft their closing entries in the same transaction. Also reaches stranded obligations: events already 'classified' (by an earlier flip-only sweep) whose closing entry was never drafted are dispatched in the same pass, and reported via stranded_count. This is the on-demand form of the background obligation-promotion sweep; run it before close-period when a schedule was just created or when you can't wait for the Dagster sensor. Idempotent: re-running skips already-classified obligations and reconciles to existing drafts.
2250
2250
  *
2251
2251
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2252
2252
  */
2253
- const closePeriod = (options) => (options.client ?? client_gen_1.client).post({
2253
+ const promoteObligations = (options) => (options.client ?? client_gen_1.client).post({
2254
2254
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
2255
- url: '/extensions/roboledger/{graph_id}/operations/close-period',
2255
+ url: '/extensions/roboledger/{graph_id}/operations/promote-obligations',
2256
2256
  ...options,
2257
2257
  headers: {
2258
2258
  'Content-Type': 'application/json',
2259
2259
  ...options.headers
2260
2260
  }
2261
2261
  });
2262
- exports.closePeriod = closePeriod;
2262
+ exports.promoteObligations = promoteObligations;
2263
2263
  /**
2264
- * Reopen Fiscal Period
2264
+ * Rebuild Schedule In Place
2265
2265
  *
2266
- * Reopen a closed period for adjustment. Only the latest closed period (`closed_through`) can be reopened; it decrements by one and the period's entries become writable again. To reach an earlier month, reopen latest-first down to it, then re-close forward — an out-of-order reopen is refused (422) with the ordered list, because every later closed month carries statements stamped from the earlier month's numbers. Retracts the month's canonical statement FactSets (a reopened month is no longer a closed assertion; re-closing restamps them). The required `reason` is captured in the audit log. Use sparingly — reopen invalidates downstream artifacts that trusted the closed state (reports, shared filings).
2266
+ * Re-run the schedule generator in place on an existing schedule. Atomic alternative to delete-then-recreate (which orphans pending obligations): preserves the structure id + element associations + taxonomy, voids the old pending obligation chain, deletes the old facts and SumEquals rules, and regenerates fresh forward facts + a fresh obligation chain from the schedule's stored definition (entry_template / schedule_metadata / monthly_amount / period bounds). The historical-vs-in-scope split is re-derived from the CURRENT fiscal calendar closed_through. Use this to pick up a fixed generator (e.g. the roll-forward direction fix) without orphaning obligations.
2267
2267
  *
2268
2268
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2269
2269
  */
2270
- const reopenPeriod = (options) => (options.client ?? client_gen_1.client).post({
2270
+ const rebuildSchedule = (options) => (options.client ?? client_gen_1.client).post({
2271
2271
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
2272
- url: '/extensions/roboledger/{graph_id}/operations/reopen-period',
2272
+ url: '/extensions/roboledger/{graph_id}/operations/rebuild-schedule',
2273
2273
  ...options,
2274
2274
  headers: {
2275
2275
  'Content-Type': 'application/json',
2276
2276
  ...options.headers
2277
2277
  }
2278
2278
  });
2279
- exports.reopenPeriod = reopenPeriod;
2279
+ exports.rebuildSchedule = rebuildSchedule;
2280
2280
  /**
2281
- * Backfill Plan History
2281
+ * Terminate Schedule Early
2282
2282
  *
2283
- * Compile monthly statement history behind the close boundary — the plan's historical columns. Seeds any missing FiscalPeriod rows (baseline-closed) back to the clamped `start_period`, then restamps each month lacking canonical statement FactSets by running the real reopen → reclose cycle (balance validation, statement rules, and audit events per month). Chunked: at most `max_periods` months per call, oldest first — loop until `remaining_periods` comes back empty. Idempotent: already-stamped months are never touched. Months holding draft entries are skipped, never posted. `start_period` is clamped to the earliest month with ledger data, so deep-history tenants only backfill what actually exists.
2283
+ * End a schedule early at a month-end cutoff without booking any entry. In one transaction: deletes forward facts past the cutoff (refusing when posted entries exist past it; stale drafts past it are deleted), voids the remaining obligation chain past the cutoff (pending and classified rows), and rewrites the SumEquals rule to prove the truncated curve. History at or before the cutoff is untouched, so open months the schedule still covers close normally. Use this when the termination's GL effect is already booked (an asset transferred via a manual entry, a prepaid refunded in the source system) or none is wanted; when the derecognition entry still needs to be booked, use create-event-block(event_type='asset_disposed') instead — the disposal handler posts it atomically with the same obligation void. Run BEFORE promote-obligations at close so terminated periods are never drafted.
2284
2284
  *
2285
2285
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2286
2286
  */
2287
- const backfillPlanHistory = (options) => (options.client ?? client_gen_1.client).post({
2287
+ const terminateSchedule = (options) => (options.client ?? client_gen_1.client).post({
2288
2288
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
2289
- url: '/extensions/roboledger/{graph_id}/operations/backfill-plan-history',
2289
+ url: '/extensions/roboledger/{graph_id}/operations/terminate-schedule',
2290
2290
  ...options,
2291
2291
  headers: {
2292
2292
  'Content-Type': 'application/json',
2293
2293
  ...options.headers
2294
2294
  }
2295
2295
  });
2296
- exports.backfillPlanHistory = backfillPlanHistory;
2296
+ exports.terminateSchedule = terminateSchedule;
2297
2297
  /**
2298
2298
  * Create Report
2299
2299
  *
@@ -2346,73 +2346,73 @@ const deleteReport = (options) => (options.client ?? client_gen_1.client).post({
2346
2346
  });
2347
2347
  exports.deleteReport = deleteReport;
2348
2348
  /**
2349
- * Share Report
2349
+ * File Report
2350
2350
  *
2351
- * Pushes a published report to every member of the target publish list. Each share is an independent copy: the report row + all its facts are cloned into the recipient's tenant schema with `source_graph_id` / `source_report_id` provenance fields populated. Per-target outcomes (success or error) surface in the response — share does not fail-fast across targets. Recipients that have blocked this graph come back as an error for that target; withdraw a delivered copy with `revoke-report-share`.
2351
+ * Transitions the Report's filing_status to 'filed' — locks the package. Allowed from 'draft' or 'under_review'. Stamps filed_at + filed_by.
2352
2352
  *
2353
2353
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2354
2354
  */
2355
- const shareReport = (options) => (options.client ?? client_gen_1.client).post({
2355
+ const fileReport = (options) => (options.client ?? client_gen_1.client).post({
2356
2356
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
2357
- url: '/extensions/roboledger/{graph_id}/operations/share-report',
2357
+ url: '/extensions/roboledger/{graph_id}/operations/file-report',
2358
2358
  ...options,
2359
2359
  headers: {
2360
2360
  'Content-Type': 'application/json',
2361
2361
  ...options.headers
2362
2362
  }
2363
2363
  });
2364
- exports.shareReport = shareReport;
2364
+ exports.fileReport = fileReport;
2365
2365
  /**
2366
- * Revoke Report Share
2366
+ * Transition Filing Status
2367
2367
  *
2368
- * Withdraws a report previously shared to one recipient graph: deletes the copy from that recipient's schema and stamps the share record revoked. Scoped to a single recipient — withdrawing a distribution to a whole publish list is one call per member. A recipient who already deleted the copy is not an error; the share is still marked revoked and `copy_deleted` returns false. The linked entity in the recipient's graph is left in place, so an investor's declared holding survives.
2368
+ * Move a Report along the non-file legs of the filing lifecycle (draft ↔ under_review, filed → archived). Use 'file-report' to reach 'filed' so audit fields land cleanly.
2369
2369
  *
2370
2370
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2371
2371
  */
2372
- const revokeReportShare = (options) => (options.client ?? client_gen_1.client).post({
2372
+ const transitionFilingStatus = (options) => (options.client ?? client_gen_1.client).post({
2373
2373
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
2374
- url: '/extensions/roboledger/{graph_id}/operations/revoke-report-share',
2374
+ url: '/extensions/roboledger/{graph_id}/operations/transition-filing-status',
2375
2375
  ...options,
2376
2376
  headers: {
2377
2377
  'Content-Type': 'application/json',
2378
2378
  ...options.headers
2379
2379
  }
2380
2380
  });
2381
- exports.revokeReportShare = revokeReportShare;
2381
+ exports.transitionFilingStatus = transitionFilingStatus;
2382
2382
  /**
2383
- * File Report
2383
+ * Share Report
2384
2384
  *
2385
- * Transitions the Report's filing_status to 'filed' — locks the package. Allowed from 'draft' or 'under_review'. Stamps filed_at + filed_by.
2385
+ * Pushes a published report to every member of the target publish list. Each share is an independent copy: the report row + all its facts are cloned into the recipient's tenant schema with `source_graph_id` / `source_report_id` provenance fields populated. Per-target outcomes (success or error) surface in the response — share does not fail-fast across targets. Recipients that have blocked this graph come back as an error for that target; withdraw a delivered copy with `revoke-report-share`.
2386
2386
  *
2387
2387
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2388
2388
  */
2389
- const fileReport = (options) => (options.client ?? client_gen_1.client).post({
2389
+ const shareReport = (options) => (options.client ?? client_gen_1.client).post({
2390
2390
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
2391
- url: '/extensions/roboledger/{graph_id}/operations/file-report',
2391
+ url: '/extensions/roboledger/{graph_id}/operations/share-report',
2392
2392
  ...options,
2393
2393
  headers: {
2394
2394
  'Content-Type': 'application/json',
2395
2395
  ...options.headers
2396
2396
  }
2397
2397
  });
2398
- exports.fileReport = fileReport;
2398
+ exports.shareReport = shareReport;
2399
2399
  /**
2400
- * Transition Filing Status
2400
+ * Revoke Report Share
2401
2401
  *
2402
- * Move a Report along the non-file legs of the filing lifecycle (draft ↔ under_review, filed → archived). Use 'file-report' to reach 'filed' so audit fields land cleanly.
2402
+ * Withdraws a report previously shared to one recipient graph: deletes the copy from that recipient's schema and stamps the share record revoked. Scoped to a single recipient — withdrawing a distribution to a whole publish list is one call per member. A recipient who already deleted the copy is not an error; the share is still marked revoked and `copy_deleted` returns false. The linked entity in the recipient's graph is left in place, so an investor's declared holding survives.
2403
2403
  *
2404
2404
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2405
2405
  */
2406
- const transitionFilingStatus = (options) => (options.client ?? client_gen_1.client).post({
2406
+ const revokeReportShare = (options) => (options.client ?? client_gen_1.client).post({
2407
2407
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
2408
- url: '/extensions/roboledger/{graph_id}/operations/transition-filing-status',
2408
+ url: '/extensions/roboledger/{graph_id}/operations/revoke-report-share',
2409
2409
  ...options,
2410
2410
  headers: {
2411
2411
  'Content-Type': 'application/json',
2412
2412
  ...options.headers
2413
2413
  }
2414
2414
  });
2415
- exports.transitionFilingStatus = transitionFilingStatus;
2415
+ exports.revokeReportShare = revokeReportShare;
2416
2416
  /**
2417
2417
  * Create Publish List
2418
2418
  *