ding_sdk 0.8.3 → 0.8.5

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: dd2e613d5eae7c7458ef2c7be670ae01de402afdac255b5bd285a938c58a448f
4
- data.tar.gz: 328edb84ae567398947419810461d4cbd277c9c67922b328272e678154d4d788
3
+ metadata.gz: a5518db0fb8a270a87d5549feaa365b29c75d3ad3379f17b45706a0d0d0fc04d
4
+ data.tar.gz: 26777184f6330e875ead7eefbce0194897bfb5429780c1da778959a2b5658461
5
5
  SHA512:
6
- metadata.gz: 7ecb9d80c11bd81a401cf0163e6af6b073359583b740c743c594612d38fb9a1d6523d52e07dd68135d3da4cd1a74b8f09b8c3775dd56293bc214d3bd16e3a094
7
- data.tar.gz: 902c64b7971df8fe4038d6710fcdc94d21471923c73fc1ba0c82f51a6e62b6f6f6f06cac447a6de69bfe2afae696652b4eb125c91e57b34707ddb83d49773d13
6
+ metadata.gz: fe7a7f8baa5836730e8d341ae94e0a9af5625f3a7346737e353509cc8a1b11178a3492c5e10a98166010bd68789feec305c9fba9d1644e9dd47b20edc6326608
7
+ data.tar.gz: 9ee72a6f4c260aeb519dc0e5990681bc4898c735ccaa2c63358010c9c13ee96ac03d6ebf8880423a76d470da363d09f17efd0e0c9e82dd8731f75571ec0ec188
@@ -0,0 +1,36 @@
1
+ # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module DingSDK
8
+ module Operations
9
+
10
+
11
+ class FeedbackResponse < ::DingSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # HTTP response content type for this operation
15
+ field :content_type, ::String
16
+ # Raw HTTP response; suitable for custom response parsing
17
+ field :raw_response, ::Faraday::Response
18
+ # HTTP response status code for this operation
19
+ field :status_code, ::Integer
20
+ # Bad Request
21
+ field :error_response, T.nilable(::DingSDK::Shared::ErrorResponse)
22
+ # OK
23
+ field :feedback_response, T.nilable(::DingSDK::Shared::FeedbackResponse)
24
+
25
+
26
+ sig { params(content_type: ::String, raw_response: ::Faraday::Response, status_code: ::Integer, error_response: T.nilable(::DingSDK::Shared::ErrorResponse), feedback_response: T.nilable(::DingSDK::Shared::FeedbackResponse)).void }
27
+ def initialize(content_type: nil, raw_response: nil, status_code: nil, error_response: nil, feedback_response: nil)
28
+ @content_type = content_type
29
+ @raw_response = raw_response
30
+ @status_code = status_code
31
+ @error_response = error_response
32
+ @feedback_response = feedback_response
33
+ end
34
+ end
35
+ end
36
+ end
@@ -7,6 +7,7 @@ module DingSDK
7
7
  module Operations
8
8
  autoload :CheckResponse, 'ding_sdk/models/operations/check_response.rb'
9
9
  autoload :CreateAuthenticationResponse, 'ding_sdk/models/operations/create_authentication_response.rb'
10
+ autoload :FeedbackResponse, 'ding_sdk/models/operations/feedback_response.rb'
10
11
  autoload :RetryResponse, 'ding_sdk/models/operations/retry_response.rb'
11
12
  autoload :LookupRequest, 'ding_sdk/models/operations/lookup_request.rb'
12
13
  autoload :LookupResponse, 'ding_sdk/models/operations/lookup_response.rb'
@@ -21,6 +21,9 @@ module DingSDK
21
21
  # * `invalid_os_version` - The provided OS version is invalid.
22
22
  # * `invalid_device_model` - The provided device model is invalid.
23
23
  # * `invalid_device_id` - The provided device ID is invalid.
24
+ # * `no_associated_auth_found` - The associated authentication was not found.
25
+ # * `duplicated_feedback_status` - Duplicated feedback status has found.
26
+ # * `invalid_feedback_status` - The provided feedback status is invalid.
24
27
  # * `invalid_template_id` - The provided template ID is invalid.
25
28
  #
26
29
  class Code < T::Enum
@@ -41,6 +44,9 @@ module DingSDK
41
44
  INVALID_OS_VERSION = new('invalid_os_version')
