Skip to content

Commit

Permalink
docs (Conversation/javadoc): Enhance javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
JPPortier committed Sep 26, 2024
1 parent 3ca4ff3 commit 2f4ba0f
Show file tree
Hide file tree
Showing 99 changed files with 719 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ public interface ConversationService {
*
* <p>The Template Management API offers a way to manage templates that can be used together with
* the Conversation API.
* <p>Note that you may also use the Message Composer tool on the Sinch
* Customer Dashboard to manage templates.
*
* <p>Note that you may also use the Message Composer tool on the Sinch Customer Dashboard to
* manage templates.
*
* @return Service instance for project
* @see <a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* Conversation API interface for templates management
*
* @see <a href="https://developers.sinch.com/docs/conversation/templates">Conversation Templates</a>
* @see <a href="https://developers.sinch.com/docs/conversation/templates">Conversation
* Templates</a>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.api.templates;
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
* Templates V1
*
* <p>Version 1 endpoints for managing message templates.
*
* <p>Currently maintained for existing users.
*
* <p>Version 2 is recommended.
*
* @see <a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* Conversation API interface for templates V1 management
*
* @see <a href="https://developers.sinch.com/docs/conversation/templates/#version-1">Conversation Templates V1</a>
* @see <a href="https://developers.sinch.com/docs/conversation/templates/#version-1">Conversation
* Templates V1</a>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.api.templates.v1;
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,16 @@

/**
* Templates V2
* <p>
* Version 2 endpoints for managing message templates.
* <p></p>Recommended version for all users.
* <p></p>Includes strongly typed <code>translations</code> field (allowing for message definition using JSON structures also used in the send message request of the Conversation API), improved validation, and the ability to override omni-channel templates in favor of channel-specific templates (where available).
*
* <p>Version 2 endpoints for managing message templates.
*
* <p>Recommended version for all users.
*
* <p>Includes strongly typed <code>translations</code> field (allowing for message definition using
* JSON structures also used in the send message request of the Conversation API), improved
* validation, and the ability to override omni-channel templates in favor of channel-specific
* templates (where available).
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/template/tag/Templates-V2">online
* documentation</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
* Conversation API interface for templates V2 management
*
* @see <a href="https://developers.sinch.com/docs/conversation/templates/#version-2">Conversation Templates V2</a>
* @see <a href="https://developers.sinch.com/docs/conversation/templates/#version-2">Conversation
* Templates V2</a>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.api.templates.v2;
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,11 @@ public interface AppService {
* <p>Any specified field values will replace existing values.
*
* <p>Therefore, <b>if you'd like to add additional configurations to an existing Conversation API
* app, ensure that you include existing values AND new values in the call</b>.
* <br> For example, if you'd like to add new <code>channel_credentials</code>, you can get your existing Conversation API app, extract
* the existing <code>channel_credentials</code> list, append your new configuration to that list, and include
* the updated <code>channel_credentials</code> list in this update call.
* app, ensure that you include existing values AND new values in the call</b>. <br>
* For example, if you'd like to add new <code>channel_credentials</code>, you can get your
* existing Conversation API app, extract the existing <code>channel_credentials</code> list,
* append your new configuration to that list, and include the updated <code>channel_credentials
* </code> list in this update call.
*
* @param appId The unique ID of the app to be updated
* @param parameters Fields to be updated. Only fields filled within the parameters will be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,85 @@ public interface MessagesService {
*/
SendMessageResponse sendMessage(SendMessageRequest<? extends AppMessageBody> request);

/**
* Send a card message
*
* @param request CardMessage request
* @return Response
* @see #sendMessage(SendMessageRequest)
*/
SendMessageResponse sendCardMessage(SendMessageRequest<CardMessage> request);

/**
* Send a carousel message
*
* @param request CarouselMessage request
* @return Response
* @see #sendMessage(SendMessageRequest)
*/
SendMessageResponse sendCarouselMessage(SendMessageRequest<CarouselMessage> request);

/**
* Send a choice message
*
* @param request ChoiceMessage request
* @return Response
* @see #sendMessage(SendMessageRequest)
*/
SendMessageResponse sendChoiceMessage(SendMessageRequest<ChoiceMessage> request);

/**
* Send a contact info message
*
* @param request ContactInfoMessage request
* @return Response
* @see #sendMessage(SendMessageRequest)
*/
SendMessageResponse sendContactInfoMessage(SendMessageRequest<ContactInfoMessage> request);

/**
* Send a list message
*
* @param request ListMessage request
* @return Response
* @see #sendMessage(SendMessageRequest)
*/
SendMessageResponse sendListMessage(SendMessageRequest<ListMessage> request);

/**
* Send a location message
*
* @param request LocationMessage request
* @return Response
* @see #sendMessage(SendMessageRequest)
*/
SendMessageResponse sendLocationMessage(SendMessageRequest<LocationMessage> request);

/**
* Send a media message
*
* @param request MediaMessage request
* @return Response
* @see #sendMessage(SendMessageRequest)
*/
SendMessageResponse sendMediaMessage(SendMessageRequest<MediaMessage> request);

/**
* Send a template message
*
* @param request TemplateMessage request
* @return Response
* @see #sendMessage(SendMessageRequest)
*/
SendMessageResponse sendTemplateMessage(SendMessageRequest<TemplateMessage> request);

/**
* Send a send message request message
*
* @param request request
* @return Response
* @see #sendMessage(SendMessageRequest)
*/
SendMessageResponse sendTextMessage(SendMessageRequest<TextMessage> request);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import java.util.Arrays;
import java.util.Collection;

/** Container for list of specific channel identities */
@JsonDeserialize(builder = ChannelRecipientIdentities.Builder.class)
public class ChannelRecipientIdentities extends ArrayList<ChannelRecipientIdentity>
implements com.sinch.sdk.domains.conversation.models.v1.Recipient {
Expand All @@ -27,6 +28,7 @@ public static Builder builder() {
return new Builder();
}

/** Dedicated Builder */
@JsonPOJOBuilder(withPrefix = "set")
public static class Builder {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package com.sinch.sdk.domains.conversation.models.v1;

/** Base class for all classes supported by Recipient */
public interface Recipient {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Conversation models for <code>App</code>
*
* <p>Apps are created and configured through the Sinch Dashboard, are tied to the API user and come
* with a set of <b>channel credentials</b> for each underlying connected channel.
*
* <p>The app has a list of <b>conversations</b> between itself and different <b>contacts</b> which
* share the same <b>project</b>.
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/App">App</a>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.models.v1.app;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* <code>App</code> request models
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/App">App</a>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.models.v1.app.request;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* <code>App</code> response models
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/App">App</a>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.models.v1.app.response;
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Conversation models for <code>Capability</code>
*
* <p>A capability query checks the options available for reaching the contact on the channels on
* which it has a channel identity.
*
* <p>Capability queries can only be executed for contacts that already exist in a project and app.
* For executing the request, either the contact ID or the channel recipient identities of the
* contact are required.
*
* <p>The request is executed asynchronously, therefore the service responds immediately. The result
* of the capability query is sent to the registered webhook for the <b>CAPABILITY</b> trigger.
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/Capability">Capability</a>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.models.v1.capability;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* <code>Capability</code> request models
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/Capability">Capability</a>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.models.v1.capability.request;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* <code>Capability</code> responses models
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/Capability">Capability</a>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.models.v1.capability.response;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/**
* Conversation models for <code>Contact</code>
*
* <p>A contact is a collection that groups together underlying connected <b>channel recipient
* identities</b>. It's tied to a specific <b>project</b> and is therefore considered public to all
* <b>apps</b> sharing the same <b>project</b>.
*
* <p>Most contact creation and maintenance is handled by the Conversation API's automatic contact
* management processes. However, you can also use API calls to manually manage your contacts.
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/Capability">Capability</a>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.models.v1.contact;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* <code>Contact</code> request models
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/Contact">Contact</a>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.models.v1.contact.request;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* <code>Contact</code> response models
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/Contact">Contact</a>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.models.v1.contact.response;
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Conversation models for <code>Conversation</code>
*
* <p>APIS for working with the conversation log.
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/Conversation">Conversation</a>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.models.v1.conversation;
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ static Builder builder(ConversationsListRecentRequest parameters) {
return new ConversationsListRecentRequestImpl.Builder(parameters);
}

/**
* Dedicated builder
*
* @since 1.3
*/
interface Builder {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* <code>Conversation</code> request models
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/Conversation">Conversation</a>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.models.v1.conversation.request;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* <code>Conversation</code> response models
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/Conversation">Conversation</a>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.models.v1.conversation.response;
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package com.sinch.sdk.domains.conversation.models.v1.credentials;

/** Base class for Credentials classes */
public interface ChannelCredentials {}
Loading

0 comments on commit 2f4ba0f

Please sign in to comment.