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
@@ -672,6 +672,90 @@ module FastCommentsClient
672
672
  return data, status_code, headers
673
673
  end
674
674
 
675
+ # @param tenant_id [String]
676
+ # @param user_id [String]
677
+ # @param id [String]
678
+ # @param change_ticket_state_body [ChangeTicketStateBody]
679
+ # @param [Hash] opts the optional parameters
680
+ # @return [ChangeTicketState200Response]
681
+ def change_ticket_state(tenant_id, user_id, id, change_ticket_state_body, opts = {})
682
+ data, _status_code, _headers = change_ticket_state_with_http_info(tenant_id, user_id, id, change_ticket_state_body, opts)
683
+ data
684
+ end
685
+
686
+ # @param tenant_id [String]
687
+ # @param user_id [String]
688
+ # @param id [String]
689
+ # @param change_ticket_state_body [ChangeTicketStateBody]
690
+ # @param [Hash] opts the optional parameters
691
+ # @return [Array<(ChangeTicketState200Response, Integer, Hash)>] ChangeTicketState200Response data, response status code and response headers
692
+ def change_ticket_state_with_http_info(tenant_id, user_id, id, change_ticket_state_body, opts = {})
693
+ if @api_client.config.debugging
694
+ @api_client.config.logger.debug 'Calling API: DefaultApi.change_ticket_state ...'
695
+ end
696
+ # verify the required parameter 'tenant_id' is set
697
+ if @api_client.config.client_side_validation && tenant_id.nil?
698
+ fail ArgumentError, "Missing the required parameter 'tenant_id' when calling DefaultApi.change_ticket_state"
699
+ end
700
+ # verify the required parameter 'user_id' is set
701
+ if @api_client.config.client_side_validation && user_id.nil?
702
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.change_ticket_state"
703
+ end
704
+ # verify the required parameter 'id' is set
705
+ if @api_client.config.client_side_validation && id.nil?
706
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.change_ticket_state"
707
+ end
708
+ # verify the required parameter 'change_ticket_state_body' is set
709
+ if @api_client.config.client_side_validation && change_ticket_state_body.nil?
710
+ fail ArgumentError, "Missing the required parameter 'change_ticket_state_body' when calling DefaultApi.change_ticket_state"
711
+ end
712
+ # resource path
713
+ local_var_path = '/api/v1/tickets/{id}/state'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
714
+
715
+ # query parameters
716
+ query_params = opts[:query_params] || {}
717
+ query_params[:'tenantId'] = tenant_id
718
+ query_params[:'userId'] = user_id
719
+
720
+ # header parameters
721
+ header_params = opts[:header_params] || {}
722
+ # HTTP header 'Accept' (if needed)
723
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
724
+ # HTTP header 'Content-Type'
725
+ content_type = @api_client.select_header_content_type(['application/json'])
726
+ if !content_type.nil?
727
+ header_params['Content-Type'] = content_type
728
+ end
729
+
730
+ # form parameters
731
+ form_params = opts[:form_params] || {}
732
+
733
+ # http body (model)
734
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(change_ticket_state_body)
735
+
736
+ # return_type
737
+ return_type = opts[:debug_return_type] || 'ChangeTicketState200Response'
738
+
739
+ # auth_names
740
+ auth_names = opts[:debug_auth_names] || ['api_key']
741
+
742
+ new_options = opts.merge(
743
+ :operation => :"DefaultApi.change_ticket_state",
744
+ :header_params => header_params,
745
+ :query_params => query_params,
746
+ :form_params => form_params,
747
+ :body => post_body,
748
+ :auth_names => auth_names,
749
+ :return_type => return_type
750
+ )
751
+
752
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
753
+ if @api_client.config.debugging
754
+ @api_client.config.logger.debug "API called: DefaultApi#change_ticket_state\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
755
+ end
756
+ return data, status_code, headers
757
+ end
758
+
675
759
  # @param tenant_id [String]
