@~lyre/auth 0.8.0 → 0.9.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.
- package/dist/admin.d.ts +54 -0
- package/package.json +1 -1
package/dist/admin.d.ts
CHANGED
|
@@ -123,7 +123,34 @@ interface GroupMember {
|
|
|
123
123
|
name?: string | null;
|
|
124
124
|
firstName?: string | null;
|
|
125
125
|
lastName?: string | null;
|
|
126
|
+
/**
|
|
127
|
+
* The group MEMBERSHIP role (`owner` / `admin` / `member`) — how this person relates to the
|
|
128
|
+
* workspace itself. NOT the app's account type; see `appRoles`.
|
|
129
|
+
*/
|
|
126
130
|
role?: string | null;
|
|
131
|
+
/**
|
|
132
|
+
* The app's own RBAC roles for this member, scoped to this group (e.g. `engage:admin`,
|
|
133
|
+
* `engage:agent`). This is what "account type" means to a consumer, and what an account-type
|
|
134
|
+
* change writes. Empty when the member holds no group-scoped app role.
|
|
135
|
+
*/
|
|
136
|
+
appRoles?: string[];
|
|
137
|
+
/** Set when the account is deactivated in Accounts; null for an active account. */
|
|
138
|
+
disabledAt?: string | null;
|
|
139
|
+
/** When the user account was created (ISO). */
|
|
140
|
+
createdAt?: string | null;
|
|
141
|
+
/**
|
|
142
|
+
* Last sign-in (ISO), or null for someone who has never signed in.
|
|
143
|
+
*
|
|
144
|
+
* Derived from `MAX(sessions.last_seen_at)` — the definition Accounts uses everywhere else for
|
|
145
|
+
* this question. There is no separate `last_login_at` column.
|
|
146
|
+
*/
|
|
147
|
+
lastSeenAt?: string | null;
|
|
148
|
+
/**
|
|
149
|
+
* App-scoped profile values (`phone_number`, `assignable`, `availability`, …). Present only when
|
|
150
|
+
* the request passed an `appId`; profile data is app-scoped by definition. Values are strings —
|
|
151
|
+
* the store is an EAV of text — so a boolean reads as `'true'` / `'false'`.
|
|
152
|
+
*/
|
|
153
|
+
profileData?: Record<string, string>;
|
|
127
154
|
}
|
|
128
155
|
/** Thrown on a non-2xx Accounts response so callers can surface the upstream message + status. */
|
|
129
156
|
declare class AccountsAdminError extends Error {
|
|
@@ -173,6 +200,33 @@ declare class AccountsAdmin {
|
|
|
173
200
|
* Accounts drops any key the app does not collect, so authorization-shaped values
|
|
174
201
|
* (role, assignability) can never be set from here. */
|
|
175
202
|
profileData?: Record<string, string> | null;
|
|
203
|
+
/**
|
|
204
|
+
* The inviting app's OAuth callback — where accepting the invite should land the invitee.
|
|
205
|
+
*
|
|
206
|
+
* Acceptance hands off to `/auth/authorize`, which requires a redirect_uri it can validate
|
|
207
|
+
* against the app's authorized list; without one the invitee reaches the gateway app
|
|
208
|
+
* chooser instead of the app that invited them. Must already be in that allowlist — an
|
|
209
|
+
* unauthorized value is rejected at invite time (400) rather than stored.
|
|
210
|
+
*/
|
|
211
|
+
redirectUri?: string | null;
|
|
212
|
+
/**
|
|
213
|
+
* The roles to grant when this invite is accepted, overriding the app's configured default
|
|
214
|
+
* invite roles. Role IDS resolved by the caller from its own vocabulary — Accounts has no
|
|
215
|
+
* notion of "admin" or "agent".
|
|
216
|
+
*
|
|
217
|
+
* A LIST because one account type commonly means several roles. Each id is validated as
|
|
218
|
+
* grantable by the inviting app at invite time (400 if not), so a bad invite fails the
|
|
219
|
+
* person creating it rather than the person accepting it.
|
|
220
|
+
*/
|
|
221
|
+
invitedRoleIds?: string[] | null;
|
|
222
|
+
/**
|
|
223
|
+
* App-scoped `assignable` default, written to the invitee's profile on acceptance.
|
|
224
|
+
*
|
|
225
|
+
* A COLUMN on the invite, not a `profileData` key: it is authorization (whether work can be
|
|
226
|
+
* routed to this person) and the profile bag is invitee-editable, so Accounts drops it from
|
|
227
|
+
* there by design. Omit to leave unset — readers treat missing as assignable.
|
|
228
|
+
*/
|
|
229
|
+
assignable?: boolean | null;
|
|
176
230
|
}): Promise<InviteResult>;
|
|
177
231
|
/**
|
|
178
232
|
* The profile fields this app collects about a SUBJECT — the spec to render a form from.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@~lyre/auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Shared Axis Accounts auth SDK — framework-agnostic session/identity core (HMAC-signed cookies, accounts login/callback/logout) plus an optional turnkey SvelteKit adapter.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|