@virtru/dsp-sdk 0.1.10-pr604.7ef7a158

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 (77) hide show
  1. package/.prettierrc +3 -0
  2. package/.rush/temp/operation/_phase_build/state.json +3 -0
  3. package/.rush/temp/package-deps__phase_build.json +41 -0
  4. package/.rush/temp/shrinkwrap-deps.json +329 -0
  5. package/CHANGELOG.json +103 -0
  6. package/CHANGELOG.md +53 -0
  7. package/README.md +98 -0
  8. package/dist/src/gen/buf/validate/validate_pb.d.ts +4517 -0
  9. package/dist/src/gen/buf/validate/validate_pb.js +484 -0
  10. package/dist/src/gen/config/v1/config_pb.d.ts +88 -0
  11. package/dist/src/gen/config/v1/config_pb.js +46 -0
  12. package/dist/src/gen/config/v1/meta_pb.d.ts +37 -0
  13. package/dist/src/gen/config/v1/meta_pb.js +33 -0
  14. package/dist/src/gen/config/v1/tagging_pb.d.ts +264 -0
  15. package/dist/src/gen/config/v1/tagging_pb.js +188 -0
  16. package/dist/src/gen/google/api/annotations_pb.d.ts +13 -0
  17. package/dist/src/gen/google/api/annotations_pb.js +30 -0
  18. package/dist/src/gen/google/api/http_pb.d.ts +440 -0
  19. package/dist/src/gen/google/api/http_pb.js +41 -0
  20. package/dist/src/gen/policyimportexport/v1/policy_import_export_pb.d.ts +241 -0
  21. package/dist/src/gen/policyimportexport/v1/policy_import_export_pb.js +89 -0
  22. package/dist/src/gen/shared/v1/shared_pb.d.ts +172 -0
  23. package/dist/src/gen/shared/v1/shared_pb.js +92 -0
  24. package/dist/src/gen/tagging/pdp/v2/tagging_pb.d.ts +872 -0
  25. package/dist/src/gen/tagging/pdp/v2/tagging_pb.js +274 -0
  26. package/dist/src/gen/version/v1/version_pb.d.ts +96 -0
  27. package/dist/src/gen/version/v1/version_pb.js +37 -0
  28. package/dist/src/index.d.ts +21 -0
  29. package/dist/src/index.js +28 -0
  30. package/dist/src/lib/client.d.ts +33 -0
  31. package/dist/src/lib/client.js +60 -0
  32. package/dist/src/lib/dsp.d.ts +18 -0
  33. package/dist/src/lib/dsp.js +44 -0
  34. package/dist/src/lib/utils.d.ts +15 -0
  35. package/dist/src/lib/utils.js +35 -0
  36. package/dist/tests/dsp-client.test.d.ts +1 -0
  37. package/dist/tests/dsp-client.test.js +49 -0
  38. package/dist/tests/dsp.test.d.ts +1 -0
  39. package/dist/tests/dsp.test.js +71 -0
  40. package/dist/tests/mocks/create-export-artifacts.d.ts +2 -0
  41. package/dist/tests/mocks/create-export-artifacts.js +13 -0
  42. package/dist/tests/mocks/tagging-pdp-tag.d.ts +2 -0
  43. package/dist/tests/mocks/tagging-pdp-tag.js +11 -0
  44. package/dist/tests/mocks/well-known-configuration.d.ts +2 -0
  45. package/dist/tests/mocks/well-known-configuration.js +12 -0
  46. package/dist/tests/setup-msw.d.ts +9 -0
  47. package/dist/tests/setup-msw.js +30 -0
  48. package/eslint.config.mjs +28 -0
  49. package/package.json +47 -0
  50. package/src/gen/buf/validate/validate_pb.ts +4879 -0
  51. package/src/gen/config/formatters/testdata/v1/test_pb.ts +287 -0
  52. package/src/gen/config/v1/config_pb.ts +137 -0
  53. package/src/gen/config/v1/meta_pb.ts +72 -0
  54. package/src/gen/config/v1/tagging_pb.ts +355 -0
  55. package/src/gen/google/api/annotations_pb.ts +43 -0
  56. package/src/gen/google/api/http_pb.ts +486 -0
  57. package/src/gen/helloworld/v1/helloworld_pb.ts +98 -0
  58. package/src/gen/policyimportexport/v1/policy_import_export_pb.ts +324 -0
  59. package/src/gen/shared/v1/shared_pb.ts +240 -0
  60. package/src/gen/shared/v2/shared_pb.ts +122 -0
  61. package/src/gen/tagging/pdp/v2/externalprocessors/processor_pb.ts +709 -0
  62. package/src/gen/tagging/pdp/v2/stanag/stanag_pb.ts +953 -0
  63. package/src/gen/tagging/pdp/v2/tagging_pb.ts +1064 -0
  64. package/src/gen/version/v1/version_pb.ts +143 -0
  65. package/src/index.ts +49 -0
  66. package/src/lib/client.ts +83 -0
  67. package/src/lib/dsp.ts +65 -0
  68. package/src/lib/utils.ts +43 -0
  69. package/src/vite-env.d.ts +7 -0
  70. package/tests/dsp-client.test.ts +67 -0
  71. package/tests/dsp.test.ts +95 -0
  72. package/tests/mocks/create-export-artifacts.ts +16 -0
  73. package/tests/mocks/tagging-pdp-tag.ts +13 -0
  74. package/tests/mocks/well-known-configuration.ts +15 -0
  75. package/tests/setup-msw.ts +35 -0
  76. package/tsconfig.json +32 -0
  77. package/vitest.config.ts +42 -0