42
45
  INVALID_DEVICE_MODEL = new('invalid_device_model')
43
46
  INVALID_DEVICE_ID = new('invalid_device_id')
47
+ NO_ASSOCIATED_AUTH_FOUND = new('no_associated_auth_found')
48
+ DUPLICATED_FEEDBACK_STATUS = new('duplicated_feedback_status')
49
+ INVALID_FEEDBACK_STATUS = new('invalid_feedback_status')
44
50
  INVALID_TEMPLATE_ID = new('invalid_template_id')
45
51
  end
46
52
  end
@@ -25,6 +25,9 @@ module DingSDK
25
25
  # * `invalid_os_version` - The provided OS version is invalid.
26
26
  # * `invalid_device_model` - The provided device model is invalid.
27
27
  # * `invalid_device_id` - The provided device ID is invalid.
28
+ # * `no_associated_auth_found` - The associated authentication was not found.
29
+ # * `duplicated_feedback_status` - Duplicated feedback status has found.
30
+ # * `invalid_feedback_status` - The provided feedback status is invalid.
28
31
  # * `invalid_template_id` - The provided template ID is invalid.
29
32
  #
30
33
  field :code, T.nilable(::DingSDK::Shared::Code), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('code'), 'decoder': Utils.enum_from_string(::DingSDK::Shared::Code, true) } }
@@ -0,0 +1,30 @@
1
+ # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module DingSDK
8
+ module Shared
9
+
10
+
11
+ class FeedbackRequest < ::DingSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # Your customer UUID, which can be found in the API settings in the dashboard.
15
+ field :customer_uuid, ::String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('customer_uuid') } }
16
+ # An E.164 formatted phone number.
17
+ field :phone_number, ::String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('phone_number') } }
18
+ # The type of the feedback.
19
+ field :status, ::DingSDK::Shared::FeedbackRequestStatus, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(::DingSDK::Shared::FeedbackRequestStatus, false) } }
20
+
21
+
22
+ sig { params(customer_uuid: ::String, phone_number: ::String, status: ::DingSDK::Shared::FeedbackRequestStatus).void }
23
+ def initialize(customer_uuid: nil, phone_number: nil, status: nil)
24
+ @customer_uuid = customer_uuid
25
+ @phone_number = phone_number
26
+ @status = status
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,18 @@
1
+ # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module DingSDK
8
+ module Shared
9
+
10
+ # FeedbackRequestStatus - The type of the feedback.
11
+ class FeedbackRequestStatus < T::Enum
12
+ enums do
13
+ ONBOARDED = new('onboarded')
14
+ end
15
+ end
16
+
17
+ end
18
+ end
@@ -0,0 +1,24 @@
1
+ # Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
2
+
3
+ # typed: true
4
+ # frozen_string_literal: true
5
+
6
+
7
+ module DingSDK
8
+ module Shared
9
+
10
+
11
+ class FeedbackResponse < ::DingSDK::Utils::FieldAugmented
12
+ extend T::Sig
13
+
14
+ # The UUID of the feedback.
15
+ field :uuid, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('uuid') } }
16
+
17
+
18
+ sig { params(uuid: T.nilable(::String)).void }
19
+ def initialize(uuid: nil)
20
+ @uuid = uuid
21
+ end
22
+ end
23
+ end
24
+ end
@@ -14,6 +14,9 @@ module DingSDK
14
14
  autoload :CreateAuthenticationResponse, 'ding_sdk/models/shared/createauthenticationresponse.rb'
15
15
  autoload :DeviceType, 'ding_sdk/models/shared/device_type.rb'
16
16
  autoload :CreateAuthenticationRequest, 'ding_sdk/models/shared/createauthenticationrequest.rb'
17
+ autoload :FeedbackResponse, 'ding_sdk/models/shared/feedbackresponse.rb'
18
+ autoload :FeedbackRequestStatus, 'ding_sdk/models/shared/feedbackrequest_status.rb'
19
+ autoload :FeedbackRequest, 'ding_sdk/models/shared/feedbackrequest.rb'
17
20
  autoload :RetryAuthenticationResponseStatus, 'ding_sdk/models/shared/retryauthenticationresponse_status.rb'
18
21
  autoload :RetryAuthenticationResponse, 'ding_sdk/models/shared/retryauthenticationresponse.rb'
