files.com 1.1.652 → 1.1.654
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_VERSION +1 -1
- data/docs/chat_message.md +17 -0
- data/docs/chat_session.md +55 -0
- data/docs/group_user.md +2 -2
- data/lib/files.com/models/chat_message.rb +32 -0
- data/lib/files.com/models/chat_session.rb +74 -0
- data/lib/files.com/models/group_user.rb +5 -5
- data/lib/files.com/version.rb +1 -1
- data/lib/files.com.rb +2 -0
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a714823b2ba49180ab573e3b0168a8d2211a3ca008457ab5185e4f7e73274012
|
|
4
|
+
data.tar.gz: d8f502f07c63107183536a61c13f0b1bd9416c62ecde031369210b6f01bb9b95
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 35ef1cb1ee68ef02009334ad55910eb497bba69c759b5e5600eadb08eaf1e50cb4854acc8e0cda5508683c2dae1b14eee75bc9ccb068efc209a2df5091231cbe
|
|
7
|
+
data.tar.gz: ced5d5f33e3aee504cc6f474b9a25c8cbb2c6affe0354323254fd2155a925b89737d5af6fee3fd0dc73ecc6e44da10833d71854021cb511c87ae2fd143ba70f6
|
data/_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.1.
|
|
1
|
+
1.1.654
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# ChatMessage
|
|
2
|
+
|
|
3
|
+
## Example ChatMessage Object
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
{
|
|
7
|
+
"id": 1,
|
|
8
|
+
"role": "example",
|
|
9
|
+
"content": "example",
|
|
10
|
+
"created_at": "2000-01-01T01:00:00Z"
|
|
11
|
+
}
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
* `id` (int64): Chat Message ID.
|
|
15
|
+
* `role` (string): Message role.
|
|
16
|
+
* `content` (string): Message content.
|
|
17
|
+
* `created_at` (date-time): Message creation date/time.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# ChatSession
|
|
2
|
+
|
|
3
|
+
## Example ChatSession Object
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
{
|
|
7
|
+
"id": 1,
|
|
8
|
+
"user_id": 1,
|
|
9
|
+
"workspace_id": 1,
|
|
10
|
+
"last_active_at": "2000-01-01T01:00:00Z",
|
|
11
|
+
"created_at": "2000-01-01T01:00:00Z",
|
|
12
|
+
"messages": [
|
|
13
|
+
{
|
|
14
|
+
"id": 1,
|
|
15
|
+
"role": "example",
|
|
16
|
+
"content": "example",
|
|
17
|
+
"created_at": "2000-01-01T01:00:00Z"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
* `id` (int64): Chat Session ID.
|
|
24
|
+
* `user_id` (int64): User ID.
|
|
25
|
+
* `workspace_id` (int64): Workspace ID. `0` means the default workspace.
|
|
26
|
+
* `last_active_at` (date-time): Most recent chat activity date/time.
|
|
27
|
+
* `created_at` (date-time): Chat session creation date/time.
|
|
28
|
+
* `messages` (array(object)): Visible conversation messages in this chat session. For performance reasons, this is not provided when listing chat sessions.
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## List Chat Sessions
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
Files::ChatSession.list
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Parameters
|
|
40
|
+
|
|
41
|
+
* `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
42
|
+
* `per_page` (int64): Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Show Chat Session
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
Files::ChatSession.find(id)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Parameters
|
|
54
|
+
|
|
55
|
+
* `id` (int64): Required - Chat Session ID.
|
data/docs/group_user.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"group_id": 1,
|
|
9
9
|
"user_id": 1,
|
|
10
10
|
"admin": true,
|
|
11
|
-
"
|
|
11
|
+
"username": "example"
|
|
12
12
|
}
|
|
13
13
|
```
|
|
14
14
|
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* `group_id` (int64): Group ID
|
|
17
17
|
* `user_id` (int64): User ID
|
|
18
18
|
* `admin` (boolean): Is this user an administrator of this group?
|
|
19
|
-
* `
|
|
19
|
+
* `username` (string): Username of the user
|
|
20
20
|
* `id` (int64): Group User ID.
|
|
21
21
|
|
|
22
22
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Files
|
|
4
|
+
class ChatMessage
|
|
5
|
+
attr_reader :options, :attributes
|
|
6
|
+
|
|
7
|
+
def initialize(attributes = {}, options = {})
|
|
8
|
+
@attributes = attributes || {}
|
|
9
|
+
@options = options || {}
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# int64 - Chat Message ID.
|
|
13
|
+
def id
|
|
14
|
+
@attributes[:id]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# string - Message role.
|
|
18
|
+
def role
|
|
19
|
+
@attributes[:role]
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# string - Message content.
|
|
23
|
+
def content
|
|
24
|
+
@attributes[:content]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# date-time - Message creation date/time.
|
|
28
|
+
def created_at
|
|
29
|
+
@attributes[:created_at]
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Files
|
|
4
|
+
class ChatSession
|
|
5
|
+
attr_reader :options, :attributes
|
|
6
|
+
|
|
7
|
+
def initialize(attributes = {}, options = {})
|
|
8
|
+
@attributes = attributes || {}
|
|
9
|
+
@options = options || {}
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# int64 - Chat Session ID.
|
|
13
|
+
def id
|
|
14
|
+
@attributes[:id]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# int64 - User ID.
|
|
18
|
+
def user_id
|
|
19
|
+
@attributes[:user_id]
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# int64 - Workspace ID. `0` means the default workspace.
|
|
23
|
+
def workspace_id
|
|
24
|
+
@attributes[:workspace_id]
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# date-time - Most recent chat activity date/time.
|
|
28
|
+
def last_active_at
|
|
29
|
+
@attributes[:last_active_at]
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# date-time - Chat session creation date/time.
|
|
33
|
+
def created_at
|
|
34
|
+
@attributes[:created_at]
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# array(object) - Visible conversation messages in this chat session. For performance reasons, this is not provided when listing chat sessions.
|
|
38
|
+
def messages
|
|
39
|
+
@attributes[:messages]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Parameters:
|
|
43
|
+
# cursor - string - Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination.
|
|
44
|
+
# per_page - int64 - Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
|
|
45
|
+
def self.list(params = {}, options = {})
|
|
46
|
+
raise InvalidParameterError.new("Bad parameter: cursor must be an String") if params[:cursor] and !params[:cursor].is_a?(String)
|
|
47
|
+
raise InvalidParameterError.new("Bad parameter: per_page must be an Integer") if params[:per_page] and !params[:per_page].is_a?(Integer)
|
|
48
|
+
|
|
49
|
+
List.new(ChatSession, params) do
|
|
50
|
+
Api.send_request("/chat_sessions", :get, params, options)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def self.all(params = {}, options = {})
|
|
55
|
+
list(params, options)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Parameters:
|
|
59
|
+
# id (required) - int64 - Chat Session ID.
|
|
60
|
+
def self.find(id, params = {}, options = {})
|
|
61
|
+
params ||= {}
|
|
62
|
+
params[:id] = id
|
|
63
|
+
raise InvalidParameterError.new("Bad parameter: id must be an Integer") if params[:id] and !params[:id].is_a?(Integer)
|
|
64
|
+
raise MissingParameterError.new("Parameter missing: id") unless params[:id]
|
|
65
|
+
|
|
66
|
+
response, options = Api.send_request("/chat_sessions/#{params[:id]}", :get, params, options)
|
|
67
|
+
ChatSession.new(response.data, options)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def self.get(id, params = {}, options = {})
|
|
71
|
+
find(id, params, options)
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -45,13 +45,13 @@ module Files
|
|
|
45
45
|
@attributes[:admin] = value
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
-
# string -
|
|
49
|
-
def
|
|
50
|
-
@attributes[:
|
|
48
|
+
# string - Username of the user
|
|
49
|
+
def username
|
|
50
|
+
@attributes[:username]
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
-
def
|
|
54
|
-
@attributes[:
|
|
53
|
+
def username=(value)
|
|
54
|
+
@attributes[:username] = value
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
# int64 - Group User ID.
|
data/lib/files.com/version.rb
CHANGED
data/lib/files.com.rb
CHANGED
|
@@ -58,6 +58,8 @@ require "files.com/models/bundle_notification"
|
|
|
58
58
|
require "files.com/models/bundle_path"
|
|
59
59
|
require "files.com/models/bundle_recipient"
|
|
60
60
|
require "files.com/models/bundle_registration"
|
|
61
|
+
require "files.com/models/chat_message"
|
|
62
|
+
require "files.com/models/chat_session"
|
|
61
63
|
require "files.com/models/child_site_management_policy"
|
|
62
64
|
require "files.com/models/clickwrap"
|
|
63
65
|
require "files.com/models/custom_domain"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: files.com
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.654
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- files.com
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|
|
@@ -196,6 +196,8 @@ files:
|
|
|
196
196
|
- docs/bundle_path.md
|
|
197
197
|
- docs/bundle_recipient.md
|
|
198
198
|
- docs/bundle_registration.md
|
|
199
|
+
- docs/chat_message.md
|
|
200
|
+
- docs/chat_session.md
|
|
199
201
|
- docs/child_site_management_policy.md
|
|
200
202
|
- docs/clickwrap.md
|
|
201
203
|
- docs/custom_domain.md
|
|
@@ -336,6 +338,8 @@ files:
|
|
|
336
338
|
- lib/files.com/models/bundle_path.rb
|
|
337
339
|
- lib/files.com/models/bundle_recipient.rb
|
|
338
340
|
- lib/files.com/models/bundle_registration.rb
|
|
341
|
+
- lib/files.com/models/chat_message.rb
|
|
342
|
+
- lib/files.com/models/chat_session.rb
|
|
339
343
|
- lib/files.com/models/child_site_management_policy.rb
|
|
340
344
|
- lib/files.com/models/clickwrap.rb
|
|
341
345
|
- lib/files.com/models/custom_domain.rb
|