@stndrds/schema 1.0.0-alpha.281 → 1.0.0-alpha.282
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/{all-BVp3k9Hi.d.ts → all-C3EaFLCU.d.ts} +4 -3
- package/dist/{all-CnIU2anT.d.mts → all-CQMswOrw.d.mts} +4 -3
- package/dist/{attributes-D8eHv5Kf.d.ts → attributes-CU871AfG.d.ts} +12 -12
- package/dist/{attributes--M1ifW8_.d.mts → attributes-DoiGyNFk.d.mts} +12 -12
- package/dist/{chunk-LRFLSFIA.js → chunk-DIMTNM3F.js} +7 -3
- package/dist/{chunk-XCLVXM7F.mjs → chunk-EFSS7PGC.mjs} +1 -1
- package/dist/{chunk-SYQDFZ74.mjs → chunk-HOVUEYEQ.mjs} +32 -0
- package/dist/{chunk-TU6ECJFZ.js → chunk-KIMECN6D.js} +65 -35
- package/dist/{chunk-HWZRSXFB.js → chunk-L4KLYMUI.js} +32 -0
- package/dist/{chunk-OYHBQMC7.js → chunk-LBGLB443.js} +3 -3
- package/dist/{chunk-MLTXSBOB.mjs → chunk-PLTLAMWJ.mjs} +1 -1
- package/dist/{chunk-ORPCS24B.mjs → chunk-QGRYOIHT.mjs} +34 -4
- package/dist/{chunk-A5PPZ2FM.mjs → chunk-R34LOMT7.mjs} +5 -1
- package/dist/{chunk-E47WAI5K.js → chunk-V4MZOTLV.js} +4 -4
- package/dist/exceptions.d.mts +20 -3
- package/dist/exceptions.d.ts +20 -3
- package/dist/exceptions.js +39 -39
- package/dist/exceptions.mjs +1 -1
- package/dist/{helpers-DyoPqiSz.d.ts → helpers-BNr-Dppk.d.ts} +3 -3
- package/dist/{helpers-BiABdSxK.d.mts → helpers-CfEOUBmB.d.mts} +3 -3
- package/dist/{index-TMlrIKAY.d.ts → index-Br7koyHF.d.ts} +41 -6
- package/dist/{index-DWoqObyG.d.mts → index-D9XBjFnu.d.mts} +41 -6
- package/dist/index.d.mts +320 -83
- package/dist/index.d.ts +320 -83
- package/dist/index.js +459 -251
- package/dist/index.mjs +229 -31
- package/dist/{migrations-B1kkIhIX.d.ts → migrations-BGWgXHXb.d.ts} +1 -1
- package/dist/{migrations-BNlQVzDC.d.mts → migrations-C-GN1xx_.d.mts} +1 -1
- package/dist/{objects-DmMqHn3L.d.mts → objects-BRypaBpi.d.mts} +2 -4
- package/dist/{objects-DgFojgwH.d.ts → objects-BiOMwzLL.d.ts} +2 -4
- package/dist/{types-DHqXzkgW.d.mts → types-80c2rOUZ.d.mts} +1 -1
- package/dist/{types-DYYFto8d.d.ts → types-DqYz8Iv_.d.ts} +1 -1
- package/dist/utils.js +8 -8
- package/dist/utils.mjs +2 -2
- package/dist/validation/all.d.mts +7 -7
- package/dist/validation/all.d.ts +7 -7
- package/dist/validation/all.js +29 -29
- package/dist/validation/all.mjs +4 -4
- package/dist/validation/complex/currency.d.mts +2 -2
- package/dist/validation/complex/currency.d.ts +2 -2
- package/dist/validation/complex/location.d.mts +2 -2
- package/dist/validation/complex/location.d.ts +2 -2
- package/dist/validation/complex/phone.d.mts +2 -2
- package/dist/validation/complex/phone.d.ts +2 -2
- package/dist/validation/complex/relation.d.mts +2 -2
- package/dist/validation/complex/relation.d.ts +2 -2
- package/dist/validation/complex/richtext.d.mts +2 -2
- package/dist/validation/complex/richtext.d.ts +2 -2
- package/dist/validation/complex/select.d.mts +2 -2
- package/dist/validation/complex/select.d.ts +2 -2
- package/dist/validation/complex/user.d.mts +2 -2
- package/dist/validation/complex/user.d.ts +2 -2
- package/dist/validation/computed/formula.d.mts +2 -2
- package/dist/validation/computed/formula.d.ts +2 -2
- package/dist/validation/computed/rollup.d.mts +2 -2
- package/dist/validation/computed/rollup.d.ts +2 -2
- package/dist/validation/config/index.d.mts +4 -4
- package/dist/validation/config/index.d.ts +4 -4
- package/dist/validation/config/index.js +11 -11
- package/dist/validation/config/index.mjs +2 -2
- package/dist/validation/core/index.d.mts +3 -3
- package/dist/validation/core/index.d.ts +3 -3
- package/dist/validation/object/index.d.mts +5 -5
- package/dist/validation/object/index.d.ts +5 -5
- package/dist/validation/object/index.js +14 -14
- package/dist/validation/object/index.mjs +2 -2
- package/dist/validation/primitives/checkbox.d.mts +2 -2
- package/dist/validation/primitives/checkbox.d.ts +2 -2
- package/dist/validation/primitives/date.d.mts +2 -2
- package/dist/validation/primitives/date.d.ts +2 -2
- package/dist/validation/primitives/number.d.mts +2 -2
- package/dist/validation/primitives/number.d.ts +2 -2
- package/dist/validation/primitives/text.d.mts +2 -2
- package/dist/validation/primitives/text.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SCHEMA_LIMITS, iconNameSchema } from './chunk-
|
|
2
|
-
import { ValidationError } from './chunk-
|
|
1
|
+
import { SCHEMA_LIMITS, iconNameSchema } from './chunk-R34LOMT7.mjs';
|
|
2
|
+
import { ValidationError } from './chunk-HOVUEYEQ.mjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
|
|
5
5
|
// src/types/system-attributes.ts
|
|
@@ -1285,12 +1285,42 @@ var _listViewConfigSchema = z.object({
|
|
|
1285
1285
|
hasDefault = true;
|
|
1286
1286
|
});
|
|
1287
1287
|
});
|
|
1288
|
+
var sidePanelPaneSchema = z.discriminatedUnion("kind", [
|
|
1289
|
+
z.object({
|
|
1290
|
+
kind: z.literal("fields"),
|
|
1291
|
+
id: z.string().optional(),
|
|
1292
|
+
label: z.string().optional(),
|
|
1293
|
+
attributes: z.array(z.string()).max(SCHEMA_LIMITS.sidePanelAttributes)
|
|
1294
|
+
}).strict(),
|
|
1295
|
+
z.object({
|
|
1296
|
+
kind: z.literal("activity"),
|
|
1297
|
+
id: z.string().optional(),
|
|
1298
|
+
label: z.string().optional()
|
|
1299
|
+
}).strict(),
|
|
1300
|
+
z.object({
|
|
1301
|
+
kind: z.literal("documents"),
|
|
1302
|
+
// Required here alone: the documents content keys its stored sort mode
|
|
1303
|
+
// on this id, so a pane without one would share the main-column
|
|
1304
|
+
// documents tab's sort.
|
|
1305
|
+
id: z.string(),
|
|
1306
|
+
label: z.string().optional(),
|
|
1307
|
+
allowUpload: z.boolean().optional(),
|
|
1308
|
+
allowRemove: z.boolean().optional()
|
|
1309
|
+
}).strict()
|
|
1310
|
+
]);
|
|
1288
1311
|
var _detailViewConfigSchema = z.object({
|
|
1289
1312
|
tabs: z.array(detailTabSchema).min(1).max(SCHEMA_LIMITS.tabsPerView),
|
|
1290
1313
|
sidePanel: z.object({
|
|
1291
|
-
attributes: z.array(z.string()).max(SCHEMA_LIMITS.sidePanelAttributes),
|
|
1314
|
+
attributes: z.array(z.string()).max(SCHEMA_LIMITS.sidePanelAttributes).optional(),
|
|
1315
|
+
panes: z.array(sidePanelPaneSchema).max(SCHEMA_LIMITS.sidePanelPanes).optional(),
|
|
1292
1316
|
width: z.number().optional()
|
|
1293
|
-
}).strict().
|
|
1317
|
+
}).strict().refine((sidePanel) => sidePanel.attributes !== void 0 || sidePanel.panes !== void 0, {
|
|
1318
|
+
message: "sidePanel requires attributes or panes"
|
|
1319
|
+
}).refine((sidePanel) => sidePanel.panes === void 0 || sidePanel.panes.length > 0, {
|
|
1320
|
+
message: "sidePanel panes must not be empty"
|
|
1321
|
+
}).refine((sidePanel) => sidePanel.attributes === void 0 || sidePanel.panes === void 0, {
|
|
1322
|
+
message: "sidePanel takes attributes or panes, not both"
|
|
1323
|
+
}).optional()
|
|
1294
1324
|
}).strict().superRefine((config, ctx) => {
|
|
1295
1325
|
addDuplicateIdIssues(config.tabs, ctx, ["tabs"]);
|
|
1296
1326
|
addDuplicateNameIssues(config.tabs, ctx, ["tabs"]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValidationError } from './chunk-
|
|
1
|
+
import { ValidationError } from './chunk-HOVUEYEQ.mjs';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { ICONS, COLORS } from '@stndrds/constants';
|
|
4
4
|
|
|
@@ -316,6 +316,7 @@ var SCHEMA_LIMITS = {
|
|
|
316
316
|
columnsPerTab: 50,
|
|
317
317
|
optionsPerAttribute: 200,
|
|
318
318
|
sidePanelAttributes: 100,
|
|
319
|
+
sidePanelPanes: 20,
|
|
319
320
|
filterRulesPerTab: 50,
|
|
320
321
|
sortsPerTab: 20,
|
|
321
322
|
emailAttributesPerTab: 30,
|
|
@@ -510,6 +511,9 @@ var rollupConfigSchema = baseConfigSchema.extend({
|
|
|
510
511
|
decimals: z.number().int().min(0).max(10).optional(),
|
|
511
512
|
targetAttributeType: z.string().optional(),
|
|
512
513
|
targetAttributeOptions: z.array(optionSchema).optional(),
|
|
514
|
+
// The sum's symbol (#2644) — declared here or `.strip()` eats it before
|
|
515
|
+
// storage, exactly the fate this schema spares its two siblings above.
|
|
516
|
+
targetCurrencyCode: z.string().length(3).optional(),
|
|
513
517
|
optionsSource: computedOptionsSourceSchema.optional()
|
|
514
518
|
});
|
|
515
519
|
var propertySchemaPassthrough = z.object({ definitions: z.array(z.record(z.string(), z.unknown())) }).passthrough();
|
|
@@ -9,7 +9,7 @@ var chunk5WATIVCA_js = require('./chunk-5WATIVCA.js');
|
|
|
9
9
|
var chunkSI34M4IC_js = require('./chunk-SI34M4IC.js');
|
|
10
10
|
var chunkYIP5FJ5H_js = require('./chunk-YIP5FJ5H.js');
|
|
11
11
|
var chunkZPFOKBIN_js = require('./chunk-ZPFOKBIN.js');
|
|
12
|
-
var
|
|
12
|
+
var chunkL4KLYMUI_js = require('./chunk-L4KLYMUI.js');
|
|
13
13
|
var chunkACKMC6FL_js = require('./chunk-ACKMC6FL.js');
|
|
14
14
|
var chunkE6JUYGJX_js = require('./chunk-E6JUYGJX.js');
|
|
15
15
|
var chunkQ4SZAMJT_js = require('./chunk-Q4SZAMJT.js');
|
|
@@ -162,7 +162,7 @@ function validateObjectOrThrow(objectDef, data) {
|
|
|
162
162
|
if (!result.success) {
|
|
163
163
|
const errors = result.errors ?? [];
|
|
164
164
|
const detail = errors.map((err) => `${err.path.join(".")}: ${err.message}`).join("\n") || "Unknown validation error";
|
|
165
|
-
throw new
|
|
165
|
+
throw new chunkL4KLYMUI_js.ValidationError(
|
|
166
166
|
`Validation failed for ${objectDef.label}:
|
|
167
167
|
${detail}`,
|
|
168
168
|
errors.map((err) => ({ path: err.path, message: err.message }))
|
|
@@ -189,7 +189,7 @@ function validateDraftOrThrow(objectDef, data) {
|
|
|
189
189
|
if (!result.success) {
|
|
190
190
|
const errors = result.errors ?? [];
|
|
191
191
|
const detail = errors.map((err) => `${err.path.join(".")}: ${err.message}`).join("\n") || "Unknown validation error";
|
|
192
|
-
throw new
|
|
192
|
+
throw new chunkL4KLYMUI_js.ValidationError(
|
|
193
193
|
`Draft validation failed for ${objectDef.label}:
|
|
194
194
|
${detail}`,
|
|
195
195
|
errors.map((err) => ({ path: err.path, message: err.message }))
|
|
@@ -201,7 +201,7 @@ function rejectUnknownAttributesOrThrow(objectDef, data) {
|
|
|
201
201
|
const knownNames = new Set(objectDef.attributes.map((a) => a.name));
|
|
202
202
|
const unknownKeys = Object.keys(data).filter((key) => !knownNames.has(key));
|
|
203
203
|
if (unknownKeys.length > 0) {
|
|
204
|
-
throw new
|
|
204
|
+
throw new chunkL4KLYMUI_js.ValidationError(
|
|
205
205
|
`Unknown attribute${unknownKeys.length > 1 ? "s" : ""} for ${objectDef.label}: ${unknownKeys.join(", ")}`,
|
|
206
206
|
unknownKeys.map((key) => ({ path: [key], message: "Unknown attribute" }))
|
|
207
207
|
);
|
package/dist/exceptions.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SchemaOperation } from './migrations-
|
|
2
|
-
import './attributes
|
|
1
|
+
import { S as SchemaOperation } from './migrations-C-GN1xx_.mjs';
|
|
2
|
+
import './attributes-DoiGyNFk.mjs';
|
|
3
3
|
import '@stndrds/constants';
|
|
4
4
|
import './utils.mjs';
|
|
5
5
|
|
|
@@ -23,6 +23,19 @@ declare const SchemaErrorCode: {
|
|
|
23
23
|
readonly PROTECTED_ROLE: "SCHEMA_PROTECTED_ROLE";
|
|
24
24
|
readonly FORBIDDEN: "SCHEMA_FORBIDDEN";
|
|
25
25
|
readonly ACCESS_DENIED: "SCHEMA_ACCESS_DENIED";
|
|
26
|
+
/**
|
|
27
|
+
* A workspace RULE refuses the write — the last owner cannot be removed.
|
|
28
|
+
*
|
|
29
|
+
* Not `INVARIANT_VIOLATION`, despite the name: that one is an internal
|
|
30
|
+
* "should never happen" assertion, a bug signal nobody outside the codebase
|
|
31
|
+
* can act on. This is the opposite — a rule the caller can act on, reached
|
|
32
|
+
* by a request that was entirely well-formed, whose message tells them how.
|
|
33
|
+
*/
|
|
34
|
+
readonly WORKSPACE_INVARIANT: "SCHEMA_WORKSPACE_INVARIANT";
|
|
35
|
+
/** The resource's own state refuses the operation — a disarmed reflex run. */
|
|
36
|
+
readonly STATE_GATE: "SCHEMA_STATE_GATE";
|
|
37
|
+
/** The operation needs an actor and the request carried none. */
|
|
38
|
+
readonly ACTOR_CONTEXT_REQUIRED: "SCHEMA_ACTOR_CONTEXT_REQUIRED";
|
|
26
39
|
readonly CONNECTOR_AUTH_FAILED: "SCHEMA_CONNECTOR_AUTH_FAILED";
|
|
27
40
|
readonly CONNECTOR_INVALID_STATE: "SCHEMA_CONNECTOR_INVALID_STATE";
|
|
28
41
|
/**
|
|
@@ -327,7 +340,11 @@ declare function isValidationError(error: unknown): error is ValidationError;
|
|
|
327
340
|
*/
|
|
328
341
|
declare function isProtectedResourceError(error: unknown): error is ProtectedResourceError;
|
|
329
342
|
/**
|
|
330
|
-
* Error thrown when a user lacks permission to perform an action
|
|
343
|
+
* Error thrown when a user lacks permission to perform an action.
|
|
344
|
+
*
|
|
345
|
+
* That, and nothing else (#2681) — its message is redacted, so it must not
|
|
346
|
+
* carry a refusal a permission grant would not lift: use `WORKSPACE_INVARIANT`,
|
|
347
|
+
* `STATE_GATE`, `ACTOR_CONTEXT_REQUIRED` or `SYSTEM_ENTITY_IMMUTABLE` instead.
|
|
331
348
|
*/
|
|
332
349
|
declare class ForbiddenError extends SchemaError {
|
|
333
350
|
readonly objectName: string;
|
package/dist/exceptions.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SchemaOperation } from './migrations-
|
|
2
|
-
import './attributes-
|
|
1
|
+
import { S as SchemaOperation } from './migrations-BGWgXHXb.js';
|
|
2
|
+
import './attributes-CU871AfG.js';
|
|
3
3
|
import '@stndrds/constants';
|
|
4
4
|
import './utils.js';
|
|
5
5
|
|
|
@@ -23,6 +23,19 @@ declare const SchemaErrorCode: {
|
|
|
23
23
|
readonly PROTECTED_ROLE: "SCHEMA_PROTECTED_ROLE";
|
|
24
24
|
readonly FORBIDDEN: "SCHEMA_FORBIDDEN";
|
|
25
25
|
readonly ACCESS_DENIED: "SCHEMA_ACCESS_DENIED";
|
|
26
|
+
/**
|
|
27
|
+
* A workspace RULE refuses the write — the last owner cannot be removed.
|
|
28
|
+
*
|
|
29
|
+
* Not `INVARIANT_VIOLATION`, despite the name: that one is an internal
|
|
30
|
+
* "should never happen" assertion, a bug signal nobody outside the codebase
|
|
31
|
+
* can act on. This is the opposite — a rule the caller can act on, reached
|
|
32
|
+
* by a request that was entirely well-formed, whose message tells them how.
|
|
33
|
+
*/
|
|
34
|
+
readonly WORKSPACE_INVARIANT: "SCHEMA_WORKSPACE_INVARIANT";
|
|
35
|
+
/** The resource's own state refuses the operation — a disarmed reflex run. */
|
|
36
|
+
readonly STATE_GATE: "SCHEMA_STATE_GATE";
|
|
37
|
+
/** The operation needs an actor and the request carried none. */
|
|
38
|
+
readonly ACTOR_CONTEXT_REQUIRED: "SCHEMA_ACTOR_CONTEXT_REQUIRED";
|
|
26
39
|
readonly CONNECTOR_AUTH_FAILED: "SCHEMA_CONNECTOR_AUTH_FAILED";
|
|
27
40
|
readonly CONNECTOR_INVALID_STATE: "SCHEMA_CONNECTOR_INVALID_STATE";
|
|
28
41
|
/**
|
|
@@ -327,7 +340,11 @@ declare function isValidationError(error: unknown): error is ValidationError;
|
|
|
327
340
|
*/
|
|
328
341
|
declare function isProtectedResourceError(error: unknown): error is ProtectedResourceError;
|
|
329
342
|
/**
|
|
330
|
-
* Error thrown when a user lacks permission to perform an action
|
|
343
|
+
* Error thrown when a user lacks permission to perform an action.
|
|
344
|
+
*
|
|
345
|
+
* That, and nothing else (#2681) — its message is redacted, so it must not
|
|
346
|
+
* carry a refusal a permission grant would not lift: use `WORKSPACE_INVARIANT`,
|
|
347
|
+
* `STATE_GATE`, `ACTOR_CONTEXT_REQUIRED` or `SYSTEM_ENTITY_IMMUTABLE` instead.
|
|
331
348
|
*/
|
|
332
349
|
declare class ForbiddenError extends SchemaError {
|
|
333
350
|
readonly objectName: string;
|
package/dist/exceptions.js
CHANGED
|
@@ -1,158 +1,158 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkL4KLYMUI_js = require('./chunk-L4KLYMUI.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "AccessDeniedError", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkL4KLYMUI_js.AccessDeniedError; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "AttributeInUseError", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkL4KLYMUI_js.AttributeInUseError; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "AttributeNotFoundError", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkL4KLYMUI_js.AttributeNotFoundError; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "ChangeTypeNotSupportedError", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkL4KLYMUI_js.ChangeTypeNotSupportedError; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "ConcurrentModificationError", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkL4KLYMUI_js.ConcurrentModificationError; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "DestructiveSyncNotAllowedError", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkL4KLYMUI_js.DestructiveSyncNotAllowedError; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "DuplicateError", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkL4KLYMUI_js.DuplicateError; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "ForbiddenError", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkL4KLYMUI_js.ForbiddenError; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "MemoryNotFoundError", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkL4KLYMUI_js.MemoryNotFoundError; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "MigrationTimeoutError", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkL4KLYMUI_js.MigrationTimeoutError; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "NotFoundError", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkL4KLYMUI_js.NotFoundError; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "NotImplementedError", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkL4KLYMUI_js.NotImplementedError; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "ObjectNotFoundError", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkL4KLYMUI_js.ObjectNotFoundError; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "ObjectReferencedError", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkL4KLYMUI_js.ObjectReferencedError; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "OrphanSystemAttributeError", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkL4KLYMUI_js.OrphanSystemAttributeError; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "ProtectedResourceError", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkL4KLYMUI_js.ProtectedResourceError; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "ProtectedRoleError", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkL4KLYMUI_js.ProtectedRoleError; }
|
|
74
74
|
});
|
|
75
75
|
Object.defineProperty(exports, "RecordNotFoundError", {
|
|
76
76
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunkL4KLYMUI_js.RecordNotFoundError; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "RecordReferencedError", {
|
|
80
80
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunkL4KLYMUI_js.RecordReferencedError; }
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(exports, "RepositoryError", {
|
|
84
84
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunkL4KLYMUI_js.RepositoryError; }
|
|
86
86
|
});
|
|
87
87
|
Object.defineProperty(exports, "RoleNotFoundError", {
|
|
88
88
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunkL4KLYMUI_js.RoleNotFoundError; }
|
|
90
90
|
});
|
|
91
91
|
Object.defineProperty(exports, "SchemaError", {
|
|
92
92
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunkL4KLYMUI_js.SchemaError; }
|
|
94
94
|
});
|
|
95
95
|
Object.defineProperty(exports, "SchemaErrorCode", {
|
|
96
96
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunkL4KLYMUI_js.SchemaErrorCode; }
|
|
98
98
|
});
|
|
99
99
|
Object.defineProperty(exports, "SchemaPlanNotFoundError", {
|
|
100
100
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunkL4KLYMUI_js.SchemaPlanNotFoundError; }
|
|
102
102
|
});
|
|
103
103
|
Object.defineProperty(exports, "SearchBackendError", {
|
|
104
104
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunkL4KLYMUI_js.SearchBackendError; }
|
|
106
106
|
});
|
|
107
107
|
Object.defineProperty(exports, "StorageError", {
|
|
108
108
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunkL4KLYMUI_js.StorageError; }
|
|
110
110
|
});
|
|
111
111
|
Object.defineProperty(exports, "SyncCascadeError", {
|
|
112
112
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
113
|
+
get: function () { return chunkL4KLYMUI_js.SyncCascadeError; }
|
|
114
114
|
});
|
|
115
115
|
Object.defineProperty(exports, "SyncConflictError", {
|
|
116
116
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
117
|
+
get: function () { return chunkL4KLYMUI_js.SyncConflictError; }
|
|
118
118
|
});
|
|
119
119
|
Object.defineProperty(exports, "SyncError", {
|
|
120
120
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
121
|
+
get: function () { return chunkL4KLYMUI_js.SyncError; }
|
|
122
122
|
});
|
|
123
123
|
Object.defineProperty(exports, "SystemEntityImmutableError", {
|
|
124
124
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunkL4KLYMUI_js.SystemEntityImmutableError; }
|
|
126
126
|
});
|
|
127
127
|
Object.defineProperty(exports, "ValidationError", {
|
|
128
128
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
129
|
+
get: function () { return chunkL4KLYMUI_js.ValidationError; }
|
|
130
130
|
});
|
|
131
131
|
Object.defineProperty(exports, "isAttributeInUseError", {
|
|
132
132
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
133
|
+
get: function () { return chunkL4KLYMUI_js.isAttributeInUseError; }
|
|
134
134
|
});
|
|
135
135
|
Object.defineProperty(exports, "isNotFoundError", {
|
|
136
136
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
137
|
+
get: function () { return chunkL4KLYMUI_js.isNotFoundError; }
|
|
138
138
|
});
|
|
139
139
|
Object.defineProperty(exports, "isObjectReferencedError", {
|
|
140
140
|
enumerable: true,
|
|
141
|
-
get: function () { return
|
|
141
|
+
get: function () { return chunkL4KLYMUI_js.isObjectReferencedError; }
|
|
142
142
|
});
|
|
143
143
|
Object.defineProperty(exports, "isProtectedResourceError", {
|
|
144
144
|
enumerable: true,
|
|
145
|
-
get: function () { return
|
|
145
|
+
get: function () { return chunkL4KLYMUI_js.isProtectedResourceError; }
|
|
146
146
|
});
|
|
147
147
|
Object.defineProperty(exports, "isRecordReferencedError", {
|
|
148
148
|
enumerable: true,
|
|
149
|
-
get: function () { return
|
|
149
|
+
get: function () { return chunkL4KLYMUI_js.isRecordReferencedError; }
|
|
150
150
|
});
|
|
151
151
|
Object.defineProperty(exports, "isSchemaError", {
|
|
152
152
|
enumerable: true,
|
|
153
|
-
get: function () { return
|
|
153
|
+
get: function () { return chunkL4KLYMUI_js.isSchemaError; }
|
|
154
154
|
});
|
|
155
155
|
Object.defineProperty(exports, "isValidationError", {
|
|
156
156
|
enumerable: true,
|
|
157
|
-
get: function () { return
|
|
157
|
+
get: function () { return chunkL4KLYMUI_js.isValidationError; }
|
|
158
158
|
});
|
package/dist/exceptions.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReferencedError, RepositoryError, RoleNotFoundError, SchemaError, SchemaErrorCode, SchemaPlanNotFoundError, SearchBackendError, StorageError, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError } from './chunk-
|
|
1
|
+
export { AccessDeniedError, AttributeInUseError, AttributeNotFoundError, ChangeTypeNotSupportedError, ConcurrentModificationError, DestructiveSyncNotAllowedError, DuplicateError, ForbiddenError, MemoryNotFoundError, MigrationTimeoutError, NotFoundError, NotImplementedError, ObjectNotFoundError, ObjectReferencedError, OrphanSystemAttributeError, ProtectedResourceError, ProtectedRoleError, RecordNotFoundError, RecordReferencedError, RepositoryError, RoleNotFoundError, SchemaError, SchemaErrorCode, SchemaPlanNotFoundError, SearchBackendError, StorageError, SyncCascadeError, SyncConflictError, SyncError, SystemEntityImmutableError, ValidationError, isAttributeInUseError, isNotFoundError, isObjectReferencedError, isProtectedResourceError, isRecordReferencedError, isSchemaError, isValidationError } from './chunk-HOVUEYEQ.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { A as Attribute } from './attributes-
|
|
3
|
-
import { V as ValidationMessages, a as ValidationResult } from './types-
|
|
4
|
-
import { O as ObjectDefinition } from './objects-
|
|
2
|
+
import { A as Attribute } from './attributes-CU871AfG.js';
|
|
3
|
+
import { V as ValidationMessages, a as ValidationResult } from './types-DqYz8Iv_.js';
|
|
4
|
+
import { O as ObjectDefinition } from './objects-BiOMwzLL.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Create a Zod schema for any attribute type.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { A as Attribute } from './attributes
|
|
3
|
-
import { V as ValidationMessages, a as ValidationResult } from './types-
|
|
4
|
-
import { O as ObjectDefinition } from './objects-
|
|
2
|
+
import { A as Attribute } from './attributes-DoiGyNFk.mjs';
|
|
3
|
+
import { V as ValidationMessages, a as ValidationResult } from './types-80c2rOUZ.mjs';
|
|
4
|
+
import { O as ObjectDefinition } from './objects-BRypaBpi.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Create a Zod schema for any attribute type.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { A as Attribute, f as AttributeType, e as RollupAttribute } from './attributes-
|
|
2
|
+
import { A as Attribute, f as AttributeType, e as RollupAttribute } from './attributes-CU871AfG.js';
|
|
3
3
|
import { IconName } from '@stndrds/constants';
|
|
4
|
-
import { L as ListViewTabVisibility } from './objects-
|
|
4
|
+
import { L as ListViewTabVisibility } from './objects-BiOMwzLL.js';
|
|
5
5
|
|
|
6
6
|
/** Operators for text-based attributes */
|
|
7
7
|
type TextFilterOperator = "is" | "is_not" | "contains" | "not_contains" | "starts_with" | "ends_with" | "is_empty" | "is_not_empty";
|
|
@@ -467,14 +467,49 @@ interface ListViewTab {
|
|
|
467
467
|
/** Pinned kanban columns (by option value) - for kanban layout only */
|
|
468
468
|
kanbanPinnedColumns?: string[];
|
|
469
469
|
}
|
|
470
|
+
/**
|
|
471
|
+
* One stacked section of the detail side panel.
|
|
472
|
+
*
|
|
473
|
+
* The panel is a column beside the main tabs, so its sections stack — a second
|
|
474
|
+
* tab row inside it would compete with the first. Only the three kinds below
|
|
475
|
+
* exist in v1; `table`, `custom`, `richtext`, `forms`, `emails` and `meetings`
|
|
476
|
+
* stay out until width and UX prove out, and their absence from this union is
|
|
477
|
+
* what enforces that.
|
|
478
|
+
*/
|
|
479
|
+
type SidePanelPane = {
|
|
480
|
+
kind: "fields";
|
|
481
|
+
id?: string;
|
|
482
|
+
label?: string;
|
|
483
|
+
attributes: string[];
|
|
484
|
+
} | {
|
|
485
|
+
kind: "activity";
|
|
486
|
+
id?: string;
|
|
487
|
+
label?: string;
|
|
488
|
+
} | {
|
|
489
|
+
kind: "documents";
|
|
490
|
+
/**
|
|
491
|
+
* Required, unlike the other kinds: `DocumentsTabContent` keys its
|
|
492
|
+
* sort-mode persistence on it, so a pane without one would share the
|
|
493
|
+
* main-column documents tab's stored sort.
|
|
494
|
+
*/
|
|
495
|
+
id: string;
|
|
496
|
+
label?: string;
|
|
497
|
+
allowUpload?: boolean;
|
|
498
|
+
allowRemove?: boolean;
|
|
499
|
+
};
|
|
470
500
|
/**
|
|
471
501
|
* Configuration for the side panel displayed alongside tab content.
|
|
472
502
|
* When present, a right-side panel shows the configured attributes as flat fields.
|
|
473
503
|
*/
|
|
474
504
|
interface SidePanelConfig {
|
|
475
|
-
/**
|
|
476
|
-
|
|
477
|
-
|
|
505
|
+
/**
|
|
506
|
+
* Flat fields, the original shape. Equivalent to a single `fields` pane and
|
|
507
|
+
* still supported unchanged; supply this or `panes`, not both.
|
|
508
|
+
*/
|
|
509
|
+
attributes?: string[];
|
|
510
|
+
/** Ordered stacked sections, rendered top to bottom. */
|
|
511
|
+
panes?: SidePanelPane[];
|
|
512
|
+
/** Width in pixels. @default 480 */
|
|
478
513
|
width?: number;
|
|
479
514
|
}
|
|
480
515
|
/**
|
|
@@ -778,4 +813,4 @@ declare function parseAttributeConfigForCreate(type: AttributeType, input: unkno
|
|
|
778
813
|
*/
|
|
779
814
|
declare function parseAttributeConfigForUpdate(stored: Attribute, patch: Partial<AddAttributeInput>): Record<string, unknown>;
|
|
780
815
|
|
|
781
|
-
export { type
|
|
816
|
+
export { type SidePanelPane as $, type AttributeGroupField as A, type FilterGroup as B, type ConfigOverrides as C, type DetailViewConfig as D, type EmailsTab as E, type FilterState as F, type Group as G, type FormDensity as H, type FormTab as I, type FormsTab as J, type InverseSource as K, type ListViewConfig as L, type MeetingsTab as M, type ListViewLayout as N, NO_VALUE_OPERATORS as O, type NoValueOperator as P, OPERATORS_BY_TYPE as Q, type RelativeDateValue as R, type SortRule as S, type TableTab as T, type PhoneFilterValue as U, type ViewType as V, type QueryState as W, type RelationOption as X, type RelationOptionsResponse as Y, type RelationSource as Z, type RichtextTab as _, type ViewConfig as a, type SortDirection as a0, type TabType as a1, type TableSource as a2, type UpdateObjectInput as a3, type UpdateViewInput as a4, type ViewOverlay as a5, getRollupFilterOperators as a6, isDetailView as a7, isFieldGroup as a8, isListView as a9, isNoValueOperator as aa, multiselectOptionWriteSchema as ab, parseAttributeConfig as ac, parseAttributeConfigForCreate as ad, parseAttributeConfigForUpdate as ae, selectOptionWriteSchema as af, statusGroupSchema as ag, statusOptionWriteSchema as ah, attributeConfigSchemas as ai, getAttributeConfigSchema as aj, type FilterOperator as b, type DetailViewDefinition as c, type SidePanelConfig as d, type Field as e, type FieldGroup as f, type CreateMode as g, type Tab as h, type ListViewDefinition as i, type ViewDefinition as j, type ListViewTab as k, type FilterValue as l, type FilterRule as m, type DynamicValue as n, type ActivityTab as o, type AddAttributeInput as p, type AdvancedFilterState as q, type CreateCustomObjectInput as r, type CreateViewInput as s, type CurrencyFilterValue as t, type CustomTab as u, type DayMonthValue as v, type DocumentsTab as w, type EdgeQuantifier as x, type ExtendedFilterRule as y, type FilterCombinator as z };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { A as Attribute, f as AttributeType, e as RollupAttribute } from './attributes
|
|
2
|
+
import { A as Attribute, f as AttributeType, e as RollupAttribute } from './attributes-DoiGyNFk.mjs';
|
|
3
3
|
import { IconName } from '@stndrds/constants';
|
|
4
|
-
import { L as ListViewTabVisibility } from './objects-
|
|
4
|
+
import { L as ListViewTabVisibility } from './objects-BRypaBpi.mjs';
|
|
5
5
|
|
|
6
6
|
/** Operators for text-based attributes */
|
|
7
7
|
type TextFilterOperator = "is" | "is_not" | "contains" | "not_contains" | "starts_with" | "ends_with" | "is_empty" | "is_not_empty";
|
|
@@ -467,14 +467,49 @@ interface ListViewTab {
|
|
|
467
467
|
/** Pinned kanban columns (by option value) - for kanban layout only */
|
|
468
468
|
kanbanPinnedColumns?: string[];
|
|
469
469
|
}
|
|
470
|
+
/**
|
|
471
|
+
* One stacked section of the detail side panel.
|
|
472
|
+
*
|
|
473
|
+
* The panel is a column beside the main tabs, so its sections stack — a second
|
|
474
|
+
* tab row inside it would compete with the first. Only the three kinds below
|
|
475
|
+
* exist in v1; `table`, `custom`, `richtext`, `forms`, `emails` and `meetings`
|
|
476
|
+
* stay out until width and UX prove out, and their absence from this union is
|
|
477
|
+
* what enforces that.
|
|
478
|
+
*/
|
|
479
|
+
type SidePanelPane = {
|
|
480
|
+
kind: "fields";
|
|
481
|
+
id?: string;
|
|
482
|
+
label?: string;
|
|
483
|
+
attributes: string[];
|
|
484
|
+
} | {
|
|
485
|
+
kind: "activity";
|
|
486
|
+
id?: string;
|
|
487
|
+
label?: string;
|
|
488
|
+
} | {
|
|
489
|
+
kind: "documents";
|
|
490
|
+
/**
|
|
491
|
+
* Required, unlike the other kinds: `DocumentsTabContent` keys its
|
|
492
|
+
* sort-mode persistence on it, so a pane without one would share the
|
|
493
|
+
* main-column documents tab's stored sort.
|
|
494
|
+
*/
|
|
495
|
+
id: string;
|
|
496
|
+
label?: string;
|
|
497
|
+
allowUpload?: boolean;
|
|
498
|
+
allowRemove?: boolean;
|
|
499
|
+
};
|
|
470
500
|
/**
|
|
471
501
|
* Configuration for the side panel displayed alongside tab content.
|
|
472
502
|
* When present, a right-side panel shows the configured attributes as flat fields.
|
|
473
503
|
*/
|
|
474
504
|
interface SidePanelConfig {
|
|
475
|
-
/**
|
|
476
|
-
|
|
477
|
-
|
|
505
|
+
/**
|
|
506
|
+
* Flat fields, the original shape. Equivalent to a single `fields` pane and
|
|
507
|
+
* still supported unchanged; supply this or `panes`, not both.
|
|
508
|
+
*/
|
|
509
|
+
attributes?: string[];
|
|
510
|
+
/** Ordered stacked sections, rendered top to bottom. */
|
|
511
|
+
panes?: SidePanelPane[];
|
|
512
|
+
/** Width in pixels. @default 480 */
|
|
478
513
|
width?: number;
|
|
479
514
|
}
|
|
480
515
|
/**
|
|
@@ -778,4 +813,4 @@ declare function parseAttributeConfigForCreate(type: AttributeType, input: unkno
|
|
|
778
813
|
*/
|
|
779
814
|
declare function parseAttributeConfigForUpdate(stored: Attribute, patch: Partial<AddAttributeInput>): Record<string, unknown>;
|
|
780
815
|
|
|
781
|
-
export { type
|
|
816
|
+
export { type SidePanelPane as $, type AttributeGroupField as A, type FilterGroup as B, type ConfigOverrides as C, type DetailViewConfig as D, type EmailsTab as E, type FilterState as F, type Group as G, type FormDensity as H, type FormTab as I, type FormsTab as J, type InverseSource as K, type ListViewConfig as L, type MeetingsTab as M, type ListViewLayout as N, NO_VALUE_OPERATORS as O, type NoValueOperator as P, OPERATORS_BY_TYPE as Q, type RelativeDateValue as R, type SortRule as S, type TableTab as T, type PhoneFilterValue as U, type ViewType as V, type QueryState as W, type RelationOption as X, type RelationOptionsResponse as Y, type RelationSource as Z, type RichtextTab as _, type ViewConfig as a, type SortDirection as a0, type TabType as a1, type TableSource as a2, type UpdateObjectInput as a3, type UpdateViewInput as a4, type ViewOverlay as a5, getRollupFilterOperators as a6, isDetailView as a7, isFieldGroup as a8, isListView as a9, isNoValueOperator as aa, multiselectOptionWriteSchema as ab, parseAttributeConfig as ac, parseAttributeConfigForCreate as ad, parseAttributeConfigForUpdate as ae, selectOptionWriteSchema as af, statusGroupSchema as ag, statusOptionWriteSchema as ah, attributeConfigSchemas as ai, getAttributeConfigSchema as aj, type FilterOperator as b, type DetailViewDefinition as c, type SidePanelConfig as d, type Field as e, type FieldGroup as f, type CreateMode as g, type Tab as h, type ListViewDefinition as i, type ViewDefinition as j, type ListViewTab as k, type FilterValue as l, type FilterRule as m, type DynamicValue as n, type ActivityTab as o, type AddAttributeInput as p, type AdvancedFilterState as q, type CreateCustomObjectInput as r, type CreateViewInput as s, type CurrencyFilterValue as t, type CustomTab as u, type DayMonthValue as v, type DocumentsTab as w, type EdgeQuantifier as x, type ExtendedFilterRule as y, type FilterCombinator as z };
|