File tree 3 files changed +25
-0
lines changed
pangea-sdk/v3/service/user_intel
3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
### Added
11
11
12
12
- Detect-only Redact for Sanitize.
13
+ - Support for ` domains ` field in ` v2/user/breached ` endpoint in User Intel service
13
14
14
15
## 3.11.0 - 2024-09-25
15
16
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ type UserBreachedBulkRequest struct {
83
83
Usernames []string `json:"usernames,omitempty"`
84
84
PhoneNumbers []string `json:"phone_numbers,omitempty"`
85
85
IPs []string `json:"ips,omitempty"`
86
+ Domains []string `json:"domains,omitempty"`
86
87
Start string `json:"start,omitempty"`
87
88
End string `json:"end,omitempty"`
88
89
Verbose * bool `json:"verbose,omitempty"`
Original file line number Diff line number Diff line change @@ -203,6 +203,29 @@ func Test_Integration_UserBreachedByIPBulk(t *testing.T) {
203
203
assert .Equal (t , len (resp .Result .Data ), 2 )
204
204
}
205
205
206
+ func Test_Integration_UserBreachedByDomainBulk (t * testing.T ) {
207
+ ctx , cancelFn := context .WithTimeout (context .Background (), 60 * time .Second )
208
+ defer cancelFn ()
209
+
210
+ intelcli := user_intel .New (pangeatesting .IntegrationConfig (t , testingEnvironment ))
211
+
212
+ input := & user_intel.UserBreachedBulkRequest {
213
+ Domains : []string {"example.com" },
214
+ Raw : pangea .Bool (true ),
215
+ Verbose : pangea .Bool (true ),
216
+ Provider : "spycloud" ,
217
+ }
218
+ resp , err := intelcli .UserBreachedBulk (ctx , input )
219
+ if err != nil {
220
+ t .Fatalf ("expected no error got: %v" , err )
221
+ }
222
+
223
+ assert .NotNil (t , resp )
224
+ assert .NotNil (t , resp .Result )
225
+ assert .NotNil (t , resp .Result .Data )
226
+ assert .Equal (t , len (resp .Result .Data ), 1 )
227
+ }
228
+
206
229
func Test_Integration_UserBreachedDefaultProvider (t * testing.T ) {
207
230
ctx , cancelFn := context .WithTimeout (context .Background (), 60 * time .Second )
208
231
defer cancelFn ()
You can’t perform that action at this time.
0 commit comments