telnyx 5.151.0 → 5.152.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.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -538
  3. data/README.md +1 -1
  4. data/lib/telnyx/models/advanced_order_create_params.rb +1 -86
  5. data/lib/telnyx/models/advanced_order_update_requirement_group_params.rb +1 -88
  6. data/lib/telnyx/models/dir/email_verification_status_wrapped.rb +82 -0
  7. data/lib/telnyx/models/dir/reference.rb +125 -0
  8. data/lib/telnyx/models/dir/reference_create_params.rb +43 -0
  9. data/lib/telnyx/models/dir/reference_input.rb +74 -0
  10. data/lib/telnyx/models/dir/reference_list.rb +18 -0
  11. data/lib/telnyx/models/dir/reference_list_params.rb +22 -0
  12. data/lib/telnyx/models/dir/reference_update_params.rb +103 -0
  13. data/lib/telnyx/models/dir/reference_update_response.rb +23 -0
  14. data/lib/telnyx/models/dir/verify_email_confirm_params.rb +31 -0
  15. data/lib/telnyx/models/dir/verify_email_create_params.rb +22 -0
  16. data/lib/telnyx/models/dir/verify_email_list_params.rb +22 -0
  17. data/lib/telnyx/models/dir_update_infringement_params.rb +6 -2
  18. data/lib/telnyx/models/enterprises/dir_create_params.rb +10 -10
  19. data/lib/telnyx/models/storage/kv_create_params.rb +24 -0
  20. data/lib/telnyx/models/storage/kv_delete_params.rb +22 -0
  21. data/lib/telnyx/models/storage/kv_list_params.rb +32 -0
  22. data/lib/telnyx/models/storage/kv_namespace.rb +75 -0
  23. data/lib/telnyx/models/storage/kv_namespace_response_wrapper.rb +18 -0
  24. data/lib/telnyx/models/storage/kv_retrieve_params.rb +22 -0
  25. data/lib/telnyx/models/storage/kvs/key_delete_params.rb +30 -0
  26. data/lib/telnyx/models/storage/kvs/key_list_params.rb +49 -0
  27. data/lib/telnyx/models/storage/kvs/key_list_response.rb +82 -0
  28. data/lib/telnyx/models/storage/kvs/key_retrieve_params.rb +30 -0
  29. data/lib/telnyx/models/storage/kvs/key_update_params.rb +53 -0
  30. data/lib/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_params.rb +31 -0
  31. data/lib/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_response.rb +54 -0
  32. data/lib/telnyx/resources/dir/references.rb +139 -0
  33. data/lib/telnyx/resources/dir/verify_email.rb +91 -0
  34. data/lib/telnyx/resources/dir.rb +17 -1
  35. data/lib/telnyx/resources/documents.rb +1 -1
  36. data/lib/telnyx/resources/enterprises/dir.rb +3 -3
  37. data/lib/telnyx/resources/storage/kvs/keys.rb +154 -0
  38. data/lib/telnyx/resources/storage/kvs.rb +115 -0
  39. data/lib/telnyx/resources/storage.rb +5 -0
  40. data/lib/telnyx/resources/whatsapp/phone_numbers.rb +27 -0
  41. data/lib/telnyx/version.rb +1 -1
  42. data/lib/telnyx.rb +28 -2
  43. data/rbi/telnyx/models/advanced_order_create_params.rbi +4 -198
  44. data/rbi/telnyx/models/advanced_order_update_requirement_group_params.rbi +2 -219
  45. data/rbi/telnyx/models/ai/assistant_get_texml_response.rbi +1 -1
  46. data/rbi/telnyx/models/ai/assistants/instruction_enhance_response.rbi +1 -1
  47. data/rbi/telnyx/models/dir/email_verification_status_wrapped.rbi +184 -0
  48. data/rbi/telnyx/models/dir/reference.rbi +162 -0
  49. data/rbi/telnyx/models/dir/reference_create_params.rbi +66 -0
  50. data/rbi/telnyx/models/dir/reference_input.rbi +93 -0
  51. data/rbi/telnyx/models/dir/reference_list.rbi +29 -0
  52. data/rbi/telnyx/models/dir/reference_list_params.rbi +37 -0
  53. data/rbi/telnyx/models/dir/reference_update_params.rbi +154 -0
  54. data/rbi/telnyx/models/dir/reference_update_response.rbi +39 -0
  55. data/rbi/telnyx/models/dir/verify_email_confirm_params.rbi +54 -0
  56. data/rbi/telnyx/models/dir/verify_email_create_params.rbi +40 -0
  57. data/rbi/telnyx/models/dir/verify_email_list_params.rbi +37 -0
  58. data/rbi/telnyx/models/dir_update_infringement_params.rbi +4 -2
  59. data/rbi/telnyx/models/enterprises/dir_create_params.rbi +10 -13
  60. data/rbi/telnyx/models/messaging_profiles/autoresp_config_delete_response.rbi +1 -1
  61. data/rbi/telnyx/models/storage/kv_create_params.rbi +42 -0
  62. data/rbi/telnyx/models/storage/kv_delete_params.rbi +37 -0
  63. data/rbi/telnyx/models/storage/kv_list_params.rbi +59 -0
  64. data/rbi/telnyx/models/storage/kv_namespace.rbi +131 -0
  65. data/rbi/telnyx/models/storage/kv_namespace_response_wrapper.rbi +35 -0
  66. data/rbi/telnyx/models/storage/kv_retrieve_params.rbi +37 -0
  67. data/rbi/telnyx/models/storage/kvs/key_delete_params.rbi +50 -0
  68. data/rbi/telnyx/models/storage/kvs/key_list_params.rbi +81 -0
  69. data/rbi/telnyx/models/storage/kvs/key_list_response.rbi +179 -0
  70. data/rbi/telnyx/models/storage/kvs/key_retrieve_params.rbi +50 -0
  71. data/rbi/telnyx/models/storage/kvs/key_update_params.rbi +77 -0
  72. data/rbi/telnyx/models/sub_number_orders_report_download_response.rbi +1 -1
  73. data/rbi/telnyx/models/telephony_credential_create_token_response.rbi +1 -1
  74. data/rbi/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_params.rbi +54 -0
  75. data/rbi/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_response.rbi +125 -0
  76. data/rbi/telnyx/models/wireguard_peer_retrieve_config_response.rbi +1 -1
  77. data/rbi/telnyx/resources/dir/references.rbi +114 -0
  78. data/rbi/telnyx/resources/dir/verify_email.rbi +70 -0
  79. data/rbi/telnyx/resources/dir.rbi +13 -1
  80. data/rbi/telnyx/resources/enterprises/dir.rbi +4 -4
  81. data/rbi/telnyx/resources/storage/kvs/keys.rbi +115 -0
  82. data/rbi/telnyx/resources/storage/kvs.rbi +87 -0
  83. data/rbi/telnyx/resources/storage.rbi +4 -0
  84. data/rbi/telnyx/resources/whatsapp/phone_numbers.rbi +21 -0
  85. data/sig/telnyx/models/advanced_order_create_params.rbs +3 -99
  86. data/sig/telnyx/models/advanced_order_update_requirement_group_params.rbs +3 -94
  87. data/sig/telnyx/models/dir/email_verification_status_wrapped.rbs +69 -0
  88. data/sig/telnyx/models/dir/reference.rbs +88 -0
  89. data/sig/telnyx/models/dir/reference_create_params.rbs +38 -0
  90. data/sig/telnyx/models/dir/reference_input.rbs +52 -0
  91. data/sig/telnyx/models/dir/reference_list.rbs +15 -0
  92. data/sig/telnyx/models/dir/reference_list_params.rbs +25 -0
  93. data/sig/telnyx/models/dir/reference_update_params.rbs +92 -0
  94. data/sig/telnyx/models/dir/reference_update_response.rbs +15 -0
  95. data/sig/telnyx/models/dir/verify_email_confirm_params.rbs +30 -0
  96. data/sig/telnyx/models/dir/verify_email_create_params.rbs +25 -0
  97. data/sig/telnyx/models/dir/verify_email_list_params.rbs +25 -0
  98. data/sig/telnyx/models/enterprises/dir_create_params.rbs +5 -7
  99. data/sig/telnyx/models/storage/kv_create_params.rbs +25 -0
  100. data/sig/telnyx/models/storage/kv_delete_params.rbs +22 -0
  101. data/sig/telnyx/models/storage/kv_list_params.rbs +34 -0
  102. data/sig/telnyx/models/storage/kv_namespace.rbs +80 -0
  103. data/sig/telnyx/models/storage/kv_namespace_response_wrapper.rbs +20 -0
  104. data/sig/telnyx/models/storage/kv_retrieve_params.rbs +22 -0
  105. data/sig/telnyx/models/storage/kvs/key_delete_params.rbs +32 -0
  106. data/sig/telnyx/models/storage/kvs/key_list_params.rbs +46 -0
  107. data/sig/telnyx/models/storage/kvs/key_list_response.rbs +88 -0
  108. data/sig/telnyx/models/storage/kvs/key_retrieve_params.rbs +32 -0
  109. data/sig/telnyx/models/storage/kvs/key_update_params.rbs +47 -0
  110. data/sig/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_params.rbs +30 -0
  111. data/sig/telnyx/models/whatsapp/phone_number_retrieve_conversation_window_response.rbs +66 -0
  112. data/sig/telnyx/resources/dir/references.rbs +35 -0
  113. data/sig/telnyx/resources/dir/verify_email.rbs +25 -0
  114. data/sig/telnyx/resources/dir.rbs +4 -0
  115. data/sig/telnyx/resources/enterprises/dir.rbs +1 -1
  116. data/sig/telnyx/resources/storage/kvs/keys.rbs +39 -0
  117. data/sig/telnyx/resources/storage/kvs.rbs +32 -0
  118. data/sig/telnyx/resources/storage.rbs +2 -0
  119. data/sig/telnyx/resources/whatsapp/phone_numbers.rbs +6 -0
  120. metadata +85 -1
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Telnyx
4
4
  module Models
