Skip to content

Commit

Permalink
Merge pull request #147 from sinch/DEVEXP-542-conversation-javadoc
Browse files Browse the repository at this point in the history
DEVEXP-542: Conversation javadoc
  • Loading branch information
JPPortier authored Sep 26, 2024
2 parents e2a672a + fa1c323 commit 261d324
Show file tree
Hide file tree
Showing 115 changed files with 861 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/">https://developers.sinch.com/docs/conversation/</a>
* @since _NEXT_VERSION_
* @since 1.3
*/
public interface ConversationService {

Expand All @@ -17,21 +17,23 @@ public interface ConversationService {
* @return V1 service instance for project
* @see <a
* href="https://developers.sinch.com/docs/conversation/sdk/java/syntax-reference">Documentation</a>
* @since _NEXT_VERSION_
* @since 1.3
*/
com.sinch.sdk.domains.conversation.api.v1.ConversationService v1();

/**
* Templates service
*
* <p>The Template Management API offers a way to manage templates that can be used together with
* the Conversation API. Note that you may also use the Message Composer tool on the Sinch
* Customer Dashboard to manage templates.
* the Conversation API.
*
* <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
* href="https://developers.sinch.com/docs/conversation/api-reference/template/overview/#section/Managing-templates">Documentation</a>
* @since _NEXT_VERSION_
* @since 1.3
*/
TemplatesService templates();
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@
import com.sinch.sdk.domains.conversation.api.templates.v2.TemplatesServiceV2;

/**
* Service for working with templates
* Service for working with Conversation templates
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/template/overview/#section/Managing-templates">online
* documentation</a>
* @since _NEXT_VERSION_
* @since 1.3
*/
public interface TemplatesService {

/**
* Service for working with templates V1
*
* @return Templates V1 service
* @since _NEXT_VERSION_
* @since 1.3
*/
TemplatesServiceV1 v1();

/**
* Service for working with templates V2
*
* @return Templates V2 service
* @since _NEXT_VERSION_
* @since 1.3
*/
TemplatesServiceV2 v2();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* Conversation API interface for templates management
*
* @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 @@ -6,21 +6,24 @@
/**
* Templates V1
*
* <p>Version 1 endpoints for managing message templates. Currently maintained for existing users.
* Version 2 is recommended.
* <p>Version 1 endpoints for managing message templates.
*
* <p>Currently maintained for existing users.
*
* <p>Version 2 is recommended.
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/template/tag/Templates-V1">online
* documentation</a>
* @since _NEXT_VERSION_
* @since 1.3
*/
public interface TemplatesServiceV1 {

/**
* List all templates belonging to a project ID.
*
* @return List of templates * @since _NEXT_VERSION_
* @since _NEXT_VERSION_
* @return List of templates
* @since 1.3
*/
Collection<TemplateV1> list();

Expand All @@ -29,22 +32,22 @@ public interface TemplatesServiceV1 {
*
* @param template Information for creation
* @return Created template
* @since _NEXT_VERSION_
* @since 1.3
*/
TemplateV1 create(TemplateV1 template);

/***
* Get a template
* @param templateId The ID of the template to fetch.
* @return The template information
* @since _NEXT_VERSION_
* @since 1.3
*/
TemplateV1 get(String templateId);

/***
* Delete a template
* @param templateId The ID of the template to delete.
* @since _NEXT_VERSION_
* @since 1.3
*/
void delete(String templateId);

Expand All @@ -53,7 +56,7 @@ public interface TemplatesServiceV1 {
*
* @param template Information to be updated
* @return Updated template
* @since _NEXT_VERSION_
* @since 1.3
*/
TemplateV1 update(String templateId, TemplateV1 template);
}
Original file line number Diff line number Diff line change
@@ -0,0 +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>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.api.templates.v1;
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,27 @@
/**
* Templates V2
*
* <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>
* @since _NEXT_VERSION_
* @since 1.3
*/
public interface TemplatesServiceV2 {

/**
* List all templates belonging to a project ID.
*
* @return List of templates
* @since _NEXT_VERSION_
* @since 1.3
*/
Collection<TemplateV2> list();

Expand All @@ -29,7 +38,7 @@ public interface TemplatesServiceV2 {
* @param templateId The ID of the template to fetch
* @param request Parameters for request
* @return The translations list
* @since _NEXT_VERSION_
* @since 1.3
*/
Collection<TemplateTranslation> listTranslations(
String templateId, TranslationListRequest request);
Expand All @@ -39,22 +48,22 @@ Collection<TemplateTranslation> listTranslations(
*
* @param template Information for creation
* @return Created template
* @since _NEXT_VERSION_
* @since 1.3
*/
TemplateV2 create(TemplateV2 template);

/***
* Get a template
* @param templateId The ID of the template to fetch.
* @return The template information
* @since _NEXT_VERSION_
* @since 1.3
*/
TemplateV2 get(String templateId);

/***
* Delete a template
* @param templateId The ID of the template to delete.
* @since _NEXT_VERSION_
* @since 1.3
*/
void delete(String templateId);

Expand All @@ -63,7 +72,7 @@ Collection<TemplateTranslation> listTranslations(
*
* @param template Information to be updated
* @return Updated template
* @since _NEXT_VERSION_
* @since 1.3
*/
TemplateV2 update(String templateId, TemplateV2 template);
}
Original file line number Diff line number Diff line change
@@ -0,0 +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>
* @since 1.3
*/
package com.sinch.sdk.domains.conversation.api.templates.v2;
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/App/">https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/App/</a>
* @since _NEXT_VERSION_
* @since 1.3
*/
public interface AppService {

Expand All @@ -31,7 +31,7 @@ public interface AppService {
*
* @return List of apps related to configured region (from {@link
* com.sinch.sdk.models.Configuration.Builder#setConversationRegion(ConversationRegion)})
* @since _NEXT_VERSION_
* @since 1.3
*/
Collection<AppResponse> list();

Expand All @@ -42,7 +42,7 @@ public interface AppService {
*
* @param appId The application identifier
* @return App information details
* @since _NEXT_VERSION_
* @since 1.3
*/
AppResponse get(String appId);

Expand All @@ -56,7 +56,7 @@ public interface AppService {
* deleted).
*
* @param appId The application identifier
* @since _NEXT_VERSION_
* @since 1.3
*/
void delete(String appId);

Expand All @@ -69,7 +69,7 @@ public interface AppService {
*
* @param parameters Creation parameters
* @return Created application
* @since _NEXT_VERSION_
* @since 1.3
*/
AppResponse create(AppCreateRequest parameters);

Expand All @@ -80,17 +80,18 @@ public interface AppService {
*
* <p>Any specified field values will replace existing values.
*
* <p>Therefore, 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. For example, if you'd
* like to add new channel_credentials, you can get your existing Conversation API app, extract
* the existing channel_credentials list, append your new configuration to that list, and include
* the updated channel_credentials list in this update call.
* <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.
*
* @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
* updated
* @return Updated application
* @since _NEXT_VERSION_
* @since 1.3
*/
AppResponse update(String appId, AppUpdateRequest parameters);
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* @see <a
* href="https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/Capability/">online
* documentation</a>
* @since _NEXT_VERSION_
* @since 1.3
*/
public interface CapabilityService {

Expand All @@ -33,7 +33,7 @@ public interface CapabilityService {
*
* @param request The request parameters to lookup capability
* @return The capability response
* @since _NEXT_VERSION_
* @since 1.3
*/
QueryCapabilityResponse lookup(QueryCapabilityRequest request);
}
Loading

0 comments on commit 261d324

Please sign in to comment.