Skip to content

Commit

Permalink
Version 3.25.0
Browse files Browse the repository at this point in the history
  • Loading branch information
webim committed Jun 19, 2019
1 parent b473a74 commit 2b18f53
Show file tree
Hide file tree
Showing 46 changed files with 1,124 additions and 102 deletions.
177 changes: 177 additions & 0 deletions Documentation/Index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
- [send(message:data:completionHandler:) method](#send-message-data)
- [send(message:isHintQuestion:) method](#send-message-is-hint-question)
- [send(file:filename:mimeType:completionHandler:) method](#send-file-filename-mime-type-completion-handler)
- [sendKeyboardRequest(button:message:completionHandler:) method](#send-keyboard-request)
- [udpateWidgetStatus(data:) method](#update-widget-status)
- [edit(message:text:completionHandler:) method](#edit-message)
- [delete(message:completionHandler:) method](#delete-message)
Expand Down Expand Up @@ -100,6 +101,9 @@
- [SendFileCompletionHandler protocol](#send-file-completion-handler)
- [onSuccess(messageID:) method](#on-success-message-id)
- [onFailure(messageID:,error:) method](#on-failure-message-id-error)
- [SendKeyboardRequestCompletionHandler protocol](#send-keyboard-request-completion-handler)
- [onSuccess(messageID:) method](#on-success-message-id-send-keyboard-request)
- [onFailure(messageID:,error:) method](#on-failure-message-id-error-send-keyboard-request)
- [RateOperatorCompletionHandler protocol](#rate-operator-completion-handler)
- [onSuccess() method](#on-success)
- [onFailure(error:) method](#on-failure-error)
Expand Down Expand Up @@ -171,6 +175,12 @@
- [FILE_TYPE_NOT_ALLOWED case](#file-type-not-allowed)
- [UPLOADED_FILE_NOT_FOUND case](#uploaded-file-not-found)
- [UNKNOWN case](#file-sending-unknown)
- [KeyboardResponseError enum](#keyboard-response-error)
- [NO_CHAT case](#keyboard-response-error-no-chat)
- [BUTTON_ID_NOT_SET case](#button-id-not-set)
- [REQUEST_MESSAGE_ID_NOT_SET case](#request-message-id-not-set)
- [CAN_NOT_CREATE_RESPONSE case](#can-not-create-response)
- [UNKNOWN case](#keyboard-response-error-unknown)
- [RateOperatorError enum](#rate-operator-error)
- [NO_CHAT case](#no-chat)
- [WRONG_OPERATOR_ID case](#wrong-operator-id)
Expand All @@ -189,6 +199,8 @@
- [getAttachment() method](#get-attachment)
- [getData() method](#get-data)
- [getID() method](#get-id)
- [getKeyboard() method](#get-keyboard)
- [getKeyboardRequest()](#get-keyboard-request)
- [getOperatorID() method](#get-operator-id)
- [getSenderAvatarFullURL() method](#get-sender-avatar-full-url)
- [getSenderName() method](#get-sender-name)
Expand All @@ -209,9 +221,24 @@
- [getThumbURL() method](#get-thumb-url-string)
- [getHeight() method](#get-height)
- [getWidth() method](#get-width)
- [Keyboard protocol](#keyboard)
- [getButtons() method](#get-buttons)
- [getState() method](#get-state)
- [getResponse() method](#get-response)
- [KeyboardResponse protocol](#keyboard-response)
- [getButtonID() method](#get-button-id)
- [getMessageID() method](#keyboard-response-get-message-id)
- [KeyboardButton protocol](#keyboard-button)
- [getID() method](#button-get-id)
- [getText() method](#button-get-text)
- [KeyboardRequest protocol](#keyboard-request)
- [getButton() method](#get-button)
- [getMessageID() method](#keyboard-request-get-message-id)
- [MessageType enum](#message-type)
- [ACTION_REQUEST case](#action-request)
- [CONTACTS_REQUEST case](#contacts-request)
- [KEYBOARD case](#keyboard-type)
- [KEYBOARD_RESPONSE case](#keyboard-response-type)
- [FILE_FROM_OPERATOR case](#file-from-operator)
- [FILE_FROM_VISITOR case](#file-from-visitor)
- [INFO case](#info)
Expand All @@ -221,6 +248,10 @@
- [MessageSendStatus enum](#message-send-status)
- [SENDING case](#sending)
- [SENT case](#sent)
- [KeyboardState enum](#keyboard-state)
- [PENDING case](#pending)
- [COMPLETED case](#completed)
- [CANCELLED case](#cancelled)
- [Department protocol](#department)
- [getKey() method](#get-key)
- [getName() method](#get-name-department)
Expand Down Expand Up @@ -691,6 +722,14 @@ When calling this method, if there is an active [MessageTracker](#message-tracke
Returns randomly generated `String`-typed ID of the message.
Can throw errors of [AccessError](#access-error) type.

<h3 id ="send-keyboard-request">sendKeyboardRequest(button:message:completionHandler:) method</h3>

Sends a keyboard request.
`button` parameter – selected button of [`KeyboardButton`](#keyboard-button) type.
`message` parameter – keyboard message of [`Message`](#message) type.
`completionHandler` parameter – optional [SendKeyboardRequestCompletionHandler](#send-keyboard-request-completion-handler) object.
Can throw errors of [AccessError](#access-error) type.

<h3 id ="update-widget-status">updateWidgetStatus(data:) method</h3>

Update widget status. The change is displayed by the operator..
Expand Down Expand Up @@ -845,6 +884,23 @@ Executed when operation is failed.

[Go to table of contents](#table-of-contents)

<h2 id ="send-keyboard-request-completion-handler">SendKeyboardRequestCompletionHandler protocol</h2>

Protocol which methods are called after [sendKeyboardRequest(button:message:completionHandler:)](#send-keyboard-request) method is finished. Must be adopted.

<h3 id ="on-success-message-id-send-keyboard-request">onSuccess(messageID:) method</h3>

Executed when operation is done successfully.
`messageID` parameter – ID of the appropriate message of `String` type.

<h3 id ="on-failure-message-id-error-send-keyboard-request">onFailure(messageID:error:) method</h3>

Executed when operation is failed.
`messageID` parameter – ID of the appropriate message of `String` type.
`error` parameter – appropriate [KeyboardResponseError](#keyboard-response-error) value.

[Go to table of contents](#table-of-contents)

<h2 id ="rate-operator-completion-handler">RateOperatorCompletionHandler protocol</h2>

Protocol which methods are called after [rateOperatorWith(id:byRating:completionHandler:)](#rate-operator-with-id-by-rating-rating) method is finished. Must be adopted.
Expand Down Expand Up @@ -1209,6 +1265,32 @@ Received error is not supported by current WebimClientLibrary version.

[Go to table of contents](#table-of-contents)

<h2 id ="keyboard-response-error">KeyboardResponseError enum</h2>

Error types that could be passed in [onFailure(messageID:error:) method](#on-failure-message-id-error-send-keyboard-request).

<h3 id ="keyboard-response-error-no-chat">NO_CHAT case</h3>

Arised when trying to send keyboard request if no chat is exists.

<h3 id ="button-id-not-set">BUTTON_ID_NOT_SET case</h3>

Wrong button ID in request.

<h3 id ="request-message-id-not-set">REQUEST_MESSAGE_ID_NOT_SET case</h3>

Wrong message ID in request.

<h3 id=can-not-create-response>CAN_NOT_CREATE_RESPONSE case</h3>

Response can not be created for this request.

<h3 id ="keyboard-response-error-unknown">UNKNOWN case</h3>

Received error is not supported by current WebimClientLibrary version.

[Go to table of contents](#table-of-contents)

<h2 id ="rate-operator-error">RateOperatorError enum</h2>

Error types that could be passed in [onFailure(error:) method](#on-failure-error).
Expand Down Expand Up @@ -1316,6 +1398,16 @@ Returns dictionary which contains custom fields or `nil` if there's no such cust
Every message can be uniquefied by its ID. Messages also can be lined up by its IDs. ID doesn’t change while changing the content of a message.
Returns unique ID of the message of type `String`.

<h3 id="get-keyboard">getKeyboard() method</h3>

Messages of type [Keyboard](#keyboard-type) contain keyboard from script robot.
Returns [Keyboard](#keyboard) which contains keyboard from script robot or `nil` if message isn't of type [Keyboard](#keyboard-type).

<h3 id="get-keyboard-request">getKeyboardRequest() method</h3>

Messages of type [KEYBOARD_RESPONSE](#keyboard-response-type) contain request with message of type [Keyboard](#keyboard-type).
Returns [KeyboardRequest](#keyboard-request) which contains keyboard request or `nil` if message isn't of type [KEYBOARD_RESPONSE](#keyboard-response-type).

<h3 id ="get-operator-id">getOperatorID() method</h3>

Returns ID of a message sender, if the sender is an operator, of type `String`.
Expand Down Expand Up @@ -1427,6 +1519,66 @@ Returns width of an image in pixels of `Int` type or `nil`.

[Go to table of contents](#table-of-contents)

<h2 id ="keyboard">Keyboard protocol</h2>

Provides information about a keyboard.

<h3 id ="get-buttons">getButtons() method</h3>

Returns an array of array of [buttons](#keyboard-button).

<h3 id ="get-state">getState() method</h3>

Returns keyboard state of type [KeyboardState](#keyboard-state)

<h3 id ="get-response">getResponse() method</h3>

Returns keyboard response of type [KeyboardResponse)(#keyboard-response) or `nil` if keyboard hasn't it.

[Go to table of contents](#table-of-contents)

<h2 id ="keyboard-response">KeyboardResponse protocol</h2>

Provides information about a keyboard response.

<h3 id ="get-button-id">getButtonID() method</h3>

Returns a selected button ID of `String` type.

<h3 id ="keyboard-response-get-message-id">getMessageID() method</h3>

Returns resposne message ID of `String` type.

[Go to table of contents](#table-of-contents)

<h2 id ="keyboard-button">KeyboardButton protocol</h2>

Provides information about a keyboard button.

<h3 id ="button-get-id">geID() method</h3>

Returns a button ID of `String` type.

<h3 id ="button-get-text">getText() method</h3>

Returns a button text of `String` type.

[Go to table of contents](#table-of-contents)

<h2 id ="keyboard-request">KeyboardRequest protocol</h2>

Provides information about a keyboard request.

<h3 id ="get-button">geButton() method</h3>

Returns a button from request of [KeyboardButton](#keyboard-button) type.

<h3 id ="keyboard-request-get-message-id">getMessageID() method</h3>

Returns a request message ID of `String` type.

[Go to table of contents](#table-of-contents)

<h2 id ="message-type">MessageType enum</h2>

Message type representation.
Expand All @@ -1437,9 +1589,18 @@ A message from operator which requests some actions from a visitor.
E.g. choose an operator group by clicking on a button in this message.

<h3 id ="contacts-request">CONTACTS_REQUEST case</h3>

Message type that is received after operator clicked contacts request button.
There's no this functionality automatic support yet. All payload is transfered inside standard text field.

<h3 id ="keyboard-type">KEYBOARD case</h3>

A message sent by a script bot which contains buttons.

<h3 id ="keyboard-response-type">KEYBOARD_RESPONSE case</h3>

Response to request with selected button.

<h3 id ="file-from-operator">FILE_FROM_OPERATOR case</h3>

A message sent by an operator which contains an attachment.
Expand Down Expand Up @@ -1481,6 +1642,22 @@ A message had been sent to the server, received by the server and was spreaded a

[Go to table of contents](#table-of-contents)

<h2 id ="keyboard-state">KeyboardState enum</h2>

<h3 id ="pending">PENDING case</h3>

A keyboard has unselected buttons.

<h3 id ="completed">COMPLETED case</h3>

A keyboard has one selected button.

<h3 id ="completed">CANCELLED case</h3>

A keyboard has unselected buttons but visitor can't selected someone.

[Go to table of contents](#table-of-contents)

<h2 id ="department">Department protocol</h2>

Single department entity. Provides methods to get department information.
Expand Down
20 changes: 7 additions & 13 deletions Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ target 'WebimClientLibrary_Example' do

pod 'WebimClientLibrary', :path => '../'

pod 'Cosmos', '~> 16.0.0', :inhibit_warnings => true
pod 'Cosmos', '~> 19.0.3', :inhibit_warnings => true
pod 'Crashlytics'
pod 'Fabric'
pod 'SlackTextViewController', :inhibit_warnings => true
pod 'SnapKit', :inhibit_warnings => true
pod 'SQLite.swift', '0.11.5', :inhibit_warnings => true # WebimClientLibrary dependency – added to inhibit its warnings.
pod 'PopupDialog', '~> 0.6.2', :inhibit_warnings => true
pod 'SQLite.swift', '0.12.0', :inhibit_warnings => true # WebimClientLibrary dependency – added to inhibit its warnings.
pod 'PopupDialog', '~> 1.0', :inhibit_warnings => true


target 'WebimClientLibrary_Tests' do
Expand All @@ -21,19 +21,13 @@ target 'WebimClientLibrary_Example' do

post_install do |installer|
installer.pods_project.targets.each do |target|
if target.name =='WebimClientLibrary'
if target.name == 'WebimClientLibrary' || target.name == 'SQLite.swift' || target.name == 'Cosmos'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2'
config.build_settings['SWIFT_VERSION'] = '5.0'
end
else
if target.name == 'Cosmos' || target.name == 'SnapKit' || target.name == 'WebimClientLibrary'
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.0'
end
else
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.2'
end
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '4.2'
end
end

Expand Down
42 changes: 23 additions & 19 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
PODS:
- Cosmos (16.0.0)
- Crashlytics (3.13.0):
- Fabric (~> 1.10.0)
- Fabric (1.10.0)
- PopupDialog (0.6.2)
- Cosmos (19.0.3)
- Crashlytics (3.13.1):
- Fabric (~> 1.10.1)
- DynamicBlurView (3.0.1)
- Fabric (1.10.1)
- PopupDialog (1.0.0):
- DynamicBlurView (~> 3.0.1)
- SlackTextViewController (1.9.6)
- SnapKit (4.2.0)
- SQLite.swift (0.11.5):
- SQLite.swift/standard (= 0.11.5)
- SQLite.swift/standard (0.11.5)
- SQLite.swift (0.12.0):
- SQLite.swift/standard (= 0.12.0)
- SQLite.swift/standard (0.12.0)
- WebimClientLibrary (3.24.7):
- SQLite.swift (= 0.11.5)
- SQLite.swift (= 0.12.0)

DEPENDENCIES:
- Cosmos (~> 16.0.0)
- Cosmos (~> 19.0.3)
- Crashlytics
- Fabric
- PopupDialog (~> 0.6.2)
- PopupDialog (~> 1.0)
- SlackTextViewController
- SnapKit
- SQLite.swift (= 0.11.5)
- SQLite.swift (= 0.12.0)
- WebimClientLibrary (from `../`)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Cosmos
- Crashlytics
- DynamicBlurView
- Fabric
- PopupDialog
- SlackTextViewController
Expand All @@ -37,15 +40,16 @@ EXTERNAL SOURCES:
:path: "../"

SPEC CHECKSUMS:
Cosmos: 7bcee0fa858a9355a214f2a181be5dffcee42c81
Crashlytics: 1f5f752c7feac0add0cc1774756f96444fa3b1a7
Fabric: 09de1e053eb7dc415593166ad3e53d4c88123405
PopupDialog: d4336d7274a6aa3af4cb26d8b6691510eba90cc3
Cosmos: a6fb17284281fa12cf4c85c2efecd440a215ec44
Crashlytics: 5aa8e90dcbf2f34898b4f5a0037787531246cca0
DynamicBlurView: b1df5415f9bd31897549e5d7077e5ec120a4d636
Fabric: f6f21452846788bb44595d73e9909d79d328e617
PopupDialog: 28f29a1ffe9e1fab32fb258b53d56ca31670e8a2
SlackTextViewController: b854e62c1c156336bc4fd409c6ca79b5773e8f9d
SnapKit: fe8a619752f3f27075cc9a90244d75c6c3f27e2a
SQLite.swift: 6e5356850bb1791459f8c16d6ee9195b28714a2e
WebimClientLibrary: 70b569ce3f19b21b0e1f2488736d326c4c6cfd6f
SQLite.swift: 7cad9db150a03716336e69469ec9559c85aece5b
WebimClientLibrary: d4633edae3efc225ec53e77c0f6f99e68cbf2ce9

PODFILE CHECKSUM: f54174e617f57584e01671510a3b29c91c213194
PODFILE CHECKSUM: 7dce62f116a388a2ae58b61b225d84d7015447de

COCOAPODS: 1.6.1
Loading

0 comments on commit 2b18f53

Please sign in to comment.