lucid-extension-sdk 0.0.385 → 0.0.387

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
@@ -2,7 +2,7 @@ import { SerializedCardIntegrationConfig } from './core/cardintegration/cardinte
2
2
  import { SerializedFieldTypeDefinition } from './core/data/fieldtypedefinition/fieldtypedefinition';
3
3
  import { SerializedReferenceKeyType } from './core/data/referencekeys/serializedreferencekey';
4
4
  import { SerializedFieldType } from './core/data/serializedfield/serializedfields';
5
- import { JsonObject, JsonSerializable } from './core/jsonserializable';
5
+ import { JsonObject, UnsafeJsonSerializableOrUndefined } from './core/jsonserializable';
6
6
  import { LucidProduct } from './core/lucidproduct';
7
7
  import { LinearOffsetType } from './core/offsettype';
8
8
  import { SerializedDataError } from './core/serializeddataerror';
@@ -561,8 +561,8 @@ export type CommandArgs = {
561
561
  result: LoadBlockClassesResult;
562
562
  };
563
563
  [CommandName.LogForTestCase]: {
564
- query: JsonSerializable;
565
- result: JsonSerializable;
564
+ query: UnsafeJsonSerializableOrUndefined;
565
+ result: UnsafeJsonSerializableOrUndefined;
566
566
  };
