diff --git a/package.json b/package.json index 0199d78..d7db430 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "type": "git", "url": "https://github.com/PropelAuth/node" }, - "version": "2.1.12", + "version": "2.1.13", "license": "MIT", "keywords": [ "auth", diff --git a/src/api/org.ts b/src/api/org.ts index 6bd982f..b8695b8 100644 --- a/src/api/org.ts +++ b/src/api/org.ts @@ -6,13 +6,13 @@ import { UpdateOrgException, } from "../exceptions" import { httpRequest } from "../http" -import { CreatedOrg, Org } from "../user" +import { CreatedOrg, Org, Organization } from "../user" import { isValidId, parseSnakeCaseToCamelCase } from "../utils" const ENDPOINT_PATH = "/api/backend/v1/org" // GET -export function fetchOrg(authUrl: URL, integrationApiKey: string, orgId: string): Promise { +export function fetchOrg(authUrl: URL, integrationApiKey: string, orgId: string): Promise { if (!isValidId(orgId)) { return Promise.resolve(null) } diff --git a/src/auth.ts b/src/auth.ts index 713707c..1919f95 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -77,7 +77,7 @@ import { CreatedOrg, CreatedUser, InternalUser, - Org, + Organization, OrgApiKeyValidation, OrgIdToOrgMemberInfo, OrgMemberInfo, @@ -204,7 +204,7 @@ export function initBaseAuth(opts: BaseAuthOptions) { ) } - function fetchOrgWrapper(orgId: string): Promise { + function fetchOrgWrapper(orgId: string): Promise { return fetchOrg(authUrl, integrationApiKey, orgId) } diff --git a/src/index.ts b/src/index.ts index 32f8e31..f16823d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -47,6 +47,7 @@ export { InternalOrgMemberInfo, InternalUser, Org, + Organization, OrgIdToOrgMemberInfo, OrgMemberInfo, toOrgIdToOrgMemberInfo, diff --git a/src/user.ts b/src/user.ts index 3e99677..f2ba947 100644 --- a/src/user.ts +++ b/src/user.ts @@ -159,6 +159,20 @@ export type Org = { metadata: { [key: string]: any } } +export type Organization = { + orgId: string + name: string + urlSafeOrgSlug: string + canSetupSaml: boolean + isSamlConfigured: boolean + isSamlInTestMode: boolean + maxUsers?: number + metadata?: { [key: string]: any } + domain?: string + domainAutojoin: boolean + domainRestrict: boolean +} + export type CreatedOrg = { orgId: string name: string