5
- WireguardPeerRetrieveConfigResponse = String
5
+ WireguardPeerRetrieveConfigResponse = T.type_alias { String }
6
6
  end
7
7
  end
@@ -0,0 +1,114 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Resources
5
+ class Dir
6
+ # Submit and manage the two business references and one financial reference that
7
+ # vouch for a DIR. References are contacted to confirm the business identity
8
+ # during vetting.
9
+ class References
10
+ # Submit the two business references and one financial reference for a DIR.
11
+ #
12
+ # The DIR's authorizer email must be verified first (see the email-verification
13
+ # endpoint). Until it is, this returns `409` and no references are stored.
14
+ #
15
+ # The request body carries exactly two business references plus one financial
16
+ # reference. On success the references are stored and the response echoes them in
17
+ # the same shape as the GET. Submitting again converges on the already-stored
18
+ # references rather than erroring.
19
+ sig do
20
+ params(
21
+ dir_id: String,
22
+ business_references: T::Array[Telnyx::Dir::ReferenceInput::OrHash],
23
+ financial_reference: Telnyx::Dir::ReferenceInput::OrHash,
24
+ request_options: Telnyx::RequestOptions::OrHash
25
+ ).returns(Telnyx::Dir::ReferenceList)
26
+ end
27
+ def create(
28
+ # The DIR id. Lowercase UUID.
29
+ dir_id,
30
+ # Exactly two business references.
31
+ business_references:,
32
+ # One reference supplied at submit. The reference type is implied by the field
33
+ # that carries it (business_references vs financial_reference).
34
+ financial_reference:,
35
+ request_options: {}
36
+ )
37
+ end
38
+
39
+ # Partially update one reference, addressed by the DIR id plus the reference's
40
+ # type (business or financial) and slot.
41
+ #
42
+ # Cosmetic fields (full name, job title, organization, relationship, email) are
43
+ # always editable. The phone number and timezone may only be changed while a
44
+ # scheduled call has not yet been dialed; if a call is in progress or all attempts
45
+ # are complete, those fields are locked. Changing the timezone reschedules any
46
+ # pending call into the new local calling window.
47
+ sig do
48
+ params(
49
+ slot: Integer,
50
+ dir_id: String,
51
+ ref_type: Telnyx::Dir::ReferenceUpdateParams::RefType::OrSymbol,
52
+ email: String,
53
+ full_name: String,
54
+ job_title: T.nilable(String),
55
+ organization: T.nilable(String),
56
+ phone_e164: String,
57
+ relationship_to_registrant: T.nilable(String),
58
+ timezone: String,
59
+ request_options: Telnyx::RequestOptions::OrHash
60
+ ).returns(Telnyx::Models::Dir::ReferenceUpdateResponse)
61
+ end
62
+ def update(
63
+ # Path param: Reference slot. Business references use slots 0 and 1; the financial
64
+ # reference uses slot 0.
65
+ slot,
66
+ # Path param: The DIR id. Lowercase UUID.
67
+ dir_id:,
68
+ # Path param: Reference type to address.
69
+ ref_type:,
70
+ # Body param: Reference contact email address.
71
+ email: nil,
72
+ # Body param: Full name of the reference contact.
73
+ full_name: nil,
74
+ # Body param: Job title of the reference contact.
75
+ job_title: nil,
76
+ # Body param: Organization the reference contact belongs to.
77
+ organization: nil,
78
+ # Body param: Reference phone number in E.164 format.
79
+ phone_e164: nil,
80
+ # Body param: How the reference contact is related to the registering business.
81
+ relationship_to_registrant: nil,
82
+ # Body param: IANA timezone id for the reference.
83
+ timezone: nil,
84
+ request_options: {}
85
+ )
86
+ end
87
+
88
+ # List the business and financial references submitted for a DIR.
89
+ #
90
+ # Returns the two business references (slots 0 and 1) followed by the single
91
+ # financial reference. Each entry carries only the customer-supplied details
92
+ # (name, title, organization, relationship, phone, email, timezone). Returns an
93
+ # empty list when no references were submitted.
94
+ sig do
95
+ params(
96
+ dir_id: String,
97
+ request_options: Telnyx::RequestOptions::OrHash
98
+ ).returns(Telnyx::Dir::ReferenceList)
99
+ end
100
+ def list(
101
+ # The DIR id. Lowercase UUID.
102
+ dir_id,
103
+ request_options: {}
104
+ )
105
+ end
106
+
107
+ # @api private
108
+ sig { params(client: Telnyx::Client).returns(T.attached_class) }
109
+ def self.new(client:)
110
+ end
111
+ end
112
+ end
113
+ end
114
+ end
@@ -0,0 +1,70 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Resources
5
+ class Dir
6
+ # Verify ownership of a DIR's authorizer email. A short code is emailed and
7
+ # confirmed; the email must be verified before references can be submitted.
8
+ class VerifyEmail
9
+ # Email a 6-digit code to the DIR's authorizer email to confirm ownership of that
10
+ # address.
11
+ #
12
+ # The code expires in 15 minutes. Requesting a new code invalidates any previous
13
+ # one. Resends are rate limited (a short cooldown plus a daily cap). Submit the
14
+ # code to `POST /dir/{dir_id}/verify_email/confirm`.
15
+ sig do
16
+ params(
17
+ dir_id: String,
18
+ request_options: Telnyx::RequestOptions::OrHash
19
+ ).returns(Telnyx::Dir::EmailVerificationStatusWrapped)
20
+ end
21
+ def create(
22
+ # The DIR id. Lowercase UUID.
23
+ dir_id,
24
+ request_options: {}
25
+ )
26
+ end
27
+
28
+ # Whether the DIR's current authorizer email has been verified.
29
+ sig do
30
+ params(
31
+ dir_id: String,
32
+ request_options: Telnyx::RequestOptions::OrHash
33
+ ).returns(Telnyx::Dir::EmailVerificationStatusWrapped)
34
+ end
35
+ def list(
36
+ # The DIR id. Lowercase UUID.
37
+ dir_id,
38
+ request_options: {}
39
+ )
40
+ end
41
+
42
+ # Submit the 6-digit code that was emailed to the DIR's authorizer email. On
43
+ # success the authorizer email is marked verified.
44
+ #
45
+ # For security, any failure (wrong, expired, already-used, or too many attempts)
46
+ # returns the same generic message.
47
+ sig do
48
+ params(
49
+ dir_id: String,
50
+ code: String,
51
+ request_options: Telnyx::RequestOptions::OrHash
52
+ ).returns(Telnyx::Dir::EmailVerificationStatusWrapped)
53
+ end
54
+ def confirm(
55
+ # The DIR id. Lowercase UUID.
56
+ dir_id,
57
+ # The 6-digit code sent to the authorizer email.
58
+ code:,
59
+ request_options: {}
60
+ )
61
+ end
62
+
63
+ # @api private
64
+ sig { params(client: Telnyx::Client).returns(T.attached_class) }
65
+ def self.new(client:)
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
@@ -18,6 +18,17 @@ module Telnyx
18
18
  sig { returns(Telnyx::Resources::Dir::PhoneNumbers) }
