Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@useparagon/connect

Package Overview
Dependencies
Maintainers
26
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@useparagon/connect - npm Package Compare versions

Comparing version 1.0.19-experimental.6 to 1.0.19

25

dist/src/ConnectSDK.d.ts
import { IConnectCredential } from './entities/connectCredential.interface';
import { IConnectCredentialConfig } from './entities/connectCredentialConfig.interface';
import { OauthCallbackResponse } from './entities/credential.interface';

@@ -8,3 +7,3 @@ import { IConnectIntegrationWithCredentialInfo, IIntegrationMetadata } from './entities/integration.interface';

import { ConnectSdkEnvironments } from './server.types';
import { AuthenticateOptions, AuthenticatedConnectUser, CompleteInstallOptions, Props as ConnectModalProps, ConnectParams, ConnectUser, CreateConfigurationOptions, CredentialConfigOptions, DisableWorkflowOptions, EventInfo, GetIntegrationAccountOptions, IConnectSDK, InstallIntegrationOptions, TriggerWorkflowRequest, UninstallOptions } from './types';
import { AuthenticateOptions, AuthenticatedConnectUser, CompleteInstallOptions, Props as ConnectModalProps, ConnectParams, ConnectUser, DisableWorkflowOptions, EventInfo, GetIntegrationAccountOptions, IConnectSDK, InstallIntegrationOptions, TriggerWorkflowRequest, UninstallOptions } from './types';
export declare const PARAGON_OVERFLOW_EMPTY_VALUE = "PARAGON_OVERFLOW_EMPTY_VALUE";

@@ -57,3 +56,3 @@ export default class ConnectSDK extends SDKEventEmitter implements IConnectSDK {

* checks
* - if integration name is valid
* - if integartion name is valid
* - if integration is setup in project

@@ -121,4 +120,2 @@ * - if integration is active in project

connect(action: string, params?: ConnectParams): Promise<void>;
private setCredentialConfigForUserState;
private getCredentialAndConfig;
/**

@@ -158,3 +155,3 @@ * Retrieves an integration object from the loaded integrations based on the integration ID.

}): Promise<TResponse | undefined>;
event(name: string, payload: Record<string, unknown>, options?: CredentialConfigOptions): Promise<void>;
event(name: string, payload: Record<string, unknown>): Promise<void>;
/**

@@ -192,3 +189,3 @@ * @summary this will be called to close the modal

*/
workflow(workflowId: string, { selectedCredentialId, selectedConfigurationId, body, query, headers, }?: TriggerWorkflowRequest): Promise<object | undefined>;
workflow(workflowId: string, { selectedCredentialId, body, query, headers }?: TriggerWorkflowRequest): Promise<object | undefined>;
/**

@@ -204,3 +201,2 @@ * for programmatically installing an integration

disableWorkflow(workflowId: string, options?: DisableWorkflowOptions): Promise<void>;
enableWorkflow(workflowId: string, options?: CredentialConfigOptions): Promise<void>;
/**

@@ -259,15 +255,2 @@ * Get account details by integration type. To get accountAuth, includeAccountAuth should be true in options.

connectAction(resourceName: string, payload: Record<string, unknown>): Promise<IConnectCredential>;
/**
* Creates a new configuration using the provided credentials.
* @param {CreateConfigurationOptions} param0
* @returns {Promise<IConnectCredentialConfig> }
*/
createConfiguration({ credentialId, externalId, }: CreateConfigurationOptions): Promise<IConnectCredentialConfig>;
/**
* Destroys an existing configuration using the provided instance ID.
*/
destroyConfiguration({ id }: {
id: string;
}): Promise<void>;
updateConfiguration(id: string, meta: Record<string, unknown>, credentialId?: string): Promise<IConnectCredentialConfig>;
}

4

dist/src/entities/connectCredential.interface.d.ts

@@ -1,2 +0,2 @@