676
760
  # @param [Hash] opts the optional parameters
677
761
  # @option opts [String] :question_id
@@ -1407,6 +1491,84 @@ module FastCommentsClient
1407
1491
  return data, status_code, headers
1408
1492
  end
1409
1493
 
1494
+ # @param tenant_id [String]
1495
+ # @param user_id [String]
1496
+ # @param create_ticket_body [CreateTicketBody]
1497
+ # @param [Hash] opts the optional parameters
1498
+ # @return [CreateTicket200Response]
1499
+ def create_ticket(tenant_id, user_id, create_ticket_body, opts = {})
1500
+ data, _status_code, _headers = create_ticket_with_http_info(tenant_id, user_id, create_ticket_body, opts)
1501
+ data
1502
+ end
1503
+
1504
+ # @param tenant_id [String]
1505
+ # @param user_id [String]
1506
+ # @param create_ticket_body [CreateTicketBody]
1507
+ # @param [Hash] opts the optional parameters
1508
+ # @return [Array<(CreateTicket200Response, Integer, Hash)>] CreateTicket200Response data, response status code and response headers
1509
+ def create_ticket_with_http_info(tenant_id, user_id, create_ticket_body, opts = {})
1510
+ if @api_client.config.debugging
1511
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_ticket ...'
1512
+ end
1513
+ # verify the required parameter 'tenant_id' is set
1514
+ if @api_client.config.client_side_validation && tenant_id.nil?
1515
+ fail ArgumentError, "Missing the required parameter 'tenant_id' when calling DefaultApi.create_ticket"
1516
+ end
1517
+ # verify the required parameter 'user_id' is set
1518
+ if @api_client.config.client_side_validation && user_id.nil?
1519
+ fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.create_ticket"
1520
+ end
1521
+ # verify the required parameter 'create_ticket_body' is set
1522
+ if @api_client.config.client_side_validation && create_ticket_body.nil?
1523
+ fail ArgumentError, "Missing the required parameter 'create_ticket_body' when calling DefaultApi.create_ticket"
1524
+ end
1525
+ # resource path
1526
+ local_var_path = '/api/v1/tickets'
1527
+
1528
+ # query parameters
1529
+ query_params = opts[:query_params] || {}
1530
+ query_params[:'tenantId'] = tenant_id
1531
+ query_params[:'userId'] = user_id
1532
+
1533
+ # header parameters
1534
+ header_params = opts[:header_params] || {}
1535
+ # HTTP header 'Accept' (if needed)
1536
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1537
+ # HTTP header 'Content-Type'
1538
+ content_type = @api_client.select_header_content_type(['application/json'])
1539
+ if !content_type.nil?
1540
+ header_params['Content-Type'] = content_type
1541
+ end
1542
+
1543
+ # form parameters
1544
+ form_params = opts[:form_params] || {}
1545
+
1546
+ # http body (model)
1547
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(create_ticket_body)
1548
+
1549
+ # return_type
1550
+ return_type = opts[:debug_return_type] || 'CreateTicket200Response'
1551
+
1552
+ # auth_names
1553
+ auth_names = opts[:debug_auth_names] || ['api_key']
1554
+
1555
+ new_options = opts.merge(
1556
+ :operation => :"DefaultApi.create_ticket",
1557
+ :header_params => header_params,
1558
+ :query_params => query_params,
1559
+ :form_params => form_params,
1560
+ :body => post_body,
1561
+ :auth_names => auth_names,
1562
+ :return_type => return_type
1563
+ )
1564
+
1565
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1566
+ if @api_client.config.debugging
1567
+ @api_client.config.logger.debug "API called: DefaultApi#create_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1568
+ end
1569
+ return data, status_code, headers
1570
+ end
1571
+
1410
1572
  # @param tenant_id [String]
1411
1573
  # @param create_user_badge_params [CreateUserBadgeParams]
1412
1574
  # @param [Hash] opts the optional parameters
