@revenium/perplexity 2.0.3 → 2.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +39 -1
  2. package/README.md +86 -681
  3. package/dist/cjs/constants.js +70 -0
  4. package/dist/cjs/constants.js.map +1 -0
  5. package/dist/cjs/core/config/perplexity-config.js.map +1 -0
  6. package/dist/cjs/core/config/revenium-config.js.map +1 -0
  7. package/dist/cjs/core/tracking/metering.js +86 -6
  8. package/dist/cjs/core/tracking/metering.js.map +1 -0
  9. package/dist/cjs/core/wrapper/perplexity-client.js +11 -1
  10. package/dist/cjs/core/wrapper/perplexity-client.js.map +1 -0
  11. package/dist/cjs/index.js +9 -4
  12. package/dist/cjs/index.js.map +1 -0
  13. package/dist/cjs/types/index.js +0 -15
  14. package/dist/cjs/types/index.js.map +1 -0
  15. package/dist/cjs/utils/logger.js.map +1 -0
  16. package/dist/esm/constants.js +67 -0
  17. package/dist/esm/constants.js.map +1 -0
  18. package/dist/esm/core/config/perplexity-config.js.map +1 -0
  19. package/dist/esm/core/config/revenium-config.js.map +1 -0
  20. package/dist/esm/core/tracking/metering.js +86 -6
  21. package/dist/esm/core/tracking/metering.js.map +1 -0
  22. package/dist/esm/core/wrapper/perplexity-client.js +11 -1
  23. package/dist/esm/core/wrapper/perplexity-client.js.map +1 -0
  24. package/dist/esm/index.js +4 -1
  25. package/dist/esm/index.js.map +1 -0
  26. package/dist/esm/types/index.js +1 -14
  27. package/dist/esm/types/index.js.map +1 -0
  28. package/dist/esm/utils/logger.js.map +1 -0
  29. package/dist/types/constants.d.ts +67 -0
  30. package/dist/types/constants.d.ts.map +1 -0
  31. package/dist/types/core/config/perplexity-config.d.ts.map +1 -0
  32. package/dist/types/core/config/revenium-config.d.ts.map +1 -0
  33. package/dist/types/core/tracking/metering.d.ts.map +1 -0
  34. package/dist/types/core/wrapper/perplexity-client.d.ts.map +1 -0
  35. package/dist/types/index.d.ts +2 -2
  36. package/dist/types/index.d.ts.map +1 -0
  37. package/dist/types/types/index.d.ts +3 -11
  38. package/dist/types/types/index.d.ts.map +1 -0
  39. package/dist/types/utils/logger.d.ts.map +1 -0
  40. package/examples/README.md +220 -221
  41. package/examples/advanced-features.ts +148 -0
  42. package/examples/basic.ts +16 -21
  43. package/examples/chat.ts +11 -25
  44. package/examples/getting_started.ts +64 -0
  45. package/examples/metadata.ts +33 -40
  46. package/examples/streaming.ts +6 -17
  47. package/package.json +7 -11
package/CHANGELOG.md CHANGED
@@ -5,9 +5,43 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [Unreleased]
9
+
10
+ ## [2.0.4] - 2025-11-07
11
+
12
+ ### Changed
13
+ - Aligned package.json files array with template standards (use dist/ and examples/ wildcards)
14
+ - Updated documentation badge format to match template standards
15
+ - Improved README header with consistent badge styling
16
+
17
+ ### Fixed
18
+ - Removed dist/ build artifacts from version control
19
+ - Added dist/ to .gitignore to prevent future commits of build artifacts
20
+ - Updated API URL to api.revenium.ai in examples/README.md
21
+
22
+ ### Added
23
+
24
+ - New `getting_started.ts` example for quick onboarding
25
+ - New `advanced-features.ts` example with streaming and metadata
26
+ - Comprehensive metadata fields documentation
27
+ - Support for new Perplexity models (sonar-reasoning-pro, sonar-deep-research)
28
+
29
+ ### Changed
30
+
31
+ - Updated model definitions to current Perplexity API
32
+ - Improved example scripts in package.json
33
+
34
+ ### Fixed
35
+
36
+ - Corrected metadata field names throughout documentation
37
+ - Added TypeScript support for subscriptionId and responseQualityScore fields
38
+ - Removed hardcoded credentials from all documentation examples
39
+ - Corrected Revenium platform URLs (app.revenium.ai)
40
+
8
41
  ## [2.0.3] - 2025-10-21
9
42
 
10
43
  ### Changed
44
+
11
45
  - Enhanced package.json with examples in files array
12
46
  - Added community health files (CODE_OF_CONDUCT.md, CONTRIBUTING.md, SECURITY.md)
13
47
  - Updated .gitignore with security report patterns (including package-lock.json)
@@ -17,24 +51,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
17
51
  ## [2.0.2] - 2025-10-17
18
52
 
19
53
  ### Changed
54
+
20
55
  - Documentation improvements with absolute path references
21
56
 
22
57
  ## [2.0.1] - 2025-10-09
23
58
 
24
59
  ### Changed
60
+
25
61
  - Internal updates and improvements
26
62
 
27
63
  ## [2.0.0] - 2025-10-09
28
64
 
29
65
  ### Added
66
+
30
67
  - Complete code restructuring with core/ directory organization
31
68
  - Dual package exports (ESM + CommonJS) support
32
69
  - TypeScript declaration maps for better debugging
33
70
  - Enhanced build system with separate CJS, ESM, and types builds
34
71
  - New examples structure (basic.ts, chat.ts, streaming.ts, metadata.ts)
35
- - Playground examples for JavaScript users
36
72
 
37
73
  ### Changed
74
+
38
75
  - Restructured src/ directory with core/config, core/tracking, core/wrapper
39
76
  - Updated examples to use new structure
40
77
  - Enhanced README with comprehensive documentation
@@ -42,6 +79,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
42
79
  ## [1.0.0] - 2025-09-23
43
80
 
44
81
  ### Added
82
+
45
83
  - Initial release of Perplexity AI middleware
46
84
  - Automatic token counting and usage tracking
47
85
  - Support for all Perplexity models