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