@opengeni/api-router 0.11.1 → 0.11.8

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/dist/app.d.ts CHANGED
@@ -1,7 +1,7 @@
1
+ import { SessionEvent, ErrorCode } from '@opengeni/contracts';
1
2
  import { Hono } from 'hono';
2
3
  import { AppDependencies } from '@opengeni/core';
3
4
  export { ApiRouteDeps, AppDependencies, DocumentIndexClient, ObjectStorageDependency, SessionWorkflowClient, mergeResourceRefs, mergeToolRefs, normalizeResources, validateFileResources, validateGitHubRepositorySelection, validateGitHubRepositorySelectionShape, validateGitHubRepositorySelectionShapes, validateToolRefs, withDefaultEnabledCapabilityMcpTools, workflowIdForSession } from '@opengeni/core';
4
- import { SessionEvent } from '@opengeni/contracts';
5
5
  import { Database } from '@opengeni/db';
6
6
  import { EventBus } from '@opengeni/events';
7
7
  import { Observability } from '@opengeni/observability';
@@ -31,6 +31,7 @@ declare const API_MAX_REQUEST_BODY_BYTES: number;
31
31
  declare function createApp(deps: AppDependencies): Hono;
32
32
  declare function allowedCorsOrigin(pattern: string, origin: string): boolean;
33
33
  declare function httpStatusForError(error: unknown): number;
34
+ declare function errorCodeForStatus(status: number): ErrorCode;
34
35
  declare function routeLabel(pathname: string): string;
35
36
  /**
36
37
  * State-changing OpenGeni HTTP calls must never cross an incompatible rollout
@@ -39,4 +40,4 @@ declare function routeLabel(pathname: string): string;
39
40
  */
40
41
  declare function isApiContractProtectedMutation(method: string, pathname: string): boolean;
41
42
 
42
- export { API_MAX_REQUEST_BODY_BYTES, allowedCorsOrigin, createApp, httpStatusForError, isApiContractProtectedMutation, replaySessionEvents, routeLabel, sseSessionStream, sseWorkspaceControlStream };
43
+ export { API_MAX_REQUEST_BODY_BYTES, allowedCorsOrigin, createApp, errorCodeForStatus, httpStatusForError, isApiContractProtectedMutation, replaySessionEvents, routeLabel, sseSessionStream, sseWorkspaceControlStream };
package/dist/app.js CHANGED
@@ -2,6 +2,7 @@ import {
2
2
  API_MAX_REQUEST_BODY_BYTES,
3
3
  allowedCorsOrigin,
4
4
  createApp,
5
+ errorCodeForStatus,
5
6
  httpStatusForError,
6
7
  isApiContractProtectedMutation,
7
8
  mergeResourceRefs,
@@ -18,11 +19,12 @@ import {
18
19
  validateToolRefs,
19
20
  withDefaultEnabledCapabilityMcpTools,
20
21
  workflowIdForSession
21
- } from "./chunk-7PQKPKW5.js";
22
+ } from "./chunk-DQWFAIPE.js";
22
23
  export {
23
24
  API_MAX_REQUEST_BODY_BYTES,
24
25
  allowedCorsOrigin,
25
26
  createApp,
27
+ errorCodeForStatus,
26
28
  httpStatusForError,
27
29
  isApiContractProtectedMutation,
28
30
  mergeResourceRefs,