ding_sdk 0.8.3 → 0.8.4

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: 91d39af4727dad1916a565bf25fb04254c1d896b6ea62add8aad17a264fc87e0
4
+ data.tar.gz: 6d8da210d8bf86e4f63b962b321f8af78edeee0033215e945acf11bf8a216d4a
5
5
  SHA512:
6
- metadata.gz: 7ecb9d80c11bd81a401cf0163e6af6b073359583b740c743c594612d38fb9a1d6523d52e07dd68135d3da4cd1a74b8f09b8c3775dd56293bc214d3bd16e3a094
7
- data.tar.gz: 902c64b7971df8fe4038d6710fcdc94d21471923c73fc1ba0c82f51a6e62b6f6f6f06cac447a6de69bfe2afae696652b4eb125c91e57b34707ddb83d49773d13
6
+ metadata.gz: c049dc644fde38fc771c3361fb7f444f88ba4f517f494d6cfd3303592cde6d0420dc6fcc5e0f380fe4ec267c9bd80791faaf149db53af8e0fba38ca44883ef61
7
+ data.tar.gz: 0d4c423f2b6084094023cba0cb619cb0de008bc4d1d85d9bbe9d6a176b558f676cf683638a5af942034b2c756bc8a22b15dfebf401e39d3fe5a6b1b01a259298
@@ -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,8 @@ 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.
24
26
  # * `invalid_template_id` - The provided template ID is invalid.
25
27
  #
26
28
  class Code < T::Enum
@@ -41,6 +43,8 @@ module DingSDK
41
43
  INVALID_OS_VERSION = new('invalid_os_version')
42
44
  INVALID_DEVICE_MODEL = new('invalid_device_model')
43
45
  INVALID_DEVICE_ID = new('invalid_device_id')
46
+ NO_ASSOCIATED_AUTH_FOUND = new('no_associated_auth_found')
47
+ DUPLICATED_FEEDBACK_STATUS = new('duplicated_feedback_status')
44
48
  INVALID_TEMPLATE_ID = new('invalid_template_id')
45
49
  end
46
50
  end
@@ -25,6 +25,8 @@ 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.
28
30
  # * `invalid_template_id` - The provided template ID is invalid.
29
31
  #
30
32
  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.4'
42
+ @gen_version = '2.280.6'
43
+ @user_agent = 'speakeasy-sdk/ruby 0.8.4 2.280.6 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.4
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-12 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