@oxy.so/federation 2.9.0 → 2.10.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.
@@ -16,11 +16,17 @@
16
16
  * pipeline). The banner mirror is best-effort: a failure there must never discard
17
17
  * an already-successful user resolution.
18
18
  */
19
+ import { type ResponsePayload } from '@oxy.so/core';
19
20
  import type { NormalizedExternalActor } from '../index';
20
21
  /** The HTTP methods the service-scoped oxy-api transport is invoked with. */
21
22
  export type ServiceRequestMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
22
- /** The service-scoped request transport oxy-api calls go through (`{ data }`-unwrapped). */
23
- export type ServiceRequest = <T>(method: ServiceRequestMethod, path: string, body?: unknown) => Promise<T>;
23
+ /**
24
+ * The service-scoped request transport oxy-api calls go through: core's
25
+ * `serviceRequest`, whose `T` is the `{ data }`-unwrapped payload. Typed as core
26
+ * types it, so an app passes `serviceRequest` straight through and a `T` naming
27
+ * the envelope fails to compile here as it does there.
28
+ */
29
+ export type ServiceRequest = <T>(method: ServiceRequestMethod, path: string, body?: unknown) => Promise<ResponsePayload<T>>;
24
30
  /** Minimal logging sink the identity bridge writes to. */
25
31
  export interface IdentityBridgeLogger {
26
32
  info(message: string, meta?: unknown): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxy.so/federation",
3
- "version": "2.9.0",
3
+ "version": "2.10.0",
4
4
  "description": "Oxy Federation — the app-agnostic ActivityPub identity + follow engine substrate: the network-connector contract, normalized cross-network DTOs, HTTP signatures, actor resolution, the outbound delivery transport + follow lifecycle, the inbound dispatcher, and the webfinger/actor/inbox Express routers. Domain-parameterized so every Oxy app backend federates under its own domain.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -80,7 +80,7 @@
80
80
  },
81
81
  "dependencies": {
82
82
  "@oxy.so/contracts": "^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || 4.11.0-oxy-one.0",
83
- "@oxy.so/core": "^1.0.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0"
83
+ "@oxy.so/core": "^6.14.0"
84
84
  },
85
85
  "peerDependencies": {
86
86
  "express": "^4.18.0 || ^5.0.0"
@@ -17,18 +17,23 @@
17
17
  * an already-successful user resolution.
18
18
  */
19
19
 
20
- import { getErrorMessage, getErrorStatus } from '@oxy.so/core';
20
+ import { getErrorMessage, getErrorStatus, type ResponsePayload } from '@oxy.so/core';
21
21
  import type { NormalizedExternalActor } from '../index';
22
22
 
23
23
  /** The HTTP methods the service-scoped oxy-api transport is invoked with. */
24
24
  export type ServiceRequestMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
25
25
 
26
- /** The service-scoped request transport oxy-api calls go through (`{ data }`-unwrapped). */
26
+ /**
27
+ * The service-scoped request transport oxy-api calls go through: core's
28
+ * `serviceRequest`, whose `T` is the `{ data }`-unwrapped payload. Typed as core
29
+ * types it, so an app passes `serviceRequest` straight through and a `T` naming
30
+ * the envelope fails to compile here as it does there.
31
+ */
27
32
  export type ServiceRequest = <T>(
28
33
  method: ServiceRequestMethod,
29
34
  path: string,
30
35
  body?: unknown,
31
- ) => Promise<T>;
36
+ ) => Promise<ResponsePayload<T>>;
32
37
 
33
38
  /** Minimal logging sink the identity bridge writes to. */
34
39
  export interface IdentityBridgeLogger {