lucid-extension-sdk 0.0.115 → 0.0.117
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/package.json +1 -1
- package/sdk/commandtypes.d.ts +2 -0
- package/sdk/core/cardintegration/cardintegrationdefinitions.d.ts +5 -0
- package/sdk/core/cardintegration/cardintegrationdefinitions.js +3 -0
- package/sdk/core/cardintegration/lucidcardintegration.d.ts +13 -0
- package/sdk/core/cardintegration/lucidcardintegrationregistry.js +3 -0
- package/sdk/core/data/datasource/serializedimporteddatasource.d.ts +26 -0
- package/sdk/index.d.ts +1 -1
- package/sdk/index.js +1 -1
- package/sdk/core/data/datasource/importedtempdatasource.d.ts +0 -24
- /package/sdk/core/data/datasource/{importedtempdatasource.js → serializedimporteddatasource.js} +0 -0
package/package.json
CHANGED
package/sdk/commandtypes.d.ts
CHANGED
|
@@ -491,6 +491,8 @@ export declare type AddCardIntegrationQuery = {
|
|
|
491
491
|
'gf': string;
|
|
492
492
|
/** Callback to handle a change in the fields the user want to be displayed */
|
|
493
493
|
'osfc'?: string | undefined;
|
|
494
|
+
/** Field name -> callback name tuples for searching for legal field values in an enum */
|
|
495
|
+
'fvsc'?: [string, string][] | undefined;
|
|
494
496
|
};
|
|
495
497
|
/** Show intro if user has not yet authorized this integration */
|
|
496
498
|
'i'?: string | undefined;
|
|
@@ -7,6 +7,7 @@ import { isSerializedFieldType, SerializedFieldType } from '../data/serializedfi
|
|
|
7
7
|
export interface ExtensionCardFieldOption {
|
|
8
8
|
label: string;
|
|
9
9
|
value: SerializedFieldType;
|
|
10
|
+
iconUrl?: string;
|
|
10
11
|
}
|
|
11
12
|
export interface ExtensionCardFieldDefinition extends FieldDefinition {
|
|
12
13
|
/** The label to display in the UI */
|
|
@@ -33,6 +34,7 @@ export interface ExtensionCardFieldDefinition extends FieldDefinition {
|
|
|
33
34
|
export declare type SerializedCardFieldOption = {
|
|
34
35
|
'l': string;
|
|
35
36
|
'v'?: SerializedFieldType;
|
|
37
|
+
'i'?: string | undefined;
|
|
36
38
|
};
|
|
37
39
|
/** @ignore */
|
|
38
40
|
export declare function serializeCardFieldOption(option: ExtensionCardFieldOption): SerializedCardFieldOption;
|
|
@@ -53,10 +55,12 @@ export declare function deserializeFieldOption(option: SerializedCardFieldOption
|
|
|
53
55
|
export declare const isSerializedFieldOption: (subject: unknown) => subject is import("../guards").DestructureGuardedTypeObj<{
|
|
54
56
|
l: typeof isString;
|
|
55
57
|
v: typeof isSerializedFieldType;
|
|
58
|
+
i: (x: unknown) => x is string | undefined;
|
|
56
59
|
}>;
|
|
57
60
|
export declare const isSerializedFieldOptions: (p1: unknown) => p1 is import("../guards").DestructureGuardedTypeObj<{
|
|
58
61
|
l: typeof isString;
|
|
59
62
|
v: typeof isSerializedFieldType;
|
|
63
|
+
i: (x: unknown) => x is string | undefined;
|
|
60
64
|
}>[];
|
|
61
65
|
export declare const isSerializedFieldConstraint: (subject: unknown) => subject is import("../guards").DestructureGuardedTypeObj<{
|
|
62
66
|
Type: (x: unknown) => x is FieldConstraintType;
|
|
@@ -76,6 +80,7 @@ export declare const isSerializedExtensionCardFieldDefinition: (subject: unknown
|
|
|
76
80
|
op: (x: unknown) => x is string | import("../guards").DestructureGuardedTypeObj<{
|
|
77
81
|
l: typeof isString;
|
|
78
82
|
v: typeof isSerializedFieldType;
|
|
83
|
+
i: (x: unknown) => x is string | undefined;
|
|
79
84
|
}>[] | undefined;
|
|
80
85
|
s: (x: unknown) => x is string | undefined;
|
|
81
86
|
}>;
|
|
@@ -12,6 +12,7 @@ function serializeCardFieldOption(option) {
|
|
|
12
12
|
return {
|
|
13
13
|
'l': option.label,
|
|
14
14
|
'v': option.value,
|
|
15
|
+
'i': option.iconUrl,
|
|
15
16
|
};
|
|
16
17
|
}
|
|
17
18
|
exports.serializeCardFieldOption = serializeCardFieldOption;
|
|
@@ -31,12 +32,14 @@ function deserializeFieldOption(option) {
|
|
|
31
32
|
return {
|
|
32
33
|
label: option['l'],
|
|
33
34
|
value: option['v'],
|
|
35
|
+
iconUrl: option['i'],
|
|
34
36
|
};
|
|
35
37
|
}
|
|
36
38
|
exports.deserializeFieldOption = deserializeFieldOption;
|
|
37
39
|
exports.isSerializedFieldOption = (0, validators_1.objectValidator)({
|
|
38
40
|
'l': checks_1.isString,
|
|
39
41
|
'v': serializedfields_1.isSerializedFieldType,
|
|
42
|
+
'i': (0, validators_1.option)(checks_1.isString),
|
|
40
43
|
});
|
|
41
44
|
exports.isSerializedFieldOptions = (0, validators_1.arrayValidator)(exports.isSerializedFieldOption);
|
|
42
45
|
exports.isSerializedFieldConstraint = (0, validators_1.objectValidator)({
|
|
@@ -39,6 +39,19 @@ export declare abstract class LucidCardIntegration {
|
|
|
39
39
|
* If this callback is not provided then the user will not be shown the modal to configure fields.
|
|
40
40
|
*/
|
|
41
41
|
onSelectedFieldsChange?: (dataSource: DataSourceProxy, selectedFields: string[]) => Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Specify callbacks for searching for legal values for the given fields.
|
|
44
|
+
*
|
|
45
|
+
* For example, a Task collection may have an Assignee field that references a User collection,
|
|
46
|
+
* but you don't import all the users in the entire source data set. Here, you can provide a way
|
|
47
|
+
* to search for legal values for the Assignee field, similar to the `ExtensionCardFieldDefinition.search`
|
|
48
|
+
* functionality.
|
|
49
|
+
*
|
|
50
|
+
* Register a search callback using LucidCardIntegrationRegistry.registerFieldSearchCallback, then set
|
|
51
|
+
* the returned string as a value in this Map. The `inputSoFar` parameter passed to the callback will
|
|
52
|
+
* be all the current field values on the item being edited.
|
|
53
|
+
*/
|
|
54
|
+
fieldValueSearchCallbacks?: Map<string, string>;
|
|
42
55
|
};
|
|
43
56
|
/**
|
|
44
57
|
* If specified, and the user hasn't yet authorized the data connector for this extension,
|
|
@@ -63,6 +63,9 @@ class LucidCardIntegrationRegistry {
|
|
|
63
63
|
'fc': {
|
|
64
64
|
'gf': getFieldsActionName,
|
|
65
65
|
'osfc': onSelectedFieldsChangeActionName,
|
|
66
|
+
'fvsc': cardIntegration.fieldConfiguration.fieldValueSearchCallbacks
|
|
67
|
+
? [...cardIntegration.fieldConfiguration.fieldValueSearchCallbacks.entries()]
|
|
68
|
+
: undefined,
|
|
66
69
|
},
|
|
67
70
|
'gdc': getDefaultConfigActionName,
|
|
68
71
|
'i': showIntroActionName,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SerializedDataItems } from '../serializedfield/serializeddataitems';
|
|
2
|
+
import { SerializedSchema } from '../serializedfield/serializedschema';
|
|
3
|
+
import { SerializedDataSourceProperties } from './serializeddatasourceproperties';
|
|
4
|
+
/** @ignore until spreadsheet integration is ready for launch */
|
|
5
|
+
export interface SerializedImportedMetadataCollection {
|
|
6
|
+
'Name': string;
|
|
7
|
+
'Schema': SerializedSchema;
|
|
8
|
+
'Items': SerializedDataItems;
|
|
9
|
+
}
|
|
10
|
+
/** @ignore until spreadsheet integration is ready for launch */
|
|
11
|
+
export interface SerializedImportedCollection {
|
|
12
|
+
'Name': string;
|
|
13
|
+
'Schema': SerializedSchema;
|
|
14
|
+
'Items': SerializedDataItems;
|
|
15
|
+
'UpstreamConfig': {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
'Metadata': {
|
|
19
|
+
[key: string]: SerializedImportedMetadataCollection;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** @ignore until spreadsheet integration is ready for launch */
|
|
23
|
+
export interface SerializedImportedDataSource {
|
|
24
|
+
'Properties': SerializedDataSourceProperties;
|
|
25
|
+
'Collections': SerializedImportedCollection[];
|
|
26
|
+
}
|
package/sdk/index.d.ts
CHANGED
|
@@ -7,9 +7,9 @@ export * from './core/cardintegration/lucidcardintegration';
|
|
|
7
7
|
export * from './core/cardintegration/lucidcardintegrationregistry';
|
|
8
8
|
export * from './core/checks';
|
|
9
9
|
export * from './core/data/datasource/datasourcetype';
|
|
10
|
-
export * from './core/data/datasource/importedtempdatasource';
|
|
11
10
|
export * from './core/data/datasource/metadatatypes';
|
|
12
11
|
export * from './core/data/datasource/serializeddatasourceproperties';
|
|
12
|
+
export * from './core/data/datasource/serializedimporteddatasource';
|
|
13
13
|
export * from './core/data/datasource/serializedupstreamconfig';
|
|
14
14
|
export * from './core/data/datasource/upstreampatchtype';
|
|
15
15
|
export * from './core/data/datasource/upstreamupdatetype';
|
package/sdk/index.js
CHANGED
|
@@ -23,9 +23,9 @@ __exportStar(require("./core/cardintegration/lucidcardintegration"), exports);
|
|
|
23
23
|
__exportStar(require("./core/cardintegration/lucidcardintegrationregistry"), exports);
|
|
24
24
|
__exportStar(require("./core/checks"), exports);
|
|
25
25
|
__exportStar(require("./core/data/datasource/datasourcetype"), exports);
|
|
26
|
-
__exportStar(require("./core/data/datasource/importedtempdatasource"), exports);
|
|
27
26
|
__exportStar(require("./core/data/datasource/metadatatypes"), exports);
|
|
28
27
|
__exportStar(require("./core/data/datasource/serializeddatasourceproperties"), exports);
|
|
28
|
+
__exportStar(require("./core/data/datasource/serializedimporteddatasource"), exports);
|
|
29
29
|
__exportStar(require("./core/data/datasource/serializedupstreamconfig"), exports);
|
|
30
30
|
__exportStar(require("./core/data/datasource/upstreampatchtype"), exports);
|
|
31
31
|
__exportStar(require("./core/data/datasource/upstreamupdatetype"), exports);
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { SerializedDataItems } from '../serializedfield/serializeddataitems';
|
|
2
|
-
import { SerializedSchema } from '../serializedfield/serializedschema';
|
|
3
|
-
import { SerializedDataSourceProperties } from './serializeddatasourceproperties';
|
|
4
|
-
/** @ignore until spreadsheet integration is ready for launch */
|
|
5
|
-
export interface ImportedTempMetadataCollection {
|
|
6
|
-
name: string;
|
|
7
|
-
schema: SerializedSchema;
|
|
8
|
-
items: SerializedDataItems;
|
|
9
|
-
}
|
|
10
|
-
/** @ignore until spreadsheet integration is ready for launch */
|
|
11
|
-
export interface ImportedTempCollection {
|
|
12
|
-
name: string;
|
|
13
|
-
schema: SerializedSchema;
|
|
14
|
-
items: SerializedDataItems;
|
|
15
|
-
upstreamConfig: {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
};
|
|
18
|
-
metadata: Map<string, ImportedTempMetadataCollection>;
|
|
19
|
-
}
|
|
20
|
-
/** @ignore until spreadsheet integration is ready for launch */
|
|
21
|
-
export interface ImportedTempDataSource {
|
|
22
|
-
properties: SerializedDataSourceProperties;
|
|
23
|
-
collections: Map<string, ImportedTempCollection>;
|
|
24
|
-
}
|
/package/sdk/core/data/datasource/{importedtempdatasource.js → serializedimporteddatasource.js}
RENAMED
|
File without changes
|