@tightknitai/slack-block-kit-validator 0.1.17 → 0.1.19

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.
@@ -1356,45 +1356,69 @@
1356
1356
  ]
1357
1357
  },
1358
1358
 
1359
+ "data_table_raw_text_cell": {
1360
+ "description": "Plain text cell in a data_table_block row.",
1361
+ "type": "object",
1362
+ "additionalProperties": false,
1363
+ "required": ["type", "text"],
1364
+ "properties": {
1365
+ "type": { "const": "raw_text" },
1366
+ "text": { "type": "string", "minLength": 1 }
1367
+ }
1368
+ },
1369
+
1370
+ "data_table_raw_number_cell": {
1371
+ "description": "Numeric cell in a data_table_block row. A column of only raw_number cells sorts numerically.",
1372
+ "type": "object",
1373
+ "additionalProperties": false,
1374
+ "required": ["type", "value"],
1375
+ "properties": {
1376
+ "type": { "const": "raw_number" },
1377
+ "value": { "type": "number" },
1378
+ "text": { "type": "string", "minLength": 1 }
1379
+ }
1380
+ },
1381
+
1382
+ "data_table_rich_text_cell": {
1383
+ "description": "Formatted cell in a data_table_block row. Not allowed in the header (first) row, which is not enforced here.",
1384
+ "type": "object",
1385
+ "additionalProperties": false,
1386
+ "required": ["type", "elements"],
1387
+ "properties": {
1388
+ "type": { "const": "rich_text" },
1389
+ "elements": {
1390
+ "type": "array",
1391
+ "items": { "$ref": "#/$defs/rich_text_container_element" }
1392
+ }
1393
+ }
1394
+ },
1395
+
1396
+ "data_table_action_cell": {
1397
+ "description": "Button cell; clicks send a block_actions payload. Only valid in data_table_block, not table_block. `fallback` renders instead on clients without action-cell support.",
1398
+ "type": "object",
1399
+ "additionalProperties": false,
1400
+ "required": ["type", "element"],
1401
+ "properties": {
1402
+ "type": { "const": "action_cell" },
1403
+ "element": { "$ref": "#/$defs/button_element" },
1404
+ "fallback": {
1405
+ "oneOf": [{ "$ref": "#/$defs/data_table_raw_text_cell" }, { "$ref": "#/$defs/data_table_raw_number_cell" }]
1406
+ }
1407
+ }
1408
+ },
1409
+
1359
1410
  "data_table_cell": {
1360
- "description": "A cell inside a data_table_block row. `raw_text` / `raw_number` for simple values, `rich_text` for formatted content. Per https://docs.slack.dev/reference/block-kit/blocks/data-table-block. The docs' per-cell schemas list `properties` without a `required` array; we mirror `table_cell` and require the value-bearing field(s). The rule 'the first (header) row cannot contain rich_text cells' is a row-position constraint JSON Schema can't express and is not enforced here.",
1411
+ "description": "A cell inside a data_table_block row (https://docs.slack.dev/reference/block-kit/blocks/data-table-block). The docs' per-cell schemas list `properties` without a `required` array; we mirror `table_cell` and require the value-bearing field(s).",
1361
1412
  "oneOf": [
1362
- {
1363
- "type": "object",
1364
- "additionalProperties": false,
1365
- "required": ["type", "text"],
1366
- "properties": {
1367
- "type": { "const": "raw_text" },
1368
- "text": { "type": "string", "minLength": 1 }
1369
- }
1370
- },
1371
- {
1372
- "type": "object",
1373
- "additionalProperties": false,
1374
- "required": ["type", "value"],
1375
- "properties": {
1376
- "type": { "const": "raw_number" },
1377
- "value": { "type": "number" },
1378
- "text": { "type": "string", "minLength": 1 }
1379
- }
1380
- },
1381
- {
1382
- "type": "object",
1383
- "additionalProperties": false,
1384
- "required": ["type", "elements"],
1385
- "properties": {
1386
- "type": { "const": "rich_text" },
1387
- "elements": {
1388
- "type": "array",
1389
- "items": { "$ref": "#/$defs/rich_text_container_element" }
1390
- }
1391
- }
1392
- }
1413
+ { "$ref": "#/$defs/data_table_raw_text_cell" },
1414
+ { "$ref": "#/$defs/data_table_raw_number_cell" },
1415
+ { "$ref": "#/$defs/data_table_rich_text_cell" },
1416
+ { "$ref": "#/$defs/data_table_action_cell" }
1393
1417
  ]
1394
1418
  },
1395
1419
 
1396
1420
  "data_table_block": {
1397
- "description": "Rich, interactive table with pagination, sorting, and filtering (https://docs.slack.dev/reference/block-kit/blocks/data-table-block). Distinct from `table_block`, which is a simpler static table. The single-table and aggregate 10,000-character limits are payload-level rules not enforced here. `row_header_column_index` must point at an existing column, a cross-field rule JSON Schema can't check (bounded to 0–19 since a row has at most 20 cells).",
1421
+ "description": "Rich, interactive table with pagination, sorting, and filtering (https://docs.slack.dev/reference/block-kit/blocks/data-table-block). Distinct from `table_block`, which is a simpler static table. The single-table and per-message aggregate 20,000-character cell limits (action_cell button text included) are payload-level rules not enforced here, nor is the rule that every row has the same number of cells. `row_header_column_index` must point at an existing column, a cross-field rule JSON Schema can't check (bounded to 0–19 since a row has at most 20 cells).",
1398
1422
  "type": "object",
1399
1423
  "additionalProperties": false,
1400
1424
  "required": ["type", "caption", "rows"],
@@ -1405,10 +1429,10 @@
1405
1429
  "page_size": { "type": "integer", "minimum": 1, "maximum": 100 },
1406
1430
  "row_header_column_index": { "type": "integer", "minimum": 0, "maximum": 19 },
1407
1431
  "rows": {
1408
- "description": "First row is the header; 2–101 rows total (1 header + 1–100 data rows), 1–20 cells per row.",
1432
+ "description": "First row is the header; 2–201 rows total (1 header + 1–200 data rows), 1–20 cells per row.",
1409
1433
  "type": "array",
1410
1434
  "minItems": 2,
1411
- "maxItems": 101,
1435
+ "maxItems": 201,
1412
1436
  "items": {
1413
1437
  "type": "array",
1414
1438
  "minItems": 1,
@@ -1,20 +1,2 @@
1
- // AUTO-GENERATED — DO NOT EDIT BY HAND.
2
-
3
- export type StandaloneValidateFunction = ((data: unknown) => boolean) & {
4
- errors?:
5
- | {
6
- instancePath: string;
7
- schemaPath: string;
8
- keyword: string;
9
- params: Record<string, unknown>;
10
- message?: string;
11
- }[]
12
- | null;
13
- };
14
-
15
- /** Validates a bare blocks array. */
16
- export const validateBlocks: StandaloneValidateFunction;
17
- /** Validates a modal view envelope. */
18
- export const validateModal: StandaloneValidateFunction;
19
- /** Validates a home view envelope. */
20
- export const validateHome: StandaloneValidateFunction;
1
+ export { type StandaloneValidateFunction, validateBlocks, validateHome, validateModal, } from "./precompiled-validators.js";
2
+ //# sourceMappingURL=standalone-validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standalone-validator.d.ts","sourceRoot":"","sources":["../src/standalone-validator.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,0BAA0B,EAC/B,cAAc,EACd,YAAY,EACZ,aAAa,GACd,MAAM,6BAA6B,CAAC"}