@virtru/dsp-sdk 0.3.1 → 0.3.2

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 (44) hide show
  1. package/.rush/temp/chunked-rush-logs/dsp-sdk._phase_build.chunks.jsonl +3 -3
  2. package/.rush/temp/chunked-rush-logs/dsp-sdk._phase_test.chunks.jsonl +9 -38
  3. package/.rush/temp/package-deps__phase_build.json +28 -16
  4. package/.rush/temp/shrinkwrap-deps.json +174 -85
  5. package/CHANGELOG.json +14 -0
  6. package/CHANGELOG.md +8 -1
  7. package/README.md +10 -0
  8. package/dist/src/gen/config/v1/tagging_pb.d.ts +88 -4
  9. package/dist/src/gen/config/v1/tagging_pb.js +60 -5
  10. package/dist/src/gen/policyimportexport/v1/policy_import_export_pb.d.ts +6 -0
  11. package/dist/src/gen/policyimportexport/v1/policy_import_export_pb.js +2 -1
  12. package/dist/src/gen/virtru/common/common_pb.d.ts +10 -10
  13. package/dist/src/gen/virtru/common/common_pb.js +29 -13
  14. package/dist/src/gen/virtru/policy/certificates/v1/certificates_pb.d.ts +14 -14
  15. package/dist/src/gen/virtru/policy/certificates/v1/certificates_pb.js +40 -16
  16. package/dist/src/gen/virtru/policy/objects_pb.d.ts +5 -5
  17. package/dist/src/gen/virtru/policy/objects_pb.js +26 -12
  18. package/dist/src/lib/client.js +1 -1
  19. package/dist/src/lib/utils.js +9 -6
  20. package/dist/tests/dsp.test.js +1 -4
  21. package/package.json +8 -3
  22. package/src/gen/config/formatters/testdata/v1/test_pb.ts +1 -0
  23. package/src/gen/config/v1/config_connect.ts +111 -0
  24. package/src/gen/config/v1/tagging_pb.ts +106 -5
  25. package/src/gen/helloworld/v1/helloworld_connect.ts +49 -0
  26. package/src/gen/helloworld/v1/helloworld_pb.ts +6 -0
  27. package/src/gen/kas/nanotdf/v1/nanotdf_rewrap_connect.ts +39 -0
  28. package/src/gen/kas/nanotdf/v1/nanotdf_rewrap_pb.ts +207 -0
  29. package/src/gen/policyimportexport/v1/policy_import_export_connect.ts +56 -0
  30. package/src/gen/policyimportexport/v1/policy_import_export_pb.ts +10 -2
  31. package/src/gen/shared/v1/shared_connect.ts +61 -0
  32. package/src/gen/shared/v2/shared_connect.ts +39 -0
  33. package/src/gen/tagging/pdp/v2/externalprocessors/processor_connect.ts +156 -0
  34. package/src/gen/tagging/pdp/v2/tagging_connect.ts +73 -0
  35. package/src/gen/version/v1/version_connect.ts +31 -0
  36. package/src/gen/virtru/common/common_pb.ts +55 -33
  37. package/src/gen/virtru/policy/certificates/v1/certificates_pb.ts +188 -143
  38. package/src/gen/virtru/policy/objects_pb.ts +34 -16
  39. package/src/gen/web-admin/v1/config_connect.ts +52 -0
  40. package/src/lib/client.ts +5 -1
  41. package/src/lib/utils.test.ts +76 -40
  42. package/src/lib/utils.ts +54 -29
  43. package/tests/dsp.test.ts +2 -6
  44. package/update-protos.sh +63 -0
