twilio-ruby 7.8.1 → 7.8.2
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/CHANGES.md +7 -0
- data/README.md +2 -2
- data/lib/twilio-ruby/rest/api/v2010/account/conference/participant.rb +5 -2
- data/lib/twilio-ruby/rest/client.rb +5 -0
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge/chunk.rb +232 -0
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge/knowledge_status.rb +213 -0
- data/lib/twilio-ruby/rest/knowledge/v1/knowledge.rb +623 -0
- data/lib/twilio-ruby/rest/knowledge/v1.rb +49 -0
- data/lib/twilio-ruby/rest/knowledge.rb +6 -0
- data/lib/twilio-ruby/rest/knowledge_base.rb +38 -0
- data/lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb +140 -0
- data/lib/twilio-ruby/rest/messaging/v2.rb +6 -0
- data/lib/twilio-ruby/rest/numbers/v1/porting_port_in.rb +93 -5
- data/lib/twilio-ruby/rest/oauth/v2/token.rb +2 -2
- data/lib/twilio-ruby/rest/verify/v2/service/approve_challenge.rb +312 -0
- data/lib/twilio-ruby/rest/verify/v2/{new_challenge.rb → service/new_challenge.rb} +9 -4
- data/lib/twilio-ruby/rest/verify/v2/service/new_factor.rb +171 -1
- data/lib/twilio-ruby/rest/verify/v2/service.rb +49 -12
- data/lib/twilio-ruby/rest/verify/v2.rb +0 -15
- data/lib/twilio-ruby/version.rb +1 -1
- metadata +11 -3
@@ -17,7 +17,9 @@ module Twilio
|
|
17
17
|
module REST
|
18
18
|
class Verify < VerifyBase
|
19
19
|
class V2 < Version
|
20
|
-
class
|
20
|
+
class ServiceContext < InstanceContext
|
21
|
+
|
22
|
+
class NewChallengeList < ListResource
|
21
23
|
|
22
24
|
class CreatePasskeysChallengeRequest
|
23
25
|
# @param [identity]: [String]
|
@@ -40,10 +42,10 @@ module Twilio
|
|
40
42
|
# Initialize the NewChallengeList
|
41
43
|
# @param [Version] version Version that contains the resource
|
42
44
|
# @return [NewChallengeList] NewChallengeList
|
43
|
-
def initialize(version)
|
45
|
+
def initialize(version, service_sid: nil)
|
44
46
|
super(version)
|
45
47
|
# Path Solution
|
46
|
-
@solution = {
|
48
|
+
@solution = { service_sid: service_sid }
|
47
49
|
|
48
50
|
|
49
51
|
end
|
@@ -128,7 +130,7 @@ module Twilio
|
|
128
130
|
# @param [Hash] payload Payload response from the API
|
129
131
|
# @return [NewChallengeInstance] NewChallengeInstance
|
130
132
|
def get_instance(payload)
|
131
|
-
NewChallengeInstance.new(@version, payload)
|
133
|
+
NewChallengeInstance.new(@version, payload, service_sid: @solution[:service_sid])
|
132
134
|
end
|
133
135
|
|
134
136
|
##
|
@@ -329,7 +331,10 @@ module Twilio
|
|
329
331
|
end
|
330
332
|
end
|
331
333
|
|
334
|
+
end
|
332
335
|
end
|
333
336
|
end
|
334
337
|
end
|
335
338
|
end
|
339
|
+
|
340
|
+
|
@@ -81,6 +81,155 @@ module Twilio
|
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
+
class VerifyPasskeysFactorRequest
|
85
|
+
# @param [id]: [String] A [base64url](https://base64.guru/standards/base64url) encoded representation of `rawId`.
|
86
|
+
# @param [raw_id]: [String] The globally unique identifier for this `PublicKeyCredential`.
|
87
|
+
# @param [authenticator_attachment]: [String] A string that indicates the mechanism by which the WebAuthn implementation is attached to the authenticator at the time the associated `navigator.credentials.create()` or `navigator.credentials.get()` call completes.
|
88
|
+
# @param [type]: [String] The valid credential types supported by the API. The values of this enumeration are used for versioning the `AuthenticatorAssertion` and `AuthenticatorAttestation` structures according to the type of the authenticator.
|
89
|
+
# @param [response]: [NewFactorList.VerifyPasskeysFactorRequestResponse]
|
90
|
+
attr_accessor :id, :raw_id, :authenticator_attachment, :type, :response
|
91
|
+
def initialize(payload)
|
92
|
+
@id = payload["id"]
|
93
|
+
@raw_id = payload["raw_id"]
|
94
|
+
@authenticator_attachment = payload["authenticator_attachment"]
|
95
|
+
@type = payload["type"]
|
96
|
+
@response = payload["response"]
|
97
|
+
end
|
98
|
+
def to_json(options = {})
|
99
|
+
{
|
100
|
+
"id": @id,
|
101
|
+
"rawId": @raw_id,
|
102
|
+
"authenticatorAttachment": @authenticator_attachment,
|
103
|
+
"type": @type,
|
104
|
+
"response": @response,
|
105
|
+
}.to_json(options)
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
class VerifyPasskeysFactorRequestResponse
|
110
|
+
# @param [attestation_object]: [String] The authenticator data and an attestation statement for a new key pair generated by the authenticator.
|
111
|
+
# @param [client_data_json]: [String] This property contains the JSON-compatible serialization of the data passed from the browser to the authenticator in order to generate this credential.
|
112
|
+
# @param [transports]: [Array<String>] An array of strings providing hints as to the methods the client could use to communicate with the relevant authenticator of the public key credential to retrieve.
|
113
|
+
attr_accessor :attestation_object, :client_data_json, :transports
|
114
|
+
def initialize(payload)
|
115
|
+
@attestation_object = payload["attestation_object"]
|
116
|
+
@client_data_json = payload["client_data_json"]
|
117
|
+
@transports = payload["transports"]
|
118
|
+
end
|
119
|
+
def to_json(options = {})
|
120
|
+
{
|
121
|
+
"attestationObject": @attestation_object,
|
122
|
+
"clientDataJSON": @client_data_json,
|
123
|
+
"transports": @transports,
|
124
|
+
}.to_json(options)
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
|
129
|
+
class CreateNewPasskeysFactorRequest
|
130
|
+
# @param [friendly_name]: [String]
|
131
|
+
# @param [identity]: [String]
|
132
|
+
# @param [config]: [NewFactorList.CreateNewPasskeysFactorRequestConfig]
|
133
|
+
attr_accessor :friendly_name, :identity, :config
|
134
|
+
def initialize(payload)
|
135
|
+
@friendly_name = payload["friendly_name"]
|
136
|
+
@identity = payload["identity"]
|
137
|
+
@config = payload["config"]
|
138
|
+
end
|
139
|
+
def to_json(options = {})
|
140
|
+
{
|
141
|
+
"friendly_name": @friendly_name,
|
142
|
+
"identity": @identity,
|
143
|
+
"config": @config,
|
144
|
+
}.to_json(options)
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
class CreateNewPasskeysFactorRequestConfig
|
149
|
+
# @param [relying_party]: [NewFactorList.CreateNewPasskeysFactorRequestConfigRelyingParty]
|
150
|
+
# @param [authenticator_attachment]: [String]
|
151
|
+
# @param [discoverable_credentials]: [String]
|
152
|
+
# @param [user_verification]: [String]
|
153
|
+
attr_accessor :relying_party, :authenticator_attachment, :discoverable_credentials, :user_verification
|
154
|
+
def initialize(payload)
|
155
|
+
@relying_party = payload["relying_party"]
|
156
|
+
@authenticator_attachment = payload["authenticator_attachment"]
|
157
|
+
@discoverable_credentials = payload["discoverable_credentials"]
|
158
|
+
@user_verification = payload["user_verification"]
|
159
|
+
end
|
160
|
+
def to_json(options = {})
|
161
|
+
{
|
162
|
+
"relying_party": @relying_party,
|
163
|
+
"authenticator_attachment": @authenticator_attachment,
|
164
|
+
"discoverable_credentials": @discoverable_credentials,
|
165
|
+
"user_verification": @user_verification,
|
166
|
+
}.to_json(options)
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
class CreateNewPasskeysFactorRequestConfigRelyingParty
|
171
|
+
# @param [id]: [String]
|
172
|
+
# @param [name]: [String]
|
173
|
+
# @param [origins]: [Array<String>]
|
174
|
+
attr_accessor :id, :name, :origins
|
175
|
+
def initialize(payload)
|
176
|
+
@id = payload["id"]
|
177
|
+
@name = payload["name"]
|
178
|
+
@origins = payload["origins"]
|
179
|
+
end
|
180
|
+
def to_json(options = {})
|
181
|
+
{
|
182
|
+
"id": @id,
|
183
|
+
"name": @name,
|
184
|
+
"origins": @origins,
|
185
|
+
}.to_json(options)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
class VerifyPasskeysFactorRequest
|
190
|
+
# @param [id]: [String] A [base64url](https://base64.guru/standards/base64url) encoded representation of `rawId`.
|
191
|
+
# @param [raw_id]: [String] The globally unique identifier for this `PublicKeyCredential`.
|
192
|
+
# @param [authenticator_attachment]: [String] A string that indicates the mechanism by which the WebAuthn implementation is attached to the authenticator at the time the associated `navigator.credentials.create()` or `navigator.credentials.get()` call completes.
|
193
|
+
# @param [type]: [String] The valid credential types supported by the API. The values of this enumeration are used for versioning the `AuthenticatorAssertion` and `AuthenticatorAttestation` structures according to the type of the authenticator.
|
194
|
+
# @param [response]: [NewFactorList.VerifyPasskeysFactorRequestResponse]
|
195
|
+
attr_accessor :id, :raw_id, :authenticator_attachment, :type, :response
|
196
|
+
def initialize(payload)
|
197
|
+
@id = payload["id"]
|
198
|
+
@raw_id = payload["raw_id"]
|
199
|
+
@authenticator_attachment = payload["authenticator_attachment"]
|
200
|
+
@type = payload["type"]
|
201
|
+
@response = payload["response"]
|
202
|
+
end
|
203
|
+
def to_json(options = {})
|
204
|
+
{
|
205
|
+
"id": @id,
|
206
|
+
"rawId": @raw_id,
|
207
|
+
"authenticatorAttachment": @authenticator_attachment,
|
208
|
+
"type": @type,
|
209
|
+
"response": @response,
|
210
|
+
}.to_json(options)
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
class VerifyPasskeysFactorRequestResponse
|
215
|
+
# @param [attestation_object]: [String] The authenticator data and an attestation statement for a new key pair generated by the authenticator.
|
216
|
+
# @param [client_data_json]: [String] This property contains the JSON-compatible serialization of the data passed from the browser to the authenticator in order to generate this credential.
|
217
|
+
# @param [transports]: [Array<String>] An array of strings providing hints as to the methods the client could use to communicate with the relevant authenticator of the public key credential to retrieve.
|
218
|
+
attr_accessor :attestation_object, :client_data_json, :transports
|
219
|
+
def initialize(payload)
|
220
|
+
@attestation_object = payload["attestation_object"]
|
221
|
+
@client_data_json = payload["client_data_json"]
|
222
|
+
@transports = payload["transports"]
|
223
|
+
end
|
224
|
+
def to_json(options = {})
|
225
|
+
{
|
226
|
+
"attestationObject": @attestation_object,
|
227
|
+
"clientDataJSON": @client_data_json,
|
228
|
+
"transports": @transports,
|
229
|
+
}.to_json(options)
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
84
233
|
|
85
234
|
##
|
86
235
|
# Initialize the NewFactorList
|
@@ -90,7 +239,7 @@ module Twilio
|
|
90
239
|
super(version)
|
91
240
|
# Path Solution
|
92
241
|
@solution = { service_sid: service_sid }
|
93
|
-
@uri = "/Services/#{@solution[:service_sid]}/Passkeys/
|
242
|
+
@uri = "/Services/#{@solution[:service_sid]}/Passkeys/VerifyFactor"
|
94
243
|
|
95
244
|
end
|
96
245
|
##
|
@@ -114,6 +263,27 @@ module Twilio
|
|
114
263
|
)
|
115
264
|
end
|
116
265
|
|
266
|
+
##
|
267
|
+
# Update the NewFactorInstance
|
268
|
+
# @param [VerifyPasskeysFactorRequest] verify_passkeys_factor_request
|
269
|
+
# @return [NewFactorInstance] Updated NewFactorInstance
|
270
|
+
def update(verify_passkeys_factor_request: nil
|
271
|
+
)
|
272
|
+
|
273
|
+
headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
|
274
|
+
headers['Content-Type'] = 'application/json'
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
payload = @version.update('POST', @uri, headers: headers, data: verify_passkeys_factor_request.to_json)
|
280
|
+
NewFactorInstance.new(
|
281
|
+
@version,
|
282
|
+
payload,
|
283
|
+
service_sid: @solution[:service_sid],
|
284
|
+
)
|
285
|
+
end
|
286
|
+
|
117
287
|
|
118
288
|
|
119
289
|
|
@@ -243,11 +243,13 @@ module Twilio
|
|
243
243
|
# Dependents
|
244
244
|
@verification_checks = nil
|
245
245
|
@new_factors = nil
|
246
|
-
@
|
246
|
+
@new_factors = nil
|
247
|
+
@approve_challenge = nil
|
247
248
|
@verifications = nil
|
248
249
|
@access_tokens = nil
|
249
250
|
@webhooks = nil
|
250
251
|
@messaging_configurations = nil
|
252
|
+
@new_challenge = nil
|
251
253
|
@entities = nil
|
252
254
|
@rate_limits = nil
|
253
255
|
end
|
@@ -406,15 +408,26 @@ module Twilio
|
|
406
408
|
@new_factors
|
407
409
|
end
|
408
410
|
##
|
409
|
-
# Access the
|
410
|
-
# @return [
|
411
|
-
# @return [
|
412
|
-
def
|
413
|
-
unless @
|
414
|
-
@
|
411
|
+
# Access the new_factors
|
412
|
+
# @return [NewFactorList]
|
413
|
+
# @return [NewFactorContext]
|
414
|
+
def new_factors
|
415
|
+
unless @new_factors
|
416
|
+
@new_factors = NewFactorList.new(
|
417
|
+
@version, )
|
418
|
+
end
|
419
|
+
@new_factors
|
420
|
+
end
|
421
|
+
##
|
422
|
+
# Access the approve_challenge
|
423
|
+
# @return [ApproveChallengeList]
|
424
|
+
# @return [ApproveChallengeContext]
|
425
|
+
def approve_challenge
|
426
|
+
unless @approve_challenge
|
427
|
+
@approve_challenge = ApproveChallengeList.new(
|
415
428
|
@version, )
|
416
429
|
end
|
417
|
-
@
|
430
|
+
@approve_challenge
|
418
431
|
end
|
419
432
|
##
|
420
433
|
# Access the verifications
|
@@ -493,6 +506,16 @@ module Twilio
|
|
493
506
|
@messaging_configurations
|
494
507
|
end
|
495
508
|
##
|
509
|
+
# Access the new_challenge
|
510
|
+
# @return [NewChallengeList]
|
511
|
+
# @return [NewChallengeContext]
|
512
|
+
def new_challenge
|
513
|
+
NewChallengeContext.new(
|
514
|
+
@version,
|
515
|
+
@solution[:sid]
|
516
|
+
)
|
517
|
+
end
|
518
|
+
##
|
496
519
|
# Access the entities
|
497
520
|
# @return [EntityList]
|
498
521
|
# @return [EntityContext] if sid was passed.
|
@@ -873,10 +896,17 @@ module Twilio
|
|
873
896
|
end
|
874
897
|
|
875
898
|
##
|
876
|
-
# Access the
|
877
|
-
# @return [
|
878
|
-
def
|
879
|
-
context.
|
899
|
+
# Access the new_factors
|
900
|
+
# @return [new_factors] new_factors
|
901
|
+
def new_factors
|
902
|
+
context.new_factors
|
903
|
+
end
|
904
|
+
|
905
|
+
##
|
906
|
+
# Access the approve_challenge
|
907
|
+
# @return [approve_challenge] approve_challenge
|
908
|
+
def approve_challenge
|
909
|
+
context.approve_challenge
|
880
910
|
end
|
881
911
|
|
882
912
|
##
|
@@ -907,6 +937,13 @@ module Twilio
|
|
907
937
|
context.messaging_configurations
|
908
938
|
end
|
909
939
|
|
940
|
+
##
|
941
|
+
# Access the new_challenge
|
942
|
+
# @return [new_challenge] new_challenge
|
943
|
+
def new_challenge
|
944
|
+
context.new_challenge
|
945
|
+
end
|
946
|
+
|
910
947
|
##
|
911
948
|
# Access the entities
|
912
949
|
# @return [entities] entities
|
@@ -22,7 +22,6 @@ module Twilio
|
|
22
22
|
super
|
23
23
|
@version = 'v2'
|
24
24
|
@forms = nil
|
25
|
-
@new_challenge = nil
|
26
25
|
@safelist = nil
|
27
26
|
@services = nil
|
28
27
|
@templates = nil
|
@@ -45,20 +44,6 @@ module Twilio
|
|
45
44
|
end
|
46
45
|
end
|
47
46
|
##
|
48
|
-
# @param [String] service_sid The unique SID identifier of the Service.
|
49
|
-
# @return [Twilio::REST::Verify::V2::NewChallengeContext] if serviceSid was passed.
|
50
|
-
# @return [Twilio::REST::Verify::V2::NewChallengeList]
|
51
|
-
def new_challenge(service_sid=:unset)
|
52
|
-
if service_sid.nil?
|
53
|
-
raise ArgumentError, 'service_sid cannot be nil'
|
54
|
-
end
|
55
|
-
if service_sid == :unset
|
56
|
-
@new_challenge ||= NewChallengeList.new self
|
57
|
-
else
|
58
|
-
NewChallengeContext.new(self, service_sid)
|
59
|
-
end
|
60
|
-
end
|
61
|
-
##
|
62
47
|
# @param [String] phone_number The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
|
63
48
|
# @return [Twilio::REST::Verify::V2::SafelistContext] if phoneNumber was passed.
|
64
49
|
# @return [Twilio::REST::Verify::V2::SafelistList]
|
data/lib/twilio-ruby/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twilio-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.8.
|
4
|
+
version: 7.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Twilio API Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-09-
|
11
|
+
date: 2025-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jwt
|
@@ -555,6 +555,12 @@ files:
|
|
555
555
|
- lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_binding.rb
|
556
556
|
- lib/twilio-ruby/rest/ip_messaging/v2/service/user/user_channel.rb
|
557
557
|
- lib/twilio-ruby/rest/ip_messaging_base.rb
|
558
|
+
- lib/twilio-ruby/rest/knowledge.rb
|
559
|
+
- lib/twilio-ruby/rest/knowledge/v1.rb
|
560
|
+
- lib/twilio-ruby/rest/knowledge/v1/knowledge.rb
|
561
|
+
- lib/twilio-ruby/rest/knowledge/v1/knowledge/chunk.rb
|
562
|
+
- lib/twilio-ruby/rest/knowledge/v1/knowledge/knowledge_status.rb
|
563
|
+
- lib/twilio-ruby/rest/knowledge_base.rb
|
558
564
|
- lib/twilio-ruby/rest/lookups.rb
|
559
565
|
- lib/twilio-ruby/rest/lookups/v1.rb
|
560
566
|
- lib/twilio-ruby/rest/lookups/v1/phone_number.rb
|
@@ -601,6 +607,7 @@ files:
|
|
601
607
|
- lib/twilio-ruby/rest/messaging/v1/usecase.rb
|
602
608
|
- lib/twilio-ruby/rest/messaging/v2.rb
|
603
609
|
- lib/twilio-ruby/rest/messaging/v2/channels_sender.rb
|
610
|
+
- lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb
|
604
611
|
- lib/twilio-ruby/rest/messaging_base.rb
|
605
612
|
- lib/twilio-ruby/rest/monitor.rb
|
606
613
|
- lib/twilio-ruby/rest/monitor/v1.rb
|
@@ -834,16 +841,17 @@ files:
|
|
834
841
|
- lib/twilio-ruby/rest/verify.rb
|
835
842
|
- lib/twilio-ruby/rest/verify/v2.rb
|
836
843
|
- lib/twilio-ruby/rest/verify/v2/form.rb
|
837
|
-
- lib/twilio-ruby/rest/verify/v2/new_challenge.rb
|
838
844
|
- lib/twilio-ruby/rest/verify/v2/safelist.rb
|
839
845
|
- lib/twilio-ruby/rest/verify/v2/service.rb
|
840
846
|
- lib/twilio-ruby/rest/verify/v2/service/access_token.rb
|
847
|
+
- lib/twilio-ruby/rest/verify/v2/service/approve_challenge.rb
|
841
848
|
- lib/twilio-ruby/rest/verify/v2/service/entity.rb
|
842
849
|
- lib/twilio-ruby/rest/verify/v2/service/entity/challenge.rb
|
843
850
|
- lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb
|
844
851
|
- lib/twilio-ruby/rest/verify/v2/service/entity/factor.rb
|
845
852
|
- lib/twilio-ruby/rest/verify/v2/service/entity/new_factor.rb
|
846
853
|
- lib/twilio-ruby/rest/verify/v2/service/messaging_configuration.rb
|
854
|
+
- lib/twilio-ruby/rest/verify/v2/service/new_challenge.rb
|
847
855
|
- lib/twilio-ruby/rest/verify/v2/service/new_factor.rb
|
848
856
|
- lib/twilio-ruby/rest/verify/v2/service/rate_limit.rb
|
849
857
|
- lib/twilio-ruby/rest/verify/v2/service/rate_limit/bucket.rb
|