From 4c8dd50e6c398a8b300355c3031b5bfad263a8e5 Mon Sep 17 00:00:00 2001 From: MagicBella Date: Mon, 23 Mar 2026 05:38:19 +0000 Subject: [PATCH] chore: regen sdk --- ...p-magicbell-java-user-client-1774244299.md | 5 + README.md | 107 +- documentation/models/ApnsToken.md | 18 +- documentation/models/ApnsTokenCollection.md | 8 +- .../models/ApnsTokenInstallationId.md | 2 +- documentation/models/ApnsTokenPayload.md | 10 +- .../models/ApnsTokenPayloadInstallationId.md | 2 +- .../ArchiveAllNotificationsParameters.md | 8 + documentation/models/AuthedUser.md | 16 +- documentation/models/Banner.md | 14 +- documentation/models/Categories.md | 9 + documentation/models/Channels.md | 8 + documentation/models/CountResponse.md | 7 + documentation/models/DefaultHover.md | 8 +- documentation/models/DefaultState.md | 8 +- documentation/models/Default_.md | 22 +- documentation/models/Dialog.md | 12 +- documentation/models/DiscardResult.md | 8 +- documentation/models/Enterprise.md | 8 +- documentation/models/ExpoToken.md | 14 +- documentation/models/ExpoTokenCollection.md | 8 +- documentation/models/ExpoTokenPayload.md | 6 +- documentation/models/FcmToken.md | 15 +- documentation/models/FcmTokenCollection.md | 8 +- .../models/FcmTokenInstallationId.md | 8 - documentation/models/FcmTokenPayload.md | 7 +- .../models/FcmTokenPayloadInstallationId.md | 8 - ...FetchUnreadNotificationsCountParameters.md | 8 + documentation/models/Footer.md | 14 +- .../models/GetInAppInboxTokensParameters.md | 9 - .../GetMobilePushApnsTokensParameters.md | 9 - .../GetMobilePushExpoTokensParameters.md | 9 - .../GetMobilePushFcmTokensParameters.md | 9 - .../models/GetSlackTokensParameters.md | 9 - .../models/GetTeamsTokensParameters.md | 9 - .../models/GetWebPushTokensParameters.md | 9 - documentation/models/Header.md | 16 +- documentation/models/Icon.md | 10 +- documentation/models/Images.md | 8 +- documentation/models/InboxConfigPayload.md | 10 +- documentation/models/InboxToken.md | 8 +- documentation/models/InboxTokenResponse.md | 16 +- .../models/InboxTokenResponseCollection.md | 8 +- documentation/models/IncomingWebhook.md | 10 +- .../models/ListApnsTokensParameters.md | 9 + .../models/ListExpoTokensParameters.md | 9 + .../models/ListFcmTokensParameters.md | 9 + .../models/ListInboxTokensParameters.md | 9 + .../ListMagicbellSlackbotTokensParameters.md | 9 + .../models/ListNotificationsParameters.md | 15 +- .../models/ListSlackTokensParameters.md | 9 + .../models/ListTeamsTokensParameters.md | 9 + .../models/ListWebPushTokensParameters.md | 9 + .../MarkAllNotificationsReadParameters.md | 8 + documentation/models/Notification.md | 34 +- .../models/NotificationCollection.md | 8 +- documentation/models/SlackInstallation.md | 30 +- documentation/models/SlackStartInstall.md | 12 +- .../SlackStartInstallResponseContent.md | 10 +- documentation/models/SlackToken.md | 8 +- documentation/models/SlackTokenCollection.md | 8 +- documentation/models/SlackTokenOauth.md | 10 +- .../models/SlackTokenPayloadOauth.md | 10 +- .../models/SlackTokenPayloadWebhook.md | 6 +- documentation/models/SlackTokenWebhook.md | 6 +- documentation/models/Team.md | 8 +- documentation/models/TeamsToken.md | 14 +- documentation/models/TeamsTokenCollection.md | 8 +- documentation/models/TemplatesInstallation.md | 9 - documentation/models/Theme.md | 20 +- documentation/models/ThemeNotification.md | 12 +- documentation/models/Unread.md | 14 +- documentation/models/UnreadHover.md | 8 +- documentation/models/UnreadState.md | 8 +- documentation/models/Unseen.md | 14 +- documentation/models/UnseenBadge.md | 8 +- documentation/models/UnseenHover.md | 8 +- documentation/models/UnseenState.md | 8 +- documentation/models/UserPreferences.md | 7 + .../WebPushStartInstallationResponse.md | 8 +- documentation/models/WebPushToken.md | 8 +- .../models/WebPushTokenCollection.md | 8 +- documentation/services/ChannelsService.kt.md | 585 +++++--- documentation/services/ChannelsService.md | 588 +++++--- .../services/IntegrationsService.kt.md | 228 ++- documentation/services/IntegrationsService.md | 230 +++- .../services/NotificationsService.kt.md | 175 ++- .../services/NotificationsService.md | 183 ++- documentation/snippets/snippets.json | 102 +- examples/src/main/java/com/example/Main.java | 12 +- kotlin-example/src/main/kotlin/Main.kt | 8 +- pom.xml | 5 + .../MagicbellUserClient.java | 24 + .../config/MagicbellUserClientConfig.java | 5 + .../config/RetryConfig.java | 5 + .../exceptions/ApiError.java | 51 + .../exceptions/ApiException.java | 59 - .../magicbelluserclient/hook/Hook.java | 6 +- .../magicbelluserclient/http/Environment.java | 11 +- .../magicbelluserclient/http/HttpMethod.java | 18 + .../http/ModelConverter.java | 175 ++- .../DefaultHeadersInterceptor.java | 22 + .../http/interceptors/RetryInterceptor.java | 24 + .../serialization/PathSerializationStyle.java | 8 + .../QuerySerializationStyle.java | 9 + .../serialization/SerializationStyle.java | 11 + .../http/serialization/Serializer.java | 35 + .../http/serialization/Util.java | 41 +- .../http/util/ContentTypes.java | 85 ++ .../http/util/RequestBuilder.java | 113 +- .../magicbelluserclient/json/TypeUtils.java | 19 + .../magicbelluserclient/models/ApnsToken.java | 94 +- .../models/ApnsTokenCollection.java | 45 +- .../models/ApnsTokenInstallationId.java | 2 +- .../models/ApnsTokenPayload.java | 49 +- .../ApnsTokenPayloadInstallationId.java | 2 +- .../ArchiveAllNotificationsParameters.java | 68 + .../models/AuthedUser.java | 115 +- .../magicbelluserclient/models/Banner.java | 41 +- .../models/Categories.java | 79 ++ .../magicbelluserclient/models/Channels.java | 62 + ...esInstallation.java => CountResponse.java} | 14 +- .../models/DefaultHover.java | 6 + .../models/DefaultState.java | 6 + .../magicbelluserclient/models/Default_.java | 72 +- .../magicbelluserclient/models/Dialog.java | 12 + .../models/DiscardResult.java | 49 +- .../models/Enterprise.java | 6 + .../magicbelluserclient/models/ExpoToken.java | 54 +- .../models/ExpoTokenCollection.java | 45 +- .../models/ExpoTokenPayload.java | 3 + .../magicbelluserclient/models/FcmToken.java | 57 +- .../models/FcmTokenCollection.java | 45 +- .../models/FcmTokenInstallationId.java | 25 - .../models/FcmTokenPayload.java | 6 +- .../models/FcmTokenPayloadInstallationId.java | 25 - ...tchUnreadNotificationsCountParameters.java | 68 + .../magicbelluserclient/models/Footer.java | 15 + .../models/GetInAppInboxTokensParameters.java | 26 - .../GetMobilePushApnsTokensParameters.java | 26 - .../GetMobilePushExpoTokensParameters.java | 26 - .../GetMobilePushFcmTokensParameters.java | 26 - .../models/GetSlackTokensParameters.java | 26 - .../models/GetTeamsTokensParameters.java | 26 - .../models/GetWebPushTokensParameters.java | 26 - .../magicbelluserclient/models/Header.java | 18 + .../magicbelluserclient/models/Icon.java | 9 + .../magicbelluserclient/models/Images.java | 6 + .../models/InboxConfigPayload.java | 9 + .../models/InboxToken.java | 29 +- .../models/InboxTokenResponse.java | 73 +- .../models/InboxTokenResponseCollection.java | 45 +- .../models/IncomingWebhook.java | 9 + .../magicbelluserclient/models/Links.java | 61 +- .../models/ListApnsTokensParameters.java | 90 ++ .../models/ListExpoTokensParameters.java | 90 ++ .../models/ListFcmTokensParameters.java | 90 ++ .../models/ListInboxTokensParameters.java | 90 ++ ...ListMagicbellSlackbotTokensParameters.java | 90 ++ .../models/ListNotificationsParameters.java | 136 +- .../models/ListSlackTokensParameters.java | 90 ++ .../models/ListTeamsTokensParameters.java | 90 ++ .../models/ListWebPushTokensParameters.java | 90 ++ .../MarkAllNotificationsReadParameters.java | 68 + .../models/Notification.java | 223 ++- .../models/NotificationCollection.java | 45 +- .../models/SlackFinishInstallResponse.java | 24 +- .../models/SlackInstallation.java | 198 ++- .../models/SlackStartInstall.java | 72 +- .../SlackStartInstallResponseContent.java | 61 +- .../models/SlackToken.java | 89 +- .../models/SlackTokenCollection.java | 45 +- .../models/SlackTokenOauth.java | 34 +- .../models/SlackTokenPayload.java | 45 +- .../models/SlackTokenPayloadOauth.java | 34 +- .../models/SlackTokenPayloadWebhook.java | 3 + .../models/SlackTokenWebhook.java | 3 + .../magicbelluserclient/models/Team.java | 32 +- .../models/TeamsToken.java | 70 +- .../models/TeamsTokenCollection.java | 45 +- .../models/TeamsTokenPayload.java | 26 +- .../models/TeamsTokenPayloadWebhook.java | 26 +- .../models/TeamsTokenWebhook.java | 26 +- .../magicbelluserclient/models/Theme.java | 164 ++- .../models/ThemeNotification.java | 12 + .../magicbelluserclient/models/Unread.java | 60 +- .../models/UnreadHover.java | 6 + .../models/UnreadState.java | 6 + .../magicbelluserclient/models/Unseen.java | 60 +- .../models/UnseenBadge.java | 6 + .../models/UnseenHover.java | 6 + .../models/UnseenState.java | 6 + .../models/UserPreferences.java | 44 + .../WebPushStartInstallationResponse.java | 6 + .../models/WebPushToken.java | 51 +- .../models/WebPushTokenCollection.java | 45 +- .../services/BaseService.java | 212 ++- .../services/ChannelsService.java | 1217 +++++++++++------ .../services/IntegrationsService.java | 417 ++++-- .../services/NotificationsService.java | 283 +++- .../validation/Violation.java | 25 + .../validation/ViolationAggregator.java | 21 + .../exceptions/ValidationException.java | 19 + .../validators/AbstractValidator.java | 28 + .../validation/validators/ListValidator.java | 36 + .../validators/NumericValidator.java | 38 + .../validators/StringValidator.java | 28 + .../validation/validators/Validator.java | 12 + .../AbstractModelValidator.java | 27 + .../ApnsTokenPayloadValidator.java | 18 + .../modelValidators/ApnsTokenValidator.java | 18 + .../modelValidators/CategoriesValidator.java | 47 + .../ExpoTokenPayloadValidator.java | 18 + .../modelValidators/ExpoTokenValidator.java | 18 + .../FcmTokenPayloadValidator.java | 18 + .../modelValidators/FcmTokenValidator.java | 18 + .../InboxConfigPayloadValidator.java | 18 + .../InboxTokenResponseValidator.java | 18 + .../modelValidators/InboxTokenValidator.java | 18 + .../NotificationValidator.java | 18 + .../SlackInstallationValidator.java | 18 + .../SlackTokenPayloadValidator.java | 18 + .../SlackTokenPayloadWebhookValidator.java | 18 + .../modelValidators/SlackTokenValidator.java | 18 + .../SlackTokenWebhookValidator.java | 18 + ...ushStartInstallationResponseValidator.java | 18 + 226 files changed, 8472 insertions(+), 1998 deletions(-) create mode 100644 .changeset/auto-bump-magicbell-java-user-client-1774244299.md create mode 100644 documentation/models/ArchiveAllNotificationsParameters.md create mode 100644 documentation/models/Categories.md create mode 100644 documentation/models/Channels.md create mode 100644 documentation/models/CountResponse.md delete mode 100644 documentation/models/FcmTokenInstallationId.md delete mode 100644 documentation/models/FcmTokenPayloadInstallationId.md create mode 100644 documentation/models/FetchUnreadNotificationsCountParameters.md delete mode 100644 documentation/models/GetInAppInboxTokensParameters.md delete mode 100644 documentation/models/GetMobilePushApnsTokensParameters.md delete mode 100644 documentation/models/GetMobilePushExpoTokensParameters.md delete mode 100644 documentation/models/GetMobilePushFcmTokensParameters.md delete mode 100644 documentation/models/GetSlackTokensParameters.md delete mode 100644 documentation/models/GetTeamsTokensParameters.md delete mode 100644 documentation/models/GetWebPushTokensParameters.md create mode 100644 documentation/models/ListApnsTokensParameters.md create mode 100644 documentation/models/ListExpoTokensParameters.md create mode 100644 documentation/models/ListFcmTokensParameters.md create mode 100644 documentation/models/ListInboxTokensParameters.md create mode 100644 documentation/models/ListMagicbellSlackbotTokensParameters.md create mode 100644 documentation/models/ListSlackTokensParameters.md create mode 100644 documentation/models/ListTeamsTokensParameters.md create mode 100644 documentation/models/ListWebPushTokensParameters.md create mode 100644 documentation/models/MarkAllNotificationsReadParameters.md delete mode 100644 documentation/models/TemplatesInstallation.md create mode 100644 documentation/models/UserPreferences.md create mode 100644 src/main/java/com/magicbell/magicbelluserclient/exceptions/ApiError.java delete mode 100644 src/main/java/com/magicbell/magicbelluserclient/exceptions/ApiException.java create mode 100644 src/main/java/com/magicbell/magicbelluserclient/http/util/ContentTypes.java create mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/ArchiveAllNotificationsParameters.java create mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/Categories.java create mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/Channels.java rename src/main/java/com/magicbell/magicbelluserclient/models/{TemplatesInstallation.java => CountResponse.java} (58%) delete mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/FcmTokenInstallationId.java delete mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/FcmTokenPayloadInstallationId.java create mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/FetchUnreadNotificationsCountParameters.java delete mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/GetInAppInboxTokensParameters.java delete mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/GetMobilePushApnsTokensParameters.java delete mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/GetMobilePushExpoTokensParameters.java delete mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/GetMobilePushFcmTokensParameters.java delete mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/GetSlackTokensParameters.java delete mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/GetTeamsTokensParameters.java delete mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/GetWebPushTokensParameters.java create mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/ListApnsTokensParameters.java create mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/ListExpoTokensParameters.java create mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/ListFcmTokensParameters.java create mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/ListInboxTokensParameters.java create mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/ListMagicbellSlackbotTokensParameters.java create mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/ListSlackTokensParameters.java create mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/ListTeamsTokensParameters.java create mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/ListWebPushTokensParameters.java create mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/MarkAllNotificationsReadParameters.java create mode 100644 src/main/java/com/magicbell/magicbelluserclient/models/UserPreferences.java create mode 100644 src/main/java/com/magicbell/magicbelluserclient/validation/validators/modelValidators/CategoriesValidator.java diff --git a/.changeset/auto-bump-magicbell-java-user-client-1774244299.md b/.changeset/auto-bump-magicbell-java-user-client-1774244299.md new file mode 100644 index 0000000..3a99760 --- /dev/null +++ b/.changeset/auto-bump-magicbell-java-user-client-1774244299.md @@ -0,0 +1,5 @@ +--- +"magicbell-java-user-client": minor +--- + +Automatic minor version bump for changes in `magicbell-java-user-client`. diff --git a/README.md b/README.md index efee560..82468c2 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Welcome to the MagicbellUserClient SDK documentation. This guide will help you get started with integrating and using the MagicbellUserClient SDK in your project. -[![This SDK was generated by liblab](https://public-liblab-readme-assets.s3.us-east-1.amazonaws.com/built-by-liblab-icon.svg)](https://liblab.com/?utm_source=readme) +[![This SDK was generated by liblab](https://raw.githubusercontent.com/liblaber/liblab-assets/main/assets/built-by-liblab-icon.svg)](https://liblab.com/?utm_source=readme) ## Versions @@ -116,9 +116,9 @@ Below is a comprehensive example demonstrating how to authenticate and call a si ```java import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; -import com.magicbell.magicbelluserclient.exceptions.ApiException; -import com.magicbell.magicbelluserclient.models.GetInAppInboxTokensParameters; +import com.magicbell.magicbelluserclient.exceptions.ApiError; import com.magicbell.magicbelluserclient.models.InboxTokenResponseCollection; +import com.magicbell.magicbelluserclient.models.ListInboxTokensParameters; public class Main { @@ -127,17 +127,17 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - GetInAppInboxTokensParameters requestParameters = GetInAppInboxTokensParameters.builder() - .limit(10L) + ListInboxTokensParameters requestParameters = ListInboxTokensParameters.builder() + .limit(8L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); try { - InboxTokenResponseCollection response = magicbellUserClient.channels.getInAppInboxTokens(requestParameters); + InboxTokenResponseCollection response = magicbellUserClient.channels.listInboxTokens(requestParameters); System.out.println(response); - } catch (ApiException e) { + } catch (ApiError e) { e.printStackTrace(); } @@ -151,7 +151,7 @@ public class Main { The SDK provides various services to interact with the API. -
+
Below is a list of all available services with links to their detailed documentation: | Name | @@ -166,51 +166,56 @@ The SDK provides various services to interact with the API. The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently. -
+
Below is a list of all available models with links to their detailed documentation: -| Name | Description | -| :--------------------------------------------------------------------------------------------- | :---------- | -| [InboxTokenResponseCollection](documentation/models/InboxTokenResponseCollection.md) | | -| [InboxToken](documentation/models/InboxToken.md) | | -| [InboxTokenResponse](documentation/models/InboxTokenResponse.md) | | -| [DiscardResult](documentation/models/DiscardResult.md) | | -| [ApnsTokenCollection](documentation/models/ApnsTokenCollection.md) | | -| [ApnsTokenPayload](documentation/models/ApnsTokenPayload.md) | | -| [ApnsToken](documentation/models/ApnsToken.md) | | -| [ExpoTokenCollection](documentation/models/ExpoTokenCollection.md) | | -| [ExpoTokenPayload](documentation/models/ExpoTokenPayload.md) | | -| [ExpoToken](documentation/models/ExpoToken.md) | | -| [FcmTokenCollection](documentation/models/FcmTokenCollection.md) | | -| [FcmTokenPayload](documentation/models/FcmTokenPayload.md) | | -| [FcmToken](documentation/models/FcmToken.md) | | -| [SlackTokenCollection](documentation/models/SlackTokenCollection.md) | | -| [SlackTokenPayload](documentation/models/SlackTokenPayload.md) | | -| [SlackToken](documentation/models/SlackToken.md) | | -| [TeamsTokenCollection](documentation/models/TeamsTokenCollection.md) | | -| [TeamsTokenPayload](documentation/models/TeamsTokenPayload.md) | | -| [TeamsToken](documentation/models/TeamsToken.md) | | -| [WebPushTokenCollection](documentation/models/WebPushTokenCollection.md) | | -| [WebPushTokenPayload](documentation/models/WebPushTokenPayload.md) | | -| [WebPushToken](documentation/models/WebPushToken.md) | | -| [InboxConfigPayload](documentation/models/InboxConfigPayload.md) | | -| [SlackInstallation](documentation/models/SlackInstallation.md) | | -| [SlackFinishInstallResponse](documentation/models/SlackFinishInstallResponse.md) | | -| [SlackStartInstall](documentation/models/SlackStartInstall.md) | | -| [SlackStartInstallResponseContent](documentation/models/SlackStartInstallResponseContent.md) | | -| [TemplatesInstallation](documentation/models/TemplatesInstallation.md) | | -| [WebPushStartInstallationResponse](documentation/models/WebPushStartInstallationResponse.md) | | -| [NotificationCollection](documentation/models/NotificationCollection.md) | | -| [Links](documentation/models/Links.md) | | -| [Notification](documentation/models/Notification.md) | | -| [GetInAppInboxTokensParameters](documentation/models/GetInAppInboxTokensParameters.md) | | -| [GetMobilePushApnsTokensParameters](documentation/models/GetMobilePushApnsTokensParameters.md) | | -| [GetMobilePushExpoTokensParameters](documentation/models/GetMobilePushExpoTokensParameters.md) | | -| [GetMobilePushFcmTokensParameters](documentation/models/GetMobilePushFcmTokensParameters.md) | | -| [GetSlackTokensParameters](documentation/models/GetSlackTokensParameters.md) | | -| [GetTeamsTokensParameters](documentation/models/GetTeamsTokensParameters.md) | | -| [GetWebPushTokensParameters](documentation/models/GetWebPushTokensParameters.md) | | -| [ListNotificationsParameters](documentation/models/ListNotificationsParameters.md) | | +| Name | Description | +| :--------------------------------------------------------------------------------------------------------- | :---------- | +| [InboxTokenResponseCollection](documentation/models/InboxTokenResponseCollection.md) | | +| [InboxTokenResponse](documentation/models/InboxTokenResponse.md) | | +| [Links](documentation/models/Links.md) | | +| [ListInboxTokensParameters](documentation/models/ListInboxTokensParameters.md) | | +| [InboxToken](documentation/models/InboxToken.md) | | +| [DiscardResult](documentation/models/DiscardResult.md) | | +| [ApnsTokenCollection](documentation/models/ApnsTokenCollection.md) | | +| [ApnsToken](documentation/models/ApnsToken.md) | | +| [ListApnsTokensParameters](documentation/models/ListApnsTokensParameters.md) | | +| [ApnsTokenPayload](documentation/models/ApnsTokenPayload.md) | | +| [ExpoTokenCollection](documentation/models/ExpoTokenCollection.md) | | +| [ExpoToken](documentation/models/ExpoToken.md) | | +| [ListExpoTokensParameters](documentation/models/ListExpoTokensParameters.md) | | +| [ExpoTokenPayload](documentation/models/ExpoTokenPayload.md) | | +| [FcmTokenCollection](documentation/models/FcmTokenCollection.md) | | +| [FcmToken](documentation/models/FcmToken.md) | | +| [ListFcmTokensParameters](documentation/models/ListFcmTokensParameters.md) | | +| [FcmTokenPayload](documentation/models/FcmTokenPayload.md) | | +| [SlackTokenCollection](documentation/models/SlackTokenCollection.md) | | +| [SlackToken](documentation/models/SlackToken.md) | | +| [ListMagicbellSlackbotTokensParameters](documentation/models/ListMagicbellSlackbotTokensParameters.md) | | +| [SlackTokenPayload](documentation/models/SlackTokenPayload.md) | | +| [ListSlackTokensParameters](documentation/models/ListSlackTokensParameters.md) | | +| [TeamsTokenCollection](documentation/models/TeamsTokenCollection.md) | | +| [TeamsToken](documentation/models/TeamsToken.md) | | +| [ListTeamsTokensParameters](documentation/models/ListTeamsTokensParameters.md) | | +| [TeamsTokenPayload](documentation/models/TeamsTokenPayload.md) | | +| [UserPreferences](documentation/models/UserPreferences.md) | | +| [WebPushTokenCollection](documentation/models/WebPushTokenCollection.md) | | +| [WebPushToken](documentation/models/WebPushToken.md) | | +| [ListWebPushTokensParameters](documentation/models/ListWebPushTokensParameters.md) | | +| [WebPushTokenPayload](documentation/models/WebPushTokenPayload.md) | | +| [InboxConfigPayload](documentation/models/InboxConfigPayload.md) | | +| [SlackInstallation](documentation/models/SlackInstallation.md) | | +| [SlackFinishInstallResponse](documentation/models/SlackFinishInstallResponse.md) | | +| [SlackStartInstallResponseContent](documentation/models/SlackStartInstallResponseContent.md) | | +| [SlackStartInstall](documentation/models/SlackStartInstall.md) | | +| [WebPushStartInstallationResponse](documentation/models/WebPushStartInstallationResponse.md) | | +| [NotificationCollection](documentation/models/NotificationCollection.md) | | +| [Notification](documentation/models/Notification.md) | | +| [ListNotificationsParameters](documentation/models/ListNotificationsParameters.md) | | +| [ArchiveAllNotificationsParameters](documentation/models/ArchiveAllNotificationsParameters.md) | | +| [MarkAllNotificationsReadParameters](documentation/models/MarkAllNotificationsReadParameters.md) | | +| [CountResponse](documentation/models/CountResponse.md) | | +| [FetchUnreadNotificationsCountParameters](documentation/models/FetchUnreadNotificationsCountParameters.md) | |
diff --git a/documentation/models/ApnsToken.md b/documentation/models/ApnsToken.md index e887da2..b0c5056 100644 --- a/documentation/models/ApnsToken.md +++ b/documentation/models/ApnsToken.md @@ -2,12 +2,12 @@ **Properties** -| Name | Type | Required | Description | -| :------------- | :---------------------- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| createdAt | String | ✅ | | -| deviceToken | String | ✅ | | -| id | String | ✅ | | -| appId | String | ❌ | (Optional) The bundle identifier of the application that is registering this token. Use this field to override the default identifier specified in the projects APNs integration. | -| discardedAt | String | ❌ | | -| installationId | ApnsTokenInstallationId | ❌ | (Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. | -| updatedAt | String | ❌ | | +| Name | Type | Required | Description | +| :------------- | :---------------------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | +| createdAt | String | ✅ | The timestamp when the token was created. | +| deviceToken | String | ✅ | The APNs device token to register with MagicBell. | +| id | String | ✅ | The unique identifier for the token. | +| appId | String | ❌ | The bundle identifier of the application registering this token. Use this to override the default identifier configured on the APNs integration. | +| discardedAt | String | ❌ | The timestamp when the token was discarded, if applicable. | +| installationId | ApnsTokenInstallationId | ❌ | The APNs environment this token belongs to. If omitted we assume it targets `production`. | +| updatedAt | String | ❌ | The timestamp when the token metadata last changed. | diff --git a/documentation/models/ApnsTokenCollection.md b/documentation/models/ApnsTokenCollection.md index 4c05d8a..bc56ac1 100644 --- a/documentation/models/ApnsTokenCollection.md +++ b/documentation/models/ApnsTokenCollection.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :---- | :---------------- | :------- | :---------- | -| data | List\ | ❌ | | -| links | Links | ❌ | | +| Name | Type | Required | Description | +| :---- | :------------------------------ | :------- | :---------- | +| data | List<[ApnsToken](ApnsToken.md)> | ❌ | | +| links | [Links](Links.md) | ❌ | | diff --git a/documentation/models/ApnsTokenInstallationId.md b/documentation/models/ApnsTokenInstallationId.md index b528a94..3bdcf87 100644 --- a/documentation/models/ApnsTokenInstallationId.md +++ b/documentation/models/ApnsTokenInstallationId.md @@ -1,6 +1,6 @@ # ApnsTokenInstallationId -(Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. +The APNs environment this token belongs to. If omitted we assume it targets `production`. **Properties** diff --git a/documentation/models/ApnsTokenPayload.md b/documentation/models/ApnsTokenPayload.md index 982c25e..21bdee2 100644 --- a/documentation/models/ApnsTokenPayload.md +++ b/documentation/models/ApnsTokenPayload.md @@ -2,8 +2,8 @@ **Properties** -| Name | Type | Required | Description | -| :------------- | :----------------------------- | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| deviceToken | String | ✅ | | -| appId | String | ❌ | (Optional) The bundle identifier of the application that is registering this token. Use this field to override the default identifier specified in the projects APNs integration. | -| installationId | ApnsTokenPayloadInstallationId | ❌ | (Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. | +| Name | Type | Required | Description | +| :------------- | :----------------------------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------- | +| deviceToken | String | ✅ | The APNs device token to register with MagicBell. | +| appId | String | ❌ | The bundle identifier of the application registering this token. Use this to override the default identifier configured on the APNs integration. | +| installationId | ApnsTokenPayloadInstallationId | ❌ | The APNs environment this token belongs to. If omitted we assume it targets `production`. | diff --git a/documentation/models/ApnsTokenPayloadInstallationId.md b/documentation/models/ApnsTokenPayloadInstallationId.md index 3f06a3e..0e6b99b 100644 --- a/documentation/models/ApnsTokenPayloadInstallationId.md +++ b/documentation/models/ApnsTokenPayloadInstallationId.md @@ -1,6 +1,6 @@ # ApnsTokenPayloadInstallationId -(Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. +The APNs environment this token belongs to. If omitted we assume it targets `production`. **Properties** diff --git a/documentation/models/ArchiveAllNotificationsParameters.md b/documentation/models/ArchiveAllNotificationsParameters.md new file mode 100644 index 0000000..44d4a62 --- /dev/null +++ b/documentation/models/ArchiveAllNotificationsParameters.md @@ -0,0 +1,8 @@ +# ArchiveAllNotificationsParameters + +**Properties** + +| Name | Type | Required | Description | +| :------- | :----- | :------- | :------------------------------------- | +| category | String | ❌ | filter notifications by their category | +| topic | String | ❌ | filter notifications by their topic | diff --git a/documentation/models/AuthedUser.md b/documentation/models/AuthedUser.md index d55d726..87b68e3 100644 --- a/documentation/models/AuthedUser.md +++ b/documentation/models/AuthedUser.md @@ -2,11 +2,11 @@ **Properties** -| Name | Type | Required | Description | -| :----------- | :----- | :------- | :---------- | -| id | String | ✅ | | -| accessToken | String | ❌ | | -| expiresIn | Long | ❌ | | -| refreshToken | String | ❌ | | -| scope | String | ❌ | | -| tokenType | String | ❌ | | +| Name | Type | Required | Description | +| :----------- | :----- | :------- | :------------------------------------------------------ | +| id | String | ✅ | Slack user ID for the installer. | +| accessToken | String | ❌ | User token returned from the OAuth exchange. | +| expiresIn | Long | ❌ | Seconds until the user token expires. | +| refreshToken | String | ❌ | Refresh token for the authed user. | +| scope | String | ❌ | Space-delimited OAuth scopes granted to the user token. | +| tokenType | String | ❌ | Token type value provided by Slack. | diff --git a/documentation/models/Banner.md b/documentation/models/Banner.md index f9e6d59..e03792d 100644 --- a/documentation/models/Banner.md +++ b/documentation/models/Banner.md @@ -1,10 +1,12 @@ # Banner +Top banner styling options. + **Properties** -| Name | Type | Required | Description | -| :---------------- | :----- | :------- | :---------- | -| backgroundColor | String | ✅ | | -| fontSize | String | ✅ | | -| textColor | String | ✅ | | -| backgroundOpacity | Double | ❌ | | +| Name | Type | Required | Description | +| :---------------- | :----- | :------- | :---------------------------------------- | +| backgroundColor | String | ✅ | Banner background color. | +| fontSize | String | ✅ | Font size for banner text. | +| textColor | String | ✅ | Banner text color. | +| backgroundOpacity | Double | ❌ | Opacity applied to the banner background. | diff --git a/documentation/models/Categories.md b/documentation/models/Categories.md new file mode 100644 index 0000000..9c2ae0b --- /dev/null +++ b/documentation/models/Categories.md @@ -0,0 +1,9 @@ +# Categories + +**Properties** + +| Name | Type | Required | Description | +| :------- | :---------------------------- | :------- | :---------- | +| channels | List<[Channels](Channels.md)> | ❌ | | +| key | String | ❌ | | +| label | String | ❌ | | diff --git a/documentation/models/Channels.md b/documentation/models/Channels.md new file mode 100644 index 0000000..895e0fb --- /dev/null +++ b/documentation/models/Channels.md @@ -0,0 +1,8 @@ +# Channels + +**Properties** + +| Name | Type | Required | Description | +| :------ | :------ | :------- | :---------- | +| enabled | Boolean | ❌ | | +| name | String | ❌ | | diff --git a/documentation/models/CountResponse.md b/documentation/models/CountResponse.md new file mode 100644 index 0000000..e3874f6 --- /dev/null +++ b/documentation/models/CountResponse.md @@ -0,0 +1,7 @@ +# CountResponse + +**Properties** + +| Name | Type | Required | Description | +| :---- | :--- | :------- | :--------------------------------------------- | +| count | Long | ✅ | The count of notifications matching the query. | diff --git a/documentation/models/DefaultHover.md b/documentation/models/DefaultHover.md index fca2343..f9eb6d1 100644 --- a/documentation/models/DefaultHover.md +++ b/documentation/models/DefaultHover.md @@ -1,7 +1,9 @@ # DefaultHover +Styles applied when a notification is hovered. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | String | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :------------------------- | +| backgroundColor | String | ✅ | Background color on hover. | diff --git a/documentation/models/DefaultState.md b/documentation/models/DefaultState.md index 1f87595..3151be7 100644 --- a/documentation/models/DefaultState.md +++ b/documentation/models/DefaultState.md @@ -1,7 +1,9 @@ # DefaultState +Accent colors for notification state indicators. + **Properties** -| Name | Type | Required | Description | -| :---- | :----- | :------- | :---------- | -| color | String | ✅ | | +| Name | Type | Required | Description | +| :---- | :----- | :------- | :---------------------------------- | +| color | String | ✅ | Color used for the state indicator. | diff --git a/documentation/models/Default_.md b/documentation/models/Default_.md index 7693d18..6b85851 100644 --- a/documentation/models/Default_.md +++ b/documentation/models/Default_.md @@ -1,14 +1,16 @@ # Default\_ +Base styles applied to every notification item. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----------- | :------- | :---------- | -| backgroundColor | String | ✅ | | -| borderRadius | String | ✅ | | -| fontFamily | String | ✅ | | -| fontSize | String | ✅ | | -| margin | String | ✅ | | -| textColor | String | ✅ | | -| hover | DefaultHover | ❌ | | -| state | DefaultState | ❌ | | +| Name | Type | Required | Description | +| :-------------- | :----------- | :------- | :--------------------------------------------------------- | +| backgroundColor | String | ✅ | Background color for notifications in their default state. | +| borderRadius | String | ✅ | Border radius applied to each notification card. | +| fontFamily | String | ✅ | Font family for notification text. | +| fontSize | String | ✅ | Font size for notification text. | +| margin | String | ✅ | CSS margin applied around each notification card. | +| textColor | String | ✅ | Default text color for notifications. | +| hover | DefaultHover | ❌ | Styles applied when a notification is hovered. | +| state | DefaultState | ❌ | Accent colors for notification state indicators. | diff --git a/documentation/models/Dialog.md b/documentation/models/Dialog.md index df2e5a3..c5f4783 100644 --- a/documentation/models/Dialog.md +++ b/documentation/models/Dialog.md @@ -1,9 +1,11 @@ # Dialog +Styling for confirmation and action dialogs. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| accentColor | String | ✅ | | -| backgroundColor | String | ✅ | | -| textColor | String | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :---------------------------------------------- | +| accentColor | String | ✅ | Accent color for dialog buttons and highlights. | +| backgroundColor | String | ✅ | Dialog background color. | +| textColor | String | ✅ | Dialog text color. | diff --git a/documentation/models/DiscardResult.md b/documentation/models/DiscardResult.md index eeaa211..a6fced6 100644 --- a/documentation/models/DiscardResult.md +++ b/documentation/models/DiscardResult.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :---------- | -| discardedAt | String | ❌ | | -| id | String | ❌ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :--------------------------------------------- | +| discardedAt | String | ❌ | The timestamp when the token was discarded. | +| id | String | ❌ | The unique identifier for the discarded token. | diff --git a/documentation/models/Enterprise.md b/documentation/models/Enterprise.md index 0c0c47b..9674f93 100644 --- a/documentation/models/Enterprise.md +++ b/documentation/models/Enterprise.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | String | ✅ | | -| name | String | ✅ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :-------------------------- | +| id | String | ✅ | Enterprise grid identifier. | +| name | String | ✅ | Enterprise grid name. | diff --git a/documentation/models/ExpoToken.md b/documentation/models/ExpoToken.md index 4d3b598..5fad035 100644 --- a/documentation/models/ExpoToken.md +++ b/documentation/models/ExpoToken.md @@ -2,10 +2,10 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :---------- | -| createdAt | String | ✅ | | -| deviceToken | String | ✅ | | -| id | String | ✅ | | -| discardedAt | String | ❌ | | -| updatedAt | String | ❌ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :--------------------------------------------------------- | +| createdAt | String | ✅ | The timestamp when the token was created. | +| deviceToken | String | ✅ | The Expo push token returned by the Expo client. | +| id | String | ✅ | The unique identifier for the token. | +| discardedAt | String | ❌ | The timestamp when the token was discarded, if applicable. | +| updatedAt | String | ❌ | The timestamp when the token metadata last changed. | diff --git a/documentation/models/ExpoTokenCollection.md b/documentation/models/ExpoTokenCollection.md index b2a8478..98f1f53 100644 --- a/documentation/models/ExpoTokenCollection.md +++ b/documentation/models/ExpoTokenCollection.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :---- | :---------------- | :------- | :---------- | -| data | List\ | ❌ | | -| links | Links | ❌ | | +| Name | Type | Required | Description | +| :---- | :------------------------------ | :------- | :---------- | +| data | List<[ExpoToken](ExpoToken.md)> | ❌ | | +| links | [Links](Links.md) | ❌ | | diff --git a/documentation/models/ExpoTokenPayload.md b/documentation/models/ExpoTokenPayload.md index 56730fa..1e2815f 100644 --- a/documentation/models/ExpoTokenPayload.md +++ b/documentation/models/ExpoTokenPayload.md @@ -2,6 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :---------- | -| deviceToken | String | ✅ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :----------------------------------------------- | +| deviceToken | String | ✅ | The Expo push token returned by the Expo client. | diff --git a/documentation/models/FcmToken.md b/documentation/models/FcmToken.md index 955836a..99bb53f 100644 --- a/documentation/models/FcmToken.md +++ b/documentation/models/FcmToken.md @@ -2,11 +2,10 @@ **Properties** -| Name | Type | Required | Description | -| :------------- | :--------------------- | :------- | :---------- | -| createdAt | String | ✅ | | -| deviceToken | String | ✅ | | -| id | String | ✅ | | -| discardedAt | String | ❌ | | -| installationId | FcmTokenInstallationId | ❌ | | -| updatedAt | String | ❌ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :--------------------------------------------------------------------------------- | +| createdAt | String | ✅ | The timestamp when the token was created. | +| deviceToken | String | ✅ | The Firebase Cloud Messaging device registration token to associate with the user. | +| id | String | ✅ | The unique identifier for the token. | +| discardedAt | String | ❌ | The timestamp when the token was discarded, if applicable. | +| updatedAt | String | ❌ | The timestamp when the token metadata last changed. | diff --git a/documentation/models/FcmTokenCollection.md b/documentation/models/FcmTokenCollection.md index fc301c3..46099c7 100644 --- a/documentation/models/FcmTokenCollection.md +++ b/documentation/models/FcmTokenCollection.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :---- | :--------------- | :------- | :---------- | -| data | List\ | ❌ | | -| links | Links | ❌ | | +| Name | Type | Required | Description | +| :---- | :---------------------------- | :------- | :---------- | +| data | List<[FcmToken](FcmToken.md)> | ❌ | | +| links | [Links](Links.md) | ❌ | | diff --git a/documentation/models/FcmTokenInstallationId.md b/documentation/models/FcmTokenInstallationId.md deleted file mode 100644 index 63a888e..0000000 --- a/documentation/models/FcmTokenInstallationId.md +++ /dev/null @@ -1,8 +0,0 @@ -# FcmTokenInstallationId - -**Properties** - -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :------------ | -| DEVELOPMENT | String | ✅ | "development" | -| PRODUCTION | String | ✅ | "production" | diff --git a/documentation/models/FcmTokenPayload.md b/documentation/models/FcmTokenPayload.md index 20096ef..e34a394 100644 --- a/documentation/models/FcmTokenPayload.md +++ b/documentation/models/FcmTokenPayload.md @@ -2,7 +2,6 @@ **Properties** -| Name | Type | Required | Description | -| :------------- | :---------------------------- | :------- | :---------- | -| deviceToken | String | ✅ | | -| installationId | FcmTokenPayloadInstallationId | ❌ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :--------------------------------------------------------------------------------- | +| deviceToken | String | ✅ | The Firebase Cloud Messaging device registration token to associate with the user. | diff --git a/documentation/models/FcmTokenPayloadInstallationId.md b/documentation/models/FcmTokenPayloadInstallationId.md deleted file mode 100644 index 01d4462..0000000 --- a/documentation/models/FcmTokenPayloadInstallationId.md +++ /dev/null @@ -1,8 +0,0 @@ -# FcmTokenPayloadInstallationId - -**Properties** - -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :------------ | -| DEVELOPMENT | String | ✅ | "development" | -| PRODUCTION | String | ✅ | "production" | diff --git a/documentation/models/FetchUnreadNotificationsCountParameters.md b/documentation/models/FetchUnreadNotificationsCountParameters.md new file mode 100644 index 0000000..a848ce6 --- /dev/null +++ b/documentation/models/FetchUnreadNotificationsCountParameters.md @@ -0,0 +1,8 @@ +# FetchUnreadNotificationsCountParameters + +**Properties** + +| Name | Type | Required | Description | +| :------- | :----- | :------- | :------------------------------------- | +| category | String | ❌ | filter notifications by their category | +| topic | String | ❌ | filter notifications by their topic | diff --git a/documentation/models/Footer.md b/documentation/models/Footer.md index d7b3dab..3b53ecc 100644 --- a/documentation/models/Footer.md +++ b/documentation/models/Footer.md @@ -1,10 +1,12 @@ # Footer +Footer styling for the inbox modal. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | String | ✅ | | -| borderRadius | String | ✅ | | -| fontSize | String | ✅ | | -| textColor | String | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :--------------------------------------------- | +| backgroundColor | String | ✅ | Footer background color. | +| borderRadius | String | ✅ | Border radius applied to the footer container. | +| fontSize | String | ✅ | Font size used in the footer. | +| textColor | String | ✅ | Footer text color. | diff --git a/documentation/models/GetInAppInboxTokensParameters.md b/documentation/models/GetInAppInboxTokensParameters.md deleted file mode 100644 index 7c2a03e..0000000 --- a/documentation/models/GetInAppInboxTokensParameters.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetInAppInboxTokensParameters - -**Properties** - -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | Long | ❌ | | -| startingAfter | String | ❌ | | -| endingBefore | String | ❌ | | diff --git a/documentation/models/GetMobilePushApnsTokensParameters.md b/documentation/models/GetMobilePushApnsTokensParameters.md deleted file mode 100644 index 0c27f20..0000000 --- a/documentation/models/GetMobilePushApnsTokensParameters.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetMobilePushApnsTokensParameters - -**Properties** - -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | Long | ❌ | | -| startingAfter | String | ❌ | | -| endingBefore | String | ❌ | | diff --git a/documentation/models/GetMobilePushExpoTokensParameters.md b/documentation/models/GetMobilePushExpoTokensParameters.md deleted file mode 100644 index a06b157..0000000 --- a/documentation/models/GetMobilePushExpoTokensParameters.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetMobilePushExpoTokensParameters - -**Properties** - -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | Long | ❌ | | -| startingAfter | String | ❌ | | -| endingBefore | String | ❌ | | diff --git a/documentation/models/GetMobilePushFcmTokensParameters.md b/documentation/models/GetMobilePushFcmTokensParameters.md deleted file mode 100644 index f4430dd..0000000 --- a/documentation/models/GetMobilePushFcmTokensParameters.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetMobilePushFcmTokensParameters - -**Properties** - -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | Long | ❌ | | -| startingAfter | String | ❌ | | -| endingBefore | String | ❌ | | diff --git a/documentation/models/GetSlackTokensParameters.md b/documentation/models/GetSlackTokensParameters.md deleted file mode 100644 index 6cb7a5f..0000000 --- a/documentation/models/GetSlackTokensParameters.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetSlackTokensParameters - -**Properties** - -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | Long | ❌ | | -| startingAfter | String | ❌ | | -| endingBefore | String | ❌ | | diff --git a/documentation/models/GetTeamsTokensParameters.md b/documentation/models/GetTeamsTokensParameters.md deleted file mode 100644 index 80819e1..0000000 --- a/documentation/models/GetTeamsTokensParameters.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetTeamsTokensParameters - -**Properties** - -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | Long | ❌ | | -| startingAfter | String | ❌ | | -| endingBefore | String | ❌ | | diff --git a/documentation/models/GetWebPushTokensParameters.md b/documentation/models/GetWebPushTokensParameters.md deleted file mode 100644 index 4551816..0000000 --- a/documentation/models/GetWebPushTokensParameters.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetWebPushTokensParameters - -**Properties** - -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | Long | ❌ | | -| startingAfter | String | ❌ | | -| endingBefore | String | ❌ | | diff --git a/documentation/models/Header.md b/documentation/models/Header.md index d0b79bf..041319d 100644 --- a/documentation/models/Header.md +++ b/documentation/models/Header.md @@ -1,11 +1,13 @@ # Header +Header styling for the inbox modal. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | String | ✅ | | -| borderRadius | String | ✅ | | -| fontFamily | String | ✅ | | -| fontSize | String | ✅ | | -| textColor | String | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :--------------------------------------------- | +| backgroundColor | String | ✅ | Header background color. | +| borderRadius | String | ✅ | Border radius applied to the header container. | +| fontFamily | String | ✅ | CSS font family for the header title. | +| fontSize | String | ✅ | Font size used in the header. | +| textColor | String | ✅ | Header text color. | diff --git a/documentation/models/Icon.md b/documentation/models/Icon.md index 21880cb..df4429a 100644 --- a/documentation/models/Icon.md +++ b/documentation/models/Icon.md @@ -1,8 +1,10 @@ # Icon +Launcher icon styling overrides. + **Properties** -| Name | Type | Required | Description | -| :---------- | :----- | :------- | :---------- | -| borderColor | String | ✅ | | -| width | String | ✅ | | +| Name | Type | Required | Description | +| :---------- | :----- | :------- | :------------------------------------------- | +| borderColor | String | ✅ | CSS color used for the icon border. | +| width | String | ✅ | Width of the launcher icon (any CSS length). | diff --git a/documentation/models/Images.md b/documentation/models/Images.md index d0014e1..2aadf82 100644 --- a/documentation/models/Images.md +++ b/documentation/models/Images.md @@ -1,7 +1,9 @@ # Images +Image overrides for assets used in the inbox UI. + **Properties** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| emptyInboxUrl | String | ✅ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :------------------------------------------------------ | +| emptyInboxUrl | String | ✅ | URL for the illustration shown when the inbox is empty. | diff --git a/documentation/models/InboxConfigPayload.md b/documentation/models/InboxConfigPayload.md index 7e54dac..391db27 100644 --- a/documentation/models/InboxConfigPayload.md +++ b/documentation/models/InboxConfigPayload.md @@ -2,8 +2,8 @@ **Properties** -| Name | Type | Required | Description | -| :----- | :----- | :------- | :---------- | -| images | Images | ✅ | | -| locale | String | ✅ | | -| theme | Theme | ✅ | | +| Name | Type | Required | Description | +| :----- | :----- | :------- | :---------------------------------------------------------------- | +| images | Images | ✅ | Image overrides for assets used in the inbox UI. | +| locale | String | ✅ | Locale code (ISO language tag) used to localize built-in strings. | +| theme | Theme | ✅ | Visual customization options for the hosted inbox widget. | diff --git a/documentation/models/InboxToken.md b/documentation/models/InboxToken.md index 68e8272..cc71bb1 100644 --- a/documentation/models/InboxToken.md +++ b/documentation/models/InboxToken.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :----------- | :----- | :------- | :---------- | -| token | String | ✅ | | -| connectionId | String | ❌ | | +| Name | Type | Required | Description | +| :----------- | :----- | :------- | :------------------------------------------------------------------------- | +| token | String | ✅ | The in-app inbox token generated for this user. | +| connectionId | String | ❌ | Realtime connection ID to restrict delivery to a specific Ably connection. | diff --git a/documentation/models/InboxTokenResponse.md b/documentation/models/InboxTokenResponse.md index e2a4e3a..48d8f7f 100644 --- a/documentation/models/InboxTokenResponse.md +++ b/documentation/models/InboxTokenResponse.md @@ -2,11 +2,11 @@ **Properties** -| Name | Type | Required | Description | -| :----------- | :----- | :------- | :---------- | -| createdAt | String | ✅ | | -| id | String | ✅ | | -| token | String | ✅ | | -| connectionId | String | ❌ | | -| discardedAt | String | ❌ | | -| updatedAt | String | ❌ | | +| Name | Type | Required | Description | +| :----------- | :----- | :------- | :------------------------------------------------------------------------- | +| createdAt | String | ✅ | The timestamp when the token was created. | +| id | String | ✅ | The unique identifier for the token. | +| token | String | ✅ | The in-app inbox token generated for this user. | +| connectionId | String | ❌ | Realtime connection ID to restrict delivery to a specific Ably connection. | +| discardedAt | String | ❌ | The timestamp when the token was discarded, if applicable. | +| updatedAt | String | ❌ | The timestamp when the token metadata last changed. | diff --git a/documentation/models/InboxTokenResponseCollection.md b/documentation/models/InboxTokenResponseCollection.md index b952e93..dc3493d 100644 --- a/documentation/models/InboxTokenResponseCollection.md +++ b/documentation/models/InboxTokenResponseCollection.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :---- | :------------------------- | :------- | :---------- | -| data | List\ | ❌ | | -| links | Links | ❌ | | +| Name | Type | Required | Description | +| :---- | :------------------------------------------------ | :------- | :---------- | +| data | List<[InboxTokenResponse](InboxTokenResponse.md)> | ❌ | | +| links | [Links](Links.md) | ❌ | | diff --git a/documentation/models/IncomingWebhook.md b/documentation/models/IncomingWebhook.md index e9a2fb1..beca079 100644 --- a/documentation/models/IncomingWebhook.md +++ b/documentation/models/IncomingWebhook.md @@ -2,8 +2,8 @@ **Properties** -| Name | Type | Required | Description | -| :--------------- | :----- | :------- | :---------- | -| channel | String | ✅ | | -| configurationUrl | String | ✅ | | -| url | String | ✅ | | +| Name | Type | Required | Description | +| :--------------- | :----- | :------- | :------------------------------------------- | +| channel | String | ✅ | Human readable name for the webhook channel. | +| configurationUrl | String | ✅ | URL users can visit to manage the webhook. | +| url | String | ✅ | Webhook URL that Slack posts events to. | diff --git a/documentation/models/ListApnsTokensParameters.md b/documentation/models/ListApnsTokensParameters.md new file mode 100644 index 0000000..2e11748 --- /dev/null +++ b/documentation/models/ListApnsTokensParameters.md @@ -0,0 +1,9 @@ +# ListApnsTokensParameters + +**Properties** + +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | Long | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | String | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | String | ❌ | a cursor for use in pagination, points to the first ID in next page | diff --git a/documentation/models/ListExpoTokensParameters.md b/documentation/models/ListExpoTokensParameters.md new file mode 100644 index 0000000..afef680 --- /dev/null +++ b/documentation/models/ListExpoTokensParameters.md @@ -0,0 +1,9 @@ +# ListExpoTokensParameters + +**Properties** + +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | Long | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | String | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | String | ❌ | a cursor for use in pagination, points to the first ID in next page | diff --git a/documentation/models/ListFcmTokensParameters.md b/documentation/models/ListFcmTokensParameters.md new file mode 100644 index 0000000..48aa4fc --- /dev/null +++ b/documentation/models/ListFcmTokensParameters.md @@ -0,0 +1,9 @@ +# ListFcmTokensParameters + +**Properties** + +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | Long | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | String | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | String | ❌ | a cursor for use in pagination, points to the first ID in next page | diff --git a/documentation/models/ListInboxTokensParameters.md b/documentation/models/ListInboxTokensParameters.md new file mode 100644 index 0000000..82a13c3 --- /dev/null +++ b/documentation/models/ListInboxTokensParameters.md @@ -0,0 +1,9 @@ +# ListInboxTokensParameters + +**Properties** + +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | Long | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | String | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | String | ❌ | a cursor for use in pagination, points to the first ID in next page | diff --git a/documentation/models/ListMagicbellSlackbotTokensParameters.md b/documentation/models/ListMagicbellSlackbotTokensParameters.md new file mode 100644 index 0000000..6fa4516 --- /dev/null +++ b/documentation/models/ListMagicbellSlackbotTokensParameters.md @@ -0,0 +1,9 @@ +# ListMagicbellSlackbotTokensParameters + +**Properties** + +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | Long | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | String | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | String | ❌ | a cursor for use in pagination, points to the first ID in next page | diff --git a/documentation/models/ListNotificationsParameters.md b/documentation/models/ListNotificationsParameters.md index ee2de18..2e8a32b 100644 --- a/documentation/models/ListNotificationsParameters.md +++ b/documentation/models/ListNotificationsParameters.md @@ -2,10 +2,11 @@ **Properties** -| Name | Type | Required | Description | -| :------------ | :----- | :------- | :---------- | -| limit | Long | ❌ | | -| startingAfter | String | ❌ | | -| endingBefore | String | ❌ | | -| status | String | ❌ | | -| topic | String | ❌ | | +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :-------------------------------------------------------------------------------- | +| limit | Long | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | String | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | String | ❌ | a cursor for use in pagination, points to the first ID in next page | +| status | String | ❌ | filter notifications by their read state, one of 'unread' \| 'read' \| 'archived' | +| category | String | ❌ | filter notifications by their category | +| topic | String | ❌ | filter notifications by their topic | diff --git a/documentation/models/ListSlackTokensParameters.md b/documentation/models/ListSlackTokensParameters.md new file mode 100644 index 0000000..f6f6594 --- /dev/null +++ b/documentation/models/ListSlackTokensParameters.md @@ -0,0 +1,9 @@ +# ListSlackTokensParameters + +**Properties** + +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | Long | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | String | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | String | ❌ | a cursor for use in pagination, points to the first ID in next page | diff --git a/documentation/models/ListTeamsTokensParameters.md b/documentation/models/ListTeamsTokensParameters.md new file mode 100644 index 0000000..2cec3eb --- /dev/null +++ b/documentation/models/ListTeamsTokensParameters.md @@ -0,0 +1,9 @@ +# ListTeamsTokensParameters + +**Properties** + +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | Long | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | String | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | String | ❌ | a cursor for use in pagination, points to the first ID in next page | diff --git a/documentation/models/ListWebPushTokensParameters.md b/documentation/models/ListWebPushTokensParameters.md new file mode 100644 index 0000000..1e46654 --- /dev/null +++ b/documentation/models/ListWebPushTokensParameters.md @@ -0,0 +1,9 @@ +# ListWebPushTokensParameters + +**Properties** + +| Name | Type | Required | Description | +| :------------ | :----- | :------- | :--------------------------------------------------------------------- | +| limit | Long | ❌ | defines the maximum number of items to return per page (default: 50) | +| startingAfter | String | ❌ | a cursor for use in pagination, points to the last ID in previous page | +| endingBefore | String | ❌ | a cursor for use in pagination, points to the first ID in next page | diff --git a/documentation/models/MarkAllNotificationsReadParameters.md b/documentation/models/MarkAllNotificationsReadParameters.md new file mode 100644 index 0000000..c4cebd8 --- /dev/null +++ b/documentation/models/MarkAllNotificationsReadParameters.md @@ -0,0 +1,8 @@ +# MarkAllNotificationsReadParameters + +**Properties** + +| Name | Type | Required | Description | +| :------- | :----- | :------- | :------------------------------------- | +| category | String | ❌ | filter notifications by their category | +| topic | String | ❌ | filter notifications by their topic | diff --git a/documentation/models/Notification.md b/documentation/models/Notification.md index 22786b5..a4caac3 100644 --- a/documentation/models/Notification.md +++ b/documentation/models/Notification.md @@ -2,20 +2,20 @@ **Properties** -| Name | Type | Required | Description | -| :--------------- | :----- | :------- | :---------- | -| createdAt | String | ✅ | | -| id | String | ✅ | | -| title | String | ✅ | | -| updatedAt | String | ✅ | | -| userId | String | ✅ | | -| actionUrl | String | ❌ | | -| archivedAt | String | ❌ | | -| category | String | ❌ | | -| content | String | ❌ | | -| customAttributes | Object | ❌ | | -| discardedAt | String | ❌ | | -| readAt | String | ❌ | | -| seenAt | String | ❌ | | -| sentAt | String | ❌ | | -| topic | String | ❌ | | +| Name | Type | Required | Description | +| :--------------- | :----- | :------- | :------------------------------------------------------ | +| createdAt | String | ✅ | The timestamp when the notification was created. | +| id | String | ✅ | The unique identifier for the notification. | +| title | String | ✅ | The title that is displayed to recipients. | +| updatedAt | String | ✅ | The timestamp when the notification was last updated. | +| userId | String | ✅ | The user that should receive the notification. | +| actionUrl | String | ❌ | The link associated with the notification. | +| archivedAt | String | ❌ | The timestamp when the notification was archived. | +| category | String | ❌ | The category grouping for the notification. | +| content | String | ❌ | The body content of the notification. | +| customAttributes | Object | ❌ | The custom data stored with the notification. | +| discardedAt | String | ❌ | The timestamp when the notification was discarded. | +| readAt | String | ❌ | The timestamp when the notification was marked as read. | +| seenAt | String | ❌ | The timestamp when the notification was seen. | +| sentAt | String | ❌ | The timestamp when the notification was sent. | +| topic | String | ❌ | The topic for additional classification. | diff --git a/documentation/models/NotificationCollection.md b/documentation/models/NotificationCollection.md index c7de56b..9d02b56 100644 --- a/documentation/models/NotificationCollection.md +++ b/documentation/models/NotificationCollection.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :---- | :------------------- | :------- | :---------- | -| data | List\ | ❌ | | -| links | Links | ❌ | | +| Name | Type | Required | Description | +| :---- | :------------------------------------ | :------- | :---------- | +| data | List<[Notification](Notification.md)> | ❌ | | +| links | [Links](Links.md) | ❌ | | diff --git a/documentation/models/SlackInstallation.md b/documentation/models/SlackInstallation.md index dd6c030..ff63bf2 100644 --- a/documentation/models/SlackInstallation.md +++ b/documentation/models/SlackInstallation.md @@ -2,18 +2,18 @@ **Properties** -| Name | Type | Required | Description | -| :------------------ | :-------------- | :------- | :---------- | -| accessToken | String | ✅ | | -| appId | String | ✅ | | -| authedUser | AuthedUser | ✅ | | -| team | Team | ✅ | | -| botUserId | String | ❌ | | -| enterprise | Enterprise | ❌ | | -| expiresIn | Long | ❌ | | -| id | String | ❌ | | -| incomingWebhook | IncomingWebhook | ❌ | | -| isEnterpriseInstall | Boolean | ❌ | | -| refreshToken | String | ❌ | | -| scope | String | ❌ | | -| tokenType | String | ❌ | | +| Name | Type | Required | Description | +| :------------------ | :-------------- | :------- | :----------------------------------------------------------------- | +| accessToken | String | ✅ | Bot token returned from the Slack OAuth exchange. | +| appId | String | ✅ | Slack app identifier for the installed app. | +| authedUser | AuthedUser | ✅ | | +| team | Team | ✅ | | +| botUserId | String | ❌ | Slack user ID of the installed bot. | +| enterprise | Enterprise | ❌ | | +| expiresIn | Long | ❌ | Seconds until the bot access token expires. | +| id | String | ❌ | Unique identifier MagicBell assigns to the Slack installation. | +| incomingWebhook | IncomingWebhook | ❌ | | +| isEnterpriseInstall | Boolean | ❌ | Indicates whether the installation occurred on an enterprise grid. | +| refreshToken | String | ❌ | Refresh token for regenerating the bot access token. | +| scope | String | ❌ | Space-delimited OAuth scopes granted to the bot token. | +| tokenType | String | ❌ | Type of bot token returned by Slack. | diff --git a/documentation/models/SlackStartInstall.md b/documentation/models/SlackStartInstall.md index da47168..32b1432 100644 --- a/documentation/models/SlackStartInstall.md +++ b/documentation/models/SlackStartInstall.md @@ -2,9 +2,9 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :------------- | :------- | :---------- | -| appId | String | ✅ | | -| authUrl | String | ❌ | | -| extraScopes | List\ | ❌ | | -| redirectUrl | String | ❌ | | +| Name | Type | Required | Description | +| :---------- | :----------- | :------- | :------------------------------------------------------------------ | +| appId | String | ✅ | Slack app ID that the installation flow should use. | +| authUrl | String | ❌ | Optional override for the authorization URL returned to the client. | +| extraScopes | List | ❌ | Additional OAuth scopes to request during installation. | +| redirectUrl | String | ❌ | Custom redirect URL to use after OAuth completes. | diff --git a/documentation/models/SlackStartInstallResponseContent.md b/documentation/models/SlackStartInstallResponseContent.md index a1db976..2bb8c37 100644 --- a/documentation/models/SlackStartInstallResponseContent.md +++ b/documentation/models/SlackStartInstallResponseContent.md @@ -2,8 +2,8 @@ **Properties** -| Name | Type | Required | Description | -| :------ | :------------- | :------- | :---------- | -| appId | String | ❌ | | -| authUrl | String | ❌ | | -| scopes | List\ | ❌ | | +| Name | Type | Required | Description | +| :------ | :----------- | :------- | :---------- | +| appId | String | ❌ | | +| authUrl | String | ❌ | | +| scopes | List | ❌ | | diff --git a/documentation/models/SlackToken.md b/documentation/models/SlackToken.md index 8b443ed..df3a205 100644 --- a/documentation/models/SlackToken.md +++ b/documentation/models/SlackToken.md @@ -4,9 +4,9 @@ | Name | Type | Required | Description | | :---------- | :---------------- | :------- | :-------------------------------------------------------------------------------------------------- | -| createdAt | String | ✅ | | -| id | String | ✅ | | -| discardedAt | String | ❌ | | +| createdAt | String | ✅ | The timestamp when the token was created. | +| id | String | ✅ | The unique identifier for the token. | +| discardedAt | String | ❌ | The timestamp when the token was discarded, if applicable. | | oauth | SlackTokenOauth | ❌ | | -| updatedAt | String | ❌ | | +| updatedAt | String | ❌ | The timestamp when the token metadata last changed. | | webhook | SlackTokenWebhook | ❌ | Obtained directly from the incoming_webhook object in the installation response from the Slack API. | diff --git a/documentation/models/SlackTokenCollection.md b/documentation/models/SlackTokenCollection.md index dde4cbb..1f1a44e 100644 --- a/documentation/models/SlackTokenCollection.md +++ b/documentation/models/SlackTokenCollection.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :---- | :----------------- | :------- | :---------- | -| data | List\ | ❌ | | -| links | Links | ❌ | | +| Name | Type | Required | Description | +| :---- | :-------------------------------- | :------- | :---------- | +| data | List<[SlackToken](SlackToken.md)> | ❌ | | +| links | [Links](Links.md) | ❌ | | diff --git a/documentation/models/SlackTokenOauth.md b/documentation/models/SlackTokenOauth.md index 5f9d317..55c8a0f 100644 --- a/documentation/models/SlackTokenOauth.md +++ b/documentation/models/SlackTokenOauth.md @@ -2,8 +2,8 @@ **Properties** -| Name | Type | Required | Description | -| :------------- | :----- | :------- | :---------- | -| channelId | String | ✅ | | -| installationId | String | ✅ | | -| scope | String | ❌ | | +| Name | Type | Required | Description | +| :------------- | :----- | :------- | :--------------------------------------------------------------- | +| channelId | String | ✅ | The ID of the Slack channel this installation is associated with | +| installationId | String | ✅ | A unique identifier for this Slack workspace installation | +| scope | String | ❌ | The OAuth scope granted during installation | diff --git a/documentation/models/SlackTokenPayloadOauth.md b/documentation/models/SlackTokenPayloadOauth.md index dd3b151..862b1bc 100644 --- a/documentation/models/SlackTokenPayloadOauth.md +++ b/documentation/models/SlackTokenPayloadOauth.md @@ -2,8 +2,8 @@ **Properties** -| Name | Type | Required | Description | -| :------------- | :----- | :------- | :---------- | -| channelId | String | ✅ | | -| installationId | String | ✅ | | -| scope | String | ❌ | | +| Name | Type | Required | Description | +| :------------- | :----- | :------- | :--------------------------------------------------------------- | +| channelId | String | ✅ | The ID of the Slack channel this installation is associated with | +| installationId | String | ✅ | A unique identifier for this Slack workspace installation | +| scope | String | ❌ | The OAuth scope granted during installation | diff --git a/documentation/models/SlackTokenPayloadWebhook.md b/documentation/models/SlackTokenPayloadWebhook.md index 3ad433e..d0168d2 100644 --- a/documentation/models/SlackTokenPayloadWebhook.md +++ b/documentation/models/SlackTokenPayloadWebhook.md @@ -4,6 +4,6 @@ Obtained directly from the incoming_webhook object in the installation response **Properties** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| url | String | ✅ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :------------------------------------------ | +| url | String | ✅ | The URL for the incoming webhook from Slack | diff --git a/documentation/models/SlackTokenWebhook.md b/documentation/models/SlackTokenWebhook.md index 1ea5ffd..fa26c88 100644 --- a/documentation/models/SlackTokenWebhook.md +++ b/documentation/models/SlackTokenWebhook.md @@ -4,6 +4,6 @@ Obtained directly from the incoming_webhook object in the installation response **Properties** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| url | String | ✅ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :------------------------------------------ | +| url | String | ✅ | The URL for the incoming webhook from Slack | diff --git a/documentation/models/Team.md b/documentation/models/Team.md index aa6181a..086d3e5 100644 --- a/documentation/models/Team.md +++ b/documentation/models/Team.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :--- | :----- | :------- | :---------- | -| id | String | ✅ | | -| name | String | ❌ | | +| Name | Type | Required | Description | +| :--- | :----- | :------- | :------------------------------------------ | +| id | String | ✅ | Workspace ID where the app was installed. | +| name | String | ❌ | Workspace name where the app was installed. | diff --git a/documentation/models/TeamsToken.md b/documentation/models/TeamsToken.md index 60e814b..021f21c 100644 --- a/documentation/models/TeamsToken.md +++ b/documentation/models/TeamsToken.md @@ -2,10 +2,10 @@ **Properties** -| Name | Type | Required | Description | -| :---------- | :---------------- | :------- | :---------- | -| createdAt | String | ✅ | | -| id | String | ✅ | | -| discardedAt | String | ❌ | | -| updatedAt | String | ❌ | | -| webhook | TeamsTokenWebhook | ❌ | | +| Name | Type | Required | Description | +| :---------- | :---------------- | :------- | :--------------------------------------------------------- | +| createdAt | String | ✅ | The timestamp when the token was created. | +| id | String | ✅ | The unique identifier for the token. | +| discardedAt | String | ❌ | The timestamp when the token was discarded, if applicable. | +| updatedAt | String | ❌ | The timestamp when the token metadata last changed. | +| webhook | TeamsTokenWebhook | ❌ | | diff --git a/documentation/models/TeamsTokenCollection.md b/documentation/models/TeamsTokenCollection.md index d4c77dc..79a44de 100644 --- a/documentation/models/TeamsTokenCollection.md +++ b/documentation/models/TeamsTokenCollection.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :---- | :----------------- | :------- | :---------- | -| data | List\ | ❌ | | -| links | Links | ❌ | | +| Name | Type | Required | Description | +| :---- | :-------------------------------- | :------- | :---------- | +| data | List<[TeamsToken](TeamsToken.md)> | ❌ | | +| links | [Links](Links.md) | ❌ | | diff --git a/documentation/models/TemplatesInstallation.md b/documentation/models/TemplatesInstallation.md deleted file mode 100644 index 4f3c2b6..0000000 --- a/documentation/models/TemplatesInstallation.md +++ /dev/null @@ -1,9 +0,0 @@ -# TemplatesInstallation - -**Properties** - -| Name | Type | Required | Description | -| :------- | :----- | :------- | :---------- | -| channel | String | ✅ | | -| text | String | ✅ | | -| category | String | ❌ | | diff --git a/documentation/models/Theme.md b/documentation/models/Theme.md index 26213b8..d815154 100644 --- a/documentation/models/Theme.md +++ b/documentation/models/Theme.md @@ -1,13 +1,15 @@ # Theme +Visual customization options for the hosted inbox widget. + **Properties** -| Name | Type | Required | Description | -| :----------- | :---------------- | :------- | :---------- | -| banner | Banner | ❌ | | -| dialog | Dialog | ❌ | | -| footer | Footer | ❌ | | -| header | Header | ❌ | | -| icon | Icon | ❌ | | -| notification | ThemeNotification | ❌ | | -| unseenBadge | UnseenBadge | ❌ | | +| Name | Type | Required | Description | +| :----------- | :---------------- | :------- | :--------------------------------------------- | +| banner | Banner | ❌ | Top banner styling options. | +| dialog | Dialog | ❌ | Styling for confirmation and action dialogs. | +| footer | Footer | ❌ | Footer styling for the inbox modal. | +| header | Header | ❌ | Header styling for the inbox modal. | +| icon | Icon | ❌ | Launcher icon styling overrides. | +| notification | ThemeNotification | ❌ | Styling overrides for notification list items. | +| unseenBadge | UnseenBadge | ❌ | Badge styling for unseen notification counts. | diff --git a/documentation/models/ThemeNotification.md b/documentation/models/ThemeNotification.md index 18aa611..9d76ba7 100644 --- a/documentation/models/ThemeNotification.md +++ b/documentation/models/ThemeNotification.md @@ -1,9 +1,11 @@ # ThemeNotification +Styling overrides for notification list items. + **Properties** -| Name | Type | Required | Description | -| :-------- | :-------- | :------- | :---------- | -| default\_ | Default\_ | ✅ | | -| unread | Unread | ✅ | | -| unseen | Unseen | ✅ | | +| Name | Type | Required | Description | +| :-------- | :-------- | :------- | :---------------------------------------------- | +| default\_ | Default\_ | ✅ | Base styles applied to every notification item. | +| unread | Unread | ✅ | Overrides for unread notifications. | +| unseen | Unseen | ✅ | Overrides for unseen notifications. | diff --git a/documentation/models/Unread.md b/documentation/models/Unread.md index 2ce18c3..6388366 100644 --- a/documentation/models/Unread.md +++ b/documentation/models/Unread.md @@ -1,10 +1,12 @@ # Unread +Overrides for unread notifications. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :---------- | :------- | :---------- | -| backgroundColor | String | ✅ | | -| textColor | String | ✅ | | -| hover | UnreadHover | ❌ | | -| state | UnreadState | ❌ | | +| Name | Type | Required | Description | +| :-------------- | :---------- | :------- | :------------------------------------------------ | +| backgroundColor | String | ✅ | Background color applied to unread notifications. | +| textColor | String | ✅ | Text color used when a notification is unread. | +| hover | UnreadHover | ❌ | Hover styles for unread notifications. | +| state | UnreadState | ❌ | State indicator styling for unread notifications. | diff --git a/documentation/models/UnreadHover.md b/documentation/models/UnreadHover.md index 3a16072..bb63dd9 100644 --- a/documentation/models/UnreadHover.md +++ b/documentation/models/UnreadHover.md @@ -1,7 +1,9 @@ # UnreadHover +Hover styles for unread notifications. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | String | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :-------------------------------------------------- | +| backgroundColor | String | ✅ | Background color on hover for unread notifications. | diff --git a/documentation/models/UnreadState.md b/documentation/models/UnreadState.md index 0a98e5e..0538733 100644 --- a/documentation/models/UnreadState.md +++ b/documentation/models/UnreadState.md @@ -1,7 +1,9 @@ # UnreadState +State indicator styling for unread notifications. + **Properties** -| Name | Type | Required | Description | -| :---- | :----- | :------- | :---------- | -| color | String | ✅ | | +| Name | Type | Required | Description | +| :---- | :----- | :------- | :------------------------------------ | +| color | String | ✅ | Color for the unread state indicator. | diff --git a/documentation/models/Unseen.md b/documentation/models/Unseen.md index a984232..1b792fa 100644 --- a/documentation/models/Unseen.md +++ b/documentation/models/Unseen.md @@ -1,10 +1,12 @@ # Unseen +Overrides for unseen notifications. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :---------- | :------- | :---------- | -| backgroundColor | String | ✅ | | -| textColor | String | ✅ | | -| hover | UnseenHover | ❌ | | -| state | UnseenState | ❌ | | +| Name | Type | Required | Description | +| :-------------- | :---------- | :------- | :------------------------------------------------ | +| backgroundColor | String | ✅ | Background color applied to unseen notifications. | +| textColor | String | ✅ | Text color used when a notification is unseen. | +| hover | UnseenHover | ❌ | Hover styles for unseen notifications. | +| state | UnseenState | ❌ | State indicator styling for unseen notifications. | diff --git a/documentation/models/UnseenBadge.md b/documentation/models/UnseenBadge.md index a1403d4..5a1f6f4 100644 --- a/documentation/models/UnseenBadge.md +++ b/documentation/models/UnseenBadge.md @@ -1,7 +1,9 @@ # UnseenBadge +Badge styling for unseen notification counts. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | String | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :---------------------- | +| backgroundColor | String | ✅ | Badge background color. | diff --git a/documentation/models/UnseenHover.md b/documentation/models/UnseenHover.md index 74c6222..bc08a19 100644 --- a/documentation/models/UnseenHover.md +++ b/documentation/models/UnseenHover.md @@ -1,7 +1,9 @@ # UnseenHover +Hover styles for unseen notifications. + **Properties** -| Name | Type | Required | Description | -| :-------------- | :----- | :------- | :---------- | -| backgroundColor | String | ✅ | | +| Name | Type | Required | Description | +| :-------------- | :----- | :------- | :-------------------------------------------------- | +| backgroundColor | String | ✅ | Background color on hover for unseen notifications. | diff --git a/documentation/models/UnseenState.md b/documentation/models/UnseenState.md index 3e19d4b..95da0e1 100644 --- a/documentation/models/UnseenState.md +++ b/documentation/models/UnseenState.md @@ -1,7 +1,9 @@ # UnseenState +State indicator styling for unseen notifications. + **Properties** -| Name | Type | Required | Description | -| :---- | :----- | :------- | :---------- | -| color | String | ✅ | | +| Name | Type | Required | Description | +| :---- | :----- | :------- | :------------------------------------ | +| color | String | ✅ | Color for the unseen state indicator. | diff --git a/documentation/models/UserPreferences.md b/documentation/models/UserPreferences.md new file mode 100644 index 0000000..28a2411 --- /dev/null +++ b/documentation/models/UserPreferences.md @@ -0,0 +1,7 @@ +# UserPreferences + +**Properties** + +| Name | Type | Required | Description | +| :--------- | :-------------------------------- | :------- | :---------- | +| categories | List<[Categories](Categories.md)> | ❌ | | diff --git a/documentation/models/WebPushStartInstallationResponse.md b/documentation/models/WebPushStartInstallationResponse.md index 06d55cb..d0bd72b 100644 --- a/documentation/models/WebPushStartInstallationResponse.md +++ b/documentation/models/WebPushStartInstallationResponse.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :-------- | :----- | :------- | :---------- | -| authToken | String | ✅ | | -| publicKey | String | ✅ | | +| Name | Type | Required | Description | +| :-------- | :----- | :------- | :--------------------------------------------------------- | +| authToken | String | ✅ | Auth secret returned from PushSubscription.getKey('auth'). | +| publicKey | String | ✅ | VAPID public key generated for this web push installation. | diff --git a/documentation/models/WebPushToken.md b/documentation/models/WebPushToken.md index f7a93f8..39f3eff 100644 --- a/documentation/models/WebPushToken.md +++ b/documentation/models/WebPushToken.md @@ -4,9 +4,9 @@ | Name | Type | Required | Description | | :---------- | :--------------- | :------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| createdAt | String | ✅ | | +| createdAt | String | ✅ | The timestamp when the token was created. | | endpoint | String | ✅ | The push subscription URL obtained from PushSubscription.endpoint after calling registration.pushManager.subscribe(). This is the unique URL for this device that push messages will be sent to. | -| id | String | ✅ | | +| id | String | ✅ | The unique identifier for the token. | | keys | WebPushTokenKeys | ✅ | The encryption keys from the PushSubscription.getKey() method, needed to encrypt push messages for this subscription. | -| discardedAt | String | ❌ | | -| updatedAt | String | ❌ | | +| discardedAt | String | ❌ | The timestamp when the token was discarded, if applicable. | +| updatedAt | String | ❌ | The timestamp when the token metadata last changed. | diff --git a/documentation/models/WebPushTokenCollection.md b/documentation/models/WebPushTokenCollection.md index 527d288..e2b0526 100644 --- a/documentation/models/WebPushTokenCollection.md +++ b/documentation/models/WebPushTokenCollection.md @@ -2,7 +2,7 @@ **Properties** -| Name | Type | Required | Description | -| :---- | :------------------- | :------- | :---------- | -| data | List\ | ❌ | | -| links | Links | ❌ | | +| Name | Type | Required | Description | +| :---- | :------------------------------------ | :------- | :---------- | +| data | List<[WebPushToken](WebPushToken.md)> | ❌ | | +| links | [Links](Links.md) | ❌ | | diff --git a/documentation/services/ChannelsService.kt.md b/documentation/services/ChannelsService.kt.md index e41265f..8e3c3b4 100644 --- a/documentation/services/ChannelsService.kt.md +++ b/documentation/services/ChannelsService.kt.md @@ -2,49 +2,55 @@ A list of all methods in the `ChannelsService` service. Click on the method name to view detailed information about that method. -| Methods | Description | -| :-------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [getInAppInboxTokens](#getinappinboxtokens) | Lists all in_app tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | -| [saveInAppInboxToken](#saveinappinboxtoken) | Saves a in_app token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | -| [getInAppInboxToken](#getinappinboxtoken) | Retrieves details of a specific in_app token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | -| [discardInAppInboxToken](#discardinappinboxtoken) | Revokes one of the authenticated user's in_app tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | -| [getMobilePushApnsTokens](#getmobilepushapnstokens) | Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | -| [saveMobilePushApnsToken](#savemobilepushapnstoken) | Saves a mobile_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | -| [getMobilePushApnsToken](#getmobilepushapnstoken) | Retrieves details of a specific mobile_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | -| [discardMobilePushApnsToken](#discardmobilepushapnstoken) | Revokes one of the authenticated user's mobile_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | -| [getMobilePushExpoTokens](#getmobilepushexpotokens) | Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | -| [saveMobilePushExpoToken](#savemobilepushexpotoken) | Saves a mobile_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | -| [getMobilePushExpoToken](#getmobilepushexpotoken) | Retrieves details of a specific mobile_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | -| [discardMobilePushExpoToken](#discardmobilepushexpotoken) | Revokes one of the authenticated user's mobile_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | -| [getMobilePushFcmTokens](#getmobilepushfcmtokens) | Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | -| [saveMobilePushFcmToken](#savemobilepushfcmtoken) | Saves a mobile_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | -| [getMobilePushFcmToken](#getmobilepushfcmtoken) | Retrieves details of a specific mobile_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | -| [discardMobilePushFcmToken](#discardmobilepushfcmtoken) | Revokes one of the authenticated user's mobile_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | -| [getSlackTokens](#getslacktokens) | Lists all slack tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | -| [saveSlackToken](#saveslacktoken) | Saves a slack token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | -| [getSlackToken](#getslacktoken) | Retrieves details of a specific slack token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | -| [discardSlackToken](#discardslacktoken) | Revokes one of the authenticated user's slack tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | -| [getTeamsTokens](#getteamstokens) | Lists all teams tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | -| [saveTeamsToken](#saveteamstoken) | Saves a teams token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | -| [getTeamsToken](#getteamstoken) | Retrieves details of a specific teams token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | -| [discardTeamsToken](#discardteamstoken) | Revokes one of the authenticated user's teams tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | -| [getWebPushTokens](#getwebpushtokens) | Lists all web_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | -| [saveWebPushToken](#savewebpushtoken) | Saves a web_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | -| [getWebPushToken](#getwebpushtoken) | Retrieves details of a specific web_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | -| [discardWebPushToken](#discardwebpushtoken) | Revokes one of the authenticated user's web_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | - -## getInAppInboxTokens - -Lists all in_app tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. +| Methods | Description | +| :------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [listInboxTokens](#listinboxtokens) | Lists all Inbox tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | +| [saveInboxToken](#saveinboxtoken) | Saves the Inbox token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | +| [fetchInboxToken](#fetchinboxtoken) | Fetches details of a specific Inbox token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | +| [deleteInboxToken](#deleteinboxtoken) | Deletes one of the authenticated user's Inbox tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | +| [listApnsTokens](#listapnstokens) | Lists all APNs tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | +| [saveApnsToken](#saveapnstoken) | Saves the APNs token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | +| [fetchApnsToken](#fetchapnstoken) | Fetches details of a specific APNs token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | +| [deleteApnsToken](#deleteapnstoken) | Deletes one of the authenticated user's APNs tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | +| [listExpoTokens](#listexpotokens) | Lists all Expo tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | +| [saveExpoToken](#saveexpotoken) | Saves the Expo token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | +| [fetchExpoToken](#fetchexpotoken) | Fetches details of a specific Expo token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | +| [deleteExpoToken](#deleteexpotoken) | Deletes one of the authenticated user's Expo tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | +| [listFcmTokens](#listfcmtokens) | Lists all FCM tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | +| [saveFcmToken](#savefcmtoken) | Saves the FCM token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | +| [fetchFcmToken](#fetchfcmtoken) | Fetches details of a specific FCM token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | +| [deleteFcmToken](#deletefcmtoken) | Deletes one of the authenticated user's FCM tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | +| [listMagicbellSlackbotTokens](#listmagicbellslackbottokens) | Lists all MagicBell SlackBot tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | +| [saveMagicbellSlackbotToken](#savemagicbellslackbottoken) | Saves the MagicBell SlackBot token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | +| [fetchMagicbellSlackbotToken](#fetchmagicbellslackbottoken) | Fetches details of a specific MagicBell SlackBot token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | +| [deleteMagicbellSlackbotToken](#deletemagicbellslackbottoken) | Deletes one of the authenticated user's MagicBell SlackBot tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | +| [listSlackTokens](#listslacktokens) | Lists all Slack tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | +| [saveSlackToken](#saveslacktoken) | Saves the Slack token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | +| [fetchSlackToken](#fetchslacktoken) | Fetches details of a specific Slack token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | +| [deleteSlackToken](#deleteslacktoken) | Deletes one of the authenticated user's Slack tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | +| [listTeamsTokens](#listteamstokens) | Lists all Teams tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | +| [saveTeamsToken](#saveteamstoken) | Saves the Teams token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | +| [fetchTeamsToken](#fetchteamstoken) | Fetches details of a specific Teams token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | +| [deleteTeamsToken](#deleteteamstoken) | Deletes one of the authenticated user's Teams tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | +| [fetchUserPreferences](#fetchuserpreferences) | Fetch a user's channel delivery preferences. | +| [saveUserPreferences](#saveuserpreferences) | Save a user's channel preferences. | +| [listWebPushTokens](#listwebpushtokens) | Lists all Web Push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | +| [saveWebPushToken](#savewebpushtoken) | Saves the Web Push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | +| [fetchWebPushToken](#fetchwebpushtoken) | Fetches details of a specific Web Push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | +| [deleteWebPushToken](#deletewebpushtoken) | Deletes one of the authenticated user's Web Push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | + +## listInboxTokens + +Lists all Inbox tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - HTTP Method: `GET` - Endpoint: `/channels/in_app/inbox/tokens` **Parameters** -| Name | Type | Required | Description | -| :---------------- | :-------------------------------------------------------------------------- | :------- | :------------------------ | -| requestParameters | [GetInAppInboxTokensParameters](../models/GetInAppInboxTokensParameters.md) | ❌ | Request Parameters Object | +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------ | :------- | :------------------------ | +| requestParameters | [ListInboxTokensParameters](../models/ListInboxTokensParameters.md) | ❌ | Request Parameters Object | **Return Type** @@ -55,8 +61,8 @@ Lists all in_app tokens belonging to the authenticated user. Returns a paginated ```kotlin import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; -import com.magicbell.magicbelluserclient.models.GetInAppInboxTokensParameters; import com.magicbell.magicbelluserclient.models.InboxTokenResponseCollection; +import com.magicbell.magicbelluserclient.models.ListInboxTokensParameters; fun main() { val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() @@ -65,23 +71,23 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val requestParameters: GetInAppInboxTokensParameters = GetInAppInboxTokensParameters.builder() - .limit(10L) + val requestParameters: ListInboxTokensParameters = ListInboxTokensParameters.builder() + .limit(8L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); - val response: InboxTokenResponseCollection = magicbellUserClient.channels.getInAppInboxTokens(requestParameters); + val response: InboxTokenResponseCollection = magicbellUserClient.channels.listInboxTokens(requestParameters); println(response); } ``` -## saveInAppInboxToken +## saveInboxToken -Saves a in_app token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. +Saves the Inbox token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. -- HTTP Method: `POST` +- HTTP Method: `PUT` - Endpoint: `/channels/in_app/inbox/tokens` **Parameters** @@ -110,18 +116,18 @@ fun main() { val inboxToken: InboxToken = InboxToken.builder() .connectionId("connection_id") - .token("in exeu esse co") + .token("ipsum nulla mag") .build(); - val response: InboxToken = magicbellUserClient.channels.saveInAppInboxToken(inboxToken); + val response: InboxToken = magicbellUserClient.channels.saveInboxToken(inboxToken); println(response); } ``` -## getInAppInboxToken +## fetchInboxToken -Retrieves details of a specific in_app token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. +Fetches details of a specific Inbox token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. - HTTP Method: `GET` - Endpoint: `/channels/in_app/inbox/tokens/{token_id}` @@ -150,15 +156,15 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val response: InboxTokenResponse = magicbellUserClient.channels.getInAppInboxToken("token_id"); + val response: InboxTokenResponse = magicbellUserClient.channels.fetchInboxToken("token_id"); println(response); } ``` -## discardInAppInboxToken +## deleteInboxToken -Revokes one of the authenticated user's in_app tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. +Deletes one of the authenticated user's Inbox tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. - HTTP Method: `DELETE` - Endpoint: `/channels/in_app/inbox/tokens/{token_id}` @@ -187,24 +193,24 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val response: DiscardResult = magicbellUserClient.channels.discardInAppInboxToken("token_id"); + val response: DiscardResult = magicbellUserClient.channels.deleteInboxToken("token_id"); println(response); } ``` -## getMobilePushApnsTokens +## listApnsTokens -Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. +Lists all APNs tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - HTTP Method: `GET` - Endpoint: `/channels/mobile_push/apns/tokens` **Parameters** -| Name | Type | Required | Description | -| :---------------- | :---------------------------------------------------------------------------------- | :------- | :------------------------ | -| requestParameters | [GetMobilePushApnsTokensParameters](../models/GetMobilePushApnsTokensParameters.md) | ❌ | Request Parameters Object | +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [ListApnsTokensParameters](../models/ListApnsTokensParameters.md) | ❌ | Request Parameters Object | **Return Type** @@ -216,7 +222,7 @@ Lists all mobile_push tokens belonging to the authenticated user. Returns a pagi import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; import com.magicbell.magicbelluserclient.models.ApnsTokenCollection; -import com.magicbell.magicbelluserclient.models.GetMobilePushApnsTokensParameters; +import com.magicbell.magicbelluserclient.models.ListApnsTokensParameters; fun main() { val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() @@ -225,23 +231,23 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val requestParameters: GetMobilePushApnsTokensParameters = GetMobilePushApnsTokensParameters.builder() - .limit(3L) + val requestParameters: ListApnsTokensParameters = ListApnsTokensParameters.builder() + .limit(7L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); - val response: ApnsTokenCollection = magicbellUserClient.channels.getMobilePushApnsTokens(requestParameters); + val response: ApnsTokenCollection = magicbellUserClient.channels.listApnsTokens(requestParameters); println(response); } ``` -## saveMobilePushApnsToken +## saveApnsToken -Saves a mobile_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. +Saves the APNs token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. -- HTTP Method: `POST` +- HTTP Method: `PUT` - Endpoint: `/channels/mobile_push/apns/tokens` **Parameters** @@ -271,19 +277,19 @@ fun main() { val apnsTokenPayload: ApnsTokenPayload = ApnsTokenPayload.builder() .appId("app_id") - .deviceToken("doloresed quis ") + .deviceToken("sit culpa incid") .installationId(ApnsTokenPayloadInstallationId.DEVELOPMENT) .build(); - val response: ApnsTokenPayload = magicbellUserClient.channels.saveMobilePushApnsToken(apnsTokenPayload); + val response: ApnsTokenPayload = magicbellUserClient.channels.saveApnsToken(apnsTokenPayload); println(response); } ``` -## getMobilePushApnsToken +## fetchApnsToken -Retrieves details of a specific mobile_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. +Fetches details of a specific APNs token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. - HTTP Method: `GET` - Endpoint: `/channels/mobile_push/apns/tokens/{token_id}` @@ -312,15 +318,15 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val response: ApnsToken = magicbellUserClient.channels.getMobilePushApnsToken("token_id"); + val response: ApnsToken = magicbellUserClient.channels.fetchApnsToken("token_id"); println(response); } ``` -## discardMobilePushApnsToken +## deleteApnsToken -Revokes one of the authenticated user's mobile_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. +Deletes one of the authenticated user's APNs tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. - HTTP Method: `DELETE` - Endpoint: `/channels/mobile_push/apns/tokens/{token_id}` @@ -349,24 +355,24 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val response: DiscardResult = magicbellUserClient.channels.discardMobilePushApnsToken("token_id"); + val response: DiscardResult = magicbellUserClient.channels.deleteApnsToken("token_id"); println(response); } ``` -## getMobilePushExpoTokens +## listExpoTokens -Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. +Lists all Expo tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - HTTP Method: `GET` - Endpoint: `/channels/mobile_push/expo/tokens` **Parameters** -| Name | Type | Required | Description | -| :---------------- | :---------------------------------------------------------------------------------- | :------- | :------------------------ | -| requestParameters | [GetMobilePushExpoTokensParameters](../models/GetMobilePushExpoTokensParameters.md) | ❌ | Request Parameters Object | +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [ListExpoTokensParameters](../models/ListExpoTokensParameters.md) | ❌ | Request Parameters Object | **Return Type** @@ -378,7 +384,7 @@ Lists all mobile_push tokens belonging to the authenticated user. Returns a pagi import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; import com.magicbell.magicbelluserclient.models.ExpoTokenCollection; -import com.magicbell.magicbelluserclient.models.GetMobilePushExpoTokensParameters; +import com.magicbell.magicbelluserclient.models.ListExpoTokensParameters; fun main() { val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() @@ -387,23 +393,23 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val requestParameters: GetMobilePushExpoTokensParameters = GetMobilePushExpoTokensParameters.builder() - .limit(9L) + val requestParameters: ListExpoTokensParameters = ListExpoTokensParameters.builder() + .limit(8L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); - val response: ExpoTokenCollection = magicbellUserClient.channels.getMobilePushExpoTokens(requestParameters); + val response: ExpoTokenCollection = magicbellUserClient.channels.listExpoTokens(requestParameters); println(response); } ``` -## saveMobilePushExpoToken +## saveExpoToken -Saves a mobile_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. +Saves the Expo token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. -- HTTP Method: `POST` +- HTTP Method: `PUT` - Endpoint: `/channels/mobile_push/expo/tokens` **Parameters** @@ -434,15 +440,15 @@ fun main() { .deviceToken("device_token") .build(); - val response: ExpoTokenPayload = magicbellUserClient.channels.saveMobilePushExpoToken(expoTokenPayload); + val response: ExpoTokenPayload = magicbellUserClient.channels.saveExpoToken(expoTokenPayload); println(response); } ``` -## getMobilePushExpoToken +## fetchExpoToken -Retrieves details of a specific mobile_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. +Fetches details of a specific Expo token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. - HTTP Method: `GET` - Endpoint: `/channels/mobile_push/expo/tokens/{token_id}` @@ -471,15 +477,15 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val response: ExpoToken = magicbellUserClient.channels.getMobilePushExpoToken("token_id"); + val response: ExpoToken = magicbellUserClient.channels.fetchExpoToken("token_id"); println(response); } ``` -## discardMobilePushExpoToken +## deleteExpoToken -Revokes one of the authenticated user's mobile_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. +Deletes one of the authenticated user's Expo tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. - HTTP Method: `DELETE` - Endpoint: `/channels/mobile_push/expo/tokens/{token_id}` @@ -508,24 +514,24 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val response: DiscardResult = magicbellUserClient.channels.discardMobilePushExpoToken("token_id"); + val response: DiscardResult = magicbellUserClient.channels.deleteExpoToken("token_id"); println(response); } ``` -## getMobilePushFcmTokens +## listFcmTokens -Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. +Lists all FCM tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - HTTP Method: `GET` - Endpoint: `/channels/mobile_push/fcm/tokens` **Parameters** -| Name | Type | Required | Description | -| :---------------- | :-------------------------------------------------------------------------------- | :------- | :------------------------ | -| requestParameters | [GetMobilePushFcmTokensParameters](../models/GetMobilePushFcmTokensParameters.md) | ❌ | Request Parameters Object | +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [ListFcmTokensParameters](../models/ListFcmTokensParameters.md) | ❌ | Request Parameters Object | **Return Type** @@ -537,7 +543,7 @@ Lists all mobile_push tokens belonging to the authenticated user. Returns a pagi import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; import com.magicbell.magicbelluserclient.models.FcmTokenCollection; -import com.magicbell.magicbelluserclient.models.GetMobilePushFcmTokensParameters; +import com.magicbell.magicbelluserclient.models.ListFcmTokensParameters; fun main() { val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() @@ -546,23 +552,23 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val requestParameters: GetMobilePushFcmTokensParameters = GetMobilePushFcmTokensParameters.builder() + val requestParameters: ListFcmTokensParameters = ListFcmTokensParameters.builder() .limit(6L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); - val response: FcmTokenCollection = magicbellUserClient.channels.getMobilePushFcmTokens(requestParameters); + val response: FcmTokenCollection = magicbellUserClient.channels.listFcmTokens(requestParameters); println(response); } ``` -## saveMobilePushFcmToken +## saveFcmToken -Saves a mobile_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. +Saves the FCM token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. -- HTTP Method: `POST` +- HTTP Method: `PUT` - Endpoint: `/channels/mobile_push/fcm/tokens` **Parameters** @@ -581,7 +587,6 @@ Saves a mobile_push token for the authenticated user. This token serves as a cre import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; import com.magicbell.magicbelluserclient.models.FcmTokenPayload; -import com.magicbell.magicbelluserclient.models.FcmTokenPayloadInstallationId; fun main() { val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() @@ -591,19 +596,18 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); val fcmTokenPayload: FcmTokenPayload = FcmTokenPayload.builder() - .deviceToken("in commodo quis") - .installationId(FcmTokenPayloadInstallationId.DEVELOPMENT) + .deviceToken("estminim adipis") .build(); - val response: FcmTokenPayload = magicbellUserClient.channels.saveMobilePushFcmToken(fcmTokenPayload); + val response: FcmTokenPayload = magicbellUserClient.channels.saveFcmToken(fcmTokenPayload); println(response); } ``` -## getMobilePushFcmToken +## fetchFcmToken -Retrieves details of a specific mobile_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. +Fetches details of a specific FCM token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. - HTTP Method: `GET` - Endpoint: `/channels/mobile_push/fcm/tokens/{token_id}` @@ -632,15 +636,15 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val response: FcmToken = magicbellUserClient.channels.getMobilePushFcmToken("token_id"); + val response: FcmToken = magicbellUserClient.channels.fetchFcmToken("token_id"); println(response); } ``` -## discardMobilePushFcmToken +## deleteFcmToken -Revokes one of the authenticated user's mobile_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. +Deletes one of the authenticated user's FCM tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. - HTTP Method: `DELETE` - Endpoint: `/channels/mobile_push/fcm/tokens/{token_id}` @@ -669,24 +673,196 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val response: DiscardResult = magicbellUserClient.channels.discardMobilePushFcmToken("token_id"); + val response: DiscardResult = magicbellUserClient.channels.deleteFcmToken("token_id"); + + println(response); +} +``` + +## listMagicbellSlackbotTokens + +Lists all MagicBell SlackBot tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. + +- HTTP Method: `GET` +- Endpoint: `/channels/slack/magicbell_slackbot/tokens` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------------------------------ | :------- | :------------------------ | +| requestParameters | [ListMagicbellSlackbotTokensParameters](../models/ListMagicbellSlackbotTokensParameters.md) | ❌ | Request Parameters Object | + +**Return Type** + +`SlackTokenCollection` + +**Example Usage Code Snippet** + +```kotlin +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.ListMagicbellSlackbotTokensParameters; +import com.magicbell.magicbelluserclient.models.SlackTokenCollection; + +fun main() { + val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() + .accessToken("YOUR_ACCESS_TOKEN") + .build(); + + val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); + + val requestParameters: ListMagicbellSlackbotTokensParameters = ListMagicbellSlackbotTokensParameters.builder() + .limit(7L) + .startingAfter("starting_after") + .endingBefore("ending_before") + .build(); + + val response: SlackTokenCollection = magicbellUserClient.channels.listMagicbellSlackbotTokens(requestParameters); + + println(response); +} +``` + +## saveMagicbellSlackbotToken + +Saves the MagicBell SlackBot token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. + +- HTTP Method: `PUT` +- Endpoint: `/channels/slack/magicbell_slackbot/tokens` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------- | :------- | :----------- | +| slackTokenPayload | [SlackTokenPayload](../models/SlackTokenPayload.md) | ❌ | Request Body | + +**Return Type** + +`SlackTokenPayload` + +**Example Usage Code Snippet** + +```kotlin +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.SlackTokenPayload; +import com.magicbell.magicbelluserclient.models.SlackTokenPayloadOauth; +import com.magicbell.magicbelluserclient.models.SlackTokenPayloadWebhook; + +fun main() { + val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() + .accessToken("YOUR_ACCESS_TOKEN") + .build(); + + val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); + + val slackTokenPayloadOauth: SlackTokenPayloadOauth = SlackTokenPayloadOauth.builder() + .channelId("channel_id") + .installationId("installation_id") + .scope("scope") + .build(); + + val slackTokenPayloadWebhook: SlackTokenPayloadWebhook = SlackTokenPayloadWebhook.builder() + .url("url") + .build(); + + val slackTokenPayload: SlackTokenPayload = SlackTokenPayload.builder() + .oauth(slackTokenPayloadOauth) + .webhook(slackTokenPayloadWebhook) + .build(); + + val response: SlackTokenPayload = magicbellUserClient.channels.saveMagicbellSlackbotToken(slackTokenPayload); + + println(response); +} +``` + +## fetchMagicbellSlackbotToken + +Fetches details of a specific MagicBell SlackBot token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. + +- HTTP Method: `GET` +- Endpoint: `/channels/slack/magicbell_slackbot/tokens/{token_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :------ | :----- | :------- | :---------- | +| tokenId | String | ✅ | | + +**Return Type** + +`SlackToken` + +**Example Usage Code Snippet** + +```kotlin +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.SlackToken; + +fun main() { + val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() + .accessToken("YOUR_ACCESS_TOKEN") + .build(); + + val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); + + val response: SlackToken = magicbellUserClient.channels.fetchMagicbellSlackbotToken("token_id"); + + println(response); +} +``` + +## deleteMagicbellSlackbotToken + +Deletes one of the authenticated user's MagicBell SlackBot tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. + +- HTTP Method: `DELETE` +- Endpoint: `/channels/slack/magicbell_slackbot/tokens/{token_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :------ | :----- | :------- | :---------- | +| tokenId | String | ✅ | | + +**Return Type** + +`DiscardResult` + +**Example Usage Code Snippet** + +```kotlin +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.DiscardResult; + +fun main() { + val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() + .accessToken("YOUR_ACCESS_TOKEN") + .build(); + + val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); + + val response: DiscardResult = magicbellUserClient.channels.deleteMagicbellSlackbotToken("token_id"); println(response); } ``` -## getSlackTokens +## listSlackTokens -Lists all slack tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. +Lists all Slack tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - HTTP Method: `GET` - Endpoint: `/channels/slack/tokens` **Parameters** -| Name | Type | Required | Description | -| :---------------- | :---------------------------------------------------------------- | :------- | :------------------------ | -| requestParameters | [GetSlackTokensParameters](../models/GetSlackTokensParameters.md) | ❌ | Request Parameters Object | +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------ | :------- | :------------------------ | +| requestParameters | [ListSlackTokensParameters](../models/ListSlackTokensParameters.md) | ❌ | Request Parameters Object | **Return Type** @@ -697,7 +873,7 @@ Lists all slack tokens belonging to the authenticated user. Returns a paginated ```kotlin import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; -import com.magicbell.magicbelluserclient.models.GetSlackTokensParameters; +import com.magicbell.magicbelluserclient.models.ListSlackTokensParameters; import com.magicbell.magicbelluserclient.models.SlackTokenCollection; fun main() { @@ -707,13 +883,13 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val requestParameters: GetSlackTokensParameters = GetSlackTokensParameters.builder() + val requestParameters: ListSlackTokensParameters = ListSlackTokensParameters.builder() .limit(2L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); - val response: SlackTokenCollection = magicbellUserClient.channels.getSlackTokens(requestParameters); + val response: SlackTokenCollection = magicbellUserClient.channels.listSlackTokens(requestParameters); println(response); } @@ -721,9 +897,9 @@ fun main() { ## saveSlackToken -Saves a slack token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. +Saves the Slack token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. -- HTTP Method: `POST` +- HTTP Method: `PUT` - Endpoint: `/channels/slack/tokens` **Parameters** @@ -773,9 +949,9 @@ fun main() { } ``` -## getSlackToken +## fetchSlackToken -Retrieves details of a specific slack token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. +Fetches details of a specific Slack token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. - HTTP Method: `GET` - Endpoint: `/channels/slack/tokens/{token_id}` @@ -804,15 +980,15 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val response: SlackToken = magicbellUserClient.channels.getSlackToken("token_id"); + val response: SlackToken = magicbellUserClient.channels.fetchSlackToken("token_id"); println(response); } ``` -## discardSlackToken +## deleteSlackToken -Revokes one of the authenticated user's slack tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. +Deletes one of the authenticated user's Slack tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. - HTTP Method: `DELETE` - Endpoint: `/channels/slack/tokens/{token_id}` @@ -841,24 +1017,24 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val response: DiscardResult = magicbellUserClient.channels.discardSlackToken("token_id"); + val response: DiscardResult = magicbellUserClient.channels.deleteSlackToken("token_id"); println(response); } ``` -## getTeamsTokens +## listTeamsTokens -Lists all teams tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. +Lists all Teams tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - HTTP Method: `GET` - Endpoint: `/channels/teams/tokens` **Parameters** -| Name | Type | Required | Description | -| :---------------- | :---------------------------------------------------------------- | :------- | :------------------------ | -| requestParameters | [GetTeamsTokensParameters](../models/GetTeamsTokensParameters.md) | ❌ | Request Parameters Object | +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------ | :------- | :------------------------ | +| requestParameters | [ListTeamsTokensParameters](../models/ListTeamsTokensParameters.md) | ❌ | Request Parameters Object | **Return Type** @@ -869,7 +1045,7 @@ Lists all teams tokens belonging to the authenticated user. Returns a paginated ```kotlin import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; -import com.magicbell.magicbelluserclient.models.GetTeamsTokensParameters; +import com.magicbell.magicbelluserclient.models.ListTeamsTokensParameters; import com.magicbell.magicbelluserclient.models.TeamsTokenCollection; fun main() { @@ -879,13 +1055,13 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val requestParameters: GetTeamsTokensParameters = GetTeamsTokensParameters.builder() - .limit(5L) + val requestParameters: ListTeamsTokensParameters = ListTeamsTokensParameters.builder() + .limit(4L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); - val response: TeamsTokenCollection = magicbellUserClient.channels.getTeamsTokens(requestParameters); + val response: TeamsTokenCollection = magicbellUserClient.channels.listTeamsTokens(requestParameters); println(response); } @@ -893,9 +1069,9 @@ fun main() { ## saveTeamsToken -Saves a teams token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. +Saves the Teams token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. -- HTTP Method: `POST` +- HTTP Method: `PUT` - Endpoint: `/channels/teams/tokens` **Parameters** @@ -937,9 +1113,9 @@ fun main() { } ``` -## getTeamsToken +## fetchTeamsToken -Retrieves details of a specific teams token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. +Fetches details of a specific Teams token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. - HTTP Method: `GET` - Endpoint: `/channels/teams/tokens/{token_id}` @@ -968,15 +1144,15 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val response: TeamsToken = magicbellUserClient.channels.getTeamsToken("token_id"); + val response: TeamsToken = magicbellUserClient.channels.fetchTeamsToken("token_id"); println(response); } ``` -## discardTeamsToken +## deleteTeamsToken -Revokes one of the authenticated user's teams tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. +Deletes one of the authenticated user's Teams tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. - HTTP Method: `DELETE` - Endpoint: `/channels/teams/tokens/{token_id}` @@ -1005,24 +1181,109 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val response: DiscardResult = magicbellUserClient.channels.discardTeamsToken("token_id"); + val response: DiscardResult = magicbellUserClient.channels.deleteTeamsToken("token_id"); + + println(response); +} +``` + +## fetchUserPreferences + +Fetch a user's channel delivery preferences. + +- HTTP Method: `GET` +- Endpoint: `/channels/user_preferences` + +**Return Type** + +`UserPreferences` + +**Example Usage Code Snippet** + +```kotlin +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.UserPreferences; + +fun main() { + val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() + .accessToken("YOUR_ACCESS_TOKEN") + .build(); + + val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); + + val response: UserPreferences = magicbellUserClient.channels.fetchUserPreferences(); println(response); } ``` -## getWebPushTokens +## saveUserPreferences + +Save a user's channel preferences. + +- HTTP Method: `PUT` +- Endpoint: `/channels/user_preferences` + +**Parameters** + +| Name | Type | Required | Description | +| :-------------- | :---------------------------------------------- | :------- | :----------- | +| userPreferences | [UserPreferences](../models/UserPreferences.md) | ❌ | Request Body | + +**Example Usage Code Snippet** + +```kotlin +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.Categories; +import com.magicbell.magicbelluserclient.models.Channels; +import com.magicbell.magicbelluserclient.models.UserPreferences; +import java.util.Arrays; +import java.util.List; + +fun main() { + val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() + .accessToken("YOUR_ACCESS_TOKEN") + .build(); + + val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); + + val channels: Channels = Channels.builder() + .enabled(true) + .name("name") + .build(); + + val channels: List = Arrays.asList(channels); + + val categories: Categories = Categories.builder() + .channels(channels) + .key("key") + .label("label") + .build(); + + val categories: List = Arrays.asList(categories); + + val userPreferences: UserPreferences = UserPreferences.builder() + .categories(categories) + .build(); + + magicbellUserClient.channels.saveUserPreferences(userPreferences); +} +``` + +## listWebPushTokens -Lists all web_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. +Lists all Web Push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - HTTP Method: `GET` - Endpoint: `/channels/web_push/tokens` **Parameters** -| Name | Type | Required | Description | -| :---------------- | :-------------------------------------------------------------------- | :------- | :------------------------ | -| requestParameters | [GetWebPushTokensParameters](../models/GetWebPushTokensParameters.md) | ❌ | Request Parameters Object | +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [ListWebPushTokensParameters](../models/ListWebPushTokensParameters.md) | ❌ | Request Parameters Object | **Return Type** @@ -1033,7 +1294,7 @@ Lists all web_push tokens belonging to the authenticated user. Returns a paginat ```kotlin import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; -import com.magicbell.magicbelluserclient.models.GetWebPushTokensParameters; +import com.magicbell.magicbelluserclient.models.ListWebPushTokensParameters; import com.magicbell.magicbelluserclient.models.WebPushTokenCollection; fun main() { @@ -1043,13 +1304,13 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val requestParameters: GetWebPushTokensParameters = GetWebPushTokensParameters.builder() - .limit(3L) + val requestParameters: ListWebPushTokensParameters = ListWebPushTokensParameters.builder() + .limit(9L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); - val response: WebPushTokenCollection = magicbellUserClient.channels.getWebPushTokens(requestParameters); + val response: WebPushTokenCollection = magicbellUserClient.channels.listWebPushTokens(requestParameters); println(response); } @@ -1057,9 +1318,9 @@ fun main() { ## saveWebPushToken -Saves a web_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. +Saves the Web Push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. -- HTTP Method: `POST` +- HTTP Method: `PUT` - Endpoint: `/channels/web_push/tokens` **Parameters** @@ -1103,9 +1364,9 @@ fun main() { } ``` -## getWebPushToken +## fetchWebPushToken -Retrieves details of a specific web_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. +Fetches details of a specific Web Push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. - HTTP Method: `GET` - Endpoint: `/channels/web_push/tokens/{token_id}` @@ -1134,15 +1395,15 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val response: WebPushToken = magicbellUserClient.channels.getWebPushToken("token_id"); + val response: WebPushToken = magicbellUserClient.channels.fetchWebPushToken("token_id"); println(response); } ``` -## discardWebPushToken +## deleteWebPushToken -Revokes one of the authenticated user's web_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. +Deletes one of the authenticated user's Web Push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. - HTTP Method: `DELETE` - Endpoint: `/channels/web_push/tokens/{token_id}` @@ -1171,7 +1432,7 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val response: DiscardResult = magicbellUserClient.channels.discardWebPushToken("token_id"); + val response: DiscardResult = magicbellUserClient.channels.deleteWebPushToken("token_id"); println(response); } diff --git a/documentation/services/ChannelsService.md b/documentation/services/ChannelsService.md index e0b6e51..c198326 100644 --- a/documentation/services/ChannelsService.md +++ b/documentation/services/ChannelsService.md @@ -2,49 +2,55 @@ A list of all methods in the `ChannelsService` service. Click on the method name to view detailed information about that method. -| Methods | Description | -| :-------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [getInAppInboxTokens](#getinappinboxtokens) | Lists all in_app tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | -| [saveInAppInboxToken](#saveinappinboxtoken) | Saves a in_app token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | -| [getInAppInboxToken](#getinappinboxtoken) | Retrieves details of a specific in_app token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | -| [discardInAppInboxToken](#discardinappinboxtoken) | Revokes one of the authenticated user's in_app tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | -| [getMobilePushApnsTokens](#getmobilepushapnstokens) | Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | -| [saveMobilePushApnsToken](#savemobilepushapnstoken) | Saves a mobile_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | -| [getMobilePushApnsToken](#getmobilepushapnstoken) | Retrieves details of a specific mobile_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | -| [discardMobilePushApnsToken](#discardmobilepushapnstoken) | Revokes one of the authenticated user's mobile_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | -| [getMobilePushExpoTokens](#getmobilepushexpotokens) | Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | -| [saveMobilePushExpoToken](#savemobilepushexpotoken) | Saves a mobile_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | -| [getMobilePushExpoToken](#getmobilepushexpotoken) | Retrieves details of a specific mobile_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | -| [discardMobilePushExpoToken](#discardmobilepushexpotoken) | Revokes one of the authenticated user's mobile_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | -| [getMobilePushFcmTokens](#getmobilepushfcmtokens) | Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | -| [saveMobilePushFcmToken](#savemobilepushfcmtoken) | Saves a mobile_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | -| [getMobilePushFcmToken](#getmobilepushfcmtoken) | Retrieves details of a specific mobile_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | -| [discardMobilePushFcmToken](#discardmobilepushfcmtoken) | Revokes one of the authenticated user's mobile_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | -| [getSlackTokens](#getslacktokens) | Lists all slack tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | -| [saveSlackToken](#saveslacktoken) | Saves a slack token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | -| [getSlackToken](#getslacktoken) | Retrieves details of a specific slack token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | -| [discardSlackToken](#discardslacktoken) | Revokes one of the authenticated user's slack tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | -| [getTeamsTokens](#getteamstokens) | Lists all teams tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | -| [saveTeamsToken](#saveteamstoken) | Saves a teams token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | -| [getTeamsToken](#getteamstoken) | Retrieves details of a specific teams token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | -| [discardTeamsToken](#discardteamstoken) | Revokes one of the authenticated user's teams tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | -| [getWebPushTokens](#getwebpushtokens) | Lists all web_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | -| [saveWebPushToken](#savewebpushtoken) | Saves a web_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | -| [getWebPushToken](#getwebpushtoken) | Retrieves details of a specific web_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | -| [discardWebPushToken](#discardwebpushtoken) | Revokes one of the authenticated user's web_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | - -## getInAppInboxTokens - -Lists all in_app tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. +| Methods | Description | +| :------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [listInboxTokens](#listinboxtokens) | Lists all Inbox tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | +| [saveInboxToken](#saveinboxtoken) | Saves the Inbox token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | +| [fetchInboxToken](#fetchinboxtoken) | Fetches details of a specific Inbox token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | +| [deleteInboxToken](#deleteinboxtoken) | Deletes one of the authenticated user's Inbox tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | +| [listApnsTokens](#listapnstokens) | Lists all APNs tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | +| [saveApnsToken](#saveapnstoken) | Saves the APNs token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | +| [fetchApnsToken](#fetchapnstoken) | Fetches details of a specific APNs token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | +| [deleteApnsToken](#deleteapnstoken) | Deletes one of the authenticated user's APNs tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | +| [listExpoTokens](#listexpotokens) | Lists all Expo tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | +| [saveExpoToken](#saveexpotoken) | Saves the Expo token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | +| [fetchExpoToken](#fetchexpotoken) | Fetches details of a specific Expo token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | +| [deleteExpoToken](#deleteexpotoken) | Deletes one of the authenticated user's Expo tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | +| [listFcmTokens](#listfcmtokens) | Lists all FCM tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | +| [saveFcmToken](#savefcmtoken) | Saves the FCM token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | +| [fetchFcmToken](#fetchfcmtoken) | Fetches details of a specific FCM token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | +| [deleteFcmToken](#deletefcmtoken) | Deletes one of the authenticated user's FCM tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | +| [listMagicbellSlackbotTokens](#listmagicbellslackbottokens) | Lists all MagicBell SlackBot tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | +| [saveMagicbellSlackbotToken](#savemagicbellslackbottoken) | Saves the MagicBell SlackBot token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | +| [fetchMagicbellSlackbotToken](#fetchmagicbellslackbottoken) | Fetches details of a specific MagicBell SlackBot token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | +| [deleteMagicbellSlackbotToken](#deletemagicbellslackbottoken) | Deletes one of the authenticated user's MagicBell SlackBot tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | +| [listSlackTokens](#listslacktokens) | Lists all Slack tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | +| [saveSlackToken](#saveslacktoken) | Saves the Slack token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | +| [fetchSlackToken](#fetchslacktoken) | Fetches details of a specific Slack token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | +| [deleteSlackToken](#deleteslacktoken) | Deletes one of the authenticated user's Slack tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | +| [listTeamsTokens](#listteamstokens) | Lists all Teams tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | +| [saveTeamsToken](#saveteamstoken) | Saves the Teams token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | +| [fetchTeamsToken](#fetchteamstoken) | Fetches details of a specific Teams token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | +| [deleteTeamsToken](#deleteteamstoken) | Deletes one of the authenticated user's Teams tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | +| [fetchUserPreferences](#fetchuserpreferences) | Fetch a user's channel delivery preferences. | +| [saveUserPreferences](#saveuserpreferences) | Save a user's channel preferences. | +| [listWebPushTokens](#listwebpushtokens) | Lists all Web Push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. | +| [saveWebPushToken](#savewebpushtoken) | Saves the Web Push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. | +| [fetchWebPushToken](#fetchwebpushtoken) | Fetches details of a specific Web Push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. | +| [deleteWebPushToken](#deletewebpushtoken) | Deletes one of the authenticated user's Web Push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. | + +## listInboxTokens + +Lists all Inbox tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - HTTP Method: `GET` - Endpoint: `/channels/in_app/inbox/tokens` **Parameters** -| Name | Type | Required | Description | -| :---------------- | :-------------------------------------------------------------------------- | :------- | :------------------------ | -| requestParameters | [GetInAppInboxTokensParameters](../models/GetInAppInboxTokensParameters.md) | ❌ | Request Parameters Object | +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------ | :------- | :------------------------ | +| requestParameters | [ListInboxTokensParameters](../models/ListInboxTokensParameters.md) | ❌ | Request Parameters Object | **Return Type** @@ -55,8 +61,8 @@ Lists all in_app tokens belonging to the authenticated user. Returns a paginated ```java import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; -import com.magicbell.magicbelluserclient.models.GetInAppInboxTokensParameters; import com.magicbell.magicbelluserclient.models.InboxTokenResponseCollection; +import com.magicbell.magicbelluserclient.models.ListInboxTokensParameters; public class Main { @@ -65,13 +71,13 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - GetInAppInboxTokensParameters requestParameters = GetInAppInboxTokensParameters.builder() - .limit(10L) + ListInboxTokensParameters requestParameters = ListInboxTokensParameters.builder() + .limit(8L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); - InboxTokenResponseCollection response = magicbellUserClient.channels.getInAppInboxTokens(requestParameters); + InboxTokenResponseCollection response = magicbellUserClient.channels.listInboxTokens(requestParameters); System.out.println(response); } @@ -79,11 +85,11 @@ public class Main { ``` -## saveInAppInboxToken +## saveInboxToken -Saves a in_app token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. +Saves the Inbox token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. -- HTTP Method: `POST` +- HTTP Method: `PUT` - Endpoint: `/channels/in_app/inbox/tokens` **Parameters** @@ -110,9 +116,9 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - InboxToken inboxToken = InboxToken.builder().connectionId("connection_id").token("in exeu esse co").build(); + InboxToken inboxToken = InboxToken.builder().connectionId("connection_id").token("ipsum nulla mag").build(); - InboxToken response = magicbellUserClient.channels.saveInAppInboxToken(inboxToken); + InboxToken response = magicbellUserClient.channels.saveInboxToken(inboxToken); System.out.println(response); } @@ -120,9 +126,9 @@ public class Main { ``` -## getInAppInboxToken +## fetchInboxToken -Retrieves details of a specific in_app token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. +Fetches details of a specific Inbox token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. - HTTP Method: `GET` - Endpoint: `/channels/in_app/inbox/tokens/{token_id}` @@ -151,7 +157,7 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - InboxTokenResponse response = magicbellUserClient.channels.getInAppInboxToken("token_id"); + InboxTokenResponse response = magicbellUserClient.channels.fetchInboxToken("token_id"); System.out.println(response); } @@ -159,9 +165,9 @@ public class Main { ``` -## discardInAppInboxToken +## deleteInboxToken -Revokes one of the authenticated user's in_app tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. +Deletes one of the authenticated user's Inbox tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. - HTTP Method: `DELETE` - Endpoint: `/channels/in_app/inbox/tokens/{token_id}` @@ -190,7 +196,7 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - DiscardResult response = magicbellUserClient.channels.discardInAppInboxToken("token_id"); + DiscardResult response = magicbellUserClient.channels.deleteInboxToken("token_id"); System.out.println(response); } @@ -198,18 +204,18 @@ public class Main { ``` -## getMobilePushApnsTokens +## listApnsTokens -Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. +Lists all APNs tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - HTTP Method: `GET` - Endpoint: `/channels/mobile_push/apns/tokens` **Parameters** -| Name | Type | Required | Description | -| :---------------- | :---------------------------------------------------------------------------------- | :------- | :------------------------ | -| requestParameters | [GetMobilePushApnsTokensParameters](../models/GetMobilePushApnsTokensParameters.md) | ❌ | Request Parameters Object | +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [ListApnsTokensParameters](../models/ListApnsTokensParameters.md) | ❌ | Request Parameters Object | **Return Type** @@ -221,7 +227,7 @@ Lists all mobile_push tokens belonging to the authenticated user. Returns a pagi import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; import com.magicbell.magicbelluserclient.models.ApnsTokenCollection; -import com.magicbell.magicbelluserclient.models.GetMobilePushApnsTokensParameters; +import com.magicbell.magicbelluserclient.models.ListApnsTokensParameters; public class Main { @@ -230,13 +236,13 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - GetMobilePushApnsTokensParameters requestParameters = GetMobilePushApnsTokensParameters.builder() - .limit(3L) + ListApnsTokensParameters requestParameters = ListApnsTokensParameters.builder() + .limit(7L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); - ApnsTokenCollection response = magicbellUserClient.channels.getMobilePushApnsTokens(requestParameters); + ApnsTokenCollection response = magicbellUserClient.channels.listApnsTokens(requestParameters); System.out.println(response); } @@ -244,11 +250,11 @@ public class Main { ``` -## saveMobilePushApnsToken +## saveApnsToken -Saves a mobile_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. +Saves the APNs token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. -- HTTP Method: `POST` +- HTTP Method: `PUT` - Endpoint: `/channels/mobile_push/apns/tokens` **Parameters** @@ -278,11 +284,11 @@ public class Main { ApnsTokenPayload apnsTokenPayload = ApnsTokenPayload.builder() .appId("app_id") - .deviceToken("doloresed quis ") + .deviceToken("sit culpa incid") .installationId(ApnsTokenPayloadInstallationId.DEVELOPMENT) .build(); - ApnsTokenPayload response = magicbellUserClient.channels.saveMobilePushApnsToken(apnsTokenPayload); + ApnsTokenPayload response = magicbellUserClient.channels.saveApnsToken(apnsTokenPayload); System.out.println(response); } @@ -290,9 +296,9 @@ public class Main { ``` -## getMobilePushApnsToken +## fetchApnsToken -Retrieves details of a specific mobile_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. +Fetches details of a specific APNs token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. - HTTP Method: `GET` - Endpoint: `/channels/mobile_push/apns/tokens/{token_id}` @@ -321,7 +327,7 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - ApnsToken response = magicbellUserClient.channels.getMobilePushApnsToken("token_id"); + ApnsToken response = magicbellUserClient.channels.fetchApnsToken("token_id"); System.out.println(response); } @@ -329,9 +335,9 @@ public class Main { ``` -## discardMobilePushApnsToken +## deleteApnsToken -Revokes one of the authenticated user's mobile_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. +Deletes one of the authenticated user's APNs tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. - HTTP Method: `DELETE` - Endpoint: `/channels/mobile_push/apns/tokens/{token_id}` @@ -360,7 +366,7 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - DiscardResult response = magicbellUserClient.channels.discardMobilePushApnsToken("token_id"); + DiscardResult response = magicbellUserClient.channels.deleteApnsToken("token_id"); System.out.println(response); } @@ -368,18 +374,18 @@ public class Main { ``` -## getMobilePushExpoTokens +## listExpoTokens -Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. +Lists all Expo tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - HTTP Method: `GET` - Endpoint: `/channels/mobile_push/expo/tokens` **Parameters** -| Name | Type | Required | Description | -| :---------------- | :---------------------------------------------------------------------------------- | :------- | :------------------------ | -| requestParameters | [GetMobilePushExpoTokensParameters](../models/GetMobilePushExpoTokensParameters.md) | ❌ | Request Parameters Object | +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [ListExpoTokensParameters](../models/ListExpoTokensParameters.md) | ❌ | Request Parameters Object | **Return Type** @@ -391,7 +397,7 @@ Lists all mobile_push tokens belonging to the authenticated user. Returns a pagi import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; import com.magicbell.magicbelluserclient.models.ExpoTokenCollection; -import com.magicbell.magicbelluserclient.models.GetMobilePushExpoTokensParameters; +import com.magicbell.magicbelluserclient.models.ListExpoTokensParameters; public class Main { @@ -400,13 +406,13 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - GetMobilePushExpoTokensParameters requestParameters = GetMobilePushExpoTokensParameters.builder() - .limit(9L) + ListExpoTokensParameters requestParameters = ListExpoTokensParameters.builder() + .limit(8L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); - ExpoTokenCollection response = magicbellUserClient.channels.getMobilePushExpoTokens(requestParameters); + ExpoTokenCollection response = magicbellUserClient.channels.listExpoTokens(requestParameters); System.out.println(response); } @@ -414,11 +420,11 @@ public class Main { ``` -## saveMobilePushExpoToken +## saveExpoToken -Saves a mobile_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. +Saves the Expo token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. -- HTTP Method: `POST` +- HTTP Method: `PUT` - Endpoint: `/channels/mobile_push/expo/tokens` **Parameters** @@ -447,7 +453,7 @@ public class Main { ExpoTokenPayload expoTokenPayload = ExpoTokenPayload.builder().deviceToken("device_token").build(); - ExpoTokenPayload response = magicbellUserClient.channels.saveMobilePushExpoToken(expoTokenPayload); + ExpoTokenPayload response = magicbellUserClient.channels.saveExpoToken(expoTokenPayload); System.out.println(response); } @@ -455,9 +461,9 @@ public class Main { ``` -## getMobilePushExpoToken +## fetchExpoToken -Retrieves details of a specific mobile_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. +Fetches details of a specific Expo token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. - HTTP Method: `GET` - Endpoint: `/channels/mobile_push/expo/tokens/{token_id}` @@ -486,7 +492,7 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - ExpoToken response = magicbellUserClient.channels.getMobilePushExpoToken("token_id"); + ExpoToken response = magicbellUserClient.channels.fetchExpoToken("token_id"); System.out.println(response); } @@ -494,9 +500,9 @@ public class Main { ``` -## discardMobilePushExpoToken +## deleteExpoToken -Revokes one of the authenticated user's mobile_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. +Deletes one of the authenticated user's Expo tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. - HTTP Method: `DELETE` - Endpoint: `/channels/mobile_push/expo/tokens/{token_id}` @@ -525,7 +531,7 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - DiscardResult response = magicbellUserClient.channels.discardMobilePushExpoToken("token_id"); + DiscardResult response = magicbellUserClient.channels.deleteExpoToken("token_id"); System.out.println(response); } @@ -533,18 +539,18 @@ public class Main { ``` -## getMobilePushFcmTokens +## listFcmTokens -Lists all mobile_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. +Lists all FCM tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - HTTP Method: `GET` - Endpoint: `/channels/mobile_push/fcm/tokens` **Parameters** -| Name | Type | Required | Description | -| :---------------- | :-------------------------------------------------------------------------------- | :------- | :------------------------ | -| requestParameters | [GetMobilePushFcmTokensParameters](../models/GetMobilePushFcmTokensParameters.md) | ❌ | Request Parameters Object | +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [ListFcmTokensParameters](../models/ListFcmTokensParameters.md) | ❌ | Request Parameters Object | **Return Type** @@ -556,7 +562,7 @@ Lists all mobile_push tokens belonging to the authenticated user. Returns a pagi import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; import com.magicbell.magicbelluserclient.models.FcmTokenCollection; -import com.magicbell.magicbelluserclient.models.GetMobilePushFcmTokensParameters; +import com.magicbell.magicbelluserclient.models.ListFcmTokensParameters; public class Main { @@ -565,13 +571,13 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - GetMobilePushFcmTokensParameters requestParameters = GetMobilePushFcmTokensParameters.builder() + ListFcmTokensParameters requestParameters = ListFcmTokensParameters.builder() .limit(6L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); - FcmTokenCollection response = magicbellUserClient.channels.getMobilePushFcmTokens(requestParameters); + FcmTokenCollection response = magicbellUserClient.channels.listFcmTokens(requestParameters); System.out.println(response); } @@ -579,11 +585,11 @@ public class Main { ``` -## saveMobilePushFcmToken +## saveFcmToken -Saves a mobile_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. +Saves the FCM token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. -- HTTP Method: `POST` +- HTTP Method: `PUT` - Endpoint: `/channels/mobile_push/fcm/tokens` **Parameters** @@ -602,7 +608,6 @@ Saves a mobile_push token for the authenticated user. This token serves as a cre import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; import com.magicbell.magicbelluserclient.models.FcmTokenPayload; -import com.magicbell.magicbelluserclient.models.FcmTokenPayloadInstallationId; public class Main { @@ -611,12 +616,9 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - FcmTokenPayload fcmTokenPayload = FcmTokenPayload.builder() - .deviceToken("in commodo quis") - .installationId(FcmTokenPayloadInstallationId.DEVELOPMENT) - .build(); + FcmTokenPayload fcmTokenPayload = FcmTokenPayload.builder().deviceToken("estminim adipis").build(); - FcmTokenPayload response = magicbellUserClient.channels.saveMobilePushFcmToken(fcmTokenPayload); + FcmTokenPayload response = magicbellUserClient.channels.saveFcmToken(fcmTokenPayload); System.out.println(response); } @@ -624,9 +626,9 @@ public class Main { ``` -## getMobilePushFcmToken +## fetchFcmToken -Retrieves details of a specific mobile_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. +Fetches details of a specific FCM token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. - HTTP Method: `GET` - Endpoint: `/channels/mobile_push/fcm/tokens/{token_id}` @@ -655,7 +657,7 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - FcmToken response = magicbellUserClient.channels.getMobilePushFcmToken("token_id"); + FcmToken response = magicbellUserClient.channels.fetchFcmToken("token_id"); System.out.println(response); } @@ -663,9 +665,9 @@ public class Main { ``` -## discardMobilePushFcmToken +## deleteFcmToken -Revokes one of the authenticated user's mobile_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. +Deletes one of the authenticated user's FCM tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. - HTTP Method: `DELETE` - Endpoint: `/channels/mobile_push/fcm/tokens/{token_id}` @@ -694,7 +696,185 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - DiscardResult response = magicbellUserClient.channels.discardMobilePushFcmToken("token_id"); + DiscardResult response = magicbellUserClient.channels.deleteFcmToken("token_id"); + + System.out.println(response); + } +} + +``` + +## listMagicbellSlackbotTokens + +Lists all MagicBell SlackBot tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. + +- HTTP Method: `GET` +- Endpoint: `/channels/slack/magicbell_slackbot/tokens` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------------------------------ | :------- | :------------------------ | +| requestParameters | [ListMagicbellSlackbotTokensParameters](../models/ListMagicbellSlackbotTokensParameters.md) | ❌ | Request Parameters Object | + +**Return Type** + +`SlackTokenCollection` + +**Example Usage Code Snippet** + +```java +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.ListMagicbellSlackbotTokensParameters; +import com.magicbell.magicbelluserclient.models.SlackTokenCollection; + +public class Main { + + public static void main(String[] args) { + MagicbellUserClientConfig config = MagicbellUserClientConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); + + ListMagicbellSlackbotTokensParameters requestParameters = ListMagicbellSlackbotTokensParameters.builder() + .limit(7L) + .startingAfter("starting_after") + .endingBefore("ending_before") + .build(); + + SlackTokenCollection response = magicbellUserClient.channels.listMagicbellSlackbotTokens(requestParameters); + + System.out.println(response); + } +} + +``` + +## saveMagicbellSlackbotToken + +Saves the MagicBell SlackBot token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. + +- HTTP Method: `PUT` +- Endpoint: `/channels/slack/magicbell_slackbot/tokens` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------- | :------- | :----------- | +| slackTokenPayload | [SlackTokenPayload](../models/SlackTokenPayload.md) | ❌ | Request Body | + +**Return Type** + +`SlackTokenPayload` + +**Example Usage Code Snippet** + +```java +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.SlackTokenPayload; +import com.magicbell.magicbelluserclient.models.SlackTokenPayloadOauth; +import com.magicbell.magicbelluserclient.models.SlackTokenPayloadWebhook; + +public class Main { + + public static void main(String[] args) { + MagicbellUserClientConfig config = MagicbellUserClientConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); + + SlackTokenPayloadOauth slackTokenPayloadOauth = SlackTokenPayloadOauth.builder() + .channelId("channel_id") + .installationId("installation_id") + .scope("scope") + .build(); + + SlackTokenPayloadWebhook slackTokenPayloadWebhook = SlackTokenPayloadWebhook.builder().url("url").build(); + + SlackTokenPayload slackTokenPayload = SlackTokenPayload.builder() + .oauth(slackTokenPayloadOauth) + .webhook(slackTokenPayloadWebhook) + .build(); + + SlackTokenPayload response = magicbellUserClient.channels.saveMagicbellSlackbotToken(slackTokenPayload); + + System.out.println(response); + } +} + +``` + +## fetchMagicbellSlackbotToken + +Fetches details of a specific MagicBell SlackBot token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. + +- HTTP Method: `GET` +- Endpoint: `/channels/slack/magicbell_slackbot/tokens/{token_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :------ | :----- | :------- | :---------- | +| tokenId | String | ✅ | | + +**Return Type** + +`SlackToken` + +**Example Usage Code Snippet** + +```java +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.SlackToken; + +public class Main { + + public static void main(String[] args) { + MagicbellUserClientConfig config = MagicbellUserClientConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); + + SlackToken response = magicbellUserClient.channels.fetchMagicbellSlackbotToken("token_id"); + + System.out.println(response); + } +} + +``` + +## deleteMagicbellSlackbotToken + +Deletes one of the authenticated user's MagicBell SlackBot tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. + +- HTTP Method: `DELETE` +- Endpoint: `/channels/slack/magicbell_slackbot/tokens/{token_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :------ | :----- | :------- | :---------- | +| tokenId | String | ✅ | | + +**Return Type** + +`DiscardResult` + +**Example Usage Code Snippet** + +```java +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.DiscardResult; + +public class Main { + + public static void main(String[] args) { + MagicbellUserClientConfig config = MagicbellUserClientConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); + + DiscardResult response = magicbellUserClient.channels.deleteMagicbellSlackbotToken("token_id"); System.out.println(response); } @@ -702,18 +882,18 @@ public class Main { ``` -## getSlackTokens +## listSlackTokens -Lists all slack tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. +Lists all Slack tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - HTTP Method: `GET` - Endpoint: `/channels/slack/tokens` **Parameters** -| Name | Type | Required | Description | -| :---------------- | :---------------------------------------------------------------- | :------- | :------------------------ | -| requestParameters | [GetSlackTokensParameters](../models/GetSlackTokensParameters.md) | ❌ | Request Parameters Object | +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------ | :------- | :------------------------ | +| requestParameters | [ListSlackTokensParameters](../models/ListSlackTokensParameters.md) | ❌ | Request Parameters Object | **Return Type** @@ -724,7 +904,7 @@ Lists all slack tokens belonging to the authenticated user. Returns a paginated ```java import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; -import com.magicbell.magicbelluserclient.models.GetSlackTokensParameters; +import com.magicbell.magicbelluserclient.models.ListSlackTokensParameters; import com.magicbell.magicbelluserclient.models.SlackTokenCollection; public class Main { @@ -734,13 +914,13 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - GetSlackTokensParameters requestParameters = GetSlackTokensParameters.builder() + ListSlackTokensParameters requestParameters = ListSlackTokensParameters.builder() .limit(2L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); - SlackTokenCollection response = magicbellUserClient.channels.getSlackTokens(requestParameters); + SlackTokenCollection response = magicbellUserClient.channels.listSlackTokens(requestParameters); System.out.println(response); } @@ -750,9 +930,9 @@ public class Main { ## saveSlackToken -Saves a slack token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. +Saves the Slack token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. -- HTTP Method: `POST` +- HTTP Method: `PUT` - Endpoint: `/channels/slack/tokens` **Parameters** @@ -802,9 +982,9 @@ public class Main { ``` -## getSlackToken +## fetchSlackToken -Retrieves details of a specific slack token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. +Fetches details of a specific Slack token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. - HTTP Method: `GET` - Endpoint: `/channels/slack/tokens/{token_id}` @@ -833,7 +1013,7 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - SlackToken response = magicbellUserClient.channels.getSlackToken("token_id"); + SlackToken response = magicbellUserClient.channels.fetchSlackToken("token_id"); System.out.println(response); } @@ -841,9 +1021,9 @@ public class Main { ``` -## discardSlackToken +## deleteSlackToken -Revokes one of the authenticated user's slack tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. +Deletes one of the authenticated user's Slack tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. - HTTP Method: `DELETE` - Endpoint: `/channels/slack/tokens/{token_id}` @@ -872,7 +1052,7 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - DiscardResult response = magicbellUserClient.channels.discardSlackToken("token_id"); + DiscardResult response = magicbellUserClient.channels.deleteSlackToken("token_id"); System.out.println(response); } @@ -880,18 +1060,18 @@ public class Main { ``` -## getTeamsTokens +## listTeamsTokens -Lists all teams tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. +Lists all Teams tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - HTTP Method: `GET` - Endpoint: `/channels/teams/tokens` **Parameters** -| Name | Type | Required | Description | -| :---------------- | :---------------------------------------------------------------- | :------- | :------------------------ | -| requestParameters | [GetTeamsTokensParameters](../models/GetTeamsTokensParameters.md) | ❌ | Request Parameters Object | +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------ | :------- | :------------------------ | +| requestParameters | [ListTeamsTokensParameters](../models/ListTeamsTokensParameters.md) | ❌ | Request Parameters Object | **Return Type** @@ -902,7 +1082,7 @@ Lists all teams tokens belonging to the authenticated user. Returns a paginated ```java import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; -import com.magicbell.magicbelluserclient.models.GetTeamsTokensParameters; +import com.magicbell.magicbelluserclient.models.ListTeamsTokensParameters; import com.magicbell.magicbelluserclient.models.TeamsTokenCollection; public class Main { @@ -912,13 +1092,13 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - GetTeamsTokensParameters requestParameters = GetTeamsTokensParameters.builder() - .limit(5L) + ListTeamsTokensParameters requestParameters = ListTeamsTokensParameters.builder() + .limit(4L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); - TeamsTokenCollection response = magicbellUserClient.channels.getTeamsTokens(requestParameters); + TeamsTokenCollection response = magicbellUserClient.channels.listTeamsTokens(requestParameters); System.out.println(response); } @@ -928,9 +1108,9 @@ public class Main { ## saveTeamsToken -Saves a teams token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. +Saves the Teams token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. -- HTTP Method: `POST` +- HTTP Method: `PUT` - Endpoint: `/channels/teams/tokens` **Parameters** @@ -970,9 +1150,9 @@ public class Main { ``` -## getTeamsToken +## fetchTeamsToken -Retrieves details of a specific teams token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. +Fetches details of a specific Teams token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. - HTTP Method: `GET` - Endpoint: `/channels/teams/tokens/{token_id}` @@ -1001,7 +1181,7 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - TeamsToken response = magicbellUserClient.channels.getTeamsToken("token_id"); + TeamsToken response = magicbellUserClient.channels.fetchTeamsToken("token_id"); System.out.println(response); } @@ -1009,9 +1189,9 @@ public class Main { ``` -## discardTeamsToken +## deleteTeamsToken -Revokes one of the authenticated user's teams tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. +Deletes one of the authenticated user's Teams tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. - HTTP Method: `DELETE` - Endpoint: `/channels/teams/tokens/{token_id}` @@ -1040,7 +1220,40 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - DiscardResult response = magicbellUserClient.channels.discardTeamsToken("token_id"); + DiscardResult response = magicbellUserClient.channels.deleteTeamsToken("token_id"); + + System.out.println(response); + } +} + +``` + +## fetchUserPreferences + +Fetch a user's channel delivery preferences. + +- HTTP Method: `GET` +- Endpoint: `/channels/user_preferences` + +**Return Type** + +`UserPreferences` + +**Example Usage Code Snippet** + +```java +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.UserPreferences; + +public class Main { + + public static void main(String[] args) { + MagicbellUserClientConfig config = MagicbellUserClientConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); + + UserPreferences response = magicbellUserClient.channels.fetchUserPreferences(); System.out.println(response); } @@ -1048,18 +1261,65 @@ public class Main { ``` -## getWebPushTokens +## saveUserPreferences + +Save a user's channel preferences. + +- HTTP Method: `PUT` +- Endpoint: `/channels/user_preferences` + +**Parameters** + +| Name | Type | Required | Description | +| :-------------- | :---------------------------------------------- | :------- | :----------- | +| userPreferences | [UserPreferences](../models/UserPreferences.md) | ❌ | Request Body | + +**Example Usage Code Snippet** + +```java +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.Categories; +import com.magicbell.magicbelluserclient.models.Channels; +import com.magicbell.magicbelluserclient.models.UserPreferences; +import java.util.Arrays; +import java.util.List; + +public class Main { + + public static void main(String[] args) { + MagicbellUserClientConfig config = MagicbellUserClientConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); + + Channels channels = Channels.builder().enabled(true).name("name").build(); + + List channelsList = Arrays.asList(channels); + + Categories categories = Categories.builder().channels(channelsList).key("key").label("label").build(); + + List categoriesList = Arrays.asList(categories); + + UserPreferences userPreferences = UserPreferences.builder().categories(categoriesList).build(); + + magicbellUserClient.channels.saveUserPreferences(userPreferences); + } +} + +``` + +## listWebPushTokens -Lists all web_push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. +Lists all Web Push tokens belonging to the authenticated user. Returns a paginated list of tokens, including their status, creation dates, and associated metadata. - HTTP Method: `GET` - Endpoint: `/channels/web_push/tokens` **Parameters** -| Name | Type | Required | Description | -| :---------------- | :-------------------------------------------------------------------- | :------- | :------------------------ | -| requestParameters | [GetWebPushTokensParameters](../models/GetWebPushTokensParameters.md) | ❌ | Request Parameters Object | +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [ListWebPushTokensParameters](../models/ListWebPushTokensParameters.md) | ❌ | Request Parameters Object | **Return Type** @@ -1070,7 +1330,7 @@ Lists all web_push tokens belonging to the authenticated user. Returns a paginat ```java import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; -import com.magicbell.magicbelluserclient.models.GetWebPushTokensParameters; +import com.magicbell.magicbelluserclient.models.ListWebPushTokensParameters; import com.magicbell.magicbelluserclient.models.WebPushTokenCollection; public class Main { @@ -1080,13 +1340,13 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - GetWebPushTokensParameters requestParameters = GetWebPushTokensParameters.builder() - .limit(3L) + ListWebPushTokensParameters requestParameters = ListWebPushTokensParameters.builder() + .limit(9L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); - WebPushTokenCollection response = magicbellUserClient.channels.getWebPushTokens(requestParameters); + WebPushTokenCollection response = magicbellUserClient.channels.listWebPushTokens(requestParameters); System.out.println(response); } @@ -1096,9 +1356,9 @@ public class Main { ## saveWebPushToken -Saves a web_push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. +Saves the Web Push token for the authenticated user. This token serves as a credential for accessing channel-specific functionality. Each token is unique to the user and channel combination, allowing for direct communication with the user via the channel. -- HTTP Method: `POST` +- HTTP Method: `PUT` - Endpoint: `/channels/web_push/tokens` **Parameters** @@ -1144,9 +1404,9 @@ public class Main { ``` -## getWebPushToken +## fetchWebPushToken -Retrieves details of a specific web_push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. +Fetches details of a specific Web Push token belonging to the authenticated user. Returns information about the token's status, creation date, and any associated metadata. Users can only access their own tokens. - HTTP Method: `GET` - Endpoint: `/channels/web_push/tokens/{token_id}` @@ -1175,7 +1435,7 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - WebPushToken response = magicbellUserClient.channels.getWebPushToken("token_id"); + WebPushToken response = magicbellUserClient.channels.fetchWebPushToken("token_id"); System.out.println(response); } @@ -1183,9 +1443,9 @@ public class Main { ``` -## discardWebPushToken +## deleteWebPushToken -Revokes one of the authenticated user's web_push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. +Deletes one of the authenticated user's Web Push tokens. This permanently invalidates the specified token, preventing it from being used for future channel access. This action cannot be undone. Users can only revoke their own tokens. - HTTP Method: `DELETE` - Endpoint: `/channels/web_push/tokens/{token_id}` @@ -1214,7 +1474,7 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - DiscardResult response = magicbellUserClient.channels.discardWebPushToken("token_id"); + DiscardResult response = magicbellUserClient.channels.deleteWebPushToken("token_id"); System.out.println(response); } diff --git a/documentation/services/IntegrationsService.kt.md b/documentation/services/IntegrationsService.kt.md index a65bda3..9cb6c7e 100644 --- a/documentation/services/IntegrationsService.kt.md +++ b/documentation/services/IntegrationsService.kt.md @@ -2,22 +2,24 @@ A list of all methods in the `IntegrationsService` service. Click on the method name to view detailed information about that method. -| Methods | Description | -| :------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [saveInboxInstallation](#saveinboxinstallation) | Creates a new installation of a inbox integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. | -| [startInboxInstallation](#startinboxinstallation) | Initiates the installation flow for a inbox integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. | -| [saveSlackInstallation](#saveslackinstallation) | Creates a new installation of a slack integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. | -| [finishSlackInstallation](#finishslackinstallation) | Completes the installation flow for a slack integration. This endpoint is typically called after the user has completed any required authorization steps with slack. | -| [startSlackInstallation](#startslackinstallation) | Initiates the installation flow for a slack integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. | -| [saveTemplatesInstallation](#savetemplatesinstallation) | Creates a new installation of a templates integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. | -| [saveWebPushInstallation](#savewebpushinstallation) | Creates a new installation of a web_push integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. | -| [startWebPushInstallation](#startwebpushinstallation) | Initiates the installation flow for a web_push integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. | +| Methods | Description | +| :-------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [saveInboxInstallation](#saveinboxinstallation) | Creates a new installation of a Inbox integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. | +| [startInboxInstallation](#startinboxinstallation) | Initiates the installation flow for an Inbox integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. | +| [saveMagicbellSlackbotInstallation](#savemagicbellslackbotinstallation) | Creates a new installation of a MagicBell SlackBot integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. | +| [finishMagicbellSlackbotInstallation](#finishmagicbellslackbotinstallation) | Completes the installation flow for the MagicBell SlackBot integration. This endpoint is typically called after the user has completed any required authorization steps with MagicBell SlackBot. | +| [startMagicbellSlackbotInstallation](#startmagicbellslackbotinstallation) | Initiates the installation flow for a MagicBell SlackBot integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. | +| [saveSlackInstallation](#saveslackinstallation) | Creates a new installation of a Slack integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. | +| [finishSlackInstallation](#finishslackinstallation) | Completes the installation flow for the Slack integration. This endpoint is typically called after the user has completed any required authorization steps with Slack. | +| [startSlackInstallation](#startslackinstallation) | Initiates the installation flow for a Slack integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. | +| [saveWebPushInstallation](#savewebpushinstallation) | Creates a new installation of a Web Push integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. | +| [startWebPushInstallation](#startwebpushinstallation) | Initiates the installation flow for a Web Push integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. | ## saveInboxInstallation -Creates a new installation of a inbox integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. +Creates a new installation of a Inbox integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. -- HTTP Method: `POST` +- HTTP Method: `PUT` - Endpoint: `/integrations/inbox/installations` **Parameters** @@ -68,7 +70,7 @@ fun main() { val banner: Banner = Banner.builder() .backgroundColor("backgroundColor") - .backgroundOpacity(0.97D) + .backgroundOpacity(6.42D) .fontSize("fontSize") .textColor("textColor") .build(); @@ -182,7 +184,7 @@ fun main() { ## startInboxInstallation -Initiates the installation flow for a inbox integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. +Initiates the installation flow for an Inbox integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. - HTTP Method: `POST` - Endpoint: `/integrations/inbox/installations/start` @@ -211,12 +213,12 @@ fun main() { } ``` -## saveSlackInstallation +## saveMagicbellSlackbotInstallation -Creates a new installation of a slack integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. +Creates a new installation of a MagicBell SlackBot integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. -- HTTP Method: `POST` -- Endpoint: `/integrations/slack/installations` +- HTTP Method: `PUT` +- Endpoint: `/integrations/magicbell_slackbot/installations` **Parameters** @@ -248,7 +250,7 @@ fun main() { val authedUser: AuthedUser = AuthedUser.builder() .accessToken("access_token") - .expiresIn(0L) + .expiresIn(1L) .id("id") .refreshToken("refresh_token") .scope("scope") @@ -277,28 +279,28 @@ fun main() { .authedUser(authedUser) .botUserId("bot_user_id") .enterprise(enterprise) - .expiresIn(6L) - .id("FFPMPE-+") + .expiresIn(2L) + .id("318-g~J]11") .incomingWebhook(incomingWebhook) - .isEnterpriseInstall(true) + .isEnterpriseInstall(false) .refreshToken("refresh_token") .scope("scope") .team(team) .tokenType("token_type") .build(); - val response: SlackInstallation = magicbellUserClient.integrations.saveSlackInstallation(slackInstallation); + val response: SlackInstallation = magicbellUserClient.integrations.saveMagicbellSlackbotInstallation(slackInstallation); println(response); } ``` -## finishSlackInstallation +## finishMagicbellSlackbotInstallation -Completes the installation flow for a slack integration. This endpoint is typically called after the user has completed any required authorization steps with slack. +Completes the installation flow for the MagicBell SlackBot integration. This endpoint is typically called after the user has completed any required authorization steps with MagicBell SlackBot. - HTTP Method: `POST` -- Endpoint: `/integrations/slack/installations/finish` +- Endpoint: `/integrations/magicbell_slackbot/installations/finish` **Parameters** @@ -331,18 +333,18 @@ fun main() { .redirectUrl("redirect_url") .build(); - val response: SlackInstallation = magicbellUserClient.integrations.finishSlackInstallation(slackFinishInstallResponse); + val response: SlackInstallation = magicbellUserClient.integrations.finishMagicbellSlackbotInstallation(slackFinishInstallResponse); println(response); } ``` -## startSlackInstallation +## startMagicbellSlackbotInstallation -Initiates the installation flow for a slack integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. +Initiates the installation flow for a MagicBell SlackBot integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. - HTTP Method: `POST` -- Endpoint: `/integrations/slack/installations/start` +- Endpoint: `/integrations/magicbell_slackbot/installations/start` **Parameters** @@ -380,35 +382,39 @@ fun main() { .redirectUrl("redirect_url") .build(); - val response: SlackStartInstallResponseContent = magicbellUserClient.integrations.startSlackInstallation(slackStartInstall); + val response: SlackStartInstallResponseContent = magicbellUserClient.integrations.startMagicbellSlackbotInstallation(slackStartInstall); println(response); } ``` -## saveTemplatesInstallation +## saveSlackInstallation -Creates a new installation of a templates integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. +Creates a new installation of a Slack integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. -- HTTP Method: `POST` -- Endpoint: `/integrations/templates/installations` +- HTTP Method: `PUT` +- Endpoint: `/integrations/slack/installations` **Parameters** -| Name | Type | Required | Description | -| :-------------------- | :---------------------------------------------------------- | :------- | :----------- | -| templatesInstallation | [TemplatesInstallation](../models/TemplatesInstallation.md) | ❌ | Request Body | +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------- | :------- | :----------- | +| slackInstallation | [SlackInstallation](../models/SlackInstallation.md) | ❌ | Request Body | **Return Type** -`TemplatesInstallation` +`SlackInstallation` **Example Usage Code Snippet** ```kotlin import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; -import com.magicbell.magicbelluserclient.models.TemplatesInstallation; +import com.magicbell.magicbelluserclient.models.AuthedUser; +import com.magicbell.magicbelluserclient.models.Enterprise; +import com.magicbell.magicbelluserclient.models.IncomingWebhook; +import com.magicbell.magicbelluserclient.models.SlackInstallation; +import com.magicbell.magicbelluserclient.models.Team; fun main() { val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() @@ -417,23 +423,151 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val templatesInstallation: TemplatesInstallation = TemplatesInstallation.builder() - .category("category") + val authedUser: AuthedUser = AuthedUser.builder() + .accessToken("access_token") + .expiresIn(1L) + .id("id") + .refreshToken("refresh_token") + .scope("scope") + .tokenType("token_type") + .build(); + + val enterprise: Enterprise = Enterprise.builder() + .id("id") + .name("name") + .build(); + + val incomingWebhook: IncomingWebhook = IncomingWebhook.builder() .channel("channel") - .text("text") + .configurationUrl("configuration_url") + .url("url") .build(); - val response: TemplatesInstallation = magicbellUserClient.integrations.saveTemplatesInstallation(templatesInstallation); + val team: Team = Team.builder() + .id("id") + .name("name") + .build(); + + val slackInstallation: SlackInstallation = SlackInstallation.builder() + .accessToken("access_token") + .appId("app_id") + .authedUser(authedUser) + .botUserId("bot_user_id") + .enterprise(enterprise) + .expiresIn(2L) + .id("318-g~J]11") + .incomingWebhook(incomingWebhook) + .isEnterpriseInstall(false) + .refreshToken("refresh_token") + .scope("scope") + .team(team) + .tokenType("token_type") + .build(); + + val response: SlackInstallation = magicbellUserClient.integrations.saveSlackInstallation(slackInstallation); println(response); } ``` -## saveWebPushInstallation +## finishSlackInstallation + +Completes the installation flow for the Slack integration. This endpoint is typically called after the user has completed any required authorization steps with Slack. + +- HTTP Method: `POST` +- Endpoint: `/integrations/slack/installations/finish` + +**Parameters** + +| Name | Type | Required | Description | +| :------------------------- | :-------------------------------------------------------------------- | :------- | :----------- | +| slackFinishInstallResponse | [SlackFinishInstallResponse](../models/SlackFinishInstallResponse.md) | ❌ | Request Body | + +**Return Type** + +`SlackInstallation` + +**Example Usage Code Snippet** + +```kotlin +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.SlackFinishInstallResponse; +import com.magicbell.magicbelluserclient.models.SlackInstallation; + +fun main() { + val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() + .accessToken("YOUR_ACCESS_TOKEN") + .build(); + + val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); + + val slackFinishInstallResponse: SlackFinishInstallResponse = SlackFinishInstallResponse.builder() + .appId("app_id") + .code("code") + .redirectUrl("redirect_url") + .build(); + + val response: SlackInstallation = magicbellUserClient.integrations.finishSlackInstallation(slackFinishInstallResponse); + + println(response); +} +``` -Creates a new installation of a web_push integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. +## startSlackInstallation + +Initiates the installation flow for a Slack integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. - HTTP Method: `POST` +- Endpoint: `/integrations/slack/installations/start` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------- | :------- | :----------- | +| slackStartInstall | [SlackStartInstall](../models/SlackStartInstall.md) | ❌ | Request Body | + +**Return Type** + +`SlackStartInstallResponseContent` + +**Example Usage Code Snippet** + +```kotlin +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.SlackStartInstall; +import com.magicbell.magicbelluserclient.models.SlackStartInstallResponseContent; +import java.util.Arrays; +import java.util.List; + +fun main() { + val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() + .accessToken("YOUR_ACCESS_TOKEN") + .build(); + + val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); + + val extraScopes: List = Arrays.asList("extra_scopes"); + + val slackStartInstall: SlackStartInstall = SlackStartInstall.builder() + .appId("app_id") + .authUrl("auth_url") + .extraScopes(extraScopes) + .redirectUrl("redirect_url") + .build(); + + val response: SlackStartInstallResponseContent = magicbellUserClient.integrations.startSlackInstallation(slackStartInstall); + + println(response); +} +``` + +## saveWebPushInstallation + +Creates a new installation of a Web Push integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. + +- HTTP Method: `PUT` - Endpoint: `/integrations/web_push/installations` **Parameters** @@ -479,7 +613,7 @@ fun main() { ## startWebPushInstallation -Initiates the installation flow for a web_push integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. +Initiates the installation flow for a Web Push integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. - HTTP Method: `POST` - Endpoint: `/integrations/web_push/installations/start` diff --git a/documentation/services/IntegrationsService.md b/documentation/services/IntegrationsService.md index b0ee260..5946e3f 100644 --- a/documentation/services/IntegrationsService.md +++ b/documentation/services/IntegrationsService.md @@ -2,22 +2,24 @@ A list of all methods in the `IntegrationsService` service. Click on the method name to view detailed information about that method. -| Methods | Description | -| :------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [saveInboxInstallation](#saveinboxinstallation) | Creates a new installation of a inbox integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. | -| [startInboxInstallation](#startinboxinstallation) | Initiates the installation flow for a inbox integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. | -| [saveSlackInstallation](#saveslackinstallation) | Creates a new installation of a slack integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. | -| [finishSlackInstallation](#finishslackinstallation) | Completes the installation flow for a slack integration. This endpoint is typically called after the user has completed any required authorization steps with slack. | -| [startSlackInstallation](#startslackinstallation) | Initiates the installation flow for a slack integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. | -| [saveTemplatesInstallation](#savetemplatesinstallation) | Creates a new installation of a templates integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. | -| [saveWebPushInstallation](#savewebpushinstallation) | Creates a new installation of a web_push integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. | -| [startWebPushInstallation](#startwebpushinstallation) | Initiates the installation flow for a web_push integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. | +| Methods | Description | +| :-------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| [saveInboxInstallation](#saveinboxinstallation) | Creates a new installation of a Inbox integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. | +| [startInboxInstallation](#startinboxinstallation) | Initiates the installation flow for an Inbox integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. | +| [saveMagicbellSlackbotInstallation](#savemagicbellslackbotinstallation) | Creates a new installation of a MagicBell SlackBot integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. | +| [finishMagicbellSlackbotInstallation](#finishmagicbellslackbotinstallation) | Completes the installation flow for the MagicBell SlackBot integration. This endpoint is typically called after the user has completed any required authorization steps with MagicBell SlackBot. | +| [startMagicbellSlackbotInstallation](#startmagicbellslackbotinstallation) | Initiates the installation flow for a MagicBell SlackBot integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. | +| [saveSlackInstallation](#saveslackinstallation) | Creates a new installation of a Slack integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. | +| [finishSlackInstallation](#finishslackinstallation) | Completes the installation flow for the Slack integration. This endpoint is typically called after the user has completed any required authorization steps with Slack. | +| [startSlackInstallation](#startslackinstallation) | Initiates the installation flow for a Slack integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. | +| [saveWebPushInstallation](#savewebpushinstallation) | Creates a new installation of a Web Push integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. | +| [startWebPushInstallation](#startwebpushinstallation) | Initiates the installation flow for a Web Push integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. | ## saveInboxInstallation -Creates a new installation of a inbox integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. +Creates a new installation of a Inbox integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. -- HTTP Method: `POST` +- HTTP Method: `PUT` - Endpoint: `/integrations/inbox/installations` **Parameters** @@ -66,7 +68,7 @@ public class Main { Banner banner = Banner.builder() .backgroundColor("backgroundColor") - .backgroundOpacity(0.97D) + .backgroundOpacity(6.42D) .fontSize("fontSize") .textColor("textColor") .build(); @@ -165,7 +167,7 @@ public class Main { ## startInboxInstallation -Initiates the installation flow for a inbox integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. +Initiates the installation flow for an Inbox integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. - HTTP Method: `POST` - Endpoint: `/integrations/inbox/installations/start` @@ -196,12 +198,12 @@ public class Main { ``` -## saveSlackInstallation +## saveMagicbellSlackbotInstallation -Creates a new installation of a slack integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. +Creates a new installation of a MagicBell SlackBot integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. -- HTTP Method: `POST` -- Endpoint: `/integrations/slack/installations` +- HTTP Method: `PUT` +- Endpoint: `/integrations/magicbell_slackbot/installations` **Parameters** @@ -233,7 +235,7 @@ public class Main { AuthedUser authedUser = AuthedUser.builder() .accessToken("access_token") - .expiresIn(0L) + .expiresIn(1L) .id("id") .refreshToken("refresh_token") .scope("scope") @@ -256,17 +258,17 @@ public class Main { .authedUser(authedUser) .botUserId("bot_user_id") .enterprise(enterprise) - .expiresIn(6L) - .id("FFPMPE-+") + .expiresIn(2L) + .id("318-g~J]11") .incomingWebhook(incomingWebhook) - .isEnterpriseInstall(true) + .isEnterpriseInstall(false) .refreshToken("refresh_token") .scope("scope") .team(team) .tokenType("token_type") .build(); - SlackInstallation response = magicbellUserClient.integrations.saveSlackInstallation(slackInstallation); + SlackInstallation response = magicbellUserClient.integrations.saveMagicbellSlackbotInstallation(slackInstallation); System.out.println(response); } @@ -274,12 +276,12 @@ public class Main { ``` -## finishSlackInstallation +## finishMagicbellSlackbotInstallation -Completes the installation flow for a slack integration. This endpoint is typically called after the user has completed any required authorization steps with slack. +Completes the installation flow for the MagicBell SlackBot integration. This endpoint is typically called after the user has completed any required authorization steps with MagicBell SlackBot. - HTTP Method: `POST` -- Endpoint: `/integrations/slack/installations/finish` +- Endpoint: `/integrations/magicbell_slackbot/installations/finish` **Parameters** @@ -312,7 +314,9 @@ public class Main { .redirectUrl("redirect_url") .build(); - SlackInstallation response = magicbellUserClient.integrations.finishSlackInstallation(slackFinishInstallResponse); + SlackInstallation response = magicbellUserClient.integrations.finishMagicbellSlackbotInstallation( + slackFinishInstallResponse + ); System.out.println(response); } @@ -320,12 +324,12 @@ public class Main { ``` -## startSlackInstallation +## startMagicbellSlackbotInstallation -Initiates the installation flow for a slack integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. +Initiates the installation flow for a MagicBell SlackBot integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. - HTTP Method: `POST` -- Endpoint: `/integrations/slack/installations/start` +- Endpoint: `/integrations/magicbell_slackbot/installations/start` **Parameters** @@ -363,7 +367,7 @@ public class Main { .redirectUrl("redirect_url") .build(); - SlackStartInstallResponseContent response = magicbellUserClient.integrations.startSlackInstallation( + SlackStartInstallResponseContent response = magicbellUserClient.integrations.startMagicbellSlackbotInstallation( slackStartInstall ); @@ -373,29 +377,33 @@ public class Main { ``` -## saveTemplatesInstallation +## saveSlackInstallation -Creates a new installation of a templates integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. +Creates a new installation of a Slack integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. -- HTTP Method: `POST` -- Endpoint: `/integrations/templates/installations` +- HTTP Method: `PUT` +- Endpoint: `/integrations/slack/installations` **Parameters** -| Name | Type | Required | Description | -| :-------------------- | :---------------------------------------------------------- | :------- | :----------- | -| templatesInstallation | [TemplatesInstallation](../models/TemplatesInstallation.md) | ❌ | Request Body | +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------- | :------- | :----------- | +| slackInstallation | [SlackInstallation](../models/SlackInstallation.md) | ❌ | Request Body | **Return Type** -`TemplatesInstallation` +`SlackInstallation` **Example Usage Code Snippet** ```java import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; -import com.magicbell.magicbelluserclient.models.TemplatesInstallation; +import com.magicbell.magicbelluserclient.models.AuthedUser; +import com.magicbell.magicbelluserclient.models.Enterprise; +import com.magicbell.magicbelluserclient.models.IncomingWebhook; +import com.magicbell.magicbelluserclient.models.SlackInstallation; +import com.magicbell.magicbelluserclient.models.Team; public class Main { @@ -404,13 +412,42 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - TemplatesInstallation templatesInstallation = TemplatesInstallation.builder() - .category("category") + AuthedUser authedUser = AuthedUser.builder() + .accessToken("access_token") + .expiresIn(1L) + .id("id") + .refreshToken("refresh_token") + .scope("scope") + .tokenType("token_type") + .build(); + + Enterprise enterprise = Enterprise.builder().id("id").name("name").build(); + + IncomingWebhook incomingWebhook = IncomingWebhook.builder() .channel("channel") - .text("text") + .configurationUrl("configuration_url") + .url("url") + .build(); + + Team team = Team.builder().id("id").name("name").build(); + + SlackInstallation slackInstallation = SlackInstallation.builder() + .accessToken("access_token") + .appId("app_id") + .authedUser(authedUser) + .botUserId("bot_user_id") + .enterprise(enterprise) + .expiresIn(2L) + .id("318-g~J]11") + .incomingWebhook(incomingWebhook) + .isEnterpriseInstall(false) + .refreshToken("refresh_token") + .scope("scope") + .team(team) + .tokenType("token_type") .build(); - TemplatesInstallation response = magicbellUserClient.integrations.saveTemplatesInstallation(templatesInstallation); + SlackInstallation response = magicbellUserClient.integrations.saveSlackInstallation(slackInstallation); System.out.println(response); } @@ -418,11 +455,110 @@ public class Main { ``` -## saveWebPushInstallation +## finishSlackInstallation -Creates a new installation of a web_push integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. +Completes the installation flow for the Slack integration. This endpoint is typically called after the user has completed any required authorization steps with Slack. - HTTP Method: `POST` +- Endpoint: `/integrations/slack/installations/finish` + +**Parameters** + +| Name | Type | Required | Description | +| :------------------------- | :-------------------------------------------------------------------- | :------- | :----------- | +| slackFinishInstallResponse | [SlackFinishInstallResponse](../models/SlackFinishInstallResponse.md) | ❌ | Request Body | + +**Return Type** + +`SlackInstallation` + +**Example Usage Code Snippet** + +```java +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.SlackFinishInstallResponse; +import com.magicbell.magicbelluserclient.models.SlackInstallation; + +public class Main { + + public static void main(String[] args) { + MagicbellUserClientConfig config = MagicbellUserClientConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); + + SlackFinishInstallResponse slackFinishInstallResponse = SlackFinishInstallResponse.builder() + .appId("app_id") + .code("code") + .redirectUrl("redirect_url") + .build(); + + SlackInstallation response = magicbellUserClient.integrations.finishSlackInstallation(slackFinishInstallResponse); + + System.out.println(response); + } +} + +``` + +## startSlackInstallation + +Initiates the installation flow for a Slack integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. + +- HTTP Method: `POST` +- Endpoint: `/integrations/slack/installations/start` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :-------------------------------------------------- | :------- | :----------- | +| slackStartInstall | [SlackStartInstall](../models/SlackStartInstall.md) | ❌ | Request Body | + +**Return Type** + +`SlackStartInstallResponseContent` + +**Example Usage Code Snippet** + +```java +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.SlackStartInstall; +import com.magicbell.magicbelluserclient.models.SlackStartInstallResponseContent; +import java.util.Arrays; +import java.util.List; + +public class Main { + + public static void main(String[] args) { + MagicbellUserClientConfig config = MagicbellUserClientConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); + + List extraScopesList = Arrays.asList("extra_scopes"); + + SlackStartInstall slackStartInstall = SlackStartInstall.builder() + .appId("app_id") + .authUrl("auth_url") + .extraScopes(extraScopesList) + .redirectUrl("redirect_url") + .build(); + + SlackStartInstallResponseContent response = magicbellUserClient.integrations.startSlackInstallation( + slackStartInstall + ); + + System.out.println(response); + } +} + +``` + +## saveWebPushInstallation + +Creates a new installation of a Web Push integration for a user. This endpoint is used when an integration needs to be set up with user-specific credentials or configuration. + +- HTTP Method: `PUT` - Endpoint: `/integrations/web_push/installations` **Parameters** @@ -470,7 +606,7 @@ public class Main { ## startWebPushInstallation -Initiates the installation flow for a web_push integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. +Initiates the installation flow for a Web Push integration. This is the first step in a multi-step installation process where user authorization or external service configuration may be required. - HTTP Method: `POST` - Endpoint: `/integrations/web_push/installations/start` diff --git a/documentation/services/NotificationsService.kt.md b/documentation/services/NotificationsService.kt.md index f5455a2..ce16604 100644 --- a/documentation/services/NotificationsService.kt.md +++ b/documentation/services/NotificationsService.kt.md @@ -2,13 +2,17 @@ A list of all methods in the `NotificationsService` service. Click on the method name to view detailed information about that method. -| Methods | Description | -| :------------------------------------------------ | :---------------------------------- | -| [listNotifications](#listnotifications) | Lists all notifications for a user. | -| [archiveNotification](#archivenotification) | Archives a notification. | -| [markNotificationRead](#marknotificationread) | Marks a notification as read. | -| [unarchiveNotification](#unarchivenotification) | Unarchives a notification. | -| [markNotificationUnread](#marknotificationunread) | Marks a notification as unread. | +| Methods | Description | +| :-------------------------------------------------------------- | :---------------------------------------------------------------------------------------------- | +| [listNotifications](#listnotifications) | Lists all notifications for a user. | +| [archiveAllNotifications](#archiveallnotifications) | Archive all notifications. | +| [markAllNotificationsRead](#markallnotificationsread) | Marks all notifications as read. | +| [fetchUnreadNotificationsCount](#fetchunreadnotificationscount) | Returns the count of unread notifications for a user. Supports filtering by category and topic. | +| [fetchNotification](#fetchnotification) | Gets a notification by ID. | +| [archiveNotification](#archivenotification) | Archive a notification. | +| [markNotificationRead](#marknotificationread) | Marks a notification as read. | +| [unarchiveNotification](#unarchivenotification) | Unarchives a notification. | +| [markNotificationUnread](#marknotificationunread) | Marks a notification as unread. | ## listNotifications @@ -43,10 +47,11 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); val requestParameters: ListNotificationsParameters = ListNotificationsParameters.builder() - .limit(7L) + .limit(5L) .startingAfter("starting_after") .endingBefore("ending_before") .status("status") + .category("category") .topic("topic") .build(); @@ -56,9 +61,161 @@ fun main() { } ``` +## archiveAllNotifications + +Archive all notifications. + +- HTTP Method: `POST` +- Endpoint: `/notifications/archive` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [ArchiveAllNotificationsParameters](../models/ArchiveAllNotificationsParameters.md) | ❌ | Request Parameters Object | + +**Example Usage Code Snippet** + +```kotlin +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.ArchiveAllNotificationsParameters; + +fun main() { + val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() + .accessToken("YOUR_ACCESS_TOKEN") + .build(); + + val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); + + val requestParameters: ArchiveAllNotificationsParameters = ArchiveAllNotificationsParameters.builder() + .category("category") + .topic("topic") + .build(); + + magicbellUserClient.notifications.archiveAllNotifications(requestParameters); +} +``` + +## markAllNotificationsRead + +Marks all notifications as read. + +- HTTP Method: `POST` +- Endpoint: `/notifications/read` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------------------------ | :------- | :------------------------ | +| requestParameters | [MarkAllNotificationsReadParameters](../models/MarkAllNotificationsReadParameters.md) | ❌ | Request Parameters Object | + +**Example Usage Code Snippet** + +```kotlin +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.MarkAllNotificationsReadParameters; + +fun main() { + val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() + .accessToken("YOUR_ACCESS_TOKEN") + .build(); + + val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); + + val requestParameters: MarkAllNotificationsReadParameters = MarkAllNotificationsReadParameters.builder() + .category("category") + .topic("topic") + .build(); + + magicbellUserClient.notifications.markAllNotificationsRead(requestParameters); +} +``` + +## fetchUnreadNotificationsCount + +Returns the count of unread notifications for a user. Supports filtering by category and topic. + +- HTTP Method: `GET` +- Endpoint: `/notifications/unread/count` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [FetchUnreadNotificationsCountParameters](../models/FetchUnreadNotificationsCountParameters.md) | ❌ | Request Parameters Object | + +**Return Type** + +`CountResponse` + +**Example Usage Code Snippet** + +```kotlin +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.CountResponse; +import com.magicbell.magicbelluserclient.models.FetchUnreadNotificationsCountParameters; + +fun main() { + val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() + .accessToken("YOUR_ACCESS_TOKEN") + .build(); + + val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); + + val requestParameters: FetchUnreadNotificationsCountParameters = FetchUnreadNotificationsCountParameters.builder() + .category("category") + .topic("topic") + .build(); + + val response: CountResponse = magicbellUserClient.notifications.fetchUnreadNotificationsCount(requestParameters); + + println(response); +} +``` + +## fetchNotification + +Gets a notification by ID. + +- HTTP Method: `GET` +- Endpoint: `/notifications/{notification_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :------------- | :----- | :------- | :---------- | +| notificationId | String | ✅ | | + +**Return Type** + +`Notification` + +**Example Usage Code Snippet** + +```kotlin +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.Notification; + +fun main() { + val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() + .accessToken("YOUR_ACCESS_TOKEN") + .build(); + + val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); + + val response: Notification = magicbellUserClient.notifications.fetchNotification("notification_id"); + + println(response); +} +``` + ## archiveNotification -Archives a notification. +Archive a notification. - HTTP Method: `POST` - Endpoint: `/notifications/{notification_id}/archive` diff --git a/documentation/services/NotificationsService.md b/documentation/services/NotificationsService.md index 119890c..9b6bc1e 100644 --- a/documentation/services/NotificationsService.md +++ b/documentation/services/NotificationsService.md @@ -2,13 +2,17 @@ A list of all methods in the `NotificationsService` service. Click on the method name to view detailed information about that method. -| Methods | Description | -| :------------------------------------------------ | :---------------------------------- | -| [listNotifications](#listnotifications) | Lists all notifications for a user. | -| [archiveNotification](#archivenotification) | Archives a notification. | -| [markNotificationRead](#marknotificationread) | Marks a notification as read. | -| [unarchiveNotification](#unarchivenotification) | Unarchives a notification. | -| [markNotificationUnread](#marknotificationunread) | Marks a notification as unread. | +| Methods | Description | +| :-------------------------------------------------------------- | :---------------------------------------------------------------------------------------------- | +| [listNotifications](#listnotifications) | Lists all notifications for a user. | +| [archiveAllNotifications](#archiveallnotifications) | Archive all notifications. | +| [markAllNotificationsRead](#markallnotificationsread) | Marks all notifications as read. | +| [fetchUnreadNotificationsCount](#fetchunreadnotificationscount) | Returns the count of unread notifications for a user. Supports filtering by category and topic. | +| [fetchNotification](#fetchnotification) | Gets a notification by ID. | +| [archiveNotification](#archivenotification) | Archive a notification. | +| [markNotificationRead](#marknotificationread) | Marks a notification as read. | +| [unarchiveNotification](#unarchivenotification) | Unarchives a notification. | +| [markNotificationUnread](#marknotificationunread) | Marks a notification as unread. | ## listNotifications @@ -43,10 +47,11 @@ public class Main { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); ListNotificationsParameters requestParameters = ListNotificationsParameters.builder() - .limit(7L) + .limit(5L) .startingAfter("starting_after") .endingBefore("ending_before") .status("status") + .category("category") .topic("topic") .build(); @@ -58,9 +63,169 @@ public class Main { ``` +## archiveAllNotifications + +Archive all notifications. + +- HTTP Method: `POST` +- Endpoint: `/notifications/archive` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [ArchiveAllNotificationsParameters](../models/ArchiveAllNotificationsParameters.md) | ❌ | Request Parameters Object | + +**Example Usage Code Snippet** + +```java +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.ArchiveAllNotificationsParameters; + +public class Main { + + public static void main(String[] args) { + MagicbellUserClientConfig config = MagicbellUserClientConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); + + ArchiveAllNotificationsParameters requestParameters = ArchiveAllNotificationsParameters.builder() + .category("category") + .topic("topic") + .build(); + + magicbellUserClient.notifications.archiveAllNotifications(requestParameters); + } +} + +``` + +## markAllNotificationsRead + +Marks all notifications as read. + +- HTTP Method: `POST` +- Endpoint: `/notifications/read` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :------------------------------------------------------------------------------------ | :------- | :------------------------ | +| requestParameters | [MarkAllNotificationsReadParameters](../models/MarkAllNotificationsReadParameters.md) | ❌ | Request Parameters Object | + +**Example Usage Code Snippet** + +```java +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.MarkAllNotificationsReadParameters; + +public class Main { + + public static void main(String[] args) { + MagicbellUserClientConfig config = MagicbellUserClientConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); + + MarkAllNotificationsReadParameters requestParameters = MarkAllNotificationsReadParameters.builder() + .category("category") + .topic("topic") + .build(); + + magicbellUserClient.notifications.markAllNotificationsRead(requestParameters); + } +} + +``` + +## fetchUnreadNotificationsCount + +Returns the count of unread notifications for a user. Supports filtering by category and topic. + +- HTTP Method: `GET` +- Endpoint: `/notifications/unread/count` + +**Parameters** + +| Name | Type | Required | Description | +| :---------------- | :---------------------------------------------------------------------------------------------- | :------- | :------------------------ | +| requestParameters | [FetchUnreadNotificationsCountParameters](../models/FetchUnreadNotificationsCountParameters.md) | ❌ | Request Parameters Object | + +**Return Type** + +`CountResponse` + +**Example Usage Code Snippet** + +```java +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.CountResponse; +import com.magicbell.magicbelluserclient.models.FetchUnreadNotificationsCountParameters; + +public class Main { + + public static void main(String[] args) { + MagicbellUserClientConfig config = MagicbellUserClientConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); + + FetchUnreadNotificationsCountParameters requestParameters = FetchUnreadNotificationsCountParameters.builder() + .category("category") + .topic("topic") + .build(); + + CountResponse response = magicbellUserClient.notifications.fetchUnreadNotificationsCount(requestParameters); + + System.out.println(response); + } +} + +``` + +## fetchNotification + +Gets a notification by ID. + +- HTTP Method: `GET` +- Endpoint: `/notifications/{notification_id}` + +**Parameters** + +| Name | Type | Required | Description | +| :------------- | :----- | :------- | :---------- | +| notificationId | String | ✅ | | + +**Return Type** + +`Notification` + +**Example Usage Code Snippet** + +```java +import com.magicbell.magicbelluserclient.MagicbellUserClient; +import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; +import com.magicbell.magicbelluserclient.models.Notification; + +public class Main { + + public static void main(String[] args) { + MagicbellUserClientConfig config = MagicbellUserClientConfig.builder().accessToken("YOUR_ACCESS_TOKEN").build(); + + MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); + + Notification response = magicbellUserClient.notifications.fetchNotification("notification_id"); + + System.out.println(response); + } +} + +``` + ## archiveNotification -Archives a notification. +Archive a notification. - HTTP Method: `POST` - Endpoint: `/notifications/{notification_id}/archive` diff --git a/documentation/snippets/snippets.json b/documentation/snippets/snippets.json index f63ca68..b46be2f 100644 --- a/documentation/snippets/snippets.json +++ b/documentation/snippets/snippets.json @@ -1,69 +1,90 @@ { "endpoints": { "/channels/in_app/inbox/tokens": { - "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.GetInAppInboxTokensParameters;\nimport com.magicbell.magicbelluserclient.models.InboxTokenResponseCollection;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tGetInAppInboxTokensParameters requestParameters = GetInAppInboxTokensParameters.builder()\n\t\t\t.limit(10L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\t\tInboxTokenResponseCollection response = magicbellUserClient.channels.getInAppInboxTokens(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", - "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.InboxToken;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tInboxToken inboxToken = InboxToken.builder()\n\t\t\t.connectionId(\"connection_id\")\n\t\t\t.token(\"in exeu esse co\")\n\t\t\t.build();\n\n\t\tInboxToken response = magicbellUserClient.channels.saveInAppInboxToken(inboxToken);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.InboxTokenResponseCollection;\nimport com.magicbell.magicbelluserclient.models.ListInboxTokensParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tListInboxTokensParameters requestParameters = ListInboxTokensParameters.builder()\n\t\t\t.limit(8L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\t\tInboxTokenResponseCollection response = magicbellUserClient.channels.listInboxTokens(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "put": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.InboxToken;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tInboxToken inboxToken = InboxToken.builder()\n\t\t\t.connectionId(\"connection_id\")\n\t\t\t.token(\"ipsum nulla mag\")\n\t\t\t.build();\n\n\t\tInboxToken response = magicbellUserClient.channels.saveInboxToken(inboxToken);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/channels/in_app/inbox/tokens/{token_id}": { - "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.InboxTokenResponse;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tInboxTokenResponse response = magicbellUserClient.channels.getInAppInboxToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", - "delete": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.DiscardResult;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tDiscardResult response = magicbellUserClient.channels.discardInAppInboxToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.InboxTokenResponse;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tInboxTokenResponse response = magicbellUserClient.channels.fetchInboxToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "delete": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.DiscardResult;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tDiscardResult response = magicbellUserClient.channels.deleteInboxToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/channels/mobile_push/apns/tokens": { - "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ApnsTokenCollection;\nimport com.magicbell.magicbelluserclient.models.GetMobilePushApnsTokensParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tGetMobilePushApnsTokensParameters requestParameters = GetMobilePushApnsTokensParameters.builder()\n\t\t\t.limit(3L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\t\tApnsTokenCollection response = magicbellUserClient.channels.getMobilePushApnsTokens(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", - "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ApnsTokenPayload;\nimport com.magicbell.magicbelluserclient.models.ApnsTokenPayloadInstallationId;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tApnsTokenPayload apnsTokenPayload = ApnsTokenPayload.builder()\n\t\t\t.appId(\"app_id\")\n\t\t\t.deviceToken(\"doloresed quis \")\n\t\t\t.installationId(ApnsTokenPayloadInstallationId.DEVELOPMENT)\n\t\t\t.build();\n\n\t\tApnsTokenPayload response = magicbellUserClient.channels.saveMobilePushApnsToken(apnsTokenPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ApnsTokenCollection;\nimport com.magicbell.magicbelluserclient.models.ListApnsTokensParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tListApnsTokensParameters requestParameters = ListApnsTokensParameters.builder()\n\t\t\t.limit(7L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\t\tApnsTokenCollection response = magicbellUserClient.channels.listApnsTokens(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "put": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ApnsTokenPayload;\nimport com.magicbell.magicbelluserclient.models.ApnsTokenPayloadInstallationId;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tApnsTokenPayload apnsTokenPayload = ApnsTokenPayload.builder()\n\t\t\t.appId(\"app_id\")\n\t\t\t.deviceToken(\"sit culpa incid\")\n\t\t\t.installationId(ApnsTokenPayloadInstallationId.DEVELOPMENT)\n\t\t\t.build();\n\n\t\tApnsTokenPayload response = magicbellUserClient.channels.saveApnsToken(apnsTokenPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/channels/mobile_push/apns/tokens/{token_id}": { - "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ApnsToken;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tApnsToken response = magicbellUserClient.channels.getMobilePushApnsToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", - "delete": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.DiscardResult;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tDiscardResult response = magicbellUserClient.channels.discardMobilePushApnsToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ApnsToken;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tApnsToken response = magicbellUserClient.channels.fetchApnsToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "delete": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.DiscardResult;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tDiscardResult response = magicbellUserClient.channels.deleteApnsToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/channels/mobile_push/expo/tokens": { - "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ExpoTokenCollection;\nimport com.magicbell.magicbelluserclient.models.GetMobilePushExpoTokensParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tGetMobilePushExpoTokensParameters requestParameters = GetMobilePushExpoTokensParameters.builder()\n\t\t\t.limit(9L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\t\tExpoTokenCollection response = magicbellUserClient.channels.getMobilePushExpoTokens(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", - "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ExpoTokenPayload;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tExpoTokenPayload expoTokenPayload = ExpoTokenPayload.builder()\n\t\t\t.deviceToken(\"device_token\")\n\t\t\t.build();\n\n\t\tExpoTokenPayload response = magicbellUserClient.channels.saveMobilePushExpoToken(expoTokenPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ExpoTokenCollection;\nimport com.magicbell.magicbelluserclient.models.ListExpoTokensParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tListExpoTokensParameters requestParameters = ListExpoTokensParameters.builder()\n\t\t\t.limit(8L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\t\tExpoTokenCollection response = magicbellUserClient.channels.listExpoTokens(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "put": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ExpoTokenPayload;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tExpoTokenPayload expoTokenPayload = ExpoTokenPayload.builder()\n\t\t\t.deviceToken(\"device_token\")\n\t\t\t.build();\n\n\t\tExpoTokenPayload response = magicbellUserClient.channels.saveExpoToken(expoTokenPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/channels/mobile_push/expo/tokens/{token_id}": { - "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ExpoToken;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tExpoToken response = magicbellUserClient.channels.getMobilePushExpoToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", - "delete": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.DiscardResult;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tDiscardResult response = magicbellUserClient.channels.discardMobilePushExpoToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ExpoToken;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tExpoToken response = magicbellUserClient.channels.fetchExpoToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "delete": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.DiscardResult;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tDiscardResult response = magicbellUserClient.channels.deleteExpoToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/channels/mobile_push/fcm/tokens": { - "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.FcmTokenCollection;\nimport com.magicbell.magicbelluserclient.models.GetMobilePushFcmTokensParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tGetMobilePushFcmTokensParameters requestParameters = GetMobilePushFcmTokensParameters.builder()\n\t\t\t.limit(6L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\t\tFcmTokenCollection response = magicbellUserClient.channels.getMobilePushFcmTokens(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", - "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.FcmTokenPayload;\nimport com.magicbell.magicbelluserclient.models.FcmTokenPayloadInstallationId;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tFcmTokenPayload fcmTokenPayload = FcmTokenPayload.builder()\n\t\t\t.deviceToken(\"in commodo quis\")\n\t\t\t.installationId(FcmTokenPayloadInstallationId.DEVELOPMENT)\n\t\t\t.build();\n\n\t\tFcmTokenPayload response = magicbellUserClient.channels.saveMobilePushFcmToken(fcmTokenPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.FcmTokenCollection;\nimport com.magicbell.magicbelluserclient.models.ListFcmTokensParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tListFcmTokensParameters requestParameters = ListFcmTokensParameters.builder()\n\t\t\t.limit(6L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\t\tFcmTokenCollection response = magicbellUserClient.channels.listFcmTokens(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "put": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.FcmTokenPayload;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tFcmTokenPayload fcmTokenPayload = FcmTokenPayload.builder()\n\t\t\t.deviceToken(\"estminim adipis\")\n\t\t\t.build();\n\n\t\tFcmTokenPayload response = magicbellUserClient.channels.saveFcmToken(fcmTokenPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/channels/mobile_push/fcm/tokens/{token_id}": { - "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.FcmToken;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tFcmToken response = magicbellUserClient.channels.getMobilePushFcmToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", - "delete": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.DiscardResult;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tDiscardResult response = magicbellUserClient.channels.discardMobilePushFcmToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.FcmToken;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tFcmToken response = magicbellUserClient.channels.fetchFcmToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "delete": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.DiscardResult;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tDiscardResult response = magicbellUserClient.channels.deleteFcmToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/channels/slack/magicbell_slackbot/tokens": { + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ListMagicbellSlackbotTokensParameters;\nimport com.magicbell.magicbelluserclient.models.SlackTokenCollection;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tListMagicbellSlackbotTokensParameters requestParameters = ListMagicbellSlackbotTokensParameters.builder()\n\t\t\t.limit(7L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\t\tSlackTokenCollection response = magicbellUserClient.channels.listMagicbellSlackbotTokens(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "put": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.SlackTokenPayload;\nimport com.magicbell.magicbelluserclient.models.SlackTokenPayloadOauth;\nimport com.magicbell.magicbelluserclient.models.SlackTokenPayloadWebhook;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tSlackTokenPayloadOauth slackTokenPayloadOauth = SlackTokenPayloadOauth.builder()\n\t\t\t.channelId(\"channel_id\")\n\t\t\t.installationId(\"installation_id\")\n\t\t\t.scope(\"scope\")\n\t\t\t.build();\n\t\t\n\t\tSlackTokenPayloadWebhook slackTokenPayloadWebhook = SlackTokenPayloadWebhook.builder()\n\t\t\t.url(\"url\")\n\t\t\t.build();\n\t\t\n\t\tSlackTokenPayload slackTokenPayload = SlackTokenPayload.builder()\n\t\t\t.oauth(slackTokenPayloadOauth)\n\t\t\t.webhook(slackTokenPayloadWebhook)\n\t\t\t.build();\n\n\t\tSlackTokenPayload response = magicbellUserClient.channels.saveMagicbellSlackbotToken(slackTokenPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/channels/slack/magicbell_slackbot/tokens/{token_id}": { + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.SlackToken;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tSlackToken response = magicbellUserClient.channels.fetchMagicbellSlackbotToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "delete": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.DiscardResult;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tDiscardResult response = magicbellUserClient.channels.deleteMagicbellSlackbotToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/channels/slack/tokens": { - "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.GetSlackTokensParameters;\nimport com.magicbell.magicbelluserclient.models.SlackTokenCollection;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tGetSlackTokensParameters requestParameters = GetSlackTokensParameters.builder()\n\t\t\t.limit(2L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\t\tSlackTokenCollection response = magicbellUserClient.channels.getSlackTokens(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", - "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.SlackTokenPayload;\nimport com.magicbell.magicbelluserclient.models.SlackTokenPayloadOauth;\nimport com.magicbell.magicbelluserclient.models.SlackTokenPayloadWebhook;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tSlackTokenPayloadOauth slackTokenPayloadOauth = SlackTokenPayloadOauth.builder()\n\t\t\t.channelId(\"channel_id\")\n\t\t\t.installationId(\"installation_id\")\n\t\t\t.scope(\"scope\")\n\t\t\t.build();\n\t\t\n\t\tSlackTokenPayloadWebhook slackTokenPayloadWebhook = SlackTokenPayloadWebhook.builder()\n\t\t\t.url(\"url\")\n\t\t\t.build();\n\t\t\n\t\tSlackTokenPayload slackTokenPayload = SlackTokenPayload.builder()\n\t\t\t.oauth(slackTokenPayloadOauth)\n\t\t\t.webhook(slackTokenPayloadWebhook)\n\t\t\t.build();\n\n\t\tSlackTokenPayload response = magicbellUserClient.channels.saveSlackToken(slackTokenPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ListSlackTokensParameters;\nimport com.magicbell.magicbelluserclient.models.SlackTokenCollection;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tListSlackTokensParameters requestParameters = ListSlackTokensParameters.builder()\n\t\t\t.limit(2L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\t\tSlackTokenCollection response = magicbellUserClient.channels.listSlackTokens(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "put": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.SlackTokenPayload;\nimport com.magicbell.magicbelluserclient.models.SlackTokenPayloadOauth;\nimport com.magicbell.magicbelluserclient.models.SlackTokenPayloadWebhook;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tSlackTokenPayloadOauth slackTokenPayloadOauth = SlackTokenPayloadOauth.builder()\n\t\t\t.channelId(\"channel_id\")\n\t\t\t.installationId(\"installation_id\")\n\t\t\t.scope(\"scope\")\n\t\t\t.build();\n\t\t\n\t\tSlackTokenPayloadWebhook slackTokenPayloadWebhook = SlackTokenPayloadWebhook.builder()\n\t\t\t.url(\"url\")\n\t\t\t.build();\n\t\t\n\t\tSlackTokenPayload slackTokenPayload = SlackTokenPayload.builder()\n\t\t\t.oauth(slackTokenPayloadOauth)\n\t\t\t.webhook(slackTokenPayloadWebhook)\n\t\t\t.build();\n\n\t\tSlackTokenPayload response = magicbellUserClient.channels.saveSlackToken(slackTokenPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/channels/slack/tokens/{token_id}": { - "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.SlackToken;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tSlackToken response = magicbellUserClient.channels.getSlackToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", - "delete": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.DiscardResult;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tDiscardResult response = magicbellUserClient.channels.discardSlackToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.SlackToken;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tSlackToken response = magicbellUserClient.channels.fetchSlackToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "delete": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.DiscardResult;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tDiscardResult response = magicbellUserClient.channels.deleteSlackToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/channels/teams/tokens": { - "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.GetTeamsTokensParameters;\nimport com.magicbell.magicbelluserclient.models.TeamsTokenCollection;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tGetTeamsTokensParameters requestParameters = GetTeamsTokensParameters.builder()\n\t\t\t.limit(5L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\t\tTeamsTokenCollection response = magicbellUserClient.channels.getTeamsTokens(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", - "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.TeamsTokenPayload;\nimport com.magicbell.magicbelluserclient.models.TeamsTokenPayloadWebhook;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tTeamsTokenPayloadWebhook teamsTokenPayloadWebhook = TeamsTokenPayloadWebhook.builder()\n\t\t\t.url(\"url\")\n\t\t\t.build();\n\t\t\n\t\tTeamsTokenPayload teamsTokenPayload = TeamsTokenPayload.builder()\n\t\t\t.webhook(teamsTokenPayloadWebhook)\n\t\t\t.build();\n\n\t\tTeamsTokenPayload response = magicbellUserClient.channels.saveTeamsToken(teamsTokenPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ListTeamsTokensParameters;\nimport com.magicbell.magicbelluserclient.models.TeamsTokenCollection;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tListTeamsTokensParameters requestParameters = ListTeamsTokensParameters.builder()\n\t\t\t.limit(4L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\t\tTeamsTokenCollection response = magicbellUserClient.channels.listTeamsTokens(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "put": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.TeamsTokenPayload;\nimport com.magicbell.magicbelluserclient.models.TeamsTokenPayloadWebhook;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tTeamsTokenPayloadWebhook teamsTokenPayloadWebhook = TeamsTokenPayloadWebhook.builder()\n\t\t\t.url(\"url\")\n\t\t\t.build();\n\t\t\n\t\tTeamsTokenPayload teamsTokenPayload = TeamsTokenPayload.builder()\n\t\t\t.webhook(teamsTokenPayloadWebhook)\n\t\t\t.build();\n\n\t\tTeamsTokenPayload response = magicbellUserClient.channels.saveTeamsToken(teamsTokenPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/channels/teams/tokens/{token_id}": { - "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.TeamsToken;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tTeamsToken response = magicbellUserClient.channels.getTeamsToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", - "delete": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.DiscardResult;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tDiscardResult response = magicbellUserClient.channels.discardTeamsToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.TeamsToken;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tTeamsToken response = magicbellUserClient.channels.fetchTeamsToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "delete": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.DiscardResult;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tDiscardResult response = magicbellUserClient.channels.deleteTeamsToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/channels/user_preferences": { + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.UserPreferences;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tUserPreferences response = magicbellUserClient.channels.fetchUserPreferences();\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "put": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.Categories;\nimport com.magicbell.magicbelluserclient.models.Channels;\nimport com.magicbell.magicbelluserclient.models.UserPreferences;\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tChannels channels = Channels.builder()\n\t\t\t.enabled(true)\n\t\t\t.name(\"name\")\n\t\t\t.build();\n\t\t\n\t\tList channelsList = Arrays.asList(channels);\n\t\t\n\t\tCategories categories = Categories.builder()\n\t\t\t.channels(channelsList)\n\t\t\t.key(\"key\")\n\t\t\t.label(\"label\")\n\t\t\t.build();\n\t\t\n\t\tList categoriesList = Arrays.asList(categories);\n\t\t\n\t\tUserPreferences userPreferences = UserPreferences.builder()\n\t\t\t.categories(categoriesList)\n\t\t\t.build();\n\n\t\tmagicbellUserClient.channels.saveUserPreferences(userPreferences);\n }\n}\n" }, "/channels/web_push/tokens": { - "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.GetWebPushTokensParameters;\nimport com.magicbell.magicbelluserclient.models.WebPushTokenCollection;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tGetWebPushTokensParameters requestParameters = GetWebPushTokensParameters.builder()\n\t\t\t.limit(3L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\t\tWebPushTokenCollection response = magicbellUserClient.channels.getWebPushTokens(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", - "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.WebPushTokenPayload;\nimport com.magicbell.magicbelluserclient.models.WebPushTokenPayloadKeys;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tWebPushTokenPayloadKeys webPushTokenPayloadKeys = WebPushTokenPayloadKeys.builder()\n\t\t\t.auth(\"auth\")\n\t\t\t.p256dh(\"p256dh\")\n\t\t\t.build();\n\t\t\n\t\tWebPushTokenPayload webPushTokenPayload = WebPushTokenPayload.builder()\n\t\t\t.endpoint(\"endpoint\")\n\t\t\t.keys(webPushTokenPayloadKeys)\n\t\t\t.build();\n\n\t\tWebPushTokenPayload response = magicbellUserClient.channels.saveWebPushToken(webPushTokenPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ListWebPushTokensParameters;\nimport com.magicbell.magicbelluserclient.models.WebPushTokenCollection;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tListWebPushTokensParameters requestParameters = ListWebPushTokensParameters.builder()\n\t\t\t.limit(9L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\t\tWebPushTokenCollection response = magicbellUserClient.channels.listWebPushTokens(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "put": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.WebPushTokenPayload;\nimport com.magicbell.magicbelluserclient.models.WebPushTokenPayloadKeys;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tWebPushTokenPayloadKeys webPushTokenPayloadKeys = WebPushTokenPayloadKeys.builder()\n\t\t\t.auth(\"auth\")\n\t\t\t.p256dh(\"p256dh\")\n\t\t\t.build();\n\t\t\n\t\tWebPushTokenPayload webPushTokenPayload = WebPushTokenPayload.builder()\n\t\t\t.endpoint(\"endpoint\")\n\t\t\t.keys(webPushTokenPayloadKeys)\n\t\t\t.build();\n\n\t\tWebPushTokenPayload response = magicbellUserClient.channels.saveWebPushToken(webPushTokenPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/channels/web_push/tokens/{token_id}": { - "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.WebPushToken;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tWebPushToken response = magicbellUserClient.channels.getWebPushToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", - "delete": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.DiscardResult;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tDiscardResult response = magicbellUserClient.channels.discardWebPushToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.WebPushToken;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tWebPushToken response = magicbellUserClient.channels.fetchWebPushToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n", + "delete": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.DiscardResult;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tDiscardResult response = magicbellUserClient.channels.deleteWebPushToken(\"token_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/integrations/inbox/installations": { - "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.Banner;\nimport com.magicbell.magicbelluserclient.models.DefaultHover;\nimport com.magicbell.magicbelluserclient.models.DefaultState;\nimport com.magicbell.magicbelluserclient.models.Default_;\nimport com.magicbell.magicbelluserclient.models.Dialog;\nimport com.magicbell.magicbelluserclient.models.Footer;\nimport com.magicbell.magicbelluserclient.models.Header;\nimport com.magicbell.magicbelluserclient.models.Icon;\nimport com.magicbell.magicbelluserclient.models.Images;\nimport com.magicbell.magicbelluserclient.models.InboxConfigPayload;\nimport com.magicbell.magicbelluserclient.models.Theme;\nimport com.magicbell.magicbelluserclient.models.ThemeNotification;\nimport com.magicbell.magicbelluserclient.models.Unread;\nimport com.magicbell.magicbelluserclient.models.UnreadHover;\nimport com.magicbell.magicbelluserclient.models.UnreadState;\nimport com.magicbell.magicbelluserclient.models.Unseen;\nimport com.magicbell.magicbelluserclient.models.UnseenBadge;\nimport com.magicbell.magicbelluserclient.models.UnseenHover;\nimport com.magicbell.magicbelluserclient.models.UnseenState;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tImages images = Images.builder()\n\t\t\t.emptyInboxUrl(\"emptyInboxUrl\")\n\t\t\t.build();\n\t\t\n\t\tBanner banner = Banner.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.backgroundOpacity(0.97D)\n\t\t\t.fontSize(\"fontSize\")\n\t\t\t.textColor(\"textColor\")\n\t\t\t.build();\n\t\t\n\t\tDialog dialog = Dialog.builder()\n\t\t\t.accentColor(\"accentColor\")\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.textColor(\"textColor\")\n\t\t\t.build();\n\t\t\n\t\tFooter footer = Footer.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.borderRadius(\"borderRadius\")\n\t\t\t.fontSize(\"fontSize\")\n\t\t\t.textColor(\"textColor\")\n\t\t\t.build();\n\t\t\n\t\tHeader header = Header.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.borderRadius(\"borderRadius\")\n\t\t\t.fontFamily(\"fontFamily\")\n\t\t\t.fontSize(\"fontSize\")\n\t\t\t.textColor(\"textColor\")\n\t\t\t.build();\n\t\t\n\t\tIcon icon = Icon.builder()\n\t\t\t.borderColor(\"borderColor\")\n\t\t\t.width(\"width\")\n\t\t\t.build();\n\t\t\n\t\tDefaultHover defaultHover = DefaultHover.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.build();\n\t\t\n\t\tDefaultState defaultState = DefaultState.builder()\n\t\t\t.color(\"color\")\n\t\t\t.build();\n\t\t\n\t\tDefault_ default_ = Default_.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.borderRadius(\"borderRadius\")\n\t\t\t.fontFamily(\"fontFamily\")\n\t\t\t.fontSize(\"fontSize\")\n\t\t\t.hover(defaultHover)\n\t\t\t.margin(\"margin\")\n\t\t\t.state(defaultState)\n\t\t\t.textColor(\"textColor\")\n\t\t\t.build();\n\t\t\n\t\tUnreadHover unreadHover = UnreadHover.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.build();\n\t\t\n\t\tUnreadState unreadState = UnreadState.builder()\n\t\t\t.color(\"color\")\n\t\t\t.build();\n\t\t\n\t\tUnread unread = Unread.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.hover(unreadHover)\n\t\t\t.state(unreadState)\n\t\t\t.textColor(\"textColor\")\n\t\t\t.build();\n\t\t\n\t\tUnseenHover unseenHover = UnseenHover.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.build();\n\t\t\n\t\tUnseenState unseenState = UnseenState.builder()\n\t\t\t.color(\"color\")\n\t\t\t.build();\n\t\t\n\t\tUnseen unseen = Unseen.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.hover(unseenHover)\n\t\t\t.state(unseenState)\n\t\t\t.textColor(\"textColor\")\n\t\t\t.build();\n\t\t\n\t\tThemeNotification themeNotification = ThemeNotification.builder()\n\t\t\t.default_(default_)\n\t\t\t.unread(unread)\n\t\t\t.unseen(unseen)\n\t\t\t.build();\n\t\t\n\t\tUnseenBadge unseenBadge = UnseenBadge.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.build();\n\t\t\n\t\tTheme theme = Theme.builder()\n\t\t\t.banner(banner)\n\t\t\t.dialog(dialog)\n\t\t\t.footer(footer)\n\t\t\t.header(header)\n\t\t\t.icon(icon)\n\t\t\t.notification(themeNotification)\n\t\t\t.unseenBadge(unseenBadge)\n\t\t\t.build();\n\t\t\n\t\tInboxConfigPayload inboxConfigPayload = InboxConfigPayload.builder()\n\t\t\t.images(images)\n\t\t\t.locale(\"locale\")\n\t\t\t.theme(theme)\n\t\t\t.build();\n\n\t\tInboxConfigPayload response = magicbellUserClient.integrations.saveInboxInstallation(inboxConfigPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "put": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.Banner;\nimport com.magicbell.magicbelluserclient.models.DefaultHover;\nimport com.magicbell.magicbelluserclient.models.DefaultState;\nimport com.magicbell.magicbelluserclient.models.Default_;\nimport com.magicbell.magicbelluserclient.models.Dialog;\nimport com.magicbell.magicbelluserclient.models.Footer;\nimport com.magicbell.magicbelluserclient.models.Header;\nimport com.magicbell.magicbelluserclient.models.Icon;\nimport com.magicbell.magicbelluserclient.models.Images;\nimport com.magicbell.magicbelluserclient.models.InboxConfigPayload;\nimport com.magicbell.magicbelluserclient.models.Theme;\nimport com.magicbell.magicbelluserclient.models.ThemeNotification;\nimport com.magicbell.magicbelluserclient.models.Unread;\nimport com.magicbell.magicbelluserclient.models.UnreadHover;\nimport com.magicbell.magicbelluserclient.models.UnreadState;\nimport com.magicbell.magicbelluserclient.models.Unseen;\nimport com.magicbell.magicbelluserclient.models.UnseenBadge;\nimport com.magicbell.magicbelluserclient.models.UnseenHover;\nimport com.magicbell.magicbelluserclient.models.UnseenState;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tImages images = Images.builder()\n\t\t\t.emptyInboxUrl(\"emptyInboxUrl\")\n\t\t\t.build();\n\t\t\n\t\tBanner banner = Banner.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.backgroundOpacity(6.42D)\n\t\t\t.fontSize(\"fontSize\")\n\t\t\t.textColor(\"textColor\")\n\t\t\t.build();\n\t\t\n\t\tDialog dialog = Dialog.builder()\n\t\t\t.accentColor(\"accentColor\")\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.textColor(\"textColor\")\n\t\t\t.build();\n\t\t\n\t\tFooter footer = Footer.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.borderRadius(\"borderRadius\")\n\t\t\t.fontSize(\"fontSize\")\n\t\t\t.textColor(\"textColor\")\n\t\t\t.build();\n\t\t\n\t\tHeader header = Header.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.borderRadius(\"borderRadius\")\n\t\t\t.fontFamily(\"fontFamily\")\n\t\t\t.fontSize(\"fontSize\")\n\t\t\t.textColor(\"textColor\")\n\t\t\t.build();\n\t\t\n\t\tIcon icon = Icon.builder()\n\t\t\t.borderColor(\"borderColor\")\n\t\t\t.width(\"width\")\n\t\t\t.build();\n\t\t\n\t\tDefaultHover defaultHover = DefaultHover.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.build();\n\t\t\n\t\tDefaultState defaultState = DefaultState.builder()\n\t\t\t.color(\"color\")\n\t\t\t.build();\n\t\t\n\t\tDefault_ default_ = Default_.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.borderRadius(\"borderRadius\")\n\t\t\t.fontFamily(\"fontFamily\")\n\t\t\t.fontSize(\"fontSize\")\n\t\t\t.hover(defaultHover)\n\t\t\t.margin(\"margin\")\n\t\t\t.state(defaultState)\n\t\t\t.textColor(\"textColor\")\n\t\t\t.build();\n\t\t\n\t\tUnreadHover unreadHover = UnreadHover.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.build();\n\t\t\n\t\tUnreadState unreadState = UnreadState.builder()\n\t\t\t.color(\"color\")\n\t\t\t.build();\n\t\t\n\t\tUnread unread = Unread.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.hover(unreadHover)\n\t\t\t.state(unreadState)\n\t\t\t.textColor(\"textColor\")\n\t\t\t.build();\n\t\t\n\t\tUnseenHover unseenHover = UnseenHover.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.build();\n\t\t\n\t\tUnseenState unseenState = UnseenState.builder()\n\t\t\t.color(\"color\")\n\t\t\t.build();\n\t\t\n\t\tUnseen unseen = Unseen.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.hover(unseenHover)\n\t\t\t.state(unseenState)\n\t\t\t.textColor(\"textColor\")\n\t\t\t.build();\n\t\t\n\t\tThemeNotification themeNotification = ThemeNotification.builder()\n\t\t\t.default_(default_)\n\t\t\t.unread(unread)\n\t\t\t.unseen(unseen)\n\t\t\t.build();\n\t\t\n\t\tUnseenBadge unseenBadge = UnseenBadge.builder()\n\t\t\t.backgroundColor(\"backgroundColor\")\n\t\t\t.build();\n\t\t\n\t\tTheme theme = Theme.builder()\n\t\t\t.banner(banner)\n\t\t\t.dialog(dialog)\n\t\t\t.footer(footer)\n\t\t\t.header(header)\n\t\t\t.icon(icon)\n\t\t\t.notification(themeNotification)\n\t\t\t.unseenBadge(unseenBadge)\n\t\t\t.build();\n\t\t\n\t\tInboxConfigPayload inboxConfigPayload = InboxConfigPayload.builder()\n\t\t\t.images(images)\n\t\t\t.locale(\"locale\")\n\t\t\t.theme(theme)\n\t\t\t.build();\n\n\t\tInboxConfigPayload response = magicbellUserClient.integrations.saveInboxInstallation(inboxConfigPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/integrations/inbox/installations/start": { "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.InboxConfigPayload;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tInboxConfigPayload response = magicbellUserClient.integrations.startInboxInstallation();\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, + "/integrations/magicbell_slackbot/installations": { + "put": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.AuthedUser;\nimport com.magicbell.magicbelluserclient.models.Enterprise;\nimport com.magicbell.magicbelluserclient.models.IncomingWebhook;\nimport com.magicbell.magicbelluserclient.models.SlackInstallation;\nimport com.magicbell.magicbelluserclient.models.Team;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tAuthedUser authedUser = AuthedUser.builder()\n\t\t\t.accessToken(\"access_token\")\n\t\t\t.expiresIn(1L)\n\t\t\t.id(\"id\")\n\t\t\t.refreshToken(\"refresh_token\")\n\t\t\t.scope(\"scope\")\n\t\t\t.tokenType(\"token_type\")\n\t\t\t.build();\n\t\t\n\t\tEnterprise enterprise = Enterprise.builder()\n\t\t\t.id(\"id\")\n\t\t\t.name(\"name\")\n\t\t\t.build();\n\t\t\n\t\tIncomingWebhook incomingWebhook = IncomingWebhook.builder()\n\t\t\t.channel(\"channel\")\n\t\t\t.configurationUrl(\"configuration_url\")\n\t\t\t.url(\"url\")\n\t\t\t.build();\n\t\t\n\t\tTeam team = Team.builder()\n\t\t\t.id(\"id\")\n\t\t\t.name(\"name\")\n\t\t\t.build();\n\t\t\n\t\tSlackInstallation slackInstallation = SlackInstallation.builder()\n\t\t\t.accessToken(\"access_token\")\n\t\t\t.appId(\"app_id\")\n\t\t\t.authedUser(authedUser)\n\t\t\t.botUserId(\"bot_user_id\")\n\t\t\t.enterprise(enterprise)\n\t\t\t.expiresIn(2L)\n\t\t\t.id(\"318-g~J]11\")\n\t\t\t.incomingWebhook(incomingWebhook)\n\t\t\t.isEnterpriseInstall(false)\n\t\t\t.refreshToken(\"refresh_token\")\n\t\t\t.scope(\"scope\")\n\t\t\t.team(team)\n\t\t\t.tokenType(\"token_type\")\n\t\t\t.build();\n\n\t\tSlackInstallation response = magicbellUserClient.integrations.saveMagicbellSlackbotInstallation(slackInstallation);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/integrations/magicbell_slackbot/installations/finish": { + "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.SlackFinishInstallResponse;\nimport com.magicbell.magicbelluserclient.models.SlackInstallation;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tSlackFinishInstallResponse slackFinishInstallResponse = SlackFinishInstallResponse.builder()\n\t\t\t.appId(\"app_id\")\n\t\t\t.code(\"code\")\n\t\t\t.redirectUrl(\"redirect_url\")\n\t\t\t.build();\n\n\t\tSlackInstallation response = magicbellUserClient.integrations.finishMagicbellSlackbotInstallation(slackFinishInstallResponse);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/integrations/magicbell_slackbot/installations/start": { + "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.SlackStartInstall;\nimport com.magicbell.magicbelluserclient.models.SlackStartInstallResponseContent;\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tList extraScopesList = Arrays.asList(\"extra_scopes\");\n\t\t\n\t\tSlackStartInstall slackStartInstall = SlackStartInstall.builder()\n\t\t\t.appId(\"app_id\")\n\t\t\t.authUrl(\"auth_url\")\n\t\t\t.extraScopes(extraScopesList)\n\t\t\t.redirectUrl(\"redirect_url\")\n\t\t\t.build();\n\n\t\tSlackStartInstallResponseContent response = magicbellUserClient.integrations.startMagicbellSlackbotInstallation(slackStartInstall);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, "/integrations/slack/installations": { - "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.AuthedUser;\nimport com.magicbell.magicbelluserclient.models.Enterprise;\nimport com.magicbell.magicbelluserclient.models.IncomingWebhook;\nimport com.magicbell.magicbelluserclient.models.SlackInstallation;\nimport com.magicbell.magicbelluserclient.models.Team;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tAuthedUser authedUser = AuthedUser.builder()\n\t\t\t.accessToken(\"access_token\")\n\t\t\t.expiresIn(0L)\n\t\t\t.id(\"id\")\n\t\t\t.refreshToken(\"refresh_token\")\n\t\t\t.scope(\"scope\")\n\t\t\t.tokenType(\"token_type\")\n\t\t\t.build();\n\t\t\n\t\tEnterprise enterprise = Enterprise.builder()\n\t\t\t.id(\"id\")\n\t\t\t.name(\"name\")\n\t\t\t.build();\n\t\t\n\t\tIncomingWebhook incomingWebhook = IncomingWebhook.builder()\n\t\t\t.channel(\"channel\")\n\t\t\t.configurationUrl(\"configuration_url\")\n\t\t\t.url(\"url\")\n\t\t\t.build();\n\t\t\n\t\tTeam team = Team.builder()\n\t\t\t.id(\"id\")\n\t\t\t.name(\"name\")\n\t\t\t.build();\n\t\t\n\t\tSlackInstallation slackInstallation = SlackInstallation.builder()\n\t\t\t.accessToken(\"access_token\")\n\t\t\t.appId(\"app_id\")\n\t\t\t.authedUser(authedUser)\n\t\t\t.botUserId(\"bot_user_id\")\n\t\t\t.enterprise(enterprise)\n\t\t\t.expiresIn(6L)\n\t\t\t.id(\"FFPMPE-+\")\n\t\t\t.incomingWebhook(incomingWebhook)\n\t\t\t.isEnterpriseInstall(true)\n\t\t\t.refreshToken(\"refresh_token\")\n\t\t\t.scope(\"scope\")\n\t\t\t.team(team)\n\t\t\t.tokenType(\"token_type\")\n\t\t\t.build();\n\n\t\tSlackInstallation response = magicbellUserClient.integrations.saveSlackInstallation(slackInstallation);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "put": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.AuthedUser;\nimport com.magicbell.magicbelluserclient.models.Enterprise;\nimport com.magicbell.magicbelluserclient.models.IncomingWebhook;\nimport com.magicbell.magicbelluserclient.models.SlackInstallation;\nimport com.magicbell.magicbelluserclient.models.Team;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tAuthedUser authedUser = AuthedUser.builder()\n\t\t\t.accessToken(\"access_token\")\n\t\t\t.expiresIn(1L)\n\t\t\t.id(\"id\")\n\t\t\t.refreshToken(\"refresh_token\")\n\t\t\t.scope(\"scope\")\n\t\t\t.tokenType(\"token_type\")\n\t\t\t.build();\n\t\t\n\t\tEnterprise enterprise = Enterprise.builder()\n\t\t\t.id(\"id\")\n\t\t\t.name(\"name\")\n\t\t\t.build();\n\t\t\n\t\tIncomingWebhook incomingWebhook = IncomingWebhook.builder()\n\t\t\t.channel(\"channel\")\n\t\t\t.configurationUrl(\"configuration_url\")\n\t\t\t.url(\"url\")\n\t\t\t.build();\n\t\t\n\t\tTeam team = Team.builder()\n\t\t\t.id(\"id\")\n\t\t\t.name(\"name\")\n\t\t\t.build();\n\t\t\n\t\tSlackInstallation slackInstallation = SlackInstallation.builder()\n\t\t\t.accessToken(\"access_token\")\n\t\t\t.appId(\"app_id\")\n\t\t\t.authedUser(authedUser)\n\t\t\t.botUserId(\"bot_user_id\")\n\t\t\t.enterprise(enterprise)\n\t\t\t.expiresIn(2L)\n\t\t\t.id(\"318-g~J]11\")\n\t\t\t.incomingWebhook(incomingWebhook)\n\t\t\t.isEnterpriseInstall(false)\n\t\t\t.refreshToken(\"refresh_token\")\n\t\t\t.scope(\"scope\")\n\t\t\t.team(team)\n\t\t\t.tokenType(\"token_type\")\n\t\t\t.build();\n\n\t\tSlackInstallation response = magicbellUserClient.integrations.saveSlackInstallation(slackInstallation);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/integrations/slack/installations/finish": { "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.SlackFinishInstallResponse;\nimport com.magicbell.magicbelluserclient.models.SlackInstallation;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tSlackFinishInstallResponse slackFinishInstallResponse = SlackFinishInstallResponse.builder()\n\t\t\t.appId(\"app_id\")\n\t\t\t.code(\"code\")\n\t\t\t.redirectUrl(\"redirect_url\")\n\t\t\t.build();\n\n\t\tSlackInstallation response = magicbellUserClient.integrations.finishSlackInstallation(slackFinishInstallResponse);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" @@ -71,17 +92,26 @@ "/integrations/slack/installations/start": { "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.SlackStartInstall;\nimport com.magicbell.magicbelluserclient.models.SlackStartInstallResponseContent;\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tList extraScopesList = Arrays.asList(\"extra_scopes\");\n\t\t\n\t\tSlackStartInstall slackStartInstall = SlackStartInstall.builder()\n\t\t\t.appId(\"app_id\")\n\t\t\t.authUrl(\"auth_url\")\n\t\t\t.extraScopes(extraScopesList)\n\t\t\t.redirectUrl(\"redirect_url\")\n\t\t\t.build();\n\n\t\tSlackStartInstallResponseContent response = magicbellUserClient.integrations.startSlackInstallation(slackStartInstall);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, - "/integrations/templates/installations": { - "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.TemplatesInstallation;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tTemplatesInstallation templatesInstallation = TemplatesInstallation.builder()\n\t\t\t.category(\"category\")\n\t\t\t.channel(\"channel\")\n\t\t\t.text(\"text\")\n\t\t\t.build();\n\n\t\tTemplatesInstallation response = magicbellUserClient.integrations.saveTemplatesInstallation(templatesInstallation);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" - }, "/integrations/web_push/installations": { - "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.WebPushTokenPayload;\nimport com.magicbell.magicbelluserclient.models.WebPushTokenPayloadKeys;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tWebPushTokenPayloadKeys webPushTokenPayloadKeys = WebPushTokenPayloadKeys.builder()\n\t\t\t.auth(\"auth\")\n\t\t\t.p256dh(\"p256dh\")\n\t\t\t.build();\n\t\t\n\t\tWebPushTokenPayload webPushTokenPayload = WebPushTokenPayload.builder()\n\t\t\t.endpoint(\"endpoint\")\n\t\t\t.keys(webPushTokenPayloadKeys)\n\t\t\t.build();\n\n\t\tWebPushTokenPayload response = magicbellUserClient.integrations.saveWebPushInstallation(webPushTokenPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "put": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.WebPushTokenPayload;\nimport com.magicbell.magicbelluserclient.models.WebPushTokenPayloadKeys;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tWebPushTokenPayloadKeys webPushTokenPayloadKeys = WebPushTokenPayloadKeys.builder()\n\t\t\t.auth(\"auth\")\n\t\t\t.p256dh(\"p256dh\")\n\t\t\t.build();\n\t\t\n\t\tWebPushTokenPayload webPushTokenPayload = WebPushTokenPayload.builder()\n\t\t\t.endpoint(\"endpoint\")\n\t\t\t.keys(webPushTokenPayloadKeys)\n\t\t\t.build();\n\n\t\tWebPushTokenPayload response = magicbellUserClient.integrations.saveWebPushInstallation(webPushTokenPayload);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/integrations/web_push/installations/start": { "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.WebPushStartInstallationResponse;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tWebPushStartInstallationResponse response = magicbellUserClient.integrations.startWebPushInstallation();\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/notifications": { - "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ListNotificationsParameters;\nimport com.magicbell.magicbelluserclient.models.NotificationCollection;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tListNotificationsParameters requestParameters = ListNotificationsParameters.builder()\n\t\t\t.limit(7L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.status(\"status\")\n\t\t\t.topic(\"topic\")\n\t\t\t.build();\n\n\t\tNotificationCollection response = magicbellUserClient.notifications.listNotifications(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ListNotificationsParameters;\nimport com.magicbell.magicbelluserclient.models.NotificationCollection;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tListNotificationsParameters requestParameters = ListNotificationsParameters.builder()\n\t\t\t.limit(5L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.status(\"status\")\n\t\t\t.category(\"category\")\n\t\t\t.topic(\"topic\")\n\t\t\t.build();\n\n\t\tNotificationCollection response = magicbellUserClient.notifications.listNotifications(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/notifications/archive": { + "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.ArchiveAllNotificationsParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tArchiveAllNotificationsParameters requestParameters = ArchiveAllNotificationsParameters.builder()\n\t\t\t.category(\"category\")\n\t\t\t.topic(\"topic\")\n\t\t\t.build();\n\n\t\tmagicbellUserClient.notifications.archiveAllNotifications(requestParameters);\n }\n}\n" + }, + "/notifications/read": { + "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.MarkAllNotificationsReadParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tMarkAllNotificationsReadParameters requestParameters = MarkAllNotificationsReadParameters.builder()\n\t\t\t.category(\"category\")\n\t\t\t.topic(\"topic\")\n\t\t\t.build();\n\n\t\tmagicbellUserClient.notifications.markAllNotificationsRead(requestParameters);\n }\n}\n" + }, + "/notifications/unread/count": { + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.CountResponse;\nimport com.magicbell.magicbelluserclient.models.FetchUnreadNotificationsCountParameters;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tFetchUnreadNotificationsCountParameters requestParameters = FetchUnreadNotificationsCountParameters.builder()\n\t\t\t.category(\"category\")\n\t\t\t.topic(\"topic\")\n\t\t\t.build();\n\n\t\tCountResponse response = magicbellUserClient.notifications.fetchUnreadNotificationsCount(requestParameters);\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" + }, + "/notifications/{notification_id}": { + "get": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.models.Notification;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tNotification response = magicbellUserClient.notifications.fetchNotification(\"notification_id\");\n\t\t\t\n\t\tSystem.out.println(response);\n }\n}\n" }, "/notifications/{notification_id}/archive": { "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tmagicbellUserClient.notifications.archiveNotification(\"notification_id\");\n }\n}\n" @@ -96,7 +126,7 @@ "post": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\n\npublic class Main {\n public static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n\t\tmagicbellUserClient.notifications.markNotificationUnread(\"notification_id\");\n }\n}\n" } }, - "example": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.exceptions.ApiException;\nimport com.magicbell.magicbelluserclient.models.GetInAppInboxTokensParameters;\nimport com.magicbell.magicbelluserclient.models.InboxTokenResponseCollection;\n \npublic class Main {\n public static void main(String[] args) {\n MagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n GetInAppInboxTokensParameters requestParameters = GetInAppInboxTokensParameters.builder()\n\t\t\t.limit(10L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\n try {\n InboxTokenResponseCollection response = magicbellUserClient.channels.getInAppInboxTokens(requestParameters);\n \n System.out.println(response);\n } catch (ApiException e) {\n e.printStackTrace();\n }\n\n System.exit(0);\n }\n}\n", + "example": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\nimport com.magicbell.magicbelluserclient.exceptions.ApiError;\nimport com.magicbell.magicbelluserclient.models.InboxTokenResponseCollection;\nimport com.magicbell.magicbelluserclient.models.ListInboxTokensParameters;\n \npublic class Main {\n public static void main(String[] args) {\n MagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\n ListInboxTokensParameters requestParameters = ListInboxTokensParameters.builder()\n\t\t\t.limit(8L)\n\t\t\t.startingAfter(\"starting_after\")\n\t\t\t.endingBefore(\"ending_before\")\n\t\t\t.build();\n\n\n try {\n InboxTokenResponseCollection response = magicbellUserClient.channels.listInboxTokens(requestParameters);\n \n System.out.println(response);\n } catch (ApiError e) {\n e.printStackTrace();\n }\n\n System.exit(0);\n }\n}\n", "authentication": { "bearer": { "constructor": "import com.magicbell.magicbelluserclient.MagicbellUserClient;\nimport com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tMagicbellUserClientConfig config = MagicbellUserClientConfig.builder()\n\t\t\t.accessToken(\"YOUR_ACCESS_TOKEN\")\n\t\t\t.build();\n\n\t\tMagicbellUserClient magicbellUserClient = new MagicbellUserClient(config);\n\t}\n}", diff --git a/examples/src/main/java/com/example/Main.java b/examples/src/main/java/com/example/Main.java index 6ad27a1..89e40c2 100644 --- a/examples/src/main/java/com/example/Main.java +++ b/examples/src/main/java/com/example/Main.java @@ -2,9 +2,9 @@ import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; -import com.magicbell.magicbelluserclient.exceptions.ApiException; -import com.magicbell.magicbelluserclient.models.GetInAppInboxTokensParameters; +import com.magicbell.magicbelluserclient.exceptions.ApiError; import com.magicbell.magicbelluserclient.models.InboxTokenResponseCollection; +import com.magicbell.magicbelluserclient.models.ListInboxTokensParameters; public class Main { @@ -13,17 +13,17 @@ public static void main(String[] args) { MagicbellUserClient magicbellUserClient = new MagicbellUserClient(config); - GetInAppInboxTokensParameters requestParameters = GetInAppInboxTokensParameters.builder() - .limit(10L) + ListInboxTokensParameters requestParameters = ListInboxTokensParameters.builder() + .limit(8L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); try { - InboxTokenResponseCollection response = magicbellUserClient.channels.getInAppInboxTokens(requestParameters); + InboxTokenResponseCollection response = magicbellUserClient.channels.listInboxTokens(requestParameters); System.out.println(response); - } catch (ApiException e) { + } catch (ApiError e) { e.printStackTrace(); } diff --git a/kotlin-example/src/main/kotlin/Main.kt b/kotlin-example/src/main/kotlin/Main.kt index e4c2fab..456261b 100644 --- a/kotlin-example/src/main/kotlin/Main.kt +++ b/kotlin-example/src/main/kotlin/Main.kt @@ -2,8 +2,8 @@ package com.example import com.magicbell.magicbelluserclient.MagicbellUserClient; import com.magicbell.magicbelluserclient.config.MagicbellUserClientConfig; -import com.magicbell.magicbelluserclient.models.GetInAppInboxTokensParameters; import com.magicbell.magicbelluserclient.models.InboxTokenResponseCollection; +import com.magicbell.magicbelluserclient.models.ListInboxTokensParameters; fun main() { val config: MagicbellUserClientConfig = MagicbellUserClientConfig.builder() @@ -12,13 +12,13 @@ fun main() { val magicbellUserClient: MagicbellUserClient = MagicbellUserClient(config); - val requestParameters: GetInAppInboxTokensParameters = GetInAppInboxTokensParameters.builder() - .limit(10L) + val requestParameters: ListInboxTokensParameters = ListInboxTokensParameters.builder() + .limit(8L) .startingAfter("starting_after") .endingBefore("ending_before") .build(); - val response: InboxTokenResponseCollection = magicbellUserClient.channels.getInAppInboxTokens(requestParameters); + val response: InboxTokenResponseCollection = magicbellUserClient.channels.listInboxTokens(requestParameters); println(response); } diff --git a/pom.xml b/pom.xml index 8b733ce..2e8748e 100644 --- a/pom.xml +++ b/pom.xml @@ -62,6 +62,11 @@ okhttp 4.12.0 + + org.openapitools + jackson-databind-nullable + 0.2.6 + diff --git a/src/main/java/com/magicbell/magicbelluserclient/MagicbellUserClient.java b/src/main/java/com/magicbell/magicbelluserclient/MagicbellUserClient.java index b781b93..1f5b5c9 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/MagicbellUserClient.java +++ b/src/main/java/com/magicbell/magicbelluserclient/MagicbellUserClient.java @@ -19,11 +19,20 @@ public class MagicbellUserClient { private final MagicbellUserClientConfig config; + /** + * Constructs a new instance of MagicbellUserClient with default configuration. + */ public MagicbellUserClient() { // Default configs this(MagicbellUserClientConfig.builder().build()); } + /** + * Constructs a new instance of MagicbellUserClient with custom configuration. + * Initializes all services, HTTP client, and optional OAuth token manager. + * + * @param config The SDK configuration including base URL, authentication, timeout, and retry settings + */ public MagicbellUserClient(MagicbellUserClientConfig config) { this.config = config; @@ -38,14 +47,29 @@ public MagicbellUserClient(MagicbellUserClientConfig config) { this.notifications = new NotificationsService(httpClient, config); } + /** + * Sets the environment for all API requests. + * + * @param environment The environment to use (e.g., DEFAULT, PRODUCTION, STAGING) + */ public void setEnvironment(Environment environment) { setBaseUrl(environment.getUrl()); } + /** + * Sets the base URL for all API requests. + * + * @param baseUrl The base URL to use for API requests + */ public void setBaseUrl(String baseUrl) { this.config.setBaseUrl(baseUrl); } + /** + * Sets the access token (Bearer token) for all API requests. + * + * @param token The access token to use for authentication + */ public void setAccessToken(String token) { this.config.setAccessToken(token); } diff --git a/src/main/java/com/magicbell/magicbelluserclient/config/MagicbellUserClientConfig.java b/src/main/java/com/magicbell/magicbelluserclient/config/MagicbellUserClientConfig.java index ab2e5a2..d20ad02 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/config/MagicbellUserClientConfig.java +++ b/src/main/java/com/magicbell/magicbelluserclient/config/MagicbellUserClientConfig.java @@ -6,6 +6,11 @@ import lombok.NonNull; import lombok.Setter; +/** + * Configuration class for SDK client settings. + * Provides builder pattern for configuring base URLs, authentication, timeouts, and retry behavior. + * All configuration options have sensible defaults and can be customized as needed. + */ @Builder @Data public class MagicbellUserClientConfig { diff --git a/src/main/java/com/magicbell/magicbelluserclient/config/RetryConfig.java b/src/main/java/com/magicbell/magicbelluserclient/config/RetryConfig.java index 5cbe04c..a98bb54 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/config/RetryConfig.java +++ b/src/main/java/com/magicbell/magicbelluserclient/config/RetryConfig.java @@ -9,6 +9,11 @@ import lombok.Builder; import lombok.Data; +/** + * Configuration for automatic retry behavior on failed requests. + * Defines retry limits, backoff strategy, and conditions for retrying requests. + * Uses builder pattern for flexible configuration with sensible defaults. + */ @Data @Builder public class RetryConfig { diff --git a/src/main/java/com/magicbell/magicbelluserclient/exceptions/ApiError.java b/src/main/java/com/magicbell/magicbelluserclient/exceptions/ApiError.java new file mode 100644 index 0000000..5a75f60 --- /dev/null +++ b/src/main/java/com/magicbell/magicbelluserclient/exceptions/ApiError.java @@ -0,0 +1,51 @@ +package com.magicbell.magicbelluserclient.exceptions; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; +import lombok.NoArgsConstructor; +import okhttp3.Response; + +/** + * Class representing an API Error. + * + * @param message The error message + * @param status The status code of the HTTP error + * @param response The response associated with the error + */ +@Data +@NoArgsConstructor +public class ApiError extends RuntimeException { + + /** + * The message describing the error. + */ + @JsonProperty("message") + private String message; + + /** + * The HTTP status code associated with the error. + */ + @JsonIgnore + private Integer status; + + /** + * The response associated with the error. + */ + @JsonIgnore + private Response response; + + /** + * Initialize a new instance of API Error. + * + * @param message The error message + * @param status The status code of the HTTP error + * @param response The response associated with the error + */ + public ApiError(String message, Integer status, Response response) { + super(message); + this.message = message; + this.status = status; + this.response = response; + } +} diff --git a/src/main/java/com/magicbell/magicbelluserclient/exceptions/ApiException.java b/src/main/java/com/magicbell/magicbelluserclient/exceptions/ApiException.java deleted file mode 100644 index 2e57d4f..0000000 --- a/src/main/java/com/magicbell/magicbelluserclient/exceptions/ApiException.java +++ /dev/null @@ -1,59 +0,0 @@ -package com.magicbell.magicbelluserclient.exceptions; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -/** - * This is the base class for all exceptions that represent an error response from the server. - */ -public class ApiException extends RuntimeException { - - private static final Map ERROR_MAP = Collections.unmodifiableMap( - new HashMap() { - { - put(401, "Unauthorized"); - put(403, "Forbidden"); - put(404, "Not Found"); - put(405, "Method Not Allowed"); - put(406, "Not Acceptable"); - put(409, "Conflict"); - put(410, "Gone"); - put(500, "Internal Server Error"); - put(502, "Bad Gateway"); - put(503, "Service Unavailable"); - put(504, "Gateway Timeout"); - } - } - ); - - private final int statusCode; - - public ApiException(int code) { - super(getExceptionMessage(code)); - this.statusCode = code; - } - - public ApiException(String message) { - super(message); - this.statusCode = 0; - } - - public ApiException(String message, Throwable t) { - super(message, t); - this.statusCode = 0; - } - - public ApiException(int code, String message) { - super(message); - this.statusCode = code; - } - - public int getStatusCode() { - return this.statusCode; - } - - static String getExceptionMessage(int code) { - return ERROR_MAP.getOrDefault(code, "Unknown Error"); - } -} diff --git a/src/main/java/com/magicbell/magicbelluserclient/hook/Hook.java b/src/main/java/com/magicbell/magicbelluserclient/hook/Hook.java index 5316e54..8ea5e27 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/hook/Hook.java +++ b/src/main/java/com/magicbell/magicbelluserclient/hook/Hook.java @@ -4,7 +4,11 @@ import okhttp3.Request; import okhttp3.Response; -/** Liblab Hook interface */ +/** + * Hook interface for intercepting and customizing SDK HTTP requests and responses. + * Implement this interface to add custom logic before requests, after responses, or during errors. + * Hooks are executed by the HookInterceptor in the OkHttp client chain. + */ public interface Hook { /** * Is called before the request is made to the API diff --git a/src/main/java/com/magicbell/magicbelluserclient/http/Environment.java b/src/main/java/com/magicbell/magicbelluserclient/http/Environment.java index 9bfa6fe..a18eddf 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/http/Environment.java +++ b/src/main/java/com/magicbell/magicbelluserclient/http/Environment.java @@ -4,7 +4,9 @@ import okhttp3.HttpUrl; /** - * SDK Environments + * Predefined environment configurations for the SDK. + * Each environment represents a different base URL (e.g., production, staging, development). + * URLs are validated at construction time to ensure they are well-formed. */ @Getter public enum Environment { @@ -12,6 +14,13 @@ public enum Environment { private final String url; + /** + * Creates an environment with the specified base URL. + * Validates that the URL is well-formed before accepting it. + * + * @param url The base URL for this environment + * @throws IllegalArgumentException if the URL is invalid + */ Environment(String url) { if (HttpUrl.parse(url) == null) { throw new IllegalArgumentException( diff --git a/src/main/java/com/magicbell/magicbelluserclient/http/HttpMethod.java b/src/main/java/com/magicbell/magicbelluserclient/http/HttpMethod.java index 97a36c1..a24d619 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/http/HttpMethod.java +++ b/src/main/java/com/magicbell/magicbelluserclient/http/HttpMethod.java @@ -3,21 +3,39 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; +/** + * Enum representing HTTP methods (verbs) used in API requests. + * Provides utility methods for determining method characteristics. + */ @Getter @RequiredArgsConstructor public enum HttpMethod { + /** HTTP GET method for retrieving resources */ GET("GET"), + /** HTTP POST method for creating resources */ POST("POST"), + /** HTTP PUT method for updating/replacing resources */ PUT("PUT"), + /** HTTP PATCH method for partially updating resources */ PATCH("PATCH"), + /** HTTP DELETE method for removing resources */ DELETE("DELETE"), + /** HTTP HEAD method for retrieving headers only */ HEAD("HEAD"), + /** HTTP OPTIONS method for describing communication options */ OPTIONS("OPTIONS"), + /** HTTP TRACE method for diagnostic purposes */ TRACE("TRACE"), + /** HTTP CONNECT method for establishing tunnels */ CONNECT("CONNECT"); private final String method; + /** + * Determines if this HTTP method requires a request body. + * + * @return true if POST, PUT, or PATCH; false otherwise + */ public boolean requiresRequestBody() { return method.equals("POST") || method.equals("PUT") || method.equals("PATCH"); } diff --git a/src/main/java/com/magicbell/magicbelluserclient/http/ModelConverter.java b/src/main/java/com/magicbell/magicbelluserclient/http/ModelConverter.java index 02e5352..ece677f 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/http/ModelConverter.java +++ b/src/main/java/com/magicbell/magicbelluserclient/http/ModelConverter.java @@ -5,15 +5,29 @@ import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.databind.exc.MismatchedInputException; +import com.magicbell.magicbelluserclient.http.util.ContentTypes; +import java.lang.reflect.Method; +import java.nio.charset.StandardCharsets; +import java.util.logging.Level; +import java.util.logging.Logger; +import okhttp3.MediaType; import okhttp3.Response; import okhttp3.ResponseBody; +import org.openapitools.jackson.nullable.JsonNullableModule; +/** + * Utility class for converting between JSON and Java models. + * Uses Jackson ObjectMapper with preconfigured settings for SDK serialization/deserialization. + * Handles responses as Class types or TypeReferences with proper error logging. + */ public final class ModelConverter { + private static final Logger logger = Logger.getLogger(ModelConverter.class.getName()); private static final ObjectMapper mapper = new ObjectMapper(); static { - mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + mapper.setSerializationInclusion(JsonInclude.Include.NON_ABSENT); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); mapper.configure(DeserializationFeature.FAIL_ON_INVALID_SUBTYPE, false); mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); @@ -21,43 +35,103 @@ public final class ModelConverter { mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); mapper.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING); mapper.enable(DeserializationFeature.USE_LONG_FOR_INTS); + mapper.registerModule(new JsonNullableModule()); } private ModelConverter() {} + /** + * Converts an HTTP response body to a Java object of the specified class. + * + * @param The type of the model class + * @param response The HTTP response to convert + * @param clazz The target class to deserialize into + * @return The deserialized object, or null if conversion fails + */ public static T convert(final Response response, final Class clazz) { - final ResponseBody body = response.body(); try { - return mapper.readValue(body.string(), clazz); + return convert(response.body().bytes(), clazz); } catch (Exception e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Failed to read response body: " + e.getMessage(), e); + return null; + } + } + + /** + * Converts raw byte array to a Java object of the specified class. + * + * @param The type of the model class + * @param bodyBytes The response body as bytes + * @param clazz The target class to deserialize into + * @return The deserialized object, or null if conversion fails or body is empty + */ + public static T convert(final byte[] bodyBytes, final Class clazz) { + try { + if (bodyBytes == null || bodyBytes.length == 0) { + logger.log(Level.FINE, "Received empty response body, returning null"); + return null; + } + + return mapper.readValue(bodyBytes, clazz); + } catch (Exception e) { + logger.log(Level.SEVERE, "Failed to read response body: " + e.getMessage(), e); return null; } } public static T convert(final String response, final Class clazz) { try { + // Handle empty responses + if (response == null || response.trim().isEmpty()) { + logger.log(Level.FINE, "Received empty response string, returning null"); + return null; + } return mapper.readValue(response, clazz); + } catch (MismatchedInputException e) { + logger.log(Level.SEVERE, "Failed to parse response - invalid or malformed JSON: " + e.getMessage(), e); + return null; } catch (Exception e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Unexpected error parsing response: " + e.getMessage(), e); return null; } } public static T convert(Response response, TypeReference typeReference) { try { - return convert(response.body().string(), typeReference); + return convert(response.body().bytes(), typeReference); } catch (Exception e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Failed to read response body: " + e.getMessage(), e); + return null; + } + } + + public static T convert(byte[] bodyBytes, TypeReference typeReference) { + try { + if (bodyBytes == null || bodyBytes.length == 0) { + logger.log(Level.FINE, "Received empty response body, returning null"); + return null; + } + + return mapper.readValue(bodyBytes, typeReference); + } catch (Exception e) { + logger.log(Level.SEVERE, "Failed to read response body: " + e.getMessage(), e); return null; } } public static T convert(String response, TypeReference typeReference) { try { + // Handle empty responses + if (response == null || response.trim().isEmpty()) { + logger.log(Level.FINE, "Received empty response string, returning null"); + return null; + } return mapper.readValue(response, typeReference); + } catch (MismatchedInputException e) { + logger.log(Level.SEVERE, "Failed to parse response - invalid or malformed JSON: " + e.getMessage(), e); + return null; } catch (Exception e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Unexpected error parsing response: " + e.getMessage(), e); return null; } } @@ -66,7 +140,7 @@ public static String readString(Response response) { try { return response.body().string(); } catch (Exception e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Failed to read response body as string: " + e.getMessage(), e); return null; } } @@ -75,17 +149,96 @@ public static byte[] readBytes(Response response) { try { return response.body().bytes(); } catch (Exception e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Failed to read response body as bytes: " + e.getMessage(), e); return null; } } + public static String toBodyString(byte[] bodyBytes) { + try { + return new String(bodyBytes, StandardCharsets.UTF_8); + } catch (Exception e) { + logger.log(Level.SEVERE, "Failed to convert body bytes to string: " + e.getMessage(), e); + return ""; + } + } + + /** + * Serializes a Java model object to JSON string. + * + * @param model The model object to serialize + * @return The JSON string representation, or null if serialization fails + */ public static String modelToJson(final Object model) { try { return mapper.writeValueAsString(model); } catch (Exception e) { - e.printStackTrace(); + logger.log(Level.SEVERE, "Failed to serialize model to JSON: " + e.getMessage(), e); return null; } } + + /** + * Converts response body bytes to a OneOf type by determining the appropriate factory method + * based on the content type and using reflection to invoke it. + * + * @param The type of the OneOf model class + * @param bodyBytes The response body as bytes + * @param typeReference The target TypeReference to deserialize into + * @param contentType The content type of the response + * @return The deserialized object, or null if conversion fails + */ + public static T convertOneOf( + final byte[] bodyBytes, + final TypeReference typeReference, + final MediaType contentType + ) { + try { + String methodName; + Class parameterType; + Object data; + + if (ContentTypes.isTextual(contentType)) { + methodName = "ofString"; + parameterType = String.class; + data = toBodyString(bodyBytes); + } else if (ContentTypes.isBinary(contentType)) { + methodName = "ofBinary"; + parameterType = byte[].class; + data = bodyBytes; + } else { + return convert(bodyBytes, typeReference); + } + + Class clazz = (Class) typeReference.getType(); + + Method method = clazz.getDeclaredMethod(methodName, parameterType); + method.setAccessible(true); + + return (T) method.invoke(null, data); + } catch (Exception e) { + logger.log(Level.SEVERE, "Failed to convert OneOf response: " + e.getMessage(), e); + return null; + } + } + + /** + * Converts response body string to a OneOf type by determining the appropriate factory method + * based on the content type and using reflection to invoke it. + * + * @param The type of the OneOf model class + * @param body The response body as string + * @param typeReference The target TypeReference to deserialize into + * @param contentType The content type of the response + * @return The deserialized object, or null if conversion fails + */ + public static T convertOneOf( + final String body, + final TypeReference typeReference, + final MediaType contentType + ) { + byte[] bodyBytes = body.getBytes(StandardCharsets.UTF_8); + + return convertOneOf(bodyBytes, typeReference, contentType); + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/http/interceptors/DefaultHeadersInterceptor.java b/src/main/java/com/magicbell/magicbelluserclient/http/interceptors/DefaultHeadersInterceptor.java index f275921..a058780 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/http/interceptors/DefaultHeadersInterceptor.java +++ b/src/main/java/com/magicbell/magicbelluserclient/http/interceptors/DefaultHeadersInterceptor.java @@ -9,19 +9,41 @@ import okhttp3.Request.Builder; import okhttp3.Response; +/** + * OkHttp interceptor that adds default headers to all requests. + * Currently adds the User-Agent header based on SDK configuration. + */ public class DefaultHeadersInterceptor implements Interceptor { private final Map defaultHeaders = new HashMap<>(); + /** + * Constructs a new DefaultHeadersInterceptor. + * + * @param config The SDK configuration containing default header values + */ public DefaultHeadersInterceptor(MagicbellUserClientConfig config) { defaultHeaders.put("User-Agent", config.getUserAgent()); } + /** + * Intercepts a request to add default headers before proceeding. + * + * @param chain The OkHttp interceptor chain + * @return The HTTP response + * @throws IOException if an I/O error occurs during request execution + */ @Override public Response intercept(Chain chain) throws IOException { return chain.proceed(addDefaultHeadersToRequest(chain.request())); } + /** + * Adds default headers to a request. + * + * @param request The HTTP request to modify + * @return The modified request with default headers added + */ private Request addDefaultHeadersToRequest(Request request) { if (defaultHeaders.isEmpty()) { return request; diff --git a/src/main/java/com/magicbell/magicbelluserclient/http/interceptors/RetryInterceptor.java b/src/main/java/com/magicbell/magicbelluserclient/http/interceptors/RetryInterceptor.java index 95a5e85..d9c5298 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/http/interceptors/RetryInterceptor.java +++ b/src/main/java/com/magicbell/magicbelluserclient/http/interceptors/RetryInterceptor.java @@ -8,11 +8,23 @@ import okhttp3.Request; import okhttp3.Response; +/** + * OkHttp interceptor that automatically retries failed HTTP requests. + * Supports configurable retry attempts, backoff delays, and specific status codes or exceptions to retry. + */ @AllArgsConstructor public class RetryInterceptor implements Interceptor { private RetryConfig config; + /** + * Intercepts an HTTP request and retries it according to the configured retry policy. + * Implements exponential backoff between retry attempts. + * + * @param chain The OkHttp interceptor chain + * @return The HTTP response from a successful attempt + * @throws IOException if all retry attempts fail or a non-retryable exception occurs + */ @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); @@ -48,11 +60,23 @@ public Response intercept(Chain chain) throws IOException { return response; } + /** + * Calculates the delay before the next retry attempt using exponential backoff. + * + * @param tryCount The current retry attempt number (1-indexed) + * @return The delay in milliseconds, capped at the configured maximum delay + */ private int calculateDelay(int tryCount) { final int delay = (int) (config.getInitialDelay() * Math.pow(config.getBackoffFactor(), tryCount - 1)); return Math.min(delay, config.getMaxDelay()); } + /** + * Determines if a response should be retried based on status code and HTTP method. + * + * @param response The HTTP response to check + * @return true if the response should be retried, false otherwise + */ private boolean isRetryable(Response response) { final boolean isRetryableStatusCode = config.getStatusCodesToRetry().contains(response.code()); final boolean isRetryableMethod = config diff --git a/src/main/java/com/magicbell/magicbelluserclient/http/serialization/PathSerializationStyle.java b/src/main/java/com/magicbell/magicbelluserclient/http/serialization/PathSerializationStyle.java index 65a1536..509a132 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/http/serialization/PathSerializationStyle.java +++ b/src/main/java/com/magicbell/magicbelluserclient/http/serialization/PathSerializationStyle.java @@ -1,10 +1,18 @@ package com.magicbell.magicbelluserclient.http.serialization; +/** + * Serialization styles supported for path parameters in OpenAPI specifications. + * Defines how values are encoded when embedded in URL paths. + */ public enum PathSerializationStyle { + /** Simple style - comma-separated values (default for path parameters) */ SIMPLE(SerializationStyle.SIMPLE), + /** Label style - dot-prefixed values (.value or .id.name) */ LABEL(SerializationStyle.LABEL), + /** Matrix style - semicolon-prefixed key-value pairs (;key=value) */ MATRIX(SerializationStyle.MATRIX); + /** The underlying serialization style */ public final SerializationStyle style; PathSerializationStyle(SerializationStyle style) { diff --git a/src/main/java/com/magicbell/magicbelluserclient/http/serialization/QuerySerializationStyle.java b/src/main/java/com/magicbell/magicbelluserclient/http/serialization/QuerySerializationStyle.java index db2cb2e..bee5fb0 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/http/serialization/QuerySerializationStyle.java +++ b/src/main/java/com/magicbell/magicbelluserclient/http/serialization/QuerySerializationStyle.java @@ -1,11 +1,20 @@ package com.magicbell.magicbelluserclient.http.serialization; +/** + * Serialization styles supported for query parameters in OpenAPI specifications. + * Defines how values are encoded as URL query strings. + */ public enum QuerySerializationStyle { + /** Form style - ampersand-separated key-value pairs (default for query parameters) */ FORM(SerializationStyle.FORM), + /** Space-delimited style - values separated by spaces (encoded as %20) */ SPACE_DELIMITED(SerializationStyle.SPACE_DELIMITED), + /** Pipe-delimited style - values separated by pipe characters (|) */ PIPE_DELIMITED(SerializationStyle.PIPE_DELIMITED), + /** Deep object style - nested objects with bracket notation (obj[field]=value) */ DEEP_OBJECT(SerializationStyle.DEEP_OBJECT); + /** The underlying serialization style */ public final SerializationStyle style; QuerySerializationStyle(SerializationStyle style) { diff --git a/src/main/java/com/magicbell/magicbelluserclient/http/serialization/SerializationStyle.java b/src/main/java/com/magicbell/magicbelluserclient/http/serialization/SerializationStyle.java index 1c55e25..eefd997 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/http/serialization/SerializationStyle.java +++ b/src/main/java/com/magicbell/magicbelluserclient/http/serialization/SerializationStyle.java @@ -1,11 +1,22 @@ package com.magicbell.magicbelluserclient.http.serialization; +/** + * Enum representing OpenAPI parameter serialization styles. + * Defines how parameters are formatted for different parts of HTTP requests. + */ public enum SerializationStyle { + /** Simple style - comma-separated values (default for path/header parameters) */ SIMPLE, + /** Label style - dot-prefixed values for path parameters (.value or .id.name) */ LABEL, + /** Matrix style - semicolon-prefixed key-value pairs for path parameters (;key=value) */ MATRIX, + /** Form style - ampersand-separated key-value pairs (default for query parameters) */ FORM, + /** Space-delimited style - space-separated values for query parameters */ SPACE_DELIMITED, + /** Pipe-delimited style - pipe-separated values for query parameters */ PIPE_DELIMITED, + /** Deep object style - nested objects with bracket notation (id[key]=value) */ DEEP_OBJECT, } diff --git a/src/main/java/com/magicbell/magicbelluserclient/http/serialization/Serializer.java b/src/main/java/com/magicbell/magicbelluserclient/http/serialization/Serializer.java index 50565c5..ac9e996 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/http/serialization/Serializer.java +++ b/src/main/java/com/magicbell/magicbelluserclient/http/serialization/Serializer.java @@ -4,8 +4,22 @@ import java.util.Map; import java.util.stream.Collectors; +/** + * Utility class for serializing parameters according to OpenAPI serialization styles. + * Supports simple, label, matrix, form, pipe-delimited, space-delimited, and deep object styles. + * Handles primitives, strings, lists, and complex objects with proper encoding. + */ public class Serializer { + /** + * Serializes a long value to a string with the specified style and encoding. + * + * @param key The parameter name + * @param value The long value to serialize + * @param style The serialization style to use + * @param encode Whether to URL-encode the value + * @return The serialized parameter string + */ public static String serialize(String key, long value, SerializationStyle style, boolean encode) { return serialize(key, String.valueOf(value), style, encode); } @@ -35,6 +49,17 @@ public static String serialize(String key, String value, SerializationStyle styl } } + /** + * Serializes any object value according to the specified serialization style. + * Handles primitives, strings, lists, and complex objects with proper OpenAPI serialization. + * + * @param key The parameter name + * @param value The value to serialize (can be primitive, String, List, or object) + * @param style The serialization style to use (SIMPLE, LABEL, MATRIX, FORM, etc.) + * @param explode Whether to use exploded form for arrays/objects + * @param encode Whether to URL-encode values + * @return The serialized parameter string + */ public static String serialize(String key, Object value, SerializationStyle style, boolean explode, boolean encode) { if (value == null) { return serialize(key, "null", style, encode); @@ -185,6 +210,16 @@ private static String serializeObject( } } + /** + * Serializes an object using deep object style (e.g., id[key]=value&id[key][deepKey]=deepValue). + * Recursively handles nested objects with bracket notation. + * + * @param key The parameter name + * @param value The value to serialize + * @param topLevel Whether this is the top-level call (affects bracket notation) + * @param encode Whether to URL-encode values + * @return The serialized deep object string + */ public static String serializeDeepObject(String key, Object value, boolean topLevel, boolean encode) { if (!Util.isObject(value)) { return String.format("[%s]=%s", key, serializeValue(value, encode)); diff --git a/src/main/java/com/magicbell/magicbelluserclient/http/serialization/Util.java b/src/main/java/com/magicbell/magicbelluserclient/http/serialization/Util.java index 7d2392c..49daf90 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/http/serialization/Util.java +++ b/src/main/java/com/magicbell/magicbelluserclient/http/serialization/Util.java @@ -1,5 +1,6 @@ package com.magicbell.magicbelluserclient.http.serialization; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import com.magicbell.magicbelluserclient.json.TypeUtils; @@ -9,12 +10,30 @@ import java.util.Map; import java.util.stream.Collectors; import lombok.SneakyThrows; +import org.openapitools.jackson.nullable.JsonNullableModule; +/** + * Utility class for serialization helper methods. + * Provides functions for type checking, URL encoding, and property extraction. + */ public class Util { + private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + + static { + OBJECT_MAPPER.setSerializationInclusion(JsonInclude.Include.NON_ABSENT); + OBJECT_MAPPER.registerModule(new JsonNullableModule()); + } + + /** + * Extracts properties from an object using JSON property names. + * Uses Jackson annotations to determine the correct property names. + * + * @param value The object to extract properties from + * @return A map of JSON property names to their values + */ public static Map getPropertiesWithJsonPropertyNames(Object value) { - ObjectMapper objectMapper = new ObjectMapper(); - Map properties = objectMapper.convertValue(value, new TypeReference>() {}); + Map properties = OBJECT_MAPPER.convertValue(value, new TypeReference>() {}); // Use the json property name if it exists, otherwise use the regular property name return properties @@ -35,11 +54,23 @@ public static Map getPropertiesWithJsonPropertyNames(Object valu ); } + /** + * URL-encodes a string value using UTF-8 encoding. + * + * @param value The string to encode + * @return The URL-encoded string + */ @SneakyThrows public static String urlEncode(String value) { return URLEncoder.encode(value, StandardCharsets.UTF_8.toString()); } + /** + * Checks if a value is a primitive type (number, boolean, string, or character). + * + * @param value The value to check + * @return true if the value is a primitive type, false otherwise + */ public static boolean isPrimitive(Object value) { return ( value instanceof Long || @@ -52,6 +83,12 @@ public static boolean isPrimitive(Object value) { ); } + /** + * Checks if a value is a complex object (not primitive and not iterable). + * + * @param value The value to check + * @return true if the value is a complex object, false otherwise + */ public static boolean isObject(Object value) { return !isPrimitive(value) && !(value instanceof Iterable); } diff --git a/src/main/java/com/magicbell/magicbelluserclient/http/util/ContentTypes.java b/src/main/java/com/magicbell/magicbelluserclient/http/util/ContentTypes.java new file mode 100644 index 0000000..b5f8969 --- /dev/null +++ b/src/main/java/com/magicbell/magicbelluserclient/http/util/ContentTypes.java @@ -0,0 +1,85 @@ +package com.magicbell.magicbelluserclient.http.util; + +import okhttp3.MediaType; +import okhttp3.Response; + +public class ContentTypes { + + private static final MediaType FALLBACK_CONTENT_TYPE = MediaType.parse("application/json"); + + /** + * Determines if the given MediaType is textual. + * In this case, JSON is not considered textual. + * @param contentType The MediaType to check + * @return true if the content type is textual, false otherwise + */ + public static boolean isTextual(MediaType contentType) { + if (contentType == null) { + return false; + } + + String type = contentType.type(); + String subtype = contentType.subtype(); + + if ("text".equals(type)) { + return true; + } + + if ("application".equals(type) && (subtype.equals("xml") || subtype.endsWith("+xml"))) { + return true; + } + + if ("image".equals(type) && "svg+xml".equals(subtype)) { + return true; + } + + if ("application".equals(type) && "javascript".equals(subtype)) { + return true; + } + + return false; + } + + /** + * Determines if the given MediaType is binary. + * Binary types include: application/octet-stream, PDFs, images (except svg+xml), and wildcard + * + * @param contentType The MediaType to check + * @return true if the content type is binary, false otherwise + */ + public static boolean isBinary(MediaType contentType) { + if (contentType == null) { + return false; + } + + String type = contentType.type(); + String subtype = contentType.subtype(); + + // wildcard + if ("*".equals(type) && "*".equals(subtype)) { + return true; + } + + if ("application".equals(type) && "octet-stream".equals(subtype)) { + return true; + } + + if ("application".equals(type) && "pdf".equals(subtype)) { + return true; + } + + if ("image".equals(type) && !"svg+xml".equals(subtype)) { + return true; + } + + return false; + } + + public static MediaType readContentType(Response response) { + if (response.body() != null && response.body().contentType() != null) { + return response.body().contentType(); + } + + return FALLBACK_CONTENT_TYPE; + } +} diff --git a/src/main/java/com/magicbell/magicbelluserclient/http/util/RequestBuilder.java b/src/main/java/com/magicbell/magicbelluserclient/http/util/RequestBuilder.java index 0fdf291..a40268e 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/http/util/RequestBuilder.java +++ b/src/main/java/com/magicbell/magicbelluserclient/http/util/RequestBuilder.java @@ -14,6 +14,11 @@ import okhttp3.RequestBody; import org.jetbrains.annotations.NotNull; +/** + * Fluent builder for constructing OkHttp Request objects with SDK-specific features. + * Handles path/query parameter serialization, header management, authentication, + * and request body construction according to OpenAPI serialization styles. + */ public class RequestBuilder { @NonNull @@ -46,14 +51,26 @@ public RequestBuilder(@NotNull HttpMethod httpMethod, @NotNull String baseUrl, @ } /** - * Sets a path parameter. If the parameter is not present in the URL template, it will be ignored. + * Sets a path parameter using the default SIMPLE serialization style. + * If the parameter is not present in the URL template, it will be ignored. + * + * @param key The path parameter name + * @param value The parameter value + * @return This builder instance for chaining */ public RequestBuilder setPathParameter(@NonNull String key, @NonNull Object value) { return setPathParameter(key, value, PathSerializationStyle.SIMPLE, false); } /** - * Sets a path parameter. If the parameter is not present in the URL template, it will be ignored. + * Sets a path parameter with custom serialization style and explode option. + * If the parameter is not present in the URL template, it will be ignored. + * + * @param key The path parameter name + * @param value The parameter value + * @param style The serialization style to use + * @param explode Whether to explode arrays/objects into separate values + * @return This builder instance for chaining */ public RequestBuilder setPathParameter( @NonNull String key, @@ -67,14 +84,24 @@ public RequestBuilder setPathParameter( } /** - * Sets a query parameter. + * Sets a query parameter using the default FORM serialization style with explode enabled. + * + * @param key The query parameter name + * @param value The parameter value + * @return This builder instance for chaining */ public RequestBuilder setQueryParameter(@NonNull String key, @NonNull Object value) { return setQueryParameter(key, value, QuerySerializationStyle.FORM, true); } /** - * Sets a query parameter. + * Sets a query parameter with custom serialization style and explode option. + * + * @param key The query parameter name + * @param value The parameter value + * @param style The serialization style to use + * @param explode Whether to explode arrays/objects into separate parameters + * @return This builder instance for chaining */ public RequestBuilder setQueryParameter( @NonNull String key, @@ -87,12 +114,25 @@ public RequestBuilder setQueryParameter( return this; } + /** + * Sets a query parameter using the default FORM style if the value is not null. + * + * @param key The query parameter name + * @param value The parameter value (ignored if null) + * @return This builder instance for chaining + */ public RequestBuilder setOptionalQueryParameter(@NonNull String key, Object value) { return setOptionalQueryParameter(key, value, QuerySerializationStyle.FORM, true); } /** - * Sets a query parameter if the value is not null. + * Sets a query parameter with custom serialization if the value is not null. + * + * @param key The query parameter name + * @param value The parameter value (ignored if null) + * @param style The serialization style to use + * @param explode Whether to explode arrays/objects into separate parameters + * @return This builder instance for chaining */ public RequestBuilder setOptionalQueryParameter( @NonNull String key, @@ -107,14 +147,23 @@ public RequestBuilder setOptionalQueryParameter( } /** - * Sets a header. + * Sets a header using SIMPLE serialization style without explode. + * + * @param key The header name + * @param value The header value + * @return This builder instance for chaining */ public RequestBuilder setHeader(@NonNull String key, @NonNull Object value) { return setHeader(key, value, false); } /** - * Sets a header. + * Sets a header using SIMPLE serialization style with custom explode option. + * + * @param key The header name + * @param value The header value + * @param explode Whether to explode arrays/objects + * @return This builder instance for chaining */ public RequestBuilder setHeader(@NonNull String key, @NonNull Object value, boolean explode) { String serializedValue = Serializer.serialize(key, value, SerializationStyle.SIMPLE, explode, false); @@ -123,14 +172,23 @@ public RequestBuilder setHeader(@NonNull String key, @NonNull Object value, bool } /** - * Sets a header if the value is not null. + * Sets a header if the value is not null, using SIMPLE style without explode. + * + * @param key The header name + * @param value The header value (ignored if null) + * @return This builder instance for chaining */ public RequestBuilder setOptionalHeader(@NonNull String key, Object value) { return setOptionalHeader(key, value, false); } /** - * Sets a header if the value is not null. + * Sets a header if the value is not null, with custom explode option. + * + * @param key The header name + * @param value The header value (ignored if null) + * @param explode Whether to explode arrays/objects + * @return This builder instance for chaining */ public RequestBuilder setOptionalHeader(@NonNull String key, Object value, boolean explode) { if (value != null) { @@ -140,7 +198,10 @@ public RequestBuilder setOptionalHeader(@NonNull String key, Object value, boole } /** - * Sets the body of the request. + * Sets the raw request body. + * + * @param body The request body + * @return This builder instance for chaining */ public RequestBuilder setBody(RequestBody body) { this.body = body; @@ -148,14 +209,21 @@ public RequestBuilder setBody(RequestBody body) { } /** - * Sets the content of the request as JSON. + * Sets the request body as JSON using the default application/json media type. + * + * @param content The object to serialize as JSON + * @return This builder instance for chaining */ public RequestBuilder setJsonContent(Object content) { return setJsonContent(content, MediaType.parse("application/json; charset=utf-8")); } /** - * Sets the content of the request as JSON. + * Sets the request body as JSON with a custom media type. + * + * @param content The object to serialize as JSON + * @param mediaType The media type to use + * @return This builder instance for chaining */ public RequestBuilder setJsonContent(Object content, MediaType mediaType) { if (content == null) { @@ -165,8 +233,11 @@ public RequestBuilder setJsonContent(Object content, MediaType mediaType) { return this; } - /* + /** * Sets the access token authentication header with a "Bearer" prefix. + * + * @param token The access token + * @return This builder instance for chaining */ public RequestBuilder setAccessTokenAuth(String token) { if (token == null) { @@ -175,8 +246,12 @@ public RequestBuilder setAccessTokenAuth(String token) { return setAccessTokenAuth(token, "Bearer"); } - /* + /** * Sets the access token authentication header with a custom prefix. + * + * @param token The access token + * @param prefix The authorization prefix (e.g., "Bearer", "Token") + * @return This builder instance for chaining */ public RequestBuilder setAccessTokenAuth(String token, String prefix) { if (token == null || prefix == null) { @@ -186,7 +261,10 @@ public RequestBuilder setAccessTokenAuth(String token, String prefix) { } /** - * @return The {@code Request} instance. + * Builds and returns the configured OkHttp Request instance. + * Applies all path parameters, query parameters, headers, and body to create the final request. + * + * @return The configured Request instance ready to execute */ public Request build() { String url = buildUrl(); @@ -205,6 +283,11 @@ public Request build() { return requestBuilder.build(); } + /** + * Constructs the full URL by combining base URL, path, path parameters, and query parameters. + * + * @return The complete URL string + */ private String buildUrl() { String path = this.path; diff --git a/src/main/java/com/magicbell/magicbelluserclient/json/TypeUtils.java b/src/main/java/com/magicbell/magicbelluserclient/json/TypeUtils.java index fe869cd..247c074 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/json/TypeUtils.java +++ b/src/main/java/com/magicbell/magicbelluserclient/json/TypeUtils.java @@ -5,8 +5,18 @@ import java.util.ArrayList; import java.util.List; +/** + * Utility methods for type handling and reflection operations in JSON serialization. + * Provides helpers for extracting JSON property names and creating generic lists. + */ public class TypeUtils { + /** + * Extracts the JSON property name from a field, using the @JsonProperty annotation if present. + * + * @param type The field to extract the name from + * @return The JSON property name (from annotation) or the field name + */ public static String getJsonPropertyName(Field type) { JsonProperty annotation = type.getAnnotation(JsonProperty.class); if (annotation != null) { @@ -15,6 +25,15 @@ public static String getJsonPropertyName(Field type) { return type.getName(); } + /** + * Creates a generic list with type safety from an array of objects. + * Used for deserializing JSON arrays to strongly-typed Java lists. + * + * @param The element type of the list + * @param type The class of the element type + * @param params The objects to add to the list + * @return A typed list containing the provided elements + */ public static List createGenericList(Class type, Object... params) { List list = new ArrayList<>(); for (Object param : params) { diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ApnsToken.java b/src/main/java/com/magicbell/magicbelluserclient/models/ApnsToken.java index 89e6024..ae4c40b 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/ApnsToken.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ApnsToken.java @@ -1,6 +1,6 @@ package com.magicbell.magicbelluserclient.models; -import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -9,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -18,34 +19,109 @@ @Jacksonized public class ApnsToken { + /** + * The timestamp when the token was created. + */ @NonNull @JsonProperty("created_at") private String createdAt; + /** + * The APNs device token to register with MagicBell. + */ @NonNull @JsonProperty("device_token") private String deviceToken; + /** + * The unique identifier for the token. + */ @NonNull private String id; /** - * (Optional) The bundle identifier of the application that is registering this token. Use this field to override the default identifier specified in the projects APNs integration. + * The bundle identifier of the application registering this token. Use this to override the default identifier configured on the APNs integration. */ @JsonProperty("app_id") - private String appId; + private JsonNullable appId; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the token was discarded, if applicable. + */ @JsonProperty("discarded_at") - private String discardedAt; + private JsonNullable discardedAt; /** - * (Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. + * The APNs environment this token belongs to. If omitted we assume it targets `production`. */ @JsonProperty("installation_id") - private ApnsTokenInstallationId installationId; + private JsonNullable installationId; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the token metadata last changed. + */ @JsonProperty("updated_at") - private String updatedAt; + private JsonNullable updatedAt; + + @JsonIgnore + public String getAppId() { + return appId.orElse(null); + } + + @JsonIgnore + public String getDiscardedAt() { + return discardedAt.orElse(null); + } + + @JsonIgnore + public ApnsTokenInstallationId getInstallationId() { + return installationId.orElse(null); + } + + @JsonIgnore + public String getUpdatedAt() { + return updatedAt.orElse(null); + } + + // Overwrite lombok builder methods + public static class ApnsTokenBuilder { + + private JsonNullable appId = JsonNullable.undefined(); + + @JsonProperty("app_id") + public ApnsTokenBuilder appId(String value) { + if (value == null) { + throw new IllegalStateException("appId cannot be null"); + } + this.appId = JsonNullable.of(value); + return this; + } + + private JsonNullable discardedAt = JsonNullable.undefined(); + + @JsonProperty("discarded_at") + public ApnsTokenBuilder discardedAt(String value) { + this.discardedAt = JsonNullable.of(value); + return this; + } + + private JsonNullable installationId = JsonNullable.undefined(); + + @JsonProperty("installation_id") + public ApnsTokenBuilder installationId(ApnsTokenInstallationId value) { + if (value == null) { + throw new IllegalStateException("installationId cannot be null"); + } + this.installationId = JsonNullable.of(value); + return this; + } + + private JsonNullable updatedAt = JsonNullable.undefined(); + + @JsonProperty("updated_at") + public ApnsTokenBuilder updatedAt(String value) { + this.updatedAt = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ApnsTokenCollection.java b/src/main/java/com/magicbell/magicbelluserclient/models/ApnsTokenCollection.java index f374be0..6db45ed 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/ApnsTokenCollection.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ApnsTokenCollection.java @@ -1,5 +1,7 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import lombok.Builder; import lombok.Data; @@ -7,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,7 +19,45 @@ @Jacksonized public class ApnsTokenCollection { - private List data; + @JsonProperty("data") + private JsonNullable> data; - private Links links; + @JsonProperty("links") + private JsonNullable links; + + @JsonIgnore + public List getData() { + return data.orElse(null); + } + + @JsonIgnore + public Links getLinks() { + return links.orElse(null); + } + + // Overwrite lombok builder methods + public static class ApnsTokenCollectionBuilder { + + private JsonNullable> data = JsonNullable.undefined(); + + @JsonProperty("data") + public ApnsTokenCollectionBuilder data(List value) { + if (value == null) { + throw new IllegalStateException("data cannot be null"); + } + this.data = JsonNullable.of(value); + return this; + } + + private JsonNullable links = JsonNullable.undefined(); + + @JsonProperty("links") + public ApnsTokenCollectionBuilder links(Links value) { + if (value == null) { + throw new IllegalStateException("links cannot be null"); + } + this.links = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ApnsTokenInstallationId.java b/src/main/java/com/magicbell/magicbelluserclient/models/ApnsTokenInstallationId.java index 8ca5044..64fc249 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/ApnsTokenInstallationId.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ApnsTokenInstallationId.java @@ -7,7 +7,7 @@ import lombok.Getter; /** - * (Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. + * The APNs environment this token belongs to. If omitted we assume it targets `production`. */ @Getter @AllArgsConstructor diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ApnsTokenPayload.java b/src/main/java/com/magicbell/magicbelluserclient/models/ApnsTokenPayload.java index b67edcd..c289ad7 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/ApnsTokenPayload.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ApnsTokenPayload.java @@ -1,5 +1,6 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -8,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -17,19 +19,58 @@ @Jacksonized public class ApnsTokenPayload { + /** + * The APNs device token to register with MagicBell. + */ @NonNull @JsonProperty("device_token") private String deviceToken; /** - * (Optional) The bundle identifier of the application that is registering this token. Use this field to override the default identifier specified in the projects APNs integration. + * The bundle identifier of the application registering this token. Use this to override the default identifier configured on the APNs integration. */ @JsonProperty("app_id") - private String appId; + private JsonNullable appId; /** - * (Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. + * The APNs environment this token belongs to. If omitted we assume it targets `production`. */ @JsonProperty("installation_id") - private ApnsTokenPayloadInstallationId installationId; + private JsonNullable installationId; + + @JsonIgnore + public String getAppId() { + return appId.orElse(null); + } + + @JsonIgnore + public ApnsTokenPayloadInstallationId getInstallationId() { + return installationId.orElse(null); + } + + // Overwrite lombok builder methods + public static class ApnsTokenPayloadBuilder { + + private JsonNullable appId = JsonNullable.undefined(); + + @JsonProperty("app_id") + public ApnsTokenPayloadBuilder appId(String value) { + if (value == null) { + throw new IllegalStateException("appId cannot be null"); + } + this.appId = JsonNullable.of(value); + return this; + } + + private JsonNullable installationId = JsonNullable.undefined(); + + @JsonProperty("installation_id") + public ApnsTokenPayloadBuilder installationId(ApnsTokenPayloadInstallationId value) { + if (value == null) { + throw new IllegalStateException("installationId cannot be null"); + } + this.installationId = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ApnsTokenPayloadInstallationId.java b/src/main/java/com/magicbell/magicbelluserclient/models/ApnsTokenPayloadInstallationId.java index 4f81dda..db65c26 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/ApnsTokenPayloadInstallationId.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ApnsTokenPayloadInstallationId.java @@ -7,7 +7,7 @@ import lombok.Getter; /** - * (Optional) The APNs environment the token is registered for. If none is provided we assume the token is used in `production`. + * The APNs environment this token belongs to. If omitted we assume it targets `production`. */ @Getter @AllArgsConstructor diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ArchiveAllNotificationsParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/ArchiveAllNotificationsParameters.java new file mode 100644 index 0000000..9b33e6f --- /dev/null +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ArchiveAllNotificationsParameters.java @@ -0,0 +1,68 @@ +package com.magicbell.magicbelluserclient.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class ArchiveAllNotificationsParameters { + + /** + * filter notifications by their category + */ + @JsonProperty("category") + private JsonNullable category; + + /** + * filter notifications by their topic + */ + @JsonProperty("topic") + private JsonNullable topic; + + @JsonIgnore + public String getCategory() { + return category.orElse(null); + } + + @JsonIgnore + public String getTopic() { + return topic.orElse(null); + } + + // Overwrite lombok builder methods + public static class ArchiveAllNotificationsParametersBuilder { + + private JsonNullable category = JsonNullable.undefined(); + + @JsonProperty("category") + public ArchiveAllNotificationsParametersBuilder category(String value) { + if (value == null) { + throw new IllegalStateException("category cannot be null"); + } + this.category = JsonNullable.of(value); + return this; + } + + private JsonNullable topic = JsonNullable.undefined(); + + @JsonProperty("topic") + public ArchiveAllNotificationsParametersBuilder topic(String value) { + if (value == null) { + throw new IllegalStateException("topic cannot be null"); + } + this.topic = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/AuthedUser.java b/src/main/java/com/magicbell/magicbelluserclient/models/AuthedUser.java index 4e740a0..973c329 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/AuthedUser.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/AuthedUser.java @@ -1,5 +1,6 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -8,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -17,20 +19,123 @@ @Jacksonized public class AuthedUser { + /** + * Slack user ID for the installer. + */ @NonNull private String id; + /** + * User token returned from the OAuth exchange. + */ @JsonProperty("access_token") - private String accessToken; + private JsonNullable accessToken; + /** + * Seconds until the user token expires. + */ @JsonProperty("expires_in") - private Long expiresIn; + private JsonNullable expiresIn; + /** + * Refresh token for the authed user. + */ @JsonProperty("refresh_token") - private String refreshToken; + private JsonNullable refreshToken; - private String scope; + /** + * Space-delimited OAuth scopes granted to the user token. + */ + @JsonProperty("scope") + private JsonNullable scope; + /** + * Token type value provided by Slack. + */ @JsonProperty("token_type") - private String tokenType; + private JsonNullable tokenType; + + @JsonIgnore + public String getAccessToken() { + return accessToken.orElse(null); + } + + @JsonIgnore + public Long getExpiresIn() { + return expiresIn.orElse(null); + } + + @JsonIgnore + public String getRefreshToken() { + return refreshToken.orElse(null); + } + + @JsonIgnore + public String getScope() { + return scope.orElse(null); + } + + @JsonIgnore + public String getTokenType() { + return tokenType.orElse(null); + } + + // Overwrite lombok builder methods + public static class AuthedUserBuilder { + + private JsonNullable accessToken = JsonNullable.undefined(); + + @JsonProperty("access_token") + public AuthedUserBuilder accessToken(String value) { + if (value == null) { + throw new IllegalStateException("accessToken cannot be null"); + } + this.accessToken = JsonNullable.of(value); + return this; + } + + private JsonNullable expiresIn = JsonNullable.undefined(); + + @JsonProperty("expires_in") + public AuthedUserBuilder expiresIn(Long value) { + if (value == null) { + throw new IllegalStateException("expiresIn cannot be null"); + } + this.expiresIn = JsonNullable.of(value); + return this; + } + + private JsonNullable refreshToken = JsonNullable.undefined(); + + @JsonProperty("refresh_token") + public AuthedUserBuilder refreshToken(String value) { + if (value == null) { + throw new IllegalStateException("refreshToken cannot be null"); + } + this.refreshToken = JsonNullable.of(value); + return this; + } + + private JsonNullable scope = JsonNullable.undefined(); + + @JsonProperty("scope") + public AuthedUserBuilder scope(String value) { + if (value == null) { + throw new IllegalStateException("scope cannot be null"); + } + this.scope = JsonNullable.of(value); + return this; + } + + private JsonNullable tokenType = JsonNullable.undefined(); + + @JsonProperty("token_type") + public AuthedUserBuilder tokenType(String value) { + if (value == null) { + throw new IllegalStateException("tokenType cannot be null"); + } + this.tokenType = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/Banner.java b/src/main/java/com/magicbell/magicbelluserclient/models/Banner.java index 5b603d7..0fd18be 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/Banner.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/Banner.java @@ -1,5 +1,7 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; @@ -7,7 +9,11 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; +/** + * Top banner styling options. + */ @Data @Builder @With @@ -16,14 +22,47 @@ @Jacksonized public class Banner { + /** + * Banner background color. + */ @NonNull private String backgroundColor; + /** + * Font size for banner text. + */ @NonNull private String fontSize; + /** + * Banner text color. + */ @NonNull private String textColor; - private Double backgroundOpacity; + /** + * Opacity applied to the banner background. + */ + @JsonProperty("backgroundOpacity") + private JsonNullable backgroundOpacity; + + @JsonIgnore + public Double getBackgroundOpacity() { + return backgroundOpacity.orElse(null); + } + + // Overwrite lombok builder methods + public static class BannerBuilder { + + private JsonNullable backgroundOpacity = JsonNullable.undefined(); + + @JsonProperty("backgroundOpacity") + public BannerBuilder backgroundOpacity(Double value) { + if (value == null) { + throw new IllegalStateException("backgroundOpacity cannot be null"); + } + this.backgroundOpacity = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/Categories.java b/src/main/java/com/magicbell/magicbelluserclient/models/Categories.java new file mode 100644 index 0000000..33865e2 --- /dev/null +++ b/src/main/java/com/magicbell/magicbelluserclient/models/Categories.java @@ -0,0 +1,79 @@ +package com.magicbell.magicbelluserclient.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class Categories { + + @JsonProperty("channels") + private JsonNullable> channels; + + @JsonProperty("key") + private JsonNullable key; + + @JsonProperty("label") + private JsonNullable label; + + @JsonIgnore + public List getChannels() { + return channels.orElse(null); + } + + @JsonIgnore + public String getKey() { + return key.orElse(null); + } + + @JsonIgnore + public String getLabel() { + return label.orElse(null); + } + + // Overwrite lombok builder methods + public static class CategoriesBuilder { + + private JsonNullable> channels = JsonNullable.undefined(); + + @JsonProperty("channels") + public CategoriesBuilder channels(List value) { + if (value == null) { + throw new IllegalStateException("channels cannot be null"); + } + this.channels = JsonNullable.of(value); + return this; + } + + private JsonNullable key = JsonNullable.undefined(); + + @JsonProperty("key") + public CategoriesBuilder key(String value) { + if (value == null) { + throw new IllegalStateException("key cannot be null"); + } + this.key = JsonNullable.of(value); + return this; + } + + private JsonNullable label = JsonNullable.undefined(); + + @JsonProperty("label") + public CategoriesBuilder label(String value) { + this.label = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/Channels.java b/src/main/java/com/magicbell/magicbelluserclient/models/Channels.java new file mode 100644 index 0000000..839fa57 --- /dev/null +++ b/src/main/java/com/magicbell/magicbelluserclient/models/Channels.java @@ -0,0 +1,62 @@ +package com.magicbell.magicbelluserclient.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class Channels { + + @JsonProperty("enabled") + private JsonNullable enabled; + + @JsonProperty("name") + private JsonNullable name; + + @JsonIgnore + public Boolean getEnabled() { + return enabled.orElse(null); + } + + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + // Overwrite lombok builder methods + public static class ChannelsBuilder { + + private JsonNullable enabled = JsonNullable.undefined(); + + @JsonProperty("enabled") + public ChannelsBuilder enabled(Boolean value) { + if (value == null) { + throw new IllegalStateException("enabled cannot be null"); + } + this.enabled = JsonNullable.of(value); + return this; + } + + private JsonNullable name = JsonNullable.undefined(); + + @JsonProperty("name") + public ChannelsBuilder name(String value) { + if (value == null) { + throw new IllegalStateException("name cannot be null"); + } + this.name = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/TemplatesInstallation.java b/src/main/java/com/magicbell/magicbelluserclient/models/CountResponse.java similarity index 58% rename from src/main/java/com/magicbell/magicbelluserclient/models/TemplatesInstallation.java rename to src/main/java/com/magicbell/magicbelluserclient/models/CountResponse.java index bfa17b8..d3748fd 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/TemplatesInstallation.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/CountResponse.java @@ -1,6 +1,5 @@ package com.magicbell.magicbelluserclient.models; -import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; @@ -15,14 +14,11 @@ @ToString @EqualsAndHashCode @Jacksonized -public class TemplatesInstallation { +public class CountResponse { + /** + * The count of notifications matching the query. + */ @NonNull - private String channel; - - @NonNull - private String text; - - @JsonInclude(JsonInclude.Include.ALWAYS) - private String category; + private Long count; } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/DefaultHover.java b/src/main/java/com/magicbell/magicbelluserclient/models/DefaultHover.java index f94789b..59bde93 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/DefaultHover.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/DefaultHover.java @@ -8,6 +8,9 @@ import lombok.With; import lombok.extern.jackson.Jacksonized; +/** + * Styles applied when a notification is hovered. + */ @Data @Builder @With @@ -16,6 +19,9 @@ @Jacksonized public class DefaultHover { + /** + * Background color on hover. + */ @NonNull private String backgroundColor; } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/DefaultState.java b/src/main/java/com/magicbell/magicbelluserclient/models/DefaultState.java index f80209c..04b75f7 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/DefaultState.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/DefaultState.java @@ -8,6 +8,9 @@ import lombok.With; import lombok.extern.jackson.Jacksonized; +/** + * Accent colors for notification state indicators. + */ @Data @Builder @With @@ -16,6 +19,9 @@ @Jacksonized public class DefaultState { + /** + * Color used for the state indicator. + */ @NonNull private String color; } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/Default_.java b/src/main/java/com/magicbell/magicbelluserclient/models/Default_.java index e689332..e7a2f49 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/Default_.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/Default_.java @@ -1,5 +1,7 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; @@ -7,7 +9,11 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; +/** + * Base styles applied to every notification item. + */ @Data @Builder @With @@ -16,25 +22,87 @@ @Jacksonized public class Default_ { + /** + * Background color for notifications in their default state. + */ @NonNull private String backgroundColor; + /** + * Border radius applied to each notification card. + */ @NonNull private String borderRadius; + /** + * Font family for notification text. + */ @NonNull private String fontFamily; + /** + * Font size for notification text. + */ @NonNull private String fontSize; + /** + * CSS margin applied around each notification card. + */ @NonNull private String margin; + /** + * Default text color for notifications. + */ @NonNull private String textColor; - private DefaultHover hover; + /** + * Styles applied when a notification is hovered. + */ + @JsonProperty("hover") + private JsonNullable hover; - private DefaultState state; + /** + * Accent colors for notification state indicators. + */ + @JsonProperty("state") + private JsonNullable state; + + @JsonIgnore + public DefaultHover getHover() { + return hover.orElse(null); + } + + @JsonIgnore + public DefaultState getState() { + return state.orElse(null); + } + + // Overwrite lombok builder methods + public static class Default_Builder { + + private JsonNullable hover = JsonNullable.undefined(); + + @JsonProperty("hover") + public Default_Builder hover(DefaultHover value) { + if (value == null) { + throw new IllegalStateException("hover cannot be null"); + } + this.hover = JsonNullable.of(value); + return this; + } + + private JsonNullable state = JsonNullable.undefined(); + + @JsonProperty("state") + public Default_Builder state(DefaultState value) { + if (value == null) { + throw new IllegalStateException("state cannot be null"); + } + this.state = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/Dialog.java b/src/main/java/com/magicbell/magicbelluserclient/models/Dialog.java index 5cd3008..d2bb890 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/Dialog.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/Dialog.java @@ -8,6 +8,9 @@ import lombok.With; import lombok.extern.jackson.Jacksonized; +/** + * Styling for confirmation and action dialogs. + */ @Data @Builder @With @@ -16,12 +19,21 @@ @Jacksonized public class Dialog { + /** + * Accent color for dialog buttons and highlights. + */ @NonNull private String accentColor; + /** + * Dialog background color. + */ @NonNull private String backgroundColor; + /** + * Dialog text color. + */ @NonNull private String textColor; } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/DiscardResult.java b/src/main/java/com/magicbell/magicbelluserclient/models/DiscardResult.java index 7b1854e..77b4462 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/DiscardResult.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/DiscardResult.java @@ -1,5 +1,6 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -7,6 +8,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,8 +18,51 @@ @Jacksonized public class DiscardResult { + /** + * The timestamp when the token was discarded. + */ @JsonProperty("discarded_at") - private String discardedAt; + private JsonNullable discardedAt; - private String id; + /** + * The unique identifier for the discarded token. + */ + @JsonProperty("id") + private JsonNullable id; + + @JsonIgnore + public String getDiscardedAt() { + return discardedAt.orElse(null); + } + + @JsonIgnore + public String getId() { + return id.orElse(null); + } + + // Overwrite lombok builder methods + public static class DiscardResultBuilder { + + private JsonNullable discardedAt = JsonNullable.undefined(); + + @JsonProperty("discarded_at") + public DiscardResultBuilder discardedAt(String value) { + if (value == null) { + throw new IllegalStateException("discardedAt cannot be null"); + } + this.discardedAt = JsonNullable.of(value); + return this; + } + + private JsonNullable id = JsonNullable.undefined(); + + @JsonProperty("id") + public DiscardResultBuilder id(String value) { + if (value == null) { + throw new IllegalStateException("id cannot be null"); + } + this.id = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/Enterprise.java b/src/main/java/com/magicbell/magicbelluserclient/models/Enterprise.java index e2fa2b0..5ba9b17 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/Enterprise.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/Enterprise.java @@ -16,9 +16,15 @@ @Jacksonized public class Enterprise { + /** + * Enterprise grid identifier. + */ @NonNull private String id; + /** + * Enterprise grid name. + */ @NonNull private String name; } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ExpoToken.java b/src/main/java/com/magicbell/magicbelluserclient/models/ExpoToken.java index 8c3da1b..88d3350 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/ExpoToken.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ExpoToken.java @@ -1,6 +1,6 @@ package com.magicbell.magicbelluserclient.models; -import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -9,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -18,22 +19,65 @@ @Jacksonized public class ExpoToken { + /** + * The timestamp when the token was created. + */ @NonNull @JsonProperty("created_at") private String createdAt; + /** + * The Expo push token returned by the Expo client. + */ @NonNull @JsonProperty("device_token") private String deviceToken; + /** + * The unique identifier for the token. + */ @NonNull private String id; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the token was discarded, if applicable. + */ @JsonProperty("discarded_at") - private String discardedAt; + private JsonNullable discardedAt; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the token metadata last changed. + */ @JsonProperty("updated_at") - private String updatedAt; + private JsonNullable updatedAt; + + @JsonIgnore + public String getDiscardedAt() { + return discardedAt.orElse(null); + } + + @JsonIgnore + public String getUpdatedAt() { + return updatedAt.orElse(null); + } + + // Overwrite lombok builder methods + public static class ExpoTokenBuilder { + + private JsonNullable discardedAt = JsonNullable.undefined(); + + @JsonProperty("discarded_at") + public ExpoTokenBuilder discardedAt(String value) { + this.discardedAt = JsonNullable.of(value); + return this; + } + + private JsonNullable updatedAt = JsonNullable.undefined(); + + @JsonProperty("updated_at") + public ExpoTokenBuilder updatedAt(String value) { + this.updatedAt = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ExpoTokenCollection.java b/src/main/java/com/magicbell/magicbelluserclient/models/ExpoTokenCollection.java index 5d009c5..ec78db2 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/ExpoTokenCollection.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ExpoTokenCollection.java @@ -1,5 +1,7 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import lombok.Builder; import lombok.Data; @@ -7,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,7 +19,45 @@ @Jacksonized public class ExpoTokenCollection { - private List data; + @JsonProperty("data") + private JsonNullable> data; - private Links links; + @JsonProperty("links") + private JsonNullable links; + + @JsonIgnore + public List getData() { + return data.orElse(null); + } + + @JsonIgnore + public Links getLinks() { + return links.orElse(null); + } + + // Overwrite lombok builder methods + public static class ExpoTokenCollectionBuilder { + + private JsonNullable> data = JsonNullable.undefined(); + + @JsonProperty("data") + public ExpoTokenCollectionBuilder data(List value) { + if (value == null) { + throw new IllegalStateException("data cannot be null"); + } + this.data = JsonNullable.of(value); + return this; + } + + private JsonNullable links = JsonNullable.undefined(); + + @JsonProperty("links") + public ExpoTokenCollectionBuilder links(Links value) { + if (value == null) { + throw new IllegalStateException("links cannot be null"); + } + this.links = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ExpoTokenPayload.java b/src/main/java/com/magicbell/magicbelluserclient/models/ExpoTokenPayload.java index 145c935..ca472d6 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/ExpoTokenPayload.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ExpoTokenPayload.java @@ -17,6 +17,9 @@ @Jacksonized public class ExpoTokenPayload { + /** + * The Expo push token returned by the Expo client. + */ @NonNull @JsonProperty("device_token") private String deviceToken; diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/FcmToken.java b/src/main/java/com/magicbell/magicbelluserclient/models/FcmToken.java index 86e37d8..83b1e5e 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/FcmToken.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/FcmToken.java @@ -1,6 +1,6 @@ package com.magicbell.magicbelluserclient.models; -import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -9,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -18,25 +19,65 @@ @Jacksonized public class FcmToken { + /** + * The timestamp when the token was created. + */ @NonNull @JsonProperty("created_at") private String createdAt; + /** + * The Firebase Cloud Messaging device registration token to associate with the user. + */ @NonNull @JsonProperty("device_token") private String deviceToken; + /** + * The unique identifier for the token. + */ @NonNull private String id; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the token was discarded, if applicable. + */ @JsonProperty("discarded_at") - private String discardedAt; + private JsonNullable discardedAt; - @JsonProperty("installation_id") - private FcmTokenInstallationId installationId; - - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the token metadata last changed. + */ @JsonProperty("updated_at") - private String updatedAt; + private JsonNullable updatedAt; + + @JsonIgnore + public String getDiscardedAt() { + return discardedAt.orElse(null); + } + + @JsonIgnore + public String getUpdatedAt() { + return updatedAt.orElse(null); + } + + // Overwrite lombok builder methods + public static class FcmTokenBuilder { + + private JsonNullable discardedAt = JsonNullable.undefined(); + + @JsonProperty("discarded_at") + public FcmTokenBuilder discardedAt(String value) { + this.discardedAt = JsonNullable.of(value); + return this; + } + + private JsonNullable updatedAt = JsonNullable.undefined(); + + @JsonProperty("updated_at") + public FcmTokenBuilder updatedAt(String value) { + this.updatedAt = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/FcmTokenCollection.java b/src/main/java/com/magicbell/magicbelluserclient/models/FcmTokenCollection.java index ff8371f..30c85c1 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/FcmTokenCollection.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/FcmTokenCollection.java @@ -1,5 +1,7 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import lombok.Builder; import lombok.Data; @@ -7,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,7 +19,45 @@ @Jacksonized public class FcmTokenCollection { - private List data; + @JsonProperty("data") + private JsonNullable> data; - private Links links; + @JsonProperty("links") + private JsonNullable links; + + @JsonIgnore + public List getData() { + return data.orElse(null); + } + + @JsonIgnore + public Links getLinks() { + return links.orElse(null); + } + + // Overwrite lombok builder methods + public static class FcmTokenCollectionBuilder { + + private JsonNullable> data = JsonNullable.undefined(); + + @JsonProperty("data") + public FcmTokenCollectionBuilder data(List value) { + if (value == null) { + throw new IllegalStateException("data cannot be null"); + } + this.data = JsonNullable.of(value); + return this; + } + + private JsonNullable links = JsonNullable.undefined(); + + @JsonProperty("links") + public FcmTokenCollectionBuilder links(Links value) { + if (value == null) { + throw new IllegalStateException("links cannot be null"); + } + this.links = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/FcmTokenInstallationId.java b/src/main/java/com/magicbell/magicbelluserclient/models/FcmTokenInstallationId.java deleted file mode 100644 index bca8d9e..0000000 --- a/src/main/java/com/magicbell/magicbelluserclient/models/FcmTokenInstallationId.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.magicbell.magicbelluserclient.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Arrays; -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public enum FcmTokenInstallationId { - DEVELOPMENT("development"), - PRODUCTION("production"); - - @JsonValue - private final String value; - - @JsonCreator - public static FcmTokenInstallationId fromValue(String value) { - return Arrays.stream(FcmTokenInstallationId.values()) - .filter(item -> item.value.equals(value)) - .findFirst() - .orElse(null); - } -} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/FcmTokenPayload.java b/src/main/java/com/magicbell/magicbelluserclient/models/FcmTokenPayload.java index baf30cc..e7f59ec 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/FcmTokenPayload.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/FcmTokenPayload.java @@ -17,10 +17,10 @@ @Jacksonized public class FcmTokenPayload { + /** + * The Firebase Cloud Messaging device registration token to associate with the user. + */ @NonNull @JsonProperty("device_token") private String deviceToken; - - @JsonProperty("installation_id") - private FcmTokenPayloadInstallationId installationId; } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/FcmTokenPayloadInstallationId.java b/src/main/java/com/magicbell/magicbelluserclient/models/FcmTokenPayloadInstallationId.java deleted file mode 100644 index 1bba7ca..0000000 --- a/src/main/java/com/magicbell/magicbelluserclient/models/FcmTokenPayloadInstallationId.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.magicbell.magicbelluserclient.models; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.util.Arrays; -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Getter -@AllArgsConstructor -public enum FcmTokenPayloadInstallationId { - DEVELOPMENT("development"), - PRODUCTION("production"); - - @JsonValue - private final String value; - - @JsonCreator - public static FcmTokenPayloadInstallationId fromValue(String value) { - return Arrays.stream(FcmTokenPayloadInstallationId.values()) - .filter(item -> item.value.equals(value)) - .findFirst() - .orElse(null); - } -} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/FetchUnreadNotificationsCountParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/FetchUnreadNotificationsCountParameters.java new file mode 100644 index 0000000..95041e9 --- /dev/null +++ b/src/main/java/com/magicbell/magicbelluserclient/models/FetchUnreadNotificationsCountParameters.java @@ -0,0 +1,68 @@ +package com.magicbell.magicbelluserclient.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class FetchUnreadNotificationsCountParameters { + + /** + * filter notifications by their category + */ + @JsonProperty("category") + private JsonNullable category; + + /** + * filter notifications by their topic + */ + @JsonProperty("topic") + private JsonNullable topic; + + @JsonIgnore + public String getCategory() { + return category.orElse(null); + } + + @JsonIgnore + public String getTopic() { + return topic.orElse(null); + } + + // Overwrite lombok builder methods + public static class FetchUnreadNotificationsCountParametersBuilder { + + private JsonNullable category = JsonNullable.undefined(); + + @JsonProperty("category") + public FetchUnreadNotificationsCountParametersBuilder category(String value) { + if (value == null) { + throw new IllegalStateException("category cannot be null"); + } + this.category = JsonNullable.of(value); + return this; + } + + private JsonNullable topic = JsonNullable.undefined(); + + @JsonProperty("topic") + public FetchUnreadNotificationsCountParametersBuilder topic(String value) { + if (value == null) { + throw new IllegalStateException("topic cannot be null"); + } + this.topic = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/Footer.java b/src/main/java/com/magicbell/magicbelluserclient/models/Footer.java index 8ae5dc3..b104f2f 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/Footer.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/Footer.java @@ -8,6 +8,9 @@ import lombok.With; import lombok.extern.jackson.Jacksonized; +/** + * Footer styling for the inbox modal. + */ @Data @Builder @With @@ -16,15 +19,27 @@ @Jacksonized public class Footer { + /** + * Footer background color. + */ @NonNull private String backgroundColor; + /** + * Border radius applied to the footer container. + */ @NonNull private String borderRadius; + /** + * Font size used in the footer. + */ @NonNull private String fontSize; + /** + * Footer text color. + */ @NonNull private String textColor; } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/GetInAppInboxTokensParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/GetInAppInboxTokensParameters.java deleted file mode 100644 index ed34e0a..0000000 --- a/src/main/java/com/magicbell/magicbelluserclient/models/GetInAppInboxTokensParameters.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.magicbell.magicbelluserclient.models; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; -import lombok.With; -import lombok.extern.jackson.Jacksonized; - -@Data -@Builder -@With -@ToString -@EqualsAndHashCode -@Jacksonized -public class GetInAppInboxTokensParameters { - - private Long limit; - - @JsonProperty("starting_after") - private String startingAfter; - - @JsonProperty("ending_before") - private String endingBefore; -} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/GetMobilePushApnsTokensParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/GetMobilePushApnsTokensParameters.java deleted file mode 100644 index 5cbc028..0000000 --- a/src/main/java/com/magicbell/magicbelluserclient/models/GetMobilePushApnsTokensParameters.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.magicbell.magicbelluserclient.models; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; -import lombok.With; -import lombok.extern.jackson.Jacksonized; - -@Data -@Builder -@With -@ToString -@EqualsAndHashCode -@Jacksonized -public class GetMobilePushApnsTokensParameters { - - private Long limit; - - @JsonProperty("starting_after") - private String startingAfter; - - @JsonProperty("ending_before") - private String endingBefore; -} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/GetMobilePushExpoTokensParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/GetMobilePushExpoTokensParameters.java deleted file mode 100644 index c2b9ecc..0000000 --- a/src/main/java/com/magicbell/magicbelluserclient/models/GetMobilePushExpoTokensParameters.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.magicbell.magicbelluserclient.models; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; -import lombok.With; -import lombok.extern.jackson.Jacksonized; - -@Data -@Builder -@With -@ToString -@EqualsAndHashCode -@Jacksonized -public class GetMobilePushExpoTokensParameters { - - private Long limit; - - @JsonProperty("starting_after") - private String startingAfter; - - @JsonProperty("ending_before") - private String endingBefore; -} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/GetMobilePushFcmTokensParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/GetMobilePushFcmTokensParameters.java deleted file mode 100644 index 7a2e8e7..0000000 --- a/src/main/java/com/magicbell/magicbelluserclient/models/GetMobilePushFcmTokensParameters.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.magicbell.magicbelluserclient.models; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; -import lombok.With; -import lombok.extern.jackson.Jacksonized; - -@Data -@Builder -@With -@ToString -@EqualsAndHashCode -@Jacksonized -public class GetMobilePushFcmTokensParameters { - - private Long limit; - - @JsonProperty("starting_after") - private String startingAfter; - - @JsonProperty("ending_before") - private String endingBefore; -} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/GetSlackTokensParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/GetSlackTokensParameters.java deleted file mode 100644 index d0543da..0000000 --- a/src/main/java/com/magicbell/magicbelluserclient/models/GetSlackTokensParameters.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.magicbell.magicbelluserclient.models; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; -import lombok.With; -import lombok.extern.jackson.Jacksonized; - -@Data -@Builder -@With -@ToString -@EqualsAndHashCode -@Jacksonized -public class GetSlackTokensParameters { - - private Long limit; - - @JsonProperty("starting_after") - private String startingAfter; - - @JsonProperty("ending_before") - private String endingBefore; -} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/GetTeamsTokensParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/GetTeamsTokensParameters.java deleted file mode 100644 index 6574a40..0000000 --- a/src/main/java/com/magicbell/magicbelluserclient/models/GetTeamsTokensParameters.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.magicbell.magicbelluserclient.models; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; -import lombok.With; -import lombok.extern.jackson.Jacksonized; - -@Data -@Builder -@With -@ToString -@EqualsAndHashCode -@Jacksonized -public class GetTeamsTokensParameters { - - private Long limit; - - @JsonProperty("starting_after") - private String startingAfter; - - @JsonProperty("ending_before") - private String endingBefore; -} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/GetWebPushTokensParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/GetWebPushTokensParameters.java deleted file mode 100644 index b5cfc3d..0000000 --- a/src/main/java/com/magicbell/magicbelluserclient/models/GetWebPushTokensParameters.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.magicbell.magicbelluserclient.models; - -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Builder; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; -import lombok.With; -import lombok.extern.jackson.Jacksonized; - -@Data -@Builder -@With -@ToString -@EqualsAndHashCode -@Jacksonized -public class GetWebPushTokensParameters { - - private Long limit; - - @JsonProperty("starting_after") - private String startingAfter; - - @JsonProperty("ending_before") - private String endingBefore; -} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/Header.java b/src/main/java/com/magicbell/magicbelluserclient/models/Header.java index 009dd35..8a88dc4 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/Header.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/Header.java @@ -8,6 +8,9 @@ import lombok.With; import lombok.extern.jackson.Jacksonized; +/** + * Header styling for the inbox modal. + */ @Data @Builder @With @@ -16,18 +19,33 @@ @Jacksonized public class Header { + /** + * Header background color. + */ @NonNull private String backgroundColor; + /** + * Border radius applied to the header container. + */ @NonNull private String borderRadius; + /** + * CSS font family for the header title. + */ @NonNull private String fontFamily; + /** + * Font size used in the header. + */ @NonNull private String fontSize; + /** + * Header text color. + */ @NonNull private String textColor; } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/Icon.java b/src/main/java/com/magicbell/magicbelluserclient/models/Icon.java index 529196d..8f5e961 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/Icon.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/Icon.java @@ -8,6 +8,9 @@ import lombok.With; import lombok.extern.jackson.Jacksonized; +/** + * Launcher icon styling overrides. + */ @Data @Builder @With @@ -16,9 +19,15 @@ @Jacksonized public class Icon { + /** + * CSS color used for the icon border. + */ @NonNull private String borderColor; + /** + * Width of the launcher icon (any CSS length). + */ @NonNull private String width; } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/Images.java b/src/main/java/com/magicbell/magicbelluserclient/models/Images.java index fb47d78..6e3db69 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/Images.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/Images.java @@ -8,6 +8,9 @@ import lombok.With; import lombok.extern.jackson.Jacksonized; +/** + * Image overrides for assets used in the inbox UI. + */ @Data @Builder @With @@ -16,6 +19,9 @@ @Jacksonized public class Images { + /** + * URL for the illustration shown when the inbox is empty. + */ @NonNull private String emptyInboxUrl; } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/InboxConfigPayload.java b/src/main/java/com/magicbell/magicbelluserclient/models/InboxConfigPayload.java index 401bd0e..a51a555 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/InboxConfigPayload.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/InboxConfigPayload.java @@ -16,12 +16,21 @@ @Jacksonized public class InboxConfigPayload { + /** + * Image overrides for assets used in the inbox UI. + */ @JsonInclude(JsonInclude.Include.ALWAYS) private Images images; + /** + * Locale code (ISO language tag) used to localize built-in strings. + */ @JsonInclude(JsonInclude.Include.ALWAYS) private String locale; + /** + * Visual customization options for the hosted inbox widget. + */ @JsonInclude(JsonInclude.Include.ALWAYS) private Theme theme; diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/InboxToken.java b/src/main/java/com/magicbell/magicbelluserclient/models/InboxToken.java index 773177a..2e88d6a 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/InboxToken.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/InboxToken.java @@ -1,6 +1,6 @@ package com.magicbell.magicbelluserclient.models; -import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -9,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -18,10 +19,32 @@ @Jacksonized public class InboxToken { + /** + * The in-app inbox token generated for this user. + */ @NonNull private String token; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * Realtime connection ID to restrict delivery to a specific Ably connection. + */ @JsonProperty("connection_id") - private String connectionId; + private JsonNullable connectionId; + + @JsonIgnore + public String getConnectionId() { + return connectionId.orElse(null); + } + + // Overwrite lombok builder methods + public static class InboxTokenBuilder { + + private JsonNullable connectionId = JsonNullable.undefined(); + + @JsonProperty("connection_id") + public InboxTokenBuilder connectionId(String value) { + this.connectionId = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/InboxTokenResponse.java b/src/main/java/com/magicbell/magicbelluserclient/models/InboxTokenResponse.java index 54ffda5..9b53b90 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/InboxTokenResponse.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/InboxTokenResponse.java @@ -1,6 +1,6 @@ package com.magicbell.magicbelluserclient.models; -import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -9,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -18,25 +19,83 @@ @Jacksonized public class InboxTokenResponse { + /** + * The timestamp when the token was created. + */ @NonNull @JsonProperty("created_at") private String createdAt; + /** + * The unique identifier for the token. + */ @NonNull private String id; + /** + * The in-app inbox token generated for this user. + */ @NonNull private String token; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * Realtime connection ID to restrict delivery to a specific Ably connection. + */ @JsonProperty("connection_id") - private String connectionId; + private JsonNullable connectionId; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the token was discarded, if applicable. + */ @JsonProperty("discarded_at") - private String discardedAt; + private JsonNullable discardedAt; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the token metadata last changed. + */ @JsonProperty("updated_at") - private String updatedAt; + private JsonNullable updatedAt; + + @JsonIgnore + public String getConnectionId() { + return connectionId.orElse(null); + } + + @JsonIgnore + public String getDiscardedAt() { + return discardedAt.orElse(null); + } + + @JsonIgnore + public String getUpdatedAt() { + return updatedAt.orElse(null); + } + + // Overwrite lombok builder methods + public static class InboxTokenResponseBuilder { + + private JsonNullable connectionId = JsonNullable.undefined(); + + @JsonProperty("connection_id") + public InboxTokenResponseBuilder connectionId(String value) { + this.connectionId = JsonNullable.of(value); + return this; + } + + private JsonNullable discardedAt = JsonNullable.undefined(); + + @JsonProperty("discarded_at") + public InboxTokenResponseBuilder discardedAt(String value) { + this.discardedAt = JsonNullable.of(value); + return this; + } + + private JsonNullable updatedAt = JsonNullable.undefined(); + + @JsonProperty("updated_at") + public InboxTokenResponseBuilder updatedAt(String value) { + this.updatedAt = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/InboxTokenResponseCollection.java b/src/main/java/com/magicbell/magicbelluserclient/models/InboxTokenResponseCollection.java index a4379e0..1e8794d 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/InboxTokenResponseCollection.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/InboxTokenResponseCollection.java @@ -1,5 +1,7 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import lombok.Builder; import lombok.Data; @@ -7,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,7 +19,45 @@ @Jacksonized public class InboxTokenResponseCollection { - private List data; + @JsonProperty("data") + private JsonNullable> data; - private Links links; + @JsonProperty("links") + private JsonNullable links; + + @JsonIgnore + public List getData() { + return data.orElse(null); + } + + @JsonIgnore + public Links getLinks() { + return links.orElse(null); + } + + // Overwrite lombok builder methods + public static class InboxTokenResponseCollectionBuilder { + + private JsonNullable> data = JsonNullable.undefined(); + + @JsonProperty("data") + public InboxTokenResponseCollectionBuilder data(List value) { + if (value == null) { + throw new IllegalStateException("data cannot be null"); + } + this.data = JsonNullable.of(value); + return this; + } + + private JsonNullable links = JsonNullable.undefined(); + + @JsonProperty("links") + public InboxTokenResponseCollectionBuilder links(Links value) { + if (value == null) { + throw new IllegalStateException("links cannot be null"); + } + this.links = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/IncomingWebhook.java b/src/main/java/com/magicbell/magicbelluserclient/models/IncomingWebhook.java index 5daa7d7..3107d43 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/IncomingWebhook.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/IncomingWebhook.java @@ -17,13 +17,22 @@ @Jacksonized public class IncomingWebhook { + /** + * Human readable name for the webhook channel. + */ @NonNull private String channel; + /** + * URL users can visit to manage the webhook. + */ @NonNull @JsonProperty("configuration_url") private String configurationUrl; + /** + * Webhook URL that Slack posts events to. + */ @NonNull private String url; } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/Links.java b/src/main/java/com/magicbell/magicbelluserclient/models/Links.java index f14f7b1..73320e4 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/Links.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/Links.java @@ -1,12 +1,14 @@ package com.magicbell.magicbelluserclient.models; -import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,11 +18,58 @@ @Jacksonized public class Links { - private String first; + @JsonProperty("first") + private JsonNullable first; - @JsonInclude(JsonInclude.Include.ALWAYS) - private String next; + @JsonProperty("next") + private JsonNullable next; - @JsonInclude(JsonInclude.Include.ALWAYS) - private String prev; + @JsonProperty("prev") + private JsonNullable prev; + + @JsonIgnore + public String getFirst() { + return first.orElse(null); + } + + @JsonIgnore + public String getNext() { + return next.orElse(null); + } + + @JsonIgnore + public String getPrev() { + return prev.orElse(null); + } + + // Overwrite lombok builder methods + public static class LinksBuilder { + + private JsonNullable first = JsonNullable.undefined(); + + @JsonProperty("first") + public LinksBuilder first(String value) { + if (value == null) { + throw new IllegalStateException("first cannot be null"); + } + this.first = JsonNullable.of(value); + return this; + } + + private JsonNullable next = JsonNullable.undefined(); + + @JsonProperty("next") + public LinksBuilder next(String value) { + this.next = JsonNullable.of(value); + return this; + } + + private JsonNullable prev = JsonNullable.undefined(); + + @JsonProperty("prev") + public LinksBuilder prev(String value) { + this.prev = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ListApnsTokensParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/ListApnsTokensParameters.java new file mode 100644 index 0000000..e47564d --- /dev/null +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ListApnsTokensParameters.java @@ -0,0 +1,90 @@ +package com.magicbell.magicbelluserclient.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class ListApnsTokensParameters { + + /** + * defines the maximum number of items to return per page (default: 50) + */ + @JsonProperty("limit") + private JsonNullable limit; + + /** + * a cursor for use in pagination, points to the last ID in previous page + */ + @JsonProperty("starting_after") + private JsonNullable startingAfter; + + /** + * a cursor for use in pagination, points to the first ID in next page + */ + @JsonProperty("ending_before") + private JsonNullable endingBefore; + + @JsonIgnore + public Long getLimit() { + return limit.orElse(null); + } + + @JsonIgnore + public String getStartingAfter() { + return startingAfter.orElse(null); + } + + @JsonIgnore + public String getEndingBefore() { + return endingBefore.orElse(null); + } + + // Overwrite lombok builder methods + public static class ListApnsTokensParametersBuilder { + + private JsonNullable limit = JsonNullable.undefined(); + + @JsonProperty("limit") + public ListApnsTokensParametersBuilder limit(Long value) { + if (value == null) { + throw new IllegalStateException("limit cannot be null"); + } + this.limit = JsonNullable.of(value); + return this; + } + + private JsonNullable startingAfter = JsonNullable.undefined(); + + @JsonProperty("starting_after") + public ListApnsTokensParametersBuilder startingAfter(String value) { + if (value == null) { + throw new IllegalStateException("startingAfter cannot be null"); + } + this.startingAfter = JsonNullable.of(value); + return this; + } + + private JsonNullable endingBefore = JsonNullable.undefined(); + + @JsonProperty("ending_before") + public ListApnsTokensParametersBuilder endingBefore(String value) { + if (value == null) { + throw new IllegalStateException("endingBefore cannot be null"); + } + this.endingBefore = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ListExpoTokensParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/ListExpoTokensParameters.java new file mode 100644 index 0000000..77d3d4c --- /dev/null +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ListExpoTokensParameters.java @@ -0,0 +1,90 @@ +package com.magicbell.magicbelluserclient.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class ListExpoTokensParameters { + + /** + * defines the maximum number of items to return per page (default: 50) + */ + @JsonProperty("limit") + private JsonNullable limit; + + /** + * a cursor for use in pagination, points to the last ID in previous page + */ + @JsonProperty("starting_after") + private JsonNullable startingAfter; + + /** + * a cursor for use in pagination, points to the first ID in next page + */ + @JsonProperty("ending_before") + private JsonNullable endingBefore; + + @JsonIgnore + public Long getLimit() { + return limit.orElse(null); + } + + @JsonIgnore + public String getStartingAfter() { + return startingAfter.orElse(null); + } + + @JsonIgnore + public String getEndingBefore() { + return endingBefore.orElse(null); + } + + // Overwrite lombok builder methods + public static class ListExpoTokensParametersBuilder { + + private JsonNullable limit = JsonNullable.undefined(); + + @JsonProperty("limit") + public ListExpoTokensParametersBuilder limit(Long value) { + if (value == null) { + throw new IllegalStateException("limit cannot be null"); + } + this.limit = JsonNullable.of(value); + return this; + } + + private JsonNullable startingAfter = JsonNullable.undefined(); + + @JsonProperty("starting_after") + public ListExpoTokensParametersBuilder startingAfter(String value) { + if (value == null) { + throw new IllegalStateException("startingAfter cannot be null"); + } + this.startingAfter = JsonNullable.of(value); + return this; + } + + private JsonNullable endingBefore = JsonNullable.undefined(); + + @JsonProperty("ending_before") + public ListExpoTokensParametersBuilder endingBefore(String value) { + if (value == null) { + throw new IllegalStateException("endingBefore cannot be null"); + } + this.endingBefore = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ListFcmTokensParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/ListFcmTokensParameters.java new file mode 100644 index 0000000..996a7c0 --- /dev/null +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ListFcmTokensParameters.java @@ -0,0 +1,90 @@ +package com.magicbell.magicbelluserclient.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class ListFcmTokensParameters { + + /** + * defines the maximum number of items to return per page (default: 50) + */ + @JsonProperty("limit") + private JsonNullable limit; + + /** + * a cursor for use in pagination, points to the last ID in previous page + */ + @JsonProperty("starting_after") + private JsonNullable startingAfter; + + /** + * a cursor for use in pagination, points to the first ID in next page + */ + @JsonProperty("ending_before") + private JsonNullable endingBefore; + + @JsonIgnore + public Long getLimit() { + return limit.orElse(null); + } + + @JsonIgnore + public String getStartingAfter() { + return startingAfter.orElse(null); + } + + @JsonIgnore + public String getEndingBefore() { + return endingBefore.orElse(null); + } + + // Overwrite lombok builder methods + public static class ListFcmTokensParametersBuilder { + + private JsonNullable limit = JsonNullable.undefined(); + + @JsonProperty("limit") + public ListFcmTokensParametersBuilder limit(Long value) { + if (value == null) { + throw new IllegalStateException("limit cannot be null"); + } + this.limit = JsonNullable.of(value); + return this; + } + + private JsonNullable startingAfter = JsonNullable.undefined(); + + @JsonProperty("starting_after") + public ListFcmTokensParametersBuilder startingAfter(String value) { + if (value == null) { + throw new IllegalStateException("startingAfter cannot be null"); + } + this.startingAfter = JsonNullable.of(value); + return this; + } + + private JsonNullable endingBefore = JsonNullable.undefined(); + + @JsonProperty("ending_before") + public ListFcmTokensParametersBuilder endingBefore(String value) { + if (value == null) { + throw new IllegalStateException("endingBefore cannot be null"); + } + this.endingBefore = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ListInboxTokensParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/ListInboxTokensParameters.java new file mode 100644 index 0000000..3c9d618 --- /dev/null +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ListInboxTokensParameters.java @@ -0,0 +1,90 @@ +package com.magicbell.magicbelluserclient.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class ListInboxTokensParameters { + + /** + * defines the maximum number of items to return per page (default: 50) + */ + @JsonProperty("limit") + private JsonNullable limit; + + /** + * a cursor for use in pagination, points to the last ID in previous page + */ + @JsonProperty("starting_after") + private JsonNullable startingAfter; + + /** + * a cursor for use in pagination, points to the first ID in next page + */ + @JsonProperty("ending_before") + private JsonNullable endingBefore; + + @JsonIgnore + public Long getLimit() { + return limit.orElse(null); + } + + @JsonIgnore + public String getStartingAfter() { + return startingAfter.orElse(null); + } + + @JsonIgnore + public String getEndingBefore() { + return endingBefore.orElse(null); + } + + // Overwrite lombok builder methods + public static class ListInboxTokensParametersBuilder { + + private JsonNullable limit = JsonNullable.undefined(); + + @JsonProperty("limit") + public ListInboxTokensParametersBuilder limit(Long value) { + if (value == null) { + throw new IllegalStateException("limit cannot be null"); + } + this.limit = JsonNullable.of(value); + return this; + } + + private JsonNullable startingAfter = JsonNullable.undefined(); + + @JsonProperty("starting_after") + public ListInboxTokensParametersBuilder startingAfter(String value) { + if (value == null) { + throw new IllegalStateException("startingAfter cannot be null"); + } + this.startingAfter = JsonNullable.of(value); + return this; + } + + private JsonNullable endingBefore = JsonNullable.undefined(); + + @JsonProperty("ending_before") + public ListInboxTokensParametersBuilder endingBefore(String value) { + if (value == null) { + throw new IllegalStateException("endingBefore cannot be null"); + } + this.endingBefore = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ListMagicbellSlackbotTokensParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/ListMagicbellSlackbotTokensParameters.java new file mode 100644 index 0000000..7318cb5 --- /dev/null +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ListMagicbellSlackbotTokensParameters.java @@ -0,0 +1,90 @@ +package com.magicbell.magicbelluserclient.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class ListMagicbellSlackbotTokensParameters { + + /** + * defines the maximum number of items to return per page (default: 50) + */ + @JsonProperty("limit") + private JsonNullable limit; + + /** + * a cursor for use in pagination, points to the last ID in previous page + */ + @JsonProperty("starting_after") + private JsonNullable startingAfter; + + /** + * a cursor for use in pagination, points to the first ID in next page + */ + @JsonProperty("ending_before") + private JsonNullable endingBefore; + + @JsonIgnore + public Long getLimit() { + return limit.orElse(null); + } + + @JsonIgnore + public String getStartingAfter() { + return startingAfter.orElse(null); + } + + @JsonIgnore + public String getEndingBefore() { + return endingBefore.orElse(null); + } + + // Overwrite lombok builder methods + public static class ListMagicbellSlackbotTokensParametersBuilder { + + private JsonNullable limit = JsonNullable.undefined(); + + @JsonProperty("limit") + public ListMagicbellSlackbotTokensParametersBuilder limit(Long value) { + if (value == null) { + throw new IllegalStateException("limit cannot be null"); + } + this.limit = JsonNullable.of(value); + return this; + } + + private JsonNullable startingAfter = JsonNullable.undefined(); + + @JsonProperty("starting_after") + public ListMagicbellSlackbotTokensParametersBuilder startingAfter(String value) { + if (value == null) { + throw new IllegalStateException("startingAfter cannot be null"); + } + this.startingAfter = JsonNullable.of(value); + return this; + } + + private JsonNullable endingBefore = JsonNullable.undefined(); + + @JsonProperty("ending_before") + public ListMagicbellSlackbotTokensParametersBuilder endingBefore(String value) { + if (value == null) { + throw new IllegalStateException("endingBefore cannot be null"); + } + this.endingBefore = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ListNotificationsParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/ListNotificationsParameters.java index 34a57c4..5092b11 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/ListNotificationsParameters.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ListNotificationsParameters.java @@ -1,5 +1,6 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -7,6 +8,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,15 +18,139 @@ @Jacksonized public class ListNotificationsParameters { - private Long limit; + /** + * defines the maximum number of items to return per page (default: 50) + */ + @JsonProperty("limit") + private JsonNullable limit; + /** + * a cursor for use in pagination, points to the last ID in previous page + */ @JsonProperty("starting_after") - private String startingAfter; + private JsonNullable startingAfter; + /** + * a cursor for use in pagination, points to the first ID in next page + */ @JsonProperty("ending_before") - private String endingBefore; + private JsonNullable endingBefore; - private String status; + /** + * filter notifications by their read state, one of 'unread' | 'read' | 'archived' + */ + @JsonProperty("status") + private JsonNullable status; - private String topic; + /** + * filter notifications by their category + */ + @JsonProperty("category") + private JsonNullable category; + + /** + * filter notifications by their topic + */ + @JsonProperty("topic") + private JsonNullable topic; + + @JsonIgnore + public Long getLimit() { + return limit.orElse(null); + } + + @JsonIgnore + public String getStartingAfter() { + return startingAfter.orElse(null); + } + + @JsonIgnore + public String getEndingBefore() { + return endingBefore.orElse(null); + } + + @JsonIgnore + public String getStatus() { + return status.orElse(null); + } + + @JsonIgnore + public String getCategory() { + return category.orElse(null); + } + + @JsonIgnore + public String getTopic() { + return topic.orElse(null); + } + + // Overwrite lombok builder methods + public static class ListNotificationsParametersBuilder { + + private JsonNullable limit = JsonNullable.undefined(); + + @JsonProperty("limit") + public ListNotificationsParametersBuilder limit(Long value) { + if (value == null) { + throw new IllegalStateException("limit cannot be null"); + } + this.limit = JsonNullable.of(value); + return this; + } + + private JsonNullable startingAfter = JsonNullable.undefined(); + + @JsonProperty("starting_after") + public ListNotificationsParametersBuilder startingAfter(String value) { + if (value == null) { + throw new IllegalStateException("startingAfter cannot be null"); + } + this.startingAfter = JsonNullable.of(value); + return this; + } + + private JsonNullable endingBefore = JsonNullable.undefined(); + + @JsonProperty("ending_before") + public ListNotificationsParametersBuilder endingBefore(String value) { + if (value == null) { + throw new IllegalStateException("endingBefore cannot be null"); + } + this.endingBefore = JsonNullable.of(value); + return this; + } + + private JsonNullable status = JsonNullable.undefined(); + + @JsonProperty("status") + public ListNotificationsParametersBuilder status(String value) { + if (value == null) { + throw new IllegalStateException("status cannot be null"); + } + this.status = JsonNullable.of(value); + return this; + } + + private JsonNullable category = JsonNullable.undefined(); + + @JsonProperty("category") + public ListNotificationsParametersBuilder category(String value) { + if (value == null) { + throw new IllegalStateException("category cannot be null"); + } + this.category = JsonNullable.of(value); + return this; + } + + private JsonNullable topic = JsonNullable.undefined(); + + @JsonProperty("topic") + public ListNotificationsParametersBuilder topic(String value) { + if (value == null) { + throw new IllegalStateException("topic cannot be null"); + } + this.topic = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ListSlackTokensParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/ListSlackTokensParameters.java new file mode 100644 index 0000000..bb81f54 --- /dev/null +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ListSlackTokensParameters.java @@ -0,0 +1,90 @@ +package com.magicbell.magicbelluserclient.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class ListSlackTokensParameters { + + /** + * defines the maximum number of items to return per page (default: 50) + */ + @JsonProperty("limit") + private JsonNullable limit; + + /** + * a cursor for use in pagination, points to the last ID in previous page + */ + @JsonProperty("starting_after") + private JsonNullable startingAfter; + + /** + * a cursor for use in pagination, points to the first ID in next page + */ + @JsonProperty("ending_before") + private JsonNullable endingBefore; + + @JsonIgnore + public Long getLimit() { + return limit.orElse(null); + } + + @JsonIgnore + public String getStartingAfter() { + return startingAfter.orElse(null); + } + + @JsonIgnore + public String getEndingBefore() { + return endingBefore.orElse(null); + } + + // Overwrite lombok builder methods + public static class ListSlackTokensParametersBuilder { + + private JsonNullable limit = JsonNullable.undefined(); + + @JsonProperty("limit") + public ListSlackTokensParametersBuilder limit(Long value) { + if (value == null) { + throw new IllegalStateException("limit cannot be null"); + } + this.limit = JsonNullable.of(value); + return this; + } + + private JsonNullable startingAfter = JsonNullable.undefined(); + + @JsonProperty("starting_after") + public ListSlackTokensParametersBuilder startingAfter(String value) { + if (value == null) { + throw new IllegalStateException("startingAfter cannot be null"); + } + this.startingAfter = JsonNullable.of(value); + return this; + } + + private JsonNullable endingBefore = JsonNullable.undefined(); + + @JsonProperty("ending_before") + public ListSlackTokensParametersBuilder endingBefore(String value) { + if (value == null) { + throw new IllegalStateException("endingBefore cannot be null"); + } + this.endingBefore = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ListTeamsTokensParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/ListTeamsTokensParameters.java new file mode 100644 index 0000000..565ae7d --- /dev/null +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ListTeamsTokensParameters.java @@ -0,0 +1,90 @@ +package com.magicbell.magicbelluserclient.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class ListTeamsTokensParameters { + + /** + * defines the maximum number of items to return per page (default: 50) + */ + @JsonProperty("limit") + private JsonNullable limit; + + /** + * a cursor for use in pagination, points to the last ID in previous page + */ + @JsonProperty("starting_after") + private JsonNullable startingAfter; + + /** + * a cursor for use in pagination, points to the first ID in next page + */ + @JsonProperty("ending_before") + private JsonNullable endingBefore; + + @JsonIgnore + public Long getLimit() { + return limit.orElse(null); + } + + @JsonIgnore + public String getStartingAfter() { + return startingAfter.orElse(null); + } + + @JsonIgnore + public String getEndingBefore() { + return endingBefore.orElse(null); + } + + // Overwrite lombok builder methods + public static class ListTeamsTokensParametersBuilder { + + private JsonNullable limit = JsonNullable.undefined(); + + @JsonProperty("limit") + public ListTeamsTokensParametersBuilder limit(Long value) { + if (value == null) { + throw new IllegalStateException("limit cannot be null"); + } + this.limit = JsonNullable.of(value); + return this; + } + + private JsonNullable startingAfter = JsonNullable.undefined(); + + @JsonProperty("starting_after") + public ListTeamsTokensParametersBuilder startingAfter(String value) { + if (value == null) { + throw new IllegalStateException("startingAfter cannot be null"); + } + this.startingAfter = JsonNullable.of(value); + return this; + } + + private JsonNullable endingBefore = JsonNullable.undefined(); + + @JsonProperty("ending_before") + public ListTeamsTokensParametersBuilder endingBefore(String value) { + if (value == null) { + throw new IllegalStateException("endingBefore cannot be null"); + } + this.endingBefore = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/ListWebPushTokensParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/ListWebPushTokensParameters.java new file mode 100644 index 0000000..acf192b --- /dev/null +++ b/src/main/java/com/magicbell/magicbelluserclient/models/ListWebPushTokensParameters.java @@ -0,0 +1,90 @@ +package com.magicbell.magicbelluserclient.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class ListWebPushTokensParameters { + + /** + * defines the maximum number of items to return per page (default: 50) + */ + @JsonProperty("limit") + private JsonNullable limit; + + /** + * a cursor for use in pagination, points to the last ID in previous page + */ + @JsonProperty("starting_after") + private JsonNullable startingAfter; + + /** + * a cursor for use in pagination, points to the first ID in next page + */ + @JsonProperty("ending_before") + private JsonNullable endingBefore; + + @JsonIgnore + public Long getLimit() { + return limit.orElse(null); + } + + @JsonIgnore + public String getStartingAfter() { + return startingAfter.orElse(null); + } + + @JsonIgnore + public String getEndingBefore() { + return endingBefore.orElse(null); + } + + // Overwrite lombok builder methods + public static class ListWebPushTokensParametersBuilder { + + private JsonNullable limit = JsonNullable.undefined(); + + @JsonProperty("limit") + public ListWebPushTokensParametersBuilder limit(Long value) { + if (value == null) { + throw new IllegalStateException("limit cannot be null"); + } + this.limit = JsonNullable.of(value); + return this; + } + + private JsonNullable startingAfter = JsonNullable.undefined(); + + @JsonProperty("starting_after") + public ListWebPushTokensParametersBuilder startingAfter(String value) { + if (value == null) { + throw new IllegalStateException("startingAfter cannot be null"); + } + this.startingAfter = JsonNullable.of(value); + return this; + } + + private JsonNullable endingBefore = JsonNullable.undefined(); + + @JsonProperty("ending_before") + public ListWebPushTokensParametersBuilder endingBefore(String value) { + if (value == null) { + throw new IllegalStateException("endingBefore cannot be null"); + } + this.endingBefore = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/MarkAllNotificationsReadParameters.java b/src/main/java/com/magicbell/magicbelluserclient/models/MarkAllNotificationsReadParameters.java new file mode 100644 index 0000000..702b0c6 --- /dev/null +++ b/src/main/java/com/magicbell/magicbelluserclient/models/MarkAllNotificationsReadParameters.java @@ -0,0 +1,68 @@ +package com.magicbell.magicbelluserclient.models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import lombok.With; +import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; + +@Data +@Builder +@With +@ToString +@EqualsAndHashCode +@Jacksonized +public class MarkAllNotificationsReadParameters { + + /** + * filter notifications by their category + */ + @JsonProperty("category") + private JsonNullable category; + + /** + * filter notifications by their topic + */ + @JsonProperty("topic") + private JsonNullable topic; + + @JsonIgnore + public String getCategory() { + return category.orElse(null); + } + + @JsonIgnore + public String getTopic() { + return topic.orElse(null); + } + + // Overwrite lombok builder methods + public static class MarkAllNotificationsReadParametersBuilder { + + private JsonNullable category = JsonNullable.undefined(); + + @JsonProperty("category") + public MarkAllNotificationsReadParametersBuilder category(String value) { + if (value == null) { + throw new IllegalStateException("category cannot be null"); + } + this.category = JsonNullable.of(value); + return this; + } + + private JsonNullable topic = JsonNullable.undefined(); + + @JsonProperty("topic") + public MarkAllNotificationsReadParametersBuilder topic(String value) { + if (value == null) { + throw new IllegalStateException("topic cannot be null"); + } + this.topic = JsonNullable.of(value); + return this; + } + } +} diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/Notification.java b/src/main/java/com/magicbell/magicbelluserclient/models/Notification.java index 5383a71..c11ab26 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/Notification.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/Notification.java @@ -1,6 +1,6 @@ package com.magicbell.magicbelluserclient.models; -import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -9,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -18,58 +19,230 @@ @Jacksonized public class Notification { + /** + * The timestamp when the notification was created. + */ @NonNull @JsonProperty("created_at") private String createdAt; + /** + * The unique identifier for the notification. + */ @NonNull private String id; + /** + * The title that is displayed to recipients. + */ @NonNull private String title; + /** + * The timestamp when the notification was last updated. + */ @NonNull @JsonProperty("updated_at") private String updatedAt; + /** + * The user that should receive the notification. + */ @NonNull @JsonProperty("user_id") private String userId; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The link associated with the notification. + */ @JsonProperty("action_url") - private String actionUrl; + private JsonNullable actionUrl; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the notification was archived. + */ @JsonProperty("archived_at") - private String archivedAt; - - @JsonInclude(JsonInclude.Include.ALWAYS) - private String category; - - @JsonInclude(JsonInclude.Include.ALWAYS) - private String content; - - @JsonInclude(JsonInclude.Include.ALWAYS) + private JsonNullable archivedAt; + + /** + * The category grouping for the notification. + */ + @JsonProperty("category") + private JsonNullable category; + + /** + * The body content of the notification. + */ + @JsonProperty("content") + private JsonNullable content; + + /** + * The custom data stored with the notification. + */ @JsonProperty("custom_attributes") - private Object customAttributes; + private JsonNullable customAttributes; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the notification was discarded. + */ @JsonProperty("discarded_at") - private String discardedAt; + private JsonNullable discardedAt; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the notification was marked as read. + */ @JsonProperty("read_at") - private String readAt; + private JsonNullable readAt; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the notification was seen. + */ @JsonProperty("seen_at") - private String seenAt; + private JsonNullable seenAt; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the notification was sent. + */ @JsonProperty("sent_at") - private String sentAt; - - @JsonInclude(JsonInclude.Include.ALWAYS) - private String topic; + private JsonNullable sentAt; + + /** + * The topic for additional classification. + */ + @JsonProperty("topic") + private JsonNullable topic; + + @JsonIgnore + public String getActionUrl() { + return actionUrl.orElse(null); + } + + @JsonIgnore + public String getArchivedAt() { + return archivedAt.orElse(null); + } + + @JsonIgnore + public String getCategory() { + return category.orElse(null); + } + + @JsonIgnore + public String getContent() { + return content.orElse(null); + } + + @JsonIgnore + public Object getCustomAttributes() { + return customAttributes.orElse(null); + } + + @JsonIgnore + public String getDiscardedAt() { + return discardedAt.orElse(null); + } + + @JsonIgnore + public String getReadAt() { + return readAt.orElse(null); + } + + @JsonIgnore + public String getSeenAt() { + return seenAt.orElse(null); + } + + @JsonIgnore + public String getSentAt() { + return sentAt.orElse(null); + } + + @JsonIgnore + public String getTopic() { + return topic.orElse(null); + } + + // Overwrite lombok builder methods + public static class NotificationBuilder { + + private JsonNullable actionUrl = JsonNullable.undefined(); + + @JsonProperty("action_url") + public NotificationBuilder actionUrl(String value) { + this.actionUrl = JsonNullable.of(value); + return this; + } + + private JsonNullable archivedAt = JsonNullable.undefined(); + + @JsonProperty("archived_at") + public NotificationBuilder archivedAt(String value) { + this.archivedAt = JsonNullable.of(value); + return this; + } + + private JsonNullable category = JsonNullable.undefined(); + + @JsonProperty("category") + public NotificationBuilder category(String value) { + this.category = JsonNullable.of(value); + return this; + } + + private JsonNullable content = JsonNullable.undefined(); + + @JsonProperty("content") + public NotificationBuilder content(String value) { + this.content = JsonNullable.of(value); + return this; + } + + private JsonNullable customAttributes = JsonNullable.undefined(); + + @JsonProperty("custom_attributes") + public NotificationBuilder customAttributes(Object value) { + this.customAttributes = JsonNullable.of(value); + return this; + } + + private JsonNullable discardedAt = JsonNullable.undefined(); + + @JsonProperty("discarded_at") + public NotificationBuilder discardedAt(String value) { + this.discardedAt = JsonNullable.of(value); + return this; + } + + private JsonNullable readAt = JsonNullable.undefined(); + + @JsonProperty("read_at") + public NotificationBuilder readAt(String value) { + this.readAt = JsonNullable.of(value); + return this; + } + + private JsonNullable seenAt = JsonNullable.undefined(); + + @JsonProperty("seen_at") + public NotificationBuilder seenAt(String value) { + this.seenAt = JsonNullable.of(value); + return this; + } + + private JsonNullable sentAt = JsonNullable.undefined(); + + @JsonProperty("sent_at") + public NotificationBuilder sentAt(String value) { + this.sentAt = JsonNullable.of(value); + return this; + } + + private JsonNullable topic = JsonNullable.undefined(); + + @JsonProperty("topic") + public NotificationBuilder topic(String value) { + this.topic = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/NotificationCollection.java b/src/main/java/com/magicbell/magicbelluserclient/models/NotificationCollection.java index 41e08b5..60c300a 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/NotificationCollection.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/NotificationCollection.java @@ -1,5 +1,7 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import lombok.Builder; import lombok.Data; @@ -7,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,7 +19,45 @@ @Jacksonized public class NotificationCollection { - private List data; + @JsonProperty("data") + private JsonNullable> data; - private Links links; + @JsonProperty("links") + private JsonNullable links; + + @JsonIgnore + public List getData() { + return data.orElse(null); + } + + @JsonIgnore + public Links getLinks() { + return links.orElse(null); + } + + // Overwrite lombok builder methods + public static class NotificationCollectionBuilder { + + private JsonNullable> data = JsonNullable.undefined(); + + @JsonProperty("data") + public NotificationCollectionBuilder data(List value) { + if (value == null) { + throw new IllegalStateException("data cannot be null"); + } + this.data = JsonNullable.of(value); + return this; + } + + private JsonNullable links = JsonNullable.undefined(); + + @JsonProperty("links") + public NotificationCollectionBuilder links(Links value) { + if (value == null) { + throw new IllegalStateException("links cannot be null"); + } + this.links = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/SlackFinishInstallResponse.java b/src/main/java/com/magicbell/magicbelluserclient/models/SlackFinishInstallResponse.java index a1d6db7..328d93a 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/SlackFinishInstallResponse.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/SlackFinishInstallResponse.java @@ -1,5 +1,6 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -8,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -31,5 +33,25 @@ public class SlackFinishInstallResponse { private String code; @JsonProperty("redirect_url") - private String redirectUrl; + private JsonNullable redirectUrl; + + @JsonIgnore + public String getRedirectUrl() { + return redirectUrl.orElse(null); + } + + // Overwrite lombok builder methods + public static class SlackFinishInstallResponseBuilder { + + private JsonNullable redirectUrl = JsonNullable.undefined(); + + @JsonProperty("redirect_url") + public SlackFinishInstallResponseBuilder redirectUrl(String value) { + if (value == null) { + throw new IllegalStateException("redirectUrl cannot be null"); + } + this.redirectUrl = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/SlackInstallation.java b/src/main/java/com/magicbell/magicbelluserclient/models/SlackInstallation.java index 5081b29..2e979a5 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/SlackInstallation.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/SlackInstallation.java @@ -1,5 +1,6 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -8,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -17,10 +19,16 @@ @Jacksonized public class SlackInstallation { + /** + * Bot token returned from the Slack OAuth exchange. + */ @NonNull @JsonProperty("access_token") private String accessToken; + /** + * Slack app identifier for the installed app. + */ @NonNull @JsonProperty("app_id") private String appId; @@ -32,27 +40,199 @@ public class SlackInstallation { @NonNull private Team team; + /** + * Slack user ID of the installed bot. + */ @JsonProperty("bot_user_id") - private String botUserId; + private JsonNullable botUserId; - private Enterprise enterprise; + @JsonProperty("enterprise") + private JsonNullable enterprise; + /** + * Seconds until the bot access token expires. + */ @JsonProperty("expires_in") - private Long expiresIn; + private JsonNullable expiresIn; - private String id; + /** + * Unique identifier MagicBell assigns to the Slack installation. + */ + @JsonProperty("id") + private JsonNullable id; @JsonProperty("incoming_webhook") - private IncomingWebhook incomingWebhook; + private JsonNullable incomingWebhook; + /** + * Indicates whether the installation occurred on an enterprise grid. + */ @JsonProperty("is_enterprise_install") - private Boolean isEnterpriseInstall; + private JsonNullable isEnterpriseInstall; + /** + * Refresh token for regenerating the bot access token. + */ @JsonProperty("refresh_token") - private String refreshToken; + private JsonNullable refreshToken; - private String scope; + /** + * Space-delimited OAuth scopes granted to the bot token. + */ + @JsonProperty("scope") + private JsonNullable scope; + /** + * Type of bot token returned by Slack. + */ @JsonProperty("token_type") - private String tokenType; + private JsonNullable tokenType; + + @JsonIgnore + public String getBotUserId() { + return botUserId.orElse(null); + } + + @JsonIgnore + public Enterprise getEnterprise() { + return enterprise.orElse(null); + } + + @JsonIgnore + public Long getExpiresIn() { + return expiresIn.orElse(null); + } + + @JsonIgnore + public String getId() { + return id.orElse(null); + } + + @JsonIgnore + public IncomingWebhook getIncomingWebhook() { + return incomingWebhook.orElse(null); + } + + @JsonIgnore + public Boolean getIsEnterpriseInstall() { + return isEnterpriseInstall.orElse(null); + } + + @JsonIgnore + public String getRefreshToken() { + return refreshToken.orElse(null); + } + + @JsonIgnore + public String getScope() { + return scope.orElse(null); + } + + @JsonIgnore + public String getTokenType() { + return tokenType.orElse(null); + } + + // Overwrite lombok builder methods + public static class SlackInstallationBuilder { + + private JsonNullable botUserId = JsonNullable.undefined(); + + @JsonProperty("bot_user_id") + public SlackInstallationBuilder botUserId(String value) { + if (value == null) { + throw new IllegalStateException("botUserId cannot be null"); + } + this.botUserId = JsonNullable.of(value); + return this; + } + + private JsonNullable enterprise = JsonNullable.undefined(); + + @JsonProperty("enterprise") + public SlackInstallationBuilder enterprise(Enterprise value) { + if (value == null) { + throw new IllegalStateException("enterprise cannot be null"); + } + this.enterprise = JsonNullable.of(value); + return this; + } + + private JsonNullable expiresIn = JsonNullable.undefined(); + + @JsonProperty("expires_in") + public SlackInstallationBuilder expiresIn(Long value) { + if (value == null) { + throw new IllegalStateException("expiresIn cannot be null"); + } + this.expiresIn = JsonNullable.of(value); + return this; + } + + private JsonNullable id = JsonNullable.undefined(); + + @JsonProperty("id") + public SlackInstallationBuilder id(String value) { + if (value == null) { + throw new IllegalStateException("id cannot be null"); + } + this.id = JsonNullable.of(value); + return this; + } + + private JsonNullable incomingWebhook = JsonNullable.undefined(); + + @JsonProperty("incoming_webhook") + public SlackInstallationBuilder incomingWebhook(IncomingWebhook value) { + if (value == null) { + throw new IllegalStateException("incomingWebhook cannot be null"); + } + this.incomingWebhook = JsonNullable.of(value); + return this; + } + + private JsonNullable isEnterpriseInstall = JsonNullable.undefined(); + + @JsonProperty("is_enterprise_install") + public SlackInstallationBuilder isEnterpriseInstall(Boolean value) { + if (value == null) { + throw new IllegalStateException("isEnterpriseInstall cannot be null"); + } + this.isEnterpriseInstall = JsonNullable.of(value); + return this; + } + + private JsonNullable refreshToken = JsonNullable.undefined(); + + @JsonProperty("refresh_token") + public SlackInstallationBuilder refreshToken(String value) { + if (value == null) { + throw new IllegalStateException("refreshToken cannot be null"); + } + this.refreshToken = JsonNullable.of(value); + return this; + } + + private JsonNullable scope = JsonNullable.undefined(); + + @JsonProperty("scope") + public SlackInstallationBuilder scope(String value) { + if (value == null) { + throw new IllegalStateException("scope cannot be null"); + } + this.scope = JsonNullable.of(value); + return this; + } + + private JsonNullable tokenType = JsonNullable.undefined(); + + @JsonProperty("token_type") + public SlackInstallationBuilder tokenType(String value) { + if (value == null) { + throw new IllegalStateException("tokenType cannot be null"); + } + this.tokenType = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/SlackStartInstall.java b/src/main/java/com/magicbell/magicbelluserclient/models/SlackStartInstall.java index 27c1c20..2ea900c 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/SlackStartInstall.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/SlackStartInstall.java @@ -1,5 +1,6 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import lombok.Builder; @@ -9,6 +10,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -18,16 +20,80 @@ @Jacksonized public class SlackStartInstall { + /** + * Slack app ID that the installation flow should use. + */ @NonNull @JsonProperty("app_id") private String appId; + /** + * Optional override for the authorization URL returned to the client. + */ @JsonProperty("auth_url") - private String authUrl; + private JsonNullable authUrl; + /** + * Additional OAuth scopes to request during installation. + */ @JsonProperty("extra_scopes") - private List extraScopes; + private JsonNullable> extraScopes; + /** + * Custom redirect URL to use after OAuth completes. + */ @JsonProperty("redirect_url") - private String redirectUrl; + private JsonNullable redirectUrl; + + @JsonIgnore + public String getAuthUrl() { + return authUrl.orElse(null); + } + + @JsonIgnore + public List getExtraScopes() { + return extraScopes.orElse(null); + } + + @JsonIgnore + public String getRedirectUrl() { + return redirectUrl.orElse(null); + } + + // Overwrite lombok builder methods + public static class SlackStartInstallBuilder { + + private JsonNullable authUrl = JsonNullable.undefined(); + + @JsonProperty("auth_url") + public SlackStartInstallBuilder authUrl(String value) { + if (value == null) { + throw new IllegalStateException("authUrl cannot be null"); + } + this.authUrl = JsonNullable.of(value); + return this; + } + + private JsonNullable> extraScopes = JsonNullable.undefined(); + + @JsonProperty("extra_scopes") + public SlackStartInstallBuilder extraScopes(List value) { + if (value == null) { + throw new IllegalStateException("extraScopes cannot be null"); + } + this.extraScopes = JsonNullable.of(value); + return this; + } + + private JsonNullable redirectUrl = JsonNullable.undefined(); + + @JsonProperty("redirect_url") + public SlackStartInstallBuilder redirectUrl(String value) { + if (value == null) { + throw new IllegalStateException("redirectUrl cannot be null"); + } + this.redirectUrl = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/SlackStartInstallResponseContent.java b/src/main/java/com/magicbell/magicbelluserclient/models/SlackStartInstallResponseContent.java index d267055..c9dd29a 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/SlackStartInstallResponseContent.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/SlackStartInstallResponseContent.java @@ -1,5 +1,6 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import lombok.Builder; @@ -8,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -18,10 +20,63 @@ public class SlackStartInstallResponseContent { @JsonProperty("app_id") - private String appId; + private JsonNullable appId; @JsonProperty("auth_url") - private String authUrl; + private JsonNullable authUrl; - private List scopes; + @JsonProperty("scopes") + private JsonNullable> scopes; + + @JsonIgnore + public String getAppId() { + return appId.orElse(null); + } + + @JsonIgnore + public String getAuthUrl() { + return authUrl.orElse(null); + } + + @JsonIgnore + public List getScopes() { + return scopes.orElse(null); + } + + // Overwrite lombok builder methods + public static class SlackStartInstallResponseContentBuilder { + + private JsonNullable appId = JsonNullable.undefined(); + + @JsonProperty("app_id") + public SlackStartInstallResponseContentBuilder appId(String value) { + if (value == null) { + throw new IllegalStateException("appId cannot be null"); + } + this.appId = JsonNullable.of(value); + return this; + } + + private JsonNullable authUrl = JsonNullable.undefined(); + + @JsonProperty("auth_url") + public SlackStartInstallResponseContentBuilder authUrl(String value) { + if (value == null) { + throw new IllegalStateException("authUrl cannot be null"); + } + this.authUrl = JsonNullable.of(value); + return this; + } + + private JsonNullable> scopes = JsonNullable.undefined(); + + @JsonProperty("scopes") + public SlackStartInstallResponseContentBuilder scopes(List value) { + if (value == null) { + throw new IllegalStateException("scopes cannot be null"); + } + this.scopes = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/SlackToken.java b/src/main/java/com/magicbell/magicbelluserclient/models/SlackToken.java index 83a3c0e..847be1e 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/SlackToken.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/SlackToken.java @@ -1,6 +1,6 @@ package com.magicbell.magicbelluserclient.models; -import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -9,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -18,25 +19,99 @@ @Jacksonized public class SlackToken { + /** + * The timestamp when the token was created. + */ @NonNull @JsonProperty("created_at") private String createdAt; + /** + * The unique identifier for the token. + */ @NonNull private String id; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the token was discarded, if applicable. + */ @JsonProperty("discarded_at") - private String discardedAt; + private JsonNullable discardedAt; - private SlackTokenOauth oauth; + @JsonProperty("oauth") + private JsonNullable oauth; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the token metadata last changed. + */ @JsonProperty("updated_at") - private String updatedAt; + private JsonNullable updatedAt; /** * Obtained directly from the incoming_webhook object in the installation response from the Slack API. */ - private SlackTokenWebhook webhook; + @JsonProperty("webhook") + private JsonNullable webhook; + + @JsonIgnore + public String getDiscardedAt() { + return discardedAt.orElse(null); + } + + @JsonIgnore + public SlackTokenOauth getOauth() { + return oauth.orElse(null); + } + + @JsonIgnore + public String getUpdatedAt() { + return updatedAt.orElse(null); + } + + @JsonIgnore + public SlackTokenWebhook getWebhook() { + return webhook.orElse(null); + } + + // Overwrite lombok builder methods + public static class SlackTokenBuilder { + + private JsonNullable discardedAt = JsonNullable.undefined(); + + @JsonProperty("discarded_at") + public SlackTokenBuilder discardedAt(String value) { + this.discardedAt = JsonNullable.of(value); + return this; + } + + private JsonNullable oauth = JsonNullable.undefined(); + + @JsonProperty("oauth") + public SlackTokenBuilder oauth(SlackTokenOauth value) { + if (value == null) { + throw new IllegalStateException("oauth cannot be null"); + } + this.oauth = JsonNullable.of(value); + return this; + } + + private JsonNullable updatedAt = JsonNullable.undefined(); + + @JsonProperty("updated_at") + public SlackTokenBuilder updatedAt(String value) { + this.updatedAt = JsonNullable.of(value); + return this; + } + + private JsonNullable webhook = JsonNullable.undefined(); + + @JsonProperty("webhook") + public SlackTokenBuilder webhook(SlackTokenWebhook value) { + if (value == null) { + throw new IllegalStateException("webhook cannot be null"); + } + this.webhook = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenCollection.java b/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenCollection.java index 233965d..f114ffc 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenCollection.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenCollection.java @@ -1,5 +1,7 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import lombok.Builder; import lombok.Data; @@ -7,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,7 +19,45 @@ @Jacksonized public class SlackTokenCollection { - private List data; + @JsonProperty("data") + private JsonNullable> data; - private Links links; + @JsonProperty("links") + private JsonNullable links; + + @JsonIgnore + public List getData() { + return data.orElse(null); + } + + @JsonIgnore + public Links getLinks() { + return links.orElse(null); + } + + // Overwrite lombok builder methods + public static class SlackTokenCollectionBuilder { + + private JsonNullable> data = JsonNullable.undefined(); + + @JsonProperty("data") + public SlackTokenCollectionBuilder data(List value) { + if (value == null) { + throw new IllegalStateException("data cannot be null"); + } + this.data = JsonNullable.of(value); + return this; + } + + private JsonNullable links = JsonNullable.undefined(); + + @JsonProperty("links") + public SlackTokenCollectionBuilder links(Links value) { + if (value == null) { + throw new IllegalStateException("links cannot be null"); + } + this.links = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenOauth.java b/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenOauth.java index 8cf2d63..110e069 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenOauth.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenOauth.java @@ -1,5 +1,6 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -8,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -17,13 +19,43 @@ @Jacksonized public class SlackTokenOauth { + /** + * The ID of the Slack channel this installation is associated with + */ @NonNull @JsonProperty("channel_id") private String channelId; + /** + * A unique identifier for this Slack workspace installation + */ @NonNull @JsonProperty("installation_id") private String installationId; - private String scope; + /** + * The OAuth scope granted during installation + */ + @JsonProperty("scope") + private JsonNullable scope; + + @JsonIgnore + public String getScope() { + return scope.orElse(null); + } + + // Overwrite lombok builder methods + public static class SlackTokenOauthBuilder { + + private JsonNullable scope = JsonNullable.undefined(); + + @JsonProperty("scope") + public SlackTokenOauthBuilder scope(String value) { + if (value == null) { + throw new IllegalStateException("scope cannot be null"); + } + this.scope = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenPayload.java b/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenPayload.java index b9c970c..279b92a 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenPayload.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenPayload.java @@ -1,11 +1,14 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -15,10 +18,48 @@ @Jacksonized public class SlackTokenPayload { - private SlackTokenPayloadOauth oauth; + @JsonProperty("oauth") + private JsonNullable oauth; /** * Obtained directly from the incoming_webhook object in the installation response from the Slack API. */ - private SlackTokenPayloadWebhook webhook; + @JsonProperty("webhook") + private JsonNullable webhook; + + @JsonIgnore + public SlackTokenPayloadOauth getOauth() { + return oauth.orElse(null); + } + + @JsonIgnore + public SlackTokenPayloadWebhook getWebhook() { + return webhook.orElse(null); + } + + // Overwrite lombok builder methods + public static class SlackTokenPayloadBuilder { + + private JsonNullable oauth = JsonNullable.undefined(); + + @JsonProperty("oauth") + public SlackTokenPayloadBuilder oauth(SlackTokenPayloadOauth value) { + if (value == null) { + throw new IllegalStateException("oauth cannot be null"); + } + this.oauth = JsonNullable.of(value); + return this; + } + + private JsonNullable webhook = JsonNullable.undefined(); + + @JsonProperty("webhook") + public SlackTokenPayloadBuilder webhook(SlackTokenPayloadWebhook value) { + if (value == null) { + throw new IllegalStateException("webhook cannot be null"); + } + this.webhook = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenPayloadOauth.java b/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenPayloadOauth.java index b4bd841..21a4638 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenPayloadOauth.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenPayloadOauth.java @@ -1,5 +1,6 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -8,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -17,13 +19,43 @@ @Jacksonized public class SlackTokenPayloadOauth { + /** + * The ID of the Slack channel this installation is associated with + */ @NonNull @JsonProperty("channel_id") private String channelId; + /** + * A unique identifier for this Slack workspace installation + */ @NonNull @JsonProperty("installation_id") private String installationId; - private String scope; + /** + * The OAuth scope granted during installation + */ + @JsonProperty("scope") + private JsonNullable scope; + + @JsonIgnore + public String getScope() { + return scope.orElse(null); + } + + // Overwrite lombok builder methods + public static class SlackTokenPayloadOauthBuilder { + + private JsonNullable scope = JsonNullable.undefined(); + + @JsonProperty("scope") + public SlackTokenPayloadOauthBuilder scope(String value) { + if (value == null) { + throw new IllegalStateException("scope cannot be null"); + } + this.scope = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenPayloadWebhook.java b/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenPayloadWebhook.java index f008a0e..eae2447 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenPayloadWebhook.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenPayloadWebhook.java @@ -19,6 +19,9 @@ @Jacksonized public class SlackTokenPayloadWebhook { + /** + * The URL for the incoming webhook from Slack + */ @NonNull private String url; } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenWebhook.java b/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenWebhook.java index 10830b5..3910ae3 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenWebhook.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/SlackTokenWebhook.java @@ -19,6 +19,9 @@ @Jacksonized public class SlackTokenWebhook { + /** + * The URL for the incoming webhook from Slack + */ @NonNull private String url; } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/Team.java b/src/main/java/com/magicbell/magicbelluserclient/models/Team.java index b669c0b..7278ba7 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/Team.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/Team.java @@ -1,5 +1,7 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; @@ -7,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,8 +19,35 @@ @Jacksonized public class Team { + /** + * Workspace ID where the app was installed. + */ @NonNull private String id; - private String name; + /** + * Workspace name where the app was installed. + */ + @JsonProperty("name") + private JsonNullable name; + + @JsonIgnore + public String getName() { + return name.orElse(null); + } + + // Overwrite lombok builder methods + public static class TeamBuilder { + + private JsonNullable name = JsonNullable.undefined(); + + @JsonProperty("name") + public TeamBuilder name(String value) { + if (value == null) { + throw new IllegalStateException("name cannot be null"); + } + this.name = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/TeamsToken.java b/src/main/java/com/magicbell/magicbelluserclient/models/TeamsToken.java index 6e3862d..04de9f8 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/TeamsToken.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/TeamsToken.java @@ -1,6 +1,6 @@ package com.magicbell.magicbelluserclient.models; -import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; @@ -9,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -18,20 +19,77 @@ @Jacksonized public class TeamsToken { + /** + * The timestamp when the token was created. + */ @NonNull @JsonProperty("created_at") private String createdAt; + /** + * The unique identifier for the token. + */ @NonNull private String id; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the token was discarded, if applicable. + */ @JsonProperty("discarded_at") - private String discardedAt; + private JsonNullable discardedAt; - @JsonInclude(JsonInclude.Include.ALWAYS) + /** + * The timestamp when the token metadata last changed. + */ @JsonProperty("updated_at") - private String updatedAt; + private JsonNullable updatedAt; - private TeamsTokenWebhook webhook; + @JsonProperty("webhook") + private JsonNullable webhook; + + @JsonIgnore + public String getDiscardedAt() { + return discardedAt.orElse(null); + } + + @JsonIgnore + public String getUpdatedAt() { + return updatedAt.orElse(null); + } + + @JsonIgnore + public TeamsTokenWebhook getWebhook() { + return webhook.orElse(null); + } + + // Overwrite lombok builder methods + public static class TeamsTokenBuilder { + + private JsonNullable discardedAt = JsonNullable.undefined(); + + @JsonProperty("discarded_at") + public TeamsTokenBuilder discardedAt(String value) { + this.discardedAt = JsonNullable.of(value); + return this; + } + + private JsonNullable updatedAt = JsonNullable.undefined(); + + @JsonProperty("updated_at") + public TeamsTokenBuilder updatedAt(String value) { + this.updatedAt = JsonNullable.of(value); + return this; + } + + private JsonNullable webhook = JsonNullable.undefined(); + + @JsonProperty("webhook") + public TeamsTokenBuilder webhook(TeamsTokenWebhook value) { + if (value == null) { + throw new IllegalStateException("webhook cannot be null"); + } + this.webhook = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/TeamsTokenCollection.java b/src/main/java/com/magicbell/magicbelluserclient/models/TeamsTokenCollection.java index 4734658..96432e5 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/TeamsTokenCollection.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/TeamsTokenCollection.java @@ -1,5 +1,7 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import lombok.Builder; import lombok.Data; @@ -7,6 +9,7 @@ import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -16,7 +19,45 @@ @Jacksonized public class TeamsTokenCollection { - private List data; + @JsonProperty("data") + private JsonNullable> data; - private Links links; + @JsonProperty("links") + private JsonNullable links; + + @JsonIgnore + public List getData() { + return data.orElse(null); + } + + @JsonIgnore + public Links getLinks() { + return links.orElse(null); + } + + // Overwrite lombok builder methods + public static class TeamsTokenCollectionBuilder { + + private JsonNullable> data = JsonNullable.undefined(); + + @JsonProperty("data") + public TeamsTokenCollectionBuilder data(List value) { + if (value == null) { + throw new IllegalStateException("data cannot be null"); + } + this.data = JsonNullable.of(value); + return this; + } + + private JsonNullable links = JsonNullable.undefined(); + + @JsonProperty("links") + public TeamsTokenCollectionBuilder links(Links value) { + if (value == null) { + throw new IllegalStateException("links cannot be null"); + } + this.links = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/TeamsTokenPayload.java b/src/main/java/com/magicbell/magicbelluserclient/models/TeamsTokenPayload.java index 4115b77..ee7a22e 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/TeamsTokenPayload.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/TeamsTokenPayload.java @@ -1,11 +1,14 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -15,5 +18,26 @@ @Jacksonized public class TeamsTokenPayload { - private TeamsTokenPayloadWebhook webhook; + @JsonProperty("webhook") + private JsonNullable webhook; + + @JsonIgnore + public TeamsTokenPayloadWebhook getWebhook() { + return webhook.orElse(null); + } + + // Overwrite lombok builder methods + public static class TeamsTokenPayloadBuilder { + + private JsonNullable webhook = JsonNullable.undefined(); + + @JsonProperty("webhook") + public TeamsTokenPayloadBuilder webhook(TeamsTokenPayloadWebhook value) { + if (value == null) { + throw new IllegalStateException("webhook cannot be null"); + } + this.webhook = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/TeamsTokenPayloadWebhook.java b/src/main/java/com/magicbell/magicbelluserclient/models/TeamsTokenPayloadWebhook.java index 3393ad1..c7d3d5b 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/TeamsTokenPayloadWebhook.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/TeamsTokenPayloadWebhook.java @@ -1,11 +1,14 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -15,5 +18,26 @@ @Jacksonized public class TeamsTokenPayloadWebhook { - private String url; + @JsonProperty("url") + private JsonNullable url; + + @JsonIgnore + public String getUrl() { + return url.orElse(null); + } + + // Overwrite lombok builder methods + public static class TeamsTokenPayloadWebhookBuilder { + + private JsonNullable url = JsonNullable.undefined(); + + @JsonProperty("url") + public TeamsTokenPayloadWebhookBuilder url(String value) { + if (value == null) { + throw new IllegalStateException("url cannot be null"); + } + this.url = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/TeamsTokenWebhook.java b/src/main/java/com/magicbell/magicbelluserclient/models/TeamsTokenWebhook.java index 45f16cd..a5db214 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/TeamsTokenWebhook.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/TeamsTokenWebhook.java @@ -1,11 +1,14 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; @Data @Builder @@ -15,5 +18,26 @@ @Jacksonized public class TeamsTokenWebhook { - private String url; + @JsonProperty("url") + private JsonNullable url; + + @JsonIgnore + public String getUrl() { + return url.orElse(null); + } + + // Overwrite lombok builder methods + public static class TeamsTokenWebhookBuilder { + + private JsonNullable url = JsonNullable.undefined(); + + @JsonProperty("url") + public TeamsTokenWebhookBuilder url(String value) { + if (value == null) { + throw new IllegalStateException("url cannot be null"); + } + this.url = JsonNullable.of(value); + return this; + } + } } diff --git a/src/main/java/com/magicbell/magicbelluserclient/models/Theme.java b/src/main/java/com/magicbell/magicbelluserclient/models/Theme.java index f444bdc..5970a39 100644 --- a/src/main/java/com/magicbell/magicbelluserclient/models/Theme.java +++ b/src/main/java/com/magicbell/magicbelluserclient/models/Theme.java @@ -1,12 +1,18 @@ package com.magicbell.magicbelluserclient.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; import lombok.Builder; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; import lombok.With; import lombok.extern.jackson.Jacksonized; +import org.openapitools.jackson.nullable.JsonNullable; +/** + * Visual customization options for the hosted inbox widget. + */ @Data @Builder @With @@ -15,17 +21,161 @@ @Jacksonized public class Theme { - private Banner banner; + /** + * Top banner styling options. + */ + @JsonProperty("banner") + private JsonNullable banner; - private Dialog dialog; + /** + * Styling for confirmation and action dialogs. + */ + @JsonProperty("dialog") + private JsonNullable dialog; - private Footer footer; + /** + * Footer styling for the inbox modal. + */ + @JsonProperty("footer") + private JsonNullable