@google-cloud/dlp 3.5.0 → 4.1.0

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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,43 @@
4
4
 
5
5
  [1]: https://www.npmjs.com/package/PACKAGE NAME?activeTab=versions
6
6
 
7
+ ## [4.1.0](https://github.com/googleapis/nodejs-dlp/compare/v4.0.2...v4.1.0) (2022-07-12)
8
+
9
+
10
+ ### Features
11
+
12
+ * InfoType categories were added to built-in infoTypes ([#730](https://github.com/googleapis/nodejs-dlp/issues/730)) ([1147763](https://github.com/googleapis/nodejs-dlp/commit/114776322342445ae1e792c51ee6a2eedc48bebf))
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * **deps:** do not depend on protobufjs ([#728](https://github.com/googleapis/nodejs-dlp/issues/728)) ([3ce38f6](https://github.com/googleapis/nodejs-dlp/commit/3ce38f6d714e32d7df3b01eb4e78023eff023de5))
18
+
19
+ ## [4.0.2](https://github.com/googleapis/nodejs-dlp/compare/v4.0.1...v4.0.2) (2022-06-30)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * **docs:** document fallback rest option ([#724](https://github.com/googleapis/nodejs-dlp/issues/724)) ([3d4518f](https://github.com/googleapis/nodejs-dlp/commit/3d4518f5d13e0a13fd993f541dbf6d5a6bb0febb))
25
+
26
+ ## [4.0.1](https://github.com/googleapis/nodejs-dlp/compare/v4.0.0...v4.0.1) (2022-06-07)
27
+
28
+
29
+ ### Bug Fixes
30
+
31
+ * **deps:** update dependency @google-cloud/pubsub to v3 ([#715](https://github.com/googleapis/nodejs-dlp/issues/715)) ([c8636f8](https://github.com/googleapis/nodejs-dlp/commit/c8636f84d844b594ffd11dd7bfbf5f73b56ee729))
32
+
33
+ ## [4.0.0](https://github.com/googleapis/nodejs-dlp/compare/v3.5.0...v4.0.0) (2022-05-20)
34
+
35
+
36
+ ### ⚠ BREAKING CHANGES
37
+
38
+ * update library to use Node 12 (#713)
39
+
40
+ ### Build System
41
+
42
+ * update library to use Node 12 ([#713](https://github.com/googleapis/nodejs-dlp/issues/713)) ([2999561](https://github.com/googleapis/nodejs-dlp/commit/2999561d3c1b1f4de78fb11a8c916e2bb06a92a5))
43
+
7
44
  ## [3.5.0](https://github.com/googleapis/nodejs-dlp/compare/v3.4.0...v3.5.0) (2022-04-01)
8
45
 
9
46
 
@@ -773,7 +773,7 @@ message InspectConfig {
773
773
  FindingLimits limits = 3;
774
774
 
775
775
  // When true, a contextual quote from the data that triggered a finding is
776
- // included in the response; see Finding.quote.
776
+ // included in the response; see [Finding.quote][google.privacy.dlp.v2.Finding.quote].
777
777
  // This is not used for data profiling.
778
778
  bool include_quote = 4;
779
779
 
@@ -1554,6 +1554,201 @@ message InfoTypeDescription {
1554
1554
  // Description of the infotype. Translated when language is provided in the
1555
1555
  // request.
1556
1556
  string description = 4;
1557
+
1558
+ // The category of the infoType.
1559
+ repeated InfoTypeCategory categories = 10;
1560
+ }
1561
+
1562
+ // Classification of infoTypes to organize them according to geographic
1563
+ // location, industry, and data type.
1564
+ message InfoTypeCategory {
1565
+ // Enum of the current locations.
1566
+ // We might add more locations in the future.
1567
+ enum LocationCategory {
1568
+ // Unused location
1569
+ LOCATION_UNSPECIFIED = 0;
1570
+
1571
+ // The infoType is not issued by or tied to a specific region, but is used
1572
+ // almost everywhere.
1573
+ GLOBAL = 1;
1574
+
1575
+ // The infoType is typically used in Argentina.
1576
+ ARGENTINA = 2;
1577
+
1578
+ // The infoType is typically used in Australia.
1579
+ AUSTRALIA = 3;
1580
+
1581
+ // The infoType is typically used in Belgium.
1582
+ BELGIUM = 4;
1583
+
1584
+ // The infoType is typically used in Brazil.
1585
+ BRAZIL = 5;
1586
+
1587
+ // The infoType is typically used in Canada.
1588
+ CANADA = 6;
1589
+
1590
+ // The infoType is typically used in Chile.
1591
+ CHILE = 7;
1592
+
1593
+ // The infoType is typically used in China.
1594
+ CHINA = 8;
1595
+
1596
+ // The infoType is typically used in Colombia.
1597
+ COLOMBIA = 9;
1598
+
1599
+ // The infoType is typically used in Denmark.
1600
+ DENMARK = 10;
1601
+
1602
+ // The infoType is typically used in France.
1603
+ FRANCE = 11;
1604
+
1605
+ // The infoType is typically used in Finland.
1606
+ FINLAND = 12;
1607
+
1608
+ // The infoType is typically used in Germany.
1609
+ GERMANY = 13;
1610
+
1611
+ // The infoType is typically used in Hong Kong.
1612
+ HONG_KONG = 14;
1613
+
1614
+ // The infoType is typically used in India.
1615
+ INDIA = 15;
1616
+
1617
+ // The infoType is typically used in Indonesia.
1618
+ INDONESIA = 16;
1619
+
1620
+ // The infoType is typically used in Ireland.
1621
+ IRELAND = 17;
1622
+
1623
+ // The infoType is typically used in Israel.
1624
+ ISRAEL = 18;
1625
+
1626
+ // The infoType is typically used in Italy.
1627
+ ITALY = 19;
1628
+
1629
+ // The infoType is typically used in Japan.
1630
+ JAPAN = 20;
1631
+
1632
+ // The infoType is typically used in Korea.
1633
+ KOREA = 21;
1634
+
1635
+ // The infoType is typically used in Mexico.
1636
+ MEXICO = 22;
1637
+
1638
+ // The infoType is typically used in the Netherlands.
1639
+ THE_NETHERLANDS = 23;
1640
+
1641
+ // The infoType is typically used in Norway.
1642
+ NORWAY = 24;
1643
+
1644
+ // The infoType is typically used in Paraguay.
1645
+ PARAGUAY = 25;
1646
+
1647
+ // The infoType is typically used in Peru.
1648
+ PERU = 26;
1649
+
1650
+ // The infoType is typically used in Poland.
1651
+ POLAND = 27;
1652
+
1653
+ // The infoType is typically used in Portugal.
1654
+ PORTUGAL = 28;
1655
+
1656
+ // The infoType is typically used in Singapore.
1657
+ SINGAPORE = 29;
1658
+
1659
+ // The infoType is typically used in South Africa.
1660
+ SOUTH_AFRICA = 30;
1661
+
1662
+ // The infoType is typically used in Spain.
1663
+ SPAIN = 31;
1664
+
1665
+ // The infoType is typically used in Sweden.
1666
+ SWEDEN = 32;
1667
+
1668
+ // The infoType is typically used in Taiwan.
1669
+ TAIWAN = 33;
1670
+
1671
+ // The infoType is typically used in Thailand.
1672
+ THAILAND = 34;
1673
+
1674
+ // The infoType is typically used in Turkey.
1675
+ TURKEY = 35;
1676
+
1677
+ // The infoType is typically used in the United Kingdom.
1678
+ UNITED_KINGDOM = 36;
1679
+
1680
+ // The infoType is typically used in the United States.
1681
+ UNITED_STATES = 37;
1682
+
1683
+ // The infoType is typically used in Uruguay.
1684
+ URUGUAY = 38;
1685
+
1686
+ // The infoType is typically used in Venezuela.
1687
+ VENEZUELA = 39;
1688
+
1689
+ // The infoType is typically used in Google internally.
1690
+ INTERNAL = 40;
1691
+ }
1692
+
1693
+ // Enum of the current industries in the category.
1694
+ // We might add more industries in the future.
1695
+ enum IndustryCategory {
1696
+ // Unused industry
1697
+ INDUSTRY_UNSPECIFIED = 0;
1698
+
1699
+ // The infoType is typically used in the finance industry.
1700
+ FINANCE = 1;
1701
+
1702
+ // The infoType is typically used in the health industry.
1703
+ HEALTH = 2;
1704
+
1705
+ // The infoType is typically used in the telecommunications industry.
1706
+ TELECOMMUNICATIONS = 3;
1707
+ }
1708
+
1709
+ // Enum of the current types in the category.
1710
+ // We might add more types in the future.
1711
+ enum TypeCategory {
1712
+ // Unused type
1713
+ TYPE_UNSPECIFIED = 0;
1714
+
1715
+ // Personally identifiable information, for example, a
1716
+ // name or phone number
1717
+ PII = 1;
1718
+
1719
+ // Personally identifiable information that is especially sensitive, for
1720
+ // example, a passport number.
1721
+ SPII = 2;
1722
+
1723
+ // Attributes that can partially identify someone, especially in
1724
+ // combination with other attributes, like age, height, and gender.
1725
+ DEMOGRAPHIC = 3;
1726
+
1727
+ // Confidential or secret information, for example, a password.
1728
+ CREDENTIAL = 4;
1729
+
1730
+ // An identification document issued by a government.
1731
+ GOVERNMENT_ID = 5;
1732
+
1733
+ // A document, for example, a resume or source code.
1734
+ DOCUMENT = 6;
1735
+
1736
+ // Information that is not sensitive on its own, but provides details about
1737
+ // the circumstances surrounding an entity or an event.
1738
+ CONTEXTUAL_INFORMATION = 7;
1739
+ }
1740
+
1741
+ oneof category {
1742
+ // The region or country that issued the ID or document represented by the
1743
+ // infoType.
1744
+ LocationCategory location_category = 1;
1745
+
1746
+ // The group of relevant businesses where this infoType is commonly used
1747
+ IndustryCategory industry_category = 2;
1748
+
1749
+ // The class of identifiers where this infoType belongs
1750
+ TypeCategory type_category = 3;
1751
+ }
1557
1752
  }
1558
1753
 
1559
1754
  // Request for the list of infoTypes.
@@ -149,7 +149,11 @@ message CustomInfoType {
149
149
  // Message for specifying a window around a finding to apply a detection
150
150
  // rule.
151
151
  message Proximity {
152
- // Number of characters before the finding to consider.
152
+ // Number of characters before the finding to consider. For tabular data,
153
+ // if you want to modify the likelihood of an entire column of findngs,
154
+ // set this to 1. For more information, see
155
+ // [Hotword example: Set the match likelihood of a table column]
156
+ // (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
153
157
  int32 window_before = 1;
154
158
 
155
159
  // Number of characters after the finding to consider.
@@ -181,14 +185,19 @@ message CustomInfoType {
181
185
  // Regular expression pattern defining what qualifies as a hotword.
182
186
  Regex hotword_regex = 1;
183
187
 
184
- // Proximity of the finding within which the entire hotword must reside.
185
- // The total length of the window cannot exceed 1000 characters. Note that
186
- // the finding itself will be included in the window, so that hotwords may
187
- // be used to match substrings of the finding itself. For example, the
188
- // certainty of a phone number regex "\(\d{3}\) \d{3}-\d{4}" could be
189
- // adjusted upwards if the area code is known to be the local area code of
190
- // a company office using the hotword regex "\(xxx\)", where "xxx"
191
- // is the area code in question.
188
+ // Range of characters within which the entire hotword must reside.
189
+ // The total length of the window cannot exceed 1000 characters.
190
+ // The finding itself will be included in the window, so that hotwords can
191
+ // be used to match substrings of the finding itself. Suppose you
192
+ // want Cloud DLP to promote the likelihood of the phone number
193
+ // regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the
194
+ // area code of a company's office. In this case, use the hotword regex
195
+ // "\(xxx\)", where "xxx" is the area code in question.
196
+ //
197
+ // For tabular data, if you want to modify the likelihood of an entire
198
+ // column of findngs, see
199
+ // [Hotword example: Set the match likelihood of a table column]
200
+ // (https://cloud.google.com/dlp/docs/creating-custom-infotypes-likelihood#match-column-values).
192
201
  Proximity proximity = 2;
193
202
 
194
203
  // Likelihood adjustment to apply to all matching findings.
@@ -5000,6 +5000,9 @@ export namespace google {
5000
5000
 
5001
5001
  /** InfoTypeDescription description */
5002
5002
  description?: (string|null);
5003
+
5004
+ /** InfoTypeDescription categories */
5005
+ categories?: (google.privacy.dlp.v2.IInfoTypeCategory[]|null);
5003
5006
  }
5004
5007
 
5005
5008
  /** Represents an InfoTypeDescription. */
@@ -5023,6 +5026,9 @@ export namespace google {
5023
5026
  /** InfoTypeDescription description. */
5024
5027
  public description: string;
5025
5028
 
5029
+ /** InfoTypeDescription categories. */
5030
+ public categories: google.privacy.dlp.v2.IInfoTypeCategory[];
5031
+
5026
5032
  /**
5027
5033
  * Creates a new InfoTypeDescription instance using the specified properties.
5028
5034
  * @param [properties] Properties to set
@@ -5094,6 +5100,179 @@ export namespace google {
5094
5100
  public toJSON(): { [k: string]: any };
5095
5101
  }
5096
5102
 
5103
+ /** Properties of an InfoTypeCategory. */
5104
+ interface IInfoTypeCategory {
5105
+
5106
+ /** InfoTypeCategory locationCategory */
5107
+ locationCategory?: (google.privacy.dlp.v2.InfoTypeCategory.LocationCategory|keyof typeof google.privacy.dlp.v2.InfoTypeCategory.LocationCategory|null);
5108
+
5109
+ /** InfoTypeCategory industryCategory */
5110
+ industryCategory?: (google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory|keyof typeof google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory|null);
5111
+
5112
+ /** InfoTypeCategory typeCategory */
5113
+ typeCategory?: (google.privacy.dlp.v2.InfoTypeCategory.TypeCategory|keyof typeof google.privacy.dlp.v2.InfoTypeCategory.TypeCategory|null);
5114
+ }
5115
+
5116
+ /** Represents an InfoTypeCategory. */
5117
+ class InfoTypeCategory implements IInfoTypeCategory {
5118
+
5119
+ /**
5120
+ * Constructs a new InfoTypeCategory.
5121
+ * @param [properties] Properties to set
5122
+ */
5123
+ constructor(properties?: google.privacy.dlp.v2.IInfoTypeCategory);
5124
+
5125
+ /** InfoTypeCategory locationCategory. */
5126
+ public locationCategory?: (google.privacy.dlp.v2.InfoTypeCategory.LocationCategory|keyof typeof google.privacy.dlp.v2.InfoTypeCategory.LocationCategory|null);
5127
+
5128
+ /** InfoTypeCategory industryCategory. */
5129
+ public industryCategory?: (google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory|keyof typeof google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory|null);
5130
+
5131
+ /** InfoTypeCategory typeCategory. */
5132
+ public typeCategory?: (google.privacy.dlp.v2.InfoTypeCategory.TypeCategory|keyof typeof google.privacy.dlp.v2.InfoTypeCategory.TypeCategory|null);
5133
+
5134
+ /** InfoTypeCategory category. */
5135
+ public category?: ("locationCategory"|"industryCategory"|"typeCategory");
5136
+
5137
+ /**
5138
+ * Creates a new InfoTypeCategory instance using the specified properties.
5139
+ * @param [properties] Properties to set
5140
+ * @returns InfoTypeCategory instance
5141
+ */
5142
+ public static create(properties?: google.privacy.dlp.v2.IInfoTypeCategory): google.privacy.dlp.v2.InfoTypeCategory;
5143
+
5144
+ /**
5145
+ * Encodes the specified InfoTypeCategory message. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeCategory.verify|verify} messages.
5146
+ * @param message InfoTypeCategory message or plain object to encode
5147
+ * @param [writer] Writer to encode to
5148
+ * @returns Writer
5149
+ */
5150
+ public static encode(message: google.privacy.dlp.v2.IInfoTypeCategory, writer?: $protobuf.Writer): $protobuf.Writer;
5151
+
5152
+ /**
5153
+ * Encodes the specified InfoTypeCategory message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeCategory.verify|verify} messages.
5154
+ * @param message InfoTypeCategory message or plain object to encode
5155
+ * @param [writer] Writer to encode to
5156
+ * @returns Writer
5157
+ */
5158
+ public static encodeDelimited(message: google.privacy.dlp.v2.IInfoTypeCategory, writer?: $protobuf.Writer): $protobuf.Writer;
5159
+
5160
+ /**
5161
+ * Decodes an InfoTypeCategory message from the specified reader or buffer.
5162
+ * @param reader Reader or buffer to decode from
5163
+ * @param [length] Message length if known beforehand
5164
+ * @returns InfoTypeCategory
5165
+ * @throws {Error} If the payload is not a reader or valid buffer
5166
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
5167
+ */
5168
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InfoTypeCategory;
5169
+
5170
+ /**
5171
+ * Decodes an InfoTypeCategory message from the specified reader or buffer, length delimited.
5172
+ * @param reader Reader or buffer to decode from
5173
+ * @returns InfoTypeCategory
5174
+ * @throws {Error} If the payload is not a reader or valid buffer
5175
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
5176
+ */
5177
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InfoTypeCategory;
5178
+
5179
+ /**
5180
+ * Verifies an InfoTypeCategory message.
5181
+ * @param message Plain object to verify
5182
+ * @returns `null` if valid, otherwise the reason why it is not
5183
+ */
5184
+ public static verify(message: { [k: string]: any }): (string|null);
5185
+
5186
+ /**
5187
+ * Creates an InfoTypeCategory message from a plain object. Also converts values to their respective internal types.
5188
+ * @param object Plain object
5189
+ * @returns InfoTypeCategory
5190
+ */
5191
+ public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InfoTypeCategory;
5192
+
5193
+ /**
5194
+ * Creates a plain object from an InfoTypeCategory message. Also converts values to other types if specified.
5195
+ * @param message InfoTypeCategory
5196
+ * @param [options] Conversion options
5197
+ * @returns Plain object
5198
+ */
5199
+ public static toObject(message: google.privacy.dlp.v2.InfoTypeCategory, options?: $protobuf.IConversionOptions): { [k: string]: any };
5200
+
5201
+ /**
5202
+ * Converts this InfoTypeCategory to JSON.
5203
+ * @returns JSON object
5204
+ */
5205
+ public toJSON(): { [k: string]: any };
5206
+ }
5207
+
5208
+ namespace InfoTypeCategory {
5209
+
5210
+ /** LocationCategory enum. */
5211
+ enum LocationCategory {
5212
+ LOCATION_UNSPECIFIED = 0,
5213
+ GLOBAL = 1,
5214
+ ARGENTINA = 2,
5215
+ AUSTRALIA = 3,
5216
+ BELGIUM = 4,
5217
+ BRAZIL = 5,
5218
+ CANADA = 6,
5219
+ CHILE = 7,
5220
+ CHINA = 8,
5221
+ COLOMBIA = 9,
5222
+ DENMARK = 10,
5223
+ FRANCE = 11,
5224
+ FINLAND = 12,
5225
+ GERMANY = 13,
5226
+ HONG_KONG = 14,
5227
+ INDIA = 15,
5228
+ INDONESIA = 16,
5229
+ IRELAND = 17,
5230
+ ISRAEL = 18,
5231
+ ITALY = 19,
5232
+ JAPAN = 20,
5233
+ KOREA = 21,
5234
+ MEXICO = 22,
5235
+ THE_NETHERLANDS = 23,
5236
+ NORWAY = 24,
5237
+ PARAGUAY = 25,
5238
+ PERU = 26,
5239
+ POLAND = 27,
5240
+ PORTUGAL = 28,
5241
+ SINGAPORE = 29,
5242
+ SOUTH_AFRICA = 30,
5243
+ SPAIN = 31,
5244
+ SWEDEN = 32,
5245
+ TAIWAN = 33,
5246
+ THAILAND = 34,
5247
+ TURKEY = 35,
5248
+ UNITED_KINGDOM = 36,
5249
+ UNITED_STATES = 37,
5250
+ URUGUAY = 38,
5251
+ VENEZUELA = 39,
5252
+ INTERNAL = 40
5253
+ }
5254
+
5255
+ /** IndustryCategory enum. */
5256
+ enum IndustryCategory {
5257
+ INDUSTRY_UNSPECIFIED = 0,
5258
+ FINANCE = 1,
5259
+ HEALTH = 2,
5260
+ TELECOMMUNICATIONS = 3
5261
+ }
5262
+
5263
+ /** TypeCategory enum. */
5264
+ enum TypeCategory {
5265
+ TYPE_UNSPECIFIED = 0,
5266
+ PII = 1,
5267
+ SPII = 2,
5268
+ DEMOGRAPHIC = 3,
5269
+ CREDENTIAL = 4,
5270
+ GOVERNMENT_ID = 5,
5271
+ DOCUMENT = 6,
5272
+ CONTEXTUAL_INFORMATION = 7
5273
+ }
5274
+ }
5275
+
5097
5276
  /** Properties of a ListInfoTypesRequest. */
5098
5277
  interface IListInfoTypesRequest {
5099
5278
 
@@ -26158,6 +26337,9 @@ export namespace google {
26158
26337
  /** FieldOptions lazy */
26159
26338
  lazy?: (boolean|null);
26160
26339
 
26340
+ /** FieldOptions unverifiedLazy */
26341
+ unverifiedLazy?: (boolean|null);
26342
+
26161
26343
  /** FieldOptions deprecated */
26162
26344
  deprecated?: (boolean|null);
26163
26345
 
@@ -26195,6 +26377,9 @@ export namespace google {
26195
26377
  /** FieldOptions lazy. */
26196
26378
  public lazy: boolean;
26197
26379
 
26380
+ /** FieldOptions unverifiedLazy. */
26381
+ public unverifiedLazy: boolean;
26382
+
26198
26383
  /** FieldOptions deprecated. */
26199
26384
  public deprecated: boolean;
26200
26385