smooch-api 4.2.0 → 5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -3
- data/docs/Action.md +2 -2
- data/docs/AppUserLink.md +1 -1
- data/docs/BusinessSystemItem.md +1 -1
- data/docs/ChannelEntityItem.md +1 -1
- data/docs/Client.md +1 -1
- data/docs/ClientInfo.md +1 -1
- data/docs/Confirmation.md +1 -1
- data/docs/{TypingActivityTrigger.md → ConversationActivity.md} +3 -3
- data/docs/ConversationApi.md +49 -49
- data/docs/Destination.md +1 -1
- data/docs/DisplaySettings.md +1 -1
- data/docs/Enums.md +20 -0
- data/docs/Integration.md +2 -2
- data/docs/IntegrationCreate.md +1 -1
- data/docs/LinkRequestResponseLinkRequests.md +1 -1
- data/docs/MenuItem.md +1 -1
- data/docs/Message.md +2 -2
- data/docs/MessageItem.md +1 -1
- data/docs/MessagePost.md +2 -2
- data/docs/Source.md +1 -1
- data/docs/SubMenuItem.md +1 -1
- data/docs/Webhook.md +1 -1
- data/docs/WebhookCreate.md +1 -1
- data/docs/WebhookUpdate.md +1 -1
- data/lib/smooch-api.rb +2 -1
- data/lib/smooch-api/api/conversation_api.rb +66 -66
- data/lib/smooch-api/models/action.rb +2 -2
- data/lib/smooch-api/models/app_user_link.rb +1 -1
- data/lib/smooch-api/models/business_system_item.rb +1 -1
- data/lib/smooch-api/models/channel_entity_item.rb +1 -1
- data/lib/smooch-api/models/client.rb +1 -1
- data/lib/smooch-api/models/client_info.rb +1 -1
- data/lib/smooch-api/models/confirmation.rb +1 -1
- data/lib/smooch-api/models/{typing_activity_trigger.rb → conversation_activity.rb} +3 -3
- data/lib/smooch-api/models/destination.rb +1 -1
- data/lib/smooch-api/models/display_settings.rb +1 -1
- data/lib/smooch-api/models/enums.rb +473 -0
- data/lib/smooch-api/models/integration.rb +2 -2
- data/lib/smooch-api/models/integration_create.rb +1 -1
- data/lib/smooch-api/models/link_request_response_link_requests.rb +1 -1
- data/lib/smooch-api/models/menu_item.rb +1 -1
- data/lib/smooch-api/models/message.rb +2 -2
- data/lib/smooch-api/models/message_item.rb +1 -1
- data/lib/smooch-api/models/message_post.rb +2 -2
- data/lib/smooch-api/models/source.rb +1 -1
- data/lib/smooch-api/models/sub_menu_item.rb +1 -1
- data/lib/smooch-api/models/webhook.rb +1 -1
- data/lib/smooch-api/models/webhook_create.rb +1 -1
- data/lib/smooch-api/models/webhook_update.rb +1 -1
- data/lib/smooch-api/version.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b793626f16ed8830ad738ca522edc73288e8f30
|
4
|
+
data.tar.gz: e0b98e0cc8f26ebba88c9c9f2a2627b285ebb312
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abe2b9346241a2ff2133eef88ad59325a424e7ad5dc7d7ab4852e5ba1301a9ff54e79573b56b75faf3a96b59e2825fcacf7d4d5da1126895b2902d23faf85e4d
|
7
|
+
data.tar.gz: f365f6f0cbd0ba56180f34655a4b778260b1f5c7b7240ad9fe72f65b8057241e50ed360a1c8107fd6d0c8ef99e2240cf534044bb12dd5569e2888c6cc2bb615d
|
data/README.md
CHANGED
@@ -25,7 +25,7 @@ gem install smooch-api
|
|
25
25
|
|
26
26
|
Add this to the Gemfile:
|
27
27
|
|
28
|
-
gem 'smooch-api', '~>
|
28
|
+
gem 'smooch-api', '~> 5.0'
|
29
29
|
|
30
30
|
## Getting Started
|
31
31
|
|
@@ -123,12 +123,12 @@ Class | Method | HTTP request | Description
|
|
123
123
|
*SmoochApi::AppUserApi* | [**update_app_user**](docs/AppUserApi.md#update_app_user) | **PUT** /v1.1/apps/{appId}/appusers/{userId} |
|
124
124
|
*SmoochApi::AttachmentsApi* | [**remove_attachment**](docs/AttachmentsApi.md#remove_attachment) | **POST** /v1.1/apps/{appId}/attachments/remove |
|
125
125
|
*SmoochApi::AttachmentsApi* | [**upload_attachment**](docs/AttachmentsApi.md#upload_attachment) | **POST** /v1.1/apps/{appId}/attachments |
|
126
|
+
*SmoochApi::ConversationApi* | [**conversation_activity**](docs/ConversationApi.md#conversation_activity) | **POST** /v1.1/apps/{appId}/appusers/{userId}/conversation/activity |
|
126
127
|
*SmoochApi::ConversationApi* | [**delete_message**](docs/ConversationApi.md#delete_message) | **DELETE** /v1.1/apps/{appId}/appusers/{userId}/messages/{messageId} |
|
127
128
|
*SmoochApi::ConversationApi* | [**delete_messages**](docs/ConversationApi.md#delete_messages) | **DELETE** /v1.1/apps/{appId}/appusers/{userId}/messages |
|
128
129
|
*SmoochApi::ConversationApi* | [**get_messages**](docs/ConversationApi.md#get_messages) | **GET** /v1.1/apps/{appId}/appusers/{userId}/messages |
|
129
130
|
*SmoochApi::ConversationApi* | [**post_message**](docs/ConversationApi.md#post_message) | **POST** /v1.1/apps/{appId}/appusers/{userId}/messages |
|
130
131
|
*SmoochApi::ConversationApi* | [**reset_unread_count**](docs/ConversationApi.md#reset_unread_count) | **POST** /v1.1/apps/{appId}/appusers/{userId}/conversation/read |
|
131
|
-
*SmoochApi::ConversationApi* | [**trigger_typing_activity**](docs/ConversationApi.md#trigger_typing_activity) | **POST** /v1.1/apps/{appId}/appusers/{userId}/conversation/activity |
|
132
132
|
*SmoochApi::IntegrationApi* | [**create_integration**](docs/IntegrationApi.md#create_integration) | **POST** /v1.1/apps/{appId}/integrations |
|
133
133
|
*SmoochApi::IntegrationApi* | [**create_integration_menu**](docs/IntegrationApi.md#create_integration_menu) | **POST** /v1.1/apps/{appId}/integrations/{integrationId}/menu |
|
134
134
|
*SmoochApi::IntegrationApi* | [**delete_integration**](docs/IntegrationApi.md#delete_integration) | **DELETE** /v1.1/apps/{appId}/integrations/{integrationId} |
|
@@ -188,8 +188,10 @@ Class | Method | HTTP request | Description
|
|
188
188
|
- [SmoochApi::ClientInfo](docs/ClientInfo.md)
|
189
189
|
- [SmoochApi::Confirmation](docs/Confirmation.md)
|
190
190
|
- [SmoochApi::Conversation](docs/Conversation.md)
|
191
|
+
- [SmoochApi::ConversationActivity](docs/ConversationActivity.md)
|
191
192
|
- [SmoochApi::Destination](docs/Destination.md)
|
192
193
|
- [SmoochApi::DisplaySettings](docs/DisplaySettings.md)
|
194
|
+
- [SmoochApi::Enums](docs/Enums.md)
|
193
195
|
- [SmoochApi::GetMessagesResponse](docs/GetMessagesResponse.md)
|
194
196
|
- [SmoochApi::Integration](docs/Integration.md)
|
195
197
|
- [SmoochApi::IntegrationCreate](docs/IntegrationCreate.md)
|
@@ -227,7 +229,6 @@ Class | Method | HTTP request | Description
|
|
227
229
|
- [SmoochApi::TemplateCreate](docs/TemplateCreate.md)
|
228
230
|
- [SmoochApi::TemplateResponse](docs/TemplateResponse.md)
|
229
231
|
- [SmoochApi::TemplateUpdate](docs/TemplateUpdate.md)
|
230
|
-
- [SmoochApi::TypingActivityTrigger](docs/TypingActivityTrigger.md)
|
231
232
|
- [SmoochApi::Webhook](docs/Webhook.md)
|
232
233
|
- [SmoochApi::WebhookCreate](docs/WebhookCreate.md)
|
233
234
|
- [SmoochApi::WebhookResponse](docs/WebhookResponse.md)
|
data/docs/Action.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**type** | **String** | The action type. |
|
6
|
+
**type** | **String** | The action type. See Enums.md for available values. |
|
7
7
|
**text** | **String** | The button text. |
|
8
8
|
**payload** | **String** | The payload to be sent with the resulting webhook. Required for *postback* and *reply* actions. | [optional]
|
9
9
|
**metadata** | **Object** | Flat JSON object containing any custom properties associated with the action. | [optional]
|
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
|
|
13
13
|
**iconUrl** | **String** | An icon to render next to the reply option (Facebook Messenger and Web Messenger only). | [optional]
|
14
14
|
**uri** | **String** | The action URI. This is the link that will be used in the clients when clicking the button. Required for *link* and *webview* actions. | [optional]
|
15
15
|
**fallback** | **String** | The webview action fallback uri. This is the link that will be used in clients that do not support webviews. Required for *webview* actions. | [optional]
|
16
|
-
**size** | **String** | The size used to display the webview. Allowed values are [\"compact\", \"tall\", \"full\"]. (Optional) Used for *webview* actions. | [optional]
|
16
|
+
**size** | **String** | The size used to display the webview. Allowed values are [\"compact\", \"tall\", \"full\"]. (Optional) Used for *webview* actions. See Enums.md for available values. | [optional]
|
17
17
|
**extraChannelOptions** | **Object** | Extra options to pass directly to the channel API. See [Extra Channel Options](https://docs.smooch.io/rest#extra-channel-options-schema) | [optional]
|
18
18
|
|
19
19
|
|
data/docs/AppUserLink.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**type** | **String** | The type of the channel to link. |
|
6
|
+
**type** | **String** | The type of the channel to link. See Enums.md for available values. |
|
7
7
|
**phoneNumber** | **String** | A String of the appUser’s phone number. It must contain the + prefix and the country code. Required for *messenger*, *twilio* and *messagebird* linking. | [optional]
|
8
8
|
**address** | **String** | A String of the appUser’s email address. Required for *mailgun* linking. | [optional]
|
9
9
|
**givenName** | **String** | A String of the appUser’s given name. Used as additional criteria to increase the likelihood of a match. (Optional) Used for *messenger* linking. | [optional]
|
data/docs/BusinessSystemItem.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**type** | **String** | The type of business system
|
6
|
+
**type** | **String** | The type of business system. See Enums.md for available values. |
|
7
7
|
**channelId** | **String** | The channel id for a *slack* integration | [optional]
|
8
8
|
**ticketId** | **String** | The ticket id for a *zendesk* integration | [optional]
|
9
9
|
**roomId** | **Integer** | The room id for a *hipchat* integration | [optional]
|
data/docs/ChannelEntityItem.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**type** | **String** | The type of channel
|
6
|
+
**type** | **String** | The type of channel. See Enums.md for available values. |
|
7
7
|
**phoneNumber** | **String** | The phone number for a *twilio*, *messageBird* integration | [optional]
|
8
8
|
**userId** | **String** | The userId for a *messenger*, *viber*, *line*, *wechat* integration | [optional]
|
9
9
|
**address** | **String** | The email address for a *frontendEmail*, *mailgun* integration | [optional]
|
data/docs/Client.md
CHANGED
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
|
6
6
|
**id** | **String** | An identifier for the client. Must be globally unique. |
|
7
7
|
**active** | **BOOLEAN** | Flag indicating if the client is active. | [optional]
|
8
8
|
**lastSeen** | **String** | The date time the client was last seen. | [optional]
|
9
|
-
**platform** | **String** | The client's platform. |
|
9
|
+
**platform** | **String** | The client's platform. See Enums.md for available values. |
|
10
10
|
**pushNotificationToken** | **String** | The GCM or APN token to be used for sending push notifications to the device. Applies to only *android* and *ios* clients. | [optional]
|
11
11
|
**appVersion** | **String** | A reserved string field for reporting the app version running on the device. | [optional]
|
12
12
|
**displayName** | **String** | The client's display name. | [optional]
|
data/docs/ClientInfo.md
CHANGED
@@ -18,7 +18,7 @@ Name | Type | Description | Notes
|
|
18
18
|
**phoneNumber** | **String** | The client's phone number. | [optional]
|
19
19
|
**radioAccessTechnology** | **String** | The client's radioAccessTechnology (Ex. HSDPA). | [optional]
|
20
20
|
**state** | **String** | The client's state or province. | [optional]
|
21
|
-
**timezone** | **
|
21
|
+
**timezone** | **Float** | The client's timezone offset. | [optional]
|
22
22
|
**wifi** | **String** | Whether or not the client has wifi. | [optional]
|
23
23
|
|
24
24
|
|
data/docs/Confirmation.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**type** | **String** | The confirmation type. |
|
6
|
+
**type** | **String** | The confirmation type. See Enums.md for available values. |
|
7
7
|
**message** | [**Message**](Message.md) | The message used to reach out to the user. Must be a valid message object as per the post message API. | [optional]
|
8
8
|
|
9
9
|
|
@@ -1,10 +1,10 @@
|
|
1
|
-
# SmoochApi::
|
1
|
+
# SmoochApi::ConversationActivity
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**role** | **String** | The role of the actor. Must be *appMaker*. |
|
7
|
-
**type** | **String** | The type of activity to trigger. Must be either *typing:start* or *typing:stop*. |
|
6
|
+
**role** | **String** | The role of the actor. Must be *appMaker*. See Enums.md for available values. |
|
7
|
+
**type** | **String** | The type of activity to trigger. Must be either *typing:start* or *typing:stop*. See Enums.md for available values. |
|
8
8
|
**name** | **String** | The name of the app maker that starts or stops typing a response. | [optional]
|
9
9
|
**avatarUrl** | **String** | The avatar URL of the app maker that starts typing a response. | [optional]
|
10
10
|
|
data/docs/ConversationApi.md
CHANGED
@@ -4,20 +4,20 @@ All URIs are relative to *https://api.smooch.io*
|
|
4
4
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
|
+
[**conversation_activity**](ConversationApi.md#conversation_activity) | **POST** /v1.1/apps/{appId}/appusers/{userId}/conversation/activity |
|
7
8
|
[**delete_message**](ConversationApi.md#delete_message) | **DELETE** /v1.1/apps/{appId}/appusers/{userId}/messages/{messageId} |
|
8
9
|
[**delete_messages**](ConversationApi.md#delete_messages) | **DELETE** /v1.1/apps/{appId}/appusers/{userId}/messages |
|
9
10
|
[**get_messages**](ConversationApi.md#get_messages) | **GET** /v1.1/apps/{appId}/appusers/{userId}/messages |
|
10
11
|
[**post_message**](ConversationApi.md#post_message) | **POST** /v1.1/apps/{appId}/appusers/{userId}/messages |
|
11
12
|
[**reset_unread_count**](ConversationApi.md#reset_unread_count) | **POST** /v1.1/apps/{appId}/appusers/{userId}/conversation/read |
|
12
|
-
[**trigger_typing_activity**](ConversationApi.md#trigger_typing_activity) | **POST** /v1.1/apps/{appId}/appusers/{userId}/conversation/activity |
|
13
13
|
|
14
14
|
|
15
|
-
# **
|
16
|
-
>
|
15
|
+
# **conversation_activity**
|
16
|
+
> conversation_activity(appId, userId, conversationActivityBody)
|
17
17
|
|
18
18
|
|
19
19
|
|
20
|
-
|
20
|
+
Notify Smooch when an app maker starts or stops typing a response.
|
21
21
|
|
22
22
|
### Example
|
23
23
|
```ruby
|
@@ -36,13 +36,13 @@ appId = "appId_example" # String | Identifies the app.
|
|
36
36
|
|
37
37
|
userId = "userId_example" # String | Identifies the user. Can be either the smoochId or the userId.
|
38
38
|
|
39
|
-
|
39
|
+
conversationActivityBody = SmoochApi::ConversationActivity.new # ConversationActivity | Body for a triggerConversationActivity request.
|
40
40
|
|
41
41
|
|
42
42
|
begin
|
43
|
-
api_instance.
|
43
|
+
api_instance.conversation_activity(appId, userId, conversationActivityBody)
|
44
44
|
rescue SmoochApi::ApiError => e
|
45
|
-
puts "Exception when calling ConversationApi->
|
45
|
+
puts "Exception when calling ConversationApi->conversation_activity: #{e}"
|
46
46
|
end
|
47
47
|
```
|
48
48
|
|
@@ -52,7 +52,7 @@ Name | Type | Description | Notes
|
|
52
52
|
------------- | ------------- | ------------- | -------------
|
53
53
|
**appId** | **String**| Identifies the app. |
|
54
54
|
**userId** | **String**| Identifies the user. Can be either the smoochId or the userId. |
|
55
|
-
**
|
55
|
+
**conversationActivityBody** | [**ConversationActivity**](ConversationActivity.md)| Body for a triggerConversationActivity request. |
|
56
56
|
|
57
57
|
### Return type
|
58
58
|
|
@@ -69,12 +69,12 @@ nil (empty response body)
|
|
69
69
|
|
70
70
|
|
71
71
|
|
72
|
-
# **
|
73
|
-
>
|
72
|
+
# **delete_message**
|
73
|
+
> delete_message(appId, userId, messageId)
|
74
74
|
|
75
75
|
|
76
76
|
|
77
|
-
|
77
|
+
Deletes a single message.
|
78
78
|
|
79
79
|
### Example
|
80
80
|
```ruby
|
@@ -93,11 +93,13 @@ appId = "appId_example" # String | Identifies the app.
|
|
93
93
|
|
94
94
|
userId = "userId_example" # String | Identifies the user. Can be either the smoochId or the userId.
|
95
95
|
|
96
|
+
messageId = "messageId_example" # String | Identifies the message.
|
97
|
+
|
96
98
|
|
97
99
|
begin
|
98
|
-
api_instance.
|
100
|
+
api_instance.delete_message(appId, userId, messageId)
|
99
101
|
rescue SmoochApi::ApiError => e
|
100
|
-
puts "Exception when calling ConversationApi->
|
102
|
+
puts "Exception when calling ConversationApi->delete_message: #{e}"
|
101
103
|
end
|
102
104
|
```
|
103
105
|
|
@@ -107,6 +109,7 @@ Name | Type | Description | Notes
|
|
107
109
|
------------- | ------------- | ------------- | -------------
|
108
110
|
**appId** | **String**| Identifies the app. |
|
109
111
|
**userId** | **String**| Identifies the user. Can be either the smoochId or the userId. |
|
112
|
+
**messageId** | **String**| Identifies the message. |
|
110
113
|
|
111
114
|
### Return type
|
112
115
|
|
@@ -123,12 +126,12 @@ nil (empty response body)
|
|
123
126
|
|
124
127
|
|
125
128
|
|
126
|
-
# **
|
127
|
-
>
|
129
|
+
# **delete_messages**
|
130
|
+
> delete_messages(appId, userId, )
|
128
131
|
|
129
132
|
|
130
133
|
|
131
|
-
|
134
|
+
Clears the message history for a user, permanently deleting all messages, but leaving any connections to Messaging Channels and Business Systems intact. These connections allow for the conversation to continue in the future, while still being associated to the same appUser.
|
132
135
|
|
133
136
|
### Example
|
134
137
|
```ruby
|
@@ -147,16 +150,11 @@ appId = "appId_example" # String | Identifies the app.
|
|
147
150
|
|
148
151
|
userId = "userId_example" # String | Identifies the user. Can be either the smoochId or the userId.
|
149
152
|
|
150
|
-
opts = {
|
151
|
-
before: "before_example", # String | Timestamp of message. The API will return 100 messages before the specified timestamp (excluding any messages with the provided timestamp).
|
152
|
-
after: "after_example" # String | Timestamp of message. The API will return 100 messages after the specified timestamp (excluding any messages with the provided timestamp).
|
153
|
-
}
|
154
153
|
|
155
154
|
begin
|
156
|
-
|
157
|
-
p result
|
155
|
+
api_instance.delete_messages(appId, userId, )
|
158
156
|
rescue SmoochApi::ApiError => e
|
159
|
-
puts "Exception when calling ConversationApi->
|
157
|
+
puts "Exception when calling ConversationApi->delete_messages: #{e}"
|
160
158
|
end
|
161
159
|
```
|
162
160
|
|
@@ -166,12 +164,10 @@ Name | Type | Description | Notes
|
|
166
164
|
------------- | ------------- | ------------- | -------------
|
167
165
|
**appId** | **String**| Identifies the app. |
|
168
166
|
**userId** | **String**| Identifies the user. Can be either the smoochId or the userId. |
|
169
|
-
**before** | **String**| Timestamp of message. The API will return 100 messages before the specified timestamp (excluding any messages with the provided timestamp). | [optional]
|
170
|
-
**after** | **String**| Timestamp of message. The API will return 100 messages after the specified timestamp (excluding any messages with the provided timestamp). | [optional]
|
171
167
|
|
172
168
|
### Return type
|
173
169
|
|
174
|
-
|
170
|
+
nil (empty response body)
|
175
171
|
|
176
172
|
### Authorization
|
177
173
|
|
@@ -184,12 +180,12 @@ Name | Type | Description | Notes
|
|
184
180
|
|
185
181
|
|
186
182
|
|
187
|
-
# **
|
188
|
-
>
|
183
|
+
# **get_messages**
|
184
|
+
> GetMessagesResponse get_messages(appId, userId, , opts)
|
189
185
|
|
190
186
|
|
191
187
|
|
192
|
-
|
188
|
+
Get the specified app user's messages.
|
193
189
|
|
194
190
|
### Example
|
195
191
|
```ruby
|
@@ -208,14 +204,16 @@ appId = "appId_example" # String | Identifies the app.
|
|
208
204
|
|
209
205
|
userId = "userId_example" # String | Identifies the user. Can be either the smoochId or the userId.
|
210
206
|
|
211
|
-
|
212
|
-
|
207
|
+
opts = {
|
208
|
+
before: "before_example", # String | Timestamp of message. The API will return 100 messages before the specified timestamp (excluding any messages with the provided timestamp).
|
209
|
+
after: "after_example" # String | Timestamp of message. The API will return 100 messages after the specified timestamp (excluding any messages with the provided timestamp).
|
210
|
+
}
|
213
211
|
|
214
212
|
begin
|
215
|
-
result = api_instance.
|
213
|
+
result = api_instance.get_messages(appId, userId, , opts)
|
216
214
|
p result
|
217
215
|
rescue SmoochApi::ApiError => e
|
218
|
-
puts "Exception when calling ConversationApi->
|
216
|
+
puts "Exception when calling ConversationApi->get_messages: #{e}"
|
219
217
|
end
|
220
218
|
```
|
221
219
|
|
@@ -225,11 +223,12 @@ Name | Type | Description | Notes
|
|
225
223
|
------------- | ------------- | ------------- | -------------
|
226
224
|
**appId** | **String**| Identifies the app. |
|
227
225
|
**userId** | **String**| Identifies the user. Can be either the smoochId or the userId. |
|
228
|
-
**
|
226
|
+
**before** | **String**| Timestamp of message. The API will return 100 messages before the specified timestamp (excluding any messages with the provided timestamp). | [optional]
|
227
|
+
**after** | **String**| Timestamp of message. The API will return 100 messages after the specified timestamp (excluding any messages with the provided timestamp). | [optional]
|
229
228
|
|
230
229
|
### Return type
|
231
230
|
|
232
|
-
[**
|
231
|
+
[**GetMessagesResponse**](GetMessagesResponse.md)
|
233
232
|
|
234
233
|
### Authorization
|
235
234
|
|
@@ -242,12 +241,12 @@ Name | Type | Description | Notes
|
|
242
241
|
|
243
242
|
|
244
243
|
|
245
|
-
# **
|
246
|
-
>
|
244
|
+
# **post_message**
|
245
|
+
> MessageResponse post_message(appId, userId, messagePostBody)
|
247
246
|
|
248
247
|
|
249
248
|
|
250
|
-
|
249
|
+
Post a message to or from the app user.
|
251
250
|
|
252
251
|
### Example
|
253
252
|
```ruby
|
@@ -266,11 +265,14 @@ appId = "appId_example" # String | Identifies the app.
|
|
266
265
|
|
267
266
|
userId = "userId_example" # String | Identifies the user. Can be either the smoochId or the userId.
|
268
267
|
|
268
|
+
messagePostBody = SmoochApi::MessagePost.new # MessagePost | Body for a postMessage request. Additional arguments are necessary based on message type ([text](https://docs.smooch.io/rest#text-message), [image](https://docs.smooch.io/rest#image-message), [carousel](https://docs.smooch.io/rest#carousel-message), [list](https://docs.smooch.io/rest#list-message))
|
269
|
+
|
269
270
|
|
270
271
|
begin
|
271
|
-
api_instance.
|
272
|
+
result = api_instance.post_message(appId, userId, messagePostBody)
|
273
|
+
p result
|
272
274
|
rescue SmoochApi::ApiError => e
|
273
|
-
puts "Exception when calling ConversationApi->
|
275
|
+
puts "Exception when calling ConversationApi->post_message: #{e}"
|
274
276
|
end
|
275
277
|
```
|
276
278
|
|
@@ -280,10 +282,11 @@ Name | Type | Description | Notes
|
|
280
282
|
------------- | ------------- | ------------- | -------------
|
281
283
|
**appId** | **String**| Identifies the app. |
|
282
284
|
**userId** | **String**| Identifies the user. Can be either the smoochId or the userId. |
|
285
|
+
**messagePostBody** | [**MessagePost**](MessagePost.md)| Body for a postMessage request. Additional arguments are necessary based on message type ([text](https://docs.smooch.io/rest#text-message), [image](https://docs.smooch.io/rest#image-message), [carousel](https://docs.smooch.io/rest#carousel-message), [list](https://docs.smooch.io/rest#list-message)) |
|
283
286
|
|
284
287
|
### Return type
|
285
288
|
|
286
|
-
|
289
|
+
[**MessageResponse**](MessageResponse.md)
|
287
290
|
|
288
291
|
### Authorization
|
289
292
|
|
@@ -296,12 +299,12 @@ nil (empty response body)
|
|
296
299
|
|
297
300
|
|
298
301
|
|
299
|
-
# **
|
300
|
-
>
|
302
|
+
# **reset_unread_count**
|
303
|
+
> reset_unread_count(appId, userId, )
|
301
304
|
|
302
305
|
|
303
306
|
|
304
|
-
|
307
|
+
Reset the unread count of the conversation to 0.
|
305
308
|
|
306
309
|
### Example
|
307
310
|
```ruby
|
@@ -320,13 +323,11 @@ appId = "appId_example" # String | Identifies the app.
|
|
320
323
|
|
321
324
|
userId = "userId_example" # String | Identifies the user. Can be either the smoochId or the userId.
|
322
325
|
|
323
|
-
typingActivityTriggerBody = SmoochApi::TypingActivityTrigger.new # TypingActivityTrigger | Body for a triggerTypingActivity request.
|
324
|
-
|
325
326
|
|
326
327
|
begin
|
327
|
-
api_instance.
|
328
|
+
api_instance.reset_unread_count(appId, userId, )
|
328
329
|
rescue SmoochApi::ApiError => e
|
329
|
-
puts "Exception when calling ConversationApi->
|
330
|
+
puts "Exception when calling ConversationApi->reset_unread_count: #{e}"
|
330
331
|
end
|
331
332
|
```
|
332
333
|
|
@@ -336,7 +337,6 @@ Name | Type | Description | Notes
|
|
336
337
|
------------- | ------------- | ------------- | -------------
|
337
338
|
**appId** | **String**| Identifies the app. |
|
338
339
|
**userId** | **String**| Identifies the user. Can be either the smoochId or the userId. |
|
339
|
-
**typingActivityTriggerBody** | [**TypingActivityTrigger**](TypingActivityTrigger.md)| Body for a triggerTypingActivity request. |
|
340
340
|
|
341
341
|
### Return type
|
342
342
|
|
data/docs/Destination.md
CHANGED
@@ -4,6 +4,6 @@
|
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**integrationId** | **String** | The ID of the target integration. |
|
7
|
-
**integrationType** | **String** | The type of the target integration. |
|
7
|
+
**integrationType** | **String** | The type of the target integration. See Enums.md for available values. |
|
8
8
|
|
9
9
|
|
data/docs/DisplaySettings.md
CHANGED
@@ -3,6 +3,6 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
-
**imageAspectRatio** | **String** | Specifies how to display all carousel images.
|
6
|
+
**imageAspectRatio** | **String** | Specifies how to display all carousel images. See Enums.md for available values. | [optional]
|
7
7
|
|
8
8
|
|
data/docs/Enums.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# SmoochApi::Enums
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**actionSize** | **String** | | [optional]
|
7
|
+
**actionType** | **String** | | [optional]
|
8
|
+
**businessSystemType** | **String** | | [optional]
|
9
|
+
**confirmationType** | **String** | | [optional]
|
10
|
+
**conversationActivityType** | **String** | | [optional]
|
11
|
+
**imageAspectRatio** | **String** | | [optional]
|
12
|
+
**integrationStatus** | **String** | | [optional]
|
13
|
+
**integrationType** | **String** | | [optional]
|
14
|
+
**menuItemType** | **String** | | [optional]
|
15
|
+
**messageItemSize** | **String** | | [optional]
|
16
|
+
**messageType** | **String** | | [optional]
|
17
|
+
**role** | **String** | | [optional]
|
18
|
+
**webhookTriggers** | **String** | | [optional]
|
19
|
+
|
20
|
+
|