lucid-extension-sdk 0.0.302 → 0.0.305

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.
@@ -14,6 +14,7 @@ export declare const isSerializedDataSourceProperties: (subject: unknown) => sub
14
14
  SourceType: (x: unknown) => x is import("./datasourcetype").DataSourceType;
15
15
  UpdateType: (x: unknown) => x is import("./upstreamupdatetype").UpstreamUpdateType;
16
16
  PatchType: (x: unknown) => x is import("./upstreampatchtype").UpstreamPatchType | null | undefined;
17
+ IsSyncingPaused: (x: unknown) => x is true | undefined;
17
18
  SourceConfig: typeof import("../../checks").isObject;
18
19
  }> | null | undefined;
19
20
  SourceForeignKeys: (x: unknown) => x is import("../../guards").DestructureGuardedTypeObj<{
@@ -53,6 +53,7 @@ export declare const isSerializedImportedDataSource: (subject: unknown) => subje
53
53
  SourceType: (x: unknown) => x is import("./datasourcetype").DataSourceType;
54
54
  UpdateType: (x: unknown) => x is import("./upstreamupdatetype").UpstreamUpdateType;
55
55
  PatchType: (x: unknown) => x is import("./upstreampatchtype").UpstreamPatchType | null | undefined;
56
+ IsSyncingPaused: (x: unknown) => x is true | undefined;
56
57
  SourceConfig: typeof isObject;
57
58
  }> | null | undefined;
58
59
  SourceForeignKeys: (x: unknown) => x is import("../../guards").DestructureGuardedTypeObj<{
@@ -89,6 +90,7 @@ export declare const isSerializedPreviewData: (subject: unknown) => subject is i
89
90
  SourceType: (x: unknown) => x is import("./datasourcetype").DataSourceType;
90
91
  UpdateType: (x: unknown) => x is import("./upstreamupdatetype").UpstreamUpdateType;
91
92
  PatchType: (x: unknown) => x is import("./upstreampatchtype").UpstreamPatchType | null | undefined;
93
+ IsSyncingPaused: (x: unknown) => x is true | undefined;
92
94
  SourceConfig: typeof isObject;
93
95
  }> | null | undefined;