import { IConnectCredentialConfig } from './connectCredentialConfig.interface';
import { ConnectCredentialConfig } from '../types/connect';
export interface IConnectCredential {

@@ -6,3 +6,3 @@ id: string;

integrationId: string;
configurations: IConnectCredentialConfig[];
config: ConnectCredentialConfig;
personaId: string;

@@ -9,0 +9,0 @@ isPreviewCredential: boolean;

import { ConnectCredentialProviderData, CredentialStatus, IConnectCredential } from '../entities/connectCredential.interface';
import { ConnectCredentialConfigMeta, IConnectCredentialConfig } from '../entities/connectCredentialConfig.interface';
import { PersonaMeta } from '../entities/persona.interface';
import { AccountType, DataSource, IntegrationConnectInput, SidebarInputType } from './action';
import { OrConditions } from './resolvers';
import { CredentialConfigOptions } from './sdk';
export interface SDKConnectCredentialConfig {
sharedSettings?: IntegrationSharedInputStateMap;
workflowSettings?: IntegrationWorkflowStateMap;
configMeta?: ConnectCredentialConfigMeta;
/**
* this refer `externalId` of credential config containing shared/workflow settings
*/
externalId?: string;
/**
* @deprecated - use `workflowSettings`
*/
export interface ConnectCredentialConfig {
configuredWorkflows?: IntegrationWorkflowStateMap;
/**
* @deprecated - use `configMeta`
*/
isIntegrationEnableTriggered?: boolean;
sharedSettings?: {
[inputId: string]: ConnectInputValue | undefined;
};
}

@@ -50,8 +37,5 @@ type ConnectInputValue = string | number | boolean | FieldMappingValue | ComboInputValue | undefined;

};
export type IntegrationWorkflowStateMap = {
type IntegrationWorkflowStateMap = {
[workflowId: string]: IntegrationWorkflowState | undefined;
};
export type IntegrationSharedInputStateMap = {
[inputId: string]: ConnectInputValue | undefined;
};
export type IntegrationWorkflowState = {

@@ -193,3 +177,2 @@ enabled: boolean;

credentialId?: string;
credentialConfigId?: string;
credentialStatus?: CredentialStatus;

@@ -199,4 +182,3 @@ providerId?: string;

allCredentials: IConnectCredential[];
allConfigurations: IConnectCredentialConfig[];
} & SDKConnectCredentialConfig;
} & ConnectCredentialConfig;
export type SDKIntegrationConfig = {

@@ -218,4 +200,8 @@ oauthInputs: IntegrationConnectInput[];

export type SDKIntegrationState = Partial<Record<string, SDKIntegration>>;
export type UninstallOptions = CredentialConfigOptions;
export type DisableWorkflowOptions = CredentialConfigOptions;
export type UninstallOptions = {
selectedCredentialId?: string;
};
export type DisableWorkflowOptions = {
selectedCredentialId?: string;
};
/**

@@ -231,3 +217,2 @@ * method options for getIntegrationAccount in sdk

export declare const SELECTED_CREDENTIAL_ID_HEADER = "X-Paragon-Credential";
export declare const SELECTED_CREDENTIAL_CONFIG_ID_HEADER = "X-Paragon-Configuration-Id";
export {};
import ConnectSDK from '../ConnectSDK';
import { IConnectCredential } from '../entities/connectCredential.interface';
import { IConnectCredentialConfig } from '../entities/connectCredentialConfig.interface';
import { OauthCallbackResponse } from '../entities/credential.interface';

@@ -92,6 +91,2 @@ import { IConnectIntegrationWithCredentialInfo, IIntegrationMetadata } from '../entities/integration.interface';

disableWorkflow(workflowId: string, options: DisableWorkflowOptions): Promise<void>;
/**
* enables a workflow for the connected user and subscribe the workflows in hermes
*/
enableWorkflow(workflowId: string, options: CredentialConfigOptions): Promise<void>;
setUserMetadata(meta: PersonaMeta): Promise<AuthenticatedConnectUser>;

@@ -116,3 +111,3 @@ /**

*/
event(name: string, payload: Record<string, unknown>, options?: CredentialConfigOptions): Promise<void>;
event(name: string, payload: Record<string, unknown>): Promise<void>;
/**

@@ -170,22 +165,2 @@ * makes an connect proxy action request

closePortal(): void;
/**
* Creates a new configuration using the provided credentials.
*
* @param {CreateConfigurationOptions} params - An object containing the necessary parameters.
* @param {string} params.credentialId - The ID of the credential to create the configuration for.
* @param {string} params.externalId - (Optional) An external identifier associated with the configuration.
* @returns {Promise<ICreateConfiguration>} - A promise that resolves to the created configuration object.
*/
createConfiguration(params: CreateConfigurationOptions): Promise<IConnectCredentialConfig>;
/**
* Destroys an existing configuration using the provided instance ID.
*
* @param {DestroyConfigurationParams} params - An object containing the necessary parameters.
* @param {string} params.id - The ID of the configuration to be destroyed.
* @returns {Promise<void>} - A promise that resolves when the configuration is successfully destroyed.
*/
destroyConfiguration(params: {
id: string;
}): Promise<void>;
updateConfiguration(id: string, meta: Record<string, unknown>, credentialId?: string): Promise<IConnectCredentialConfig>;
}

@@ -213,2 +188,3 @@ /**

allowMultipleCredentials?: boolean;
selectedCredentialId?: string;
/**

@@ -219,10 +195,2 @@ * used to override redirect url passed in getAuthUrl instead of our passport url

};
export type CredentialConfigOptions = {
selectedCredentialId?: string;
selectedConfigurationId?: string;
};
export type CreateConfigurationOptions = {
credentialId: string;
externalId?: string;
};
export type AuthenticateOptions = {

@@ -274,3 +242,3 @@ metadata?: PersonaMeta;

};
export type ConnectParams = CallbackMap & UserProvidedIntegrationConfig & InstallOptions & CredentialConfigOptions;
export type ConnectParams = CallbackMap & UserProvidedIntegrationConfig & InstallOptions;
export type EventInfo = {

@@ -303,6 +271,7 @@ type: SDK_EVENT;

}
export type TriggerWorkflowRequest = CredentialConfigOptions & {
export type TriggerWorkflowRequest = {
body?: RequestInit['body'] | object;
headers?: RequestInit['headers'];
query?: Record<string, string>;
selectedCredentialId?: string;
};

@@ -309,0 +278,0 @@ export interface IFilePicker {

@@ -14,7 +14,1 @@ import { NODE_ENV, PLATFORM_ENV } from '../types/environment';

}) => string;
/**
*
* @param externalId
* @returns
*/
export declare function sanitizeExternalConfigId(externalId: string): string;

@@ -31,3 +31,1 @@ /**

export declare function sleep(milliseconds: number): Promise<void>;
export declare const uuidPattern: RegExp;
export declare function isUUID(value: string | unknown): boolean;
{
"name": "@useparagon/connect",
"version": "1.0.19-experimental.6",
"version": "1.0.19",
"description": "Embed integrations into your app with the Paragon SDK",

@@ -5,0 +5,0 @@ "main": "dist/src/index.js",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc