lucid-extension-sdk 0.0.302 → 0.0.303
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,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
|
-
'
|
|
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 =
|
|
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),
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { SemanticRelationships } from './semanticrelationships';
|
|
2
|
-
import {
|
|
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
|
-
'
|
|
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
|
-
'
|
|
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
|
-
'
|
|
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;
|