lucid-extension-sdk 0.0.271 → 0.0.273

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
@@ -27,6 +27,7 @@ import { PanelLocation } from './ui/panel';
27
27
  export declare const enum CommandName {
28
28
  AddCardIntegration = "aci",
29
29
  AddDiagramFromMermaid = "adfm",
30
+ AddDiagramFromText = "adft",
30
31
  AddLineTextArea = "alta",
31
32
  AddMenuItem = "ami",
32
33
  AddShapeData = "asd",
@@ -173,6 +174,10 @@ export type CommandArgs = {
173
174
  query: AddDiagramFromMermaidQuery;
174
175
  result: AddDiagramFromMermaidResult;
175
176
  };
177
+ [CommandName.AddDiagramFromText]: {
178
+ query: AddDiagramFromTextQuery;
179
+ result: AddDiagramFromTextResult;
180
+ };
176
181
  [CommandName.AddLineTextArea]: {
177
182
  query: AddLineTextAreaQuery;
178
183
  result: AddLineTextAreaResult;
@@ -732,6 +737,13 @@ export type AddCardIntegrationQuery = {
732
737
  } | undefined;
733
738
  };
734
739
  export type AddCardIntegrationResult = undefined;
740
+ /** @ignore */
741
+ export type AddDiagramFromTextQuery = {
742
+ /** The text prompt that will be used to generate the diagram. */
743
+ 't': string;
744
+ };
745
+ /** @ignore */
746
+ export type AddDiagramFromTextResult = Promise<{}>;
735
747
  export type AddLineTextAreaQuery = {
736
748
  /** Which line */
737
749
  'id': string;
package/commandtypes.js CHANGED
@@ -6,6 +6,7 @@ const checks_1 = require("./core/checks");
6
6
  exports.commandTitles = new Map([
7
7
  ["aci" /* CommandName.AddCardIntegration */, 'AddCardIntegration'],
8
8
  ["adfm" /* CommandName.AddDiagramFromMermaid */, 'AddDiagramFromMermaid'],
9
+ ["adft" /* CommandName.AddDiagramFromText */, 'AddDiagramFromText'],
9
10
  ["alta" /* CommandName.AddLineTextArea */, 'AddLineTextArea'],
10
11
  ["ami" /* CommandName.AddMenuItem */, 'AddMenuItem'],
11
12
  ["asd" /* CommandName.AddShapeData */, 'AddShapeData'],
@@ -1,9 +1,21 @@
1
1
  import { isString } from '../../checks';
2
2
  import { SerializedUpstreamConfig } from './serializedupstreamconfig';
3
+ export type SerializedSourceForeignKey = {
4
+ 'Id': string;
5
+ 'SourceFields': string[];
6
+ 'RelationshipType': string;
7
+ 'Represents'?: string | null | undefined;
8
+ };
9
+ export declare const isSerializedSourceForeignKey: (subject: unknown) => subject is import("../../guards").DestructureGuardedTypeObj<{
10
+ Id: typeof isString;
11
+ SourceFields: (p1: unknown) => p1 is string[];
12
+ RelationshipType: typeof isString;
13
+ }>;
3
14
  /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
4
15
  export interface SerializedDataSourceProperties {
5
16
  'Name': string;
6
17
  'UpstreamConfig'?: SerializedUpstreamConfig | null | undefined;
18
+ 'SourceForeignKeys'?: SerializedSourceForeignKey[] | null | undefined;
7
19
  }
8
20
  /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
9
21
  export declare const isSerializedDataSourceProperties: (subject: unknown) => subject is import("../../guards").DestructureGuardedTypeObj<{
@@ -14,4 +26,9 @@ export declare const isSerializedDataSourceProperties: (subject: unknown) => sub
14
26
  PatchType: (x: unknown) => x is import("./upstreampatchtype").UpstreamPatchType | null | undefined;
15
27
  SourceConfig: typeof import("../../checks").isObject;
16
28
  }> | null | undefined;
29
+ SourceForeignKeys: (x: unknown) => x is import("../../guards").DestructureGuardedTypeObj<{
30
+ Id: typeof isString;
31
+ SourceFields: (p1: unknown) => p1 is string[];
32
+ RelationshipType: typeof isString;
33
+ }>[] | null | undefined;
17
34
  }>;
@@ -1,11 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSerializedDataSourceProperties = void 0;
3
+ exports.isSerializedDataSourceProperties = exports.isSerializedSourceForeignKey = void 0;
4
4
  const checks_1 = require("../../checks");
5
5
  const validators_1 = require("../../validators/validators");
6
6
  const serializedupstreamconfig_1 = require("./serializedupstreamconfig");
7
+ exports.isSerializedSourceForeignKey = (0, validators_1.objectValidator)({
8
+ 'Id': checks_1.isString,
9
+ 'SourceFields': (0, validators_1.arrayValidator)(checks_1.isString),
10
+ 'RelationshipType': checks_1.isString,
11
+ });
7
12
  /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
8
13
  exports.isSerializedDataSourceProperties = (0, validators_1.strictObjectValidator)({
9
14
  'Name': checks_1.isString,
10
15
  'UpstreamConfig': (0, validators_1.nullableOption)(serializedupstreamconfig_1.isSerializedUpstreamConfig),
16
+ 'SourceForeignKeys': (0, validators_1.nullableOption)((0, validators_1.arrayValidator)(exports.isSerializedSourceForeignKey)),
11
17
  });
@@ -55,6 +55,11 @@ export declare const isSerializedImportedDataSource: (subject: unknown) => subje
55
55
  PatchType: (x: unknown) => x is import("./upstreampatchtype").UpstreamPatchType | null | undefined;
56
56
  SourceConfig: typeof isObject; /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
57
57
  }> | null | undefined;
58
+ SourceForeignKeys: (x: unknown) => x is import("../../guards").DestructureGuardedTypeObj<{
59
+ Id: typeof isString;
60
+ SourceFields: (p1: unknown) => p1 is string[];
61
+ RelationshipType: typeof isString;
62
+ }>[] | null | undefined;
58
63
  }>;
59
64
  Collections: (val: unknown) => val is import("../../guards").DestructureGuardedTypeObj<{
60
65
  Name: typeof isString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.271",
3
+ "version": "0.0.273",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",