sentdm 0.0.3 → 0.2.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 (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +1 -1
  4. data/lib/sentdm/client.rb +13 -12
  5. data/lib/sentdm/internal/type/base_model.rb +5 -5
  6. data/lib/sentdm/internal/util.rb +1 -1
  7. data/lib/sentdm/models/template_list_response.rb +3 -3
  8. data/lib/sentdm/models/{template_response.rb → template_response_v2.rb} +1 -1
  9. data/lib/sentdm/models.rb +1 -9
  10. data/lib/sentdm/resources/templates.rb +4 -4
  11. data/lib/sentdm/version.rb +1 -1
  12. data/lib/sentdm.rb +1 -15
  13. data/rbi/sentdm/client.rbi +12 -10
  14. data/rbi/sentdm/internal/util.rbi +1 -1
  15. data/rbi/sentdm/models/template_list_response.rbi +4 -4
  16. data/rbi/sentdm/models/{template_response.rbi → template_response_v2.rbi} +2 -2
  17. data/rbi/sentdm/models.rbi +1 -10
  18. data/rbi/sentdm/resources/templates.rbi +2 -2
  19. data/sig/sentdm/client.rbs +2 -4
  20. data/sig/sentdm/models/template_list_response.rbs +6 -6
  21. data/sig/sentdm/models/{template_response.rbs → template_response_v2.rbs} +2 -2
  22. data/sig/sentdm/models.rbs +1 -9
  23. data/sig/sentdm/resources/templates.rbs +2 -2
  24. metadata +5 -47
  25. data/lib/sentdm/models/organization_list_params.rb +0 -14
  26. data/lib/sentdm/models/organization_list_response.rb +0 -57
  27. data/lib/sentdm/models/organization_retrieve_profiles_params.rb +0 -14
  28. data/lib/sentdm/models/organization_retrieve_profiles_response.rb +0 -22
  29. data/lib/sentdm/models/organizations/customer_user.rb +0 -96
  30. data/lib/sentdm/models/organizations/user_delete_params.rb +0 -22
  31. data/lib/sentdm/models/organizations/user_invite_params.rb +0 -40
  32. data/lib/sentdm/models/organizations/user_list_params.rb +0 -28
  33. data/lib/sentdm/models/organizations/user_list_response.rb +0 -36
  34. data/lib/sentdm/models/organizations/user_retrieve_params.rb +0 -22
  35. data/lib/sentdm/models/organizations/user_update_role_params.rb +0 -28
  36. data/lib/sentdm/models/profile_summary.rb +0 -45
  37. data/lib/sentdm/resources/organizations/users.rb +0 -150
  38. data/lib/sentdm/resources/organizations.rb +0 -58
  39. data/rbi/sentdm/models/organization_list_params.rbi +0 -27
  40. data/rbi/sentdm/models/organization_list_response.rbi +0 -131
  41. data/rbi/sentdm/models/organization_retrieve_profiles_params.rbi +0 -30
  42. data/rbi/sentdm/models/organization_retrieve_profiles_response.rbi +0 -47
  43. data/rbi/sentdm/models/organizations/customer_user.rbi +0 -129
  44. data/rbi/sentdm/models/organizations/user_delete_params.rbi +0 -40
  45. data/rbi/sentdm/models/organizations/user_invite_params.rbi +0 -73
  46. data/rbi/sentdm/models/organizations/user_list_params.rbi +0 -48
  47. data/rbi/sentdm/models/organizations/user_list_response.rbi +0 -71
  48. data/rbi/sentdm/models/organizations/user_retrieve_params.rbi +0 -40
  49. data/rbi/sentdm/models/organizations/user_update_role_params.rbi +0 -51
  50. data/rbi/sentdm/models/profile_summary.rbi +0 -74
  51. data/rbi/sentdm/resources/organizations/users.rbi +0 -95
  52. data/rbi/sentdm/resources/organizations.rbi +0 -37
  53. data/sig/sentdm/models/organization_list_params.rbs +0 -15
  54. data/sig/sentdm/models/organization_list_response.rbs +0 -76
  55. data/sig/sentdm/models/organization_retrieve_profiles_params.rbs +0 -15
  56. data/sig/sentdm/models/organization_retrieve_profiles_response.rbs +0 -28
  57. data/sig/sentdm/models/organizations/customer_user.rbs +0 -91
  58. data/sig/sentdm/models/organizations/user_delete_params.rbs +0 -25
  59. data/sig/sentdm/models/organizations/user_invite_params.rbs +0 -44
  60. data/sig/sentdm/models/organizations/user_list_params.rbs +0 -30
  61. data/sig/sentdm/models/organizations/user_list_response.rbs +0 -47
  62. data/sig/sentdm/models/organizations/user_retrieve_params.rbs +0 -25
  63. data/sig/sentdm/models/organizations/user_update_role_params.rbs +0 -32
  64. data/sig/sentdm/models/profile_summary.rbs +0 -51
  65. data/sig/sentdm/resources/organizations/users.rbs +0 -44
  66. data/sig/sentdm/resources/organizations.rbs +0 -18
@@ -1,48 +0,0 @@
1
- # typed: strong
2
-
3
- module Sentdm
4
- module Models
5
- module Organizations
6
- class UserListParams < Sentdm::Internal::Type::BaseModel
7
- extend Sentdm::Internal::Type::RequestParameters::Converter
8
- include Sentdm::Internal::Type::RequestParameters
9
-
10
- OrHash =
11
- T.type_alias do
12
- T.any(
13
- Sentdm::Organizations::UserListParams,
14
- Sentdm::Internal::AnyHash
15
- )
16
- end
17
-
18
- sig { returns(Integer) }
19
- attr_accessor :page
20
-
21
- sig { returns(Integer) }
22
- attr_accessor :page_size
23
-
24
- sig do
25
- params(
26
- page: Integer,
27
- page_size: Integer,
28
- request_options: Sentdm::RequestOptions::OrHash
29
- ).returns(T.attached_class)
30
- end
31
- def self.new(page:, page_size:, request_options: {})
32
- end
33
-
34
- sig do
35
- override.returns(
36
- {
37
- page: Integer,
38
- page_size: Integer,
39
- request_options: Sentdm::RequestOptions
40
- }
41
- )
42
- end
43
- def to_hash
44
- end
45
- end
46
- end
47
- end
48
- end
@@ -1,71 +0,0 @@
1
- # typed: strong
2
-
3
- module Sentdm
4
- module Models
5
- module Organizations
6
- class UserListResponse < Sentdm::Internal::Type::BaseModel
7
- OrHash =
8
- T.type_alias do
9
- T.any(
10
- Sentdm::Models::Organizations::UserListResponse,
11
- Sentdm::Internal::AnyHash
12
- )
13
- end
14
-
15
- sig { returns(T.nilable(Integer)) }
16
- attr_reader :page
17
-
18
- sig { params(page: Integer).void }
19
- attr_writer :page
20
-
21
- sig { returns(T.nilable(Integer)) }
22
- attr_reader :page_size
23
-
24
- sig { params(page_size: Integer).void }
25
- attr_writer :page_size
26
-
27
- sig { returns(T.nilable(Integer)) }
28
- attr_reader :total_count
29
-
30
- sig { params(total_count: Integer).void }
31
- attr_writer :total_count
32
-
33
- sig do
34
- returns(T.nilable(T::Array[Sentdm::Organizations::CustomerUser]))
35
- end
36
- attr_reader :users
37
-
38
- sig do
39
- params(
40
- users: T::Array[Sentdm::Organizations::CustomerUser::OrHash]
41
- ).void
42
- end
43
- attr_writer :users
44
-
45
- sig do
46
- params(
47
- page: Integer,
48
- page_size: Integer,
49
- total_count: Integer,
50
- users: T::Array[Sentdm::Organizations::CustomerUser::OrHash]
51
- ).returns(T.attached_class)
52
- end
53
- def self.new(page: nil, page_size: nil, total_count: nil, users: nil)
54
- end
55
-
56
- sig do
57
- override.returns(
58
- {
59
- page: Integer,
60
- page_size: Integer,
61
- total_count: Integer,
62
- users: T::Array[Sentdm::Organizations::CustomerUser]
63
- }
64
- )
65
- end
66
- def to_hash
67
- end
68
- end
69
- end
70
- end
71
- end
@@ -1,40 +0,0 @@
1
- # typed: strong
2
-
3
- module Sentdm
4
- module Models
5
- module Organizations
6
- class UserRetrieveParams < Sentdm::Internal::Type::BaseModel
7
- extend Sentdm::Internal::Type::RequestParameters::Converter
8
- include Sentdm::Internal::Type::RequestParameters
9
-
10
- OrHash =
11
- T.type_alias do
12
- T.any(
13
- Sentdm::Organizations::UserRetrieveParams,
14
- Sentdm::Internal::AnyHash
15
- )
16
- end
17
-
18
- sig { returns(String) }
19
- attr_accessor :customer_id
20
-
21
- sig do
22
- params(
23
- customer_id: String,
24
- request_options: Sentdm::RequestOptions::OrHash
25
- ).returns(T.attached_class)
26
- end
27
- def self.new(customer_id:, request_options: {})
28
- end
29
-
30
- sig do
31
- override.returns(
32
- { customer_id: String, request_options: Sentdm::RequestOptions }
33
- )
34
- end
35
- def to_hash
36
- end
37
- end
38
- end
39
- end
40
- end
@@ -1,51 +0,0 @@
1
- # typed: strong
2
-
3
- module Sentdm
4
- module Models
5
- module Organizations
6
- class UserUpdateRoleParams < Sentdm::Internal::Type::BaseModel
7
- extend Sentdm::Internal::Type::RequestParameters::Converter
8
- include Sentdm::Internal::Type::RequestParameters
9
-
10
- OrHash =
11
- T.type_alias do
12
- T.any(
13
- Sentdm::Organizations::UserUpdateRoleParams,
14
- Sentdm::Internal::AnyHash
15
- )
16
- end
17
-
18
- sig { returns(String) }
19
- attr_accessor :customer_id
20
-
21
- sig { returns(T.nilable(String)) }
22
- attr_reader :role
23
-
24
- sig { params(role: String).void }
25
- attr_writer :role
26
-
27
- sig do
28
- params(
29
- customer_id: String,
30
- role: String,
31
- request_options: Sentdm::RequestOptions::OrHash
32
- ).returns(T.attached_class)
33
- end
34
- def self.new(customer_id:, role: nil, request_options: {})
35
- end
36
-
37
- sig do
38
- override.returns(
39
- {
40
- customer_id: String,
41
- role: String,
42
- request_options: Sentdm::RequestOptions
43
- }
44
- )
45
- end
46
- def to_hash
47
- end
48
- end
49
- end
50
- end
51
- end
@@ -1,74 +0,0 @@
1
- # typed: strong
2
-
3
- module Sentdm
4
- module Models
5
- class ProfileSummary < Sentdm::Internal::Type::BaseModel
6
- OrHash =
7
- T.type_alias do
8
- T.any(Sentdm::ProfileSummary, Sentdm::Internal::AnyHash)
9
- end
10
-
11
- sig { returns(T.nilable(String)) }
12
- attr_reader :id
13
-
14
- sig { params(id: String).void }
15
- attr_writer :id
16
-
17
- sig { returns(T.nilable(Time)) }
18
- attr_reader :created_at
19
-
20
- sig { params(created_at: Time).void }
21
- attr_writer :created_at
22
-
23
- sig { returns(T.nilable(String)) }
24
- attr_accessor :description
25
-
26
- sig { returns(T.nilable(String)) }
27
- attr_accessor :icon
28
-
29
- sig { returns(T.nilable(String)) }
30
- attr_reader :name
31
-
32
- sig { params(name: String).void }
33
- attr_writer :name
34
-
35
- sig { returns(T.nilable(String)) }
36
- attr_accessor :short_name
37
-
38
- sig do
39
- params(
40
- id: String,
41
- created_at: Time,
42
- description: T.nilable(String),
43
- icon: T.nilable(String),
44
- name: String,
45
- short_name: T.nilable(String)
46
- ).returns(T.attached_class)
47
- end
48
- def self.new(
49
- id: nil,
50
- created_at: nil,
51
- description: nil,
52
- icon: nil,
53
- name: nil,
54
- short_name: nil
55
- )
56
- end
57
-
58
- sig do
59
- override.returns(
60
- {
61
- id: String,
62
- created_at: Time,
63
- description: T.nilable(String),
64
- icon: T.nilable(String),
65
- name: String,
66
- short_name: T.nilable(String)
67
- }
68
- )
69
- end
70
- def to_hash
71
- end
72
- end
73
- end
74
- end
@@ -1,95 +0,0 @@
1
- # typed: strong
2
-
3
- module Sentdm
4
- module Resources
5
- class Organizations
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
- # @api private
89
- sig { params(client: Sentdm::Client).returns(T.attached_class) }
90
- def self.new(client:)
91
- end
92
- end
93
- end
94
- end
95
- end
@@ -1,37 +0,0 @@
1
- # typed: strong
2
-
3
- module Sentdm
4
- module Resources
5
- class Organizations
6
- sig { returns(Sentdm::Resources::Organizations::Users) }
7
- attr_reader :users
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
- # @api private
32
- sig { params(client: Sentdm::Client).returns(T.attached_class) }
33
- def self.new(client:)
34
- end
35
- end
36
- end
37
- end
@@ -1,15 +0,0 @@
1
- module Sentdm
2
- module Models
3
- type organization_list_params =
4
- { } & Sentdm::Internal::Type::request_parameters
5
-
6
- class OrganizationListParams < Sentdm::Internal::Type::BaseModel
7
- extend Sentdm::Internal::Type::RequestParameters::Converter
8
- include Sentdm::Internal::Type::RequestParameters
9
-
10
- def initialize: (?request_options: Sentdm::request_opts) -> void
11
-
12
- def to_hash: -> { request_options: Sentdm::RequestOptions }
13
- end
14
- end
15
- end
@@ -1,76 +0,0 @@
1
- module Sentdm
2
- module Models
3
- type organization_list_response =
4
- {
5
- organizations: ::Array[Sentdm::Models::OrganizationListResponse::Organization]
6
- }
7
-
8
- class OrganizationListResponse < Sentdm::Internal::Type::BaseModel
9
- attr_reader organizations: ::Array[Sentdm::Models::OrganizationListResponse::Organization]?
10
-
11
- def organizations=: (
12
- ::Array[Sentdm::Models::OrganizationListResponse::Organization]
13
- ) -> ::Array[Sentdm::Models::OrganizationListResponse::Organization]
14
-
15
- def initialize: (
16
- ?organizations: ::Array[Sentdm::Models::OrganizationListResponse::Organization]
17
- ) -> void
18
-
19
- def to_hash: -> {
20
- organizations: ::Array[Sentdm::Models::OrganizationListResponse::Organization]
21
- }
22
-
23
- type organization =
24
- {
25
- id: String,
26
- created_at: Time,
27
- description: String?,
28
- icon: String?,
29
- name: String,
30
- profiles: ::Array[Sentdm::ProfileSummary]
31
- }
32
-
33
- class Organization < Sentdm::Internal::Type::BaseModel
34
- attr_reader id: String?
35
-
36
- def id=: (String) -> String
37
-
38
- attr_reader created_at: Time?
39
-
40
- def created_at=: (Time) -> Time
41
-
42
- attr_accessor description: String?
43
-
44
- attr_accessor icon: String?
45
-
46
- attr_reader name: String?
47
-
48
- def name=: (String) -> String
49
-
50
- attr_reader profiles: ::Array[Sentdm::ProfileSummary]?
51
-
52
- def profiles=: (
53
- ::Array[Sentdm::ProfileSummary]
54
- ) -> ::Array[Sentdm::ProfileSummary]
55
-
56
- def initialize: (
57
- ?id: String,
58
- ?created_at: Time,
59
- ?description: String?,
60
- ?icon: String?,
61
- ?name: String,
62
- ?profiles: ::Array[Sentdm::ProfileSummary]
63
- ) -> void
64
-
65
- def to_hash: -> {
66
- id: String,
67
- created_at: Time,
68
- description: String?,
69
- icon: String?,
70
- name: String,
71
- profiles: ::Array[Sentdm::ProfileSummary]
72
- }
73
- end
74
- end
75
- end
76
- end
@@ -1,15 +0,0 @@
1
- module Sentdm
2
- module Models
3
- type organization_retrieve_profiles_params =
4
- { } & Sentdm::Internal::Type::request_parameters
5
-
6
- class OrganizationRetrieveProfilesParams < Sentdm::Internal::Type::BaseModel
7
- extend Sentdm::Internal::Type::RequestParameters::Converter
8
- include Sentdm::Internal::Type::RequestParameters
9
-
10
- def initialize: (?request_options: Sentdm::request_opts) -> void
11
-
12
- def to_hash: -> { request_options: Sentdm::RequestOptions }
13
- end
14
- end
15
- end
@@ -1,28 +0,0 @@
1
- module Sentdm
2
- module Models
3
- type organization_retrieve_profiles_response =
4
- { organization_id: String, profiles: ::Array[Sentdm::ProfileSummary] }
5
-
6
- class OrganizationRetrieveProfilesResponse < Sentdm::Internal::Type::BaseModel
7
- attr_reader organization_id: String?
8
-
9
- def organization_id=: (String) -> String
10
-
11
- attr_reader profiles: ::Array[Sentdm::ProfileSummary]?
12
-
13
- def profiles=: (
14
- ::Array[Sentdm::ProfileSummary]
15
- ) -> ::Array[Sentdm::ProfileSummary]
16
-
17
- def initialize: (
18
- ?organization_id: String,
19
- ?profiles: ::Array[Sentdm::ProfileSummary]
20
- ) -> void
21
-
22
- def to_hash: -> {
23
- organization_id: String,
24
- profiles: ::Array[Sentdm::ProfileSummary]
25
- }
26
- end
27
- end
28
- end
@@ -1,91 +0,0 @@
1
- module Sentdm
2
- module Models
3
- module Organizations
4
- type customer_user =
5
- {
6
- id: String,
7
- created_at: Time,
8
- customer_id: String,
9
- email: String,
10
- invitation_sent_at: Time?,
11
- invitation_token: String?,
12
- invitation_token_expires_at: Time?,
13
- last_login_at: Time?,
14
- name: String,
15
- role: String,
16
- status: String,
17
- updated_at: Time?
18
- }
19
-
20
- class CustomerUser < Sentdm::Internal::Type::BaseModel
21
- attr_reader id: String?
22
-
23
- def id=: (String) -> String
24
-
25
- attr_reader created_at: Time?
26
-
27
- def created_at=: (Time) -> Time
28
-
29
- attr_reader customer_id: String?
30
-
31
- def customer_id=: (String) -> String
32
-
33
- attr_reader email: String?
34
-
35
- def email=: (String) -> String
36
-
37
- attr_accessor invitation_sent_at: Time?
38
-
39
- attr_accessor invitation_token: String?
40
-
41
- attr_accessor invitation_token_expires_at: Time?
42
-
43
- attr_accessor last_login_at: Time?
44
-
45
- attr_reader name: String?
46
-
47
- def name=: (String) -> String
48
-
49
- attr_reader role: String?
50
-
51
- def role=: (String) -> String
52
-
53
- attr_reader status: String?
54
-
55
- def status=: (String) -> String
56
-
57
- attr_accessor updated_at: Time?
58
-
59
- def initialize: (
60
- ?id: String,
61
- ?created_at: Time,
62
- ?customer_id: String,
63
- ?email: String,
64
- ?invitation_sent_at: Time?,
65
- ?invitation_token: String?,
66
- ?invitation_token_expires_at: Time?,
67
- ?last_login_at: Time?,
68
- ?name: String,
69
- ?role: String,
70
- ?status: String,
71
- ?updated_at: Time?
72
- ) -> void
73
-
74
- def to_hash: -> {
75
- id: String,
76
- created_at: Time,
77
- customer_id: String,
78
- email: String,
79
- invitation_sent_at: Time?,
80
- invitation_token: String?,
81
- invitation_token_expires_at: Time?,
82
- last_login_at: Time?,
83
- name: String,
84
- role: String,
85
- status: String,
86
- updated_at: Time?
87
- }
88
- end
89
- end
90
- end
91
- end
@@ -1,25 +0,0 @@
1
- module Sentdm
2
- module Models
3
- module Organizations
4
- type user_delete_params =
5
- { customer_id: String } & Sentdm::Internal::Type::request_parameters
6
-
7
- class UserDeleteParams < Sentdm::Internal::Type::BaseModel
8
- extend Sentdm::Internal::Type::RequestParameters::Converter
9
- include Sentdm::Internal::Type::RequestParameters
10
-
11
- attr_accessor customer_id: String
12
-
13
- def initialize: (
14
- customer_id: String,
15
- ?request_options: Sentdm::request_opts
16
- ) -> void
17
-
18
- def to_hash: -> {
19
- customer_id: String,
20
- request_options: Sentdm::RequestOptions
21
- }
22
- end
23
- end
24
- end
25
- end