@virtru/dsp-sdk 0.3.2 → 0.4.1

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 (40) hide show
  1. package/.rush/temp/chunked-rush-logs/dsp-sdk._phase_build.chunks.jsonl +11 -20
  2. package/.rush/temp/chunked-rush-logs/dsp-sdk._phase_test.chunks.jsonl +30 -16
  3. package/.rush/temp/package-deps__phase_build.json +8 -6
  4. package/.rush/temp/shrinkwrap-deps.json +828 -130
  5. package/CHANGELOG.json +35 -0
  6. package/CHANGELOG.md +15 -1
  7. package/README.md +14 -8
  8. package/config/jest.config.json +6 -0
  9. package/config/rig.json +8 -0
  10. package/lib-commonjs/src/gen/buf/validate/validate_pb.js +487 -0
  11. package/lib-commonjs/src/gen/config/v1/config_pb.js +142 -0
  12. package/lib-commonjs/src/gen/config/v1/kas_config_pb.js +72 -0
  13. package/lib-commonjs/src/gen/config/v1/meta_pb.js +36 -0
  14. package/lib-commonjs/src/gen/config/v1/outlook_config_pb.js +67 -0
  15. package/lib-commonjs/src/gen/config/v1/secureviewer_config_pb.js +67 -0
  16. package/lib-commonjs/src/gen/config/v1/tagging_pb.js +246 -0
  17. package/lib-commonjs/src/gen/google/api/annotations_pb.js +33 -0
  18. package/lib-commonjs/src/gen/google/api/http_pb.js +44 -0
  19. package/lib-commonjs/src/gen/policyimportexport/v1/policy_import_export_pb.js +93 -0
  20. package/lib-commonjs/src/gen/shared/v1/shared_pb.js +95 -0
  21. package/lib-commonjs/src/gen/tagging/pdp/v2/tagging_pb.js +277 -0
  22. package/lib-commonjs/src/gen/version/v1/version_pb.js +40 -0
  23. package/lib-commonjs/src/gen/virtru/common/common_pb.js +76 -0
  24. package/lib-commonjs/src/gen/virtru/policy/certificates/v1/certificates_pb.js +77 -0
  25. package/lib-commonjs/src/gen/virtru/policy/objects_pb.js +143 -0
  26. package/lib-commonjs/src/index.js +48 -0
  27. package/lib-commonjs/src/lib/client.js +66 -0
  28. package/lib-commonjs/src/lib/consts.js +10 -0
  29. package/lib-commonjs/src/lib/dsp.js +49 -0
  30. package/lib-commonjs/src/lib/utils.js +402 -0
  31. package/lib-commonjs/tests/dsp-client.test.js +75 -0
  32. package/lib-commonjs/tests/dsp.test.js +94 -0
  33. package/lib-commonjs/tests/mocks/create-export-artifacts.js +17 -0
  34. package/lib-commonjs/tests/mocks/tagging-pdp-tag.js +15 -0
  35. package/lib-commonjs/tests/mocks/well-known-configuration.js +16 -0
  36. package/lib-commonjs/tests/setup-msw.js +33 -0
  37. package/package.json +5 -4
  38. package/temp/build/lint/_eslint-5eVG3S6w.json +30 -0
  39. package/temp/test/jest/haste-map-b055a9550e6d9f9b43d8ad29b1607278-49d19aee56a0732eca9c014a51272338-8710993d07b75a801b0956e67ffc46fa +0 -0
  40. package/vitest.config.ts +1 -0
