@descope/node-sdk 2.11.0 → 2.12.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/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.d.ts +306 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -315,6 +315,9 @@ declare type SSOApplication = {
|
|
|
315
315
|
oidcSettings: SSOApplicationOIDCSettings;
|
|
316
316
|
wsfedSettings?: SSOApplicationWSFedSettings;
|
|
317
317
|
};
|
|
318
|
+
declare type SSOApplicationSecretResponse = {
|
|
319
|
+
cleartext: string;
|
|
320
|
+
};
|
|
318
321
|
/** Represents a permission in a project. It has a name and optionally a description.
|
|
319
322
|
* It also has a flag indicating whether it is system default or not.
|
|
320
323
|
*/
|
|
@@ -659,6 +662,44 @@ declare type AuditRecord = {
|
|
|
659
662
|
tenants: string[];
|
|
660
663
|
data: Record<string, any>;
|
|
661
664
|
};
|
|
665
|
+
/** Response for the searchAll audit method, including the total number of matching records. */
|
|
666
|
+
declare type AuditSearchAllResponse = {
|
|
667
|
+
audits: AuditRecord[];
|
|
668
|
+
total: number;
|
|
669
|
+
};
|
|
670
|
+
/** Basic authentication for an HTTP connector. */
|
|
671
|
+
declare type ConnectorHTTPBasicAuthentication = {
|
|
672
|
+
username?: string;
|
|
673
|
+
password?: string;
|
|
674
|
+
};
|
|
675
|
+
/** API key authentication for an HTTP connector. */
|
|
676
|
+
declare type ConnectorHTTPAPIKeyAuthentication = {
|
|
677
|
+
key?: string;
|
|
678
|
+
token?: string;
|
|
679
|
+
};
|
|
680
|
+
/** Authentication configuration for an HTTP connector. */
|
|
681
|
+
declare type ConnectorHTTPAuthentication = {
|
|
682
|
+
bearerToken?: string;
|
|
683
|
+
basic?: ConnectorHTTPBasicAuthentication;
|
|
684
|
+
apiKey?: ConnectorHTTPAPIKeyAuthentication;
|
|
685
|
+
};
|
|
686
|
+
/** Filters that determine which audit events are streamed by an audit webhook. */
|
|
687
|
+
declare type AuditFilters = {
|
|
688
|
+
key?: string;
|
|
689
|
+
operator?: string;
|
|
690
|
+
values?: string[];
|
|
691
|
+
};
|
|
692
|
+
/** Configuration for an audit webhook connector. */
|
|
693
|
+
declare type AuditWebhook = {
|
|
694
|
+
name: string;
|
|
695
|
+
description?: string;
|
|
696
|
+
url?: string;
|
|
697
|
+
authentication?: ConnectorHTTPAuthentication;
|
|
698
|
+
hmacSecret?: string;
|
|
699
|
+
headers?: Record<string, string>;
|
|
700
|
+
insecure?: boolean;
|
|
701
|
+
filters?: AuditFilters[];
|
|
702
|
+
};
|
|
662
703
|
declare type UserStatus = 'enabled' | 'disabled' | 'invited' | 'expired';
|
|
663
704
|
declare type AuthzNodeExpressionType = 'self' | 'targetSet' | 'relationLeft' | 'relationRight';
|
|
664
705
|
/**
|
|
@@ -837,6 +878,31 @@ interface FGAResourceDetails {
|
|
|
837
878
|
resourceType: string;
|
|
838
879
|
displayName: string;
|
|
839
880
|
}
|
|
881
|
+
declare type FGASchemaDryRunResponse = {
|
|
882
|
+
deletesPreview?: {
|
|
883
|
+
hasDeletes: boolean;
|
|
884
|
+
relations?: string[];
|
|
885
|
+
types?: string[];
|
|
886
|
+
};
|
|
887
|
+
};
|
|
888
|
+
declare type FGAMappableResource = {
|
|
889
|
+
resource: string;
|
|
890
|
+
};
|
|
891
|
+
declare type FGAMappableResources = {
|
|
892
|
+
type: string;
|
|
893
|
+
resources: FGAMappableResource[];
|
|
894
|
+
};
|
|
895
|
+
declare type FGAMappableSchema = {
|
|
896
|
+
schema?: AuthzSchema | null;
|
|
897
|
+
mappableResources?: FGAMappableResources[];
|
|
898
|
+
};
|
|
899
|
+
declare type FGAMappableResourcesQuery = {
|
|
900
|
+
type: string;
|
|
901
|
+
queries: string[];
|
|
902
|
+
};
|
|
903
|
+
declare type FGAMappableResourcesOptions = {
|
|
904
|
+
resourcesLimit?: number;
|
|
905
|
+
};
|
|
840
906
|
/**
|
|
841
907
|
* Configuration for FGA cache proxy support.
|
|
842
908
|
* When fgaCacheUrl is provided along with managementKey, certain FGA operations
|
|
@@ -932,6 +998,11 @@ declare type InboundApplicationConsentDeleteOptions = {
|
|
|
932
998
|
appId?: string;
|
|
933
999
|
userIds?: string[];
|
|
934
1000
|
};
|
|
1001
|
+
declare type InboundApplicationTenantConsentDeleteOptions = {
|
|
1002
|
+
consentIds?: string[];
|
|
1003
|
+
appId?: string;
|
|
1004
|
+
tenantId?: string;
|
|
1005
|
+
};
|
|
935
1006
|
declare type PromptType = 'none' | 'login' | 'consent' | 'select_account';
|
|
936
1007
|
declare type AccessType = 'offline' | 'online';
|
|
937
1008
|
declare type OutboundApplication = {
|
|
@@ -1173,6 +1244,161 @@ declare type Engine = {
|
|
|
1173
1244
|
declare type EngineSecretResponse = {
|
|
1174
1245
|
secret: string;
|
|
1175
1246
|
};
|
|
1247
|
+
/** A single option for a custom attribute of type "select". */
|
|
1248
|
+
declare type CustomAttributeOption = {
|
|
1249
|
+
value?: string;
|
|
1250
|
+
label?: string;
|
|
1251
|
+
};
|
|
1252
|
+
/** Represents a custom attribute definition in the project schema. */
|
|
1253
|
+
declare type CustomAttribute = {
|
|
1254
|
+
name?: string;
|
|
1255
|
+
type?: number;
|
|
1256
|
+
options?: CustomAttributeOption[];
|
|
1257
|
+
displayName?: string;
|
|
1258
|
+
defaultValue?: any;
|
|
1259
|
+
viewPermissions?: string[];
|
|
1260
|
+
editPermissions?: string[];
|
|
1261
|
+
};
|
|
1262
|
+
/** A registered passkey (WebAuthn credential) for a user. */
|
|
1263
|
+
declare type UserPasskey = {
|
|
1264
|
+
id?: string;
|
|
1265
|
+
rpId?: string;
|
|
1266
|
+
kind?: string;
|
|
1267
|
+
displayName?: string;
|
|
1268
|
+
createdTime?: number;
|
|
1269
|
+
};
|
|
1270
|
+
/** A trusted device associated with a user. */
|
|
1271
|
+
declare type UserTrustedDevice = {
|
|
1272
|
+
id?: string;
|
|
1273
|
+
name?: string;
|
|
1274
|
+
deviceType?: string;
|
|
1275
|
+
lastLoginTime?: number;
|
|
1276
|
+
expirationTime?: number;
|
|
1277
|
+
lastLocation?: string;
|
|
1278
|
+
};
|
|
1279
|
+
/** A single failure entry returned from a user import. */
|
|
1280
|
+
declare type UserImportFailure = {
|
|
1281
|
+
user: string;
|
|
1282
|
+
reason: string;
|
|
1283
|
+
};
|
|
1284
|
+
/** Response of a user import operation. */
|
|
1285
|
+
declare type UserImportResponse = {
|
|
1286
|
+
users?: UserResponse[];
|
|
1287
|
+
failures?: UserImportFailure[];
|
|
1288
|
+
};
|
|
1289
|
+
/** Request to update an existing permission by its ID as part of a batch update. */
|
|
1290
|
+
declare type PermissionUpdateRequest = {
|
|
1291
|
+
id: string;
|
|
1292
|
+
newName: string;
|
|
1293
|
+
description?: string;
|
|
1294
|
+
};
|
|
1295
|
+
/** Request to update an existing role by its ID as part of a batch update. */
|
|
1296
|
+
declare type RoleUpdateRequest = {
|
|
1297
|
+
id: string;
|
|
1298
|
+
newName: string;
|
|
1299
|
+
description?: string;
|
|
1300
|
+
permissionNames?: string[];
|
|
1301
|
+
tenantId?: string;
|
|
1302
|
+
default?: boolean;
|
|
1303
|
+
};
|
|
1304
|
+
/** The type of a project list (currently "ip" or "text"). */
|
|
1305
|
+
declare type ListType = string;
|
|
1306
|
+
/** Represents a project list of IPs or texts. */
|
|
1307
|
+
declare type List = {
|
|
1308
|
+
id?: string;
|
|
1309
|
+
name?: string;
|
|
1310
|
+
description?: string;
|
|
1311
|
+
type?: ListType;
|
|
1312
|
+
data?: any;
|
|
1313
|
+
};
|
|
1314
|
+
/** Request payload for creating or updating a list. */
|
|
1315
|
+
declare type ListRequest = {
|
|
1316
|
+
name: string;
|
|
1317
|
+
description?: string;
|
|
1318
|
+
type: ListType;
|
|
1319
|
+
data?: any;
|
|
1320
|
+
};
|
|
1321
|
+
/** Represents a JWT template configuration. */
|
|
1322
|
+
declare type JWTTemplate = {
|
|
1323
|
+
id?: string;
|
|
1324
|
+
name?: string;
|
|
1325
|
+
description?: string;
|
|
1326
|
+
template?: Record<string, any>;
|
|
1327
|
+
source?: string;
|
|
1328
|
+
tags?: string[];
|
|
1329
|
+
authSchema?: string;
|
|
1330
|
+
type?: string;
|
|
1331
|
+
conformanceIssuer?: boolean;
|
|
1332
|
+
autoDCT?: boolean;
|
|
1333
|
+
enforceIssuer?: boolean;
|
|
1334
|
+
emptyClaimPolicy?: string;
|
|
1335
|
+
overrideSubject?: boolean;
|
|
1336
|
+
issuerType?: string;
|
|
1337
|
+
omitCustomClaimsFromDSR?: boolean;
|
|
1338
|
+
addJti?: boolean;
|
|
1339
|
+
excludePermissions?: boolean;
|
|
1340
|
+
};
|
|
1341
|
+
/** A single validation issue found while validating a JWT template. */
|
|
1342
|
+
declare type JWTTemplateValidationIssue = {
|
|
1343
|
+
message?: string;
|
|
1344
|
+
severity?: string;
|
|
1345
|
+
path?: string;
|
|
1346
|
+
};
|
|
1347
|
+
/** Result of validating a JWT template. */
|
|
1348
|
+
declare type JWTTemplateValidationResult = {
|
|
1349
|
+
valid: boolean;
|
|
1350
|
+
issues?: JWTTemplateValidationIssue[];
|
|
1351
|
+
};
|
|
1352
|
+
/** A JWT template entry available in the shared template library. */
|
|
1353
|
+
declare type JWTTemplateLibraryEntry = JWTTemplate & {
|
|
1354
|
+
experimental?: boolean;
|
|
1355
|
+
logoLight?: string;
|
|
1356
|
+
logoDark?: string;
|
|
1357
|
+
};
|
|
1358
|
+
/** Request payload for applying a JWT template from the library. */
|
|
1359
|
+
declare type ApplyJWTTemplateFromLibraryRequest = {
|
|
1360
|
+
libraryEntryId: string;
|
|
1361
|
+
nameOverride?: string;
|
|
1362
|
+
descriptionOverride?: string;
|
|
1363
|
+
tagsOverride?: string[];
|
|
1364
|
+
templateOverride?: Record<string, any>;
|
|
1365
|
+
};
|
|
1366
|
+
/** A single scope-to-claims mapping entry. */
|
|
1367
|
+
declare type ScopeClaimMappingEntry = {
|
|
1368
|
+
scope?: string;
|
|
1369
|
+
claims?: Record<string, string>;
|
|
1370
|
+
description?: string;
|
|
1371
|
+
};
|
|
1372
|
+
/** Options for searching analytics records. Time fields are epoch milliseconds. */
|
|
1373
|
+
declare type AnalyticsSearchOptions = {
|
|
1374
|
+
actions?: string[];
|
|
1375
|
+
excludedActions?: string[];
|
|
1376
|
+
from?: number;
|
|
1377
|
+
to?: number;
|
|
1378
|
+
devices?: string[];
|
|
1379
|
+
methods?: string[];
|
|
1380
|
+
geos?: string[];
|
|
1381
|
+
tenants?: string[];
|
|
1382
|
+
groupByAction?: boolean;
|
|
1383
|
+
groupByDevice?: boolean;
|
|
1384
|
+
groupByMethod?: boolean;
|
|
1385
|
+
groupByGeo?: boolean;
|
|
1386
|
+
groupByTenant?: boolean;
|
|
1387
|
+
groupByReferrer?: boolean;
|
|
1388
|
+
groupByCreated?: string;
|
|
1389
|
+
};
|
|
1390
|
+
/** A single analytics record returned from an analytics search. */
|
|
1391
|
+
declare type AnalyticRecord = {
|
|
1392
|
+
projectId?: string;
|
|
1393
|
+
action?: string;
|
|
1394
|
+
created?: string;
|
|
1395
|
+
device?: string;
|
|
1396
|
+
method?: string;
|
|
1397
|
+
geo?: string;
|
|
1398
|
+
tenant?: string;
|
|
1399
|
+
referrer?: string;
|
|
1400
|
+
cnt?: string;
|
|
1401
|
+
};
|
|
1176
1402
|
|
|
1177
1403
|
interface PatchUserOptions {
|
|
1178
1404
|
email?: string;
|
|
@@ -1362,10 +1588,22 @@ declare const nodeSdk: {
|
|
|
1362
1588
|
removeAllPasskeys: (loginId: string) => Promise<SdkResponse<never>>;
|
|
1363
1589
|
removeTOTPSeed: (loginId: string) => Promise<SdkResponse<never>>;
|
|
1364
1590
|
history: (userIds: string[]) => Promise<SdkResponse<_descope_core_js_sdk.UserHistoryResponse[]>>;
|
|
1591
|
+
import: (source: string, users?: string | Uint8Array, hashes?: string | Uint8Array, dryrun?: boolean) => Promise<SdkResponse<UserImportResponse>>;
|
|
1592
|
+
updateRecoveryEmail: (loginIdOrUserId: string, email: string, isVerified?: boolean) => Promise<SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
1593
|
+
updateRecoveryPhone: (loginIdOrUserId: string, phone: string, isVerified?: boolean) => Promise<SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
1594
|
+
updateUserNames: (loginIdOrUserId: string, givenName?: string, middleName?: string, familyName?: string) => Promise<SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
1595
|
+
getCustomAttributes: () => Promise<SdkResponse<CustomAttribute[]>>;
|
|
1596
|
+
createCustomAttributes: (attributes: CustomAttribute[]) => Promise<SdkResponse<CustomAttribute[]>>;
|
|
1597
|
+
deleteCustomAttributes: (names: string[]) => Promise<SdkResponse<CustomAttribute[]>>;
|
|
1598
|
+
removePasskey: (loginId: string, credentialId: string) => Promise<SdkResponse<never>>;
|
|
1599
|
+
listPasskeys: (loginId: string) => Promise<SdkResponse<UserPasskey[]>>;
|
|
1600
|
+
listTrustedDevices: (loginIdsOrUserIds: string[]) => Promise<SdkResponse<UserTrustedDevice[]>>;
|
|
1601
|
+
removeTrustedDevices: (loginIdOrUserId: string, deviceIds: string[]) => Promise<SdkResponse<never>>;
|
|
1365
1602
|
};
|
|
1366
1603
|
project: {
|
|
1367
1604
|
updateName: (name: string) => Promise<SdkResponse<never>>;
|
|
1368
1605
|
updateTags: (tags: string[]) => Promise<SdkResponse<never>>;
|
|
1606
|
+
delete: () => Promise<SdkResponse<never>>;
|
|
1369
1607
|
clone: (name: string, environment?: "production", tags?: string[]) => Promise<SdkResponse<CloneProjectResponse>>;
|
|
1370
1608
|
listProjects: () => Promise<SdkResponse<Project[]>>;
|
|
1371
1609
|
exportSnapshot: () => Promise<SdkResponse<ExportSnapshotResponse>>;
|
|
@@ -1380,8 +1618,12 @@ declare const nodeSdk: {
|
|
|
1380
1618
|
searchAll: (tenantIds?: string[], boundUserId?: string, creatingUser?: string, customAttributes?: Record<string, any>) => Promise<SdkResponse<AccessKey[]>>;
|
|
1381
1619
|
update: (id: string, name: string, description?: string, roles?: string[], tenants?: AssociatedTenant[], customClaims?: Record<string, any>, permittedIps?: string[], customAttributes?: Record<string, any>) => Promise<SdkResponse<AccessKey>>;
|
|
1382
1620
|
deactivate: (id: string) => Promise<SdkResponse<never>>;
|
|
1621
|
+
deactivateBatch: (ids: string[]) => Promise<SdkResponse<never>>;
|
|
1383
1622
|
activate: (id: string) => Promise<SdkResponse<never>>;
|
|
1623
|
+
activateBatch: (ids: string[]) => Promise<SdkResponse<never>>;
|
|
1384
1624
|
delete: (id: string) => Promise<SdkResponse<never>>;
|
|
1625
|
+
deleteBatch: (ids: string[]) => Promise<SdkResponse<never>>;
|
|
1626
|
+
rotate: (id: string) => Promise<SdkResponse<CreatedAccessKeyResponse>>;
|
|
1385
1627
|
};
|
|
1386
1628
|
tenant: {
|
|
1387
1629
|
create: (name: string, selfProvisioningDomains?: string[], customAttributes?: Record<string, AttributesTypes>, enforceSSO?: boolean, disabled?: boolean, parent?: string, roleInheritance?: "" | "none" | "userOnly") => Promise<SdkResponse<CreateTenantResponse>>;
|
|
@@ -1395,6 +1637,7 @@ declare const nodeSdk: {
|
|
|
1395
1637
|
getSettings: (tenantId: string) => Promise<SdkResponse<TenantSettings>>;
|
|
1396
1638
|
configureSettings: (tenantId: string, settings: TenantSettings) => Promise<SdkResponse<never>>;
|
|
1397
1639
|
generateSSOConfigurationLink: (tenantId: string, expireDuration: number, ssoId?: string, email?: string, templateId?: string, actorId?: string) => Promise<SdkResponse<GenerateSSOConfigurationLinkResponse>>;
|
|
1640
|
+
revokeSSOConfigurationLink: (tenantId: string, ssoId?: string) => Promise<SdkResponse<never>>;
|
|
1398
1641
|
};
|
|
1399
1642
|
ssoApplication: {
|
|
1400
1643
|
createOidcApplication: (options: OidcApplicationOptions) => Promise<SdkResponse<CreateSSOApplicationResponse>>;
|
|
@@ -1412,6 +1655,8 @@ declare const nodeSdk: {
|
|
|
1412
1655
|
delete: (id: string) => Promise<SdkResponse<never>>;
|
|
1413
1656
|
load: (id: string) => Promise<SdkResponse<SSOApplication>>;
|
|
1414
1657
|
loadAll: () => Promise<SdkResponse<SSOApplication[]>>;
|
|
1658
|
+
getApplicationSecret: (id: string) => Promise<SdkResponse<SSOApplicationSecretResponse>>;
|
|
1659
|
+
rotateApplicationSecret: (id: string) => Promise<SdkResponse<SSOApplicationSecretResponse>>;
|
|
1415
1660
|
};
|
|
1416
1661
|
inboundApplication: {
|
|
1417
1662
|
createApplication: (options: InboundApplicationOptions) => Promise<SdkResponse<CreateInboundApplicationResponse>>;
|
|
@@ -1422,12 +1667,14 @@ declare const nodeSdk: {
|
|
|
1422
1667
|
id: string;
|
|
1423
1668
|
}) => Promise<SdkResponse<never>>;
|
|
1424
1669
|
deleteApplication: (id: string) => Promise<SdkResponse<never>>;
|
|
1670
|
+
deleteApplicationBatch: (ids: string[]) => Promise<SdkResponse<never>>;
|
|
1425
1671
|
loadApplication: (id: string) => Promise<SdkResponse<InboundApplication>>;
|
|
1426
1672
|
loadAllApplications: () => Promise<SdkResponse<InboundApplication[]>>;
|
|
1427
1673
|
getApplicationSecret: (id: string) => Promise<SdkResponse<InboundApplicationSecretResponse>>;
|
|
1428
1674
|
rotateApplicationSecret: (id: string) => Promise<SdkResponse<never>>;
|
|
1429
1675
|
searchConsents: (options?: InboundApplicationConsentSearchOptions) => Promise<SdkResponse<InboundApplicationConsent[]>>;
|
|
1430
1676
|
deleteConsents: (options: InboundApplicationConsentDeleteOptions) => Promise<SdkResponse<never>>;
|
|
1677
|
+
deleteTenantConsents: (options: InboundApplicationTenantConsentDeleteOptions) => Promise<SdkResponse<never>>;
|
|
1431
1678
|
};
|
|
1432
1679
|
outboundApplication: {
|
|
1433
1680
|
createApplication: (app: Omit<OutboundApplication, "id"> & Partial<Pick<OutboundApplication, "id">> & {
|
|
@@ -1464,12 +1711,15 @@ declare const nodeSdk: {
|
|
|
1464
1711
|
configureOIDCSettings: (tenantId: string, settings: SSOOIDCSettings, domains?: string[], ssoId?: string) => Promise<SdkResponse<never>>;
|
|
1465
1712
|
configureSAMLSettings: (tenantId: string, settings: SSOSAMLSettings, redirectUrl?: string, domains?: string[], ssoId?: string) => Promise<SdkResponse<never>>;
|
|
1466
1713
|
configureSAMLByMetadata: (tenantId: string, settings: SSOSAMLByMetadataSettings, redirectUrl?: string, domains?: string[], ssoId?: string) => Promise<SdkResponse<never>>;
|
|
1714
|
+
configureSSORedirectURL: (tenantId: string, samlRedirectUrl?: string, oauthRedirectUrl?: string, ssoId?: string) => Promise<SdkResponse<never>>;
|
|
1715
|
+
recalculateSSOMappings: (tenantId: string, ssoId?: string) => Promise<SdkResponse<never>>;
|
|
1467
1716
|
loadSettings: (tenantId: string, ssoId?: string) => Promise<SdkResponse<SSOSettings>>;
|
|
1468
1717
|
loadAllSettings: (tenantId: string) => Promise<SdkResponse<SSOSettings[]>>;
|
|
1469
1718
|
};
|
|
1470
1719
|
jwt: {
|
|
1471
1720
|
update: (jwt: string, customClaims?: Record<string, any>, refreshDuration?: number) => Promise<SdkResponse<UpdateJWTResponse>>;
|
|
1472
1721
|
impersonate: (impersonatorId: string, loginId: string, validateConsent: boolean, customClaims?: Record<string, any>, selectedTenant?: string, refreshDuration?: number) => Promise<SdkResponse<UpdateJWTResponse>>;
|
|
1722
|
+
impersonateStepup: (impersonatorId: string, loginId: string, validateConsent: boolean, customClaims?: Record<string, any>, selectedTenant?: string, refreshDuration?: number) => Promise<SdkResponse<UpdateJWTResponse>>;
|
|
1473
1723
|
stopImpersonation: (jwt: string, customClaims?: Record<string, any>, selectedTenant?: string, refreshDuration?: number) => Promise<SdkResponse<UpdateJWTResponse>>;
|
|
1474
1724
|
signIn: (loginId: string, loginOptions?: MgmtLoginOptions) => Promise<SdkResponse<JWTResponse>>;
|
|
1475
1725
|
signUp: (loginId: string, user?: MgmtUserOptions, signUpOptions?: MgmtSignUpOptions) => Promise<SdkResponse<JWTResponse>>;
|
|
@@ -1491,8 +1741,13 @@ declare const nodeSdk: {
|
|
|
1491
1741
|
};
|
|
1492
1742
|
permission: {
|
|
1493
1743
|
create: (name: string, description?: string) => Promise<SdkResponse<never>>;
|
|
1744
|
+
createBatch: (permissions: Permission[]) => Promise<SdkResponse<never>>;
|
|
1494
1745
|
update: (name: string, newName: string, description?: string) => Promise<SdkResponse<never>>;
|
|
1746
|
+
updateWithId: (id: string, newName: string, description?: string) => Promise<SdkResponse<never>>;
|
|
1747
|
+
updateBatch: (permissions: PermissionUpdateRequest[]) => Promise<SdkResponse<never>>;
|
|
1495
1748
|
delete: (name: string) => Promise<SdkResponse<never>>;
|
|
1749
|
+
deleteWithId: (id: string) => Promise<SdkResponse<never>>;
|
|
1750
|
+
deleteBatch: (names?: string[], ids?: string[]) => Promise<SdkResponse<never>>;
|
|
1496
1751
|
loadAll: () => Promise<SdkResponse<Permission[]>>;
|
|
1497
1752
|
};
|
|
1498
1753
|
password: {
|
|
@@ -1501,8 +1756,14 @@ declare const nodeSdk: {
|
|
|
1501
1756
|
};
|
|
1502
1757
|
role: {
|
|
1503
1758
|
create: (name: string, description?: string, permissionNames?: string[], tenantId?: string, defaultRole?: boolean) => Promise<SdkResponse<never>>;
|
|
1759
|
+
createBatch: (roles: Role[]) => Promise<SdkResponse<Role[]>>;
|
|
1760
|
+
/** Configuration arguments which include the Descope core SDK args and an optional management key */
|
|
1504
1761
|
update: (name: string, newName: string, description?: string, permissionNames?: string[], tenantId?: string, defaultRole?: boolean) => Promise<SdkResponse<never>>;
|
|
1762
|
+
updateWithId: (id: string, newName: string, description?: string, permissionNames?: string[], tenantId?: string, defaultRole?: boolean) => Promise<SdkResponse<never>>;
|
|
1763
|
+
updateBatch: (roles: RoleUpdateRequest[]) => Promise<SdkResponse<Role[]>>;
|
|
1505
1764
|
delete: (name: string, tenantId?: string) => Promise<SdkResponse<never>>;
|
|
1765
|
+
deleteWithId: (id: string, tenantId?: string) => Promise<SdkResponse<never>>;
|
|
1766
|
+
deleteBatch: (roleNames?: string[], tenantId?: string, roleIds?: string[]) => Promise<SdkResponse<never>>;
|
|
1506
1767
|
loadAll: () => Promise<SdkResponse<Role[]>>;
|
|
1507
1768
|
search: (options: RoleSearchOptions) => Promise<SdkResponse<Role[]>>;
|
|
1508
1769
|
};
|
|
@@ -1524,7 +1785,9 @@ declare const nodeSdk: {
|
|
|
1524
1785
|
};
|
|
1525
1786
|
audit: {
|
|
1526
1787
|
search: (searchOptions: AuditSearchOptions) => Promise<SdkResponse<AuditRecord[]>>;
|
|
1788
|
+
searchAll: (searchOptions: AuditSearchOptions) => Promise<SdkResponse<AuditSearchAllResponse>>;
|
|
1527
1789
|
createEvent: (createOptions: AuditCreateOptions) => Promise<SdkResponse<never>>;
|
|
1790
|
+
createAuditWebhook: (options: AuditWebhook) => Promise<SdkResponse<never>>;
|
|
1528
1791
|
};
|
|
1529
1792
|
authz: {
|
|
1530
1793
|
saveSchema: (schema: AuthzSchema, upgrade: boolean) => Promise<SdkResponse<never>>;
|
|
@@ -1542,19 +1805,26 @@ declare const nodeSdk: {
|
|
|
1542
1805
|
hasRelations: (relationQueries: AuthzRelationQuery[]) => Promise<SdkResponse<AuthzRelationQuery[]>>;
|
|
1543
1806
|
whoCanAccess: (resource: string, relationDefinition: string, namespace: string) => Promise<SdkResponse<string[]>>;
|
|
1544
1807
|
resourceRelations: (resource: string, ignoreTargetSetRelations?: boolean) => Promise<SdkResponse<AuthzRelation[]>>;
|
|
1808
|
+
resourceRelationsWithTargetSetsFilter: (resource: string, includeTargetSetRelations?: boolean) => Promise<SdkResponse<AuthzRelation[]>>;
|
|
1545
1809
|
targetsRelations: (targets: string[], includeTargetSetRelations?: boolean) => Promise<SdkResponse<AuthzRelation[]>>;
|
|
1810
|
+
targetsRelationsWithTargetSetsFilter: (targets: string[], includeTargetSetRelations?: boolean) => Promise<SdkResponse<AuthzRelation[]>>;
|
|
1546
1811
|
whatCanTargetAccess: (target: string) => Promise<SdkResponse<AuthzRelation[]>>;
|
|
1547
1812
|
whatCanTargetAccessWithRelation: (target: string, relationDefinition: string, namespace: string) => Promise<SdkResponse<AuthzResource[]>>;
|
|
1548
1813
|
getModified: (since: Date) => Promise<SdkResponse<AuthzModified>>;
|
|
1549
1814
|
};
|
|
1550
1815
|
fga: {
|
|
1551
1816
|
saveSchema: (schema: FGASchema) => Promise<SdkResponse<never>>;
|
|
1817
|
+
loadSchema: () => Promise<SdkResponse<FGASchema>>;
|
|
1818
|
+
dryRunSchema: (schema: FGASchema) => Promise<SdkResponse<FGASchemaDryRunResponse>>;
|
|
1552
1819
|
deleteSchema: () => Promise<SdkResponse<never>>;
|
|
1553
1820
|
createRelations: (relations: FGARelation[]) => Promise<SdkResponse<never>>;
|
|
1554
1821
|
deleteRelations: (relations: FGARelation[]) => Promise<SdkResponse<never>>;
|
|
1555
1822
|
check: (relations: FGARelation[]) => Promise<SdkResponse<CheckResponseRelation[]>>;
|
|
1823
|
+
checkWithContext: (relations: FGARelation[], context?: Record<string, any>) => Promise<SdkResponse<CheckResponseRelation[]>>;
|
|
1556
1824
|
loadResourcesDetails: (resourceIdentifiers: FGAResourceIdentifier[]) => Promise<SdkResponse<FGAResourceDetails[]>>;
|
|
1557
1825
|
saveResourcesDetails: (resourcesDetails: FGAResourceDetails[]) => Promise<SdkResponse<never>>;
|
|
1826
|
+
loadMappableSchema: (tenantId: string, options?: FGAMappableResourcesOptions) => Promise<SdkResponse<FGAMappableSchema>>;
|
|
1827
|
+
searchMappableResources: (tenantId: string, resourcesQueries: FGAMappableResourcesQuery[], options?: FGAMappableResourcesOptions) => Promise<SdkResponse<FGAMappableResources[]>>;
|
|
1558
1828
|
deleteAllRelations: () => Promise<SdkResponse<never>>;
|
|
1559
1829
|
};
|
|
1560
1830
|
descoper: {
|
|
@@ -1585,6 +1855,41 @@ declare const nodeSdk: {
|
|
|
1585
1855
|
loadAll: () => Promise<SdkResponse<Engine[]>>;
|
|
1586
1856
|
rotateSecret: (id: string) => Promise<SdkResponse<EngineSecretResponse>>;
|
|
1587
1857
|
};
|
|
1858
|
+
list: {
|
|
1859
|
+
create: (request: ListRequest) => Promise<SdkResponse<List>>;
|
|
1860
|
+
update: (id: string, request: ListRequest) => Promise<SdkResponse<List>>;
|
|
1861
|
+
delete: (id: string) => Promise<SdkResponse<never>>;
|
|
1862
|
+
load: (id: string) => Promise<SdkResponse<List>>;
|
|
1863
|
+
loadByName: (name: string) => Promise<SdkResponse<List>>;
|
|
1864
|
+
loadAll: () => Promise<SdkResponse<List[]>>;
|
|
1865
|
+
import: (lists: List[]) => Promise<SdkResponse<never>>;
|
|
1866
|
+
addIPs: (id: string, ips: string[]) => Promise<SdkResponse<never>>;
|
|
1867
|
+
removeIPs: (id: string, ips: string[]) => Promise<SdkResponse<never>>;
|
|
1868
|
+
checkIP: (id: string, ip: string) => Promise<SdkResponse<any>>;
|
|
1869
|
+
addTexts: (id: string, texts: string[]) => Promise<SdkResponse<never>>;
|
|
1870
|
+
removeTexts: (id: string, texts: string[]) => Promise<SdkResponse<never>>;
|
|
1871
|
+
checkText: (id: string, text: string) => Promise<SdkResponse<any>>;
|
|
1872
|
+
clear: (id: string) => Promise<SdkResponse<never>>;
|
|
1873
|
+
};
|
|
1874
|
+
jwtTemplate: {
|
|
1875
|
+
create: (template: JWTTemplate) => Promise<SdkResponse<JWTTemplate>>;
|
|
1876
|
+
update: (template: JWTTemplate) => Promise<SdkResponse<JWTTemplate>>;
|
|
1877
|
+
delete: (id: string) => Promise<SdkResponse<never>>;
|
|
1878
|
+
list: () => Promise<SdkResponse<JWTTemplate[]>>;
|
|
1879
|
+
load: (id: string) => Promise<SdkResponse<JWTTemplate>>;
|
|
1880
|
+
validate: (id: string, template?: JWTTemplate) => Promise<SdkResponse<JWTTemplateValidationResult>>;
|
|
1881
|
+
listLibrary: () => Promise<SdkResponse<JWTTemplateLibraryEntry[]>>;
|
|
1882
|
+
loadLibraryEntry: (id: string) => Promise<SdkResponse<JWTTemplateLibraryEntry>>;
|
|
1883
|
+
applyFromLibrary: (request: ApplyJWTTemplateFromLibraryRequest) => Promise<SdkResponse<JWTTemplate>>;
|
|
1884
|
+
};
|
|
1885
|
+
scopeClaimMapping: {
|
|
1886
|
+
get: () => Promise<SdkResponse<ScopeClaimMappingEntry[]>>;
|
|
1887
|
+
set: (mappings: ScopeClaimMappingEntry[]) => Promise<SdkResponse<never>>;
|
|
1888
|
+
delete: () => Promise<SdkResponse<never>>;
|
|
1889
|
+
};
|
|
1890
|
+
analytics: {
|
|
1891
|
+
search: (options: AnalyticsSearchOptions) => Promise<SdkResponse<AnalyticRecord[]>>;
|
|
1892
|
+
};
|
|
1588
1893
|
};
|
|
1589
1894
|
getKey: (header: JWTHeaderParameters) => Promise<KeyLike | Uint8Array>;
|
|
1590
1895
|
validateJwt: (jwt: string, options?: VerifyOptions) => Promise<AuthenticationInfo>;
|
|
@@ -2403,4 +2708,4 @@ declare const nodeSdk: {
|
|
|
2403
2708
|
};
|
|
2404
2709
|
};
|
|
2405
2710
|
|
|
2406
|
-
export { AccessKey, AccessType, AssociatedTenant, AttributeMapping, AttributesTypes, AuditCreateOptions, AuditRecord, AuditSearchOptions, AuditType, AuthenticationInfo, AuthzModified, AuthzNamespace, AuthzNode, AuthzNodeExpression, AuthzNodeExpressionType, AuthzNodeType, AuthzRelation, AuthzRelationDefinition, AuthzRelationQuery, AuthzResource, AuthzSchema, AuthzUserQuery, BatchUploadOutboundAppTokensResponse, CheckResponseRelation, ClientAssertionResponse, CloneProjectResponse, CreateInboundApplicationResponse, CreateOrInviteBatchResponse, CreateOutboundAppByTemplateOptions, CreateSSOApplicationResponse, CreateTenantResponse, CreatedAccessKeyResponse, Descoper, DescoperAttributes, DescoperCreate, DescoperProjectRole, DescoperRBAC, DescoperRole, DescoperTagRole, Engine, EngineSecretResponse, ExpirationUnit, ExportSnapshotResponse, FGAConfig, FGARelation, FGAResourceDetails, FGAResourceIdentifier, FGASchema, FetchLatestOutboundAppTenantTokenRequest, FetchLatestOutboundAppUserTokenRequest, FetchOutboundAppTenantTokenRequest, FetchOutboundAppTokenOptions, FetchOutboundAppUserTokenRequest, Flow, FlowMetadata, FlowResponse, FlowsResponse, GenerateEmbeddedLinkResponse, GenerateEnchantedLinkForTestResponse, GenerateMagicLinkForTestResponse, GenerateOTPForTestResponse, GenerateSSOConfigurationLinkResponse, Group, GroupMember, GroupsMapping, IDPResponse, ImportSnapshotRequest, InboundApplication, InboundApplicationConsent, InboundApplicationConsentDeleteOptions, InboundApplicationConsentSearchOptions, InboundApplicationOptions, InboundApplicationScope, InboundApplicationSecretResponse, License, ManagementFlowOptions, MgmtKey, MgmtKeyCreateResponse, MgmtKeyProjectRole, MgmtKeyReBac, MgmtKeyStatus, MgmtKeyTagRole, MgmtLoginOptions, MgmtSignUpOptions, MgmtUserOptions, OIDCAttributeMapping, OIDCRoleMapping, OidcApplicationOptions, OutboundAppTemplateOverrides, OutboundAppTenantTokenToUpload, OutboundAppToken, OutboundAppTokenResponse, OutboundAppTokenUploadFailure, OutboundAppUserTokenToUpload, OutboundApplication, PasswordSettings, PatchUserBatchResponse, PatchUserOptions, Permission, Project, ProjectEnvironment, Prompt, PromptType, ProviderTokenOptions, ProviderTokenResponse, RefreshAuthenticationInfo, Role, RoleItem, RoleMapping, RoleMappings, RoleSearchOptions, RunManagementFlowResponse, SAMLIDPRoleGroupMappingInfo, SSOApplication, SSOApplicationOIDCSettings, SSOApplicationSAMLSettings, SSOApplicationWSFedSettings, SSOOIDCSettings, SSOSAMLByMetadataSettings, SSOSAMLSettings, SSOSAMLSettingsResponse, SSOSettings, SSOSettingsResponse, SSOSetupSuiteSettings, SSOSetupSuiteSettingsDisabledFeatures, SamlApplicationOptions, SamlIdpAttributeMappingInfo, SamlIdpGroupsMappingInfo, Screen, SnapshotSecret, SnapshotSecrets, TemplateOptions, Tenant, TenantSettings, Theme, ThemeResponse, URLParam, UpdateJWTResponse, UploadOutboundAppTenantTokenRequest, UploadOutboundAppUserTokenRequest, User, UserFailedResponse, UserMapping, UserOptions, UserPasswordBcrypt, UserPasswordDjango, UserPasswordFirebase, UserPasswordHashed, UserPasswordMd5, UserPasswordPbkdf2, UserPasswordPhpass, UserSearchResponse, UserStatus, ValidateSnapshotRequest, ValidateSnapshotResponse, VerifyOptions, WsFedApplicationOptions, nodeSdk as default };
|
|
2711
|
+
export { AccessKey, AccessType, AnalyticRecord, AnalyticsSearchOptions, ApplyJWTTemplateFromLibraryRequest, AssociatedTenant, AttributeMapping, AttributesTypes, AuditCreateOptions, AuditFilters, AuditRecord, AuditSearchAllResponse, AuditSearchOptions, AuditType, AuditWebhook, AuthenticationInfo, AuthzModified, AuthzNamespace, AuthzNode, AuthzNodeExpression, AuthzNodeExpressionType, AuthzNodeType, AuthzRelation, AuthzRelationDefinition, AuthzRelationQuery, AuthzResource, AuthzSchema, AuthzUserQuery, BatchUploadOutboundAppTokensResponse, CheckResponseRelation, ClientAssertionResponse, CloneProjectResponse, ConnectorHTTPAPIKeyAuthentication, ConnectorHTTPAuthentication, ConnectorHTTPBasicAuthentication, CreateInboundApplicationResponse, CreateOrInviteBatchResponse, CreateOutboundAppByTemplateOptions, CreateSSOApplicationResponse, CreateTenantResponse, CreatedAccessKeyResponse, CustomAttribute, CustomAttributeOption, Descoper, DescoperAttributes, DescoperCreate, DescoperProjectRole, DescoperRBAC, DescoperRole, DescoperTagRole, Engine, EngineSecretResponse, ExpirationUnit, ExportSnapshotResponse, FGAConfig, FGAMappableResource, FGAMappableResources, FGAMappableResourcesOptions, FGAMappableResourcesQuery, FGAMappableSchema, FGARelation, FGAResourceDetails, FGAResourceIdentifier, FGASchema, FGASchemaDryRunResponse, FetchLatestOutboundAppTenantTokenRequest, FetchLatestOutboundAppUserTokenRequest, FetchOutboundAppTenantTokenRequest, FetchOutboundAppTokenOptions, FetchOutboundAppUserTokenRequest, Flow, FlowMetadata, FlowResponse, FlowsResponse, GenerateEmbeddedLinkResponse, GenerateEnchantedLinkForTestResponse, GenerateMagicLinkForTestResponse, GenerateOTPForTestResponse, GenerateSSOConfigurationLinkResponse, Group, GroupMember, GroupsMapping, IDPResponse, ImportSnapshotRequest, InboundApplication, InboundApplicationConsent, InboundApplicationConsentDeleteOptions, InboundApplicationConsentSearchOptions, InboundApplicationOptions, InboundApplicationScope, InboundApplicationSecretResponse, InboundApplicationTenantConsentDeleteOptions, JWTTemplate, JWTTemplateLibraryEntry, JWTTemplateValidationIssue, JWTTemplateValidationResult, License, List, ListRequest, ListType, ManagementFlowOptions, MgmtKey, MgmtKeyCreateResponse, MgmtKeyProjectRole, MgmtKeyReBac, MgmtKeyStatus, MgmtKeyTagRole, MgmtLoginOptions, MgmtSignUpOptions, MgmtUserOptions, OIDCAttributeMapping, OIDCRoleMapping, OidcApplicationOptions, OutboundAppTemplateOverrides, OutboundAppTenantTokenToUpload, OutboundAppToken, OutboundAppTokenResponse, OutboundAppTokenUploadFailure, OutboundAppUserTokenToUpload, OutboundApplication, PasswordSettings, PatchUserBatchResponse, PatchUserOptions, Permission, PermissionUpdateRequest, Project, ProjectEnvironment, Prompt, PromptType, ProviderTokenOptions, ProviderTokenResponse, RefreshAuthenticationInfo, Role, RoleItem, RoleMapping, RoleMappings, RoleSearchOptions, RoleUpdateRequest, RunManagementFlowResponse, SAMLIDPRoleGroupMappingInfo, SSOApplication, SSOApplicationOIDCSettings, SSOApplicationSAMLSettings, SSOApplicationSecretResponse, SSOApplicationWSFedSettings, SSOOIDCSettings, SSOSAMLByMetadataSettings, SSOSAMLSettings, SSOSAMLSettingsResponse, SSOSettings, SSOSettingsResponse, SSOSetupSuiteSettings, SSOSetupSuiteSettingsDisabledFeatures, SamlApplicationOptions, SamlIdpAttributeMappingInfo, SamlIdpGroupsMappingInfo, ScopeClaimMappingEntry, Screen, SnapshotSecret, SnapshotSecrets, TemplateOptions, Tenant, TenantSettings, Theme, ThemeResponse, URLParam, UpdateJWTResponse, UploadOutboundAppTenantTokenRequest, UploadOutboundAppUserTokenRequest, User, UserFailedResponse, UserImportFailure, UserImportResponse, UserMapping, UserOptions, UserPasskey, UserPasswordBcrypt, UserPasswordDjango, UserPasswordFirebase, UserPasswordHashed, UserPasswordMd5, UserPasswordPbkdf2, UserPasswordPhpass, UserSearchResponse, UserStatus, UserTrustedDevice, ValidateSnapshotRequest, ValidateSnapshotResponse, VerifyOptions, WsFedApplicationOptions, nodeSdk as default };
|