@teamkeel/functions-runtime 0.413.6 → 0.413.7
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/dist/index.cjs +24 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -7
- package/dist/index.d.ts +18 -7
- package/dist/index.js +24 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -305,12 +305,12 @@ interface UiElementInputTextApiResponse extends BaseUiInputResponse<"ui.input.te
|
|
|
305
305
|
|
|
306
306
|
type ElementDataType$1 = number;
|
|
307
307
|
type UiElementInputNumber = InputElement<ElementDataType$1, {
|
|
308
|
-
placeholder?:
|
|
308
|
+
placeholder?: string;
|
|
309
309
|
min?: number;
|
|
310
310
|
max?: number;
|
|
311
311
|
}>;
|
|
312
312
|
interface UiElementInputNumberApiResponse extends BaseUiInputResponse<"ui.input.number", ElementDataType$1> {
|
|
313
|
-
placeholder?:
|
|
313
|
+
placeholder?: string;
|
|
314
314
|
min?: number;
|
|
315
315
|
max?: number;
|
|
316
316
|
}
|
|
@@ -372,13 +372,13 @@ type UiElementImage = DisplayElement<{
|
|
|
372
372
|
url: string;
|
|
373
373
|
alt?: string;
|
|
374
374
|
size?: "thumbnail" | "small" | "medium" | "large" | "full";
|
|
375
|
-
|
|
375
|
+
caption?: string;
|
|
376
376
|
}>;
|
|
377
377
|
interface UiElementImageApiResponse extends BaseUiDisplayResponse<"ui.display.image"> {
|
|
378
378
|
url: string;
|
|
379
379
|
alt?: string;
|
|
380
380
|
size?: "thumbnail" | "small" | "medium" | "large" | "full";
|
|
381
|
-
|
|
381
|
+
caption?: string;
|
|
382
382
|
}
|
|
383
383
|
|
|
384
384
|
type BannerMode = "info" | "warning" | "error" | "success";
|
|
@@ -394,8 +394,19 @@ interface UiElementBannerApiResponse extends BaseUiDisplayResponse<"ui.display.b
|
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
type UiElementHeader = DisplayElement<{
|
|
397
|
-
|
|
397
|
+
/**
|
|
398
|
+
* The visual level of the header.
|
|
399
|
+
*
|
|
400
|
+
* @default 2
|
|
401
|
+
*/
|
|
402
|
+
level?: 1 | 2 | 3;
|
|
403
|
+
/**
|
|
404
|
+
* The title of the header.
|
|
405
|
+
*/
|
|
398
406
|
title?: string;
|
|
407
|
+
/**
|
|
408
|
+
* The description of the header.
|
|
409
|
+
*/
|
|
399
410
|
description?: string;
|
|
400
411
|
}>;
|
|
401
412
|
interface UiElementHeaderApiResponse extends BaseUiDisplayResponse<"ui.display.header"> {
|
|
@@ -504,9 +515,9 @@ interface BaseUiInputResponse<K, TData> {
|
|
|
504
515
|
name: string;
|
|
505
516
|
label: string;
|
|
506
517
|
defaultValue?: TData;
|
|
518
|
+
optional: boolean;
|
|
519
|
+
disabled: boolean;
|
|
507
520
|
helpText?: string;
|
|
508
|
-
optional?: boolean;
|
|
509
|
-
disabled?: boolean;
|
|
510
521
|
validationError?: string;
|
|
511
522
|
}
|
|
512
523
|
interface BaseUiDisplayResponse<K> {
|
package/dist/index.d.ts
CHANGED
|
@@ -305,12 +305,12 @@ interface UiElementInputTextApiResponse extends BaseUiInputResponse<"ui.input.te
|
|
|
305
305
|
|
|
306
306
|
type ElementDataType$1 = number;
|
|
307
307
|
type UiElementInputNumber = InputElement<ElementDataType$1, {
|
|
308
|
-
placeholder?:
|
|
308
|
+
placeholder?: string;
|
|
309
309
|
min?: number;
|
|
310
310
|
max?: number;
|
|
311
311
|
}>;
|
|
312
312
|
interface UiElementInputNumberApiResponse extends BaseUiInputResponse<"ui.input.number", ElementDataType$1> {
|
|
313
|
-
placeholder?:
|
|
313
|
+
placeholder?: string;
|
|
314
314
|
min?: number;
|
|
315
315
|
max?: number;
|
|
316
316
|
}
|
|
@@ -372,13 +372,13 @@ type UiElementImage = DisplayElement<{
|
|
|
372
372
|
url: string;
|
|
373
373
|
alt?: string;
|
|
374
374
|
size?: "thumbnail" | "small" | "medium" | "large" | "full";
|
|
375
|
-
|
|
375
|
+
caption?: string;
|
|
376
376
|
}>;
|
|
377
377
|
interface UiElementImageApiResponse extends BaseUiDisplayResponse<"ui.display.image"> {
|
|
378
378
|
url: string;
|
|
379
379
|
alt?: string;
|
|
380
380
|
size?: "thumbnail" | "small" | "medium" | "large" | "full";
|
|
381
|
-
|
|
381
|
+
caption?: string;
|
|
382
382
|
}
|
|
383
383
|
|
|
384
384
|
type BannerMode = "info" | "warning" | "error" | "success";
|
|
@@ -394,8 +394,19 @@ interface UiElementBannerApiResponse extends BaseUiDisplayResponse<"ui.display.b
|
|
|
394
394
|
}
|
|
395
395
|
|
|
396
396
|
type UiElementHeader = DisplayElement<{
|
|
397
|
-
|
|
397
|
+
/**
|
|
398
|
+
* The visual level of the header.
|
|
399
|
+
*
|
|
400
|
+
* @default 2
|
|
401
|
+
*/
|
|
402
|
+
level?: 1 | 2 | 3;
|
|
403
|
+
/**
|
|
404
|
+
* The title of the header.
|
|
405
|
+
*/
|
|
398
406
|
title?: string;
|
|
407
|
+
/**
|
|
408
|
+
* The description of the header.
|
|
409
|
+
*/
|
|
399
410
|
description?: string;
|
|
400
411
|
}>;
|
|
401
412
|
interface UiElementHeaderApiResponse extends BaseUiDisplayResponse<"ui.display.header"> {
|
|
@@ -504,9 +515,9 @@ interface BaseUiInputResponse<K, TData> {
|
|
|
504
515
|
name: string;
|
|
505
516
|
label: string;
|
|
506
517
|
defaultValue?: TData;
|
|
518
|
+
optional: boolean;
|
|
519
|
+
disabled: boolean;
|
|
507
520
|
helpText?: string;
|
|
508
|
-
optional?: boolean;
|
|
509
|
-
disabled?: boolean;
|
|
510
521
|
validationError?: string;
|
|
511
522
|
}
|
|
512
523
|
interface BaseUiDisplayResponse<K> {
|
package/dist/index.js
CHANGED
|
@@ -1790,17 +1790,23 @@ var Permissions = class {
|
|
|
1790
1790
|
* Explicitly permit access to an action
|
|
1791
1791
|
*/
|
|
1792
1792
|
allow() {
|
|
1793
|
-
permissionsApiInstance.getStore()
|
|
1793
|
+
const store = permissionsApiInstance.getStore();
|
|
1794
|
+
if (store) {
|
|
1795
|
+
store.permitted = true;
|
|
1796
|
+
}
|
|
1794
1797
|
}
|
|
1795
1798
|
/**
|
|
1796
1799
|
* Explicitly deny access to an action
|
|
1797
1800
|
*/
|
|
1798
1801
|
deny() {
|
|
1799
|
-
permissionsApiInstance.getStore()
|
|
1802
|
+
const store = permissionsApiInstance.getStore();
|
|
1803
|
+
if (store) {
|
|
1804
|
+
store.permitted = false;
|
|
1805
|
+
}
|
|
1800
1806
|
throw new PermissionError();
|
|
1801
1807
|
}
|
|
1802
1808
|
getState() {
|
|
1803
|
-
const permitted = permissionsApiInstance.getStore()
|
|
1809
|
+
const permitted = permissionsApiInstance.getStore()?.permitted;
|
|
1804
1810
|
switch (true) {
|
|
1805
1811
|
case permitted === false:
|
|
1806
1812
|
return PERMISSION_STATE.UNPERMITTED;
|
|
@@ -2314,8 +2320,10 @@ var textInput = /* @__PURE__ */ __name((name, options) => {
|
|
|
2314
2320
|
__type: "ui.input.text",
|
|
2315
2321
|
name,
|
|
2316
2322
|
label: options?.label || name,
|
|
2323
|
+
optional: options?.optional || false,
|
|
2324
|
+
disabled: options?.disabled || false,
|
|
2325
|
+
helpText: options?.helpText,
|
|
2317
2326
|
defaultValue: options?.defaultValue,
|
|
2318
|
-
optional: options?.optional,
|
|
2319
2327
|
placeholder: options?.placeholder,
|
|
2320
2328
|
multiline: options?.multiline,
|
|
2321
2329
|
maxLength: options?.maxLength,
|
|
@@ -2334,8 +2342,10 @@ var numberInput = /* @__PURE__ */ __name((name, options) => {
|
|
|
2334
2342
|
__type: "ui.input.number",
|
|
2335
2343
|
name,
|
|
2336
2344
|
label: options?.label || name,
|
|
2345
|
+
optional: options?.optional || false,
|
|
2346
|
+
disabled: options?.disabled || false,
|
|
2347
|
+
helpText: options?.helpText,
|
|
2337
2348
|
defaultValue: options?.defaultValue,
|
|
2338
|
-
optional: options?.optional,
|
|
2339
2349
|
placeholder: options?.placeholder,
|
|
2340
2350
|
min: options?.min,
|
|
2341
2351
|
max: options?.max
|
|
@@ -2362,8 +2372,10 @@ var booleanInput = /* @__PURE__ */ __name((name, options) => {
|
|
|
2362
2372
|
__type: "ui.input.boolean",
|
|
2363
2373
|
name,
|
|
2364
2374
|
label: options?.label || name,
|
|
2375
|
+
optional: options?.optional || false,
|
|
2376
|
+
disabled: options?.disabled || false,
|
|
2377
|
+
helpText: options?.helpText,
|
|
2365
2378
|
defaultValue: options?.defaultValue,
|
|
2366
|
-
optional: options?.optional,
|
|
2367
2379
|
mode: options?.mode || "checkbox"
|
|
2368
2380
|
},
|
|
2369
2381
|
validate: options?.validate,
|
|
@@ -2393,8 +2405,7 @@ var table = /* @__PURE__ */ __name((options) => {
|
|
|
2393
2405
|
return {
|
|
2394
2406
|
uiConfig: {
|
|
2395
2407
|
__type: "ui.display.table",
|
|
2396
|
-
data: filteredData || []
|
|
2397
|
-
columns: options.columns
|
|
2408
|
+
data: filteredData || []
|
|
2398
2409
|
}
|
|
2399
2410
|
};
|
|
2400
2411
|
}, "table");
|
|
@@ -2408,7 +2419,9 @@ var selectOne = /* @__PURE__ */ __name((name, options) => {
|
|
|
2408
2419
|
name,
|
|
2409
2420
|
label: options?.label || name,
|
|
2410
2421
|
defaultValue: options?.defaultValue,
|
|
2411
|
-
optional: options?.optional,
|
|
2422
|
+
optional: options?.optional || false,
|
|
2423
|
+
disabled: options?.disabled || false,
|
|
2424
|
+
helpText: options?.helpText,
|
|
2412
2425
|
options: options?.options || []
|
|
2413
2426
|
},
|
|
2414
2427
|
validate: options?.validate,
|
|
@@ -2506,7 +2519,7 @@ var image = /* @__PURE__ */ __name((options) => {
|
|
|
2506
2519
|
url: options?.url || "",
|
|
2507
2520
|
alt: options?.alt,
|
|
2508
2521
|
size: options?.size,
|
|
2509
|
-
|
|
2522
|
+
caption: options?.caption
|
|
2510
2523
|
}
|
|
2511
2524
|
};
|
|
2512
2525
|
}, "image");
|
|
@@ -2561,7 +2574,7 @@ var header = /* @__PURE__ */ __name((options) => {
|
|
|
2561
2574
|
return {
|
|
2562
2575
|
uiConfig: {
|
|
2563
2576
|
__type: "ui.display.header",
|
|
2564
|
-
level: options?.level ||
|
|
2577
|
+
level: options?.level || 2,
|
|
2565
2578
|
title: options?.title || "",
|
|
2566
2579
|
description: options?.description || ""
|
|
2567
2580
|
}
|