19
19
  attr_reader :phone_numbers
20
20
 
21
+ # Submit and manage the two business references and one financial reference that
22
+ # vouch for a DIR. References are contacted to confirm the business identity
23
+ # during vetting.
24
+ sig { returns(Telnyx::Resources::Dir::References) }
25
+ attr_reader :references
26
+
27
+ # Verify ownership of a DIR's authorizer email. A short code is emailed and
28
+ # confirmed; the email must be verified before references can be submitted.
29
+ sig { returns(Telnyx::Resources::Dir::VerifyEmail) }
30
+ attr_reader :verify_email
31
+
21
32
  # Returns a single DIR by id. The enterprise is resolved server-side from the DIR
22
33
  # id. Returns `404` if the DIR does not exist or is not yours.
23
34
  sig do
@@ -294,7 +305,8 @@ module Telnyx
294
305
  infringement_resolution_notes:,
295
306
  call_reasons: nil,
296
307
  display_name: nil,
297
- # Append-only supporting documents.
308
+ # Append-only supporting documents to attach while resolving the claim (e.g.
309
+ # authorization or licensing proof).
298
310
  documents: nil,
299
311
  # Publicly accessible HTTPS URL (max 128 chars) to a 256x256 BMP logo (max 1 MB).
300
312
  logo_url: nil,
