-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #1087 Add admin.conversations.bulk{Archive|Delete|Move} API metho…
…d support (#1090) * Fix #1087 Add admin.conversations.bulk{Archive|Delete|Move} API method support * Add missing outputs * Add more tests
- Loading branch information
Showing
26 changed files
with
495 additions
and
7 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
json-logs/samples/api/admin.conversations.bulkArchive.json
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,20 @@ | ||
{ | ||
"ok": false, | ||
"error": "", | ||
"needed": "", | ||
"provided": "", | ||
"bulk_action_id": "", | ||
"not_added": [ | ||
{ | ||
"channel_id": "C00000000", | ||
"errors": [ | ||
"" | ||
] | ||
} | ||
], | ||
"response_metadata": { | ||
"messages": [ | ||
"" | ||
] | ||
} | ||
} |
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,20 @@ | ||
{ | ||
"ok": false, | ||
"error": "", | ||
"needed": "", | ||
"provided": "", | ||
"bulk_action_id": "", | ||
"not_added": [ | ||
{ | ||
"channel_id": "", | ||
"errors": [ | ||
"" | ||
] | ||
} | ||
], | ||
"response_metadata": { | ||
"messages": [ | ||
"" | ||
] | ||
} | ||
} |
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,20 @@ | ||
{ | ||
"ok": false, | ||
"bulk_action_id": "", | ||
"not_added": [ | ||
{ | ||
"channel_id": "", | ||
"errors": [ | ||
"" | ||
] | ||
} | ||
], | ||
"error": "", | ||
"needed": "", | ||
"provided": "", | ||
"response_metadata": { | ||
"messages": [ | ||
"" | ||
] | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,7 +75,8 @@ | |
"is_admin": false, | ||
"is_owner": false, | ||
"teams": [ | ||
"" | ||
"", | ||
"T00000000" | ||
], | ||
"is_primary_owner": false | ||
}, | ||
|
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
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
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
26 changes: 26 additions & 0 deletions
26
...m/slack/api/methods/request/admin/conversations/AdminConversationsBulkArchiveRequest.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,26 @@ | ||
package com.slack.api.methods.request.admin.conversations; | ||
|
||
import com.slack.api.methods.SlackApiRequest; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* https://api.slack.com/methods/admin.conversations.bulkArchive | ||
*/ | ||
@Data | ||
@Builder | ||
public class AdminConversationsBulkArchiveRequest implements SlackApiRequest { | ||
|
||
/** | ||
* Authentication token bearing required scopes. | ||
*/ | ||
private String token; | ||
|
||
/** | ||
* An array of channel IDs. | ||
*/ | ||
private List<String> channelIds; | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
...om/slack/api/methods/request/admin/conversations/AdminConversationsBulkDeleteRequest.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,26 @@ | ||
package com.slack.api.methods.request.admin.conversations; | ||
|
||
import com.slack.api.methods.SlackApiRequest; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* https://api.slack.com/methods/admin.conversations.bulkDelete | ||
*/ | ||
@Data | ||
@Builder | ||
public class AdminConversationsBulkDeleteRequest implements SlackApiRequest { | ||
|
||
/** | ||
* Authentication token bearing required scopes. | ||
*/ | ||
private String token; | ||
|
||
/** | ||
* An array of channel IDs. | ||
*/ | ||
private List<String> channelIds; | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
.../com/slack/api/methods/request/admin/conversations/AdminConversationsBulkMoveRequest.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,31 @@ | ||
package com.slack.api.methods.request.admin.conversations; | ||
|
||
import com.slack.api.methods.SlackApiRequest; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* https://api.slack.com/methods/admin.conversations.bulkMove | ||
*/ | ||
@Data | ||
@Builder | ||
public class AdminConversationsBulkMoveRequest implements SlackApiRequest { | ||
|
||
/** | ||
* Authentication token bearing required scopes. | ||
*/ | ||
private String token; | ||
|
||
/** | ||
* An array of channel IDs. | ||
*/ | ||
private List<String> channelIds; | ||
|
||
/** | ||
* Target team ID | ||
*/ | ||
private String targetTeamId; | ||
|
||
} |
29 changes: 29 additions & 0 deletions
29
...slack/api/methods/response/admin/conversations/AdminConversationsBulkArchiveResponse.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,29 @@ | ||
package com.slack.api.methods.response.admin.conversations; | ||
|
||
import com.slack.api.methods.SlackApiTextResponse; | ||
import com.slack.api.model.ErrorResponseMetadata; | ||
import lombok.Data; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
@Data | ||
public class AdminConversationsBulkArchiveResponse implements SlackApiTextResponse { | ||
|
||
private boolean ok; | ||
private String warning; | ||
private String error; | ||
private String needed; | ||
private String provided; | ||
private transient Map<String, List<String>> httpResponseHeaders; | ||
|
||
private String bulkActionId; | ||
private List<NotAdded> notAdded; | ||
private ErrorResponseMetadata responseMetadata; | ||
|
||
@Data | ||
public static class NotAdded { | ||
private String channelId; | ||
private List<String> errors; | ||
} | ||
} |
Oops, something went wrong.