@@ -0,0 +1,73 @@
1
+ /*
2
+ * Copyright (c) Virtru Corporation. All rights reserved.
3
+ *
4
+ * Your use of this file is governed by the Virtu Terms of Service <https://www.virtru.com/terms-of-service/>.
5
+ */
6
+
7
+ // @generated by protoc-gen-connect-es v1.6.1 with parameter "target=ts"
8
+ // @generated from file tagging/pdp/v2/tagging.proto (package tagging.pdp.v2, syntax proto3)
9
+ /* eslint-disable */
10
+ // @ts-nocheck
11
+
12
+ import {
13
+ ProcessTagsRequest,
14
+ ProcessTagsResponse,
15
+ StreamingTaggingPDPRequest,
16
+ TaggingPDPRequest,
17
+ TaggingPDPResponse,
18
+ TagPerContentResponse,
19
+ } from './tagging_pb.js';
20
+ import { MethodKind } from '@bufbuild/protobuf';
21
+
22
+ /**
23
+ * Tagging PDP Service
24
+ *
25
+ * @generated from service tagging.pdp.v2.TaggingPDPService
26
+ */
27
+ export const TaggingPDPService = {
28
+ typeName: 'tagging.pdp.v2.TaggingPDPService',
29
+ methods: {
30
+ /**
31
+ * Process a series of Content Items through the PDP to produce Tags
32
+ *
33
+ * @generated from rpc tagging.pdp.v2.TaggingPDPService.Tag
34
+ */
35
+ tag: {
36
+ name: 'Tag',
37
+ I: TaggingPDPRequest,
38
+ O: TaggingPDPResponse,
39
+ kind: MethodKind.Unary,
40
+ },
41
+ /**
42
+ * @generated from rpc tagging.pdp.v2.TaggingPDPService.TagPerContentItem
43
+ */
44
+ tagPerContentItem: {
45
+ name: 'TagPerContentItem',
46
+ I: TaggingPDPRequest,
47
+ O: TagPerContentResponse,
48
+ kind: MethodKind.Unary,
49
+ },
50
+ /**
51
+ * Process a series of Content Items through the PDP to produce Tags via streaming content
52
+ *
53
+ * @generated from rpc tagging.pdp.v2.TaggingPDPService.TagStream
54
+ */
55
+ tagStream: {
56
+ name: 'TagStream',
57
+ I: StreamingTaggingPDPRequest,
58
+ O: TaggingPDPResponse,
59
+ kind: MethodKind.ClientStreaming,
60
+ },
61
+ /**
62
+ * Process a series of Tags
63
+ *
64
+ * @generated from rpc tagging.pdp.v2.TaggingPDPService.ProcessTags
65
+ */
66
+ processTags: {
67
+ name: 'ProcessTags',
68
+ I: ProcessTagsRequest,
69
+ O: ProcessTagsResponse,
70
+ kind: MethodKind.Unary,
71
+ },
72
+ },
73
+ } as const;
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Copyright (c) Virtru Corporation. All rights reserved.
3
+ *
4
+ * Your use of this file is governed by the Virtu Terms of Service <https://www.virtru.com/terms-of-service/>.
5
+ */
6
+
7
+ // @generated by protoc-gen-connect-es v1.6.1 with parameter "target=ts"
8
+ // @generated from file version/v1/version.proto (package version.v1, syntax proto3)
9
+ /* eslint-disable */
10
+ // @ts-nocheck
11
+
12
+ import { GetVersionRequest, GetVersionResponse } from './version_pb.js';
13
+ import { MethodKind } from '@bufbuild/protobuf';
14
+
15
+ /**
16
+ * @generated from service version.v1.VersionService
17
+ */
18
+ export const VersionService = {
19
+ typeName: 'version.v1.VersionService',
20
+ methods: {
21
+ /**
22
+ * @generated from rpc version.v1.VersionService.GetVersion
23
+ */
24
+ getVersion: {
25
+ name: 'GetVersion',
26
+ I: GetVersionRequest,
27
+ O: GetVersionResponse,
28
+ kind: MethodKind.Unary,
29
+ },
30
+ },
31
+ } as const;
@@ -1,24 +1,38 @@
1
+ /*
2
+ * Copyright (c) Virtru Corporation. All rights reserved.
3
+ *
4
+ * Your use of this file is governed by the Virtu Terms of Service <https://www.virtru.com/terms-of-service/>.
5
+ */
6
+
1
7
  // @generated by protoc-gen-es v2.3.0 with parameter "target=ts"
2
8
  // @generated from file virtru/common/common.proto (package virtru.common, syntax proto3)
3
9
  /* eslint-disable */
4
10
 
5
- import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1";
6
- import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
7
- import { file_buf_validate_validate } from "../../buf/validate/validate_pb";
8
- import type { Timestamp } from "@bufbuild/protobuf/wkt";
9
- import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
10
- import type { Message } from "@bufbuild/protobuf";
11
+ import type {
12
+ GenEnum,
13
+ GenFile,
14
+ GenMessage,
15
+ } from '@bufbuild/protobuf/codegenv1';
16
+ import { enumDesc, fileDesc, messageDesc } from '@bufbuild/protobuf/codegenv1';
17
+ import { file_buf_validate_validate } from '../../buf/validate/validate_pb';
18
+ import type { Timestamp } from '@bufbuild/protobuf/wkt';
19
+ import { file_google_protobuf_timestamp } from '@bufbuild/protobuf/wkt';
20
+ import type { Message } from '@bufbuild/protobuf';
11
21
 
