emailguard_sdk 1.0.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 (128) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +169 -0
  4. data/Rakefile +10 -0
  5. data/docs/BaseResponse.md +20 -0
  6. data/docs/BillingApi.md +85 -0
  7. data/docs/BillingUsageEvent.md +26 -0
  8. data/docs/BillingUsageItem.md +28 -0
  9. data/docs/BillingUsageResponse.md +22 -0
  10. data/docs/ChannelsApi.md +366 -0
  11. data/docs/CreateNotificationChannelInput.md +22 -0
  12. data/docs/CreateNotificationRuleInput.md +28 -0
  13. data/docs/EmailApi.md +72 -0
  14. data/docs/EmailDetectData.md +44 -0
  15. data/docs/EmailDetectResponse.md +22 -0
  16. data/docs/EventsApi.md +76 -0
  17. data/docs/GetNotificationChannelResponse.md +22 -0
  18. data/docs/GetNotificationChannelsResponse.md +22 -0
  19. data/docs/GetNotificationEventsResponse.md +22 -0
  20. data/docs/GetNotificationRulesResponse.md +22 -0
  21. data/docs/GetPublicTeamResponse.md +22 -0
  22. data/docs/IdDataResponse.md +22 -0
  23. data/docs/IdDataStruct.md +18 -0
  24. data/docs/InviteTeamMemberInput.md +20 -0
  25. data/docs/InvitesApi.md +220 -0
  26. data/docs/ListPublicTeamInvitesResponse.md +22 -0
  27. data/docs/ListPublicTeamMembersResponse.md +22 -0
  28. data/docs/MembersApi.md +222 -0
  29. data/docs/MessageResponse.md +20 -0
  30. data/docs/NotificationChannelResponse.md +28 -0
  31. data/docs/NotificationRuleChannelInput.md +22 -0
  32. data/docs/NotificationRuleChannelResponse.md +28 -0
  33. data/docs/NotificationRuleResponse.md +32 -0
  34. data/docs/PublicTeamInviteResponse.md +24 -0
  35. data/docs/PublicTeamMemberResponse.md +34 -0
  36. data/docs/PublicTeamResponse.md +28 -0
  37. data/docs/RulesApi.md +294 -0
  38. data/docs/TeamsApi.md +148 -0
  39. data/docs/UpdateNotificationChannelInput.md +20 -0
  40. data/docs/UpdateNotificationRuleInput.md +28 -0
  41. data/docs/UpdateTeamInput.md +24 -0
  42. data/docs/UpdateTeamMemberInput.md +22 -0
  43. data/emailguard_sdk.gemspec +39 -0
  44. data/git_push.sh +57 -0
  45. data/lib/emailguard_sdk/api/billing_api.rb +92 -0
  46. data/lib/emailguard_sdk/api/channels_api.rb +347 -0
  47. data/lib/emailguard_sdk/api/email_api.rb +86 -0
  48. data/lib/emailguard_sdk/api/events_api.rb +79 -0
  49. data/lib/emailguard_sdk/api/invites_api.rb +210 -0
  50. data/lib/emailguard_sdk/api/members_api.rb +216 -0
  51. data/lib/emailguard_sdk/api/rules_api.rb +284 -0
  52. data/lib/emailguard_sdk/api/teams_api.rb +147 -0
  53. data/lib/emailguard_sdk/api_client.rb +397 -0
  54. data/lib/emailguard_sdk/api_error.rb +58 -0
  55. data/lib/emailguard_sdk/api_model_base.rb +88 -0
  56. data/lib/emailguard_sdk/configuration.rb +322 -0
  57. data/lib/emailguard_sdk/models/base_response.rb +175 -0
  58. data/lib/emailguard_sdk/models/billing_usage_event.rb +268 -0
  59. data/lib/emailguard_sdk/models/billing_usage_item.rb +262 -0
  60. data/lib/emailguard_sdk/models/billing_usage_response.rb +186 -0
  61. data/lib/emailguard_sdk/models/create_notification_channel_input.rb +204 -0
  62. data/lib/emailguard_sdk/models/create_notification_rule_input.rb +264 -0
  63. data/lib/emailguard_sdk/models/email_detect_data.rb +266 -0
  64. data/lib/emailguard_sdk/models/email_detect_response.rb +184 -0
  65. data/lib/emailguard_sdk/models/get_notification_channel_response.rb +184 -0
  66. data/lib/emailguard_sdk/models/get_notification_channels_response.rb +186 -0
  67. data/lib/emailguard_sdk/models/get_notification_events_response.rb +186 -0
  68. data/lib/emailguard_sdk/models/get_notification_rules_response.rb +186 -0
  69. data/lib/emailguard_sdk/models/get_public_team_response.rb +184 -0
  70. data/lib/emailguard_sdk/models/id_data_response.rb +184 -0
  71. data/lib/emailguard_sdk/models/id_data_struct.rb +148 -0
  72. data/lib/emailguard_sdk/models/invite_team_member_input.rb +192 -0
  73. data/lib/emailguard_sdk/models/list_public_team_invites_response.rb +186 -0
  74. data/lib/emailguard_sdk/models/list_public_team_members_response.rb +186 -0
  75. data/lib/emailguard_sdk/models/message_response.rb +175 -0
  76. data/lib/emailguard_sdk/models/notification_channel_response.rb +200 -0
  77. data/lib/emailguard_sdk/models/notification_rule_channel_input.rb +168 -0
  78. data/lib/emailguard_sdk/models/notification_rule_channel_response.rb +198 -0
  79. data/lib/emailguard_sdk/models/notification_rule_response.rb +224 -0
  80. data/lib/emailguard_sdk/models/public_team_invite_response.rb +246 -0
  81. data/lib/emailguard_sdk/models/public_team_member_response.rb +347 -0
  82. data/lib/emailguard_sdk/models/public_team_response.rb +198 -0
  83. data/lib/emailguard_sdk/models/update_notification_channel_input.rb +160 -0
  84. data/lib/emailguard_sdk/models/update_notification_rule_input.rb +204 -0
  85. data/lib/emailguard_sdk/models/update_team_input.rb +195 -0
  86. data/lib/emailguard_sdk/models/update_team_member_input.rb +185 -0
  87. data/lib/emailguard_sdk/version.rb +15 -0
  88. data/lib/emailguard_sdk.rb +78 -0
  89. data/spec/api/billing_api_spec.rb +49 -0
  90. data/spec/api/channels_api_spec.rb +95 -0
  91. data/spec/api/email_api_spec.rb +47 -0
  92. data/spec/api/events_api_spec.rb +46 -0
  93. data/spec/api/invites_api_spec.rb +70 -0
  94. data/spec/api/members_api_spec.rb +71 -0
  95. data/spec/api/rules_api_spec.rb +83 -0
  96. data/spec/api/teams_api_spec.rb +58 -0
  97. data/spec/models/base_response_spec.rb +42 -0
  98. data/spec/models/billing_usage_event_spec.rb +60 -0
  99. data/spec/models/billing_usage_item_spec.rb +66 -0
  100. data/spec/models/billing_usage_response_spec.rb +48 -0
  101. data/spec/models/create_notification_channel_input_spec.rb +48 -0
  102. data/spec/models/create_notification_rule_input_spec.rb +66 -0
  103. data/spec/models/email_detect_data_spec.rb +114 -0
  104. data/spec/models/email_detect_response_spec.rb +48 -0
  105. data/spec/models/get_notification_channel_response_spec.rb +48 -0
  106. data/spec/models/get_notification_channels_response_spec.rb +48 -0
  107. data/spec/models/get_notification_events_response_spec.rb +48 -0
  108. data/spec/models/get_notification_rules_response_spec.rb +48 -0
  109. data/spec/models/get_public_team_response_spec.rb +48 -0
  110. data/spec/models/id_data_response_spec.rb +48 -0
  111. data/spec/models/id_data_struct_spec.rb +36 -0
  112. data/spec/models/invite_team_member_input_spec.rb +42 -0
  113. data/spec/models/list_public_team_invites_response_spec.rb +48 -0
  114. data/spec/models/list_public_team_members_response_spec.rb +48 -0
  115. data/spec/models/message_response_spec.rb +42 -0
  116. data/spec/models/notification_channel_response_spec.rb +66 -0
  117. data/spec/models/notification_rule_channel_input_spec.rb +48 -0
  118. data/spec/models/notification_rule_channel_response_spec.rb +66 -0
  119. data/spec/models/notification_rule_response_spec.rb +78 -0
  120. data/spec/models/public_team_invite_response_spec.rb +54 -0
  121. data/spec/models/public_team_member_response_spec.rb +84 -0
  122. data/spec/models/public_team_response_spec.rb +66 -0
  123. data/spec/models/update_notification_channel_input_spec.rb +42 -0
  124. data/spec/models/update_notification_rule_input_spec.rb +66 -0
  125. data/spec/models/update_team_input_spec.rb +54 -0
  126. data/spec/models/update_team_member_input_spec.rb +48 -0
  127. data/spec/spec_helper.rb +111 -0
  128. metadata +251 -0