94
96
  SourceForeignKeys: (x: unknown) => x is import("../../guards").DestructureGuardedTypeObj<{
@@ -1,16 +1,17 @@
1
1
  import { isString } from '../../checks';
2
2
  import { SemanticRelationships } from './semanticrelationships';
3
- export declare enum Direction {
4
- Inward = "inward",
5
- Outward = "outward"
6
- }
7
- export type DirectionType = Direction | null | undefined;
8
3
  export type SerializedSourceForeignKey = {
9
4
  'Id': string;
10
5
  'SourceFields': string[];
11
6
  'RelationshipType': SemanticRelationships | string;
12
7
  'Represents'?: string | null | undefined;
13
- 'Direction'?: DirectionType;
8
+ 'OutwardLabel'?: string | undefined;
9
+ 'InwardLabel'?: string | undefined;
10
+ /**
11
+ * This exists to handle the rare situation when there are fields on the target item that reference the source item.
12
+ * Please reach out to #dev-data-platform before setting this to a defined value.
13
+ */
14
+ 'TargetFields'?: string[] | undefined;
14
15
  };
15
16
  export declare const isSerializedSourceForeignKey: (subject: unknown) => subject is import("../../guards").DestructureGuardedTypeObj<{
16
17
  Id: typeof isString;
@@ -1,13 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSerializedSourceForeignKey = exports.Direction = void 0;
3
+ exports.isSerializedSourceForeignKey = void 0;
4
4
  const checks_1 = require("../../checks");
5
5
  const validators_1 = require("../../validators/validators");
6
- var Direction;
7
- (function (Direction) {
8
- Direction["Inward"] = "inward";
9
- Direction["Outward"] = "outward";
10
- })(Direction || (exports.Direction = Direction = {}));
11
6
  exports.isSerializedSourceForeignKey = (0, validators_1.objectValidator)({
12
7
  'Id': checks_1.isString,
13
8
  'SourceFields': (0, validators_1.arrayValidator)(checks_1.isString),
@@ -7,6 +7,7 @@ export interface SerializedUpstreamConfig {
7
7
  'SourceType': DataSourceType;
8
8
  'UpdateType': UpstreamUpdateType;
9
9
  'PatchType'?: UpstreamPatchType | null | undefined;
10
+ 'IsSyncingPaused'?: true | undefined;
10
11
  'SourceConfig': {
11
12
  [index: string]: any;
12
13
  };
@@ -16,5 +17,6 @@ export declare const isSerializedUpstreamConfig: (subject: unknown) => subject i
16
17
  SourceType: (x: unknown) => x is DataSourceType;
17
18
  UpdateType: (x: unknown) => x is UpstreamUpdateType;
18
19
  PatchType: (x: unknown) => x is UpstreamPatchType | null | undefined;
20
+ IsSyncingPaused: (x: unknown) => x is true | undefined;
19
21
  SourceConfig: typeof isObject;
20
22
  }>;
@@ -11,5 +11,6 @@ exports.isSerializedUpstreamConfig = (0, validators_1.strictObjectValidator)({
11
11
  'SourceType': (0, validators_1.enumValidator)(datasourcetype_1.DataSourceType),
12
12
  'UpdateType': (0, validators_1.enumValidator)(upstreamupdatetype_1.UpstreamUpdateType),
13
13
  'PatchType': (0, validators_1.nullableOption)((0, validators_1.enumValidator)(upstreampatchtype_1.UpstreamPatchType)),
14
+ 'IsSyncingPaused': (0, validators_1.option)((0, checks_1.isLiteral)(true)),
14
15
  'SourceConfig': checks_1.isObject,
15
16
  });
@@ -1,11 +1,17 @@
1
1
  import { SemanticRelationships } from './semanticrelationships';
2
- import { DirectionType, SerializedSourceForeignKey } from './serializedsourceforeignkey';
2
+ import { SerializedSourceForeignKey } from './serializedsourceforeignkey';
3
3
  export type SourceForeignKey = {
4
4
  'id': string;
5
5
  'sourceFields': string[];
6
6
  'relationshipType': SemanticRelationships | string;
7
7
  'represents'?: string | undefined;
8
- 'direction'?: DirectionType;
8
+ 'outwardLabel'?: string;
9
+ 'inwardLabel'?: string;
10
+ /**
11
+ * This exists to handle the rare situation when there are fields on the target item that reference the source item.
12
+ * Please reach out to #dev-data-platform before setting this to a defined value.
13
+ */
14
+ 'targetFields'?: string[] | undefined;
9
15
  };
10
16
  export declare function serializeSourceForeignKey(foreignKey: SourceForeignKey): SerializedSourceForeignKey;
11
17
  export declare function deserializeSourceForeignKey(foreignKey: SerializedSourceForeignKey): SourceForeignKey;
@@ -7,7 +7,9 @@ function serializeSourceForeignKey(foreignKey) {
7
7
  'SourceFields': foreignKey.sourceFields,
8
8
  'RelationshipType': foreignKey.relationshipType,
9
9
  'Represents': foreignKey.represents,
10
- 'Direction': foreignKey.direction,
10
+ 'OutwardLabel': foreignKey.outwardLabel,
11
+ 'InwardLabel': foreignKey.inwardLabel,
12
+ 'TargetFields': foreignKey.targetFields,
11
13
  };
12
14
  }
13
15
  exports.serializeSourceForeignKey = serializeSourceForeignKey;
@@ -17,7 +19,9 @@ function deserializeSourceForeignKey(foreignKey) {
17
19
  'sourceFields': foreignKey['SourceFields'],
18
20
  'relationshipType': foreignKey['RelationshipType'],
19
21
  'represents': foreignKey['Represents'] === null ? undefined : foreignKey['Represents'],
20
- 'direction': foreignKey['Direction'],
22
+ 'outwardLabel': foreignKey['OutwardLabel'] === null ? undefined : foreignKey['OutwardLabel'],
23
+ 'inwardLabel': foreignKey['InwardLabel'] === null ? undefined : foreignKey['InwardLabel'],
24
+ 'targetFields': foreignKey['TargetFields'] === null ? undefined : foreignKey['TargetFields'],
21
25
  };
22
26
  }
23
27
  exports.deserializeSourceForeignKey = deserializeSourceForeignKey;
@@ -7,6 +7,7 @@ export interface UpstreamConfig {
7
7
  dataSourceType: DataSourceType;
8
8
  updateType: UpstreamUpdateType;
9
9
  patchType?: UpstreamPatchType | undefined;
10
+ isSyncingPaused?: true;
10
11
  sourceConfig: {
11
12
  [index: string]: any;
12
13
  };
@@ -7,17 +7,13 @@ function serializeUpstreamConfig(config) {
7
7
  'SourceType': config.dataSourceType,
8
8
  'UpdateType': config.updateType,
9
9
  'PatchType': config.patchType,
10
+ 'IsSyncingPaused': config.isSyncingPaused,
10
11
  'SourceConfig': config.sourceConfig,
11
12
  };
12
13
  }
13
14
  exports.serializeUpstreamConfig = serializeUpstreamConfig;
14
15
  function deserializeUpstreamConfig(config) {
15
- return {
16
- dataSourceType: config['SourceType'],
17
- updateType: config['UpdateType'],
18
- patchType: config['PatchType'] === null ? undefined : config['PatchType'],
19
- sourceConfig: config['SourceConfig'],
20
- };
16
+ return Object.assign(Object.assign({ dataSourceType: config['SourceType'], updateType: config['UpdateType'], patchType: config['PatchType'] === null ? undefined : config['PatchType'] }, (config['IsSyncingPaused'] && { isSyncingPaused: true })), { sourceConfig: config['SourceConfig'] });
21
17
  }
22
18
  exports.deserializeUpstreamConfig = deserializeUpstreamConfig;
23
19
  function isSerializedSourceConfig(x) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "0.0.302",
3
+ "version": "0.0.305",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",