@deepraxis/sdk 0.1.0-dev.95813a3 → 0.1.0-dev.a5cf3ce
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 +14 -1
- package/dist/core/client.d.ts +5 -1
- package/dist/core/client.js +3 -0
- package/dist/core/transport.d.ts +5 -0
- package/dist/core/transport.js +6 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +38 -18
- package/dist/generated/sdk.gen.js +102 -46
- package/dist/generated/types.gen.d.ts +5089 -3874
- package/dist/helpers/application-publish.d.ts +24 -4
- package/dist/helpers/application-publish.js +53 -3
- package/dist/helpers/database-count.d.ts +17 -0
- package/dist/helpers/database-count.js +11 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/operations.generated.d.ts +83 -16
- package/dist/operations.generated.js +109 -17
- package/dist/resources.generated.d.ts +348 -0
- package/dist/resources.generated.js +7 -0
- package/package.json +1 -1
|
@@ -175,6 +175,17 @@ export const operations = [
|
|
|
175
175
|
"type": "object",
|
|
176
176
|
"required": false,
|
|
177
177
|
"description": "Praxis extension: switchable model ids on /agent/v1 only. The default model must be included. When omitted, only the default model is selectable."
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"name": "preset",
|
|
181
|
+
"type": "string",
|
|
182
|
+
"enum": [
|
|
183
|
+
"minimal",
|
|
184
|
+
"data-editor",
|
|
185
|
+
"full"
|
|
186
|
+
],
|
|
187
|
+
"required": false,
|
|
188
|
+
"description": "Optional tool preset. minimal enables read, glob, grep and ask_user_question; data-editor also enables write and edit; full uses the default toolset with always_allow. Explicit tools override matching preset entries. codemode requires bash and is absent from data-editor."
|
|
178
189
|
}
|
|
179
190
|
]
|
|
180
191
|
}
|
|
@@ -332,6 +343,17 @@ export const operations = [
|
|
|
332
343
|
"type": "object",
|
|
333
344
|
"required": false,
|
|
334
345
|
"description": "Praxis extension: switchable model ids on /agent/v1 only. The default model must be included. When omitted, only the default model is selectable."
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"name": "preset",
|
|
349
|
+
"type": "string",
|
|
350
|
+
"enum": [
|
|
351
|
+
"minimal",
|
|
352
|
+
"data-editor",
|
|
353
|
+
"full"
|
|
354
|
+
],
|
|
355
|
+
"required": false,
|
|
356
|
+
"description": "Optional tool preset. minimal enables read, glob, grep and ask_user_question; data-editor also enables write and edit; full uses the default toolset with always_allow. Explicit tools override matching preset entries. codemode requires bash and is absent from data-editor."
|
|
335
357
|
}
|
|
336
358
|
]
|
|
337
359
|
}
|
|
@@ -522,6 +544,23 @@ export const operations = [
|
|
|
522
544
|
],
|
|
523
545
|
"query": []
|
|
524
546
|
},
|
|
547
|
+
{
|
|
548
|
+
"resource": "agent.agents.unarchive",
|
|
549
|
+
"method": "create",
|
|
550
|
+
"summary": "Unarchive Agent",
|
|
551
|
+
"description": "Restore an archived agent without creating a configuration version. Already active agents are unchanged. Missing or inaccessible agents return 404. Use the returned agent id to create new sessions.",
|
|
552
|
+
"http": "POST",
|
|
553
|
+
"path": "/agent/v1/agents/{agent_id}/unarchive",
|
|
554
|
+
"streaming": "no",
|
|
555
|
+
"pagination": false,
|
|
556
|
+
"pathParams": [
|
|
557
|
+
{
|
|
558
|
+
"name": "agent_id",
|
|
559
|
+
"sdkName": "agent_id"
|
|
560
|
+
}
|
|
561
|
+
],
|
|
562
|
+
"query": []
|
|
563
|
+
},
|
|
525
564
|
{
|
|
526
565
|
"resource": "agent.agents.versions",
|
|
527
566
|
"method": "list",
|
|
@@ -717,7 +756,7 @@ export const operations = [
|
|
|
717
756
|
"resource": "agent.computers",
|
|
718
757
|
"method": "connect",
|
|
719
758
|
"summary": "Connect computer",
|
|
720
|
-
"description": "Resume the computer and issue a sandbox connection.\n\nOwn-face extension: Managed Agents has no persistent Computer connection. Returns the public SDK sandbox_id, envd_access_token and template_id, plus the machine tier the computer is on now (light or heavy) and the lease that keeps it there (lease_id, lease_expires_at; lease_id is null when no lease exists). Keep the lease while the connection stays open: renew it about every 20 seconds (POST .../leases/{lease_id}/renew) and release it on close (DELETE .../leases/{lease_id}). An unrenewed lease simply expires, and the full machine is reclaimed only after that. Archived computers remain accessible; foreign or absent computers return 404. Never cache credentials.",
|
|
759
|
+
"description": "Resume the computer and issue a sandbox connection.\n\nOwn-face extension: Managed Agents has no persistent Computer connection. Returns the public SDK sandbox_id, envd_access_token and template_id, plus the machine tier the computer is on now (light or heavy) and the lease that keeps it there (lease_id, lease_expires_at; lease_id is null when no lease exists). Keep the lease while the connection stays open: renew it about every 20 seconds (POST .../leases/{lease_id}/renew) and release it on close (DELETE .../leases/{lease_id}). An unrenewed lease simply expires, and the full machine is reclaimed only after that. Archived computers remain accessible; foreign or absent computers return 404. Never cache credentials.\n\nConnect to a computer with a caller-held lease. Omit the body or send {} to request light: the lightweight shell, or the heavy instance while it is running. Send {\"need\":\"heavy\"} to request full Linux for interactive programs; files are synchronized before the heavy connection is returned with tier heavy. Heavy running time counts toward the daily budget in seconds. Renew the lease while using the connection and release it with DELETE when finished. If the daily budget is exhausted, 429 COMPUTER_BUDGET_EXHAUSTED allows you to continue with need light.",
|
|
721
760
|
"http": "POST",
|
|
722
761
|
"path": "/agent/v1/computers/{computer_id}/connect",
|
|
723
762
|
"streaming": "no",
|
|
@@ -728,7 +767,22 @@ export const operations = [
|
|
|
728
767
|
"sdkName": "computer_id"
|
|
729
768
|
}
|
|
730
769
|
],
|
|
731
|
-
"query": []
|
|
770
|
+
"query": [],
|
|
771
|
+
"body": {
|
|
772
|
+
"required": false,
|
|
773
|
+
"fields": [
|
|
774
|
+
{
|
|
775
|
+
"name": "need",
|
|
776
|
+
"type": "string",
|
|
777
|
+
"enum": [
|
|
778
|
+
"light",
|
|
779
|
+
"heavy"
|
|
780
|
+
],
|
|
781
|
+
"required": false,
|
|
782
|
+
"description": "Defaults to light. light uses the lightweight shell, or the heavy instance while it is running. heavy requests a full Linux computer for interactive programs; heavy running time counts toward the daily budget in seconds."
|
|
783
|
+
}
|
|
784
|
+
]
|
|
785
|
+
}
|
|
732
786
|
},
|
|
733
787
|
{
|
|
734
788
|
"resource": "agent.computers.files",
|
|
@@ -1833,6 +1887,23 @@ export const operations = [
|
|
|
1833
1887
|
]
|
|
1834
1888
|
}
|
|
1835
1889
|
},
|
|
1890
|
+
{
|
|
1891
|
+
"resource": "agent.sessions",
|
|
1892
|
+
"method": "delete",
|
|
1893
|
+
"summary": "Delete session",
|
|
1894
|
+
"description": "Delete an idle or terminated session and its event history after saving a deletion snapshot. Supply the session id from creation or listing. Running sessions return 409 INVALID_STATE: interrupt first or wait until idle or terminated. Afterwards retrieval and event listing return 404 and lists omit the session. Example: DELETE /agent/v1/sessions/sesn_example.",
|
|
1895
|
+
"http": "DELETE",
|
|
1896
|
+
"path": "/agent/v1/sessions/{session_id}",
|
|
1897
|
+
"streaming": "no",
|
|
1898
|
+
"pagination": false,
|
|
1899
|
+
"pathParams": [
|
|
1900
|
+
{
|
|
1901
|
+
"name": "session_id",
|
|
1902
|
+
"sdkName": "session_id"
|
|
1903
|
+
}
|
|
1904
|
+
],
|
|
1905
|
+
"query": []
|
|
1906
|
+
},
|
|
1836
1907
|
{
|
|
1837
1908
|
"resource": "agent.sessions",
|
|
1838
1909
|
"method": "retrieve",
|
|
@@ -3326,6 +3397,27 @@ export const operations = [
|
|
|
3326
3397
|
],
|
|
3327
3398
|
"query": []
|
|
3328
3399
|
},
|
|
3400
|
+
{
|
|
3401
|
+
"resource": "application.workers.versions.assets",
|
|
3402
|
+
"method": "retrieveManifest",
|
|
3403
|
+
"summary": "Get version asset manifest",
|
|
3404
|
+
"description": "Read the retained asset paths, content hashes and byte sizes of a version for publication planning. This read creates no session or version. A version without assets returns an empty manifest; unavailable artifacts and foreign resources return 404.",
|
|
3405
|
+
"http": "GET",
|
|
3406
|
+
"path": "/application/v1/workers/{worker_id}/versions/{version_id}/assets/manifest",
|
|
3407
|
+
"streaming": "no",
|
|
3408
|
+
"pagination": false,
|
|
3409
|
+
"pathParams": [
|
|
3410
|
+
{
|
|
3411
|
+
"name": "worker_id",
|
|
3412
|
+
"sdkName": "worker_id"
|
|
3413
|
+
},
|
|
3414
|
+
{
|
|
3415
|
+
"name": "version_id",
|
|
3416
|
+
"sdkName": "version_id"
|
|
3417
|
+
}
|
|
3418
|
+
],
|
|
3419
|
+
"query": []
|
|
3420
|
+
},
|
|
3329
3421
|
{
|
|
3330
3422
|
"resource": "automation.actions",
|
|
3331
3423
|
"method": "list",
|
|
@@ -6749,7 +6841,7 @@ export const operations = [
|
|
|
6749
6841
|
"name": "{column}",
|
|
6750
6842
|
"type": "string",
|
|
6751
6843
|
"required": false,
|
|
6752
|
-
"description": "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns.
|
|
6844
|
+
"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."
|
|
6753
6845
|
},
|
|
6754
6846
|
{
|
|
6755
6847
|
"name": "and",
|
|
@@ -6797,7 +6889,7 @@ export const operations = [
|
|
|
6797
6889
|
"name": "on_conflict",
|
|
6798
6890
|
"type": "string",
|
|
6799
6891
|
"required": false,
|
|
6800
|
-
"description": "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
6892
|
+
"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."
|
|
6801
6893
|
},
|
|
6802
6894
|
{
|
|
6803
6895
|
"name": "columns",
|
|
@@ -6811,7 +6903,7 @@ export const operations = [
|
|
|
6811
6903
|
"resource": "database.databases.rest",
|
|
6812
6904
|
"method": "retrieve",
|
|
6813
6905
|
"summary": "Select rows",
|
|
6814
|
-
"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.
|
|
6906
|
+
"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.",
|
|
6815
6907
|
"http": "GET",
|
|
6816
6908
|
"path": "/database/v1/databases/{database_id}/rest/{table}",
|
|
6817
6909
|
"streaming": "no",
|
|
@@ -6837,7 +6929,7 @@ export const operations = [
|
|
|
6837
6929
|
"name": "{column}",
|
|
6838
6930
|
"type": "string",
|
|
6839
6931
|
"required": false,
|
|
6840
|
-
"description": "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns.
|
|
6932
|
+
"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."
|
|
6841
6933
|
},
|
|
6842
6934
|
{
|
|
6843
6935
|
"name": "and",
|
|
@@ -6885,7 +6977,7 @@ export const operations = [
|
|
|
6885
6977
|
"name": "on_conflict",
|
|
6886
6978
|
"type": "string",
|
|
6887
6979
|
"required": false,
|
|
6888
|
-
"description": "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
6980
|
+
"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."
|
|
6889
6981
|
},
|
|
6890
6982
|
{
|
|
6891
6983
|
"name": "columns",
|
|
@@ -6899,7 +6991,7 @@ export const operations = [
|
|
|
6899
6991
|
"resource": "database.databases.rest",
|
|
6900
6992
|
"method": "head",
|
|
6901
6993
|
"summary": "Count rows",
|
|
6902
|
-
"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.
|
|
6994
|
+
"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.",
|
|
6903
6995
|
"http": "HEAD",
|
|
6904
6996
|
"path": "/database/v1/databases/{database_id}/rest/{table}",
|
|
6905
6997
|
"streaming": "no",
|
|
@@ -6925,7 +7017,7 @@ export const operations = [
|
|
|
6925
7017
|
"name": "{column}",
|
|
6926
7018
|
"type": "string",
|
|
6927
7019
|
"required": false,
|
|
6928
|
-
"description": "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns.
|
|
7020
|
+
"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."
|
|
6929
7021
|
},
|
|
6930
7022
|
{
|
|
6931
7023
|
"name": "and",
|
|
@@ -6973,7 +7065,7 @@ export const operations = [
|
|
|
6973
7065
|
"name": "on_conflict",
|
|
6974
7066
|
"type": "string",
|
|
6975
7067
|
"required": false,
|
|
6976
|
-
"description": "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
7068
|
+
"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."
|
|
6977
7069
|
},
|
|
6978
7070
|
{
|
|
6979
7071
|
"name": "columns",
|
|
@@ -7013,7 +7105,7 @@ export const operations = [
|
|
|
7013
7105
|
"name": "{column}",
|
|
7014
7106
|
"type": "string",
|
|
7015
7107
|
"required": false,
|
|
7016
|
-
"description": "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns.
|
|
7108
|
+
"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."
|
|
7017
7109
|
},
|
|
7018
7110
|
{
|
|
7019
7111
|
"name": "and",
|
|
@@ -7061,7 +7153,7 @@ export const operations = [
|
|
|
7061
7153
|
"name": "on_conflict",
|
|
7062
7154
|
"type": "string",
|
|
7063
7155
|
"required": false,
|
|
7064
|
-
"description": "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
7156
|
+
"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."
|
|
7065
7157
|
},
|
|
7066
7158
|
{
|
|
7067
7159
|
"name": "columns",
|
|
@@ -7079,7 +7171,7 @@ export const operations = [
|
|
|
7079
7171
|
"resource": "database.databases.rest",
|
|
7080
7172
|
"method": "create",
|
|
7081
7173
|
"summary": "Insert rows",
|
|
7082
|
-
"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. 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.",
|
|
7174
|
+
"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.",
|
|
7083
7175
|
"http": "POST",
|
|
7084
7176
|
"path": "/database/v1/databases/{database_id}/rest/{table}",
|
|
7085
7177
|
"streaming": "no",
|
|
@@ -7105,7 +7197,7 @@ export const operations = [
|
|
|
7105
7197
|
"name": "{column}",
|
|
7106
7198
|
"type": "string",
|
|
7107
7199
|
"required": false,
|
|
7108
|
-
"description": "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns.
|
|
7200
|
+
"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."
|
|
7109
7201
|
},
|
|
7110
7202
|
{
|
|
7111
7203
|
"name": "and",
|
|
@@ -7153,7 +7245,7 @@ export const operations = [
|
|
|
7153
7245
|
"name": "on_conflict",
|
|
7154
7246
|
"type": "string",
|
|
7155
7247
|
"required": false,
|
|
7156
|
-
"description": "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
7248
|
+
"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."
|
|
7157
7249
|
},
|
|
7158
7250
|
{
|
|
7159
7251
|
"name": "columns",
|
|
@@ -7205,7 +7297,7 @@ export const operations = [
|
|
|
7205
7297
|
"resource": "database.databases.tables",
|
|
7206
7298
|
"method": "create",
|
|
7207
7299
|
"summary": "Create table",
|
|
7208
|
-
"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 databaseAddField. Limits: 50 tables per database, 64 fields per table, and 16 indexed or unique fields per table; exceeding one returns 400 LIMIT_EXCEEDED. 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.",
|
|
7300
|
+
"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 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.",
|
|
7209
7301
|
"http": "POST",
|
|
7210
7302
|
"path": "/database/v1/databases/{database_id}/tables",
|
|
7211
7303
|
"streaming": "no",
|
|
@@ -7326,7 +7418,7 @@ export const operations = [
|
|
|
7326
7418
|
"resource": "database.databases.tables.fields",
|
|
7327
7419
|
"method": "create",
|
|
7328
7420
|
"summary": "Add field",
|
|
7329
|
-
"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.
|
|
7421
|
+
"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.",
|
|
7330
7422
|
"http": "POST",
|
|
7331
7423
|
"path": "/database/v1/databases/{database_id}/tables/{table}/fields",
|
|
7332
7424
|
"streaming": "no",
|