package/CHANGELOG.json CHANGED
@@ -1,6 +1,41 @@
1
1
  {
2
2
  "name": "@virtru/dsp-sdk",
3
3
  "entries": [
4
+ {
5
+ "version": "0.4.1",
6
+ "tag": "@virtru/dsp-sdk_v0.4.1",
7
+ "date": "Tue, 03 Mar 2026 16:24:41 GMT",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "comment": "Updated README to include NanoTDF decryption example",
12
+ "author": "Aaron Hopper <aaron.hopper@virtru.com>",
13
+ "commit": "ad26795e82e8020eec3f81b4f639e5d6614e730e"
14
+ }
15
+ ],
16
+ "patch": [
17
+ {
18
+ "comment": "fix: move build tools (heft, heft-web-rig) from dependencies to devDependencies to remove vulnerable minimatch transitive dep for consumers",
19
+ "author": "Paul Flynn <pflynn@virtru.com>",
20
+ "commit": "d4c8af9f1af9401ccbb42ba47df74e3b96eb4045"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "version": "0.4.0",
27
+ "tag": "@virtru/dsp-sdk_v0.4.0",
28
+ "date": "Tue, 24 Feb 2026 15:09:15 GMT",
29
+ "comments": {
30
+ "minor": [
31
+ {
32
+ "comment": "feat: add heft and rig configuration files for project setup",
33
+ "author": "virtru-dubich <85224435+virtru-dubich@users.noreply.github.com>",
34
+ "commit": "ac9f6949cf9b6b6969340c8cae351e92f16cf5a6"
35
+ }
36
+ ]
37
+ }
38
+ },
4
39
  {
5
40
  "version": "0.3.2",
6
41
  "tag": "@virtru/dsp-sdk_v0.3.2",
package/CHANGELOG.md CHANGED
@@ -1,6 +1,20 @@
1
1
  # Change Log - @virtru/dsp-sdk
2
2
 
3
- This log was last generated on Tue, 17 Feb 2026 17:33:08 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 03 Mar 2026 16:24:41 GMT and should not be manually modified.
4
+
5
+ ## 0.4.1
6
+ Tue, 03 Mar 2026 16:24:41 GMT
7
+
8
+ ### Patches
9
+
10
+ - fix: move build tools (heft, heft-web-rig) from dependencies to devDependencies to remove vulnerable minimatch transitive dep for consumers
11
+
12
+ ## 0.4.0
13
+ Tue, 24 Feb 2026 15:09:15 GMT
14
+
15
+ ### Minor changes
16
+
17
+ - feat: add heft and rig configuration files for project setup
4
18
 
5
19
  ## 0.3.2
6
20
  Tue, 17 Feb 2026 17:33:08 GMT
package/README.md CHANGED
@@ -55,21 +55,27 @@ const taggingResponse = await dsp.services.v2.taggingPDPService.tag({});
55
55
  // List policy attributes
56
56
  const attributesResponse = await dsp.services.v1.attributes.listAttributes({});
57
57
 
58
+
58
59
  // Encrypts string into a NanoTDF
59
- const nano = await dsp.createNanoTDF({
60
+ const tdf = await dsp.createNanoTDF({
60
61
  source: {
61
62
  type: "buffer",
62
63
  location: new TextEncoder().encode("hello world"),
63
64
  },
64
65
  });
65
66
 
66
- await nano.pipeTo(
67
- new WritableStream({
68
- write(chunk) {
69
- console.log(chunk);
70
- },
71
- })
72
- );
67
+ const encrypted = await new Response(tdf).arrayBuffer();
68
+
69
+ // Decrypts the NanoTDF back to plaintext
70
+ const stream = await dsp.read({
71
+ source: {
72
+ type: "buffer",
73
+ location: encrypted,
74
+ },
75
+ });
76
+
77
+ const decrypted = await new Response(stream).text();
78
+ console.log(decrypted); // "hello world"
73
79
 
74
80
  ```
75
81
 
@@ -0,0 +1,6 @@
1
+ {
2
+ "extends": "@rushstack/heft-web-rig/profiles/library/config/jest.config.json",
3
+ "roots": [],
4
+ "testMatch": [],
5
+ "passWithNoTests": true
6
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ // The "rig.json" file directs tools to look for their config files in an external package.
3
+ // Documentation for this system: https://www.npmjs.com/package/@rushstack/rig-package
4
+ "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json",
5
+
6
+ "rigPackageName": "@rushstack/heft-web-rig",
7
+ "rigProfile": "library"
8
+ }