@@ -36,6 +36,7 @@ module Telnyx
36
36
  enterprise_id: String,
37
37
  authorizer_email: String,
38
38
  authorizer_name: String,
39
+ call_reasons: T::Array[String],
39
40
  certify_brand_is_accurate:
40
41
  Telnyx::Enterprises::DirCreateParams::CertifyBrandIsAccurate::OrBoolean,
41
42
  certify_ip_ownership:
@@ -43,7 +44,6 @@ module Telnyx
43
44
  certify_no_shaft_content:
44
45
  Telnyx::Enterprises::DirCreateParams::CertifyNoShaftContent::OrBoolean,
45
46
  display_name: String,
46
- call_reasons: T::Array[String],
47
47
  documents: T::Array[Telnyx::Document::OrHash],
48
48
  logo_url: String,
49
49
  reselling: T::Boolean,
@@ -59,6 +59,9 @@ module Telnyx
59
59
  # Name of the person at your enterprise who is authorizing this DIR registration.
60
60
  # Must be a real individual (used for audit and trademark-claim contests).
61
61
  authorizer_name:,
62
+ # 1–10 reasons your business calls customers. Validate phrasing against
63
+ # `POST /call_reasons/validate`.
64
+ call_reasons:,
62
65
  # Must be `true`.
63
66
  certify_brand_is_accurate:,
