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

@gooddata/typings

Package Overview
Dependencies
Maintainers
43
Versions
304
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gooddata/typings - npm Package Compare versions

Comparing version 2.23.0-lanhuynh-lhq-sd-884-post-event-typings-2020-04-03T02-03-03-152Z to 2.23.0-lanhuynh-lhq-sd-884-post-event-typings-2020-04-06T00-28-54-283Z

75

dist/src/embedding/ad.d.ts
import { CommandFailed, IObjectMeta, IGdcMessageEvent, IGdcMessageEventDataWrapper, ICommandFailedBody } from './common';
import { VisualizationObject } from '../VisualizationObject';
declare type ANALYTICAL_DESIGNER = 'analyticalDesigner';
export declare const AD_PRODUCT_NAME = "analyticalDesigner";
export interface IBaseExportConfig {

@@ -16,15 +18,16 @@ title?: string;

OpenInsight = "openInsight",
Save = "SaveInsight",
SaveAs = "SaveAsInsight",
Export = "ExportInsight",
Undo = "Undo",
Redo = "Redo"
Save = "saveInsight",
SaveAs = "saveAsInsight",
Export = "exportInsight",
Undo = "undo",
Redo = "redo"
}
enum GdcAdEventType {
NewInsightInitialized = "NewInsightInitialized",
InsightOpened = "InsightOpened",
InsightSaved = "InsightSaved",
UndoFinished = "UndoFinished",
RedoFinished = "RedoFinished",
ExportFinished = "ExportInsightFinished"
ListeningForDrillableItems = "listeningForDrillableItems",
NewInsightInitialized = "newInsightInitialized",
InsightOpened = "insightOpened",
InsightSaved = "insightSaved",
UndoFinished = "undoFinished",
RedoFinished = "redoFinished",
ExportFinished = "exportInsightFinished"
}

@@ -35,3 +38,3 @@ enum GdcAdErrorType {

*/
InvalidCommand = "Error:invalidCommand",
InvalidCommand = "error:invalidCommand",
/**

@@ -41,3 +44,3 @@ * Argument specified in the command body is invalid; it has failed the syntactical or semantic

*/
InvalidArgument = "Error:invalidArgument",
InvalidArgument = "error:invalidArgument",
/**

@@ -51,7 +54,7 @@ * Command was posted when AD is not in a state to process the command. For instance:

*/
InvalidState = "Error:invalidState",
InvalidState = "error:invalidState",
/**
* The Unexpected Happened.
*/
RuntimeError = "Error:runtime"
RuntimeError = "error:runtime"
}