12
22
  /**
13
23
  * Describes the file virtru/common/common.proto.
14
24
  */
15
- export const file_virtru_common_common: GenFile = /*@__PURE__*/
16
- fileDesc("Chp2aXJ0cnUvY29tbW9uL2NvbW1vbi5wcm90bxINdmlydHJ1LmNvbW1vbiLOAQoITWV0YWRhdGESLgoKY3JlYXRlZF9hdBgBIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASLgoKdXBkYXRlZF9hdBgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASMwoGbGFiZWxzGAMgAygLMiMudmlydHJ1LmNvbW1vbi5NZXRhZGF0YS5MYWJlbHNFbnRyeRotCgtMYWJlbHNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBInwKD01ldGFkYXRhTXV0YWJsZRI6CgZsYWJlbHMYAyADKAsyKi52aXJ0cnUuY29tbW9uLk1ldGFkYXRhTXV0YWJsZS5MYWJlbHNFbnRyeRotCgtMYWJlbHNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBIlkKD0lkRnFuSWRlbnRpZmllchIWCgJpZBgBIAEoCUIIukgFcgOwAQFIABIZCgNmcW4YAiABKAlCCrpIB3IFEAGIAQFIAEITCgppZGVudGlmaWVyEgW6SAIIASIsCgtQYWdlUmVxdWVzdBINCgVsaW1pdBgBIAEoBRIOCgZvZmZzZXQYAiABKAUiSgoMUGFnZVJlc3BvbnNlEhYKDmN1cnJlbnRfb2Zmc2V0GAEgASgFEhMKC25leHRfb2Zmc2V0GAIgASgFEg0KBXRvdGFsGAMgASgFKn0KEk1ldGFkYXRhVXBkYXRlRW51bRIkCiBNRVRBREFUQV9VUERBVEVfRU5VTV9VTlNQRUNJRklFRBAAEh8KG01FVEFEQVRBX1VQREFURV9FTlVNX0VYVEVORBABEiAKHE1FVEFEQVRBX1VQREFURV9FTlVNX1JFUExBQ0UQAkJ1ChFjb20udmlydHJ1LmNvbW1vbkILQ29tbW9uUHJvdG9QAaICA1ZDWKoCDVZpcnRydS5Db21tb27KAg1WaXJ0cnVcQ29tbW9u4gIZVmlydHJ1XENvbW1vblxHUEJNZXRhZGF0YeoCDlZpcnRydTo6Q29tbW9uYgZwcm90bzM", [file_buf_validate_validate, file_google_protobuf_timestamp]);
25
+ export const file_virtru_common_common: GenFile =
26
+ /*@__PURE__*/
27
+ fileDesc(
28
+ 'Chp2aXJ0cnUvY29tbW9uL2NvbW1vbi5wcm90bxINdmlydHJ1LmNvbW1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W9uygINVmlydHJ1XENvbW1vbuICGVZpcnRydVxDb21tb25cR1BCTWV0YWRhdGHqAg5WaXJ0cnU6OkNvbW1vbmIGcHJvdG8z',
29
+ [file_buf_validate_validate, file_google_protobuf_timestamp]
30
+ );
17
31
 
18
32
  /**
19
33
  * @generated from message virtru.common.Metadata
20
34
  */