@@ -5250,6 +5412,147 @@ module FastCommentsClient
5250
5412
  return data, status_code, headers
5251
5413
  end
5252
5414
 
5415
+ # @param tenant_id [String]
5416
+ # @param id [String]
5417
+ # @param [Hash] opts the optional parameters
5418
+ # @option opts [String] :user_id
5419
+ # @return [GetTicket200Response]
5420
+ def get_ticket(tenant_id, id, opts = {})
5421
+ data, _status_code, _headers = get_ticket_with_http_info(tenant_id, id, opts)
5422
+ data
5423
+ end
5424
+
5425
+ # @param tenant_id [String]
5426
+ # @param id [String]
5427
+ # @param [Hash] opts the optional parameters
5428
+ # @option opts [String] :user_id
5429
+ # @return [Array<(GetTicket200Response, Integer, Hash)>] GetTicket200Response data, response status code and response headers
5430
+ def get_ticket_with_http_info(tenant_id, id, opts = {})
5431
+ if @api_client.config.debugging
5432
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_ticket ...'
5433
+ end
5434
+ # verify the required parameter 'tenant_id' is set
5435
+ if @api_client.config.client_side_validation && tenant_id.nil?
5436
+ fail ArgumentError, "Missing the required parameter 'tenant_id' when calling DefaultApi.get_ticket"
5437
+ end
5438
+ # verify the required parameter 'id' is set
5439
+ if @api_client.config.client_side_validation && id.nil?
5440
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_ticket"
5441
+ end
5442
+ # resource path
5443
+ local_var_path = '/api/v1/tickets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
5444
+
5445
+ # query parameters
5446
+ query_params = opts[:query_params] || {}
5447
+ query_params[:'tenantId'] = tenant_id
5448
+ query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil?
5449
+
5450
+ # header parameters
5451
+ header_params = opts[:header_params] || {}
5452
+ # HTTP header 'Accept' (if needed)
5453
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
5454
+
5455
+ # form parameters
5456
+ form_params = opts[:form_params] || {}
5457
+
5458
+ # http body (model)
5459
+ post_body = opts[:debug_body]
5460
+
5461
+ # return_type
5462
+ return_type = opts[:debug_return_type] || 'GetTicket200Response'
5463
+
5464
+ # auth_names
5465
+ auth_names = opts[:debug_auth_names] || ['api_key']
5466
+
5467
+ new_options = opts.merge(
5468
+ :operation => :"DefaultApi.get_ticket",
5469
+ :header_params => header_params,
5470
+ :query_params => query_params,
5471
+ :form_params => form_params,
5472
+ :body => post_body,
5473
+ :auth_names => auth_names,
5474
+ :return_type => return_type
5475
+ )
5476
+
5477
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
5478
+ if @api_client.config.debugging
5479
+ @api_client.config.logger.debug "API called: DefaultApi#get_ticket\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5480
+ end
5481
+ return data, status_code, headers
5482
+ end
5483
+
5484
+ # @param tenant_id [String]
5485
+ # @param [Hash] opts the optional parameters
5486
+ # @option opts [String] :user_id
5487
+ # @option opts [Float] :state
5488
+ # @option opts [Float] :skip
5489
+ # @option opts [Float] :limit
5490
+ # @return [GetTickets200Response]
5491
+ def get_tickets(tenant_id, opts = {})
5492
+ data, _status_code, _headers = get_tickets_with_http_info(tenant_id, opts)
5493
+ data
5494
+ end
5495
+
5496
+ # @param tenant_id [String]
5497
+ # @param [Hash] opts the optional parameters
5498
+ # @option opts [String] :user_id
5499
+ # @option opts [Float] :state
5500
+ # @option opts [Float] :skip
5501
+ # @option opts [Float] :limit
5502
+ # @return [Array<(GetTickets200Response, Integer, Hash)>] GetTickets200Response data, response status code and response headers
5503
+ def get_tickets_with_http_info(tenant_id, opts = {})
5504
+ if @api_client.config.debugging
5505
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_tickets ...'
5506
+ end
5507
+ # verify the required parameter 'tenant_id' is set
5508
+ if @api_client.config.client_side_validation && tenant_id.nil?
5509
+ fail ArgumentError, "Missing the required parameter 'tenant_id' when calling DefaultApi.get_tickets"
5510
+ end
5511
+ # resource path
5512
+ local_var_path = '/api/v1/tickets'
5513
+
5514
+ # query parameters
5515
+ query_params = opts[:query_params] || {}
5516
+ query_params[:'tenantId'] = tenant_id
5517
+ query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil?
5518
+ query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
5519
+ query_params[:'skip'] = opts[:'skip'] if !opts[:'skip'].nil?
5520
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
5521
+
5522
+ # header parameters
5523
+ header_params = opts[:header_params] || {}
5524
+ # HTTP header 'Accept' (if needed)
5525
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
5526
+
5527
+ # form parameters
5528
+ form_params = opts[:form_params] || {}
5529
+
5530
+ # http body (model)
5531
+ post_body = opts[:debug_body]
5532
+
5533
+ # return_type
5534
+ return_type = opts[:debug_return_type] || 'GetTickets200Response'
5535
+
5536
+ # auth_names
5537
+ auth_names = opts[:debug_auth_names] || ['api_key']
5538
+
5539
+ new_options = opts.merge(
5540
+ :operation => :"DefaultApi.get_tickets",
5541
+ :header_params => header_params,
5542
+ :query_params => query_params,
5543
+ :form_params => form_params,
5544
+ :body => post_body,
5545
+ :auth_names => auth_names,
5546
+ :return_type => return_type
5547
+ )
5548
+
5549
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
5550
+ if @api_client.config.debugging
5551
+ @api_client.config.logger.debug "API called: DefaultApi#get_tickets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5552
+ end
5553
+ return data, status_code, headers
5554
+ end
5555
+
5253
5556
  # @param tenant_id [String]
