lucid-extension-sdk 1.1.1 → 1.1.2

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.
@@ -63,6 +63,12 @@ export declare const FieldDisplayType: {
63
63
  * Truncates value to be a maximum of 20 chars, appending '...' to the given value.
64
64
  */
65
65
  readonly CustomTextField: "CustomTextField";
66
+ /**
67
+ * @experimental
68
+ * Renders the field value as a small 24x24 rounded-square icon aligned inline with
69
+ * one of the card's text rows. Use `inlineRowIndex` on the stencil config to pick which row.
70
+ */
71
+ readonly InlineIcon: "InlineIcon";
66
72
  };
67
73
  export type FieldDisplayType = (typeof FieldDisplayType)[keyof typeof FieldDisplayType];
68
74
  export declare const isFieldDisplayType: (x: unknown) => x is {} extends {
@@ -123,7 +129,13 @@ export declare const isFieldDisplayType: (x: unknown) => x is {} extends {
123
129
  * Truncates value to be a maximum of 20 chars, appending '...' to the given value.
124
130
  */
125
131
  readonly CustomTextField: "CustomTextField";
126
- } ? never : "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField";
132
+ /**
133
+ * @experimental
134
+ * Renders the field value as a small 24x24 rounded-square icon aligned inline with
135
+ * one of the card's text rows. Use `inlineRowIndex` on the stencil config to pick which row.
136
+ */
137
+ readonly InlineIcon: "InlineIcon";
138
+ } ? never : "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField" | "InlineIcon";
127
139
  /**
128
140
  * When configuring a field on a LucidCardBlock to be displayed as a data graphic, this click handler value
129
141
  * specifies what to do when the user clicks on the data graphic produced.
@@ -225,7 +237,7 @@ declare const StencilConfigFormatter: import("../format/format").Format<import("
225
237
  * The serialized key is `getterKey` for backwards compatible, legacy reasons. We have renamed this field in code,
226
238
  * but need to support the original serialized key.
227
239
  */
