auth0 5.10.0 → 5.11.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/management/BaseClient.d.ts +3 -0
- package/dist/cjs/management/BaseClient.js +15 -0
- package/dist/cjs/management/Client.d.ts +3 -0
- package/dist/cjs/management/Client.js +41 -36
- package/dist/cjs/management/api/requests/requests.d.ts +259 -0
- package/dist/cjs/management/api/resources/actions/client/Client.d.ts +1 -1
- package/dist/cjs/management/api/resources/actions/client/Client.js +1 -1
- package/dist/cjs/management/api/resources/branding/resources/templates/client/Client.d.ts +16 -16
- package/dist/cjs/management/api/resources/branding/resources/templates/client/Client.js +16 -16
- package/dist/cjs/management/api/resources/clients/client/Client.d.ts +12 -3
- package/dist/cjs/management/api/resources/clients/client/Client.js +12 -3
- package/dist/cjs/management/api/resources/connections/client/Client.d.ts +17 -19
- package/dist/cjs/management/api/resources/connections/client/Client.js +17 -19
- package/dist/cjs/management/api/resources/connections/resources/clients/client/Client.d.ts +2 -2
- package/dist/cjs/management/api/resources/connections/resources/clients/client/Client.js +2 -2
- package/dist/cjs/management/api/resources/connections/resources/scimConfiguration/client/Client.d.ts +4 -4
- package/dist/cjs/management/api/resources/connections/resources/scimConfiguration/client/Client.js +4 -4
- package/dist/cjs/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/Client.d.ts +2 -2
- package/dist/cjs/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/Client.js +2 -2
- package/dist/cjs/management/api/resources/customDomains/client/Client.d.ts +19 -12
- package/dist/cjs/management/api/resources/customDomains/client/Client.js +19 -12
- package/dist/cjs/management/api/resources/deviceCredentials/client/Client.d.ts +3 -3
- package/dist/cjs/management/api/resources/deviceCredentials/client/Client.js +3 -3
- package/dist/cjs/management/api/resources/groups/client/Client.d.ts +3 -0
- package/dist/cjs/management/api/resources/groups/client/Client.js +5 -0
- package/dist/cjs/management/api/resources/groups/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/groups/resources/index.js +2 -1
- package/dist/cjs/management/api/resources/groups/resources/roles/client/Client.d.ts +71 -0
- package/dist/cjs/management/api/resources/groups/resources/roles/client/Client.js +270 -0
- package/dist/cjs/management/api/resources/groups/resources/roles/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/groups/resources/roles/client/index.js +2 -0
- package/dist/cjs/management/api/resources/groups/resources/roles/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/groups/resources/roles/index.js +17 -0
- package/dist/cjs/management/api/resources/guardian/resources/enrollments/client/Client.d.ts +2 -5
- package/dist/cjs/management/api/resources/guardian/resources/enrollments/client/Client.js +2 -5
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/pushNotification/client/Client.d.ts +3 -3
- package/dist/cjs/management/api/resources/guardian/resources/factors/resources/pushNotification/client/Client.js +3 -3
- package/dist/cjs/management/api/resources/guardian/resources/policies/client/Client.d.ts +10 -12
- package/dist/cjs/management/api/resources/guardian/resources/policies/client/Client.js +10 -12
- package/dist/cjs/management/api/resources/hooks/client/Client.d.ts +2 -2
- package/dist/cjs/management/api/resources/hooks/client/Client.js +2 -2
- package/dist/cjs/management/api/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/index.js +2 -1
- package/dist/cjs/management/api/resources/jobs/resources/verificationEmail/client/Client.d.ts +1 -1
- package/dist/cjs/management/api/resources/jobs/resources/verificationEmail/client/Client.js +1 -1
- package/dist/cjs/management/api/resources/logs/client/Client.d.ts +17 -20
- package/dist/cjs/management/api/resources/logs/client/Client.js +17 -20
- package/dist/cjs/management/api/resources/organizations/client/Client.d.ts +14 -13
- package/dist/cjs/management/api/resources/organizations/client/Client.js +20 -17
- package/dist/cjs/management/api/resources/organizations/resources/discoveryDomains/client/Client.d.ts +1 -1
- package/dist/cjs/management/api/resources/organizations/resources/discoveryDomains/client/Client.js +1 -1
- package/dist/cjs/management/api/resources/organizations/resources/enabledConnections/client/Client.d.ts +2 -2
- package/dist/cjs/management/api/resources/organizations/resources/enabledConnections/client/Client.js +2 -2
- package/dist/cjs/management/api/resources/organizations/resources/groups/client/Client.d.ts +35 -0
- package/dist/cjs/management/api/resources/organizations/resources/groups/client/Client.js +146 -0
- package/dist/cjs/management/api/resources/organizations/resources/groups/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/groups/client/index.js +2 -0
- package/dist/cjs/management/api/resources/organizations/resources/groups/index.d.ts +2 -0
- package/dist/cjs/management/api/resources/organizations/resources/groups/index.js +18 -0
- package/dist/cjs/management/api/resources/organizations/resources/groups/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/groups/resources/index.js +37 -0
- package/dist/cjs/management/api/resources/organizations/resources/groups/resources/roles/client/Client.d.ts +74 -0
- package/dist/cjs/management/api/resources/organizations/resources/groups/resources/roles/client/Client.js +273 -0
- package/dist/cjs/management/api/resources/organizations/resources/groups/resources/roles/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/groups/resources/roles/client/index.js +2 -0
- package/dist/cjs/management/api/resources/organizations/resources/groups/resources/roles/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/groups/resources/roles/index.js +17 -0
- package/dist/cjs/management/api/resources/organizations/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/index.js +2 -1
- package/dist/cjs/management/api/resources/organizations/resources/invitations/client/Client.d.ts +2 -2
- package/dist/cjs/management/api/resources/organizations/resources/invitations/client/Client.js +2 -2
- package/dist/cjs/management/api/resources/organizations/resources/members/client/Client.d.ts +9 -12
- package/dist/cjs/management/api/resources/organizations/resources/members/client/Client.js +13 -14
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/client/Client.d.ts +36 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/client/Client.js +147 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/client/index.js +2 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/index.d.ts +2 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/index.js +18 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/index.js +37 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/client/Client.d.ts +12 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/client/Client.js +16 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/client/index.js +2 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/index.d.ts +2 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/index.js +18 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/groups/client/Client.d.ts +34 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/groups/client/Client.js +144 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/groups/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/groups/client/index.js +2 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/groups/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/groups/index.js +17 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/index.js +37 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/index.js +2 -1
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/roles/client/Client.d.ts +2 -2
- package/dist/cjs/management/api/resources/organizations/resources/members/resources/roles/client/Client.js +2 -2
- package/dist/cjs/management/api/resources/prompts/resources/rendering/client/Client.d.ts +2 -2
- package/dist/cjs/management/api/resources/prompts/resources/rendering/client/Client.js +2 -2
- package/dist/cjs/management/api/resources/rateLimitPolicies/client/Client.d.ts +102 -0
- package/dist/cjs/management/api/resources/rateLimitPolicies/client/Client.js +397 -0
- package/dist/cjs/management/api/resources/rateLimitPolicies/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/rateLimitPolicies/client/index.js +2 -0
- package/dist/cjs/management/api/resources/rateLimitPolicies/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/rateLimitPolicies/index.js +17 -0
- package/dist/cjs/management/api/resources/roles/client/Client.d.ts +9 -6
- package/dist/cjs/management/api/resources/roles/client/Client.js +15 -10
- package/dist/cjs/management/api/resources/roles/resources/groups/client/Client.d.ts +71 -0
- package/dist/cjs/management/api/resources/roles/resources/groups/client/Client.js +270 -0
- package/dist/cjs/management/api/resources/roles/resources/groups/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/roles/resources/groups/client/index.js +2 -0
- package/dist/cjs/management/api/resources/roles/resources/groups/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/roles/resources/groups/index.js +17 -0
- package/dist/cjs/management/api/resources/roles/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/roles/resources/index.js +2 -1
- package/dist/cjs/management/api/resources/roles/resources/permissions/client/Client.d.ts +2 -2
- package/dist/cjs/management/api/resources/roles/resources/permissions/client/Client.js +2 -2
- package/dist/cjs/management/api/resources/roles/resources/users/client/Client.d.ts +11 -13
- package/dist/cjs/management/api/resources/roles/resources/users/client/Client.js +11 -13
- package/dist/cjs/management/api/resources/rules/client/Client.d.ts +4 -4
- package/dist/cjs/management/api/resources/rules/client/Client.js +4 -4
- package/dist/cjs/management/api/resources/userAttributeProfiles/client/Client.d.ts +1 -1
- package/dist/cjs/management/api/resources/userAttributeProfiles/client/Client.js +1 -1
- package/dist/cjs/management/api/resources/userBlocks/client/Client.d.ts +6 -6
- package/dist/cjs/management/api/resources/userBlocks/client/Client.js +6 -6
- package/dist/cjs/management/api/resources/users/client/Client.d.ts +82 -51
- package/dist/cjs/management/api/resources/users/client/Client.js +110 -75
- package/dist/cjs/management/api/resources/users/resources/authenticators/client/Client.d.ts +1 -1
- package/dist/cjs/management/api/resources/users/resources/authenticators/client/Client.js +1 -1
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/client/Client.d.ts +37 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/client/Client.js +151 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/client/index.js +2 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/index.d.ts +2 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/index.js +18 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/resources/index.js +37 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/resources/sources/client/Client.d.ts +12 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/resources/sources/client/Client.js +16 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/resources/sources/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/resources/sources/client/index.js +2 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/resources/sources/index.d.ts +2 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/resources/sources/index.js +18 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/resources/sources/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/resources/sources/resources/index.js +37 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/resources/sources/resources/roles/client/Client.d.ts +35 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/resources/sources/resources/roles/client/Client.js +148 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/resources/sources/resources/roles/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/resources/sources/resources/roles/client/index.js +2 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/resources/sources/resources/roles/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/users/resources/effectivePermissions/resources/sources/resources/roles/index.js +17 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/client/Client.d.ts +35 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/client/Client.js +146 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/client/index.js +2 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/index.d.ts +2 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/index.js +18 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/index.js +37 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/sources/client/Client.d.ts +12 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/sources/client/Client.js +16 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/sources/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/sources/client/index.js +2 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/sources/index.d.ts +2 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/sources/index.js +18 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/groups/client/Client.d.ts +33 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/groups/client/Client.js +143 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/groups/client/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/groups/client/index.js +2 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/groups/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/groups/index.js +17 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/index.d.ts +1 -0
- package/dist/cjs/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/index.js +37 -0
- package/dist/cjs/management/api/resources/users/resources/enrollments/client/Client.d.ts +1 -1
- package/dist/cjs/management/api/resources/users/resources/enrollments/client/Client.js +1 -1
- package/dist/cjs/management/api/resources/users/resources/identities/client/Client.d.ts +26 -25
- package/dist/cjs/management/api/resources/users/resources/identities/client/Client.js +26 -25
- package/dist/cjs/management/api/resources/users/resources/index.d.ts +2 -0
- package/dist/cjs/management/api/resources/users/resources/index.js +3 -1
- package/dist/cjs/management/api/resources/users/resources/multifactor/client/Client.d.ts +2 -2
- package/dist/cjs/management/api/resources/users/resources/multifactor/client/Client.js +2 -2
- package/dist/cjs/management/api/resources/users/resources/organizations/client/Client.d.ts +1 -1
- package/dist/cjs/management/api/resources/users/resources/organizations/client/Client.js +1 -1
- package/dist/cjs/management/api/resources/users/resources/roles/client/Client.d.ts +4 -4
- package/dist/cjs/management/api/resources/users/resources/roles/client/Client.js +4 -4
- package/dist/cjs/management/api/types/types.d.ts +412 -51
- package/dist/cjs/management/api/types/types.js +94 -4
- package/dist/cjs/management/core/auth/AuthProvider.d.ts +1 -0
- package/dist/cjs/management/core/auth/AuthProvider.js +7 -0
- package/dist/cjs/management/core/auth/index.d.ts +1 -1
- package/dist/cjs/management/core/auth/index.js +3 -1
- package/dist/cjs/management/core/fetcher/requestWithRetries.js +4 -1
- package/dist/cjs/management/version.d.ts +1 -1
- package/dist/cjs/management/version.js +1 -1
- package/dist/esm/management/BaseClient.d.mts +3 -0
- package/dist/esm/management/BaseClient.mjs +15 -0
- package/dist/esm/management/Client.d.mts +3 -0
- package/dist/esm/management/Client.mjs +5 -0
- package/dist/esm/management/api/requests/requests.d.mts +259 -0
- package/dist/esm/management/api/resources/actions/client/Client.d.mts +1 -1
- package/dist/esm/management/api/resources/actions/client/Client.mjs +1 -1
- package/dist/esm/management/api/resources/branding/resources/templates/client/Client.d.mts +16 -16
- package/dist/esm/management/api/resources/branding/resources/templates/client/Client.mjs +16 -16
- package/dist/esm/management/api/resources/clients/client/Client.d.mts +12 -3
- package/dist/esm/management/api/resources/clients/client/Client.mjs +12 -3
- package/dist/esm/management/api/resources/connections/client/Client.d.mts +17 -19
- package/dist/esm/management/api/resources/connections/client/Client.mjs +17 -19
- package/dist/esm/management/api/resources/connections/resources/clients/client/Client.d.mts +2 -2
- package/dist/esm/management/api/resources/connections/resources/clients/client/Client.mjs +2 -2
- package/dist/esm/management/api/resources/connections/resources/scimConfiguration/client/Client.d.mts +4 -4
- package/dist/esm/management/api/resources/connections/resources/scimConfiguration/client/Client.mjs +4 -4
- package/dist/esm/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/Client.d.mts +2 -2
- package/dist/esm/management/api/resources/connections/resources/scimConfiguration/resources/tokens/client/Client.mjs +2 -2
- package/dist/esm/management/api/resources/customDomains/client/Client.d.mts +19 -12
- package/dist/esm/management/api/resources/customDomains/client/Client.mjs +19 -12
- package/dist/esm/management/api/resources/deviceCredentials/client/Client.d.mts +3 -3
- package/dist/esm/management/api/resources/deviceCredentials/client/Client.mjs +3 -3
- package/dist/esm/management/api/resources/groups/client/Client.d.mts +3 -0
- package/dist/esm/management/api/resources/groups/client/Client.mjs +5 -0
- package/dist/esm/management/api/resources/groups/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/groups/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/groups/resources/roles/client/Client.d.mts +71 -0
- package/dist/esm/management/api/resources/groups/resources/roles/client/Client.mjs +233 -0
- package/dist/esm/management/api/resources/groups/resources/roles/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/groups/resources/roles/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/groups/resources/roles/index.d.mts +1 -0
- package/dist/esm/management/api/resources/groups/resources/roles/index.mjs +1 -0
- package/dist/esm/management/api/resources/guardian/resources/enrollments/client/Client.d.mts +2 -5
- package/dist/esm/management/api/resources/guardian/resources/enrollments/client/Client.mjs +2 -5
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/pushNotification/client/Client.d.mts +3 -3
- package/dist/esm/management/api/resources/guardian/resources/factors/resources/pushNotification/client/Client.mjs +3 -3
- package/dist/esm/management/api/resources/guardian/resources/policies/client/Client.d.mts +10 -12
- package/dist/esm/management/api/resources/guardian/resources/policies/client/Client.mjs +10 -12
- package/dist/esm/management/api/resources/hooks/client/Client.d.mts +2 -2
- package/dist/esm/management/api/resources/hooks/client/Client.mjs +2 -2
- package/dist/esm/management/api/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/jobs/resources/verificationEmail/client/Client.d.mts +1 -1
- package/dist/esm/management/api/resources/jobs/resources/verificationEmail/client/Client.mjs +1 -1
- package/dist/esm/management/api/resources/logs/client/Client.d.mts +17 -20
- package/dist/esm/management/api/resources/logs/client/Client.mjs +17 -20
- package/dist/esm/management/api/resources/organizations/client/Client.d.mts +14 -13
- package/dist/esm/management/api/resources/organizations/client/Client.mjs +16 -13
- package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.d.mts +1 -1
- package/dist/esm/management/api/resources/organizations/resources/discoveryDomains/client/Client.mjs +1 -1
- package/dist/esm/management/api/resources/organizations/resources/enabledConnections/client/Client.d.mts +2 -2
- package/dist/esm/management/api/resources/organizations/resources/enabledConnections/client/Client.mjs +2 -2
- package/dist/esm/management/api/resources/organizations/resources/groups/client/Client.d.mts +35 -0
- package/dist/esm/management/api/resources/organizations/resources/groups/client/Client.mjs +109 -0
- package/dist/esm/management/api/resources/organizations/resources/groups/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/groups/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/groups/index.d.mts +2 -0
- package/dist/esm/management/api/resources/organizations/resources/groups/index.mjs +2 -0
- package/dist/esm/management/api/resources/organizations/resources/groups/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/groups/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/groups/resources/roles/client/Client.d.mts +74 -0
- package/dist/esm/management/api/resources/organizations/resources/groups/resources/roles/client/Client.mjs +236 -0
- package/dist/esm/management/api/resources/organizations/resources/groups/resources/roles/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/groups/resources/roles/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/groups/resources/roles/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/groups/resources/roles/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/invitations/client/Client.d.mts +2 -2
- package/dist/esm/management/api/resources/organizations/resources/invitations/client/Client.mjs +2 -2
- package/dist/esm/management/api/resources/organizations/resources/members/client/Client.d.mts +9 -12
- package/dist/esm/management/api/resources/organizations/resources/members/client/Client.mjs +11 -12
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/client/Client.d.mts +36 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/client/Client.mjs +110 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/index.d.mts +2 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/index.mjs +2 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/client/Client.d.mts +12 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/client/Client.mjs +12 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/index.d.mts +2 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/index.mjs +2 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/groups/client/Client.d.mts +34 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/groups/client/Client.mjs +107 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/groups/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/groups/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/groups/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/groups/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/effectiveRoles/resources/sources/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/organizations/resources/members/resources/roles/client/Client.d.mts +2 -2
- package/dist/esm/management/api/resources/organizations/resources/members/resources/roles/client/Client.mjs +2 -2
- package/dist/esm/management/api/resources/prompts/resources/rendering/client/Client.d.mts +2 -2
- package/dist/esm/management/api/resources/prompts/resources/rendering/client/Client.mjs +2 -2
- package/dist/esm/management/api/resources/rateLimitPolicies/client/Client.d.mts +102 -0
- package/dist/esm/management/api/resources/rateLimitPolicies/client/Client.mjs +360 -0
- package/dist/esm/management/api/resources/rateLimitPolicies/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/rateLimitPolicies/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/rateLimitPolicies/index.d.mts +1 -0
- package/dist/esm/management/api/resources/rateLimitPolicies/index.mjs +1 -0
- package/dist/esm/management/api/resources/roles/client/Client.d.mts +9 -6
- package/dist/esm/management/api/resources/roles/client/Client.mjs +11 -6
- package/dist/esm/management/api/resources/roles/resources/groups/client/Client.d.mts +71 -0
- package/dist/esm/management/api/resources/roles/resources/groups/client/Client.mjs +233 -0
- package/dist/esm/management/api/resources/roles/resources/groups/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/roles/resources/groups/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/roles/resources/groups/index.d.mts +1 -0
- package/dist/esm/management/api/resources/roles/resources/groups/index.mjs +1 -0
- package/dist/esm/management/api/resources/roles/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/roles/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/roles/resources/permissions/client/Client.d.mts +2 -2
- package/dist/esm/management/api/resources/roles/resources/permissions/client/Client.mjs +2 -2
- package/dist/esm/management/api/resources/roles/resources/users/client/Client.d.mts +11 -13
- package/dist/esm/management/api/resources/roles/resources/users/client/Client.mjs +11 -13
- package/dist/esm/management/api/resources/rules/client/Client.d.mts +4 -4
- package/dist/esm/management/api/resources/rules/client/Client.mjs +4 -4
- package/dist/esm/management/api/resources/userAttributeProfiles/client/Client.d.mts +1 -1
- package/dist/esm/management/api/resources/userAttributeProfiles/client/Client.mjs +1 -1
- package/dist/esm/management/api/resources/userBlocks/client/Client.d.mts +6 -6
- package/dist/esm/management/api/resources/userBlocks/client/Client.mjs +6 -6
- package/dist/esm/management/api/resources/users/client/Client.d.mts +82 -51
- package/dist/esm/management/api/resources/users/client/Client.mjs +86 -51
- package/dist/esm/management/api/resources/users/resources/authenticators/client/Client.d.mts +1 -1
- package/dist/esm/management/api/resources/users/resources/authenticators/client/Client.mjs +1 -1
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/client/Client.d.mts +37 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/client/Client.mjs +114 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/index.d.mts +2 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/index.mjs +2 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/resources/sources/client/Client.d.mts +12 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/resources/sources/client/Client.mjs +12 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/resources/sources/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/resources/sources/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/resources/sources/index.d.mts +2 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/resources/sources/index.mjs +2 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/resources/sources/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/resources/sources/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/resources/sources/resources/roles/client/Client.d.mts +35 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/resources/sources/resources/roles/client/Client.mjs +111 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/resources/sources/resources/roles/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/resources/sources/resources/roles/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/resources/sources/resources/roles/index.d.mts +1 -0
- package/dist/esm/management/api/resources/users/resources/effectivePermissions/resources/sources/resources/roles/index.mjs +1 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/client/Client.d.mts +35 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/client/Client.mjs +109 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/index.d.mts +2 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/index.mjs +2 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/sources/client/Client.d.mts +12 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/sources/client/Client.mjs +12 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/sources/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/sources/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/sources/index.d.mts +2 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/sources/index.mjs +2 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/groups/client/Client.d.mts +33 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/groups/client/Client.mjs +106 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/groups/client/index.d.mts +1 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/groups/client/index.mjs +1 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/groups/index.d.mts +1 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/groups/index.mjs +1 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/index.d.mts +1 -0
- package/dist/esm/management/api/resources/users/resources/effectiveRoles/resources/sources/resources/index.mjs +1 -0
- package/dist/esm/management/api/resources/users/resources/enrollments/client/Client.d.mts +1 -1
- package/dist/esm/management/api/resources/users/resources/enrollments/client/Client.mjs +1 -1
- package/dist/esm/management/api/resources/users/resources/identities/client/Client.d.mts +26 -25
- package/dist/esm/management/api/resources/users/resources/identities/client/Client.mjs +26 -25
- package/dist/esm/management/api/resources/users/resources/index.d.mts +2 -0
- package/dist/esm/management/api/resources/users/resources/index.mjs +2 -0
- package/dist/esm/management/api/resources/users/resources/multifactor/client/Client.d.mts +2 -2
- package/dist/esm/management/api/resources/users/resources/multifactor/client/Client.mjs +2 -2
- package/dist/esm/management/api/resources/users/resources/organizations/client/Client.d.mts +1 -1
- package/dist/esm/management/api/resources/users/resources/organizations/client/Client.mjs +1 -1
- package/dist/esm/management/api/resources/users/resources/roles/client/Client.d.mts +4 -4
- package/dist/esm/management/api/resources/users/resources/roles/client/Client.mjs +4 -4
- package/dist/esm/management/api/types/types.d.mts +412 -51
- package/dist/esm/management/api/types/types.mjs +91 -1
- package/dist/esm/management/core/auth/AuthProvider.d.mts +1 -0
- package/dist/esm/management/core/auth/AuthProvider.mjs +6 -1
- package/dist/esm/management/core/auth/index.d.mts +1 -1
- package/dist/esm/management/core/auth/index.mjs +1 -0
- package/dist/esm/management/core/fetcher/requestWithRetries.mjs +4 -1
- package/dist/esm/management/version.d.mts +1 -1
- package/dist/esm/management/version.mjs +1 -1
- package/package.json +3 -3
- package/reference.md +3564 -1868
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { normalizeClientOptionsWithAuth, } from "../../../../../../../../BaseClient.mjs";
|
|
12
|
+
import * as core from "../../../../../../../../core/index.mjs";
|
|
13
|
+
import { mergeHeaders } from "../../../../../../../../core/headers.mjs";
|
|
14
|
+
import * as environments from "../../../../../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../../../../../errors/index.mjs";
|
|
17
|
+
import * as Management from "../../../../../../../index.mjs";
|
|
18
|
+
export class RolesClient {
|
|
19
|
+
constructor(options) {
|
|
20
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Lists the roles assigned to the specified group in the context of an organization.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} organization_id - ID of the organization
|
|
26
|
+
* @param {string} group_id - ID of the group
|
|
27
|
+
* @param {Management.ListOrganizationGroupRolesRequestParameters} request
|
|
28
|
+
* @param {RolesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
29
|
+
*
|
|
30
|
+
* @throws {@link Management.BadRequestError}
|
|
31
|
+
* @throws {@link Management.UnauthorizedError}
|
|
32
|
+
* @throws {@link Management.ForbiddenError}
|
|
33
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* await client.organizations.groups.roles.list("organization_id", "group_id", {
|
|
37
|
+
* from: "from",
|
|
38
|
+
* take: 1
|
|
39
|
+
* })
|
|
40
|
+
*/
|
|
41
|
+
list(organization_id_1, group_id_1) {
|
|
42
|
+
return __awaiter(this, arguments, void 0, function* (organization_id, group_id, request = {}, requestOptions) {
|
|
43
|
+
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
45
|
+
const { from: from_, take = 50 } = request;
|
|
46
|
+
const _queryParams = {
|
|
47
|
+
from: from_,
|
|
48
|
+
take,
|
|
49
|
+
};
|
|
50
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
51
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
52
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
53
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, `organizations/${core.url.encodePathParam(organization_id)}/groups/${core.url.encodePathParam(group_id)}/roles`),
|
|
54
|
+
method: "GET",
|
|
55
|
+
headers: _headers,
|
|
56
|
+
queryString: core.url
|
|
57
|
+
.queryBuilder()
|
|
58
|
+
.addMany(_queryParams)
|
|
59
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
60
|
+
.build(),
|
|
61
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
62
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
63
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
64
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
65
|
+
logging: this._options.logging,
|
|
66
|
+
});
|
|
67
|
+
if (_response.ok) {
|
|
68
|
+
return {
|
|
69
|
+
data: _response.body,
|
|
70
|
+
rawResponse: _response.rawResponse,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
if (_response.error.reason === "status-code") {
|
|
74
|
+
switch (_response.error.statusCode) {
|
|
75
|
+
case 400:
|
|
76
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
77
|
+
case 401:
|
|
78
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
79
|
+
case 403:
|
|
80
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
81
|
+
case 429:
|
|
82
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
83
|
+
default:
|
|
84
|
+
throw new errors.ManagementError({
|
|
85
|
+
statusCode: _response.error.statusCode,
|
|
86
|
+
body: _response.error.body,
|
|
87
|
+
rawResponse: _response.rawResponse,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/organizations/{organization_id}/groups/{group_id}/roles");
|
|
92
|
+
}));
|
|
93
|
+
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
94
|
+
return new core.Page({
|
|
95
|
+
response: dataWithRawResponse.data,
|
|
96
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
97
|
+
hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.next) != null && !(typeof (response === null || response === void 0 ? void 0 : response.next) === "string" && (response === null || response === void 0 ? void 0 : response.next) === ""),
|
|
98
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.roles) !== null && _a !== void 0 ? _a : []; },
|
|
99
|
+
loadPage: (response) => {
|
|
100
|
+
return list(core.setObjectProperty(request, "from", response === null || response === void 0 ? void 0 : response.next));
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Assign one or more roles to a specified group in the context of an organization.
|
|
107
|
+
*
|
|
108
|
+
* @param {string} organization_id - ID of the organization
|
|
109
|
+
* @param {string} group_id - ID of the group
|
|
110
|
+
* @param {Management.CreateOrganizationGroupRolesRequestContent} request
|
|
111
|
+
* @param {RolesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
112
|
+
*
|
|
113
|
+
* @throws {@link Management.BadRequestError}
|
|
114
|
+
* @throws {@link Management.UnauthorizedError}
|
|
115
|
+
* @throws {@link Management.ForbiddenError}
|
|
116
|
+
* @throws {@link Management.ConflictError}
|
|
117
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* await client.organizations.groups.roles.create("organization_id", "group_id", {
|
|
121
|
+
* roles: ["roles"]
|
|
122
|
+
* })
|
|
123
|
+
*/
|
|
124
|
+
create(organization_id, group_id, request, requestOptions) {
|
|
125
|
+
return core.HttpResponsePromise.fromPromise(this.__create(organization_id, group_id, request, requestOptions));
|
|
126
|
+
}
|
|
127
|
+
__create(organization_id, group_id, request, requestOptions) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
129
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
130
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
131
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
132
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
133
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, `organizations/${core.url.encodePathParam(organization_id)}/groups/${core.url.encodePathParam(group_id)}/roles`),
|
|
134
|
+
method: "POST",
|
|
135
|
+
headers: _headers,
|
|
136
|
+
contentType: "application/json",
|
|
137
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
138
|
+
requestType: "json",
|
|
139
|
+
body: request,
|
|
140
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
141
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
142
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
143
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
144
|
+
logging: this._options.logging,
|
|
145
|
+
});
|
|
146
|
+
if (_response.ok) {
|
|
147
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
148
|
+
}
|
|
149
|
+
if (_response.error.reason === "status-code") {
|
|
150
|
+
switch (_response.error.statusCode) {
|
|
151
|
+
case 400:
|
|
152
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
153
|
+
case 401:
|
|
154
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
155
|
+
case 403:
|
|
156
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
157
|
+
case 409:
|
|
158
|
+
throw new Management.ConflictError(_response.error.body, _response.rawResponse);
|
|
159
|
+
case 429:
|
|
160
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
161
|
+
default:
|
|
162
|
+
throw new errors.ManagementError({
|
|
163
|
+
statusCode: _response.error.statusCode,
|
|
164
|
+
body: _response.error.body,
|
|
165
|
+
rawResponse: _response.rawResponse,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/organizations/{organization_id}/groups/{group_id}/roles");
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Unassign one or more roles from a specified group in the context of an organization.
|
|
174
|
+
*
|
|
175
|
+
* @param {string} organization_id - ID of the organization
|
|
176
|
+
* @param {string} group_id - ID of the group
|
|
177
|
+
* @param {Management.DeleteOrganizationGroupRolesRequestContent} request
|
|
178
|
+
* @param {RolesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
179
|
+
*
|
|
180
|
+
* @throws {@link Management.BadRequestError}
|
|
181
|
+
* @throws {@link Management.UnauthorizedError}
|
|
182
|
+
* @throws {@link Management.ForbiddenError}
|
|
183
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* await client.organizations.groups.roles.delete("organization_id", "group_id", {
|
|
187
|
+
* roles: ["roles"]
|
|
188
|
+
* })
|
|
189
|
+
*/
|
|
190
|
+
delete(organization_id, group_id, request, requestOptions) {
|
|
191
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(organization_id, group_id, request, requestOptions));
|
|
192
|
+
}
|
|
193
|
+
__delete(organization_id, group_id, request, requestOptions) {
|
|
194
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
195
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
196
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
197
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
198
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
199
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, `organizations/${core.url.encodePathParam(organization_id)}/groups/${core.url.encodePathParam(group_id)}/roles`),
|
|
200
|
+
method: "DELETE",
|
|
201
|
+
headers: _headers,
|
|
202
|
+
contentType: "application/json",
|
|
203
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
204
|
+
requestType: "json",
|
|
205
|
+
body: request,
|
|
206
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
207
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
208
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
209
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
210
|
+
logging: this._options.logging,
|
|
211
|
+
});
|
|
212
|
+
if (_response.ok) {
|
|
213
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
214
|
+
}
|
|
215
|
+
if (_response.error.reason === "status-code") {
|
|
216
|
+
switch (_response.error.statusCode) {
|
|
217
|
+
case 400:
|
|
218
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
219
|
+
case 401:
|
|
220
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
221
|
+
case 403:
|
|
222
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
223
|
+
case 429:
|
|
224
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
225
|
+
default:
|
|
226
|
+
throw new errors.ManagementError({
|
|
227
|
+
statusCode: _response.error.statusCode,
|
|
228
|
+
body: _response.error.body,
|
|
229
|
+
rawResponse: _response.rawResponse,
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/organizations/{organization_id}/groups/{group_id}/roles");
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/esm/management/api/resources/organizations/resources/groups/resources/roles/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
package/dist/esm/management/api/resources/organizations/resources/groups/resources/roles/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -2,5 +2,6 @@ export * as clientGrants from "./clientGrants/index.mjs";
|
|
|
2
2
|
export * as connections from "./connections/index.mjs";
|
|
3
3
|
export * as discoveryDomains from "./discoveryDomains/index.mjs";
|
|
4
4
|
export * as enabledConnections from "./enabledConnections/index.mjs";
|
|
5
|
+
export * as groups from "./groups/index.mjs";
|
|
5
6
|
export * as invitations from "./invitations/index.mjs";
|
|
6
7
|
export * as members from "./members/index.mjs";
|
|
@@ -2,5 +2,6 @@ export * as clientGrants from "./clientGrants/index.mjs";
|
|
|
2
2
|
export * as connections from "./connections/index.mjs";
|
|
3
3
|
export * as discoveryDomains from "./discoveryDomains/index.mjs";
|
|
4
4
|
export * as enabledConnections from "./enabledConnections/index.mjs";
|
|
5
|
+
export * as groups from "./groups/index.mjs";
|
|
5
6
|
export * as invitations from "./invitations/index.mjs";
|
|
6
7
|
export * as members from "./members/index.mjs";
|
package/dist/esm/management/api/resources/organizations/resources/invitations/client/Client.d.mts
CHANGED
|
@@ -11,7 +11,7 @@ export declare class InvitationsClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<InvitationsClient.Options>;
|
|
12
12
|
constructor(options: InvitationsClient.Options);
|
|
13
13
|
/**
|
|
14
|
-
* Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review
|
|
14
|
+
* Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review [Invite Organization Members](https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members).
|
|
15
15
|
*
|
|
16
16
|
* @param {string} id - Organization identifier.
|
|
17
17
|
* @param {Management.ListOrganizationInvitationsRequestParameters} request
|
|
@@ -35,7 +35,7 @@ export declare class InvitationsClient {
|
|
|
35
35
|
*/
|
|
36
36
|
list(id: string, request?: Management.ListOrganizationInvitationsRequestParameters, requestOptions?: InvitationsClient.RequestOptions): Promise<core.Page<Management.OrganizationInvitation, Management.ListOrganizationInvitationsOffsetPaginatedResponseContent>>;
|
|
37
37
|
/**
|
|
38
|
-
* Create a user invitation for a specific Organization. Upon creation, the listed user receives an email inviting them to join the Organization. To learn more about Organization invitations, review
|
|
38
|
+
* Create a user invitation for a specific Organization. Upon creation, the listed user receives an email inviting them to join the Organization. To learn more about Organization invitations, review [Invite Organization Members](https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members).
|
|
39
39
|
*
|
|
40
40
|
* @param {string} id - Organization identifier.
|
|
41
41
|
* @param {Management.CreateOrganizationInvitationRequestContent} request
|
package/dist/esm/management/api/resources/organizations/resources/invitations/client/Client.mjs
CHANGED
|
@@ -20,7 +20,7 @@ export class InvitationsClient {
|
|
|
20
20
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review
|
|
23
|
+
* Retrieve a detailed list of invitations sent to users for a specific Organization. The list includes details such as inviter and invitee information, invitation URLs, and dates of creation and expiration. To learn more about Organization invitations, review [Invite Organization Members](https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members).
|
|
24
24
|
*
|
|
25
25
|
* @param {string} id - Organization identifier.
|
|
26
26
|
* @param {Management.ListOrganizationInvitationsRequestParameters} request
|
|
@@ -115,7 +115,7 @@ export class InvitationsClient {
|
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
118
|
-
* Create a user invitation for a specific Organization. Upon creation, the listed user receives an email inviting them to join the Organization. To learn more about Organization invitations, review
|
|
118
|
+
* Create a user invitation for a specific Organization. Upon creation, the listed user receives an email inviting them to join the Organization. To learn more about Organization invitations, review [Invite Organization Members](https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members).
|
|
119
119
|
*
|
|
120
120
|
* @param {string} id - Organization identifier.
|
|
121
121
|
* @param {Management.CreateOrganizationInvitationRequestContent} request
|
package/dist/esm/management/api/resources/organizations/resources/members/client/Client.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../Ba
|
|
|
2
2
|
import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
|
|
3
3
|
import * as core from "../../../../../../core/index.mjs";
|
|
4
4
|
import * as Management from "../../../../../index.mjs";
|
|
5
|
+
import { EffectiveRolesClient } from "../resources/effectiveRoles/client/Client.mjs";
|
|
5
6
|
import { RolesClient } from "../resources/roles/client/Client.mjs";
|
|
6
7
|
export declare namespace MembersClient {
|
|
7
8
|
type Options = BaseClientOptions;
|
|
@@ -10,21 +11,17 @@ export declare namespace MembersClient {
|
|
|
10
11
|
}
|
|
11
12
|
export declare class MembersClient {
|
|
12
13
|
protected readonly _options: NormalizedClientOptionsWithAuth<MembersClient.Options>;
|
|
14
|
+
protected _effectiveRoles: EffectiveRolesClient | undefined;
|
|
13
15
|
protected _roles: RolesClient | undefined;
|
|
14
16
|
constructor(options: MembersClient.Options);
|
|
17
|
+
get effectiveRoles(): EffectiveRolesClient;
|
|
15
18
|
get roles(): RolesClient;
|
|
16
19
|
/**
|
|
17
20
|
* List organization members.
|
|
18
21
|
* This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it.
|
|
19
22
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* Use the <code>fields</code> parameter to optionally define the specific member details retrieved. If <code>fields</code> is left blank, all fields (except roles) are returned.
|
|
23
|
-
* </li>
|
|
24
|
-
* <li>
|
|
25
|
-
* Member roles are not sent by default. Use <code>fields=roles</code> to retrieve the roles assigned to each listed member. To use this parameter, you must include the <code>read:organization_member_roles</code> scope in the token.
|
|
26
|
-
* </li>
|
|
27
|
-
* </ul>
|
|
23
|
+
* - Use the `fields` parameter to optionally define the specific member details retrieved. If `fields` is left blank, all fields (except roles) are returned.
|
|
24
|
+
* - Member roles are not sent by default. Use `fields=roles` to retrieve the roles assigned to each listed member. To use this parameter, you must include the `read:organization_member_roles` scope in the token.
|
|
28
25
|
*
|
|
29
26
|
* This endpoint supports two types of pagination:
|
|
30
27
|
*
|
|
@@ -33,9 +30,9 @@ export declare class MembersClient {
|
|
|
33
30
|
*
|
|
34
31
|
* Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.
|
|
35
32
|
*
|
|
36
|
-
*
|
|
33
|
+
* **Checkpoint Pagination**
|
|
37
34
|
*
|
|
38
|
-
* To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the
|
|
35
|
+
* To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the `from` parameter. If there are more results, a `next` value will be included in the response. You can use this for subsequent API calls. When `next` is no longer included in the response, this indicates there are no more pages remaining.
|
|
39
36
|
*
|
|
40
37
|
* @param {string} id - Organization identifier.
|
|
41
38
|
* @param {Management.ListOrganizationMembersRequestParameters} request
|
|
@@ -56,9 +53,9 @@ export declare class MembersClient {
|
|
|
56
53
|
*/
|
|
57
54
|
list(id: string, request?: Management.ListOrganizationMembersRequestParameters, requestOptions?: MembersClient.RequestOptions): Promise<core.Page<Management.OrganizationMember, Management.ListOrganizationMembersPaginatedResponseContent>>;
|
|
58
55
|
/**
|
|
59
|
-
* Set one or more existing users as members of a specific
|
|
56
|
+
* Set one or more existing users as members of a specific [Organization](https://auth0.com/docs/manage-users/organizations).
|
|
60
57
|
*
|
|
61
|
-
* To add a user to an Organization through this action, the user must already exist in your tenant. If a user does not yet exist, you can
|
|
58
|
+
* To add a user to an Organization through this action, the user must already exist in your tenant. If a user does not yet exist, you can [invite them to create an account](https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members), manually create them through the Auth0 Dashboard, or use the Management API.
|
|
62
59
|
*
|
|
63
60
|
* @param {string} id - Organization identifier.
|
|
64
61
|
* @param {Management.CreateOrganizationMemberRequestContent} request
|
|
@@ -15,11 +15,16 @@ import * as environments from "../../../../../../environments.mjs";
|
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
16
|
import * as errors from "../../../../../../errors/index.mjs";
|
|
17
17
|
import * as Management from "../../../../../index.mjs";
|
|
18
|
+
import { EffectiveRolesClient } from "../resources/effectiveRoles/client/Client.mjs";
|
|
18
19
|
import { RolesClient } from "../resources/roles/client/Client.mjs";
|
|
19
20
|
export class MembersClient {
|
|
20
21
|
constructor(options) {
|
|
21
22
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
22
23
|
}
|
|
24
|
+
get effectiveRoles() {
|
|
25
|
+
var _a;
|
|
26
|
+
return ((_a = this._effectiveRoles) !== null && _a !== void 0 ? _a : (this._effectiveRoles = new EffectiveRolesClient(this._options)));
|
|
27
|
+
}
|
|
23
28
|
get roles() {
|
|
24
29
|
var _a;
|
|
25
30
|
return ((_a = this._roles) !== null && _a !== void 0 ? _a : (this._roles = new RolesClient(this._options)));
|
|
@@ -28,14 +33,8 @@ export class MembersClient {
|
|
|
28
33
|
* List organization members.
|
|
29
34
|
* This endpoint is subject to eventual consistency. New users may not be immediately included in the response and deleted users may not be immediately removed from it.
|
|
30
35
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* Use the <code>fields</code> parameter to optionally define the specific member details retrieved. If <code>fields</code> is left blank, all fields (except roles) are returned.
|
|
34
|
-
* </li>
|
|
35
|
-
* <li>
|
|
36
|
-
* Member roles are not sent by default. Use <code>fields=roles</code> to retrieve the roles assigned to each listed member. To use this parameter, you must include the <code>read:organization_member_roles</code> scope in the token.
|
|
37
|
-
* </li>
|
|
38
|
-
* </ul>
|
|
36
|
+
* - Use the `fields` parameter to optionally define the specific member details retrieved. If `fields` is left blank, all fields (except roles) are returned.
|
|
37
|
+
* - Member roles are not sent by default. Use `fields=roles` to retrieve the roles assigned to each listed member. To use this parameter, you must include the `read:organization_member_roles` scope in the token.
|
|
39
38
|
*
|
|
40
39
|
* This endpoint supports two types of pagination:
|
|
41
40
|
*
|
|
@@ -44,9 +43,9 @@ export class MembersClient {
|
|
|
44
43
|
*
|
|
45
44
|
* Checkpoint pagination must be used if you need to retrieve more than 1000 organization members.
|
|
46
45
|
*
|
|
47
|
-
*
|
|
46
|
+
* **Checkpoint Pagination**
|
|
48
47
|
*
|
|
49
|
-
* To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the
|
|
48
|
+
* To search by checkpoint, use the following parameters: - from: Optional id from which to start selection. - take: The total amount of entries to retrieve when using the from parameter. Defaults to 50. Note: The first time you call this endpoint using Checkpoint Pagination, you should omit the `from` parameter. If there are more results, a `next` value will be included in the response. You can use this for subsequent API calls. When `next` is no longer included in the response, this indicates there are no more pages remaining.
|
|
50
49
|
*
|
|
51
50
|
* @param {string} id - Organization identifier.
|
|
52
51
|
* @param {Management.ListOrganizationMembersRequestParameters} request
|
|
@@ -132,9 +131,9 @@ export class MembersClient {
|
|
|
132
131
|
});
|
|
133
132
|
}
|
|
134
133
|
/**
|
|
135
|
-
* Set one or more existing users as members of a specific
|
|
134
|
+
* Set one or more existing users as members of a specific [Organization](https://auth0.com/docs/manage-users/organizations).
|
|
136
135
|
*
|
|
137
|
-
* To add a user to an Organization through this action, the user must already exist in your tenant. If a user does not yet exist, you can
|
|
136
|
+
* To add a user to an Organization through this action, the user must already exist in your tenant. If a user does not yet exist, you can [invite them to create an account](https://auth0.com/docs/manage-users/organizations/configure-organizations/invite-members), manually create them through the Auth0 Dashboard, or use the Management API.
|
|
138
137
|
*
|
|
139
138
|
* @param {string} id - Organization identifier.
|
|
140
139
|
* @param {Management.CreateOrganizationMemberRequestContent} request
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../BaseClient.mjs";
|
|
3
|
+
import * as core from "../../../../../../../../core/index.mjs";
|
|
4
|
+
import * as Management from "../../../../../../../index.mjs";
|
|
5
|
+
import { SourcesClient } from "../resources/sources/client/Client.mjs";
|
|
6
|
+
export declare namespace EffectiveRolesClient {
|
|
7
|
+
type Options = BaseClientOptions;
|
|
8
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export declare class EffectiveRolesClient {
|
|
12
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<EffectiveRolesClient.Options>;
|
|
13
|
+
protected _sources: SourcesClient | undefined;
|
|
14
|
+
constructor(options: EffectiveRolesClient.Options);
|
|
15
|
+
get sources(): SourcesClient;
|
|
16
|
+
/**
|
|
17
|
+
* Lists the roles assigned to an organization member directly or through group membership.
|
|
18
|
+
*
|
|
19
|
+
* @param {string} id - Organization identifier.
|
|
20
|
+
* @param {string} user_id - ID of the user to list effective roles for.
|
|
21
|
+
* @param {Management.ListOrganizationMemberEffectiveRolesRequestParameters} request
|
|
22
|
+
* @param {EffectiveRolesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
23
|
+
*
|
|
24
|
+
* @throws {@link Management.BadRequestError}
|
|
25
|
+
* @throws {@link Management.UnauthorizedError}
|
|
26
|
+
* @throws {@link Management.ForbiddenError}
|
|
27
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* await client.organizations.members.effectiveRoles.list("id", "user_id", {
|
|
31
|
+
* from: "from",
|
|
32
|
+
* take: 1
|
|
33
|
+
* })
|
|
34
|
+
*/
|
|
35
|
+
list(id: string, user_id: string, request?: Management.ListOrganizationMemberEffectiveRolesRequestParameters, requestOptions?: EffectiveRolesClient.RequestOptions): Promise<core.Page<Management.OrganizationMemberEffectiveRole, Management.ListOrganizationMemberEffectiveRolesResponseContent>>;
|
|
36
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { normalizeClientOptionsWithAuth, } from "../../../../../../../../BaseClient.mjs";
|
|
12
|
+
import * as core from "../../../../../../../../core/index.mjs";
|
|
13
|
+
import { mergeHeaders } from "../../../../../../../../core/headers.mjs";
|
|
14
|
+
import * as environments from "../../../../../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../../../../../errors/index.mjs";
|
|
17
|
+
import * as Management from "../../../../../../../index.mjs";
|
|
18
|
+
import { SourcesClient } from "../resources/sources/client/Client.mjs";
|
|
19
|
+
export class EffectiveRolesClient {
|
|
20
|
+
constructor(options) {
|
|
21
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
22
|
+
}
|
|
23
|
+
get sources() {
|
|
24
|
+
var _a;
|
|
25
|
+
return ((_a = this._sources) !== null && _a !== void 0 ? _a : (this._sources = new SourcesClient(this._options)));
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Lists the roles assigned to an organization member directly or through group membership.
|
|
29
|
+
*
|
|
30
|
+
* @param {string} id - Organization identifier.
|
|
31
|
+
* @param {string} user_id - ID of the user to list effective roles for.
|
|
32
|
+
* @param {Management.ListOrganizationMemberEffectiveRolesRequestParameters} request
|
|
33
|
+
* @param {EffectiveRolesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
|
+
*
|
|
35
|
+
* @throws {@link Management.BadRequestError}
|
|
36
|
+
* @throws {@link Management.UnauthorizedError}
|
|
37
|
+
* @throws {@link Management.ForbiddenError}
|
|
38
|
+
* @throws {@link Management.TooManyRequestsError}
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* await client.organizations.members.effectiveRoles.list("id", "user_id", {
|
|
42
|
+
* from: "from",
|
|
43
|
+
* take: 1
|
|
44
|
+
* })
|
|
45
|
+
*/
|
|
46
|
+
list(id_1, user_id_1) {
|
|
47
|
+
return __awaiter(this, arguments, void 0, function* (id, user_id, request = {}, requestOptions) {
|
|
48
|
+
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
50
|
+
const { from: from_, take = 50 } = request;
|
|
51
|
+
const _queryParams = {
|
|
52
|
+
from: from_,
|
|
53
|
+
take,
|
|
54
|
+
};
|
|
55
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
56
|
+
let _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
57
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
58
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.ManagementEnvironment.Default, `organizations/${core.url.encodePathParam(id)}/members/${core.url.encodePathParam(user_id)}/effective-roles`),
|
|
59
|
+
method: "GET",
|
|
60
|
+
headers: _headers,
|
|
61
|
+
queryString: core.url
|
|
62
|
+
.queryBuilder()
|
|
63
|
+
.addMany(_queryParams)
|
|
64
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
65
|
+
.build(),
|
|
66
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
67
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
68
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
69
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
70
|
+
logging: this._options.logging,
|
|
71
|
+
});
|
|
72
|
+
if (_response.ok) {
|
|
73
|
+
return {
|
|
74
|
+
data: _response.body,
|
|
75
|
+
rawResponse: _response.rawResponse,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
if (_response.error.reason === "status-code") {
|
|
79
|
+
switch (_response.error.statusCode) {
|
|
80
|
+
case 400:
|
|
81
|
+
throw new Management.BadRequestError(_response.error.body, _response.rawResponse);
|
|
82
|
+
case 401:
|
|
83
|
+
throw new Management.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
84
|
+
case 403:
|
|
85
|
+
throw new Management.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
86
|
+
case 429:
|
|
87
|
+
throw new Management.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
88
|
+
default:
|
|
89
|
+
throw new errors.ManagementError({
|
|
90
|
+
statusCode: _response.error.statusCode,
|
|
91
|
+
body: _response.error.body,
|
|
92
|
+
rawResponse: _response.rawResponse,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/organizations/{id}/members/{user_id}/effective-roles");
|
|
97
|
+
}));
|
|
98
|
+
const dataWithRawResponse = yield list(request).withRawResponse();
|
|
99
|
+
return new core.Page({
|
|
100
|
+
response: dataWithRawResponse.data,
|
|
101
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
102
|
+
hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.next) != null && !(typeof (response === null || response === void 0 ? void 0 : response.next) === "string" && (response === null || response === void 0 ? void 0 : response.next) === ""),
|
|
103
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.roles) !== null && _a !== void 0 ? _a : []; },
|
|
104
|
+
loadPage: (response) => {
|
|
105
|
+
return list(core.setObjectProperty(request, "from", response === null || response === void 0 ? void 0 : response.next));
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as sources from "./sources/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as sources from "./sources/index.mjs";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BaseClientOptions } from "../../../../../../../../../../BaseClient.mjs";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../../../../../../../BaseClient.mjs";
|
|
3
|
+
import { GroupsClient } from "../resources/groups/client/Client.mjs";
|
|
4
|
+
export declare namespace SourcesClient {
|
|
5
|
+
type Options = BaseClientOptions;
|
|
6
|
+
}
|
|
7
|
+
export declare class SourcesClient {
|
|
8
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<SourcesClient.Options>;
|
|
9
|
+
protected _groups: GroupsClient | undefined;
|
|
10
|
+
constructor(options: SourcesClient.Options);
|
|
11
|
+
get groups(): GroupsClient;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
import { normalizeClientOptionsWithAuth, } from "../../../../../../../../../../BaseClient.mjs";
|
|
3
|
+
import { GroupsClient } from "../resources/groups/client/Client.mjs";
|
|
4
|
+
export class SourcesClient {
|
|
5
|
+
constructor(options) {
|
|
6
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
7
|
+
}
|
|
8
|
+
get groups() {
|
|
9
|
+
var _a;
|
|
10
|
+
return ((_a = this._groups) !== null && _a !== void 0 ? _a : (this._groups = new GroupsClient(this._options)));
|
|
11
|
+
}
|
|
12
|
+
}
|