5254
5557
  # @param id [String]
5255
5558
  # @param [Hash] opts the optional parameters
@@ -7506,6 +7809,86 @@ module FastCommentsClient
7506
7809
  return data, status_code, headers
7507
7810
  end
7508
7811
 
7812
+ # @param tenant_id [String]
7813
+ # @param id [String]
7814
+ # @param update_api_user_subscription_data [UpdateAPIUserSubscriptionData]
7815
+ # @param [Hash] opts the optional parameters
7816
+ # @option opts [String] :user_id
7817
+ # @return [UpdateSubscriptionAPIResponse]
7818
+ def update_subscription(tenant_id, id, update_api_user_subscription_data, opts = {})
7819
+ data, _status_code, _headers = update_subscription_with_http_info(tenant_id, id, update_api_user_subscription_data, opts)
7820
+ data
7821
+ end
7822
+
7823
+ # @param tenant_id [String]
7824
+ # @param id [String]
7825
+ # @param update_api_user_subscription_data [UpdateAPIUserSubscriptionData]
7826
+ # @param [Hash] opts the optional parameters
7827
+ # @option opts [String] :user_id
7828
+ # @return [Array<(UpdateSubscriptionAPIResponse, Integer, Hash)>] UpdateSubscriptionAPIResponse data, response status code and response headers
7829
+ def update_subscription_with_http_info(tenant_id, id, update_api_user_subscription_data, opts = {})
7830
+ if @api_client.config.debugging
7831
+ @api_client.config.logger.debug 'Calling API: DefaultApi.update_subscription ...'
7832
+ end
7833
+ # verify the required parameter 'tenant_id' is set
7834
+ if @api_client.config.client_side_validation && tenant_id.nil?
7835
+ fail ArgumentError, "Missing the required parameter 'tenant_id' when calling DefaultApi.update_subscription"
7836
+ end
7837
+ # verify the required parameter 'id' is set
7838
+ if @api_client.config.client_side_validation && id.nil?
7839
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_subscription"
7840
+ end
7841
+ # verify the required parameter 'update_api_user_subscription_data' is set
7842
+ if @api_client.config.client_side_validation && update_api_user_subscription_data.nil?
7843
+ fail ArgumentError, "Missing the required parameter 'update_api_user_subscription_data' when calling DefaultApi.update_subscription"
7844
+ end
7845
+ # resource path
7846
+ local_var_path = '/api/v1/subscriptions/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
7847
+
7848
+ # query parameters
7849
+ query_params = opts[:query_params] || {}
7850
+ query_params[:'tenantId'] = tenant_id
7851
+ query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil?
7852
+
7853
+ # header parameters
7854
+ header_params = opts[:header_params] || {}
7855
+ # HTTP header 'Accept' (if needed)
7856
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
7857
+ # HTTP header 'Content-Type'
7858
+ content_type = @api_client.select_header_content_type(['application/json'])
7859
+ if !content_type.nil?
7860
+ header_params['Content-Type'] = content_type
7861
+ end
7862
+
7863
+ # form parameters
7864
+ form_params = opts[:form_params] || {}
7865
+
7866
+ # http body (model)
7867
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(update_api_user_subscription_data)
7868
+
7869
+ # return_type
7870
+ return_type = opts[:debug_return_type] || 'UpdateSubscriptionAPIResponse'
7871
+
7872
+ # auth_names
7873
+ auth_names = opts[:debug_auth_names] || ['api_key']
7874
+
7875
+ new_options = opts.merge(
7876
+ :operation => :"DefaultApi.update_subscription",
7877
+ :header_params => header_params,
7878
+ :query_params => query_params,
7879
+ :form_params => form_params,
7880
+ :body => post_body,
7881
+ :auth_names => auth_names,
7882
+ :return_type => return_type
7883
+ )
7884
+
7885
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
7886
+ if @api_client.config.debugging
7887
+ @api_client.config.logger.debug "API called: DefaultApi#update_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
7888
+ end
7889
+ return data, status_code, headers
7890
+ end
7891
+
7509
7892
  # @param tenant_id [String]
