fastcomments 1.2.0 → 1.2.1

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.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/client/README.md +27 -0
  3. data/client/docs/APIComment.md +1 -1
  4. data/client/docs/APICommentBase.md +1 -1
  5. data/client/docs/APICommentBaseMeta.md +20 -0
  6. data/client/docs/APITicket.md +34 -0
  7. data/client/docs/APITicketDetail.md +42 -0
  8. data/client/docs/APITicketFile.md +36 -0
  9. data/client/docs/APIUserSubscription.md +2 -0
  10. data/client/docs/ChangeTicketState200Response.md +34 -0
  11. data/client/docs/ChangeTicketStateBody.md +18 -0
  12. data/client/docs/ChangeTicketStateResponse.md +20 -0
  13. data/client/docs/CommentData.md +3 -1
  14. data/client/docs/CreateAPIUserSubscriptionData.md +2 -0
  15. data/client/docs/CreateCommentParams.md +2 -0
  16. data/client/docs/CreateTenantPackageBody.md +2 -0
  17. data/client/docs/CreateTicket200Response.md +34 -0
  18. data/client/docs/CreateTicketBody.md +18 -0
  19. data/client/docs/CreateTicketResponse.md +20 -0
  20. data/client/docs/CustomConfigParameters.md +21 -1
  21. data/client/docs/DefaultApi.md +384 -0
  22. data/client/docs/FComment.md +3 -1
  23. data/client/docs/FCommentMeta.md +2 -0
  24. data/client/docs/GetTicket200Response.md +36 -0
  25. data/client/docs/GetTicketResponse.md +22 -0
  26. data/client/docs/GetTickets200Response.md +34 -0
  27. data/client/docs/GetTicketsResponse.md +20 -0
  28. data/client/docs/HeaderAccountNotification.md +34 -0
  29. data/client/docs/HeaderState.md +3 -1
  30. data/client/docs/MentionAutoCompleteMode.md +15 -0
  31. data/client/docs/Moderator.md +3 -1
  32. data/client/docs/PublicApi.md +3 -1
  33. data/client/docs/ReplaceTenantPackageBody.md +2 -0
  34. data/client/docs/SearchUsers200Response.md +2 -0
  35. data/client/docs/SearchUsersSectionedResponse.md +20 -0
  36. data/client/docs/TOSConfig.md +22 -0
  37. data/client/docs/TenantPackage.md +4 -0
  38. data/client/docs/UpdatableCommentParams.md +1 -1
  39. data/client/docs/UpdateAPIUserSubscriptionData.md +18 -0
  40. data/client/docs/UpdateSubscriptionAPIResponse.md +24 -0
  41. data/client/docs/UpdateTenantPackageBody.md +2 -0
  42. data/client/docs/User.md +17 -1
  43. data/client/docs/UserBadge.md +3 -1
  44. data/client/docs/UserBadgeProgress.md +3 -1
  45. data/client/docs/UserSearchSection.md +15 -0
  46. data/client/docs/UserSearchSectionResult.md +20 -0
  47. data/client/docs/UserSessionInfo.md +2 -0
  48. data/client/lib/fastcomments-client/api/default_api.rb +383 -0
  49. data/client/lib/fastcomments-client/api/public_api.rb +7 -0
  50. data/client/lib/fastcomments-client/models/api_comment.rb +1 -1
  51. data/client/lib/fastcomments-client/models/api_comment_base.rb +1 -1
  52. data/client/lib/fastcomments-client/models/api_comment_base_meta.rb +156 -0
  53. data/client/lib/fastcomments-client/models/api_ticket.rb +374 -0
  54. data/client/lib/fastcomments-client/models/api_ticket_detail.rb +432 -0
  55. data/client/lib/fastcomments-client/models/api_ticket_file.rb +381 -0
  56. data/client/lib/fastcomments-client/models/api_user_subscription.rb +10 -1
  57. data/client/lib/fastcomments-client/models/change_ticket_state200_response.rb +103 -0
  58. data/client/lib/fastcomments-client/models/change_ticket_state_body.rb +164 -0
  59. data/client/lib/fastcomments-client/models/change_ticket_state_response.rb +212 -0
  60. data/client/lib/fastcomments-client/models/comment_data.rb +13 -4
  61. data/client/lib/fastcomments-client/models/create_api_user_subscription_data.rb +10 -1
  62. data/client/lib/fastcomments-client/models/create_comment_params.rb +10 -1
  63. data/client/lib/fastcomments-client/models/create_tenant_package_body.rb +10 -1
  64. data/client/lib/fastcomments-client/models/create_ticket200_response.rb +103 -0
  65. data/client/lib/fastcomments-client/models/create_ticket_body.rb +164 -0
  66. data/client/lib/fastcomments-client/models/create_ticket_response.rb +212 -0
  67. data/client/lib/fastcomments-client/models/custom_config_parameters.rb +97 -4
  68. data/client/lib/fastcomments-client/models/f_comment.rb +13 -4
  69. data/client/lib/fastcomments-client/models/f_comment_meta.rb +10 -1
  70. data/client/lib/fastcomments-client/models/get_ticket200_response.rb +103 -0
  71. data/client/lib/fastcomments-client/models/get_ticket_response.rb +240 -0
  72. data/client/lib/fastcomments-client/models/get_tickets200_response.rb +103 -0
  73. data/client/lib/fastcomments-client/models/get_tickets_response.rb +214 -0
  74. data/client/lib/fastcomments-client/models/header_account_notification.rb +322 -0
  75. data/client/lib/fastcomments-client/models/header_state.rb +32 -4
  76. data/client/lib/fastcomments-client/models/mention_auto_complete_mode.rb +41 -0
  77. data/client/lib/fastcomments-client/models/moderator.rb +14 -5
  78. data/client/lib/fastcomments-client/models/replace_tenant_package_body.rb +10 -1
  79. data/client/lib/fastcomments-client/models/search_users200_response.rb +2 -1
  80. data/client/lib/fastcomments-client/models/search_users_sectioned_response.rb +214 -0
  81. data/client/lib/fastcomments-client/models/tenant_package.rb +36 -1
  82. data/client/lib/fastcomments-client/models/tos_config.rb +168 -0
  83. data/client/lib/fastcomments-client/models/updatable_comment_params.rb +1 -1
  84. data/client/lib/fastcomments-client/models/update_api_user_subscription_data.rb +147 -0
  85. data/client/lib/fastcomments-client/models/update_subscription_api_response.rb +191 -0
  86. data/client/lib/fastcomments-client/models/update_tenant_package_body.rb +10 -1
  87. data/client/lib/fastcomments-client/models/user.rb +76 -4
  88. data/client/lib/fastcomments-client/models/user_badge.rb +14 -4
  89. data/client/lib/fastcomments-client/models/user_badge_progress.rb +13 -4
  90. data/client/lib/fastcomments-client/models/user_search_section.rb +41 -0
  91. data/client/lib/fastcomments-client/models/user_search_section_result.rb +214 -0
  92. data/client/lib/fastcomments-client/models/user_session_info.rb +10 -1
  93. data/client/lib/fastcomments-client.rb +22 -0
  94. data/client/spec/api/default_api_spec.rb +64 -0
  95. data/client/spec/api/public_api_spec.rb +1 -0
  96. data/client/spec/models/api_comment_base_meta_spec.rb +42 -0
  97. data/client/spec/models/api_ticket_detail_spec.rb +108 -0
  98. data/client/spec/models/api_ticket_file_spec.rb +90 -0
  99. data/client/spec/models/api_ticket_spec.rb +84 -0
  100. data/client/spec/models/api_user_subscription_spec.rb +6 -0
  101. data/client/spec/models/change_ticket_state200_response_spec.rb +21 -0
  102. data/client/spec/models/change_ticket_state_body_spec.rb +36 -0
  103. data/client/spec/models/change_ticket_state_response_spec.rb +42 -0
  104. data/client/spec/models/comment_data_spec.rb +6 -0
  105. data/client/spec/models/create_api_user_subscription_data_spec.rb +6 -0
  106. data/client/spec/models/create_comment_params_spec.rb +6 -0
  107. data/client/spec/models/create_tenant_package_body_spec.rb +6 -0
  108. data/client/spec/models/create_ticket200_response_spec.rb +21 -0
  109. data/client/spec/models/create_ticket_body_spec.rb +36 -0
  110. data/client/spec/models/create_ticket_response_spec.rb +42 -0
  111. data/client/spec/models/custom_config_parameters_spec.rb +60 -0
  112. data/client/spec/models/f_comment_meta_spec.rb +6 -0
  113. data/client/spec/models/f_comment_spec.rb +6 -0
  114. data/client/spec/models/get_ticket200_response_spec.rb +21 -0
  115. data/client/spec/models/get_ticket_response_spec.rb +48 -0
  116. data/client/spec/models/get_tickets200_response_spec.rb +21 -0
  117. data/client/spec/models/get_tickets_response_spec.rb +42 -0
  118. data/client/spec/models/header_account_notification_spec.rb +84 -0
  119. data/client/spec/models/header_state_spec.rb +6 -0
  120. data/client/spec/models/mention_auto_complete_mode_spec.rb +30 -0
  121. data/client/spec/models/moderator_spec.rb +6 -0
  122. data/client/spec/models/replace_tenant_package_body_spec.rb +6 -0
  123. data/client/spec/models/search_users_sectioned_response_spec.rb +42 -0
  124. data/client/spec/models/tenant_package_spec.rb +12 -0
  125. data/client/spec/models/tos_config_spec.rb +48 -0
  126. data/client/spec/models/update_api_user_subscription_data_spec.rb +36 -0
  127. data/client/spec/models/update_subscription_api_response_spec.rb +54 -0
  128. data/client/spec/models/update_tenant_package_body_spec.rb +6 -0
  129. data/client/spec/models/user_badge_progress_spec.rb +6 -0
  130. data/client/spec/models/user_badge_spec.rb +6 -0
  131. data/client/spec/models/user_search_section_result_spec.rb +42 -0
  132. data/client/spec/models/user_search_section_spec.rb +30 -0
  133. data/client/spec/models/user_session_info_spec.rb +6 -0
  134. data/client/spec/models/user_spec.rb +48 -0
  135. data/lib/fastcomments.rb +1 -1
  136. metadata +68 -2
