@useparagon/connect
Advanced tools
Comparing version 1.0.26 to 1.0.27
@@ -45,2 +45,3 @@ import { SDKIntegrationConfig } from '../types/connect'; | ||
sdkIntegrationConfig?: SDKIntegrationConfig | null; | ||
providerData?: Record<string, any>; | ||
} |
import { GoogleDriveFilePicker } from './googledrive'; | ||
import { OneDriveFilePicker } from './onedrive'; | ||
import { SharepointFilePicker } from './sharepoint'; | ||
declare const _default: { | ||
GoogleDriveFilePicker: typeof GoogleDriveFilePicker; | ||
OneDriveFilePicker: typeof OneDriveFilePicker; | ||
SharepointFilePicker: typeof SharepointFilePicker; | ||
}; | ||
export default _default; |
@@ -31,3 +31,22 @@ import ConnectSDK from '../../ConnectSDK'; | ||
protected checkIfScriptLoaded(id: string): boolean; | ||
protected validateInitOptions(options: FilePickerInitOptions): Promise<boolean>; | ||
/** | ||
* Validates that the required fields in the options object are present and non-empty. | ||
* | ||
* - Checks for missing or empty fields and throws corresponding error messages. | ||
* | ||
* @param options - The options object to validate. | ||
* @param requiredFields - An array of tuples where each tuple contains: | ||
* - The key to check in the options object. | ||
* - The error message to throw if the key is missing or empty. | ||
* | ||
* @returns A promise that resolves to `true` if all validations pass. | ||
* @throws An error with the specified message if any validation fails. | ||
* | ||
* @example | ||
* await this.validateInitOptions(options, [ | ||
* ['developerKey', 'Please provide a valid developer key'], | ||
* ['clientId', 'Please provide a valid client ID'], | ||
* ]); | ||
*/ | ||
protected validateInitOptions(options: Record<string, any>, requiredFields: [key: string, fieldName: string][]): Promise<boolean>; | ||
} |
@@ -5,2 +5,3 @@ import ConnectSDK from '../../ConnectSDK'; | ||
constructor(action: string, options: FilePickerOptions, connectSingleton: ConnectSDK); | ||
createFilePicker(action: string, options: FilePickerOptions, connectSingleton: ConnectSDK): IFilePicker | undefined; | ||
open(): boolean; | ||
@@ -7,0 +8,0 @@ init(options: FilePickerInitOptions): Promise<boolean>; |
@@ -244,3 +244,4 @@ import { ReactNode } from 'react'; | ||
export declare const overrideActionAlias: Partial<Record<string, string>>; | ||
export declare const AUTH_TOKEN_ALLOWED_INTEGRATIONS: Record<string, Record<'accessTokenPath', string>>; | ||
export type ALLOWED_FIELDS = 'accessTokenPath' | 'domain'; | ||
export declare const AUTH_TOKEN_ALLOWED_INTEGRATIONS: Record<string, Partial<Record<ALLOWED_FIELDS, string>>>; | ||
export type AccountType = { | ||
@@ -247,0 +248,0 @@ /** |
@@ -353,3 +353,5 @@ import ConnectSDK from '../ConnectSDK'; | ||
export type FilePickerInitOptions = { | ||
developerKey: string; | ||
developerKey?: string; | ||
DocsViewMode?: string; | ||
appId?: string; | ||
}; | ||
@@ -365,2 +367,7 @@ export declare enum FilePickerStatus { | ||
} | ||
export declare enum DocsViewMode { | ||
GRID = "grid", | ||
LIST = "list" | ||
} | ||
export declare const supportedModesForDocsViewMode: string[]; | ||
export {}; |
{ | ||
"name": "@useparagon/connect", | ||
"version": "1.0.26", | ||
"version": "1.0.27", | ||
"description": "Embed integrations into your app with the Paragon SDK", | ||
@@ -106,3 +106,4 @@ "main": "dist/src/index.js", | ||
"wrap-ansi": "^6.2.0" | ||
} | ||
}, | ||
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" | ||
} |
Sorry, the diff of this file is too big to display
206853
51
2574