@north-light/api 0.3.486 → 0.3.488

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.
@@ -1,5 +1,5 @@
1
1
  /** The contract level this build serves and requires. Written by `scripts/contract.mjs release`; never edit by hand. */
2
- export declare const CONTRACT_LEVEL = "1.11";
2
+ export declare const CONTRACT_LEVEL = "1.12";
3
3
  /** Request header naming the one contract level the caller needs, e.g. `1.3`. Optional: absent means no check. */
4
4
  export declare const REQUIRED_CONTRACT_HEADER = "Crouter-Required-Contract";
5
5
  /** Response header listing the contract levels the server serves, comma-separated, one per major, e.g. `1.3`. */
@@ -12,7 +12,7 @@
12
12
  //
13
13
  // PURITY (spec §3.1): Node built-ins + `src/api/*` only.
14
14
  /** The contract level this build serves and requires. Written by `scripts/contract.mjs release`; never edit by hand. */
15
- export const CONTRACT_LEVEL = '1.11';
15
+ export const CONTRACT_LEVEL = '1.12';
16
16
  /** Request header naming the one contract level the caller needs, e.g. `1.3`. Optional: absent means no check. */
17
17
  export const REQUIRED_CONTRACT_HEADER = 'Crouter-Required-Contract';
18
18
  /** Response header listing the contract levels the server serves, comma-separated, one per major, e.g. `1.3`. */
@@ -49,4 +49,5 @@ export * from './dto/chat-inventory.js';
49
49
  export * from './dto/analytics.js';
50
50
  export * from './dto/custom-objects.js';
51
51
  export * from './dto/plugins.js';
52
- export type { WatchRequest, WatchResultDTO, UnwatchQuery, UnwatchResultDTO } from './dto/objects.js';
52
+ export type { DeliveryRuleDTO, DocEditRequest, DocEditedDTO, DocKindName, DocUnsetField, DocWriteRequest, DocWrittenDTO, DocLinkReportDTO, DocStaleDTO, RuleDeliverName, RuleOnName, } from './dto/docs.js';
53
+ export type { DocumentReadData, ObjectDTO, ObjectReadDTO, WatchRequest, WatchResultDTO, UnwatchQuery, UnwatchResultDTO } from './dto/objects.js';
@@ -26,7 +26,9 @@ export function validateEndpoint(endpoint) {
26
26
  export function normalizeEndpoint(endpoint) {
27
27
  try {
28
28
  const url = new URL(endpoint);
29
- const pathname = url.pathname.length > 1 && url.pathname.endsWith('/') ? url.pathname.slice(0, -1) : url.pathname;
29
+ // A bare origin has pathname '/', which must also go: the directory registers a provider endpoint exactly as written (no trailing slash),
30
+ // and the outbound mint audience has to equal it.
31
+ const pathname = url.pathname.endsWith('/') ? url.pathname.slice(0, -1) : url.pathname;
30
32
  return `${url.protocol}//${url.host}${pathname}${url.search}`;
31
33
  }
32
34
  catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@north-light/api",
3
- "version": "0.3.486",
3
+ "version": "0.3.488",
4
4
  "description": "Typed crtrd /v1 API contract — DTOs, route builders, the error contract, the CrtrClient, and the command-plugin manifest format. Zero runtime dependencies.",
5
5
  "type": "module",
6
6
  "main": "./dist/api/index.js",