@@ -0,0 +1,374 @@
1
+ =begin
2
+ #fastcomments
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 0.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FastCommentsClient
17
+ class APITicket < ApiModelBase
18
+ attr_accessor :_id
19
+
20
+ attr_accessor :url_id
21
+
22
+ attr_accessor :user_id
23
+
24
+ attr_accessor :managed_by_tenant_id
25
+
26
+ attr_accessor :assigned_user_ids
27
+
28
+ attr_accessor :subject
29
+
30
+ attr_accessor :created_at
31
+
32
+ attr_accessor :state
33
+
34
+ attr_accessor :file_count
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'_id' => :'_id',
40
+ :'url_id' => :'urlId',
41
+ :'user_id' => :'userId',
42
+ :'managed_by_tenant_id' => :'managedByTenantId',
43
+ :'assigned_user_ids' => :'assignedUserIds',
44
+ :'subject' => :'subject',
45
+ :'created_at' => :'createdAt',
46
+ :'state' => :'state',
47
+ :'file_count' => :'fileCount'
48
+ }
49
+ end
50
+
51
+ # Returns attribute mapping this model knows about
52
+ def self.acceptable_attribute_map
53
+ attribute_map
54
+ end
55
+
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ acceptable_attribute_map.values
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.openapi_types
63
+ {
64
+ :'_id' => :'String',
65
+ :'url_id' => :'String',
66
+ :'user_id' => :'String',
67
+ :'managed_by_tenant_id' => :'String',
68
+ :'assigned_user_ids' => :'Array<String>',
69
+ :'subject' => :'String',
70
+ :'created_at' => :'String',
71
+ :'state' => :'Integer',
72
+ :'file_count' => :'Integer'
73
+ }
74
+ end
75
+
76
+ # List of attributes with nullable: true
77
+ def self.openapi_nullable
78
+ Set.new([
79
+ ])
80
+ end
81
+
82
+ # Initializes the object
83
+ # @param [Hash] attributes Model attributes in the form of hash
84
+ def initialize(attributes = {})
85
+ if (!attributes.is_a?(Hash))
86
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::APITicket` initialize method"
87
+ end
88
+
89
+ # check to see if the attribute exists and convert string to symbol for hash key
90
+ acceptable_attribute_map = self.class.acceptable_attribute_map
91
+ attributes = attributes.each_with_object({}) { |(k, v), h|
92
+ if (!acceptable_attribute_map.key?(k.to_sym))
93
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::APITicket`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
94
+ end
95
+ h[k.to_sym] = v
96
+ }
97
+
98
+ if attributes.key?(:'_id')
99
+ self._id = attributes[:'_id']
100
+ else
101
+ self._id = nil
102
+ end
103
+
104
+ if attributes.key?(:'url_id')
105
+ self.url_id = attributes[:'url_id']
106
+ else
107
+ self.url_id = nil
108
+ end
109
+
110
+ if attributes.key?(:'user_id')
111
+ self.user_id = attributes[:'user_id']
112
+ else
113
+ self.user_id = nil
114
+ end
115
+
116
+ if attributes.key?(:'managed_by_tenant_id')
117
+ self.managed_by_tenant_id = attributes[:'managed_by_tenant_id']
118
+ else
119
+ self.managed_by_tenant_id = nil
120
+ end
121
+
122
+ if attributes.key?(:'assigned_user_ids')
123
+ if (value = attributes[:'assigned_user_ids']).is_a?(Array)
124
+ self.assigned_user_ids = value
125
+ end
126
+ else
127
+ self.assigned_user_ids = nil
128
+ end
129
+
130
+ if attributes.key?(:'subject')
131
+ self.subject = attributes[:'subject']
132
+ else
133
+ self.subject = nil
134
+ end
135
+
136
+ if attributes.key?(:'created_at')
137
+ self.created_at = attributes[:'created_at']
138
+ else
139
+ self.created_at = nil
140
+ end
141
+
142
+ if attributes.key?(:'state')
143
+ self.state = attributes[:'state']
144
+ else
145
+ self.state = nil
146
+ end
147
+
148
+ if attributes.key?(:'file_count')
149
+ self.file_count = attributes[:'file_count']
150
+ else
151
+ self.file_count = nil
152
+ end
153
+ end
154
+
155
+ # Show invalid properties with the reasons. Usually used together with valid?
156
+ # @return Array for valid properties with the reasons
157
+ def list_invalid_properties
158
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
159
+ invalid_properties = Array.new
160
+ if @_id.nil?
161
+ invalid_properties.push('invalid value for "_id", _id cannot be nil.')
162
+ end
163
+
164
+ if @url_id.nil?
165
+ invalid_properties.push('invalid value for "url_id", url_id cannot be nil.')
166
+ end
167
+
168
+ if @user_id.nil?
169
+ invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
170
+ end
171
+
172
+ if @managed_by_tenant_id.nil?
173
+ invalid_properties.push('invalid value for "managed_by_tenant_id", managed_by_tenant_id cannot be nil.')
174
+ end
175
+
176
+ if @assigned_user_ids.nil?
177
+ invalid_properties.push('invalid value for "assigned_user_ids", assigned_user_ids cannot be nil.')
178
+ end
179
+
180
+ if @subject.nil?
181
+ invalid_properties.push('invalid value for "subject", subject cannot be nil.')
182
+ end
183
+
184
+ if @created_at.nil?
185
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
186
+ end
187
+
188
+ if @state.nil?
189
+ invalid_properties.push('invalid value for "state", state cannot be nil.')
190
+ end
191
+
192
+ if @file_count.nil?
193
+ invalid_properties.push('invalid value for "file_count", file_count cannot be nil.')
194
+ end
195
+
196
+ invalid_properties
197
+ end
198
+
199
+ # Check to see if the all the properties in the model are valid
200
+ # @return true if the model is valid
201
+ def valid?
202
+ warn '[DEPRECATED] the `valid?` method is obsolete'
203
+ return false if @_id.nil?
204
+ return false if @url_id.nil?
205
+ return false if @user_id.nil?
206
+ return false if @managed_by_tenant_id.nil?
207
+ return false if @assigned_user_ids.nil?
208
+ return false if @subject.nil?
209
+ return false if @created_at.nil?
210
+ return false if @state.nil?
211
+ return false if @file_count.nil?
212
+ true
213
+ end
214
+
215
+ # Custom attribute writer method with validation
216
+ # @param [Object] _id Value to be assigned
217
+ def _id=(_id)
218
+ if _id.nil?
219
+ fail ArgumentError, '_id cannot be nil'
220
+ end
221
+
222
+ @_id = _id
223
+ end
224
+
225
+ # Custom attribute writer method with validation
226
+ # @param [Object] url_id Value to be assigned
227
+ def url_id=(url_id)
228
+ if url_id.nil?
229
+ fail ArgumentError, 'url_id cannot be nil'
230
+ end
231
+
232
+ @url_id = url_id
233
+ end
234
+
235
+ # Custom attribute writer method with validation
236
+ # @param [Object] user_id Value to be assigned
237
+ def user_id=(user_id)
238
+ if user_id.nil?
239
+ fail ArgumentError, 'user_id cannot be nil'
240
+ end
241
+
242
+ @user_id = user_id
243
+ end
244
+
245
+ # Custom attribute writer method with validation
246
+ # @param [Object] managed_by_tenant_id Value to be assigned
247
+ def managed_by_tenant_id=(managed_by_tenant_id)
248
+ if managed_by_tenant_id.nil?
249
+ fail ArgumentError, 'managed_by_tenant_id cannot be nil'
250
+ end
251
+
252
+ @managed_by_tenant_id = managed_by_tenant_id
253
+ end
254
+
255
+ # Custom attribute writer method with validation
256
+ # @param [Object] assigned_user_ids Value to be assigned
257
+ def assigned_user_ids=(assigned_user_ids)
258
+ if assigned_user_ids.nil?
259
+ fail ArgumentError, 'assigned_user_ids cannot be nil'
260
+ end
261
+
262
+ @assigned_user_ids = assigned_user_ids
263
+ end
264
+
265
+ # Custom attribute writer method with validation
266
+ # @param [Object] subject Value to be assigned
267
+ def subject=(subject)
268
+ if subject.nil?
269
+ fail ArgumentError, 'subject cannot be nil'
270
+ end
271
+
272
+ @subject = subject
273
+ end
274
+
275
+ # Custom attribute writer method with validation
276
+ # @param [Object] created_at Value to be assigned
277
+ def created_at=(created_at)
278
+ if created_at.nil?
279
+ fail ArgumentError, 'created_at cannot be nil'
280
+ end
281
+
282
+ @created_at = created_at
283
+ end
284
+
285
+ # Custom attribute writer method with validation
286
+ # @param [Object] state Value to be assigned
287
+ def state=(state)
288
+ if state.nil?
289
+ fail ArgumentError, 'state cannot be nil'
290
+ end
291
+
292
+ @state = state
293
+ end
294
+
295
+ # Custom attribute writer method with validation
296
+ # @param [Object] file_count Value to be assigned
297
+ def file_count=(file_count)
298
+ if file_count.nil?
299
+ fail ArgumentError, 'file_count cannot be nil'
300
+ end
301
+
302
+ @file_count = file_count
303
+ end
304
+
305
+ # Checks equality by comparing each attribute.
306
+ # @param [Object] Object to be compared
307
+ def ==(o)
308
+ return true if self.equal?(o)
309
+ self.class == o.class &&
310
+ _id == o._id &&
311
+ url_id == o.url_id &&
312
+ user_id == o.user_id &&
313
+ managed_by_tenant_id == o.managed_by_tenant_id &&
314
+ assigned_user_ids == o.assigned_user_ids &&
315
+ subject == o.subject &&
316
+ created_at == o.created_at &&
317
+ state == o.state &&
318
+ file_count == o.file_count
319
+ end
320
+
321
+ # @see the `==` method
322
+ # @param [Object] Object to be compared
323
+ def eql?(o)
324
+ self == o
325
+ end
326
+
327
+ # Calculates hash code according to all attributes.
328
+ # @return [Integer] Hash code
329
+ def hash
330
+ [_id, url_id, user_id, managed_by_tenant_id, assigned_user_ids, subject, created_at, state, file_count].hash
331
+ end
332
+
333
+ # Builds the object from hash
334
+ # @param [Hash] attributes Model attributes in the form of hash
335
+ # @return [Object] Returns the model itself
336
+ def self.build_from_hash(attributes)
337
+ return nil unless attributes.is_a?(Hash)
338
+ attributes = attributes.transform_keys(&:to_sym)
339
+ transformed_hash = {}
340
+ openapi_types.each_pair do |key, type|
341
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
342
+ transformed_hash["#{key}"] = nil
343
+ elsif type =~ /\AArray<(.*)>/i
344
+ # check to ensure the input is an array given that the attribute
345
+ # is documented as an array but the input is not
346
+ if attributes[attribute_map[key]].is_a?(Array)
347
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
348
+ end
349
+ elsif !attributes[attribute_map[key]].nil?
350
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
351
+ end
352
+ end
353
+ new(transformed_hash)
354
+ end
355
+
356
+ # Returns the object in the form of hash
357
+ # @return [Hash] Returns the object in the form of hash
358
+ def to_hash
359
+ hash = {}
360
+ self.class.attribute_map.each_pair do |attr, param|
361
+ value = self.send(attr)
362
+ if value.nil?
363
+ is_nullable = self.class.openapi_nullable.include?(attr)
364
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
365
+ end
366
+
367
+ hash[param] = _to_hash(value)
368
+ end
369
+ hash
370
+ end
371
+
372
+ end
373
+
374
+ end