228
- readonly displayType: readonly ["getterKey", import("../format/format").Format<"BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField", "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField">];
240
+ readonly displayType: readonly ["getterKey", import("../format/format").Format<"BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField" | "InlineIcon", "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField" | "InlineIcon">];
229
241
  /**
230
242
  * For displayType values that support it, you may provide an override for the
231
243
  * background color for this data. If this is not provided, the background color
@@ -320,8 +332,14 @@ declare const StencilConfigFormatter: import("../format/format").Format<import("
320
332
  readonly iswithinpill?: boolean | null | undefined;
321
333
  readonly hasleadingicon?: boolean | null | undefined;
322
334
  } | null | undefined>];
335
+ /**
336
+ * @experimental
337
+ * For inline stencils, this is the index of the text row that the stencil should render
338
+ * alongside. Ignored for non-inline display types, defaults to 0 (the first text row)
339
+ */
340
+ readonly inlineRowIndex: readonly ["inlineRowIndex", import("../format/format").Format<number | null | undefined, number | null | undefined>];
323
341
  }>, {
324
- readonly displayType: "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField";
342
+ readonly displayType: "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField" | "InlineIcon";
325
343
  readonly backgroundColor?: string | null | undefined;
326
344
  readonly foregroundColor?: string | null | undefined;
327
345
  readonly imageBadgeSettings?: {
@@ -347,6 +365,7 @@ declare const StencilConfigFormatter: import("../format/format").Format<import("
347
365
  readonly iswithinpill?: boolean | null | undefined;
348
366
  readonly hasleadingicon?: boolean | null | undefined;
349
367
  } | null | undefined;
368
+ readonly inlineRowIndex?: number | null | undefined;
350
369
  }>;
351
370
  export type StencilConfig = FormatToDeserializedType<typeof StencilConfigFormatter>;
352
371
  export declare const CardFieldDisplaySettingsFormatter: import("../format/format").Format<import("../format/objectformat").ObjectFormatSerializedType<{
@@ -358,7 +377,7 @@ export declare const CardFieldDisplaySettingsFormatter: import("../format/format
358
377
  * The serialized key is `getterKey` for backwards compatible, legacy reasons. We have renamed this field in code,
359
378
  * but need to support the original serialized key.
360
379
  */
361
- readonly displayType: readonly ["getterKey", import("../format/format").Format<"BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField", "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField">];
380
+ readonly displayType: readonly ["getterKey", import("../format/format").Format<"BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField" | "InlineIcon", "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField" | "InlineIcon">];
362
381
  /**
363
382
  * For displayType values that support it, you may provide an override for the
364
383
  * background color for this data. If this is not provided, the background color
@@ -453,8 +472,14 @@ export declare const CardFieldDisplaySettingsFormatter: import("../format/format
453
472
  readonly iswithinpill?: boolean | null | undefined;
454
473
  readonly hasleadingicon?: boolean | null | undefined;
455
474
  } | null | undefined>];
475
+ /**
476
+ * @experimental
477
+ * For inline stencils, this is the index of the text row that the stencil should render
478
+ * alongside. Ignored for non-inline display types, defaults to 0 (the first text row)
479
+ */
480
+ readonly inlineRowIndex: readonly ["inlineRowIndex", import("../format/format").Format<number | null | undefined, number | null | undefined>];
456
481
  }> | null | undefined, {
457
- readonly displayType: "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField";
482
+ readonly displayType: "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField" | "InlineIcon";
458
483
  readonly backgroundColor?: string | null | undefined;
459
484
  readonly foregroundColor?: string | null | undefined;
460
485
  readonly imageBadgeSettings?: {
@@ -480,10 +505,11 @@ export declare const CardFieldDisplaySettingsFormatter: import("../format/format
480
505
  readonly iswithinpill?: boolean | null | undefined;
481
506
  readonly hasleadingicon?: boolean | null | undefined;
482
507
  } | null | undefined;
508
+ readonly inlineRowIndex?: number | null | undefined;
483
509
  } | null | undefined>];
484
510
  }>, {
485
511
  readonly stencilConfig?: {
486
- readonly displayType: "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField";
512
+ readonly displayType: "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField" | "InlineIcon";
487
513
  readonly backgroundColor?: string | null | undefined;
488
514
  readonly foregroundColor?: string | null | undefined;
489
515
  readonly imageBadgeSettings?: {
@@ -509,6 +535,7 @@ export declare const CardFieldDisplaySettingsFormatter: import("../format/format
509
535
  readonly iswithinpill?: boolean | null | undefined;
510
536
  readonly hasleadingicon?: boolean | null | undefined;
511
537
  } | null | undefined;
538
+ readonly inlineRowIndex?: number | null | undefined;
512
539
  } | null | undefined;
513
540
  }>;
514
541
  /**
@@ -71,6 +71,12 @@ exports.FieldDisplayType = {
71
71
  * Truncates value to be a maximum of 20 chars, appending '...' to the given value.
72
72
  */
73
73
  CustomTextField: 'CustomTextField',
74
+ /**
75
+ * @experimental
76
+ * Renders the field value as a small 24x24 rounded-square icon aligned inline with
77
+ * one of the card's text rows. Use `inlineRowIndex` on the stencil config to pick which row.
78
+ */
79
+ InlineIcon: 'InlineIcon',
74
80
  };
75
81
  exports.isFieldDisplayType = (0, validators_1.enumValidator)(exports.FieldDisplayType);
76
82
  /**
@@ -194,6 +200,12 @@ const StencilConfigFormatter = (0, objectformat_1.ObjectFormat)({
194
200
  * You can change bold, italic, underline, rounding, minwidth, minheight, maxtextwidth, maxfontsize
195
201
  */
196
202
  textBadgeSettings: ['textBadgeSettings', (0, format_1.OptionFormat)(TextBadgeSettingsFormatter)],
203
+ /**
204
+ * @experimental
205
+ * For inline stencils, this is the index of the text row that the stencil should render
206
+ * alongside. Ignored for non-inline display types, defaults to 0 (the first text row)
207
+ */
208
+ inlineRowIndex: ['inlineRowIndex', (0, format_1.OptionFormat)(primitiveformat_1.NumberFormat)],
197
209
  });
