@cobre-npm/library-response-catalog-node 0.3.0 → 0.5.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.
@@ -0,0 +1,7 @@
1
+ import type { SupplierErrorContext } from '../../domain/core/models/supplier-error-context';
2
+ import type { CatalogUnavailableReason } from './catalog-unavailable-reason';
3
+ import type { ResolvedFallback } from './resolved-fallback';
4
+ export interface FallbackActivationRecorder {
5
+ record(context: SupplierErrorContext, fallback: ResolvedFallback, reason: CatalogUnavailableReason): void;
6
+ }
7
+ //# sourceMappingURL=fallback-activation-recorder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fallback-activation-recorder.d.ts","sourceRoot":"","sources":["../../../src/adapter/http/fallback-activation-recorder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAA;AAC3F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAA;AAC5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE3D,MAAM,WAAW,0BAA0B;IACzC,MAAM,CACJ,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,gBAAgB,EAC1B,MAAM,EAAE,wBAAwB,GAC/B,IAAI,CAAA;CACR"}
@@ -0,0 +1,14 @@
1
+ import type { Response } from '../../domain/core/models/response';
2
+ import type { SupplierErrorContext } from '../../domain/core/models/supplier-error-context';
3
+ import type { ResolvedFallback } from './resolved-fallback';
4
+ /**
5
+ * Builds the degraded {@link Response} returned when the catalog is
6
+ * unavailable. `internal` and `api` are null because there is no catalog entry
7
+ * to populate them — see `docs/fallback.md`.
8
+ *
9
+ * @param context - The supplier error being resolved
10
+ * @param fallback - The locally resolved token
11
+ * @returns A response carrying the token as `resolvedMessage`
12
+ */
13
+ export declare const createFallbackResponse: (context: SupplierErrorContext, fallback: ResolvedFallback) => Response;
14
+ //# sourceMappingURL=fallback-response.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fallback-response.d.ts","sourceRoot":"","sources":["../../../src/adapter/http/fallback-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAA;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAA;AAC3F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAE3D;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,GACjC,SAAS,oBAAoB,EAC7B,UAAU,gBAAgB,KACzB,QAWD,CAAA"}
@@ -0,0 +1,9 @@
1
+ import type { FallbackActivationRecorder } from './fallback-activation-recorder';
2
+ /**
3
+ * Records fallback activations as an OpenTelemetry counter plus a warning log.
4
+ * The counter is created once, when the recorder is built, and closed over.
5
+ *
6
+ * @returns A recorder wired to the process meter provider
7
+ */
8
+ export declare const createTelemetryFallbackActivationRecorder: () => FallbackActivationRecorder;
9
+ //# sourceMappingURL=telemetry-fallback-activation-recorder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"telemetry-fallback-activation-recorder.d.ts","sourceRoot":"","sources":["../../../src/adapter/http/telemetry-fallback-activation-recorder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAA;AA+BhF;;;;;GAKG;AACH,eAAO,MAAM,yCAAyC,QAAO,0BAmB5D,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobre-npm/library-response-catalog-node",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "packageManager": "pnpm@10.27.0",
5
5
  "description": "Node.js Cobre library for resolving supplier errors against the Response Catalog Read API",
6
6
  "main": "dist/index.js",