nexus-invision 1.7.0 → 1.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc3abfd481d2b5fdaa763ee984b827f3b09f9fc21ad027777b6c33967d5cd2c9
4
- data.tar.gz: 666880edfe82f85580442a03516fe358739061414a84cbbeaeba7f187e872b8c
3
+ metadata.gz: 16d649b7b0d05c42147474b33c0457f38b9b8b8a47c658f31b6c82d9c52ec4b5
4
+ data.tar.gz: b475f888c58554c14f1eac821ea89b97c555f00afba4361ff6c8ad73d121acfa
5
5
  SHA512:
6
- metadata.gz: cb4abb4a20ef8ffa74d0fa8f5e0f1733f7362792092bb40948c84d6c8b2e7e6606a0a1a3d207844c2ddf2278249ec694167c33d660cafb3f9afba77fa867442c
7
- data.tar.gz: 119d8c6b8ee38f13bb151d04be07a69bd14e05c3f9f564ac2ccd2500b32184d4774834b0973e1144d4a1aa896d75b0673eab0e0e33cbba53e30818edb3948df9
6
+ metadata.gz: 3697f60ff0bd0e75eb0bc2e8f958161f9bc295583a7fdcc1683a55535593f0990a2277860f98b84ad5158f156c599d19081c03e7eab1ef0401742003e7c1d455
7
+ data.tar.gz: 5ada43a0981c03165b23cc931e65d3b69dc11b596161e9b45a17982f7fe801496dcc06e18940cd0ab774402533fd627d8fa3995c4f5a490ee4c72084dc891fac
@@ -8,6 +8,7 @@ require "nexus/invision/requests/add_member_to_secondary_group"
8
8
  require "nexus/invision/requests/create_forum_post"
9
9
  require "nexus/invision/requests/create_forum_topic"
10
10
  require "nexus/invision/requests/create_member_warning"
11
+ require "nexus/invision/requests/create_message"
11
12
  require "nexus/invision/requests/delete_member"
12
13
  require "nexus/invision/requests/edit_member"
13
14
  require "nexus/invision/requests/list_forum_topics"
@@ -160,18 +161,26 @@ module Nexus
160
161
  response = request(
161
162
  http_method: HTTPMethod::GET,
162
163
  endpoint: URI("core/ensuremember/#{request.id}"),
163
- params: request.serialize,
164
+ params: request.serialize.except("id"),
164
165
  )
165
166
 
166
167
  Resources::EnsureMember.from_hash(response.body)
167
168
  end
168
169
 
170
+ sig { params(request: Requests::CreateMessage).void }
171
+ def create_message(request)
172
+ request(
173
+ http_method: HTTPMethod::POST,
174
+ endpoint: URI("core/messages"),
175
+ params: request.serialize,
176
+ )
177
+ end
178
+
169
179
  sig { params(request: Requests::UnreadCount).returns(Resources::UnreadCount) }
170
180
  def unread_count(request)
171
181
  response = request(
172
182
  http_method: HTTPMethod::GET,
173
183
  endpoint: URI("core/unreadcount/#{request.id}"),
174
- params: request.serialize,
175
184
  )
176
185
 
177
186
  Resources::UnreadCount.from_hash(response.body)
@@ -0,0 +1,21 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ require "nexus/invision/value_object"
5
+ require "sorbet-runtime"
6
+
7
+ module Nexus
8
+ module Invision
9
+ module Requests
10
+ class CreateMessage < T::Struct
11
+ extend T::Sig
12
+ include ValueObject
13
+
14
+ const :from, Integer
15
+ const :to, T::Array[Integer]
16
+ const :title, String
17
+ const :body, String
18
+ end
19
+ end
20
+ end
21
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Nexus
5
5
  module Invision
6
- # Leave this as 1.7.0 in order for CI process to replace with the tagged version.
7
- VERSION = "1.7.0"
6
+ # Leave this as 1.8.1 in order for CI process to replace with the tagged version.
7
+ VERSION = "1.8.1"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexus-invision
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Robertson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-07 00:00:00.000000000 Z
11
+ date: 2024-02-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -30,6 +30,7 @@ files:
30
30
  - lib/nexus/invision/requests/create_forum_post.rb
31
31
  - lib/nexus/invision/requests/create_forum_topic.rb
32
32
  - lib/nexus/invision/requests/create_member_warning.rb
33
+ - lib/nexus/invision/requests/create_message.rb
33
34
  - lib/nexus/invision/requests/delete_member.rb
34
35
  - lib/nexus/invision/requests/edit_member.rb
35
36
  - lib/nexus/invision/requests/edit_member_primary_group.rb