64
67
  # Must be `true`. Confirms ownership of any logos/trademarks shown.
@@ -68,9 +71,6 @@ module Telnyx
68
71
  certify_no_shaft_content:,
69
72
  # Name shown to call recipients. No emoji; not whitespace-only.
70
73
  display_name:,
71
- # 1–10 reasons your business calls customers. Validate phrasing against
72
- # `POST /call_reasons/validate`.
73
- call_reasons: nil,
74
74
  # Supporting documents. Each `document_id` may appear at most once on a DIR.
75
75
  documents: nil,
76
76
  # Publicly accessible HTTPS URL (max 128 chars) to a 256x256 BMP logo (max 1 MB).
@@ -0,0 +1,115 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Resources
5
+ class Storage
6
+ class Kvs
7
+ # Read and write keys within a KV namespace
8
+ class Keys
9
+ # Returns the raw stored value for a key. The response body is the value exactly
10
+ # as it was written; the `Content-Type` header echoes the value's stored content
11
+ # type (defaults to `application/octet-stream`).
12
+ sig do
13
+ params(
14
+ key: String,
15
+ id: String,
16
+ request_options: Telnyx::RequestOptions::OrHash
17
+ ).returns(StringIO)
18
+ end
19
+ def retrieve(
20
+ # Key name. Allowed characters: `a-z A-Z 0-9 - _ / = .`; maximum 256 characters;
21
+ # names starting with `_` are reserved for system use. May contain `/`; URL-encode
22
+ # it so the whole string is treated as one key (for example `user/1` ->
23
+ # `user%2F1`).
24
+ key,
25
+ # KV namespace ID
26
+ id:,
27
+ request_options: {}
28
+ )
29
+ end
30
+
31
+ # Creates or replaces the value for a key. The request body is stored verbatim as
32
+ # the value — no base64, no JSON envelope — up to 1 MiB. The request's
33
+ # `Content-Type` header is stored with the value and echoed back on retrieval.
34
+ # Returns `201` when the key is created and `200` when an existing key is updated.
35
+ sig do
36
+ params(
37
+ key: String,
38
+ id: String,
39
+ body: Telnyx::Internal::FileInput,
40
+ ttl_secs: Integer,
41
+ request_options: Telnyx::RequestOptions::OrHash
42
+ ).void
43
+ end
44
+ def update(
45
+ # Path param: Key name. Allowed characters: `a-z A-Z 0-9 - _ / = .`; maximum 256
46
+ # characters; names starting with `_` are reserved for system use. May contain
47
+ # `/`; URL-encode it so the whole string is treated as one key (for example
48
+ # `user/1` -> `user%2F1`).
49
+ key,
50
+ # Path param: KV namespace ID
51
+ id:,
52
+ # Body param: Raw value bytes, stored verbatim.
53
+ body:,
54
+ # Query param: Time-to-live in seconds. When set, the key expires and is deleted
55
+ # after this duration. Requires a namespace provisioned with TTL support;
56
+ # namespaces without it return a `409`.
57
+ ttl_secs: nil,
58
+ request_options: {}
59
+ )
60
+ end
61
+
62
+ # Lists the keys in a namespace. Returns key names and metadata only, never
63
+ # values. Results are paginated with `limit` and an opaque `cursor`.
64
+ sig do
65
+ params(
66
+ id: String,
67
+ cursor: String,
68
+ limit: Integer,
69
+ prefix: String,
70
+ request_options: Telnyx::RequestOptions::OrHash
71
+ ).returns(Telnyx::Models::Storage::Kvs::KeyListResponse)
72
+ end
73
+ def list(
74
+ # KV namespace ID
75
+ id,
76
+ # Opaque pagination cursor from a previous response's `meta.cursor`.
77
+ cursor: nil,
78
+ # Maximum number of keys to return. Values above 1000 are treated as 1000.
79
+ limit: nil,
80
+ # Return only keys that start with this prefix.
81
+ prefix: nil,
82
+ request_options: {}
83
+ )
84
+ end
85
+
86
+ # Deletes a key. Idempotent: deleting a key that does not exist still succeeds.
87
+ # The namespace itself must exist and be provisioned.
88
+ sig do
89
+ params(
90
+ key: String,
91
+ id: String,
92
+ request_options: Telnyx::RequestOptions::OrHash
93
+ ).void
94
+ end
95
+ def delete(
96
+ # Key name. Allowed characters: `a-z A-Z 0-9 - _ / = .`; maximum 256 characters;
97
+ # names starting with `_` are reserved for system use. May contain `/`; URL-encode
98
+ # it so the whole string is treated as one key (for example `user/1` ->
99
+ # `user%2F1`).
100
+ key,
101
+ # KV namespace ID
102
+ id:,
103
+ request_options: {}
104
+ )
105
+ end
106
+
107
+ # @api private
108
+ sig { params(client: Telnyx::Client).returns(T.attached_class) }
109
+ def self.new(client:)
110
+ end
111
+ end
112
+ end
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,87 @@
1
+ # typed: strong
2
+
3
+ module Telnyx
4
+ module Resources
5
+ class Storage
6
+ # Manage KV storage namespaces
7
+ class Kvs
8
+ # Read and write keys within a KV namespace
9
+ sig { returns(Telnyx::Resources::Storage::Kvs::Keys) }
10
+ attr_reader :keys
11
+
12
+ # Creates a new KV namespace. Provisioning is asynchronous: the namespace is
13
+ # returned with status `pending` and becomes usable once it reaches
14
+ # `provision_ok`.
15
+ sig do
16
+ params(
17
+ name: String,
18
+ request_options: Telnyx::RequestOptions::OrHash
19
+ ).returns(Telnyx::Storage::KvNamespaceResponseWrapper)
20
+ end
21
+ def create(
22
+ # Namespace name. May contain lowercase letters, numbers, and hyphens only.
23
+ name:,
24
+ request_options: {}
25
+ )
26
+ end
27
+
28
+ # Retrieves a KV namespace by its ID, including its provisioning status.
29
+ sig do
30
+ params(
31
+ id: String,
32
+ request_options: Telnyx::RequestOptions::OrHash
33
+ ).returns(Telnyx::Storage::KvNamespaceResponseWrapper)
34
+ end
35
+ def retrieve(
36
+ # KV namespace ID
37
+ id,
38
+ request_options: {}
39
+ )
40
+ end
41
+
42
+ # Lists the KV namespaces for the authenticated user's organization. Results use
43
+ # page-based pagination (`page[number]`/`page[size]`).
44
+ sig do
45
+ params(
46
+ page_number: Integer,
47
+ page_size: Integer,
48
+ request_options: Telnyx::RequestOptions::OrHash
49
+ ).returns(
50
+ Telnyx::Internal::DefaultFlatPagination[
51
+ Telnyx::Storage::KvNamespace
52
+ ]
53
+ )
54
+ end
55
+ def list(
56
+ # The page number to load.
57
+ page_number: nil,
58
+ # The size of the page. Values above 250 are treated as 250.
59
+ page_size: nil,
60
+ request_options: {}
61
+ )
62
+ end
63
+
64
+ # Deletes a KV namespace and all of the keys it contains. Deletion is
65
+ # asynchronous: the namespace is returned with status `deleting`. Deleting a
66
+ # namespace whose deletion is already in progress returns a `409`.
67
+ sig do
68
+ params(
69
+ id: String,
70
+ request_options: Telnyx::RequestOptions::OrHash
71
+ ).returns(Telnyx::Storage::KvNamespaceResponseWrapper)
72
+ end
73
+ def delete(
74
+ # KV namespace ID
75
+ id,
76
+ request_options: {}
77
+ )
78
+ end
79
+
80
+ # @api private
81
+ sig { params(client: Telnyx::Client).returns(T.attached_class) }
82
+ def self.new(client:)
83
+ end
84
+ end
85
+ end
86
+ end
87
+ end
@@ -16,6 +16,10 @@ module Telnyx
16
16
  sig { returns(Telnyx::Resources::Storage::Migrations) }