@@ -65,3 +68,3 @@ /**

type AdCommandFailedData = IGdcMessageEventDataWrapper<ANALYTICAL_DESIGNER, 'appCommandFailed', ICommandFailedBody<GdcAdErrorType>>;
function createAdCommandFailedData(correlationId: string, errorCode: GdcAdErrorType, errorMessage: string): AdCommandFailedData;
function createAdCommandFailedData(contextId: string, errorCode: GdcAdErrorType, errorMessage: string): AdCommandFailedData;
interface ISimpleDrillableItemsCommandBody {

@@ -76,3 +79,3 @@ uris?: string[];

type DrillableItemsCommandData = IGdcMessageEventDataWrapper<ANALYTICAL_DESIGNER, GdcAdCommandType.DrillableItems, IDrillableItemsCommandBody>;
function createIDrillableItemsData(drillableItemsData: IDrillableItemsCommandBody, correlationId?: string): DrillableItemsCommandData;
function createIDrillableItemsData(drillableItemsData: IDrillableItemsCommandBody, contextId?: string): DrillableItemsCommandData;
/**

@@ -83,3 +86,3 @@ * Type-guard checking whether object is an instance of DrillableItemsCommandData.

*/
function isDrillableItemsCommand(obj: any): obj is DrillableItemsCommandData;
function isDrillableItemsCommandData(obj: any): obj is DrillableItemsCommandData;
interface IOpenInsightCommandBody {

@@ -96,3 +99,3 @@ dataset?: string | null;

type OpenInsightCommandData = IGdcMessageEventDataWrapper<ANALYTICAL_DESIGNER, GdcAdCommandType.OpenInsight, IOpenInsightCommandBody>;
function createOpenInsightData(insightData: IOpenInsightCommandBody, correlationId?: string): OpenInsightCommandData;
function createOpenInsightData(insightData: IOpenInsightCommandBody, contextId?: string): OpenInsightCommandData;
/**

@@ -103,3 +106,3 @@ * Type-guard checking whether object is an instance of OpenInsightCommandData.

*/
function isOpenInsightCommand(obj: any): obj is OpenInsightCommandData;
function isOpenInsightCommandData(obj: any): obj is OpenInsightCommandData;
interface ISaveCommandBody {

@@ -129,3 +132,3 @@ title: string;

/**
* @param correlationId - optionally specify correlationId to include in any events that are posted
* @param contextId - optionally specify contextId to include in any events that are posted
* as part/at the end of command processing

@@ -135,3 +138,3 @@ * @param title - title for the insight

*/
function createSaveInsightData(title: string, correlationId?: string): SaveInsightCommandData;
function createSaveInsightData(title: string, contextId?: string): SaveInsightCommandData;
/**

@@ -142,3 +145,3 @@ * Type-guard checking whether object is an instance of SaveInsightCommandData.

*/
function isSaveInsightCommand(obj: any): obj is SaveInsightCommandData;
function isSaveInsightCommandData(obj: any): obj is SaveInsightCommandData;
interface ISaveAsInsightCommandBody {

@@ -158,7 +161,7 @@ readonly title: string;

* @param title - title for the new insight
* @param correlationId - optionally specify correlationId to include in any events that are posted
* @param contextId - optionally specify contextId to include in any events that are posted
* as part/at the end of command processing
* @returns new SaveAsInsightCommandData
*/
function createSaveAsInsightCommandData(title: string, correlationId: string): SaveAsInsightCommandData;
function createSaveAsInsightCommandData(title: string, contextId: string): SaveAsInsightCommandData;
/**

@@ -193,7 +196,7 @@ * Type-guard checking whether object is an instance of SaveAsCommand.

* @param config - export config
* @param correlationId - optionally specify correlationId to include in any events that are posted
* @param contextId - optionally specify contextId to include in any events that are posted
* as part/at the end of command processing
* @returns new instance of ExportInsightCommandData
*/
function createExportInsightCommandData(config: IExportConfig, correlationId: string): ExportInsightCommandData;
function createExportInsightCommandData(config: IExportConfig, contextId: string): ExportInsightCommandData;
/**

@@ -220,3 +223,3 @@ * Type-guard checking whether object is an instance of ExportCommand.

function isUndoCommandData(obj: any): obj is UndoCommandData;
function createUndoCommandData(correlationId?: string): UndoCommandData;
function createUndoCommandData(contextId?: string): UndoCommandData;
/**

@@ -237,3 +240,3 @@ * Triggers the redo action.

function isRedoCommandData(obj: any): obj is RedoCommandData;
function createRedoCommandData(correlationId?: string): RedoCommandData;
function createRedoCommandData(contextId?: string): RedoCommandData;
/**

@@ -252,3 +255,3 @@ * List of available commands; this is included in each event sent by AD.

function isNewInsightInitializedData(obj: any): obj is NewInsightInitializedData;
function createNewInsightInitializedData(correlationId: string): NewInsightInitializedData;
function createNewInsightInitializedData(contextId: string): NewInsightInitializedData;
type InsightOpenedBody = IAvailableCommands & {

@@ -264,4 +267,4 @@ insight: IObjectMeta;

function isInsightOpenedData(obj: any): obj is InsightOpenedData;
function createInsightOpenedData(correlationId: string): InsightOpenedData;
type InsightSavedBody = IAvailableCommands & {
function createInsightOpenedData(contextId: string): InsightOpenedData;
type InsightSavedBody = IAvailableCommands & VisualizationObject.IVisualization & {
insight: IObjectMeta;

@@ -275,3 +278,3 @@ };

function isInsightSavedData(obj: any): obj is InsightSavedData;
function createInsightSavedData(correlationId: string): InsightSavedData;
function createInsightSavedData(contextId: string): InsightSavedData;
type ExportFinishedBody = IAvailableCommands & {

@@ -289,3 +292,3 @@ /**

function isExportFinishedData(obj: any): obj is ExportFinishedData;
function createExportFinishedData(correlationId: string): ExportFinishedData;
function createExportFinishedData(contextId: string): ExportFinishedData;
type UndoFinishedBody = IAvailableCommands;

@@ -298,3 +301,3 @@ /**

function isUndoFinishedData(obj: any): obj is UndoFinishedData;
function createUndoFinishedData(correlationId: string): UndoFinishedData;
function createUndoFinishedData(contextId: string): UndoFinishedData;
type RedoFinishedBody = IAvailableCommands;

@@ -307,4 +310,4 @@ /**

function isRedoFinishedData(obj: any): obj is RedoFinishedData;
function createRedoFinishedData(correlationId: string): RedoFinishedData;
function createRedoFinishedData(contextId: string): RedoFinishedData;
}
export {};

@@ -5,3 +5,3 @@ "use strict";

var isEmpty = require("lodash/isEmpty");
var AD_PRODUCT_NAME = 'analyticalDesigner';
exports.AD_PRODUCT_NAME = 'analyticalDesigner';
var EmbeddedAnalyticalDesigner;

@@ -13,16 +13,17 @@ (function (EmbeddedAnalyticalDesigner) {

GdcAdCommandType["OpenInsight"] = "openInsight";
GdcAdCommandType["Save"] = "SaveInsight";
GdcAdCommandType["SaveAs"] = "SaveAsInsight";
GdcAdCommandType["Export"] = "ExportInsight";
GdcAdCommandType["Undo"] = "Undo";
GdcAdCommandType["Redo"] = "Redo";
GdcAdCommandType["Save"] = "saveInsight";
GdcAdCommandType["SaveAs"] = "saveAsInsight";
GdcAdCommandType["Export"] = "exportInsight";
GdcAdCommandType["Undo"] = "undo";
GdcAdCommandType["Redo"] = "redo";
})(GdcAdCommandType = EmbeddedAnalyticalDesigner.GdcAdCommandType || (EmbeddedAnalyticalDesigner.GdcAdCommandType = {}));
var GdcAdEventType;
(function (GdcAdEventType) {
GdcAdEventType["NewInsightInitialized"] = "NewInsightInitialized";
GdcAdEventType["InsightOpened"] = "InsightOpened";
GdcAdEventType["InsightSaved"] = "InsightSaved";
GdcAdEventType["UndoFinished"] = "UndoFinished";
GdcAdEventType["RedoFinished"] = "RedoFinished";
GdcAdEventType["ExportFinished"] = "ExportInsightFinished";
GdcAdEventType["ListeningForDrillableItems"] = "listeningForDrillableItems";
GdcAdEventType["NewInsightInitialized"] = "newInsightInitialized";
GdcAdEventType["InsightOpened"] = "insightOpened";
GdcAdEventType["InsightSaved"] = "insightSaved";
GdcAdEventType["UndoFinished"] = "undoFinished";
GdcAdEventType["RedoFinished"] = "redoFinished";
GdcAdEventType["ExportFinished"] = "exportInsightFinished";
})(GdcAdEventType = EmbeddedAnalyticalDesigner.GdcAdEventType || (EmbeddedAnalyticalDesigner.GdcAdEventType = {}));

@@ -34,3 +35,3 @@ var GdcAdErrorType;

*/
GdcAdErrorType["InvalidCommand"] = "Error:invalidCommand";
GdcAdErrorType["InvalidCommand"] = "error:invalidCommand";
/**

@@ -40,3 +41,3 @@ * Argument specified in the command body is invalid; it has failed the syntactical or semantic

*/
GdcAdErrorType["InvalidArgument"] = "Error:invalidArgument";
GdcAdErrorType["InvalidArgument"] = "error:invalidArgument";
/**

@@ -50,15 +51,15 @@ * Command was posted when AD is not in a state to process the command. For instance:

*/
GdcAdErrorType["InvalidState"] = "Error:invalidState";
GdcAdErrorType["InvalidState"] = "error:invalidState";
/**
* The Unexpected Happened.
*/
GdcAdErrorType["RuntimeError"] = "Error:runtime";
GdcAdErrorType["RuntimeError"] = "error:runtime";
})(GdcAdErrorType = EmbeddedAnalyticalDesigner.GdcAdErrorType || (EmbeddedAnalyticalDesigner.GdcAdErrorType = {}));
function createAdCommandFailedData(correlationId, errorCode, errorMessage) {
function createAdCommandFailedData(contextId, errorCode, errorMessage) {
return {
gdc: {
product: AD_PRODUCT_NAME,
product: exports.AD_PRODUCT_NAME,
event: {
name: 'appCommandFailed',
correlationId: correlationId,
contextId: contextId,
data: {

@@ -73,9 +74,9 @@ errorCode: errorCode,

EmbeddedAnalyticalDesigner.createAdCommandFailedData = createAdCommandFailedData;
function createIDrillableItemsData(drillableItemsData, correlationId) {
function createIDrillableItemsData(drillableItemsData, contextId) {
return {
gdc: {
product: AD_PRODUCT_NAME,
product: exports.AD_PRODUCT_NAME,
event: {
name: GdcAdCommandType.DrillableItems,
correlationId: correlationId,
contextId: contextId,
data: drillableItemsData

@@ -92,13 +93,13 @@ }

*/
function isDrillableItemsCommand(obj) {
function isDrillableItemsCommandData(obj) {
return !isEmpty(obj) && obj.gdc.event.name === GdcAdCommandType.DrillableItems;
}
EmbeddedAnalyticalDesigner.isDrillableItemsCommand = isDrillableItemsCommand;
function createOpenInsightData(insightData, correlationId) {
EmbeddedAnalyticalDesigner.isDrillableItemsCommandData = isDrillableItemsCommandData;
function createOpenInsightData(insightData, contextId) {
return {
gdc: {
product: AD_PRODUCT_NAME,
product: exports.AD_PRODUCT_NAME,
event: {
name: GdcAdCommandType.OpenInsight,
correlationId: correlationId,
contextId: contextId,
data: insightData

@@ -115,8 +116,8 @@ }

*/
function isOpenInsightCommand(obj) {
function isOpenInsightCommandData(obj) {
return !isEmpty(obj) && obj.gdc.event.name === GdcAdCommandType.OpenInsight;
}
EmbeddedAnalyticalDesigner.isOpenInsightCommand = isOpenInsightCommand;
EmbeddedAnalyticalDesigner.isOpenInsightCommandData = isOpenInsightCommandData;
/**
* @param correlationId - optionally specify correlationId to include in any events that are posted
* @param contextId - optionally specify contextId to include in any events that are posted
* as part/at the end of command processing

@@ -126,9 +127,9 @@ * @param title - title for the insight

*/
function createSaveInsightData(title, correlationId) {
function createSaveInsightData(title, contextId) {
return {
gdc: {
product: AD_PRODUCT_NAME,
product: exports.AD_PRODUCT_NAME,
event: {
name: GdcAdCommandType.Save,
correlationId: correlationId,
contextId: contextId,
data: {

@@ -147,19 +148,19 @@ title: title

*/
function isSaveInsightCommand(obj) {
function isSaveInsightCommandData(obj) {
return !isEmpty(obj) && obj.gdc.event.name === GdcAdCommandType.Save;
}
EmbeddedAnalyticalDesigner.isSaveInsightCommand = isSaveInsightCommand;
EmbeddedAnalyticalDesigner.isSaveInsightCommandData = isSaveInsightCommandData;
/**
* @param title - title for the new insight
* @param correlationId - optionally specify correlationId to include in any events that are posted
* @param contextId - optionally specify contextId to include in any events that are posted
* as part/at the end of command processing
* @returns new SaveAsInsightCommandData
*/
function createSaveAsInsightCommandData(title, correlationId) {
function createSaveAsInsightCommandData(title, contextId) {
return {
gdc: {
product: AD_PRODUCT_NAME,
product: exports.AD_PRODUCT_NAME,
event: {
name: GdcAdCommandType.SaveAs,
correlationId: correlationId,
contextId: contextId,
data: {

@@ -184,13 +185,13 @@ title: title

* @param config - export config
* @param correlationId - optionally specify correlationId to include in any events that are posted
* @param contextId - optionally specify contextId to include in any events that are posted
* as part/at the end of command processing
* @returns new instance of ExportInsightCommandData
*/
function createExportInsightCommandData(config, correlationId) {
function createExportInsightCommandData(config, contextId) {
return {
gdc: {
product: AD_PRODUCT_NAME,
product: exports.AD_PRODUCT_NAME,
event: {
name: GdcAdCommandType.Export,
correlationId: correlationId,
contextId: contextId,
data: {

@@ -217,9 +218,9 @@ config: config

EmbeddedAnalyticalDesigner.isUndoCommandData = isUndoCommandData;
function createUndoCommandData(correlationId) {
function createUndoCommandData(contextId) {
return {
gdc: {
product: AD_PRODUCT_NAME,
product: exports.AD_PRODUCT_NAME,
event: {
name: GdcAdCommandType.Undo,
correlationId: correlationId
contextId: contextId
}

@@ -234,9 +235,9 @@ }

EmbeddedAnalyticalDesigner.isRedoCommandData = isRedoCommandData;
function createRedoCommandData(correlationId) {
function createRedoCommandData(contextId) {
return {
gdc: {
product: AD_PRODUCT_NAME,
product: exports.AD_PRODUCT_NAME,
event: {
name: GdcAdCommandType.Redo,
correlationId: correlationId
contextId: contextId
}

@@ -251,9 +252,9 @@ }

EmbeddedAnalyticalDesigner.isNewInsightInitializedData = isNewInsightInitializedData;
function createNewInsightInitializedData(correlationId) {
function createNewInsightInitializedData(contextId) {
return {
gdc: {
product: AD_PRODUCT_NAME,
product: exports.AD_PRODUCT_NAME,
event: {
name: GdcAdEventType.NewInsightInitialized,
correlationId: correlationId
contextId: contextId
}

@@ -268,9 +269,9 @@ }

EmbeddedAnalyticalDesigner.isInsightOpenedData = isInsightOpenedData;
function createInsightOpenedData(correlationId) {
function createInsightOpenedData(contextId) {
return {
gdc: {
product: AD_PRODUCT_NAME,
product: exports.AD_PRODUCT_NAME,
event: {
name: GdcAdEventType.InsightOpened,
correlationId: correlationId
contextId: contextId
}

@@ -285,9 +286,9 @@ }

EmbeddedAnalyticalDesigner.isInsightSavedData = isInsightSavedData;
function createInsightSavedData(correlationId) {
function createInsightSavedData(contextId) {
return {
gdc: {
product: AD_PRODUCT_NAME,
product: exports.AD_PRODUCT_NAME,
event: {
name: GdcAdEventType.InsightSaved,
correlationId: correlationId
contextId: contextId
}

@@ -302,9 +303,9 @@ }

EmbeddedAnalyticalDesigner.isExportFinishedData = isExportFinishedData;
function createExportFinishedData(correlationId) {
function createExportFinishedData(contextId) {
return {
gdc: {
product: AD_PRODUCT_NAME,
product: exports.AD_PRODUCT_NAME,
event: {
name: GdcAdEventType.ExportFinished,
correlationId: correlationId
contextId: contextId
}

@@ -319,9 +320,9 @@ }

EmbeddedAnalyticalDesigner.isUndoFinishedData = isUndoFinishedData;
function createUndoFinishedData(correlationId) {
function createUndoFinishedData(contextId) {
return {
gdc: {
product: AD_PRODUCT_NAME,
product: exports.AD_PRODUCT_NAME,
event: {
name: GdcAdEventType.UndoFinished,
correlationId: correlationId
contextId: contextId
}

@@ -336,9 +337,9 @@ }

EmbeddedAnalyticalDesigner.isRedoFinishedData = isRedoFinishedData;
function createRedoFinishedData(correlationId) {
function createRedoFinishedData(contextId) {
return {
gdc: {
product: AD_PRODUCT_NAME,
product: exports.AD_PRODUCT_NAME,
event: {
name: GdcAdEventType.RedoFinished,
correlationId: correlationId
contextId: contextId
}

@@ -345,0 +346,0 @@ }

@@ -6,3 +6,3 @@ export interface IGdcMessageEventData<Product, T, TBody> {

readonly data?: TBody;
readonly correlationId?: string;
readonly contextId?: string;
};

@@ -45,3 +45,3 @@ }

export declare function isCommandFailedData<Product>(obj: any): obj is CommandFailedData<Product, any>;
export declare function createCommandFailedData<Product, TErrorCodes>(product: Product, correlationId: string, errorCode: TErrorCodes, errorMessage: string): CommandFailedData<Product, TErrorCodes>;
export declare function createCommandFailedData<Product, TErrorCodes>(product: Product, contextId: string, errorCode: TErrorCodes, errorMessage: string): CommandFailedData<Product, TErrorCodes>;
/**

@@ -48,0 +48,0 @@ * Minimal meta-information about an object.

@@ -14,3 +14,3 @@ "use strict";

exports.isCommandFailedData = isCommandFailedData;
function createCommandFailedData(product, correlationId, errorCode, errorMessage) {
function createCommandFailedData(product, contextId, errorCode, errorMessage) {
return {

@@ -21,3 +21,3 @@ gdc: {

name: 'appCommandFailed',
correlationId: correlationId,
contextId: contextId,
data: {

@@ -24,0 +24,0 @@ errorCode: errorCode,

{
"name": "@gooddata/typings",
"version": "2.23.0-lanhuynh-lhq-sd-884-post-event-typings-2020-04-03T02-03-03-152Z",
"version": "2.23.0-lanhuynh-lhq-sd-884-post-event-typings-2020-04-06T00-28-54-283Z",
"description": "TypeScript definition files for GoodData platform",

@@ -5,0 +5,0 @@ "typings": "dist/index.d.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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