@meistrari/auth-core 3.1.0 → 3.3.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/index.d.mts +227 -101
- package/dist/index.d.ts +227 -101
- package/dist/index.mjs +181 -22
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -651,12 +651,22 @@ type ListCandidateOrganizationsResponse = Array<FullOrganization & {
|
|
|
651
651
|
*/
|
|
652
652
|
lastUsed?: boolean;
|
|
653
653
|
}>;
|
|
654
|
+
/**
|
|
655
|
+
* Whether an application refuses sign-ins, and the notice shown to users who
|
|
656
|
+
* try to sign in through it.
|
|
657
|
+
*/
|
|
658
|
+
type ApplicationDeprecation = {
|
|
659
|
+
/** Whether the application is disabled. A disabled application refuses every sign-in. */
|
|
660
|
+
disabled: boolean;
|
|
661
|
+
/** Plain-text notice written by an admin, or `null` when the application is enabled or has none. */
|
|
662
|
+
deprecationNotice: string | null;
|
|
663
|
+
};
|
|
654
664
|
/**
|
|
655
665
|
* Public application context used to preserve continuity during auth redirects.
|
|
656
666
|
*/
|
|
657
667
|
type ApplicationAuthContextResponse = {
|
|
658
668
|
/** Minimal application identity shown in the hosted auth flow. */
|
|
659
|
-
application: Pick<Application, 'id' | 'name' | 'config'
|
|
669
|
+
application: Pick<Application, 'id' | 'name' | 'config'> & ApplicationDeprecation;
|
|
660
670
|
/**
|
|
661
671
|
* Login methods usable for this application: the environment allowlist
|
|
662
672
|
* intersected with the application's accepted AMRs.
|
|
@@ -757,7 +767,7 @@ type DeviceContextApplication = {
|
|
|
757
767
|
name: string;
|
|
758
768
|
/** Human-readable description, or `null` if not set. */
|
|
759
769
|
description: string | null;
|
|
760
|
-
};
|
|
770
|
+
} & ApplicationDeprecation;
|
|
761
771
|
/**
|
|
762
772
|
* Context information for a pending device authorization request.
|
|
763
773
|
*/
|
|
@@ -768,7 +778,7 @@ type DeviceAuthorizationContextResponse = {
|
|
|
768
778
|
};
|
|
769
779
|
/** The target application the requester wants access to. */
|
|
770
780
|
target: DeviceContextApplication;
|
|
771
|
-
/** Organizations the user can authorize the device for. */
|
|
781
|
+
/** Organizations the user can authorize the device for. Empty when the requester or the target is disabled. */
|
|
772
782
|
organizations: FullOrganization[];
|
|
773
783
|
/** Organization pre-selected by the requester, if any. */
|
|
774
784
|
preselectedOrganizationId: string | null;
|
|
@@ -842,6 +852,37 @@ declare class ApplicationSessionAssuranceError extends ApplicationError {
|
|
|
842
852
|
readonly validStepUps: SessionAssuranceRequiredPayload['validStepUps'];
|
|
843
853
|
constructor(payload?: SessionAssuranceRequiredPayload | null, options?: ErrorOptions);
|
|
844
854
|
}
|
|
855
|
+
/**
|
|
856
|
+
* Payload the API attaches to an `application_disabled` error.
|
|
857
|
+
*/
|
|
858
|
+
type ApplicationDisabledPayload = {
|
|
859
|
+
applicationId: string;
|
|
860
|
+
applicationName: string;
|
|
861
|
+
deprecationNotice: string | null;
|
|
862
|
+
};
|
|
863
|
+
/**
|
|
864
|
+
* Reads the {@link ApplicationDisabledPayload} from an error returned by the
|
|
865
|
+
* API, following `cause` chains. Returns `null` when the error is not an
|
|
866
|
+
* `application_disabled` error.
|
|
867
|
+
*
|
|
868
|
+
* @param error - The caught error value
|
|
869
|
+
*/
|
|
870
|
+
declare function parseApplicationDisabledPayload(error: unknown): ApplicationDisabledPayload | null;
|
|
871
|
+
/**
|
|
872
|
+
* Thrown when the application was disabled by an admin. Every sign-in, token
|
|
873
|
+
* exchange and refresh through it fails until it is enabled again, so clients
|
|
874
|
+
* must not retry or start a new flow.
|
|
875
|
+
*
|
|
876
|
+
* The message is the application's deprecation notice when it has one.
|
|
877
|
+
*/
|
|
878
|
+
declare class ApplicationDisabledError extends ApplicationError {
|
|
879
|
+
readonly applicationId: string | null;
|
|
880
|
+
readonly applicationName: string | null;
|
|
881
|
+
readonly deprecationNotice: string | null;
|
|
882
|
+
constructor(payload?: ApplicationDisabledPayload | null, options?: ErrorOptions & {
|
|
883
|
+
status?: number;
|
|
884
|
+
});
|
|
885
|
+
}
|
|
845
886
|
/**
|
|
846
887
|
* Thrown when an operation requires an authenticated user but no session exists.
|
|
847
888
|
*/
|
|
@@ -993,6 +1034,7 @@ declare class ApplicationService {
|
|
|
993
1034
|
* @throws {DeviceCodeExpiredError} The device code has expired
|
|
994
1035
|
* @throws {DeviceTransientServerError} Transient server error — safe to retry
|
|
995
1036
|
* @throws {ApplicationSessionAssuranceError} Assurance policy changed or is no longer met — start a new flow
|
|
1037
|
+
* @throws {ApplicationDisabledError} The requester or target application is disabled — stop polling
|
|
996
1038
|
*/
|
|
997
1039
|
exchangeDeviceCodeForTokens(deviceCode: string): Promise<CompleteAuthorizationFlowResponse>;
|
|
998
1040
|
/**
|
|
@@ -1017,6 +1059,7 @@ declare class ApplicationService {
|
|
|
1017
1059
|
*
|
|
1018
1060
|
* @param refreshToken - The refresh token to use for the authentication token refresh
|
|
1019
1061
|
* @throws {RefreshTokenExpiredError} When the refresh token has expired or is invalid
|
|
1062
|
+
* @throws {ApplicationDisabledError} When the application has been disabled
|
|
1020
1063
|
* @throws {ApplicationError} For other API errors
|
|
1021
1064
|
*/
|
|
1022
1065
|
refreshAccessToken(refreshToken: string): Promise<CompleteAuthorizationFlowResponse>;
|
|
@@ -4516,6 +4559,13 @@ type CreateAdminApplicationSecretOptions = {
|
|
|
4516
4559
|
/** Optional display name for the secret. */
|
|
4517
4560
|
name?: string;
|
|
4518
4561
|
};
|
|
4562
|
+
/**
|
|
4563
|
+
* Options accepted when disabling an application.
|
|
4564
|
+
*/
|
|
4565
|
+
type DisableAdminApplicationOptions = {
|
|
4566
|
+
/** Plain-text notice shown to users who try to sign in through the application. Blank or `null` clears it. */
|
|
4567
|
+
deprecationNotice?: string | null;
|
|
4568
|
+
};
|
|
4519
4569
|
/**
|
|
4520
4570
|
* Client secret metadata returned by application management endpoints.
|
|
4521
4571
|
*/
|
|
@@ -5044,6 +5094,12 @@ type AdminApplication = {
|
|
|
5044
5094
|
config: ApplicationConfig | null;
|
|
5045
5095
|
serviceAccountUserId: string | null;
|
|
5046
5096
|
serviceAccountUser?: AdminApplicationIdentity | null;
|
|
5097
|
+
/** When the application was disabled, or `null` while it is enabled. A disabled application refuses every sign-in. */
|
|
5098
|
+
disabledAt: string | null;
|
|
5099
|
+
/** ID of the admin who disabled the application, or `null`. */
|
|
5100
|
+
disabledBy: string | null;
|
|
5101
|
+
/** Plain-text notice shown to users who try to sign in through the disabled application. */
|
|
5102
|
+
deprecationNotice: string | null;
|
|
5047
5103
|
createdBy: string;
|
|
5048
5104
|
updatedBy: string;
|
|
5049
5105
|
createdAt: string;
|
|
@@ -5162,6 +5218,97 @@ type InviteAdminOrganizationUsersResult = {
|
|
|
5162
5218
|
message?: string;
|
|
5163
5219
|
}[];
|
|
5164
5220
|
};
|
|
5221
|
+
/**
|
|
5222
|
+
* Entitlement that decides access to an application for one organization: the
|
|
5223
|
+
* organization's own, or global access shared by every organization.
|
|
5224
|
+
*/
|
|
5225
|
+
type AdminOrganizationApplicationEntitlement = {
|
|
5226
|
+
id: string;
|
|
5227
|
+
type: 'organization' | 'global';
|
|
5228
|
+
enabled: boolean;
|
|
5229
|
+
createdAt: string;
|
|
5230
|
+
};
|
|
5231
|
+
/**
|
|
5232
|
+
* Application available to one organization, as its admins see it.
|
|
5233
|
+
*/
|
|
5234
|
+
type AdminOrganizationEntitledApplication = {
|
|
5235
|
+
id: string;
|
|
5236
|
+
name: string;
|
|
5237
|
+
imageUrl: string | null;
|
|
5238
|
+
homeUrl: string | null;
|
|
5239
|
+
entitlement: AdminOrganizationApplicationEntitlement;
|
|
5240
|
+
/** Whether the caller can edit the rules here: only global admins, and only on the organization's own entitlement. */
|
|
5241
|
+
editable: boolean;
|
|
5242
|
+
/** When the application was disabled, or `null`. A disabled application refuses every sign-in, whatever its rules. */
|
|
5243
|
+
disabledAt: string | null;
|
|
5244
|
+
/** Rules in evaluation order; the first one that matches a member decides. */
|
|
5245
|
+
rules: Array<AdminEntitlementRule & {
|
|
5246
|
+
/** User-facing name of the role from the application role catalog. Null for denials and unknown roles. */
|
|
5247
|
+
roleDisplayName: string | null;
|
|
5248
|
+
}>;
|
|
5249
|
+
/** Active members the rules grant a role to. Zero while the entitlement or the application is disabled. */
|
|
5250
|
+
memberCount: number;
|
|
5251
|
+
members: AdminApplicationMember[];
|
|
5252
|
+
};
|
|
5253
|
+
/**
|
|
5254
|
+
* Role an application can grant, from its role catalog.
|
|
5255
|
+
*/
|
|
5256
|
+
type AdminOrganizationApplicationRole = {
|
|
5257
|
+
name: string;
|
|
5258
|
+
displayName: string;
|
|
5259
|
+
description: string;
|
|
5260
|
+
};
|
|
5261
|
+
/**
|
|
5262
|
+
* One application of an organization with the roles its rules can grant.
|
|
5263
|
+
*/
|
|
5264
|
+
type AdminOrganizationApplicationAccess = AdminOrganizationEntitledApplication & {
|
|
5265
|
+
roles: AdminOrganizationApplicationRole[];
|
|
5266
|
+
};
|
|
5267
|
+
/** Options accepted when listing the applications of an organization. */
|
|
5268
|
+
type ListAdminOrganizationApplicationsOptions = {
|
|
5269
|
+
organizationId: string;
|
|
5270
|
+
/** Case-insensitive application name match. */
|
|
5271
|
+
search?: string;
|
|
5272
|
+
};
|
|
5273
|
+
/** Options accepted when reading or listing members of one application of an organization. */
|
|
5274
|
+
type GetAdminOrganizationApplicationOptions = {
|
|
5275
|
+
organizationId: string;
|
|
5276
|
+
applicationId: string;
|
|
5277
|
+
};
|
|
5278
|
+
/** Options accepted when replacing the rules of an organization's own entitlement. */
|
|
5279
|
+
type SetAdminOrganizationApplicationRulesOptions = GetAdminOrganizationApplicationOptions & {
|
|
5280
|
+
/** Rules in evaluation order. Positions are assigned from the order. */
|
|
5281
|
+
rules: Array<Omit<AdminEntitlementRule, 'position'>>;
|
|
5282
|
+
};
|
|
5283
|
+
/** Options accepted when listing the members of an organization against one application. */
|
|
5284
|
+
type ListAdminOrganizationApplicationMembersOptions = GetAdminOrganizationApplicationOptions & {
|
|
5285
|
+
/** Case-insensitive name or email match. */
|
|
5286
|
+
query?: string;
|
|
5287
|
+
/** Maximum number of members to return. Defaults to 50. */
|
|
5288
|
+
limit?: number;
|
|
5289
|
+
/** Number of members to skip. Defaults to 0. */
|
|
5290
|
+
offset?: number;
|
|
5291
|
+
};
|
|
5292
|
+
/**
|
|
5293
|
+
* Active organization member with the outcome of an application's rules for them.
|
|
5294
|
+
*/
|
|
5295
|
+
type AdminOrganizationApplicationMember = AdminApplicationMember & {
|
|
5296
|
+
/** Role granted to the member, or null when no rule grants access. */
|
|
5297
|
+
role: string | null;
|
|
5298
|
+
roleDisplayName: string | null;
|
|
5299
|
+
/** First rule that matched the member, or null when none did. A matched rule with a null role denies access. */
|
|
5300
|
+
matchedRule: {
|
|
5301
|
+
type: AdminEntitlementRuleType;
|
|
5302
|
+
position: number;
|
|
5303
|
+
} | null;
|
|
5304
|
+
};
|
|
5305
|
+
/** Paginated listing of an organization's members against one application. */
|
|
5306
|
+
type ListAdminOrganizationApplicationMembersResult = {
|
|
5307
|
+
members: AdminOrganizationApplicationMember[];
|
|
5308
|
+
total: number;
|
|
5309
|
+
limit: number;
|
|
5310
|
+
offset: number;
|
|
5311
|
+
};
|
|
5165
5312
|
|
|
5166
5313
|
/**
|
|
5167
5314
|
* Service for global admin operations.
|
|
@@ -5194,6 +5341,12 @@ declare class AdminService {
|
|
|
5194
5341
|
* @returns The parsed JSON response
|
|
5195
5342
|
*/
|
|
5196
5343
|
private requestApplicationRoute;
|
|
5344
|
+
/**
|
|
5345
|
+
* Calls an admin endpoint and returns its JSON body. The client is configured
|
|
5346
|
+
* to throw on error responses, but better-auth types `$fetch` as returning
|
|
5347
|
+
* `{ data, error }`; this narrows the result to the body it actually resolves to.
|
|
5348
|
+
*/
|
|
5349
|
+
private fetchAdminRoute;
|
|
5197
5350
|
/**
|
|
5198
5351
|
* Lists applications, optionally filtered by organization.
|
|
5199
5352
|
*
|
|
@@ -5216,6 +5369,24 @@ declare class AdminService {
|
|
|
5216
5369
|
* @returns The updated application
|
|
5217
5370
|
*/
|
|
5218
5371
|
updateApplication(applicationId: string, options: CreateAdminApplicationOptions): Promise<AdminApplicationRecord>;
|
|
5372
|
+
/**
|
|
5373
|
+
* Disables an application. Sign-ins, token exchanges, refreshes and
|
|
5374
|
+
* client-credentials exchanges through it fail with `application_disabled`,
|
|
5375
|
+
* which carries the deprecation notice. Disabling an already disabled
|
|
5376
|
+
* application replaces its notice.
|
|
5377
|
+
*
|
|
5378
|
+
* @param applicationId - ID of the application to disable
|
|
5379
|
+
* @param options - Optional deprecation notice
|
|
5380
|
+
* @returns The updated application
|
|
5381
|
+
*/
|
|
5382
|
+
disableApplication(applicationId: string, options?: DisableAdminApplicationOptions): Promise<AdminApplicationRecord>;
|
|
5383
|
+
/**
|
|
5384
|
+
* Enables a disabled application and clears its deprecation notice.
|
|
5385
|
+
*
|
|
5386
|
+
* @param applicationId - ID of the application to enable
|
|
5387
|
+
* @returns The updated application
|
|
5388
|
+
*/
|
|
5389
|
+
enableApplication(applicationId: string): Promise<AdminApplicationRecord>;
|
|
5219
5390
|
/** Lists the role catalog for an application. */
|
|
5220
5391
|
listApplicationRoles(applicationId: string): Promise<AdminApplicationRole[]>;
|
|
5221
5392
|
/** Creates an application-scoped role definition. */
|
|
@@ -5269,17 +5440,7 @@ declare class AdminService {
|
|
|
5269
5440
|
* @param options - Pagination, ordering, search, and preview options
|
|
5270
5441
|
* @returns The paginated organization listing
|
|
5271
5442
|
*/
|
|
5272
|
-
listOrganizations(options?: ListAdminOrganizationsOptions): Promise<
|
|
5273
|
-
data: null;
|
|
5274
|
-
error: {
|
|
5275
|
-
message?: string | undefined;
|
|
5276
|
-
status: number;
|
|
5277
|
-
statusText: string;
|
|
5278
|
-
};
|
|
5279
|
-
} | {
|
|
5280
|
-
data: ListAdminOrganizationsResult;
|
|
5281
|
-
error: null;
|
|
5282
|
-
}>;
|
|
5443
|
+
listOrganizations(options?: ListAdminOrganizationsOptions): Promise<ListAdminOrganizationsResult>;
|
|
5283
5444
|
/**
|
|
5284
5445
|
* Lists users, optionally with organization previews and totals when a
|
|
5285
5446
|
* preview size is requested. Global admins list across every organization
|
|
@@ -5289,17 +5450,7 @@ declare class AdminService {
|
|
|
5289
5450
|
* @param options - Pagination, ordering, search, preview, and organization options
|
|
5290
5451
|
* @returns The paginated user listing
|
|
5291
5452
|
*/
|
|
5292
|
-
listUsers(options?: ListAdminUsersOptions): Promise<
|
|
5293
|
-
data: null;
|
|
5294
|
-
error: {
|
|
5295
|
-
message?: string | undefined;
|
|
5296
|
-
status: number;
|
|
5297
|
-
statusText: string;
|
|
5298
|
-
};
|
|
5299
|
-
} | {
|
|
5300
|
-
data: ListAdminUsersResult;
|
|
5301
|
-
error: null;
|
|
5302
|
-
}>;
|
|
5453
|
+
listUsers(options?: ListAdminUsersOptions): Promise<ListAdminUsersResult>;
|
|
5303
5454
|
/**
|
|
5304
5455
|
* Fetches a single user by ID.
|
|
5305
5456
|
*
|
|
@@ -5314,9 +5465,7 @@ declare class AdminService {
|
|
|
5314
5465
|
* @param options - Organization ID and listing adjacency options
|
|
5315
5466
|
* @returns The organization
|
|
5316
5467
|
*/
|
|
5317
|
-
getOrganization(options: GetAdminOrganizationOptions): Promise<
|
|
5318
|
-
data: AdminOrganization;
|
|
5319
|
-
} | null>;
|
|
5468
|
+
getOrganization(options: GetAdminOrganizationOptions): Promise<AdminOrganization>;
|
|
5320
5469
|
/**
|
|
5321
5470
|
* Fetches minimal identity and branding (id, name, logo) for several
|
|
5322
5471
|
* organizations at once, for surfaces such as the vault pages that resolve
|
|
@@ -5328,7 +5477,7 @@ declare class AdminService {
|
|
|
5328
5477
|
* @param options - The workspace (organization) IDs to resolve
|
|
5329
5478
|
* @returns The organization summaries for the IDs that exist
|
|
5330
5479
|
*/
|
|
5331
|
-
getOrganizationsSummary(options: GetAdminOrganizationsSummaryOptions): Promise<
|
|
5480
|
+
getOrganizationsSummary(options: GetAdminOrganizationsSummaryOptions): Promise<AdminOrganizationSummary[]>;
|
|
5332
5481
|
/**
|
|
5333
5482
|
* Fetches the per-organization access report for a single user: their
|
|
5334
5483
|
* organizations with role, membership ID, and teams, plus each
|
|
@@ -5337,9 +5486,7 @@ declare class AdminService {
|
|
|
5337
5486
|
* @param userId - The ID of the user to fetch access for
|
|
5338
5487
|
* @returns The user access report
|
|
5339
5488
|
*/
|
|
5340
|
-
getUserAccess(userId: string): Promise<
|
|
5341
|
-
data: AdminUserAccess;
|
|
5342
|
-
} | null>;
|
|
5489
|
+
getUserAccess(userId: string): Promise<AdminUserAccess>;
|
|
5343
5490
|
/**
|
|
5344
5491
|
* Lists applications with their entitlements as a global admin. Unlike
|
|
5345
5492
|
* {@link listApplications}, which goes through the session-only application
|
|
@@ -5348,17 +5495,7 @@ declare class AdminService {
|
|
|
5348
5495
|
* @param options - Pagination, ordering, organization filter, search, and member preview options
|
|
5349
5496
|
* @returns The application listing with entitlement details
|
|
5350
5497
|
*/
|
|
5351
|
-
listAdminApplications(options?: ListAdminApplicationsOptions): Promise<
|
|
5352
|
-
data: null;
|
|
5353
|
-
error: {
|
|
5354
|
-
message?: string | undefined;
|
|
5355
|
-
status: number;
|
|
5356
|
-
statusText: string;
|
|
5357
|
-
};
|
|
5358
|
-
} | {
|
|
5359
|
-
data: ListAdminApplicationsResult;
|
|
5360
|
-
error: null;
|
|
5361
|
-
}>;
|
|
5498
|
+
listAdminApplications(options?: ListAdminApplicationsOptions): Promise<ListAdminApplicationsResult>;
|
|
5362
5499
|
/**
|
|
5363
5500
|
* Lists the users with access to an application as a global admin, one row
|
|
5364
5501
|
* per user with every organization that grants them access and the role it
|
|
@@ -5367,34 +5504,47 @@ declare class AdminService {
|
|
|
5367
5504
|
* @param options - Application ID, organization filter, pagination, and search options
|
|
5368
5505
|
* @returns The paginated application member listing
|
|
5369
5506
|
*/
|
|
5370
|
-
listApplicationMembers(options: ListAdminApplicationMembersOptions): Promise<
|
|
5371
|
-
data: null;
|
|
5372
|
-
error: {
|
|
5373
|
-
message?: string | undefined;
|
|
5374
|
-
status: number;
|
|
5375
|
-
statusText: string;
|
|
5376
|
-
};
|
|
5377
|
-
} | {
|
|
5378
|
-
data: ListAdminApplicationMembersResult;
|
|
5379
|
-
error: null;
|
|
5380
|
-
}>;
|
|
5507
|
+
listApplicationMembers(options: ListAdminApplicationMembersOptions): Promise<ListAdminApplicationMembersResult>;
|
|
5381
5508
|
/**
|
|
5382
5509
|
* Lists active members for one organization as a global admin.
|
|
5383
5510
|
*
|
|
5384
5511
|
* @param options - Organization ID, pagination, and search options
|
|
5385
5512
|
* @returns The paginated organization member listing
|
|
5386
5513
|
*/
|
|
5387
|
-
listOrganizationMembers(options: ListAdminOrganizationMembersOptions): Promise<
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5514
|
+
listOrganizationMembers(options: ListAdminOrganizationMembersOptions): Promise<ListAdminOrganizationMembersResult>;
|
|
5515
|
+
/**
|
|
5516
|
+
* Lists the applications available to one organization with the entitlement
|
|
5517
|
+
* that decides their access and its rules. Global admins may list any
|
|
5518
|
+
* organization; an organization admin only their own.
|
|
5519
|
+
*
|
|
5520
|
+
* @param options - Organization ID and search options
|
|
5521
|
+
* @returns The organization's applications
|
|
5522
|
+
*/
|
|
5523
|
+
listOrganizationApplications(options: ListAdminOrganizationApplicationsOptions): Promise<AdminOrganizationEntitledApplication[]>;
|
|
5524
|
+
/**
|
|
5525
|
+
* Fetches one application of an organization with its rules and the roles
|
|
5526
|
+
* those rules can grant.
|
|
5527
|
+
*
|
|
5528
|
+
* @param options - Organization and application IDs
|
|
5529
|
+
* @returns The application access
|
|
5530
|
+
*/
|
|
5531
|
+
getOrganizationApplication(options: GetAdminOrganizationApplicationOptions): Promise<AdminOrganizationApplicationAccess>;
|
|
5532
|
+
/**
|
|
5533
|
+
* Replaces the rules of an organization's own entitlement to an application,
|
|
5534
|
+
* in the order given, as a global admin. Global access is edited on the application.
|
|
5535
|
+
*
|
|
5536
|
+
* @param options - Organization and application IDs, and the rules in evaluation order
|
|
5537
|
+
* @returns The updated application access
|
|
5538
|
+
*/
|
|
5539
|
+
setOrganizationApplicationRules(options: SetAdminOrganizationApplicationRulesOptions): Promise<AdminOrganizationApplicationAccess>;
|
|
5540
|
+
/**
|
|
5541
|
+
* Lists every active member of an organization with the rule that decides
|
|
5542
|
+
* their access to an application and the role it grants.
|
|
5543
|
+
*
|
|
5544
|
+
* @param options - Organization and application IDs, pagination, and search options
|
|
5545
|
+
* @returns The paginated member listing
|
|
5546
|
+
*/
|
|
5547
|
+
listOrganizationApplicationMembers(options: ListAdminOrganizationApplicationMembersOptions): Promise<ListAdminOrganizationApplicationMembersResult>;
|
|
5398
5548
|
/**
|
|
5399
5549
|
* Lists teams for one organization. Global admins may list any organization;
|
|
5400
5550
|
* an organization admin only their own.
|
|
@@ -5402,26 +5552,14 @@ declare class AdminService {
|
|
|
5402
5552
|
* @param options - Organization ID, pagination, search, and ordering options
|
|
5403
5553
|
* @returns The paginated organization team listing
|
|
5404
5554
|
*/
|
|
5405
|
-
listOrganizationTeams(options: ListAdminOrganizationTeamsOptions): Promise<
|
|
5406
|
-
data: null;
|
|
5407
|
-
error: {
|
|
5408
|
-
message?: string | undefined;
|
|
5409
|
-
status: number;
|
|
5410
|
-
statusText: string;
|
|
5411
|
-
};
|
|
5412
|
-
} | {
|
|
5413
|
-
data: ListAdminOrganizationTeamsResult;
|
|
5414
|
-
error: null;
|
|
5415
|
-
}>;
|
|
5555
|
+
listOrganizationTeams(options: ListAdminOrganizationTeamsOptions): Promise<ListAdminOrganizationTeamsResult>;
|
|
5416
5556
|
/**
|
|
5417
5557
|
* Creates a team for one organization as a global admin.
|
|
5418
5558
|
*
|
|
5419
5559
|
* @param options - Organization ID, team name, and optional team members
|
|
5420
5560
|
* @returns The created team
|
|
5421
5561
|
*/
|
|
5422
|
-
createOrganizationTeam(options: CreateAdminOrganizationTeamOptions): Promise<
|
|
5423
|
-
data: AdminOrganizationTeamRecord;
|
|
5424
|
-
} | null>;
|
|
5562
|
+
createOrganizationTeam(options: CreateAdminOrganizationTeamOptions): Promise<AdminOrganizationTeamRecord>;
|
|
5425
5563
|
/**
|
|
5426
5564
|
* Updates a team for one organization. Global admins may update any
|
|
5427
5565
|
* organization; an organization admin only their own.
|
|
@@ -5429,9 +5567,7 @@ declare class AdminService {
|
|
|
5429
5567
|
* @param options - Organization ID, team ID, new name, and optional replacement member IDs
|
|
5430
5568
|
* @returns The updated team
|
|
5431
5569
|
*/
|
|
5432
|
-
updateOrganizationTeam(options: UpdateAdminOrganizationTeamOptions): Promise<
|
|
5433
|
-
data: AdminOrganizationTeamRecord;
|
|
5434
|
-
} | null>;
|
|
5570
|
+
updateOrganizationTeam(options: UpdateAdminOrganizationTeamOptions): Promise<AdminOrganizationTeamRecord>;
|
|
5435
5571
|
/**
|
|
5436
5572
|
* Deletes a team for one organization, detaching its members with it.
|
|
5437
5573
|
* Global admins may delete from any organization; an organization admin
|
|
@@ -5476,9 +5612,7 @@ declare class AdminService {
|
|
|
5476
5612
|
* @param options - Organization name and optional slug, logo, metadata, and settings
|
|
5477
5613
|
* @returns The created organization
|
|
5478
5614
|
*/
|
|
5479
|
-
createOrganization(options: CreateAdminOrganizationOptions): Promise<
|
|
5480
|
-
data: AdminOrganization;
|
|
5481
|
-
} | null>;
|
|
5615
|
+
createOrganization(options: CreateAdminOrganizationOptions): Promise<AdminOrganization>;
|
|
5482
5616
|
/**
|
|
5483
5617
|
* Updates an organization's profile and settings. Global admins may update
|
|
5484
5618
|
* any organization; an organization admin only their own, and only the
|
|
@@ -5488,27 +5622,21 @@ declare class AdminService {
|
|
|
5488
5622
|
* @param options - Organization ID and the fields to update
|
|
5489
5623
|
* @returns The updated organization
|
|
5490
5624
|
*/
|
|
5491
|
-
updateOrganization(options: UpdateAdminOrganizationOptions): Promise<
|
|
5492
|
-
data: AdminOrganization;
|
|
5493
|
-
} | null>;
|
|
5625
|
+
updateOrganization(options: UpdateAdminOrganizationOptions): Promise<AdminOrganization>;
|
|
5494
5626
|
/**
|
|
5495
5627
|
* Updates an organization member's role.
|
|
5496
5628
|
*
|
|
5497
5629
|
* @param options - Membership ID and the new role
|
|
5498
5630
|
* @returns The updated membership
|
|
5499
5631
|
*/
|
|
5500
|
-
updateMemberRole(options: UpdateAdminMemberRoleOptions): Promise<
|
|
5501
|
-
data: AdminMember;
|
|
5502
|
-
} | null>;
|
|
5632
|
+
updateMemberRole(options: UpdateAdminMemberRoleOptions): Promise<AdminMember>;
|
|
5503
5633
|
/**
|
|
5504
5634
|
* Removes an organization member.
|
|
5505
5635
|
*
|
|
5506
5636
|
* @param options - Membership ID to remove
|
|
5507
5637
|
* @returns The removed membership
|
|
5508
5638
|
*/
|
|
5509
|
-
removeMember(options: RemoveAdminMemberOptions): Promise<
|
|
5510
|
-
data: AdminMember;
|
|
5511
|
-
} | null>;
|
|
5639
|
+
removeMember(options: RemoveAdminMemberOptions): Promise<AdminMember>;
|
|
5512
5640
|
/**
|
|
5513
5641
|
* Sets a user's effective application role within an organization. A
|
|
5514
5642
|
* non-null role grants access, a null role denies access (leave
|
|
@@ -5570,9 +5698,7 @@ declare class AdminService {
|
|
|
5570
5698
|
* @param options - Organization, emails, role, and optional teams/application
|
|
5571
5699
|
* @returns Per-email invite outcomes
|
|
5572
5700
|
*/
|
|
5573
|
-
inviteOrganizationUsers(options: InviteAdminOrganizationUsersOptions): Promise<
|
|
5574
|
-
data: InviteAdminOrganizationUsersResult;
|
|
5575
|
-
} | null>;
|
|
5701
|
+
inviteOrganizationUsers(options: InviteAdminOrganizationUsersOptions): Promise<InviteAdminOrganizationUsersResult>;
|
|
5576
5702
|
}
|
|
5577
5703
|
|
|
5578
5704
|
/**
|
|
@@ -5606,8 +5732,8 @@ type AcceptInvitationResult = {
|
|
|
5606
5732
|
homeUrl: string | null;
|
|
5607
5733
|
/** Configured post-acceptance URL for plain organization invitations. */
|
|
5608
5734
|
inviteAcceptedUrl: string | null;
|
|
5609
|
-
/** The accepted organization membership. This may be an existing membership. */
|
|
5610
|
-
member: Member
|
|
5735
|
+
/** The accepted organization membership. This may be an existing membership. It does not include the user record. */
|
|
5736
|
+
member: Omit<Member, 'user'>;
|
|
5611
5737
|
};
|
|
5612
5738
|
/**
|
|
5613
5739
|
* Fields that can be updated on an organization.
|
|
@@ -6602,5 +6728,5 @@ declare function validateToken(token: string, apiUrl: string): Promise<boolean>;
|
|
|
6602
6728
|
*/
|
|
6603
6729
|
declare function extractTokenPayload(token: string): DecodedJWTPayload;
|
|
6604
6730
|
|
|
6605
|
-
export { AAL, AALBrand, AALs, ACR, ACRBrand, ACRs, AMR, AMRBrand, AMRs, ApiKeyMetadata, ApplicationConfig, ApplicationError, ApplicationSessionAssuranceConfig, ApplicationSessionAssuranceError, ApplicationTokenStorage, AuthClient, AuthMethod, AuthMethodBrand, AuthMethods, AuthorizationFlowError, DEFAULT_APPLICATION_CONFIG, DEFAULT_JWT_ASSURANCE, DEFAULT_SESSION_ASSURANCE_CONFIG, DeviceAccessDeniedError, DeviceAuthorizationPendingError, DeviceAuthorizationSlowDownError, DeviceCodeExpiredError, DeviceTransientServerError, EmailOTPService, EmailRequired, InvalidCallbackURL, InvalidSocialProvider, JWTPayload, JWTPayloadAssurance, JWTPayloadUser, JWTPayloadWorkspace, LOGIN_METHODS, OAuthBeginStepUpResponse, OAuthCompleteStepUpResponse, OAuthStepUpProvider, RefreshTokenExpiredError, Roles, SENSITIVE_ACTION_ASSURANCE_POLICY, STEP_UP_MAX_AGE_SECONDS, SendOtpResponse, SessionAssurancePolicy, SessionAssuranceRequiredError, SessionAssuranceRequiredPayload, SessionAssuranceResponse, SessionAssuranceService, StepUpOption, UserNotLoggedInError, ac, assuranceFields, canStepUpWithAmr, createAPIClient, extractTokenPayload, getAalRank, invitationAdditionalFields, isAssuranceSufficientForPolicy, isSessionAssuranceSufficient, isTokenExpired, memberAdditionalFields, mergeStepUpAssurance, normalizeAmr, organizationAdditionalFields, parseSessionAssuranceRequiredPayload, rolesAccessControl, sessionAssurancePluginClient, userAdditionalFields, validateToken };
|
|
6606
|
-
export type { APIClient, AcceptInvitationResult, AdminApplication, AdminApplicationEntitlement, AdminApplicationEntitlementRecord, AdminApplicationIdentity, AdminApplicationMember, AdminApplicationMemberOrganization, AdminApplicationMemberRecord, AdminApplicationOrganization, AdminApplicationRecord, AdminApplicationRole, AdminApplicationSecret, AdminEntitlementRule, AdminEntitlementRuleType, AdminEntitlementWithRules, AdminMember, AdminOrganization, AdminOrganizationApplication, AdminOrganizationMember, AdminOrganizationMemberApplication, AdminOrganizationMemberRecord, AdminOrganizationMemberTeam, AdminOrganizationSummary, AdminOrganizationTeam, AdminOrganizationTeamRecord, AdminUser, AdminUserAccess, AdminUserAccessApplication, AdminUserAccessOrganization, AdminUserAccessTeam, AdminUserInvitation, AdminUserOrganization, ApiKey, ApiKeyWithoutSecret, Application, ApplicationAuthContextResponse, ApplicationRole, ApplicationScopedMember, ApplicationTokenStorageOptions, AssuranceFields, BaseOrganization, BeginOAuthStepUpParams, BillingMode, ClientCredentialsGrant, ClientCredentialsTokenResponse, CompleteAuthorizationFlowResponse, CreateAdminApplicationEntitlementOptions, CreateAdminApplicationOptions, CreateAdminApplicationRoleOptions, CreateAdminApplicationSecretOptions, CreateAdminOrganizationOptions, CreateAdminOrganizationTeamOptions, CreateApiKeyPayload, CreateTeamPayload, CreatedAdminApplicationSecret, DecodedJWTPayload, DeleteAdminOrganizationTeamOptions, DeviceAuthorizationActionResponse, DeviceAuthorizationContextResponse, DeviceAuthorizationResponse, DeviceContextApplication, EmailOTPSignInOptions, FullOrganization, FullOrganizationMember, GetAdminOrganizationOptions, GetAdminOrganizationsSummaryOptions, GetTokenOptions, Invitation, InvitationPasswordSetupResult, InvitationSignupStatus, InviteAdminOrganizationUsersOptions, InviteAdminOrganizationUsersResult, InviteUserToOrganizationOptions, JWTPayloadData, ListAdminApplicationMembersOptions, ListAdminApplicationMembersResult, ListAdminApplicationsOptions, ListAdminApplicationsResult, ListAdminOrganizationMembersOptions, ListAdminOrganizationMembersResult, ListAdminOrganizationTeamsOptions, ListAdminOrganizationTeamsResult, ListAdminOrganizationsOptions, ListAdminOrganizationsResult, ListAdminUsersOptions, ListAdminUsersResult, ListCandidateOrganizationsInclude, ListCandidateOrganizationsOptions, ListCandidateOrganizationsResponse, ListMembersOptions, ListOrganizationsOptions, ListOrganizationsWithRoleOptions, LoginMethod, LoginMethodsResponse, Member, ExtendedOrganization as Organization, OrganizationSettings, OrganizationWithRole, RemoveAdminMemberOptions, RemoveUserFromOrganizationOptions, Role, SendVerificationOTPOptions, Session, SessionAssuranceActions, SessionData, SetAdminEntitlementRulesOptions, SetAdminUserApplicationRoleOptions, SetAdminUserPasswordOptions, SetAdminUserTeamOptions, SignInWithEmailAndPasswordOptions, SignInWithSsoOptions, SocialSignInOptions, StartAuthorizationFlowResponse, Strict, Team, TeamMember, TeamMembersResponse, UpdateAdminApplicationRoleOptions, UpdateAdminEntitlementOptions, UpdateAdminMemberRoleOptions, UpdateAdminOrganizationOptions, UpdateAdminOrganizationTeamOptions, UpdateApiKeyPayload, UpdateMemberRoleOptions, UpdateOrganizationPayload, UpdateTeamPayload, User, UserProfile, WhoAmIInclude, WhoAmIOptions, WhoAmIOrganization, WhoAmIResponse };
|
|
6731
|
+
export { AAL, AALBrand, AALs, ACR, ACRBrand, ACRs, AMR, AMRBrand, AMRs, ApiKeyMetadata, ApplicationConfig, ApplicationDisabledError, ApplicationError, ApplicationSessionAssuranceConfig, ApplicationSessionAssuranceError, ApplicationTokenStorage, AuthClient, AuthMethod, AuthMethodBrand, AuthMethods, AuthorizationFlowError, DEFAULT_APPLICATION_CONFIG, DEFAULT_JWT_ASSURANCE, DEFAULT_SESSION_ASSURANCE_CONFIG, DeviceAccessDeniedError, DeviceAuthorizationPendingError, DeviceAuthorizationSlowDownError, DeviceCodeExpiredError, DeviceTransientServerError, EmailOTPService, EmailRequired, InvalidCallbackURL, InvalidSocialProvider, JWTPayload, JWTPayloadAssurance, JWTPayloadUser, JWTPayloadWorkspace, LOGIN_METHODS, OAuthBeginStepUpResponse, OAuthCompleteStepUpResponse, OAuthStepUpProvider, RefreshTokenExpiredError, Roles, SENSITIVE_ACTION_ASSURANCE_POLICY, STEP_UP_MAX_AGE_SECONDS, SendOtpResponse, SessionAssurancePolicy, SessionAssuranceRequiredError, SessionAssuranceRequiredPayload, SessionAssuranceResponse, SessionAssuranceService, StepUpOption, UserNotLoggedInError, ac, assuranceFields, canStepUpWithAmr, createAPIClient, extractTokenPayload, getAalRank, invitationAdditionalFields, isAssuranceSufficientForPolicy, isSessionAssuranceSufficient, isTokenExpired, memberAdditionalFields, mergeStepUpAssurance, normalizeAmr, organizationAdditionalFields, parseApplicationDisabledPayload, parseSessionAssuranceRequiredPayload, rolesAccessControl, sessionAssurancePluginClient, userAdditionalFields, validateToken };
|
|
6732
|
+
export type { APIClient, AcceptInvitationResult, AdminApplication, AdminApplicationEntitlement, AdminApplicationEntitlementRecord, AdminApplicationIdentity, AdminApplicationMember, AdminApplicationMemberOrganization, AdminApplicationMemberRecord, AdminApplicationOrganization, AdminApplicationRecord, AdminApplicationRole, AdminApplicationSecret, AdminEntitlementRule, AdminEntitlementRuleType, AdminEntitlementWithRules, AdminMember, AdminOrganization, AdminOrganizationApplication, AdminOrganizationApplicationAccess, AdminOrganizationApplicationEntitlement, AdminOrganizationApplicationMember, AdminOrganizationApplicationRole, AdminOrganizationEntitledApplication, AdminOrganizationMember, AdminOrganizationMemberApplication, AdminOrganizationMemberRecord, AdminOrganizationMemberTeam, AdminOrganizationSummary, AdminOrganizationTeam, AdminOrganizationTeamRecord, AdminUser, AdminUserAccess, AdminUserAccessApplication, AdminUserAccessOrganization, AdminUserAccessTeam, AdminUserInvitation, AdminUserOrganization, ApiKey, ApiKeyWithoutSecret, Application, ApplicationAuthContextResponse, ApplicationDeprecation, ApplicationDisabledPayload, ApplicationRole, ApplicationScopedMember, ApplicationTokenStorageOptions, AssuranceFields, BaseOrganization, BeginOAuthStepUpParams, BillingMode, ClientCredentialsGrant, ClientCredentialsTokenResponse, CompleteAuthorizationFlowResponse, CreateAdminApplicationEntitlementOptions, CreateAdminApplicationOptions, CreateAdminApplicationRoleOptions, CreateAdminApplicationSecretOptions, CreateAdminOrganizationOptions, CreateAdminOrganizationTeamOptions, CreateApiKeyPayload, CreateTeamPayload, CreatedAdminApplicationSecret, DecodedJWTPayload, DeleteAdminOrganizationTeamOptions, DeviceAuthorizationActionResponse, DeviceAuthorizationContextResponse, DeviceAuthorizationResponse, DeviceContextApplication, DisableAdminApplicationOptions, EmailOTPSignInOptions, FullOrganization, FullOrganizationMember, GetAdminOrganizationApplicationOptions, GetAdminOrganizationOptions, GetAdminOrganizationsSummaryOptions, GetTokenOptions, Invitation, InvitationPasswordSetupResult, InvitationSignupStatus, InviteAdminOrganizationUsersOptions, InviteAdminOrganizationUsersResult, InviteUserToOrganizationOptions, JWTPayloadData, ListAdminApplicationMembersOptions, ListAdminApplicationMembersResult, ListAdminApplicationsOptions, ListAdminApplicationsResult, ListAdminOrganizationApplicationMembersOptions, ListAdminOrganizationApplicationMembersResult, ListAdminOrganizationApplicationsOptions, ListAdminOrganizationMembersOptions, ListAdminOrganizationMembersResult, ListAdminOrganizationTeamsOptions, ListAdminOrganizationTeamsResult, ListAdminOrganizationsOptions, ListAdminOrganizationsResult, ListAdminUsersOptions, ListAdminUsersResult, ListCandidateOrganizationsInclude, ListCandidateOrganizationsOptions, ListCandidateOrganizationsResponse, ListMembersOptions, ListOrganizationsOptions, ListOrganizationsWithRoleOptions, LoginMethod, LoginMethodsResponse, Member, ExtendedOrganization as Organization, OrganizationSettings, OrganizationWithRole, RemoveAdminMemberOptions, RemoveUserFromOrganizationOptions, Role, SendVerificationOTPOptions, Session, SessionAssuranceActions, SessionData, SetAdminEntitlementRulesOptions, SetAdminOrganizationApplicationRulesOptions, SetAdminUserApplicationRoleOptions, SetAdminUserPasswordOptions, SetAdminUserTeamOptions, SignInWithEmailAndPasswordOptions, SignInWithSsoOptions, SocialSignInOptions, StartAuthorizationFlowResponse, Strict, Team, TeamMember, TeamMembersResponse, UpdateAdminApplicationRoleOptions, UpdateAdminEntitlementOptions, UpdateAdminMemberRoleOptions, UpdateAdminOrganizationOptions, UpdateAdminOrganizationTeamOptions, UpdateApiKeyPayload, UpdateMemberRoleOptions, UpdateOrganizationPayload, UpdateTeamPayload, User, UserProfile, WhoAmIInclude, WhoAmIOptions, WhoAmIOrganization, WhoAmIResponse };
|