tiledesk-dashboard / rules
Cursor rule16 starsChanged 4 months agoMITView on GitHub
openapi: 3.0.3 info: title: Tiledesk Tables API description: | REST API for managing project tables and table rows. Base path: /{projectId}/tables Authentication: HTTP Basic or JWT (Authorization: JWT <token>). Authorization: admin role, or bot/subscription token types. version: 1.0.0 servers: - url: http://localhost:3000 description: Local development - url: https://api.tiledesk.com description: Production tags: - name: Tables description: Table definition CRUD - name: Rows description: Table row operations security: - basicAuth: [] - jwtAuth: [] paths: /{projectId}/tables: parameters: - $ref: '#/components/parameters/projectId' get: tags:…
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- .cursor/rules/data-tables.openapi.yamlCursor rule
The file
We split this old_openapi-tables.yaml into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 217
If id_row is provided, the row is updated by _id (partial update via $set).
- Distinctive: line 272
If the row exists, performs a partial update.
- Very specific: line 273
If it does not exist, creates a new row with the given _id.
- Distinctive: line 590
Update is partial (existing fields not listed are preserved).
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
openapi: 3.0.3
info:
title: Tiledesk Tables API
description: |
REST API for managing project tables and table rows.
Base path: `/{projectId}/tables`
**Authentication:** HTTP Basic or JWT (`Authorization: JWT <token>`).
**Authorization:** admin role, or bot/subscription token types.
version: 1.0.0
servers:
- url: http://localhost:3000
description: Local development
- url: https://api.tiledesk.com
description: Production
tags:
- name: Tables
description: Table definition CRUD
- name: Rows
description: Table row operations
security:
- basicAuth: []
- jwtAuth: []
paths:
/{projectId}/tables:
parameters:
- $ref: '#/components/parameters/projectId'
get:
tags: [Tables]
summary: List all tables
operationId: listTables
responses:
'200':
description: List of tables for the project
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Table'
'500':
$ref: '#/components/responses/InternalError'
post:
tags: [Tables]
summary: Create a table
operationId: createTable
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateTableRequest'
example:
name: users
schema:
fullname: string
email: string
code: string
responses:
'200':
description: Table created
content:
application/json:
schema:
$ref: '#/components/schemas/Table'
'500':
$ref: '#/components/responses/InternalError'
/{projectId}/tables/{tableId}:
parameters:
- $ref: '#/components/parameters/projectId'
- $ref: '#/components/parameters/tableId'
get:
tags: [Tables]
summary: Get a table with rows
description: Returns the table metadata and all row data in the `rows` array.
operationId: getTable
responses:
'200':
description: Table with embedded rows
content:
application/json:
schema:
$ref: '#/components/schemas/TableWithRows'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
put:
tags: [Tables]
summary: Update a table
operationId: updateTable
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateTableRequest'
responses:
'200':
description: Updated table
content:
application/json:
schema:
$ref: '#/components/schemas/Table'
'500':
$ref: '#/components/responses/InternalError'
/{projectId}/tables/{tableId}/delete:
parameters:
- $ref: '#/components/parameters/projectId'
- $ref: '#/components/parameters/tableId'
delete:
tags: [Tables]
summary: Delete a table
operationId: deleteTable
responses:
'200':
description: Table deleted
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessMessage'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
/{projectId}/tables/{tableId}/rows:
parameters:
- $ref: '#/components/parameters/projectId'
- $ref: '#/components/parameters/tableId'
get:
tags: [Rows]
summary: List row data
description: Returns only the `data` object of each row (without row metadata).
operationId: listRows
responses:
'200':
description: Array of row data objects
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/RowData'
'500':
$ref: '#/components/responses/InternalError'
/{projectId}/tables/{tableId}/row:
parameters:
- $ref: '#/components/parameters/projectId'
- $ref: '#/components/parameters/tableId'
get:
tags: [Rows]
summary: Get a row by id
description: Placeholder endpoint (not yet implemented).
operationId: getRow
responses:
'200':
description: Stub response
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
message:
type: string
/{projectId}/tables/{tableId}/insert:
parameters:
- $ref: '#/components/parameters/projectId'
- $ref: '#/components/parameters/tableId'
put:
tags: [Rows]
summary: Insert a row
operationId: insertRow
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/InsertRowRequest'
example:
data:
fullname: John Doe
email: john.doe@example.com
code: '123456'
responses:
'200':
description: Row inserted
content:
application/json:
schema:
$ref: '#/components/schemas/TableRow'
'500':
$ref: '#/components/responses/InternalError'
/{projectId}/tables/{tableId}/update:
parameters:
- $ref: '#/components/parameters/projectId'
- $ref: '#/components/parameters/tableId'
put:
tags: [Rows]
summary: Update a row
description: |
Updates one row using either a direct row id or dynamic conditions.
- If `id_row` is provided, the row is updated by `_id` (partial update via `$set`).
- Otherwise `conditions` is required. Only the first matching row is updated.
- Column names in `data` and `conditions` must exist in the table schema.
operationId: updateRow
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RowMutationRequest'
examples:
byId:
summary: Update by row id
value:
id_row: 507f1f77bcf86cd799439011
data:
code: '999999'
byConditions:
summary: Update by conditions
value:
must_match: all
conditions:
- column: email
condition: Equal
value: mario@test.it
- column: age
condition: Greater than
value: 18
data:
token: newtoken
responses:
'200':
description: Updated row
content:
application/json:
schema:
$ref: '#/components/schemas/TableRow'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'500':
$ref: '#/components/responses/InternalError'
/{projectId}/tables/{tableId}/upsert:
parameters:
- $ref: '#/components/parameters/projectId'
- $ref: '#/components/parameters/tableId'
put:
tags: [Rows]
summary: Upsert a row
description: |
Creates or updates row(s) using either a direct row id or dynamic conditions.
**By `id_row`:**
- If the row exists, performs a partial update.
- If it does not exist, creates a new row with the given `_id`.
**By `conditions`:**
- `multi: false` (default): updates if exactly one row matches; inserts if none match; returns **409** if multiple rows match.
- `multi: true`: updates all matching rows; inserts one row if none match. Response is an array when `multi` is true.
operationId: upsertRow
requestBody:
required: true
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/RowMutationRequest'
- type: object
properties:
multi:
type: boolean
default: false
description: When using conditions, update all matches if true.
examples:
byId:
summary: Upsert by row id
value:
id_row: 507f1f77bcf86cd799439011
data:
fullname: New User
email: new@example.com
code: '000'
byConditionsSingle:
summary: Upsert by conditions (single match)
value:
must_match: all
multi: false
conditions:
- column: email
condition: Equal
value: mario@test.it
data:
code: updated
byConditionsMulti:
summary: Upsert by conditions (multiple matches)
value:
must_match: all
multi: true
conditions:
- column: email
condition: Equal
value: multi@test.it
data:
code: bulk-updated
responses:
'200':
description: Upserted row(s)
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/TableRow'
- type: array
items:
$ref: '#/components/schemas/TableRow'
'400':
$ref: '#/components/responses/BadRequest'
'404':
$ref: '#/components/responses/NotFound'
'409':
description: Multiple rows match the conditions (multi=false)
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
example:
success: false
error: Multiple rows match the conditions
'500':
$ref: '#/components/responses/InternalError'
/{projectId}/tables/{tableId}/delete:
parameters:
- $ref: '#/components/parameters/projectId'
- $ref: '#/components/parameters/tableId'
put:
tags: [Rows]
summary: Delete a row
description: Deletes the first row whose `data` object exactly matches the request body `data`.
operationId: deleteRow
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/InsertRowRequest'
responses:
'200':
description: Deleted row (or null if not found)
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/TableRow'
- type: 'null'
'500':
$ref: '#/components/responses/InternalError'
components:
securitySchemes:
basicAuth:
type: http
scheme: basic
jwtAuth:
type: apiKey
in: header
name: Authorization
description: 'JWT token prefixed with `JWT `, e.g. `Authorization: JWT eyJhbG...`'
parameters:
projectId:
name: projectId
in: path
required: true
description: Project identifier
schema:
type: string
example: 5e28108c361fbb001729e960
tableId:
name: tableId
in: path
required: true
description: Table identifier
schema:
type: string
example: 507f1f77bcf86cd799439011
responses:
BadRequest:
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
NotFound:
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
InternalError:
description: Internal server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
schemas:
ErrorResponse:
type: object
properties:
success:
type: boolean
example: false
error:
type: string
required: [error]
SuccessMessage:
type: object
properties:
success:
type: boolean
example: true
message:
type: string
example: Table deleted successfully
TableSchema:
type: object
additionalProperties:
type: string
description: Map of column name to type descriptor
example:
fullname: string
email: string
code: string
Table:
type: object
properties:
_id:
type: string
id_project:
type: string
name:
type: string
schema:
$ref: '#/components/schemas/TableSchema'
createdBy:
type: string
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
TableWithRows:
allOf:
- $ref: '#/components/schemas/Table'
- type: object
properties:
rows:
type: array
items:
$ref: '#/components/schemas/RowData'
CreateTableRequest:
type: object
required: [name, schema]
properties:
name:
type: string
schema:
$ref: '#/components/schemas/TableSchema'
UpdateTableRequest:
type: object
properties:
name:
type: string
schema:
$ref: '#/components/schemas/TableSchema'
RowData:
type: object
additionalProperties: true
description: Dynamic row payload defined by the table schema
TableRow:
type: object
properties:
_id:
type: string
id_project:
type: string
id_table:
type: string
data:
$ref: '#/components/schemas/RowData'
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
InsertRowRequest:
type: object
required: [data]
properties:
data:
$ref: '#/components/schemas/RowData'
ConditionOperator:
type: string
enum:
- Equal
- Not equal
- Greater than
- Greater or equal
- Less than
- Less or equal
- Contains
RowCondition:
type: object
required: [column, condition, value]
properties:
column:
type: string
description: Column name (must exist in table schema)
condition:
$ref: '#/components/schemas/ConditionOperator'
value:
description: Value to compare against
oneOf:
- type: string
- type: number
- type: boolean
MustMatch:
type: string
enum: [all, any]
default: all
description: |
How to combine conditions:
- `all` → logical AND
- `any` → logical OR
RowMutationRequest:
type: object
required: [data]
properties:
id_row:
type: string
description: Direct row `_id`. If set, `conditions` is ignored.
must_match:
$ref: '#/components/schemas/MustMatch'
conditions:
type: array
minItems: 1
items:
$ref: '#/components/schemas/RowCondition'
data:
type: object
minProperties: 1
additionalProperties: true
description: |
Fields to update. Only keys defined in the table schema are allowed.
Update is partial (existing fields not listed are preserved).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