567
567
  [CommandName.MeasureText]: {
568
568
  query: MeasureTextQuery;
@@ -758,6 +758,8 @@ export type AddCardIntegrationQuery = {
758
758
  'fvsc'?: [string, string][] | undefined;
759
759
  /** Default search callback for searching for legal field values in an enum */
760
760
  'dsc'?: string | undefined;
761
+ /** Custom field display settings */
762
+ 'cfds'?: SerializedCustomFieldDisplaySettings;
761
763
  };
762
764
  /** If we can only search for user by their name (and not email) in the card integration. */
763
765
  'subn'?: boolean | undefined;
@@ -1109,7 +1111,7 @@ export type CreateBlockQuery = {
1109
1111
  /** Class name of the block to create */
1110
1112
  'c': string;
1111
1113
  /** If specified, the stencil for a custom shape. Only valid if the class name is 'CustomBlock' */
1112
- 's'?: JsonSerializable | undefined;
1114
+ 's'?: UnsafeJsonSerializableOrUndefined | undefined;
1113
1115
  };
1114
1116
  export type CreateBlockResult = string;
1115
1117
  export type CreateCardsQuery = {
@@ -1154,7 +1156,7 @@ export type CreateDataSourceQuery = {
1154
1156
  'n': string;
1155
1157
  /** Source configuration for this data source--information about where it came from, or any metadata that might be useful */
1156
1158
  's': {
1157
- [key: string]: JsonSerializable;
1159
+ [key: string]: UnsafeJsonSerializableOrUndefined;
1158
1160
  };
1159
1161
  };
1160
1162
  export type CreateDataSourceResult = string;
@@ -1186,6 +1188,10 @@ export type RawCreateUserImageResult = {
1186
1188
  'u': string;
1187
1189
  };
1188
1190
  export type CreateUserImageResult = Promise<RawCreateUserImageResult>;
1191
+ export type SerializedCustomFieldDisplaySettings = {
1192
+ /** Default to multiline text */
1193
+ 'd'?: boolean | undefined;
1194
+ };
1189
1195
  export type DataActionQuery = {
1190
1196
  /** Flow Name */
1191
1197
  'fn': string;
@@ -1316,7 +1322,7 @@ export type GetElementTypeQuery = {
1316
1322
  };
1317
1323
  export type GetElementTypeResult = 'block' | 'line' | 'group' | 'visual-activity' | 'page' | 'document' | 'generator' | 'panel';
1318
1324
  export type GetEnvironmentConfigQuery = string;
1319
- export type GetEnvironmentConfigResult = JsonSerializable;
1325
+ export type GetEnvironmentConfigResult = UnsafeJsonSerializableOrUndefined;
1320
1326
  export type GetConnectedLinesQuery = string;
1321
1327
  export type GetConnectedLinesResult = string[];
1322
1328
  export type GetCardIntegrationConfigQuery = string;
@@ -1331,7 +1337,7 @@ export type GetCustomShapeQuery = {
1331
1337
  };
1332
1338
  export type GetCustomShapeResult = Promise<{
1333
1339
  /** Value which can be used as the Stencil property on a dynamic shape */
1334
- 's': JsonSerializable;
1340
+ 's': UnsafeJsonSerializableOrUndefined;
1335
1341
  /** Default size (x:0, y:0) of this custom shape */
1336
1342
  'bb': Box;
1337
1343
  /** Other default property values */
@@ -1449,9 +1455,9 @@ export type GetPropertyQuery = {
1449
1455
  /** Name of the property to read */
1450
1456
  'p': string;
1451
1457
  };
1452
- export type GetPropertyResult = JsonSerializable;
1458
+ export type GetPropertyResult = UnsafeJsonSerializableOrUndefined;
1453
1459
  export type GetPackageSettingsQuery = undefined;
1454
- export type GetPackageSettingsResult = Promise<Record<string, JsonSerializable>>;
1460
+ export type GetPackageSettingsResult = Promise<Record<string, UnsafeJsonSerializableOrUndefined>>;
1455
1461
  export type GetRelativeLinePositionQuery = {
1456
1462
  /** Block or line ID to check the connections on */
1457
1463
  'id': string;
@@ -1731,7 +1737,7 @@ export type SendUIMessageQuery = {
1731
1737
  /** Name of the UI component's action for receiving events, e.g. ShowModalQuery['n'] */
1732
1738
  'n': string;
1733
1739
  /** Content of the message to send to the custom UI component */
1734
- 'd'?: JsonSerializable;
1740
+ 'd'?: UnsafeJsonSerializableOrUndefined;
1735
1741
  };
1736
1742
  export type SendUIMessageResult = undefined;
1737
1743
  export type SendXHRResponseFormat = 'utf8' | 'binary';
@@ -1794,7 +1800,7 @@ export type SetPropertyQuery = {
1794
1800
  /** Name of the property to change */
1795
1801
  'p': string;
1796
1802
  /** New value of the property */
1797
- 'v'?: JsonSerializable;
1803
+ 'v'?: UnsafeJsonSerializableOrUndefined;
1798
1804
  };
1799
1805
  export type SetPropertyResult = undefined;
1800
1806
  export type SetReferenceKeyQuery = {
@@ -1880,10 +1886,10 @@ export type StartDragBlockToCanvasQuery = {
1880
1886
  };
1881
1887
  /** Additional properties to set on the block being dragged */
1882
1888
  'p': {
1883
- [key: string]: JsonSerializable;
1889
+ [key: string]: UnsafeJsonSerializableOrUndefined;
1884
1890
  };
1885
1891
  /** If specified, the stencil for a custom shape. Only valid if the class name is 'CustomBlock' */
1886
- 's'?: JsonSerializable | undefined;
1892
+ 's'?: UnsafeJsonSerializableOrUndefined | undefined;
1887
1893
  };
1888
1894
  export type StartDragBlockToCanvasResult = Promise<string | undefined>;
1889
1895
  export type StartPDFUploadRequestQuery = string;
@@ -1,5 +1,5 @@
1
1
  import { SerializedFieldType } from '../data/serializedfield/serializedfields';
2
- import { JsonSerializable } from '../jsonserializable';
2
+ import { UnsafeJsonSerializableOrUndefined } from '../jsonserializable';
3
3
  /** @ignore */
4
4
  export interface GetFieldsParam {
5
5
  'd': string;
@@ -42,7 +42,7 @@ export interface DependencyMappingItemLabelPhraseParam {
42
42
  }
43
43
  /** @ignore */
44
44
  export interface CustomImportParam {
45
- 'd': JsonSerializable;
45
+ 'd': UnsafeJsonSerializableOrUndefined;
46
46
  }
47
47
  /** @ignore */
48
48
  export interface GetInputFieldsParam {
@@ -4,7 +4,7 @@ import { TextStyle } from '../../document/text/textstyle';
4
4
  import { EditorClient } from '../../editorclient';
5
5
  import { isString } from '../checks';
6
6
  import { SerializedFieldType } from '../data/serializedfield/serializedfields';
7
- import { DependenciesForItems, ExtensionCardFieldDefinition, ImportResult } from '../sharedcardintegration/cardintegrationdefinitions';
7
+ import { CustomFieldDisplaySettings, DependenciesForItems, ExtensionCardFieldDefinition, ImportResult } from '../sharedcardintegration/cardintegrationdefinitions';
8
8
  import { CardIntegrationConfig } from './cardintegrationconfig';
9
9
  import { DependencyMappingPhrasesType } from './dependencymappingphrases';
10
10
  import { LucidCardIntegrationCustomImportModal } from './lucidcardintegrationcustomimportmodal';
@@ -78,6 +78,8 @@ export declare abstract class LucidCardIntegration {
78
78
  * Useful for when you don't know the field name ahead of time (e.g. a dynamically generated field name).
79
79
  */
80
80
  defaultSearchCallback?: string;
81
+ /** Optional properties to configure how fields are displayed */
82
+ customFieldDisplaySettings?: CustomFieldDisplaySettings;
81
83
  };
82
84
  iconConfiguration?: {
83
85
  /**
@@ -287,6 +287,11 @@ class LucidCardIntegrationRegistry {
287
287
  };
288
288
  });
289
289
  }
290
+ if (cardIntegration.fieldConfiguration.customFieldDisplaySettings) {
291
+ serialized['fc']['cfds'] = {
292
+ 'd': cardIntegration.fieldConfiguration.customFieldDisplaySettings.defaultToMultilineText,
293
+ };
294
+ }
290
295
  this.registerDependencyMapping(client, cardIntegration, serialized);
291
296
  client.sendCommand("aci" /* CommandName.AddCardIntegration */, serialized);
292
297
  }
@@ -1,5 +1,5 @@
1
1
  import { isString } from '../../checks';
2
- import { JsonSerializable } from '../../jsonserializable';
2
+ import { UnsafeJsonSerializableOrUndefined } from '../../jsonserializable';
3
3
  import { SerializedFieldTypeDefinition, isSerializedFieldTypeDefinition } from '../fieldtypedefinition/fieldtypedefinition';
4
4
  import { LucidFields } from '../fieldtypedefinition/lucidfields';
5
5
  import { SemanticFields } from '../fieldtypedefinition/semanticfields';
@@ -17,7 +17,7 @@ export declare enum FieldConstraintType {
17
17
  export declare const isFieldConstraintType: (x: unknown) => x is FieldConstraintType;
18
18
  export type SerializedFieldConstraint = {
19
19
  'Type': FieldConstraintType;
20
- 'Details'?: JsonSerializable;
20
+ 'Details'?: UnsafeJsonSerializableOrUndefined;
21
21
  };
22
22
  export declare const isSerializedFieldConstraint: (subject: unknown) => subject is import("../../guards").DestructureGuardedTypeObj<{
23
23
  Type: (x: unknown) => x is FieldConstraintType;
@@ -1,9 +1,9 @@
1
- export type JsonArray = Array<JsonSerializable>;
1
+ export type JsonArray = Array<UnsafeJsonSerializableOrUndefined>;
2
2
  export interface JsonObject {
3
- [key: string]: JsonSerializable;
3
+ [key: string]: UnsafeJsonSerializableOrUndefined;
4
4
  }
5
5
  /**
6
- * 'json-able' but specificallyfor json objects
6
+ * 'json-able' but specifically for json objects
7
7
  * @ignore
8
8
  */
9
9
  export interface JsonObjectConvertible {
@@ -11,7 +11,26 @@ export interface JsonObjectConvertible {
11
11
  }
12
12
  /**
13
13
  * Any type that can be natively converted to a string with JSON.stringify.
14
+ *
15
+ * `undefined` cannot be JSON serialized directly, but as a nested value inside a serializable array or object, it can
16
+ * be. We use `UnsafeJsonSerializableOrUndefined` as the type for the values embedded inside `JsonArray` and
17
+ * `JsonObject` for this reason.
14
18
  */
15
- export type JsonSerializable = undefined | null | string | number | boolean | JsonArray | JsonObject;
19
+ export type JsonSerializable = null | string | number | boolean | JsonArray | JsonObject;
20
+ /**
21
+ * @deprecated Prefer using `JsonSerializable` directly in new code.
22
+ *
23
+ * Any type that can be natively converted to a string with JSON.stringify, and _also_ `undefined, which will not be
24
+ * converted to a string.
25
+ *
26
+ * This type is used correctly as a nested value inside `JsonArray` and `JsonObject`, and also exists to reflect legacy
27
+ * behavior from before the distinction between `null` and `undefined` had been made. If you call `JSON.stringify` on
28
+ * a value with this type, it may return a valid JSON string, or it may return `undefined`.
29
+ *
30
+ * If you are later attempting to parse a value serialized in this way in other parts of the application, it may not be
31
+ * safe to unwrap or parse that value.
32
+ */
33
+ export type UnsafeJsonSerializableOrUndefined = JsonSerializable | undefined;
16
34
  export declare function isJsonSerializable(x: unknown): x is JsonSerializable;
35
+ export declare function isJsonSerializableOrUndefined(x: unknown): x is UnsafeJsonSerializableOrUndefined;
17
36
  export declare function isJsonObject(x: unknown): x is JsonObject;
@@ -1,22 +1,26 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isJsonObject = exports.isJsonSerializable = void 0;
3
+ exports.isJsonObject = exports.isJsonSerializableOrUndefined = exports.isJsonSerializable = void 0;
4
4
  const checks_1 = require("./checks");
5
5
  function isJsonSerializable(x) {
6
- return (x == null ||
6
+ return (x === null ||
7
7
  (0, checks_1.isString)(x) ||
8
8
  (0, checks_1.isNumber)(x) ||
9
9
  (0, checks_1.isBoolean)(x) ||
10
- ((0, checks_1.isArray)(x) && x.every(isJsonSerializable)) ||
10
+ ((0, checks_1.isArray)(x) && x.every(isJsonSerializableOrUndefined)) ||
11
11
  isJsonObject(x));
12
12
  }
13
13
  exports.isJsonSerializable = isJsonSerializable;
14
+ function isJsonSerializableOrUndefined(x) {
15
+ return isJsonSerializable(x) || x === undefined;
16
+ }
17
+ exports.isJsonSerializableOrUndefined = isJsonSerializableOrUndefined;
14
18
  function isJsonObject(x) {
15
19
  if (!(0, checks_1.isObjectUnsafe)(x)) {
16
20
  return false;
17
21
  }
18
22
  for (const k in x) {
19
- if (!isJsonSerializable(x[k])) {
23
+ if (!isJsonSerializableOrUndefined(x[k])) {
20
24
  return false;
21
25
  }
22
26
  }
@@ -147,3 +147,15 @@ export interface ImportResult {
147
147
  * to a list of primary keys for items that the original item has a relationship with.
148
148
  */
149
149
  export type DependenciesForItems = Map<DataItemProxy, string[]>;
150
+ export interface CustomFieldDisplaySettings {
151
+ /**
152
+ * When set to `true`, all text fields will be displayed as multiline text fields by default. This is currently the
153
+ * only way to get support for multiline text inputs.
154
+ *
155
+ * This setting will impact both the "edit card details" panel, and the "add card" panel (if you define one).
156
+ *
157
+ * If you would like certain fields to be shown as single line text, you can add the
158
+ * `FieldConstraintType.SINGLE_LINE_ONLY` constraint to the necessary fields.
159
+ * */
160
+ defaultToMultilineText: boolean;
161
+ }
@@ -2,7 +2,7 @@ import { CollectionProxy } from '../../data/collectionproxy';
2
2
  import { SerializedUpstreamConfig } from '../data/datasource/serializedupstreamconfig';
3
3
  import { SerializedFieldType } from '../data/serializedfield/serializedfields';
4
4
  import { SerializedSchema } from '../data/serializedfield/serializedschema';
5
- import { JsonSerializable } from '../jsonserializable';
5
+ import { UnsafeJsonSerializableOrUndefined } from '../jsonserializable';
6
6
  import { ExtensionCardFieldDefinition } from '../sharedcardintegration/cardintegrationdefinitions';
7
7
  /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
8
8
  export declare enum LucidSpreadsheetIntegrationFailureType {
@@ -20,7 +20,7 @@ export type ImportedResults = {
20
20
  'collectionId': string;
21
21
  'headerRow'?: number;
22
22
  'schema': SerializedSchema;
23
- 'upstreamConfig'?: JsonSerializable;
23
+ 'upstreamConfig'?: UnsafeJsonSerializableOrUndefined;
24
24
  }[];
25
25
  };
26
26
  /** @ignore until spreadsheet integration is ready for launch (CHART-51946) */
@@ -1,4 +1,4 @@
1
- import { JsonSerializable } from '../core/jsonserializable';
1
+ import { UnsafeJsonSerializableOrUndefined } from '../core/jsonserializable';
2
2
  import { MapProxy } from '../document/mapproxy';
3
3
  import { EditorClient } from '../editorclient';
4
4
  import { DataSourceProxy } from './datasourceproxy';
@@ -26,6 +26,6 @@ export declare class DataProxy {
26
26
  * @returns the newly created data source
27
27
  */
28
28
  addDataSource(name: string, sourceConfig: {
29
- [key: string]: JsonSerializable;
29
+ [key: string]: UnsafeJsonSerializableOrUndefined;
30
30
  }): DataSourceProxy;
31
31
  }
@@ -1,4 +1,4 @@
1
- import { JsonSerializable } from '../core/jsonserializable';
1
+ import { UnsafeJsonSerializableOrUndefined } from '../core/jsonserializable';
2
2
  import { MapProxy } from '../document/mapproxy';
3
3
  import { PropertyStoreProxy } from '../document/propertystoreproxy';
4
4
  import { EditorClient } from '../editorclient';
@@ -36,6 +36,6 @@ export declare class DataSourceProxy extends PropertyStoreProxy {
36
36
  * @returns The source configuration values set when this data source was created
37
37
  */
38
38
  getSourceConfig(): {
39
- [key: string]: JsonSerializable;
39
+ [key: string]: UnsafeJsonSerializableOrUndefined;
40
40
  };
41
41
  }
@@ -1,3 +1,4 @@
1
+ import { UnsafeJsonSerializableOrUndefined } from '../core/jsonserializable';
1
2
  import { DataConnectorAction, DataConnectorAsynchronousAction, DataConnectorManageWebhookAction, DataConnectorPatchAction, Webhook } from './actions/action';
2
3
  import { DataConnectorActionKeys } from './actions/dataconnectoractionkeys';
3
4
  import { ItemPatch, Patch, PatchParser } from './actions/patch';
@@ -22,8 +23,8 @@ export type DataConnectorRoute = (args: {
22
23
  * result type */
23
24
  export declare class DataConnectorRunError extends Error {
24
25
  status: number;
25
- body: unknown;
26
- constructor(status: number, body: unknown, message?: string);
26
+ body: UnsafeJsonSerializableOrUndefined;
27
+ constructor(status: number, body: UnsafeJsonSerializableOrUndefined, message?: string);
27
28
  static withMessage(status: number, message: string): DataConnectorRunError;
28
29
  }
29
30
  /** Thrown by any failable http APIs */
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DataConnector = exports.DataConnectorResponseError = exports.DataConnectorRequestState = exports.DataConnectorRequestError = exports.DataConnectorRunError = void 0;
4
4
  const checks_1 = require("../core/checks");
5
+ const jsonserializable_1 = require("../core/jsonserializable");
5
6
  const validators_1 = require("../core/validators/validators");
6
7
  const action_1 = require("./actions/action");
7
8
  const dataconnectoractionkeys_1 = require("./actions/dataconnectoractionkeys");
@@ -151,5 +152,5 @@ exports.DataConnector = DataConnector;
151
152
  // instanceof DataConnectorRunError will not work in some environments
152
153
  const isDataConnectorRunError = (0, validators_1.objectValidator)({
153
154
  status: checks_1.isNumber,
154
- body: checks_1.isUnknown,
155
+ body: jsonserializable_1.isJsonSerializable,
155
156
  });
@@ -9,7 +9,7 @@ import { SemanticKind } from '../core/data/fieldtypedefinition/semantickind';
9
9
  import { FieldConstraintType } from '../core/data/serializedfield/serializedfielddefinition';
10
10
  import { SerializedFields, SerializedLucidDictionary } from '../core/data/serializedfield/serializedfields';
11
11
  import { SerializedLabelOverrides } from '../core/data/serializedfield/serializedschema';
12
- import { JsonSerializable } from '../core/jsonserializable';
12
+ import { UnsafeJsonSerializableOrUndefined } from '../core/jsonserializable';
13
13
  import { DataUpdateFilterType } from '../data/dataupdatefiltertype';
14
14
  import { FieldConstraintDefinition, FieldDefinition, SchemaDefinition } from '../data/schemadefinition';
15
15
  /**
@@ -34,7 +34,7 @@ export type DataSourceRequest = {
34
34
  };
35
35
  export type SerializedFieldConstraintForApi = {
36
36
  'type': FieldConstraintType;
37
- 'details'?: JsonSerializable;
37
+ 'details'?: UnsafeJsonSerializableOrUndefined;
38
38
  };
39
39
  type SerializedFieldDefinitionForApi = {
40
40
  'name': string;
@@ -18,9 +18,9 @@ export declare class CustomBlockProxy extends BlockProxy {
18
18
  static getCustomBlockClass(client: EditorClient, id: string): CustomBlockProxyConstructor | typeof CustomBlockProxy;
19
19
  isFromStencil(library: string, shape: string): boolean;
20
20
  getCustomShapeType(): {
21
- packageId: import("../..").JsonSerializable;
22
- library: import("../..").JsonSerializable;
23
- shape: import("../..").JsonSerializable;
21
+ packageId: import("../..").UnsafeJsonSerializableOrUndefined;
22
+ library: import("../..").UnsafeJsonSerializableOrUndefined;
23
+ shape: import("../..").UnsafeJsonSerializableOrUndefined;
24
24
  };
25
25
  getStencilTextAreaName(stencilTextAreaName: string): string | undefined;
26
26
  }
@@ -1,4 +1,4 @@
1
- import { JsonObject, JsonSerializable } from '../core/jsonserializable';
1
+ import { JsonObject, UnsafeJsonSerializableOrUndefined } from '../core/jsonserializable';
2
2
  import { SimpleFillStyle } from '../core/properties/fillcolor';
3
3
  import { Box } from '../math';
4
4
  /**
@@ -31,5 +31,5 @@ export interface BlockDefinition {
31
31
  * If specified, the stencil to use for a custom shape. This is not typically set directly; use
32
32
  * [EditorClient.getCustomShapeDefinition](#classes_editorclient-EditorClient_getcustomshapedefinition).
33
33
  */
34
- stencil?: JsonSerializable;
34
+ stencil?: UnsafeJsonSerializableOrUndefined;
35
35
  }
@@ -1,4 +1,4 @@
1
- import { JsonSerializable } from '../../core/jsonserializable';
1
+ import { UnsafeJsonSerializableOrUndefined } from '../../core/jsonserializable';
2
2
  import { EditorClient } from '../../editorclient';
3
3
  import { MapProxy } from '../mapproxy';
4
4
  import { ConditionDefinition, EffectDefinition, RuleDefinition } from '../ruledefinition';
@@ -81,7 +81,7 @@ export declare class RuleProxy extends DocumentElementProxy {
81
81
  */
82
82
  delete(): void;
83
83
  /** @ignore */
84
- static getRuleProperties(definition: RuleDefinition): Record<string, JsonSerializable>;
84
+ static getRuleProperties(definition: RuleDefinition): Record<string, UnsafeJsonSerializableOrUndefined>;
85
85
  /** Update this rule to reflect a new definition */
86
86
  update(definition: RuleDefinition): void;
87
87
  }
@@ -11,7 +11,7 @@ export declare class PropertyStoreProxy {
11
11
  * Not all properties are writeable (e.g. "ClassName" on a block).
12
12
  * To move or resize elements, use setLocation() or setBoundingBox() or offset() instead.
13
13
  */
14
- readonly properties: WriteableMapProxy<string, import("..").JsonSerializable, void, import("..").JsonSerializable>;
14
+ readonly properties: WriteableMapProxy<string, import("..").UnsafeJsonSerializableOrUndefined, void, import("..").UnsafeJsonSerializableOrUndefined>;
15
15
  /**
16
16
  *
17
17
  * @param id ID of this element
package/editorclient.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { CommandArgs, CommandName, HashAlgorithmEnum, TriggerAuthFlowResult, UnionToIntersection } from './commandtypes';
2
2
  import { CardIntegrationConfig } from './core/cardintegration/cardintegrationconfig';
3
- import { JsonObject, JsonSerializable } from './core/jsonserializable';
3
+ import { JsonObject, UnsafeJsonSerializableOrUndefined } from './core/jsonserializable';
4
4
  import { UnfurlCallbacks } from './core/unfurl/unfurlcallbacks';
5
5
  import { BinaryXHRResponse, OAuthXHRRequest, TextXHRResponse, XHRRequest, XHRResponse } from './core/xhr';
6
6
  import { CollectionProxy } from './data/collectionproxy';
@@ -31,7 +31,7 @@ export type DataActionOptions = {
31
31
  };
32
32
  export declare class EditorClient {
33
33
  private nextId;
34
- protected readonly callbacks: Map<string, (value: any) => JsonSerializable | void | Promise<any>>;
34
+ protected readonly callbacks: Map<string, (value: any) => UnsafeJsonSerializableOrUndefined | void | Promise<any>>;
35
35
  private getUniqueActionName;
36
36
  /**
37
37
  * Get which Lucid product this editor extension has been loaded in.
@@ -96,7 +96,7 @@ export declare class EditorClient {
96
96
  *
97
97
  * @returns A promise that resolves to a map of setting names to current setting values
98
98
  */
99
- getPackageSettings(): Promise<Map<string, JsonSerializable>>;
99
+ getPackageSettings(): Promise<Map<string, UnsafeJsonSerializableOrUndefined>>;
100
100
  /**
101
101
  * @returns True if the current user is allowed to edit package settings on this installation
102
102
  * of this extension (if any settings exist), or false otherwise.
@@ -210,7 +210,7 @@ export declare class EditorClient {
210
210
  * @param name name of the action
211
211
  * @param callback function to execute when this action is invoked
212
212
  */
213
- registerAction(name: string, callback: (value: any) => JsonSerializable | void | Promise<any>): void;
213
+ registerAction(name: string, callback: (value: any) => UnsafeJsonSerializableOrUndefined | void | Promise<any>): void;
214
214
  /**
215
215
  * Register a named action that receives file upload data. These callbacks can be used in
216
216
  * Menu.addMenuItem as the file action.
@@ -331,7 +331,7 @@ export declare class EditorClient {
331
331
  * returns a promise that rejects, or if there is another editor session processing the same bootstrap
332
332
  * data at the same time.
333
333
  */
334
- processAndClearBootstrapData(callback: (data: JsonSerializable) => void | Promise<void>, markExtensionAsRequired?: boolean): Promise<void>;
334
+ processAndClearBootstrapData(callback: (data: UnsafeJsonSerializableOrUndefined) => void | Promise<void>, markExtensionAsRequired?: boolean): Promise<void>;
335
335
  /**
336
336
  * @param id ID of the line to create a proxy for
337
337
  * @returns the given line
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.385",
3
+ "version": "0.0.387",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
package/ui/iframeui.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { JsonSerializable } from '../core/jsonserializable';
1
+ import { UnsafeJsonSerializableOrUndefined } from '../core/jsonserializable';
2
2
  import { EditorClient } from '../editorclient';
3
3
  /** @ignore */
4
4
  export declare enum IncomingUIMessageType {
@@ -53,7 +53,7 @@ export declare abstract class IframeUI {
53
53
  * Send a message to this UI component's iframe via window.postMessage.
54
54
  * @param data Data to send to the iframe
55
55
  */
56
- sendMessage(data: JsonSerializable): Promise<void>;
56
+ sendMessage(data: UnsafeJsonSerializableOrUndefined): Promise<void>;
57
57
  /**
58
58
  * Receives messages sent from the iframe via parent.postMessage(<data>, '*')
59
59
  * @param message data sent from the iframe