UNPKG

@thoughtspot/visual-embed-sdk

Version:
34 lines (32 loc) 3.98 kB
export const ERROR_MESSAGE = { INVALID_THOUGHTSPOT_HOST: 'Error parsing ThoughtSpot host. Please provide a valid URL.', SPOTTER_EMBED_WORKSHEED_ID_NOT_FOUND: 'Please select a worksheet to get started', LIVEBOARD_VIZ_ID_VALIDATION: 'Please select a Liveboard to embed.', TRIGGER_TIMED_OUT: 'Trigger timed-out in getting a response', SEARCHEMBED_BETA_WRANING_MESSAGE: 'SearchEmbed is in Beta in this release.', SAGE_EMBED_BETA_WARNING_MESSAGE: 'SageEmbed is in Beta in this release.', THIRD_PARTY_COOKIE_BLOCKED_ALERT: 'Third-party cookie access is blocked on this browser. Please allow third-party cookies for this to work properly. \nYou can use `suppressNoCookieAccessAlert` to suppress this message.', DUPLICATE_TOKEN_ERR: 'Duplicate token. Please issue a new token every time getAuthToken callback is called. See https://developers.thoughtspot.com/docs/?pageid=embed-auth#trusted-auth-embed for more details.', SDK_NOT_INITIALIZED: 'SDK not initialized', SESSION_INFO_FAILED: 'Failed to get session information', INVALID_TOKEN_ERROR: 'Received invalid token from getAuthToken callback or authToken endpoint.', INVALID_TOKEN_TYPE_ERROR: 'Expected getAuthToken to return a string, but received a {invalidType}.', MIXPANEL_TOKEN_NOT_FOUND: 'Mixpanel token not found in session info', PRERENDER_ID_MISSING: 'PreRender ID is required for preRender', SYNC_STYLE_CALLED_BEFORE_RENDER: 'PreRender should be called before using syncPreRenderStyle', CSP_VIOLATION_ALERT: 'CSP violation detected. Please check the console errors for more details.', CSP_FRAME_HOST_VIOLATION_LOG_MESSAGE: 'Please set up CSP correctly for the application to start working. For more information, see https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts. \n If the issue persists, refer to https://developers.thoughtspot.com/docs/security-settings#csp-viz-embed-hosts', MISSING_REPORTING_OBSERVER: 'ReportingObserver not supported', RENDER_CALLED_BEFORE_INIT: 'Looks like render was called before calling init, the render won\'t start until init is called.\nFor more info check\n1. https://developers.thoughtspot.com/docs/Function_init#_init\n2.https://developers.thoughtspot.com/docs/getting-started#initSdk', SPOTTER_AGENT_NOT_INITIALIZED: 'SpotterAgent not initialized', }; export const CUSTOM_ACTIONS_ERROR_MESSAGE = { INVALID_ACTION_OBJECT: 'Custom Action Validation Error: Invalid action object provided', MISSING_REQUIRED_FIELDS: (id: string, missingFields: string[]) => `Custom Action Validation Error for '${id}': Missing required fields: ${missingFields.join(', ')}`, UNSUPPORTED_TARGET: (id: string, targetType: string) => `Custom Action Validation Error for '${id}': Target type '${targetType}' is not supported`, INVALID_POSITION: (position: string, targetType: string, supportedPositions: string) => `Position '${position}' is not supported for ${targetType.toLowerCase()}-level custom actions. Supported positions: ${supportedPositions}`, INVALID_METADATA_IDS: (targetType: string, invalidIds: string[], supportedIds: string) => `Invalid metadata IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported metadata IDs: ${supportedIds}`, INVALID_DATA_MODEL_IDS: (targetType: string, invalidIds: string[], supportedIds: string) => `Invalid data model IDs for ${targetType.toLowerCase()}-level custom actions: ${invalidIds.join(', ')}. Supported data model IDs: ${supportedIds}`, INVALID_FIELDS: (targetType: string, invalidFields: string[], supportedFields: string) => `Invalid fields for ${targetType.toLowerCase()}-level custom actions: ${invalidFields.join(', ')}. Supported fields: ${supportedFields}`, DUPLICATE_IDS: (id: string, duplicateNames: string[], keptName: string) => `Duplicate custom action ID '${id}' found. Actions with names '${duplicateNames.join("', '")}' will be ignored. Keeping '${keptName}'.`, };