198
210
  exports.CardFieldDisplaySettingsFormatter = (0, objectformat_1.ObjectFormat)({
199
211
  stencilConfig: ['StencilConfig', (0, format_1.OptionFormat)(StencilConfigFormatter)],
@@ -1,3 +1,4 @@
1
+ import { isString } from '../checks';
1
2
  import type { SerializedFieldType } from '../data/serializedfield/serializedfields';
2
3
  import type { ExtensionCardFieldDefinition, ImportResult, SearchResult } from '../sharedcardintegration/cardintegrationdefinitions';
3
4
  import type { DocumentPresetSetupFields } from './lucidcardintegrationpresetsetupmodal';
@@ -60,9 +61,13 @@ export interface QueryStringCardIntegrationAutoSyncConfig extends BaseCardIntegr
60
61
  * when advanced search mode is enabled and filters are changed.
61
62
  *
62
63
  * @param filterFields The current filter selections
63
- * @returns The generated query string, or undefined if no query can be generated
64
+ * @returns One of:
65
+ * - A query string to populate the search bar with.
66
+ * - A {@link ConvertFiltersToQueryStringResult} object that can carry either a `queryString`
67
+ * for success, or an `error` message that will be displayed to the user.
68
+ * - `undefined`, equivalent to an empty result.
64
69
  */
65
- convertFiltersToQueryString?: (filterFields: Map<string, SerializedFieldType>) => Promise<string | undefined>;
70
+ convertFiltersToQueryString?: (filterFields: Map<string, SerializedFieldType>) => Promise<string | ConvertFiltersToQueryStringResult | undefined>;
66
71
  /**
67
72
  * Provides the default filter fields to display in the auto-sync UI when advanced search mode is
68
73
  * enabled. These fields seed the filter form so the user can refine the query without having to
@@ -152,3 +157,11 @@ export declare const isSupportedAutoSyncGeneratorType: (x: unknown) => x is {} e
152
157
  readonly DynamicMatrix: "dynamic matrix";
153
158
  readonly Frame: "frame";
154
159
  } ? never : "timeline" | "dynamic matrix" | "frame";
160
+ export interface ConvertFiltersToQueryStringResult {
161
+ queryString?: string | undefined;
162
+ error?: string | undefined;
163
+ }
164
+ export declare const isConvertFiltersToQueryStringResult: (subject: unknown) => subject is Partial<import("../guards").DestructureGuardedTypeObj<{
165
+ queryString: typeof isString;
166
+ error: typeof isString;
167
+ }>>;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSupportedAutoSyncGeneratorType = exports.SupportedAutoSyncGeneratorType = exports.AutoSyncPaginationSize = void 0;
3
+ exports.isConvertFiltersToQueryStringResult = exports.isSupportedAutoSyncGeneratorType = exports.SupportedAutoSyncGeneratorType = exports.AutoSyncPaginationSize = void 0;
4
+ const checks_1 = require("../checks");
4
5
  const validators_1 = require("../validators/validators");
5
6
  /**
6
7
  * The amount of results that will be displayed per page when using pagination. To enable pagination, define the
@@ -14,3 +15,7 @@ exports.SupportedAutoSyncGeneratorType = {
14
15
  Frame: 'frame',
15
16
  };
16
17
  exports.isSupportedAutoSyncGeneratorType = (0, validators_1.stringEnumValidator)(exports.SupportedAutoSyncGeneratorType);
18
+ exports.isConvertFiltersToQueryStringResult = (0, validators_1.partialObjectValidator)({
19
+ queryString: checks_1.isString,
20
+ error: checks_1.isString,
21
+ });
@@ -32,7 +32,7 @@ declare const CardIntegrationConfigFormatter: import("../format/format").Format<
32
32
  */
33
33
  readonly fieldDisplaySettings: readonly ["fd", import("../format/format").Format<[string, import("../format/objectformat").ObjectFormatSerializedType<{
34
34
  readonly stencilConfig: readonly ["StencilConfig", import("../format/format").Format<import("../format/objectformat").ObjectFormatSerializedType<{
35
- readonly displayType: readonly ["getterKey", import("../format/format").Format<"BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField", "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField">];
35
+ readonly displayType: readonly ["getterKey", import("../format/format").Format<"BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField" | "InlineIcon", "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField" | "InlineIcon">];
36
36
  readonly backgroundColor: readonly ["bg", import("../format/format").Format<string | null | undefined, string | null | undefined>];
37
37
  readonly foregroundColor: readonly ["fg", import("../format/format").Format<string | null | undefined, string | null | undefined>];
38
38
  readonly imageBadgeSettings: readonly ["imageBadgeSettings", import("../format/format").Format<import("../format/objectformat").ObjectFormatSerializedType<{
@@ -72,8 +72,9 @@ declare const CardIntegrationConfigFormatter: import("../format/format").Format<
72
72
  readonly iswithinpill?: boolean | null | undefined;
73
73
  readonly hasleadingicon?: boolean | null | undefined;
74
74
  } | null | undefined>];
75
+ readonly inlineRowIndex: readonly ["inlineRowIndex", import("../format/format").Format<number | null | undefined, number | null | undefined>];
75
76
  }> | null | undefined, {
76
- readonly displayType: "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField";
77
+ readonly displayType: "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField" | "InlineIcon";
77
78
  readonly backgroundColor?: string | null | undefined;
78
79
  readonly foregroundColor?: string | null | undefined;
79
80
  readonly imageBadgeSettings?: {
@@ -99,10 +100,11 @@ declare const CardIntegrationConfigFormatter: import("../format/format").Format<
99
100
  readonly iswithinpill?: boolean | null | undefined;
100
101
  readonly hasleadingicon?: boolean | null | undefined;
101
102
  } | null | undefined;
103
+ readonly inlineRowIndex?: number | null | undefined;
102
104
  } | null | undefined>];
103
105
  }>][] | null | undefined, Map<string, {
104
106
  readonly stencilConfig?: {
105
- readonly displayType: "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField";
107
+ readonly displayType: "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField" | "InlineIcon";
106
108
  readonly backgroundColor?: string | null | undefined;
107
109
  readonly foregroundColor?: string | null | undefined;
108
110
  readonly imageBadgeSettings?: {
@@ -128,6 +130,7 @@ declare const CardIntegrationConfigFormatter: import("../format/format").Format<
128
130
  readonly iswithinpill?: boolean | null | undefined;
129
131
  readonly hasleadingicon?: boolean | null | undefined;
130
132
  } | null | undefined;
133
+ readonly inlineRowIndex?: number | null | undefined;
131
134
  } | null | undefined;
132
135
  }> | null | undefined>];
133
136
  readonly supportsParentCards: readonly ["spc", import("../format/format").Format<boolean | null | undefined, boolean | null | undefined>];
@@ -144,7 +147,7 @@ declare const CardIntegrationConfigFormatter: import("../format/format").Format<
144
147
  }> | null | undefined;
145
148
  readonly fieldDisplaySettings?: Map<string, {
146
149
  readonly stencilConfig?: {
147
- readonly displayType: "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField";
150
+ readonly displayType: "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField" | "InlineIcon";
148
151
  readonly backgroundColor?: string | null | undefined;
149
152
  readonly foregroundColor?: string | null | undefined;
150
153
  readonly imageBadgeSettings?: {
@@ -170,6 +173,7 @@ declare const CardIntegrationConfigFormatter: import("../format/format").Format<
170
173
  readonly iswithinpill?: boolean | null | undefined;
171
174
  readonly hasleadingicon?: boolean | null | undefined;
172
175
  } | null | undefined;
176
+ readonly inlineRowIndex?: number | null | undefined;
173
177
  } | null | undefined;
174
178
  }> | null | undefined;
175
179
  readonly supportsParentCards?: boolean | null | undefined;
@@ -229,7 +233,7 @@ declare const CardIntegrationConfigFormatter: import("../format/format").Format<
229
233
  }> | null | undefined;
