@iblai/data-layer 1.12.0 → 1.12.3

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.
@@ -128,3 +128,42 @@ export interface RbacResourceListResponse {
128
128
  /** The raw list endpoint payload before normalization. */
129
129
  raw: unknown;
130
130
  }
131
+ /** One row of `GET /api/core/users/accessible/`. */
132
+ export interface AccessibleUser {
133
+ id: number;
134
+ username: string;
135
+ email: string;
136
+ name: string;
137
+ }
138
+ /**
139
+ * Sort orders `GET /api/core/users/accessible/` accepts. A `-` prefix reverses
140
+ * the order.
141
+ */
142
+ export type AccessibleUsersSort = 'email' | 'name' | 'username' | '-email' | '-name' | '-username';
143
+ /**
144
+ * Query params of `GET /api/core/users/accessible/`. A type alias rather than an
145
+ * interface so it keeps the implicit index signature `buildEndpointFromService`
146
+ * requires of its `Args`.
147
+ */
148
+ export type AccessibleUsersRequest = {
149
+ /** Filter by email. */
150
+ email?: string;
151
+ /** Filter by username. */
152
+ username?: string;
153
+ /**
154
+ * RBAC action the caller must hold on a user for them to be listed, e.g.
155
+ * `Ibl.Mentor/Memory/read`. Defaults server-side to `Ibl.Core/Users/read`.
156
+ */
157
+ required_action?: string;
158
+ page?: number;
159
+ page_size?: number;
160
+ /** Defaults server-side to `name`. */
161
+ sort?: AccessibleUsersSort;
162
+ };
163
+ /** Standard DRF envelope returned by `GET /api/core/users/accessible/`. */
164
+ export interface AccessibleUsersListResponse {
165
+ count: number;
166
+ next: string | null;
167
+ previous: string | null;
168
+ results: AccessibleUser[];
169
+ }