@nexussdk/contracts 0.0.1 → 0.0.4

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/README.md ADDED
@@ -0,0 +1,32 @@
1
+ # @nexussdk/contracts
2
+
3
+ Single Source of Truth (SSOT) data contracts and TypeScript interfaces for the **Nexus Platform** ecosystem.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@nexussdk/contracts.svg)](https://www.npmjs.com/package/@nexussdk/contracts)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
+
8
+ ---
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ npm install @nexussdk/contracts
14
+ # or
15
+ pnpm add @nexussdk/contracts
16
+ ```
17
+
18
+ ---
19
+
20
+ ## Exports
21
+
22
+ - `@nexussdk/contracts`: Root unified types
23
+ - `@nexussdk/contracts/flags`: Feature flag, evaluation rule, and rollout segment definitions
24
+ - `@nexussdk/contracts/tracker`: Telemetry event, breadcrumb, and exception payload interfaces
25
+ - `@nexussdk/contracts/auth`: Client key and environment metadata definitions
26
+ - `@nexussdk/contracts/rfc7807`: Problem Details standard error structures
27
+
28
+ ---
29
+
30
+ ## License
31
+
32
+ MIT © [Nexus Platform](https://github.com/Huynhdung295/NexusSDK)
package/dist/auth.cjs CHANGED
@@ -1,4 +1 @@
1
- 'use strict';
2
-
3
- //# sourceMappingURL=auth.cjs.map
4
- //# sourceMappingURL=auth.cjs.map
1
+ 'use strict';
package/dist/auth.mjs CHANGED
@@ -1,3 +0,0 @@
1
-
2
- //# sourceMappingURL=auth.mjs.map
3
- //# sourceMappingURL=auth.mjs.map
package/dist/flags.cjs CHANGED
@@ -1,4 +1 @@
1
- 'use strict';
2
-
3
- //# sourceMappingURL=flags.cjs.map
4
- //# sourceMappingURL=flags.cjs.map
1
+ 'use strict';
package/dist/flags.mjs CHANGED
@@ -1,3 +0,0 @@
1
-
2
- //# sourceMappingURL=flags.mjs.map
3
- //# sourceMappingURL=flags.mjs.map
package/dist/index.cjs CHANGED
@@ -1,8 +1,2 @@
1
- 'use strict';
2
-
3
- // src/rfc7807.ts
4
- var NEXUS_ERROR_BASE = "https://nexus.dev/errors";
5
-
6
- exports.NEXUS_ERROR_BASE = NEXUS_ERROR_BASE;
7
- //# sourceMappingURL=index.cjs.map
8
- //# sourceMappingURL=index.cjs.map
1
+ 'use strict';var t="https://nexus.dev/errors";
2
+ exports.NEXUS_ERROR_BASE=t;
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { Account, AccountStatus, ApiKey, ApiKeyType, Environment, GeneratedApiKeyResponse, LoginDto, PlanTier, Project, RegisterAccountDto, SessionPayload } from './auth.mjs';
2
2
  export { BatchFlagEvaluation, CreateFlagDto, FeatureFlag, FlagEvaluationResult, FlagStreamEvent, FlagVariants, RuleOperator, TargetingRule, UpdateFlagDto, UserContext, VariantValue } from './flags.mjs';
3
- export { Breadcrumb, BreadcrumbCategory, DeviceContext, ErrorEventEntity, ErrorEventPayload, ErrorGroupSummary, SeverityLevel, StackFrame } from './tracker.mjs';
3
+ export { Breadcrumb, BreadcrumbCategory, DevServerEventEnvelope, DeviceContext, ErrorEventEntity, ErrorEventPayload, ErrorGroupSummary, NexusErrorInfo, PerformanceVitalEntry, PerformanceVitalsOptions, SamplingConfig, SeverityLevel, StackFrame, TransportPlugin, VitalMetricName } from './tracker.mjs';
4
4
  export { NEXUS_ERROR_BASE, ProblemDetails } from './rfc7807.mjs';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { Account, AccountStatus, ApiKey, ApiKeyType, Environment, GeneratedApiKeyResponse, LoginDto, PlanTier, Project, RegisterAccountDto, SessionPayload } from './auth.js';
2
2
  export { BatchFlagEvaluation, CreateFlagDto, FeatureFlag, FlagEvaluationResult, FlagStreamEvent, FlagVariants, RuleOperator, TargetingRule, UpdateFlagDto, UserContext, VariantValue } from './flags.js';
3
- export { Breadcrumb, BreadcrumbCategory, DeviceContext, ErrorEventEntity, ErrorEventPayload, ErrorGroupSummary, SeverityLevel, StackFrame } from './tracker.js';
3
+ export { Breadcrumb, BreadcrumbCategory, DevServerEventEnvelope, DeviceContext, ErrorEventEntity, ErrorEventPayload, ErrorGroupSummary, NexusErrorInfo, PerformanceVitalEntry, PerformanceVitalsOptions, SamplingConfig, SeverityLevel, StackFrame, TransportPlugin, VitalMetricName } from './tracker.js';
4
4
  export { NEXUS_ERROR_BASE, ProblemDetails } from './rfc7807.js';
package/dist/index.mjs CHANGED
@@ -1,6 +1,2 @@
1
- // src/rfc7807.ts
2
- var NEXUS_ERROR_BASE = "https://nexus.dev/errors";
3
-
4
- export { NEXUS_ERROR_BASE };
5
- //# sourceMappingURL=index.mjs.map
6
- //# sourceMappingURL=index.mjs.map
1
+ var t="https://nexus.dev/errors";
2
+ export{t as NEXUS_ERROR_BASE};
package/dist/rfc7807.cjs CHANGED
@@ -1,8 +1,2 @@
1
- 'use strict';
2
-
3
- // src/rfc7807.ts
4
- var NEXUS_ERROR_BASE = "https://nexus.dev/errors";
5
-
6
- exports.NEXUS_ERROR_BASE = NEXUS_ERROR_BASE;
7
- //# sourceMappingURL=rfc7807.cjs.map
8
- //# sourceMappingURL=rfc7807.cjs.map
1
+ 'use strict';var t="https://nexus.dev/errors";
2
+ exports.NEXUS_ERROR_BASE=t;
package/dist/rfc7807.mjs CHANGED
@@ -1,6 +1,2 @@
1
- // src/rfc7807.ts
2
- var NEXUS_ERROR_BASE = "https://nexus.dev/errors";
3
-
4
- export { NEXUS_ERROR_BASE };
5
- //# sourceMappingURL=rfc7807.mjs.map
6
- //# sourceMappingURL=rfc7807.mjs.map
1
+ var t="https://nexus.dev/errors";
2
+ export{t as NEXUS_ERROR_BASE};
package/dist/tracker.cjs CHANGED
@@ -1,4 +1 @@
1
- 'use strict';
2
-
3
- //# sourceMappingURL=tracker.cjs.map
4
- //# sourceMappingURL=tracker.cjs.map
1
+ 'use strict';
@@ -194,4 +194,147 @@ interface ErrorGroupSummary {
194
194
  lastSeenAt: string;
195
195
  }
196
196
 
197
- export { type Breadcrumb, type BreadcrumbCategory, type DeviceContext, type ErrorEventEntity, type ErrorEventPayload, type ErrorGroupSummary, type SeverityLevel, type StackFrame, UserContext };
197
+ /**
198
+ * Normalized error information passed to NexusGuard fallback render function.
199
+ * Framework-agnostic — used by React, Vue, and Vanilla integrations.
200
+ *
201
+ * @example
202
+ * // React render prop
203
+ * <NexusGuard fallback={({ error, errorId, reset }) => (
204
+ * <div>Error #{errorId}: {error.message} <button onClick={reset}>Retry</button></div>
205
+ * )}>
206
+ * <App />
207
+ * </NexusGuard>
208
+ */
209
+ interface NexusErrorInfo {
210
+ /** The original Error object that triggered the boundary. */
211
+ error: Error;
212
+ /**
213
+ * Deterministic fingerprint ID for this error class.
214
+ * Can be shown to users as a support reference code.
215
+ */
216
+ errorId: string;
217
+ /** Resets the error boundary back to normal rendering state. */
218
+ reset: () => void;
219
+ /** Component stack trace (React/Vue only — undefined in Vanilla). */
220
+ componentStack?: string;
221
+ }
222
+ /**
223
+ * Custom transport plugin for SDK error event delivery.
224
+ * Allows complete replacement of the default fetch-based ingestion transport.
225
+ *
226
+ * @example
227
+ * // Custom Sentry forwarding transport
228
+ * const sentryTransport: TransportPlugin = async (event) => {
229
+ * Sentry.captureException(new Error(event.errorMessage));
230
+ * };
231
+ *
232
+ * Nexus.init({ transport: sentryTransport });
233
+ */
234
+ type TransportPlugin = 'fetch' | 'console' | 'localStorage' | ((event: ErrorEventPayload) => void | Promise<void>);
235
+ /**
236
+ * Client-side event sampling and rate limiting configuration.
237
+ *
238
+ * @example
239
+ * Nexus.init({
240
+ * sampling: {
241
+ * rate: 0.5, // Capture 50% of errors
242
+ * dedupeWindow: 5000, // 5s dedup window
243
+ * maxPerSession: 25, // Max 25 unique errors per session
244
+ * }
245
+ * });
246
+ */
247
+ interface SamplingConfig {
248
+ /**
249
+ * Fraction of errors to capture and transmit. Range: 0.0 (none) to 1.0 (all).
250
+ * @default 1.0
251
+ */
252
+ rate?: number;
253
+ /**
254
+ * Milliseconds sliding window for client-side deduplication.
255
+ * Duplicate errors within this window are counted but not retransmitted.
256
+ * @default 10000
257
+ */
258
+ dedupeWindow?: number;
259
+ /**
260
+ * Maximum number of unique error fingerprints captured per browser session.
261
+ * Prevents event storms in crash-loop scenarios.
262
+ * @default 100
263
+ */
264
+ maxPerSession?: number;
265
+ }
266
+ /**
267
+ * Web Vitals metric names measured by the Performance observer.
268
+ */
269
+ type VitalMetricName = 'LCP' | 'CLS' | 'FID' | 'TTFB' | 'INP' | 'FCP';
270
+ /**
271
+ * Captured Web Vitals performance metric entry.
272
+ *
273
+ * @example
274
+ * const entry: PerformanceVitalEntry = {
275
+ * name: 'LCP',
276
+ * value: 1200,
277
+ * rating: 'good',
278
+ * delta: 1200,
279
+ * navigationType: 'navigate',
280
+ * };
281
+ */
282
+ interface PerformanceVitalEntry {
283
+ /** Metric name. */
284
+ name: VitalMetricName;
285
+ /** Metric value in milliseconds (or unitless score for CLS). */
286
+ value: number;
287
+ /** Quality rating based on Core Web Vitals thresholds. */
288
+ rating: 'good' | 'needs-improvement' | 'poor';
289
+ /** Delta from previous measurement in the same session. */
290
+ delta: number;
291
+ /** Navigation type that initiated the metric measurement. */
292
+ navigationType: 'navigate' | 'reload' | 'back-forward' | 'prerender' | string;
293
+ }
294
+ /**
295
+ * Configuration for the Web Vitals performance observer.
296
+ *
297
+ * @example
298
+ * attachWebVitals(tracker, {
299
+ * captureAsEvents: true,
300
+ * poorRatingOnly: true,
301
+ * });
302
+ */
303
+ interface PerformanceVitalsOptions {
304
+ /**
305
+ * When true, captures poor/needs-improvement vitals as full error events.
306
+ * When false, captures all vitals as breadcrumbs only.
307
+ * @default false
308
+ */
309
+ captureAsEvents?: boolean;
310
+ /**
311
+ * When true, only captures metrics rated 'poor' or 'needs-improvement'.
312
+ * @default false
313
+ */
314
+ poorRatingOnly?: boolean;
315
+ /**
316
+ * Subset of vital names to observe. Defaults to all supported vitals.
317
+ * @default ['LCP', 'CLS', 'FID', 'TTFB', 'INP', 'FCP']
318
+ */
319
+ vitals?: VitalMetricName[];
320
+ /**
321
+ * Long task duration threshold in milliseconds. Tasks exceeding this
322
+ * are recorded as breadcrumbs with category 'performance'.
323
+ * @default 50
324
+ */
325
+ longTaskThresholdMs?: number;
326
+ }
327
+ /**
328
+ * Event envelope used by the nexus-dev local ingestion server.
329
+ * Wraps ErrorEventPayload with server-assigned metadata.
330
+ */
331
+ interface DevServerEventEnvelope {
332
+ /** Monotonically increasing server-assigned event ID. */
333
+ id: number;
334
+ /** ISO timestamp when the dev server received the event. */
335
+ receivedAt: string;
336
+ /** The captured error event payload. */
337
+ payload: ErrorEventPayload;
338
+ }
339
+
340
+ export { type Breadcrumb, type BreadcrumbCategory, type DevServerEventEnvelope, type DeviceContext, type ErrorEventEntity, type ErrorEventPayload, type ErrorGroupSummary, type NexusErrorInfo, type PerformanceVitalEntry, type PerformanceVitalsOptions, type SamplingConfig, type SeverityLevel, type StackFrame, type TransportPlugin, UserContext, type VitalMetricName };
package/dist/tracker.d.ts CHANGED
@@ -194,4 +194,147 @@ interface ErrorGroupSummary {
194
194
  lastSeenAt: string;
195
195
  }
196
196
 
197
- export { type Breadcrumb, type BreadcrumbCategory, type DeviceContext, type ErrorEventEntity, type ErrorEventPayload, type ErrorGroupSummary, type SeverityLevel, type StackFrame, UserContext };
197
+ /**
198
+ * Normalized error information passed to NexusGuard fallback render function.
199
+ * Framework-agnostic — used by React, Vue, and Vanilla integrations.
200
+ *
201
+ * @example
202
+ * // React render prop
203
+ * <NexusGuard fallback={({ error, errorId, reset }) => (
204
+ * <div>Error #{errorId}: {error.message} <button onClick={reset}>Retry</button></div>
205
+ * )}>
206
+ * <App />
207
+ * </NexusGuard>
208
+ */
209
+ interface NexusErrorInfo {
210
+ /** The original Error object that triggered the boundary. */
211
+ error: Error;
212
+ /**
213
+ * Deterministic fingerprint ID for this error class.
214
+ * Can be shown to users as a support reference code.
215
+ */
216
+ errorId: string;
217
+ /** Resets the error boundary back to normal rendering state. */
218
+ reset: () => void;
219
+ /** Component stack trace (React/Vue only — undefined in Vanilla). */
220
+ componentStack?: string;
221
+ }
222
+ /**
223
+ * Custom transport plugin for SDK error event delivery.
224
+ * Allows complete replacement of the default fetch-based ingestion transport.
225
+ *
226
+ * @example
227
+ * // Custom Sentry forwarding transport
228
+ * const sentryTransport: TransportPlugin = async (event) => {
229
+ * Sentry.captureException(new Error(event.errorMessage));
230
+ * };
231
+ *
232
+ * Nexus.init({ transport: sentryTransport });
233
+ */
234
+ type TransportPlugin = 'fetch' | 'console' | 'localStorage' | ((event: ErrorEventPayload) => void | Promise<void>);
235
+ /**
236
+ * Client-side event sampling and rate limiting configuration.
237
+ *
238
+ * @example
239
+ * Nexus.init({
240
+ * sampling: {
241
+ * rate: 0.5, // Capture 50% of errors
242
+ * dedupeWindow: 5000, // 5s dedup window
243
+ * maxPerSession: 25, // Max 25 unique errors per session
244
+ * }
245
+ * });
246
+ */
247
+ interface SamplingConfig {
248
+ /**
249
+ * Fraction of errors to capture and transmit. Range: 0.0 (none) to 1.0 (all).
250
+ * @default 1.0
251
+ */
252
+ rate?: number;
253
+ /**
254
+ * Milliseconds sliding window for client-side deduplication.
255
+ * Duplicate errors within this window are counted but not retransmitted.
256
+ * @default 10000
257
+ */
258
+ dedupeWindow?: number;
259
+ /**
260
+ * Maximum number of unique error fingerprints captured per browser session.
261
+ * Prevents event storms in crash-loop scenarios.
262
+ * @default 100
263
+ */
264
+ maxPerSession?: number;
265
+ }
266
+ /**
267
+ * Web Vitals metric names measured by the Performance observer.
268
+ */
269
+ type VitalMetricName = 'LCP' | 'CLS' | 'FID' | 'TTFB' | 'INP' | 'FCP';
270
+ /**
271
+ * Captured Web Vitals performance metric entry.
272
+ *
273
+ * @example
274
+ * const entry: PerformanceVitalEntry = {
275
+ * name: 'LCP',
276
+ * value: 1200,
277
+ * rating: 'good',
278
+ * delta: 1200,
279
+ * navigationType: 'navigate',
280
+ * };
281
+ */
282
+ interface PerformanceVitalEntry {
283
+ /** Metric name. */
284
+ name: VitalMetricName;
285
+ /** Metric value in milliseconds (or unitless score for CLS). */
286
+ value: number;
287
+ /** Quality rating based on Core Web Vitals thresholds. */
288
+ rating: 'good' | 'needs-improvement' | 'poor';
289
+ /** Delta from previous measurement in the same session. */
290
+ delta: number;
291
+ /** Navigation type that initiated the metric measurement. */
292
+ navigationType: 'navigate' | 'reload' | 'back-forward' | 'prerender' | string;
293
+ }
294
+ /**
295
+ * Configuration for the Web Vitals performance observer.
296
+ *
297
+ * @example
298
+ * attachWebVitals(tracker, {
299
+ * captureAsEvents: true,
300
+ * poorRatingOnly: true,
301
+ * });
302
+ */
303
+ interface PerformanceVitalsOptions {
304
+ /**
305
+ * When true, captures poor/needs-improvement vitals as full error events.
306
+ * When false, captures all vitals as breadcrumbs only.
307
+ * @default false
308
+ */
309
+ captureAsEvents?: boolean;
310
+ /**
311
+ * When true, only captures metrics rated 'poor' or 'needs-improvement'.
312
+ * @default false
313
+ */
314
+ poorRatingOnly?: boolean;
315
+ /**
316
+ * Subset of vital names to observe. Defaults to all supported vitals.
317
+ * @default ['LCP', 'CLS', 'FID', 'TTFB', 'INP', 'FCP']
318
+ */
319
+ vitals?: VitalMetricName[];
320
+ /**
321
+ * Long task duration threshold in milliseconds. Tasks exceeding this
322
+ * are recorded as breadcrumbs with category 'performance'.
323
+ * @default 50
324
+ */
325
+ longTaskThresholdMs?: number;
326
+ }
327
+ /**
328
+ * Event envelope used by the nexus-dev local ingestion server.
329
+ * Wraps ErrorEventPayload with server-assigned metadata.
330
+ */
331
+ interface DevServerEventEnvelope {
332
+ /** Monotonically increasing server-assigned event ID. */
333
+ id: number;
334
+ /** ISO timestamp when the dev server received the event. */
335
+ receivedAt: string;
336
+ /** The captured error event payload. */
337
+ payload: ErrorEventPayload;
338
+ }
339
+
340
+ export { type Breadcrumb, type BreadcrumbCategory, type DevServerEventEnvelope, type DeviceContext, type ErrorEventEntity, type ErrorEventPayload, type ErrorGroupSummary, type NexusErrorInfo, type PerformanceVitalEntry, type PerformanceVitalsOptions, type SamplingConfig, type SeverityLevel, type StackFrame, type TransportPlugin, UserContext, type VitalMetricName };
package/dist/tracker.mjs CHANGED
@@ -1,3 +0,0 @@
1
-
2
- //# sourceMappingURL=tracker.mjs.map
3
- //# sourceMappingURL=tracker.mjs.map
package/package.json CHANGED
@@ -1,11 +1,39 @@
1
1
  {
2
2
  "name": "@nexussdk/contracts",
3
- "version": "0.0.1",
3
+ "version": "0.0.4",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "description": "Single Source of Truth (SSOT) data contracts for the Nexus Platform ecosystem",
9
+ "license": "MIT",
10
+ "author": "Nexus",
11
+ "contributors": [
12
+ {
13
+ "name": "Hồ Huỳnh Dũng",
14
+ "email": "hohuynhdung@gmail.com",
15
+ "url": "https://github.com/Huynhdung295"
16
+ }
17
+ ],
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/Huynhdung295/NexusSDK.git",
21
+ "directory": "packages/contracts"
22
+ },
23
+ "homepage": "https://github.com/Huynhdung295/NexusSDK#readme",
24
+ "keywords": [
25
+ "nexus",
26
+ "nexussdk",
27
+ "contracts",
28
+ "typescript",
29
+ "feature-flags",
30
+ "telemetry",
31
+ "rfc7807"
32
+ ],
33
+ "files": [
34
+ "dist",
35
+ "README.md"
36
+ ],
9
37
  "main": "./dist/index.cjs",
10
38
  "module": "./dist/index.mjs",
11
39
  "types": "./dist/index.d.ts",
@@ -1,52 +0,0 @@
1
-
2
- > @nexussdk/contracts@0.0.1 build /home/runner/work/NexusSDK/NexusSDK/packages/contracts
3
- > tsup
4
-
5
- CLI Building entry: src/auth.ts, src/flags.ts, src/index.ts, src/rfc7807.ts, src/tracker.ts
6
- CLI Using tsconfig: tsconfig.json
7
- CLI tsup v8.5.1
8
- CLI Using tsup config: /home/runner/work/NexusSDK/NexusSDK/packages/contracts/tsup.config.ts
9
- CLI Target: es2022
10
- CLI Cleaning output folder
11
- ESM Build start
12
- CJS Build start
13
- Generated an empty chunk: "auth".
14
- Generated an empty chunk: "flags".
15
- Generated an empty chunk: "tracker".
16
- Generated an empty chunk: "auth".
17
- Generated an empty chunk: "flags".
18
- Generated an empty chunk: "tracker".
19
- CJS dist/auth.cjs 82.00 B
20
- CJS dist/flags.cjs 84.00 B
21
- CJS dist/index.cjs 199.00 B
22
- CJS dist/rfc7807.cjs 203.00 B
23
- CJS dist/tracker.cjs 88.00 B
24
- CJS dist/auth.cjs.map 69.00 B
25
- CJS dist/flags.cjs.map 70.00 B
26
- CJS dist/index.cjs.map 2.58 KB
27
- CJS dist/rfc7807.cjs.map 2.58 KB
28
- CJS dist/tracker.cjs.map 72.00 B
29
- CJS ⚡️ Build success in 111ms
30
- ESM dist/auth.mjs 68.00 B
31
- ESM dist/flags.mjs 70.00 B
32
- ESM dist/index.mjs 168.00 B
33
- ESM dist/rfc7807.mjs 172.00 B
34
- ESM dist/tracker.mjs 74.00 B
35
- ESM dist/auth.mjs.map 69.00 B
36
- ESM dist/flags.mjs.map 70.00 B
37
- ESM dist/index.mjs.map 2.57 KB
38
- ESM dist/rfc7807.mjs.map 2.58 KB
39
- ESM dist/tracker.mjs.map 72.00 B
40
- ESM ⚡️ Build success in 113ms
41
- DTS Build start
42
- DTS ⚡️ Build success in 1002ms
43
- DTS dist/index.d.mts 607.00 B
44
- DTS dist/rfc7807.d.mts 2.49 KB
45
- DTS dist/tracker.d.mts 6.48 KB
46
- DTS dist/flags.d.mts 7.17 KB
47
- DTS dist/auth.d.mts 6.21 KB
48
- DTS dist/index.d.ts 603.00 B
49
- DTS dist/rfc7807.d.ts 2.49 KB
50
- DTS dist/tracker.d.ts 6.48 KB
51
- DTS dist/flags.d.ts 7.17 KB
52
- DTS dist/auth.d.ts 6.21 KB
package/dist/auth.cjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"auth.cjs"}
package/dist/auth.mjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"auth.mjs"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"flags.cjs"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"flags.mjs"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/rfc7807.ts"],"names":[],"mappings":";;;AA2EO,IAAM,gBAAA,GAAmB","file":"index.cjs","sourcesContent":["/**\n * @fileoverview Problem Details for HTTP APIs Specification (RFC 7807).\n * Standardized error format across Go-Gin and NestJS error responses.\n * @see {@link https://www.rfc-editor.org/rfc/rfc7807}\n * @module @nexus/contracts/rfc7807\n */\n\n/**\n * RFC 7807 Compliant Error Schema.\n * Ensures consistent machine-readable error diagnostics across all Nexus services.\n *\n * @example\n * const problem: ProblemDetails = {\n * type: 'https://nexus.dev/errors/quota-exceeded',\n * title: 'Monthly Quota Exceeded',\n * status: 429,\n * detail: \"API Key 'pk_live_...' has exhausted its limit of 50,000 monthly events.\",\n * instance: '/api/v1/telemetry/errors',\n * timestamp: '2024-06-01T12:00:00Z',\n * };\n */\nexport interface ProblemDetails {\n /**\n * URI reference identifying the problem type.\n * Should be a stable, documented URI that clients can bookmark.\n * @example 'https://nexus.dev/errors/rate-limit-exceeded'\n */\n type: string;\n /**\n * Short, human-readable summary of problem type.\n * Must be invariant across occurrences of the same problem type.\n * @example 'Too Many Requests'\n */\n title: string;\n /**\n * HTTP status code generated by origin server.\n * @example 429\n */\n status: number;\n /**\n * Human-readable explanation specific to this occurrence of the problem.\n * May differ across occurrences of the same problem type.\n * @example \"API Key 'pk_live_a1b2...' has exhausted its monthly event limit.\"\n */\n detail: string;\n /**\n * URI reference identifying specific occurrence of problem.\n * Typically the request path that triggered the error.\n * @example '/api/v1/telemetry/errors'\n */\n instance?: string;\n /**\n * Additional diagnostic error parameters for validation failures.\n * @example [{ name: 'email', reason: 'Must be a valid email address.' }]\n */\n invalidParams?: Array<{\n /** Field name that caused the validation error. */\n name: string;\n /** Human-readable reason for the validation failure. */\n reason: string;\n }>;\n /**\n * ISO 8601 timestamp when error was produced.\n * @example '2024-06-01T12:00:00.000Z'\n */\n timestamp?: string;\n}\n\n/**\n * Standard Nexus error type URI prefix.\n * All RFC 7807 type values should use this base to ensure namespacing consistency.\n *\n * @example\n * const type = `${NEXUS_ERROR_BASE}/rate-limit-exceeded`;\n */\nexport const NEXUS_ERROR_BASE = 'https://nexus.dev/errors' as const;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/rfc7807.ts"],"names":[],"mappings":";AA2EO,IAAM,gBAAA,GAAmB","file":"index.mjs","sourcesContent":["/**\n * @fileoverview Problem Details for HTTP APIs Specification (RFC 7807).\n * Standardized error format across Go-Gin and NestJS error responses.\n * @see {@link https://www.rfc-editor.org/rfc/rfc7807}\n * @module @nexus/contracts/rfc7807\n */\n\n/**\n * RFC 7807 Compliant Error Schema.\n * Ensures consistent machine-readable error diagnostics across all Nexus services.\n *\n * @example\n * const problem: ProblemDetails = {\n * type: 'https://nexus.dev/errors/quota-exceeded',\n * title: 'Monthly Quota Exceeded',\n * status: 429,\n * detail: \"API Key 'pk_live_...' has exhausted its limit of 50,000 monthly events.\",\n * instance: '/api/v1/telemetry/errors',\n * timestamp: '2024-06-01T12:00:00Z',\n * };\n */\nexport interface ProblemDetails {\n /**\n * URI reference identifying the problem type.\n * Should be a stable, documented URI that clients can bookmark.\n * @example 'https://nexus.dev/errors/rate-limit-exceeded'\n */\n type: string;\n /**\n * Short, human-readable summary of problem type.\n * Must be invariant across occurrences of the same problem type.\n * @example 'Too Many Requests'\n */\n title: string;\n /**\n * HTTP status code generated by origin server.\n * @example 429\n */\n status: number;\n /**\n * Human-readable explanation specific to this occurrence of the problem.\n * May differ across occurrences of the same problem type.\n * @example \"API Key 'pk_live_a1b2...' has exhausted its monthly event limit.\"\n */\n detail: string;\n /**\n * URI reference identifying specific occurrence of problem.\n * Typically the request path that triggered the error.\n * @example '/api/v1/telemetry/errors'\n */\n instance?: string;\n /**\n * Additional diagnostic error parameters for validation failures.\n * @example [{ name: 'email', reason: 'Must be a valid email address.' }]\n */\n invalidParams?: Array<{\n /** Field name that caused the validation error. */\n name: string;\n /** Human-readable reason for the validation failure. */\n reason: string;\n }>;\n /**\n * ISO 8601 timestamp when error was produced.\n * @example '2024-06-01T12:00:00.000Z'\n */\n timestamp?: string;\n}\n\n/**\n * Standard Nexus error type URI prefix.\n * All RFC 7807 type values should use this base to ensure namespacing consistency.\n *\n * @example\n * const type = `${NEXUS_ERROR_BASE}/rate-limit-exceeded`;\n */\nexport const NEXUS_ERROR_BASE = 'https://nexus.dev/errors' as const;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/rfc7807.ts"],"names":[],"mappings":";;;AA2EO,IAAM,gBAAA,GAAmB","file":"rfc7807.cjs","sourcesContent":["/**\n * @fileoverview Problem Details for HTTP APIs Specification (RFC 7807).\n * Standardized error format across Go-Gin and NestJS error responses.\n * @see {@link https://www.rfc-editor.org/rfc/rfc7807}\n * @module @nexus/contracts/rfc7807\n */\n\n/**\n * RFC 7807 Compliant Error Schema.\n * Ensures consistent machine-readable error diagnostics across all Nexus services.\n *\n * @example\n * const problem: ProblemDetails = {\n * type: 'https://nexus.dev/errors/quota-exceeded',\n * title: 'Monthly Quota Exceeded',\n * status: 429,\n * detail: \"API Key 'pk_live_...' has exhausted its limit of 50,000 monthly events.\",\n * instance: '/api/v1/telemetry/errors',\n * timestamp: '2024-06-01T12:00:00Z',\n * };\n */\nexport interface ProblemDetails {\n /**\n * URI reference identifying the problem type.\n * Should be a stable, documented URI that clients can bookmark.\n * @example 'https://nexus.dev/errors/rate-limit-exceeded'\n */\n type: string;\n /**\n * Short, human-readable summary of problem type.\n * Must be invariant across occurrences of the same problem type.\n * @example 'Too Many Requests'\n */\n title: string;\n /**\n * HTTP status code generated by origin server.\n * @example 429\n */\n status: number;\n /**\n * Human-readable explanation specific to this occurrence of the problem.\n * May differ across occurrences of the same problem type.\n * @example \"API Key 'pk_live_a1b2...' has exhausted its monthly event limit.\"\n */\n detail: string;\n /**\n * URI reference identifying specific occurrence of problem.\n * Typically the request path that triggered the error.\n * @example '/api/v1/telemetry/errors'\n */\n instance?: string;\n /**\n * Additional diagnostic error parameters for validation failures.\n * @example [{ name: 'email', reason: 'Must be a valid email address.' }]\n */\n invalidParams?: Array<{\n /** Field name that caused the validation error. */\n name: string;\n /** Human-readable reason for the validation failure. */\n reason: string;\n }>;\n /**\n * ISO 8601 timestamp when error was produced.\n * @example '2024-06-01T12:00:00.000Z'\n */\n timestamp?: string;\n}\n\n/**\n * Standard Nexus error type URI prefix.\n * All RFC 7807 type values should use this base to ensure namespacing consistency.\n *\n * @example\n * const type = `${NEXUS_ERROR_BASE}/rate-limit-exceeded`;\n */\nexport const NEXUS_ERROR_BASE = 'https://nexus.dev/errors' as const;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/rfc7807.ts"],"names":[],"mappings":";AA2EO,IAAM,gBAAA,GAAmB","file":"rfc7807.mjs","sourcesContent":["/**\n * @fileoverview Problem Details for HTTP APIs Specification (RFC 7807).\n * Standardized error format across Go-Gin and NestJS error responses.\n * @see {@link https://www.rfc-editor.org/rfc/rfc7807}\n * @module @nexus/contracts/rfc7807\n */\n\n/**\n * RFC 7807 Compliant Error Schema.\n * Ensures consistent machine-readable error diagnostics across all Nexus services.\n *\n * @example\n * const problem: ProblemDetails = {\n * type: 'https://nexus.dev/errors/quota-exceeded',\n * title: 'Monthly Quota Exceeded',\n * status: 429,\n * detail: \"API Key 'pk_live_...' has exhausted its limit of 50,000 monthly events.\",\n * instance: '/api/v1/telemetry/errors',\n * timestamp: '2024-06-01T12:00:00Z',\n * };\n */\nexport interface ProblemDetails {\n /**\n * URI reference identifying the problem type.\n * Should be a stable, documented URI that clients can bookmark.\n * @example 'https://nexus.dev/errors/rate-limit-exceeded'\n */\n type: string;\n /**\n * Short, human-readable summary of problem type.\n * Must be invariant across occurrences of the same problem type.\n * @example 'Too Many Requests'\n */\n title: string;\n /**\n * HTTP status code generated by origin server.\n * @example 429\n */\n status: number;\n /**\n * Human-readable explanation specific to this occurrence of the problem.\n * May differ across occurrences of the same problem type.\n * @example \"API Key 'pk_live_a1b2...' has exhausted its monthly event limit.\"\n */\n detail: string;\n /**\n * URI reference identifying specific occurrence of problem.\n * Typically the request path that triggered the error.\n * @example '/api/v1/telemetry/errors'\n */\n instance?: string;\n /**\n * Additional diagnostic error parameters for validation failures.\n * @example [{ name: 'email', reason: 'Must be a valid email address.' }]\n */\n invalidParams?: Array<{\n /** Field name that caused the validation error. */\n name: string;\n /** Human-readable reason for the validation failure. */\n reason: string;\n }>;\n /**\n * ISO 8601 timestamp when error was produced.\n * @example '2024-06-01T12:00:00.000Z'\n */\n timestamp?: string;\n}\n\n/**\n * Standard Nexus error type URI prefix.\n * All RFC 7807 type values should use this base to ensure namespacing consistency.\n *\n * @example\n * const type = `${NEXUS_ERROR_BASE}/rate-limit-exceeded`;\n */\nexport const NEXUS_ERROR_BASE = 'https://nexus.dev/errors' as const;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"tracker.cjs"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"tracker.mjs"}