Skip to main content

nominal_api_conjure/conjure/endpoints/authentication/api/
authentication_service_v2.rs

1use conjure_http::endpoint;
2/// This service provides operations for managing user and org profiles/settings.
3/// Its name is a bit of a misnomer.
4#[conjure_http::conjure_endpoints(
5    name = "AuthenticationServiceV2",
6    use_legacy_error_serialization
7)]
8pub trait AuthenticationServiceV2 {
9    /// Gets the profile of the authenticated user.
10    #[endpoint(
11        method = GET,
12        path = "/authentication/v2/my/profile",
13        name = "getMyProfile",
14        produces = conjure_http::server::StdResponseSerializer
15    )]
16    fn get_my_profile(
17        &self,
18        #[auth]
19        auth_: conjure_object::BearerToken,
20    ) -> Result<
21        super::super::super::super::objects::authentication::api::UserV2,
22        conjure_http::private::Error,
23    >;
24    /// Updates the profile of the authenticated user.
25    #[endpoint(
26        method = PUT,
27        path = "/authentication/v2/my/profile",
28        name = "updateMyProfile",
29        produces = conjure_http::server::StdResponseSerializer
30    )]
31    fn update_my_profile(
32        &self,
33        #[auth]
34        auth_: conjure_object::BearerToken,
35        #[body(
36            deserializer = conjure_http::server::StdRequestDeserializer,
37            log_as = "updateMyProfileRequest"
38        )]
39        update_my_profile_request: super::super::super::super::objects::authentication::api::UpdateMyProfileRequest,
40    ) -> Result<
41        super::super::super::super::objects::authentication::api::UserV2,
42        conjure_http::private::Error,
43    >;
44    /// Gets the settings of the authenticated user.
45    #[endpoint(
46        method = GET,
47        path = "/authentication/v2/my/settings",
48        name = "getMySettings",
49        produces = conjure_http::server::StdResponseSerializer
50    )]
51    fn get_my_settings(
52        &self,
53        #[auth]
54        auth_: conjure_object::BearerToken,
55    ) -> Result<
56        super::super::super::super::objects::authentication::api::UserSettings,
57        conjure_http::private::Error,
58    >;
59    /// Updates the settings of the authenticated user.
60    #[endpoint(
61        method = PUT,
62        path = "/authentication/v2/my/settings",
63        name = "updateMySettings",
64        produces = conjure_http::server::StdResponseSerializer
65    )]
66    fn update_my_settings(
67        &self,
68        #[auth]
69        auth_: conjure_object::BearerToken,
70        #[body(
71            deserializer = conjure_http::server::StdRequestDeserializer,
72            log_as = "userSettings"
73        )]
74        user_settings: super::super::super::super::objects::authentication::api::UserSettings,
75    ) -> Result<
76        super::super::super::super::objects::authentication::api::UserSettings,
77        conjure_http::private::Error,
78    >;
79    /// Gets the settings of the org of the authenticated user.
80    #[endpoint(
81        method = GET,
82        path = "/authentication/v2/org/settings",
83        name = "getMyOrgSettings",
84        produces = conjure_http::server::StdResponseSerializer
85    )]
86    fn get_my_org_settings(
87        &self,
88        #[auth]
89        auth_: conjure_object::BearerToken,
90    ) -> Result<
91        super::super::super::super::objects::authentication::api::OrgSettings,
92        conjure_http::private::Error,
93    >;
94    /// Updates the settings of the org of the authenticated user.
95    #[endpoint(
96        method = PUT,
97        path = "/authentication/v2/org/settings",
98        name = "updateMyOrgSettings",
99        produces = conjure_http::server::StdResponseSerializer
100    )]
101    fn update_my_org_settings(
102        &self,
103        #[auth]
104        auth_: conjure_object::BearerToken,
105        #[body(
106            deserializer = conjure_http::server::StdRequestDeserializer,
107            log_as = "orgSettings",
108            safe
109        )]
110        org_settings: super::super::super::super::objects::authentication::api::OrgSettings,
111    ) -> Result<
112        super::super::super::super::objects::authentication::api::OrgSettings,
113        conjure_http::private::Error,
114    >;
115    /// Searches for users by email and displayName.
116    #[endpoint(
117        method = POST,
118        path = "/authentication/v2/users",
119        name = "searchUsersV2",
120        produces = conjure_http::server::StdResponseSerializer
121    )]
122    fn search_users_v2(
123        &self,
124        #[auth]
125        auth_: conjure_object::BearerToken,
126        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
127        request: super::super::super::super::objects::authentication::api::SearchUsersRequest,
128    ) -> Result<
129        super::super::super::super::objects::authentication::api::SearchUsersResponseV2,
130        conjure_http::private::Error,
131    >;
132    /// Get users by RID. Returns objects for any of the requested RIDs that are members or
133    /// guests of the caller's org.
134    #[endpoint(
135        method = POST,
136        path = "/authentication/v2/users/batch",
137        name = "getUsers",
138        produces = conjure_http::server::conjure::CollectionResponseSerializer
139    )]
140    fn get_users(
141        &self,
142        #[auth]
143        auth_: conjure_object::BearerToken,
144        #[body(
145            deserializer = conjure_http::server::StdRequestDeserializer,
146            log_as = "userRids",
147            safe
148        )]
149        user_rids: std::collections::BTreeSet<
150            super::super::super::super::objects::authentication::api::UserRid,
151        >,
152    ) -> Result<
153        std::collections::BTreeSet<
154            super::super::super::super::objects::authentication::api::UserV2,
155        >,
156        conjure_http::private::Error,
157    >;
158    /// Gets a user by RID. Throws if the requested RID is not a member or guest of the caller's org.
159    #[endpoint(
160        method = GET,
161        path = "/authentication/v2/users/{userRid}",
162        name = "getUser",
163        produces = conjure_http::server::StdResponseSerializer
164    )]
165    fn get_user(
166        &self,
167        #[auth]
168        auth_: conjure_object::BearerToken,
169        #[path(
170            name = "userRid",
171            decoder = conjure_http::server::conjure::FromPlainDecoder,
172            log_as = "userRid",
173            safe
174        )]
175        user_rid: super::super::super::super::objects::authentication::api::UserRid,
176    ) -> Result<
177        super::super::super::super::objects::authentication::api::UserV2,
178        conjure_http::private::Error,
179    >;
180    /// Returns JWKS (JSON Web Key Set) for MediaMTX JWT verification.
181    /// Only available if MediaMTX integration is enabled.
182    #[endpoint(
183        method = GET,
184        path = "/authentication/v2/jwks",
185        name = "getJwks",
186        produces = conjure_http::server::StdResponseSerializer
187    )]
188    fn get_jwks(
189        &self,
190    ) -> Result<
191        super::super::super::super::objects::authentication::api::Jwks,
192        conjure_http::private::Error,
193    >;
194    /// Generates a JWT token for MediaMTX authentication with a 2-hour expiration.
195    /// The token is signed with the MediaMTX private key and contains the specified permissions.
196    /// Requires authentication with Nominal. This endpoint is intended for internal use only.
197    #[endpoint(
198        method = POST,
199        path = "/authentication/v2/mediamtx/token",
200        name = "generateMediaMtxToken",
201        produces = conjure_http::server::StdResponseSerializer
202    )]
203    fn generate_media_mtx_token(
204        &self,
205        #[auth]
206        auth_: conjure_object::BearerToken,
207        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
208        request: super::super::super::super::objects::authentication::api::GenerateMediaMtxTokenRequest,
209    ) -> Result<
210        super::super::super::super::objects::authentication::api::GenerateMediaMtxTokenResponse,
211        conjure_http::private::Error,
212    >;
213    /// Batch preregister users in the caller's organization. Only creates new users for
214    /// emails that don't already exist — existing accounts are silently skipped and not
215    /// returned in the response. The caller must be an admin of the organization.
216    #[endpoint(
217        method = POST,
218        path = "/authentication/v2/batch-preregister-users",
219        name = "batchPreregisterUsers",
220        produces = conjure_http::server::StdResponseSerializer
221    )]
222    fn batch_preregister_users(
223        &self,
224        #[auth]
225        auth_: conjure_object::BearerToken,
226        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
227        request: super::super::super::super::objects::authentication::api::BatchPreregisterUsersRequest,
228    ) -> Result<
229        super::super::super::super::objects::authentication::api::BatchPreregisterUsersResponse,
230        conjure_http::private::Error,
231    >;
232    /// Lists members of one or more orgs together with their most recent login into each org,
233    /// sorted and paginated. The caller must be an admin of every org requested — defaults to
234    /// the caller's own org if none are specified.
235    #[endpoint(
236        method = POST,
237        path = "/authentication/v2/admin/org/login-activity",
238        name = "listOrgLoginActivity",
239        produces = conjure_http::server::StdResponseSerializer
240    )]
241    fn list_org_login_activity(
242        &self,
243        #[auth]
244        auth_: conjure_object::BearerToken,
245        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
246        request: super::super::super::super::objects::authentication::api::ListOrgLoginActivityRequest,
247    ) -> Result<
248        super::super::super::super::objects::authentication::api::ListOrgLoginActivityResponse,
249        conjure_http::private::Error,
250    >;
251    /// Deactivates a user in the caller's organization, preventing them from obtaining new
252    /// Nominal session tokens in that org. Also revokes all of the user's API keys in the
253    /// caller's organization. Caller must be an admin of their  org. Target user must be a
254    /// member or guest of the org.
255    #[endpoint(
256        method = POST,
257        path = "/authentication/v2/admin/users/{userRid}/deactivate",
258        name = "deactivateUser"
259    )]
260    fn deactivate_user(
261        &self,
262        #[auth]
263        auth_: conjure_object::BearerToken,
264        #[path(
265            name = "userRid",
266            decoder = conjure_http::server::conjure::FromPlainDecoder,
267            log_as = "userRid",
268            safe
269        )]
270        user_rid: super::super::super::super::objects::authentication::api::UserRid,
271    ) -> Result<(), conjure_http::private::Error>;
272    /// Reactivates a user in the caller's organization. Caller must be an admin of their
273    /// org. Target user must be a member or guest of the org.
274    #[endpoint(
275        method = POST,
276        path = "/authentication/v2/admin/users/{userRid}/reactivate",
277        name = "reactivateUser"
278    )]
279    fn reactivate_user(
280        &self,
281        #[auth]
282        auth_: conjure_object::BearerToken,
283        #[path(
284            name = "userRid",
285            decoder = conjure_http::server::conjure::FromPlainDecoder,
286            log_as = "userRid",
287            safe
288        )]
289        user_rid: super::super::super::super::objects::authentication::api::UserRid,
290    ) -> Result<(), conjure_http::private::Error>;
291}
292/// This service provides operations for managing user and org profiles/settings.
293/// Its name is a bit of a misnomer.
294#[conjure_http::conjure_endpoints(
295    name = "AuthenticationServiceV2",
296    use_legacy_error_serialization
297)]
298pub trait AsyncAuthenticationServiceV2 {
299    /// Gets the profile of the authenticated user.
300    #[endpoint(
301        method = GET,
302        path = "/authentication/v2/my/profile",
303        name = "getMyProfile",
304        produces = conjure_http::server::StdResponseSerializer
305    )]
306    async fn get_my_profile(
307        &self,
308        #[auth]
309        auth_: conjure_object::BearerToken,
310    ) -> Result<
311        super::super::super::super::objects::authentication::api::UserV2,
312        conjure_http::private::Error,
313    >;
314    /// Updates the profile of the authenticated user.
315    #[endpoint(
316        method = PUT,
317        path = "/authentication/v2/my/profile",
318        name = "updateMyProfile",
319        produces = conjure_http::server::StdResponseSerializer
320    )]
321    async fn update_my_profile(
322        &self,
323        #[auth]
324        auth_: conjure_object::BearerToken,
325        #[body(
326            deserializer = conjure_http::server::StdRequestDeserializer,
327            log_as = "updateMyProfileRequest"
328        )]
329        update_my_profile_request: super::super::super::super::objects::authentication::api::UpdateMyProfileRequest,
330    ) -> Result<
331        super::super::super::super::objects::authentication::api::UserV2,
332        conjure_http::private::Error,
333    >;
334    /// Gets the settings of the authenticated user.
335    #[endpoint(
336        method = GET,
337        path = "/authentication/v2/my/settings",
338        name = "getMySettings",
339        produces = conjure_http::server::StdResponseSerializer
340    )]
341    async fn get_my_settings(
342        &self,
343        #[auth]
344        auth_: conjure_object::BearerToken,
345    ) -> Result<
346        super::super::super::super::objects::authentication::api::UserSettings,
347        conjure_http::private::Error,
348    >;
349    /// Updates the settings of the authenticated user.
350    #[endpoint(
351        method = PUT,
352        path = "/authentication/v2/my/settings",
353        name = "updateMySettings",
354        produces = conjure_http::server::StdResponseSerializer
355    )]
356    async fn update_my_settings(
357        &self,
358        #[auth]
359        auth_: conjure_object::BearerToken,
360        #[body(
361            deserializer = conjure_http::server::StdRequestDeserializer,
362            log_as = "userSettings"
363        )]
364        user_settings: super::super::super::super::objects::authentication::api::UserSettings,
365    ) -> Result<
366        super::super::super::super::objects::authentication::api::UserSettings,
367        conjure_http::private::Error,
368    >;
369    /// Gets the settings of the org of the authenticated user.
370    #[endpoint(
371        method = GET,
372        path = "/authentication/v2/org/settings",
373        name = "getMyOrgSettings",
374        produces = conjure_http::server::StdResponseSerializer
375    )]
376    async fn get_my_org_settings(
377        &self,
378        #[auth]
379        auth_: conjure_object::BearerToken,
380    ) -> Result<
381        super::super::super::super::objects::authentication::api::OrgSettings,
382        conjure_http::private::Error,
383    >;
384    /// Updates the settings of the org of the authenticated user.
385    #[endpoint(
386        method = PUT,
387        path = "/authentication/v2/org/settings",
388        name = "updateMyOrgSettings",
389        produces = conjure_http::server::StdResponseSerializer
390    )]
391    async fn update_my_org_settings(
392        &self,
393        #[auth]
394        auth_: conjure_object::BearerToken,
395        #[body(
396            deserializer = conjure_http::server::StdRequestDeserializer,
397            log_as = "orgSettings",
398            safe
399        )]
400        org_settings: super::super::super::super::objects::authentication::api::OrgSettings,
401    ) -> Result<
402        super::super::super::super::objects::authentication::api::OrgSettings,
403        conjure_http::private::Error,
404    >;
405    /// Searches for users by email and displayName.
406    #[endpoint(
407        method = POST,
408        path = "/authentication/v2/users",
409        name = "searchUsersV2",
410        produces = conjure_http::server::StdResponseSerializer
411    )]
412    async fn search_users_v2(
413        &self,
414        #[auth]
415        auth_: conjure_object::BearerToken,
416        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
417        request: super::super::super::super::objects::authentication::api::SearchUsersRequest,
418    ) -> Result<
419        super::super::super::super::objects::authentication::api::SearchUsersResponseV2,
420        conjure_http::private::Error,
421    >;
422    /// Get users by RID. Returns objects for any of the requested RIDs that are members or
423    /// guests of the caller's org.
424    #[endpoint(
425        method = POST,
426        path = "/authentication/v2/users/batch",
427        name = "getUsers",
428        produces = conjure_http::server::conjure::CollectionResponseSerializer
429    )]
430    async fn get_users(
431        &self,
432        #[auth]
433        auth_: conjure_object::BearerToken,
434        #[body(
435            deserializer = conjure_http::server::StdRequestDeserializer,
436            log_as = "userRids",
437            safe
438        )]
439        user_rids: std::collections::BTreeSet<
440            super::super::super::super::objects::authentication::api::UserRid,
441        >,
442    ) -> Result<
443        std::collections::BTreeSet<
444            super::super::super::super::objects::authentication::api::UserV2,
445        >,
446        conjure_http::private::Error,
447    >;
448    /// Gets a user by RID. Throws if the requested RID is not a member or guest of the caller's org.
449    #[endpoint(
450        method = GET,
451        path = "/authentication/v2/users/{userRid}",
452        name = "getUser",
453        produces = conjure_http::server::StdResponseSerializer
454    )]
455    async fn get_user(
456        &self,
457        #[auth]
458        auth_: conjure_object::BearerToken,
459        #[path(
460            name = "userRid",
461            decoder = conjure_http::server::conjure::FromPlainDecoder,
462            log_as = "userRid",
463            safe
464        )]
465        user_rid: super::super::super::super::objects::authentication::api::UserRid,
466    ) -> Result<
467        super::super::super::super::objects::authentication::api::UserV2,
468        conjure_http::private::Error,
469    >;
470    /// Returns JWKS (JSON Web Key Set) for MediaMTX JWT verification.
471    /// Only available if MediaMTX integration is enabled.
472    #[endpoint(
473        method = GET,
474        path = "/authentication/v2/jwks",
475        name = "getJwks",
476        produces = conjure_http::server::StdResponseSerializer
477    )]
478    async fn get_jwks(
479        &self,
480    ) -> Result<
481        super::super::super::super::objects::authentication::api::Jwks,
482        conjure_http::private::Error,
483    >;
484    /// Generates a JWT token for MediaMTX authentication with a 2-hour expiration.
485    /// The token is signed with the MediaMTX private key and contains the specified permissions.
486    /// Requires authentication with Nominal. This endpoint is intended for internal use only.
487    #[endpoint(
488        method = POST,
489        path = "/authentication/v2/mediamtx/token",
490        name = "generateMediaMtxToken",
491        produces = conjure_http::server::StdResponseSerializer
492    )]
493    async fn generate_media_mtx_token(
494        &self,
495        #[auth]
496        auth_: conjure_object::BearerToken,
497        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
498        request: super::super::super::super::objects::authentication::api::GenerateMediaMtxTokenRequest,
499    ) -> Result<
500        super::super::super::super::objects::authentication::api::GenerateMediaMtxTokenResponse,
501        conjure_http::private::Error,
502    >;
503    /// Batch preregister users in the caller's organization. Only creates new users for
504    /// emails that don't already exist — existing accounts are silently skipped and not
505    /// returned in the response. The caller must be an admin of the organization.
506    #[endpoint(
507        method = POST,
508        path = "/authentication/v2/batch-preregister-users",
509        name = "batchPreregisterUsers",
510        produces = conjure_http::server::StdResponseSerializer
511    )]
512    async fn batch_preregister_users(
513        &self,
514        #[auth]
515        auth_: conjure_object::BearerToken,
516        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
517        request: super::super::super::super::objects::authentication::api::BatchPreregisterUsersRequest,
518    ) -> Result<
519        super::super::super::super::objects::authentication::api::BatchPreregisterUsersResponse,
520        conjure_http::private::Error,
521    >;
522    /// Lists members of one or more orgs together with their most recent login into each org,
523    /// sorted and paginated. The caller must be an admin of every org requested — defaults to
524    /// the caller's own org if none are specified.
525    #[endpoint(
526        method = POST,
527        path = "/authentication/v2/admin/org/login-activity",
528        name = "listOrgLoginActivity",
529        produces = conjure_http::server::StdResponseSerializer
530    )]
531    async fn list_org_login_activity(
532        &self,
533        #[auth]
534        auth_: conjure_object::BearerToken,
535        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
536        request: super::super::super::super::objects::authentication::api::ListOrgLoginActivityRequest,
537    ) -> Result<
538        super::super::super::super::objects::authentication::api::ListOrgLoginActivityResponse,
539        conjure_http::private::Error,
540    >;
541    /// Deactivates a user in the caller's organization, preventing them from obtaining new
542    /// Nominal session tokens in that org. Also revokes all of the user's API keys in the
543    /// caller's organization. Caller must be an admin of their  org. Target user must be a
544    /// member or guest of the org.
545    #[endpoint(
546        method = POST,
547        path = "/authentication/v2/admin/users/{userRid}/deactivate",
548        name = "deactivateUser"
549    )]
550    async fn deactivate_user(
551        &self,
552        #[auth]
553        auth_: conjure_object::BearerToken,
554        #[path(
555            name = "userRid",
556            decoder = conjure_http::server::conjure::FromPlainDecoder,
557            log_as = "userRid",
558            safe
559        )]
560        user_rid: super::super::super::super::objects::authentication::api::UserRid,
561    ) -> Result<(), conjure_http::private::Error>;
562    /// Reactivates a user in the caller's organization. Caller must be an admin of their
563    /// org. Target user must be a member or guest of the org.
564    #[endpoint(
565        method = POST,
566        path = "/authentication/v2/admin/users/{userRid}/reactivate",
567        name = "reactivateUser"
568    )]
569    async fn reactivate_user(
570        &self,
571        #[auth]
572        auth_: conjure_object::BearerToken,
573        #[path(
574            name = "userRid",
575            decoder = conjure_http::server::conjure::FromPlainDecoder,
576            log_as = "userRid",
577            safe
578        )]
579        user_rid: super::super::super::super::objects::authentication::api::UserRid,
580    ) -> Result<(), conjure_http::private::Error>;
581}
582/// This service provides operations for managing user and org profiles/settings.
583/// Its name is a bit of a misnomer.
584#[conjure_http::conjure_endpoints(
585    name = "AuthenticationServiceV2",
586    use_legacy_error_serialization,
587    local
588)]
589pub trait LocalAsyncAuthenticationServiceV2 {
590    /// Gets the profile of the authenticated user.
591    #[endpoint(
592        method = GET,
593        path = "/authentication/v2/my/profile",
594        name = "getMyProfile",
595        produces = conjure_http::server::StdResponseSerializer
596    )]
597    async fn get_my_profile(
598        &self,
599        #[auth]
600        auth_: conjure_object::BearerToken,
601    ) -> Result<
602        super::super::super::super::objects::authentication::api::UserV2,
603        conjure_http::private::Error,
604    >;
605    /// Updates the profile of the authenticated user.
606    #[endpoint(
607        method = PUT,
608        path = "/authentication/v2/my/profile",
609        name = "updateMyProfile",
610        produces = conjure_http::server::StdResponseSerializer
611    )]
612    async fn update_my_profile(
613        &self,
614        #[auth]
615        auth_: conjure_object::BearerToken,
616        #[body(
617            deserializer = conjure_http::server::StdRequestDeserializer,
618            log_as = "updateMyProfileRequest"
619        )]
620        update_my_profile_request: super::super::super::super::objects::authentication::api::UpdateMyProfileRequest,
621    ) -> Result<
622        super::super::super::super::objects::authentication::api::UserV2,
623        conjure_http::private::Error,
624    >;
625    /// Gets the settings of the authenticated user.
626    #[endpoint(
627        method = GET,
628        path = "/authentication/v2/my/settings",
629        name = "getMySettings",
630        produces = conjure_http::server::StdResponseSerializer
631    )]
632    async fn get_my_settings(
633        &self,
634        #[auth]
635        auth_: conjure_object::BearerToken,
636    ) -> Result<
637        super::super::super::super::objects::authentication::api::UserSettings,
638        conjure_http::private::Error,
639    >;
640    /// Updates the settings of the authenticated user.
641    #[endpoint(
642        method = PUT,
643        path = "/authentication/v2/my/settings",
644        name = "updateMySettings",
645        produces = conjure_http::server::StdResponseSerializer
646    )]
647    async fn update_my_settings(
648        &self,
649        #[auth]
650        auth_: conjure_object::BearerToken,
651        #[body(
652            deserializer = conjure_http::server::StdRequestDeserializer,
653            log_as = "userSettings"
654        )]
655        user_settings: super::super::super::super::objects::authentication::api::UserSettings,
656    ) -> Result<
657        super::super::super::super::objects::authentication::api::UserSettings,
658        conjure_http::private::Error,
659    >;
660    /// Gets the settings of the org of the authenticated user.
661    #[endpoint(
662        method = GET,
663        path = "/authentication/v2/org/settings",
664        name = "getMyOrgSettings",
665        produces = conjure_http::server::StdResponseSerializer
666    )]
667    async fn get_my_org_settings(
668        &self,
669        #[auth]
670        auth_: conjure_object::BearerToken,
671    ) -> Result<
672        super::super::super::super::objects::authentication::api::OrgSettings,
673        conjure_http::private::Error,
674    >;
675    /// Updates the settings of the org of the authenticated user.
676    #[endpoint(
677        method = PUT,
678        path = "/authentication/v2/org/settings",
679        name = "updateMyOrgSettings",
680        produces = conjure_http::server::StdResponseSerializer
681    )]
682    async fn update_my_org_settings(
683        &self,
684        #[auth]
685        auth_: conjure_object::BearerToken,
686        #[body(
687            deserializer = conjure_http::server::StdRequestDeserializer,
688            log_as = "orgSettings",
689            safe
690        )]
691        org_settings: super::super::super::super::objects::authentication::api::OrgSettings,
692    ) -> Result<
693        super::super::super::super::objects::authentication::api::OrgSettings,
694        conjure_http::private::Error,
695    >;
696    /// Searches for users by email and displayName.
697    #[endpoint(
698        method = POST,
699        path = "/authentication/v2/users",
700        name = "searchUsersV2",
701        produces = conjure_http::server::StdResponseSerializer
702    )]
703    async fn search_users_v2(
704        &self,
705        #[auth]
706        auth_: conjure_object::BearerToken,
707        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
708        request: super::super::super::super::objects::authentication::api::SearchUsersRequest,
709    ) -> Result<
710        super::super::super::super::objects::authentication::api::SearchUsersResponseV2,
711        conjure_http::private::Error,
712    >;
713    /// Get users by RID. Returns objects for any of the requested RIDs that are members or
714    /// guests of the caller's org.
715    #[endpoint(
716        method = POST,
717        path = "/authentication/v2/users/batch",
718        name = "getUsers",
719        produces = conjure_http::server::conjure::CollectionResponseSerializer
720    )]
721    async fn get_users(
722        &self,
723        #[auth]
724        auth_: conjure_object::BearerToken,
725        #[body(
726            deserializer = conjure_http::server::StdRequestDeserializer,
727            log_as = "userRids",
728            safe
729        )]
730        user_rids: std::collections::BTreeSet<
731            super::super::super::super::objects::authentication::api::UserRid,
732        >,
733    ) -> Result<
734        std::collections::BTreeSet<
735            super::super::super::super::objects::authentication::api::UserV2,
736        >,
737        conjure_http::private::Error,
738    >;
739    /// Gets a user by RID. Throws if the requested RID is not a member or guest of the caller's org.
740    #[endpoint(
741        method = GET,
742        path = "/authentication/v2/users/{userRid}",
743        name = "getUser",
744        produces = conjure_http::server::StdResponseSerializer
745    )]
746    async fn get_user(
747        &self,
748        #[auth]
749        auth_: conjure_object::BearerToken,
750        #[path(
751            name = "userRid",
752            decoder = conjure_http::server::conjure::FromPlainDecoder,
753            log_as = "userRid",
754            safe
755        )]
756        user_rid: super::super::super::super::objects::authentication::api::UserRid,
757    ) -> Result<
758        super::super::super::super::objects::authentication::api::UserV2,
759        conjure_http::private::Error,
760    >;
761    /// Returns JWKS (JSON Web Key Set) for MediaMTX JWT verification.
762    /// Only available if MediaMTX integration is enabled.
763    #[endpoint(
764        method = GET,
765        path = "/authentication/v2/jwks",
766        name = "getJwks",
767        produces = conjure_http::server::StdResponseSerializer
768    )]
769    async fn get_jwks(
770        &self,
771    ) -> Result<
772        super::super::super::super::objects::authentication::api::Jwks,
773        conjure_http::private::Error,
774    >;
775    /// Generates a JWT token for MediaMTX authentication with a 2-hour expiration.
776    /// The token is signed with the MediaMTX private key and contains the specified permissions.
777    /// Requires authentication with Nominal. This endpoint is intended for internal use only.
778    #[endpoint(
779        method = POST,
780        path = "/authentication/v2/mediamtx/token",
781        name = "generateMediaMtxToken",
782        produces = conjure_http::server::StdResponseSerializer
783    )]
784    async fn generate_media_mtx_token(
785        &self,
786        #[auth]
787        auth_: conjure_object::BearerToken,
788        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
789        request: super::super::super::super::objects::authentication::api::GenerateMediaMtxTokenRequest,
790    ) -> Result<
791        super::super::super::super::objects::authentication::api::GenerateMediaMtxTokenResponse,
792        conjure_http::private::Error,
793    >;
794    /// Batch preregister users in the caller's organization. Only creates new users for
795    /// emails that don't already exist — existing accounts are silently skipped and not
796    /// returned in the response. The caller must be an admin of the organization.
797    #[endpoint(
798        method = POST,
799        path = "/authentication/v2/batch-preregister-users",
800        name = "batchPreregisterUsers",
801        produces = conjure_http::server::StdResponseSerializer
802    )]
803    async fn batch_preregister_users(
804        &self,
805        #[auth]
806        auth_: conjure_object::BearerToken,
807        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
808        request: super::super::super::super::objects::authentication::api::BatchPreregisterUsersRequest,
809    ) -> Result<
810        super::super::super::super::objects::authentication::api::BatchPreregisterUsersResponse,
811        conjure_http::private::Error,
812    >;
813    /// Lists members of one or more orgs together with their most recent login into each org,
814    /// sorted and paginated. The caller must be an admin of every org requested — defaults to
815    /// the caller's own org if none are specified.
816    #[endpoint(
817        method = POST,
818        path = "/authentication/v2/admin/org/login-activity",
819        name = "listOrgLoginActivity",
820        produces = conjure_http::server::StdResponseSerializer
821    )]
822    async fn list_org_login_activity(
823        &self,
824        #[auth]
825        auth_: conjure_object::BearerToken,
826        #[body(deserializer = conjure_http::server::StdRequestDeserializer)]
827        request: super::super::super::super::objects::authentication::api::ListOrgLoginActivityRequest,
828    ) -> Result<
829        super::super::super::super::objects::authentication::api::ListOrgLoginActivityResponse,
830        conjure_http::private::Error,
831    >;
832    /// Deactivates a user in the caller's organization, preventing them from obtaining new
833    /// Nominal session tokens in that org. Also revokes all of the user's API keys in the
834    /// caller's organization. Caller must be an admin of their  org. Target user must be a
835    /// member or guest of the org.
836    #[endpoint(
837        method = POST,
838        path = "/authentication/v2/admin/users/{userRid}/deactivate",
839        name = "deactivateUser"
840    )]
841    async fn deactivate_user(
842        &self,
843        #[auth]
844        auth_: conjure_object::BearerToken,
845        #[path(
846            name = "userRid",
847            decoder = conjure_http::server::conjure::FromPlainDecoder,
848            log_as = "userRid",
849            safe
850        )]
851        user_rid: super::super::super::super::objects::authentication::api::UserRid,
852    ) -> Result<(), conjure_http::private::Error>;
853    /// Reactivates a user in the caller's organization. Caller must be an admin of their
854    /// org. Target user must be a member or guest of the org.
855    #[endpoint(
856        method = POST,
857        path = "/authentication/v2/admin/users/{userRid}/reactivate",
858        name = "reactivateUser"
859    )]
860    async fn reactivate_user(
861        &self,
862        #[auth]
863        auth_: conjure_object::BearerToken,
864        #[path(
865            name = "userRid",
866            decoder = conjure_http::server::conjure::FromPlainDecoder,
867            log_as = "userRid",
868            safe
869        )]
870        user_rid: super::super::super::super::objects::authentication::api::UserRid,
871    ) -> Result<(), conjure_http::private::Error>;
872}