@@ -0,0 +1,28 @@
1
+ # Emailguard::NotificationRuleChannelResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **channel_id** | **String** | Linked custom channel ID, if any. | [optional] |
8
+ | **channel_name** | **String** | Name of the linked channel, when resolved. | [optional] |
9
+ | **channel_type** | **String** | Type of the linked channel, when resolved. | [optional] |
10
+ | **id** | **String** | Assignment record ID. | [optional] |
11
+ | **predefined** | **String** | Built-in channel identifier when not using a custom channel. | [optional] |
12
+ | **target_user_id** | **String** | User ID when delivery is scoped to one member. | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'emailguard_sdk'
18
+
19
+ instance = Emailguard::NotificationRuleChannelResponse.new(
20
+ channel_id: null,
21
+ channel_name: null,
22
+ channel_type: null,
23
+ id: null,
24
+ predefined: null,
25
+ target_user_id: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,32 @@
1
+ # Emailguard::NotificationRuleResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **channels** | [**Array<NotificationRuleChannelResponse>**](NotificationRuleChannelResponse.md) | Channel targets notified when the rule matches. | [optional] |
8
+ | **conditions** | **Hash<String, Object>** | Optional conditions (e.g. usage threshold percents). | [optional] |
9
+ | **created_at** | **String** | When the rule was created (RFC3339). | [optional] |
10
+ | **description** | **String** | Optional longer description. | [optional] |
11
+ | **event_types** | **Array<String>** | Event types that trigger this rule. | [optional] |
12
+ | **id** | **String** | Rule record ID. | [optional] |
13
+ | **is_enabled** | **Boolean** | Whether the rule is actively delivering events. | [optional] |
14
+ | **name** | **String** | Display name for the rule. | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'emailguard_sdk'
20
+
21
+ instance = Emailguard::NotificationRuleResponse.new(
22
+ channels: null,
23
+ conditions: null,
24
+ created_at: null,
25
+ description: null,
26
+ event_types: null,
27
+ id: null,
28
+ is_enabled: null,
29
+ name: null
30
+ )
31
+ ```
32
+
@@ -0,0 +1,24 @@
1
+ # Emailguard::PublicTeamInviteResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **email** | **String** | Email address the invite was sent to. | |
8
+ | **expires_at** | **String** | When the invite expires if not accepted (RFC3339). | |
9
+ | **id** | **String** | Invite record ID. | |
10
+ | **role** | **String** | Role the invitee will receive when they accept. | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'emailguard_sdk'
16
+
17
+ instance = Emailguard::PublicTeamInviteResponse.new(
18
+ email: null,
19
+ expires_at: null,
20
+ id: null,
21
+ role: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,34 @@
1
+ # Emailguard::PublicTeamMemberResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **created_at** | **String** | When the member joined the team (RFC3339). | |
8
+ | **email** | **String** | Member login email. | |
9
+ | **emoji** | **String** | User profile emoji. | [optional] |
10
+ | **first_name** | **String** | Member given name. | |
11
+ | **id** | **String** | Team membership record ID. | |
12
+ | **last_name** | **String** | Member family name. | |
13
+ | **notes** | **String** | Internal notes stored on the membership. | [optional] |
14
+ | **role** | **String** | Team role (for example Owner, Admin, Member). | |
15
+ | **user_id** | **String** | User account ID for this member. | |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'emailguard_sdk'
21
+
22
+ instance = Emailguard::PublicTeamMemberResponse.new(
23
+ created_at: null,
24
+ email: null,
25
+ emoji: null,
26
+ first_name: null,
27
+ id: null,
28
+ last_name: null,
29
+ notes: null,
30
+ role: null,
31
+ user_id: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,28 @@
1
+ # Emailguard::PublicTeamResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **email** | **String** | Contact email for the workspace. | [optional] |
8
+ | **emoji** | **String** | Avatar emoji. | [optional] |
9
+ | **id** | **String** | Team UUID. | [optional] |
10
+ | **name** | **String** | Display name. | [optional] |
11
+ | **type** | **String** | Team kind (for example team or personal). | [optional] |
12
+ | **url** | **String** | Public website URL. | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'emailguard_sdk'
18
+
19
+ instance = Emailguard::PublicTeamResponse.new(
20
+ email: null,
21
+ emoji: null,
22
+ id: null,
23
+ name: null,
24
+ type: null,
25
+ url: null
26
+ )
27
+ ```
28
+
data/docs/RulesApi.md ADDED
@@ -0,0 +1,294 @@
1
+ # Emailguard::RulesApi
2
+
3
+ All URIs are relative to *http://api.emailguard.co*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**api_v1_team_notifications_rules_get**](RulesApi.md#api_v1_team_notifications_rules_get) | **GET** /api/v1/team/notifications/rules | List notification rules |
8
+ | [**api_v1_team_notifications_rules_post**](RulesApi.md#api_v1_team_notifications_rules_post) | **POST** /api/v1/team/notifications/rules | Create notification rule |
9
+ | [**api_v1_team_notifications_rules_rule_id_delete**](RulesApi.md#api_v1_team_notifications_rules_rule_id_delete) | **DELETE** /api/v1/team/notifications/rules/{ruleId} | Delete notification rule |
10
+ | [**api_v1_team_notifications_rules_rule_id_put**](RulesApi.md#api_v1_team_notifications_rules_rule_id_put) | **PUT** /api/v1/team/notifications/rules/{ruleId} | Update notification rule |
11
+
12
+
13
+ ## api_v1_team_notifications_rules_get
14
+
15
+ > <GetNotificationRulesResponse> api_v1_team_notifications_rules_get
16
+
17
+ List notification rules
18
+
19
+ Returns routing rules that map event types to one or more delivery channels. Each rule includes its enabled state and channel targets.
20
+
21
+ ### Examples
22
+
23
+ ```ruby
24
+ require 'time'
25
+ require 'emailguard_sdk'
26
+ # setup authorization
27
+ Emailguard.configure do |config|
28
+ # Configure API key authorization: ApiKeyAuth
29
+ config.api_key['Authorization'] = 'YOUR API KEY'
30
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
31
+ # config.api_key_prefix['Authorization'] = 'Bearer'
32
+ end
33
+
34
+ api_instance = Emailguard::RulesApi.new
35
+
36
+ begin
37
+ # List notification rules
38
+ result = api_instance.api_v1_team_notifications_rules_get
39
+ p result
40
+ rescue Emailguard::ApiError => e
41
+ puts "Error when calling RulesApi->api_v1_team_notifications_rules_get: #{e}"
42
+ end
43
+ ```
44
+
45
+ #### Using the api_v1_team_notifications_rules_get_with_http_info variant
46
+
47
+ This returns an Array which contains the response data, status code and headers.
48
+
49
+ > <Array(<GetNotificationRulesResponse>, Integer, Hash)> api_v1_team_notifications_rules_get_with_http_info
50
+
51
+ ```ruby
52
+ begin
53
+ # List notification rules
54
+ data, status_code, headers = api_instance.api_v1_team_notifications_rules_get_with_http_info
55
+ p status_code # => 2xx
56
+ p headers # => { ... }
57
+ p data # => <GetNotificationRulesResponse>
58
+ rescue Emailguard::ApiError => e
59
+ puts "Error when calling RulesApi->api_v1_team_notifications_rules_get_with_http_info: #{e}"
60
+ end
61
+ ```
62
+
63
+ ### Parameters
64
+
65
+ This endpoint does not need any parameter.
66
+
67
+ ### Return type
68
+
69
+ [**GetNotificationRulesResponse**](GetNotificationRulesResponse.md)
70
+
71
+ ### Authorization
72
+
73
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
74
+
75
+ ### HTTP request headers
76
+
77
+ - **Content-Type**: Not defined
78
+ - **Accept**: application/json
79
+
80
+
81
+ ## api_v1_team_notifications_rules_post
82
+
83
+ > <IdDataResponse> api_v1_team_notifications_rules_post(create_notification_rule_input)
84
+
85
+ Create notification rule
86
+
87
+ Creates a rule that delivers matching events to the specified channels. At least one event type and one channel target are required.
88
+
89
+ ### Examples
90
+
91
+ ```ruby
92
+ require 'time'
93
+ require 'emailguard_sdk'
94
+ # setup authorization
95
+ Emailguard.configure do |config|
96
+ # Configure API key authorization: ApiKeyAuth
97
+ config.api_key['Authorization'] = 'YOUR API KEY'
98
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
99
+ # config.api_key_prefix['Authorization'] = 'Bearer'
100
+ end
101
+
102
+ api_instance = Emailguard::RulesApi.new
103
+ create_notification_rule_input = Emailguard::CreateNotificationRuleInput.new({channels: [Emailguard::NotificationRuleChannelInput.new], event_types: ['event_types_example'], name: 'name_example'}) # CreateNotificationRuleInput | Rule name, event types, and channel targets
104
+
105
+ begin
106
+ # Create notification rule
107
+ result = api_instance.api_v1_team_notifications_rules_post(create_notification_rule_input)
108
+ p result
109
+ rescue Emailguard::ApiError => e
110
+ puts "Error when calling RulesApi->api_v1_team_notifications_rules_post: #{e}"
111
+ end
112
+ ```
113
+
114
+ #### Using the api_v1_team_notifications_rules_post_with_http_info variant
115
+
116
+ This returns an Array which contains the response data, status code and headers.
117
+
118
+ > <Array(<IdDataResponse>, Integer, Hash)> api_v1_team_notifications_rules_post_with_http_info(create_notification_rule_input)
119
+
120
+ ```ruby
121
+ begin
122
+ # Create notification rule
123
+ data, status_code, headers = api_instance.api_v1_team_notifications_rules_post_with_http_info(create_notification_rule_input)
124
+ p status_code # => 2xx
125
+ p headers # => { ... }
126
+ p data # => <IdDataResponse>
127
+ rescue Emailguard::ApiError => e
128
+ puts "Error when calling RulesApi->api_v1_team_notifications_rules_post_with_http_info: #{e}"
129
+ end
130
+ ```
131
+
132
+ ### Parameters
133
+
134
+ | Name | Type | Description | Notes |
135
+ | ---- | ---- | ----------- | ----- |
136
+ | **create_notification_rule_input** | [**CreateNotificationRuleInput**](CreateNotificationRuleInput.md) | Rule name, event types, and channel targets | |
137
+
138
+ ### Return type
139
+
140
+ [**IdDataResponse**](IdDataResponse.md)
141
+
142
+ ### Authorization
143
+
144
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
145
+
146
+ ### HTTP request headers
147
+
148
+ - **Content-Type**: application/json
149
+ - **Accept**: application/json
150
+
151
+
152
+ ## api_v1_team_notifications_rules_rule_id_delete
153
+
154
+ > <MessageResponse> api_v1_team_notifications_rules_rule_id_delete(rule_id)
155
+
156
+ Delete notification rule
157
+
158
+ Permanently deletes a routing rule and its channel assignments.
159
+
160
+ ### Examples
161
+
162
+ ```ruby
163
+ require 'time'
164
+ require 'emailguard_sdk'
165
+ # setup authorization
166
+ Emailguard.configure do |config|
167
+ # Configure API key authorization: ApiKeyAuth
168
+ config.api_key['Authorization'] = 'YOUR API KEY'
169
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
170
+ # config.api_key_prefix['Authorization'] = 'Bearer'
171
+ end
172
+
173
+ api_instance = Emailguard::RulesApi.new
174
+ rule_id = 'rule_id_example' # String | UUID of the notification rule to delete
175
+
176
+ begin
177
+ # Delete notification rule
178
+ result = api_instance.api_v1_team_notifications_rules_rule_id_delete(rule_id)
179
+ p result
180
+ rescue Emailguard::ApiError => e
181
+ puts "Error when calling RulesApi->api_v1_team_notifications_rules_rule_id_delete: #{e}"
182
+ end
183
+ ```
184
+
185
+ #### Using the api_v1_team_notifications_rules_rule_id_delete_with_http_info variant
186
+
187
+ This returns an Array which contains the response data, status code and headers.
188
+
189
+ > <Array(<MessageResponse>, Integer, Hash)> api_v1_team_notifications_rules_rule_id_delete_with_http_info(rule_id)
190
+
191
+ ```ruby
192
+ begin
193
+ # Delete notification rule
194
+ data, status_code, headers = api_instance.api_v1_team_notifications_rules_rule_id_delete_with_http_info(rule_id)
195
+ p status_code # => 2xx
196
+ p headers # => { ... }
197
+ p data # => <MessageResponse>
198
+ rescue Emailguard::ApiError => e
199
+ puts "Error when calling RulesApi->api_v1_team_notifications_rules_rule_id_delete_with_http_info: #{e}"
200
+ end
201
+ ```
202
+
203
+ ### Parameters
204
+
205
+ | Name | Type | Description | Notes |
206
+ | ---- | ---- | ----------- | ----- |
207
+ | **rule_id** | **String** | UUID of the notification rule to delete | |
208
+
209
+ ### Return type
210
+
211
+ [**MessageResponse**](MessageResponse.md)
212
+
213
+ ### Authorization
214
+
215
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
216
+
217
+ ### HTTP request headers
218
+
219
+ - **Content-Type**: Not defined
220
+ - **Accept**: application/json
221
+
222
+
223
+ ## api_v1_team_notifications_rules_rule_id_put
224
+
225
+ > <MessageResponse> api_v1_team_notifications_rules_rule_id_put(rule_id, update_notification_rule_input)
226
+
227
+ Update notification rule
228
+
229
+ Updates a rule's name, description, event types, enabled flag, or channel targets. When `channels` is sent it replaces all existing targets.
230
+
231
+ ### Examples
232
+
233
+ ```ruby
234
+ require 'time'
235
+ require 'emailguard_sdk'
236
+ # setup authorization
237
+ Emailguard.configure do |config|
238
+ # Configure API key authorization: ApiKeyAuth
239
+ config.api_key['Authorization'] = 'YOUR API KEY'
240
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
241
+ # config.api_key_prefix['Authorization'] = 'Bearer'
242
+ end
243
+
244
+ api_instance = Emailguard::RulesApi.new
245
+ rule_id = 'rule_id_example' # String | UUID of the notification rule to update
246
+ update_notification_rule_input = Emailguard::UpdateNotificationRuleInput.new # UpdateNotificationRuleInput | Fields to update on the rule
247
+
248
+ begin
249
+ # Update notification rule
250
+ result = api_instance.api_v1_team_notifications_rules_rule_id_put(rule_id, update_notification_rule_input)
251
+ p result
252
+ rescue Emailguard::ApiError => e
253
+ puts "Error when calling RulesApi->api_v1_team_notifications_rules_rule_id_put: #{e}"
254
+ end
255
+ ```
256
+
257
+ #### Using the api_v1_team_notifications_rules_rule_id_put_with_http_info variant
258
+
259
+ This returns an Array which contains the response data, status code and headers.
260
+
261
+ > <Array(<MessageResponse>, Integer, Hash)> api_v1_team_notifications_rules_rule_id_put_with_http_info(rule_id, update_notification_rule_input)
262
+
263
+ ```ruby
264
+ begin
265
+ # Update notification rule
266
+ data, status_code, headers = api_instance.api_v1_team_notifications_rules_rule_id_put_with_http_info(rule_id, update_notification_rule_input)
267
+ p status_code # => 2xx
268
+ p headers # => { ... }
269
+ p data # => <MessageResponse>
270
+ rescue Emailguard::ApiError => e
271
+ puts "Error when calling RulesApi->api_v1_team_notifications_rules_rule_id_put_with_http_info: #{e}"
272
+ end
273
+ ```
274
+
275
+ ### Parameters
276
+
277
+ | Name | Type | Description | Notes |
278
+ | ---- | ---- | ----------- | ----- |
279
+ | **rule_id** | **String** | UUID of the notification rule to update | |
280
+ | **update_notification_rule_input** | [**UpdateNotificationRuleInput**](UpdateNotificationRuleInput.md) | Fields to update on the rule | |
281
+
282
+ ### Return type
283
+
284
+ [**MessageResponse**](MessageResponse.md)
285
+
286
+ ### Authorization
287
+
288
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
289
+
290
+ ### HTTP request headers
291
+
292
+ - **Content-Type**: application/json
293
+ - **Accept**: application/json
294
+
data/docs/TeamsApi.md ADDED
@@ -0,0 +1,148 @@
1
+ # Emailguard::TeamsApi
2
+
3
+ All URIs are relative to *http://api.emailguard.co*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**api_v1_team_get**](TeamsApi.md#api_v1_team_get) | **GET** /api/v1/team | Get team |
8
+ | [**api_v1_team_patch**](TeamsApi.md#api_v1_team_patch) | **PATCH** /api/v1/team | Update team |
9
+
10
+
11
+ ## api_v1_team_get
12
+
13
+ > <GetPublicTeamResponse> api_v1_team_get
14
+
15
+ Get team
16
+
17
+ Returns profile fields for the team associated with your API key.
18
+
19
+ ### Examples
20
+
21
+ ```ruby
22
+ require 'time'
23
+ require 'emailguard_sdk'
24
+ # setup authorization
25
+ Emailguard.configure do |config|
26
+ # Configure API key authorization: ApiKeyAuth
27
+ config.api_key['Authorization'] = 'YOUR API KEY'
28
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
29
+ # config.api_key_prefix['Authorization'] = 'Bearer'
30
+ end
31
+
32
+ api_instance = Emailguard::TeamsApi.new
33
+
34
+ begin
35
+ # Get team
36
+ result = api_instance.api_v1_team_get
37
+ p result
38
+ rescue Emailguard::ApiError => e
39
+ puts "Error when calling TeamsApi->api_v1_team_get: #{e}"
40
+ end
41
+ ```
42
+
43
+ #### Using the api_v1_team_get_with_http_info variant
44
+
45
+ This returns an Array which contains the response data, status code and headers.
46
+
47
+ > <Array(<GetPublicTeamResponse>, Integer, Hash)> api_v1_team_get_with_http_info
48
+
49
+ ```ruby
50
+ begin
51
+ # Get team
52
+ data, status_code, headers = api_instance.api_v1_team_get_with_http_info
53
+ p status_code # => 2xx
54
+ p headers # => { ... }
55
+ p data # => <GetPublicTeamResponse>
56
+ rescue Emailguard::ApiError => e
57
+ puts "Error when calling TeamsApi->api_v1_team_get_with_http_info: #{e}"
58
+ end
59
+ ```
60
+
61
+ ### Parameters
62
+
63
+ This endpoint does not need any parameter.
64
+
65
+ ### Return type
66
+
67
+ [**GetPublicTeamResponse**](GetPublicTeamResponse.md)
68
+
69
+ ### Authorization
70
+
71
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
72
+
73
+ ### HTTP request headers
74
+
75
+ - **Content-Type**: Not defined
76
+ - **Accept**: application/json
77
+
78
+
79
+ ## api_v1_team_patch
80
+
81
+ > <GetPublicTeamResponse> api_v1_team_patch(update_team_input)
82
+
83
+ Update team
84
+
85
+ Updates mutable team profile fields (name, emoji, URL, email). Send only the fields you want to change; omitted fields are left unchanged except `name`, which is required on every request.
86
+
87
+ ### Examples
88
+
89
+ ```ruby
90
+ require 'time'
91
+ require 'emailguard_sdk'
92
+ # setup authorization
93
+ Emailguard.configure do |config|
94
+ # Configure API key authorization: ApiKeyAuth
95
+ config.api_key['Authorization'] = 'YOUR API KEY'
96
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
97
+ # config.api_key_prefix['Authorization'] = 'Bearer'
98
+ end
99
+
100
+ api_instance = Emailguard::TeamsApi.new
101
+ update_team_input = Emailguard::UpdateTeamInput.new({name: 'name_example'}) # UpdateTeamInput | Team profile fields to update
102
+
103
+ begin
104
+ # Update team
105
+ result = api_instance.api_v1_team_patch(update_team_input)
106
+ p result
107
+ rescue Emailguard::ApiError => e
108
+ puts "Error when calling TeamsApi->api_v1_team_patch: #{e}"
109
+ end
110
+ ```
111
+
112
+ #### Using the api_v1_team_patch_with_http_info variant
113
+
114
+ This returns an Array which contains the response data, status code and headers.
115
+
116
+ > <Array(<GetPublicTeamResponse>, Integer, Hash)> api_v1_team_patch_with_http_info(update_team_input)
117
+
118
+ ```ruby
119
+ begin
120
+ # Update team
121
+ data, status_code, headers = api_instance.api_v1_team_patch_with_http_info(update_team_input)
122
+ p status_code # => 2xx
123
+ p headers # => { ... }
124
+ p data # => <GetPublicTeamResponse>
125
+ rescue Emailguard::ApiError => e
126
+ puts "Error when calling TeamsApi->api_v1_team_patch_with_http_info: #{e}"
127
+ end
128
+ ```
129
+
130
+ ### Parameters
131
+
132
+ | Name | Type | Description | Notes |
133
+ | ---- | ---- | ----------- | ----- |
134
+ | **update_team_input** | [**UpdateTeamInput**](UpdateTeamInput.md) | Team profile fields to update | |
135
+
136
+ ### Return type
137
+
138
+ [**GetPublicTeamResponse**](GetPublicTeamResponse.md)
139
+
140
+ ### Authorization
141
+
142
+ [ApiKeyAuth](../README.md#ApiKeyAuth)
143
+
144
+ ### HTTP request headers
145
+
146
+ - **Content-Type**: application/json
147
+ - **Accept**: application/json
148
+
@@ -0,0 +1,20 @@
1
+ # Emailguard::UpdateNotificationChannelInput
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **config** | **Hash&lt;String, Object&gt;** | Updated type-specific configuration. Omit to leave unchanged. | [optional] |
8
+ | **name** | **String** | Updated display name. Omit to leave unchanged. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'emailguard_sdk'
14
+
15
+ instance = Emailguard::UpdateNotificationChannelInput.new(
16
+ config: null,
17
+ name: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,28 @@
1
+ # Emailguard::UpdateNotificationRuleInput
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **channels** | [**Array&lt;NotificationRuleChannelInput&gt;**](NotificationRuleChannelInput.md) | Replaces all channel targets when provided. | [optional] |
8
+ | **conditions** | **Hash&lt;String, Object&gt;** | Updated conditions. Omit to leave unchanged. | [optional] |
9
+ | **description** | **String** | Updated description. Omit to leave unchanged. | [optional] |
10
+ | **event_types** | **Array&lt;String&gt;** | Updated event types. Omit to leave unchanged. | [optional] |
11
+ | **is_enabled** | **Boolean** | Enable or disable delivery for this rule. | [optional] |
12
+ | **name** | **String** | Updated display name. Omit to leave unchanged. | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'emailguard_sdk'
18
+
19
+ instance = Emailguard::UpdateNotificationRuleInput.new(
20
+ channels: null,
21
+ conditions: null,
22
+ description: null,
23
+ event_types: null,
24
+ is_enabled: null,
25
+ name: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,24 @@
1
+ # Emailguard::UpdateTeamInput
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **email** | **String** | Contact email address for the team workspace. | [optional] |
8
+ | **emoji** | **String** | Single grapheme emoji shown as the team avatar in the product UI. | [optional] |
9
+ | **name** | **String** | Human-readable team name. | |
10
+ | **url** | **String** | Public website URL for the team. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'emailguard_sdk'
16
+
17
+ instance = Emailguard::UpdateTeamInput.new(
18
+ email: null,
19
+ emoji: null,
20
+ name: null,
21
+ url: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,22 @@
1
+ # Emailguard::UpdateTeamMemberInput
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | Internal team member record ID. When calling the public API, this is set from the path userId. | |
8
+ | **notes** | **String** | Internal notes about the member. Omit to leave unchanged. | [optional] |
9
+ | **role** | **String** | New team role (for example Owner, Admin, Member). Omit to leave unchanged. See [Team roles and permissions](/docs/knowledge-base/team-roles-and-permissions). | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'emailguard_sdk'
15
+
16
+ instance = Emailguard::UpdateTeamMemberInput.new(
17
+ id: null,
18
+ notes: null,
19
+ role: null
20
+ )
21
+ ```
22
+