1mod admin;
2pub use admin::*;
3mod api;
4mod auth;
5mod board_settings;
6mod boards;
7mod bulk_cards;
8mod cards;
9mod checklist_items;
10mod checklists;
11mod comments;
12mod custom_field_items;
13mod custom_fields;
14mod dependencies;
15mod exports;
16pub(crate) use exports::StagedExport;
17pub use exports::{ExportResource, ExportSuccess};
18mod imports;
19mod integrations;
20pub use imports::*;
21mod rules;
22mod self_update;
23mod skills;
24pub use rules::*;
25pub(crate) use self_update::StartupUpdateOutcome;
26pub use self_update::{InstallationMethod, SelfUpdateStatus, SelfUpdateSuccess};
27pub use skills::{SkillListSuccess, SkillShowSuccess, SkillTopicSummary};
28mod lists;
29mod profiles;
30mod swimlanes;
31mod users;
32pub use users::{UserTokenCreateSuccess, UserTokenDeleteScope, UserTokenDeleteSuccess};
33
34pub use api::{
35 ApiResponseSuccess, RawApiResponseData, RawResponseBody, RawResponseHeader, RawValueEncoding,
36};
37pub use auth::{
38 AuthPreflightSuccess, AuthStatusEmail, AuthStatusSuccess, AuthStatusUser, AuthSuccess,
39 LogoutScope, LogoutSuccess,
40};
41pub use board_settings::*;
42pub use boards::{
43 BoardCountSuccess, BoardCreateSuccess, BoardDeleteSuccess, BoardDetail, BoardDetailDomain,
44 BoardDetailLabel, BoardDetailMember, BoardDetailOrganization, BoardDetailTeam,
45 BoardDetailWatcher, BoardListScope, BoardListSuccess, BoardRenameSuccess, BoardSummary,
46 UserBoardSummary,
47};
48pub use boards::{
49 BoardMemberCollectionSuccess, BoardMemberMutationSuccess, BoardMemberSubmittedField,
50 BoardMemberUpdateSuccess,
51};
52pub use cards::{
53 BotRunReport, BotRunStatus, CardArchiveSuccess, CardCollectionSuccess, CardCreateSuccess,
54 CardDeleteMode, CardDeleteSuccess, CardDetail, CardDetailCustomField,
55 CardDetailCustomFieldValue, CardDetailDependency, CardDetailLocation, CardDetailPoker,
56 CardDetailSticker, CardDetailStickerHighlight, CardDetailVote, CardRestoreSuccess,
57 CardSubmittedField, CardSummary, CardUpdateSuccess,
58};
59pub use cards::{
60 CardAssigneeCollectionSuccess, CardMemberCollectionSuccess, CardMembershipKind,
61 CardMembershipMutationSuccess,
62};
63pub use cards::{CardCustomFieldQuerySuccess, CardCustomFieldSetSuccess};
64pub use checklist_items::{
65 ChecklistItemCreateSuccess, ChecklistItemDeleteMode, ChecklistItemDeleteSuccess,
66 ChecklistItemDetail, ChecklistItemSubmittedField, ChecklistItemUpdateSuccess,
67};
68pub use checklists::{
69 ChecklistCollectionSuccess, ChecklistCreateSuccess, ChecklistDeleteMode,
70 ChecklistDeleteSuccess, ChecklistDetail, ChecklistItemSummary, ChecklistSummary,
71};
72pub use comments::{
73 CommentCollectionSuccess, CommentCreateSuccess, CommentDeleteMode, CommentDeleteSuccess,
74 CommentDetail, CommentSummary,
75};
76pub use custom_field_items::{
77 CustomFieldItemCreateSuccess, CustomFieldItemDeleteMode, CustomFieldItemDeleteSuccess,
78 CustomFieldItemSubmittedField, CustomFieldItemUpdateSuccess,
79};
80pub use custom_fields::{
81 CustomFieldCollectionSuccess, CustomFieldCreateSuccess, CustomFieldDeleteMode,
82 CustomFieldDeleteSuccess, CustomFieldDetail, CustomFieldDropdownItem, CustomFieldSettings,
83 CustomFieldSubmittedField, CustomFieldSummary, CustomFieldUpdateSuccess,
84};
85pub use dependencies::{
86 BoardDependencyCollectionSuccess, CardDependencyCollectionSuccess, DependencyCreateSuccess,
87 DependencyDeleteSuccess, DependencyLine, DependencySubmittedField, DependencySummary,
88 DependencyUpdateSuccess,
89};
90pub use lists::{
91 ListArchiveSuccess, ListCollectionSuccess, ListCreateSuccess, ListDeleteMode,
92 ListDeleteSuccess, ListDetail, ListSummary, ListUpdateSuccess, ListUpdatedField,
93 ListWipLimitDetail,
94};
95pub use profiles::{ProfileItem, ProfileListSuccess, ProfileRemoveSuccess};
96pub use swimlanes::{
97 SwimlaneCollectionSuccess, SwimlaneCreateSuccess, SwimlaneDeleteMode, SwimlaneDeleteSuccess,
98 SwimlaneDetail, SwimlaneSummary, SwimlaneUpdateSuccess, SwimlaneUpdatedField,
99};
100pub use users::{
101 UserBoardMembership, UserBoardsSuccess, UserCard, UserCardsSuccess, UserCreateSuccess,
102 UserDeleteSuccess, UserDetail, UserDialogOptionsDetail, UserEmail, UserListSuccess,
103 UserLoginAction, UserLoginChangeSuccess, UserOrganization, UserOwnershipSuccess,
104 UserProfileDetail, UserProfileNotificationDetail, UserProfileStarredPageDetail,
105 UserSessionData, UserSummary, UserTeam, UserWorkspaceNodeDetail,
106};
107
108use serde::Serialize;
109
110pub use bulk_cards::*;
111pub use integrations::*;
112
113pub use boards::{BoardLabelAdded, BoardLabelCollection};
114pub use cards::CardLabelCollection;
115
116pub mod attachments;
117pub use attachments::*;
118pub use boards::BoardCopySuccess;
119pub use cards::{
120 CardCopySuccess, CardCountSuccess, SwimlaneCardCollectionSuccess, SwimlaneCardSummary,
121};
122pub use lists::ListTransferSuccess;
123pub use swimlanes::SwimlaneTransferSuccess;
124
125#[derive(Debug, Eq, PartialEq)]
126pub enum CommandSuccess {
127 SelfUpdate(SelfUpdateSuccess),
128 BotRunReported(BotRunReport),
129 InboundEmailSubmitted(InboundEmailReceipt),
130 EmailBounceSubmitted(BounceReceipt),
131 SkillList(SkillListSuccess),
132 SkillShown(SkillShowSuccess),
133 AuthPreflight(AuthPreflightSuccess),
134 SchemaUpgradeStatus(crate::client::system::SchemaUpgradeState),
135 BoardAttachments(attachments::BoardAttachmentCollectionSuccess),
136 BoardImported(BoardImportSuccess),
137 TrelloImported(TrelloImportResult),
138 ZipImported(ZipImportSuccess),
139 IcsImported(IcsImportSuccess),
140 Exported(ExportSuccess),
141 AdminDomains(AdminDomainCollectionSuccess),
142 OauthProviderSettings(Box<OauthProviderSettings>),
143 PasswordlessSettings(PasswordlessSettings),
144 ProblemsOverview(ProblemsOverview),
145 ProblemStream(ProblemPage),
146 ProblemAcknowledged(ProblemAcknowledgment),
147 AdminOrganizations(AdminOrganizationCollectionSuccess),
148 AdminTeams(AdminTeamCollectionSuccess),
149 AdminOrganizationUpdated(Box<AdminOrganizationUpdateSuccess>),
150 AdminTeamUpdated(Box<AdminTeamUpdateSuccess>),
151 AdminOrganizationFeaturesUpdatedAll(AdminFeaturesUpdateAllSuccess),
152 AdminTeamFeaturesUpdatedAll(AdminFeaturesUpdateAllSuccess),
153 GlobalSettings(Box<GlobalSettingsSuccess>),
154 GlobalSettingsUpdated(Box<GlobalSettingsUpdateSuccess>),
155 AttachmentSettings(Box<AttachmentSettingsSuccess>),
156 AttachmentSettingsUpdated(Box<AttachmentSettingsUpdateSuccess>),
157 RuleCollection(RuleCollectionSuccess),
158 RuleShown(Box<RuleDetail>),
159 RuleCreated(RuleCreateSuccess),
160 RuleUpdated(RuleUpdateSuccess),
161 RuleDeleted(RuleDeleteSuccess),
162 BoardCardSettings(BoardCardSettingsSuccess),
163 BoardViewSettings(BoardViewSettingsSuccess),
164 BoardCardFieldOrder(BoardCardFieldOrderSuccess),
165 BoardCardSettingsUpdated(BoardCardSettingsUpdateSuccess),
166 BoardDomains(BoardDomainCollectionSuccess),
167 BoardDomainChanged(BoardDomainMutationSuccess),
168 IntegrationCollection(IntegrationCollectionSuccess),
169 IntegrationShown(IntegrationDetail),
170 IntegrationCreated(IntegrationCreateSuccess),
171 IntegrationUpdated(IntegrationUpdateSuccess),
172 IntegrationDeleted(IntegrationDeleteSuccess),
173 IntegrationActivitiesChanged(IntegrationActivityMutationSuccess),
174 BoardCopied(boards::BoardCopySuccess),
175 CardCopied(cards::CardCopySuccess),
176 ListCopied(lists::ListTransferSuccess),
177 ListMoved(lists::ListTransferSuccess),
178 SwimlaneCopied(swimlanes::SwimlaneTransferSuccess),
179 SwimlaneMoved(swimlanes::SwimlaneTransferSuccess),
180 CardCount(cards::CardCountSuccess),
181 SwimlaneCards(cards::SwimlaneCardCollectionSuccess),
182 CardBatch(CardBatchResult),
183 BoardLabels(BoardLabelCollection),
184 BoardLabelAdded(BoardLabelAdded),
185 CardLabels(CardLabelCollection),
186 BoardMembers(BoardMemberCollectionSuccess),
187 BoardMemberChanged(BoardMemberMutationSuccess),
188 BoardMemberUpdated(BoardMemberUpdateSuccess),
189 CardMembers(CardMemberCollectionSuccess),
190 CardAssignees(CardAssigneeCollectionSuccess),
191 CardMembershipChanged(CardMembershipMutationSuccess),
192 BoardDependencies(BoardDependencyCollectionSuccess),
193 CardDependencies(CardDependencyCollectionSuccess),
194 DependencyCreated(DependencyCreateSuccess),
195 DependencyUpdated(DependencyUpdateSuccess),
196 DependencyDeleted(DependencyDeleteSuccess),
197 AttachmentList(AttachmentCollectionSuccess),
198 AttachmentShown(crate::client::attachments::AttachmentInfo),
199 AttachmentUploaded(attachments::AttachmentUploadSuccess),
200 BackgroundUploaded(crate::client::attachments::BackgroundUploadResponse),
201 AttachmentCopied(crate::client::attachments::AttachmentCopyResponse),
202 AttachmentMoved(crate::client::attachments::AttachmentMoveResponse),
203 AttachmentDeleted(crate::client::attachments::AttachmentDeleteResponse),
204 AttachmentSoftDeleted(AttachmentSoftDeleteSuccess),
205 AttachmentRestored(AttachmentRestoreSuccess),
206 DeletedAttachments(DeletedAttachmentCollectionSuccess),
207 AttachmentDownloaded(AttachmentDownloadSuccess),
208 ApiResponse(ApiResponseSuccess),
209 Cancelled(CancellationSuccess),
210 Registration(AuthSuccess),
211 Login(AuthSuccess),
212 Logout(LogoutSuccess),
213 AuthStatus(AuthStatusSuccess),
214 UserCurrent(UserDetail),
215 UserList(UserListSuccess),
216 UserShown(UserDetail),
217 UserUpdated(UserDetail),
218 UserCards(UserCardsSuccess),
219 UserCreated(UserCreateSuccess),
220 UserBoards(UserBoardsSuccess),
221 UserOwnershipTaken(UserOwnershipSuccess),
222 UserLoginChanged(UserLoginChangeSuccess),
223 UserDeleted(UserDeleteSuccess),
224 UserTokenCreated(UserTokenCreateSuccess),
225 UserTokenDeleted(UserTokenDeleteSuccess),
226 BoardList(BoardListSuccess),
227 BoardCount(BoardCountSuccess),
228 BoardShown(Box<BoardDetail>),
229 BoardCreated(BoardCreateSuccess),
230 BoardRenamed(BoardRenameSuccess),
231 BoardDeleted(BoardDeleteSuccess),
232 ListCollection(ListCollectionSuccess),
233 ListShown(ListDetail),
234 ListCreated(ListCreateSuccess),
235 ListUpdated(ListUpdateSuccess),
236 ListArchived(ListArchiveSuccess),
237 ListRestored(ListArchiveSuccess),
238 ListDeleted(ListDeleteSuccess),
239 CardCollection(CardCollectionSuccess),
240 CardShown(Box<CardDetail>),
241 CardCreated(CardCreateSuccess),
242 CardUpdated(CardUpdateSuccess),
243 CardArchived(CardArchiveSuccess),
244 CardRestored(CardRestoreSuccess),
245 CardDeleted(CardDeleteSuccess),
246 ChecklistCollection(ChecklistCollectionSuccess),
247 ChecklistShown(ChecklistDetail),
248 ChecklistCreated(ChecklistCreateSuccess),
249 ChecklistUpdated(ChecklistCreateSuccess),
250 ChecklistDeleted(ChecklistDeleteSuccess),
251 ChecklistItemShown(ChecklistItemDetail),
252 ChecklistItemCreated(ChecklistItemCreateSuccess),
253 ChecklistItemUpdated(ChecklistItemUpdateSuccess),
254 ChecklistItemDeleted(ChecklistItemDeleteSuccess),
255 CustomFieldCollection(CustomFieldCollectionSuccess),
256 CustomFieldShown(CustomFieldDetail),
257 CustomFieldCreated(CustomFieldCreateSuccess),
258 CustomFieldUpdated(CustomFieldUpdateSuccess),
259 CustomFieldDeleted(CustomFieldDeleteSuccess),
260 CustomFieldItemsCreated(CustomFieldItemCreateSuccess),
261 CustomFieldItemUpdated(CustomFieldItemUpdateSuccess),
262 CustomFieldItemDeleted(CustomFieldItemDeleteSuccess),
263 CardCustomFieldSet(CardCustomFieldSetSuccess),
264 CardCustomFieldQuery(CardCustomFieldQuerySuccess),
265 CommentCollection(CommentCollectionSuccess),
266 CommentShown(CommentDetail),
267 CommentCreated(CommentCreateSuccess),
268 CommentUpdated(CommentCreateSuccess),
269 CommentDeleted(CommentDeleteSuccess),
270 SwimlaneCollection(SwimlaneCollectionSuccess),
271 SwimlaneShown(SwimlaneDetail),
272 SwimlaneCreated(SwimlaneCreateSuccess),
273 SwimlaneUpdated(SwimlaneUpdateSuccess),
274 SwimlaneDeleted(SwimlaneDeleteSuccess),
275 ProfileAdded(ProfileItem),
276 ProfileList(ProfileListSuccess),
277 ProfileShown(ProfileItem),
278 ProfileUsed(ProfileItem),
279 ProfileUpdated(ProfileItem),
280 ProfileRemoved(ProfileRemoveSuccess),
281}
282
283#[derive(Clone, Copy, Debug, Eq, PartialEq, Serialize)]
284#[serde(rename_all = "snake_case")]
285pub enum MembershipAction {
286 Add,
287 Remove,
288}
289
290#[derive(Clone, Copy, Debug, Eq, PartialEq, Serialize)]
291#[serde(rename_all = "snake_case")]
292pub enum DestructiveOperation {
293 SelfUpdate,
294 AdminOrganizationFeaturesUpdateAll,
295 AdminTeamFeaturesUpdateAll,
296 IntegrationDelete,
297 RuleDelete,
298 CardBulkDelete,
299 DependencyDelete,
300 AttachmentDelete,
301 ApiRequest,
302 AuthLogout,
303 ProfileRemove,
304 UserTakeOwnership,
305 UserDisableLogin,
306 UserDelete,
307 UserTokenDelete,
308 BoardDelete,
309 ListDelete,
310 CardDelete,
311 ChecklistDelete,
312 ChecklistItemDelete,
313 CustomFieldDelete,
314 CustomFieldItemDelete,
315 CommentDelete,
316 SwimlaneDelete,
317}
318
319impl DestructiveOperation {
320 pub const fn as_command(self) -> &'static str {
321 match self {
322 Self::SelfUpdate => "self update",
323 Self::AdminOrganizationFeaturesUpdateAll => "admin org features update-all",
324 Self::AdminTeamFeaturesUpdateAll => "admin team features update-all",
325 Self::IntegrationDelete => "integration delete",
326 Self::RuleDelete => "rule delete",
327 Self::CardBulkDelete => "card bulk delete",
328 Self::DependencyDelete => "dependency delete",
329 Self::AttachmentDelete => "attachment delete",
330 Self::ApiRequest => "api request",
331 Self::AuthLogout => "auth logout",
332 Self::ProfileRemove => "profile remove",
333 Self::UserTakeOwnership => "user take-ownership",
334 Self::UserDisableLogin => "user disable-login",
335 Self::UserDelete => "user delete",
336 Self::UserTokenDelete => "user token delete",
337 Self::BoardDelete => "board delete",
338 Self::ListDelete => "list delete",
339 Self::CardDelete => "card delete",
340 Self::ChecklistDelete => "checklist delete",
341 Self::ChecklistItemDelete => "checklist item delete",
342 Self::CustomFieldDelete => "custom-field delete",
343 Self::CustomFieldItemDelete => "custom-field item delete",
344 Self::CommentDelete => "comment delete",
345 Self::SwimlaneDelete => "swimlane delete",
346 }
347 }
348}
349
350#[derive(Debug, Eq, PartialEq, Serialize)]
351pub struct CancellationSuccess {
352 pub cancelled: bool,
353 pub operation: DestructiveOperation,
354}
355
356impl CancellationSuccess {
357 pub const fn new(operation: DestructiveOperation) -> Self {
358 Self {
359 cancelled: true,
360 operation,
361 }
362 }
363}