sentdm 0.0.2 → 0.1.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/CHANGELOG.md +26 -0
- data/README.md +1 -1
- data/lib/sentdm/internal/transport/pooled_net_requester.rb +1 -1
- data/lib/sentdm/internal/util.rb +1 -1
- data/lib/sentdm/models.rb +0 -8
- data/lib/sentdm/resources/organizations/users.rb +0 -134
- data/lib/sentdm/resources/organizations.rb +0 -40
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +0 -12
- data/rbi/sentdm/internal/util.rbi +1 -1
- data/rbi/sentdm/models.rbi +0 -9
- data/rbi/sentdm/resources/organizations/users.rbi +0 -81
- data/rbi/sentdm/resources/organizations.rbi +0 -22
- data/sig/sentdm/models.rbs +0 -8
- data/sig/sentdm/resources/organizations/users.rbs +0 -35
- data/sig/sentdm/resources/organizations.rbs +0 -9
- metadata +2 -38
- data/lib/sentdm/models/organization_list_params.rb +0 -14
- data/lib/sentdm/models/organization_list_response.rb +0 -57
- data/lib/sentdm/models/organization_retrieve_profiles_params.rb +0 -14
- data/lib/sentdm/models/organization_retrieve_profiles_response.rb +0 -22
- data/lib/sentdm/models/organizations/customer_user.rb +0 -96
- data/lib/sentdm/models/organizations/user_delete_params.rb +0 -22
- data/lib/sentdm/models/organizations/user_invite_params.rb +0 -40
- data/lib/sentdm/models/organizations/user_list_params.rb +0 -28
- data/lib/sentdm/models/organizations/user_list_response.rb +0 -36
- data/lib/sentdm/models/organizations/user_retrieve_params.rb +0 -22
- data/lib/sentdm/models/organizations/user_update_role_params.rb +0 -28
- data/lib/sentdm/models/profile_summary.rb +0 -45
- data/rbi/sentdm/models/organization_list_params.rbi +0 -27
- data/rbi/sentdm/models/organization_list_response.rbi +0 -131
- data/rbi/sentdm/models/organization_retrieve_profiles_params.rbi +0 -30
- data/rbi/sentdm/models/organization_retrieve_profiles_response.rbi +0 -47
- data/rbi/sentdm/models/organizations/customer_user.rbi +0 -129
- data/rbi/sentdm/models/organizations/user_delete_params.rbi +0 -40
- data/rbi/sentdm/models/organizations/user_invite_params.rbi +0 -73
- data/rbi/sentdm/models/organizations/user_list_params.rbi +0 -48
- data/rbi/sentdm/models/organizations/user_list_response.rbi +0 -71
- data/rbi/sentdm/models/organizations/user_retrieve_params.rbi +0 -40
- data/rbi/sentdm/models/organizations/user_update_role_params.rbi +0 -51
- data/rbi/sentdm/models/profile_summary.rbi +0 -74
- data/sig/sentdm/models/organization_list_params.rbs +0 -15
- data/sig/sentdm/models/organization_list_response.rbs +0 -76
- data/sig/sentdm/models/organization_retrieve_profiles_params.rbs +0 -15
- data/sig/sentdm/models/organization_retrieve_profiles_response.rbs +0 -28
- data/sig/sentdm/models/organizations/customer_user.rbs +0 -91
- data/sig/sentdm/models/organizations/user_delete_params.rbs +0 -25
- data/sig/sentdm/models/organizations/user_invite_params.rbs +0 -44
- data/sig/sentdm/models/organizations/user_list_params.rbs +0 -30
- data/sig/sentdm/models/organizations/user_list_response.rbs +0 -47
- data/sig/sentdm/models/organizations/user_retrieve_params.rbs +0 -25
- data/sig/sentdm/models/organizations/user_update_role_params.rbs +0 -32
- data/sig/sentdm/models/profile_summary.rbs +0 -51
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 31445227ab71e86eadb4a87c40f4cd1e323e5d7662a87fcf9aa8c57288171e81
|
|
4
|
+
data.tar.gz: a29e93874f1d06a0f514aacb541c6f2c573176ce5bb217ac1011e47988c65154
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9d5ebda8629795e1f7905d07cc18f0814fb9d214388d91192bfdab4f259d88fe93225e56579d2e75e8a5587da7d307dc2772b02ac3defc6f2d8c7f679f89dd4e
|
|
7
|
+
data.tar.gz: 03b08de70af011e81e60f8d3938c2089b549fdc1312e20b389953cfda6cf1f75ce212b0872c82b0f8db17e37d23838a2aa0912c55c187f74e7e70afe6765d669
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0 (2026-02-10)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.0.3...v0.1.0](https://github.com/sentdm/sent-dm-ruby/compare/v0.0.3...v0.1.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([6cf3a01](https://github.com/sentdm/sent-dm-ruby/commit/6cf3a01e1aba9d12465f2880227871d26d7858d0))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **client:** loosen json header parsing ([91563cf](https://github.com/sentdm/sent-dm-ruby/commit/91563cf9d069d31dd7bb7922d39f58d28723dd17))
|
|
15
|
+
|
|
16
|
+
## 0.0.3 (2026-02-04)
|
|
17
|
+
|
|
18
|
+
Full Changelog: [v0.0.2...v0.0.3](https://github.com/sentdm/sent-dm-ruby/compare/v0.0.2...v0.0.3)
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **client:** always add content-length to post body, even when empty ([8ca90a2](https://github.com/sentdm/sent-dm-ruby/commit/8ca90a2ac5b0e539a79049be404c303429dd0776))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Chores
|
|
26
|
+
|
|
27
|
+
* **docs:** remove www prefix ([9e13671](https://github.com/sentdm/sent-dm-ruby/commit/9e13671f1324f6963121b724d5afc9e30d7ed03f))
|
|
28
|
+
|
|
3
29
|
## 0.0.2 (2026-01-28)
|
|
4
30
|
|
|
5
31
|
Full Changelog: [v0.0.1...v0.0.2](https://github.com/sentdm/sent-dm-ruby/compare/v0.0.1...v0.0.2)
|
data/README.md
CHANGED
|
@@ -75,7 +75,7 @@ module Sentdm
|
|
|
75
75
|
|
|
76
76
|
case body
|
|
77
77
|
in nil
|
|
78
|
-
|
|
78
|
+
req["content-length"] ||= 0 unless req["transfer-encoding"]
|
|
79
79
|
in String
|
|
80
80
|
req["content-length"] ||= body.bytesize.to_s unless req["transfer-encoding"]
|
|
81
81
|
req.body_stream = Sentdm::Internal::Util::ReadIOAdapter.new(body, &blk)
|
data/lib/sentdm/internal/util.rb
CHANGED
|
@@ -485,7 +485,7 @@ module Sentdm
|
|
|
485
485
|
end
|
|
486
486
|
|
|
487
487
|
# @type [Regexp]
|
|
488
|
-
JSON_CONTENT = %r{^application/(?:
|
|
488
|
+
JSON_CONTENT = %r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}
|
|
489
489
|
# @type [Regexp]
|
|
490
490
|
JSONL_CONTENT = %r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}
|
|
491
491
|
|
data/lib/sentdm/models.rb
CHANGED
|
@@ -57,14 +57,6 @@ module Sentdm
|
|
|
57
57
|
|
|
58
58
|
NumberLookupRetrieveParams = Sentdm::Models::NumberLookupRetrieveParams
|
|
59
59
|
|
|
60
|
-
OrganizationListParams = Sentdm::Models::OrganizationListParams
|
|
61
|
-
|
|
62
|
-
OrganizationRetrieveProfilesParams = Sentdm::Models::OrganizationRetrieveProfilesParams
|
|
63
|
-
|
|
64
|
-
Organizations = Sentdm::Models::Organizations
|
|
65
|
-
|
|
66
|
-
ProfileSummary = Sentdm::Models::ProfileSummary
|
|
67
|
-
|
|
68
60
|
TemplateBodyContent = Sentdm::Models::TemplateBodyContent
|
|
69
61
|
|
|
70
62
|
TemplateCreateParams = Sentdm::Models::TemplateCreateParams
|
|
@@ -4,140 +4,6 @@ module Sentdm
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Organizations
|
|
6
6
|
class Users
|
|
7
|
-
# Retrieves a specific user by their ID. Requires appropriate permissions. The
|
|
8
|
-
# customerId can be either an organization ID or a profile ID.
|
|
9
|
-
#
|
|
10
|
-
# @overload retrieve(user_id, customer_id:, request_options: {})
|
|
11
|
-
#
|
|
12
|
-
# @param user_id [String]
|
|
13
|
-
# @param customer_id [String]
|
|
14
|
-
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
15
|
-
#
|
|
16
|
-
# @return [Sentdm::Models::Organizations::CustomerUser]
|
|
17
|
-
#
|
|
18
|
-
# @see Sentdm::Models::Organizations::UserRetrieveParams
|
|
19
|
-
def retrieve(user_id, params)
|
|
20
|
-
parsed, options = Sentdm::Organizations::UserRetrieveParams.dump_request(params)
|
|
21
|
-
customer_id =
|
|
22
|
-
parsed.delete(:customer_id) do
|
|
23
|
-
raise ArgumentError.new("missing required path argument #{_1}")
|
|
24
|
-
end
|
|
25
|
-
@client.request(
|
|
26
|
-
method: :get,
|
|
27
|
-
path: ["v2/organizations/%1$s/users/%2$s", customer_id, user_id],
|
|
28
|
-
model: Sentdm::Organizations::CustomerUser,
|
|
29
|
-
options: options
|
|
30
|
-
)
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# Retrieves all users associated with an organization or sender profile. Requires
|
|
34
|
-
# appropriate permissions. Supports pagination.
|
|
35
|
-
#
|
|
36
|
-
# @overload list(customer_id, page:, page_size:, request_options: {})
|
|
37
|
-
#
|
|
38
|
-
# @param customer_id [String]
|
|
39
|
-
# @param page [Integer]
|
|
40
|
-
# @param page_size [Integer]
|
|
41
|
-
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
42
|
-
#
|
|
43
|
-
# @return [Sentdm::Models::Organizations::UserListResponse]
|
|
44
|
-
#
|
|
45
|
-
# @see Sentdm::Models::Organizations::UserListParams
|
|
46
|
-
def list(customer_id, params)
|
|
47
|
-
parsed, options = Sentdm::Organizations::UserListParams.dump_request(params)
|
|
48
|
-
@client.request(
|
|
49
|
-
method: :get,
|
|
50
|
-
path: ["v2/organizations/%1$s/users", customer_id],
|
|
51
|
-
query: parsed.transform_keys(page_size: "pageSize"),
|
|
52
|
-
model: Sentdm::Models::Organizations::UserListResponse,
|
|
53
|
-
options: options
|
|
54
|
-
)
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
# Removes a user from an organization or sender profile. Requires admin
|
|
58
|
-
# permissions. This action permanently deletes the user association.
|
|
59
|
-
#
|
|
60
|
-
# @overload delete(user_id, customer_id:, request_options: {})
|
|
61
|
-
#
|
|
62
|
-
# @param user_id [String]
|
|
63
|
-
# @param customer_id [String]
|
|
64
|
-
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
65
|
-
#
|
|
66
|
-
# @return [nil]
|
|
67
|
-
#
|
|
68
|
-
# @see Sentdm::Models::Organizations::UserDeleteParams
|
|
69
|
-
def delete(user_id, params)
|
|
70
|
-
parsed, options = Sentdm::Organizations::UserDeleteParams.dump_request(params)
|
|
71
|
-
customer_id =
|
|
72
|
-
parsed.delete(:customer_id) do
|
|
73
|
-
raise ArgumentError.new("missing required path argument #{_1}")
|
|
74
|
-
end
|
|
75
|
-
@client.request(
|
|
76
|
-
method: :delete,
|
|
77
|
-
path: ["v2/organizations/%1$s/users/%2$s", customer_id, user_id],
|
|
78
|
-
model: NilClass,
|
|
79
|
-
options: options
|
|
80
|
-
)
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
# Invites a user to an organization or sender profile with a specified role.
|
|
84
|
-
# Requires appropriate permissions. The customerId can be either an organization
|
|
85
|
-
# ID or a profile ID.
|
|
86
|
-
#
|
|
87
|
-
# @overload invite(customer_id, email: nil, invited_by: nil, name: nil, role: nil, request_options: {})
|
|
88
|
-
#
|
|
89
|
-
# @param customer_id [String]
|
|
90
|
-
# @param email [String]
|
|
91
|
-
# @param invited_by [String, nil]
|
|
92
|
-
# @param name [String]
|
|
93
|
-
# @param role [String]
|
|
94
|
-
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
95
|
-
#
|
|
96
|
-
# @return [Sentdm::Models::Organizations::CustomerUser]
|
|
97
|
-
#
|
|
98
|
-
# @see Sentdm::Models::Organizations::UserInviteParams
|
|
99
|
-
def invite(customer_id, params = {})
|
|
100
|
-
parsed, options = Sentdm::Organizations::UserInviteParams.dump_request(params)
|
|
101
|
-
@client.request(
|
|
102
|
-
method: :post,
|
|
103
|
-
path: ["v2/organizations/%1$s/users", customer_id],
|
|
104
|
-
body: parsed,
|
|
105
|
-
model: Sentdm::Organizations::CustomerUser,
|
|
106
|
-
options: options
|
|
107
|
-
)
|
|
108
|
-
end
|
|
109
|
-
|
|
110
|
-
# Updates a user's role within an organization or sender profile. Requires admin
|
|
111
|
-
# permissions. Valid roles are: admin, billing, developer.
|
|
112
|
-
#
|
|
113
|
-
# @overload update_role(user_id, customer_id:, role: nil, request_options: {})
|
|
114
|
-
#
|
|
115
|
-
# @param user_id [String] Path param
|
|
116
|
-
#
|
|
117
|
-
# @param customer_id [String] Path param
|
|
118
|
-
#
|
|
119
|
-
# @param role [String] Body param
|
|
120
|
-
#
|
|
121
|
-
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
122
|
-
#
|
|
123
|
-
# @return [Sentdm::Models::Organizations::CustomerUser]
|
|
124
|
-
#
|
|
125
|
-
# @see Sentdm::Models::Organizations::UserUpdateRoleParams
|
|
126
|
-
def update_role(user_id, params)
|
|
127
|
-
parsed, options = Sentdm::Organizations::UserUpdateRoleParams.dump_request(params)
|
|
128
|
-
customer_id =
|
|
129
|
-
parsed.delete(:customer_id) do
|
|
130
|
-
raise ArgumentError.new("missing required path argument #{_1}")
|
|
131
|
-
end
|
|
132
|
-
@client.request(
|
|
133
|
-
method: :put,
|
|
134
|
-
path: ["v2/organizations/%1$s/users/%2$s", customer_id, user_id],
|
|
135
|
-
body: parsed,
|
|
136
|
-
model: Sentdm::Organizations::CustomerUser,
|
|
137
|
-
options: options
|
|
138
|
-
)
|
|
139
|
-
end
|
|
140
|
-
|
|
141
7
|
# @api private
|
|
142
8
|
#
|
|
143
9
|
# @param client [Sentdm::Client]
|
|
@@ -6,46 +6,6 @@ module Sentdm
|
|
|
6
6
|
# @return [Sentdm::Resources::Organizations::Users]
|
|
7
7
|
attr_reader :users
|
|
8
8
|
|
|
9
|
-
# Retrieves all organizations that the authenticated user has access to, including
|
|
10
|
-
# the sender profiles within each organization that the user can access. Returns
|
|
11
|
-
# organization details with nested profiles filtered by user permissions.
|
|
12
|
-
#
|
|
13
|
-
# @overload list(request_options: {})
|
|
14
|
-
#
|
|
15
|
-
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
16
|
-
#
|
|
17
|
-
# @return [Sentdm::Models::OrganizationListResponse]
|
|
18
|
-
#
|
|
19
|
-
# @see Sentdm::Models::OrganizationListParams
|
|
20
|
-
def list(params = {})
|
|
21
|
-
@client.request(
|
|
22
|
-
method: :get,
|
|
23
|
-
path: "v2/organizations",
|
|
24
|
-
model: Sentdm::Models::OrganizationListResponse,
|
|
25
|
-
options: params[:request_options]
|
|
26
|
-
)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
# Retrieves all sender profiles within an organization that the authenticated user
|
|
30
|
-
# has access to. Returns filtered list based on user's permissions.
|
|
31
|
-
#
|
|
32
|
-
# @overload retrieve_profiles(org_id, request_options: {})
|
|
33
|
-
#
|
|
34
|
-
# @param org_id [String]
|
|
35
|
-
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
36
|
-
#
|
|
37
|
-
# @return [Sentdm::Models::OrganizationRetrieveProfilesResponse]
|
|
38
|
-
#
|
|
39
|
-
# @see Sentdm::Models::OrganizationRetrieveProfilesParams
|
|
40
|
-
def retrieve_profiles(org_id, params = {})
|
|
41
|
-
@client.request(
|
|
42
|
-
method: :get,
|
|
43
|
-
path: ["v2/organizations/%1$s/profiles", org_id],
|
|
44
|
-
model: Sentdm::Models::OrganizationRetrieveProfilesResponse,
|
|
45
|
-
options: params[:request_options]
|
|
46
|
-
)
|
|
47
|
-
end
|
|
48
|
-
|
|
49
9
|
# @api private
|
|
50
10
|
#
|
|
51
11
|
# @param client [Sentdm::Client]
|
data/lib/sentdm/version.rb
CHANGED
data/lib/sentdm.rb
CHANGED
|
@@ -64,18 +64,6 @@ require_relative "sentdm/models/message_send_to_contact_params"
|
|
|
64
64
|
require_relative "sentdm/models/message_send_to_phone_params"
|
|
65
65
|
require_relative "sentdm/models/number_lookup_retrieve_params"
|
|
66
66
|
require_relative "sentdm/models/number_lookup_retrieve_response"
|
|
67
|
-
require_relative "sentdm/models/organization_list_params"
|
|
68
|
-
require_relative "sentdm/models/organization_list_response"
|
|
69
|
-
require_relative "sentdm/models/organization_retrieve_profiles_params"
|
|
70
|
-
require_relative "sentdm/models/organization_retrieve_profiles_response"
|
|
71
|
-
require_relative "sentdm/models/organizations/customer_user"
|
|
72
|
-
require_relative "sentdm/models/organizations/user_delete_params"
|
|
73
|
-
require_relative "sentdm/models/organizations/user_invite_params"
|
|
74
|
-
require_relative "sentdm/models/organizations/user_list_params"
|
|
75
|
-
require_relative "sentdm/models/organizations/user_list_response"
|
|
76
|
-
require_relative "sentdm/models/organizations/user_retrieve_params"
|
|
77
|
-
require_relative "sentdm/models/organizations/user_update_role_params"
|
|
78
|
-
require_relative "sentdm/models/profile_summary"
|
|
79
67
|
require_relative "sentdm/models/template_body_content"
|
|
80
68
|
require_relative "sentdm/models/template_create_params"
|
|
81
69
|
require_relative "sentdm/models/template_definition"
|
|
@@ -296,7 +296,7 @@ module Sentdm
|
|
|
296
296
|
end
|
|
297
297
|
|
|
298
298
|
JSON_CONTENT =
|
|
299
|
-
T.let(%r{^application/(?:
|
|
299
|
+
T.let(%r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}, Regexp)
|
|
300
300
|
JSONL_CONTENT =
|
|
301
301
|
T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp)
|
|
302
302
|
|
data/rbi/sentdm/models.rbi
CHANGED
|
@@ -19,15 +19,6 @@ module Sentdm
|
|
|
19
19
|
|
|
20
20
|
NumberLookupRetrieveParams = Sentdm::Models::NumberLookupRetrieveParams
|
|
21
21
|
|
|
22
|
-
OrganizationListParams = Sentdm::Models::OrganizationListParams
|
|
23
|
-
|
|
24
|
-
OrganizationRetrieveProfilesParams =
|
|
25
|
-
Sentdm::Models::OrganizationRetrieveProfilesParams
|
|
26
|
-
|
|
27
|
-
Organizations = Sentdm::Models::Organizations
|
|
28
|
-
|
|
29
|
-
ProfileSummary = Sentdm::Models::ProfileSummary
|
|
30
|
-
|
|
31
22
|
TemplateBodyContent = Sentdm::Models::TemplateBodyContent
|
|
32
23
|
|
|
33
24
|
TemplateCreateParams = Sentdm::Models::TemplateCreateParams
|
|
@@ -4,87 +4,6 @@ module Sentdm
|
|
|
4
4
|
module Resources
|
|
5
5
|
class Organizations
|
|
6
6
|
class Users
|
|
7
|
-
# Retrieves a specific user by their ID. Requires appropriate permissions. The
|
|
8
|
-
# customerId can be either an organization ID or a profile ID.
|
|
9
|
-
sig do
|
|
10
|
-
params(
|
|
11
|
-
user_id: String,
|
|
12
|
-
customer_id: String,
|
|
13
|
-
request_options: Sentdm::RequestOptions::OrHash
|
|
14
|
-
).returns(Sentdm::Organizations::CustomerUser)
|
|
15
|
-
end
|
|
16
|
-
def retrieve(user_id, customer_id:, request_options: {})
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
# Retrieves all users associated with an organization or sender profile. Requires
|
|
20
|
-
# appropriate permissions. Supports pagination.
|
|
21
|
-
sig do
|
|
22
|
-
params(
|
|
23
|
-
customer_id: String,
|
|
24
|
-
page: Integer,
|
|
25
|
-
page_size: Integer,
|
|
26
|
-
request_options: Sentdm::RequestOptions::OrHash
|
|
27
|
-
).returns(Sentdm::Models::Organizations::UserListResponse)
|
|
28
|
-
end
|
|
29
|
-
def list(customer_id, page:, page_size:, request_options: {})
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
# Removes a user from an organization or sender profile. Requires admin
|
|
33
|
-
# permissions. This action permanently deletes the user association.
|
|
34
|
-
sig do
|
|
35
|
-
params(
|
|
36
|
-
user_id: String,
|
|
37
|
-
customer_id: String,
|
|
38
|
-
request_options: Sentdm::RequestOptions::OrHash
|
|
39
|
-
).void
|
|
40
|
-
end
|
|
41
|
-
def delete(user_id, customer_id:, request_options: {})
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
# Invites a user to an organization or sender profile with a specified role.
|
|
45
|
-
# Requires appropriate permissions. The customerId can be either an organization
|
|
46
|
-
# ID or a profile ID.
|
|
47
|
-
sig do
|
|
48
|
-
params(
|
|
49
|
-
customer_id: String,
|
|
50
|
-
email: String,
|
|
51
|
-
invited_by: T.nilable(String),
|
|
52
|
-
name: String,
|
|
53
|
-
role: String,
|
|
54
|
-
request_options: Sentdm::RequestOptions::OrHash
|
|
55
|
-
).returns(Sentdm::Organizations::CustomerUser)
|
|
56
|
-
end
|
|
57
|
-
def invite(
|
|
58
|
-
customer_id,
|
|
59
|
-
email: nil,
|
|
60
|
-
invited_by: nil,
|
|
61
|
-
name: nil,
|
|
62
|
-
role: nil,
|
|
63
|
-
request_options: {}
|
|
64
|
-
)
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
# Updates a user's role within an organization or sender profile. Requires admin
|
|
68
|
-
# permissions. Valid roles are: admin, billing, developer.
|
|
69
|
-
sig do
|
|
70
|
-
params(
|
|
71
|
-
user_id: String,
|
|
72
|
-
customer_id: String,
|
|
73
|
-
role: String,
|
|
74
|
-
request_options: Sentdm::RequestOptions::OrHash
|
|
75
|
-
).returns(Sentdm::Organizations::CustomerUser)
|
|
76
|
-
end
|
|
77
|
-
def update_role(
|
|
78
|
-
# Path param
|
|
79
|
-
user_id,
|
|
80
|
-
# Path param
|
|
81
|
-
customer_id:,
|
|
82
|
-
# Body param
|
|
83
|
-
role: nil,
|
|
84
|
-
request_options: {}
|
|
85
|
-
)
|
|
86
|
-
end
|
|
87
|
-
|
|
88
7
|
# @api private
|
|
89
8
|
sig { params(client: Sentdm::Client).returns(T.attached_class) }
|
|
90
9
|
def self.new(client:)
|
|
@@ -6,28 +6,6 @@ module Sentdm
|
|
|
6
6
|
sig { returns(Sentdm::Resources::Organizations::Users) }
|
|
7
7
|
attr_reader :users
|
|
8
8
|
|
|
9
|
-
# Retrieves all organizations that the authenticated user has access to, including
|
|
10
|
-
# the sender profiles within each organization that the user can access. Returns
|
|
11
|
-
# organization details with nested profiles filtered by user permissions.
|
|
12
|
-
sig do
|
|
13
|
-
params(request_options: Sentdm::RequestOptions::OrHash).returns(
|
|
14
|
-
Sentdm::Models::OrganizationListResponse
|
|
15
|
-
)
|
|
16
|
-
end
|
|
17
|
-
def list(request_options: {})
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
# Retrieves all sender profiles within an organization that the authenticated user
|
|
21
|
-
# has access to. Returns filtered list based on user's permissions.
|
|
22
|
-
sig do
|
|
23
|
-
params(
|
|
24
|
-
org_id: String,
|
|
25
|
-
request_options: Sentdm::RequestOptions::OrHash
|
|
26
|
-
).returns(Sentdm::Models::OrganizationRetrieveProfilesResponse)
|
|
27
|
-
end
|
|
28
|
-
def retrieve_profiles(org_id, request_options: {})
|
|
29
|
-
end
|
|
30
|
-
|
|
31
9
|
# @api private
|
|
32
10
|
sig { params(client: Sentdm::Client).returns(T.attached_class) }
|
|
33
11
|
def self.new(client:)
|
data/sig/sentdm/models.rbs
CHANGED
|
@@ -17,14 +17,6 @@ module Sentdm
|
|
|
17
17
|
|
|
18
18
|
class NumberLookupRetrieveParams = Sentdm::Models::NumberLookupRetrieveParams
|
|
19
19
|
|
|
20
|
-
class OrganizationListParams = Sentdm::Models::OrganizationListParams
|
|
21
|
-
|
|
22
|
-
class OrganizationRetrieveProfilesParams = Sentdm::Models::OrganizationRetrieveProfilesParams
|
|
23
|
-
|
|
24
|
-
module Organizations = Sentdm::Models::Organizations
|
|
25
|
-
|
|
26
|
-
class ProfileSummary = Sentdm::Models::ProfileSummary
|
|
27
|
-
|
|
28
20
|
class TemplateBodyContent = Sentdm::Models::TemplateBodyContent
|
|
29
21
|
|
|
30
22
|
class TemplateCreateParams = Sentdm::Models::TemplateCreateParams
|
|
@@ -2,41 +2,6 @@ module Sentdm
|
|
|
2
2
|
module Resources
|
|
3
3
|
class Organizations
|
|
4
4
|
class Users
|
|
5
|
-
def retrieve: (
|
|
6
|
-
String user_id,
|
|
7
|
-
customer_id: String,
|
|
8
|
-
?request_options: Sentdm::request_opts
|
|
9
|
-
) -> Sentdm::Organizations::CustomerUser
|
|
10
|
-
|
|
11
|
-
def list: (
|
|
12
|
-
String customer_id,
|
|
13
|
-
page: Integer,
|
|
14
|
-
page_size: Integer,
|
|
15
|
-
?request_options: Sentdm::request_opts
|
|
16
|
-
) -> Sentdm::Models::Organizations::UserListResponse
|
|
17
|
-
|
|
18
|
-
def delete: (
|
|
19
|
-
String user_id,
|
|
20
|
-
customer_id: String,
|
|
21
|
-
?request_options: Sentdm::request_opts
|
|
22
|
-
) -> nil
|
|
23
|
-
|
|
24
|
-
def invite: (
|
|
25
|
-
String customer_id,
|
|
26
|
-
?email: String,
|
|
27
|
-
?invited_by: String?,
|
|
28
|
-
?name: String,
|
|
29
|
-
?role: String,
|
|
30
|
-
?request_options: Sentdm::request_opts
|
|
31
|
-
) -> Sentdm::Organizations::CustomerUser
|
|
32
|
-
|
|
33
|
-
def update_role: (
|
|
34
|
-
String user_id,
|
|
35
|
-
customer_id: String,
|
|
36
|
-
?role: String,
|
|
37
|
-
?request_options: Sentdm::request_opts
|
|
38
|
-
) -> Sentdm::Organizations::CustomerUser
|
|
39
|
-
|
|
40
5
|
def initialize: (client: Sentdm::Client) -> void
|
|
41
6
|
end
|
|
42
7
|
end
|
|
@@ -3,15 +3,6 @@ module Sentdm
|
|
|
3
3
|
class Organizations
|
|
4
4
|
attr_reader users: Sentdm::Resources::Organizations::Users
|
|
5
5
|
|
|
6
|
-
def list: (
|
|
7
|
-
?request_options: Sentdm::request_opts
|
|
8
|
-
) -> Sentdm::Models::OrganizationListResponse
|
|
9
|
-
|
|
10
|
-
def retrieve_profiles: (
|
|
11
|
-
String org_id,
|
|
12
|
-
?request_options: Sentdm::request_opts
|
|
13
|
-
) -> Sentdm::Models::OrganizationRetrieveProfilesResponse
|
|
14
|
-
|
|
15
6
|
def initialize: (client: Sentdm::Client) -> void
|
|
16
7
|
end
|
|
17
8
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sentdm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sent Dm
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-02-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -81,18 +81,6 @@ files:
|
|
|
81
81
|
- lib/sentdm/models/message_send_to_phone_params.rb
|
|
82
82
|
- lib/sentdm/models/number_lookup_retrieve_params.rb
|
|
83
83
|
- lib/sentdm/models/number_lookup_retrieve_response.rb
|
|
84
|
-
- lib/sentdm/models/organization_list_params.rb
|
|
85
|
-
- lib/sentdm/models/organization_list_response.rb
|
|
86
|
-
- lib/sentdm/models/organization_retrieve_profiles_params.rb
|
|
87
|
-
- lib/sentdm/models/organization_retrieve_profiles_response.rb
|
|
88
|
-
- lib/sentdm/models/organizations/customer_user.rb
|
|
89
|
-
- lib/sentdm/models/organizations/user_delete_params.rb
|
|
90
|
-
- lib/sentdm/models/organizations/user_invite_params.rb
|
|
91
|
-
- lib/sentdm/models/organizations/user_list_params.rb
|
|
92
|
-
- lib/sentdm/models/organizations/user_list_response.rb
|
|
93
|
-
- lib/sentdm/models/organizations/user_retrieve_params.rb
|
|
94
|
-
- lib/sentdm/models/organizations/user_update_role_params.rb
|
|
95
|
-
- lib/sentdm/models/profile_summary.rb
|
|
96
84
|
- lib/sentdm/models/template_body_content.rb
|
|
97
85
|
- lib/sentdm/models/template_create_params.rb
|
|
98
86
|
- lib/sentdm/models/template_definition.rb
|
|
@@ -142,18 +130,6 @@ files:
|
|
|
142
130
|
- rbi/sentdm/models/message_send_to_phone_params.rbi
|
|
143
131
|
- rbi/sentdm/models/number_lookup_retrieve_params.rbi
|
|
144
132
|
- rbi/sentdm/models/number_lookup_retrieve_response.rbi
|
|
145
|
-
- rbi/sentdm/models/organization_list_params.rbi
|
|
146
|
-
- rbi/sentdm/models/organization_list_response.rbi
|
|
147
|
-
- rbi/sentdm/models/organization_retrieve_profiles_params.rbi
|
|
148
|
-
- rbi/sentdm/models/organization_retrieve_profiles_response.rbi
|
|
149
|
-
- rbi/sentdm/models/organizations/customer_user.rbi
|
|
150
|
-
- rbi/sentdm/models/organizations/user_delete_params.rbi
|
|
151
|
-
- rbi/sentdm/models/organizations/user_invite_params.rbi
|
|
152
|
-
- rbi/sentdm/models/organizations/user_list_params.rbi
|
|
153
|
-
- rbi/sentdm/models/organizations/user_list_response.rbi
|
|
154
|
-
- rbi/sentdm/models/organizations/user_retrieve_params.rbi
|
|
155
|
-
- rbi/sentdm/models/organizations/user_update_role_params.rbi
|
|
156
|
-
- rbi/sentdm/models/profile_summary.rbi
|
|
157
133
|
- rbi/sentdm/models/template_body_content.rbi
|
|
158
134
|
- rbi/sentdm/models/template_create_params.rbi
|
|
159
135
|
- rbi/sentdm/models/template_definition.rbi
|
|
@@ -202,18 +178,6 @@ files:
|
|
|
202
178
|
- sig/sentdm/models/message_send_to_phone_params.rbs
|
|
203
179
|
- sig/sentdm/models/number_lookup_retrieve_params.rbs
|
|
204
180
|
- sig/sentdm/models/number_lookup_retrieve_response.rbs
|
|
205
|
-
- sig/sentdm/models/organization_list_params.rbs
|
|
206
|
-
- sig/sentdm/models/organization_list_response.rbs
|
|
207
|
-
- sig/sentdm/models/organization_retrieve_profiles_params.rbs
|
|
208
|
-
- sig/sentdm/models/organization_retrieve_profiles_response.rbs
|
|
209
|
-
- sig/sentdm/models/organizations/customer_user.rbs
|
|
210
|
-
- sig/sentdm/models/organizations/user_delete_params.rbs
|
|
211
|
-
- sig/sentdm/models/organizations/user_invite_params.rbs
|
|
212
|
-
- sig/sentdm/models/organizations/user_list_params.rbs
|
|
213
|
-
- sig/sentdm/models/organizations/user_list_response.rbs
|
|
214
|
-
- sig/sentdm/models/organizations/user_retrieve_params.rbs
|
|
215
|
-
- sig/sentdm/models/organizations/user_update_role_params.rbs
|
|
216
|
-
- sig/sentdm/models/profile_summary.rbs
|
|
217
181
|
- sig/sentdm/models/template_body_content.rbs
|
|
218
182
|
- sig/sentdm/models/template_create_params.rbs
|
|
219
183
|
- sig/sentdm/models/template_definition.rbs
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Sentdm
|
|
4
|
-
module Models
|
|
5
|
-
# @see Sentdm::Resources::Organizations#list
|
|
6
|
-
class OrganizationListParams < Sentdm::Internal::Type::BaseModel
|
|
7
|
-
extend Sentdm::Internal::Type::RequestParameters::Converter
|
|
8
|
-
include Sentdm::Internal::Type::RequestParameters
|
|
9
|
-
|
|
10
|
-
# @!method initialize(request_options: {})
|
|
11
|
-
# @param request_options [Sentdm::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
end
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Sentdm
|
|
4
|
-
module Models
|
|
5
|
-
# @see Sentdm::Resources::Organizations#list
|
|
6
|
-
class OrganizationListResponse < Sentdm::Internal::Type::BaseModel
|
|
7
|
-
# @!attribute organizations
|
|
8
|
-
#
|
|
9
|
-
# @return [Array<Sentdm::Models::OrganizationListResponse::Organization>, nil]
|
|
10
|
-
optional :organizations,
|
|
11
|
-
-> { Sentdm::Internal::Type::ArrayOf[Sentdm::Models::OrganizationListResponse::Organization] }
|
|
12
|
-
|
|
13
|
-
# @!method initialize(organizations: nil)
|
|
14
|
-
# @param organizations [Array<Sentdm::Models::OrganizationListResponse::Organization>]
|
|
15
|
-
|
|
16
|
-
class Organization < Sentdm::Internal::Type::BaseModel
|
|
17
|
-
# @!attribute id
|
|
18
|
-
#
|
|
19
|
-
# @return [String, nil]
|
|
20
|
-
optional :id, String
|
|
21
|
-
|
|
22
|
-
# @!attribute created_at
|
|
23
|
-
#
|
|
24
|
-
# @return [Time, nil]
|
|
25
|
-
optional :created_at, Time, api_name: :createdAt
|
|
26
|
-
|
|
27
|
-
# @!attribute description
|
|
28
|
-
#
|
|
29
|
-
# @return [String, nil]
|
|
30
|
-
optional :description, String, nil?: true
|
|
31
|
-
|
|
32
|
-
# @!attribute icon
|
|
33
|
-
#
|
|
34
|
-
# @return [String, nil]
|
|
35
|
-
optional :icon, String, nil?: true
|
|
36
|
-
|
|
37
|
-
# @!attribute name
|
|
38
|
-
#
|
|
39
|
-
# @return [String, nil]
|
|
40
|
-
optional :name, String
|
|
41
|
-
|
|
42
|
-
# @!attribute profiles
|
|
43
|
-
#
|
|
44
|
-
# @return [Array<Sentdm::Models::ProfileSummary>, nil]
|
|
45
|
-
optional :profiles, -> { Sentdm::Internal::Type::ArrayOf[Sentdm::ProfileSummary] }
|
|
46
|
-
|
|
47
|
-
# @!method initialize(id: nil, created_at: nil, description: nil, icon: nil, name: nil, profiles: nil)
|
|
48
|
-
# @param id [String]
|
|
49
|
-
# @param created_at [Time]
|
|
50
|
-
# @param description [String, nil]
|
|
51
|
-
# @param icon [String, nil]
|
|
52
|
-
# @param name [String]
|
|
53
|
-
# @param profiles [Array<Sentdm::Models::ProfileSummary>]
|
|
54
|
-
end
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
end
|