17
17
  attr_reader :migrations
18
18
 
19
+ # Manage KV storage namespaces
20
+ sig { returns(Telnyx::Resources::Storage::Kvs) }
21
+ attr_reader :kvs
22
+
19
23
  # List Migration Source coverage
20
24
  sig do
21
25
  params(request_options: Telnyx::RequestOptions::OrHash).returns(
@@ -61,6 +61,27 @@ module Telnyx
61
61
  )
62
62
  end
63
63
 
64
+ # Returns whether the 24-hour conversation window is currently open for a given
65
+ # source/destination pair. If window_active is false, only template messages may
66
+ # be sent.
67
+ sig do
68
+ params(
69
+ phone_number: String,
70
+ destination_number: String,
71
+ request_options: Telnyx::RequestOptions::OrHash
72
+ ).returns(
73
+ Telnyx::Models::Whatsapp::PhoneNumberRetrieveConversationWindowResponse
74
+ )
75
+ end
76
+ def retrieve_conversation_window(
77
+ # Phone number (E.164 format)
78
+ phone_number,
79
+ # Destination phone number in E.164 format
80
+ destination_number:,
81
+ request_options: {}
82
+ )
83
+ end
84
+
64
85
  # Submit verification code for a phone number
65
86
  sig do
66
87
  params(
@@ -1,111 +1,15 @@
1
1
  module Telnyx
2
2
  module Models
3
3
  type advanced_order_create_params =
4
- {
5
- area_code: String,
6
- comments: String,
7
- country_code: String,
8
- customer_reference: String,
9
- features: ::Array[Telnyx::Models::AdvancedOrderCreateParams::feature],
10
- phone_number_type: Telnyx::Models::AdvancedOrderCreateParams::phone_number_type,
11
- quantity: Integer,
12
- requirement_group_id: String
13
- }
14
- & Telnyx::Internal::Type::request_parameters
4
+ { } & Telnyx::Internal::Type::request_parameters
15
5
 
16
6
  class AdvancedOrderCreateParams < Telnyx::Models::AdvancedOrderRequest
17
7
  extend Telnyx::Internal::Type::RequestParameters::Converter
18
8
  include Telnyx::Internal::Type::RequestParameters
19
9
 
20
- attr_reader area_code: String?
10
+ def initialize: (?request_options: Telnyx::request_opts) -> void
21
11
 
22
- def area_code=: (String) -> String
23
-
24
- attr_reader comments: String?
25
-
26
- def comments=: (String) -> String
27
-
28
- attr_reader country_code: String?
29
-
30
- def country_code=: (String) -> String
31
-
32
- attr_reader customer_reference: String?
33
-
34
- def customer_reference=: (String) -> String
35
-
36
- attr_reader features: ::Array[Telnyx::Models::AdvancedOrderCreateParams::feature]?
37
-
38
- def features=: (
39
- ::Array[Telnyx::Models::AdvancedOrderCreateParams::feature]
40
- ) -> ::Array[Telnyx::Models::AdvancedOrderCreateParams::feature]
41
-
42
- attr_reader phone_number_type: Telnyx::Models::AdvancedOrderCreateParams::phone_number_type?
43
-
44
- def phone_number_type=: (
45
- Telnyx::Models::AdvancedOrderCreateParams::phone_number_type
46
- ) -> Telnyx::Models::AdvancedOrderCreateParams::phone_number_type
47
-
48
- attr_reader quantity: Integer?
49
-
50
- def quantity=: (Integer) -> Integer
51
-
52
- attr_reader requirement_group_id: String?
53
-
54
- def requirement_group_id=: (String) -> String
55
-
56
- def initialize: (
57
- ?area_code: String,
58
- ?comments: String,
59
- ?country_code: String,
60
- ?customer_reference: String,
61
- ?features: ::Array[Telnyx::Models::AdvancedOrderCreateParams::feature],
62
- ?phone_number_type: Telnyx::Models::AdvancedOrderCreateParams::phone_number_type,
63
- ?quantity: Integer,
64
- ?requirement_group_id: String,
65
- ?request_options: Telnyx::request_opts
66
- ) -> void
67
-
68
- def to_hash: -> {
69
- area_code: String,
70
- comments: String,
71
- country_code: String,
72
- customer_reference: String,
73
- features: ::Array[Telnyx::Models::AdvancedOrderCreateParams::feature],
74
- phone_number_type: Telnyx::Models::AdvancedOrderCreateParams::phone_number_type,
75
- quantity: Integer,
76
- requirement_group_id: String,
77
- request_options: Telnyx::RequestOptions
78
- }
79
-
80
- type feature = :sms | :mms | :voice | :fax | :emergency
81
-
82
- module Feature
83
- extend Telnyx::Internal::Type::Enum
84
-
85
- SMS: :sms
86
- MMS: :mms
87
- VOICE: :voice
88
- FAX: :fax
89
- EMERGENCY: :emergency
90
-
91
- def self?.values: -> ::Array[Telnyx::Models::AdvancedOrderCreateParams::feature]
92
- end
93
-
94
- type phone_number_type =
95
- :local | :mobile | :toll_free | :shared_cost | :national | :landline
96
-
97
- module PhoneNumberType
98
- extend Telnyx::Internal::Type::Enum
99
-
100
- LOCAL: :local
101
- MOBILE: :mobile
102
- TOLL_FREE: :toll_free
103
- SHARED_COST: :shared_cost
104
- NATIONAL: :national
105
- LANDLINE: :landline
106
-
107
- def self?.values: -> ::Array[Telnyx::Models::AdvancedOrderCreateParams::phone_number_type]
108
- end
12
+ def to_hash: -> { request_options: Telnyx::RequestOptions }
109
13
  end
110
14
  end
111
15
  end