lucid-extension-sdk 0.0.188 → 0.0.189

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/commandtypes.d.ts CHANGED
@@ -710,10 +710,6 @@ export type AddSpreadsheetIntegrationQuery = {
710
710
  'gs': string;
711
711
  /** getMultipleSheetsForSpreadsheetDetails */
712
712
  'gm': string;
713
- /** getSpreadsheetData */
714
- 'gd': string;
715
- /** importIsComplete */
716
- 'ic': string;
717
713
  };
718
714
  /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
719
715
  export type AddSpreadsheetIntegrationResult = undefined;
@@ -0,0 +1,10 @@
1
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
2
+ export interface SerializedPreviewDataPayload<CONFIG, SHEET> {
3
+ 'SpreadsheetDetails': CONFIG;
4
+ 'Sheets': [SHEET, string][];
5
+ }
6
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
7
+ export declare function isSerializedPreviewDataPayload<CONFIG, SHEET>(configValidator: (x: unknown) => x is CONFIG, sheetValidator: (x: unknown) => x is SHEET): (subject: unknown) => subject is import("../../guards").DestructureGuardedTypeObj<{
8
+ SpreadsheetDetails: (x: unknown) => x is CONFIG;
9
+ Sheets: (p1: unknown) => p1 is [SHEET, string][];
10
+ }>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isSerializedPreviewDataPayload = void 0;
4
+ const checks_1 = require("../../checks");
5
+ const validators_1 = require("../../validators/validators");
6
+ /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
7
+ function isSerializedPreviewDataPayload(configValidator, sheetValidator) {
8
+ return (0, validators_1.strictObjectValidator)({
9
+ 'SpreadsheetDetails': configValidator,
10
+ 'Sheets': (0, validators_1.arrayValidator)((0, validators_1.tupleValidator)(sheetValidator, checks_1.isString)),
11
+ });
12
+ }
13
+ exports.isSerializedPreviewDataPayload = isSerializedPreviewDataPayload;
@@ -1,4 +1,3 @@
1
- import { SerializedImportedDataSource } from '../data/datasource/serializedimporteddatasource';
2
1
  import { SerializedUpstreamConfig } from '../data/datasource/serializedupstreamconfig';
3
2
  import { SerializedSchema } from '../data/serializedfield/serializedschema';
4
3
  import { JsonSerializable } from '../jsonserializable';
@@ -30,6 +29,4 @@ export declare abstract class LucidSpreadsheetIntegration<CONFIG extends JsonSer
30
29
  abstract dataConnectorName: string;
31
30
  abstract getSpreadsheetDetailsToImport(): Promise<CONFIG | LucidSpreadsheetIntegrationFailureType>;
32
31
  abstract getMultipleSheetsForSpreadsheetDetails(spreadsheetDetails: CONFIG): Promise<Map<SHEET, string> | LucidSpreadsheetIntegrationFailureType>;
33
- abstract getSpreadsheetData(spreadsheetDetails: CONFIG, sheets: SHEET[]): Promise<SerializedImportedDataSource | LucidSpreadsheetIntegrationFailureType>;
34
- abstract importIsComplete(syncDataSourceIdNonce: string, importedResults: ImportedResults): void;
35
32
  }
@@ -34,26 +34,12 @@ class LucidSpreadsheetIntegrationRegistry {
34
34
  catch (error) { }
35
35
  return lucidspreadsheetintegration_1.LucidSpreadsheetIntegrationFailureType.GenericFailure;
36
36
  });
37
- const getSpreadsheetDataActionName = LucidSpreadsheetIntegrationRegistry.nextHookName();
38
- client.registerAction(getSpreadsheetDataActionName, async (message) => {
39
- try {
40
- return await spreadsheetIntegration.getSpreadsheetData(message['spreadsheetDetails'], message['sheets']);
41
- }
42
- catch (error) { }
43
- return lucidspreadsheetintegration_1.LucidSpreadsheetIntegrationFailureType.GenericFailure;
44
- });
45
- const importIsCompleteActionName = LucidSpreadsheetIntegrationRegistry.nextHookName();
46
- client.registerAction(importIsCompleteActionName, async (message) => {
47
- spreadsheetIntegration.importIsComplete(message['SyncDataSourceIdNonce'], message['ImportedResults']);
48
- });
49
37
  const serialized = {
50
38
  'ld': spreadsheetIntegration.labelDescription,
51
39
  'li': spreadsheetIntegration.labelIconUrl,
52
40
  'dc': spreadsheetIntegration.dataConnectorName,
53
41
  'gs': getSpreadsheetDetailsToImportActionName,
54
42
  'gm': getMultipleSheetsForSpreadsheetDetailsActionName,
55
- 'gd': getSpreadsheetDataActionName,
56
- 'ic': importIsCompleteActionName,
57
43
  };
58
44
  client.sendCommand("asi" /* CommandName.AddSpreadsheetIntegration */, serialized);
59
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.188",
3
+ "version": "0.0.189",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",