@google-cloud/dlp 5.1.0 → 5.2.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 +14 -0
- package/build/protos/protos.d.ts +6 -536
- package/build/protos/protos.js +76 -1925
- package/build/protos/protos.json +4 -288
- package/build/src/index.js +1 -1
- package/build/src/v2/dlp_service_client.d.ts +11 -2
- package/build/src/v2/dlp_service_client.js +37 -10
- package/build/src/v2/index.js +1 -1
- package/package.json +4 -4
package/build/protos/protos.json
CHANGED
|
@@ -6922,10 +6922,6 @@
|
|
|
6922
6922
|
"rule": "repeated",
|
|
6923
6923
|
"type": "ClientLibrarySettings",
|
|
6924
6924
|
"id": 109
|
|
6925
|
-
},
|
|
6926
|
-
"protoReferenceDocumentationUri": {
|
|
6927
|
-
"type": "string",
|
|
6928
|
-
"id": 110
|
|
6929
6925
|
}
|
|
6930
6926
|
}
|
|
6931
6927
|
},
|
|
@@ -6983,31 +6979,6 @@
|
|
|
6983
6979
|
"common": {
|
|
6984
6980
|
"type": "CommonLanguageSettings",
|
|
6985
6981
|
"id": 1
|
|
6986
|
-
},
|
|
6987
|
-
"renamedServices": {
|
|
6988
|
-
"keyType": "string",
|
|
6989
|
-
"type": "string",
|
|
6990
|
-
"id": 2
|
|
6991
|
-
},
|
|
6992
|
-
"renamedResources": {
|
|
6993
|
-
"keyType": "string",
|
|
6994
|
-
"type": "string",
|
|
6995
|
-
"id": 3
|
|
6996
|
-
},
|
|
6997
|
-
"ignoredResources": {
|
|
6998
|
-
"rule": "repeated",
|
|
6999
|
-
"type": "string",
|
|
7000
|
-
"id": 4
|
|
7001
|
-
},
|
|
7002
|
-
"forcedNamespaceAliases": {
|
|
7003
|
-
"rule": "repeated",
|
|
7004
|
-
"type": "string",
|
|
7005
|
-
"id": 5
|
|
7006
|
-
},
|
|
7007
|
-
"handwrittenSignatures": {
|
|
7008
|
-
"rule": "repeated",
|
|
7009
|
-
"type": "string",
|
|
7010
|
-
"id": 6
|
|
7011
6982
|
}
|
|
7012
6983
|
}
|
|
7013
6984
|
},
|
|
@@ -7067,10 +7038,7 @@
|
|
|
7067
7038
|
"CLOUD": 1,
|
|
7068
7039
|
"ADS": 2,
|
|
7069
7040
|
"PHOTOS": 3,
|
|
7070
|
-
"STREET_VIEW": 4
|
|
7071
|
-
"SHOPPING": 5,
|
|
7072
|
-
"GEO": 6,
|
|
7073
|
-
"GENERATIVE_AI": 7
|
|
7041
|
+
"STREET_VIEW": 4
|
|
7074
7042
|
}
|
|
7075
7043
|
},
|
|
7076
7044
|
"ClientLibraryDestination": {
|
|
@@ -7366,25 +7334,6 @@
|
|
|
7366
7334
|
"rule": "repeated",
|
|
7367
7335
|
"type": "UninterpretedOption",
|
|
7368
7336
|
"id": 999
|
|
7369
|
-
},
|
|
7370
|
-
"declaration": {
|
|
7371
|
-
"rule": "repeated",
|
|
7372
|
-
"type": "Declaration",
|
|
7373
|
-
"id": 2,
|
|
7374
|
-
"options": {
|
|
7375
|
-
"retention": "RETENTION_SOURCE"
|
|
7376
|
-
}
|
|
7377
|
-
},
|
|
7378
|
-
"features": {
|
|
7379
|
-
"type": "FeatureSet",
|
|
7380
|
-
"id": 50
|
|
7381
|
-
},
|
|
7382
|
-
"verification": {
|
|
7383
|
-
"type": "VerificationState",
|
|
7384
|
-
"id": 3,
|
|
7385
|
-
"options": {
|
|
7386
|
-
"default": "UNVERIFIED"
|
|
7387
|
-
}
|
|
7388
7337
|
}
|
|
7389
7338
|
},
|
|
7390
7339
|
"extensions": [
|
|
@@ -7392,45 +7341,7 @@
|
|
|
7392
7341
|
1000,
|
|
7393
7342
|
536870911
|
|
7394
7343
|
]
|
|
7395
|
-
]
|
|
7396
|
-
"nested": {
|
|
7397
|
-
"Declaration": {
|
|
7398
|
-
"fields": {
|
|
7399
|
-
"number": {
|
|
7400
|
-
"type": "int32",
|
|
7401
|
-
"id": 1
|
|
7402
|
-
},
|
|
7403
|
-
"fullName": {
|
|
7404
|
-
"type": "string",
|
|
7405
|
-
"id": 2
|
|
7406
|
-
},
|
|
7407
|
-
"type": {
|
|
7408
|
-
"type": "string",
|
|
7409
|
-
"id": 3
|
|
7410
|
-
},
|
|
7411
|
-
"reserved": {
|
|
7412
|
-
"type": "bool",
|
|
7413
|
-
"id": 5
|
|
7414
|
-
},
|
|
7415
|
-
"repeated": {
|
|
7416
|
-
"type": "bool",
|
|
7417
|
-
"id": 6
|
|
7418
|
-
}
|
|
7419
|
-
},
|
|
7420
|
-
"reserved": [
|
|
7421
|
-
[
|
|
7422
|
-
4,
|
|
7423
|
-
4
|
|
7424
|
-
]
|
|
7425
|
-
]
|
|
7426
|
-
},
|
|
7427
|
-
"VerificationState": {
|
|
7428
|
-
"values": {
|
|
7429
|
-
"DECLARATION": 0,
|
|
7430
|
-
"UNVERIFIED": 1
|
|
7431
|
-
}
|
|
7432
|
-
}
|
|
7433
|
-
}
|
|
7344
|
+
]
|
|
7434
7345
|
},
|
|
7435
7346
|
"FieldDescriptorProto": {
|
|
7436
7347
|
"fields": {
|
|
@@ -7743,10 +7654,6 @@
|
|
|
7743
7654
|
"type": "string",
|
|
7744
7655
|
"id": 45
|
|
7745
7656
|
},
|
|
7746
|
-
"features": {
|
|
7747
|
-
"type": "FeatureSet",
|
|
7748
|
-
"id": 50
|
|
7749
|
-
},
|
|
7750
7657
|
"uninterpretedOption": {
|
|
7751
7658
|
"rule": "repeated",
|
|
7752
7659
|
"type": "UninterpretedOption",
|
|
@@ -7809,10 +7716,6 @@
|
|
|
7809
7716
|
"deprecated": true
|
|
7810
7717
|
}
|
|
7811
7718
|
},
|
|
7812
|
-
"features": {
|
|
7813
|
-
"type": "FeatureSet",
|
|
7814
|
-
"id": 12
|
|
7815
|
-
},
|
|
7816
7719
|
"uninterpretedOption": {
|
|
7817
7720
|
"rule": "repeated",
|
|
7818
7721
|
"type": "UninterpretedOption",
|
|
@@ -7907,22 +7810,9 @@
|
|
|
7907
7810
|
"type": "OptionRetention",
|
|
7908
7811
|
"id": 17
|
|
7909
7812
|
},
|
|
7910
|
-
"
|
|
7911
|
-
"rule": "repeated",
|
|
7813
|
+
"target": {
|
|
7912
7814
|
"type": "OptionTargetType",
|
|
7913
|
-
"id":
|
|
7914
|
-
"options": {
|
|
7915
|
-
"packed": false
|
|
7916
|
-
}
|
|
7917
|
-
},
|
|
7918
|
-
"editionDefaults": {
|
|
7919
|
-
"rule": "repeated",
|
|
7920
|
-
"type": "EditionDefault",
|
|
7921
|
-
"id": 20
|
|
7922
|
-
},
|
|
7923
|
-
"features": {
|
|
7924
|
-
"type": "FeatureSet",
|
|
7925
|
-
"id": 21
|
|
7815
|
+
"id": 18
|
|
7926
7816
|
},
|
|
7927
7817
|
"uninterpretedOption": {
|
|
7928
7818
|
"rule": "repeated",
|
|
@@ -7940,10 +7830,6 @@
|
|
|
7940
7830
|
[
|
|
7941
7831
|
4,
|
|
7942
7832
|
4
|
|
7943
|
-
],
|
|
7944
|
-
[
|
|
7945
|
-
18,
|
|
7946
|
-
18
|
|
7947
7833
|
]
|
|
7948
7834
|
],
|
|
7949
7835
|
"nested": {
|
|
@@ -7981,27 +7867,11 @@
|
|
|
7981
7867
|
"TARGET_TYPE_SERVICE": 8,
|
|
7982
7868
|
"TARGET_TYPE_METHOD": 9
|
|
7983
7869
|
}
|
|
7984
|
-
},
|
|
7985
|
-
"EditionDefault": {
|
|
7986
|
-
"fields": {
|
|
7987
|
-
"edition": {
|
|
7988
|
-
"type": "string",
|
|
7989
|
-
"id": 1
|
|
7990
|
-
},
|
|
7991
|
-
"value": {
|
|
7992
|
-
"type": "string",
|
|
7993
|
-
"id": 2
|
|
7994
|
-
}
|
|
7995
|
-
}
|
|
7996
7870
|
}
|
|
7997
7871
|
}
|
|
7998
7872
|
},
|
|
7999
7873
|
"OneofOptions": {
|
|
8000
7874
|
"fields": {
|
|
8001
|
-
"features": {
|
|
8002
|
-
"type": "FeatureSet",
|
|
8003
|
-
"id": 1
|
|
8004
|
-
},
|
|
8005
7875
|
"uninterpretedOption": {
|
|
8006
7876
|
"rule": "repeated",
|
|
8007
7877
|
"type": "UninterpretedOption",
|
|
@@ -8035,10 +7905,6 @@
|
|
|
8035
7905
|
"deprecated": true
|
|
8036
7906
|
}
|
|
8037
7907
|
},
|
|
8038
|
-
"features": {
|
|
8039
|
-
"type": "FeatureSet",
|
|
8040
|
-
"id": 7
|
|
8041
|
-
},
|
|
8042
7908
|
"uninterpretedOption": {
|
|
8043
7909
|
"rule": "repeated",
|
|
8044
7910
|
"type": "UninterpretedOption",
|
|
@@ -8067,17 +7933,6 @@
|
|
|
8067
7933
|
"default": false
|
|
8068
7934
|
}
|
|
8069
7935
|
},
|
|
8070
|
-
"features": {
|
|
8071
|
-
"type": "FeatureSet",
|
|
8072
|
-
"id": 2
|
|
8073
|
-
},
|
|
8074
|
-
"debugRedact": {
|
|
8075
|
-
"type": "bool",
|
|
8076
|
-
"id": 3,
|
|
8077
|
-
"options": {
|
|
8078
|
-
"default": false
|
|
8079
|
-
}
|
|
8080
|
-
},
|
|
8081
7936
|
"uninterpretedOption": {
|
|
8082
7937
|
"rule": "repeated",
|
|
8083
7938
|
"type": "UninterpretedOption",
|
|
@@ -8093,10 +7948,6 @@
|
|
|
8093
7948
|
},
|
|
8094
7949
|
"ServiceOptions": {
|
|
8095
7950
|
"fields": {
|
|
8096
|
-
"features": {
|
|
8097
|
-
"type": "FeatureSet",
|
|
8098
|
-
"id": 34
|
|
8099
|
-
},
|
|
8100
7951
|
"deprecated": {
|
|
8101
7952
|
"type": "bool",
|
|
8102
7953
|
"id": 33,
|
|
@@ -8133,10 +7984,6 @@
|
|
|
8133
7984
|
"default": "IDEMPOTENCY_UNKNOWN"
|
|
8134
7985
|
}
|
|
8135
7986
|
},
|
|
8136
|
-
"features": {
|
|
8137
|
-
"type": "FeatureSet",
|
|
8138
|
-
"id": 35
|
|
8139
|
-
},
|
|
8140
7987
|
"uninterpretedOption": {
|
|
8141
7988
|
"rule": "repeated",
|
|
8142
7989
|
"type": "UninterpretedOption",
|
|
@@ -8208,137 +8055,6 @@
|
|
|
8208
8055
|
}
|
|
8209
8056
|
}
|
|
8210
8057
|
},
|
|
8211
|
-
"FeatureSet": {
|
|
8212
|
-
"fields": {
|
|
8213
|
-
"fieldPresence": {
|
|
8214
|
-
"type": "FieldPresence",
|
|
8215
|
-
"id": 1,
|
|
8216
|
-
"options": {
|
|
8217
|
-
"retention": "RETENTION_RUNTIME",
|
|
8218
|
-
"targets": "TARGET_TYPE_FILE",
|
|
8219
|
-
"edition_defaults.edition": "2023",
|
|
8220
|
-
"edition_defaults.value": "EXPLICIT"
|
|
8221
|
-
}
|
|
8222
|
-
},
|
|
8223
|
-
"enumType": {
|
|
8224
|
-
"type": "EnumType",
|
|
8225
|
-
"id": 2,
|
|
8226
|
-
"options": {
|
|
8227
|
-
"retention": "RETENTION_RUNTIME",
|
|
8228
|
-
"targets": "TARGET_TYPE_FILE",
|
|
8229
|
-
"edition_defaults.edition": "2023",
|
|
8230
|
-
"edition_defaults.value": "OPEN"
|
|
8231
|
-
}
|
|
8232
|
-
},
|
|
8233
|
-
"repeatedFieldEncoding": {
|
|
8234
|
-
"type": "RepeatedFieldEncoding",
|
|
8235
|
-
"id": 3,
|
|
8236
|
-
"options": {
|
|
8237
|
-
"retention": "RETENTION_RUNTIME",
|
|
8238
|
-
"targets": "TARGET_TYPE_FILE",
|
|
8239
|
-
"edition_defaults.edition": "2023",
|
|
8240
|
-
"edition_defaults.value": "PACKED"
|
|
8241
|
-
}
|
|
8242
|
-
},
|
|
8243
|
-
"stringFieldValidation": {
|
|
8244
|
-
"type": "StringFieldValidation",
|
|
8245
|
-
"id": 4,
|
|
8246
|
-
"options": {
|
|
8247
|
-
"retention": "RETENTION_RUNTIME",
|
|
8248
|
-
"targets": "TARGET_TYPE_FILE",
|
|
8249
|
-
"edition_defaults.edition": "2023",
|
|
8250
|
-
"edition_defaults.value": "MANDATORY"
|
|
8251
|
-
}
|
|
8252
|
-
},
|
|
8253
|
-
"messageEncoding": {
|
|
8254
|
-
"type": "MessageEncoding",
|
|
8255
|
-
"id": 5,
|
|
8256
|
-
"options": {
|
|
8257
|
-
"retention": "RETENTION_RUNTIME",
|
|
8258
|
-
"targets": "TARGET_TYPE_FILE",
|
|
8259
|
-
"edition_defaults.edition": "2023",
|
|
8260
|
-
"edition_defaults.value": "LENGTH_PREFIXED"
|
|
8261
|
-
}
|
|
8262
|
-
},
|
|
8263
|
-
"jsonFormat": {
|
|
8264
|
-
"type": "JsonFormat",
|
|
8265
|
-
"id": 6,
|
|
8266
|
-
"options": {
|
|
8267
|
-
"retention": "RETENTION_RUNTIME",
|
|
8268
|
-
"targets": "TARGET_TYPE_FILE",
|
|
8269
|
-
"edition_defaults.edition": "2023",
|
|
8270
|
-
"edition_defaults.value": "ALLOW"
|
|
8271
|
-
}
|
|
8272
|
-
},
|
|
8273
|
-
"rawFeatures": {
|
|
8274
|
-
"type": "FeatureSet",
|
|
8275
|
-
"id": 999,
|
|
8276
|
-
"options": {
|
|
8277
|
-
"targets": "TARGET_TYPE_UNKNOWN"
|
|
8278
|
-
}
|
|
8279
|
-
}
|
|
8280
|
-
},
|
|
8281
|
-
"extensions": [
|
|
8282
|
-
[
|
|
8283
|
-
1000,
|
|
8284
|
-
1000
|
|
8285
|
-
],
|
|
8286
|
-
[
|
|
8287
|
-
1001,
|
|
8288
|
-
1001
|
|
8289
|
-
],
|
|
8290
|
-
[
|
|
8291
|
-
9995,
|
|
8292
|
-
9999
|
|
8293
|
-
]
|
|
8294
|
-
],
|
|
8295
|
-
"nested": {
|
|
8296
|
-
"FieldPresence": {
|
|
8297
|
-
"values": {
|
|
8298
|
-
"FIELD_PRESENCE_UNKNOWN": 0,
|
|
8299
|
-
"EXPLICIT": 1,
|
|
8300
|
-
"IMPLICIT": 2,
|
|
8301
|
-
"LEGACY_REQUIRED": 3
|
|
8302
|
-
}
|
|
8303
|
-
},
|
|
8304
|
-
"EnumType": {
|
|
8305
|
-
"values": {
|
|
8306
|
-
"ENUM_TYPE_UNKNOWN": 0,
|
|
8307
|
-
"OPEN": 1,
|
|
8308
|
-
"CLOSED": 2
|
|
8309
|
-
}
|
|
8310
|
-
},
|
|
8311
|
-
"RepeatedFieldEncoding": {
|
|
8312
|
-
"values": {
|
|
8313
|
-
"REPEATED_FIELD_ENCODING_UNKNOWN": 0,
|
|
8314
|
-
"PACKED": 1,
|
|
8315
|
-
"EXPANDED": 2
|
|
8316
|
-
}
|
|
8317
|
-
},
|
|
8318
|
-
"StringFieldValidation": {
|
|
8319
|
-
"values": {
|
|
8320
|
-
"STRING_FIELD_VALIDATION_UNKNOWN": 0,
|
|
8321
|
-
"MANDATORY": 1,
|
|
8322
|
-
"HINT": 2,
|
|
8323
|
-
"NONE": 3
|
|
8324
|
-
}
|
|
8325
|
-
},
|
|
8326
|
-
"MessageEncoding": {
|
|
8327
|
-
"values": {
|
|
8328
|
-
"MESSAGE_ENCODING_UNKNOWN": 0,
|
|
8329
|
-
"LENGTH_PREFIXED": 1,
|
|
8330
|
-
"DELIMITED": 2
|
|
8331
|
-
}
|
|
8332
|
-
},
|
|
8333
|
-
"JsonFormat": {
|
|
8334
|
-
"values": {
|
|
8335
|
-
"JSON_FORMAT_UNKNOWN": 0,
|
|
8336
|
-
"ALLOW": 1,
|
|
8337
|
-
"LEGACY_BEST_EFFORT": 2
|
|
8338
|
-
}
|
|
8339
|
-
}
|
|
8340
|
-
}
|
|
8341
|
-
},
|
|
8342
8058
|
"SourceCodeInfo": {
|
|
8343
8059
|
"fields": {
|
|
8344
8060
|
"location": {
|
package/build/src/index.js
CHANGED
|
@@ -24,6 +24,8 @@ export declare class DlpServiceClient {
|
|
|
24
24
|
private _gaxGrpc;
|
|
25
25
|
private _protos;
|
|
26
26
|
private _defaults;
|
|
27
|
+
private _universeDomain;
|
|
28
|
+
private _servicePath;
|
|
27
29
|
auth: gax.GoogleAuth;
|
|
28
30
|
descriptors: Descriptors;
|
|
29
31
|
warn: (code: string, message: string, warnType?: string) => void;
|
|
@@ -93,15 +95,22 @@ export declare class DlpServiceClient {
|
|
|
93
95
|
}>;
|
|
94
96
|
/**
|
|
95
97
|
* The DNS address for this API service.
|
|
98
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
96
99
|
* @returns {string} The DNS address for this service.
|
|
97
100
|
*/
|
|
98
101
|
static get servicePath(): string;
|
|
99
102
|
/**
|
|
100
|
-
* The DNS address for this API service - same as servicePath
|
|
101
|
-
*
|
|
103
|
+
* The DNS address for this API service - same as servicePath.
|
|
104
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
102
105
|
* @returns {string} The DNS address for this service.
|
|
103
106
|
*/
|
|
104
107
|
static get apiEndpoint(): string;
|
|
108
|
+
/**
|
|
109
|
+
* The DNS address for this API service.
|
|
110
|
+
* @returns {string} The DNS address for this service.
|
|
111
|
+
*/
|
|
112
|
+
get apiEndpoint(): string;
|
|
113
|
+
get universeDomain(): string;
|
|
105
114
|
/**
|
|
106
115
|
* The port for this API service.
|
|
107
116
|
* @returns {number} The default port for this service.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2024 Google LLC
|
|
3
3
|
//
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// you may not use this file except in compliance with the License.
|
|
@@ -80,7 +80,7 @@ class DlpServiceClient {
|
|
|
80
80
|
* ```
|
|
81
81
|
*/
|
|
82
82
|
constructor(opts, gaxInstance) {
|
|
83
|
-
var _a, _b;
|
|
83
|
+
var _a, _b, _c, _d;
|
|
84
84
|
this._terminated = false;
|
|
85
85
|
this.descriptors = {
|
|
86
86
|
page: {},
|
|
@@ -90,16 +90,24 @@ class DlpServiceClient {
|
|
|
90
90
|
};
|
|
91
91
|
// Ensure that options include all the required fields.
|
|
92
92
|
const staticMembers = this.constructor;
|
|
93
|
-
|
|
93
|
+
if ((opts === null || opts === void 0 ? void 0 : opts.universe_domain) &&
|
|
94
|
+
(opts === null || opts === void 0 ? void 0 : opts.universeDomain) &&
|
|
95
|
+
(opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== (opts === null || opts === void 0 ? void 0 : opts.universeDomain)) {
|
|
96
|
+
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
97
|
+
}
|
|
98
|
+
this._universeDomain =
|
|
99
|
+
(_b = (_a = opts === null || opts === void 0 ? void 0 : opts.universeDomain) !== null && _a !== void 0 ? _a : opts === null || opts === void 0 ? void 0 : opts.universe_domain) !== null && _b !== void 0 ? _b : 'googleapis.com';
|
|
100
|
+
this._servicePath = 'dlp.' + this._universeDomain;
|
|
101
|
+
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || this._servicePath;
|
|
94
102
|
this._providedCustomServicePath = !!((opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint));
|
|
95
103
|
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
|
|
96
|
-
const clientConfig = (
|
|
97
|
-
const fallback = (
|
|
104
|
+
const clientConfig = (_c = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _c !== void 0 ? _c : {};
|
|
105
|
+
const fallback = (_d = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _d !== void 0 ? _d : (typeof window !== 'undefined' && typeof (window === null || window === void 0 ? void 0 : window.fetch) === 'function');
|
|
98
106
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
99
107
|
// Request numeric enum values if REST transport is used.
|
|
100
108
|
opts.numericEnums = true;
|
|
101
109
|
// If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case.
|
|
102
|
-
if (servicePath !==
|
|
110
|
+
if (servicePath !== this._servicePath && !('scopes' in opts)) {
|
|
103
111
|
opts['scopes'] = staticMembers.scopes;
|
|
104
112
|
}
|
|
105
113
|
// Load google-gax module synchronously if needed
|
|
@@ -117,9 +125,9 @@ class DlpServiceClient {
|
|
|
117
125
|
// Set useJWTAccessWithScope on the auth object.
|
|
118
126
|
this.auth.useJWTAccessWithScope = true;
|
|
119
127
|
// Set defaultServicePath on the auth object.
|
|
120
|
-
this.auth.defaultServicePath =
|
|
128
|
+
this.auth.defaultServicePath = this._servicePath;
|
|
121
129
|
// Set the default scopes in auth client if needed.
|
|
122
|
-
if (servicePath ===
|
|
130
|
+
if (servicePath === this._servicePath) {
|
|
123
131
|
this.auth.defaultScopes = staticMembers.scopes;
|
|
124
132
|
}
|
|
125
133
|
this.locationsClient = new this._gaxModule.LocationsClient(this._gaxGrpc, opts);
|
|
@@ -272,19 +280,38 @@ class DlpServiceClient {
|
|
|
272
280
|
}
|
|
273
281
|
/**
|
|
274
282
|
* The DNS address for this API service.
|
|
283
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
275
284
|
* @returns {string} The DNS address for this service.
|
|
276
285
|
*/
|
|
277
286
|
static get servicePath() {
|
|
287
|
+
if (typeof process !== undefined &&
|
|
288
|
+
typeof process.emitWarning === 'function') {
|
|
289
|
+
process.emitWarning('Static servicePath is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
290
|
+
}
|
|
278
291
|
return 'dlp.googleapis.com';
|
|
279
292
|
}
|
|
280
293
|
/**
|
|
281
|
-
* The DNS address for this API service - same as servicePath
|
|
282
|
-
*
|
|
294
|
+
* The DNS address for this API service - same as servicePath.
|
|
295
|
+
* @deprecated Use the apiEndpoint method of the client instance.
|
|
283
296
|
* @returns {string} The DNS address for this service.
|
|
284
297
|
*/
|
|
285
298
|
static get apiEndpoint() {
|
|
299
|
+
if (typeof process !== undefined &&
|
|
300
|
+
typeof process.emitWarning === 'function') {
|
|
301
|
+
process.emitWarning('Static apiEndpoint is deprecated, please use the instance method instead.', 'DeprecationWarning');
|
|
302
|
+
}
|
|
286
303
|
return 'dlp.googleapis.com';
|
|
287
304
|
}
|
|
305
|
+
/**
|
|
306
|
+
* The DNS address for this API service.
|
|
307
|
+
* @returns {string} The DNS address for this service.
|
|
308
|
+
*/
|
|
309
|
+
get apiEndpoint() {
|
|
310
|
+
return this._servicePath;
|
|
311
|
+
}
|
|
312
|
+
get universeDomain() {
|
|
313
|
+
return this._universeDomain;
|
|
314
|
+
}
|
|
288
315
|
/**
|
|
289
316
|
* The port for this API service.
|
|
290
317
|
* @returns {number} The default port for this service.
|
package/build/src/v2/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@google-cloud/dlp",
|
|
3
3
|
"description": "DLP API client for Node.js",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.2.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Google Inc",
|
|
7
7
|
"engines": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"docs-test": "linkinator docs",
|
|
41
41
|
"fix": "gts fix",
|
|
42
42
|
"lint": "gts check",
|
|
43
|
-
"prepare": "npm run compile
|
|
43
|
+
"prepare": "npm run compile",
|
|
44
44
|
"prelint": "cd samples; npm link ../; npm i",
|
|
45
45
|
"postpack": "minifyProtoJson",
|
|
46
46
|
"samples-test": "cd samples/ && npm link ../ && npm i && npm test",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/mocha": "^9.0.0",
|
|
55
55
|
"@types/node": "^20.4.5",
|
|
56
|
-
"@types/sinon": "^
|
|
56
|
+
"@types/sinon": "^17.0.0",
|
|
57
57
|
"c8": "^8.0.1",
|
|
58
|
-
"gapic-tools": "^0.
|
|
58
|
+
"gapic-tools": "^0.3.0",
|
|
59
59
|
"gts": "^5.0.0",
|
|
60
60
|
"jsdoc": "^4.0.0",
|
|
61
61
|
"jsdoc-fresh": "^3.0.0",
|