19
22
  autoload :RetryAuthenticationRequest, 'ding_sdk/models/shared/retryauthenticationrequest.rb'
data/lib/ding_sdk/otp.rb CHANGED
@@ -107,6 +107,51 @@ module DingSDK
107
107
  end
108
108
 
109
109
 
110
+ sig { params(request: T.nilable(::DingSDK::Shared::FeedbackRequest)).returns(::DingSDK::Operations::FeedbackResponse) }
111
+ def feedback(request)
112
+ # feedback - Send feedback
113
+ url, params = @sdk_configuration.get_server_details
114
+ base_url = Utils.template_url(url, params)
115
+ url = "#{base_url}/authentication/feedback"
116
+ headers = {}
117
+ req_content_type, data, form = Utils.serialize_request_body(request, :request, :json)
118
+ headers['content-type'] = req_content_type
119
+ headers['Accept'] = 'application/json'
120
+ headers['user-agent'] = @sdk_configuration.user_agent
121
+
122
+ r = @sdk_configuration.client.post(url) do |req|
123
+ req.headers = headers
124
+ Utils.configure_request_security(req, @sdk_configuration.security) if !@sdk_configuration.nil? && !@sdk_configuration.security.nil?
125
+ if form
126
+ req.body = Utils.encode_form(form)
127
+ elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
128
+ req.body = URI.encode_www_form(data)
129
+ else
130
+ req.body = data
131
+ end
132
+ end
133
+
134
+ content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
135
+
136
+ res = ::DingSDK::Operations::FeedbackResponse.new(
137
+ status_code: r.status, content_type: content_type, raw_response: r
138
+ )
139
+ if r.status == 200
140
+ if Utils.match_content_type(content_type, 'application/json')
141
+ out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::FeedbackResponse)
142
+ res.feedback_response = out
143
+ end
144
+ else
145
+
146
+ if Utils.match_content_type(content_type, 'application/json')
147
+ out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
148
+ res.error_response = out
149
+ end
150
+ end
151
+ res
152
+ end
153
+
154
+
110
155
  sig { params(request: T.nilable(::DingSDK::Shared::RetryAuthenticationRequest)).returns(::DingSDK::Operations::RetryResponse) }
111
156
  def retry(request)
112
157
  # retry - Perform a retry
@@ -38,9 +38,9 @@ module DingSDK
38
38
  @security = security
39
39
  @language = 'ruby'
40
40
  @openapi_doc_version = '1.0.0'
41
- @sdk_version = '0.8.3'
42
- @gen_version = '2.279.1'
43
- @user_agent = 'speakeasy-sdk/ruby 0.8.3 2.279.1 1.0.0 ding_sdk'
41
+ @sdk_version = '0.8.5'
42
+ @gen_version = '2.281.2'
43
+ @user_agent = 'speakeasy-sdk/ruby 0.8.5 2.281.2 1.0.0 ding_sdk'
44
44
  end
45
45
 
46
46
  sig { returns([String, T::Hash[Symbol, String]]) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ding_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ding
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-11 00:00:00.000000000 Z
11
+ date: 2024-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -148,6 +148,7 @@ files:
148
148
  - lib/ding_sdk/models/operations.rb
149
149
  - lib/ding_sdk/models/operations/check_response.rb
150
150
  - lib/ding_sdk/models/operations/create_authentication_response.rb
151
+ - lib/ding_sdk/models/operations/feedback_response.rb
151
152
  - lib/ding_sdk/models/operations/lookup_request.rb
152
153
  - lib/ding_sdk/models/operations/lookup_response.rb
153
154
  - lib/ding_sdk/models/operations/retry_response.rb
@@ -160,6 +161,9 @@ files:
160
161
  - lib/ding_sdk/models/shared/createcheckresponse_status.rb
161
162
  - lib/ding_sdk/models/shared/device_type.rb
162
163
  - lib/ding_sdk/models/shared/errorresponse.rb
164
+ - lib/ding_sdk/models/shared/feedbackrequest.rb
165
+ - lib/ding_sdk/models/shared/feedbackrequest_status.rb
166
+ - lib/ding_sdk/models/shared/feedbackresponse.rb
163
167
  - lib/ding_sdk/models/shared/line_type.rb
164
168
  - lib/ding_sdk/models/shared/lookupresponse.rb
165
169
  - lib/ding_sdk/models/shared/retryauthenticationrequest.rb