@@ -0,0 +1,1064 @@
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-es v2.3.0 with parameter "target=ts"
8
+ // @generated from file tagging/pdp/v2/tagging.proto (package tagging.pdp.v2, syntax proto3)
9
+ /* eslint-disable */
10
+
11
+ import type {
12
+ GenEnum,
13
+ GenFile,
14
+ GenMessage,
15
+ GenService,
16
+ } from '@bufbuild/protobuf/codegenv1';
17
+ import {
18
+ enumDesc,
19
+ fileDesc,
20
+ messageDesc,
21
+ serviceDesc,
22
+ } from '@bufbuild/protobuf/codegenv1';
23
+ import { file_google_api_annotations } from '../../../google/api/annotations_pb';
24
+ import type { Any } from '@bufbuild/protobuf/wkt';
25
+ import {
26
+ file_google_protobuf_any,
27
+ file_google_protobuf_timestamp,
28
+ } from '@bufbuild/protobuf/wkt';
29
+ import type { Message } from '@bufbuild/protobuf';
30
+
31
+ /**
32
+ * Describes the file tagging/pdp/v2/tagging.proto.
33
+ */
34
+ export const file_tagging_pdp_v2_tagging: GenFile =
35
+ /*@__PURE__*/
36
+ fileDesc(
37
+ 'Chx0YWdnaW5nL3BkcC92Mi90YWdnaW5nLnByb3RvEg50YWdnaW5nLnBkcC52MiKBAQoeU3RyZWFtaW5nVGFnZ2luZ1BEUFJlcXVlc3REZXNjEhEKBHR5cGUYASABKAlIAIgBARI3Cg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2dpbmcucGRwLnYyQgxUYWdnaW5nUHJvdG9QAVpNZ2l0aHViLmNvbS92aXJ0cnUtY29ycC9kYXRhLXNlY3VyaXR5LXBsYXRmb3JtL3Nkay92Mi9nZW4vdGFnZ2luZy9wZHAvdjI7cGRwdjKiAgNUUFiqAg5UYWdnaW5nLlBkcC5WMsoCDlRhZ2dpbmdcUGRwXFYy4gIaVGFnZ2luZ1xQZHBcVjJcR1BCTWV0YWRhdGHqAhBUYWdnaW5nOjpQZHA6OlYyYgZwcm90bzM',
38
+ [
39
+ file_google_api_annotations,
40
+ file_google_protobuf_any,
41
+ file_google_protobuf_timestamp,
42
+ ]
43
+ );
44
+
45
+ /**
46
+ * Descriptor of a streaming tag request
47
+ *
48
+ * @generated from message tagging.pdp.v2.StreamingTaggingPDPRequestDesc
49
+ */
50
+ export type StreamingTaggingPDPRequestDesc =
51
+ Message<'tagging.pdp.v2.StreamingTaggingPDPRequestDesc'> & {
52
+ /**
53
+ * optional top level content type for the streaming content request
54
+ *
55
+ * @generated from field: optional string type = 1;
56
+ */
57
+ type?: string;
58
+
59
+ /**
60
+ * optional tagging options
61
+ *
62
+ * @generated from field: optional tagging.pdp.v2.TagRequestOptions options = 3;
63
+ */
64
+ options?: TagRequestOptions;
65
+ };
66
+
67
+ /**
68
+ * Describes the message tagging.pdp.v2.StreamingTaggingPDPRequestDesc.
69
+ * Use `create(StreamingTaggingPDPRequestDescSchema)` to create a new message.
70
+ */
71
+ export const StreamingTaggingPDPRequestDescSchema: GenMessage<StreamingTaggingPDPRequestDesc> =
72
+ /*@__PURE__*/
73
+ messageDesc(file_tagging_pdp_v2_tagging, 0);
74
+
75
+ /**
76
+ *
77
+ * Tagging Request using streaming messages.
78
+ *
79
+ * The cadence of messages expected is:
80
+ * 1. Descriptor
81
+ * 2. For each content item: 1 ContentItemDesc message, 1..N BinaryContent messages
82
+ *
83
+ * @generated from message tagging.pdp.v2.StreamingTaggingPDPRequest
84
+ */
85
+ export type StreamingTaggingPDPRequest =
86
+ Message<'tagging.pdp.v2.StreamingTaggingPDPRequest'> & {
87
+ /**
88
+ * @generated from oneof tagging.pdp.v2.StreamingTaggingPDPRequest.part
89
+ */
90
+ part:
91
+ | {
92
+ /**
93
+ * Streaming request descriptor - optional. If present expected as first message in stream
94
+ *
95
+ * @generated from field: tagging.pdp.v2.StreamingTaggingPDPRequestDesc reqDesc = 1;
96
+ */
97
+ value: StreamingTaggingPDPRequestDesc;
98
+ case: 'reqDesc';
99
+ }
100
+ | {
101
+ /**
102
+ * Descriptor of a content item. Expected for each content item prior to it's content messages in the stream
103
+ *
104
+ * @generated from field: tagging.pdp.v2.ContentItemDesc itemDesc = 2;
105
+ */
106
+ value: ContentItemDesc;
107
+ case: 'itemDesc';
108
+ }
109
+ | {
110
+ /**
111
+ *
112
+ * Binary content part of a content item. One or more per content item are expected and associated to the last content
113
+ * item descriptor in the message stream
114
+ *
115
+ * @generated from field: bytes itemContent = 3;
116
+ */
117
+ value: Uint8Array;
118
+ case: 'itemContent';
119
+ }
120
+ | { case: undefined; value?: undefined };
121
+ };
122
+
123
+ /**
124
+ * Describes the message tagging.pdp.v2.StreamingTaggingPDPRequest.
125
+ * Use `create(StreamingTaggingPDPRequestSchema)` to create a new message.
126
+ */
127
+ export const StreamingTaggingPDPRequestSchema: GenMessage<StreamingTaggingPDPRequest> =
128
+ /*@__PURE__*/
129
+ messageDesc(file_tagging_pdp_v2_tagging, 1);
130
+
131
+ /**
132
+ * Request to tag one or more content items.
133
+ *
134
+ * @generated from message tagging.pdp.v2.TaggingPDPRequest
135
+ */
136
+ export type TaggingPDPRequest = Message<'tagging.pdp.v2.TaggingPDPRequest'> & {
137
+ /**
138
+ * the content items to be processed
139
+ *
140
+ * @generated from field: repeated tagging.pdp.v2.ContentItem items = 1;
141
+ */
142
+ items: ContentItem[];
143
+
144
+ /**
145
+ * optional top level content type
146
+ *
147
+ * @generated from field: optional string type = 2;
148
+ */
149
+ type?: string;
150
+
151
+ /**
152
+ * optional tagging options
153
+ *
154
+ * @generated from field: optional tagging.pdp.v2.TagRequestOptions options = 3;
155
+ */
156
+ options?: TagRequestOptions;
157
+ };
158
+
159
+ /**
160
+ * Describes the message tagging.pdp.v2.TaggingPDPRequest.
161
+ * Use `create(TaggingPDPRequestSchema)` to create a new message.
162
+ */
163
+ export const TaggingPDPRequestSchema: GenMessage<TaggingPDPRequest> =
164
+ /*@__PURE__*/
165
+ messageDesc(file_tagging_pdp_v2_tagging, 2);
166
+
167
+ /**
168
+ * @generated from message tagging.pdp.v2.ProcessTagsRequest
169
+ */
170
+ export type ProcessTagsRequest =
171
+ Message<'tagging.pdp.v2.ProcessTagsRequest'> & {
172
+ /**
173
+ * tags to process
174
+ *
175
+ * @generated from field: repeated tagging.pdp.v2.Tag tags = 1;
176
+ */
177
+ tags: Tag[];
178
+
179
+ /**
180
+ * optional process tag options
181
+ *
182
+ * @generated from field: optional tagging.pdp.v2.ProcessTagOptions options = 2;
183
+ */
184
+ options?: ProcessTagOptions;
185
+ };
186
+
187
+ /**
188
+ * Describes the message tagging.pdp.v2.ProcessTagsRequest.
189
+ * Use `create(ProcessTagsRequestSchema)` to create a new message.
190
+ */
191
+ export const ProcessTagsRequestSchema: GenMessage<ProcessTagsRequest> =
192
+ /*@__PURE__*/
193
+ messageDesc(file_tagging_pdp_v2_tagging, 3);
194
+
195
+ /**
196
+ * Event encountered during the processing request
197
+ *
198
+ * @generated from message tagging.pdp.v2.ProcessingEvent
199
+ */
200
+ export type ProcessingEvent = Message<'tagging.pdp.v2.ProcessingEvent'> & {
201
+ /**
202
+ * @generated from field: string code = 1;
203
+ */
204
+ code: string;
205
+
206
+ /**
207
+ * @generated from field: string message = 2;
208
+ */
209
+ message: string;
210
+
211
+ /**
212
+ * @generated from field: string producer_id = 3;
213
+ */
214
+ producerId: string;
215
+
216
+ /**
217
+ * level of processing event
218
+ *
219
+ * @generated from field: tagging.pdp.v2.ProcessingEvent.Level level = 4;
220
+ */
221
+ level: ProcessingEvent_Level;
222
+
223
+ /**
224
+ * @generated from field: string category_code = 5;
225
+ */
226
+ categoryCode: string;
227
+ };
228
+
229
+ /**
230
+ * Describes the message tagging.pdp.v2.ProcessingEvent.
231
+ * Use `create(ProcessingEventSchema)` to create a new message.
232
+ */
233
+ export const ProcessingEventSchema: GenMessage<ProcessingEvent> =
234
+ /*@__PURE__*/
235
+ messageDesc(file_tagging_pdp_v2_tagging, 4);
236
+
237
+ /**
238
+ * @generated from enum tagging.pdp.v2.ProcessingEvent.Level
239
+ */
240
+ export enum ProcessingEvent_Level {
241
+ /**
242
+ * @generated from enum value: ERROR = 0;
243
+ */
244
+ ERROR = 0,
245
+
246
+ /**
247
+ * @generated from enum value: WARN = 1;
248
+ */
249
+ WARN = 1,
250
+ }
251
+
252
+ /**
253
+ * Describes the enum tagging.pdp.v2.ProcessingEvent.Level.
254
+ */
255
+ export const ProcessingEvent_LevelSchema: GenEnum<ProcessingEvent_Level> =
256
+ /*@__PURE__*/
257
+ enumDesc(file_tagging_pdp_v2_tagging, 4, 0);
258
+
259
+ /**
260
+ * @generated from message tagging.pdp.v2.ProcessTagsResponse
261
+ */
262
+ export type ProcessTagsResponse =
263
+ Message<'tagging.pdp.v2.ProcessTagsResponse'> & {
264
+ /**
265
+ * tags to process
266
+ *
267
+ * @generated from field: repeated tagging.pdp.v2.Tag tags = 1;
268
+ */
269
+ tags: Tag[];
270
+
271
+ /**
272
+ * @generated from field: repeated tagging.pdp.v2.ProcessingEvent events = 2;
273
+ */
274
+ events: ProcessingEvent[];
275
+ };
276
+
277
+ /**
278
+ * Describes the message tagging.pdp.v2.ProcessTagsResponse.
279
+ * Use `create(ProcessTagsResponseSchema)` to create a new message.
280
+ */
281
+ export const ProcessTagsResponseSchema: GenMessage<ProcessTagsResponse> =
282
+ /*@__PURE__*/
283
+ messageDesc(file_tagging_pdp_v2_tagging, 5);
284
+
285
+ /**
286
+ * @generated from message tagging.pdp.v2.ProcessTagOptions
287
+ */
288
+ export type ProcessTagOptions = Message<'tagging.pdp.v2.ProcessTagOptions'> & {
289
+ /**
290
+ * @generated from field: tagging.pdp.v2.ProcessTagOptions.Mode mode = 1;
291
+ */
292
+ mode: ProcessTagOptions_Mode;
293
+
294
+ /**
295
+ * assertion options; the presence of this option serves as a flag for generating and returning assertions
296
+ *
297
+ * @generated from field: repeated tagging.pdp.v2.AssertionOptions assertion_options = 2;
298
+ */
299
+ assertionOptions: AssertionOptions[];
300
+ };
301
+
302
+ /**
303
+ * Describes the message tagging.pdp.v2.ProcessTagOptions.
304
+ * Use `create(ProcessTagOptionsSchema)` to create a new message.
305
+ */
306
+ export const ProcessTagOptionsSchema: GenMessage<ProcessTagOptions> =
307
+ /*@__PURE__*/
308
+ messageDesc(file_tagging_pdp_v2_tagging, 6);
309
+
310
+ /**
311
+ * @generated from enum tagging.pdp.v2.ProcessTagOptions.Mode
312
+ */
313
+ export enum ProcessTagOptions_Mode {
314
+ /**
315
+ * @generated from enum value: ALL = 0;
316
+ */
317
+ ALL = 0,
318
+
319
+ /**
320
+ * @generated from enum value: PROCESS = 1;
321
+ */
322
+ PROCESS = 1,
323
+ }
324
+
325
+ /**
326
+ * Describes the enum tagging.pdp.v2.ProcessTagOptions.Mode.
327
+ */
328
+ export const ProcessTagOptions_ModeSchema: GenEnum<ProcessTagOptions_Mode> =
329
+ /*@__PURE__*/
330
+ enumDesc(file_tagging_pdp_v2_tagging, 6, 0);
331
+
332
+ /**
333
+ * @generated from message tagging.pdp.v2.AssertionOptions
334
+ */
335
+ export type AssertionOptions = Message<'tagging.pdp.v2.AssertionOptions'> & {
336
+ /**
337
+ * the assertion types to return; if not populated then all assertion types are generated and returned
338
+ *
339
+ * @generated from field: string assertion_type = 1;
340
+ */
341
+ assertionType: string;
342
+
343
+ /**
344
+ * @generated from oneof tagging.pdp.v2.AssertionOptions.assertion_context
345
+ */
346
+ assertionContext:
347
+ | {
348
+ /**
349
+ * context is structured
350
+ *
351
+ * @generated from field: google.protobuf.Any structured_assertion_context = 2;
352
+ */
353
+ value: Any;
354
+ case: 'structuredAssertionContext';
355
+ }
356
+ | {
357
+ /**
358
+ * context is a serialized string
359
+ *
360
+ * @generated from field: string serialized_string_context = 3;
361
+ */
362
+ value: string;
363
+ case: 'serializedStringContext';
364
+ }
365
+ | { case: undefined; value?: undefined };
366
+ };
367
+
368
+ /**
369
+ * Describes the message tagging.pdp.v2.AssertionOptions.
370
+ * Use `create(AssertionOptionsSchema)` to create a new message.
371
+ */
372
+ export const AssertionOptionsSchema: GenMessage<AssertionOptions> =
373
+ /*@__PURE__*/
374
+ messageDesc(file_tagging_pdp_v2_tagging, 7);
375
+
376
+ /**
377
+ * @generated from message tagging.pdp.v2.TagRequestOptions
378
+ */
379
+ export type TagRequestOptions = Message<'tagging.pdp.v2.TagRequestOptions'> & {
380
+ /**
381
+ * @generated from field: tagging.pdp.v2.TagRequestOptions.Mode mode = 1;
382
+ */
383
+ mode: TagRequestOptions_Mode;
384
+
385
+ /**
386
+ * assertion options; the presence of this option serves as a flag for generating and returning assertions
387
+ *
388
+ * @generated from field: repeated tagging.pdp.v2.AssertionOptions assertion_options = 2;
389
+ */
390
+ assertionOptions: AssertionOptions[];
391
+ };
392
+
393
+ /**
394
+ * Describes the message tagging.pdp.v2.TagRequestOptions.
395
+ * Use `create(TagRequestOptionsSchema)` to create a new message.
396
+ */
397
+ export const TagRequestOptionsSchema: GenMessage<TagRequestOptions> =
398
+ /*@__PURE__*/
399
+ messageDesc(file_tagging_pdp_v2_tagging, 8);
400
+
401
+ /**
402
+ * @generated from enum tagging.pdp.v2.TagRequestOptions.Mode
403
+ */
404
+ export enum TagRequestOptions_Mode {
405
+ /**
406
+ * Process all stages
407
+ *
408
+ * @generated from enum value: ALL = 0;
409
+ */
410
+ ALL = 0,
411
+
412
+ /**
413
+ * Process Content Contraction + Tag Extraction Stages
414
+ *
415
+ * @generated from enum value: TAG_EXTRACT = 1;
416
+ */
417
+ TAG_EXTRACT = 1,
418
+
419
+ /**
420
+ * Process Content Extraction , Tag Extraction and Tag Processing States
421
+ *
422
+ * @generated from enum value: TAG_EXTRACT_AND_PROCESS = 2;
423
+ */
424
+ TAG_EXTRACT_AND_PROCESS = 2,
425
+
426
+ /**
427
+ * *
428
+ * Process Content Extraction + Token Tag Generation.
429
+ * Use this mode if you only need encrypted tokens generated.
430
+ * The other modes can trigger encrypted token generation by
431
+ * adding generateTokens = true on the ContentItemDesc.
432
+ *
433
+ * 05 bc in-between 0-1
434
+ *
435
+ * @generated from enum value: EXTRACT_GENERATE_TOKENS = 5;
436
+ */
437
+ EXTRACT_GENERATE_TOKENS = 5,
438
+ }
439
+
440
+ /**
441
+ * Describes the enum tagging.pdp.v2.TagRequestOptions.Mode.
442
+ */
443
+ export const TagRequestOptions_ModeSchema: GenEnum<TagRequestOptions_Mode> =
444
+ /*@__PURE__*/
445
+ enumDesc(file_tagging_pdp_v2_tagging, 8, 0);
446
+
447
+ /**
448
+ * Response tags for a TaggingPDPRequest
449
+ *
450
+ * @generated from message tagging.pdp.v2.TaggingPDPResponse
451
+ */
452
+ export type TaggingPDPResponse =
453
+ Message<'tagging.pdp.v2.TaggingPDPResponse'> & {
454
+ /**
455
+ * list of tags
456
+ *
457
+ * @generated from field: repeated tagging.pdp.v2.Tag tags = 1;
458
+ */
459
+ tags: Tag[];
460
+
461
+ /**
462
+ * any processing errors reported
463
+ *
464
+ * @generated from field: repeated tagging.pdp.v2.ProcessingEvent events = 2;
465
+ */
466
+ events: ProcessingEvent[];
467
+ };
468
+
469
+ /**
470
+ * Describes the message tagging.pdp.v2.TaggingPDPResponse.
471
+ * Use `create(TaggingPDPResponseSchema)` to create a new message.
472
+ */
473
+ export const TaggingPDPResponseSchema: GenMessage<TaggingPDPResponse> =
474
+ /*@__PURE__*/
475
+ messageDesc(file_tagging_pdp_v2_tagging, 9);
476
+
477
+ /**
478
+ * @generated from message tagging.pdp.v2.TagsForContentItem
479
+ */
480
+ export type TagsForContentItem =
481
+ Message<'tagging.pdp.v2.TagsForContentItem'> & {
482
+ /**
483
+ * The tags for a specific content item
484
+ *
485
+ * @generated from field: repeated tagging.pdp.v2.Tag tags = 1;
486
+ */
487
+ tags: Tag[];
488
+
489
+ /**
490
+ * The ID of the content item
491
+ *
492
+ * @generated from field: string content_id = 2;
493
+ */
494
+ contentId: string;
495
+ };
496
+
497
+ /**
498
+ * Describes the message tagging.pdp.v2.TagsForContentItem.
499
+ * Use `create(TagsForContentItemSchema)` to create a new message.
500
+ */
501
+ export const TagsForContentItemSchema: GenMessage<TagsForContentItem> =
502
+ /*@__PURE__*/
503
+ messageDesc(file_tagging_pdp_v2_tagging, 10);
504
+
505
+ /**
506
+ * @generated from message tagging.pdp.v2.TagPerContentResponse
507
+ */
508
+ export type TagPerContentResponse =
509
+ Message<'tagging.pdp.v2.TagPerContentResponse'> & {
510
+ /**
511
+ * List of tags processed and rolled up across content
512
+ *
513
+ * @generated from field: repeated tagging.pdp.v2.Tag cross_content_tags = 1;
514
+ */
515
+ crossContentTags: Tag[];
516
+
517
+ /**
518
+ * Any processing errors reported
519
+ *
520
+ * @generated from field: repeated tagging.pdp.v2.ProcessingEvent events = 2;
521
+ */
522
+ events: ProcessingEvent[];
523
+
524
+ /**
525
+ * List of tags for each content item
526
+ *
527
+ * @generated from field: repeated tagging.pdp.v2.TagsForContentItem per_content_tags = 3;
528
+ */
529
+ perContentTags: TagsForContentItem[];
530
+ };
531
+
532
+ /**
533
+ * Describes the message tagging.pdp.v2.TagPerContentResponse.
534
+ * Use `create(TagPerContentResponseSchema)` to create a new message.
535
+ */
536
+ export const TagPerContentResponseSchema: GenMessage<TagPerContentResponse> =
537
+ /*@__PURE__*/
538
+ messageDesc(file_tagging_pdp_v2_tagging, 11);
539
+
540
+ /**
541
+ * tag specific properties
542
+ *
543
+ * @generated from message tagging.pdp.v2.TagProperties
544
+ */
545
+ export type TagProperties = Message<'tagging.pdp.v2.TagProperties'> & {
546
+ /**
547
+ * key,value properties
548
+ *
549
+ * @generated from field: map<string, string> items = 4;
550
+ */
551
+ items: { [key: string]: string };
552
+ };
553
+
554
+ /**
555
+ * Describes the message tagging.pdp.v2.TagProperties.
556
+ * Use `create(TagPropertiesSchema)` to create a new message.
557
+ */
558
+ export const TagPropertiesSchema: GenMessage<TagProperties> =
559
+ /*@__PURE__*/
560
+ messageDesc(file_tagging_pdp_v2_tagging, 12);
561
+
562
+ /**
563
+ * @generated from message tagging.pdp.v2.TagMetadata
564
+ */
565
+ export type TagMetadata = Message<'tagging.pdp.v2.TagMetadata'> & {
566
+ /**
567
+ * tag identifier
568
+ *
569
+ * @generated from field: string id = 1;
570
+ */
571
+ id: string;
572
+
573
+ /**
574
+ * Provenance information of this tag.
575
+ *
576
+ * @generated from field: optional tagging.pdp.v2.TagProvenance provenance = 3;
577
+ */
578
+ provenance?: TagProvenance;
579
+ };
580
+
581
+ /**
582
+ * Describes the message tagging.pdp.v2.TagMetadata.
583
+ * Use `create(TagMetadataSchema)` to create a new message.
584
+ */
585
+ export const TagMetadataSchema: GenMessage<TagMetadata> =
586
+ /*@__PURE__*/
587
+ messageDesc(file_tagging_pdp_v2_tagging, 13);
588
+
589
+ /**
590
+ * @generated from message tagging.pdp.v2.DataAttributeTag
591
+ */
592
+ export type DataAttributeTag = Message<'tagging.pdp.v2.DataAttributeTag'> & {
593
+ /**
594
+ * the data attribute fully qualified name
595
+ *
596
+ * @generated from field: string fqn = 1;
597
+ */
598
+ fqn: string;
599
+ };
600
+
601
+ /**
602
+ * Describes the message tagging.pdp.v2.DataAttributeTag.
603
+ * Use `create(DataAttributeTagSchema)` to create a new message.
604
+ */
605
+ export const DataAttributeTagSchema: GenMessage<DataAttributeTag> =
606
+ /*@__PURE__*/
607
+ messageDesc(file_tagging_pdp_v2_tagging, 14);
608
+
609
+ /**
610
+ * @generated from message tagging.pdp.v2.AssertionTag
611
+ */
612
+ export type AssertionTag = Message<'tagging.pdp.v2.AssertionTag'> & {
613
+ /**
614
+ * assertion format; e.g. xml, json
615
+ *
616
+ * @generated from field: string assertion_format = 1;
617
+ */
618
+ assertionFormat: string;
619
+
620
+ /**
621
+ * assertion type; e.g. stanag_4774
622
+ *
623
+ * @generated from field: string assertion_type = 2;
624
+ */
625
+ assertionType: string;
626
+
627
+ /**
628
+ * assertion value as encoded string (per assertion_format)
629
+ *
630
+ * @generated from field: string assertion_value = 3;
631
+ */
632
+ assertionValue: string;
633
+ };
634
+
635
+ /**
636
+ * Describes the message tagging.pdp.v2.AssertionTag.
637
+ * Use `create(AssertionTagSchema)` to create a new message.
638
+ */
639
+ export const AssertionTagSchema: GenMessage<AssertionTag> =
640
+ /*@__PURE__*/
641
+ messageDesc(file_tagging_pdp_v2_tagging, 15);
642
+
643
+ /**
644
+ * @generated from message tagging.pdp.v2.EncryptedSearchTokenTag
645
+ */
646
+ export type EncryptedSearchTokenTag =
647
+ Message<'tagging.pdp.v2.EncryptedSearchTokenTag'> & {
648
+ /**
649
+ * the encrypted search token value
650
+ *
651
+ * @generated from field: string token = 1;
652
+ */
653
+ token: string;
654
+ };
655
+
656
+ /**
657
+ * Describes the message tagging.pdp.v2.EncryptedSearchTokenTag.
658
+ * Use `create(EncryptedSearchTokenTagSchema)` to create a new message.
659
+ */
660
+ export const EncryptedSearchTokenTagSchema: GenMessage<EncryptedSearchTokenTag> =
661
+ /*@__PURE__*/
662
+ messageDesc(file_tagging_pdp_v2_tagging, 16);
663
+
664
+ /**
665
+ * A Tag produced by the Tagging PDP
666
+ *
667
+ * @generated from message tagging.pdp.v2.Tag
668
+ */
669
+ export type Tag = Message<'tagging.pdp.v2.Tag'> & {
670
+ /**
671
+ * tag metadata
672
+ *
673
+ * @generated from field: tagging.pdp.v2.TagMetadata metadata = 1;
674
+ */
675
+ metadata?: TagMetadata;
676
+
677
+ /**
678
+ * tag value - one of assertion, data attribute or encrypted search token
679
+ *
680
+ * @generated from oneof tagging.pdp.v2.Tag.value
681
+ */
682
+ value:
683
+ | {
684
+ /**
685
+ * @generated from field: tagging.pdp.v2.AssertionTag assertion = 2;
686
+ */
687
+ value: AssertionTag;
688
+ case: 'assertion';
689
+ }
690
+ | {
691
+ /**
692
+ * @generated from field: tagging.pdp.v2.DataAttributeTag data_attribute = 3;
693
+ */
694
+ value: DataAttributeTag;
695
+ case: 'dataAttribute';
696
+ }
697
+ | {
698
+ /**
699
+ * @generated from field: tagging.pdp.v2.EncryptedSearchTokenTag encrypted_search_token = 4;
700
+ */
701
+ value: EncryptedSearchTokenTag;
702
+ case: 'encryptedSearchToken';
703
+ }
704
+ | { case: undefined; value?: undefined };
705
+ };
706
+
707
+ /**
708
+ * Describes the message tagging.pdp.v2.Tag.
709
+ * Use `create(TagSchema)` to create a new message.
710
+ */
711
+ export const TagSchema: GenMessage<Tag> =
712
+ /*@__PURE__*/
713
+ messageDesc(file_tagging_pdp_v2_tagging, 17);
714
+
715
+ /**
716
+ * Provenance description for a tag sourced from another tag
717
+ *
718
+ * @generated from message tagging.pdp.v2.TagProvenanceSourceDesc
719
+ */
720
+ export type TagProvenanceSourceDesc =
721
+ Message<'tagging.pdp.v2.TagProvenanceSourceDesc'> & {
722
+ /**
723
+ * tag type. e.g. custom.tag
724
+ *
725
+ * @generated from field: string type = 1;
726
+ */
727
+ type: string;
728
+
729
+ /**
730
+ * identifier of the tag
731
+ *
732
+ * @generated from field: string tagId = 2;
733
+ */
734
+ tagId: string;
735
+ };
736
+
737
+ /**
738
+ * Describes the message tagging.pdp.v2.TagProvenanceSourceDesc.
739
+ * Use `create(TagProvenanceSourceDescSchema)` to create a new message.
740
+ */
741
+ export const TagProvenanceSourceDescSchema: GenMessage<TagProvenanceSourceDesc> =
742
+ /*@__PURE__*/
743
+ messageDesc(file_tagging_pdp_v2_tagging, 18);
744
+
745
+ /**
746
+ *
747
+ * Provenance description for tag sourced from a content item
748
+ *
749
+ * Example: Provenance for a Tag "foo" where:
750
+ * - Input: Content Item {"id":"1","type":"email.header","text":"foo bar"}
751
+ * - A Tag producer using a regex rule to find "foo" in content and on match produce
752
+ * the tag foo of type custom.tag
753
+ * - id = "tagger_1"
754
+ * - regex rule id = "foo_regex"
755
+ * - Output Tag:
756
+ * - id: "1"
757
+ * - type: "custom.tag"
758
+ * - value: "foo"
759
+ * - provenance:
760
+ * - producerId: "tagger_1.foo_regex"
761
+ * - contentSource
762
+ * - sourceContentId: "1"
763
+ * - sourceContentType: "email.header"
764
+ * - startOffset: 0
765
+ * - endOffset: 2
766
+ * - text: "foo bar"
767
+ *
768
+ * @generated from message tagging.pdp.v2.ContentProvenanceSourceDesc
769
+ */
770
+ export type ContentProvenanceSourceDesc =
771
+ Message<'tagging.pdp.v2.ContentProvenanceSourceDesc'> & {
772
+ /**
773
+ * start offset in the content item relevant to the tag
774
+ *
775
+ * @generated from field: int32 startOffset = 1;
776
+ */
777
+ startOffset: number;
778
+
779
+ /**
780
+ * end offset in the content item relevant to the tag
781
+ *
782
+ * @generated from field: int32 endOffset = 2;
783
+ */
784
+ endOffset: number;
785
+
786
+ /**
787
+ * Relevant text associated with the production of the tag.
788
+ *
789
+ * @generated from field: optional string text = 3;
790
+ */
791
+ text?: string;
792
+
793
+ /**
794
+ * The content item type. e.g. email.header
795
+ *
796
+ * @generated from field: string sourceContentType = 4;
797
+ */
798
+ sourceContentType: string;
799
+
800
+ /**
801
+ * the source content id
802
+ *
803
+ * @generated from field: string sourceContentId = 5;
804
+ */
805
+ sourceContentId: string;
806
+
807
+ /**
808
+ * extra source desc properties
809
+ *
810
+ * @generated from field: map<string, string> source_desc_properties = 6;
811
+ */
812
+ sourceDescProperties: { [key: string]: string };
813
+ };
814
+
815
+ /**
816
+ * Describes the message tagging.pdp.v2.ContentProvenanceSourceDesc.
817
+ * Use `create(ContentProvenanceSourceDescSchema)` to create a new message.
818
+ */
819
+ export const ContentProvenanceSourceDescSchema: GenMessage<ContentProvenanceSourceDesc> =
820
+ /*@__PURE__*/
821
+ messageDesc(file_tagging_pdp_v2_tagging, 19);
822
+
823
+ /**
824
+ * Encapsulates a source of provenance for a tag
825
+ *
826
+ * @generated from message tagging.pdp.v2.TagProvenanceSource
827
+ */
828
+ export type TagProvenanceSource =
829
+ Message<'tagging.pdp.v2.TagProvenanceSource'> & {
830
+ /**
831
+ * identifier of the tag "producer". i.e. rule id, processor id...
832
+ *
833
+ * @generated from field: string producerId = 1;
834
+ */
835
+ producerId: string;
836
+
837
+ /**
838
+ * The item's content; one of text, binary or url
839
+ *
840
+ * @generated from oneof tagging.pdp.v2.TagProvenanceSource.source
841
+ */
842
+ source:
843
+ | {
844
+ /**
845
+ * tag source
846
+ *
847
+ * @generated from field: tagging.pdp.v2.TagProvenanceSourceDesc tagSource = 2;
848
+ */
849
+ value: TagProvenanceSourceDesc;
850
+ case: 'tagSource';
851
+ }
852
+ | {
853
+ /**
854
+ * content source
855
+ *
856
+ * @generated from field: tagging.pdp.v2.ContentProvenanceSourceDesc contentSource = 3;
857
+ */
858
+ value: ContentProvenanceSourceDesc;
859
+ case: 'contentSource';
860
+ }
861
+ | { case: undefined; value?: undefined };
862
+
863
+ /**
864
+ * label
865
+ *
866
+ * @generated from field: string label = 4;
867
+ */
868
+ label: string;
869
+ };
870
+
871
+ /**
872
+ * Describes the message tagging.pdp.v2.TagProvenanceSource.
873
+ * Use `create(TagProvenanceSourceSchema)` to create a new message.
874
+ */
875
+ export const TagProvenanceSourceSchema: GenMessage<TagProvenanceSource> =
876
+ /*@__PURE__*/
877
+ messageDesc(file_tagging_pdp_v2_tagging, 20);
878
+
879
+ /**
880
+ * Description containing Provenance information of a Tag
881
+ *
882
+ * @generated from message tagging.pdp.v2.TagProvenance
883
+ */
884
+ export type TagProvenance = Message<'tagging.pdp.v2.TagProvenance'> & {
885
+ /**
886
+ * one or more provenance sources
887
+ *
888
+ * @generated from field: repeated tagging.pdp.v2.TagProvenanceSource sources = 1;
889
+ */
890
+ sources: TagProvenanceSource[];
891
+ };
892
+
893
+ /**
894
+ * Describes the message tagging.pdp.v2.TagProvenance.
895
+ * Use `create(TagProvenanceSchema)` to create a new message.
896
+ */
897
+ export const TagProvenanceSchema: GenMessage<TagProvenance> =
898
+ /*@__PURE__*/
899
+ messageDesc(file_tagging_pdp_v2_tagging, 21);
900
+
901
+ /**
902
+ * Descriptor of a content item, separate from the content item's "payload" or content
903
+ *
904
+ * @generated from message tagging.pdp.v2.ContentItemDesc
905
+ */
906
+ export type ContentItemDesc = Message<'tagging.pdp.v2.ContentItemDesc'> & {
907
+ /**
908
+ * The type of content item. naming convention is in namespace format
909
+ * e.g. mimemessage.header , mimemessage.body.text
910
+ *
911
+ * @generated from field: string type = 1;
912
+ */
913
+ type: string;
914
+
915
+ /**
916
+ * optional metadata
917
+ *
918
+ * @generated from field: map<string, string> metadata = 2;
919
+ */
920
+ metadata: { [key: string]: string };
921
+
922
+ /**
923
+ * flag informing the pdp that this item should only have it's existing tags
924
+ * (third party) processed.
925
+ * default = false.
926
+ *
927
+ * @generated from field: optional bool onlyTags = 3;
928
+ */
929
+ onlyTags?: boolean;
930
+
931
+ /**
932
+ * identifier for this content item, used to track provenance with a default assigned otherwise.
933
+ *
934
+ * @generated from field: optional string id = 4;
935
+ */
936
+ id?: string;
937
+
938
+ /**
939
+ * name of sourced content. i.e. filename.
940
+ *
941
+ * @generated from field: optional string name = 5;
942
+ */
943
+ name?: string;
944
+
945
+ /**
946
+ *
947
+ * Should encrypted tokens be generated for this item.
948
+ * Default is false.
949
+ *
950
+ * @generated from field: optional bool generateTokens = 6;
951
+ */
952
+ generateTokens?: boolean;
953
+ };
954
+
955
+ /**
956
+ * Describes the message tagging.pdp.v2.ContentItemDesc.
957
+ * Use `create(ContentItemDescSchema)` to create a new message.
958
+ */
959
+ export const ContentItemDescSchema: GenMessage<ContentItemDesc> =
960
+ /*@__PURE__*/
961
+ messageDesc(file_tagging_pdp_v2_tagging, 22);
962
+
963
+ /**
964
+ * A Content Item holding a specific type of content.
965
+ *
966
+ * @generated from message tagging.pdp.v2.ContentItem
967
+ */
968
+ export type ContentItem = Message<'tagging.pdp.v2.ContentItem'> & {
969
+ /**
970
+ * Description of the content item.
971
+ *
972
+ * @generated from field: tagging.pdp.v2.ContentItemDesc desc = 1;
973
+ */
974
+ desc?: ContentItemDesc;
975
+
976
+ /**
977
+ * The item's content; one of text, binary or url
978
+ *
979
+ * @generated from oneof tagging.pdp.v2.ContentItem.content
980
+ */
981
+ content:
982
+ | {
983
+ /**
984
+ * text content
985
+ *
986
+ * @generated from field: string text = 2;
987
+ */
988
+ value: string;
989
+ case: 'text';
990
+ }
991
+ | {
992
+ /**
993
+ * binary content
994
+ *
995
+ * @generated from field: bytes binaryContent = 3;
996
+ */
997
+ value: Uint8Array;
998
+ case: 'binaryContent';
999
+ }
1000
+ | {
1001
+ /**
1002
+ * URL pointer to content
1003
+ *
1004
+ * @generated from field: string url = 4;
1005
+ */
1006
+ value: string;
1007
+ case: 'url';
1008
+ }
1009
+ | { case: undefined; value?: undefined };
1010
+ };
1011
+
1012
+ /**
1013
+ * Describes the message tagging.pdp.v2.ContentItem.
1014
+ * Use `create(ContentItemSchema)` to create a new message.
1015
+ */
1016
+ export const ContentItemSchema: GenMessage<ContentItem> =
1017
+ /*@__PURE__*/
1018
+ messageDesc(file_tagging_pdp_v2_tagging, 23);
1019
+
1020
+ /**
1021
+ * Tagging PDP Service
1022
+ *
1023
+ * @generated from service tagging.pdp.v2.TaggingPDPService
1024
+ */
1025
+ export const TaggingPDPService: GenService<{
1026
+ /**
1027
+ * Process a series of Content Items through the PDP to produce Tags
1028
+ *
1029
+ * @generated from rpc tagging.pdp.v2.TaggingPDPService.Tag
1030
+ */
1031
+ tag: {
1032
+ methodKind: 'unary';
1033
+ input: typeof TaggingPDPRequestSchema;
1034
+ output: typeof TaggingPDPResponseSchema;
1035
+ };
1036
+ /**
1037
+ * @generated from rpc tagging.pdp.v2.TaggingPDPService.TagPerContentItem
1038
+ */
1039
+ tagPerContentItem: {
1040
+ methodKind: 'unary';
1041
+ input: typeof TaggingPDPRequestSchema;
1042
+ output: typeof TagPerContentResponseSchema;
1043
+ };
1044
+ /**
1045
+ * Process a series of Content Items through the PDP to produce Tags via streaming content
1046
+ *
1047
+ * @generated from rpc tagging.pdp.v2.TaggingPDPService.TagStream
1048
+ */
1049
+ tagStream: {
1050
+ methodKind: 'client_streaming';
1051
+ input: typeof StreamingTaggingPDPRequestSchema;
1052
+ output: typeof TaggingPDPResponseSchema;
1053
+ };
1054
+ /**
1055
+ * Process a series of Tags
1056
+ *
1057
+ * @generated from rpc tagging.pdp.v2.TaggingPDPService.ProcessTags
1058
+ */
1059
+ processTags: {
1060
+ methodKind: 'unary';
1061
+ input: typeof ProcessTagsRequestSchema;
1062
+ output: typeof ProcessTagsResponseSchema;
1063
+ };
1064
+ }> = /*@__PURE__*/ serviceDesc(file_tagging_pdp_v2_tagging, 0);