@@ -133,16 +133,38 @@ public class UserOperations : IUserOperations
133
133
public Task < UserEntity > ActivateUserAsync ( ActivateUserEntity entity , CancellationToken cancellationToken = default ( CancellationToken ) ) {
134
134
return _client . RequestJsonSerializedAsync < ActivateUserEntity , UserEntity > ( HttpMethod . Post , "user/activate" , entity , cancellationToken ) ;
135
135
}
136
+
137
+ /// <summary>
138
+ /// Adds an endpoint entity.
139
+ /// </summary>
140
+ /// <param name="entity">The endpoint add entity.</param>
141
+ /// <param name="cancellationToken">The cancellation token.</param>
142
+ /// <remarks>This operation is internal and won't work with normal API keys. Nor is it stable.</remarks>
143
+ /// <returns>The endpoint entity.</returns>
144
+ public Task < EndpointEntity > AddEndpointAsync ( EndpointAddEntity entity , CancellationToken cancellationToken = default ( CancellationToken ) ) {
145
+ return _client . RequestJsonSerializedAsync < EndpointAddEntity , EndpointEntity > ( HttpMethod . Post , "user/endpoint/add" , entity , cancellationToken ) ;
146
+ }
136
147
137
148
/// <summary>
138
- /// Adds a user notification token to the current user .
149
+ /// Gets an endpoint entity .
139
150
/// </summary>
140
- /// <param name="entity">The entity.</param>
151
+ /// <param name="endpointUuid">The endpoint UUID.</param>
152
+ /// <param name="cancellationToken">The cancellation token.</param>
153
+ /// <returns>The endpoint entity.</returns>
154
+ public Task < EndpointEntity > GetEndpointAsync ( Guid endpointUuid , CancellationToken cancellationToken = default ( CancellationToken ) ) {
155
+ return _client . RequestJsonSerializedAsync < EndpointEntity > ( HttpMethod . Get , $ "user/endpoint/{ endpointUuid } ", cancellationToken ) ;
156
+ }
157
+
158
+ /// <summary>
159
+ /// Edits an endpoints notification token.
160
+ /// </summary>
161
+ /// <param name="endpointUuid">The endpoint UUID.</param>
162
+ /// <param name="entity">The endpoint add notification entity.</param>
141
163
/// <param name="cancellationToken">The cancellation token.</param>
142
164
/// <remarks>This operation is internal and won't work with normal API keys. Nor is it stable.</remarks>
143
165
/// <returns></returns>
144
- public Task AddUserNotificationAsync ( UserNotificationAddEntity entity , CancellationToken cancellationToken = default ( CancellationToken ) ) {
145
- return _client . RequestJsonSerializedAsync ( HttpMethod . Post , "user/notification/add " , entity , cancellationToken ) ;
166
+ public Task EditEndpointNotificationAsync ( Guid endpointUuid , EndpointEditNotificationEntity entity , CancellationToken cancellationToken = default ( CancellationToken ) ) {
167
+ return _client . RequestJsonSerializedAsync ( HttpMethod . Post , $ "user/endpoint/ { endpointUuid } /push_notification ", entity , cancellationToken ) ;
146
168
}
147
169
148
170
/// <summary>
0 commit comments