lucid-extension-sdk 0.0.282 → 0.0.285

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.
@@ -1,10 +1,12 @@
1
1
  import { isString } from '../../checks';
2
2
  import { SerializedUpstreamConfig } from './serializedupstreamconfig';
3
+ export type DirectionType = 'inward' | 'outward' | null | undefined;
3
4
  export type SerializedSourceForeignKey = {
4
5
  'Id': string;
5
6
  'SourceFields': string[];
6
7
  'RelationshipType': string;
7
8
  'Represents'?: string | null | undefined;
9
+ 'Direction'?: DirectionType;
8
10
  };
9
11
  export declare const isSerializedSourceForeignKey: (subject: unknown) => subject is import("../../guards").DestructureGuardedTypeObj<{
10
12
  Id: typeof isString;
@@ -72,9 +72,10 @@ export declare class ItemsPatchInexhaustive {
72
72
  export declare class ItemsPatchExhaustive {
73
73
  items: Map<string, SerializedFields>;
74
74
  rekeyingMap?: Map<string, string | null> | undefined;
75
+ fieldNamesChanged?: Map<string, string> | undefined;
75
76
  errors?: Map<string, SerializedLucidDictionary> | undefined;
76
77
  private readonly _brand;
77
- constructor(items: Map<string, SerializedFields>, rekeyingMap?: Map<string, string | null> | undefined, errors?: Map<string, SerializedLucidDictionary> | undefined);
78
+ constructor(items: Map<string, SerializedFields>, rekeyingMap?: Map<string, string | null> | undefined, fieldNamesChanged?: Map<string, string> | undefined, errors?: Map<string, SerializedLucidDictionary> | undefined);
78
79
  }
79
80
  export type ItemsPatch = {
80
81
  /**
@@ -94,6 +95,7 @@ export type SerializedItemsPatch = {
94
95
  } | {
95
96
  'exhaustiveItems': Record<string, SerializedFields>;
96
97
  'rekeyingMap'?: Record<string, string | null>;
98
+ 'fieldNamesChanged'?: Record<string, string>;
97
99
  'errors'?: Record<string, SerializedLucidDictionary>;
98
100
  };
99
101
  export declare function serializeItemsPatch(patch: ItemsPatch): SerializedItemsPatch;
@@ -22,9 +22,10 @@ class ItemsPatchInexhaustive {
22
22
  }
23
23
  exports.ItemsPatchInexhaustive = ItemsPatchInexhaustive;
24
24
  class ItemsPatchExhaustive {
25
- constructor(items, rekeyingMap, errors) {
25
+ constructor(items, rekeyingMap, fieldNamesChanged, errors) {
26
26
  this.items = items;
27
27
  this.rekeyingMap = rekeyingMap;
28
+ this.fieldNamesChanged = fieldNamesChanged;
28
29
  this.errors = errors;
29
30
  this._brand = ItemsPatchExhaustive;
30
31
  }
@@ -36,10 +37,13 @@ function serializeErrors(errors) {
36
37
  function serializeRekeyingMap(rekeyingMap) {
37
38
  return rekeyingMap && { 'rekeyingMap': (0, object_1.fromEntries)(rekeyingMap) };
38
39
  }
40
+ function serializeFieldNamesChanged(fieldNamesChanged) {
41
+ return fieldNamesChanged && { 'fieldNamesChanged': (0, object_1.fromEntries)(fieldNamesChanged) };
42
+ }
39
43
  function serializeItemsPatch(patch) {
40
44
  var _a;
41
45
  if (patch instanceof ItemsPatchExhaustive) {
42
- return Object.assign(Object.assign({ 'exhaustiveItems': (0, object_1.fromEntries)(patch.items.entries()) }, serializeRekeyingMap(patch.rekeyingMap)), serializeErrors(patch.errors));
46
+ return Object.assign(Object.assign(Object.assign({ 'exhaustiveItems': (0, object_1.fromEntries)(patch.items.entries()) }, serializeRekeyingMap(patch.rekeyingMap)), serializeFieldNamesChanged(patch.fieldNamesChanged)), serializeErrors(patch.errors));
43
47
  }
44
48
  else {
45
49
  return Object.assign({ 'items': (0, object_1.fromEntries)(patch.items.entries()), 'itemsDeleted': (_a = patch.itemsDeleted) !== null && _a !== void 0 ? _a : [] }, serializeErrors(patch.errors));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.282",
3
+ "version": "0.0.285",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",