@deepraxis/sdk 0.1.1-dev.fb97f26 → 0.1.1-dev.fc4f4d7
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/METHODS.md +149 -1
- package/dist/core/deprecation.d.ts +11 -0
- package/dist/core/deprecation.js +20 -0
- package/dist/core/transport.d.ts +4 -0
- package/dist/core/transport.js +3 -0
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +384 -22
- package/dist/generated/sdk.gen.js +986 -100
- package/dist/generated/types.gen.d.ts +2688 -124
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/operations.generated.js +2043 -68
- package/dist/resources.generated.d.ts +197 -0
- package/dist/resources.generated.js +247 -22
- package/package.json +1 -1
|
@@ -8097,7 +8097,7 @@ export const operations = [
|
|
|
8097
8097
|
"name": "timeoutMs",
|
|
8098
8098
|
"type": "number",
|
|
8099
8099
|
"required": false,
|
|
8100
|
-
"description": "接管请求有效时长,单位为毫秒;必须大于 0
|
|
8100
|
+
"description": "接管请求有效时长,单位为毫秒;必须大于 0,可含小数。超过 3600000(60 分钟)的按 60 分钟算,返回事件里的到期时刻就是实际值。接管未完成、未到期期间,会话不按空闲回收;接管结束后重新开始计空闲。"
|
|
8101
8101
|
}
|
|
8102
8102
|
]
|
|
8103
8103
|
}
|
|
@@ -11825,7 +11825,7 @@ export const operations = [
|
|
|
11825
11825
|
"resource": "database.databases",
|
|
11826
11826
|
"method": "list",
|
|
11827
11827
|
"summary": "List databases",
|
|
11828
|
-
"description": "Find databases owned by your tenant and obtain their ids for schema or row operations. Excludes deleting by default. status=active or status=deleting selects that state; invalid values return 400 INVALID_PARAMS.",
|
|
11828
|
+
"description": "Deprecated: use praxis.database.table.list for a table database or praxis.database.kv.list for a key-value database instead; this path stops working on 2027-03-01. Find databases owned by your tenant and obtain their ids for schema or row operations. Excludes deleting by default. status=active or status=deleting selects that state; invalid values return 400 INVALID_PARAMS.",
|
|
11829
11829
|
"http": "GET",
|
|
11830
11830
|
"path": "/database/v1/databases",
|
|
11831
11831
|
"streaming": "no",
|
|
@@ -11866,13 +11866,1739 @@ export const operations = [
|
|
|
11866
11866
|
"resource": "database.databases",
|
|
11867
11867
|
"method": "create",
|
|
11868
11868
|
"summary": "Create database",
|
|
11869
|
-
"description": "Creates an empty database for the caller and returns it with status active (HTTP 201); add tables next with praxis.database.databases.tables.create. name is required and is 1–64 visible characters after trimming. labels are optional string tags (at most 64; each key starts with a lowercase letter and uses up to 63 characters of a-z 0-9 _ -; each value is up to 63 characters of a-z 0-9 _ -) that databaseListDatabases can filter on. If initialization fails the call returns 503 CAPACITY and the half-created database is left with status failed; retry by calling create again, which makes a new database. Unlike Supabase, this creates a SQLite-backed database without a PostgreSQL connection or SQL execution endpoint. Use a Praxis credential; access is scoped to its tenant, not to Supabase Auth users or RLS policies.",
|
|
11869
|
+
"description": "Deprecated: use praxis.database.table.create for a table database or praxis.database.kv.create for a key-value database instead; this path stops working on 2027-03-01. Creates an empty database for the caller and returns it with status active (HTTP 201); add tables next with praxis.database.databases.tables.create. name is required and is 1–64 visible characters after trimming. kind is optional: table (the default) for tables and rows, kv for Redis-style keys and values; it cannot change later, and creating kv where it is not available returns 400 INVALID_PARAMS: kind kv is not available. labels are optional string tags (at most 64; each key starts with a lowercase letter and uses up to 63 characters of a-z 0-9 _ -; each value is up to 63 characters of a-z 0-9 _ -) that databaseListDatabases can filter on. If initialization fails the call returns 503 CAPACITY and the half-created database is left with status failed; retry by calling create again, which makes a new database. Unlike Supabase, this creates a SQLite-backed database without a PostgreSQL connection or SQL execution endpoint. Use a Praxis credential; access is scoped to its tenant, not to Supabase Auth users or RLS policies.",
|
|
11870
11870
|
"http": "POST",
|
|
11871
11871
|
"path": "/database/v1/databases",
|
|
11872
11872
|
"streaming": "no",
|
|
11873
11873
|
"pagination": false,
|
|
11874
11874
|
"pathParams": [],
|
|
11875
11875
|
"query": [],
|
|
11876
|
+
"body": {
|
|
11877
|
+
"required": true,
|
|
11878
|
+
"fields": [
|
|
11879
|
+
{
|
|
11880
|
+
"name": "name",
|
|
11881
|
+
"type": "string",
|
|
11882
|
+
"required": true,
|
|
11883
|
+
"description": "Display name for the database: 1–64 visible characters after trimming; control characters are rejected. It is not an identifier, so later calls still use the returned id."
|
|
11884
|
+
},
|
|
11885
|
+
{
|
|
11886
|
+
"name": "labels",
|
|
11887
|
+
"type": "object",
|
|
11888
|
+
"required": false,
|
|
11889
|
+
"description": "Optional string tags to attach, at most 64. Each key starts with a lowercase letter and may use up to 63 characters of a-z 0-9 _ -; each value is up to 63 characters of a-z 0-9 _ -. List calls filter on exact key and value pairs."
|
|
11890
|
+
},
|
|
11891
|
+
{
|
|
11892
|
+
"name": "kind",
|
|
11893
|
+
"type": "string",
|
|
11894
|
+
"enum": [
|
|
11895
|
+
"table",
|
|
11896
|
+
"kv"
|
|
11897
|
+
],
|
|
11898
|
+
"required": false,
|
|
11899
|
+
"description": "What the database stores; omitted means table. It cannot be changed after creation, and an update that carries kind returns 400 INVALID_PARAMS. Creating kv in an organization that has not been opened for it returns 400 INVALID_PARAMS: kind kv is not available."
|
|
11900
|
+
}
|
|
11901
|
+
]
|
|
11902
|
+
}
|
|
11903
|
+
},
|
|
11904
|
+
{
|
|
11905
|
+
"resource": "database.databases",
|
|
11906
|
+
"method": "delete",
|
|
11907
|
+
"summary": "Delete database",
|
|
11908
|
+
"description": "Deprecated: use praxis.database.table.delete for a table database or praxis.database.kv.delete for a key-value database instead; this path stops working on 2027-03-01. Soft-delete a database when it should stop accepting schema and row operations. Idempotently enters deleting with a seven-day purge_at. GET remains available; child operations return 409 until restored.",
|
|
11909
|
+
"http": "DELETE",
|
|
11910
|
+
"path": "/database/v1/databases/{database_id}",
|
|
11911
|
+
"streaming": "no",
|
|
11912
|
+
"pagination": false,
|
|
11913
|
+
"pathParams": [
|
|
11914
|
+
{
|
|
11915
|
+
"name": "database_id",
|
|
11916
|
+
"sdkName": "database_id",
|
|
11917
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
11918
|
+
}
|
|
11919
|
+
],
|
|
11920
|
+
"query": []
|
|
11921
|
+
},
|
|
11922
|
+
{
|
|
11923
|
+
"resource": "database.databases",
|
|
11924
|
+
"method": "retrieve",
|
|
11925
|
+
"summary": "Get database",
|
|
11926
|
+
"description": "Deprecated: use praxis.database.table.retrieve for a table database or praxis.database.kv.retrieve for a key-value database instead; this path stops working on 2027-03-01. Returns one database by id, including a database in the deleting state (purge_at then shows when it will be permanently removed). Call it before table or row operations to confirm status is active: schema and row calls on a deleting database return 409 DATABASE_INVALID_STATE. size_bytes is refreshed from live storage at most once every five seconds. A purged or unknown id returns 404 DATABASE_NOT_FOUND.",
|
|
11927
|
+
"http": "GET",
|
|
11928
|
+
"path": "/database/v1/databases/{database_id}",
|
|
11929
|
+
"streaming": "no",
|
|
11930
|
+
"pagination": false,
|
|
11931
|
+
"pathParams": [
|
|
11932
|
+
{
|
|
11933
|
+
"name": "database_id",
|
|
11934
|
+
"sdkName": "database_id",
|
|
11935
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
11936
|
+
}
|
|
11937
|
+
],
|
|
11938
|
+
"query": []
|
|
11939
|
+
},
|
|
11940
|
+
{
|
|
11941
|
+
"resource": "database.databases",
|
|
11942
|
+
"method": "update",
|
|
11943
|
+
"summary": "Update database",
|
|
11944
|
+
"description": "Deprecated: use praxis.database.table.update for a table database or praxis.database.kv.update for a key-value database instead; this path stops working on 2027-03-01. Renames an active database and/or replaces its labels; send only the keys you want to change. labels is replaced as a whole, not merged, so include every label you want to keep. A body without name or labels, or with values equal to the current ones, changes nothing and leaves updated_at as is. A database in the deleting state returns 409 DATABASE_INVALID_STATE; restore it first with databaseRestoreDatabase.",
|
|
11945
|
+
"http": "PATCH",
|
|
11946
|
+
"path": "/database/v1/databases/{database_id}",
|
|
11947
|
+
"streaming": "no",
|
|
11948
|
+
"pagination": false,
|
|
11949
|
+
"pathParams": [
|
|
11950
|
+
{
|
|
11951
|
+
"name": "database_id",
|
|
11952
|
+
"sdkName": "database_id",
|
|
11953
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
11954
|
+
}
|
|
11955
|
+
],
|
|
11956
|
+
"query": [],
|
|
11957
|
+
"body": {
|
|
11958
|
+
"required": true,
|
|
11959
|
+
"fields": [
|
|
11960
|
+
{
|
|
11961
|
+
"name": "name",
|
|
11962
|
+
"type": "string",
|
|
11963
|
+
"required": false,
|
|
11964
|
+
"description": "New display name, 1–64 visible characters after trimming. Omit it to keep the current name."
|
|
11965
|
+
},
|
|
11966
|
+
{
|
|
11967
|
+
"name": "labels",
|
|
11968
|
+
"type": "object",
|
|
11969
|
+
"required": false,
|
|
11970
|
+
"description": "Complete replacement label set, not a merge: labels not listed here are removed. Same limits as at creation (at most 64; keys a-z 0-9 _ - starting with a letter; values up to 63 characters of a-z 0-9 _ -). Omit it to keep the current labels."
|
|
11971
|
+
}
|
|
11972
|
+
]
|
|
11973
|
+
}
|
|
11974
|
+
},
|
|
11975
|
+
{
|
|
11976
|
+
"resource": "database.databases.commands",
|
|
11977
|
+
"method": "execute",
|
|
11978
|
+
"summary": "Execute command",
|
|
11979
|
+
"description": "Deprecated: use praxis.database.kv.commands.execute instead; this path stops working on 2027-03-01. Run one Redis command with Redis 7 semantics against a key-value database and get its reply; use it for what the key operations cannot do: counters (INCR), list and set operations, ranges (LRANGE, ZRANGE), scans (SCAN, HSCAN) and expiry commands. For one whole-value read or write use databaseGetKey / databaseSetKey; for existing Redis clients use the Upstash-compatible face under /redis. command is the command name followed by its arguments, every element a string, for example [\"SET\",\"k\",\"v\"] or [\"LRANGE\",\"queue\",\"0\",\"9\"]. result is Redis's reply as plain JSON (integers, strings, arrays, null), never base64. Not supported: Lua scripting (EVAL), blocking commands, Pub/Sub and Streams. A value is at most 1 MiB, a key at most 1 KiB, a reply at most 8 MiB (read big collections in ranges with SCAN, HSCAN, LRANGE or ZRANGE) and the database at most 1 GiB. A read command needs a read credential; a write command, or a command that cannot be parsed, needs a read-write credential. Errors: 400 KV_COMMAND_ERROR when Redis rejects the command, with Redis's own text in message (for example WRONGTYPE Operation against a key holding the wrong kind of value or ERR unknown command); 400 INVALID_PARAMS for a missing or empty command; 404 DATABASE_NOT_FOUND; 409 DATABASE_KIND_MISMATCH; 403 BINDING_READ_ONLY for a write on a read-only credential.",
|
|
11980
|
+
"http": "POST",
|
|
11981
|
+
"path": "/database/v1/databases/{database_id}/commands",
|
|
11982
|
+
"streaming": "no",
|
|
11983
|
+
"pagination": false,
|
|
11984
|
+
"pathParams": [
|
|
11985
|
+
{
|
|
11986
|
+
"name": "database_id",
|
|
11987
|
+
"sdkName": "database_id",
|
|
11988
|
+
"description": "Identifier of the key-value database: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases for a database created with kind kv. A display name is not accepted; a table database returns 409 DATABASE_KIND_MISMATCH."
|
|
11989
|
+
}
|
|
11990
|
+
],
|
|
11991
|
+
"query": [],
|
|
11992
|
+
"body": {
|
|
11993
|
+
"required": true,
|
|
11994
|
+
"fields": [
|
|
11995
|
+
{
|
|
11996
|
+
"name": "command",
|
|
11997
|
+
"type": "array",
|
|
11998
|
+
"itemType": "string",
|
|
11999
|
+
"required": true,
|
|
12000
|
+
"description": "The Redis command name followed by its arguments, every element a string, for example [\"INCR\",\"counter\"] or [\"LRANGE\",\"queue\",\"0\",\"9\"]; one command per call."
|
|
12001
|
+
}
|
|
12002
|
+
]
|
|
12003
|
+
}
|
|
12004
|
+
},
|
|
12005
|
+
{
|
|
12006
|
+
"resource": "database.databases.events",
|
|
12007
|
+
"method": "list",
|
|
12008
|
+
"summary": "List events",
|
|
12009
|
+
"description": "Deprecated: use praxis.database.table.events.list for a table database or praxis.database.kv.events.list for a key-value database instead; this path stops working on 2027-03-01. Read lifecycle and schema events, including while the database is deleting. next_cursor is an opaque string cursor (do not do arithmetic on it): pass it as after_seq for asc or before_seq for desc. Supplying both cursors returns 400 INVALID_PARAMS. Unlike Supabase Realtime, this is paged lifecycle and schema history, not a subscription or a row-change feed; row inserts, updates and deletes do not appear here.",
|
|
12010
|
+
"http": "GET",
|
|
12011
|
+
"path": "/database/v1/databases/{database_id}/events",
|
|
12012
|
+
"streaming": "no",
|
|
12013
|
+
"pagination": false,
|
|
12014
|
+
"pathParams": [
|
|
12015
|
+
{
|
|
12016
|
+
"name": "database_id",
|
|
12017
|
+
"sdkName": "database_id",
|
|
12018
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
12019
|
+
}
|
|
12020
|
+
],
|
|
12021
|
+
"query": [
|
|
12022
|
+
{
|
|
12023
|
+
"name": "after_seq",
|
|
12024
|
+
"type": "integer",
|
|
12025
|
+
"required": false,
|
|
12026
|
+
"description": "With order=asc, return only events with seq greater than this value. Cannot be combined with before_seq."
|
|
12027
|
+
},
|
|
12028
|
+
{
|
|
12029
|
+
"name": "limit",
|
|
12030
|
+
"type": "integer",
|
|
12031
|
+
"required": false,
|
|
12032
|
+
"description": "Page size."
|
|
12033
|
+
},
|
|
12034
|
+
{
|
|
12035
|
+
"name": "order",
|
|
12036
|
+
"type": "string",
|
|
12037
|
+
"enum": [
|
|
12038
|
+
"asc",
|
|
12039
|
+
"desc"
|
|
12040
|
+
],
|
|
12041
|
+
"required": false,
|
|
12042
|
+
"description": "Sequence order: asc or desc (newest first). Defaults to asc, or to desc when before_seq is supplied."
|
|
12043
|
+
},
|
|
12044
|
+
{
|
|
12045
|
+
"name": "before_seq",
|
|
12046
|
+
"type": "integer",
|
|
12047
|
+
"required": false,
|
|
12048
|
+
"description": "Return only events with seq less than this value, newest first; implies order=desc when order is omitted. Cannot be combined with after_seq or order=asc."
|
|
12049
|
+
}
|
|
12050
|
+
]
|
|
12051
|
+
},
|
|
12052
|
+
{
|
|
12053
|
+
"resource": "database.databases.keys",
|
|
12054
|
+
"method": "list",
|
|
12055
|
+
"summary": "List keys",
|
|
12056
|
+
"description": "Deprecated: use praxis.database.kv.keys.list instead; this path stops working on 2027-03-01. Browse the keys of a key-value database (kind kv): use it to see what is stored before reading one key with databaseGetKey; to run an arbitrary Redis command (counters, ranges, scans) use databaseExecuteCommand instead. Keys come back in lexicographic key order, one page at a time, as summaries (key, type, remaining TTL, size) without values; expired keys are never returned. pattern filters with a Redis glob (* ? [abc] [^abc]) matched against the whole key, and type keeps one value type. limit is 1–500, default 50; while next_cursor is a string, pass it back unchanged as cursor for the next page; null means this is the last page. Needs a read credential. Errors: 400 INVALID_PARAMS for a limit outside 1–500 or a malformed query; 404 DATABASE_NOT_FOUND for an unknown id; 409 DATABASE_KIND_MISMATCH when the database is a table database.",
|
|
12057
|
+
"http": "GET",
|
|
12058
|
+
"path": "/database/v1/databases/{database_id}/keys",
|
|
12059
|
+
"streaming": "no",
|
|
12060
|
+
"pagination": true,
|
|
12061
|
+
"pathParams": [
|
|
12062
|
+
{
|
|
12063
|
+
"name": "database_id",
|
|
12064
|
+
"sdkName": "database_id",
|
|
12065
|
+
"description": "Identifier of the key-value database: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases for a database created with kind kv. A display name is not accepted; a table database returns 409 DATABASE_KIND_MISMATCH."
|
|
12066
|
+
}
|
|
12067
|
+
],
|
|
12068
|
+
"query": [
|
|
12069
|
+
{
|
|
12070
|
+
"name": "limit",
|
|
12071
|
+
"type": "integer",
|
|
12072
|
+
"required": false,
|
|
12073
|
+
"description": "Keys per page, 1–500, default 50; a value outside the range returns 400 INVALID_PARAMS."
|
|
12074
|
+
},
|
|
12075
|
+
{
|
|
12076
|
+
"name": "cursor",
|
|
12077
|
+
"type": "string",
|
|
12078
|
+
"required": false,
|
|
12079
|
+
"description": "The next_cursor of the previous page, passed back unchanged; omit it to start from the first key."
|
|
12080
|
+
},
|
|
12081
|
+
{
|
|
12082
|
+
"name": "pattern",
|
|
12083
|
+
"type": "string",
|
|
12084
|
+
"required": false,
|
|
12085
|
+
"description": "Redis glob (* any run, ? one character, [abc] a set, [^abc] a negated set) matched against the whole key, for example user:*; omitted returns every key."
|
|
12086
|
+
},
|
|
12087
|
+
{
|
|
12088
|
+
"name": "type",
|
|
12089
|
+
"type": "string",
|
|
12090
|
+
"enum": [
|
|
12091
|
+
"string",
|
|
12092
|
+
"hash",
|
|
12093
|
+
"list",
|
|
12094
|
+
"set",
|
|
12095
|
+
"zset"
|
|
12096
|
+
],
|
|
12097
|
+
"required": false,
|
|
12098
|
+
"description": "Return only keys holding this value type; omitted returns every type."
|
|
12099
|
+
}
|
|
12100
|
+
]
|
|
12101
|
+
},
|
|
12102
|
+
{
|
|
12103
|
+
"resource": "database.databases.keys",
|
|
12104
|
+
"method": "delete",
|
|
12105
|
+
"summary": "Delete key",
|
|
12106
|
+
"description": "Deprecated: use praxis.database.kv.keys.delete instead; this path stops working on 2027-03-01. Delete one key of a key-value database together with its value; the data cannot be recovered. A key that is absent or has already expired is not an error: the call succeeds with deleted false, so it is safe to retry. To delete many keys at once or by pattern, list them with databaseListKeys or run DEL / UNLINK through databaseExecuteCommand. Needs a read-write credential. Errors: 404 DATABASE_NOT_FOUND for an unknown id; 409 DATABASE_KIND_MISMATCH for a table database; 403 BINDING_READ_ONLY for a read-only credential.",
|
|
12107
|
+
"http": "DELETE",
|
|
12108
|
+
"path": "/database/v1/databases/{database_id}/keys/{key}",
|
|
12109
|
+
"streaming": "no",
|
|
12110
|
+
"pagination": false,
|
|
12111
|
+
"pathParams": [
|
|
12112
|
+
{
|
|
12113
|
+
"name": "database_id",
|
|
12114
|
+
"sdkName": "database_id",
|
|
12115
|
+
"description": "Identifier of the key-value database: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases for a database created with kind kv. A display name is not accepted; a table database returns 409 DATABASE_KIND_MISMATCH."
|
|
12116
|
+
},
|
|
12117
|
+
{
|
|
12118
|
+
"name": "key",
|
|
12119
|
+
"sdkName": "key",
|
|
12120
|
+
"description": "The key to delete: any UTF-8 string up to 1 KiB, percent-encoded in the path (for example user%3A1 for user:1). Keys are case-sensitive."
|
|
12121
|
+
}
|
|
12122
|
+
],
|
|
12123
|
+
"query": []
|
|
12124
|
+
},
|
|
12125
|
+
{
|
|
12126
|
+
"resource": "database.databases.keys",
|
|
12127
|
+
"method": "retrieve",
|
|
12128
|
+
"summary": "Get key",
|
|
12129
|
+
"description": "Deprecated: use praxis.database.kv.keys.retrieve instead; this path stops working on 2027-03-01. Read one key of a key-value database with its type, TTL, size and value; use databaseListKeys first to find key names. A string value is returned whole. A hash, list, set or zset is returned a page of entries at a time: limit is 1–1000, default 100, and while next_cursor is a string, pass it back unchanged as cursor to read the next page; string values and the last page return next_cursor null. value takes the shape of type: a string; hash as [{field, value}]; list and set as a string array; zset as [{member, score}]. Needs a read credential. Errors: 404 KEY_NOT_FOUND when the key does not exist or has expired; 400 INVALID_PARAMS for a limit outside 1–1000; 404 DATABASE_NOT_FOUND; 409 DATABASE_KIND_MISMATCH for a table database.",
|
|
12130
|
+
"http": "GET",
|
|
12131
|
+
"path": "/database/v1/databases/{database_id}/keys/{key}",
|
|
12132
|
+
"streaming": "no",
|
|
12133
|
+
"pagination": false,
|
|
12134
|
+
"pathParams": [
|
|
12135
|
+
{
|
|
12136
|
+
"name": "database_id",
|
|
12137
|
+
"sdkName": "database_id",
|
|
12138
|
+
"description": "Identifier of the key-value database: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases for a database created with kind kv. A display name is not accepted; a table database returns 409 DATABASE_KIND_MISMATCH."
|
|
12139
|
+
},
|
|
12140
|
+
{
|
|
12141
|
+
"name": "key",
|
|
12142
|
+
"sdkName": "key",
|
|
12143
|
+
"description": "The key to read: any UTF-8 string up to 1 KiB, percent-encoded in the path (for example user%3A1 for user:1). Keys are case-sensitive."
|
|
12144
|
+
}
|
|
12145
|
+
],
|
|
12146
|
+
"query": [
|
|
12147
|
+
{
|
|
12148
|
+
"name": "limit",
|
|
12149
|
+
"type": "integer",
|
|
12150
|
+
"required": false,
|
|
12151
|
+
"description": "Container entries per page, 1–1000, default 100; ignored for a string value, which is never paged."
|
|
12152
|
+
},
|
|
12153
|
+
{
|
|
12154
|
+
"name": "cursor",
|
|
12155
|
+
"type": "string",
|
|
12156
|
+
"required": false,
|
|
12157
|
+
"description": "The next_cursor of the previous page of this key, passed back unchanged; omit it for the first page."
|
|
12158
|
+
}
|
|
12159
|
+
]
|
|
12160
|
+
},
|
|
12161
|
+
{
|
|
12162
|
+
"resource": "database.databases.keys",
|
|
12163
|
+
"method": "update",
|
|
12164
|
+
"summary": "Update key",
|
|
12165
|
+
"description": "Deprecated: use praxis.database.kv.keys.update instead; this path stops working on 2027-03-01. Change only the TTL of an existing key of a key-value database, leaving its value alone. update_mask must be ttl_ms (the only writable field) and ttl_ms is required: a positive integer is the new TTL in milliseconds (Redis PEXPIRE), null removes the TTL so the key never expires (PERSIST). To replace the value use databaseSetKey. Returns the key after the change. Needs a read-write credential. Errors: 404 KEY_NOT_FOUND when the key does not exist or has expired; 400 INVALID_PARAMS when update_mask is not ttl_ms or ttl_ms is neither a positive integer nor null; 404 DATABASE_NOT_FOUND; 409 DATABASE_KIND_MISMATCH; 403 BINDING_READ_ONLY.",
|
|
12166
|
+
"http": "PATCH",
|
|
12167
|
+
"path": "/database/v1/databases/{database_id}/keys/{key}",
|
|
12168
|
+
"streaming": "no",
|
|
12169
|
+
"pagination": false,
|
|
12170
|
+
"pathParams": [
|
|
12171
|
+
{
|
|
12172
|
+
"name": "database_id",
|
|
12173
|
+
"sdkName": "database_id",
|
|
12174
|
+
"description": "Identifier of the key-value database: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases for a database created with kind kv. A display name is not accepted; a table database returns 409 DATABASE_KIND_MISMATCH."
|
|
12175
|
+
},
|
|
12176
|
+
{
|
|
12177
|
+
"name": "key",
|
|
12178
|
+
"sdkName": "key",
|
|
12179
|
+
"description": "The key whose TTL changes: any UTF-8 string up to 1 KiB, percent-encoded in the path (for example user%3A1 for user:1). Keys are case-sensitive."
|
|
12180
|
+
}
|
|
12181
|
+
],
|
|
12182
|
+
"query": [],
|
|
12183
|
+
"body": {
|
|
12184
|
+
"required": true,
|
|
12185
|
+
"fields": [
|
|
12186
|
+
{
|
|
12187
|
+
"name": "update_mask",
|
|
12188
|
+
"type": "string",
|
|
12189
|
+
"enum": [
|
|
12190
|
+
"ttl_ms"
|
|
12191
|
+
],
|
|
12192
|
+
"required": true,
|
|
12193
|
+
"description": "The field being changed; only ttl_ms is writable and it must be stated."
|
|
12194
|
+
},
|
|
12195
|
+
{
|
|
12196
|
+
"name": "ttl_ms",
|
|
12197
|
+
"type": "integer",
|
|
12198
|
+
"required": true,
|
|
12199
|
+
"description": "A positive integer sets the TTL in milliseconds from now; null removes the TTL so the key never expires."
|
|
12200
|
+
}
|
|
12201
|
+
]
|
|
12202
|
+
}
|
|
12203
|
+
},
|
|
12204
|
+
{
|
|
12205
|
+
"resource": "database.databases.keys",
|
|
12206
|
+
"method": "set",
|
|
12207
|
+
"summary": "Set key",
|
|
12208
|
+
"description": "Deprecated: use praxis.database.kv.keys.set instead; this path stops working on 2027-03-01. Overwrite one key of a key-value database with a whole new value in a single transaction, creating it if absent; the previous value is dropped first and never merged, even when the type changes. To change only the TTL use databaseUpdateKey; to add to a counter or push onto a list use databaseExecuteCommand. type decides the shape of value: a string; hash as [{field, value}]; list and set as a string array; zset as [{member, score}] with finite scores. Containers must not be empty, and hash fields and set members must be unique. ttl_ms omitted keeps the key's existing TTL, a positive integer sets a new one in milliseconds, null makes the key permanent. A value is at most 1 MiB and a key at most 1 KiB. Returns the stored key (first page for a container). Needs a read-write credential. Errors: 400 INVALID_PARAMS for an empty container, duplicate field or member, non-finite score or bad ttl_ms; 400 LIMIT_EXCEEDED for an oversized key or value; 503 CAPACITY when the database is full; 404 DATABASE_NOT_FOUND; 409 DATABASE_KIND_MISMATCH; 403 BINDING_READ_ONLY for a read-only credential.",
|
|
12209
|
+
"http": "PUT",
|
|
12210
|
+
"path": "/database/v1/databases/{database_id}/keys/{key}",
|
|
12211
|
+
"streaming": "no",
|
|
12212
|
+
"pagination": false,
|
|
12213
|
+
"pathParams": [
|
|
12214
|
+
{
|
|
12215
|
+
"name": "database_id",
|
|
12216
|
+
"sdkName": "database_id",
|
|
12217
|
+
"description": "Identifier of the key-value database: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases for a database created with kind kv. A display name is not accepted; a table database returns 409 DATABASE_KIND_MISMATCH."
|
|
12218
|
+
},
|
|
12219
|
+
{
|
|
12220
|
+
"name": "key",
|
|
12221
|
+
"sdkName": "key",
|
|
12222
|
+
"description": "The key to write: any UTF-8 string up to 1 KiB, percent-encoded in the path (for example user%3A1 for user:1). Keys are case-sensitive."
|
|
12223
|
+
}
|
|
12224
|
+
],
|
|
12225
|
+
"query": [],
|
|
12226
|
+
"body": {
|
|
12227
|
+
"required": true,
|
|
12228
|
+
"fields": [
|
|
12229
|
+
{
|
|
12230
|
+
"name": "type",
|
|
12231
|
+
"type": "string",
|
|
12232
|
+
"enum": [
|
|
12233
|
+
"string",
|
|
12234
|
+
"hash",
|
|
12235
|
+
"list",
|
|
12236
|
+
"set",
|
|
12237
|
+
"zset"
|
|
12238
|
+
],
|
|
12239
|
+
"required": true,
|
|
12240
|
+
"description": "Type of the new value; it becomes the key's type and replaces whatever was stored under it."
|
|
12241
|
+
},
|
|
12242
|
+
{
|
|
12243
|
+
"name": "value",
|
|
12244
|
+
"type": "object",
|
|
12245
|
+
"required": true,
|
|
12246
|
+
"description": "The whole new value in the shape of type: a string; hash as [{field, value}]; list and set as a non-empty string array; zset as [{member, score}]. At most 1 MiB."
|
|
12247
|
+
},
|
|
12248
|
+
{
|
|
12249
|
+
"name": "ttl_ms",
|
|
12250
|
+
"type": "integer",
|
|
12251
|
+
"required": false,
|
|
12252
|
+
"description": "Omit to keep the key's existing TTL; a positive integer sets a new TTL in milliseconds; null makes the key permanent."
|
|
12253
|
+
}
|
|
12254
|
+
]
|
|
12255
|
+
}
|
|
12256
|
+
},
|
|
12257
|
+
{
|
|
12258
|
+
"resource": "database.databases.purge",
|
|
12259
|
+
"method": "create",
|
|
12260
|
+
"summary": "Permanently purge database",
|
|
12261
|
+
"description": "Deprecated: use praxis.database.table.purge.create for a table database or praxis.database.kv.purge.create for a key-value database instead; this path stops working on 2027-03-01. Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.",
|
|
12262
|
+
"http": "POST",
|
|
12263
|
+
"path": "/database/v1/databases/{database_id}/purge",
|
|
12264
|
+
"streaming": "no",
|
|
12265
|
+
"pagination": false,
|
|
12266
|
+
"pathParams": [
|
|
12267
|
+
{
|
|
12268
|
+
"name": "database_id",
|
|
12269
|
+
"sdkName": "database_id",
|
|
12270
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
12271
|
+
}
|
|
12272
|
+
],
|
|
12273
|
+
"query": []
|
|
12274
|
+
},
|
|
12275
|
+
{
|
|
12276
|
+
"resource": "database.databases.rest",
|
|
12277
|
+
"method": "delete",
|
|
12278
|
+
"summary": "Delete rows",
|
|
12279
|
+
"description": "Deprecated: use praxis.database.table.rest.delete instead; this path stops working on 2027-03-01. Deletes the rows matched by the filter query parameters (the same filters as databaseSelect); with no filter every row of the table matches. Deletion is immediate and cannot be undone. A row that a link field of another table still references makes the whole call fail with 409 REFERENCE_RESTRICT and nothing is deleted. The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the deleted rows.",
|
|
12280
|
+
"http": "DELETE",
|
|
12281
|
+
"path": "/database/v1/databases/{database_id}/rest/{table}",
|
|
12282
|
+
"streaming": "no",
|
|
12283
|
+
"pagination": false,
|
|
12284
|
+
"pathParams": [
|
|
12285
|
+
{
|
|
12286
|
+
"name": "database_id",
|
|
12287
|
+
"sdkName": "database_id",
|
|
12288
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
12289
|
+
},
|
|
12290
|
+
{
|
|
12291
|
+
"name": "table",
|
|
12292
|
+
"sdkName": "table",
|
|
12293
|
+
"description": "table ID or name."
|
|
12294
|
+
}
|
|
12295
|
+
],
|
|
12296
|
+
"query": [
|
|
12297
|
+
{
|
|
12298
|
+
"name": "select",
|
|
12299
|
+
"type": "string",
|
|
12300
|
+
"required": false,
|
|
12301
|
+
"description": "Comma-separated columns; supports *, aliases, JSON paths and link-based embedding. Casts, aggregates, spread and join modifiers are unsupported."
|
|
12302
|
+
},
|
|
12303
|
+
{
|
|
12304
|
+
"name": "{column}",
|
|
12305
|
+
"type": "string",
|
|
12306
|
+
"required": false,
|
|
12307
|
+
"description": "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. Supported operators: eq (equal), neq (not equal; ne is not supported), gt/gte/lt/lte (comparisons), like (case-sensitive text pattern), ilike (case-insensitive text pattern), in (membership), is (null/boolean test), cs (contains), cd (contained by), and ov (array overlap). For like/ilike, * or % matches any sequence and _ matches one character, e.g. title=ilike.*spring*; URL-encode a literal % as %25. Use days=in.(1,2,3), title=is.null, active=is.true or active=is.false; is.not_null and is.unknown are also accepted (unknown means null). Negate a condition with not., e.g. title=not.eq.draft. Multiple filters are ANDed; use or=(title.eq.a,title.eq.b), and=(days.gte.1,days.lte.3), not.or=(...) or not.and=(...), with nested and(...) and or(...) groups as needed. cs/cd accept JSON objects or arrays on JSON fields; cs also accepts a JSON scalar. For array values or multi-link fields, use cs.{a,b}, cd.{a,b} or ov.{a,b}. JSON paths use -> for JSON and ->> for text, e.g. attributes->>has_onsen=eq.true or attributes->tags=cs.[1,2]; chain -> segments and end with ->> for text. Dot paths such as attributes.has_onsen are unsupported. Full-text, regex, range operators and any/all modifiers are unsupported."
|
|
12308
|
+
},
|
|
12309
|
+
{
|
|
12310
|
+
"name": "and",
|
|
12311
|
+
"type": "string",
|
|
12312
|
+
"required": false,
|
|
12313
|
+
"description": "Parenthesized conditions, e.g. (done.eq.false,title.neq.draft)."
|
|
12314
|
+
},
|
|
12315
|
+
{
|
|
12316
|
+
"name": "or",
|
|
12317
|
+
"type": "string",
|
|
12318
|
+
"required": false,
|
|
12319
|
+
"description": "Parenthesized alternatives; not.and and not.or are also supported."
|
|
12320
|
+
},
|
|
12321
|
+
{
|
|
12322
|
+
"name": "not.and",
|
|
12323
|
+
"type": "string",
|
|
12324
|
+
"required": false,
|
|
12325
|
+
"description": "Negated conjunction."
|
|
12326
|
+
},
|
|
12327
|
+
{
|
|
12328
|
+
"name": "not.or",
|
|
12329
|
+
"type": "string",
|
|
12330
|
+
"required": false,
|
|
12331
|
+
"description": "Negated disjunction."
|
|
12332
|
+
},
|
|
12333
|
+
{
|
|
12334
|
+
"name": "order",
|
|
12335
|
+
"type": "string",
|
|
12336
|
+
"required": false,
|
|
12337
|
+
"description": "Comma-separated columns with asc/desc and nullsfirst/nullslast; JSON paths allowed."
|
|
12338
|
+
},
|
|
12339
|
+
{
|
|
12340
|
+
"name": "limit",
|
|
12341
|
+
"type": "integer",
|
|
12342
|
+
"required": false,
|
|
12343
|
+
"description": "Maximum returned rows."
|
|
12344
|
+
},
|
|
12345
|
+
{
|
|
12346
|
+
"name": "offset",
|
|
12347
|
+
"type": "integer",
|
|
12348
|
+
"required": false,
|
|
12349
|
+
"description": "Rows to skip."
|
|
12350
|
+
},
|
|
12351
|
+
{
|
|
12352
|
+
"name": "on_conflict",
|
|
12353
|
+
"type": "string",
|
|
12354
|
+
"required": false,
|
|
12355
|
+
"description": "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
12356
|
+
},
|
|
12357
|
+
{
|
|
12358
|
+
"name": "columns",
|
|
12359
|
+
"type": "string",
|
|
12360
|
+
"required": false,
|
|
12361
|
+
"description": "Comma-separated input columns; keys outside this set are ignored."
|
|
12362
|
+
}
|
|
12363
|
+
],
|
|
12364
|
+
"headers": [
|
|
12365
|
+
{
|
|
12366
|
+
"name": "Range-Unit",
|
|
12367
|
+
"type": "string",
|
|
12368
|
+
"required": false,
|
|
12369
|
+
"description": "items; other units cause Range to be ignored."
|
|
12370
|
+
},
|
|
12371
|
+
{
|
|
12372
|
+
"name": "Prefer",
|
|
12373
|
+
"type": "string",
|
|
12374
|
+
"required": false,
|
|
12375
|
+
"description": "Comma-separated preferences. count=exact|planned|estimated: unfiltered counts are exact; filtered planned reports *, estimated falls back to * when predicted over budget. missing=default skips null-filling of missing batch columns: inserts use field defaults (or null without a default), while conflict merges preserve omitted columns. Otherwise, holes in the batch key union are filled with null and can clear values during merge. Explicit null stays null. resolution=merge-duplicates updates supplied columns on conflict; resolution=ignore-duplicates leaves conflicting rows unchanged. Unknown preferences are ignored unless handling=strict (400 PGRST122)."
|
|
12376
|
+
}
|
|
12377
|
+
]
|
|
12378
|
+
},
|
|
12379
|
+
{
|
|
12380
|
+
"resource": "database.databases.rest",
|
|
12381
|
+
"method": "retrieve",
|
|
12382
|
+
"summary": "Select rows",
|
|
12383
|
+
"description": "Deprecated: use praxis.database.table.rest.retrieve instead; this path stops working on 2027-03-01. Read matching rows with filters, selected columns and ordering. Returns at most 1000 rows per request, including when limit is omitted. Content-Range reports the actual returned interval and the total when count is requested. PATCH and DELETE are not subject to this read cap. Unlike Supabase, casts, aggregates, spread and join modifiers are unsupported. Each table supports up to 1,000,000 rows. Query budget: 8,000 ms with a shared 3,000,000-row safety ceiling. Create indexes on filtered or sorted fields, or narrow the request when it exceeds its budget. Synchronous SQLite aggregates use candidate-row throughput estimates before execution; deployed Workers freeze clocks during synchronous CPU work, so the timer is not a guaranteed server-side interrupt. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24/*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Error table: QUERY_CANCELED / PostgREST 57014 is HTTP 500, retryable=false: Query timed out: index filtered or sorted fields, or narrow the range. DATABASE_INVALID_STATE is HTTP 409 for operations on a deleting database. Cleared or nonexistent databases return DATABASE_NOT_FOUND / HTTP 404. The count is an HTTP Content-Range response header, not a JSON property. Use praxis.database.count in the SDK or codemode to return { count: number | null }; a page length is not a total unless you know all matches fit in that page.",
|
|
12384
|
+
"http": "GET",
|
|
12385
|
+
"path": "/database/v1/databases/{database_id}/rest/{table}",
|
|
12386
|
+
"streaming": "no",
|
|
12387
|
+
"pagination": false,
|
|
12388
|
+
"pathParams": [
|
|
12389
|
+
{
|
|
12390
|
+
"name": "database_id",
|
|
12391
|
+
"sdkName": "database_id",
|
|
12392
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
12393
|
+
},
|
|
12394
|
+
{
|
|
12395
|
+
"name": "table",
|
|
12396
|
+
"sdkName": "table",
|
|
12397
|
+
"description": "table ID or name."
|
|
12398
|
+
}
|
|
12399
|
+
],
|
|
12400
|
+
"query": [
|
|
12401
|
+
{
|
|
12402
|
+
"name": "select",
|
|
12403
|
+
"type": "string",
|
|
12404
|
+
"required": false,
|
|
12405
|
+
"description": "Comma-separated columns; supports *, aliases, JSON paths and link-based embedding. Casts, aggregates, spread and join modifiers are unsupported."
|
|
12406
|
+
},
|
|
12407
|
+
{
|
|
12408
|
+
"name": "{column}",
|
|
12409
|
+
"type": "string",
|
|
12410
|
+
"required": false,
|
|
12411
|
+
"description": "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. Supported operators: eq (equal), neq (not equal; ne is not supported), gt/gte/lt/lte (comparisons), like (case-sensitive text pattern), ilike (case-insensitive text pattern), in (membership), is (null/boolean test), cs (contains), cd (contained by), and ov (array overlap). For like/ilike, * or % matches any sequence and _ matches one character, e.g. title=ilike.*spring*; URL-encode a literal % as %25. Use days=in.(1,2,3), title=is.null, active=is.true or active=is.false; is.not_null and is.unknown are also accepted (unknown means null). Negate a condition with not., e.g. title=not.eq.draft. Multiple filters are ANDed; use or=(title.eq.a,title.eq.b), and=(days.gte.1,days.lte.3), not.or=(...) or not.and=(...), with nested and(...) and or(...) groups as needed. cs/cd accept JSON objects or arrays on JSON fields; cs also accepts a JSON scalar. For array values or multi-link fields, use cs.{a,b}, cd.{a,b} or ov.{a,b}. JSON paths use -> for JSON and ->> for text, e.g. attributes->>has_onsen=eq.true or attributes->tags=cs.[1,2]; chain -> segments and end with ->> for text. Dot paths such as attributes.has_onsen are unsupported. Full-text, regex, range operators and any/all modifiers are unsupported."
|
|
12412
|
+
},
|
|
12413
|
+
{
|
|
12414
|
+
"name": "and",
|
|
12415
|
+
"type": "string",
|
|
12416
|
+
"required": false,
|
|
12417
|
+
"description": "Parenthesized conditions, e.g. (done.eq.false,title.neq.draft)."
|
|
12418
|
+
},
|
|
12419
|
+
{
|
|
12420
|
+
"name": "or",
|
|
12421
|
+
"type": "string",
|
|
12422
|
+
"required": false,
|
|
12423
|
+
"description": "Parenthesized alternatives; not.and and not.or are also supported."
|
|
12424
|
+
},
|
|
12425
|
+
{
|
|
12426
|
+
"name": "not.and",
|
|
12427
|
+
"type": "string",
|
|
12428
|
+
"required": false,
|
|
12429
|
+
"description": "Negated conjunction."
|
|
12430
|
+
},
|
|
12431
|
+
{
|
|
12432
|
+
"name": "not.or",
|
|
12433
|
+
"type": "string",
|
|
12434
|
+
"required": false,
|
|
12435
|
+
"description": "Negated disjunction."
|
|
12436
|
+
},
|
|
12437
|
+
{
|
|
12438
|
+
"name": "order",
|
|
12439
|
+
"type": "string",
|
|
12440
|
+
"required": false,
|
|
12441
|
+
"description": "Comma-separated columns with asc/desc and nullsfirst/nullslast; JSON paths allowed."
|
|
12442
|
+
},
|
|
12443
|
+
{
|
|
12444
|
+
"name": "limit",
|
|
12445
|
+
"type": "integer",
|
|
12446
|
+
"required": false,
|
|
12447
|
+
"description": "Maximum page size. Defaults to 1000; values above 1000 are accepted and capped at 1000."
|
|
12448
|
+
},
|
|
12449
|
+
{
|
|
12450
|
+
"name": "offset",
|
|
12451
|
+
"type": "integer",
|
|
12452
|
+
"required": false,
|
|
12453
|
+
"description": "Rows to skip."
|
|
12454
|
+
},
|
|
12455
|
+
{
|
|
12456
|
+
"name": "on_conflict",
|
|
12457
|
+
"type": "string",
|
|
12458
|
+
"required": false,
|
|
12459
|
+
"description": "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
12460
|
+
},
|
|
12461
|
+
{
|
|
12462
|
+
"name": "columns",
|
|
12463
|
+
"type": "string",
|
|
12464
|
+
"required": false,
|
|
12465
|
+
"description": "Comma-separated input columns; keys outside this set are ignored."
|
|
12466
|
+
}
|
|
12467
|
+
],
|
|
12468
|
+
"headers": [
|
|
12469
|
+
{
|
|
12470
|
+
"name": "Range-Unit",
|
|
12471
|
+
"type": "string",
|
|
12472
|
+
"required": false,
|
|
12473
|
+
"description": "items; other units cause Range to be ignored."
|
|
12474
|
+
},
|
|
12475
|
+
{
|
|
12476
|
+
"name": "Prefer",
|
|
12477
|
+
"type": "string",
|
|
12478
|
+
"required": false,
|
|
12479
|
+
"description": "Comma-separated preferences. count=exact|planned|estimated: unfiltered counts are exact; filtered planned reports *, estimated falls back to * when predicted over budget. missing=default skips null-filling of missing batch columns: inserts use field defaults (or null without a default), while conflict merges preserve omitted columns. Otherwise, holes in the batch key union are filled with null and can clear values during merge. Explicit null stays null. resolution=merge-duplicates updates supplied columns on conflict; resolution=ignore-duplicates leaves conflicting rows unchanged. Unknown preferences are ignored unless handling=strict (400 PGRST122)."
|
|
12480
|
+
}
|
|
12481
|
+
]
|
|
12482
|
+
},
|
|
12483
|
+
{
|
|
12484
|
+
"resource": "database.databases.rest",
|
|
12485
|
+
"method": "head",
|
|
12486
|
+
"summary": "Count rows",
|
|
12487
|
+
"description": "Deprecated: use praxis.database.table.rest.head instead; this path stops working on 2027-03-01. Inspect the HTTP row count and range without retrieving row data; send Prefer: count=exact for a filtered count. Returns no body and does not fetch or serialize row data. A known count determines the interval using limit/offset or Range with a default and maximum page size of 1000. Without a count preference, or when the selected count mode cannot supply a total, Content-Range is */*. Singular Accept still validates page cardinality. Unlike Supabase, planned and estimated counts do not use PostgreSQL planner estimates. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24/*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Use praxis.database.count in the SDK or codemode to return { count: number | null } from this header without retrieving rows.",
|
|
12488
|
+
"http": "HEAD",
|
|
12489
|
+
"path": "/database/v1/databases/{database_id}/rest/{table}",
|
|
12490
|
+
"streaming": "no",
|
|
12491
|
+
"pagination": false,
|
|
12492
|
+
"pathParams": [
|
|
12493
|
+
{
|
|
12494
|
+
"name": "database_id",
|
|
12495
|
+
"sdkName": "database_id",
|
|
12496
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
12497
|
+
},
|
|
12498
|
+
{
|
|
12499
|
+
"name": "table",
|
|
12500
|
+
"sdkName": "table",
|
|
12501
|
+
"description": "table ID or name."
|
|
12502
|
+
}
|
|
12503
|
+
],
|
|
12504
|
+
"query": [
|
|
12505
|
+
{
|
|
12506
|
+
"name": "select",
|
|
12507
|
+
"type": "string",
|
|
12508
|
+
"required": false,
|
|
12509
|
+
"description": "Comma-separated columns; supports *, aliases, JSON paths and link-based embedding. Casts, aggregates, spread and join modifiers are unsupported."
|
|
12510
|
+
},
|
|
12511
|
+
{
|
|
12512
|
+
"name": "{column}",
|
|
12513
|
+
"type": "string",
|
|
12514
|
+
"required": false,
|
|
12515
|
+
"description": "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. Supported operators: eq (equal), neq (not equal; ne is not supported), gt/gte/lt/lte (comparisons), like (case-sensitive text pattern), ilike (case-insensitive text pattern), in (membership), is (null/boolean test), cs (contains), cd (contained by), and ov (array overlap). For like/ilike, * or % matches any sequence and _ matches one character, e.g. title=ilike.*spring*; URL-encode a literal % as %25. Use days=in.(1,2,3), title=is.null, active=is.true or active=is.false; is.not_null and is.unknown are also accepted (unknown means null). Negate a condition with not., e.g. title=not.eq.draft. Multiple filters are ANDed; use or=(title.eq.a,title.eq.b), and=(days.gte.1,days.lte.3), not.or=(...) or not.and=(...), with nested and(...) and or(...) groups as needed. cs/cd accept JSON objects or arrays on JSON fields; cs also accepts a JSON scalar. For array values or multi-link fields, use cs.{a,b}, cd.{a,b} or ov.{a,b}. JSON paths use -> for JSON and ->> for text, e.g. attributes->>has_onsen=eq.true or attributes->tags=cs.[1,2]; chain -> segments and end with ->> for text. Dot paths such as attributes.has_onsen are unsupported. Full-text, regex, range operators and any/all modifiers are unsupported."
|
|
12516
|
+
},
|
|
12517
|
+
{
|
|
12518
|
+
"name": "and",
|
|
12519
|
+
"type": "string",
|
|
12520
|
+
"required": false,
|
|
12521
|
+
"description": "Parenthesized conditions, e.g. (done.eq.false,title.neq.draft)."
|
|
12522
|
+
},
|
|
12523
|
+
{
|
|
12524
|
+
"name": "or",
|
|
12525
|
+
"type": "string",
|
|
12526
|
+
"required": false,
|
|
12527
|
+
"description": "Parenthesized alternatives; not.and and not.or are also supported."
|
|
12528
|
+
},
|
|
12529
|
+
{
|
|
12530
|
+
"name": "not.and",
|
|
12531
|
+
"type": "string",
|
|
12532
|
+
"required": false,
|
|
12533
|
+
"description": "Negated conjunction."
|
|
12534
|
+
},
|
|
12535
|
+
{
|
|
12536
|
+
"name": "not.or",
|
|
12537
|
+
"type": "string",
|
|
12538
|
+
"required": false,
|
|
12539
|
+
"description": "Negated disjunction."
|
|
12540
|
+
},
|
|
12541
|
+
{
|
|
12542
|
+
"name": "order",
|
|
12543
|
+
"type": "string",
|
|
12544
|
+
"required": false,
|
|
12545
|
+
"description": "Comma-separated columns with asc/desc and nullsfirst/nullslast; JSON paths allowed."
|
|
12546
|
+
},
|
|
12547
|
+
{
|
|
12548
|
+
"name": "limit",
|
|
12549
|
+
"type": "integer",
|
|
12550
|
+
"required": false,
|
|
12551
|
+
"description": "Maximum page size. Defaults to 1000; values above 1000 are accepted and capped at 1000."
|
|
12552
|
+
},
|
|
12553
|
+
{
|
|
12554
|
+
"name": "offset",
|
|
12555
|
+
"type": "integer",
|
|
12556
|
+
"required": false,
|
|
12557
|
+
"description": "Rows to skip."
|
|
12558
|
+
},
|
|
12559
|
+
{
|
|
12560
|
+
"name": "on_conflict",
|
|
12561
|
+
"type": "string",
|
|
12562
|
+
"required": false,
|
|
12563
|
+
"description": "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
12564
|
+
},
|
|
12565
|
+
{
|
|
12566
|
+
"name": "columns",
|
|
12567
|
+
"type": "string",
|
|
12568
|
+
"required": false,
|
|
12569
|
+
"description": "Comma-separated input columns; keys outside this set are ignored."
|
|
12570
|
+
}
|
|
12571
|
+
],
|
|
12572
|
+
"headers": [
|
|
12573
|
+
{
|
|
12574
|
+
"name": "Range-Unit",
|
|
12575
|
+
"type": "string",
|
|
12576
|
+
"required": false,
|
|
12577
|
+
"description": "items; other units cause Range to be ignored."
|
|
12578
|
+
},
|
|
12579
|
+
{
|
|
12580
|
+
"name": "Prefer",
|
|
12581
|
+
"type": "string",
|
|
12582
|
+
"required": false,
|
|
12583
|
+
"description": "Comma-separated preferences. count=exact|planned|estimated: unfiltered counts are exact; filtered planned reports *, estimated falls back to * when predicted over budget. missing=default skips null-filling of missing batch columns: inserts use field defaults (or null without a default), while conflict merges preserve omitted columns. Otherwise, holes in the batch key union are filled with null and can clear values during merge. Explicit null stays null. resolution=merge-duplicates updates supplied columns on conflict; resolution=ignore-duplicates leaves conflicting rows unchanged. Unknown preferences are ignored unless handling=strict (400 PGRST122)."
|
|
12584
|
+
}
|
|
12585
|
+
]
|
|
12586
|
+
},
|
|
12587
|
+
{
|
|
12588
|
+
"resource": "database.databases.rest",
|
|
12589
|
+
"method": "update",
|
|
12590
|
+
"summary": "Update rows",
|
|
12591
|
+
"description": "Deprecated: use praxis.database.table.rest.update instead; this path stops working on 2027-03-01. Updates the rows matched by the filter query parameters (the same filters as databaseSelect); with no filter every row of the table matches. The JSON object body lists only the fields to change, other fields keep their values, and id cannot be changed. Values are validated against the field types and the required and unique settings (400 VALIDATION_FAILED, 409 UNIQUE_VIOLATION). The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the updated rows. Each changed row's _version increases by one.",
|
|
12592
|
+
"http": "PATCH",
|
|
12593
|
+
"path": "/database/v1/databases/{database_id}/rest/{table}",
|
|
12594
|
+
"streaming": "no",
|
|
12595
|
+
"pagination": false,
|
|
12596
|
+
"pathParams": [
|
|
12597
|
+
{
|
|
12598
|
+
"name": "database_id",
|
|
12599
|
+
"sdkName": "database_id",
|
|
12600
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
12601
|
+
},
|
|
12602
|
+
{
|
|
12603
|
+
"name": "table",
|
|
12604
|
+
"sdkName": "table",
|
|
12605
|
+
"description": "table ID or name."
|
|
12606
|
+
}
|
|
12607
|
+
],
|
|
12608
|
+
"query": [
|
|
12609
|
+
{
|
|
12610
|
+
"name": "select",
|
|
12611
|
+
"type": "string",
|
|
12612
|
+
"required": false,
|
|
12613
|
+
"description": "Comma-separated columns; supports *, aliases, JSON paths and link-based embedding. Casts, aggregates, spread and join modifiers are unsupported."
|
|
12614
|
+
},
|
|
12615
|
+
{
|
|
12616
|
+
"name": "{column}",
|
|
12617
|
+
"type": "string",
|
|
12618
|
+
"required": false,
|
|
12619
|
+
"description": "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. Supported operators: eq (equal), neq (not equal; ne is not supported), gt/gte/lt/lte (comparisons), like (case-sensitive text pattern), ilike (case-insensitive text pattern), in (membership), is (null/boolean test), cs (contains), cd (contained by), and ov (array overlap). For like/ilike, * or % matches any sequence and _ matches one character, e.g. title=ilike.*spring*; URL-encode a literal % as %25. Use days=in.(1,2,3), title=is.null, active=is.true or active=is.false; is.not_null and is.unknown are also accepted (unknown means null). Negate a condition with not., e.g. title=not.eq.draft. Multiple filters are ANDed; use or=(title.eq.a,title.eq.b), and=(days.gte.1,days.lte.3), not.or=(...) or not.and=(...), with nested and(...) and or(...) groups as needed. cs/cd accept JSON objects or arrays on JSON fields; cs also accepts a JSON scalar. For array values or multi-link fields, use cs.{a,b}, cd.{a,b} or ov.{a,b}. JSON paths use -> for JSON and ->> for text, e.g. attributes->>has_onsen=eq.true or attributes->tags=cs.[1,2]; chain -> segments and end with ->> for text. Dot paths such as attributes.has_onsen are unsupported. Full-text, regex, range operators and any/all modifiers are unsupported."
|
|
12620
|
+
},
|
|
12621
|
+
{
|
|
12622
|
+
"name": "and",
|
|
12623
|
+
"type": "string",
|
|
12624
|
+
"required": false,
|
|
12625
|
+
"description": "Parenthesized conditions, e.g. (done.eq.false,title.neq.draft)."
|
|
12626
|
+
},
|
|
12627
|
+
{
|
|
12628
|
+
"name": "or",
|
|
12629
|
+
"type": "string",
|
|
12630
|
+
"required": false,
|
|
12631
|
+
"description": "Parenthesized alternatives; not.and and not.or are also supported."
|
|
12632
|
+
},
|
|
12633
|
+
{
|
|
12634
|
+
"name": "not.and",
|
|
12635
|
+
"type": "string",
|
|
12636
|
+
"required": false,
|
|
12637
|
+
"description": "Negated conjunction."
|
|
12638
|
+
},
|
|
12639
|
+
{
|
|
12640
|
+
"name": "not.or",
|
|
12641
|
+
"type": "string",
|
|
12642
|
+
"required": false,
|
|
12643
|
+
"description": "Negated disjunction."
|
|
12644
|
+
},
|
|
12645
|
+
{
|
|
12646
|
+
"name": "order",
|
|
12647
|
+
"type": "string",
|
|
12648
|
+
"required": false,
|
|
12649
|
+
"description": "Comma-separated columns with asc/desc and nullsfirst/nullslast; JSON paths allowed."
|
|
12650
|
+
},
|
|
12651
|
+
{
|
|
12652
|
+
"name": "limit",
|
|
12653
|
+
"type": "integer",
|
|
12654
|
+
"required": false,
|
|
12655
|
+
"description": "Maximum returned rows."
|
|
12656
|
+
},
|
|
12657
|
+
{
|
|
12658
|
+
"name": "offset",
|
|
12659
|
+
"type": "integer",
|
|
12660
|
+
"required": false,
|
|
12661
|
+
"description": "Rows to skip."
|
|
12662
|
+
},
|
|
12663
|
+
{
|
|
12664
|
+
"name": "on_conflict",
|
|
12665
|
+
"type": "string",
|
|
12666
|
+
"required": false,
|
|
12667
|
+
"description": "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
12668
|
+
},
|
|
12669
|
+
{
|
|
12670
|
+
"name": "columns",
|
|
12671
|
+
"type": "string",
|
|
12672
|
+
"required": false,
|
|
12673
|
+
"description": "Comma-separated input columns; keys outside this set are ignored."
|
|
12674
|
+
}
|
|
12675
|
+
],
|
|
12676
|
+
"headers": [
|
|
12677
|
+
{
|
|
12678
|
+
"name": "Range-Unit",
|
|
12679
|
+
"type": "string",
|
|
12680
|
+
"required": false,
|
|
12681
|
+
"description": "items; other units cause Range to be ignored."
|
|
12682
|
+
},
|
|
12683
|
+
{
|
|
12684
|
+
"name": "Prefer",
|
|
12685
|
+
"type": "string",
|
|
12686
|
+
"required": false,
|
|
12687
|
+
"description": "Comma-separated preferences. count=exact|planned|estimated: unfiltered counts are exact; filtered planned reports *, estimated falls back to * when predicted over budget. missing=default skips null-filling of missing batch columns: inserts use field defaults (or null without a default), while conflict merges preserve omitted columns. Otherwise, holes in the batch key union are filled with null and can clear values during merge. Explicit null stays null. resolution=merge-duplicates updates supplied columns on conflict; resolution=ignore-duplicates leaves conflicting rows unchanged. Unknown preferences are ignored unless handling=strict (400 PGRST122)."
|
|
12688
|
+
}
|
|
12689
|
+
],
|
|
12690
|
+
"body": {
|
|
12691
|
+
"required": true,
|
|
12692
|
+
"fields": []
|
|
12693
|
+
}
|
|
12694
|
+
},
|
|
12695
|
+
{
|
|
12696
|
+
"resource": "database.databases.rest",
|
|
12697
|
+
"method": "create",
|
|
12698
|
+
"summary": "Insert rows",
|
|
12699
|
+
"description": "Deprecated: use praxis.database.table.rest.create instead; this path stops working on 2027-03-01. Insert rows into an existing table after defining its fields; at most 500 rows per request. Each request is atomic: any failure rolls back the entire batch. There are no transactions across requests.\nRows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.\nThe default is return=minimal: success returns HTTP 201 with an empty body. Send Prefer: return=representation to return the inserted rows. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. Unlike Supabase, upsert conflicts can target only id or one unique field, not a composite key. Each table supports up to 1,000,000 rows.",
|
|
12700
|
+
"http": "POST",
|
|
12701
|
+
"path": "/database/v1/databases/{database_id}/rest/{table}",
|
|
12702
|
+
"streaming": "no",
|
|
12703
|
+
"pagination": false,
|
|
12704
|
+
"pathParams": [
|
|
12705
|
+
{
|
|
12706
|
+
"name": "database_id",
|
|
12707
|
+
"sdkName": "database_id",
|
|
12708
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
12709
|
+
},
|
|
12710
|
+
{
|
|
12711
|
+
"name": "table",
|
|
12712
|
+
"sdkName": "table",
|
|
12713
|
+
"description": "table ID or name."
|
|
12714
|
+
}
|
|
12715
|
+
],
|
|
12716
|
+
"query": [
|
|
12717
|
+
{
|
|
12718
|
+
"name": "select",
|
|
12719
|
+
"type": "string",
|
|
12720
|
+
"required": false,
|
|
12721
|
+
"description": "Comma-separated columns; supports *, aliases, JSON paths and link-based embedding. Casts, aggregates, spread and join modifiers are unsupported."
|
|
12722
|
+
},
|
|
12723
|
+
{
|
|
12724
|
+
"name": "{column}",
|
|
12725
|
+
"type": "string",
|
|
12726
|
+
"required": false,
|
|
12727
|
+
"description": "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. Supported operators: eq (equal), neq (not equal; ne is not supported), gt/gte/lt/lte (comparisons), like (case-sensitive text pattern), ilike (case-insensitive text pattern), in (membership), is (null/boolean test), cs (contains), cd (contained by), and ov (array overlap). For like/ilike, * or % matches any sequence and _ matches one character, e.g. title=ilike.*spring*; URL-encode a literal % as %25. Use days=in.(1,2,3), title=is.null, active=is.true or active=is.false; is.not_null and is.unknown are also accepted (unknown means null). Negate a condition with not., e.g. title=not.eq.draft. Multiple filters are ANDed; use or=(title.eq.a,title.eq.b), and=(days.gte.1,days.lte.3), not.or=(...) or not.and=(...), with nested and(...) and or(...) groups as needed. cs/cd accept JSON objects or arrays on JSON fields; cs also accepts a JSON scalar. For array values or multi-link fields, use cs.{a,b}, cd.{a,b} or ov.{a,b}. JSON paths use -> for JSON and ->> for text, e.g. attributes->>has_onsen=eq.true or attributes->tags=cs.[1,2]; chain -> segments and end with ->> for text. Dot paths such as attributes.has_onsen are unsupported. Full-text, regex, range operators and any/all modifiers are unsupported."
|
|
12728
|
+
},
|
|
12729
|
+
{
|
|
12730
|
+
"name": "and",
|
|
12731
|
+
"type": "string",
|
|
12732
|
+
"required": false,
|
|
12733
|
+
"description": "Parenthesized conditions, e.g. (done.eq.false,title.neq.draft)."
|
|
12734
|
+
},
|
|
12735
|
+
{
|
|
12736
|
+
"name": "or",
|
|
12737
|
+
"type": "string",
|
|
12738
|
+
"required": false,
|
|
12739
|
+
"description": "Parenthesized alternatives; not.and and not.or are also supported."
|
|
12740
|
+
},
|
|
12741
|
+
{
|
|
12742
|
+
"name": "not.and",
|
|
12743
|
+
"type": "string",
|
|
12744
|
+
"required": false,
|
|
12745
|
+
"description": "Negated conjunction."
|
|
12746
|
+
},
|
|
12747
|
+
{
|
|
12748
|
+
"name": "not.or",
|
|
12749
|
+
"type": "string",
|
|
12750
|
+
"required": false,
|
|
12751
|
+
"description": "Negated disjunction."
|
|
12752
|
+
},
|
|
12753
|
+
{
|
|
12754
|
+
"name": "order",
|
|
12755
|
+
"type": "string",
|
|
12756
|
+
"required": false,
|
|
12757
|
+
"description": "Comma-separated columns with asc/desc and nullsfirst/nullslast; JSON paths allowed."
|
|
12758
|
+
},
|
|
12759
|
+
{
|
|
12760
|
+
"name": "limit",
|
|
12761
|
+
"type": "integer",
|
|
12762
|
+
"required": false,
|
|
12763
|
+
"description": "Maximum returned rows."
|
|
12764
|
+
},
|
|
12765
|
+
{
|
|
12766
|
+
"name": "offset",
|
|
12767
|
+
"type": "integer",
|
|
12768
|
+
"required": false,
|
|
12769
|
+
"description": "Rows to skip."
|
|
12770
|
+
},
|
|
12771
|
+
{
|
|
12772
|
+
"name": "on_conflict",
|
|
12773
|
+
"type": "string",
|
|
12774
|
+
"required": false,
|
|
12775
|
+
"description": "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
12776
|
+
},
|
|
12777
|
+
{
|
|
12778
|
+
"name": "columns",
|
|
12779
|
+
"type": "string",
|
|
12780
|
+
"required": false,
|
|
12781
|
+
"description": "Comma-separated input columns; keys outside this set are ignored."
|
|
12782
|
+
}
|
|
12783
|
+
],
|
|
12784
|
+
"headers": [
|
|
12785
|
+
{
|
|
12786
|
+
"name": "Range-Unit",
|
|
12787
|
+
"type": "string",
|
|
12788
|
+
"required": false,
|
|
12789
|
+
"description": "items; other units cause Range to be ignored."
|
|
12790
|
+
},
|
|
12791
|
+
{
|
|
12792
|
+
"name": "Prefer",
|
|
12793
|
+
"type": "string",
|
|
12794
|
+
"required": false,
|
|
12795
|
+
"description": "Comma-separated preferences. count=exact|planned|estimated: unfiltered counts are exact; filtered planned reports *, estimated falls back to * when predicted over budget. missing=default skips null-filling of missing batch columns: inserts use field defaults (or null without a default), while conflict merges preserve omitted columns. Otherwise, holes in the batch key union are filled with null and can clear values during merge. Explicit null stays null. resolution=merge-duplicates updates supplied columns on conflict; resolution=ignore-duplicates leaves conflicting rows unchanged. Unknown preferences are ignored unless handling=strict (400 PGRST122)."
|
|
12796
|
+
}
|
|
12797
|
+
],
|
|
12798
|
+
"body": {
|
|
12799
|
+
"required": true,
|
|
12800
|
+
"fields": []
|
|
12801
|
+
}
|
|
12802
|
+
},
|
|
12803
|
+
{
|
|
12804
|
+
"resource": "database.databases",
|
|
12805
|
+
"method": "restore",
|
|
12806
|
+
"summary": "Restore database",
|
|
12807
|
+
"description": "Deprecated: use praxis.database.table.restore for a table database or praxis.database.kv.restore for a key-value database instead; this path stops working on 2027-03-01. Recover a soft-deleted database within its seven-day recovery window. Restore before purge_at. An empty body is accepted. Active databases return 409; purged databases return 404.",
|
|
12808
|
+
"http": "POST",
|
|
12809
|
+
"path": "/database/v1/databases/{database_id}/restore",
|
|
12810
|
+
"streaming": "no",
|
|
12811
|
+
"pagination": false,
|
|
12812
|
+
"pathParams": [
|
|
12813
|
+
{
|
|
12814
|
+
"name": "database_id",
|
|
12815
|
+
"sdkName": "database_id",
|
|
12816
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
12817
|
+
}
|
|
12818
|
+
],
|
|
12819
|
+
"query": []
|
|
12820
|
+
},
|
|
12821
|
+
{
|
|
12822
|
+
"resource": "database.databases.tables",
|
|
12823
|
+
"method": "list",
|
|
12824
|
+
"summary": "List tables",
|
|
12825
|
+
"description": "Deprecated: use praxis.database.table.tables.list instead; this path stops working on 2027-03-01. Lists every table of an active database with its field definitions. A database holds at most 50 tables, so the single page contains all of them and next_cursor is always null. Use databaseGetTable instead when you also need row_count for one table.",
|
|
12826
|
+
"http": "GET",
|
|
12827
|
+
"path": "/database/v1/databases/{database_id}/tables",
|
|
12828
|
+
"streaming": "no",
|
|
12829
|
+
"pagination": false,
|
|
12830
|
+
"pathParams": [
|
|
12831
|
+
{
|
|
12832
|
+
"name": "database_id",
|
|
12833
|
+
"sdkName": "database_id",
|
|
12834
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
12835
|
+
}
|
|
12836
|
+
],
|
|
12837
|
+
"query": []
|
|
12838
|
+
},
|
|
12839
|
+
{
|
|
12840
|
+
"resource": "database.databases.tables",
|
|
12841
|
+
"method": "create",
|
|
12842
|
+
"summary": "Create table",
|
|
12843
|
+
"description": "Deprecated: use praxis.database.table.tables.create instead; this path stops working on 2027-03-01. Creates a table together with its initial fields in one call and returns it (HTTP 201) with generated tbl_ and fld_ ids. name must match ^[a-z_][a-z0-9_]{0,62}$ and be unused in this database (duplicate: 409 UNIQUE_VIOLATION). fields is required and may be an empty array; fields can also be added later with databaseAddField. Limits: 50 tables per database, 64 fields per table, and 16 indexed or unique fields per table; exceeding one returns 400 LIMIT_EXCEEDED. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {\"name\":\"notes\",\"type\":\"string\",\"indexed\":false}. Every row also has a system id column, which is not declared as a field. Insert data afterwards with databaseInsert. Unlike Supabase, define schema with this table API and the field APIs; PostgreSQL DDL and SQL migration files cannot be submitted. Each table supports up to 1,000,000 rows.",
|
|
12844
|
+
"http": "POST",
|
|
12845
|
+
"path": "/database/v1/databases/{database_id}/tables",
|
|
12846
|
+
"streaming": "no",
|
|
12847
|
+
"pagination": false,
|
|
12848
|
+
"pathParams": [
|
|
12849
|
+
{
|
|
12850
|
+
"name": "database_id",
|
|
12851
|
+
"sdkName": "database_id",
|
|
12852
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
12853
|
+
}
|
|
12854
|
+
],
|
|
12855
|
+
"query": [],
|
|
12856
|
+
"body": {
|
|
12857
|
+
"required": true,
|
|
12858
|
+
"fields": [
|
|
12859
|
+
{
|
|
12860
|
+
"name": "name",
|
|
12861
|
+
"type": "string",
|
|
12862
|
+
"required": true,
|
|
12863
|
+
"description": "Table name used in the rows path and in link references. Must match ^[a-z_][a-z0-9_]{0,62}$ and be unused in this database; it can be renamed later without affecting data."
|
|
12864
|
+
},
|
|
12865
|
+
{
|
|
12866
|
+
"name": "description",
|
|
12867
|
+
"type": "string",
|
|
12868
|
+
"required": false,
|
|
12869
|
+
"description": "Optional free-text note describing what the table stores. Returned as description on the table; omit it to store null."
|
|
12870
|
+
},
|
|
12871
|
+
{
|
|
12872
|
+
"name": "fields",
|
|
12873
|
+
"type": "array",
|
|
12874
|
+
"itemType": "object",
|
|
12875
|
+
"required": true,
|
|
12876
|
+
"description": "Initial field definitions, in display order; may be an empty array. At most 64 fields per table and at most 16 indexed or unique fields. Each item follows the NewField shape selected by its type."
|
|
12877
|
+
}
|
|
12878
|
+
]
|
|
12879
|
+
}
|
|
12880
|
+
},
|
|
12881
|
+
{
|
|
12882
|
+
"resource": "database.databases.tables",
|
|
12883
|
+
"method": "delete",
|
|
12884
|
+
"summary": "Delete table",
|
|
12885
|
+
"description": "Deprecated: use praxis.database.table.tables.delete instead; this path stops working on 2027-03-01. Permanently drops a table with all of its rows; the deletion is immediate and has no recovery window or undo. Refused with 409 REFERENCE_RESTRICT while a link field of another table points at this table, so delete or change those fields first. Returns {deleted: true}. A table name can be reused afterwards.",
|
|
12886
|
+
"http": "DELETE",
|
|
12887
|
+
"path": "/database/v1/databases/{database_id}/tables/{table}",
|
|
12888
|
+
"streaming": "no",
|
|
12889
|
+
"pagination": false,
|
|
12890
|
+
"pathParams": [
|
|
12891
|
+
{
|
|
12892
|
+
"name": "database_id",
|
|
12893
|
+
"sdkName": "database_id",
|
|
12894
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
12895
|
+
},
|
|
12896
|
+
{
|
|
12897
|
+
"name": "table",
|
|
12898
|
+
"sdkName": "table",
|
|
12899
|
+
"description": "table ID or name."
|
|
12900
|
+
}
|
|
12901
|
+
],
|
|
12902
|
+
"query": []
|
|
12903
|
+
},
|
|
12904
|
+
{
|
|
12905
|
+
"resource": "database.databases.tables",
|
|
12906
|
+
"method": "retrieve",
|
|
12907
|
+
"summary": "Get table",
|
|
12908
|
+
"description": "Deprecated: use praxis.database.table.tables.retrieve instead; this path stops working on 2027-03-01. Returns one table by id or name with its field definitions, schema_revision and row_count. row_count is only returned by this operation, not by list or create. Use field ids from this response for stable references because field names can be renamed; an unknown table returns 404 TABLE_NOT_FOUND.",
|
|
12909
|
+
"http": "GET",
|
|
12910
|
+
"path": "/database/v1/databases/{database_id}/tables/{table}",
|
|
12911
|
+
"streaming": "no",
|
|
12912
|
+
"pagination": false,
|
|
12913
|
+
"pathParams": [
|
|
12914
|
+
{
|
|
12915
|
+
"name": "database_id",
|
|
12916
|
+
"sdkName": "database_id",
|
|
12917
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
12918
|
+
},
|
|
12919
|
+
{
|
|
12920
|
+
"name": "table",
|
|
12921
|
+
"sdkName": "table",
|
|
12922
|
+
"description": "table ID or name."
|
|
12923
|
+
}
|
|
12924
|
+
],
|
|
12925
|
+
"query": []
|
|
12926
|
+
},
|
|
12927
|
+
{
|
|
12928
|
+
"resource": "database.databases.tables",
|
|
12929
|
+
"method": "update",
|
|
12930
|
+
"summary": "Update table",
|
|
12931
|
+
"description": "Deprecated: use praxis.database.table.tables.update instead; this path stops working on 2027-03-01. Renames a table and/or changes its description; send only the keys to change, and send description null to clear it. The new name must follow ^[a-z_][a-z0-9_]{0,62}$ and be unused (409 UNIQUE_VIOLATION); ids are stable, so renaming never rewrites row data. A body with no changes or values equal to the current ones does not bump schema_revision. Fields cannot be changed here; use databaseAddField, databaseUpdateField and databaseDeleteField.",
|
|
12932
|
+
"http": "PATCH",
|
|
12933
|
+
"path": "/database/v1/databases/{database_id}/tables/{table}",
|
|
12934
|
+
"streaming": "no",
|
|
12935
|
+
"pagination": false,
|
|
12936
|
+
"pathParams": [
|
|
12937
|
+
{
|
|
12938
|
+
"name": "database_id",
|
|
12939
|
+
"sdkName": "database_id",
|
|
12940
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
12941
|
+
},
|
|
12942
|
+
{
|
|
12943
|
+
"name": "table",
|
|
12944
|
+
"sdkName": "table",
|
|
12945
|
+
"description": "table ID or name."
|
|
12946
|
+
}
|
|
12947
|
+
],
|
|
12948
|
+
"query": [],
|
|
12949
|
+
"body": {
|
|
12950
|
+
"required": true,
|
|
12951
|
+
"fields": [
|
|
12952
|
+
{
|
|
12953
|
+
"name": "name",
|
|
12954
|
+
"type": "string",
|
|
12955
|
+
"required": false,
|
|
12956
|
+
"description": "New table name matching ^[a-z_][a-z0-9_]{0,62}$ and unused in this database. Omit it to keep the current name."
|
|
12957
|
+
},
|
|
12958
|
+
{
|
|
12959
|
+
"name": "description",
|
|
12960
|
+
"type": "string",
|
|
12961
|
+
"required": false,
|
|
12962
|
+
"description": "New description text, or null to clear it. Omit it to keep the current description."
|
|
12963
|
+
}
|
|
12964
|
+
]
|
|
12965
|
+
}
|
|
12966
|
+
},
|
|
12967
|
+
{
|
|
12968
|
+
"resource": "database.databases.tables.fields",
|
|
12969
|
+
"method": "create",
|
|
12970
|
+
"summary": "Add field",
|
|
12971
|
+
"description": "Deprecated: use praxis.database.table.tables.fields.create instead; this path stops working on 2027-03-01. Adds one field to an existing table and returns the updated table (HTTP 201). Required inputs are name (lowercase letters, digits and underscores; id and names starting with _ are reserved) and type (string, integer, number, boolean, datetime, json or link); json needs options.schema and link needs options.linked_table_id and options.multiple. Adding a required field to a table that already has rows needs a default, otherwise the call fails with 400 VALIDATION_FAILED; a default is written into every existing row. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {\"name\":\"notes\",\"type\":\"string\",\"indexed\":false}. JSON and link fields cannot be indexed. Limits: 64 fields and 16 indexed or unique fields per table (400 LIMIT_EXCEEDED). Unlike Supabase, schema evolution uses field definitions rather than ALTER TABLE statements or SQL migrations.",
|
|
12972
|
+
"http": "POST",
|
|
12973
|
+
"path": "/database/v1/databases/{database_id}/tables/{table}/fields",
|
|
12974
|
+
"streaming": "no",
|
|
12975
|
+
"pagination": false,
|
|
12976
|
+
"pathParams": [
|
|
12977
|
+
{
|
|
12978
|
+
"name": "database_id",
|
|
12979
|
+
"sdkName": "database_id",
|
|
12980
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
12981
|
+
},
|
|
12982
|
+
{
|
|
12983
|
+
"name": "table",
|
|
12984
|
+
"sdkName": "table",
|
|
12985
|
+
"description": "table ID or name."
|
|
12986
|
+
}
|
|
12987
|
+
],
|
|
12988
|
+
"query": [],
|
|
12989
|
+
"body": {
|
|
12990
|
+
"required": true,
|
|
12991
|
+
"fields": []
|
|
12992
|
+
}
|
|
12993
|
+
},
|
|
12994
|
+
{
|
|
12995
|
+
"resource": "database.databases.tables.fields",
|
|
12996
|
+
"method": "delete",
|
|
12997
|
+
"summary": "Delete field",
|
|
12998
|
+
"description": "Deprecated: use praxis.database.table.tables.fields.delete instead; this path stops working on 2027-03-01. Deletes one field definition from a table and returns the updated table; the deletion is immediate and has no recovery window. Look the field up by id or name. The field's index, if any, is dropped with it, and the name can be reused afterwards. Unknown fields return 400 FIELD_NOT_FOUND.",
|
|
12999
|
+
"http": "DELETE",
|
|
13000
|
+
"path": "/database/v1/databases/{database_id}/tables/{table}/fields/{field}",
|
|
13001
|
+
"streaming": "no",
|
|
13002
|
+
"pagination": false,
|
|
13003
|
+
"pathParams": [
|
|
13004
|
+
{
|
|
13005
|
+
"name": "database_id",
|
|
13006
|
+
"sdkName": "database_id",
|
|
13007
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
13008
|
+
},
|
|
13009
|
+
{
|
|
13010
|
+
"name": "table",
|
|
13011
|
+
"sdkName": "table",
|
|
13012
|
+
"description": "table ID or name."
|
|
13013
|
+
},
|
|
13014
|
+
{
|
|
13015
|
+
"name": "field",
|
|
13016
|
+
"sdkName": "field",
|
|
13017
|
+
"description": "field ID or name."
|
|
13018
|
+
}
|
|
13019
|
+
],
|
|
13020
|
+
"query": []
|
|
13021
|
+
},
|
|
13022
|
+
{
|
|
13023
|
+
"resource": "database.databases.tables.fields",
|
|
13024
|
+
"method": "update",
|
|
13025
|
+
"summary": "Update field",
|
|
13026
|
+
"description": "Deprecated: use praxis.database.table.tables.fields.update instead; this path stops working on 2027-03-01. Changes a field's name, description, required flag, indexed flag, default or json options.schema and returns the updated table. The field type, a link field's linked_table_id and the unique flag cannot be changed (400 FIELD_TYPE_IMMUTABLE or INVALID_PARAMS). Setting required to true fails with 400 VALIDATION_FAILED while existing rows hold null for the field. A new json schema constrains only later writes; existing rows are not revalidated. Renaming never rewrites row data, and a request that changes nothing does not bump schema_revision. Unlike Supabase, field types and uniqueness cannot be altered through SQL migrations; use the supported field settings described here.",
|
|
13027
|
+
"http": "PATCH",
|
|
13028
|
+
"path": "/database/v1/databases/{database_id}/tables/{table}/fields/{field}",
|
|
13029
|
+
"streaming": "no",
|
|
13030
|
+
"pagination": false,
|
|
13031
|
+
"pathParams": [
|
|
13032
|
+
{
|
|
13033
|
+
"name": "database_id",
|
|
13034
|
+
"sdkName": "database_id",
|
|
13035
|
+
"description": "Identifier of the database to act on: the id (db_…) returned by databaseCreateDatabase or databaseListDatabases. A display name is not accepted."
|
|
13036
|
+
},
|
|
13037
|
+
{
|
|
13038
|
+
"name": "table",
|
|
13039
|
+
"sdkName": "table",
|
|
13040
|
+
"description": "table ID or name."
|
|
13041
|
+
},
|
|
13042
|
+
{
|
|
13043
|
+
"name": "field",
|
|
13044
|
+
"sdkName": "field",
|
|
13045
|
+
"description": "field ID or name."
|
|
13046
|
+
}
|
|
13047
|
+
],
|
|
13048
|
+
"query": [],
|
|
13049
|
+
"body": {
|
|
13050
|
+
"required": true,
|
|
13051
|
+
"fields": [
|
|
13052
|
+
{
|
|
13053
|
+
"name": "name",
|
|
13054
|
+
"type": "string",
|
|
13055
|
+
"required": false,
|
|
13056
|
+
"description": "New field name (lowercase letters, digits and underscores; id and names starting with _ are reserved). Renaming does not rewrite stored rows. Omit it to keep the current name."
|
|
13057
|
+
},
|
|
13058
|
+
{
|
|
13059
|
+
"name": "description",
|
|
13060
|
+
"type": "string",
|
|
13061
|
+
"required": false,
|
|
13062
|
+
"description": "New description text, or null to clear it. Omit it to keep the current description."
|
|
13063
|
+
},
|
|
13064
|
+
{
|
|
13065
|
+
"name": "required",
|
|
13066
|
+
"type": "boolean",
|
|
13067
|
+
"required": false,
|
|
13068
|
+
"description": "Whether every row must hold a non-null value for this field. Setting true fails with 400 VALIDATION_FAILED while existing rows have null for the field; fill them first."
|
|
13069
|
+
},
|
|
13070
|
+
{
|
|
13071
|
+
"name": "indexed",
|
|
13072
|
+
"type": "boolean",
|
|
13073
|
+
"required": false,
|
|
13074
|
+
"description": "Whether to maintain an index on this field to speed up filters and ordering. Only scalar fields (string, integer, number, boolean, datetime) can be indexed; true on json or link fields is rejected, and a table allows at most 16 indexed or unique fields."
|
|
13075
|
+
},
|
|
13076
|
+
{
|
|
13077
|
+
"name": "options",
|
|
13078
|
+
"type": "object",
|
|
13079
|
+
"required": false,
|
|
13080
|
+
"description": "Type-specific settings. Only json fields accept changes, through options.schema; scalar fields take no options, and a link field's options cannot change."
|
|
13081
|
+
},
|
|
13082
|
+
{
|
|
13083
|
+
"name": "default",
|
|
13084
|
+
"type": "object",
|
|
13085
|
+
"required": false,
|
|
13086
|
+
"description": "Sets the default for future inserts. Must match the current type and JSON schema; not supported for link fields."
|
|
13087
|
+
}
|
|
13088
|
+
]
|
|
13089
|
+
}
|
|
13090
|
+
},
|
|
13091
|
+
{
|
|
13092
|
+
"resource": "database.kv",
|
|
13093
|
+
"method": "list",
|
|
13094
|
+
"summary": "List key-value databases",
|
|
13095
|
+
"description": "Find the key-value databases owned by your tenant (databases of the other type are not listed) and obtain their ids for key and command operations. Excludes deleting by default. status=active or status=deleting selects that state; invalid values return 400 INVALID_PARAMS.",
|
|
13096
|
+
"http": "GET",
|
|
13097
|
+
"path": "/database/v1/kv",
|
|
13098
|
+
"streaming": "no",
|
|
13099
|
+
"pagination": true,
|
|
13100
|
+
"pathParams": [],
|
|
13101
|
+
"query": [
|
|
13102
|
+
{
|
|
13103
|
+
"name": "cursor",
|
|
13104
|
+
"type": "string",
|
|
13105
|
+
"required": false,
|
|
13106
|
+
"description": "Opaque next_cursor from the previous page."
|
|
13107
|
+
},
|
|
13108
|
+
{
|
|
13109
|
+
"name": "limit",
|
|
13110
|
+
"type": "integer",
|
|
13111
|
+
"required": false,
|
|
13112
|
+
"description": "Page size."
|
|
13113
|
+
},
|
|
13114
|
+
{
|
|
13115
|
+
"name": "labels",
|
|
13116
|
+
"type": "object",
|
|
13117
|
+
"required": false,
|
|
13118
|
+
"description": "Exact label match, encoded as labels[purpose]=docs."
|
|
13119
|
+
},
|
|
13120
|
+
{
|
|
13121
|
+
"name": "status",
|
|
13122
|
+
"type": "string",
|
|
13123
|
+
"enum": [
|
|
13124
|
+
"active",
|
|
13125
|
+
"deleting"
|
|
13126
|
+
],
|
|
13127
|
+
"required": false,
|
|
13128
|
+
"description": "Filter by lifecycle state. active (the default when omitted) lists usable databases; deleting lists databases that were deleted and are still inside the seven-day restore window. Any other value returns 400 INVALID_PARAMS."
|
|
13129
|
+
}
|
|
13130
|
+
]
|
|
13131
|
+
},
|
|
13132
|
+
{
|
|
13133
|
+
"resource": "database.kv",
|
|
13134
|
+
"method": "create",
|
|
13135
|
+
"summary": "Create key-value database",
|
|
13136
|
+
"description": "Creates an empty key-value database (键值库) for the caller and returns it with status active (HTTP 201); read and write it next with praxis.database.kv.keys and praxis.database.kv.commands, or point an existing Redis or @upstash/redis client at /redis/<database_id>. The path is the type: the body takes no kind, and a body that carries kind returns 400 INVALID_PARAMS: kind is set by the path. Creating a key-value database in an organization that has not been opened for it returns 400 INVALID_PARAMS: kind kv is not available. name is required and is 1–64 visible characters after trimming. labels are optional string tags (at most 64; each key starts with a lowercase letter and uses up to 63 characters of a-z 0-9 _ -; each value is up to 63 characters of a-z 0-9 _ -) that databaseListKvDatabases can filter on. If initialization fails the call returns 503 CAPACITY and the half-created database is left with status failed; retry by calling create again, which makes a new database. Use a Praxis credential; access is scoped to its tenant. For structured tables and rows use praxis.database.table.create instead.",
|
|
13137
|
+
"http": "POST",
|
|
13138
|
+
"path": "/database/v1/kv",
|
|
13139
|
+
"streaming": "no",
|
|
13140
|
+
"pagination": false,
|
|
13141
|
+
"pathParams": [],
|
|
13142
|
+
"query": [],
|
|
13143
|
+
"body": {
|
|
13144
|
+
"required": true,
|
|
13145
|
+
"fields": [
|
|
13146
|
+
{
|
|
13147
|
+
"name": "name",
|
|
13148
|
+
"type": "string",
|
|
13149
|
+
"required": true,
|
|
13150
|
+
"description": "Display name for the database: 1–64 visible characters after trimming; control characters are rejected. It is not an identifier, so later calls still use the returned id."
|
|
13151
|
+
},
|
|
13152
|
+
{
|
|
13153
|
+
"name": "labels",
|
|
13154
|
+
"type": "object",
|
|
13155
|
+
"required": false,
|
|
13156
|
+
"description": "Optional string tags to attach, at most 64. Each key starts with a lowercase letter and may use up to 63 characters of a-z 0-9 _ -; each value is up to 63 characters of a-z 0-9 _ -. List calls filter on exact key and value pairs."
|
|
13157
|
+
}
|
|
13158
|
+
]
|
|
13159
|
+
}
|
|
13160
|
+
},
|
|
13161
|
+
{
|
|
13162
|
+
"resource": "database.kv",
|
|
13163
|
+
"method": "delete",
|
|
13164
|
+
"summary": "Delete database",
|
|
13165
|
+
"description": "Soft-delete a database when it should stop accepting schema and row operations. Idempotently enters deleting with a seven-day purge_at. GET remains available; child operations return 409 until restored.",
|
|
13166
|
+
"http": "DELETE",
|
|
13167
|
+
"path": "/database/v1/kv/{database_id}",
|
|
13168
|
+
"streaming": "no",
|
|
13169
|
+
"pagination": false,
|
|
13170
|
+
"pathParams": [
|
|
13171
|
+
{
|
|
13172
|
+
"name": "database_id",
|
|
13173
|
+
"sdkName": "database_id",
|
|
13174
|
+
"description": "Identifier of the key-value database to act on: the id (db_…) returned by databaseCreateKvDatabase or databaseListKvDatabases. A display name is not accepted; the id of a table database returns 404 DATABASE_NOT_FOUND."
|
|
13175
|
+
}
|
|
13176
|
+
],
|
|
13177
|
+
"query": []
|
|
13178
|
+
},
|
|
13179
|
+
{
|
|
13180
|
+
"resource": "database.kv",
|
|
13181
|
+
"method": "retrieve",
|
|
13182
|
+
"summary": "Get key-value database",
|
|
13183
|
+
"description": "Returns one database by id, including a database in the deleting state (purge_at then shows when it will be permanently removed). Call it before key or command operations to confirm status is active: key and command calls on a deleting database return 409 DATABASE_INVALID_STATE. size_bytes is refreshed from live storage at most once every five seconds. A purged or unknown id, or the id of a table database, returns 404 DATABASE_NOT_FOUND.",
|
|
13184
|
+
"http": "GET",
|
|
13185
|
+
"path": "/database/v1/kv/{database_id}",
|
|
13186
|
+
"streaming": "no",
|
|
13187
|
+
"pagination": false,
|
|
13188
|
+
"pathParams": [
|
|
13189
|
+
{
|
|
13190
|
+
"name": "database_id",
|
|
13191
|
+
"sdkName": "database_id",
|
|
13192
|
+
"description": "Identifier of the key-value database to act on: the id (db_…) returned by databaseCreateKvDatabase or databaseListKvDatabases. A display name is not accepted; the id of a table database returns 404 DATABASE_NOT_FOUND."
|
|
13193
|
+
}
|
|
13194
|
+
],
|
|
13195
|
+
"query": []
|
|
13196
|
+
},
|
|
13197
|
+
{
|
|
13198
|
+
"resource": "database.kv",
|
|
13199
|
+
"method": "update",
|
|
13200
|
+
"summary": "Update database",
|
|
13201
|
+
"description": "Renames an active database and/or replaces its labels; send only the keys you want to change. labels is replaced as a whole, not merged, so include every label you want to keep. A body without name or labels, or with values equal to the current ones, changes nothing and leaves updated_at as is. A database in the deleting state returns 409 DATABASE_INVALID_STATE; restore it first with databaseRestoreKvDatabase.",
|
|
13202
|
+
"http": "PATCH",
|
|
13203
|
+
"path": "/database/v1/kv/{database_id}",
|
|
13204
|
+
"streaming": "no",
|
|
13205
|
+
"pagination": false,
|
|
13206
|
+
"pathParams": [
|
|
13207
|
+
{
|
|
13208
|
+
"name": "database_id",
|
|
13209
|
+
"sdkName": "database_id",
|
|
13210
|
+
"description": "Identifier of the key-value database to act on: the id (db_…) returned by databaseCreateKvDatabase or databaseListKvDatabases. A display name is not accepted; the id of a table database returns 404 DATABASE_NOT_FOUND."
|
|
13211
|
+
}
|
|
13212
|
+
],
|
|
13213
|
+
"query": [],
|
|
13214
|
+
"body": {
|
|
13215
|
+
"required": true,
|
|
13216
|
+
"fields": [
|
|
13217
|
+
{
|
|
13218
|
+
"name": "name",
|
|
13219
|
+
"type": "string",
|
|
13220
|
+
"required": false,
|
|
13221
|
+
"description": "New display name, 1–64 visible characters after trimming. Omit it to keep the current name."
|
|
13222
|
+
},
|
|
13223
|
+
{
|
|
13224
|
+
"name": "labels",
|
|
13225
|
+
"type": "object",
|
|
13226
|
+
"required": false,
|
|
13227
|
+
"description": "Complete replacement label set, not a merge: labels not listed here are removed. Same limits as at creation (at most 64; keys a-z 0-9 _ - starting with a letter; values up to 63 characters of a-z 0-9 _ -). Omit it to keep the current labels."
|
|
13228
|
+
}
|
|
13229
|
+
]
|
|
13230
|
+
}
|
|
13231
|
+
},
|
|
13232
|
+
{
|
|
13233
|
+
"resource": "database.kv.commands",
|
|
13234
|
+
"method": "execute",
|
|
13235
|
+
"summary": "Execute command",
|
|
13236
|
+
"description": "Run one Redis command with Redis 7 semantics against a key-value database and get its reply; use it for what the key operations cannot do: counters (INCR), list and set operations, ranges (LRANGE, ZRANGE), scans (SCAN, HSCAN) and expiry commands. For one whole-value read or write use databaseKvGetKey / databaseKvSetKey; for existing Redis clients use the Upstash-compatible face under /redis. command is the command name followed by its arguments, every element a string, for example [\"SET\",\"k\",\"v\"] or [\"LRANGE\",\"queue\",\"0\",\"9\"]. result is Redis's reply as plain JSON (integers, strings, arrays, null), never base64. Not supported: Lua scripting (EVAL), blocking commands, Pub/Sub and Streams. A value is at most 1 MiB, a key at most 1 KiB, a reply at most 8 MiB (read big collections in ranges with SCAN, HSCAN, LRANGE or ZRANGE) and the database at most 1 GiB. A read command needs a read credential; a write command, or a command that cannot be parsed, needs a read-write credential. Errors: 400 KV_COMMAND_ERROR when Redis rejects the command, with Redis's own text in message (for example WRONGTYPE Operation against a key holding the wrong kind of value or ERR unknown command); 400 INVALID_PARAMS for a missing or empty command; 404 DATABASE_NOT_FOUND; 403 BINDING_READ_ONLY for a write on a read-only credential.",
|
|
13237
|
+
"http": "POST",
|
|
13238
|
+
"path": "/database/v1/kv/{database_id}/commands",
|
|
13239
|
+
"streaming": "no",
|
|
13240
|
+
"pagination": false,
|
|
13241
|
+
"pathParams": [
|
|
13242
|
+
{
|
|
13243
|
+
"name": "database_id",
|
|
13244
|
+
"sdkName": "database_id",
|
|
13245
|
+
"description": "Identifier of the key-value database: the id (db_…) returned by databaseCreateKvDatabase or databaseListKvDatabases. A display name is not accepted; the id of a table database returns 404 DATABASE_NOT_FOUND."
|
|
13246
|
+
}
|
|
13247
|
+
],
|
|
13248
|
+
"query": [],
|
|
13249
|
+
"body": {
|
|
13250
|
+
"required": true,
|
|
13251
|
+
"fields": [
|
|
13252
|
+
{
|
|
13253
|
+
"name": "command",
|
|
13254
|
+
"type": "array",
|
|
13255
|
+
"itemType": "string",
|
|
13256
|
+
"required": true,
|
|
13257
|
+
"description": "The Redis command name followed by its arguments, every element a string, for example [\"INCR\",\"counter\"] or [\"LRANGE\",\"queue\",\"0\",\"9\"]; one command per call."
|
|
13258
|
+
}
|
|
13259
|
+
]
|
|
13260
|
+
}
|
|
13261
|
+
},
|
|
13262
|
+
{
|
|
13263
|
+
"resource": "database.kv.events",
|
|
13264
|
+
"method": "list",
|
|
13265
|
+
"summary": "List key-value database events",
|
|
13266
|
+
"description": "Read the lifecycle events of a key-value database (created, status changes), including while the database is deleting; use it to see when the database was provisioned or deleted. next_cursor is an opaque string cursor (do not do arithmetic on it): pass it as after_seq for asc or before_seq for desc. Supplying both cursors returns 400 INVALID_PARAMS. This is paged lifecycle history, not a feed of key changes: writing, updating or deleting keys does not add events. The id of a table database returns 404 DATABASE_NOT_FOUND here; read its events with praxis.database.table.events.list.",
|
|
13267
|
+
"http": "GET",
|
|
13268
|
+
"path": "/database/v1/kv/{database_id}/events",
|
|
13269
|
+
"streaming": "no",
|
|
13270
|
+
"pagination": false,
|
|
13271
|
+
"pathParams": [
|
|
13272
|
+
{
|
|
13273
|
+
"name": "database_id",
|
|
13274
|
+
"sdkName": "database_id",
|
|
13275
|
+
"description": "Identifier of the key-value database to act on: the id (db_…) returned by databaseCreateKvDatabase or databaseListKvDatabases. A display name is not accepted; the id of a table database returns 404 DATABASE_NOT_FOUND."
|
|
13276
|
+
}
|
|
13277
|
+
],
|
|
13278
|
+
"query": [
|
|
13279
|
+
{
|
|
13280
|
+
"name": "after_seq",
|
|
13281
|
+
"type": "integer",
|
|
13282
|
+
"required": false,
|
|
13283
|
+
"description": "With order=asc, return only events with seq greater than this value. Cannot be combined with before_seq."
|
|
13284
|
+
},
|
|
13285
|
+
{
|
|
13286
|
+
"name": "limit",
|
|
13287
|
+
"type": "integer",
|
|
13288
|
+
"required": false,
|
|
13289
|
+
"description": "Page size."
|
|
13290
|
+
},
|
|
13291
|
+
{
|
|
13292
|
+
"name": "order",
|
|
13293
|
+
"type": "string",
|
|
13294
|
+
"enum": [
|
|
13295
|
+
"asc",
|
|
13296
|
+
"desc"
|
|
13297
|
+
],
|
|
13298
|
+
"required": false,
|
|
13299
|
+
"description": "Sequence order: asc or desc (newest first). Defaults to asc, or to desc when before_seq is supplied."
|
|
13300
|
+
},
|
|
13301
|
+
{
|
|
13302
|
+
"name": "before_seq",
|
|
13303
|
+
"type": "integer",
|
|
13304
|
+
"required": false,
|
|
13305
|
+
"description": "Return only events with seq less than this value, newest first; implies order=desc when order is omitted. Cannot be combined with after_seq or order=asc."
|
|
13306
|
+
}
|
|
13307
|
+
]
|
|
13308
|
+
},
|
|
13309
|
+
{
|
|
13310
|
+
"resource": "database.kv.keys",
|
|
13311
|
+
"method": "list",
|
|
13312
|
+
"summary": "List keys",
|
|
13313
|
+
"description": "Browse the keys of a key-value database (kind kv): use it to see what is stored before reading one key with databaseKvGetKey; to run an arbitrary Redis command (counters, ranges, scans) use databaseKvExecuteCommand instead. Keys come back in lexicographic key order, one page at a time, as summaries (key, type, remaining TTL, size) without values; expired keys are never returned. pattern filters with a Redis glob (* ? [abc] [^abc]) matched against the whole key, and type keeps one value type. limit is 1–500, default 50; while next_cursor is a string, pass it back unchanged as cursor for the next page; null means this is the last page. Needs a read credential. Errors: 400 INVALID_PARAMS for a limit outside 1–500 or a malformed query; 404 DATABASE_NOT_FOUND for an unknown id.",
|
|
13314
|
+
"http": "GET",
|
|
13315
|
+
"path": "/database/v1/kv/{database_id}/keys",
|
|
13316
|
+
"streaming": "no",
|
|
13317
|
+
"pagination": true,
|
|
13318
|
+
"pathParams": [
|
|
13319
|
+
{
|
|
13320
|
+
"name": "database_id",
|
|
13321
|
+
"sdkName": "database_id",
|
|
13322
|
+
"description": "Identifier of the key-value database: the id (db_…) returned by databaseCreateKvDatabase or databaseListKvDatabases. A display name is not accepted; the id of a table database returns 404 DATABASE_NOT_FOUND."
|
|
13323
|
+
}
|
|
13324
|
+
],
|
|
13325
|
+
"query": [
|
|
13326
|
+
{
|
|
13327
|
+
"name": "limit",
|
|
13328
|
+
"type": "integer",
|
|
13329
|
+
"required": false,
|
|
13330
|
+
"description": "Keys per page, 1–500, default 50; a value outside the range returns 400 INVALID_PARAMS."
|
|
13331
|
+
},
|
|
13332
|
+
{
|
|
13333
|
+
"name": "cursor",
|
|
13334
|
+
"type": "string",
|
|
13335
|
+
"required": false,
|
|
13336
|
+
"description": "The next_cursor of the previous page, passed back unchanged; omit it to start from the first key."
|
|
13337
|
+
},
|
|
13338
|
+
{
|
|
13339
|
+
"name": "pattern",
|
|
13340
|
+
"type": "string",
|
|
13341
|
+
"required": false,
|
|
13342
|
+
"description": "Redis glob (* any run, ? one character, [abc] a set, [^abc] a negated set) matched against the whole key, for example user:*; omitted returns every key."
|
|
13343
|
+
},
|
|
13344
|
+
{
|
|
13345
|
+
"name": "type",
|
|
13346
|
+
"type": "string",
|
|
13347
|
+
"enum": [
|
|
13348
|
+
"string",
|
|
13349
|
+
"hash",
|
|
13350
|
+
"list",
|
|
13351
|
+
"set",
|
|
13352
|
+
"zset"
|
|
13353
|
+
],
|
|
13354
|
+
"required": false,
|
|
13355
|
+
"description": "Return only keys holding this value type; omitted returns every type."
|
|
13356
|
+
}
|
|
13357
|
+
]
|
|
13358
|
+
},
|
|
13359
|
+
{
|
|
13360
|
+
"resource": "database.kv.keys",
|
|
13361
|
+
"method": "delete",
|
|
13362
|
+
"summary": "Delete key",
|
|
13363
|
+
"description": "Delete one key of a key-value database together with its value; the data cannot be recovered. A key that is absent or has already expired is not an error: the call succeeds with deleted false, so it is safe to retry. To delete many keys at once or by pattern, list them with databaseKvListKeys or run DEL / UNLINK through databaseKvExecuteCommand. Needs a read-write credential. Errors: 404 DATABASE_NOT_FOUND for an unknown id; 403 BINDING_READ_ONLY for a read-only credential.",
|
|
13364
|
+
"http": "DELETE",
|
|
13365
|
+
"path": "/database/v1/kv/{database_id}/keys/{key}",
|
|
13366
|
+
"streaming": "no",
|
|
13367
|
+
"pagination": false,
|
|
13368
|
+
"pathParams": [
|
|
13369
|
+
{
|
|
13370
|
+
"name": "database_id",
|
|
13371
|
+
"sdkName": "database_id",
|
|
13372
|
+
"description": "Identifier of the key-value database: the id (db_…) returned by databaseCreateKvDatabase or databaseListKvDatabases. A display name is not accepted; the id of a table database returns 404 DATABASE_NOT_FOUND."
|
|
13373
|
+
},
|
|
13374
|
+
{
|
|
13375
|
+
"name": "key",
|
|
13376
|
+
"sdkName": "key",
|
|
13377
|
+
"description": "The key to delete: any UTF-8 string up to 1 KiB, percent-encoded in the path (for example user%3A1 for user:1). Keys are case-sensitive."
|
|
13378
|
+
}
|
|
13379
|
+
],
|
|
13380
|
+
"query": []
|
|
13381
|
+
},
|
|
13382
|
+
{
|
|
13383
|
+
"resource": "database.kv.keys",
|
|
13384
|
+
"method": "retrieve",
|
|
13385
|
+
"summary": "Get key",
|
|
13386
|
+
"description": "Read one key of a key-value database with its type, TTL, size and value; use databaseKvListKeys first to find key names. A string value is returned whole. A hash, list, set or zset is returned a page of entries at a time: limit is 1–1000, default 100, and while next_cursor is a string, pass it back unchanged as cursor to read the next page; string values and the last page return next_cursor null. value takes the shape of type: a string; hash as [{field, value}]; list and set as a string array; zset as [{member, score}]. Needs a read credential. Errors: 404 KEY_NOT_FOUND when the key does not exist or has expired; 400 INVALID_PARAMS for a limit outside 1–1000; 404 DATABASE_NOT_FOUND.",
|
|
13387
|
+
"http": "GET",
|
|
13388
|
+
"path": "/database/v1/kv/{database_id}/keys/{key}",
|
|
13389
|
+
"streaming": "no",
|
|
13390
|
+
"pagination": false,
|
|
13391
|
+
"pathParams": [
|
|
13392
|
+
{
|
|
13393
|
+
"name": "database_id",
|
|
13394
|
+
"sdkName": "database_id",
|
|
13395
|
+
"description": "Identifier of the key-value database: the id (db_…) returned by databaseCreateKvDatabase or databaseListKvDatabases. A display name is not accepted; the id of a table database returns 404 DATABASE_NOT_FOUND."
|
|
13396
|
+
},
|
|
13397
|
+
{
|
|
13398
|
+
"name": "key",
|
|
13399
|
+
"sdkName": "key",
|
|
13400
|
+
"description": "The key to read: any UTF-8 string up to 1 KiB, percent-encoded in the path (for example user%3A1 for user:1). Keys are case-sensitive."
|
|
13401
|
+
}
|
|
13402
|
+
],
|
|
13403
|
+
"query": [
|
|
13404
|
+
{
|
|
13405
|
+
"name": "limit",
|
|
13406
|
+
"type": "integer",
|
|
13407
|
+
"required": false,
|
|
13408
|
+
"description": "Container entries per page, 1–1000, default 100; ignored for a string value, which is never paged."
|
|
13409
|
+
},
|
|
13410
|
+
{
|
|
13411
|
+
"name": "cursor",
|
|
13412
|
+
"type": "string",
|
|
13413
|
+
"required": false,
|
|
13414
|
+
"description": "The next_cursor of the previous page of this key, passed back unchanged; omit it for the first page."
|
|
13415
|
+
}
|
|
13416
|
+
]
|
|
13417
|
+
},
|
|
13418
|
+
{
|
|
13419
|
+
"resource": "database.kv.keys",
|
|
13420
|
+
"method": "update",
|
|
13421
|
+
"summary": "Update key",
|
|
13422
|
+
"description": "Change only the TTL of an existing key of a key-value database, leaving its value alone. update_mask must be ttl_ms (the only writable field) and ttl_ms is required: a positive integer is the new TTL in milliseconds (Redis PEXPIRE), null removes the TTL so the key never expires (PERSIST). To replace the value use databaseKvSetKey. Returns the key after the change. Needs a read-write credential. Errors: 404 KEY_NOT_FOUND when the key does not exist or has expired; 400 INVALID_PARAMS when update_mask is not ttl_ms or ttl_ms is neither a positive integer nor null; 404 DATABASE_NOT_FOUND; 403 BINDING_READ_ONLY.",
|
|
13423
|
+
"http": "PATCH",
|
|
13424
|
+
"path": "/database/v1/kv/{database_id}/keys/{key}",
|
|
13425
|
+
"streaming": "no",
|
|
13426
|
+
"pagination": false,
|
|
13427
|
+
"pathParams": [
|
|
13428
|
+
{
|
|
13429
|
+
"name": "database_id",
|
|
13430
|
+
"sdkName": "database_id",
|
|
13431
|
+
"description": "Identifier of the key-value database: the id (db_…) returned by databaseCreateKvDatabase or databaseListKvDatabases. A display name is not accepted; the id of a table database returns 404 DATABASE_NOT_FOUND."
|
|
13432
|
+
},
|
|
13433
|
+
{
|
|
13434
|
+
"name": "key",
|
|
13435
|
+
"sdkName": "key",
|
|
13436
|
+
"description": "The key whose TTL changes: any UTF-8 string up to 1 KiB, percent-encoded in the path (for example user%3A1 for user:1). Keys are case-sensitive."
|
|
13437
|
+
}
|
|
13438
|
+
],
|
|
13439
|
+
"query": [],
|
|
13440
|
+
"body": {
|
|
13441
|
+
"required": true,
|
|
13442
|
+
"fields": [
|
|
13443
|
+
{
|
|
13444
|
+
"name": "update_mask",
|
|
13445
|
+
"type": "string",
|
|
13446
|
+
"enum": [
|
|
13447
|
+
"ttl_ms"
|
|
13448
|
+
],
|
|
13449
|
+
"required": true,
|
|
13450
|
+
"description": "The field being changed; only ttl_ms is writable and it must be stated."
|
|
13451
|
+
},
|
|
13452
|
+
{
|
|
13453
|
+
"name": "ttl_ms",
|
|
13454
|
+
"type": "integer",
|
|
13455
|
+
"required": true,
|
|
13456
|
+
"description": "A positive integer sets the TTL in milliseconds from now; null removes the TTL so the key never expires."
|
|
13457
|
+
}
|
|
13458
|
+
]
|
|
13459
|
+
}
|
|
13460
|
+
},
|
|
13461
|
+
{
|
|
13462
|
+
"resource": "database.kv.keys",
|
|
13463
|
+
"method": "set",
|
|
13464
|
+
"summary": "Set key",
|
|
13465
|
+
"description": "Overwrite one key of a key-value database with a whole new value in a single transaction, creating it if absent; the previous value is dropped first and never merged, even when the type changes. To change only the TTL use databaseKvUpdateKey; to add to a counter or push onto a list use databaseKvExecuteCommand. type decides the shape of value: a string; hash as [{field, value}]; list and set as a string array; zset as [{member, score}] with finite scores. Containers must not be empty, and hash fields and set members must be unique. ttl_ms omitted keeps the key's existing TTL, a positive integer sets a new one in milliseconds, null makes the key permanent. A value is at most 1 MiB and a key at most 1 KiB. Returns the stored key (first page for a container). Needs a read-write credential. Errors: 400 INVALID_PARAMS for an empty container, duplicate field or member, non-finite score or bad ttl_ms; 400 LIMIT_EXCEEDED for an oversized key or value; 503 CAPACITY when the database is full; 404 DATABASE_NOT_FOUND; 403 BINDING_READ_ONLY for a read-only credential.",
|
|
13466
|
+
"http": "PUT",
|
|
13467
|
+
"path": "/database/v1/kv/{database_id}/keys/{key}",
|
|
13468
|
+
"streaming": "no",
|
|
13469
|
+
"pagination": false,
|
|
13470
|
+
"pathParams": [
|
|
13471
|
+
{
|
|
13472
|
+
"name": "database_id",
|
|
13473
|
+
"sdkName": "database_id",
|
|
13474
|
+
"description": "Identifier of the key-value database: the id (db_…) returned by databaseCreateKvDatabase or databaseListKvDatabases. A display name is not accepted; the id of a table database returns 404 DATABASE_NOT_FOUND."
|
|
13475
|
+
},
|
|
13476
|
+
{
|
|
13477
|
+
"name": "key",
|
|
13478
|
+
"sdkName": "key",
|
|
13479
|
+
"description": "The key to write: any UTF-8 string up to 1 KiB, percent-encoded in the path (for example user%3A1 for user:1). Keys are case-sensitive."
|
|
13480
|
+
}
|
|
13481
|
+
],
|
|
13482
|
+
"query": [],
|
|
13483
|
+
"body": {
|
|
13484
|
+
"required": true,
|
|
13485
|
+
"fields": [
|
|
13486
|
+
{
|
|
13487
|
+
"name": "type",
|
|
13488
|
+
"type": "string",
|
|
13489
|
+
"enum": [
|
|
13490
|
+
"string",
|
|
13491
|
+
"hash",
|
|
13492
|
+
"list",
|
|
13493
|
+
"set",
|
|
13494
|
+
"zset"
|
|
13495
|
+
],
|
|
13496
|
+
"required": true,
|
|
13497
|
+
"description": "Type of the new value; it becomes the key's type and replaces whatever was stored under it."
|
|
13498
|
+
},
|
|
13499
|
+
{
|
|
13500
|
+
"name": "value",
|
|
13501
|
+
"type": "object",
|
|
13502
|
+
"required": true,
|
|
13503
|
+
"description": "The whole new value in the shape of type: a string; hash as [{field, value}]; list and set as a non-empty string array; zset as [{member, score}]. At most 1 MiB."
|
|
13504
|
+
},
|
|
13505
|
+
{
|
|
13506
|
+
"name": "ttl_ms",
|
|
13507
|
+
"type": "integer",
|
|
13508
|
+
"required": false,
|
|
13509
|
+
"description": "Omit to keep the key's existing TTL; a positive integer sets a new TTL in milliseconds; null makes the key permanent."
|
|
13510
|
+
}
|
|
13511
|
+
]
|
|
13512
|
+
}
|
|
13513
|
+
},
|
|
13514
|
+
{
|
|
13515
|
+
"resource": "database.kv.purge",
|
|
13516
|
+
"method": "create",
|
|
13517
|
+
"summary": "Permanently purge database",
|
|
13518
|
+
"description": "Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.",
|
|
13519
|
+
"http": "POST",
|
|
13520
|
+
"path": "/database/v1/kv/{database_id}/purge",
|
|
13521
|
+
"streaming": "no",
|
|
13522
|
+
"pagination": false,
|
|
13523
|
+
"pathParams": [
|
|
13524
|
+
{
|
|
13525
|
+
"name": "database_id",
|
|
13526
|
+
"sdkName": "database_id",
|
|
13527
|
+
"description": "Identifier of the key-value database to act on: the id (db_…) returned by databaseCreateKvDatabase or databaseListKvDatabases. A display name is not accepted; the id of a table database returns 404 DATABASE_NOT_FOUND."
|
|
13528
|
+
}
|
|
13529
|
+
],
|
|
13530
|
+
"query": []
|
|
13531
|
+
},
|
|
13532
|
+
{
|
|
13533
|
+
"resource": "database.kv",
|
|
13534
|
+
"method": "restore",
|
|
13535
|
+
"summary": "Restore database",
|
|
13536
|
+
"description": "Recover a soft-deleted database within its seven-day recovery window. Restore before purge_at. An empty body is accepted. Active databases return 409; purged databases return 404.",
|
|
13537
|
+
"http": "POST",
|
|
13538
|
+
"path": "/database/v1/kv/{database_id}/restore",
|
|
13539
|
+
"streaming": "no",
|
|
13540
|
+
"pagination": false,
|
|
13541
|
+
"pathParams": [
|
|
13542
|
+
{
|
|
13543
|
+
"name": "database_id",
|
|
13544
|
+
"sdkName": "database_id",
|
|
13545
|
+
"description": "Identifier of the key-value database to act on: the id (db_…) returned by databaseCreateKvDatabase or databaseListKvDatabases. A display name is not accepted; the id of a table database returns 404 DATABASE_NOT_FOUND."
|
|
13546
|
+
}
|
|
13547
|
+
],
|
|
13548
|
+
"query": []
|
|
13549
|
+
},
|
|
13550
|
+
{
|
|
13551
|
+
"resource": "database.table",
|
|
13552
|
+
"method": "list",
|
|
13553
|
+
"summary": "List table databases",
|
|
13554
|
+
"description": "Find the table databases owned by your tenant (databases of the other type are not listed) and obtain their ids for schema or row operations. Excludes deleting by default. status=active or status=deleting selects that state; invalid values return 400 INVALID_PARAMS.",
|
|
13555
|
+
"http": "GET",
|
|
13556
|
+
"path": "/database/v1/table",
|
|
13557
|
+
"streaming": "no",
|
|
13558
|
+
"pagination": true,
|
|
13559
|
+
"pathParams": [],
|
|
13560
|
+
"query": [
|
|
13561
|
+
{
|
|
13562
|
+
"name": "cursor",
|
|
13563
|
+
"type": "string",
|
|
13564
|
+
"required": false,
|
|
13565
|
+
"description": "Opaque next_cursor from the previous page."
|
|
13566
|
+
},
|
|
13567
|
+
{
|
|
13568
|
+
"name": "limit",
|
|
13569
|
+
"type": "integer",
|
|
13570
|
+
"required": false,
|
|
13571
|
+
"description": "Page size."
|
|
13572
|
+
},
|
|
13573
|
+
{
|
|
13574
|
+
"name": "labels",
|
|
13575
|
+
"type": "object",
|
|
13576
|
+
"required": false,
|
|
13577
|
+
"description": "Exact label match, encoded as labels[purpose]=docs."
|
|
13578
|
+
},
|
|
13579
|
+
{
|
|
13580
|
+
"name": "status",
|
|
13581
|
+
"type": "string",
|
|
13582
|
+
"enum": [
|
|
13583
|
+
"active",
|
|
13584
|
+
"deleting"
|
|
13585
|
+
],
|
|
13586
|
+
"required": false,
|
|
13587
|
+
"description": "Filter by lifecycle state. active (the default when omitted) lists usable databases; deleting lists databases that were deleted and are still inside the seven-day restore window. Any other value returns 400 INVALID_PARAMS."
|
|
13588
|
+
}
|
|
13589
|
+
]
|
|
13590
|
+
},
|
|
13591
|
+
{
|
|
13592
|
+
"resource": "database.table",
|
|
13593
|
+
"method": "create",
|
|
13594
|
+
"summary": "Create table database",
|
|
13595
|
+
"description": "Creates an empty table database for the caller and returns it with status active (HTTP 201); add tables next with praxis.database.table.tables.create, then read and write rows with praxis.database.table.rest. The path is the type: the body takes no kind, and a body that carries kind returns 400 INVALID_PARAMS: kind is set by the path. name is required and is 1–64 visible characters after trimming. labels are optional string tags (at most 64; each key starts with a lowercase letter and uses up to 63 characters of a-z 0-9 _ -; each value is up to 63 characters of a-z 0-9 _ -) that databaseListTableDatabases can filter on. If initialization fails the call returns 503 CAPACITY and the half-created database is left with status failed; retry by calling create again, which makes a new database. Unlike Supabase, this creates a SQLite-backed database without a PostgreSQL connection or SQL execution endpoint. Use a Praxis credential; access is scoped to its tenant, not to Supabase Auth users or RLS policies. For Redis-style keys use praxis.database.kv.create instead.",
|
|
13596
|
+
"http": "POST",
|
|
13597
|
+
"path": "/database/v1/table",
|
|
13598
|
+
"streaming": "no",
|
|
13599
|
+
"pagination": false,
|
|
13600
|
+
"pathParams": [],
|
|
13601
|
+
"query": [],
|
|
11876
13602
|
"body": {
|
|
11877
13603
|
"required": true,
|
|
11878
13604
|
"fields": [
|
|
@@ -11892,55 +13618,55 @@ export const operations = [
|
|
|
11892
13618
|
}
|
|
11893
13619
|
},
|
|
11894
13620
|
{
|
|
11895
|
-
"resource": "database.
|
|
13621
|
+
"resource": "database.table",
|
|
11896
13622
|
"method": "delete",
|
|
11897
13623
|
"summary": "Delete database",
|
|
11898
13624
|
"description": "Soft-delete a database when it should stop accepting schema and row operations. Idempotently enters deleting with a seven-day purge_at. GET remains available; child operations return 409 until restored.",
|
|
11899
13625
|
"http": "DELETE",
|
|
11900
|
-
"path": "/database/v1/
|
|
13626
|
+
"path": "/database/v1/table/{database_id}",
|
|
11901
13627
|
"streaming": "no",
|
|
11902
13628
|
"pagination": false,
|
|
11903
13629
|
"pathParams": [
|
|
11904
13630
|
{
|
|
11905
13631
|
"name": "database_id",
|
|
11906
13632
|
"sdkName": "database_id",
|
|
11907
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
13633
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
11908
13634
|
}
|
|
11909
13635
|
],
|
|
11910
13636
|
"query": []
|
|
11911
13637
|
},
|
|
11912
13638
|
{
|
|
11913
|
-
"resource": "database.
|
|
13639
|
+
"resource": "database.table",
|
|
11914
13640
|
"method": "retrieve",
|
|
11915
|
-
"summary": "Get database",
|
|
11916
|
-
"description": "Returns one database by id, including a database in the deleting state (purge_at then shows when it will be permanently removed). Call it before table or row operations to confirm status is active: schema and row calls on a deleting database return 409 DATABASE_INVALID_STATE. size_bytes is refreshed from live storage at most once every five seconds. A purged or unknown id returns 404 DATABASE_NOT_FOUND.",
|
|
13641
|
+
"summary": "Get table database",
|
|
13642
|
+
"description": "Returns one database by id, including a database in the deleting state (purge_at then shows when it will be permanently removed). Call it before table or row operations to confirm status is active: schema and row calls on a deleting database return 409 DATABASE_INVALID_STATE. size_bytes is refreshed from live storage at most once every five seconds. A purged or unknown id, or the id of a key-value database, returns 404 DATABASE_NOT_FOUND.",
|
|
11917
13643
|
"http": "GET",
|
|
11918
|
-
"path": "/database/v1/
|
|
13644
|
+
"path": "/database/v1/table/{database_id}",
|
|
11919
13645
|
"streaming": "no",
|
|
11920
13646
|
"pagination": false,
|
|
11921
13647
|
"pathParams": [
|
|
11922
13648
|
{
|
|
11923
13649
|
"name": "database_id",
|
|
11924
13650
|
"sdkName": "database_id",
|
|
11925
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
13651
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
11926
13652
|
}
|
|
11927
13653
|
],
|
|
11928
13654
|
"query": []
|
|
11929
13655
|
},
|
|
11930
13656
|
{
|
|
11931
|
-
"resource": "database.
|
|
13657
|
+
"resource": "database.table",
|
|
11932
13658
|
"method": "update",
|
|
11933
13659
|
"summary": "Update database",
|
|
11934
|
-
"description": "Renames an active database and/or replaces its labels; send only the keys you want to change. labels is replaced as a whole, not merged, so include every label you want to keep. A body without name or labels, or with values equal to the current ones, changes nothing and leaves updated_at as is. A database in the deleting state returns 409 DATABASE_INVALID_STATE; restore it first with
|
|
13660
|
+
"description": "Renames an active database and/or replaces its labels; send only the keys you want to change. labels is replaced as a whole, not merged, so include every label you want to keep. A body without name or labels, or with values equal to the current ones, changes nothing and leaves updated_at as is. A database in the deleting state returns 409 DATABASE_INVALID_STATE; restore it first with databaseRestoreTableDatabase.",
|
|
11935
13661
|
"http": "PATCH",
|
|
11936
|
-
"path": "/database/v1/
|
|
13662
|
+
"path": "/database/v1/table/{database_id}",
|
|
11937
13663
|
"streaming": "no",
|
|
11938
13664
|
"pagination": false,
|
|
11939
13665
|
"pathParams": [
|
|
11940
13666
|
{
|
|
11941
13667
|
"name": "database_id",
|
|
11942
13668
|
"sdkName": "database_id",
|
|
11943
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
13669
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
11944
13670
|
}
|
|
11945
13671
|
],
|
|
11946
13672
|
"query": [],
|
|
@@ -11963,19 +13689,19 @@ export const operations = [
|
|
|
11963
13689
|
}
|
|
11964
13690
|
},
|
|
11965
13691
|
{
|
|
11966
|
-
"resource": "database.
|
|
13692
|
+
"resource": "database.table.events",
|
|
11967
13693
|
"method": "list",
|
|
11968
13694
|
"summary": "List events",
|
|
11969
13695
|
"description": "Read lifecycle and schema events, including while the database is deleting. next_cursor is an opaque string cursor (do not do arithmetic on it): pass it as after_seq for asc or before_seq for desc. Supplying both cursors returns 400 INVALID_PARAMS. Unlike Supabase Realtime, this is paged lifecycle and schema history, not a subscription or a row-change feed; row inserts, updates and deletes do not appear here.",
|
|
11970
13696
|
"http": "GET",
|
|
11971
|
-
"path": "/database/v1/
|
|
13697
|
+
"path": "/database/v1/table/{database_id}/events",
|
|
11972
13698
|
"streaming": "no",
|
|
11973
13699
|
"pagination": false,
|
|
11974
13700
|
"pathParams": [
|
|
11975
13701
|
{
|
|
11976
13702
|
"name": "database_id",
|
|
11977
13703
|
"sdkName": "database_id",
|
|
11978
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
13704
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
11979
13705
|
}
|
|
11980
13706
|
],
|
|
11981
13707
|
"query": [
|
|
@@ -12010,37 +13736,37 @@ export const operations = [
|
|
|
12010
13736
|
]
|
|
12011
13737
|
},
|
|
12012
13738
|
{
|
|
12013
|
-
"resource": "database.
|
|
13739
|
+
"resource": "database.table.purge",
|
|
12014
13740
|
"method": "create",
|
|
12015
13741
|
"summary": "Permanently purge database",
|
|
12016
13742
|
"description": "Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.",
|
|
12017
13743
|
"http": "POST",
|
|
12018
|
-
"path": "/database/v1/
|
|
13744
|
+
"path": "/database/v1/table/{database_id}/purge",
|
|
12019
13745
|
"streaming": "no",
|
|
12020
13746
|
"pagination": false,
|
|
12021
13747
|
"pathParams": [
|
|
12022
13748
|
{
|
|
12023
13749
|
"name": "database_id",
|
|
12024
13750
|
"sdkName": "database_id",
|
|
12025
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
13751
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
12026
13752
|
}
|
|
12027
13753
|
],
|
|
12028
13754
|
"query": []
|
|
12029
13755
|
},
|
|
12030
13756
|
{
|
|
12031
|
-
"resource": "database.
|
|
13757
|
+
"resource": "database.table.rest",
|
|
12032
13758
|
"method": "delete",
|
|
12033
13759
|
"summary": "Delete rows",
|
|
12034
|
-
"description": "Deletes the rows matched by the filter query parameters (the same filters as
|
|
13760
|
+
"description": "Deletes the rows matched by the filter query parameters (the same filters as databaseTableSelect); with no filter every row of the table matches. Deletion is immediate and cannot be undone. A row that a link field of another table still references makes the whole call fail with 409 REFERENCE_RESTRICT and nothing is deleted. The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the deleted rows.",
|
|
12035
13761
|
"http": "DELETE",
|
|
12036
|
-
"path": "/database/v1/
|
|
13762
|
+
"path": "/database/v1/table/{database_id}/rest/{table}",
|
|
12037
13763
|
"streaming": "no",
|
|
12038
13764
|
"pagination": false,
|
|
12039
13765
|
"pathParams": [
|
|
12040
13766
|
{
|
|
12041
13767
|
"name": "database_id",
|
|
12042
13768
|
"sdkName": "database_id",
|
|
12043
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
13769
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
12044
13770
|
},
|
|
12045
13771
|
{
|
|
12046
13772
|
"name": "table",
|
|
@@ -12132,19 +13858,19 @@ export const operations = [
|
|
|
12132
13858
|
]
|
|
12133
13859
|
},
|
|
12134
13860
|
{
|
|
12135
|
-
"resource": "database.
|
|
13861
|
+
"resource": "database.table.rest",
|
|
12136
13862
|
"method": "retrieve",
|
|
12137
13863
|
"summary": "Select rows",
|
|
12138
13864
|
"description": "Read matching rows with filters, selected columns and ordering. Returns at most 1000 rows per request, including when limit is omitted. Content-Range reports the actual returned interval and the total when count is requested. PATCH and DELETE are not subject to this read cap. Unlike Supabase, casts, aggregates, spread and join modifiers are unsupported. Each table supports up to 1,000,000 rows. Query budget: 8,000 ms with a shared 3,000,000-row safety ceiling. Create indexes on filtered or sorted fields, or narrow the request when it exceeds its budget. Synchronous SQLite aggregates use candidate-row throughput estimates before execution; deployed Workers freeze clocks during synchronous CPU work, so the timer is not a guaranteed server-side interrupt. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24/*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Error table: QUERY_CANCELED / PostgREST 57014 is HTTP 500, retryable=false: Query timed out: index filtered or sorted fields, or narrow the range. DATABASE_INVALID_STATE is HTTP 409 for operations on a deleting database. Cleared or nonexistent databases return DATABASE_NOT_FOUND / HTTP 404. The count is an HTTP Content-Range response header, not a JSON property. Use praxis.database.count in the SDK or codemode to return { count: number | null }; a page length is not a total unless you know all matches fit in that page.",
|
|
12139
13865
|
"http": "GET",
|
|
12140
|
-
"path": "/database/v1/
|
|
13866
|
+
"path": "/database/v1/table/{database_id}/rest/{table}",
|
|
12141
13867
|
"streaming": "no",
|
|
12142
13868
|
"pagination": false,
|
|
12143
13869
|
"pathParams": [
|
|
12144
13870
|
{
|
|
12145
13871
|
"name": "database_id",
|
|
12146
13872
|
"sdkName": "database_id",
|
|
12147
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
13873
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
12148
13874
|
},
|
|
12149
13875
|
{
|
|
12150
13876
|
"name": "table",
|
|
@@ -12236,19 +13962,19 @@ export const operations = [
|
|
|
12236
13962
|
]
|
|
12237
13963
|
},
|
|
12238
13964
|
{
|
|
12239
|
-
"resource": "database.
|
|
13965
|
+
"resource": "database.table.rest",
|
|
12240
13966
|
"method": "head",
|
|
12241
13967
|
"summary": "Count rows",
|
|
12242
13968
|
"description": "Inspect the HTTP row count and range without retrieving row data; send Prefer: count=exact for a filtered count. Returns no body and does not fetch or serialize row data. A known count determines the interval using limit/offset or Range with a default and maximum page size of 1000. Without a count preference, or when the selected count mode cannot supply a total, Content-Range is */*. Singular Accept still validates page cardinality. Unlike Supabase, planned and estimated counts do not use PostgreSQL planner estimates. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24/*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Use praxis.database.count in the SDK or codemode to return { count: number | null } from this header without retrieving rows.",
|
|
12243
13969
|
"http": "HEAD",
|
|
12244
|
-
"path": "/database/v1/
|
|
13970
|
+
"path": "/database/v1/table/{database_id}/rest/{table}",
|
|
12245
13971
|
"streaming": "no",
|
|
12246
13972
|
"pagination": false,
|
|
12247
13973
|
"pathParams": [
|
|
12248
13974
|
{
|
|
12249
13975
|
"name": "database_id",
|
|
12250
13976
|
"sdkName": "database_id",
|
|
12251
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
13977
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
12252
13978
|
},
|
|
12253
13979
|
{
|
|
12254
13980
|
"name": "table",
|
|
@@ -12340,19 +14066,19 @@ export const operations = [
|
|
|
12340
14066
|
]
|
|
12341
14067
|
},
|
|
12342
14068
|
{
|
|
12343
|
-
"resource": "database.
|
|
14069
|
+
"resource": "database.table.rest",
|
|
12344
14070
|
"method": "update",
|
|
12345
14071
|
"summary": "Update rows",
|
|
12346
|
-
"description": "Updates the rows matched by the filter query parameters (the same filters as
|
|
14072
|
+
"description": "Updates the rows matched by the filter query parameters (the same filters as databaseTableSelect); with no filter every row of the table matches. The JSON object body lists only the fields to change, other fields keep their values, and id cannot be changed. Values are validated against the field types and the required and unique settings (400 VALIDATION_FAILED, 409 UNIQUE_VIOLATION). The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the updated rows. Each changed row's _version increases by one.",
|
|
12347
14073
|
"http": "PATCH",
|
|
12348
|
-
"path": "/database/v1/
|
|
14074
|
+
"path": "/database/v1/table/{database_id}/rest/{table}",
|
|
12349
14075
|
"streaming": "no",
|
|
12350
14076
|
"pagination": false,
|
|
12351
14077
|
"pathParams": [
|
|
12352
14078
|
{
|
|
12353
14079
|
"name": "database_id",
|
|
12354
14080
|
"sdkName": "database_id",
|
|
12355
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
14081
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
12356
14082
|
},
|
|
12357
14083
|
{
|
|
12358
14084
|
"name": "table",
|
|
@@ -12448,19 +14174,19 @@ export const operations = [
|
|
|
12448
14174
|
}
|
|
12449
14175
|
},
|
|
12450
14176
|
{
|
|
12451
|
-
"resource": "database.
|
|
14177
|
+
"resource": "database.table.rest",
|
|
12452
14178
|
"method": "create",
|
|
12453
14179
|
"summary": "Insert rows",
|
|
12454
14180
|
"description": "Insert rows into an existing table after defining its fields; at most 500 rows per request. Each request is atomic: any failure rolls back the entire batch. There are no transactions across requests.\nRows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.\nThe default is return=minimal: success returns HTTP 201 with an empty body. Send Prefer: return=representation to return the inserted rows. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. Unlike Supabase, upsert conflicts can target only id or one unique field, not a composite key. Each table supports up to 1,000,000 rows.",
|
|
12455
14181
|
"http": "POST",
|
|
12456
|
-
"path": "/database/v1/
|
|
14182
|
+
"path": "/database/v1/table/{database_id}/rest/{table}",
|
|
12457
14183
|
"streaming": "no",
|
|
12458
14184
|
"pagination": false,
|
|
12459
14185
|
"pathParams": [
|
|
12460
14186
|
{
|
|
12461
14187
|
"name": "database_id",
|
|
12462
14188
|
"sdkName": "database_id",
|
|
12463
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
14189
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
12464
14190
|
},
|
|
12465
14191
|
{
|
|
12466
14192
|
"name": "table",
|
|
@@ -12556,55 +14282,55 @@ export const operations = [
|
|
|
12556
14282
|
}
|
|
12557
14283
|
},
|
|
12558
14284
|
{
|
|
12559
|
-
"resource": "database.
|
|
14285
|
+
"resource": "database.table",
|
|
12560
14286
|
"method": "restore",
|
|
12561
14287
|
"summary": "Restore database",
|
|
12562
14288
|
"description": "Recover a soft-deleted database within its seven-day recovery window. Restore before purge_at. An empty body is accepted. Active databases return 409; purged databases return 404.",
|
|
12563
14289
|
"http": "POST",
|
|
12564
|
-
"path": "/database/v1/
|
|
14290
|
+
"path": "/database/v1/table/{database_id}/restore",
|
|
12565
14291
|
"streaming": "no",
|
|
12566
14292
|
"pagination": false,
|
|
12567
14293
|
"pathParams": [
|
|
12568
14294
|
{
|
|
12569
14295
|
"name": "database_id",
|
|
12570
14296
|
"sdkName": "database_id",
|
|
12571
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
14297
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
12572
14298
|
}
|
|
12573
14299
|
],
|
|
12574
14300
|
"query": []
|
|
12575
14301
|
},
|
|
12576
14302
|
{
|
|
12577
|
-
"resource": "database.
|
|
14303
|
+
"resource": "database.table.tables",
|
|
12578
14304
|
"method": "list",
|
|
12579
14305
|
"summary": "List tables",
|
|
12580
|
-
"description": "Lists every table of an active database with its field definitions. A database holds at most 50 tables, so the single page contains all of them and next_cursor is always null. Use
|
|
14306
|
+
"description": "Lists every table of an active database with its field definitions. A database holds at most 50 tables, so the single page contains all of them and next_cursor is always null. Use databaseTableGetTable instead when you also need row_count for one table.",
|
|
12581
14307
|
"http": "GET",
|
|
12582
|
-
"path": "/database/v1/
|
|
14308
|
+
"path": "/database/v1/table/{database_id}/tables",
|
|
12583
14309
|
"streaming": "no",
|
|
12584
14310
|
"pagination": false,
|
|
12585
14311
|
"pathParams": [
|
|
12586
14312
|
{
|
|
12587
14313
|
"name": "database_id",
|
|
12588
14314
|
"sdkName": "database_id",
|
|
12589
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
14315
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
12590
14316
|
}
|
|
12591
14317
|
],
|
|
12592
14318
|
"query": []
|
|
12593
14319
|
},
|
|
12594
14320
|
{
|
|
12595
|
-
"resource": "database.
|
|
14321
|
+
"resource": "database.table.tables",
|
|
12596
14322
|
"method": "create",
|
|
12597
14323
|
"summary": "Create table",
|
|
12598
|
-
"description": "Creates a table together with its initial fields in one call and returns it (HTTP 201) with generated tbl_ and fld_ ids. name must match ^[a-z_][a-z0-9_]{0,62}$ and be unused in this database (duplicate: 409 UNIQUE_VIOLATION). fields is required and may be an empty array; fields can also be added later with
|
|
14324
|
+
"description": "Creates a table together with its initial fields in one call and returns it (HTTP 201) with generated tbl_ and fld_ ids. name must match ^[a-z_][a-z0-9_]{0,62}$ and be unused in this database (duplicate: 409 UNIQUE_VIOLATION). fields is required and may be an empty array; fields can also be added later with databaseTableAddField. Limits: 50 tables per database, 64 fields per table, and 16 indexed or unique fields per table; exceeding one returns 400 LIMIT_EXCEEDED. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {\"name\":\"notes\",\"type\":\"string\",\"indexed\":false}. Every row also has a system id column, which is not declared as a field. Insert data afterwards with databaseTableInsert. Unlike Supabase, define schema with this table API and the field APIs; PostgreSQL DDL and SQL migration files cannot be submitted. Each table supports up to 1,000,000 rows.",
|
|
12599
14325
|
"http": "POST",
|
|
12600
|
-
"path": "/database/v1/
|
|
14326
|
+
"path": "/database/v1/table/{database_id}/tables",
|
|
12601
14327
|
"streaming": "no",
|
|
12602
14328
|
"pagination": false,
|
|
12603
14329
|
"pathParams": [
|
|
12604
14330
|
{
|
|
12605
14331
|
"name": "database_id",
|
|
12606
14332
|
"sdkName": "database_id",
|
|
12607
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
14333
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
12608
14334
|
}
|
|
12609
14335
|
],
|
|
12610
14336
|
"query": [],
|
|
@@ -12634,19 +14360,19 @@ export const operations = [
|
|
|
12634
14360
|
}
|
|
12635
14361
|
},
|
|
12636
14362
|
{
|
|
12637
|
-
"resource": "database.
|
|
14363
|
+
"resource": "database.table.tables",
|
|
12638
14364
|
"method": "delete",
|
|
12639
14365
|
"summary": "Delete table",
|
|
12640
14366
|
"description": "Permanently drops a table with all of its rows; the deletion is immediate and has no recovery window or undo. Refused with 409 REFERENCE_RESTRICT while a link field of another table points at this table, so delete or change those fields first. Returns {deleted: true}. A table name can be reused afterwards.",
|
|
12641
14367
|
"http": "DELETE",
|
|
12642
|
-
"path": "/database/v1/
|
|
14368
|
+
"path": "/database/v1/table/{database_id}/tables/{table}",
|
|
12643
14369
|
"streaming": "no",
|
|
12644
14370
|
"pagination": false,
|
|
12645
14371
|
"pathParams": [
|
|
12646
14372
|
{
|
|
12647
14373
|
"name": "database_id",
|
|
12648
14374
|
"sdkName": "database_id",
|
|
12649
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
14375
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
12650
14376
|
},
|
|
12651
14377
|
{
|
|
12652
14378
|
"name": "table",
|
|
@@ -12657,19 +14383,19 @@ export const operations = [
|
|
|
12657
14383
|
"query": []
|
|
12658
14384
|
},
|
|
12659
14385
|
{
|
|
12660
|
-
"resource": "database.
|
|
14386
|
+
"resource": "database.table.tables",
|
|
12661
14387
|
"method": "retrieve",
|
|
12662
14388
|
"summary": "Get table",
|
|
12663
14389
|
"description": "Returns one table by id or name with its field definitions, schema_revision and row_count. row_count is only returned by this operation, not by list or create. Use field ids from this response for stable references because field names can be renamed; an unknown table returns 404 TABLE_NOT_FOUND.",
|
|
12664
14390
|
"http": "GET",
|
|
12665
|
-
"path": "/database/v1/
|
|
14391
|
+
"path": "/database/v1/table/{database_id}/tables/{table}",
|
|
12666
14392
|
"streaming": "no",
|
|
12667
14393
|
"pagination": false,
|
|
12668
14394
|
"pathParams": [
|
|
12669
14395
|
{
|
|
12670
14396
|
"name": "database_id",
|
|
12671
14397
|
"sdkName": "database_id",
|
|
12672
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
14398
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
12673
14399
|
},
|
|
12674
14400
|
{
|
|
12675
14401
|
"name": "table",
|
|
@@ -12680,19 +14406,19 @@ export const operations = [
|
|
|
12680
14406
|
"query": []
|
|
12681
14407
|
},
|
|
12682
14408
|
{
|
|
12683
|
-
"resource": "database.
|
|
14409
|
+
"resource": "database.table.tables",
|
|
12684
14410
|
"method": "update",
|
|
12685
14411
|
"summary": "Update table",
|
|
12686
|
-
"description": "Renames a table and/or changes its description; send only the keys to change, and send description null to clear it. The new name must follow ^[a-z_][a-z0-9_]{0,62}$ and be unused (409 UNIQUE_VIOLATION); ids are stable, so renaming never rewrites row data. A body with no changes or values equal to the current ones does not bump schema_revision. Fields cannot be changed here; use
|
|
14412
|
+
"description": "Renames a table and/or changes its description; send only the keys to change, and send description null to clear it. The new name must follow ^[a-z_][a-z0-9_]{0,62}$ and be unused (409 UNIQUE_VIOLATION); ids are stable, so renaming never rewrites row data. A body with no changes or values equal to the current ones does not bump schema_revision. Fields cannot be changed here; use databaseTableAddField, databaseTableUpdateField and databaseTableDeleteField.",
|
|
12687
14413
|
"http": "PATCH",
|
|
12688
|
-
"path": "/database/v1/
|
|
14414
|
+
"path": "/database/v1/table/{database_id}/tables/{table}",
|
|
12689
14415
|
"streaming": "no",
|
|
12690
14416
|
"pagination": false,
|
|
12691
14417
|
"pathParams": [
|
|
12692
14418
|
{
|
|
12693
14419
|
"name": "database_id",
|
|
12694
14420
|
"sdkName": "database_id",
|
|
12695
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
14421
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
12696
14422
|
},
|
|
12697
14423
|
{
|
|
12698
14424
|
"name": "table",
|
|
@@ -12720,19 +14446,19 @@ export const operations = [
|
|
|
12720
14446
|
}
|
|
12721
14447
|
},
|
|
12722
14448
|
{
|
|
12723
|
-
"resource": "database.
|
|
14449
|
+
"resource": "database.table.tables.fields",
|
|
12724
14450
|
"method": "create",
|
|
12725
14451
|
"summary": "Add field",
|
|
12726
14452
|
"description": "Adds one field to an existing table and returns the updated table (HTTP 201). Required inputs are name (lowercase letters, digits and underscores; id and names starting with _ are reserved) and type (string, integer, number, boolean, datetime, json or link); json needs options.schema and link needs options.linked_table_id and options.multiple. Adding a required field to a table that already has rows needs a default, otherwise the call fails with 400 VALIDATION_FAILED; a default is written into every existing row. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {\"name\":\"notes\",\"type\":\"string\",\"indexed\":false}. JSON and link fields cannot be indexed. Limits: 64 fields and 16 indexed or unique fields per table (400 LIMIT_EXCEEDED). Unlike Supabase, schema evolution uses field definitions rather than ALTER TABLE statements or SQL migrations.",
|
|
12727
14453
|
"http": "POST",
|
|
12728
|
-
"path": "/database/v1/
|
|
14454
|
+
"path": "/database/v1/table/{database_id}/tables/{table}/fields",
|
|
12729
14455
|
"streaming": "no",
|
|
12730
14456
|
"pagination": false,
|
|
12731
14457
|
"pathParams": [
|
|
12732
14458
|
{
|
|
12733
14459
|
"name": "database_id",
|
|
12734
14460
|
"sdkName": "database_id",
|
|
12735
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
14461
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
12736
14462
|
},
|
|
12737
14463
|
{
|
|
12738
14464
|
"name": "table",
|
|
@@ -12747,19 +14473,19 @@ export const operations = [
|
|
|
12747
14473
|
}
|
|
12748
14474
|
},
|
|
12749
14475
|
{
|
|
12750
|
-
"resource": "database.
|
|
14476
|
+
"resource": "database.table.tables.fields",
|
|
12751
14477
|
"method": "delete",
|
|
12752
14478
|
"summary": "Delete field",
|
|
12753
14479
|
"description": "Deletes one field definition from a table and returns the updated table; the deletion is immediate and has no recovery window. Look the field up by id or name. The field's index, if any, is dropped with it, and the name can be reused afterwards. Unknown fields return 400 FIELD_NOT_FOUND.",
|
|
12754
14480
|
"http": "DELETE",
|
|
12755
|
-
"path": "/database/v1/
|
|
14481
|
+
"path": "/database/v1/table/{database_id}/tables/{table}/fields/{field}",
|
|
12756
14482
|
"streaming": "no",
|
|
12757
14483
|
"pagination": false,
|
|
12758
14484
|
"pathParams": [
|
|
12759
14485
|
{
|
|
12760
14486
|
"name": "database_id",
|
|
12761
14487
|
"sdkName": "database_id",
|
|
12762
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
14488
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
12763
14489
|
},
|
|
12764
14490
|
{
|
|
12765
14491
|
"name": "table",
|
|
@@ -12775,19 +14501,19 @@ export const operations = [
|
|
|
12775
14501
|
"query": []
|
|
12776
14502
|
},
|
|
12777
14503
|
{
|
|
12778
|
-
"resource": "database.
|
|
14504
|
+
"resource": "database.table.tables.fields",
|
|
12779
14505
|
"method": "update",
|
|
12780
14506
|
"summary": "Update field",
|
|
12781
14507
|
"description": "Changes a field's name, description, required flag, indexed flag, default or json options.schema and returns the updated table. The field type, a link field's linked_table_id and the unique flag cannot be changed (400 FIELD_TYPE_IMMUTABLE or INVALID_PARAMS). Setting required to true fails with 400 VALIDATION_FAILED while existing rows hold null for the field. A new json schema constrains only later writes; existing rows are not revalidated. Renaming never rewrites row data, and a request that changes nothing does not bump schema_revision. Unlike Supabase, field types and uniqueness cannot be altered through SQL migrations; use the supported field settings described here.",
|
|
12782
14508
|
"http": "PATCH",
|
|
12783
|
-
"path": "/database/v1/
|
|
14509
|
+
"path": "/database/v1/table/{database_id}/tables/{table}/fields/{field}",
|
|
12784
14510
|
"streaming": "no",
|
|
12785
14511
|
"pagination": false,
|
|
12786
14512
|
"pathParams": [
|
|
12787
14513
|
{
|
|
12788
14514
|
"name": "database_id",
|
|
12789
14515
|
"sdkName": "database_id",
|
|
12790
|
-
"description": "Identifier of the database to act on: the id (db_…) returned by
|
|
14516
|
+
"description": "Identifier of the table database to act on: the id (db_…) returned by databaseCreateTableDatabase or databaseListTableDatabases. A display name is not accepted; the id of a key-value database returns 404 DATABASE_NOT_FOUND."
|
|
12791
14517
|
},
|
|
12792
14518
|
{
|
|
12793
14519
|
"name": "table",
|
|
@@ -23459,6 +25185,255 @@ export const operations = [
|
|
|
23459
25185
|
}
|
|
23460
25186
|
]
|
|
23461
25187
|
},
|
|
25188
|
+
{
|
|
25189
|
+
"resource": "organization.notifications.deliveries",
|
|
25190
|
+
"method": "list",
|
|
25191
|
+
"summary": "Your own notification delivery records",
|
|
25192
|
+
"description": "This person's delivery records in this organization, newest first: channel, status, the reason nothing was sent, the address a mail actually went to, and a carrier's verdict for a sent sms. The recipient is always the credential's own. Records are kept 30 days. Pass next_page unchanged as page; null ends the list. Read-only; no usage charge.",
|
|
25193
|
+
"http": "GET",
|
|
25194
|
+
"path": "/organization/v1/notifications/deliveries",
|
|
25195
|
+
"streaming": "no",
|
|
25196
|
+
"pagination": false,
|
|
25197
|
+
"pathParams": [],
|
|
25198
|
+
"query": [
|
|
25199
|
+
{
|
|
25200
|
+
"name": "limit",
|
|
25201
|
+
"type": "integer",
|
|
25202
|
+
"required": false,
|
|
25203
|
+
"description": "Records per page, 1 to 100; defaults to 20."
|
|
25204
|
+
},
|
|
25205
|
+
{
|
|
25206
|
+
"name": "page",
|
|
25207
|
+
"type": "string",
|
|
25208
|
+
"required": false,
|
|
25209
|
+
"description": "Opaque next_page cursor from the previous response; omit for the first page."
|
|
25210
|
+
}
|
|
25211
|
+
]
|
|
25212
|
+
},
|
|
25213
|
+
{
|
|
25214
|
+
"resource": "organization.notifications",
|
|
25215
|
+
"method": "retrieveInbox",
|
|
25216
|
+
"summary": "Your inbox counts for the notification bell",
|
|
25217
|
+
"description": "Bell-badge counts for the calling person in the organization behind your credential: notices not yet read and not yet seen. The person is always the credential's own; the request cannot name another member. Read-only; no usage charge.",
|
|
25218
|
+
"http": "GET",
|
|
25219
|
+
"path": "/organization/v1/notifications/inbox",
|
|
25220
|
+
"streaming": "no",
|
|
25221
|
+
"pagination": false,
|
|
25222
|
+
"pathParams": [],
|
|
25223
|
+
"query": []
|
|
25224
|
+
},
|
|
25225
|
+
{
|
|
25226
|
+
"resource": "organization.notifications.letters",
|
|
25227
|
+
"method": "list",
|
|
25228
|
+
"summary": "List the letters addressed to you",
|
|
25229
|
+
"description": "The letters this person received in this organization, newest first, as the notification center lists them (ADR-193 §5): the sender's display name (never an address or an internal id; an unknown sender answers 「某位成员」), the summary, the kind, when it arrived, whether it is read, and one line saying why it reached this person. The address is the credential's own and is never a request field. Details stay whole in body; open one by its id. Pass next_cursor unchanged as cursor; null ends the list. Read-only; no usage charge.",
|
|
25230
|
+
"http": "GET",
|
|
25231
|
+
"path": "/organization/v1/notifications/letters",
|
|
25232
|
+
"streaming": "no",
|
|
25233
|
+
"pagination": false,
|
|
25234
|
+
"pathParams": [],
|
|
25235
|
+
"query": [
|
|
25236
|
+
{
|
|
25237
|
+
"name": "status",
|
|
25238
|
+
"type": "string",
|
|
25239
|
+
"enum": [
|
|
25240
|
+
"unread",
|
|
25241
|
+
"read"
|
|
25242
|
+
],
|
|
25243
|
+
"required": false,
|
|
25244
|
+
"description": "Only unread letters, or only read ones; omit for both."
|
|
25245
|
+
},
|
|
25246
|
+
{
|
|
25247
|
+
"name": "archived",
|
|
25248
|
+
"type": "boolean",
|
|
25249
|
+
"required": false,
|
|
25250
|
+
"description": "false (the default) hides archived letters; true lists only the archived ones."
|
|
25251
|
+
},
|
|
25252
|
+
{
|
|
25253
|
+
"name": "limit",
|
|
25254
|
+
"type": "integer",
|
|
25255
|
+
"required": false,
|
|
25256
|
+
"description": "Letters per page, 1 to 50; defaults to 20."
|
|
25257
|
+
},
|
|
25258
|
+
{
|
|
25259
|
+
"name": "cursor",
|
|
25260
|
+
"type": "string",
|
|
25261
|
+
"required": false,
|
|
25262
|
+
"description": "Opaque next_cursor from the previous response; omit for the first page."
|
|
25263
|
+
}
|
|
25264
|
+
]
|
|
25265
|
+
},
|
|
25266
|
+
{
|
|
25267
|
+
"resource": "organization.notifications.letters",
|
|
25268
|
+
"method": "archive",
|
|
25269
|
+
"summary": "Archive one of your letters",
|
|
25270
|
+
"description": "Archive one letter addressed to you: it leaves the default letters list (ask for archived=true to see archived ones) and is marked read, with its bell notice. Repeating the call changes nothing and keeps the first archive time. A letter that is not in your mailbox in this organization, or does not exist, answers 404 the same way. Returns how many delivered letters you still have unread. No usage charge.",
|
|
25271
|
+
"http": "POST",
|
|
25272
|
+
"path": "/organization/v1/notifications/letters/{id}:archive",
|
|
25273
|
+
"streaming": "no",
|
|
25274
|
+
"pagination": false,
|
|
25275
|
+
"pathParams": [
|
|
25276
|
+
{
|
|
25277
|
+
"name": "id",
|
|
25278
|
+
"sdkName": "id",
|
|
25279
|
+
"description": "The letter's id, from the letters list."
|
|
25280
|
+
}
|
|
25281
|
+
],
|
|
25282
|
+
"query": []
|
|
25283
|
+
},
|
|
25284
|
+
{
|
|
25285
|
+
"resource": "organization.notifications.letters",
|
|
25286
|
+
"method": "read",
|
|
25287
|
+
"summary": "Mark one of your letters read",
|
|
25288
|
+
"description": "Mark one letter addressed to you as read, together with the bell notice it wrote, so the platform does not email it later as unread. The mailbox is the credential's own — an agent credential reads its own agent mailbox, never its owner's — and the request names only the letter. Repeating the call changes nothing and keeps the first read time. A letter that is not in your mailbox in this organization, or does not exist, answers 404 the same way. Returns how many delivered letters you still have unread. No usage charge.",
|
|
25289
|
+
"http": "POST",
|
|
25290
|
+
"path": "/organization/v1/notifications/letters/{id}:read",
|
|
25291
|
+
"streaming": "no",
|
|
25292
|
+
"pagination": false,
|
|
25293
|
+
"pathParams": [
|
|
25294
|
+
{
|
|
25295
|
+
"name": "id",
|
|
25296
|
+
"sdkName": "id",
|
|
25297
|
+
"description": "The letter's id, from the letters list."
|
|
25298
|
+
}
|
|
25299
|
+
],
|
|
25300
|
+
"query": []
|
|
25301
|
+
},
|
|
25302
|
+
{
|
|
25303
|
+
"resource": "organization.notifications.letters",
|
|
25304
|
+
"method": "readAll",
|
|
25305
|
+
"summary": "Mark all your letters read",
|
|
25306
|
+
"description": "Mark every delivered letter in your own mailbox in this organization as read, with their bell notices; give kind to read only letters of that kind. Nothing in another mailbox is touched. Letters still scheduled are not delivered yet and stay as they are. Returns how many delivered letters you still have unread. No usage charge.",
|
|
25307
|
+
"http": "POST",
|
|
25308
|
+
"path": "/organization/v1/notifications/letters:readAll",
|
|
25309
|
+
"streaming": "no",
|
|
25310
|
+
"pagination": false,
|
|
25311
|
+
"pathParams": [],
|
|
25312
|
+
"query": [],
|
|
25313
|
+
"body": {
|
|
25314
|
+
"required": false,
|
|
25315
|
+
"fields": [
|
|
25316
|
+
{
|
|
25317
|
+
"name": "kind",
|
|
25318
|
+
"type": "string",
|
|
25319
|
+
"enum": [
|
|
25320
|
+
"notice",
|
|
25321
|
+
"mention",
|
|
25322
|
+
"decision"
|
|
25323
|
+
],
|
|
25324
|
+
"required": false,
|
|
25325
|
+
"description": "Only letters of this kind; omit for all kinds."
|
|
25326
|
+
}
|
|
25327
|
+
]
|
|
25328
|
+
}
|
|
25329
|
+
},
|
|
25330
|
+
{
|
|
25331
|
+
"resource": "organization.notifications",
|
|
25332
|
+
"method": "retrieveOrganizationDefault",
|
|
25333
|
+
"summary": "The organization's notification layer",
|
|
25334
|
+
"description": "The organization's own preference layer: its per-category defaults for members who said nothing, the channels it blocks for everyone, whether members may change their own switches, and the non-critical categories it keeps off members' pages. Any member may read it; only an owner or admin may change it. A critical category can never be hidden, because hiding it would hide a channel nobody may switch off.",
|
|
25335
|
+
"http": "GET",
|
|
25336
|
+
"path": "/organization/v1/notifications/organization_default",
|
|
25337
|
+
"streaming": "no",
|
|
25338
|
+
"pagination": false,
|
|
25339
|
+
"pathParams": [],
|
|
25340
|
+
"query": []
|
|
25341
|
+
},
|
|
25342
|
+
{
|
|
25343
|
+
"resource": "organization.notifications.organizationDefault",
|
|
25344
|
+
"method": "create",
|
|
25345
|
+
"summary": "Set the organization's notification layer",
|
|
25346
|
+
"description": "Change the organization's notification layer. Requires an organization owner or admin role; a member answers 403. Refused with INVALID_PARAMS for an unknown or non-configurable category, a channel the category does not declare, or a hidden critical category. Blocking a channel silences it for every member, and a critical category's mandatory channel still reaches people (ADR-193 §4 layer 1); setting member_may_change false makes these defaults final for members.",
|
|
25347
|
+
"http": "POST",
|
|
25348
|
+
"path": "/organization/v1/notifications/organization_default",
|
|
25349
|
+
"streaming": "no",
|
|
25350
|
+
"pagination": false,
|
|
25351
|
+
"pathParams": [],
|
|
25352
|
+
"query": [],
|
|
25353
|
+
"body": {
|
|
25354
|
+
"required": true,
|
|
25355
|
+
"fields": [
|
|
25356
|
+
{
|
|
25357
|
+
"name": "defaults",
|
|
25358
|
+
"type": "object",
|
|
25359
|
+
"required": false,
|
|
25360
|
+
"description": "Category key → channel → on/off, applied where a member said nothing."
|
|
25361
|
+
},
|
|
25362
|
+
{
|
|
25363
|
+
"name": "blocked_channels",
|
|
25364
|
+
"type": "array",
|
|
25365
|
+
"itemType": "string",
|
|
25366
|
+
"enum": [
|
|
25367
|
+
"in_app",
|
|
25368
|
+
"email",
|
|
25369
|
+
"sms"
|
|
25370
|
+
],
|
|
25371
|
+
"required": false,
|
|
25372
|
+
"description": "Channels nobody in this organization receives on."
|
|
25373
|
+
},
|
|
25374
|
+
{
|
|
25375
|
+
"name": "hidden_categories",
|
|
25376
|
+
"type": "array",
|
|
25377
|
+
"itemType": "string",
|
|
25378
|
+
"required": false,
|
|
25379
|
+
"description": "Non-critical categories kept off members' settings pages."
|
|
25380
|
+
},
|
|
25381
|
+
{
|
|
25382
|
+
"name": "member_may_change",
|
|
25383
|
+
"type": "boolean",
|
|
25384
|
+
"required": false,
|
|
25385
|
+
"description": "false makes these defaults final for members; true (the default) lets each member change their own switches."
|
|
25386
|
+
}
|
|
25387
|
+
]
|
|
25388
|
+
}
|
|
25389
|
+
},
|
|
25390
|
+
{
|
|
25391
|
+
"resource": "organization.notifications.preferences",
|
|
25392
|
+
"method": "list",
|
|
25393
|
+
"summary": "Your notification switches, and what they resolve to",
|
|
25394
|
+
"description": "This person's notification preferences in the organization behind the credential: their own per-category switches, the channels they unsubscribed from everywhere, the organization's layer (defaults, blocked channels, whether members may change their own switches, hidden categories), and for every offered channel the answer the five layers produce — which layer decided it (platform_mandatory, channel_opt_out, person, organization_default, platform_default). Severity never appears here because it never decides delivery. Read-only; no usage charge.",
|
|
25395
|
+
"http": "GET",
|
|
25396
|
+
"path": "/organization/v1/notifications/preferences",
|
|
25397
|
+
"streaming": "no",
|
|
25398
|
+
"pagination": false,
|
|
25399
|
+
"pathParams": [],
|
|
25400
|
+
"query": []
|
|
25401
|
+
},
|
|
25402
|
+
{
|
|
25403
|
+
"resource": "organization.notifications.preferences",
|
|
25404
|
+
"method": "create",
|
|
25405
|
+
"summary": "Change your notification switches",
|
|
25406
|
+
"description": "Set this person's own notification switches in this organization. Refused with INVALID_PARAMS for an unknown category, a channel the category does not declare, or a channel this deployment has no provider for (nothing is stored that could not take effect); NOT_CONFIGURABLE for a category nobody configures; CRITICAL_CHANNELS_OFF when a critical category would be left with every offered channel off; ORGANIZATION_LOCKED when the organization does not let members change their own switches. A channel the organization blocked is still storable — the block decides, the switch stays theirs.",
|
|
25407
|
+
"http": "POST",
|
|
25408
|
+
"path": "/organization/v1/notifications/preferences",
|
|
25409
|
+
"streaming": "no",
|
|
25410
|
+
"pagination": false,
|
|
25411
|
+
"pathParams": [],
|
|
25412
|
+
"query": [],
|
|
25413
|
+
"body": {
|
|
25414
|
+
"required": true,
|
|
25415
|
+
"fields": [
|
|
25416
|
+
{
|
|
25417
|
+
"name": "workflows",
|
|
25418
|
+
"type": "object",
|
|
25419
|
+
"required": false,
|
|
25420
|
+
"description": "Category key → channel → on/off. Omit to leave the person's category switches as they are."
|
|
25421
|
+
},
|
|
25422
|
+
{
|
|
25423
|
+
"name": "channel_opt_outs",
|
|
25424
|
+
"type": "array",
|
|
25425
|
+
"itemType": "string",
|
|
25426
|
+
"enum": [
|
|
25427
|
+
"in_app",
|
|
25428
|
+
"email",
|
|
25429
|
+
"sms"
|
|
25430
|
+
],
|
|
25431
|
+
"required": false,
|
|
25432
|
+
"description": "Channels to turn off in every organization. Omit to leave them as they are."
|
|
25433
|
+
}
|
|
25434
|
+
]
|
|
25435
|
+
}
|
|
25436
|
+
},
|
|
23462
25437
|
{
|
|
23463
25438
|
"resource": "organization.usage",
|
|
23464
25439
|
"method": "list",
|