lucid-extension-sdk 0.0.368 → 0.0.369
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 +20 -0
- package/core/cardintegration/cardfielddisplaysettings.d.ts +53 -22
- package/core/cardintegration/cardfielddisplaysettings.js +36 -1
- package/core/cardintegration/cardintegrationconfig.d.ts +52 -0
- package/core/cardintegration/cardintegrationconfig.js +13 -1
- package/editorclient.d.ts +18 -0
- package/editorclient.js +25 -0
- package/package.json +1 -1
package/commandtypes.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SerializedCardIntegrationConfig } from './core/cardintegration/cardintegrationconfig';
|
|
1
2
|
import { SerializedFieldTypeDefinition } from './core/data/fieldtypedefinition/fieldtypedefinition';
|
|
2
3
|
import { SerializedReferenceKeyType } from './core/data/referencekeys/serializedreferencekey';
|
|
3
4
|
import { SerializedFieldType } from './core/data/serializedfield/serializedfields';
|
|
@@ -71,6 +72,7 @@ export declare const enum CommandName {
|
|
|
71
72
|
ExecuteFormula = "ef",
|
|
72
73
|
FindAvailableSpace = "fas",
|
|
73
74
|
FireBeaconEvent = "fbe",
|
|
75
|
+
GetCardIntegrationConfig = "gcic",
|
|
74
76
|
GetConnectedLines = "gcl",
|
|
75
77
|
GetCurrentPage = "gcp",
|
|
76
78
|
GetCustomShape = "gcs",
|
|
@@ -155,6 +157,7 @@ export declare const enum CommandName {
|
|
|
155
157
|
UnhookDeleteItems = "udi",
|
|
156
158
|
UnhookSelection = "us",
|
|
157
159
|
UnhookTextEdit = "ute",
|
|
160
|
+
UpdateCardIntegrationConfig = "ucic",
|
|
158
161
|
WithMutex = "wm",
|
|
159
162
|
WithSilentActions = "wsa",
|
|
160
163
|
ZOrder = "z"
|
|
@@ -353,6 +356,10 @@ export type CommandArgs = {
|
|
|
353
356
|
query: FireBeaconEventQuery;
|
|
354
357
|
result: FireBeaconEventResult;
|
|
355
358
|
};
|
|
359
|
+
[CommandName.GetCardIntegrationConfig]: {
|
|
360
|
+
query: GetCardIntegrationConfigQuery;
|
|
361
|
+
result: GetCardIntegrationConfigResult;
|
|
362
|
+
};
|
|
356
363
|
[CommandName.GetConnectedLines]: {
|
|
357
364
|
query: GetConnectedLinesQuery;
|
|
358
365
|
result: GetConnectedLinesResult;
|
|
@@ -689,6 +696,10 @@ export type CommandArgs = {
|
|
|
689
696
|
query: UnhookTextEditQuery;
|
|
690
697
|
result: UnhookTextEditResult;
|
|
691
698
|
};
|
|
699
|
+
[CommandName.UpdateCardIntegrationConfig]: {
|
|
700
|
+
query: UpdateCardIntegrationConfigQuery;
|
|
701
|
+
result: UpdateCardIntegrationConfigResult;
|
|
702
|
+
};
|
|
692
703
|
[CommandName.WithMutex]: {
|
|
693
704
|
query: WithMutexQuery;
|
|
694
705
|
result: WithMutexResult;
|
|
@@ -1300,6 +1311,8 @@ export type GetEnvironmentConfigQuery = string;
|
|
|
1300
1311
|
export type GetEnvironmentConfigResult = JsonSerializable;
|
|
1301
1312
|
export type GetConnectedLinesQuery = string;
|
|
1302
1313
|
export type GetConnectedLinesResult = string[];
|
|
1314
|
+
export type GetCardIntegrationConfigQuery = string;
|
|
1315
|
+
export type GetCardIntegrationConfigResult = SerializedCardIntegrationConfig | undefined;
|
|
1303
1316
|
export type GetCurrentPageQuery = void;
|
|
1304
1317
|
export type GetCurrentPageResult = string | undefined;
|
|
1305
1318
|
export type GetCustomShapeQuery = {
|
|
@@ -1907,6 +1920,13 @@ export type UnhookTextEditQuery = {
|
|
|
1907
1920
|
'n': string;
|
|
1908
1921
|
};
|
|
1909
1922
|
export type UnhookTextEditResult = undefined;
|
|
1923
|
+
export type UpdateCardIntegrationConfigQuery = {
|
|
1924
|
+
/** The data source ID whose config should be updated */
|
|
1925
|
+
'd': string;
|
|
1926
|
+
/** The serialized card integration config that should be inserted for the given data source ID */
|
|
1927
|
+
'c': SerializedCardIntegrationConfig;
|
|
1928
|
+
};
|
|
1929
|
+
export type UpdateCardIntegrationConfigResult = void;
|
|
1910
1930
|
export type WithMutexQuery = {
|
|
1911
1931
|
/** Name of the intra-document mutex to hold for the duration of this action */
|
|
1912
1932
|
'n': string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isNumber } from '../checks';
|
|
1
2
|
import { HorizontalBadgePos, VerticalBadgePos } from '../properties/datagraphic/badgeposition';
|
|
2
3
|
/**
|
|
3
4
|
* When configuring a field on a LucidCardBlock to be displayed as a data graphic, one of these values specifies
|
|
@@ -67,17 +68,17 @@ export type ImageBadgeSettings = {
|
|
|
67
68
|
width: number;
|
|
68
69
|
};
|
|
69
70
|
export type TextBadgeSettings = {
|
|
70
|
-
bold?: boolean;
|
|
71
|
-
italic?: boolean;
|
|
72
|
-
underline?: boolean;
|
|
73
|
-
rounding?: number;
|
|
74
|
-
minwidth?: number;
|
|
75
|
-
minheight?: number;
|
|
76
|
-
maxfontsize?: number;
|
|
77
|
-
maxtextwidth?: number;
|
|
78
|
-
iswithinpill?: boolean;
|
|
79
|
-
usingcarduirefresh?: boolean;
|
|
80
|
-
hasleadingicon?: boolean;
|
|
71
|
+
bold?: boolean | undefined;
|
|
72
|
+
italic?: boolean | undefined;
|
|
73
|
+
underline?: boolean | undefined;
|
|
74
|
+
rounding?: number | undefined;
|
|
75
|
+
minwidth?: number | undefined;
|
|
76
|
+
minheight?: number | undefined;
|
|
77
|
+
maxfontsize?: number | undefined;
|
|
78
|
+
maxtextwidth?: number | undefined;
|
|
79
|
+
iswithinpill?: boolean | undefined;
|
|
80
|
+
usingcarduirefresh?: boolean | undefined;
|
|
81
|
+
hasleadingicon?: boolean | undefined;
|
|
81
82
|
};
|
|
82
83
|
export interface StencilConfig {
|
|
83
84
|
/**
|
|
@@ -159,18 +160,48 @@ export type SerializedLucidCardFieldDisplaySettings = {
|
|
|
159
160
|
'StencilConfig'?: {
|
|
160
161
|
/** Since renamed to displayType, but we can't change the serialized name */
|
|
161
162
|
'getterKey': FieldDisplayType;
|
|
162
|
-
'fg'?: string;
|
|
163
|
-
'bg'?: string;
|
|
164
|
-
'f'?: string;
|
|
165
|
-
't'?: string;
|
|
166
|
-
'l'?: string;
|
|
167
|
-
'h'?: HorizontalBadgePos;
|
|
168
|
-
'v'?: VerticalBadgePos;
|
|
169
|
-
'onClickHandlerKey'?: OnClickHandlerKeys;
|
|
170
|
-
'imageBadgeSettings'?: ImageBadgeSettings;
|
|
171
|
-
'textBadgeSettings'?: TextBadgeSettings;
|
|
172
|
-
};
|
|
163
|
+
'fg'?: string | undefined;
|
|
164
|
+
'bg'?: string | undefined;
|
|
165
|
+
'f'?: string | undefined;
|
|
166
|
+
't'?: string | undefined;
|
|
167
|
+
'l'?: string | undefined;
|
|
168
|
+
'h'?: HorizontalBadgePos | undefined;
|
|
169
|
+
'v'?: VerticalBadgePos | undefined;
|
|
170
|
+
'onClickHandlerKey'?: OnClickHandlerKeys | undefined;
|
|
171
|
+
'imageBadgeSettings'?: ImageBadgeSettings | undefined;
|
|
172
|
+
'textBadgeSettings'?: TextBadgeSettings | undefined;
|
|
173
|
+
} | undefined;
|
|
173
174
|
};
|
|
175
|
+
export declare const isSerializedLucidCardFieldSettings: (subject: unknown) => subject is import("../guards").DestructureGuardedTypeObj<{
|
|
176
|
+
StencilConfig: (x: unknown) => x is import("../guards").DestructureGuardedTypeObj<{
|
|
177
|
+
getterKey: (x: unknown) => x is FieldDisplayType;
|
|
178
|
+
fg: (x: unknown) => x is string | undefined;
|
|
179
|
+
bg: (x: unknown) => x is string | undefined;
|
|
180
|
+
f: (x: unknown) => x is string | undefined;
|
|
181
|
+
t: (x: unknown) => x is string | undefined;
|
|
182
|
+
l: (x: unknown) => x is string | undefined;
|
|
183
|
+
h: (x: unknown) => x is HorizontalBadgePos | undefined;
|
|
184
|
+
v: (x: unknown) => x is VerticalBadgePos | undefined;
|
|
185
|
+
onClickHandlerKey: (x: unknown) => x is OnClickHandlerKeys | undefined;
|
|
186
|
+
imageBadgeSettings: (x: unknown) => x is import("../guards").DestructureGuardedTypeObj<{
|
|
187
|
+
height: typeof isNumber;
|
|
188
|
+
width: typeof isNumber;
|
|
189
|
+
}> | undefined;
|
|
190
|
+
textBadgeSettings: (x: unknown) => x is import("../guards").DestructureGuardedTypeObj<{
|
|
191
|
+
bold: (x: unknown) => x is boolean | undefined;
|
|
192
|
+
italic: (x: unknown) => x is boolean | undefined;
|
|
193
|
+
underline: (x: unknown) => x is boolean | undefined;
|
|
194
|
+
rounding: (x: unknown) => x is number | undefined;
|
|
195
|
+
minwidth: (x: unknown) => x is number | undefined;
|
|
196
|
+
minheight: (x: unknown) => x is number | undefined;
|
|
197
|
+
maxfontsize: (x: unknown) => x is number | undefined;
|
|
198
|
+
maxtextwidth: (x: unknown) => x is number | undefined;
|
|
199
|
+
iswithinpill: (x: unknown) => x is boolean | undefined;
|
|
200
|
+
usingcarduirefresh: (x: unknown) => x is boolean | undefined;
|
|
201
|
+
hasleadingicon: (x: unknown) => x is boolean | undefined;
|
|
202
|
+
}> | undefined;
|
|
203
|
+
}> | undefined;
|
|
204
|
+
}>;
|
|
174
205
|
/** @ignore */
|
|
175
206
|
export declare function serializeLucidCardFieldDisplaySettings(settings: LucidCardFieldDisplaySettings): SerializedLucidCardFieldDisplaySettings;
|
|
176
207
|
/** @ignore */
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LucidCardFields = exports.StatusValues = exports.deserializeLucidCardFieldDisplaySettings = exports.serializeLucidCardFieldDisplaySettings = exports.isOnClickHandlerKey = exports.OnClickHandlerKeys = exports.isFieldDisplayType = exports.FieldDisplayType = void 0;
|
|
3
|
+
exports.LucidCardFields = exports.StatusValues = exports.deserializeLucidCardFieldDisplaySettings = exports.serializeLucidCardFieldDisplaySettings = exports.isSerializedLucidCardFieldSettings = exports.isOnClickHandlerKey = exports.OnClickHandlerKeys = exports.isFieldDisplayType = exports.FieldDisplayType = void 0;
|
|
4
|
+
const checks_1 = require("../checks");
|
|
5
|
+
const badgeposition_1 = require("../properties/datagraphic/badgeposition");
|
|
4
6
|
const validators_1 = require("../validators/validators");
|
|
5
7
|
/**
|
|
6
8
|
* When configuring a field on a LucidCardBlock to be displayed as a data graphic, one of these values specifies
|
|
@@ -67,6 +69,39 @@ var OnClickHandlerKeys;
|
|
|
67
69
|
OnClickHandlerKeys["CustomEditAction"] = "CustomEditAction";
|
|
68
70
|
})(OnClickHandlerKeys || (exports.OnClickHandlerKeys = OnClickHandlerKeys = {}));
|
|
69
71
|
exports.isOnClickHandlerKey = (0, validators_1.enumValidator)(OnClickHandlerKeys);
|
|
72
|
+
const isImageBadgeSettings = (0, validators_1.objectValidator)({
|
|
73
|
+
'height': checks_1.isNumber,
|
|
74
|
+
'width': checks_1.isNumber,
|
|
75
|
+
});
|
|
76
|
+
const isTextBadgeSettings = (0, validators_1.objectValidator)({
|
|
77
|
+
'bold': (0, validators_1.option)(checks_1.isBoolean),
|
|
78
|
+
'italic': (0, validators_1.option)(checks_1.isBoolean),
|
|
79
|
+
'underline': (0, validators_1.option)(checks_1.isBoolean),
|
|
80
|
+
'rounding': (0, validators_1.option)(checks_1.isNumber),
|
|
81
|
+
'minwidth': (0, validators_1.option)(checks_1.isNumber),
|
|
82
|
+
'minheight': (0, validators_1.option)(checks_1.isNumber),
|
|
83
|
+
'maxfontsize': (0, validators_1.option)(checks_1.isNumber),
|
|
84
|
+
'maxtextwidth': (0, validators_1.option)(checks_1.isNumber),
|
|
85
|
+
'iswithinpill': (0, validators_1.option)(checks_1.isBoolean),
|
|
86
|
+
'usingcarduirefresh': (0, validators_1.option)(checks_1.isBoolean),
|
|
87
|
+
'hasleadingicon': (0, validators_1.option)(checks_1.isBoolean),
|
|
88
|
+
});
|
|
89
|
+
const isStencilConfig = (0, validators_1.objectValidator)({
|
|
90
|
+
'getterKey': exports.isFieldDisplayType,
|
|
91
|
+
'fg': (0, validators_1.option)(checks_1.isString),
|
|
92
|
+
'bg': (0, validators_1.option)(checks_1.isString),
|
|
93
|
+
'f': (0, validators_1.option)(checks_1.isString),
|
|
94
|
+
't': (0, validators_1.option)(checks_1.isString),
|
|
95
|
+
'l': (0, validators_1.option)(checks_1.isString),
|
|
96
|
+
'h': (0, validators_1.option)((0, validators_1.enumValidator)(badgeposition_1.HorizontalBadgePos)),
|
|
97
|
+
'v': (0, validators_1.option)((0, validators_1.enumValidator)(badgeposition_1.VerticalBadgePos)),
|
|
98
|
+
'onClickHandlerKey': (0, validators_1.option)(exports.isOnClickHandlerKey),
|
|
99
|
+
'imageBadgeSettings': (0, validators_1.option)(isImageBadgeSettings),
|
|
100
|
+
'textBadgeSettings': (0, validators_1.option)(isTextBadgeSettings),
|
|
101
|
+
});
|
|
102
|
+
exports.isSerializedLucidCardFieldSettings = (0, validators_1.objectValidator)({
|
|
103
|
+
'StencilConfig': (0, validators_1.option)(isStencilConfig),
|
|
104
|
+
});
|
|
70
105
|
/** @ignore */
|
|
71
106
|
function serializeLucidCardFieldDisplaySettings(settings) {
|
|
72
107
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { TextStyle } from '../../document/text/textstyle';
|
|
2
|
+
import { isBoolean, isString } from '../checks';
|
|
2
3
|
import { LucidCardFieldDisplaySettings, SerializedLucidCardFieldDisplaySettings } from './cardfielddisplaysettings';
|
|
3
4
|
export interface CardIntegrationConfig {
|
|
4
5
|
cardConfig: {
|
|
@@ -47,6 +48,57 @@ export type SerializedCardIntegrationConfig = {
|
|
|
47
48
|
}[];
|
|
48
49
|
};
|
|
49
50
|
};
|
|
51
|
+
export declare const isSerializedCardIntegrationConfig: (subject: unknown) => subject is import("../guards").DestructureGuardedTypeObj<{
|
|
52
|
+
cc: (subject: unknown) => subject is import("../guards").DestructureGuardedTypeObj<{
|
|
53
|
+
f: (val: unknown) => val is string[];
|
|
54
|
+
fd: (x: unknown) => x is [string, import("../guards").DestructureGuardedTypeObj<{
|
|
55
|
+
StencilConfig: (x: unknown) => x is import("../guards").DestructureGuardedTypeObj<{
|
|
56
|
+
getterKey: (x: unknown) => x is import("./cardfielddisplaysettings").FieldDisplayType;
|
|
57
|
+
fg: (x: unknown) => x is string | undefined;
|
|
58
|
+
bg: (x: unknown) => x is string | undefined;
|
|
59
|
+
f: (x: unknown) => x is string | undefined;
|
|
60
|
+
t: (x: unknown) => x is string | undefined;
|
|
61
|
+
l: (x: unknown) => x is string | undefined;
|
|
62
|
+
h: (x: unknown) => x is import("../..").HorizontalBadgePos | undefined;
|
|
63
|
+
v: (x: unknown) => x is import("../..").VerticalBadgePos | undefined;
|
|
64
|
+
onClickHandlerKey: (x: unknown) => x is import("./cardfielddisplaysettings").OnClickHandlerKeys | undefined;
|
|
65
|
+
imageBadgeSettings: (x: unknown) => x is import("../guards").DestructureGuardedTypeObj<{
|
|
66
|
+
height: typeof import("../checks").isNumber;
|
|
67
|
+
width: typeof import("../checks").isNumber;
|
|
68
|
+
}> | undefined;
|
|
69
|
+
textBadgeSettings: (x: unknown) => x is import("../guards").DestructureGuardedTypeObj<{
|
|
70
|
+
bold: (x: unknown) => x is boolean | undefined;
|
|
71
|
+
italic: (x: unknown) => x is boolean | undefined;
|
|
72
|
+
underline: (x: unknown) => x is boolean | undefined;
|
|
73
|
+
rounding: (x: unknown) => x is number | undefined;
|
|
74
|
+
minwidth: (x: unknown) => x is number | undefined;
|
|
75
|
+
minheight: (x: unknown) => x is number | undefined;
|
|
76
|
+
maxfontsize: (x: unknown) => x is number | undefined;
|
|
77
|
+
maxtextwidth: (x: unknown) => x is number | undefined;
|
|
78
|
+
iswithinpill: (x: unknown) => x is boolean | undefined;
|
|
79
|
+
usingcarduirefresh: (x: unknown) => x is boolean | undefined;
|
|
80
|
+
hasleadingicon: (x: unknown) => x is boolean | undefined;
|
|
81
|
+
}> | undefined;
|
|
82
|
+
}> | undefined;
|
|
83
|
+
}>][] | undefined;
|
|
84
|
+
fs: (x: unknown) => x is [string, Partial<import("../guards").DestructureGuardedTypeObj<{
|
|
85
|
+
font: typeof isString;
|
|
86
|
+
bold: typeof isBoolean;
|
|
87
|
+
italic: typeof isBoolean;
|
|
88
|
+
underline: typeof isBoolean;
|
|
89
|
+
size: typeof import("../checks").isNumber;
|
|
90
|
+
color: typeof isString;
|
|
91
|
+
align: typeof isString;
|
|
92
|
+
}>>][] | undefined;
|
|
93
|
+
id: (x: unknown) => x is string | undefined;
|
|
94
|
+
}>;
|
|
95
|
+
cdpc: (subject: unknown) => subject is import("../guards").DestructureGuardedTypeObj<{
|
|
96
|
+
f: (val: unknown) => val is import("../guards").DestructureGuardedTypeObj<{
|
|
97
|
+
n: typeof isString;
|
|
98
|
+
l: (x: unknown) => x is boolean | undefined;
|
|
99
|
+
}>[];
|
|
100
|
+
}>;
|
|
101
|
+
}>;
|
|
50
102
|
/** @ignore */
|
|
51
103
|
export declare function serializeCardIntegrationConfig(config: CardIntegrationConfig): SerializedCardIntegrationConfig;
|
|
52
104
|
/** @ignore */
|
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deserializeCardIntegrationConfig = exports.serializeCardIntegrationConfig = void 0;
|
|
3
|
+
exports.deserializeCardIntegrationConfig = exports.serializeCardIntegrationConfig = exports.isSerializedCardIntegrationConfig = void 0;
|
|
4
|
+
const textstyle_1 = require("../../document/text/textstyle");
|
|
5
|
+
const checks_1 = require("../checks");
|
|
6
|
+
const validators_1 = require("../validators/validators");
|
|
4
7
|
const cardfielddisplaysettings_1 = require("./cardfielddisplaysettings");
|
|
8
|
+
exports.isSerializedCardIntegrationConfig = (0, validators_1.objectValidator)({
|
|
9
|
+
'cc': (0, validators_1.objectValidator)({
|
|
10
|
+
'f': (0, checks_1.isTypedArray)(checks_1.isString),
|
|
11
|
+
'fd': (0, validators_1.option)((0, checks_1.isTypedArray)((0, checks_1.isPair)(checks_1.isString, cardfielddisplaysettings_1.isSerializedLucidCardFieldSettings))),
|
|
12
|
+
'fs': (0, validators_1.option)((0, checks_1.isTypedArray)((0, checks_1.isPair)(checks_1.isString, textstyle_1.isPartialTextStyle))),
|
|
13
|
+
'id': (0, validators_1.option)(checks_1.isString),
|
|
14
|
+
}),
|
|
15
|
+
'cdpc': (0, validators_1.objectValidator)({ 'f': (0, checks_1.isTypedArray)((0, validators_1.objectValidator)({ 'n': checks_1.isString, 'l': (0, validators_1.option)(checks_1.isBoolean) })) }),
|
|
16
|
+
});
|
|
5
17
|
/** @ignore */
|
|
6
18
|
function serializeCardIntegrationConfig(config) {
|
|
7
19
|
return {
|
package/editorclient.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CommandArgs, CommandName, HashAlgorithmEnum, TriggerAuthFlowResult, UnionToIntersection } from './commandtypes';
|
|
2
|
+
import { CardIntegrationConfig } from './core/cardintegration/cardintegrationconfig';
|
|
2
3
|
import { JsonObject, JsonSerializable } from './core/jsonserializable';
|
|
3
4
|
import { UnfurlCallbacks } from './core/unfurl/unfurlcallbacks';
|
|
4
5
|
import { BinaryXHRResponse, OAuthXHRRequest, TextXHRResponse, XHRRequest, XHRResponse } from './core/xhr';
|
|
@@ -381,6 +382,23 @@ export declare class EditorClient {
|
|
|
381
382
|
* remote API.
|
|
382
383
|
*/
|
|
383
384
|
withSilentActions(callback: () => void): void;
|
|
385
|
+
/**
|
|
386
|
+
* This method fetches the `CardIntegrationConfig` associated with the given data source ID. If you need to change
|
|
387
|
+
* the `CardIntegrationConfig`, you can call this method and mutate the returned object, then return it to the
|
|
388
|
+
* extension API via the `updateCardIntegrationConfig` method. Note that this method has a few best-practices you
|
|
389
|
+
* should be aware of before using it, as detailed in its comment.
|
|
390
|
+
*/
|
|
391
|
+
getCardIntegrationConfig(dataSourceId: string): Promise<import("./commandtypes").GetCardIntegrationConfigResult>;
|
|
392
|
+
/**
|
|
393
|
+
* Update the current `CardIntegrationConfig` associated with the given data source ID with the data from the new
|
|
394
|
+
* one provided. This will not remove fields form the fieldDisplaySetings, only add new ones or update existing
|
|
395
|
+
* ones.
|
|
396
|
+
*
|
|
397
|
+
* You should only call this method in response to a user action from the current session, and should be careful
|
|
398
|
+
* when there are multiple collaborators that you are not repeatedly calling this method for all users. Doing so
|
|
399
|
+
* could lead to undefined or unexpected behavior.
|
|
400
|
+
*/
|
|
401
|
+
updateCardIntegrationConfig(dataSourceId: string, newConfig: CardIntegrationConfig): Promise<void>;
|
|
384
402
|
/**
|
|
385
403
|
* Hash a particular string using the given algorithm.
|
|
386
404
|
*
|
package/editorclient.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EditorClient = exports.getResponseBody = void 0;
|
|
4
4
|
const commandtypes_1 = require("./commandtypes");
|
|
5
5
|
const base64_1 = require("./core/base64");
|
|
6
|
+
const cardintegrationconfig_1 = require("./core/cardintegration/cardintegrationconfig");
|
|
6
7
|
const checks_1 = require("./core/checks");
|
|
7
8
|
const unfurldetails_1 = require("./core/unfurl/unfurldetails");
|
|
8
9
|
const unfurlrefresherrortype_1 = require("./core/unfurl/unfurlrefresherrortype");
|
|
@@ -684,6 +685,30 @@ class EditorClient {
|
|
|
684
685
|
this.deleteAction(action);
|
|
685
686
|
}
|
|
686
687
|
}
|
|
688
|
+
/**
|
|
689
|
+
* This method fetches the `CardIntegrationConfig` associated with the given data source ID. If you need to change
|
|
690
|
+
* the `CardIntegrationConfig`, you can call this method and mutate the returned object, then return it to the
|
|
691
|
+
* extension API via the `updateCardIntegrationConfig` method. Note that this method has a few best-practices you
|
|
692
|
+
* should be aware of before using it, as detailed in its comment.
|
|
693
|
+
*/
|
|
694
|
+
async getCardIntegrationConfig(dataSourceId) {
|
|
695
|
+
return await this.sendCommand("gcic" /* CommandName.GetCardIntegrationConfig */, dataSourceId);
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* Update the current `CardIntegrationConfig` associated with the given data source ID with the data from the new
|
|
699
|
+
* one provided. This will not remove fields form the fieldDisplaySetings, only add new ones or update existing
|
|
700
|
+
* ones.
|
|
701
|
+
*
|
|
702
|
+
* You should only call this method in response to a user action from the current session, and should be careful
|
|
703
|
+
* when there are multiple collaborators that you are not repeatedly calling this method for all users. Doing so
|
|
704
|
+
* could lead to undefined or unexpected behavior.
|
|
705
|
+
*/
|
|
706
|
+
async updateCardIntegrationConfig(dataSourceId, newConfig) {
|
|
707
|
+
return await this.sendCommand("ucic" /* CommandName.UpdateCardIntegrationConfig */, {
|
|
708
|
+
'd': dataSourceId,
|
|
709
|
+
'c': (0, cardintegrationconfig_1.serializeCardIntegrationConfig)(newConfig),
|
|
710
|
+
});
|
|
711
|
+
}
|
|
687
712
|
/**
|
|
688
713
|
* Hash a particular string using the given algorithm.
|
|
689
714
|
*
|