7510
7893
  # @param id [String]
7511
7894
  # @param update_tenant_body [UpdateTenantBody]
@@ -1940,6 +1940,7 @@ module FastCommentsClient
1940
1940
  # @option opts [String] :username_starts_with
1941
1941
  # @option opts [Array<String>] :mention_group_ids
1942
1942
  # @option opts [String] :sso
1943
+ # @option opts [String] :search_section
1943
1944
  # @return [SearchUsers200Response]
1944
1945
  def search_users(tenant_id, url_id, opts = {})
1945
1946
  data, _status_code, _headers = search_users_with_http_info(tenant_id, url_id, opts)
@@ -1952,6 +1953,7 @@ module FastCommentsClient
1952
1953
  # @option opts [String] :username_starts_with
1953
1954
  # @option opts [Array<String>] :mention_group_ids
1954
1955
  # @option opts [String] :sso
1956
+ # @option opts [String] :search_section
1955
1957
  # @return [Array<(SearchUsers200Response, Integer, Hash)>] SearchUsers200Response data, response status code and response headers
1956
1958
  def search_users_with_http_info(tenant_id, url_id, opts = {})
1957
1959
  if @api_client.config.debugging
@@ -1965,6 +1967,10 @@ module FastCommentsClient
1965
1967
  if @api_client.config.client_side_validation && url_id.nil?
1966
1968
  fail ArgumentError, "Missing the required parameter 'url_id' when calling PublicApi.search_users"
1967
1969
  end
1970
+ allowable_values = ["fast", "site"]
1971
+ if @api_client.config.client_side_validation && opts[:'search_section'] && !allowable_values.include?(opts[:'search_section'])
1972
+ fail ArgumentError, "invalid value for \"search_section\", must be one of #{allowable_values}"
1973
+ end
1968
1974
  # resource path