21
- export type Metadata = Message<"virtru.common.Metadata"> & {
35
+ export type Metadata = Message<'virtru.common.Metadata'> & {
22
36
  /**
23
37
  * @generated from field: google.protobuf.Timestamp created_at = 1;
24
38
  */
@@ -39,13 +53,14 @@ export type Metadata = Message<"virtru.common.Metadata"> & {
39
53
  * Describes the message virtru.common.Metadata.
40
54
  * Use `create(MetadataSchema)` to create a new message.
41
55
  */
42
- export const MetadataSchema: GenMessage<Metadata> = /*@__PURE__*/
56
+ export const MetadataSchema: GenMessage<Metadata> =
57
+ /*@__PURE__*/
43
58
  messageDesc(file_virtru_common_common, 0);
44
59
 
45
60
  /**
46
61
  * @generated from message virtru.common.MetadataMutable
47
62
  */
48
- export type MetadataMutable = Message<"virtru.common.MetadataMutable"> & {
63
+ export type MetadataMutable = Message<'virtru.common.MetadataMutable'> & {
49
64
  /**
50
65
  * @generated from field: map<string, string> labels = 3;
51
66
  */
@@ -56,42 +71,47 @@ export type MetadataMutable = Message<"virtru.common.MetadataMutable"> & {
56
71
  * Describes the message virtru.common.MetadataMutable.
57
72
  * Use `create(MetadataMutableSchema)` to create a new message.
58
73
  */
59
- export const MetadataMutableSchema: GenMessage<MetadataMutable> = /*@__PURE__*/
74
+ export const MetadataMutableSchema: GenMessage<MetadataMutable> =
75
+ /*@__PURE__*/
60
76
  messageDesc(file_virtru_common_common, 1);
61
77
 
62
78
  /**
63
79
  * @generated from message virtru.common.IdFqnIdentifier
64
80
  */
65
- export type IdFqnIdentifier = Message<"virtru.common.IdFqnIdentifier"> & {
81
+ export type IdFqnIdentifier = Message<'virtru.common.IdFqnIdentifier'> & {
66
82
  /**
67
83
  * @generated from oneof virtru.common.IdFqnIdentifier.identifier
68
84
  */
69
- identifier: {
70
- /**
71
- * @generated from field: string id = 1;
72
- */
73
- value: string;
74
- case: "id";
75
- } | {
76
- /**
77
- * @generated from field: string fqn = 2;
78
- */
79
- value: string;
80
- case: "fqn";
81
- } | { case: undefined; value?: undefined };
85
+ identifier:
86
+ | {
87
+ /**
88
+ * @generated from field: string id = 1;
89
+ */
90
+ value: string;
91
+ case: 'id';
92
+ }
93
+ | {
94
+ /**
95
+ * @generated from field: string fqn = 2;
96
+ */
97
+ value: string;
98
+ case: 'fqn';
99
+ }
100
+ | { case: undefined; value?: undefined };
82
101
  };
83
102
 
84
103
  /**
85
104
  * Describes the message virtru.common.IdFqnIdentifier.
86
105
  * Use `create(IdFqnIdentifierSchema)` to create a new message.
87
106
  */
88
- export const IdFqnIdentifierSchema: GenMessage<IdFqnIdentifier> = /*@__PURE__*/
107
+ export const IdFqnIdentifierSchema: GenMessage<IdFqnIdentifier> =
108
+ /*@__PURE__*/
89
109
  messageDesc(file_virtru_common_common, 2);
90
110
 
91
111
  /**
92
112
  * @generated from message virtru.common.PageRequest
93
113
  */
94
- export type PageRequest = Message<"virtru.common.PageRequest"> & {
114
+ export type PageRequest = Message<'virtru.common.PageRequest'> & {
95
115
  /**
96
116
  * Optional
97
117
  * Set to configured default limit if not provided
@@ -114,13 +134,14 @@ export type PageRequest = Message<"virtru.common.PageRequest"> & {
114
134
  * Describes the message virtru.common.PageRequest.
115
135
  * Use `create(PageRequestSchema)` to create a new message.
116
136
  */
117
- export const PageRequestSchema: GenMessage<PageRequest> = /*@__PURE__*/
137
+ export const PageRequestSchema: GenMessage<PageRequest> =
138
+ /*@__PURE__*/
118
139
  messageDesc(file_virtru_common_common, 3);
119
140
 
120
141
  /**
121
142
  * @generated from message virtru.common.PageResponse
122
143
  */
123
- export type PageResponse = Message<"virtru.common.PageResponse"> & {
144
+ export type PageResponse = Message<'virtru.common.PageResponse'> & {
124
145
  /**
125
146
  * Requested pagination offset
126
147
  *
@@ -148,7 +169,8 @@ export type PageResponse = Message<"virtru.common.PageResponse"> & {
148
169
  * Describes the message virtru.common.PageResponse.
149
170
  * Use `create(PageResponseSchema)` to create a new message.
150
171
  */
151
- export const PageResponseSchema: GenMessage<PageResponse> = /*@__PURE__*/
172
+ export const PageResponseSchema: GenMessage<PageResponse> =
173
+ /*@__PURE__*/
152
174
  messageDesc(file_virtru_common_common, 4);
153
175
 
154
176
  /**
@@ -174,6 +196,6 @@ export enum MetadataUpdateEnum {
174
196
  /**
175
197
  * Describes the enum virtru.common.MetadataUpdateEnum.
176
198
  */
177
- export const MetadataUpdateEnumSchema: GenEnum<MetadataUpdateEnum> = /*@__PURE__*/
199
+ export const MetadataUpdateEnumSchema: GenEnum<MetadataUpdateEnum> =
200
+ /*@__PURE__*/
178
201
  enumDesc(file_virtru_common_common, 0);
179
-