ding_sdk 0.5.2 → 0.6.0
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.
- checksums.yaml +4 -4
- data/lib/{ding/sdk.rb → ding_sdk/ding.rb} +1 -1
- data/lib/{ding → ding_sdk}/lookup.rb +9 -7
- data/lib/{ding/models/operations/check.rb → ding_sdk/models/operations/check_response.rb} +7 -10
- data/lib/{ding/models/operations/create_autentication.rb → ding_sdk/models/operations/create_autentication_response.rb} +7 -10
- data/lib/ding_sdk/models/operations/lookup_request.rb +27 -0
- data/lib/ding_sdk/models/operations/lookup_response.rb +36 -0
- data/lib/{ding/models/operations/retry_.rb → ding_sdk/models/operations/retry_response.rb} +7 -10
- data/lib/ding_sdk/models/operations.rb +14 -0
- data/lib/{ding/models/shared/errorresponse.rb → ding_sdk/models/shared/code.rb} +1 -36
- data/lib/ding_sdk/models/shared/createauthenticationrequest.rb +54 -0
- data/lib/ding_sdk/models/shared/createauthenticationresponse.rb +37 -0
- data/lib/{ding → ding_sdk}/models/shared/createcheckrequest.rb +5 -6
- data/lib/ding_sdk/models/shared/createcheckresponse.rb +34 -0
- data/lib/ding_sdk/models/shared/createcheckresponse_status.rb +30 -0
- data/lib/ding_sdk/models/shared/device_type.rb +20 -0
- data/lib/ding_sdk/models/shared/errorresponse.rb +44 -0
- data/lib/ding_sdk/models/shared/line_type.rb +28 -0
- data/lib/ding_sdk/models/shared/lookupresponse.rb +42 -0
- data/lib/{ding → ding_sdk}/models/shared/retryauthenticationrequest.rb +4 -5
- data/lib/ding_sdk/models/shared/retryauthenticationresponse.rb +43 -0
- data/lib/ding_sdk/models/shared/retryauthenticationresponse_status.rb +30 -0
- data/lib/{ding → ding_sdk}/models/shared/security.rb +3 -4
- data/lib/ding_sdk/models/shared/status.rb +24 -0
- data/lib/ding_sdk/models/shared.rb +24 -0
- data/lib/{ding → ding_sdk}/otp.rb +17 -13
- data/lib/{ding → ding_sdk}/sdkconfiguration.rb +5 -5
- data/lib/{ding → ding_sdk}/utils/utils.rb +2 -2
- data/lib/ding_sdk.rb +8 -20
- metadata +30 -21
- data/lib/ding/models/operations/lookup.rb +0 -56
- data/lib/ding/models/shared/createauthenticationrequest.rb +0 -65
- data/lib/ding/models/shared/createauthenticationresponse.rb +0 -52
- data/lib/ding/models/shared/createcheckresponse.rb +0 -55
- data/lib/ding/models/shared/lookupresponse.rb +0 -61
- data/lib/ding/models/shared/retryauthenticationresponse.rb +0 -64
- /data/lib/{ding → ding_sdk}/utils/metadata_fields.rb +0 -0
@@ -3,22 +3,21 @@
|
|
3
3
|
# typed: true
|
4
4
|
# frozen_string_literal: true
|
5
5
|
|
6
|
-
require 'sorbet-runtime'
|
7
|
-
require 'faraday'
|
8
6
|
|
9
7
|
module DingSDK
|
10
8
|
module Shared
|
9
|
+
|
11
10
|
|
12
11
|
class RetryAuthenticationRequest < ::DingSDK::Utils::FieldAugmented
|
13
12
|
extend T::Sig
|
14
13
|
|
15
14
|
# The authentication UUID that was returned when you created the authentication.
|
16
|
-
field :authentication_uuid, String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
|
15
|
+
field :authentication_uuid, ::String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
|
17
16
|
# Your customer UUID, which can be found in the API settings in the dashboard.
|
18
|
-
field :customer_uuid, String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('customer_uuid') } }
|
17
|
+
field :customer_uuid, ::String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('customer_uuid') } }
|
19
18
|
|
20
19
|
|
21
|
-
sig { params(authentication_uuid: String, customer_uuid: String).void }
|
20
|
+
sig { params(authentication_uuid: ::String, customer_uuid: ::String).void }
|
22
21
|
def initialize(authentication_uuid: nil, customer_uuid: nil)
|
23
22
|
@authentication_uuid = authentication_uuid
|
24
23
|
@customer_uuid = customer_uuid
|
@@ -0,0 +1,43 @@
|
|
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 RetryAuthenticationResponse < ::DingSDK::Utils::FieldAugmented
|
12
|
+
extend T::Sig
|
13
|
+
|
14
|
+
# The UUID of the corresponding authentication.
|
15
|
+
field :authentication_uuid, T.nilable(::String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
|
16
|
+
|
17
|
+
field :created_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
|
18
|
+
# The time at which the next retry will be available.
|
19
|
+
field :next_retry_at, T.nilable(::DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('next_retry_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
|
20
|
+
# The number of remaining retries.
|
21
|
+
field :remaining_retry, T.nilable(::Integer), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('remaining_retry') } }
|
22
|
+
# The status of the retry. Possible values are:
|
23
|
+
# * `approved` - The retry was approved and a new code was sent.
|
24
|
+
# * `denied` - The retry was denied.
|
25
|
+
# * `no_attempt` - No attempt was sent yet, so a retry cannot be completed.
|
26
|
+
# * `rate_limited` - The authentication was rate limited and cannot be retried.
|
27
|
+
# * `expired_auth` - The authentication has expired and cannot be retried.
|
28
|
+
# * `already_validated` - The authentication has already been validated.
|
29
|
+
#
|
30
|
+
field :status, T.nilable(::DingSDK::Shared::RetryAuthenticationResponseStatus), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(::DingSDK::Shared::RetryAuthenticationResponseStatus, true) } }
|
31
|
+
|
32
|
+
|
33
|
+
sig { params(authentication_uuid: T.nilable(::String), created_at: T.nilable(::DateTime), next_retry_at: T.nilable(::DateTime), remaining_retry: T.nilable(::Integer), status: T.nilable(::DingSDK::Shared::RetryAuthenticationResponseStatus)).void }
|
34
|
+
def initialize(authentication_uuid: nil, created_at: nil, next_retry_at: nil, remaining_retry: nil, status: nil)
|
35
|
+
@authentication_uuid = authentication_uuid
|
36
|
+
@created_at = created_at
|
37
|
+
@next_retry_at = next_retry_at
|
38
|
+
@remaining_retry = remaining_retry
|
39
|
+
@status = status
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -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
|
+
# RetryAuthenticationResponseStatus - The status of the retry. Possible values are:
|
11
|
+
# * `approved` - The retry was approved and a new code was sent.
|
12
|
+
# * `denied` - The retry was denied.
|
13
|
+
# * `no_attempt` - No attempt was sent yet, so a retry cannot be completed.
|
14
|
+
# * `rate_limited` - The authentication was rate limited and cannot be retried.
|
15
|
+
# * `expired_auth` - The authentication has expired and cannot be retried.
|
16
|
+
# * `already_validated` - The authentication has already been validated.
|
17
|
+
#
|
18
|
+
class RetryAuthenticationResponseStatus < T::Enum
|
19
|
+
enums do
|
20
|
+
APPROVED = new('approved')
|
21
|
+
DENIED = new('denied')
|
22
|
+
NO_ATTEMPT = new('no_attempt')
|
23
|
+
RATE_LIMITED = new('rate_limited')
|
24
|
+
EXPIRED_AUTH = new('expired_auth')
|
25
|
+
ALREADY_VALIDATED = new('already_validated')
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
@@ -3,20 +3,19 @@
|
|
3
3
|
# typed: true
|
4
4
|
# frozen_string_literal: true
|
5
5
|
|
6
|
-
require 'sorbet-runtime'
|
7
|
-
require 'faraday'
|
8
6
|
|
9
7
|
module DingSDK
|
10
8
|
module Shared
|
9
|
+
|
11
10
|
|
12
11
|
class Security < ::DingSDK::Utils::FieldAugmented
|
13
12
|
extend T::Sig
|
14
13
|
|
15
14
|
|
16
|
-
field :api_key, String, { 'security': { 'scheme': true, 'type': 'apiKey', 'sub_type': 'header', 'field_name': 'x-api-key' } }
|
15
|
+
field :api_key, ::String, { 'security': { 'scheme': true, 'type': 'apiKey', 'sub_type': 'header', 'field_name': 'x-api-key' } }
|
17
16
|
|
18
17
|
|
19
|
-
sig { params(api_key: String).void }
|
18
|
+
sig { params(api_key: ::String).void }
|
20
19
|
def initialize(api_key: nil)
|
21
20
|
@api_key = api_key
|
22
21
|
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
|
+
# Status - The status of the authentication. Possible values are:
|
11
|
+
# * `pending` - The OTP code is being sent.
|
12
|
+
# * `rate_limited` - This user is rate-limited and cannot receive another code.
|
13
|
+
# * `spam_detected` - This attempt is flagged as spam. Go to the dashboard for more details.
|
14
|
+
#
|
15
|
+
class Status < T::Enum
|
16
|
+
enums do
|
17
|
+
PENDING = new('pending')
|
18
|
+
RATE_LIMITED = new('rate_limited')
|
19
|
+
SPAM_DETECTED = new('spam_detected')
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
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
|
+
module DingSDK
|
7
|
+
module Shared
|
8
|
+
autoload :Code, 'ding_sdk/models/shared/code.rb'
|
9
|
+
autoload :ErrorResponse, 'ding_sdk/models/shared/errorresponse.rb'
|
10
|
+
autoload :CreateCheckResponseStatus, 'ding_sdk/models/shared/createcheckresponse_status.rb'
|
11
|
+
autoload :CreateCheckResponse, 'ding_sdk/models/shared/createcheckresponse.rb'
|
12
|
+
autoload :CreateCheckRequest, 'ding_sdk/models/shared/createcheckrequest.rb'
|
13
|
+
autoload :Status, 'ding_sdk/models/shared/status.rb'
|
14
|
+
autoload :CreateAuthenticationResponse, 'ding_sdk/models/shared/createauthenticationresponse.rb'
|
15
|
+
autoload :DeviceType, 'ding_sdk/models/shared/device_type.rb'
|
16
|
+
autoload :CreateAuthenticationRequest, 'ding_sdk/models/shared/createauthenticationrequest.rb'
|
17
|
+
autoload :RetryAuthenticationResponseStatus, 'ding_sdk/models/shared/retryauthenticationresponse_status.rb'
|
18
|
+
autoload :RetryAuthenticationResponse, 'ding_sdk/models/shared/retryauthenticationresponse.rb'
|
19
|
+
autoload :RetryAuthenticationRequest, 'ding_sdk/models/shared/retryauthenticationrequest.rb'
|
20
|
+
autoload :LineType, 'ding_sdk/models/shared/line_type.rb'
|
21
|
+
autoload :LookupResponse, 'ding_sdk/models/shared/lookupresponse.rb'
|
22
|
+
autoload :Security, 'ding_sdk/models/shared/security.rb'
|
23
|
+
end
|
24
|
+
end
|
@@ -10,14 +10,16 @@ require 'sorbet-runtime'
|
|
10
10
|
module DingSDK
|
11
11
|
extend T::Sig
|
12
12
|
class Otp
|
13
|
-
# Send OTP codes to your users using their phone numbers.
|
14
13
|
extend T::Sig
|
14
|
+
# Send OTP codes to your users using their phone numbers.
|
15
|
+
|
15
16
|
sig { params(sdk_config: SDKConfiguration).void }
|
16
17
|
def initialize(sdk_config)
|
17
18
|
@sdk_configuration = sdk_config
|
18
19
|
end
|
19
20
|
|
20
|
-
|
21
|
+
|
22
|
+
sig { params(request: T.nilable(::DingSDK::Shared::CreateCheckRequest)).returns(Utils::FieldAugmented) }
|
21
23
|
def check(request)
|
22
24
|
# check - Check a code
|
23
25
|
url, params = @sdk_configuration.get_server_details
|
@@ -43,24 +45,25 @@ module DingSDK
|
|
43
45
|
|
44
46
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
45
47
|
|
46
|
-
res = Operations::CheckResponse.new(
|
48
|
+
res = ::DingSDK::Operations::CheckResponse.new(
|
47
49
|
status_code: r.status, content_type: content_type, raw_response: r
|
48
50
|
)
|
49
51
|
if r.status == 200
|
50
52
|
if Utils.match_content_type(content_type, 'application/json')
|
51
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::CreateCheckResponse)
|
53
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::CreateCheckResponse)
|
52
54
|
res.create_check_response = out
|
53
55
|
end
|
54
56
|
elsif r.status == 400
|
55
57
|
if Utils.match_content_type(content_type, 'application/json')
|
56
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::ErrorResponse)
|
58
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
|
57
59
|
res.error_response = out
|
58
60
|
end
|
59
61
|
end
|
60
62
|
res
|
61
63
|
end
|
62
64
|
|
63
|
-
|
65
|
+
|
66
|
+
sig { params(request: T.nilable(::DingSDK::Shared::CreateAuthenticationRequest)).returns(Utils::FieldAugmented) }
|
64
67
|
def create_autentication(request)
|
65
68
|
# create_autentication - Send a code
|
66
69
|
url, params = @sdk_configuration.get_server_details
|
@@ -86,24 +89,25 @@ module DingSDK
|
|
86
89
|
|
87
90
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
88
91
|
|
89
|
-
res = Operations::CreateAutenticationResponse.new(
|
92
|
+
res = ::DingSDK::Operations::CreateAutenticationResponse.new(
|
90
93
|
status_code: r.status, content_type: content_type, raw_response: r
|
91
94
|
)
|
92
95
|
if r.status == 200
|
93
96
|
if Utils.match_content_type(content_type, 'application/json')
|
94
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::CreateAuthenticationResponse)
|
97
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::CreateAuthenticationResponse)
|
95
98
|
res.create_authentication_response = out
|
96
99
|
end
|
97
100
|
elsif r.status == 400
|
98
101
|
if Utils.match_content_type(content_type, 'application/json')
|
99
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::ErrorResponse)
|
102
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
|
100
103
|
res.error_response = out
|
101
104
|
end
|
102
105
|
end
|
103
106
|
res
|
104
107
|
end
|
105
108
|
|
106
|
-
|
109
|
+
|
110
|
+
sig { params(request: T.nilable(::DingSDK::Shared::RetryAuthenticationRequest)).returns(Utils::FieldAugmented) }
|
107
111
|
def retry(request)
|
108
112
|
# retry - Perform a retry
|
109
113
|
url, params = @sdk_configuration.get_server_details
|
@@ -129,17 +133,17 @@ module DingSDK
|
|
129
133
|
|
130
134
|
content_type = r.headers.fetch('Content-Type', 'application/octet-stream')
|
131
135
|
|
132
|
-
res = Operations::RetryResponse.new(
|
136
|
+
res = ::DingSDK::Operations::RetryResponse.new(
|
133
137
|
status_code: r.status, content_type: content_type, raw_response: r
|
134
138
|
)
|
135
139
|
if r.status == 200
|
136
140
|
if Utils.match_content_type(content_type, 'application/json')
|
137
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::RetryAuthenticationResponse)
|
141
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::RetryAuthenticationResponse)
|
138
142
|
res.retry_authentication_response = out
|
139
143
|
end
|
140
144
|
elsif r.status == 400
|
141
145
|
if Utils.match_content_type(content_type, 'application/json')
|
142
|
-
out = Utils.unmarshal_complex(r.env.response_body, Shared::ErrorResponse)
|
146
|
+
out = Utils.unmarshal_complex(r.env.response_body, ::DingSDK::Shared::ErrorResponse)
|
143
147
|
res.error_response = out
|
144
148
|
end
|
145
149
|
end
|
@@ -24,7 +24,6 @@ module DingSDK
|
|
24
24
|
field :client, T.nilable(Faraday::Connection)
|
25
25
|
field :security, Shared::Security
|
26
26
|
field :server_url, T.nilable(String)
|
27
|
-
field :server, T.nilable(String)
|
28
27
|
field :language, String
|
29
28
|
field :openapi_doc_version, String
|
30
29
|
field :sdk_version, String
|
@@ -35,12 +34,13 @@ module DingSDK
|
|
35
34
|
sig { params(client: Faraday::Connection, security: T.nilable(Shared::Security), server_url: T.nilable(String), server_idx: T.nilable(Integer)).void }
|
36
35
|
def initialize(client, security, server_url, server_idx)
|
37
36
|
@client = client
|
38
|
-
@
|
37
|
+
@server_url = server_url
|
38
|
+
@server = ''
|
39
39
|
@language = 'ruby'
|
40
40
|
@openapi_doc_version = '1.0.0'
|
41
|
-
@sdk_version = '0.
|
42
|
-
@gen_version = '2.
|
43
|
-
@user_agent = 'speakeasy-sdk/ruby 0.
|
41
|
+
@sdk_version = '0.6.0'
|
42
|
+
@gen_version = '2.250.2'
|
43
|
+
@user_agent = 'speakeasy-sdk/ruby 0.6.0 2.250.2 1.0.0 ding_sdk'
|
44
44
|
end
|
45
45
|
|
46
46
|
sig { returns([String, T::Hash[Symbol, String]]) }
|
@@ -448,9 +448,9 @@ module DingSDK
|
|
448
448
|
raise StandardError, 'not supported'
|
449
449
|
end
|
450
450
|
when 'openIdConnect'
|
451
|
-
req.headers[header_name] = value
|
451
|
+
req.headers[header_name] = value.downcase.start_with?('bearer ') ? value : "Bearer #{value}"
|
452
452
|
when 'oauth2'
|
453
|
-
req.headers[header_name] = value
|
453
|
+
req.headers[header_name] = value.downcase.start_with?('bearer ') ? value : "Bearer #{value}"
|
454
454
|
when 'http'
|
455
455
|
if sub_type == 'bearer'
|
456
456
|
req.headers[header_name] = value.downcase.start_with?('bearer ') ? value : "Bearer #{value}"
|
data/lib/ding_sdk.rb
CHANGED
@@ -3,25 +3,13 @@
|
|
3
3
|
# typed: true
|
4
4
|
# frozen_string_literal: true
|
5
5
|
|
6
|
-
require_relative '
|
7
|
-
require_relative '
|
8
|
-
require_relative 'ding/sdk'
|
9
|
-
require_relative 'ding/models/shared/errorresponse'
|
10
|
-
require_relative 'ding/models/shared/createcheckresponse'
|
11
|
-
require_relative 'ding/models/shared/createcheckrequest'
|
12
|
-
require_relative 'ding/models/shared/createauthenticationresponse'
|
13
|
-
require_relative 'ding/models/shared/createauthenticationrequest'
|
14
|
-
require_relative 'ding/models/shared/retryauthenticationresponse'
|
15
|
-
require_relative 'ding/models/shared/retryauthenticationrequest'
|
16
|
-
require_relative 'ding/models/shared/lookupresponse'
|
17
|
-
require_relative 'ding/models/shared/security'
|
18
|
-
require_relative 'ding/models/operations/check'
|
19
|
-
require_relative 'ding/models/operations/create_autentication'
|
20
|
-
require_relative 'ding/models/operations/lookup'
|
21
|
-
require_relative 'ding/models/operations/retry_'
|
22
|
-
require_relative 'ding/sdkconfiguration'
|
23
|
-
require_relative 'ding/otp'
|
24
|
-
require_relative 'ding/lookup'
|
25
|
-
|
6
|
+
require_relative 'ding_sdk/utils/utils'
|
7
|
+
require_relative 'ding_sdk/utils/metadata_fields'
|
26
8
|
module DingSDK
|
9
|
+
autoload :Ding, 'ding_sdk/ding'
|
10
|
+
autoload :SDKConfiguration, 'ding_sdk/sdkconfiguration'
|
11
|
+
autoload :Shared, 'ding_sdk/models/shared'
|
12
|
+
autoload :Operations, 'ding_sdk/models/operations'
|
13
|
+
autoload :Otp, 'ding_sdk/otp'
|
14
|
+
autoload :Lookup, 'ding_sdk/lookup'
|
27
15
|
end
|
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.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ding
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -142,26 +142,35 @@ executables: []
|
|
142
142
|
extensions: []
|
143
143
|
extra_rdoc_files: []
|
144
144
|
files:
|
145
|
-
- lib/ding/lookup.rb
|
146
|
-
- lib/ding/models/operations/check.rb
|
147
|
-
- lib/ding/models/operations/create_autentication.rb
|
148
|
-
- lib/ding/models/operations/lookup.rb
|
149
|
-
- lib/ding/models/operations/retry_.rb
|
150
|
-
- lib/ding/models/shared/createauthenticationrequest.rb
|
151
|
-
- lib/ding/models/shared/createauthenticationresponse.rb
|
152
|
-
- lib/ding/models/shared/createcheckrequest.rb
|
153
|
-
- lib/ding/models/shared/createcheckresponse.rb
|
154
|
-
- lib/ding/models/shared/errorresponse.rb
|
155
|
-
- lib/ding/models/shared/lookupresponse.rb
|
156
|
-
- lib/ding/models/shared/retryauthenticationrequest.rb
|
157
|
-
- lib/ding/models/shared/retryauthenticationresponse.rb
|
158
|
-
- lib/ding/models/shared/security.rb
|
159
|
-
- lib/ding/otp.rb
|
160
|
-
- lib/ding/sdk.rb
|
161
|
-
- lib/ding/sdkconfiguration.rb
|
162
|
-
- lib/ding/utils/metadata_fields.rb
|
163
|
-
- lib/ding/utils/utils.rb
|
164
145
|
- lib/ding_sdk.rb
|
146
|
+
- lib/ding_sdk/ding.rb
|
147
|
+
- lib/ding_sdk/lookup.rb
|
148
|
+
- lib/ding_sdk/models/operations.rb
|
149
|
+
- lib/ding_sdk/models/operations/check_response.rb
|
150
|
+
- lib/ding_sdk/models/operations/create_autentication_response.rb
|
151
|
+
- lib/ding_sdk/models/operations/lookup_request.rb
|
152
|
+
- lib/ding_sdk/models/operations/lookup_response.rb
|
153
|
+
- lib/ding_sdk/models/operations/retry_response.rb
|
154
|
+
- lib/ding_sdk/models/shared.rb
|
155
|
+
- lib/ding_sdk/models/shared/code.rb
|
156
|
+
- lib/ding_sdk/models/shared/createauthenticationrequest.rb
|
157
|
+
- lib/ding_sdk/models/shared/createauthenticationresponse.rb
|
158
|
+
- lib/ding_sdk/models/shared/createcheckrequest.rb
|
159
|
+
- lib/ding_sdk/models/shared/createcheckresponse.rb
|
160
|
+
- lib/ding_sdk/models/shared/createcheckresponse_status.rb
|
161
|
+
- lib/ding_sdk/models/shared/device_type.rb
|
162
|
+
- lib/ding_sdk/models/shared/errorresponse.rb
|
163
|
+
- lib/ding_sdk/models/shared/line_type.rb
|
164
|
+
- lib/ding_sdk/models/shared/lookupresponse.rb
|
165
|
+
- lib/ding_sdk/models/shared/retryauthenticationrequest.rb
|
166
|
+
- lib/ding_sdk/models/shared/retryauthenticationresponse.rb
|
167
|
+
- lib/ding_sdk/models/shared/retryauthenticationresponse_status.rb
|
168
|
+
- lib/ding_sdk/models/shared/security.rb
|
169
|
+
- lib/ding_sdk/models/shared/status.rb
|
170
|
+
- lib/ding_sdk/otp.rb
|
171
|
+
- lib/ding_sdk/sdkconfiguration.rb
|
172
|
+
- lib/ding_sdk/utils/metadata_fields.rb
|
173
|
+
- lib/ding_sdk/utils/utils.rb
|
165
174
|
homepage: https://github.com/speakeasy-api/openapi-generation
|
166
175
|
licenses:
|
167
176
|
- Apache-2.0
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
require 'sorbet-runtime'
|
7
|
-
require 'faraday'
|
8
|
-
require_relative '../shared/errorresponse'
|
9
|
-
require_relative '../shared/lookupresponse'
|
10
|
-
|
11
|
-
module DingSDK
|
12
|
-
module Operations
|
13
|
-
|
14
|
-
class LookupRequest < ::DingSDK::Utils::FieldAugmented
|
15
|
-
extend T::Sig
|
16
|
-
|
17
|
-
|
18
|
-
field :customer_uuid, String, { 'header': { 'field_name': 'customer-uuid', 'style': 'simple', 'explode': false } }
|
19
|
-
|
20
|
-
field :phone_number, String, { 'path_param': { 'field_name': 'phone_number', 'style': 'simple', 'explode': false } }
|
21
|
-
|
22
|
-
|
23
|
-
sig { params(customer_uuid: String, phone_number: String).void }
|
24
|
-
def initialize(customer_uuid: nil, phone_number: nil)
|
25
|
-
@customer_uuid = customer_uuid
|
26
|
-
@phone_number = phone_number
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
|
31
|
-
class LookupResponse < ::DingSDK::Utils::FieldAugmented
|
32
|
-
extend T::Sig
|
33
|
-
|
34
|
-
# HTTP response content type for this operation
|
35
|
-
field :content_type, String
|
36
|
-
# Raw HTTP response; suitable for custom response parsing
|
37
|
-
field :raw_response, Faraday::Response
|
38
|
-
# HTTP response status code for this operation
|
39
|
-
field :status_code, Integer
|
40
|
-
# Bad Request
|
41
|
-
field :error_response, T.nilable(Shared::ErrorResponse)
|
42
|
-
# OK
|
43
|
-
field :lookup_response, T.nilable(Shared::LookupResponse)
|
44
|
-
|
45
|
-
|
46
|
-
sig { params(content_type: String, raw_response: Faraday::Response, status_code: Integer, error_response: T.nilable(Shared::ErrorResponse), lookup_response: T.nilable(Shared::LookupResponse)).void }
|
47
|
-
def initialize(content_type: nil, raw_response: nil, status_code: nil, error_response: nil, lookup_response: nil)
|
48
|
-
@content_type = content_type
|
49
|
-
@raw_response = raw_response
|
50
|
-
@status_code = status_code
|
51
|
-
@error_response = error_response
|
52
|
-
@lookup_response = lookup_response
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
@@ -1,65 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
require 'sorbet-runtime'
|
7
|
-
require 'faraday'
|
8
|
-
|
9
|
-
module DingSDK
|
10
|
-
module Shared
|
11
|
-
# DeviceType - The type of device the user is using.
|
12
|
-
class DeviceType < T::Enum
|
13
|
-
enums do
|
14
|
-
IOS = new('IOS')
|
15
|
-
ANDROID = new('ANDROID')
|
16
|
-
WEB = new('WEB')
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
class CreateAuthenticationRequest < ::DingSDK::Utils::FieldAugmented
|
23
|
-
extend T::Sig
|
24
|
-
|
25
|
-
# Your customer UUID, which can be found in the API settings in the dashboard.
|
26
|
-
field :customer_uuid, String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('customer_uuid') } }
|
27
|
-
# An E.164 formatted phone number to send the OTP to.
|
28
|
-
field :phone_number, String, { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('phone_number') } }
|
29
|
-
# The Android SMS Retriever API hash code that identifies your app. This allows you to automatically retrieve and fill the OTP code on Android devices.
|
30
|
-
field :app_realm, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('app_realm') } }
|
31
|
-
# The version of your application.
|
32
|
-
field :app_version, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('app_version') } }
|
33
|
-
# A webhook URL to which delivery statuses will be sent.
|
34
|
-
field :callback_url, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('callback_url') } }
|
35
|
-
# Unique identifier for the user's device. For Android, this corresponds to the `ANDROID_ID` and for iOS, this corresponds to the `identifierForVendor`.
|
36
|
-
field :device_id, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('device_id') } }
|
37
|
-
# The model of the user's device.
|
38
|
-
field :device_model, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('device_model') } }
|
39
|
-
# The type of device the user is using.
|
40
|
-
field :device_type, T.nilable(Shared::DeviceType), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('device_type'), 'decoder': Utils.enum_from_string(Shared::DeviceType, true) } }
|
41
|
-
# The IP address of the user's device.
|
42
|
-
field :ip, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('ip') } }
|
43
|
-
# Whether the user is a returning user on your app.
|
44
|
-
field :is_returning_user, T.nilable(T::Boolean), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('is_returning_user') } }
|
45
|
-
# The version of the user's device operating system.
|
46
|
-
field :os_version, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('os_version') } }
|
47
|
-
|
48
|
-
|
49
|
-
sig { params(customer_uuid: String, phone_number: String, app_realm: T.nilable(String), app_version: T.nilable(String), callback_url: T.nilable(String), device_id: T.nilable(String), device_model: T.nilable(String), device_type: T.nilable(Shared::DeviceType), ip: T.nilable(String), is_returning_user: T.nilable(T::Boolean), os_version: T.nilable(String)).void }
|
50
|
-
def initialize(customer_uuid: nil, phone_number: nil, app_realm: nil, app_version: nil, callback_url: nil, device_id: nil, device_model: nil, device_type: nil, ip: nil, is_returning_user: nil, os_version: nil)
|
51
|
-
@customer_uuid = customer_uuid
|
52
|
-
@phone_number = phone_number
|
53
|
-
@app_realm = app_realm
|
54
|
-
@app_version = app_version
|
55
|
-
@callback_url = callback_url
|
56
|
-
@device_id = device_id
|
57
|
-
@device_model = device_model
|
58
|
-
@device_type = device_type
|
59
|
-
@ip = ip
|
60
|
-
@is_returning_user = is_returning_user
|
61
|
-
@os_version = os_version
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
@@ -1,52 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
require 'sorbet-runtime'
|
7
|
-
require 'faraday'
|
8
|
-
|
9
|
-
module DingSDK
|
10
|
-
module Shared
|
11
|
-
# Status - The status of the authentication. Possible values are:
|
12
|
-
# * `pending` - The OTP code is being sent.
|
13
|
-
# * `rate_limited` - This user is rate-limited and cannot receive another code.
|
14
|
-
# * `spam_detected` - This attempt is flagged as spam. Go to the dashboard for more details.
|
15
|
-
#
|
16
|
-
class Status < T::Enum
|
17
|
-
enums do
|
18
|
-
PENDING = new('pending')
|
19
|
-
RATE_LIMITED = new('rate_limited')
|
20
|
-
SPAM_DETECTED = new('spam_detected')
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
|
25
|
-
# A successful response to an authentication creation request.
|
26
|
-
class CreateAuthenticationResponse < ::DingSDK::Utils::FieldAugmented
|
27
|
-
extend T::Sig
|
28
|
-
|
29
|
-
# A unique identifier for the authentication that you can use on the /check and /retry endpoints.
|
30
|
-
field :authentication_uuid, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
|
31
|
-
|
32
|
-
field :created_at, T.nilable(DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('created_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
|
33
|
-
# The time at which the authentication expires and can no longer be checked or retried.
|
34
|
-
field :expires_at, T.nilable(DateTime), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('expires_at'), 'decoder': Utils.datetime_from_iso_format(true) } }
|
35
|
-
# The status of the authentication. Possible values are:
|
36
|
-
# * `pending` - The OTP code is being sent.
|
37
|
-
# * `rate_limited` - This user is rate-limited and cannot receive another code.
|
38
|
-
# * `spam_detected` - This attempt is flagged as spam. Go to the dashboard for more details.
|
39
|
-
#
|
40
|
-
field :status, T.nilable(Shared::Status), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Shared::Status, true) } }
|
41
|
-
|
42
|
-
|
43
|
-
sig { params(authentication_uuid: T.nilable(String), created_at: T.nilable(DateTime), expires_at: T.nilable(DateTime), status: T.nilable(Shared::Status)).void }
|
44
|
-
def initialize(authentication_uuid: nil, created_at: nil, expires_at: nil, status: nil)
|
45
|
-
@authentication_uuid = authentication_uuid
|
46
|
-
@created_at = created_at
|
47
|
-
@expires_at = expires_at
|
48
|
-
@status = status
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
@@ -1,55 +0,0 @@
|
|
1
|
-
# Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
2
|
-
|
3
|
-
# typed: true
|
4
|
-
# frozen_string_literal: true
|
5
|
-
|
6
|
-
require 'sorbet-runtime'
|
7
|
-
require 'faraday'
|
8
|
-
|
9
|
-
module DingSDK
|
10
|
-
module Shared
|
11
|
-
# CreateCheckResponseStatus - The status of the check. Possible values are:
|
12
|
-
# * `valid` - The code is valid.
|
13
|
-
# * `invalid` - The code is invalid.
|
14
|
-
# * `without_attempt` - No attempt was sent yet, so a check cannot be completed.
|
15
|
-
# * `rate_limited` - The authentication was rate limited and cannot be checked.
|
16
|
-
# * `already_validated` - The authentication has already been validated.
|
17
|
-
# * `expired_auth` - The authentication has expired and cannot be checked.
|
18
|
-
#
|
19
|
-
class CreateCheckResponseStatus < T::Enum
|
20
|
-
enums do
|
21
|
-
VALID = new('valid')
|
22
|
-
INVALID = new('invalid')
|
23
|
-
WITHOUT_ATTEMPT = new('without_attempt')
|
24
|
-
RATE_LIMITED = new('rate_limited')
|
25
|
-
ALREADY_VALIDATED = new('already_validated')
|
26
|
-
EXPIRED_AUTH = new('expired_auth')
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
class CreateCheckResponse < ::DingSDK::Utils::FieldAugmented
|
33
|
-
extend T::Sig
|
34
|
-
|
35
|
-
# The UUID of the corresponding authentication.
|
36
|
-
field :authentication_uuid, T.nilable(String), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('authentication_uuid') } }
|
37
|
-
# The status of the check. Possible values are:
|
38
|
-
# * `valid` - The code is valid.
|
39
|
-
# * `invalid` - The code is invalid.
|
40
|
-
# * `without_attempt` - No attempt was sent yet, so a check cannot be completed.
|
41
|
-
# * `rate_limited` - The authentication was rate limited and cannot be checked.
|
42
|
-
# * `already_validated` - The authentication has already been validated.
|
43
|
-
# * `expired_auth` - The authentication has expired and cannot be checked.
|
44
|
-
#
|
45
|
-
field :status, T.nilable(Shared::CreateCheckResponseStatus), { 'format_json': { 'letter_case': ::DingSDK::Utils.field_name('status'), 'decoder': Utils.enum_from_string(Shared::CreateCheckResponseStatus, true) } }
|
46
|
-
|
47
|
-
|
48
|
-
sig { params(authentication_uuid: T.nilable(String), status: T.nilable(Shared::CreateCheckResponseStatus)).void }
|
49
|
-
def initialize(authentication_uuid: nil, status: nil)
|
50
|
-
@authentication_uuid = authentication_uuid
|
51
|
-
@status = status
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|