-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #157 from GetStream/gdpr
[MOD-0]chore: add export ID, batch delete endpoint
- Loading branch information
Showing
11 changed files
with
542 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/main/java/io/getstream/core/models/BatchDeleteActivitiesRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package io.getstream.core.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.List; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class BatchDeleteActivitiesRequest { | ||
|
||
private final List<ActivityToDelete> activities; | ||
|
||
public BatchDeleteActivitiesRequest(List<ActivityToDelete> activities) { | ||
this.activities = activities; | ||
} | ||
|
||
public List<ActivityToDelete> getActivities() { | ||
return activities; | ||
} | ||
|
||
public static class ActivityToDelete { | ||
private final String id; | ||
private final List<String> removeFromFeeds; | ||
|
||
public ActivityToDelete( | ||
@JsonProperty("id") String id, | ||
@JsonProperty("remove_from_feeds") List<String> removeFromFeeds) { | ||
this.id = id; | ||
this.removeFromFeeds = removeFromFeeds; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public List<String> getRemoveFromFeeds() { | ||
return removeFromFeeds; | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/io/getstream/core/models/BatchDeleteReactionsRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package io.getstream.core.models; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.List; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
public class BatchDeleteReactionsRequest { | ||
|
||
private final List<String> ids; | ||
|
||
public BatchDeleteReactionsRequest(@JsonProperty("ids") List<String> ids) { | ||
this.ids = ids; | ||
} | ||
|
||
public List<String> getIds() { | ||
return ids; | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/io/getstream/core/models/ExportIDsResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package io.getstream.core.models; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class ExportIDsResponse { | ||
@JsonProperty("export") | ||
private ExportIDsResult export; | ||
|
||
@JsonProperty("duration") | ||
private String duration; | ||
|
||
// No-argument constructor | ||
public ExportIDsResponse() { | ||
} | ||
|
||
// Constructor with parameters | ||
public ExportIDsResponse(String duration) { | ||
this.duration = duration; | ||
} | ||
|
||
public ExportIDsResult getExport() { | ||
return export; | ||
} | ||
|
||
public void setExport(ExportIDsResult export) { | ||
this.export = export; | ||
} | ||
|
||
public String getDuration() { | ||
return duration; | ||
} | ||
|
||
public void setDuration(String duration) { | ||
this.duration = duration; | ||
} | ||
} |
62 changes: 62 additions & 0 deletions
62
src/main/java/io/getstream/core/models/ExportIDsResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
package io.getstream.core.models; | ||
|
||
import java.util.List; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class ExportIDsResult { | ||
@JsonProperty("user_id") | ||
private String userId; | ||
|
||
@JsonProperty("activity_count") | ||
private int activityCount; | ||
|
||
@JsonProperty("activity_ids") | ||
private List<String> activityIds; | ||
|
||
@JsonProperty("reaction_count") | ||
private int reactionCount; | ||
|
||
@JsonProperty("reaction_ids") | ||
private List<String> reactionIds; | ||
|
||
// Getters and Setters | ||
public String getUserId() { | ||
return userId; | ||
} | ||
|
||
public void setUserId(String userId) { | ||
this.userId = userId; | ||
} | ||
|
||
public int getActivityCount() { | ||
return activityCount; | ||
} | ||
|
||
public void setActivityCount(int activityCount) { | ||
this.activityCount = activityCount; | ||
} | ||
|
||
public List<String> getActivityIds() { | ||
return activityIds; | ||
} | ||
|
||
public void setActivityIds(List<String> activityIds) { | ||
this.activityIds = activityIds; | ||
} | ||
|
||
public int getReactionCount() { | ||
return reactionCount; | ||
} | ||
|
||
public void setReactionCount(int reactionCount) { | ||
this.reactionCount = reactionCount; | ||
} | ||
|
||
public List<String> getReactionIds() { | ||
return reactionIds; | ||
} | ||
|
||
public void setReactionIds(List<String> reactionIds) { | ||
this.reactionIds = reactionIds; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.