1969
1975
  local_var_path = '/user-search/{tenantId}'.sub('{' + 'tenantId' + '}', CGI.escape(tenant_id.to_s))
1970
1976
 
@@ -1974,6 +1980,7 @@ module FastCommentsClient
1974
1980
  query_params[:'usernameStartsWith'] = opts[:'username_starts_with'] if !opts[:'username_starts_with'].nil?
1975
1981
  query_params[:'mentionGroupIds'] = @api_client.build_collection_param(opts[:'mention_group_ids'], :multi) if !opts[:'mention_group_ids'].nil?
1976
1982
  query_params[:'sso'] = opts[:'sso'] if !opts[:'sso'].nil?
1983
+ query_params[:'searchSection'] = opts[:'search_section'] if !opts[:'search_section'].nil?
1977
1984
 
1978
1985
  # header parameters
1979
1986
  header_params = opts[:header_params] || {}
@@ -228,7 +228,7 @@ module FastCommentsClient
228
228
  :'local_date_string' => :'String',
229
229
  :'locale' => :'String',
230
230
  :'mentions' => :'Array<CommentUserMentionInfo>',
231
- :'meta' => :'FCommentMeta',
231
+ :'meta' => :'APICommentBaseMeta',
232
232
  :'moderation_group_ids' => :'Array<String>',
233
233
  :'notification_sent_for_parent' => :'Boolean',
234
234
  :'notification_sent_for_parent_tenant' => :'Boolean',
@@ -228,7 +228,7 @@ module FastCommentsClient
228
228
  :'local_date_string' => :'String',
229
229
  :'locale' => :'String',
230
230
  :'mentions' => :'Array<CommentUserMentionInfo>',
231
- :'meta' => :'FCommentMeta',
231
+ :'meta' => :'APICommentBaseMeta',
232
232
  :'moderation_group_ids' => :'Array<String>',
233
233
  :'notification_sent_for_parent' => :'Boolean',
234
234
  :'notification_sent_for_parent_tenant' => :'Boolean',
@@ -0,0 +1,156 @@
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 APICommentBaseMeta < ApiModelBase
18
+ attr_accessor :wp_user_id
19
+
20
+ attr_accessor :wp_post_id
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'wp_user_id' => :'wpUserId',
26
+ :'wp_post_id' => :'wpPostId'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'wp_user_id' => :'String',
44
+ :'wp_post_id' => :'String'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FastCommentsClient::APICommentBaseMeta` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FastCommentsClient::APICommentBaseMeta`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'wp_user_id')
71
+ self.wp_user_id = attributes[:'wp_user_id']
72
+ end
73
+
74
+ if attributes.key?(:'wp_post_id')
75
+ self.wp_post_id = attributes[:'wp_post_id']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ wp_user_id == o.wp_user_id &&
100
+ wp_post_id == o.wp_post_id
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [wp_user_id, wp_post_id].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ attributes = attributes.transform_keys(&:to_sym)
121
+ transformed_hash = {}
122
+ openapi_types.each_pair do |key, type|
123
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = nil
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[attribute_map[key]].is_a?(Array)
129
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
+ end
131
+ elsif !attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
+ end
134
+ end
135
+ new(transformed_hash)
136
+ end
137
+
138
+ # Returns the object in the form of hash
139
+ # @return [Hash] Returns the object in the form of hash
140
+ def to_hash
141
+ hash = {}
142
+ self.class.attribute_map.each_pair do |attr, param|
143
+ value = self.send(attr)
144
+ if value.nil?
145
+ is_nullable = self.class.openapi_nullable.include?(attr)
146
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
147
+ end
148
+
149
+ hash[param] = _to_hash(value)
150
+ end
151
+ hash
152
+ end
153
+
154
+ end
155
+
156
+ end