@deepraxis/sdk 0.1.0-dev.48c1ce8 → 0.1.0-dev.4cbfc1f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/sdk.gen.d.ts +10 -10
- package/dist/generated/sdk.gen.js +10 -10
- package/dist/generated/types.gen.d.ts +52 -49
- 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 +27 -27
- package/dist/operations.generated.js +27 -27
- package/dist/resources.generated.d.ts +7 -7
- package/package.json +1 -1
|
@@ -1421,6 +1421,9 @@ export type OpenaiTraceConfig = {
|
|
|
1421
1421
|
trace_name?: string;
|
|
1422
1422
|
[key: string]: unknown;
|
|
1423
1423
|
};
|
|
1424
|
+
/**
|
|
1425
|
+
* Extra output data the request can ask for through include; each value adds one kind of detail to the response, such as file search results or encrypted reasoning content.
|
|
1426
|
+
*/
|
|
1424
1427
|
export type OpenaiResponseIncludesEnum = 'file_search_call.results' | 'message.input_image.image_url' | 'computer_call_output.output.image_url' | 'reasoning.encrypted_content' | 'code_interpreter_call.outputs';
|
|
1425
1428
|
/**
|
|
1426
1429
|
* Input for a response request - can be a string or array of items
|
|
@@ -27279,9 +27282,9 @@ export type UnarchiveAgentResponses = {
|
|
|
27279
27282
|
*/
|
|
27280
27283
|
version: number;
|
|
27281
27284
|
/**
|
|
27282
|
-
* Immutable agent kind. personal uses a durable computer;
|
|
27285
|
+
* Immutable agent kind. personal uses a durable computer; service uses a clean environment per session. Historical agents infer kind from their computer binding.
|
|
27283
27286
|
*/
|
|
27284
|
-
kind: 'personal' | '
|
|
27287
|
+
kind: 'personal' | 'service';
|
|
27285
27288
|
/**
|
|
27286
27289
|
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined. Omitted when no computer is selected.
|
|
27287
27290
|
*/
|
|
@@ -27759,7 +27762,7 @@ export type ListEndUsersData = {
|
|
|
27759
27762
|
body?: never;
|
|
27760
27763
|
path: {
|
|
27761
27764
|
/**
|
|
27762
|
-
* Active
|
|
27765
|
+
* Active service agent identifier from agent creation or listing.
|
|
27763
27766
|
*/
|
|
27764
27767
|
agent_id: string;
|
|
27765
27768
|
};
|
|
@@ -27838,7 +27841,7 @@ export type DeleteEndUserData = {
|
|
|
27838
27841
|
body?: never;
|
|
27839
27842
|
path: {
|
|
27840
27843
|
/**
|
|
27841
|
-
* Active
|
|
27844
|
+
* Active service agent identifier from agent creation or listing.
|
|
27842
27845
|
*/
|
|
27843
27846
|
agent_id: string;
|
|
27844
27847
|
/**
|
|
@@ -27888,7 +27891,7 @@ export type GetEndUserData = {
|
|
|
27888
27891
|
body?: never;
|
|
27889
27892
|
path: {
|
|
27890
27893
|
/**
|
|
27891
|
-
* Active
|
|
27894
|
+
* Active service agent identifier from agent creation or listing.
|
|
27892
27895
|
*/
|
|
27893
27896
|
agent_id: string;
|
|
27894
27897
|
/**
|
|
@@ -27974,7 +27977,7 @@ export type GetEndUserDeletionData = {
|
|
|
27974
27977
|
body?: never;
|
|
27975
27978
|
path: {
|
|
27976
27979
|
/**
|
|
27977
|
-
* Active
|
|
27980
|
+
* Active service agent identifier from agent creation or listing.
|
|
27978
27981
|
*/
|
|
27979
27982
|
agent_id: string;
|
|
27980
27983
|
/**
|
|
@@ -28060,7 +28063,7 @@ export type RevokeEndUserTokensData = {
|
|
|
28060
28063
|
body?: never;
|
|
28061
28064
|
path: {
|
|
28062
28065
|
/**
|
|
28063
|
-
* Active
|
|
28066
|
+
* Active service agent identifier from agent creation or listing.
|
|
28064
28067
|
*/
|
|
28065
28068
|
agent_id: string;
|
|
28066
28069
|
/**
|
|
@@ -28105,7 +28108,7 @@ export type BlockEndUserData = {
|
|
|
28105
28108
|
body?: never;
|
|
28106
28109
|
path: {
|
|
28107
28110
|
/**
|
|
28108
|
-
* Active
|
|
28111
|
+
* Active service agent identifier from agent creation or listing.
|
|
28109
28112
|
*/
|
|
28110
28113
|
agent_id: string;
|
|
28111
28114
|
/**
|
|
@@ -28174,7 +28177,7 @@ export type UnblockEndUserData = {
|
|
|
28174
28177
|
body?: never;
|
|
28175
28178
|
path: {
|
|
28176
28179
|
/**
|
|
28177
|
-
* Active
|
|
28180
|
+
* Active service agent identifier from agent creation or listing.
|
|
28178
28181
|
*/
|
|
28179
28182
|
agent_id: string;
|
|
28180
28183
|
/**
|
|
@@ -28283,7 +28286,7 @@ export type ExchangeEmbedCodeResponse = ExchangeEmbedCodeResponses[keyof Exchang
|
|
|
28283
28286
|
export type CreateAnonymousEmbedTokenData = {
|
|
28284
28287
|
body: {
|
|
28285
28288
|
/**
|
|
28286
|
-
* Public key created by the
|
|
28289
|
+
* Public key created by the service agent owner; safe to include in browser code.
|
|
28287
28290
|
*/
|
|
28288
28291
|
publishable_key: string;
|
|
28289
28292
|
/**
|
|
@@ -28352,7 +28355,7 @@ export type ListEmbedTokensData = {
|
|
|
28352
28355
|
path?: never;
|
|
28353
28356
|
query?: {
|
|
28354
28357
|
/**
|
|
28355
|
-
* Filter by
|
|
28358
|
+
* Filter by service agent identifier (agent_ or agt_ prefix).
|
|
28356
28359
|
*/
|
|
28357
28360
|
agent_id?: string;
|
|
28358
28361
|
/**
|
|
@@ -28406,7 +28409,7 @@ export type ListEmbedTokensResponses = {
|
|
|
28406
28409
|
*/
|
|
28407
28410
|
type: 'embed_token';
|
|
28408
28411
|
/**
|
|
28409
|
-
*
|
|
28412
|
+
* Service agent identifier.
|
|
28410
28413
|
*/
|
|
28411
28414
|
agent_id: string;
|
|
28412
28415
|
/**
|
|
@@ -28461,7 +28464,7 @@ export type CreateEmbedTokenData = {
|
|
|
28461
28464
|
*/
|
|
28462
28465
|
hosted?: boolean;
|
|
28463
28466
|
/**
|
|
28464
|
-
*
|
|
28467
|
+
* Service agent ID or identity_number from agent retrieval; it must belong to your organization and be active.
|
|
28465
28468
|
*/
|
|
28466
28469
|
agent: string;
|
|
28467
28470
|
/**
|
|
@@ -28531,7 +28534,7 @@ export type CreateEmbedTokenErrors = {
|
|
|
28531
28534
|
*/
|
|
28532
28535
|
403: unknown;
|
|
28533
28536
|
/**
|
|
28534
|
-
* The
|
|
28537
|
+
* The service agent or requested version is unavailable to this caller; check the agent identifier and version.
|
|
28535
28538
|
*/
|
|
28536
28539
|
404: unknown;
|
|
28537
28540
|
/**
|
|
@@ -28606,7 +28609,7 @@ export type RevokeEmbedTokenResponses = {
|
|
|
28606
28609
|
*/
|
|
28607
28610
|
type: 'embed_token';
|
|
28608
28611
|
/**
|
|
28609
|
-
*
|
|
28612
|
+
* Service agent identifier.
|
|
28610
28613
|
*/
|
|
28611
28614
|
agent_id: string;
|
|
28612
28615
|
/**
|
|
@@ -32960,7 +32963,7 @@ export type GetEmbedAppearanceErrors = {
|
|
|
32960
32963
|
*/
|
|
32961
32964
|
401: unknown;
|
|
32962
32965
|
/**
|
|
32963
|
-
* The credential's
|
|
32966
|
+
* The credential's service agent is absent or archived; obtain credentials for an active service agent.
|
|
32964
32967
|
*/
|
|
32965
32968
|
404: unknown;
|
|
32966
32969
|
/**
|
|
@@ -41120,9 +41123,9 @@ export type AgentsListData = {
|
|
|
41120
41123
|
limit?: number;
|
|
41121
41124
|
page?: null | string;
|
|
41122
41125
|
/**
|
|
41123
|
-
* Personal agents use a durable computer;
|
|
41126
|
+
* Personal agents use a durable computer; service agents use a clean environment per session.
|
|
41124
41127
|
*/
|
|
41125
|
-
kind?: 'personal' | '
|
|
41128
|
+
kind?: 'personal' | 'service';
|
|
41126
41129
|
};
|
|
41127
41130
|
url: '/agent/v1/agents';
|
|
41128
41131
|
};
|
|
@@ -41227,9 +41230,9 @@ export type AgentsListResponses = {
|
|
|
41227
41230
|
*/
|
|
41228
41231
|
version: number;
|
|
41229
41232
|
/**
|
|
41230
|
-
* Immutable agent kind. personal uses a durable computer;
|
|
41233
|
+
* Immutable agent kind. personal uses a durable computer; service uses a clean environment per session. Historical agents infer kind from their computer binding.
|
|
41231
41234
|
*/
|
|
41232
|
-
kind: 'personal' | '
|
|
41235
|
+
kind: 'personal' | 'service';
|
|
41233
41236
|
/**
|
|
41234
41237
|
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined. Omitted when no computer is selected.
|
|
41235
41238
|
*/
|
|
@@ -41679,9 +41682,9 @@ export type AgentsCreateData = {
|
|
|
41679
41682
|
*/
|
|
41680
41683
|
tools?: Array<AgentManaged15 | AgentManaged29 | AgentManaged32>;
|
|
41681
41684
|
/**
|
|
41682
|
-
* Immutable agent kind. personal requires computer_id;
|
|
41685
|
+
* Immutable agent kind. personal requires computer_id; service cannot bind a computer. Omit on create to infer from computer_id. On update, the same kind is ignored; changing kind or crossing its computer binding returns 400 invalid_request_error.
|
|
41683
41686
|
*/
|
|
41684
|
-
kind?: 'personal' | '
|
|
41687
|
+
kind?: 'personal' | 'service';
|
|
41685
41688
|
/**
|
|
41686
41689
|
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined.
|
|
41687
41690
|
*/
|
|
@@ -42144,9 +42147,9 @@ export type AgentsCreateResponses = {
|
|
|
42144
42147
|
*/
|
|
42145
42148
|
version: number;
|
|
42146
42149
|
/**
|
|
42147
|
-
* Immutable agent kind. personal uses a durable computer;
|
|
42150
|
+
* Immutable agent kind. personal uses a durable computer; service uses a clean environment per session. Historical agents infer kind from their computer binding.
|
|
42148
42151
|
*/
|
|
42149
|
-
kind: 'personal' | '
|
|
42152
|
+
kind: 'personal' | 'service';
|
|
42150
42153
|
/**
|
|
42151
42154
|
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined. Omitted when no computer is selected.
|
|
42152
42155
|
*/
|
|
@@ -42624,9 +42627,9 @@ export type AgentsRetrieveResponses = {
|
|
|
42624
42627
|
*/
|
|
42625
42628
|
version: number;
|
|
42626
42629
|
/**
|
|
42627
|
-
* Immutable agent kind. personal uses a durable computer;
|
|
42630
|
+
* Immutable agent kind. personal uses a durable computer; service uses a clean environment per session. Historical agents infer kind from their computer binding.
|
|
42628
42631
|
*/
|
|
42629
|
-
kind: 'personal' | '
|
|
42632
|
+
kind: 'personal' | 'service';
|
|
42630
42633
|
/**
|
|
42631
42634
|
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined. Omitted when no computer is selected.
|
|
42632
42635
|
*/
|
|
@@ -43081,9 +43084,9 @@ export type AgentsUpdateData = {
|
|
|
43081
43084
|
*/
|
|
43082
43085
|
version?: number;
|
|
43083
43086
|
/**
|
|
43084
|
-
* Immutable agent kind. personal requires computer_id;
|
|
43087
|
+
* Immutable agent kind. personal requires computer_id; service cannot bind a computer. Omit on create to infer from computer_id. On update, the same kind is ignored; changing kind or crossing its computer binding returns 400 invalid_request_error.
|
|
43085
43088
|
*/
|
|
43086
|
-
kind?: 'personal' | '
|
|
43089
|
+
kind?: 'personal' | 'service';
|
|
43087
43090
|
/**
|
|
43088
43091
|
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined.
|
|
43089
43092
|
*/
|
|
@@ -43551,9 +43554,9 @@ export type AgentsUpdateResponses = {
|
|
|
43551
43554
|
*/
|
|
43552
43555
|
version: number;
|
|
43553
43556
|
/**
|
|
43554
|
-
* Immutable agent kind. personal uses a durable computer;
|
|
43557
|
+
* Immutable agent kind. personal uses a durable computer; service uses a clean environment per session. Historical agents infer kind from their computer binding.
|
|
43555
43558
|
*/
|
|
43556
|
-
kind: 'personal' | '
|
|
43559
|
+
kind: 'personal' | 'service';
|
|
43557
43560
|
/**
|
|
43558
43561
|
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined. Omitted when no computer is selected.
|
|
43559
43562
|
*/
|
|
@@ -44025,9 +44028,9 @@ export type AgentsArchiveResponses = {
|
|
|
44025
44028
|
*/
|
|
44026
44029
|
version: number;
|
|
44027
44030
|
/**
|
|
44028
|
-
* Immutable agent kind. personal uses a durable computer;
|
|
44031
|
+
* Immutable agent kind. personal uses a durable computer; service uses a clean environment per session. Historical agents infer kind from their computer binding.
|
|
44029
44032
|
*/
|
|
44030
|
-
kind: 'personal' | '
|
|
44033
|
+
kind: 'personal' | 'service';
|
|
44031
44034
|
/**
|
|
44032
44035
|
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined. Omitted when no computer is selected.
|
|
44033
44036
|
*/
|
|
@@ -44509,9 +44512,9 @@ export type AgentsVersionsListResponses = {
|
|
|
44509
44512
|
*/
|
|
44510
44513
|
version: number;
|
|
44511
44514
|
/**
|
|
44512
|
-
* Immutable agent kind. personal uses a durable computer;
|
|
44515
|
+
* Immutable agent kind. personal uses a durable computer; service uses a clean environment per session. Historical agents infer kind from their computer binding.
|
|
44513
44516
|
*/
|
|
44514
|
-
kind: 'personal' | '
|
|
44517
|
+
kind: 'personal' | 'service';
|
|
44515
44518
|
/**
|
|
44516
44519
|
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. computer_id selects a tenant-owned active computer. Session selection overrides the agent default; a sandbox environment_id and computer_id cannot be combined. Omitted when no computer is selected.
|
|
44517
44520
|
*/
|
|
@@ -54455,7 +54458,7 @@ export type DatabaseDeleteData = {
|
|
|
54455
54458
|
*/
|
|
54456
54459
|
'Range-Unit'?: string;
|
|
54457
54460
|
/**
|
|
54458
|
-
* Comma-separated preferences. count=exact|planned|estimated: unfiltered counts are exact; filtered planned reports *, estimated falls back to * when predicted over budget. missing=default
|
|
54461
|
+
* 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).
|
|
54459
54462
|
*/
|
|
54460
54463
|
Prefer?: string;
|
|
54461
54464
|
/**
|
|
@@ -54479,7 +54482,7 @@ export type DatabaseDeleteData = {
|
|
|
54479
54482
|
*/
|
|
54480
54483
|
select?: string;
|
|
54481
54484
|
/**
|
|
54482
|
-
* Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns.
|
|
54485
|
+
* 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.
|
|
54483
54486
|
*/
|
|
54484
54487
|
'{column}'?: string;
|
|
54485
54488
|
/**
|
|
@@ -54511,7 +54514,7 @@ export type DatabaseDeleteData = {
|
|
|
54511
54514
|
*/
|
|
54512
54515
|
offset?: number;
|
|
54513
54516
|
/**
|
|
54514
|
-
* 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.
|
|
54517
|
+
* 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.
|
|
54515
54518
|
*/
|
|
54516
54519
|
on_conflict?: string;
|
|
54517
54520
|
/**
|
|
@@ -54571,7 +54574,7 @@ export type DatabaseSelectData = {
|
|
|
54571
54574
|
*/
|
|
54572
54575
|
'Range-Unit'?: string;
|
|
54573
54576
|
/**
|
|
54574
|
-
* Comma-separated preferences. count=exact|planned|estimated: unfiltered counts are exact; filtered planned reports *, estimated falls back to * when predicted over budget. missing=default
|
|
54577
|
+
* 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).
|
|
54575
54578
|
*/
|
|
54576
54579
|
Prefer?: string;
|
|
54577
54580
|
/**
|
|
@@ -54599,7 +54602,7 @@ export type DatabaseSelectData = {
|
|
|
54599
54602
|
*/
|
|
54600
54603
|
select?: string;
|
|
54601
54604
|
/**
|
|
54602
|
-
* Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns.
|
|
54605
|
+
* 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.
|
|
54603
54606
|
*/
|
|
54604
54607
|
'{column}'?: string;
|
|
54605
54608
|
/**
|
|
@@ -54631,7 +54634,7 @@ export type DatabaseSelectData = {
|
|
|
54631
54634
|
*/
|
|
54632
54635
|
offset?: number;
|
|
54633
54636
|
/**
|
|
54634
|
-
* 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.
|
|
54637
|
+
* 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.
|
|
54635
54638
|
*/
|
|
54636
54639
|
on_conflict?: string;
|
|
54637
54640
|
/**
|
|
@@ -54691,7 +54694,7 @@ export type DatabaseHeadData = {
|
|
|
54691
54694
|
*/
|
|
54692
54695
|
'Range-Unit'?: string;
|
|
54693
54696
|
/**
|
|
54694
|
-
* Comma-separated preferences. count=exact|planned|estimated: unfiltered counts are exact; filtered planned reports *, estimated falls back to * when predicted over budget. missing=default
|
|
54697
|
+
* 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).
|
|
54695
54698
|
*/
|
|
54696
54699
|
Prefer?: string;
|
|
54697
54700
|
/**
|
|
@@ -54719,7 +54722,7 @@ export type DatabaseHeadData = {
|
|
|
54719
54722
|
*/
|
|
54720
54723
|
select?: string;
|
|
54721
54724
|
/**
|
|
54722
|
-
* Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns.
|
|
54725
|
+
* 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.
|
|
54723
54726
|
*/
|
|
54724
54727
|
'{column}'?: string;
|
|
54725
54728
|
/**
|
|
@@ -54751,7 +54754,7 @@ export type DatabaseHeadData = {
|
|
|
54751
54754
|
*/
|
|
54752
54755
|
offset?: number;
|
|
54753
54756
|
/**
|
|
54754
|
-
* 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.
|
|
54757
|
+
* 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.
|
|
54755
54758
|
*/
|
|
54756
54759
|
on_conflict?: string;
|
|
54757
54760
|
/**
|
|
@@ -54812,7 +54815,7 @@ export type DatabaseUpdateData = {
|
|
|
54812
54815
|
*/
|
|
54813
54816
|
'Range-Unit'?: string;
|
|
54814
54817
|
/**
|
|
54815
|
-
* Comma-separated preferences. count=exact|planned|estimated: unfiltered counts are exact; filtered planned reports *, estimated falls back to * when predicted over budget. missing=default
|
|
54818
|
+
* 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).
|
|
54816
54819
|
*/
|
|
54817
54820
|
Prefer?: string;
|
|
54818
54821
|
/**
|
|
@@ -54836,7 +54839,7 @@ export type DatabaseUpdateData = {
|
|
|
54836
54839
|
*/
|
|
54837
54840
|
select?: string;
|
|
54838
54841
|
/**
|
|
54839
|
-
* Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns.
|
|
54842
|
+
* 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.
|
|
54840
54843
|
*/
|
|
54841
54844
|
'{column}'?: string;
|
|
54842
54845
|
/**
|
|
@@ -54868,7 +54871,7 @@ export type DatabaseUpdateData = {
|
|
|
54868
54871
|
*/
|
|
54869
54872
|
offset?: number;
|
|
54870
54873
|
/**
|
|
54871
|
-
* 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.
|
|
54874
|
+
* 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.
|
|
54872
54875
|
*/
|
|
54873
54876
|
on_conflict?: string;
|
|
54874
54877
|
/**
|
|
@@ -54932,7 +54935,7 @@ export type DatabaseInsertData = {
|
|
|
54932
54935
|
*/
|
|
54933
54936
|
'Range-Unit'?: string;
|
|
54934
54937
|
/**
|
|
54935
|
-
* Comma-separated preferences. count=exact|planned|estimated: unfiltered counts are exact; filtered planned reports *, estimated falls back to * when predicted over budget. missing=default
|
|
54938
|
+
* 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).
|
|
54936
54939
|
*/
|
|
54937
54940
|
Prefer?: string;
|
|
54938
54941
|
/**
|
|
@@ -54956,7 +54959,7 @@ export type DatabaseInsertData = {
|
|
|
54956
54959
|
*/
|
|
54957
54960
|
select?: string;
|
|
54958
54961
|
/**
|
|
54959
|
-
* Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns.
|
|
54962
|
+
* 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.
|
|
54960
54963
|
*/
|
|
54961
54964
|
'{column}'?: string;
|
|
54962
54965
|
/**
|
|
@@ -54988,7 +54991,7 @@ export type DatabaseInsertData = {
|
|
|
54988
54991
|
*/
|
|
54989
54992
|
offset?: number;
|
|
54990
54993
|
/**
|
|
54991
|
-
* 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.
|
|
54994
|
+
* 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.
|
|
54992
54995
|
*/
|
|
54993
54996
|
on_conflict?: string;
|
|
54994
54997
|
/**
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Transport } from '../core/transport.js';
|
|
2
|
+
export interface CountInput {
|
|
3
|
+
/** Database ID from database list/create; not its display name. */
|
|
4
|
+
database_id: string;
|
|
5
|
+
/** Existing table name or ID from the database table APIs. */
|
|
6
|
+
table: string;
|
|
7
|
+
/** PostgREST query filters, as in databaseSelect; omitted means all rows. */
|
|
8
|
+
filters?: Record<string, string>;
|
|
9
|
+
/** exact counts within budget (default); filtered planned returns null; estimated may return null over budget. Unfiltered counts are exact in every mode. */
|
|
10
|
+
count?: 'exact' | 'planned' | 'estimated';
|
|
11
|
+
}
|
|
12
|
+
export interface CountResult {
|
|
13
|
+
/** Matching total, or null when the server reports an unknown total. */
|
|
14
|
+
count: number | null;
|
|
15
|
+
}
|
|
16
|
+
/** Count matching rows without retrieving row data. */
|
|
17
|
+
export declare function count(transport: Pick<Transport, 'requestWithResponse'>, input: CountInput): Promise<CountResult>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { databaseHead } from "../generated/sdk.gen.js";
|
|
2
|
+
/** Count matching rows without retrieving row data. */
|
|
3
|
+
export async function count(transport, input) {
|
|
4
|
+
const { response } = await transport.requestWithResponse(databaseHead, {
|
|
5
|
+
path: { database_id: input.database_id, table: input.table },
|
|
6
|
+
query: input.filters,
|
|
7
|
+
headers: { Prefer: `count=${input.count ?? 'exact'}` },
|
|
8
|
+
});
|
|
9
|
+
const total = response.headers.get('Content-Range')?.split('/')[1];
|
|
10
|
+
return { count: total === undefined || total === '*' ? null : Number(total) };
|
|
11
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -7,3 +7,5 @@ export { parseSSE } from './core/sse.js';
|
|
|
7
7
|
export type { SSEEvent, SSEOptions } from './core/sse.js';
|
|
8
8
|
export { publish } from './helpers/application-publish.js';
|
|
9
9
|
export type { PublishInput, PublishResult, AssetsConfig } from './helpers/application-publish.js';
|
|
10
|
+
export { count } from './helpers/database-count.js';
|
|
11
|
+
export type { CountInput, CountResult } from './helpers/database-count.js';
|
package/dist/index.js
CHANGED
|
@@ -3,3 +3,4 @@ export { PraxisError, PraxisConnectionError, PraxisTimeoutError } from "./core/e
|
|
|
3
3
|
export { Page } from "./core/pagination.js";
|
|
4
4
|
export { parseSSE } from "./core/sse.js";
|
|
5
5
|
export { publish } from "./helpers/application-publish.js";
|
|
6
|
+
export { count } from "./helpers/database-count.js";
|