230
234
  readonly fieldDisplaySettings?: Map<string, {
231
235
  readonly stencilConfig?: {
232
- readonly displayType: "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField";
236
+ readonly displayType: "BasicTextBadge" | "InitializedString" | "StandardEstimation" | "ImageBadge" | "SquareImageBadge" | "TagBadge" | "DateBadge" | "DateRangeBadge" | "UserProfile" | "CustomSingleSelectField" | "CustomTextField" | "InlineIcon";
233
237
  readonly backgroundColor?: string | null | undefined;
234
238
  readonly foregroundColor?: string | null | undefined;
235
239
  readonly imageBadgeSettings?: {
@@ -255,6 +259,7 @@ declare const CardIntegrationConfigFormatter: import("../format/format").Format<
255
259
  readonly iswithinpill?: boolean | null | undefined;
256
260
  readonly hasleadingicon?: boolean | null | undefined;
257
261
  } | null | undefined;
262
+ readonly inlineRowIndex?: number | null | undefined;
258
263
  } | null | undefined;
259
264
  }> | null | undefined;
260
265
  readonly supportsParentCards?: boolean | null | undefined;
@@ -432,7 +432,14 @@ class LucidCardIntegrationRegistry {
432
432
  serialized['as']['cftqs'] = LucidCardIntegrationRegistry.nextHookName();
433
433
  client.registerAction(serialized['as']['cftqs'], async ({ 'ff': filterFields }) => {
434
434
  var _a;
435
- return await ((_a = queryStringAutoSync.convertFiltersToQueryString) === null || _a === void 0 ? void 0 : _a.call(queryStringAutoSync, new Map(filterFields)));
435
+ const result = await ((_a = queryStringAutoSync.convertFiltersToQueryString) === null || _a === void 0 ? void 0 : _a.call(queryStringAutoSync, new Map(filterFields)));
436
+ if ((0, cardintegrationautosyncconfig_1.isConvertFiltersToQueryStringResult)(result)) {
437
+ return {
438
+ 'qs': result.queryString,
439
+ 'e': result.error,
440
+ };
441
+ }
442
+ return result;
436
443
  });
437
444
  }
438
445
  if (queryStringAutoSync.getDefaultFilterFields) {
@@ -135,7 +135,11 @@ class DataConnector {
135
135
  }
136
136
  catch (e) {
137
137
  const errorLogger = console.error ? console.error : console.log;
138
- if (e instanceof Error && 'response' in e) {
138
+ if (e instanceof DataConnectorRequestError) {
139
+ const statusText = e.statusText ? ` ${e.statusText}` : '';
140
+ errorLogger(`Error running ${actionName} action: ${e.message} Status: ${e.status}${statusText} body: ${e.response}`);
141
+ }
142
+ else if (e instanceof Error && 'response' in e && (0, checks_1.isObject)(e.response) && 'status' in e.response) {
139
143
  const response = e.response;
140
144
  errorLogger(`Error running ${actionName} action Status: ${response.status}`);
141
145
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lucid-extension-sdk",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Utility classes for writing Lucid Software editor extensions",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",