@useparagon/connect
Advanced tools
Comparing version 1.0.4 to 1.0.5-experimental.1
@@ -0,1 +1,2 @@ | ||
import { SDKIntegrationConfig } from '../types/connect'; | ||
import { ICustomIntegration } from './customIntegration.interface'; | ||
@@ -40,2 +41,6 @@ import { IConnectIntegrationConfig } from './integrationConfig.interface'; | ||
accountAuth?: Record<string, string>; | ||
/** | ||
* sdkIntegrationConfig on a integration is available only for those which are active | ||
*/ | ||
sdkIntegrationConfig?: SDKIntegrationConfig | null; | ||
} |
import { IConnectIntegrationWithCredentialInfo } from '../entities/integration.interface'; | ||
import { DataType, KeyedSource } from '../types/resolvers'; | ||
import { IConnectUserContext } from './ConnectUserContext'; | ||
export type OAuthFlowOptions = { | ||
context: IConnectUserContext; | ||
integration: IConnectIntegrationWithCredentialInfo; | ||
endUserSuppliedValues?: { | ||
[inputId: string]: string; | ||
}; | ||
authParams?: KeyedSource<DataType.ANY>[] | undefined; | ||
isPreviewMode?: boolean; | ||
}; | ||
/** | ||
@@ -9,9 +18,2 @@ * start oauth flow with new popup | ||
*/ | ||
export declare const startOAuthFlow: ({ context, integration, endUserSuppliedValues, authParams, }: { | ||
context: IConnectUserContext; | ||
integration: IConnectIntegrationWithCredentialInfo; | ||
endUserSuppliedValues?: { | ||
[inputId: string]: string; | ||
} | undefined; | ||
authParams?: KeyedSource<DataType.ANY>[] | undefined; | ||
}) => Promise<void>; | ||
export declare const startOAuthFlow: ({ context, integration, endUserSuppliedValues, authParams, }: OAuthFlowOptions) => Promise<void>; |
import { ReactNode } from 'react'; | ||
import { AuthenticationScheme } from '../entities/credential.interface'; | ||
import { SidebarInput } from './connect'; | ||
@@ -244,2 +245,23 @@ import { DataType, KeyedSource, Source } from './resolvers'; | ||
export declare const AUTH_TOKEN_ALLOWED_INTEGRATIONS: Record<string, Record<'accessTokenPath', string>>; | ||
export type AccountType = { | ||
/** | ||
* Provide a unique identifier for this account type, so that the relevant `sidebarSections` | ||
* or `oauthParameters` will be consumed by the AuthSelector accordingly. | ||
*/ | ||
id: string; | ||
/** | ||
* authentication scheme | ||
*/ | ||
scheme: AuthenticationScheme; | ||
/** | ||
* For AuthenticationScheme.OAUTH-schemed credentials, specify value sources to be passed | ||
* through to the getAuthEssentials action. | ||
*/ | ||
oauthParameters?: KeyedSource<DataType.ANY>[]; | ||
/** | ||
* Specify additional user inputs that are required to start the OAuth flow, i.e. a name | ||
* or subdomain prefix for a service that is a part of the OAuth authorization URL. | ||
*/ | ||
endUserSuppliedValues?: IntegrationConnectInput[]; | ||
}; | ||
export {}; |
import { ConnectCredentialProviderData, CredentialStatus, IConnectCredential } from '../entities/connectCredential.interface'; | ||
import { PersonaMeta } from '../entities/persona.interface'; | ||
import { DataSource, IntegrationConnectInput, SidebarInputType } from './action'; | ||
import { AccountType, DataSource, IntegrationConnectInput, SidebarInputType } from './action'; | ||
import { OrConditions } from './resolvers'; | ||
@@ -193,2 +193,11 @@ export interface ConnectCredentialConfig { | ||
} & ConnectCredentialConfig; | ||
export type SDKIntegrationConfig = { | ||
oauthInputs: IntegrationConnectInput[]; | ||
accountTypes: AccountType[]; | ||
authConfigInputs: IntegrationConnectInput[]; | ||
postOauthInputs: IntegrationConnectInput[]; | ||
dataSources: { | ||
[key: string]: DataSource; | ||
}; | ||
}; | ||
/** | ||
@@ -195,0 +204,0 @@ * The contents of the `integrations` field for an authenticated ConnectUser. |
/// <reference types="react" /> | ||
import { IPublishedCustomIntegration } from '../entities/customIntegration.interface'; | ||
import { IConnectIntegrationWithCredentialInfo } from '../entities/integration.interface'; | ||
import { AccountType } from './action'; | ||
import { ModalConfig } from './connect'; | ||
import { InstallOptions, ModalView } from './sdk'; | ||
type ModalApiInstallationOptions = InstallOptions & { | ||
selectedAccountConfig?: AccountType; | ||
}; | ||
export type Props = { | ||
@@ -27,3 +31,4 @@ integration: IConnectIntegrationWithCredentialInfo | null; | ||
}; | ||
apiInstallationOptions?: InstallOptions; | ||
apiInstallationOptions?: ModalApiInstallationOptions; | ||
}; | ||
export {}; |
@@ -163,2 +163,6 @@ import ConnectSDK from '../ConnectSDK'; | ||
selectedCredentialId?: string; | ||
/** | ||
* skips account type selection | ||
*/ | ||
accountType?: string; | ||
}; | ||
@@ -165,0 +169,0 @@ export type AuthenticateOptions = { |
{ | ||
"name": "@useparagon/connect", | ||
"version": "1.0.4", | ||
"version": "1.0.5-experimental.1", | ||
"description": "paragon connect npm package", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.ts", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
158072
2147
2