@deepraxis/sdk 0.1.1-dev.c64b603 → 0.1.1-dev.cc34a92
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 +315 -59
- package/README.md +1 -1
- package/dist/automation.d.ts +61 -0
- package/dist/core/client.d.ts +11 -1
- package/dist/core/client.js +13 -0
- package/dist/core/transport.d.ts +9 -0
- package/dist/core/transport.js +13 -2
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +662 -136
- package/dist/generated/sdk.gen.js +2518 -768
- package/dist/generated/types.gen.d.ts +33420 -24627
- package/dist/helpers/application-build.d.ts +10 -0
- package/dist/helpers/application-build.js +98 -0
- package/dist/helpers/application-publish.d.ts +8 -0
- package/dist/helpers/application-publish.js +26 -9
- package/dist/helpers/browser-connect.d.ts +78 -0
- package/dist/helpers/browser-connect.js +161 -0
- package/dist/helpers/browser-decisions.d.ts +44 -0
- package/dist/helpers/browser-decisions.js +84 -0
- package/dist/helpers/browser-documentation.d.ts +2 -0
- package/dist/helpers/browser-documentation.js +47 -0
- package/dist/helpers/file-upload.d.ts +2 -2
- package/dist/helpers/sandbox-templates.d.ts +121 -0
- package/dist/helpers/sandbox-templates.js +60 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +3 -0
- package/dist/operations.generated.d.ts +3267 -521
- package/dist/operations.generated.js +3993 -553
- package/dist/resources.generated.d.ts +512 -495
- package/dist/resources.generated.js +190 -32
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { client } from './client.gen.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* Apply Agent Version
|
|
6
6
|
*
|
|
7
|
-
* Apply a version from agents.versions.list
|
|
7
|
+
* Apply a saved version from agents.versions.list for new sessions and newly issued tokens, without creating a version. Existing sessions and tokens retain their version. The response contains the effective configuration with version equal to active_version and latest_version naming the newest saved version. Missing versions return 404; archived agents return 409. For example, POST /agent/v1/agents/{agent_id}/versions/2/apply with no body.
|
|
8
8
|
*/
|
|
9
9
|
export const applyAgentVersion = (options) => (options.client ?? client).post({
|
|
10
10
|
security: [{
|
|
@@ -81,146 +81,6 @@ export const setRunFeedback = (options) => (options.client ?? client).post({
|
|
|
81
81
|
...options.headers
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
|
-
/**
|
|
85
|
-
* List End Users
|
|
86
|
-
*
|
|
87
|
-
* List users who have sessions or token issuance history on a service agent.
|
|
88
|
-
*
|
|
89
|
-
* Ordered by last_active_at and external_user_id descending. q is a case-sensitive literal prefix, including underscores. limit is 1–100, default 20. Reuse next_page with the same organization, agent, q and limit. Preemptively blocked users without history do not appear. End-user credentials and inaccessible or personal agents return 404.
|
|
90
|
-
*/
|
|
91
|
-
export const listEndUsers = (options) => (options.client ?? client).get({
|
|
92
|
-
security: [{
|
|
93
|
-
key: 'BearerAuth',
|
|
94
|
-
scheme: 'bearer',
|
|
95
|
-
type: 'http'
|
|
96
|
-
}, {
|
|
97
|
-
key: 'ApiKeyAuth',
|
|
98
|
-
name: 'X-API-Key',
|
|
99
|
-
type: 'apiKey'
|
|
100
|
-
}],
|
|
101
|
-
url: '/agent/v1/agents/{agent_id}/end_users',
|
|
102
|
-
...options
|
|
103
|
-
});
|
|
104
|
-
/**
|
|
105
|
-
* Delete end-user data
|
|
106
|
-
*
|
|
107
|
-
* Delete a host application's end-user data from one service agent after explicit confirmation.
|
|
108
|
-
*
|
|
109
|
-
* Develop only. Set confirm to the exact external_user_id; missing or mismatched confirmation returns 400. Returns 202 with a pending task id, not completion. Poll the deletion endpoint. Concurrent requests reuse the unfinished task; retry DELETE after failure to resume it. Tokens are revoked and the user is blocked before a seven-day recovery snapshot is verified. Sessions including child sessions, conversation data, grants and feedback are then removed. A pre-existing block remains; a temporary block is removed on success. Attachment metadata is recorded and File attachments are retained. No charge is introduced by this operation. Example: DELETE /agent/v1/agents/agent_example/end_users/customer_123?confirm=customer_123.
|
|
110
|
-
*/
|
|
111
|
-
export const deleteEndUser = (options) => (options.client ?? client).delete({
|
|
112
|
-
security: [{
|
|
113
|
-
key: 'BearerAuth',
|
|
114
|
-
scheme: 'bearer',
|
|
115
|
-
type: 'http'
|
|
116
|
-
}, {
|
|
117
|
-
key: 'ApiKeyAuth',
|
|
118
|
-
name: 'X-API-Key',
|
|
119
|
-
type: 'apiKey'
|
|
120
|
-
}],
|
|
121
|
-
url: '/agent/v1/agents/{agent_id}/end_users/{external_user_id}',
|
|
122
|
-
...options
|
|
123
|
-
});
|
|
124
|
-
/**
|
|
125
|
-
* Get End User
|
|
126
|
-
*
|
|
127
|
-
* Inspect one end user and their twenty most recently updated sessions.
|
|
128
|
-
*
|
|
129
|
-
* Use external_user_id from listing or your host application. Users without session or issuance history return 404, including preemptively blocked users. End-user credentials and inaccessible or personal agents return 404.
|
|
130
|
-
*/
|
|
131
|
-
export const getEndUser = (options) => (options.client ?? client).get({
|
|
132
|
-
security: [{
|
|
133
|
-
key: 'BearerAuth',
|
|
134
|
-
scheme: 'bearer',
|
|
135
|
-
type: 'http'
|
|
136
|
-
}, {
|
|
137
|
-
key: 'ApiKeyAuth',
|
|
138
|
-
name: 'X-API-Key',
|
|
139
|
-
type: 'apiKey'
|
|
140
|
-
}],
|
|
141
|
-
url: '/agent/v1/agents/{agent_id}/end_users/{external_user_id}',
|
|
142
|
-
...options
|
|
143
|
-
});
|
|
144
|
-
/**
|
|
145
|
-
* Get end-user deletion
|
|
146
|
-
*
|
|
147
|
-
* Poll the latest deletion task for an end user, including after the user data has been removed.
|
|
148
|
-
*
|
|
149
|
-
* Use the same agent_id and external_user_id as the confirmed DELETE. Status is pending, snapshotting, deleting, done or failed. Counts are empty until a verified snapshot exists. A failed task remains blocked and resumes when DELETE is retried with matching confirmation. snapshot_key is an operator recovery reference retained for seven days, not a public download URL. End-user credentials, inaccessible or personal agents, and missing tasks return 404. This read does not create a task or charge usage.
|
|
150
|
-
*/
|
|
151
|
-
export const getEndUserDeletion = (options) => (options.client ?? client).get({
|
|
152
|
-
security: [{
|
|
153
|
-
key: 'BearerAuth',
|
|
154
|
-
scheme: 'bearer',
|
|
155
|
-
type: 'http'
|
|
156
|
-
}, {
|
|
157
|
-
key: 'ApiKeyAuth',
|
|
158
|
-
name: 'X-API-Key',
|
|
159
|
-
type: 'apiKey'
|
|
160
|
-
}],
|
|
161
|
-
url: '/agent/v1/agents/{agent_id}/end_users/{external_user_id}/deletion',
|
|
162
|
-
...options
|
|
163
|
-
});
|
|
164
|
-
/**
|
|
165
|
-
* Revoke End User Tokens
|
|
166
|
-
*
|
|
167
|
-
* Revoke all issued tokens for an end user and terminate their open embed streams.
|
|
168
|
-
*
|
|
169
|
-
* Revokes credentials before marking grants revoked. Upstream failure returns 502 without changing grant revocation timestamps. Returns the count of newly revoked grants; a repeat without new grants returns zero. Does not block future issuance. End-user credentials and inaccessible or personal agents return 404.
|
|
170
|
-
*/
|
|
171
|
-
export const revokeEndUserTokens = (options) => (options.client ?? client).post({
|
|
172
|
-
security: [{
|
|
173
|
-
key: 'BearerAuth',
|
|
174
|
-
scheme: 'bearer',
|
|
175
|
-
type: 'http'
|
|
176
|
-
}, {
|
|
177
|
-
key: 'ApiKeyAuth',
|
|
178
|
-
name: 'X-API-Key',
|
|
179
|
-
type: 'apiKey'
|
|
180
|
-
}],
|
|
181
|
-
url: '/agent/v1/agents/{agent_id}/end_users/{external_user_id}/revoke_tokens',
|
|
182
|
-
...options
|
|
183
|
-
});
|
|
184
|
-
/**
|
|
185
|
-
* Block End User
|
|
186
|
-
*
|
|
187
|
-
* Block token issuance and session creation, then revoke existing tokens for an end user.
|
|
188
|
-
*
|
|
189
|
-
* May block a user before any history exists; timestamps are then null and counts and cost are zero. Requires an embed policy, otherwise returns 409 with setup guidance. Deduplicates the policy blocklist and retains its 1000-user maximum. If revocation returns 502, the user remains blocked; retry to finish revocation. Repeats keep the user blocked and revoke any remaining grants. End-user credentials and inaccessible or personal agents return 404.
|
|
190
|
-
*/
|
|
191
|
-
export const blockEndUser = (options) => (options.client ?? client).post({
|
|
192
|
-
security: [{
|
|
193
|
-
key: 'BearerAuth',
|
|
194
|
-
scheme: 'bearer',
|
|
195
|
-
type: 'http'
|
|
196
|
-
}, {
|
|
197
|
-
key: 'ApiKeyAuth',
|
|
198
|
-
name: 'X-API-Key',
|
|
199
|
-
type: 'apiKey'
|
|
200
|
-
}],
|
|
201
|
-
url: '/agent/v1/agents/{agent_id}/end_users/{external_user_id}/block',
|
|
202
|
-
...options
|
|
203
|
-
});
|
|
204
|
-
/**
|
|
205
|
-
* Unblock End User
|
|
206
|
-
*
|
|
207
|
-
* Allow an end user to receive new tokens and create new sessions again.
|
|
208
|
-
*
|
|
209
|
-
* Removes the user from the blocklist; previously revoked tokens stay revoked. Idempotent. Requires an embed policy, otherwise returns 409 with setup guidance. Returns null timestamps and zero counts and cost when no session or issuance history exists. End-user credentials and inaccessible or personal agents return 404.
|
|
210
|
-
*/
|
|
211
|
-
export const unblockEndUser = (options) => (options.client ?? client).post({
|
|
212
|
-
security: [{
|
|
213
|
-
key: 'BearerAuth',
|
|
214
|
-
scheme: 'bearer',
|
|
215
|
-
type: 'http'
|
|
216
|
-
}, {
|
|
217
|
-
key: 'ApiKeyAuth',
|
|
218
|
-
name: 'X-API-Key',
|
|
219
|
-
type: 'apiKey'
|
|
220
|
-
}],
|
|
221
|
-
url: '/agent/v1/agents/{agent_id}/end_users/{external_user_id}/unblock',
|
|
222
|
-
...options
|
|
223
|
-
});
|
|
224
84
|
/**
|
|
225
85
|
* List customers
|
|
226
86
|
*
|
|
@@ -460,100 +320,6 @@ export const deleteCurrentCustomerAccessToken = (options) => (options.client ??
|
|
|
460
320
|
url: '/agent/v1/agents/{agent_id}/customers/auth/access_tokens/current',
|
|
461
321
|
...options
|
|
462
322
|
});
|
|
463
|
-
/**
|
|
464
|
-
* Exchange Hosted Code
|
|
465
|
-
*
|
|
466
|
-
* Redeem a single-use hosted link credential for an end-user token.
|
|
467
|
-
*
|
|
468
|
-
* Read code from the c fragment parameter of hosted_url returned by embed token creation with hosted true, then remove the fragment before exchanging. No Authorization header is required; the code authenticates this request. The code expires after 60 seconds and is consumed atomically on exchange, so concurrent attempts have only one winner. Expired, used and unknown codes return the same 404 body. Keep the token in memory and return to the host website for a fresh link when it expires; exchange cannot refresh it. Requests are IP limited per minute using the anonymous entrypoint budget (default 20). Example body is {"code":"<code from hosted_url>"}.
|
|
469
|
-
*/
|
|
470
|
-
export const exchangeEmbedCode = (options) => (options.client ?? client).post({
|
|
471
|
-
url: '/agent/v1/embed/exchange',
|
|
472
|
-
...options,
|
|
473
|
-
headers: {
|
|
474
|
-
'Content-Type': 'application/json',
|
|
475
|
-
...options.headers
|
|
476
|
-
}
|
|
477
|
-
});
|
|
478
|
-
/**
|
|
479
|
-
* Issue anonymous visitor token
|
|
480
|
-
*
|
|
481
|
-
* Obtain a short-lived embedding token for a visitor without an account using the agent owner's publishable key.
|
|
482
|
-
*
|
|
483
|
-
* No Authorization header is required. Send the browser Origin allowed by the agent policy. Save a returned visitor_secret and reuse it for refreshes; only new visitors receive one. Unknown secrets create new visitors, and extra fields including visitor_id return 400. Issuance uses the key creator's organization membership, the key session budget and the smaller of the policy TTL maximum and 3600 seconds. IP requests are limited per minute (default 20); UTC daily session and spending caps are checked across the key's primary sessions created that day. Token issuance itself does not create a session or charge usage; subsequent sessions bill the host organization. Example body: {"publishable_key":"pk_praxis_example"}.
|
|
484
|
-
*/
|
|
485
|
-
export const createAnonymousEmbedToken = (options) => (options.client ?? client).post({
|
|
486
|
-
url: '/agent/v1/embed_tokens/anonymous',
|
|
487
|
-
...options,
|
|
488
|
-
headers: {
|
|
489
|
-
'Content-Type': 'application/json',
|
|
490
|
-
...options.headers
|
|
491
|
-
}
|
|
492
|
-
});
|
|
493
|
-
/**
|
|
494
|
-
* List Embed Tokens
|
|
495
|
-
*
|
|
496
|
-
* List embed token issuance records in your organization.
|
|
497
|
-
*
|
|
498
|
-
* Includes expired and revoked grants; returns neither token nor token_id. Sorts by created_at, then grant id, both descending. agent_id accepts agent_ or agt_; external_user_id matches exactly. limit is 1–100 (default 20). Reuse next_page as page with the same filters and organization; a mismatch returns 400. End-user credentials return 404.
|
|
499
|
-
*/
|
|
500
|
-
export const listEmbedTokens = (options) => (options?.client ?? client).get({
|
|
501
|
-
security: [{
|
|
502
|
-
key: 'BearerAuth',
|
|
503
|
-
scheme: 'bearer',
|
|
504
|
-
type: 'http'
|
|
505
|
-
}, {
|
|
506
|
-
key: 'ApiKeyAuth',
|
|
507
|
-
name: 'X-API-Key',
|
|
508
|
-
type: 'apiKey'
|
|
509
|
-
}],
|
|
510
|
-
url: '/agent/v1/embed_tokens',
|
|
511
|
-
...options
|
|
512
|
-
});
|
|
513
|
-
/**
|
|
514
|
-
* Create Embed Token
|
|
515
|
-
*
|
|
516
|
-
* Issue a short-lived credential on your backend for an end user of a service agent.
|
|
517
|
-
*
|
|
518
|
-
* Requires an active service agent in your organization with an embed policy. Pins the requested version or the latest version and snapshots the policy environment, vaults and resources; metadata comes from the request. Blocked users cannot receive tokens. Keep your API key on the backend and pass only the returned token to the frontend. Every call creates a new grant; issuance is not idempotent. Set hosted to true to also receive hosted_url; redirect the user there within 60 seconds. The agent must have an identity_number. The URL fragment contains a single-use exchange credential, not the token. Omit hosted or set false for ordinary token issuance.
|
|
519
|
-
*/
|
|
520
|
-
export const createEmbedToken = (options) => (options.client ?? client).post({
|
|
521
|
-
security: [{
|
|
522
|
-
key: 'BearerAuth',
|
|
523
|
-
scheme: 'bearer',
|
|
524
|
-
type: 'http'
|
|
525
|
-
}, {
|
|
526
|
-
key: 'ApiKeyAuth',
|
|
527
|
-
name: 'X-API-Key',
|
|
528
|
-
type: 'apiKey'
|
|
529
|
-
}],
|
|
530
|
-
url: '/agent/v1/embed_tokens',
|
|
531
|
-
...options,
|
|
532
|
-
headers: {
|
|
533
|
-
'Content-Type': 'application/json',
|
|
534
|
-
...options.headers
|
|
535
|
-
}
|
|
536
|
-
});
|
|
537
|
-
/**
|
|
538
|
-
* Revoke Embed Token
|
|
539
|
-
*
|
|
540
|
-
* Revoke an embed token and close its open event streams.
|
|
541
|
-
*
|
|
542
|
-
* Use an id from issuance or listing. Revokes the credential before setting revoked_at; upstream failure leaves it unset. Streams receive session.error (EMBED_TOKEN_REVOKED), then close immediately; other credentials are unaffected. Idempotent; repeats return the original revoked record without another revocation or audit. Missing or foreign grants and end-user credentials return 404.
|
|
543
|
-
*/
|
|
544
|
-
export const revokeEmbedToken = (options) => (options.client ?? client).post({
|
|
545
|
-
security: [{
|
|
546
|
-
key: 'BearerAuth',
|
|
547
|
-
scheme: 'bearer',
|
|
548
|
-
type: 'http'
|
|
549
|
-
}, {
|
|
550
|
-
key: 'ApiKeyAuth',
|
|
551
|
-
name: 'X-API-Key',
|
|
552
|
-
type: 'apiKey'
|
|
553
|
-
}],
|
|
554
|
-
url: '/agent/v1/embed_tokens/{id}/revoke',
|
|
555
|
-
...options
|
|
556
|
-
});
|
|
557
323
|
/**
|
|
558
324
|
* List Computers
|
|
559
325
|
*
|
|
@@ -577,7 +343,7 @@ export const computersList = (options) => (options?.client ?? client).get({
|
|
|
577
343
|
/**
|
|
578
344
|
* Create Computer
|
|
579
345
|
*
|
|
580
|
-
* Create a durable computer: a named machine whose files outlive sessions, for personal agents.
|
|
346
|
+
* Create a durable computer: a named machine whose files outlive sessions, for general and personal agents.
|
|
581
347
|
*
|
|
582
348
|
* Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.
|
|
583
349
|
*/
|
|
@@ -940,7 +706,7 @@ export const stopSessionBackgroundTask = (options) => (options.client ?? client)
|
|
|
940
706
|
*
|
|
941
707
|
* Request session context compaction and retrieve an operation receipt.
|
|
942
708
|
*
|
|
943
|
-
* Available only on /agent/v1. The body may be omitted or {}. Optional instructions must be a string and is forwarded unchanged. Idempotency-Key is forwarded unchanged; a UUID is generated when absent. Returns { type: session_compaction, id, status, reason? }, where id is the operation ID. queued/running return 202; skipped/succeeded/failed return 200. Non-string instructions return 400 invalid_request_error. Missing or inaccessible managed sessions return 404 not_found_error.
|
|
709
|
+
* Available only on /agent/v1. The body may be omitted or {}. Optional instructions must be a string and is forwarded unchanged. Idempotency-Key is forwarded unchanged; a UUID is generated when absent. Returns { type: session_compaction, id, status, reason? }, where id is the operation ID. queued/running return 202; skipped/succeeded/failed/cancelled return 200. Non-string instructions return 400 invalid_request_error. Missing or inaccessible managed sessions return 404 not_found_error.
|
|
944
710
|
*/
|
|
945
711
|
export const compactSession = (options) => (options.client ?? client).post({
|
|
946
712
|
security: [{
|
|
@@ -984,7 +750,7 @@ export const getSessionCompaction = (options) => (options.client ?? client).get(
|
|
|
984
750
|
*
|
|
985
751
|
* Read session compaction history and summaries.
|
|
986
752
|
*
|
|
987
|
-
* Available only on /agent/v1. Returns { data: [...] }. Each entry contains type, id, event_id, trigger, status, model, compacted_message_count, input_tokens_before, input_tokens_after, summary, error and created_at, as recorded by the service. Missing or inaccessible managed sessions return 404 not_found_error.
|
|
753
|
+
* Available only on /agent/v1. Returns { data: [...], active }. active is the queued or running compaction ({ type: session_compaction, id, status, trigger: manual|auto|idle }), or null when none; manual work takes precedence. Each data entry contains type, id, event_id, trigger, status, model, compacted_message_count, input_tokens_before, input_tokens_after, summary, error and created_at, as recorded by the service. Missing or inaccessible managed sessions return 404 not_found_error.
|
|
988
754
|
*/
|
|
989
755
|
export const listSessionCompactions = (options) => (options.client ?? client).get({
|
|
990
756
|
security: [{
|
|
@@ -999,20 +765,6 @@ export const listSessionCompactions = (options) => (options.client ?? client).ge
|
|
|
999
765
|
url: '/agent/v1/sessions/{session_id}/compactions',
|
|
1000
766
|
...options
|
|
1001
767
|
});
|
|
1002
|
-
/**
|
|
1003
|
-
* Read chat appearance
|
|
1004
|
-
*
|
|
1005
|
-
* Load saved appearance for an iframe or Hosted chat page. Supply an end-user embed token as Bearer authorization, or a console-issued publishable key in Praxis-Publishable-Key before anonymous token issuance. The credential selects the agent; identity_number and agent_id query parameters are rejected with 400. Missing appearance returns an empty object. Kit option names retain camelCase. Responses are private and cacheable for 60 seconds. Component hosts configure Kit in their own code instead.
|
|
1006
|
-
*/
|
|
1007
|
-
export const getEmbedAppearance = (options) => (options?.client ?? client).get({
|
|
1008
|
-
security: [{
|
|
1009
|
-
key: 'BearerAuth',
|
|
1010
|
-
scheme: 'bearer',
|
|
1011
|
-
type: 'http'
|
|
1012
|
-
}, { name: 'Praxis-Publishable-Key', type: 'apiKey' }],
|
|
1013
|
-
url: '/agent/v1/embed/appearance',
|
|
1014
|
-
...options
|
|
1015
|
-
});
|
|
1016
768
|
/**
|
|
1017
769
|
* Generate speech
|
|
1018
770
|
*
|
|
@@ -1340,7 +1092,7 @@ export const fileListFiles = (options) => (options?.client ?? client).get({
|
|
|
1340
1092
|
/**
|
|
1341
1093
|
* Upload file
|
|
1342
1094
|
*
|
|
1343
|
-
* Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data
|
|
1095
|
+
* Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data and vision purposes are accepted. Send file bytes as a multipart file part, not a filename or file ID; in the SDK use a File or Blob, for example new File(["Return within 23 days."], "policy.txt", { type: "text/plain" }). Content determines the MIME type. Supported uploads include PDF, DOCX/XLSX/PPTX, PNG/JPEG/GIF/WebP, MP3/WAV/FLAC/OGG/M4A, MP4/WebM, and UTF-8 JSON/NDJSON/CSV/Markdown/plain text; empty, unsupported, oversized files and unsupported purposes return 400. Use Uploads for larger files. The purpose vision accepts only PNG, JPEG, GIF and WebP, while conversation images require user_data. The returned ID belongs to your tenant; upload alone does not ingest the file into Knowledge. Knowledge attachment has a lower limit of 100000000 bytes. Optionally set expires_after[anchor]=created_at with expires_after[seconds] (3600–7776000). Without expiry, the file persists until deleted.
|
|
1344
1096
|
*/
|
|
1345
1097
|
export const fileCreateFile = (options) => (options.client ?? client).post({
|
|
1346
1098
|
...formDataBodySerializer,
|
|
@@ -1417,7 +1169,7 @@ export const fileRetrieveFileContent = (options) => (options.client ?? client).g
|
|
|
1417
1169
|
/**
|
|
1418
1170
|
* Create an upload
|
|
1419
1171
|
*
|
|
1420
|
-
* Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data
|
|
1172
|
+
* Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data and vision purposes. Add parts of at most 64000000 bytes and complete within one hour. Optional part_size enables fixed-size, retryable parts. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.
|
|
1421
1173
|
*/
|
|
1422
1174
|
export const fileCreateUpload = (options) => (options.client ?? client).post({
|
|
1423
1175
|
security: [{
|
|
@@ -1483,6 +1235,72 @@ export const fileCancelUpload = (options) => (options.client ?? client).post({
|
|
|
1483
1235
|
url: '/file/v1/uploads/{upload_id}/cancel',
|
|
1484
1236
|
...options
|
|
1485
1237
|
});
|
|
1238
|
+
/**
|
|
1239
|
+
* Create a one-time upload URL
|
|
1240
|
+
*
|
|
1241
|
+
* Upload a local file of up to 2 GiB from a coding agent without sending bytes through the model. Provide basename, exact byte count and MIME type. Up to 104857600 bytes, PUT the file to url with curl -T photo.png -H 'Content-Type: image/png' '<url>'; success returns 201 with the file object, and reuse returns 410 CAPABILITY_USED. Above that threshold, split the file into part_size chunks (default 64000000 bytes), PUT each chunk to its numbered parts[].url in any order, then POST complete_url without a body. Part PUTs return 200; completion returns 201 with the file object, including its state, or 400 if a part is missing. A processing file can be polled with files.retrieve until active. Identical part bytes may be retried; changed bytes at the same number return 400. Completion reuse returns 410 CAPABILITY_USED. Each PUT requires the exact signed Content-Length; single-PUT Content-Type must match content_type or be omitted. Expired, revoked, invalid, wrong-action or cross-organization URLs return 404. URL lifetime defaults to 900 seconds for single PUT or 3600 for multipart, at most 604800; all multipart URLs share an expiry. Multipart creation reserves storage quota. Issuance requires the same unscoped credential as direct file creation. Each issuance creates a new upload and is not idempotent. Example body: {"filename":"photo.png","bytes":2048,"content_type":"image/png"}.
|
|
1242
|
+
*/
|
|
1243
|
+
export const fileCreateSignedUpload = (options) => (options.client ?? client).post({
|
|
1244
|
+
security: [{
|
|
1245
|
+
key: 'BearerAuth',
|
|
1246
|
+
scheme: 'bearer',
|
|
1247
|
+
type: 'http'
|
|
1248
|
+
}, {
|
|
1249
|
+
key: 'ApiKeyAuth',
|
|
1250
|
+
name: 'X-API-Key',
|
|
1251
|
+
type: 'apiKey'
|
|
1252
|
+
}],
|
|
1253
|
+
url: '/file/v1/uploads/signed',
|
|
1254
|
+
...options,
|
|
1255
|
+
headers: {
|
|
1256
|
+
'Content-Type': 'application/json',
|
|
1257
|
+
...options.headers
|
|
1258
|
+
}
|
|
1259
|
+
});
|
|
1260
|
+
/**
|
|
1261
|
+
* Create a download URL
|
|
1262
|
+
*
|
|
1263
|
+
* Download a file's bytes to a local disk from a coding agent without sending them through the model. Use file_id from file creation or listing, then run curl -fsSL -o <filename> '<url>' locally with the returned URL; GET needs no Authorization header. The link is reusable until expiry and supports a single byte Range (for example Range: bytes=0-9 returns 206). Revoke it with files.contentLinks.revoke, passing the token after /c/ in the URL. Expired, revoked, invalid or cross-organization URLs return 404. Lifetime defaults to 3600 seconds and is at most 604800 seconds. Issuance requires the same credential and file-read access as files.retrieveContent; a processing file returns 409 FILE_NOT_READY, so poll files.retrieve until active before retrying. A missing, expired or other-organization file returns 404. Each issuance creates a new link. OpenAI Files has no signed download URL; this follows S3 presigned GET semantics. Example body: {"ttl_seconds":3600}.
|
|
1264
|
+
*/
|
|
1265
|
+
export const fileCreateContentUrl = (options) => (options.client ?? client).post({
|
|
1266
|
+
security: [{
|
|
1267
|
+
key: 'BearerAuth',
|
|
1268
|
+
scheme: 'bearer',
|
|
1269
|
+
type: 'http'
|
|
1270
|
+
}, {
|
|
1271
|
+
key: 'ApiKeyAuth',
|
|
1272
|
+
name: 'X-API-Key',
|
|
1273
|
+
type: 'apiKey'
|
|
1274
|
+
}],
|
|
1275
|
+
url: '/file/v1/files/{file_id}/content_url',
|
|
1276
|
+
...options,
|
|
1277
|
+
headers: {
|
|
1278
|
+
'Content-Type': 'application/json',
|
|
1279
|
+
...options.headers
|
|
1280
|
+
}
|
|
1281
|
+
});
|
|
1282
|
+
/**
|
|
1283
|
+
* Revoke a file content link
|
|
1284
|
+
*
|
|
1285
|
+
* Stop a previously issued content link from reading a file. Obtain the link with files.contentUrl.create. Use file_id from file creation or listing and the token path component from a content URL (/c/<token>), not the complete URL. The caller must own the file and have write access; a read-only binding is refused. Revocation propagates through the capability deny list within 30 seconds; the file and other links remain available. Only current IAM capability tokens can be revoked; legacy content links expire at the migration deadline. Example body: {"token":"<token from /c/>"}.
|
|
1286
|
+
*/
|
|
1287
|
+
export const fileRevokeContentLink = (options) => (options.client ?? client).post({
|
|
1288
|
+
security: [{
|
|
1289
|
+
key: 'BearerAuth',
|
|
1290
|
+
scheme: 'bearer',
|
|
1291
|
+
type: 'http'
|
|
1292
|
+
}, {
|
|
1293
|
+
key: 'ApiKeyAuth',
|
|
1294
|
+
name: 'X-API-Key',
|
|
1295
|
+
type: 'apiKey'
|
|
1296
|
+
}],
|
|
1297
|
+
url: '/file/v1/files/{file_id}/content_links:revoke',
|
|
1298
|
+
...options,
|
|
1299
|
+
headers: {
|
|
1300
|
+
'Content-Type': 'application/json',
|
|
1301
|
+
...options.headers
|
|
1302
|
+
}
|
|
1303
|
+
});
|
|
1486
1304
|
/**
|
|
1487
1305
|
* Health Check
|
|
1488
1306
|
*
|
|
@@ -1517,6 +1335,18 @@ export const metaMethodsSearch = (options) => (options?.client ?? client).get({
|
|
|
1517
1335
|
*
|
|
1518
1336
|
*/
|
|
1519
1337
|
export const metaMethodsRetrieve = (options) => (options.client ?? client).get({ url: '/meta/v1/methods/{name}', ...options });
|
|
1338
|
+
/**
|
|
1339
|
+
* Read documentation Markdown
|
|
1340
|
+
*
|
|
1341
|
+
* Read a platform guide or reference before implementing an unfamiliar capability. Public; no API key required. Take path from praxis.meta.docs.search, or use developers/automation/guides/write-workflow. Append #heading-id to path to read only that section, including its subsections. Encode the hash as %23 over HTTP; SDK callers pass it in the path string. lang defaults to zh; en selects the English page. Unknown pages or anchors return DOC_NOT_FOUND; search again for a valid path.
|
|
1342
|
+
*/
|
|
1343
|
+
export const metaDocsRetrieve = (options) => (options.client ?? client).get({ url: '/meta/v1/docs/{path}', ...options });
|
|
1344
|
+
/**
|
|
1345
|
+
* Search platform documentation
|
|
1346
|
+
*
|
|
1347
|
+
* Find guides and references by keyword before reading them with praxis.meta.docs.retrieve. Public; no API key required. Matches documentation titles, headings and page text without case sensitivity; all query words must occur. q is required; limit defaults to 20 and accepts 1–50. lang defaults to zh or use en for English. Returns paths, page titles, canonical URLs and short matching snippets; no matches returns an empty array.
|
|
1348
|
+
*/
|
|
1349
|
+
export const metaDocsSearch = (options) => (options.client ?? client).get({ url: '/meta/v1/docs/search', ...options });
|
|
1520
1350
|
/**
|
|
1521
1351
|
* List Models
|
|
1522
1352
|
*
|
|
@@ -1626,12 +1456,11 @@ export const remixVideo = (options) => (options.client ?? client).post({
|
|
|
1626
1456
|
...options
|
|
1627
1457
|
});
|
|
1628
1458
|
/**
|
|
1629
|
-
*
|
|
1459
|
+
* Ask structured decision questions
|
|
1630
1460
|
*
|
|
1631
|
-
*
|
|
1461
|
+
* Ask typed questions about a state and get calibrated probabilities instead of generated text. Same request and response as TypeSafe System One. Use model ids from model.models.list declaring typesafe.systemone. Send one or more noul, choice or score questions; answers use the same question ids. Input tokens are charged at the catalog input price; output tokens are free. usage.cost and X-Praxis-Cost-Usd expose the same customer charge in USD. box questions and assets are unsupported and return 400: images are not supported. Unknown top-level fields pass unchanged to the native upstream.
|
|
1632
1462
|
*/
|
|
1633
|
-
export const
|
|
1634
|
-
...formDataBodySerializer,
|
|
1463
|
+
export const createSystemone = (options) => (options.client ?? client).post({
|
|
1635
1464
|
security: [{
|
|
1636
1465
|
key: 'BearerAuth',
|
|
1637
1466
|
scheme: 'bearer',
|
|
@@ -1641,20 +1470,43 @@ export const createAudioTranscription = (options) => (options.client ?? client).
|
|
|
1641
1470
|
name: 'X-API-Key',
|
|
1642
1471
|
type: 'apiKey'
|
|
1643
1472
|
}],
|
|
1644
|
-
url: '/model/v1/
|
|
1473
|
+
url: '/model/v1/systemone',
|
|
1645
1474
|
...options,
|
|
1646
1475
|
headers: {
|
|
1647
|
-
'Content-Type':
|
|
1476
|
+
'Content-Type': 'application/json',
|
|
1648
1477
|
...options.headers
|
|
1649
1478
|
}
|
|
1650
1479
|
});
|
|
1651
1480
|
/**
|
|
1652
|
-
*
|
|
1481
|
+
* Transcribe audio
|
|
1653
1482
|
*
|
|
1654
|
-
*
|
|
1483
|
+
* Transcribe an uploaded audio file into text. Use it for speech-to-text; to synthesize speech use createAudioSpeech. Send multipart/form-data with model (for example whisper-large-v3-turbo or qwen3-asr-flash; list them with listModels?type=transcription) and file. response_format json (default) and text work on both models; verbose_json with segment timestamps works on whisper-large-v3-turbo only; srt and vtt return 400. Parameters a model cannot represent, such as temperature, return 400 input_not_representable, and when no model route is available the call answers 503. The response is JSON with text (plus language, duration and segments for verbose_json) or plain text for response_format text.
|
|
1655
1484
|
*/
|
|
1656
|
-
export const
|
|
1657
|
-
|
|
1485
|
+
export const createAudioTranscription = (options) => (options.client ?? client).post({
|
|
1486
|
+
...formDataBodySerializer,
|
|
1487
|
+
security: [{
|
|
1488
|
+
key: 'BearerAuth',
|
|
1489
|
+
scheme: 'bearer',
|
|
1490
|
+
type: 'http'
|
|
1491
|
+
}, {
|
|
1492
|
+
key: 'ApiKeyAuth',
|
|
1493
|
+
name: 'X-API-Key',
|
|
1494
|
+
type: 'apiKey'
|
|
1495
|
+
}],
|
|
1496
|
+
url: '/model/v1/audio/transcriptions',
|
|
1497
|
+
...options,
|
|
1498
|
+
headers: {
|
|
1499
|
+
'Content-Type': null,
|
|
1500
|
+
...options.headers
|
|
1501
|
+
}
|
|
1502
|
+
});
|
|
1503
|
+
/**
|
|
1504
|
+
* Rerank documents
|
|
1505
|
+
*
|
|
1506
|
+
* Rank a list of documents by relevance to a query and return the best matches with scores. Use it to reorder retrieval results before you pass them to a language model; it does not generate text. Send model (a reranking model; list them with listModels?type=reranking), query and documents as an array of plain strings (object documents return 400). top_n limits how many results come back (at least 1; omit it to rank every document). Each result carries index, the zero-based position of the document in your documents array, and relevance_score from 0 to 1; results are sorted best first. Any field other than model, query, documents and top_n returns 400 input_not_representable, and 503 means no model route is available.
|
|
1507
|
+
*/
|
|
1508
|
+
export const rerank = (options) => (options.client ?? client).post({
|
|
1509
|
+
security: [{
|
|
1658
1510
|
key: 'BearerAuth',
|
|
1659
1511
|
scheme: 'bearer',
|
|
1660
1512
|
type: 'http'
|
|
@@ -2620,7 +2472,7 @@ export const makeSandboxDirectory = (options) => (options.client ?? client).post
|
|
|
2620
2472
|
/**
|
|
2621
2473
|
* Run a command in the sandbox
|
|
2622
2474
|
*
|
|
2623
|
-
* Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–
|
|
2475
|
+
* Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–3600000 milliseconds, default 600000, that is 10 minutes; E2B defaults to 60000). Unlike E2B, this endpoint is synchronous only: no background mode, callbacks or unlimited timeout (timeoutMs 0); output is bounded to 1 MiB including stream framing. Nonzero exit codes return 200 with the result. A timeout returns COMMAND_TIMEOUT (504); transport timeout does not confirm process termination, so do not blindly retry commands with side effects. Example body: {"cmd":"echo hi"}.
|
|
2624
2476
|
*/
|
|
2625
2477
|
export const runSandboxCommand = (options) => (options.client ?? client).post({
|
|
2626
2478
|
security: [{
|
|
@@ -2700,7 +2552,7 @@ export const sessionsUpdate = (options) => (options.client ?? client).post({
|
|
|
2700
2552
|
/**
|
|
2701
2553
|
* List agents
|
|
2702
2554
|
*
|
|
2703
|
-
* List the agents of the workspace behind your API key, newest first, in pages of at most 100 (default 20). Use it to find an agent id before creating a session; to read one agent use agents.retrieve, to see its history use agents.versions.list. Archived agents are hidden unless include_archived is true. Filter kind=personal for durable-computer agents
|
|
2555
|
+
* List the agents of the workspace behind your API key, newest first, in pages of at most 100 (default 20). Use it to find an agent id before creating a session; to read one agent use agents.retrieve, to see its history use agents.versions.list. Archived agents are hidden unless include_archived is true. Filter kind=general or kind=personal for durable-computer agents, kind=service for per-session environments, or kind=assume for external MCP clients. Pass next_page from the response as page to read the next page; a null next_page means the end.
|
|
2704
2556
|
*/
|
|
2705
2557
|
export const agentsList = (options) => (options?.client ?? client).get({
|
|
2706
2558
|
security: [{
|
|
@@ -2718,7 +2570,7 @@ export const agentsList = (options) => (options?.client ?? client).get({
|
|
|
2718
2570
|
/**
|
|
2719
2571
|
* Create agent
|
|
2720
2572
|
*
|
|
2721
|
-
* Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. Use tools: [{type: "agent_toolset_20260401"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: "agent_toolset_20260401", default_config: {enabled: false}, configs: [{name: "codemode", enabled: true}, {name: "bash", enabled: true, permission_policy: {type: "always_ask"}}]}]; every tool not listed, including todo_write, enter_plan_mode, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 "model <id> is not in the model catalog" and an embedding, image or speech model returns 400 "model <id> cannot run an agent". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {"name":"helper","model":{"id":"deepseek-flash"},"tools":[{"type":"agent_toolset_20260401"}]}.
|
|
2573
|
+
* Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. Use tools: [{type: "agent_toolset_20260401"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: "agent_toolset_20260401", default_config: {enabled: false}, configs: [{name: "codemode", enabled: true}, {name: "bash", enabled: true, permission_policy: {type: "always_ask"}}]}]; every tool not listed, including todo_write, enter_plan_mode, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. model and every models.allowed entry must be a catalog model that can run an agent: an unknown id returns 400 "model <id> is not in the model catalog" and an embedding, image or speech model returns 400 "model <id> cannot run an agent". name is a label, not a unique key: 1 to 256 characters after trimming, no NUL or line breaks. avatar is trimmed, must not contain spaces or point at a loopback, private or internal host, and its scheme is stored in lowercase. script and workflow binding ids are stored in lowercase, the form automation matches; bindings together with environment_id null return 400 because bindings need a machine. Example: {"name":"helper","model":{"id":"deepseek-flash"},"tools":[{"type":"agent_toolset_20260401"}]}. For kind assume, provide name without model, models, subagent_model, subagents or multiagent; omit computer_id to register a new computer named after the agent without starting an instance, or provide an existing computer_id; vault_ids are accepted, bindings and environment_id are refused. Drive assume agents over MCP at /agent/v1/agents/{id}/mcp.
|
|
2722
2574
|
*/
|
|
2723
2575
|
export const agentsCreate = (options) => (options.client ?? client).post({
|
|
2724
2576
|
security: [{
|
|
@@ -2740,7 +2592,7 @@ export const agentsCreate = (options) => (options.client ?? client).post({
|
|
|
2740
2592
|
/**
|
|
2741
2593
|
* Get agent
|
|
2742
2594
|
*
|
|
2743
|
-
* Read
|
|
2595
|
+
* Read the agent configuration currently effective for new sessions. By default, version equals active_version and latest_version identifies the newest saved version, including an unapplied save. Use latest_version for optimistic concurrency when updating. Pass version as a positive integer to read that saved version; version=active is equivalent to omission. The response lists every native tool with its resolved configuration in one agent_toolset_20260401 entry, so tools can be sent back unchanged to agents.update. Use agents.versions.list to enumerate saved versions.
|
|
2744
2596
|
*/
|
|
2745
2597
|
export const agentsRetrieve = (options) => (options.client ?? client).get({
|
|
2746
2598
|
security: [{
|
|
@@ -2758,7 +2610,7 @@ export const agentsRetrieve = (options) => (options.client ?? client).get({
|
|
|
2758
2610
|
/**
|
|
2759
2611
|
* Update agent
|
|
2760
2612
|
*
|
|
2761
|
-
*
|
|
2613
|
+
* Save configuration changes as a new immutable version. Send latest_version from a default retrieve or update response as the request version for optimistic concurrency; a stale value returns 409. apply defaults to true and makes the new version effective; apply false saves without changing active_version. The response contains the effective configuration, with version equal to active_version and latest_version naming the newest saved version. An unchanged configuration, including a note-only update, is a no-op returning 200 and the current effective version without creating or activating a version. version_note records up to 280 characters only when a configuration change creates a new version; null is equivalent to omission. Use agents.versions.apply to activate an existing saved version. Existing sessions and tokens keep their version. Omitted fields keep their value. multiagent takes null or a coordinator roster; subagent_model keeps its value when omitted and is cleared by null. Archived agents cannot be updated. tools: [] removes every tool, while tools: null returns 400 (tools cannot be null; send [] to remove every tool). On update, omit skills to keep them, send an array to replace them, or send [] or null to clear them. skills attaches uploaded custom skills as [{type: "custom", skill_id, version?}] (skill_id from skills.create or skills.list; at most 20, no repeated skill_id). Omit version, or send "latest", to use the skill's newest version when a session starts. type anthropic returns 400. Assume agents reject model, models, subagent_model, subagents and multiagent on every update; other fields follow the general agent rules, with vault_ids also accepted.
|
|
2762
2614
|
*/
|
|
2763
2615
|
export const agentsUpdate = (options) => (options.client ?? client).post({
|
|
2764
2616
|
security: [{
|
|
@@ -2798,7 +2650,7 @@ export const agentsArchive = (options) => (options.client ?? client).post({
|
|
|
2798
2650
|
/**
|
|
2799
2651
|
* List agent versions
|
|
2800
2652
|
*
|
|
2801
|
-
* List the saved versions of one agent, in pages of at most 100 (default 20). Each item is the full agent definition at that version, so you can compare
|
|
2653
|
+
* List the saved versions of one agent in ascending version number, oldest first, in pages of at most 100 (default 20). Each item is the full agent definition at that saved version, so you can compare configurations. active is true only for the item new sessions use. active_version on every item is the same agent-level currently effective version; it is not that item's version. Use agents.retrieve with version to read a single saved version; agent_id comes from agents.list or agents.create. Pass next_page as page to continue.
|
|
2802
2654
|
*/
|
|
2803
2655
|
export const agentsVersionsList = (options) => (options.client ?? client).get({
|
|
2804
2656
|
security: [{
|
|
@@ -2834,7 +2686,7 @@ export const sessionsList = (options) => (options?.client ?? client).get({
|
|
|
2834
2686
|
/**
|
|
2835
2687
|
* Create session
|
|
2836
2688
|
*
|
|
2837
|
-
* Create a session: one conversation with an agent. Pass agent as an agent id or {type:"agent", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (light for a new agent), unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. For service agents, explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Unlike Anthropic Managed Agents, the only inline agent override is system ({type:"agent_with_overrides", id, system}); to change the model, tools, MCP servers or skills, save a version instead. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. budget is {type:"limit", max_list_cost:{amount, currency:"USD"}} where amount is a positive
|
|
2689
|
+
* Create a session: one conversation with an agent. Pass agent as an agent id or {type:"agent", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (light for a new agent), unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. For service agents, explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Unlike Anthropic Managed Agents, the only inline agent override is system ({type:"agent_with_overrides", id, system}); to change the model, tools, MCP servers or skills, save a version instead. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. budget is {type:"limit", max_list_cost:{amount, currency:"USD"}} where amount is a positive decimal string of US dollars with at most 2 decimal places ("20.00" is USD 20.00); omitted budget defaults to "20.00" and null removes the limit. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion. Assume agents return 400 INVALID_PARAMS; drive them over MCP at /agent/v1/agents/{id}/mcp instead.
|
|
2838
2690
|
*/
|
|
2839
2691
|
export const sessionsCreate = (options) => (options.client ?? client).post({
|
|
2840
2692
|
security: [{
|
|
@@ -3214,7 +3066,7 @@ export const deploymentsList = (options) => (options?.client ?? client).get({
|
|
|
3214
3066
|
/**
|
|
3215
3067
|
* Create deployment
|
|
3216
3068
|
*
|
|
3217
|
-
* Freeze session parameters as a deployment; this operation does not open a session. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for personal agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400.
|
|
3069
|
+
* Freeze session parameters as a deployment; this operation does not open a session. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for general and personal agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400.
|
|
3218
3070
|
*/
|
|
3219
3071
|
export const deploymentsCreate = (options) => (options.client ?? client).post({
|
|
3220
3072
|
security: [{
|
|
@@ -3860,7 +3712,7 @@ export const applicationListGrants = (options) => (options.client ?? client).get
|
|
|
3860
3712
|
/**
|
|
3861
3713
|
* Create grant
|
|
3862
3714
|
*
|
|
3863
|
-
*
|
|
3715
|
+
* Record access to an organization-owned database or knowledge base, all organization files (files, id *), or models (models, id *, read only). Each resource and optional alias must be unique within this Worker. Foreign and missing resources both return RESOURCE_NOT_FOUND (404); an unavailable resource service returns PROVIDER_CAPACITY (503, retryable).
|
|
3864
3716
|
*/
|
|
3865
3717
|
export const applicationCreateGrant = (options) => (options.client ?? client).post({
|
|
3866
3718
|
security: [{
|
|
@@ -3942,7 +3794,7 @@ export const applicationUploadAssets = (options) => (options.client ?? client).p
|
|
|
3942
3794
|
/**
|
|
3943
3795
|
* List actions
|
|
3944
3796
|
*
|
|
3945
|
-
* Discover callable Actions and their ns/name references without executing them. Combine each returned namespace and name as ns/name; Action calls use the current revision and do not accept @version or @tag. Filter by name or description; results include seven-day statistics and revision summaries without implementation source. Archived actions are excluded by default.
|
|
3797
|
+
* Discover callable Actions and their ns/name references without executing them. Combine each returned namespace and name as ns/name; Action calls use the current revision and do not accept @version or @tag. Filter by name or description; results include seven-day statistics and revision summaries without implementation source. Archived actions are excluded by default. List items carry no input contract: get the action and read current_revision.input_schema. Call it with call("ns/name", input) in a script or call: ns/name with with: in a workflow.
|
|
3946
3798
|
*/
|
|
3947
3799
|
export const automationActionsList = (options) => (options?.client ?? client).get({
|
|
3948
3800
|
querySerializer: { parameters: {
|
|
@@ -3987,7 +3839,7 @@ export const automationActionsCreate = (options) => (options.client ?? client).p
|
|
|
3987
3839
|
/**
|
|
3988
3840
|
* Get an Action with its current input and output JSON Schemas
|
|
3989
3841
|
*
|
|
3990
|
-
* Read the Action and its full current implementation, with input and output JSON Schemas at current_revision.input_schema and current_revision.output_schema. To read a built-in Action, use ns=praxis and name=<bare name>, for example name=ocr; invoke it in a script with call("ocr", input). The response ETag is the current revision ID for conditional updates.
|
|
3842
|
+
* Read the Action and its full current implementation, with input and output JSON Schemas at current_revision.input_schema and current_revision.output_schema. To read a built-in Action, use ns=praxis and name=<bare name>, for example name=ocr; invoke it in a script with call("ocr", input) or in a workflow step with call: ocr and with:. Input that breaks the contract returns INPUT_INVALID, with the fields in errors[]. The response ETag is the current revision ID for conditional updates.
|
|
3991
3843
|
*/
|
|
3992
3844
|
export const automationActionsGet = (options) => (options.client ?? client).get({
|
|
3993
3845
|
security: [{
|
|
@@ -4005,7 +3857,7 @@ export const automationActionsGet = (options) => (options.client ?? client).get(
|
|
|
4005
3857
|
/**
|
|
4006
3858
|
* Update an action
|
|
4007
3859
|
*
|
|
4008
|
-
* Update after checking compatibility against the current and five recent revisions. Widening inputs and narrowing outputs are compatible, including length, item count, property count, type (integer/number), and multipleOf (the new input factor divides the old one; the reverse holds for outputs). dry_run=true returns only CompatResult and may omit If-Match; a supplied header is still checked, and * matches any existing representation. Normal updates require If-Match and return ActionDef with ETag; previews return no ETag. Omitted optional fields retain their existing values only for description and labels; when constructing a new revision, errors defaults to [], omitted annotations keys to false, timeout_ms to
|
|
3860
|
+
* Update after checking compatibility against the current and five recent revisions. Widening inputs and narrowing outputs are compatible, including length, item count, property count, type (integer/number), and multipleOf (the new input factor divides the old one; the reverse holds for outputs). dry_run=true returns only CompatResult and may omit If-Match; a supplied header is still checked, and * matches any existing representation. Normal updates require If-Match and return ActionDef with ETag; previews return no ETag. Omitted optional fields retain their existing values only for description and labels; when constructing a new revision, errors defaults to [], omitted annotations keys to false, timeout_ms to 300000, and message to null. Incompatible normal updates return 422 SCHEMA_INCOMPATIBLE with issues; unchanged contents retain the existing revision.
|
|
4009
3861
|
*/
|
|
4010
3862
|
export const automationActionsUpdate = (options) => (options.client ?? client).put({
|
|
4011
3863
|
security: [{
|
|
@@ -4185,7 +4037,7 @@ export const automationScriptsList = (options) => (options?.client ?? client).ge
|
|
|
4185
4037
|
/**
|
|
4186
4038
|
* Create a script
|
|
4187
4039
|
*
|
|
4188
|
-
* Save a TypeScript script as an editable draft for later reuse; this does not publish or start a run. Choose your own namespace without registering it first; praxis is reserved for built-in Actions. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. The draft is a source string with a default-exported function, for example `export default async (input: {name: string}) => ({greeting: "Hello, " + input.name});`. Scripts provide praxis, call, invoke, console and codemode as module-scope bindings, not on globalThis, with no import needed: praxis.<domain>.<resource>.<method>(...) calls a platform API, call("ocr", input) calls a built-in Action, and invoke("namespace/name", input) starts a child run. Action IDs are strings (bare names for built-ins, namespace/name for your own Actions); praxis.ocr(...) does not exist. To test it, pass that source and language=ts to praxis.automation.runs.create without publishing. To publish later, use the returned draft.revision as expected_draft_revision.
|
|
4040
|
+
* Save a TypeScript script as an editable draft for later reuse; this does not publish or start a run. Choose your own namespace without registering it first; praxis is reserved for built-in Actions. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. The draft is a source string with a default-exported function, for example `export default async (input: {name: string}) => ({greeting: "Hello, " + input.name});`. Scripts provide praxis, call, invoke, console and codemode as module-scope bindings, not on globalThis, with no import needed: praxis.<domain>.<resource>.<method>(...) calls a platform API, call("ocr", input) calls a built-in Action, and invoke("namespace/name", input) starts a child run. Action IDs are strings (bare names for built-ins, namespace/name for your own Actions); praxis.ocr(...) does not exist. The return value is limited to 1 MiB: write large results to a file with call("write-file", ...) and return the file ID. A call error carries errors[] (pointer, detail, hint); String(e) is only the summary. To test it, pass that source and language=ts to praxis.automation.runs.create without publishing. To publish later, use the returned draft.revision as expected_draft_revision.
|
|
4189
4041
|
*/
|
|
4190
4042
|
export const automationScriptsCreate = (options) => (options.client ?? client).post({
|
|
4191
4043
|
security: [{
|
|
@@ -4448,7 +4300,7 @@ export const automationWorkflowsList = (options) => (options?.client ?? client).
|
|
|
4448
4300
|
/**
|
|
4449
4301
|
* Create a workflow
|
|
4450
4302
|
*
|
|
4451
|
-
* Save a YAML workflow as an editable draft
|
|
4303
|
+
* Workflow syntax reference: https://deepraxis.com/docs/developers/automation/reference/workflow-syntax. Save a YAML workflow as an editable draft; this does not validate, publish or run it, so check it with validate (kind=workflow) first. Minimal draft: document with dsl ("1.0.3"), namespace, name and version, plus a do list of steps, for example document: {dsl: "1.0.3", namespace: demo, name: add, version: "1.0.0"} and do: [{first: {call: demo/add-one, with: {n: "${ .n }"}}}]. call: <ns/name> calls an Action directly (bare name for built-ins such as ocr) and with is the Action input; the input contract is at current_revision.input_schema in the get-action response. run: starts a saved script or child workflow. The run input is . in the first step, and expressions are jq written as a whole ${ ... } string. Limits: Action 5 min (run-sandbox 6 h), workflow 24 h by default and 30 days at most, payload 1 MiB. Test the draft by sending its source and language=yaml to praxis.automation.runs.create. To pause for a person, call praxis/approval (it opens a human task; the step output is the decision); agents answer with praxis.automation.humanTasks.respond on behalf of their user. Guide: /docs/developers/automation/guides/approvals Guide: /docs/developers/automation/guides/write-workflow. Error details are in the errors[] of the response (pointer, detail, hint). Choose your own namespace without registering it first; praxis is reserved for built-in Actions. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. run.workflow accepts ns/name@range or {namespace, name, version, input}; run.script uses the same reference shape as a platform extension. Object namespace, name and version are required; version accepts an exact version, dist-tag or range, locked at publication. Object input defaults to {} and supports expressions; string references retain task-level with. run.await defaults to true and returns the child output. With false, the child uses detach and the task immediately returns {run_id}; parent cancellation does not cascade. Inline script.code returns DEFINITION_INVALID with a detail asking you to save a script and reference it first. raise.error retains its type URI, status, title and detail in the run error.
|
|
4452
4304
|
*/
|
|
4453
4305
|
export const automationWorkflowsCreate = (options) => (options.client ?? client).post({
|
|
4454
4306
|
security: [{
|
|
@@ -4488,7 +4340,7 @@ export const automationWorkflowsGet = (options) => (options.client ?? client).ge
|
|
|
4488
4340
|
/**
|
|
4489
4341
|
* Update a workflow draft
|
|
4490
4342
|
*
|
|
4491
|
-
* Update description, labels or draft with the current draft revision in If-Match. Even metadata-only updates create a new draft revision.
|
|
4343
|
+
* Update description, labels or draft with the current draft revision in If-Match, taken from draft.revision in the get-workflow response. Even metadata-only updates create a new draft revision. A mismatch returns 412 PRECONDITION_FAILED; read the draft again, merge and retry. The draft is not validated here, so check it with validate (kind=workflow) before publishing. Error details are in errors[]. See the workflow syntax reference at https://deepraxis.com/docs/developers/automation/reference/workflow-syntax.
|
|
4492
4344
|
*/
|
|
4493
4345
|
export const automationWorkflowsPatch = (options) => (options.client ?? client).patch({
|
|
4494
4346
|
security: [{
|
|
@@ -4572,7 +4424,7 @@ export const automationWorkflowsVersions = (options) => (options.client ?? clien
|
|
|
4572
4424
|
/**
|
|
4573
4425
|
* Publish a workflow version
|
|
4574
4426
|
*
|
|
4575
|
-
* Publish a saved definition from its draft or an ad hoc run as a reusable version for named runs or triggers, validating the definition and locking dependencies. To test unpublished code, use praxis.automation.runs.create with source and language instead. Use draft.revision from create or retrieve as expected_draft_revision. The draft must match expected_draft_revision; an ad hoc run requires from_run and expected_source_sha256. The same version and contents return the existing version; different contents return VERSION_EXISTS, prereleases require an explicit tag (not latest, URL-safe characters only, not a version or range; violations return TAG_REQUIRED or TAG_INVALID with the complete rules in hint), and invalid definitions return DEFINITION_INVALID. Stable releases automatically advance latest only above the highest existing stable version; workflows becoming latest synchronize their declared schedule. String and object run.workflow/run.script references share version resolution and dependency locking. Publishing removes +build metadata from the version number.
|
|
4427
|
+
* Publish a saved definition from its draft or an ad hoc run as a reusable version for named runs or triggers, validating the definition and locking dependencies. To test unpublished code, use praxis.automation.runs.create with source and language instead. Use draft.revision from create or retrieve as expected_draft_revision. The draft must match expected_draft_revision; an ad hoc run requires from_run and expected_source_sha256. The same version and contents return the existing version; different contents return VERSION_EXISTS, prereleases require an explicit tag (not latest, URL-safe characters only, not a version or range; violations return TAG_REQUIRED or TAG_INVALID with the complete rules in hint), and invalid definitions return DEFINITION_INVALID. Stable releases automatically advance latest only above the highest existing stable version; workflows becoming latest synchronize their declared schedule. String and object run.workflow/run.script references share version resolution and dependency locking. Publishing removes +build metadata from the version number. For a workflow, document namespace, name and version must equal the publish target, otherwise DEFINITION_IDENTITY_MISMATCH; where a DEFINITION_INVALID failure sits is listed in errors[] (pointer, detail, hint).
|
|
4576
4428
|
*/
|
|
4577
4429
|
export const automationWorkflowsPublish = (options) => (options.client ?? client).post({
|
|
4578
4430
|
security: [{
|
|
@@ -4692,7 +4544,7 @@ export const automationWorkflowsSetDistTag = (options) => (options.client ?? cli
|
|
|
4692
4544
|
/**
|
|
4693
4545
|
* Validate a definition
|
|
4694
4546
|
*
|
|
4695
|
-
* Check source without executing it when you need diagnostics, inferred schemas or references. This is optional before praxis.automation.runs.create, which also validates source before execution. Actions, scripts and workflows are supported; results include validity without saving. Invalid source is reported with valid=false. Script/action output schemas are inferred from return types: Promise unwrapping, Record, intersections and Date. Unknown types yield an empty schema and a warning in warnings. Source diagnostics use /source or /implementation/source with 1-based line/column. For kind=action the same admission checks as action creation apply (no external imports, platform operations only as direct call(praxis/<api>.<op>, input) calls, no agent or automation calls), so source that validates is not rejected at creation.
|
|
4547
|
+
* Check source without executing it when you need diagnostics, inferred schemas or references. This is optional before praxis.automation.runs.create, which also validates source before execution. Actions, scripts and workflows are supported; results include validity without saving. Invalid source is reported with valid=false. Script/action output schemas are inferred from return types: Promise unwrapping, Record, intersections and Date. Unknown types yield an empty schema and a warning in warnings. Source diagnostics use /source or /implementation/source with 1-based line/column. For kind=action the same admission checks as action creation apply (no external imports, platform operations only as direct call(praxis/<api>.<op>, input) calls, no agent or automation calls), so source that validates is not rejected at creation. For kind=workflow the YAML needs document (dsl, namespace, name, version) and do; each problem is one entry in errors[] (pointer, detail, hint), so read the first one. A listen outside the supported subset (to.all, inside a fork) and emit are not reported here and fail with DEFINITION_INVALID only when a run is created. Workflow syntax reference: https://deepraxis.com/docs/developers/automation/reference/workflow-syntax.
|
|
4696
4548
|
*/
|
|
4697
4549
|
export const automationValidateValidate = (options) => (options.client ?? client).post({
|
|
4698
4550
|
security: [{
|
|
@@ -4780,7 +4632,7 @@ export const automationRunsList = (options) => (options?.client ?? client).get({
|
|
|
4780
4632
|
/**
|
|
4781
4633
|
* Run a published target or execute draft source
|
|
4782
4634
|
*
|
|
4783
|
-
* Execute a published script or workflow with target, or test unpublished code directly with source and language (ts for TypeScript, yaml for workflow YAML), without first saving or publishing a definition. Minimal script: `export default async ({ file_id }: { file_id: string }) => { const result = await call("ocr", { document: { type: "file", file_id } }); return result; }`; send it as source with language="ts", input={"file_id":"<uploaded file ID>"} and wait=0, using a PDF or image already uploaded to your account. To call a platform API directly in the same script, use the praxis SDK object, for example `praxis.model.ocr.create({ body: { model: "glm-ocr", document: { type: "file", file_id } } })`; Action IDs are strings passed to call(), not SDK methods such as praxis.ocr(...). praxis, call, invoke, console and codemode are module-scope bindings, not on globalThis, and need no import; invoke("namespace/name", input) starts a child run. target and source are mutually exclusive; target accepts ns/name@version, @tag or @range and defaults to latest when @ is omitted. Source/input validation precedes run creation, so a separate validate call is optional. input defaults to {} and must match the input schema and fit within 1 MiB. wait is 0–60 seconds (default 0): a terminal run returns 200, otherwise 202. Use the returned id with praxis.automation.runs.retrieve and inspect status, output and error; acceptance does not mean successful completion. For long-running, background or batch work, use wait: 0 and poll the run, or split work into child runs or a workflow; wait only controls the response wait and does not extend execution limits. Actions time out after
|
|
4635
|
+
* Execute a published script or workflow with target, or test unpublished code directly with source and language (ts for TypeScript, yaml for workflow YAML), without first saving or publishing a definition. Minimal script: `export default async ({ file_id }: { file_id: string }) => { const result = await call("ocr", { document: { type: "file", file_id } }); return result; }`; send it as source with language="ts", input={"file_id":"<uploaded file ID>"} and wait=0, using a PDF or image already uploaded to your account. To call a platform API directly in the same script, use the praxis SDK object, for example `praxis.model.ocr.create({ body: { model: "glm-ocr", document: { type: "file", file_id } } })`; Action IDs are strings passed to call(), not SDK methods such as praxis.ocr(...). praxis, call, invoke, console and codemode are module-scope bindings, not on globalThis, and need no import; invoke("namespace/name", input) starts a child run. target and source are mutually exclusive; target accepts ns/name@version, @tag or @range and defaults to latest when @ is omitted. Source/input validation precedes run creation, so a separate validate call is optional. input defaults to {} and must match the input schema and fit within 1 MiB. wait is 0–60 seconds (default 0): a terminal run returns 200, otherwise 202. Use the returned id with praxis.automation.runs.retrieve and inspect status, output and error; acceptance does not mean successful completion. For long-running, background or batch work, use wait: 0 and poll the run, or split work into child runs or a workflow; wait only controls the response wait and does not extend execution limits. Actions time out after 5 min (run-sandbox after 6 h); scripts have a 30 min wall-clock limit and a 30 s CPU limit; workflows default to 24 h and allow up to 30 days. Each run can start at most 1,000 child runs, with at most 100 active at once; nesting depth is limited to 10. Idempotency-Key is scoped to tenant, method and path for 24 hours, excluding wait from the fingerprint; replay returns the current run with Idempotent-Replayed: true, changed contents return 422 and an in-flight request returns 409. With language=yaml, source is a workflow YAML: the run input is . in the first step, and the shape is described in create workflow. Error details are in errors[] (pointer, detail, hint). New non-deterministic run IDs contain 78 characters, compared with 46 for legacy random IDs; treat IDs as opaque strings. Historical and deterministic IDs remain valid; same-millisecond order is not guaranteed.
|
|
4784
4636
|
*/
|
|
4785
4637
|
export const automationRunsCreate = (options) => (options.client ?? client).post({
|
|
4786
4638
|
security: [{
|
|
@@ -5284,77 +5136,80 @@ export const automationHooksReceive = (options) => (options.client ?? client).po
|
|
|
5284
5136
|
}
|
|
5285
5137
|
});
|
|
5286
5138
|
/**
|
|
5287
|
-
* List
|
|
5139
|
+
* List human tasks
|
|
5288
5140
|
*
|
|
5289
|
-
*
|
|
5141
|
+
* List the human tasks that praxis/approval workflow steps opened, newest first. By default it returns only open tasks assigned to the caller: their approval inbox. scope=all lists every task of the organization, and status and run_id narrow the list. Use a returned id with retrieve for details and respond to decide. Read-only: listing never changes a task.
|
|
5290
5142
|
*/
|
|
5291
|
-
export const
|
|
5143
|
+
export const automationHumanTasksList = (options) => (options?.client ?? client).get({
|
|
5144
|
+
querySerializer: { parameters: { status: { array: { explode: false } } } },
|
|
5292
5145
|
security: [{
|
|
5293
|
-
key: '
|
|
5146
|
+
key: 'BearerAuth',
|
|
5294
5147
|
scheme: 'bearer',
|
|
5295
5148
|
type: 'http'
|
|
5149
|
+
}, {
|
|
5150
|
+
key: 'ApiKeyAuth',
|
|
5151
|
+
name: 'X-API-Key',
|
|
5152
|
+
type: 'apiKey'
|
|
5296
5153
|
}],
|
|
5297
|
-
url: '/
|
|
5154
|
+
url: '/automation/v1/human-tasks',
|
|
5298
5155
|
...options
|
|
5299
5156
|
});
|
|
5300
5157
|
/**
|
|
5301
|
-
*
|
|
5302
|
-
*
|
|
5303
|
-
* 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.
|
|
5304
|
-
*/
|
|
5305
|
-
export const databaseCreateDatabase = (options) => (options.client ?? client).post({
|
|
5306
|
-
security: [{
|
|
5307
|
-
key: 'database-bearerAuth',
|
|
5308
|
-
scheme: 'bearer',
|
|
5309
|
-
type: 'http'
|
|
5310
|
-
}],
|
|
5311
|
-
url: '/database/v1/databases',
|
|
5312
|
-
...options,
|
|
5313
|
-
headers: {
|
|
5314
|
-
'Content-Type': 'application/json',
|
|
5315
|
-
...options.headers
|
|
5316
|
-
}
|
|
5317
|
-
});
|
|
5318
|
-
/**
|
|
5319
|
-
* Delete database
|
|
5158
|
+
* Retrieve a human task
|
|
5320
5159
|
*
|
|
5321
|
-
*
|
|
5160
|
+
* Read one human task - title, Markdown body, context, actions, form, assignees, mode, due time, responses and outcome - so an assignee can choose an action and fill the form. Read-only; the Console approval page /automation/tasks/{id} reads the same resource.
|
|
5322
5161
|
*/
|
|
5323
|
-
export const
|
|
5162
|
+
export const automationHumanTasksGet = (options) => (options.client ?? client).get({
|
|
5324
5163
|
security: [{
|
|
5325
|
-
key: '
|
|
5164
|
+
key: 'BearerAuth',
|
|
5326
5165
|
scheme: 'bearer',
|
|
5327
5166
|
type: 'http'
|
|
5167
|
+
}, {
|
|
5168
|
+
key: 'ApiKeyAuth',
|
|
5169
|
+
name: 'X-API-Key',
|
|
5170
|
+
type: 'apiKey'
|
|
5328
5171
|
}],
|
|
5329
|
-
url: '/
|
|
5172
|
+
url: '/automation/v1/human-tasks/{id}',
|
|
5330
5173
|
...options
|
|
5331
5174
|
});
|
|
5332
5175
|
/**
|
|
5333
|
-
*
|
|
5176
|
+
* Respond to a human task
|
|
5334
5177
|
*
|
|
5335
|
-
*
|
|
5178
|
+
* Submit an action (action_id), form values (values) and a comment as the calling user. Depending on the task's mode the response either decides it (status becomes completed, outcome is set, and the waiting workflow resumes with outcome as the step output) or is recorded while other assignees are awaited. When two assignees respond at once, exactly one decides and the other gets TASK_CLOSED. An agent may respond only if the workflow set allow_agent_decision. Send an Idempotency-Key to retry safely.
|
|
5336
5179
|
*/
|
|
5337
|
-
export const
|
|
5180
|
+
export const automationHumanTasksRespond = (options) => (options.client ?? client).post({
|
|
5338
5181
|
security: [{
|
|
5339
|
-
key: '
|
|
5182
|
+
key: 'BearerAuth',
|
|
5340
5183
|
scheme: 'bearer',
|
|
5341
5184
|
type: 'http'
|
|
5185
|
+
}, {
|
|
5186
|
+
key: 'ApiKeyAuth',
|
|
5187
|
+
name: 'X-API-Key',
|
|
5188
|
+
type: 'apiKey'
|
|
5342
5189
|
}],
|
|
5343
|
-
url: '/
|
|
5344
|
-
...options
|
|
5190
|
+
url: '/automation/v1/human-tasks/{id}/respond',
|
|
5191
|
+
...options,
|
|
5192
|
+
headers: {
|
|
5193
|
+
'Content-Type': 'application/json',
|
|
5194
|
+
...options.headers
|
|
5195
|
+
}
|
|
5345
5196
|
});
|
|
5346
5197
|
/**
|
|
5347
|
-
*
|
|
5198
|
+
* Cancel a human task
|
|
5348
5199
|
*
|
|
5349
|
-
*
|
|
5200
|
+
* Cancel an open human task; only the person who started the run or an organization API key may cancel. The task becomes cancelled and the waiting workflow step raises a runtime error with code HUMAN_TASK_CANCELLED, which try/catch can catch. Open tasks are cancelled automatically when their run ends, so this call is not needed then.
|
|
5350
5201
|
*/
|
|
5351
|
-
export const
|
|
5202
|
+
export const automationHumanTasksCancel = (options) => (options.client ?? client).post({
|
|
5352
5203
|
security: [{
|
|
5353
|
-
key: '
|
|
5204
|
+
key: 'BearerAuth',
|
|
5354
5205
|
scheme: 'bearer',
|
|
5355
5206
|
type: 'http'
|
|
5207
|
+
}, {
|
|
5208
|
+
key: 'ApiKeyAuth',
|
|
5209
|
+
name: 'X-API-Key',
|
|
5210
|
+
type: 'apiKey'
|
|
5356
5211
|
}],
|
|
5357
|
-
url: '/
|
|
5212
|
+
url: '/automation/v1/human-tasks/{id}/cancel',
|
|
5358
5213
|
...options,
|
|
5359
5214
|
headers: {
|
|
5360
5215
|
'Content-Type': 'application/json',
|
|
@@ -5362,59 +5217,79 @@ export const databaseUpdateDatabase = (options) => (options.client ?? client).pa
|
|
|
5362
5217
|
}
|
|
5363
5218
|
});
|
|
5364
5219
|
/**
|
|
5365
|
-
*
|
|
5220
|
+
* Delegate a human task
|
|
5366
5221
|
*
|
|
5367
|
-
*
|
|
5222
|
+
* An assignee who has not responded hands their place to another user (to_user), replacing their entry in assignees.users in place, so sequential order is kept. The new user cannot already be an assignee, nor the initiator unless self-approval is allowed. The task must still be open.
|
|
5368
5223
|
*/
|
|
5369
|
-
export const
|
|
5224
|
+
export const automationHumanTasksDelegate = (options) => (options.client ?? client).post({
|
|
5370
5225
|
security: [{
|
|
5371
|
-
key: '
|
|
5226
|
+
key: 'BearerAuth',
|
|
5372
5227
|
scheme: 'bearer',
|
|
5373
5228
|
type: 'http'
|
|
5229
|
+
}, {
|
|
5230
|
+
key: 'ApiKeyAuth',
|
|
5231
|
+
name: 'X-API-Key',
|
|
5232
|
+
type: 'apiKey'
|
|
5374
5233
|
}],
|
|
5375
|
-
url: '/
|
|
5376
|
-
...options
|
|
5234
|
+
url: '/automation/v1/human-tasks/{id}/delegate',
|
|
5235
|
+
...options,
|
|
5236
|
+
headers: {
|
|
5237
|
+
'Content-Type': 'application/json',
|
|
5238
|
+
...options.headers
|
|
5239
|
+
}
|
|
5377
5240
|
});
|
|
5378
5241
|
/**
|
|
5379
|
-
*
|
|
5242
|
+
* List script vault bindings
|
|
5380
5243
|
*
|
|
5381
|
-
*
|
|
5244
|
+
* Inspect the whole vaults attached to a saved script, including archived definitions, without reading secret values. Obtain ns and name from automation.scripts.list. Bindings belong to the definition rather than a published version. When vault or secret metadata cannot be read, the binding remains visible with secrets: [] and secrets_unavailable: true.
|
|
5382
5245
|
*/
|
|
5383
|
-
export const
|
|
5246
|
+
export const automationScriptsVaultsList = (options) => (options.client ?? client).get({
|
|
5384
5247
|
security: [{
|
|
5385
|
-
key: '
|
|
5248
|
+
key: 'BearerAuth',
|
|
5386
5249
|
scheme: 'bearer',
|
|
5387
5250
|
type: 'http'
|
|
5251
|
+
}, {
|
|
5252
|
+
key: 'ApiKeyAuth',
|
|
5253
|
+
name: 'X-API-Key',
|
|
5254
|
+
type: 'apiKey'
|
|
5388
5255
|
}],
|
|
5389
|
-
url: '/
|
|
5256
|
+
url: '/automation/v1/scripts/{ns}/{name}/vaults',
|
|
5390
5257
|
...options
|
|
5391
5258
|
});
|
|
5392
5259
|
/**
|
|
5393
|
-
*
|
|
5260
|
+
* Delete a script vault binding
|
|
5394
5261
|
*
|
|
5395
|
-
*
|
|
5262
|
+
* Remove the vault assignment from this saved script without deleting the vault or its secrets. Obtain aliases from automation.scripts.vaults.list. Repeating deletion of an absent alias on an existing definition succeeds. Bindings also disappear when the definition is permanently deleted, while archival retains them.
|
|
5396
5263
|
*/
|
|
5397
|
-
export const
|
|
5264
|
+
export const automationScriptsVaultsDelete = (options) => (options.client ?? client).delete({
|
|
5398
5265
|
security: [{
|
|
5399
|
-
key: '
|
|
5266
|
+
key: 'BearerAuth',
|
|
5400
5267
|
scheme: 'bearer',
|
|
5401
5268
|
type: 'http'
|
|
5269
|
+
}, {
|
|
5270
|
+
key: 'ApiKeyAuth',
|
|
5271
|
+
name: 'X-API-Key',
|
|
5272
|
+
type: 'apiKey'
|
|
5402
5273
|
}],
|
|
5403
|
-
url: '/
|
|
5274
|
+
url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
|
|
5404
5275
|
...options
|
|
5405
5276
|
});
|
|
5406
5277
|
/**
|
|
5407
|
-
*
|
|
5278
|
+
* Set a script vault binding
|
|
5408
5279
|
*
|
|
5409
|
-
*
|
|
5280
|
+
* Attach an entire active vault in your organization to a saved script, or replace the vault at an existing alias. Obtain the vault ID or display name from praxis.vault.vaults.list; ambiguous names require an ID. Bindings are independent of published versions and survive archival. The same vault cannot be assigned to two aliases on one definition. Repeating the same assignment is idempotent. Example body: {"vault":"Production"}.
|
|
5410
5281
|
*/
|
|
5411
|
-
export const
|
|
5282
|
+
export const automationScriptsVaultsSet = (options) => (options.client ?? client).put({
|
|
5412
5283
|
security: [{
|
|
5413
|
-
key: '
|
|
5284
|
+
key: 'BearerAuth',
|
|
5414
5285
|
scheme: 'bearer',
|
|
5415
5286
|
type: 'http'
|
|
5287
|
+
}, {
|
|
5288
|
+
key: 'ApiKeyAuth',
|
|
5289
|
+
name: 'X-API-Key',
|
|
5290
|
+
type: 'apiKey'
|
|
5416
5291
|
}],
|
|
5417
|
-
url: '/
|
|
5292
|
+
url: '/automation/v1/scripts/{ns}/{name}/vaults/{alias}',
|
|
5418
5293
|
...options,
|
|
5419
5294
|
headers: {
|
|
5420
5295
|
'Content-Type': 'application/json',
|
|
@@ -5422,45 +5297,57 @@ export const databaseCreateTable = (options) => (options.client ?? client).post(
|
|
|
5422
5297
|
}
|
|
5423
5298
|
});
|
|
5424
5299
|
/**
|
|
5425
|
-
*
|
|
5300
|
+
* List workflow vault bindings
|
|
5426
5301
|
*
|
|
5427
|
-
*
|
|
5302
|
+
* Inspect the whole vaults attached to a saved workflow, including archived definitions, without reading secret values. Obtain ns and name from automation.workflows.list. Bindings belong to the definition rather than a published version. When vault or secret metadata cannot be read, the binding remains visible with secrets: [] and secrets_unavailable: true.
|
|
5428
5303
|
*/
|
|
5429
|
-
export const
|
|
5304
|
+
export const automationWorkflowsVaultsList = (options) => (options.client ?? client).get({
|
|
5430
5305
|
security: [{
|
|
5431
|
-
key: '
|
|
5306
|
+
key: 'BearerAuth',
|
|
5432
5307
|
scheme: 'bearer',
|
|
5433
5308
|
type: 'http'
|
|
5309
|
+
}, {
|
|
5310
|
+
key: 'ApiKeyAuth',
|
|
5311
|
+
name: 'X-API-Key',
|
|
5312
|
+
type: 'apiKey'
|
|
5434
5313
|
}],
|
|
5435
|
-
url: '/
|
|
5314
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults',
|
|
5436
5315
|
...options
|
|
5437
5316
|
});
|
|
5438
5317
|
/**
|
|
5439
|
-
*
|
|
5318
|
+
* Delete a workflow vault binding
|
|
5440
5319
|
*
|
|
5441
|
-
*
|
|
5320
|
+
* Remove the vault assignment from this saved workflow without deleting the vault or its secrets. Obtain aliases from automation.workflows.vaults.list. Repeating deletion of an absent alias on an existing definition succeeds. Bindings also disappear when the definition is permanently deleted, while archival retains them.
|
|
5442
5321
|
*/
|
|
5443
|
-
export const
|
|
5322
|
+
export const automationWorkflowsVaultsDelete = (options) => (options.client ?? client).delete({
|
|
5444
5323
|
security: [{
|
|
5445
|
-
key: '
|
|
5324
|
+
key: 'BearerAuth',
|
|
5446
5325
|
scheme: 'bearer',
|
|
5447
5326
|
type: 'http'
|
|
5327
|
+
}, {
|
|
5328
|
+
key: 'ApiKeyAuth',
|
|
5329
|
+
name: 'X-API-Key',
|
|
5330
|
+
type: 'apiKey'
|
|
5448
5331
|
}],
|
|
5449
|
-
url: '/
|
|
5332
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
|
|
5450
5333
|
...options
|
|
5451
5334
|
});
|
|
5452
5335
|
/**
|
|
5453
|
-
*
|
|
5336
|
+
* Set a workflow vault binding
|
|
5454
5337
|
*
|
|
5455
|
-
*
|
|
5338
|
+
* Attach an entire active vault in your organization to a saved workflow, or replace the vault at an existing alias. Obtain the vault ID or display name from praxis.vault.vaults.list; ambiguous names require an ID. Bindings are independent of published versions and survive archival. The same vault cannot be assigned to two aliases on one definition. Repeating the same assignment is idempotent. Example body: {"vault":"Production"}.
|
|
5456
5339
|
*/
|
|
5457
|
-
export const
|
|
5340
|
+
export const automationWorkflowsVaultsSet = (options) => (options.client ?? client).put({
|
|
5458
5341
|
security: [{
|
|
5459
|
-
key: '
|
|
5342
|
+
key: 'BearerAuth',
|
|
5460
5343
|
scheme: 'bearer',
|
|
5461
5344
|
type: 'http'
|
|
5345
|
+
}, {
|
|
5346
|
+
key: 'ApiKeyAuth',
|
|
5347
|
+
name: 'X-API-Key',
|
|
5348
|
+
type: 'apiKey'
|
|
5462
5349
|
}],
|
|
5463
|
-
url: '/
|
|
5350
|
+
url: '/automation/v1/workflows/{ns}/{name}/vaults/{alias}',
|
|
5464
5351
|
...options,
|
|
5465
5352
|
headers: {
|
|
5466
5353
|
'Content-Type': 'application/json',
|
|
@@ -5468,49 +5355,81 @@ export const databaseUpdateTable = (options) => (options.client ?? client).patch
|
|
|
5468
5355
|
}
|
|
5469
5356
|
});
|
|
5470
5357
|
/**
|
|
5471
|
-
*
|
|
5358
|
+
* List canvases
|
|
5472
5359
|
*
|
|
5473
|
-
*
|
|
5360
|
+
* Discover canvases in the API key's organization and obtain ids for retrieval or editing. Results are ordered by updated_at from newest to oldest. limit is 1–100 and defaults to 50; omit cursor for the first page, then copy next_cursor into the next request until it is null. Deleted canvases are unavailable.
|
|
5474
5361
|
*/
|
|
5475
|
-
export const
|
|
5362
|
+
export const canvasListCanvases = (options) => (options?.client ?? client).get({
|
|
5476
5363
|
security: [{
|
|
5477
|
-
key: '
|
|
5364
|
+
key: 'canvas-bearerAuth',
|
|
5478
5365
|
scheme: 'bearer',
|
|
5479
5366
|
type: 'http'
|
|
5480
5367
|
}],
|
|
5481
|
-
url: '/
|
|
5368
|
+
url: '/canvas/v1/canvases',
|
|
5369
|
+
...options
|
|
5370
|
+
});
|
|
5371
|
+
/**
|
|
5372
|
+
* Create canvas
|
|
5373
|
+
*
|
|
5374
|
+
* Create a blank design canvas in the API key's organization before drawing with praxis.canvas.canvases.execute. Send an optional name of at most 200 characters; omitting name uses Untitled. Each successful call creates a new canvas and returns its id and viewer_url with HTTP 201; save the id for subsequent reads, edits and deletion.
|
|
5375
|
+
*/
|
|
5376
|
+
export const canvasCreateCanvas = (options) => (options?.client ?? client).post({
|
|
5377
|
+
security: [{
|
|
5378
|
+
key: 'canvas-bearerAuth',
|
|
5379
|
+
scheme: 'bearer',
|
|
5380
|
+
type: 'http'
|
|
5381
|
+
}],
|
|
5382
|
+
url: '/canvas/v1/canvases',
|
|
5482
5383
|
...options,
|
|
5483
5384
|
headers: {
|
|
5484
5385
|
'Content-Type': 'application/json',
|
|
5485
|
-
...options
|
|
5386
|
+
...options?.headers
|
|
5486
5387
|
}
|
|
5487
5388
|
});
|
|
5488
5389
|
/**
|
|
5489
|
-
* Delete
|
|
5390
|
+
* Delete canvas
|
|
5490
5391
|
*
|
|
5491
|
-
*
|
|
5392
|
+
* Permanently delete a canvas and its design content when it is no longer needed. Obtain canvas_id from create or list and confirm the target before calling; deletion cannot be undone. HTTP 200 confirms deletion with deleted=true. Subsequent access returns CANVAS_NOT_FOUND, as it does for a missing canvas or one outside the API key's organization.
|
|
5492
5393
|
*/
|
|
5493
|
-
export const
|
|
5394
|
+
export const canvasDeleteCanvas = (options) => (options.client ?? client).delete({
|
|
5494
5395
|
security: [{
|
|
5495
|
-
key: '
|
|
5396
|
+
key: 'canvas-bearerAuth',
|
|
5496
5397
|
scheme: 'bearer',
|
|
5497
5398
|
type: 'http'
|
|
5498
5399
|
}],
|
|
5499
|
-
url: '/
|
|
5400
|
+
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5500
5401
|
...options
|
|
5501
5402
|
});
|
|
5502
5403
|
/**
|
|
5503
|
-
*
|
|
5404
|
+
* Retrieve canvas
|
|
5504
5405
|
*
|
|
5505
|
-
*
|
|
5406
|
+
* Inspect the current canvas before editing, like Pencil get_app_state. The response adds top-level node summaries in canvas order and reusable component ids to the canvas metadata. Use these ids in nodes.list, images.list or an execute script; use the returned version as expected_version to detect concurrent edits. Read full node content with nodes.list rather than guessing fields from these summaries.
|
|
5506
5407
|
*/
|
|
5507
|
-
export const
|
|
5408
|
+
export const canvasRetrieveCanvas = (options) => (options.client ?? client).get({
|
|
5508
5409
|
security: [{
|
|
5509
|
-
key: '
|
|
5410
|
+
key: 'canvas-bearerAuth',
|
|
5510
5411
|
scheme: 'bearer',
|
|
5511
5412
|
type: 'http'
|
|
5512
5413
|
}],
|
|
5513
|
-
url: '/
|
|
5414
|
+
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5415
|
+
...options
|
|
5416
|
+
});
|
|
5417
|
+
/**
|
|
5418
|
+
* Update canvas
|
|
5419
|
+
*
|
|
5420
|
+
* Rename a canvas or move it to a collection without editing its design content. Use a canvas id from canvases.list and a collection id from collections.list. Send collection_id=null to make it uncategorized; omit either field to preserve its current value. A canvas belongs to at most one collection. The destination must belong to your organization. Renaming keeps the canvas version unchanged.
|
|
5421
|
+
*/
|
|
5422
|
+
export const canvasUpdateCanvas = (options) => (options.client ?? client).patch({
|
|
5423
|
+
security: [{
|
|
5424
|
+
key: 'BearerAuth',
|
|
5425
|
+
scheme: 'bearer',
|
|
5426
|
+
type: 'http'
|
|
5427
|
+
}, {
|
|
5428
|
+
key: 'ApiKeyAuth',
|
|
5429
|
+
name: 'X-API-Key',
|
|
5430
|
+
type: 'apiKey'
|
|
5431
|
+
}],
|
|
5432
|
+
url: '/canvas/v1/canvases/{canvas_id}',
|
|
5514
5433
|
...options,
|
|
5515
5434
|
headers: {
|
|
5516
5435
|
'Content-Type': 'application/json',
|
|
@@ -5518,73 +5437,107 @@ export const databaseUpdateField = (options) => (options.client ?? client).patch
|
|
|
5518
5437
|
}
|
|
5519
5438
|
});
|
|
5520
5439
|
/**
|
|
5521
|
-
*
|
|
5440
|
+
* Read canvas nodes
|
|
5522
5441
|
*
|
|
5523
|
-
* Read
|
|
5442
|
+
* Read node documents for inspection before changing individual nodes. Supply 1–100 comma-separated node ids from retrieve or execute, or instance paths such as a/b. depth is an integer at least 0; omit it for complete subtrees. Each requested id maps to a document wrapper or null if absent. Unlike Figma, document contains a Pencil .pen 2.21 node, not a Figma node. For top-level summaries use canvases.retrieve; for pixels use images.list.
|
|
5524
5443
|
*/
|
|
5525
|
-
export const
|
|
5444
|
+
export const canvasListNodes = (options) => (options.client ?? client).get({
|
|
5526
5445
|
security: [{
|
|
5527
|
-
key: '
|
|
5446
|
+
key: 'canvas-bearerAuth',
|
|
5528
5447
|
scheme: 'bearer',
|
|
5529
5448
|
type: 'http'
|
|
5530
5449
|
}],
|
|
5531
|
-
url: '/
|
|
5450
|
+
url: '/canvas/v1/canvases/{canvas_id}/nodes',
|
|
5532
5451
|
...options
|
|
5533
5452
|
});
|
|
5534
5453
|
/**
|
|
5535
|
-
*
|
|
5454
|
+
* Render canvas nodes
|
|
5536
5455
|
*
|
|
5537
|
-
*
|
|
5456
|
+
* Render 1–4 nodes to inspect the visual result of a design edit. Use ids from retrieve, execute.created or execute.screenshots; scale defaults to 1 and accepts 0.25–4, and png is the only supported format. Unlike Figma, images contains inline data:image/png;base64,... URLs, not hosted image URLs; a null entry means no image is available for that id. Use nodes.list for editable node content instead of pixels.
|
|
5538
5457
|
*/
|
|
5539
|
-
export const
|
|
5458
|
+
export const canvasListImages = (options) => (options.client ?? client).get({
|
|
5540
5459
|
security: [{
|
|
5541
|
-
key: '
|
|
5460
|
+
key: 'canvas-bearerAuth',
|
|
5542
5461
|
scheme: 'bearer',
|
|
5543
5462
|
type: 'http'
|
|
5544
5463
|
}],
|
|
5545
|
-
url: '/
|
|
5464
|
+
url: '/canvas/v1/canvases/{canvas_id}/images',
|
|
5546
5465
|
...options
|
|
5547
5466
|
});
|
|
5548
5467
|
/**
|
|
5549
|
-
*
|
|
5468
|
+
* Execute canvas script
|
|
5469
|
+
*
|
|
5470
|
+
* Draw or edit a canvas atomically with a synchronous Pencil execute script. First create a canvas with praxis.canvas.canvases.create and use its id as canvas_id; inspect an existing canvas with retrieve before modifying it. Send exactly one of script (new source) or edit_id (a failed script to patch using edits). Unlike Figma REST, :execute writes design content; nodes use Pencil .pen schema 2.21 (frame/group/rectangle/ellipse/polygon/path/text/icon/ref/note), not Figma node fields.
|
|
5471
|
+
*
|
|
5472
|
+
* The root variable is document. Synchronous functions are Insert / Copy / Update / Replace / Move / Delete / SetVariables / Get / GetVariables / FindEmptySpace / Print / TakeScreenshot; globals persist for the next call. A first frame needs only this body.script:
|
|
5473
|
+
*
|
|
5474
|
+
* ```js
|
|
5475
|
+
* const f = Insert(document, { type: "frame", name: "Hero", width: 1200, layout: "vertical", padding: 48, fill: "#FFFFFF" }); Insert(f, { type: "text", content: "Hello", fontSize: 32, fill: "#111111" }); Print(f)
|
|
5476
|
+
* ```
|
|
5477
|
+
*
|
|
5478
|
+
* Insert/Copy return the new node id; read the copy with Get(id) — copied descendants get new ids, so change them through Copy's third argument `descendants` keyed by the source node ids. To copy a page and change its title in the same script:
|
|
5479
|
+
*
|
|
5480
|
+
* ```js canvas-example="copy-page"
|
|
5481
|
+
* const page = Insert(document, {type:"frame",name:"Original",width:320,height:160,layout:"vertical",padding:16});
|
|
5482
|
+
* const title = Insert(page, {type:"text",name:"Title",content:"Original",fontSize:24});
|
|
5483
|
+
* const copy = Copy(page, document, {name:"Copy",x:360,descendants:{[title]:{content:"Updated"}}});
|
|
5484
|
+
* Print(copy); Print(Get(copy).children[0].content);
|
|
5485
|
+
* ```
|
|
5486
|
+
*
|
|
5487
|
+
* Use viewer_url to watch the result in Console. TakeScreenshot records node ids in screenshots; call images.list with those ids to fetch PNG data URLs. See the [Canvas execute reference](https://deepraxis.com/en/docs/api/native/canvas/execute) for request fields and results, and the [Canvas node reference](https://deepraxis.com/en/docs/developers/canvas/nodes) for node content.
|
|
5488
|
+
*
|
|
5489
|
+
* A successful write increments version by one. Optionally set expected_version to the version from retrieve or nodes.list; on 409 REVISION_CONFLICT read again, merge your intent and retry with the current version. Every script failure rolls back all writes. On 400 SCRIPT_ERROR, SCRIPT_LIMIT or OPS_REJECTED, use error.details.edit_id plus edits to repair and rerun the stored source without resending the entire script; details may include line, column and rejection. On 400 EDIT_EXPIRED the saved script is older than ten minutes: submit a corrected new script. On 429 CANVAS_BUSY, more than four calls are queued for this canvas: wait for pending calls before retrying.
|
|
5490
|
+
*
|
|
5491
|
+
* Execution errors include error.details.prints containing output printed before failure, with the same string-array shape and output limit as successful prints; rolled-back writes still create no version.
|
|
5550
5492
|
*
|
|
5551
|
-
* 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.
|
|
5552
5493
|
*/
|
|
5553
|
-
export const
|
|
5494
|
+
export const canvasExecute = (options) => (options.client ?? client).post({
|
|
5554
5495
|
security: [{
|
|
5555
|
-
key: '
|
|
5496
|
+
key: 'canvas-bearerAuth',
|
|
5556
5497
|
scheme: 'bearer',
|
|
5557
5498
|
type: 'http'
|
|
5558
5499
|
}],
|
|
5559
|
-
url: '/
|
|
5560
|
-
...options
|
|
5500
|
+
url: '/canvas/v1/canvases/{canvas_id}:execute',
|
|
5501
|
+
...options,
|
|
5502
|
+
headers: {
|
|
5503
|
+
'Content-Type': 'application/json',
|
|
5504
|
+
...options.headers
|
|
5505
|
+
}
|
|
5561
5506
|
});
|
|
5562
5507
|
/**
|
|
5563
|
-
*
|
|
5508
|
+
* List collections
|
|
5564
5509
|
*
|
|
5565
|
-
*
|
|
5510
|
+
* Find collections and ids for filtering or moving canvases. All organization collections are returned in name order in one response; next_cursor is always null. canvas_count excludes deleted canvases. total_count counts all live canvases, rather than collections, and uncategorized_count counts live canvases without a collection. Use canvases.list with collection_id to read a collection or none to read uncategorized canvases.
|
|
5566
5511
|
*/
|
|
5567
|
-
export const
|
|
5512
|
+
export const canvasListCollections = (options) => (options?.client ?? client).get({
|
|
5568
5513
|
security: [{
|
|
5569
|
-
key: '
|
|
5514
|
+
key: 'BearerAuth',
|
|
5570
5515
|
scheme: 'bearer',
|
|
5571
5516
|
type: 'http'
|
|
5517
|
+
}, {
|
|
5518
|
+
key: 'ApiKeyAuth',
|
|
5519
|
+
name: 'X-API-Key',
|
|
5520
|
+
type: 'apiKey'
|
|
5572
5521
|
}],
|
|
5573
|
-
url: '/
|
|
5522
|
+
url: '/canvas/v1/collections',
|
|
5574
5523
|
...options
|
|
5575
5524
|
});
|
|
5576
5525
|
/**
|
|
5577
|
-
*
|
|
5526
|
+
* Create collection
|
|
5578
5527
|
*
|
|
5579
|
-
*
|
|
5528
|
+
* Organize canvases by creating a one-level collection in your organization. Send a name of 1–100 characters after trimming; duplicate names are allowed. Each call creates a new collection, initially containing no canvases. Use canvases.update with its id as collection_id to move existing canvases into it. Collections cannot be nested and an organization can have at most 200.
|
|
5580
5529
|
*/
|
|
5581
|
-
export const
|
|
5530
|
+
export const canvasCreateCollection = (options) => (options.client ?? client).post({
|
|
5582
5531
|
security: [{
|
|
5583
|
-
key: '
|
|
5532
|
+
key: 'BearerAuth',
|
|
5584
5533
|
scheme: 'bearer',
|
|
5585
5534
|
type: 'http'
|
|
5535
|
+
}, {
|
|
5536
|
+
key: 'ApiKeyAuth',
|
|
5537
|
+
name: 'X-API-Key',
|
|
5538
|
+
type: 'apiKey'
|
|
5586
5539
|
}],
|
|
5587
|
-
url: '/
|
|
5540
|
+
url: '/canvas/v1/collections',
|
|
5588
5541
|
...options,
|
|
5589
5542
|
headers: {
|
|
5590
5543
|
'Content-Type': 'application/json',
|
|
@@ -5592,51 +5545,57 @@ export const databaseUpdate = (options) => (options.client ?? client).patch({
|
|
|
5592
5545
|
}
|
|
5593
5546
|
});
|
|
5594
5547
|
/**
|
|
5595
|
-
*
|
|
5548
|
+
* Delete collection
|
|
5596
5549
|
*
|
|
5597
|
-
*
|
|
5598
|
-
* Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
5599
|
-
* The 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.
|
|
5550
|
+
* Remove a collection using an id from collections.list. All its canvases are preserved and become uncategorized, with collection_id set to null; read them using canvases.list with collection_id=none. The removed collection cannot be retrieved again, and repeating deletion returns COLLECTION_NOT_FOUND.
|
|
5600
5551
|
*/
|
|
5601
|
-
export const
|
|
5552
|
+
export const canvasDeleteCollection = (options) => (options.client ?? client).delete({
|
|
5602
5553
|
security: [{
|
|
5603
|
-
key: '
|
|
5554
|
+
key: 'BearerAuth',
|
|
5604
5555
|
scheme: 'bearer',
|
|
5605
5556
|
type: 'http'
|
|
5557
|
+
}, {
|
|
5558
|
+
key: 'ApiKeyAuth',
|
|
5559
|
+
name: 'X-API-Key',
|
|
5560
|
+
type: 'apiKey'
|
|
5606
5561
|
}],
|
|
5607
|
-
url: '/
|
|
5608
|
-
...options
|
|
5609
|
-
headers: {
|
|
5610
|
-
'Content-Type': 'application/json',
|
|
5611
|
-
...options.headers
|
|
5612
|
-
}
|
|
5562
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5563
|
+
...options
|
|
5613
5564
|
});
|
|
5614
5565
|
/**
|
|
5615
|
-
*
|
|
5566
|
+
* Retrieve collection
|
|
5616
5567
|
*
|
|
5617
|
-
*
|
|
5568
|
+
* Inspect one collection and its current live canvas count using an id from collections.list or collections.create. The collection must belong to the API key organization. To read its canvases, pass the same id as collection_id to canvases.list; this response contains collection metadata only.
|
|
5618
5569
|
*/
|
|
5619
|
-
export const
|
|
5570
|
+
export const canvasRetrieveCollection = (options) => (options.client ?? client).get({
|
|
5620
5571
|
security: [{
|
|
5621
|
-
key: '
|
|
5572
|
+
key: 'BearerAuth',
|
|
5622
5573
|
scheme: 'bearer',
|
|
5623
5574
|
type: 'http'
|
|
5575
|
+
}, {
|
|
5576
|
+
key: 'ApiKeyAuth',
|
|
5577
|
+
name: 'X-API-Key',
|
|
5578
|
+
type: 'apiKey'
|
|
5624
5579
|
}],
|
|
5625
|
-
url: '/
|
|
5580
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5626
5581
|
...options
|
|
5627
5582
|
});
|
|
5628
5583
|
/**
|
|
5629
|
-
*
|
|
5584
|
+
* Rename collection
|
|
5630
5585
|
*
|
|
5631
|
-
*
|
|
5586
|
+
* Change the display name of a collection from collections.list without changing its id or canvas assignments. Names contain 1–100 characters after trimming and may match another collection name. This operation does not move canvases; use canvases.update with collection_id for that.
|
|
5632
5587
|
*/
|
|
5633
|
-
export const
|
|
5588
|
+
export const canvasUpdateCollection = (options) => (options.client ?? client).patch({
|
|
5634
5589
|
security: [{
|
|
5635
|
-
key: '
|
|
5590
|
+
key: 'BearerAuth',
|
|
5636
5591
|
scheme: 'bearer',
|
|
5637
5592
|
type: 'http'
|
|
5593
|
+
}, {
|
|
5594
|
+
key: 'ApiKeyAuth',
|
|
5595
|
+
name: 'X-API-Key',
|
|
5596
|
+
type: 'apiKey'
|
|
5638
5597
|
}],
|
|
5639
|
-
url: '/
|
|
5598
|
+
url: '/canvas/v1/collections/{collection_id}',
|
|
5640
5599
|
...options,
|
|
5641
5600
|
headers: {
|
|
5642
5601
|
'Content-Type': 'application/json',
|
|
@@ -5644,63 +5603,76 @@ export const knowledgeCreateVectorStore = (options) => (options.client ?? client
|
|
|
5644
5603
|
}
|
|
5645
5604
|
});
|
|
5646
5605
|
/**
|
|
5647
|
-
*
|
|
5606
|
+
* List canvas versions
|
|
5648
5607
|
*
|
|
5649
|
-
*
|
|
5608
|
+
* Inspect retained edits before restoring a canvas or reading historical nodes and images. Supply a canvas_id from canvases.list or create. Results include successful execute, import and restore commits since history was enabled, newest first. limit is 1–100 and defaults to 30; pass next_cursor as cursor until it is null. All versions from the last 30 days are retained unless the 256 MiB history budget requires pruning; the newest 100 versions are always retained regardless of age or size. earliest_restorable_version is the oldest readable and restorable version, including the state immediately before the first retained commit; null means no history has been recorded. Listing does not change the canvas.
|
|
5650
5609
|
*/
|
|
5651
|
-
export const
|
|
5610
|
+
export const canvasListVersions = (options) => (options.client ?? client).get({
|
|
5652
5611
|
security: [{
|
|
5653
|
-
key: '
|
|
5612
|
+
key: 'BearerAuth',
|
|
5654
5613
|
scheme: 'bearer',
|
|
5655
5614
|
type: 'http'
|
|
5615
|
+
}, {
|
|
5616
|
+
key: 'ApiKeyAuth',
|
|
5617
|
+
name: 'X-API-Key',
|
|
5618
|
+
type: 'apiKey'
|
|
5656
5619
|
}],
|
|
5657
|
-
url: '/
|
|
5620
|
+
url: '/canvas/v1/canvases/{canvas_id}/versions',
|
|
5658
5621
|
...options
|
|
5659
5622
|
});
|
|
5660
5623
|
/**
|
|
5661
|
-
*
|
|
5624
|
+
* Restore canvas version
|
|
5662
5625
|
*
|
|
5663
|
-
*
|
|
5626
|
+
* Recover a canvas after an unwanted edit by restoring a retained version from versions.list or its earliest_restorable_version. This replaces current nodes, variables and themes with the target state and creates one new version; history remains available, so restoring can itself be undone with another restore. Restoring the current version succeeds without creating a version. Optionally guard the write with expected_version from retrieve or nodes.list; if it is stale, inspect current state and retry with the new value. Repeating an unguarded request after another edit can create another restore version. Versions from before history was enabled or outside retention cannot be recovered. Connected viewers resync after a successful restore.
|
|
5664
5627
|
*/
|
|
5665
|
-
export const
|
|
5628
|
+
export const canvasRestoreCanvas = (options) => (options.client ?? client).post({
|
|
5666
5629
|
security: [{
|
|
5667
|
-
key: '
|
|
5630
|
+
key: 'BearerAuth',
|
|
5668
5631
|
scheme: 'bearer',
|
|
5669
5632
|
type: 'http'
|
|
5633
|
+
}, {
|
|
5634
|
+
key: 'ApiKeyAuth',
|
|
5635
|
+
name: 'X-API-Key',
|
|
5636
|
+
type: 'apiKey'
|
|
5670
5637
|
}],
|
|
5671
|
-
url: '/
|
|
5672
|
-
...options
|
|
5638
|
+
url: '/canvas/v1/canvases/{canvas_id}:restore',
|
|
5639
|
+
...options,
|
|
5640
|
+
headers: {
|
|
5641
|
+
'Content-Type': 'application/json',
|
|
5642
|
+
...options.headers
|
|
5643
|
+
}
|
|
5673
5644
|
});
|
|
5674
5645
|
/**
|
|
5675
|
-
*
|
|
5646
|
+
* List records
|
|
5676
5647
|
*
|
|
5677
|
-
*
|
|
5648
|
+
* Browse records of one object type and obtain ids for retrieval or edits. Discover objectType with schemas.list; select properties by internal names from properties.list. Omit after for the first page, then copy paging.next.after until no next page is returned. archived defaults to false; use objects.search for property filters.
|
|
5678
5649
|
*/
|
|
5679
|
-
export const
|
|
5650
|
+
export const crmObjectsList = (options) => (options.client ?? client).get({
|
|
5651
|
+
querySerializer: { parameters: {
|
|
5652
|
+
associations: { array: { explode: false } },
|
|
5653
|
+
properties: { array: { explode: false } },
|
|
5654
|
+
propertiesWithHistory: { array: { explode: false } }
|
|
5655
|
+
} },
|
|
5680
5656
|
security: [{
|
|
5681
|
-
key: '
|
|
5657
|
+
key: 'crm-bearerAuth',
|
|
5682
5658
|
scheme: 'bearer',
|
|
5683
5659
|
type: 'http'
|
|
5684
5660
|
}],
|
|
5685
|
-
url: '/
|
|
5686
|
-
...options
|
|
5687
|
-
headers: {
|
|
5688
|
-
'Content-Type': 'application/json',
|
|
5689
|
-
...options.headers
|
|
5690
|
-
}
|
|
5661
|
+
url: '/crm/v1/objects/{objectType}',
|
|
5662
|
+
...options
|
|
5691
5663
|
});
|
|
5692
5664
|
/**
|
|
5693
|
-
*
|
|
5665
|
+
* Create record
|
|
5694
5666
|
*
|
|
5695
|
-
*
|
|
5667
|
+
* Create a customer record with property values and optional initial associations. Discover objectType with schemas.list and allowed property names with properties.list; save the returned id for subsequent calls. Each call creates a record. Example for contacts: {"properties":{"email":"person@example.com"}}. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
5696
5668
|
*/
|
|
5697
|
-
export const
|
|
5669
|
+
export const crmObjectsCreate = (options) => (options.client ?? client).post({
|
|
5698
5670
|
security: [{
|
|
5699
|
-
key: '
|
|
5671
|
+
key: 'crm-bearerAuth',
|
|
5700
5672
|
scheme: 'bearer',
|
|
5701
5673
|
type: 'http'
|
|
5702
5674
|
}],
|
|
5703
|
-
url: '/
|
|
5675
|
+
url: '/crm/v1/objects/{objectType}',
|
|
5704
5676
|
...options,
|
|
5705
5677
|
headers: {
|
|
5706
5678
|
'Content-Type': 'application/json',
|
|
@@ -5708,77 +5680,86 @@ export const knowledgeSearchVectorStore = (options) => (options.client ?? client
|
|
|
5708
5680
|
}
|
|
5709
5681
|
});
|
|
5710
5682
|
/**
|
|
5711
|
-
*
|
|
5683
|
+
* Archive record
|
|
5712
5684
|
*
|
|
5713
|
-
*
|
|
5685
|
+
* Archive a record selected from objects.list or objects.search when it should leave active results. This removes it from normal lists without deleting its history; archived=true can be used to read archived records. Confirm objectType and objectId before calling. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
|
|
5714
5686
|
*/
|
|
5715
|
-
export const
|
|
5687
|
+
export const crmObjectsArchive = (options) => (options.client ?? client).delete({
|
|
5716
5688
|
security: [{
|
|
5717
|
-
key: '
|
|
5689
|
+
key: 'crm-bearerAuth',
|
|
5718
5690
|
scheme: 'bearer',
|
|
5719
5691
|
type: 'http'
|
|
5720
5692
|
}],
|
|
5721
|
-
url: '/
|
|
5693
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
5722
5694
|
...options
|
|
5723
5695
|
});
|
|
5724
5696
|
/**
|
|
5725
|
-
*
|
|
5697
|
+
* Retrieve record
|
|
5726
5698
|
*
|
|
5727
|
-
*
|
|
5699
|
+
* Read one record by id from objects.list, objects.search or objects.create. Select property names with properties and associated object types with associations; use idProperty only when objectId is a value of that unique property. Use archived=true to inspect an archived record.
|
|
5728
5700
|
*/
|
|
5729
|
-
export const
|
|
5701
|
+
export const crmObjectsRetrieve = (options) => (options.client ?? client).get({
|
|
5702
|
+
querySerializer: { parameters: {
|
|
5703
|
+
associations: { array: { explode: false } },
|
|
5704
|
+
properties: { array: { explode: false } },
|
|
5705
|
+
propertiesWithHistory: { array: { explode: false } }
|
|
5706
|
+
} },
|
|
5730
5707
|
security: [{
|
|
5731
|
-
key: '
|
|
5708
|
+
key: 'crm-bearerAuth',
|
|
5732
5709
|
scheme: 'bearer',
|
|
5733
5710
|
type: 'http'
|
|
5734
5711
|
}],
|
|
5735
|
-
url: '/
|
|
5736
|
-
...options
|
|
5737
|
-
headers: {
|
|
5738
|
-
'Content-Type': 'application/json',
|
|
5739
|
-
...options.headers
|
|
5740
|
-
}
|
|
5712
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
5713
|
+
...options
|
|
5741
5714
|
});
|
|
5742
5715
|
/**
|
|
5743
|
-
*
|
|
5716
|
+
* Update record
|
|
5744
5717
|
*
|
|
5745
|
-
*
|
|
5718
|
+
* Change only the supplied properties of a record selected from objects.list or objects.search. Omitted properties retain their values. Use property names from properties.list and valid stage ids from pipelines.retrieve. Stage-entry requirements must be satisfied by the resulting record; inspect 400 errors before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
5746
5719
|
*/
|
|
5747
|
-
export const
|
|
5720
|
+
export const crmObjectsUpdate = (options) => (options.client ?? client).patch({
|
|
5748
5721
|
security: [{
|
|
5749
|
-
key: '
|
|
5722
|
+
key: 'crm-bearerAuth',
|
|
5750
5723
|
scheme: 'bearer',
|
|
5751
5724
|
type: 'http'
|
|
5752
5725
|
}],
|
|
5753
|
-
url: '/
|
|
5754
|
-
...options
|
|
5726
|
+
url: '/crm/v1/objects/{objectType}/{objectId}',
|
|
5727
|
+
...options,
|
|
5728
|
+
headers: {
|
|
5729
|
+
'Content-Type': 'application/json',
|
|
5730
|
+
...options.headers
|
|
5731
|
+
}
|
|
5755
5732
|
});
|
|
5756
5733
|
/**
|
|
5757
|
-
*
|
|
5734
|
+
* Search records
|
|
5758
5735
|
*
|
|
5759
|
-
*
|
|
5736
|
+
* Find records using text query, property filters and sort order rather than scanning a list. Obtain objectType from schemas.list and filter propertyName values from properties.list. Supply filterGroups, sorts, properties, limit and after; use empty arrays for no filters, sorts or property selection, and an empty after for the first page. Copy paging.next.after with the same query to continue. This operation reads records without changing them.
|
|
5760
5737
|
*/
|
|
5761
|
-
export const
|
|
5738
|
+
export const crmObjectsSearch = (options) => (options.client ?? client).post({
|
|
5762
5739
|
security: [{
|
|
5763
|
-
key: '
|
|
5740
|
+
key: 'crm-bearerAuth',
|
|
5764
5741
|
scheme: 'bearer',
|
|
5765
5742
|
type: 'http'
|
|
5766
5743
|
}],
|
|
5767
|
-
url: '/
|
|
5768
|
-
...options
|
|
5744
|
+
url: '/crm/v1/objects/{objectType}/search',
|
|
5745
|
+
...options,
|
|
5746
|
+
headers: {
|
|
5747
|
+
'Content-Type': 'application/json',
|
|
5748
|
+
...options.headers
|
|
5749
|
+
}
|
|
5769
5750
|
});
|
|
5770
5751
|
/**
|
|
5771
|
-
*
|
|
5752
|
+
* Batch read records
|
|
5772
5753
|
*
|
|
5773
|
-
*
|
|
5754
|
+
* Read a set of known record ids in one call; use objects.search to discover ids first. Supply inputs with ids plus requested properties; set idProperty only when the inputs use unique-property values rather than record ids.
|
|
5774
5755
|
*/
|
|
5775
|
-
export const
|
|
5756
|
+
export const crmObjectsBatchRead = (options) => (options.client ?? client).post({
|
|
5776
5757
|
security: [{
|
|
5777
|
-
key: '
|
|
5758
|
+
key: 'crm-bearerAuth',
|
|
5778
5759
|
scheme: 'bearer',
|
|
5779
5760
|
type: 'http'
|
|
5780
5761
|
}],
|
|
5781
|
-
url: '/
|
|
5762
|
+
url: '/crm/v1/objects/{objectType}/batch/read',
|
|
5782
5763
|
...options,
|
|
5783
5764
|
headers: {
|
|
5784
5765
|
'Content-Type': 'application/json',
|
|
@@ -5786,31 +5767,35 @@ export const knowledgeUpdateFile = (options) => (options.client ?? client).post(
|
|
|
5786
5767
|
}
|
|
5787
5768
|
});
|
|
5788
5769
|
/**
|
|
5789
|
-
*
|
|
5770
|
+
* Batch create records
|
|
5790
5771
|
*
|
|
5791
|
-
*
|
|
5772
|
+
* Create several records of one object type using inputs with properties and optional associations. Obtain property names from properties.list; each successful input creates a record, so inspect per-item errors before resubmitting failed inputs. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
5792
5773
|
*/
|
|
5793
|
-
export const
|
|
5774
|
+
export const crmObjectsBatchCreate = (options) => (options.client ?? client).post({
|
|
5794
5775
|
security: [{
|
|
5795
|
-
key: '
|
|
5776
|
+
key: 'crm-bearerAuth',
|
|
5796
5777
|
scheme: 'bearer',
|
|
5797
5778
|
type: 'http'
|
|
5798
5779
|
}],
|
|
5799
|
-
url: '/
|
|
5800
|
-
...options
|
|
5780
|
+
url: '/crm/v1/objects/{objectType}/batch/create',
|
|
5781
|
+
...options,
|
|
5782
|
+
headers: {
|
|
5783
|
+
'Content-Type': 'application/json',
|
|
5784
|
+
...options.headers
|
|
5785
|
+
}
|
|
5801
5786
|
});
|
|
5802
5787
|
/**
|
|
5803
|
-
*
|
|
5788
|
+
* Batch update records
|
|
5804
5789
|
*
|
|
5805
|
-
*
|
|
5790
|
+
* Apply distinct property patches to existing records identified by inputs[].id. Obtain ids from objects.list or objects.search and property names from properties.list. Omitted properties retain their values; inspect results and errors for each input. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
5806
5791
|
*/
|
|
5807
|
-
export const
|
|
5792
|
+
export const crmObjectsBatchUpdate = (options) => (options.client ?? client).post({
|
|
5808
5793
|
security: [{
|
|
5809
|
-
key: '
|
|
5794
|
+
key: 'crm-bearerAuth',
|
|
5810
5795
|
scheme: 'bearer',
|
|
5811
5796
|
type: 'http'
|
|
5812
5797
|
}],
|
|
5813
|
-
url: '/
|
|
5798
|
+
url: '/crm/v1/objects/{objectType}/batch/update',
|
|
5814
5799
|
...options,
|
|
5815
5800
|
headers: {
|
|
5816
5801
|
'Content-Type': 'application/json',
|
|
@@ -5818,157 +5803,177 @@ export const knowledgeCreateFileBatch = (options) => (options.client ?? client).
|
|
|
5818
5803
|
}
|
|
5819
5804
|
});
|
|
5820
5805
|
/**
|
|
5821
|
-
*
|
|
5806
|
+
* Batch upsert records
|
|
5822
5807
|
*
|
|
5823
|
-
*
|
|
5808
|
+
* Create records that do not yet exist or update matches using a unique property. Provide idProperty and its value in each input, plus properties; choose a property with hasUniqueValue from properties.list. Inspect each result to determine whether it was newly created. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
5824
5809
|
*/
|
|
5825
|
-
export const
|
|
5810
|
+
export const crmObjectsBatchUpsert = (options) => (options.client ?? client).post({
|
|
5826
5811
|
security: [{
|
|
5827
|
-
key: '
|
|
5812
|
+
key: 'crm-bearerAuth',
|
|
5828
5813
|
scheme: 'bearer',
|
|
5829
5814
|
type: 'http'
|
|
5830
5815
|
}],
|
|
5831
|
-
url: '/
|
|
5832
|
-
...options
|
|
5816
|
+
url: '/crm/v1/objects/{objectType}/batch/upsert',
|
|
5817
|
+
...options,
|
|
5818
|
+
headers: {
|
|
5819
|
+
'Content-Type': 'application/json',
|
|
5820
|
+
...options.headers
|
|
5821
|
+
}
|
|
5833
5822
|
});
|
|
5834
5823
|
/**
|
|
5835
|
-
*
|
|
5824
|
+
* Batch archive records
|
|
5836
5825
|
*
|
|
5837
|
-
*
|
|
5826
|
+
* Archive known records of one object type using inputs[].id from objects.list or objects.search. Archived records leave active lists but retain their history; confirm all ids before calling. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
|
|
5838
5827
|
*/
|
|
5839
|
-
export const
|
|
5828
|
+
export const crmObjectsBatchArchive = (options) => (options.client ?? client).post({
|
|
5840
5829
|
security: [{
|
|
5841
|
-
key: '
|
|
5830
|
+
key: 'crm-bearerAuth',
|
|
5842
5831
|
scheme: 'bearer',
|
|
5843
5832
|
type: 'http'
|
|
5844
5833
|
}],
|
|
5845
|
-
url: '/
|
|
5846
|
-
...options
|
|
5834
|
+
url: '/crm/v1/objects/{objectType}/batch/archive',
|
|
5835
|
+
...options,
|
|
5836
|
+
headers: {
|
|
5837
|
+
'Content-Type': 'application/json',
|
|
5838
|
+
...options.headers
|
|
5839
|
+
}
|
|
5847
5840
|
});
|
|
5848
5841
|
/**
|
|
5849
|
-
* List
|
|
5842
|
+
* List properties
|
|
5850
5843
|
*
|
|
5851
|
-
*
|
|
5844
|
+
* Inspect the property definitions available for an object type before writing or filtering records. Obtain objectType from schemas.list; reuse each immutable name in record properties and filters. archived defaults to false.
|
|
5852
5845
|
*/
|
|
5853
|
-
export const
|
|
5846
|
+
export const crmPropertiesList = (options) => (options.client ?? client).get({
|
|
5854
5847
|
security: [{
|
|
5855
|
-
key: '
|
|
5848
|
+
key: 'crm-bearerAuth',
|
|
5856
5849
|
scheme: 'bearer',
|
|
5857
5850
|
type: 'http'
|
|
5858
5851
|
}],
|
|
5859
|
-
url: '/
|
|
5852
|
+
url: '/crm/v1/properties/{objectType}',
|
|
5860
5853
|
...options
|
|
5861
5854
|
});
|
|
5862
5855
|
/**
|
|
5863
|
-
*
|
|
5856
|
+
* Create property
|
|
5864
5857
|
*
|
|
5865
|
-
*
|
|
5858
|
+
* Define a property before setting its values on records. Choose objectType from schemas.list and groupName from properties.groups.list; provide an immutable internal name, display label, type and fieldType. Enumeration properties require their valid options. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
5866
5859
|
*/
|
|
5867
|
-
export const
|
|
5860
|
+
export const crmPropertiesCreate = (options) => (options.client ?? client).post({
|
|
5868
5861
|
security: [{
|
|
5869
|
-
key: '
|
|
5862
|
+
key: 'crm-bearerAuth',
|
|
5870
5863
|
scheme: 'bearer',
|
|
5871
5864
|
type: 'http'
|
|
5872
5865
|
}],
|
|
5873
|
-
url: '/
|
|
5874
|
-
...options
|
|
5866
|
+
url: '/crm/v1/properties/{objectType}',
|
|
5867
|
+
...options,
|
|
5868
|
+
headers: {
|
|
5869
|
+
'Content-Type': 'application/json',
|
|
5870
|
+
...options.headers
|
|
5871
|
+
}
|
|
5875
5872
|
});
|
|
5876
5873
|
/**
|
|
5877
|
-
*
|
|
5874
|
+
* Archive property
|
|
5878
5875
|
*
|
|
5879
|
-
*
|
|
5876
|
+
* Archive a property definition selected by internal name from properties.list. Confirm that record entry and search flows no longer depend on it; archived definitions are excluded from normal property lists. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
|
|
5880
5877
|
*/
|
|
5881
|
-
export const
|
|
5878
|
+
export const crmPropertiesArchive = (options) => (options.client ?? client).delete({
|
|
5882
5879
|
security: [{
|
|
5883
|
-
key: '
|
|
5880
|
+
key: 'crm-bearerAuth',
|
|
5884
5881
|
scheme: 'bearer',
|
|
5885
5882
|
type: 'http'
|
|
5886
5883
|
}],
|
|
5887
|
-
url: '/
|
|
5884
|
+
url: '/crm/v1/properties/{objectType}/{propertyName}',
|
|
5888
5885
|
...options
|
|
5889
5886
|
});
|
|
5890
5887
|
/**
|
|
5891
|
-
*
|
|
5888
|
+
* Retrieve property
|
|
5892
5889
|
*
|
|
5893
|
-
*
|
|
5890
|
+
* Inspect the type, options and modification restrictions of a property before changing its definition or record values. Obtain propertyName from properties.list; it is the immutable internal name rather than the label.
|
|
5894
5891
|
*/
|
|
5895
|
-
export const
|
|
5892
|
+
export const crmPropertiesRetrieve = (options) => (options.client ?? client).get({
|
|
5896
5893
|
security: [{
|
|
5897
|
-
key: '
|
|
5894
|
+
key: 'crm-bearerAuth',
|
|
5898
5895
|
scheme: 'bearer',
|
|
5899
5896
|
type: 'http'
|
|
5900
5897
|
}],
|
|
5901
|
-
url: '/
|
|
5898
|
+
url: '/crm/v1/properties/{objectType}/{propertyName}',
|
|
5902
5899
|
...options
|
|
5903
5900
|
});
|
|
5904
5901
|
/**
|
|
5905
|
-
*
|
|
5902
|
+
* Update property
|
|
5906
5903
|
*
|
|
5907
|
-
*
|
|
5904
|
+
* Change editable settings of a property selected from properties.list, such as its label, group or options. Preserve the immutable internal name; inspect modificationMetadata before editing system-managed definitions. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
5908
5905
|
*/
|
|
5909
|
-
export const
|
|
5906
|
+
export const crmPropertiesUpdate = (options) => (options.client ?? client).patch({
|
|
5910
5907
|
security: [{
|
|
5911
|
-
key: '
|
|
5908
|
+
key: 'crm-bearerAuth',
|
|
5912
5909
|
scheme: 'bearer',
|
|
5913
5910
|
type: 'http'
|
|
5914
5911
|
}],
|
|
5915
|
-
url: '/
|
|
5916
|
-
...options
|
|
5912
|
+
url: '/crm/v1/properties/{objectType}/{propertyName}',
|
|
5913
|
+
...options,
|
|
5914
|
+
headers: {
|
|
5915
|
+
'Content-Type': 'application/json',
|
|
5916
|
+
...options.headers
|
|
5917
|
+
}
|
|
5917
5918
|
});
|
|
5918
5919
|
/**
|
|
5919
|
-
*
|
|
5920
|
+
* List property groups
|
|
5920
5921
|
*
|
|
5921
|
-
*
|
|
5922
|
+
* Discover property groups for an object type before creating or organizing property definitions. Obtain objectType from schemas.list and reuse a group name as groupName in properties.create or properties.update.
|
|
5922
5923
|
*/
|
|
5923
|
-
export const
|
|
5924
|
+
export const crmPropertiesGroupsList = (options) => (options.client ?? client).get({
|
|
5924
5925
|
security: [{
|
|
5925
|
-
key: '
|
|
5926
|
+
key: 'crm-bearerAuth',
|
|
5926
5927
|
scheme: 'bearer',
|
|
5927
5928
|
type: 'http'
|
|
5928
5929
|
}],
|
|
5929
|
-
url: '/
|
|
5930
|
+
url: '/crm/v1/properties/{objectType}/groups',
|
|
5930
5931
|
...options
|
|
5931
5932
|
});
|
|
5932
5933
|
/**
|
|
5933
|
-
*
|
|
5934
|
+
* Create property group
|
|
5934
5935
|
*
|
|
5935
|
-
*
|
|
5936
|
+
* Create a named group for related property definitions of one object type. Obtain objectType from schemas.list; choose a unique internal name and display label, then reuse the returned name as groupName when creating properties. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
5936
5937
|
*/
|
|
5937
|
-
export const
|
|
5938
|
+
export const crmPropertiesGroupsCreate = (options) => (options.client ?? client).post({
|
|
5938
5939
|
security: [{
|
|
5939
|
-
key: '
|
|
5940
|
+
key: 'crm-bearerAuth',
|
|
5940
5941
|
scheme: 'bearer',
|
|
5941
5942
|
type: 'http'
|
|
5942
5943
|
}],
|
|
5943
|
-
url: '/
|
|
5944
|
-
...options
|
|
5944
|
+
url: '/crm/v1/properties/{objectType}/groups',
|
|
5945
|
+
...options,
|
|
5946
|
+
headers: {
|
|
5947
|
+
'Content-Type': 'application/json',
|
|
5948
|
+
...options.headers
|
|
5949
|
+
}
|
|
5945
5950
|
});
|
|
5946
5951
|
/**
|
|
5947
|
-
* List
|
|
5952
|
+
* List pipelines
|
|
5948
5953
|
*
|
|
5949
|
-
*
|
|
5954
|
+
* Discover pipelines and stage ids for records of one object type from schemas.list. Reuse pipeline and stage ids in record property updates or lead qualification. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
|
|
5950
5955
|
*/
|
|
5951
|
-
export const
|
|
5956
|
+
export const crmPipelinesList = (options) => (options.client ?? client).get({
|
|
5952
5957
|
security: [{
|
|
5953
|
-
key: '
|
|
5958
|
+
key: 'crm-bearerAuth',
|
|
5954
5959
|
scheme: 'bearer',
|
|
5955
5960
|
type: 'http'
|
|
5956
5961
|
}],
|
|
5957
|
-
url: '/
|
|
5962
|
+
url: '/crm/v1/pipelines/{objectType}',
|
|
5958
5963
|
...options
|
|
5959
5964
|
});
|
|
5960
5965
|
/**
|
|
5961
|
-
* Create
|
|
5966
|
+
* Create pipeline
|
|
5962
5967
|
*
|
|
5963
|
-
* Create a
|
|
5968
|
+
* Create a pipeline with its ordered stages for an object type from schemas.list. Provide a display label, displayOrder and initial stages, then use the returned ids when assigning records. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
|
|
5964
5969
|
*/
|
|
5965
|
-
export const
|
|
5970
|
+
export const crmPipelinesCreate = (options) => (options.client ?? client).post({
|
|
5966
5971
|
security: [{
|
|
5967
|
-
key: '
|
|
5972
|
+
key: 'crm-bearerAuth',
|
|
5968
5973
|
scheme: 'bearer',
|
|
5969
5974
|
type: 'http'
|
|
5970
5975
|
}],
|
|
5971
|
-
url: '/
|
|
5976
|
+
url: '/crm/v1/pipelines/{objectType}',
|
|
5972
5977
|
...options,
|
|
5973
5978
|
headers: {
|
|
5974
5979
|
'Content-Type': 'application/json',
|
|
@@ -5976,45 +5981,45 @@ export const mediaCreateLibrary = (options) => (options.client ?? client).post({
|
|
|
5976
5981
|
}
|
|
5977
5982
|
});
|
|
5978
5983
|
/**
|
|
5979
|
-
*
|
|
5984
|
+
* Archive pipeline
|
|
5980
5985
|
*
|
|
5981
|
-
*
|
|
5986
|
+
* Archive a pipeline selected from pipelines.list when records no longer depend on it. Check current records and stage usage first; resolve references reported by validation before retrying. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
|
|
5982
5987
|
*/
|
|
5983
|
-
export const
|
|
5988
|
+
export const crmPipelinesArchive = (options) => (options.client ?? client).delete({
|
|
5984
5989
|
security: [{
|
|
5985
|
-
key: '
|
|
5990
|
+
key: 'crm-bearerAuth',
|
|
5986
5991
|
scheme: 'bearer',
|
|
5987
5992
|
type: 'http'
|
|
5988
5993
|
}],
|
|
5989
|
-
url: '/
|
|
5994
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
|
|
5990
5995
|
...options
|
|
5991
5996
|
});
|
|
5992
5997
|
/**
|
|
5993
|
-
*
|
|
5998
|
+
* Retrieve pipeline
|
|
5994
5999
|
*
|
|
5995
|
-
*
|
|
6000
|
+
* Inspect the stage ids and metadata of a pipeline before moving a record or editing its workflow. Obtain pipelineId from pipelines.list and use the returned stages array to select a destination. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
|
|
5996
6001
|
*/
|
|
5997
|
-
export const
|
|
6002
|
+
export const crmPipelinesRetrieve = (options) => (options.client ?? client).get({
|
|
5998
6003
|
security: [{
|
|
5999
|
-
key: '
|
|
6004
|
+
key: 'crm-bearerAuth',
|
|
6000
6005
|
scheme: 'bearer',
|
|
6001
6006
|
type: 'http'
|
|
6002
6007
|
}],
|
|
6003
|
-
url: '/
|
|
6008
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
|
|
6004
6009
|
...options
|
|
6005
6010
|
});
|
|
6006
6011
|
/**
|
|
6007
|
-
* Update
|
|
6012
|
+
* Update pipeline
|
|
6008
6013
|
*
|
|
6009
|
-
*
|
|
6014
|
+
* Change editable pipeline settings selected by pipelineId from pipelines.list. Omit settings that should remain unchanged and inspect current stages with pipelines.retrieve before modifying the workflow. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
|
|
6010
6015
|
*/
|
|
6011
|
-
export const
|
|
6016
|
+
export const crmPipelinesUpdate = (options) => (options.client ?? client).patch({
|
|
6012
6017
|
security: [{
|
|
6013
|
-
key: '
|
|
6018
|
+
key: 'crm-bearerAuth',
|
|
6014
6019
|
scheme: 'bearer',
|
|
6015
6020
|
type: 'http'
|
|
6016
6021
|
}],
|
|
6017
|
-
url: '/
|
|
6022
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}',
|
|
6018
6023
|
...options,
|
|
6019
6024
|
headers: {
|
|
6020
6025
|
'Content-Type': 'application/json',
|
|
@@ -6022,77 +6027,95 @@ export const mediaUpdateLibrary = (options) => (options.client ?? client).patch(
|
|
|
6022
6027
|
}
|
|
6023
6028
|
});
|
|
6024
6029
|
/**
|
|
6025
|
-
*
|
|
6030
|
+
* Create pipeline stage
|
|
6026
6031
|
*
|
|
6027
|
-
*
|
|
6032
|
+
* Add an ordered stage to a pipeline from pipelines.list. Provide its display label, displayOrder and metadata; save the returned stage id for record updates. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
|
|
6028
6033
|
*/
|
|
6029
|
-
export const
|
|
6034
|
+
export const crmPipelinesStagesCreate = (options) => (options.client ?? client).post({
|
|
6030
6035
|
security: [{
|
|
6031
|
-
key: '
|
|
6036
|
+
key: 'crm-bearerAuth',
|
|
6032
6037
|
scheme: 'bearer',
|
|
6033
6038
|
type: 'http'
|
|
6034
6039
|
}],
|
|
6035
|
-
url: '/
|
|
6036
|
-
...options
|
|
6040
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages',
|
|
6041
|
+
...options,
|
|
6042
|
+
headers: {
|
|
6043
|
+
'Content-Type': 'application/json',
|
|
6044
|
+
...options.headers
|
|
6045
|
+
}
|
|
6037
6046
|
});
|
|
6038
6047
|
/**
|
|
6039
|
-
*
|
|
6048
|
+
* Archive pipeline stage
|
|
6040
6049
|
*
|
|
6041
|
-
*
|
|
6050
|
+
* Archive a stage selected from pipelines.retrieve after checking record usage. A stage that still has records cannot be archived without resolving their assignment; move those records to an allowed stage first. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
|
|
6042
6051
|
*/
|
|
6043
|
-
export const
|
|
6052
|
+
export const crmPipelinesStagesArchive = (options) => (options.client ?? client).delete({
|
|
6044
6053
|
security: [{
|
|
6045
|
-
key: '
|
|
6054
|
+
key: 'crm-bearerAuth',
|
|
6046
6055
|
scheme: 'bearer',
|
|
6047
6056
|
type: 'http'
|
|
6048
6057
|
}],
|
|
6049
|
-
url: '/
|
|
6058
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
|
|
6050
6059
|
...options
|
|
6051
6060
|
});
|
|
6052
6061
|
/**
|
|
6053
|
-
*
|
|
6062
|
+
* Update pipeline stage
|
|
6054
6063
|
*
|
|
6055
|
-
*
|
|
6064
|
+
* Change the label, order or metadata of a stage selected from pipelines.retrieve. Existing records must satisfy entry rules when subsequently moved; omitted settings retain their values. Stage rules are string values in stage.metadata: praxis_category is open (active), won (successful) or lost (unsuccessful); praxis_terminal is "true" (no further transition) or "false" (transitions allowed); praxis_allowed_next is a JSON-encoded array string of permitted next stage ids, with the string "null" meaning unrestricted; praxis_required is a JSON-encoded array string of property names ("[]" means none) that must be non-empty on entry (boolean properties must be "true"). Rule violations return HTTP 400 VALIDATION_ERROR; errors[0].context.properties lists missing required property names. Correct those values or choose an allowed stage before retrying. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Example metadata: {"praxis_category":"open","praxis_terminal":"false","praxis_allowed_next":"[\"proposal\",\"lost\"]","praxis_required":"[\"budget\",\"decision_maker\"]"}.
|
|
6056
6065
|
*/
|
|
6057
|
-
export const
|
|
6066
|
+
export const crmPipelinesStagesUpdate = (options) => (options.client ?? client).patch({
|
|
6058
6067
|
security: [{
|
|
6059
|
-
key: '
|
|
6068
|
+
key: 'crm-bearerAuth',
|
|
6060
6069
|
scheme: 'bearer',
|
|
6061
6070
|
type: 'http'
|
|
6062
6071
|
}],
|
|
6063
|
-
url: '/
|
|
6072
|
+
url: '/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}',
|
|
6073
|
+
...options,
|
|
6074
|
+
headers: {
|
|
6075
|
+
'Content-Type': 'application/json',
|
|
6076
|
+
...options.headers
|
|
6077
|
+
}
|
|
6078
|
+
});
|
|
6079
|
+
/**
|
|
6080
|
+
* List record associations
|
|
6081
|
+
*
|
|
6082
|
+
* Read records linked to a source record, including association labels and type ids. Obtain source and destination object types from schemas.list and objectId from objects.list or objects.search. Follow paging.next.after to continue reading associated records.
|
|
6083
|
+
*/
|
|
6084
|
+
export const crmAssociationsList = (options) => (options.client ?? client).get({
|
|
6085
|
+
security: [{
|
|
6086
|
+
key: 'crm-bearerAuth',
|
|
6087
|
+
scheme: 'bearer',
|
|
6088
|
+
type: 'http'
|
|
6089
|
+
}],
|
|
6090
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}',
|
|
6064
6091
|
...options
|
|
6065
6092
|
});
|
|
6066
6093
|
/**
|
|
6067
|
-
*
|
|
6094
|
+
* Remove association
|
|
6068
6095
|
*
|
|
6069
|
-
*
|
|
6096
|
+
* Remove the association between two existing records without archiving either record. Obtain the linked destination id from associations.list and confirm the source and destination object types before calling. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations. Unlike HubSpot, this own-face archive returns HTTP 200 with a JSON refs body instead of HTTP 204.
|
|
6070
6097
|
*/
|
|
6071
|
-
export const
|
|
6098
|
+
export const crmAssociationsRemove = (options) => (options.client ?? client).delete({
|
|
6072
6099
|
security: [{
|
|
6073
|
-
key: '
|
|
6100
|
+
key: 'crm-bearerAuth',
|
|
6074
6101
|
scheme: 'bearer',
|
|
6075
6102
|
type: 'http'
|
|
6076
6103
|
}],
|
|
6077
|
-
url: '/
|
|
6078
|
-
...options
|
|
6079
|
-
headers: {
|
|
6080
|
-
'Content-Type': 'application/json',
|
|
6081
|
-
...options.headers
|
|
6082
|
-
}
|
|
6104
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
|
|
6105
|
+
...options
|
|
6083
6106
|
});
|
|
6084
6107
|
/**
|
|
6085
|
-
*
|
|
6108
|
+
* Create labelled association
|
|
6086
6109
|
*
|
|
6087
|
-
*
|
|
6110
|
+
* Associate two existing records using the requested association category and type id. Obtain record ids from objects.list or objects.search; reuse known association type ids from associations.list. Send the association-spec array as the body; use associations.createDefault when no label is needed. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
6088
6111
|
*/
|
|
6089
|
-
export const
|
|
6112
|
+
export const crmAssociationsCreate = (options) => (options.client ?? client).put({
|
|
6090
6113
|
security: [{
|
|
6091
|
-
key: '
|
|
6114
|
+
key: 'crm-bearerAuth',
|
|
6092
6115
|
scheme: 'bearer',
|
|
6093
6116
|
type: 'http'
|
|
6094
6117
|
}],
|
|
6095
|
-
url: '/
|
|
6118
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}',
|
|
6096
6119
|
...options,
|
|
6097
6120
|
headers: {
|
|
6098
6121
|
'Content-Type': 'application/json',
|
|
@@ -6100,45 +6123,45 @@ export const mediaImportAsset = (options) => (options.client ?? client).post({
|
|
|
6100
6123
|
}
|
|
6101
6124
|
});
|
|
6102
6125
|
/**
|
|
6103
|
-
*
|
|
6126
|
+
* Create default association
|
|
6104
6127
|
*
|
|
6105
|
-
*
|
|
6128
|
+
* Link two existing records with the default unlabelled association. Obtain each record id from objects.list or objects.search for its type. No request body is required; use associations.create to choose explicit association labels. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
6106
6129
|
*/
|
|
6107
|
-
export const
|
|
6130
|
+
export const crmAssociationsCreateDefault = (options) => (options.client ?? client).put({
|
|
6108
6131
|
security: [{
|
|
6109
|
-
key: '
|
|
6132
|
+
key: 'crm-bearerAuth',
|
|
6110
6133
|
scheme: 'bearer',
|
|
6111
6134
|
type: 'http'
|
|
6112
6135
|
}],
|
|
6113
|
-
url: '/
|
|
6136
|
+
url: '/crm/v1/objects/{objectType}/{objectId}/associations/default/{toObjectType}/{toObjectId}',
|
|
6114
6137
|
...options
|
|
6115
6138
|
});
|
|
6116
6139
|
/**
|
|
6117
|
-
*
|
|
6140
|
+
* List object schemas
|
|
6118
6141
|
*
|
|
6119
|
-
*
|
|
6142
|
+
* Discover available object schemas, display labels, property definitions and association definitions. Reuse the object type identifier or name in record, property and pipeline operations. archived defaults to false; the include parameters control the definition and audit details returned.
|
|
6120
6143
|
*/
|
|
6121
|
-
export const
|
|
6144
|
+
export const crmSchemasList = (options) => (options?.client ?? client).get({
|
|
6122
6145
|
security: [{
|
|
6123
|
-
key: '
|
|
6146
|
+
key: 'crm-bearerAuth',
|
|
6124
6147
|
scheme: 'bearer',
|
|
6125
6148
|
type: 'http'
|
|
6126
6149
|
}],
|
|
6127
|
-
url: '/
|
|
6150
|
+
url: '/crm/v1/schemas',
|
|
6128
6151
|
...options
|
|
6129
6152
|
});
|
|
6130
6153
|
/**
|
|
6131
|
-
*
|
|
6154
|
+
* Create object schema
|
|
6132
6155
|
*
|
|
6133
|
-
*
|
|
6156
|
+
* Define a custom CRM object type before creating its records. Provide its immutable name, singular and plural labels, primaryDisplayProperty, properties and associated object types. Save the returned object type identifier for subsequent record and property operations. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
6134
6157
|
*/
|
|
6135
|
-
export const
|
|
6158
|
+
export const crmSchemasCreate = (options) => (options.client ?? client).post({
|
|
6136
6159
|
security: [{
|
|
6137
|
-
key: '
|
|
6160
|
+
key: 'crm-bearerAuth',
|
|
6138
6161
|
scheme: 'bearer',
|
|
6139
6162
|
type: 'http'
|
|
6140
6163
|
}],
|
|
6141
|
-
url: '/
|
|
6164
|
+
url: '/crm/v1/schemas',
|
|
6142
6165
|
...options,
|
|
6143
6166
|
headers: {
|
|
6144
6167
|
'Content-Type': 'application/json',
|
|
@@ -6146,17 +6169,17 @@ export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
|
|
|
6146
6169
|
}
|
|
6147
6170
|
});
|
|
6148
6171
|
/**
|
|
6149
|
-
*
|
|
6172
|
+
* Qualify lead
|
|
6150
6173
|
*
|
|
6151
|
-
*
|
|
6174
|
+
* Qualify a lead with explicit contact, company and optional deal choices in one operation. Unlike HubSpot, CRM exposes these decisions as a single action because qualification coordinates several related record edits rather than editing only the lead stage. Obtain leadId from objects.list for leads and qualifiedStageId from its pipeline; choose a won stage and satisfy its required properties. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
6152
6175
|
*/
|
|
6153
|
-
export const
|
|
6176
|
+
export const crmLeadsQualify = (options) => (options.client ?? client).post({
|
|
6154
6177
|
security: [{
|
|
6155
|
-
key: '
|
|
6178
|
+
key: 'crm-bearerAuth',
|
|
6156
6179
|
scheme: 'bearer',
|
|
6157
6180
|
type: 'http'
|
|
6158
6181
|
}],
|
|
6159
|
-
url: '/
|
|
6182
|
+
url: '/crm/v1/leads/{leadId}:qualify',
|
|
6160
6183
|
...options,
|
|
6161
6184
|
headers: {
|
|
6162
6185
|
'Content-Type': 'application/json',
|
|
@@ -6164,31 +6187,45 @@ export const mediaReprocessAsset = (options) => (options.client ?? client).post(
|
|
|
6164
6187
|
}
|
|
6165
6188
|
});
|
|
6166
6189
|
/**
|
|
6167
|
-
*
|
|
6190
|
+
* Revert change set
|
|
6168
6191
|
*
|
|
6169
|
-
*
|
|
6192
|
+
* Reverse property changes made by one earlier request. Unlike HubSpot, CRM exposes change-set reversal because agents need to undo a whole recorded action rather than manually reconstructing individual values. Supply the changeSetId recorded in property history. A later conflicting value prevents reversal with HTTP 409 CONFLICT; inspect current records before resolving the conflict. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
6170
6193
|
*/
|
|
6171
|
-
export const
|
|
6194
|
+
export const crmChangesRevert = (options) => (options.client ?? client).post({
|
|
6172
6195
|
security: [{
|
|
6173
|
-
key: '
|
|
6196
|
+
key: 'crm-bearerAuth',
|
|
6174
6197
|
scheme: 'bearer',
|
|
6175
6198
|
type: 'http'
|
|
6176
6199
|
}],
|
|
6177
|
-
url: '/
|
|
6200
|
+
url: '/crm/v1/changes/{changeSetId}:revert',
|
|
6178
6201
|
...options
|
|
6179
6202
|
});
|
|
6180
6203
|
/**
|
|
6181
|
-
*
|
|
6204
|
+
* Retrieve record layout
|
|
6182
6205
|
*
|
|
6183
|
-
*
|
|
6206
|
+
* Read the shared record-page layout for an object type from schemas.list. Unlike HubSpot, CRM exposes this presentation as an API resource so people and agents can share the same record layout instead of relying on interface-only settings. The response orders summary tiles, sidebar properties and main-column sections.
|
|
6184
6207
|
*/
|
|
6185
|
-
export const
|
|
6208
|
+
export const crmLayoutsRetrieve = (options) => (options.client ?? client).get({
|
|
6186
6209
|
security: [{
|
|
6187
|
-
key: '
|
|
6210
|
+
key: 'crm-bearerAuth',
|
|
6188
6211
|
scheme: 'bearer',
|
|
6189
6212
|
type: 'http'
|
|
6190
6213
|
}],
|
|
6191
|
-
url: '/
|
|
6214
|
+
url: '/crm/v1/layouts/{objectType}',
|
|
6215
|
+
...options
|
|
6216
|
+
});
|
|
6217
|
+
/**
|
|
6218
|
+
* Update record layout
|
|
6219
|
+
*
|
|
6220
|
+
* Replace the shared record-page layout for an object type from schemas.list. Unlike HubSpot, CRM exposes this presentation as an API resource so agents can configure the same record view used by people. Send the complete layout with at most three summary tiles and property names from properties.list; omitted prior sections are removed. Writes return refs (ResourceRef[]) for entity cards and optional property changes in conversations.
|
|
6221
|
+
*/
|
|
6222
|
+
export const crmLayoutsUpdate = (options) => (options.client ?? client).put({
|
|
6223
|
+
security: [{
|
|
6224
|
+
key: 'crm-bearerAuth',
|
|
6225
|
+
scheme: 'bearer',
|
|
6226
|
+
type: 'http'
|
|
6227
|
+
}],
|
|
6228
|
+
url: '/crm/v1/layouts/{objectType}',
|
|
6192
6229
|
...options,
|
|
6193
6230
|
headers: {
|
|
6194
6231
|
'Content-Type': 'application/json',
|
|
@@ -6196,17 +6233,39 @@ export const mediaExpressionSearch = (options) => (options.client ?? client).pos
|
|
|
6196
6233
|
}
|
|
6197
6234
|
});
|
|
6198
6235
|
/**
|
|
6199
|
-
*
|
|
6236
|
+
* List projects
|
|
6200
6237
|
*
|
|
6201
|
-
*
|
|
6238
|
+
* Discover projects owned by the API key organization and obtain project_id values. Results default to active projects ordered by updateTime descending; use filter state = "deleted" to find retained deleted projects for undelete. Continue with next_page_token as page_token until the token is absent.
|
|
6202
6239
|
*/
|
|
6203
|
-
export const
|
|
6240
|
+
export const cutListProjects = (options) => (options?.client ?? client).get({
|
|
6204
6241
|
security: [{
|
|
6205
|
-
key: '
|
|
6242
|
+
key: 'BearerAuth',
|
|
6206
6243
|
scheme: 'bearer',
|
|
6207
6244
|
type: 'http'
|
|
6245
|
+
}, {
|
|
6246
|
+
key: 'ApiKeyAuth',
|
|
6247
|
+
name: 'X-API-Key',
|
|
6248
|
+
type: 'apiKey'
|
|
6208
6249
|
}],
|
|
6209
|
-
url: '/
|
|
6250
|
+
url: '/cut/v1/projects',
|
|
6251
|
+
...options
|
|
6252
|
+
});
|
|
6253
|
+
/**
|
|
6254
|
+
* Create project
|
|
6255
|
+
*
|
|
6256
|
+
* Create a blank editing project in the API key organization before writing a script. First obtain accessible library ids from praxis.media; bindings must include exactly one read_write library with default_upload true. Each call creates a new project and returns HTTP 201; save its id for execute, state and timeline calls. All editing positions use seconds.
|
|
6257
|
+
*/
|
|
6258
|
+
export const cutCreateProject = (options) => (options.client ?? client).post({
|
|
6259
|
+
security: [{
|
|
6260
|
+
key: 'BearerAuth',
|
|
6261
|
+
scheme: 'bearer',
|
|
6262
|
+
type: 'http'
|
|
6263
|
+
}, {
|
|
6264
|
+
key: 'ApiKeyAuth',
|
|
6265
|
+
name: 'X-API-Key',
|
|
6266
|
+
type: 'apiKey'
|
|
6267
|
+
}],
|
|
6268
|
+
url: '/cut/v1/projects',
|
|
6210
6269
|
...options,
|
|
6211
6270
|
headers: {
|
|
6212
6271
|
'Content-Type': 'application/json',
|
|
@@ -6214,17 +6273,57 @@ export const mediaVisualSearch = (options) => (options.client ?? client).post({
|
|
|
6214
6273
|
}
|
|
6215
6274
|
});
|
|
6216
6275
|
/**
|
|
6217
|
-
*
|
|
6276
|
+
* Delete project
|
|
6218
6277
|
*
|
|
6219
|
-
*
|
|
6278
|
+
* Soft-delete a project selected from projects.list. The project is retained for seven days until purge_time and can be restored with undelete before that deadline. Deleted projects cannot be edited; list with filter state = "deleted" to locate retained projects.
|
|
6220
6279
|
*/
|
|
6221
|
-
export const
|
|
6280
|
+
export const cutDeleteProject = (options) => (options.client ?? client).delete({
|
|
6222
6281
|
security: [{
|
|
6223
|
-
key: '
|
|
6282
|
+
key: 'BearerAuth',
|
|
6224
6283
|
scheme: 'bearer',
|
|
6225
6284
|
type: 'http'
|
|
6285
|
+
}, {
|
|
6286
|
+
key: 'ApiKeyAuth',
|
|
6287
|
+
name: 'X-API-Key',
|
|
6288
|
+
type: 'apiKey'
|
|
6226
6289
|
}],
|
|
6227
|
-
url: '/
|
|
6290
|
+
url: '/cut/v1/projects/{project_id}',
|
|
6291
|
+
...options
|
|
6292
|
+
});
|
|
6293
|
+
/**
|
|
6294
|
+
* Retrieve project
|
|
6295
|
+
*
|
|
6296
|
+
* Inspect project metadata, settings and library bindings before editing. Copy id from projects.create or list; expand=timeline,exports,versions includes selected related resources. The expanded timeline uses seconds and the returned revision can guard a later execute call with expected_revision.
|
|
6297
|
+
*/
|
|
6298
|
+
export const cutRetrieveProject = (options) => (options.client ?? client).get({
|
|
6299
|
+
security: [{
|
|
6300
|
+
key: 'BearerAuth',
|
|
6301
|
+
scheme: 'bearer',
|
|
6302
|
+
type: 'http'
|
|
6303
|
+
}, {
|
|
6304
|
+
key: 'ApiKeyAuth',
|
|
6305
|
+
name: 'X-API-Key',
|
|
6306
|
+
type: 'apiKey'
|
|
6307
|
+
}],
|
|
6308
|
+
url: '/cut/v1/projects/{project_id}',
|
|
6309
|
+
...options
|
|
6310
|
+
});
|
|
6311
|
+
/**
|
|
6312
|
+
* Update project metadata
|
|
6313
|
+
*
|
|
6314
|
+
* Change the project display name or replace its labels by naming those fields in update_mask. Use execute for clip or track edits. Each successful update commits a new revision; labels are replaced as a whole when selected, so read and merge existing labels before overwriting them.
|
|
6315
|
+
*/
|
|
6316
|
+
export const cutUpdateProject = (options) => (options.client ?? client).patch({
|
|
6317
|
+
security: [{
|
|
6318
|
+
key: 'BearerAuth',
|
|
6319
|
+
scheme: 'bearer',
|
|
6320
|
+
type: 'http'
|
|
6321
|
+
}, {
|
|
6322
|
+
key: 'ApiKeyAuth',
|
|
6323
|
+
name: 'X-API-Key',
|
|
6324
|
+
type: 'apiKey'
|
|
6325
|
+
}],
|
|
6326
|
+
url: '/cut/v1/projects/{project_id}',
|
|
6228
6327
|
...options,
|
|
6229
6328
|
headers: {
|
|
6230
6329
|
'Content-Type': 'application/json',
|
|
@@ -6232,17 +6331,45 @@ export const mediaSemanticSearch = (options) => (options.client ?? client).post(
|
|
|
6232
6331
|
}
|
|
6233
6332
|
});
|
|
6234
6333
|
/**
|
|
6235
|
-
*
|
|
6334
|
+
* Restore deleted project
|
|
6236
6335
|
*
|
|
6237
|
-
*
|
|
6336
|
+
* Return a retained deleted project to active state before its purge_time. Obtain project_id from projects.list filtered to deleted projects. This restores the project, not an older timeline revision; use versions.restore when reverting editing content.
|
|
6238
6337
|
*/
|
|
6239
|
-
export const
|
|
6338
|
+
export const cutUndeleteProject = (options) => (options.client ?? client).post({
|
|
6240
6339
|
security: [{
|
|
6241
|
-
key: '
|
|
6340
|
+
key: 'BearerAuth',
|
|
6341
|
+
scheme: 'bearer',
|
|
6342
|
+
type: 'http'
|
|
6343
|
+
}, {
|
|
6344
|
+
key: 'ApiKeyAuth',
|
|
6345
|
+
name: 'X-API-Key',
|
|
6346
|
+
type: 'apiKey'
|
|
6347
|
+
}],
|
|
6348
|
+
url: '/cut/v1/projects/{project_id}:undelete',
|
|
6349
|
+
...options
|
|
6350
|
+
});
|
|
6351
|
+
/**
|
|
6352
|
+
* Execute editing script
|
|
6353
|
+
*
|
|
6354
|
+
* Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Use AddTrack, Insert, Update, Delete, Split, Trim, Move, RippleDeleteRange, UpdateTrack, DeleteTrack, SetSettings, AddCaptionsFromTranscript and SetMarker for writes; GetTimeline, GetItem, FindItems, GetMedia, GetTranscript and GetAnalysis read editing context; Print emits text and Preview requests frame previews. All script times are seconds; script object fields use camelCase, for example `media: {libraryId, assetId}`. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project:
|
|
6355
|
+
*
|
|
6356
|
+
* ```js
|
|
6357
|
+
* const t = AddTrack("video");
|
|
6358
|
+
* Insert(t, {type: "color", color: "#123456", start: 0, length: 3});
|
|
6359
|
+
* Print(t);
|
|
6360
|
+
* ```
|
|
6361
|
+
*/
|
|
6362
|
+
export const cutExecute = (options) => (options.client ?? client).post({
|
|
6363
|
+
security: [{
|
|
6364
|
+
key: 'BearerAuth',
|
|
6242
6365
|
scheme: 'bearer',
|
|
6243
6366
|
type: 'http'
|
|
6367
|
+
}, {
|
|
6368
|
+
key: 'ApiKeyAuth',
|
|
6369
|
+
name: 'X-API-Key',
|
|
6370
|
+
type: 'apiKey'
|
|
6244
6371
|
}],
|
|
6245
|
-
url: '/
|
|
6372
|
+
url: '/cut/v1/projects/{project_id}:execute',
|
|
6246
6373
|
...options,
|
|
6247
6374
|
headers: {
|
|
6248
6375
|
'Content-Type': 'application/json',
|
|
@@ -6250,31 +6377,75 @@ export const mediaSearch = (options) => (options.client ?? client).post({
|
|
|
6250
6377
|
}
|
|
6251
6378
|
});
|
|
6252
6379
|
/**
|
|
6253
|
-
*
|
|
6380
|
+
* Read editing state
|
|
6254
6381
|
*
|
|
6255
|
-
*
|
|
6382
|
+
* Read lightweight project context before composing an execute script. Returns current revision, rendering settings, track counts, library bindings and offline media count without individual clips. For complete clip documents or a selected time range, read timeline instead.
|
|
6256
6383
|
*/
|
|
6257
|
-
export const
|
|
6384
|
+
export const cutRetrieveState = (options) => (options.client ?? client).get({
|
|
6258
6385
|
security: [{
|
|
6259
|
-
key: '
|
|
6386
|
+
key: 'BearerAuth',
|
|
6260
6387
|
scheme: 'bearer',
|
|
6261
6388
|
type: 'http'
|
|
6389
|
+
}, {
|
|
6390
|
+
key: 'ApiKeyAuth',
|
|
6391
|
+
name: 'X-API-Key',
|
|
6392
|
+
type: 'apiKey'
|
|
6262
6393
|
}],
|
|
6263
|
-
url: '/
|
|
6394
|
+
url: '/cut/v1/projects/{project_id}/state',
|
|
6264
6395
|
...options
|
|
6265
6396
|
});
|
|
6266
6397
|
/**
|
|
6267
|
-
*
|
|
6398
|
+
* Read project timeline
|
|
6268
6399
|
*
|
|
6269
|
-
*
|
|
6400
|
+
* Inspect clips and markers in a selected project range before editing. view=full returns structured tracks with all timeline positions in seconds; view=compact returns compact text for script context. from and to are seconds and tracks limits the selection to comma-separated track ids from state. Concurrent changes while preparing a full timeline return 409; retrieve the latest state and try the read again.
|
|
6270
6401
|
*/
|
|
6271
|
-
export const
|
|
6402
|
+
export const cutRetrieveTimeline = (options) => (options.client ?? client).get({
|
|
6272
6403
|
security: [{
|
|
6273
|
-
key: '
|
|
6404
|
+
key: 'BearerAuth',
|
|
6274
6405
|
scheme: 'bearer',
|
|
6275
6406
|
type: 'http'
|
|
6407
|
+
}, {
|
|
6408
|
+
key: 'ApiKeyAuth',
|
|
6409
|
+
name: 'X-API-Key',
|
|
6410
|
+
type: 'apiKey'
|
|
6276
6411
|
}],
|
|
6277
|
-
url: '/
|
|
6412
|
+
url: '/cut/v1/projects/{project_id}/timeline',
|
|
6413
|
+
...options
|
|
6414
|
+
});
|
|
6415
|
+
/**
|
|
6416
|
+
* Render preview frames
|
|
6417
|
+
*
|
|
6418
|
+
* Review the visual result at one or more project times without creating an export. Pass comma-separated seconds in at, such as 12,15.5; scale changes preview size and revision selects a committed project revision. Fetch the returned image URLs before expires_at; render again when they expire.
|
|
6419
|
+
*/
|
|
6420
|
+
export const cutListFrames = (options) => (options.client ?? client).get({
|
|
6421
|
+
security: [{
|
|
6422
|
+
key: 'BearerAuth',
|
|
6423
|
+
scheme: 'bearer',
|
|
6424
|
+
type: 'http'
|
|
6425
|
+
}, {
|
|
6426
|
+
key: 'ApiKeyAuth',
|
|
6427
|
+
name: 'X-API-Key',
|
|
6428
|
+
type: 'apiKey'
|
|
6429
|
+
}],
|
|
6430
|
+
url: '/cut/v1/projects/{project_id}/frames',
|
|
6431
|
+
...options
|
|
6432
|
+
});
|
|
6433
|
+
/**
|
|
6434
|
+
* Analyze project media
|
|
6435
|
+
*
|
|
6436
|
+
* Request silence, filler-word or scene analysis for selected bound assets before editing. Omit media to select project sources; ranges returned in segments use source seconds. A pending result is not completion: use retry_after_sec before checking again, and inspect failed or unsupported asset results before deciding which edits are possible.
|
|
6437
|
+
*/
|
|
6438
|
+
export const cutCreateAnalysis = (options) => (options.client ?? client).post({
|
|
6439
|
+
security: [{
|
|
6440
|
+
key: 'BearerAuth',
|
|
6441
|
+
scheme: 'bearer',
|
|
6442
|
+
type: 'http'
|
|
6443
|
+
}, {
|
|
6444
|
+
key: 'ApiKeyAuth',
|
|
6445
|
+
name: 'X-API-Key',
|
|
6446
|
+
type: 'apiKey'
|
|
6447
|
+
}],
|
|
6448
|
+
url: '/cut/v1/projects/{project_id}/analysis',
|
|
6278
6449
|
...options,
|
|
6279
6450
|
headers: {
|
|
6280
6451
|
'Content-Type': 'application/json',
|
|
@@ -6282,31 +6453,1528 @@ export const mediaCreateBatch = (options) => (options.client ?? client).post({
|
|
|
6282
6453
|
}
|
|
6283
6454
|
});
|
|
6284
6455
|
/**
|
|
6285
|
-
*
|
|
6456
|
+
* List library bindings
|
|
6286
6457
|
*
|
|
6287
|
-
*
|
|
6458
|
+
* Discover the named media libraries available to this project before selecting source assets or an import/export destination. read bindings supply source assets; read_write bindings also accept uploads. Exactly one writable binding supplies the default upload destination.
|
|
6288
6459
|
*/
|
|
6289
|
-
export const
|
|
6460
|
+
export const cutListBindings = (options) => (options.client ?? client).get({
|
|
6290
6461
|
security: [{
|
|
6291
|
-
key: '
|
|
6462
|
+
key: 'BearerAuth',
|
|
6292
6463
|
scheme: 'bearer',
|
|
6293
6464
|
type: 'http'
|
|
6465
|
+
}, {
|
|
6466
|
+
key: 'ApiKeyAuth',
|
|
6467
|
+
name: 'X-API-Key',
|
|
6468
|
+
type: 'apiKey'
|
|
6294
6469
|
}],
|
|
6295
|
-
url: '/
|
|
6470
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
6296
6471
|
...options
|
|
6297
6472
|
});
|
|
6298
6473
|
/**
|
|
6299
|
-
*
|
|
6474
|
+
* Bind media library
|
|
6300
6475
|
*
|
|
6301
|
-
*
|
|
6476
|
+
* Attach an accessible media library to an existing project under a unique name. Obtain library_id from praxis.media and choose read for source-only access or read_write for imports and exports. The project must retain exactly one read_write binding with default_upload true after the change.
|
|
6302
6477
|
*/
|
|
6303
|
-
export const
|
|
6478
|
+
export const cutCreateBinding = (options) => (options.client ?? client).post({
|
|
6304
6479
|
security: [{
|
|
6305
|
-
key: '
|
|
6480
|
+
key: 'BearerAuth',
|
|
6481
|
+
scheme: 'bearer',
|
|
6482
|
+
type: 'http'
|
|
6483
|
+
}, {
|
|
6484
|
+
key: 'ApiKeyAuth',
|
|
6485
|
+
name: 'X-API-Key',
|
|
6486
|
+
type: 'apiKey'
|
|
6487
|
+
}],
|
|
6488
|
+
url: '/cut/v1/projects/{project_id}/bindings',
|
|
6489
|
+
...options,
|
|
6490
|
+
headers: {
|
|
6491
|
+
'Content-Type': 'application/json',
|
|
6492
|
+
...options.headers
|
|
6493
|
+
}
|
|
6494
|
+
});
|
|
6495
|
+
/**
|
|
6496
|
+
* Remove library binding
|
|
6497
|
+
*
|
|
6498
|
+
* Detach a library alias obtained from bindings.list after removing all timeline clips that reference its library. BINDING_IN_USE returns 409 while references remain; inspect timeline and edit those clips first. Removal must preserve the one writable default upload binding.
|
|
6499
|
+
*/
|
|
6500
|
+
export const cutDeleteBinding = (options) => (options.client ?? client).delete({
|
|
6501
|
+
security: [{
|
|
6502
|
+
key: 'BearerAuth',
|
|
6503
|
+
scheme: 'bearer',
|
|
6504
|
+
type: 'http'
|
|
6505
|
+
}, {
|
|
6506
|
+
key: 'ApiKeyAuth',
|
|
6507
|
+
name: 'X-API-Key',
|
|
6508
|
+
type: 'apiKey'
|
|
6509
|
+
}],
|
|
6510
|
+
url: '/cut/v1/projects/{project_id}/bindings/{name}',
|
|
6511
|
+
...options
|
|
6512
|
+
});
|
|
6513
|
+
/**
|
|
6514
|
+
* Import project media
|
|
6515
|
+
*
|
|
6516
|
+
* Import a URL, data URI or existing file into a writable project media library. Select binding from bindings.list or omit it to use default_upload. Save library_id and asset_id from the result and use them as libraryId and assetId inside execute script media references; overwrites follow the source asset latest version.
|
|
6517
|
+
*/
|
|
6518
|
+
export const cutImportMedia = (options) => (options.client ?? client).post({
|
|
6519
|
+
security: [{
|
|
6520
|
+
key: 'BearerAuth',
|
|
6521
|
+
scheme: 'bearer',
|
|
6522
|
+
type: 'http'
|
|
6523
|
+
}, {
|
|
6524
|
+
key: 'ApiKeyAuth',
|
|
6525
|
+
name: 'X-API-Key',
|
|
6526
|
+
type: 'apiKey'
|
|
6527
|
+
}],
|
|
6528
|
+
url: '/cut/v1/projects/{project_id}/media:import',
|
|
6529
|
+
...options,
|
|
6530
|
+
headers: {
|
|
6531
|
+
'Content-Type': 'application/json',
|
|
6532
|
+
...options.headers
|
|
6533
|
+
}
|
|
6534
|
+
});
|
|
6535
|
+
/**
|
|
6536
|
+
* List project exports
|
|
6537
|
+
*
|
|
6538
|
+
* Find export jobs associated with this project before polling or canceling a render. Copy an export id into praxis.cut.exports.retrieve or cancel. Continue with next_page_token as page_token when present; queued or in-progress jobs have not produced a final media asset.
|
|
6539
|
+
*/
|
|
6540
|
+
export const cutListExports = (options) => (options.client ?? client).get({
|
|
6541
|
+
security: [{
|
|
6542
|
+
key: 'BearerAuth',
|
|
6543
|
+
scheme: 'bearer',
|
|
6544
|
+
type: 'http'
|
|
6545
|
+
}, {
|
|
6546
|
+
key: 'ApiKeyAuth',
|
|
6547
|
+
name: 'X-API-Key',
|
|
6548
|
+
type: 'apiKey'
|
|
6549
|
+
}],
|
|
6550
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
6551
|
+
...options
|
|
6552
|
+
});
|
|
6553
|
+
/**
|
|
6554
|
+
* Create video export
|
|
6555
|
+
*
|
|
6556
|
+
* Start an asynchronous video export from the project into a writable bound media library. Choose binding from bindings.list or omit it for default_upload, and optionally select revision and output settings. HTTP 202 only accepts the job; poll praxis.cut.exports.retrieve using the returned id until status is done, failed or canceled. On done, asset identifies the video written back to praxis.media. Each call starts a job, so retrieve a known job before retrying a submission.
|
|
6557
|
+
*/
|
|
6558
|
+
export const cutCreateExport = (options) => (options.client ?? client).post({
|
|
6559
|
+
security: [{
|
|
6560
|
+
key: 'BearerAuth',
|
|
6561
|
+
scheme: 'bearer',
|
|
6562
|
+
type: 'http'
|
|
6563
|
+
}, {
|
|
6564
|
+
key: 'ApiKeyAuth',
|
|
6565
|
+
name: 'X-API-Key',
|
|
6566
|
+
type: 'apiKey'
|
|
6567
|
+
}],
|
|
6568
|
+
url: '/cut/v1/projects/{project_id}/exports',
|
|
6569
|
+
...options,
|
|
6570
|
+
headers: {
|
|
6571
|
+
'Content-Type': 'application/json',
|
|
6572
|
+
...options.headers
|
|
6573
|
+
}
|
|
6574
|
+
});
|
|
6575
|
+
/**
|
|
6576
|
+
* Retrieve video export
|
|
6577
|
+
*
|
|
6578
|
+
* Poll an export id returned by projects.exports.create or list to observe render progress. queued, fetching, rendering, stitching and saving are in progress; done provides asset in the target library, failed provides error, and canceled means the job stopped. Only done confirms a usable output asset.
|
|
6579
|
+
*/
|
|
6580
|
+
export const cutRetrieveExport = (options) => (options.client ?? client).get({
|
|
6581
|
+
security: [{
|
|
6582
|
+
key: 'BearerAuth',
|
|
6583
|
+
scheme: 'bearer',
|
|
6584
|
+
type: 'http'
|
|
6585
|
+
}, {
|
|
6586
|
+
key: 'ApiKeyAuth',
|
|
6587
|
+
name: 'X-API-Key',
|
|
6588
|
+
type: 'apiKey'
|
|
6589
|
+
}],
|
|
6590
|
+
url: '/cut/v1/exports/{export_id}',
|
|
6591
|
+
...options
|
|
6592
|
+
});
|
|
6593
|
+
/**
|
|
6594
|
+
* Cancel video export
|
|
6595
|
+
*
|
|
6596
|
+
* Request cancellation of an export obtained from projects.exports.create or list when its output is no longer needed. Read the returned job status and retrieve it to confirm the terminal outcome; do not interpret a cancellation request as successful rendering.
|
|
6597
|
+
*/
|
|
6598
|
+
export const cutCancelExport = (options) => (options.client ?? client).post({
|
|
6599
|
+
security: [{
|
|
6600
|
+
key: 'BearerAuth',
|
|
6601
|
+
scheme: 'bearer',
|
|
6602
|
+
type: 'http'
|
|
6603
|
+
}, {
|
|
6604
|
+
key: 'ApiKeyAuth',
|
|
6605
|
+
name: 'X-API-Key',
|
|
6606
|
+
type: 'apiKey'
|
|
6607
|
+
}],
|
|
6608
|
+
url: '/cut/v1/exports/{export_id}:cancel',
|
|
6609
|
+
...options
|
|
6610
|
+
});
|
|
6611
|
+
/**
|
|
6612
|
+
* List saved versions
|
|
6613
|
+
*
|
|
6614
|
+
* Find saved timeline snapshots for this project and obtain version_id values for restore. A saved version records its original revision; restoring it creates a new current revision rather than rewinding the revision counter. Continue with next_page_token as page_token until absent.
|
|
6615
|
+
*/
|
|
6616
|
+
export const cutListVersions = (options) => (options.client ?? client).get({
|
|
6617
|
+
security: [{
|
|
6618
|
+
key: 'BearerAuth',
|
|
6619
|
+
scheme: 'bearer',
|
|
6620
|
+
type: 'http'
|
|
6621
|
+
}, {
|
|
6622
|
+
key: 'ApiKeyAuth',
|
|
6623
|
+
name: 'X-API-Key',
|
|
6624
|
+
type: 'apiKey'
|
|
6625
|
+
}],
|
|
6626
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
6627
|
+
...options
|
|
6628
|
+
});
|
|
6629
|
+
/**
|
|
6630
|
+
* Save project version
|
|
6631
|
+
*
|
|
6632
|
+
* Save the current project timeline as a named recovery point before a substantial edit. Supply an optional label or send an empty object; keep the returned version id for versions.restore. Saving a version does not publish a rendered asset; use projects.exports.create for video output.
|
|
6633
|
+
*/
|
|
6634
|
+
export const cutCreateVersion = (options) => (options.client ?? client).post({
|
|
6635
|
+
security: [{
|
|
6636
|
+
key: 'BearerAuth',
|
|
6637
|
+
scheme: 'bearer',
|
|
6638
|
+
type: 'http'
|
|
6639
|
+
}, {
|
|
6640
|
+
key: 'ApiKeyAuth',
|
|
6641
|
+
name: 'X-API-Key',
|
|
6642
|
+
type: 'apiKey'
|
|
6643
|
+
}],
|
|
6644
|
+
url: '/cut/v1/projects/{project_id}/versions',
|
|
6645
|
+
...options,
|
|
6646
|
+
headers: {
|
|
6647
|
+
'Content-Type': 'application/json',
|
|
6648
|
+
...options.headers
|
|
6649
|
+
}
|
|
6650
|
+
});
|
|
6651
|
+
/**
|
|
6652
|
+
* Restore saved version
|
|
6653
|
+
*
|
|
6654
|
+
* Replace current editing content with a saved project snapshot selected from projects.versions.list. The restore commits a new transaction and revision while preserving the saved version for future use. Inspect the returned summary and timeline before further editing; a response revision conflict can follow a committed restore, so retrieve current state before retrying.
|
|
6655
|
+
*/
|
|
6656
|
+
export const cutRestoreVersion = (options) => (options.client ?? client).post({
|
|
6657
|
+
security: [{
|
|
6658
|
+
key: 'BearerAuth',
|
|
6659
|
+
scheme: 'bearer',
|
|
6660
|
+
type: 'http'
|
|
6661
|
+
}, {
|
|
6662
|
+
key: 'ApiKeyAuth',
|
|
6663
|
+
name: 'X-API-Key',
|
|
6664
|
+
type: 'apiKey'
|
|
6665
|
+
}],
|
|
6666
|
+
url: '/cut/v1/versions/{version_id}:restore',
|
|
6667
|
+
...options
|
|
6668
|
+
});
|
|
6669
|
+
/**
|
|
6670
|
+
* List databases
|
|
6671
|
+
*
|
|
6672
|
+
* 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.
|
|
6673
|
+
*/
|
|
6674
|
+
export const databaseListDatabases = (options) => (options?.client ?? client).get({
|
|
6675
|
+
security: [{
|
|
6676
|
+
key: 'database-bearerAuth',
|
|
6677
|
+
scheme: 'bearer',
|
|
6678
|
+
type: 'http'
|
|
6679
|
+
}],
|
|
6680
|
+
url: '/database/v1/databases',
|
|
6681
|
+
...options
|
|
6682
|
+
});
|
|
6683
|
+
/**
|
|
6684
|
+
* Create database
|
|
6685
|
+
*
|
|
6686
|
+
* 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.
|
|
6687
|
+
*/
|
|
6688
|
+
export const databaseCreateDatabase = (options) => (options.client ?? client).post({
|
|
6689
|
+
security: [{
|
|
6690
|
+
key: 'database-bearerAuth',
|
|
6691
|
+
scheme: 'bearer',
|
|
6692
|
+
type: 'http'
|
|
6693
|
+
}],
|
|
6694
|
+
url: '/database/v1/databases',
|
|
6695
|
+
...options,
|
|
6696
|
+
headers: {
|
|
6697
|
+
'Content-Type': 'application/json',
|
|
6698
|
+
...options.headers
|
|
6699
|
+
}
|
|
6700
|
+
});
|
|
6701
|
+
/**
|
|
6702
|
+
* Delete database
|
|
6703
|
+
*
|
|
6704
|
+
* 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.
|
|
6705
|
+
*/
|
|
6706
|
+
export const databaseDeleteDatabase = (options) => (options.client ?? client).delete({
|
|
6707
|
+
security: [{
|
|
6708
|
+
key: 'database-bearerAuth',
|
|
6709
|
+
scheme: 'bearer',
|
|
6710
|
+
type: 'http'
|
|
6711
|
+
}],
|
|
6712
|
+
url: '/database/v1/databases/{database_id}',
|
|
6713
|
+
...options
|
|
6714
|
+
});
|
|
6715
|
+
/**
|
|
6716
|
+
* Get database
|
|
6717
|
+
*
|
|
6718
|
+
* 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.
|
|
6719
|
+
*/
|
|
6720
|
+
export const databaseGetDatabase = (options) => (options.client ?? client).get({
|
|
6721
|
+
security: [{
|
|
6722
|
+
key: 'database-bearerAuth',
|
|
6723
|
+
scheme: 'bearer',
|
|
6724
|
+
type: 'http'
|
|
6725
|
+
}],
|
|
6726
|
+
url: '/database/v1/databases/{database_id}',
|
|
6727
|
+
...options
|
|
6728
|
+
});
|
|
6729
|
+
/**
|
|
6730
|
+
* Update database
|
|
6731
|
+
*
|
|
6732
|
+
* 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.
|
|
6733
|
+
*/
|
|
6734
|
+
export const databaseUpdateDatabase = (options) => (options.client ?? client).patch({
|
|
6735
|
+
security: [{
|
|
6736
|
+
key: 'database-bearerAuth',
|
|
6737
|
+
scheme: 'bearer',
|
|
6738
|
+
type: 'http'
|
|
6739
|
+
}],
|
|
6740
|
+
url: '/database/v1/databases/{database_id}',
|
|
6741
|
+
...options,
|
|
6742
|
+
headers: {
|
|
6743
|
+
'Content-Type': 'application/json',
|
|
6744
|
+
...options.headers
|
|
6745
|
+
}
|
|
6746
|
+
});
|
|
6747
|
+
/**
|
|
6748
|
+
* Restore database
|
|
6749
|
+
*
|
|
6750
|
+
* 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.
|
|
6751
|
+
*/
|
|
6752
|
+
export const databaseRestoreDatabase = (options) => (options.client ?? client).post({
|
|
6753
|
+
security: [{
|
|
6754
|
+
key: 'database-bearerAuth',
|
|
6755
|
+
scheme: 'bearer',
|
|
6756
|
+
type: 'http'
|
|
6757
|
+
}],
|
|
6758
|
+
url: '/database/v1/databases/{database_id}/restore',
|
|
6759
|
+
...options
|
|
6760
|
+
});
|
|
6761
|
+
/**
|
|
6762
|
+
* Permanently purge database
|
|
6763
|
+
*
|
|
6764
|
+
* Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.
|
|
6765
|
+
*/
|
|
6766
|
+
export const databasePurgeDatabase = (options) => (options.client ?? client).post({
|
|
6767
|
+
security: [{
|
|
6768
|
+
key: 'database-bearerAuth',
|
|
6769
|
+
scheme: 'bearer',
|
|
6770
|
+
type: 'http'
|
|
6771
|
+
}],
|
|
6772
|
+
url: '/database/v1/databases/{database_id}/purge',
|
|
6773
|
+
...options
|
|
6774
|
+
});
|
|
6775
|
+
/**
|
|
6776
|
+
* List tables
|
|
6777
|
+
*
|
|
6778
|
+
* 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.
|
|
6779
|
+
*/
|
|
6780
|
+
export const databaseListTables = (options) => (options.client ?? client).get({
|
|
6781
|
+
security: [{
|
|
6782
|
+
key: 'database-bearerAuth',
|
|
6783
|
+
scheme: 'bearer',
|
|
6784
|
+
type: 'http'
|
|
6785
|
+
}],
|
|
6786
|
+
url: '/database/v1/databases/{database_id}/tables',
|
|
6787
|
+
...options
|
|
6788
|
+
});
|
|
6789
|
+
/**
|
|
6790
|
+
* Create table
|
|
6791
|
+
*
|
|
6792
|
+
* 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.
|
|
6793
|
+
*/
|
|
6794
|
+
export const databaseCreateTable = (options) => (options.client ?? client).post({
|
|
6795
|
+
security: [{
|
|
6796
|
+
key: 'database-bearerAuth',
|
|
6797
|
+
scheme: 'bearer',
|
|
6798
|
+
type: 'http'
|
|
6799
|
+
}],
|
|
6800
|
+
url: '/database/v1/databases/{database_id}/tables',
|
|
6801
|
+
...options,
|
|
6802
|
+
headers: {
|
|
6803
|
+
'Content-Type': 'application/json',
|
|
6804
|
+
...options.headers
|
|
6805
|
+
}
|
|
6806
|
+
});
|
|
6807
|
+
/**
|
|
6808
|
+
* Delete table
|
|
6809
|
+
*
|
|
6810
|
+
* 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.
|
|
6811
|
+
*/
|
|
6812
|
+
export const databaseDeleteTable = (options) => (options.client ?? client).delete({
|
|
6813
|
+
security: [{
|
|
6814
|
+
key: 'database-bearerAuth',
|
|
6815
|
+
scheme: 'bearer',
|
|
6816
|
+
type: 'http'
|
|
6817
|
+
}],
|
|
6818
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6819
|
+
...options
|
|
6820
|
+
});
|
|
6821
|
+
/**
|
|
6822
|
+
* Get table
|
|
6823
|
+
*
|
|
6824
|
+
* 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.
|
|
6825
|
+
*/
|
|
6826
|
+
export const databaseGetTable = (options) => (options.client ?? client).get({
|
|
6827
|
+
security: [{
|
|
6828
|
+
key: 'database-bearerAuth',
|
|
6829
|
+
scheme: 'bearer',
|
|
6830
|
+
type: 'http'
|
|
6831
|
+
}],
|
|
6832
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6833
|
+
...options
|
|
6834
|
+
});
|
|
6835
|
+
/**
|
|
6836
|
+
* Update table
|
|
6837
|
+
*
|
|
6838
|
+
* 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.
|
|
6839
|
+
*/
|
|
6840
|
+
export const databaseUpdateTable = (options) => (options.client ?? client).patch({
|
|
6841
|
+
security: [{
|
|
6842
|
+
key: 'database-bearerAuth',
|
|
6843
|
+
scheme: 'bearer',
|
|
6844
|
+
type: 'http'
|
|
6845
|
+
}],
|
|
6846
|
+
url: '/database/v1/databases/{database_id}/tables/{table}',
|
|
6847
|
+
...options,
|
|
6848
|
+
headers: {
|
|
6849
|
+
'Content-Type': 'application/json',
|
|
6850
|
+
...options.headers
|
|
6851
|
+
}
|
|
6852
|
+
});
|
|
6853
|
+
/**
|
|
6854
|
+
* Add field
|
|
6855
|
+
*
|
|
6856
|
+
* 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.
|
|
6857
|
+
*/
|
|
6858
|
+
export const databaseAddField = (options) => (options.client ?? client).post({
|
|
6859
|
+
security: [{
|
|
6860
|
+
key: 'database-bearerAuth',
|
|
6861
|
+
scheme: 'bearer',
|
|
6862
|
+
type: 'http'
|
|
6863
|
+
}],
|
|
6864
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields',
|
|
6865
|
+
...options,
|
|
6866
|
+
headers: {
|
|
6867
|
+
'Content-Type': 'application/json',
|
|
6868
|
+
...options.headers
|
|
6869
|
+
}
|
|
6870
|
+
});
|
|
6871
|
+
/**
|
|
6872
|
+
* Delete field
|
|
6873
|
+
*
|
|
6874
|
+
* 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.
|
|
6875
|
+
*/
|
|
6876
|
+
export const databaseDeleteField = (options) => (options.client ?? client).delete({
|
|
6877
|
+
security: [{
|
|
6878
|
+
key: 'database-bearerAuth',
|
|
6879
|
+
scheme: 'bearer',
|
|
6880
|
+
type: 'http'
|
|
6881
|
+
}],
|
|
6882
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
|
|
6883
|
+
...options
|
|
6884
|
+
});
|
|
6885
|
+
/**
|
|
6886
|
+
* Update field
|
|
6887
|
+
*
|
|
6888
|
+
* 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.
|
|
6889
|
+
*/
|
|
6890
|
+
export const databaseUpdateField = (options) => (options.client ?? client).patch({
|
|
6891
|
+
security: [{
|
|
6892
|
+
key: 'database-bearerAuth',
|
|
6893
|
+
scheme: 'bearer',
|
|
6894
|
+
type: 'http'
|
|
6895
|
+
}],
|
|
6896
|
+
url: '/database/v1/databases/{database_id}/tables/{table}/fields/{field}',
|
|
6897
|
+
...options,
|
|
6898
|
+
headers: {
|
|
6899
|
+
'Content-Type': 'application/json',
|
|
6900
|
+
...options.headers
|
|
6901
|
+
}
|
|
6902
|
+
});
|
|
6903
|
+
/**
|
|
6904
|
+
* List events
|
|
6905
|
+
*
|
|
6906
|
+
* 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.
|
|
6907
|
+
*/
|
|
6908
|
+
export const databaseListEvents = (options) => (options.client ?? client).get({
|
|
6909
|
+
security: [{
|
|
6910
|
+
key: 'database-bearerAuth',
|
|
6911
|
+
scheme: 'bearer',
|
|
6912
|
+
type: 'http'
|
|
6913
|
+
}],
|
|
6914
|
+
url: '/database/v1/databases/{database_id}/events',
|
|
6915
|
+
...options
|
|
6916
|
+
});
|
|
6917
|
+
/**
|
|
6918
|
+
* Delete rows
|
|
6919
|
+
*
|
|
6920
|
+
* 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.
|
|
6921
|
+
*/
|
|
6922
|
+
export const databaseDelete = (options) => (options.client ?? client).delete({
|
|
6923
|
+
security: [{
|
|
6924
|
+
key: 'database-bearerAuth',
|
|
6925
|
+
scheme: 'bearer',
|
|
6926
|
+
type: 'http'
|
|
6927
|
+
}],
|
|
6928
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
6929
|
+
...options
|
|
6930
|
+
});
|
|
6931
|
+
/**
|
|
6932
|
+
* Select rows
|
|
6933
|
+
*
|
|
6934
|
+
* 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.
|
|
6935
|
+
*/
|
|
6936
|
+
export const databaseSelect = (options) => (options.client ?? client).get({
|
|
6937
|
+
security: [{
|
|
6938
|
+
key: 'database-bearerAuth',
|
|
6939
|
+
scheme: 'bearer',
|
|
6940
|
+
type: 'http'
|
|
6941
|
+
}],
|
|
6942
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
6943
|
+
...options
|
|
6944
|
+
});
|
|
6945
|
+
/**
|
|
6946
|
+
* Count rows
|
|
6947
|
+
*
|
|
6948
|
+
* 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.
|
|
6949
|
+
*/
|
|
6950
|
+
export const databaseHead = (options) => (options.client ?? client).head({
|
|
6951
|
+
security: [{
|
|
6952
|
+
key: 'database-bearerAuth',
|
|
6953
|
+
scheme: 'bearer',
|
|
6954
|
+
type: 'http'
|
|
6955
|
+
}],
|
|
6956
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
6957
|
+
...options
|
|
6958
|
+
});
|
|
6959
|
+
/**
|
|
6960
|
+
* Update rows
|
|
6961
|
+
*
|
|
6962
|
+
* 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.
|
|
6963
|
+
*/
|
|
6964
|
+
export const databaseUpdate = (options) => (options.client ?? client).patch({
|
|
6965
|
+
security: [{
|
|
6966
|
+
key: 'database-bearerAuth',
|
|
6967
|
+
scheme: 'bearer',
|
|
6968
|
+
type: 'http'
|
|
6969
|
+
}],
|
|
6970
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
6971
|
+
...options,
|
|
6972
|
+
headers: {
|
|
6973
|
+
'Content-Type': 'application/json',
|
|
6974
|
+
...options.headers
|
|
6975
|
+
}
|
|
6976
|
+
});
|
|
6977
|
+
/**
|
|
6978
|
+
* Insert rows
|
|
6979
|
+
*
|
|
6980
|
+
* 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.
|
|
6981
|
+
* Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
6982
|
+
* The 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.
|
|
6983
|
+
*/
|
|
6984
|
+
export const databaseInsert = (options) => (options.client ?? client).post({
|
|
6985
|
+
security: [{
|
|
6986
|
+
key: 'database-bearerAuth',
|
|
6987
|
+
scheme: 'bearer',
|
|
6988
|
+
type: 'http'
|
|
6989
|
+
}],
|
|
6990
|
+
url: '/database/v1/databases/{database_id}/rest/{table}',
|
|
6991
|
+
...options,
|
|
6992
|
+
headers: {
|
|
6993
|
+
'Content-Type': 'application/json',
|
|
6994
|
+
...options.headers
|
|
6995
|
+
}
|
|
6996
|
+
});
|
|
6997
|
+
/**
|
|
6998
|
+
* List knowledge bases
|
|
6999
|
+
*
|
|
7000
|
+
* Lists knowledge bases visible to the caller, newest first by default. Use last_id as after to read the next page; for example, ?limit=20.
|
|
7001
|
+
*/
|
|
7002
|
+
export const knowledgeListVectorStores = (options) => (options?.client ?? client).get({
|
|
7003
|
+
security: [{
|
|
7004
|
+
key: 'knowledge-bearerAuth',
|
|
7005
|
+
scheme: 'bearer',
|
|
7006
|
+
type: 'http'
|
|
7007
|
+
}],
|
|
7008
|
+
url: '/knowledge/v1/vector_stores',
|
|
7009
|
+
...options
|
|
7010
|
+
});
|
|
7011
|
+
/**
|
|
7012
|
+
* Create knowledge base
|
|
7013
|
+
*
|
|
7014
|
+
* Create a knowledge base, optionally starting ingestion of uploaded file_ids in the same call; no separate attachment or batch is needed for those files. Use the returned id with vectorStores.files.retrieve to poll each attachment until completed, failed or cancelled; store status=completed alone does not mean every file succeeded. Each file accepts up to 52428800 bytes and 5000000 estimated tokens; each account holds up to 100 active/nondeleted stores. Minimal body: {"name":"Refund policies"}.
|
|
7015
|
+
*/
|
|
7016
|
+
export const knowledgeCreateVectorStore = (options) => (options.client ?? client).post({
|
|
7017
|
+
security: [{
|
|
7018
|
+
key: 'knowledge-bearerAuth',
|
|
7019
|
+
scheme: 'bearer',
|
|
7020
|
+
type: 'http'
|
|
7021
|
+
}],
|
|
7022
|
+
url: '/knowledge/v1/vector_stores',
|
|
7023
|
+
...options,
|
|
7024
|
+
headers: {
|
|
7025
|
+
'Content-Type': 'application/json',
|
|
7026
|
+
...options.headers
|
|
7027
|
+
}
|
|
7028
|
+
});
|
|
7029
|
+
/**
|
|
7030
|
+
* Delete knowledge base
|
|
7031
|
+
*
|
|
7032
|
+
* Remove a knowledge base from active use while keeping a recovery window. Unlike OpenAI vector stores, native DELETE returns the store with status=deleting and ISO purge_at, retains it for 7 days and is idempotent on repeat. Retrieve remains 200; object operations return 409. Use restore before purge_at to recover it, or purge to remove it irreversibly.
|
|
7033
|
+
*/
|
|
7034
|
+
export const knowledgeDeleteVectorStore = (options) => (options.client ?? client).delete({
|
|
7035
|
+
security: [{
|
|
7036
|
+
key: 'knowledge-bearerAuth',
|
|
7037
|
+
scheme: 'bearer',
|
|
7038
|
+
type: 'http'
|
|
7039
|
+
}],
|
|
7040
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
7041
|
+
...options
|
|
7042
|
+
});
|
|
7043
|
+
/**
|
|
7044
|
+
* Retrieve knowledge base
|
|
7045
|
+
*
|
|
7046
|
+
* Retrieves a knowledge base using an id returned by create or list. Add ?expand=files to include the first page of attached files. Soft-deleted stores remain readable with status=deleting until purged.
|
|
7047
|
+
*/
|
|
7048
|
+
export const knowledgeRetrieveVectorStore = (options) => (options.client ?? client).get({
|
|
7049
|
+
security: [{
|
|
7050
|
+
key: 'knowledge-bearerAuth',
|
|
7051
|
+
scheme: 'bearer',
|
|
7052
|
+
type: 'http'
|
|
7053
|
+
}],
|
|
7054
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
7055
|
+
...options
|
|
7056
|
+
});
|
|
7057
|
+
/**
|
|
7058
|
+
* Update knowledge base
|
|
7059
|
+
*
|
|
7060
|
+
* Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.
|
|
7061
|
+
*/
|
|
7062
|
+
export const knowledgeUpdateVectorStore = (options) => (options.client ?? client).post({
|
|
7063
|
+
security: [{
|
|
7064
|
+
key: 'knowledge-bearerAuth',
|
|
7065
|
+
scheme: 'bearer',
|
|
7066
|
+
type: 'http'
|
|
7067
|
+
}],
|
|
7068
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}',
|
|
7069
|
+
...options,
|
|
7070
|
+
headers: {
|
|
7071
|
+
'Content-Type': 'application/json',
|
|
7072
|
+
...options.headers
|
|
7073
|
+
}
|
|
7074
|
+
});
|
|
7075
|
+
/**
|
|
7076
|
+
* Search knowledge base
|
|
7077
|
+
*
|
|
7078
|
+
* Search ingested text to answer a question or find supporting passages. Native results contain one chunk each, so file_id can repeat; max_num_results counts chunks (1–50, default 10), while the compatible URL groups results by file. Unlike OpenAI vector stores, next_page is always null even when has_more is true. Only completed attachments are searchable. For keyword-only retrieval set ranking_options.hybrid_search to {"embedding_weight":0,"text_weight":1}; omit rewrite_query or set it to false to avoid query rewriting. Unlike OpenAI, ranker auto does not rerank; only default-2024-11-15 requests reranking. Set praxis.explain=true to inspect scores and use returned content[].chunk_id to retrieve a segment.
|
|
7079
|
+
*/
|
|
7080
|
+
export const knowledgeSearchVectorStore = (options) => (options.client ?? client).post({
|
|
7081
|
+
security: [{
|
|
7082
|
+
key: 'knowledge-bearerAuth',
|
|
7083
|
+
scheme: 'bearer',
|
|
7084
|
+
type: 'http'
|
|
7085
|
+
}],
|
|
7086
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/search',
|
|
7087
|
+
...options,
|
|
7088
|
+
headers: {
|
|
7089
|
+
'Content-Type': 'application/json',
|
|
7090
|
+
...options.headers
|
|
7091
|
+
}
|
|
7092
|
+
});
|
|
7093
|
+
/**
|
|
7094
|
+
* List files
|
|
7095
|
+
*
|
|
7096
|
+
* Lists attached files and their ingestion status, newest attachment first by default. Use last_id as after to continue; ?filter=failed selects files that can be retried.
|
|
7097
|
+
*/
|
|
7098
|
+
export const knowledgeListFiles = (options) => (options.client ?? client).get({
|
|
7099
|
+
security: [{
|
|
7100
|
+
key: 'knowledge-bearerAuth',
|
|
7101
|
+
scheme: 'bearer',
|
|
7102
|
+
type: 'http'
|
|
7103
|
+
}],
|
|
7104
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
|
|
7105
|
+
...options
|
|
7106
|
+
});
|
|
7107
|
+
/**
|
|
7108
|
+
* Add file
|
|
7109
|
+
*
|
|
7110
|
+
* Attach an uploaded File for asynchronous ingestion, then poll this attachment until status is completed, failed or cancelled before searching. Each file accepts up to 52428800 bytes and 5000000 estimated tokens; chunk sizes use estimated tokens rather than a model tokenizer. Text, Markdown, CSV, JSON, HTML, PDF, DOCX, PPTX, XLSX and PNG/JPEG/GIF/WebP images can be extracted; audio and video uploads are not knowledge documents. Images may yield generated descriptions rather than verbatim OCR. auto chunking resolves to static 800/400; explicit sizes are 100–4096 with overlap at most half the size. Each store holds at most 10000 attached files. Reattaching the same file returns its existing record without applying new attributes or chunking; inspect last_error after failure.
|
|
7111
|
+
*/
|
|
7112
|
+
export const knowledgeAttachFile = (options) => (options.client ?? client).post({
|
|
7113
|
+
security: [{
|
|
7114
|
+
key: 'knowledge-bearerAuth',
|
|
7115
|
+
scheme: 'bearer',
|
|
7116
|
+
type: 'http'
|
|
7117
|
+
}],
|
|
7118
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files',
|
|
7119
|
+
...options,
|
|
7120
|
+
headers: {
|
|
7121
|
+
'Content-Type': 'application/json',
|
|
7122
|
+
...options.headers
|
|
7123
|
+
}
|
|
7124
|
+
});
|
|
7125
|
+
/**
|
|
7126
|
+
* Remove file
|
|
7127
|
+
*
|
|
7128
|
+
* Removes the file from search immediately; does not delete the original File.
|
|
7129
|
+
*/
|
|
7130
|
+
export const knowledgeRemoveFile = (options) => (options.client ?? client).delete({
|
|
7131
|
+
security: [{
|
|
7132
|
+
key: 'knowledge-bearerAuth',
|
|
7133
|
+
scheme: 'bearer',
|
|
7134
|
+
type: 'http'
|
|
7135
|
+
}],
|
|
7136
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
7137
|
+
...options
|
|
7138
|
+
});
|
|
7139
|
+
/**
|
|
7140
|
+
* Retrieve file
|
|
7141
|
+
*
|
|
7142
|
+
* Retrieves an attached file using the id returned by attachment or file listing. Poll this operation until status leaves in_progress to observe the ingestion outcome.
|
|
7143
|
+
*/
|
|
7144
|
+
export const knowledgeRetrieveFile = (options) => (options.client ?? client).get({
|
|
7145
|
+
security: [{
|
|
7146
|
+
key: 'knowledge-bearerAuth',
|
|
7147
|
+
scheme: 'bearer',
|
|
7148
|
+
type: 'http'
|
|
7149
|
+
}],
|
|
7150
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
7151
|
+
...options
|
|
7152
|
+
});
|
|
7153
|
+
/**
|
|
7154
|
+
* Update file attributes
|
|
7155
|
+
*
|
|
7156
|
+
* Replaces search-filter attributes of an existing attachment without reingesting its content. Use an attached file id. Example body: {"attributes":{"category":"refund"}}; null clears the attributes.
|
|
7157
|
+
*/
|
|
7158
|
+
export const knowledgeUpdateFile = (options) => (options.client ?? client).post({
|
|
7159
|
+
security: [{
|
|
7160
|
+
key: 'knowledge-bearerAuth',
|
|
7161
|
+
scheme: 'bearer',
|
|
7162
|
+
type: 'http'
|
|
7163
|
+
}],
|
|
7164
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}',
|
|
7165
|
+
...options,
|
|
7166
|
+
headers: {
|
|
7167
|
+
'Content-Type': 'application/json',
|
|
7168
|
+
...options.headers
|
|
7169
|
+
}
|
|
7170
|
+
});
|
|
7171
|
+
/**
|
|
7172
|
+
* Read extracted content
|
|
7173
|
+
*
|
|
7174
|
+
* Extracted text chunks may overlap. Image content can be a generated description rather than verbatim OCR.
|
|
7175
|
+
*/
|
|
7176
|
+
export const knowledgeRetrieveFileContent = (options) => (options.client ?? client).get({
|
|
7177
|
+
security: [{
|
|
7178
|
+
key: 'knowledge-bearerAuth',
|
|
7179
|
+
scheme: 'bearer',
|
|
7180
|
+
type: 'http'
|
|
7181
|
+
}],
|
|
7182
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/content',
|
|
7183
|
+
...options
|
|
7184
|
+
});
|
|
7185
|
+
/**
|
|
7186
|
+
* Create file batch
|
|
7187
|
+
*
|
|
7188
|
+
* Attaches existing Files as a batch for asynchronous ingestion. Supply exactly one of file_ids or files; files allows per-file settings. Existing attachments are reused. Read the returned batch id to monitor status.
|
|
7189
|
+
*/
|
|
7190
|
+
export const knowledgeCreateFileBatch = (options) => (options.client ?? client).post({
|
|
7191
|
+
security: [{
|
|
7192
|
+
key: 'knowledge-bearerAuth',
|
|
7193
|
+
scheme: 'bearer',
|
|
7194
|
+
type: 'http'
|
|
7195
|
+
}],
|
|
7196
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches',
|
|
7197
|
+
...options,
|
|
7198
|
+
headers: {
|
|
7199
|
+
'Content-Type': 'application/json',
|
|
7200
|
+
...options.headers
|
|
7201
|
+
}
|
|
7202
|
+
});
|
|
7203
|
+
/**
|
|
7204
|
+
* Retrieve file batch
|
|
7205
|
+
*
|
|
7206
|
+
* Retrieves a batch created in this knowledge base, including current status and file counts. Use the batch id returned by batch creation to monitor ingestion.
|
|
7207
|
+
*/
|
|
7208
|
+
export const knowledgeRetrieveFileBatch = (options) => (options.client ?? client).get({
|
|
7209
|
+
security: [{
|
|
7210
|
+
key: 'knowledge-bearerAuth',
|
|
7211
|
+
scheme: 'bearer',
|
|
7212
|
+
type: 'http'
|
|
7213
|
+
}],
|
|
7214
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}',
|
|
7215
|
+
...options
|
|
7216
|
+
});
|
|
7217
|
+
/**
|
|
7218
|
+
* Cancel file batch
|
|
7219
|
+
*
|
|
7220
|
+
* Cancels only in-progress batches and pending files. Completed, failed and cancelled batches return unchanged (200, idempotent).
|
|
7221
|
+
*/
|
|
7222
|
+
export const knowledgeCancelFileBatch = (options) => (options.client ?? client).post({
|
|
7223
|
+
security: [{
|
|
7224
|
+
key: 'knowledge-bearerAuth',
|
|
7225
|
+
scheme: 'bearer',
|
|
7226
|
+
type: 'http'
|
|
7227
|
+
}],
|
|
7228
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel',
|
|
7229
|
+
...options
|
|
7230
|
+
});
|
|
7231
|
+
/**
|
|
7232
|
+
* List batch files
|
|
7233
|
+
*
|
|
7234
|
+
* Lists files still attached from the identified batch, newest attachment first by default. Use the batch creation id and ?filter=failed to inspect failures; last_id is the next after cursor.
|
|
7235
|
+
*/
|
|
7236
|
+
export const knowledgeListBatchFiles = (options) => (options.client ?? client).get({
|
|
7237
|
+
security: [{
|
|
7238
|
+
key: 'knowledge-bearerAuth',
|
|
7239
|
+
scheme: 'bearer',
|
|
7240
|
+
type: 'http'
|
|
7241
|
+
}],
|
|
7242
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files',
|
|
7243
|
+
...options
|
|
7244
|
+
});
|
|
7245
|
+
/**
|
|
7246
|
+
* Restore knowledge base
|
|
7247
|
+
*
|
|
7248
|
+
* Restores a deleting store within 7 days. Active stores return 409 VECTOR_STORE_INVALID_STATE; absent stores return 404. Empty body is allowed.
|
|
7249
|
+
*/
|
|
7250
|
+
export const knowledgeRestoreVectorStore = (options) => (options.client ?? client).post({
|
|
7251
|
+
security: [{
|
|
7252
|
+
key: 'knowledge-bearerAuth',
|
|
7253
|
+
scheme: 'bearer',
|
|
7254
|
+
type: 'http'
|
|
7255
|
+
}],
|
|
7256
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/restore',
|
|
7257
|
+
...options
|
|
7258
|
+
});
|
|
7259
|
+
/**
|
|
7260
|
+
* Permanently purge knowledge base
|
|
7261
|
+
*
|
|
7262
|
+
* Immediately and irreversibly clears a deleting store using the retention cleanup path. Active stores return 409; absent stores return 404. Empty body is allowed.
|
|
7263
|
+
*/
|
|
7264
|
+
export const knowledgePurgeVectorStore = (options) => (options.client ?? client).post({
|
|
7265
|
+
security: [{
|
|
7266
|
+
key: 'knowledge-bearerAuth',
|
|
7267
|
+
scheme: 'bearer',
|
|
7268
|
+
type: 'http'
|
|
7269
|
+
}],
|
|
7270
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/purge',
|
|
7271
|
+
...options
|
|
7272
|
+
});
|
|
7273
|
+
/**
|
|
7274
|
+
* Retry failed file
|
|
7275
|
+
*
|
|
7276
|
+
* Retries only failed files; other states return 409 FILE_INVALID_STATE. Retry after failure has not yet been observed in the documented run.
|
|
7277
|
+
*/
|
|
7278
|
+
export const knowledgeRetryFile = (options) => (options.client ?? client).post({
|
|
7279
|
+
security: [{
|
|
7280
|
+
key: 'knowledge-bearerAuth',
|
|
7281
|
+
scheme: 'bearer',
|
|
7282
|
+
type: 'http'
|
|
7283
|
+
}],
|
|
7284
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry',
|
|
7285
|
+
...options
|
|
7286
|
+
});
|
|
7287
|
+
/**
|
|
7288
|
+
* List file segments
|
|
7289
|
+
*
|
|
7290
|
+
* Lists the stored chunks of an attached file, ordered by increasing segment index by default. Use the attachment id and last_id as after to continue; returned chunk ids can be retrieved individually.
|
|
7291
|
+
*/
|
|
7292
|
+
export const knowledgeListSegments = (options) => (options.client ?? client).get({
|
|
7293
|
+
security: [{
|
|
7294
|
+
key: 'knowledge-bearerAuth',
|
|
7295
|
+
scheme: 'bearer',
|
|
7296
|
+
type: 'http'
|
|
7297
|
+
}],
|
|
7298
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/segments',
|
|
7299
|
+
...options
|
|
7300
|
+
});
|
|
7301
|
+
/**
|
|
7302
|
+
* Retrieve segment
|
|
7303
|
+
*
|
|
7304
|
+
* Retrieves one chunk and its term statistics. Take chunk_id from segment listing or native search content; the chunk must belong to this knowledge base.
|
|
7305
|
+
*/
|
|
7306
|
+
export const knowledgeRetrieveSegment = (options) => (options.client ?? client).get({
|
|
7307
|
+
security: [{
|
|
7308
|
+
key: 'knowledge-bearerAuth',
|
|
7309
|
+
scheme: 'bearer',
|
|
7310
|
+
type: 'http'
|
|
7311
|
+
}],
|
|
7312
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/segments/{chunk_id}',
|
|
7313
|
+
...options
|
|
7314
|
+
});
|
|
7315
|
+
/**
|
|
7316
|
+
* List events
|
|
7317
|
+
*
|
|
7318
|
+
* Reads events for this knowledge base in increasing sequence order, including while soft-deleted. Pass next_seq as after_seq to continue; null next_seq marks the current end. Example: ?after_seq=0&limit=20.
|
|
7319
|
+
*/
|
|
7320
|
+
export const knowledgeListEvents = (options) => (options.client ?? client).get({
|
|
7321
|
+
security: [{
|
|
7322
|
+
key: 'knowledge-bearerAuth',
|
|
7323
|
+
scheme: 'bearer',
|
|
7324
|
+
type: 'http'
|
|
7325
|
+
}],
|
|
7326
|
+
url: '/knowledge/v1/vector_stores/{vector_store_id}/events',
|
|
7327
|
+
...options
|
|
7328
|
+
});
|
|
7329
|
+
/**
|
|
7330
|
+
* List libraries
|
|
7331
|
+
*
|
|
7332
|
+
* List libraries owned by the caller, newest first. By default, deleting and deleted libraries are excluded; use status=deleting to find libraries awaiting purge. All supplied label pairs must match.
|
|
7333
|
+
*/
|
|
7334
|
+
export const mediaListLibraries = (options) => (options?.client ?? client).get({
|
|
7335
|
+
security: [{
|
|
7336
|
+
key: 'media-BearerAuth',
|
|
7337
|
+
scheme: 'bearer',
|
|
7338
|
+
type: 'http'
|
|
7339
|
+
}],
|
|
7340
|
+
url: '/media/v1/libraries',
|
|
7341
|
+
...options
|
|
7342
|
+
});
|
|
7343
|
+
/**
|
|
7344
|
+
* Create library
|
|
7345
|
+
*
|
|
7346
|
+
* Create a library owned by the caller with a name, optional labels and understanding settings. Understanding is enabled by default; the returned id is used for subsequent asset operations.
|
|
7347
|
+
*/
|
|
7348
|
+
export const mediaCreateLibrary = (options) => (options.client ?? client).post({
|
|
7349
|
+
security: [{
|
|
7350
|
+
key: 'media-BearerAuth',
|
|
7351
|
+
scheme: 'bearer',
|
|
7352
|
+
type: 'http'
|
|
7353
|
+
}],
|
|
7354
|
+
url: '/media/v1/libraries',
|
|
7355
|
+
...options,
|
|
7356
|
+
headers: {
|
|
7357
|
+
'Content-Type': 'application/json',
|
|
7358
|
+
...options.headers
|
|
7359
|
+
}
|
|
7360
|
+
});
|
|
7361
|
+
/**
|
|
7362
|
+
* Delete library
|
|
7363
|
+
*
|
|
7364
|
+
* Soft-delete an active library, returning its deleting status and purge_at deadline. Asset operations and delivery become unavailable; the library can be restored before purge_at. Repeated deletion while deleting returns the current library.
|
|
7365
|
+
*/
|
|
7366
|
+
export const mediaDeleteLibrary = (options) => (options.client ?? client).delete({
|
|
7367
|
+
security: [{
|
|
7368
|
+
key: 'media-BearerAuth',
|
|
7369
|
+
scheme: 'bearer',
|
|
7370
|
+
type: 'http'
|
|
7371
|
+
}],
|
|
7372
|
+
url: '/media/v1/libraries/{library_id}',
|
|
7373
|
+
...options
|
|
7374
|
+
});
|
|
7375
|
+
/**
|
|
7376
|
+
* Get library
|
|
7377
|
+
*
|
|
7378
|
+
* Read a caller-owned library’s current settings, usage and lifecycle status. A deleting library remains readable; missing, foreign or purged libraries return LIBRARY_NOT_FOUND.
|
|
7379
|
+
*/
|
|
7380
|
+
export const mediaGetLibrary = (options) => (options.client ?? client).get({
|
|
7381
|
+
security: [{
|
|
7382
|
+
key: 'media-BearerAuth',
|
|
7383
|
+
scheme: 'bearer',
|
|
7384
|
+
type: 'http'
|
|
7385
|
+
}],
|
|
7386
|
+
url: '/media/v1/libraries/{library_id}',
|
|
7387
|
+
...options
|
|
7388
|
+
});
|
|
7389
|
+
/**
|
|
7390
|
+
* Update library
|
|
7391
|
+
*
|
|
7392
|
+
* Update an active library’s supplied settings. Labels replace the complete map; understanding settings and model roles merge with current values. Changing the embedding model is rejected while assets exist.
|
|
7393
|
+
*/
|
|
7394
|
+
export const mediaUpdateLibrary = (options) => (options.client ?? client).patch({
|
|
7395
|
+
security: [{
|
|
7396
|
+
key: 'media-BearerAuth',
|
|
7397
|
+
scheme: 'bearer',
|
|
7398
|
+
type: 'http'
|
|
7399
|
+
}],
|
|
7400
|
+
url: '/media/v1/libraries/{library_id}',
|
|
7401
|
+
...options,
|
|
7402
|
+
headers: {
|
|
7403
|
+
'Content-Type': 'application/json',
|
|
7404
|
+
...options.headers
|
|
7405
|
+
}
|
|
7406
|
+
});
|
|
7407
|
+
/**
|
|
7408
|
+
* Restore library
|
|
7409
|
+
*
|
|
7410
|
+
* Restore a deleting library before its purge_at deadline. The library becomes active again and deleted_at and purge_at are cleared; expired or non-deleting libraries cannot be restored.
|
|
7411
|
+
*/
|
|
7412
|
+
export const mediaRestoreLibrary = (options) => (options.client ?? client).post({
|
|
7413
|
+
security: [{
|
|
7414
|
+
key: 'media-BearerAuth',
|
|
7415
|
+
scheme: 'bearer',
|
|
7416
|
+
type: 'http'
|
|
7417
|
+
}],
|
|
7418
|
+
url: '/media/v1/libraries/{library_id}/restore',
|
|
7419
|
+
...options
|
|
7420
|
+
});
|
|
7421
|
+
/**
|
|
7422
|
+
* Purge library
|
|
7423
|
+
*
|
|
7424
|
+
* Permanently remove a library that is already deleting, without waiting for purge_at. Its assets and related resources are removed and cannot be restored; first soft-delete an active library.
|
|
7425
|
+
*/
|
|
7426
|
+
export const mediaPurgeLibrary = (options) => (options.client ?? client).post({
|
|
7427
|
+
security: [{
|
|
7428
|
+
key: 'media-BearerAuth',
|
|
7429
|
+
scheme: 'bearer',
|
|
7430
|
+
type: 'http'
|
|
7431
|
+
}],
|
|
7432
|
+
url: '/media/v1/libraries/{library_id}/purge',
|
|
7433
|
+
...options
|
|
7434
|
+
});
|
|
7435
|
+
/**
|
|
7436
|
+
* List assets
|
|
7437
|
+
*
|
|
7438
|
+
* List assets in an active library, newest first, optionally filtering by exact folder and stored resource type. Continue using next_cursor; video includes audio-only assets.
|
|
7439
|
+
*/
|
|
7440
|
+
export const mediaListAssets = (options) => (options.client ?? client).get({
|
|
7441
|
+
security: [{
|
|
7442
|
+
key: 'media-BearerAuth',
|
|
7443
|
+
scheme: 'bearer',
|
|
7444
|
+
type: 'http'
|
|
7445
|
+
}],
|
|
7446
|
+
url: '/media/v1/libraries/{library_id}/assets',
|
|
7447
|
+
...options
|
|
7448
|
+
});
|
|
7449
|
+
/**
|
|
7450
|
+
* Upload asset
|
|
7451
|
+
*
|
|
7452
|
+
* Upload content into an active library and return a Cloudinary-compatible resource. Use file for a multipart file, data URI, public HTTPS URL or same-owner file identifier. Reusing public_id overwrites by default; overwrite=false returns the existing resource. Chunk uploads require both chunk headers.
|
|
7453
|
+
*/
|
|
7454
|
+
export const mediaUploadAsset = (options) => (options.client ?? client).post({
|
|
7455
|
+
security: [{
|
|
7456
|
+
key: 'media-BearerAuth',
|
|
7457
|
+
scheme: 'bearer',
|
|
7458
|
+
type: 'http'
|
|
7459
|
+
}],
|
|
7460
|
+
url: '/media/v1/libraries/{library_id}/assets',
|
|
7461
|
+
...options,
|
|
7462
|
+
headers: {
|
|
7463
|
+
'Content-Type': 'application/json',
|
|
7464
|
+
...options.headers
|
|
7465
|
+
}
|
|
7466
|
+
});
|
|
7467
|
+
/**
|
|
7468
|
+
* Import file
|
|
7469
|
+
*
|
|
7470
|
+
* Copy source content into an active library using upload options and return the full native Asset. The imported asset is independent of the source after copying. Reusing public_id follows overwrite semantics.
|
|
7471
|
+
*/
|
|
7472
|
+
export const mediaImportAsset = (options) => (options.client ?? client).post({
|
|
7473
|
+
security: [{
|
|
7474
|
+
key: 'media-BearerAuth',
|
|
7475
|
+
scheme: 'bearer',
|
|
7476
|
+
type: 'http'
|
|
7477
|
+
}],
|
|
7478
|
+
url: '/media/v1/libraries/{library_id}/assets/import',
|
|
7479
|
+
...options,
|
|
7480
|
+
headers: {
|
|
7481
|
+
'Content-Type': 'application/json',
|
|
7482
|
+
...options.headers
|
|
7483
|
+
}
|
|
7484
|
+
});
|
|
7485
|
+
/**
|
|
7486
|
+
* Delete asset
|
|
7487
|
+
*
|
|
7488
|
+
* Delete an asset from the library so it is no longer readable, searchable or deliverable. This removes the asset rather than placing it in the library’s restoration window; a missing asset returns ASSET_NOT_FOUND.
|
|
7489
|
+
*/
|
|
7490
|
+
export const mediaDeleteAsset = (options) => (options.client ?? client).delete({
|
|
7491
|
+
security: [{
|
|
7492
|
+
key: 'media-BearerAuth',
|
|
7493
|
+
scheme: 'bearer',
|
|
7494
|
+
type: 'http'
|
|
7495
|
+
}],
|
|
7496
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
|
|
7497
|
+
...options
|
|
7498
|
+
});
|
|
7499
|
+
/**
|
|
7500
|
+
* Get asset
|
|
7501
|
+
*
|
|
7502
|
+
* Read a non-deleted asset by its asset_id in an active library, including content hashes, processing progress and available previews. Missing or deleted assets return ASSET_NOT_FOUND.
|
|
7503
|
+
*/
|
|
7504
|
+
export const mediaGetAsset = (options) => (options.client ?? client).get({
|
|
7505
|
+
security: [{
|
|
7506
|
+
key: 'media-BearerAuth',
|
|
7507
|
+
scheme: 'bearer',
|
|
7508
|
+
type: 'http'
|
|
7509
|
+
}],
|
|
7510
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
|
|
7511
|
+
...options
|
|
7512
|
+
});
|
|
7513
|
+
/**
|
|
7514
|
+
* Update asset
|
|
7515
|
+
*
|
|
7516
|
+
* Update an asset’s supplied metadata fields. Tags and context replace their current collections; an empty collection clears them. Moving asset_folder or changing display_name preserves public_id and delivery URLs.
|
|
7517
|
+
*/
|
|
7518
|
+
export const mediaUpdateAsset = (options) => (options.client ?? client).patch({
|
|
7519
|
+
security: [{
|
|
7520
|
+
key: 'media-BearerAuth',
|
|
7521
|
+
scheme: 'bearer',
|
|
7522
|
+
type: 'http'
|
|
7523
|
+
}],
|
|
7524
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}',
|
|
7525
|
+
...options,
|
|
7526
|
+
headers: {
|
|
7527
|
+
'Content-Type': 'application/json',
|
|
7528
|
+
...options.headers
|
|
7529
|
+
}
|
|
7530
|
+
});
|
|
7531
|
+
/**
|
|
7532
|
+
* Reprocess asset
|
|
7533
|
+
*
|
|
7534
|
+
* Queue reprocessing of the asset’s current version and return its updated state immediately. Omit kinds to retry failed tasks; explicit kinds rerun applicable completed tasks. Replaced understandings become superseded, and processing finishes asynchronously.
|
|
7535
|
+
*/
|
|
7536
|
+
export const mediaReprocessAsset = (options) => (options.client ?? client).post({
|
|
7537
|
+
security: [{
|
|
7538
|
+
key: 'media-BearerAuth',
|
|
7539
|
+
scheme: 'bearer',
|
|
7540
|
+
type: 'http'
|
|
7541
|
+
}],
|
|
7542
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess',
|
|
7543
|
+
...options,
|
|
7544
|
+
headers: {
|
|
7545
|
+
'Content-Type': 'application/json',
|
|
7546
|
+
...options.headers
|
|
7547
|
+
}
|
|
7548
|
+
});
|
|
7549
|
+
/**
|
|
7550
|
+
* List understandings
|
|
7551
|
+
*
|
|
7552
|
+
* List an asset’s understanding results in creation order. By default only current, non-superseded results are returned; use include_superseded=true for history or kind to select an output type.
|
|
7553
|
+
*/
|
|
7554
|
+
export const mediaListUnderstandings = (options) => (options.client ?? client).get({
|
|
7555
|
+
security: [{
|
|
7556
|
+
key: 'media-BearerAuth',
|
|
7557
|
+
scheme: 'bearer',
|
|
7558
|
+
type: 'http'
|
|
7559
|
+
}],
|
|
7560
|
+
url: '/media/v1/libraries/{library_id}/assets/{asset_id}/understandings',
|
|
7561
|
+
...options
|
|
7562
|
+
});
|
|
7563
|
+
/**
|
|
7564
|
+
* Expression search
|
|
7565
|
+
*
|
|
7566
|
+
* Search active assets using the supported filter-expression syntax, sorting and cursor pagination. Empty expression matches all assets. Tags and context require with_field; inspect the exactness flags before treating counts as complete.
|
|
7567
|
+
*/
|
|
7568
|
+
export const mediaExpressionSearch = (options) => (options.client ?? client).post({
|
|
7569
|
+
security: [{
|
|
7570
|
+
key: 'media-BearerAuth',
|
|
7571
|
+
scheme: 'bearer',
|
|
7572
|
+
type: 'http'
|
|
7573
|
+
}],
|
|
7574
|
+
url: '/media/v1/libraries/{library_id}/search/expression',
|
|
7575
|
+
...options,
|
|
7576
|
+
headers: {
|
|
7577
|
+
'Content-Type': 'application/json',
|
|
7578
|
+
...options.headers
|
|
7579
|
+
}
|
|
7580
|
+
});
|
|
7581
|
+
/**
|
|
7582
|
+
* Visual search
|
|
7583
|
+
*
|
|
7584
|
+
* Find visually similar assets using exactly one of asset_id or an inline base64 image. The library must support image search; an asset query needs a current image embedding and excludes that source asset from results.
|
|
7585
|
+
*/
|
|
7586
|
+
export const mediaVisualSearch = (options) => (options.client ?? client).post({
|
|
7587
|
+
security: [{
|
|
7588
|
+
key: 'media-BearerAuth',
|
|
7589
|
+
scheme: 'bearer',
|
|
7590
|
+
type: 'http'
|
|
7591
|
+
}],
|
|
7592
|
+
url: '/media/v1/libraries/{library_id}/search/visual',
|
|
7593
|
+
...options,
|
|
7594
|
+
headers: {
|
|
7595
|
+
'Content-Type': 'application/json',
|
|
7596
|
+
...options.headers
|
|
7597
|
+
}
|
|
7598
|
+
});
|
|
7599
|
+
/**
|
|
7600
|
+
* Semantic search
|
|
7601
|
+
*
|
|
7602
|
+
* Search assets with a nonblank text query and optional expression filter. Hybrid mode combines semantic and keyword matches; semantic mode uses vector similarity only. Results are ranked and limited by top_k.
|
|
7603
|
+
*/
|
|
7604
|
+
export const mediaSemanticSearch = (options) => (options.client ?? client).post({
|
|
7605
|
+
security: [{
|
|
7606
|
+
key: 'media-BearerAuth',
|
|
7607
|
+
scheme: 'bearer',
|
|
7608
|
+
type: 'http'
|
|
7609
|
+
}],
|
|
7610
|
+
url: '/media/v1/libraries/{library_id}/search/semantic',
|
|
7611
|
+
...options,
|
|
7612
|
+
headers: {
|
|
7613
|
+
'Content-Type': 'application/json',
|
|
7614
|
+
...options.headers
|
|
7615
|
+
}
|
|
7616
|
+
});
|
|
7617
|
+
/**
|
|
7618
|
+
* Semantic search alias
|
|
7619
|
+
*
|
|
7620
|
+
* Alias of semantic search. Search assets with a nonblank text query, optional expression filter and top_k; hybrid combines semantic and keyword matches, while semantic uses vector similarity only.
|
|
7621
|
+
*/
|
|
7622
|
+
export const mediaSearch = (options) => (options.client ?? client).post({
|
|
7623
|
+
security: [{
|
|
7624
|
+
key: 'media-BearerAuth',
|
|
7625
|
+
scheme: 'bearer',
|
|
7626
|
+
type: 'http'
|
|
7627
|
+
}],
|
|
7628
|
+
url: '/media/v1/libraries/{library_id}/search',
|
|
7629
|
+
...options,
|
|
7630
|
+
headers: {
|
|
7631
|
+
'Content-Type': 'application/json',
|
|
7632
|
+
...options.headers
|
|
7633
|
+
}
|
|
7634
|
+
});
|
|
7635
|
+
/**
|
|
7636
|
+
* List folders
|
|
7637
|
+
*
|
|
7638
|
+
* List all immediate child folders under parent, or under the root when parent is omitted. Counts include descendant assets. The result is unpaginated; limit and cursor are rejected.
|
|
7639
|
+
*/
|
|
7640
|
+
export const mediaListFolders = (options) => (options.client ?? client).get({
|
|
7641
|
+
security: [{
|
|
7642
|
+
key: 'media-BearerAuth',
|
|
7643
|
+
scheme: 'bearer',
|
|
7644
|
+
type: 'http'
|
|
7645
|
+
}],
|
|
7646
|
+
url: '/media/v1/libraries/{library_id}/folders',
|
|
7647
|
+
...options
|
|
7648
|
+
});
|
|
7649
|
+
/**
|
|
7650
|
+
* Create batch
|
|
7651
|
+
*
|
|
7652
|
+
* Create an asynchronous batch for tagging, untagging, replacing context, moving or deleting assets. Select ids or an expression; selection is frozen at creation. Poll the returned job id for completion and per-item failures.
|
|
7653
|
+
*/
|
|
7654
|
+
export const mediaCreateBatch = (options) => (options.client ?? client).post({
|
|
7655
|
+
security: [{
|
|
7656
|
+
key: 'media-BearerAuth',
|
|
7657
|
+
scheme: 'bearer',
|
|
7658
|
+
type: 'http'
|
|
7659
|
+
}],
|
|
7660
|
+
url: '/media/v1/libraries/{library_id}/batches',
|
|
7661
|
+
...options,
|
|
7662
|
+
headers: {
|
|
7663
|
+
'Content-Type': 'application/json',
|
|
7664
|
+
...options.headers
|
|
7665
|
+
}
|
|
7666
|
+
});
|
|
7667
|
+
/**
|
|
7668
|
+
* Get batch
|
|
7669
|
+
*
|
|
7670
|
+
* Read a batch job’s status, successful and failed item counts, and a bounded list of failed items. Use the id returned by batch creation; a job outside this library is not found.
|
|
7671
|
+
*/
|
|
7672
|
+
export const mediaGetBatch = (options) => (options.client ?? client).get({
|
|
7673
|
+
security: [{
|
|
7674
|
+
key: 'media-BearerAuth',
|
|
7675
|
+
scheme: 'bearer',
|
|
7676
|
+
type: 'http'
|
|
7677
|
+
}],
|
|
7678
|
+
url: '/media/v1/libraries/{library_id}/batches/{job_id}',
|
|
7679
|
+
...options
|
|
7680
|
+
});
|
|
7681
|
+
/**
|
|
7682
|
+
* Batch assets alias
|
|
7683
|
+
*
|
|
7684
|
+
* Alias of batch creation. Apply one metadata or deletion action to ids or a frozen expression selection asynchronously; poll the returned job id to inspect completion and item failures.
|
|
7685
|
+
*/
|
|
7686
|
+
export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
7687
|
+
security: [{
|
|
7688
|
+
key: 'media-BearerAuth',
|
|
7689
|
+
scheme: 'bearer',
|
|
7690
|
+
type: 'http'
|
|
7691
|
+
}],
|
|
7692
|
+
url: '/media/v1/libraries/{library_id}/assets:batch',
|
|
7693
|
+
...options,
|
|
7694
|
+
headers: {
|
|
7695
|
+
'Content-Type': 'application/json',
|
|
7696
|
+
...options.headers
|
|
7697
|
+
}
|
|
7698
|
+
});
|
|
7699
|
+
/**
|
|
7700
|
+
* Get job alias
|
|
7701
|
+
*
|
|
7702
|
+
* Alias of batch retrieval. Read the job returned by a batch request, including terminal status, successful and failed counts, and individual failure codes.
|
|
7703
|
+
*/
|
|
7704
|
+
export const mediaGetJob = (options) => (options.client ?? client).get({
|
|
7705
|
+
security: [{
|
|
7706
|
+
key: 'media-BearerAuth',
|
|
7707
|
+
scheme: 'bearer',
|
|
7708
|
+
type: 'http'
|
|
7709
|
+
}],
|
|
7710
|
+
url: '/media/v1/libraries/{library_id}/jobs/{job_id}',
|
|
7711
|
+
...options
|
|
7712
|
+
});
|
|
7713
|
+
/**
|
|
7714
|
+
* List events
|
|
7715
|
+
*
|
|
7716
|
+
* Read library events in sequence order, including while the library is deleting. Page forward with asc and after_seq, or backward with desc and before_seq; never combine the two sequence cursors.
|
|
7717
|
+
*/
|
|
7718
|
+
export const mediaListEvents = (options) => (options.client ?? client).get({
|
|
7719
|
+
security: [{
|
|
7720
|
+
key: 'media-BearerAuth',
|
|
7721
|
+
scheme: 'bearer',
|
|
7722
|
+
type: 'http'
|
|
7723
|
+
}],
|
|
7724
|
+
url: '/media/v1/libraries/{library_id}/events',
|
|
7725
|
+
...options
|
|
7726
|
+
});
|
|
7727
|
+
/**
|
|
7728
|
+
* Create delivery token
|
|
7729
|
+
*
|
|
7730
|
+
* Issue a time-limited bearer token for originals and transformed authenticated assets in an active library. Use library_id from library creation or listing; read access is sufficient. Append token as the __cld_token__ query parameter on a matching delivery URL. The default ACL covers this library and the default lifetime is 3600 seconds; narrow acl and expires_in before sharing. Anyone holding the token can read matching paths until expires_at.
|
|
7731
|
+
*/
|
|
7732
|
+
export const mediaCreateDeliveryToken = (options) => (options.client ?? client).post({
|
|
7733
|
+
security: [{
|
|
7734
|
+
key: 'media-BearerAuth',
|
|
7735
|
+
scheme: 'bearer',
|
|
7736
|
+
type: 'http'
|
|
7737
|
+
}],
|
|
7738
|
+
url: '/media/v1/libraries/{library_id}/delivery_tokens',
|
|
7739
|
+
...options,
|
|
7740
|
+
headers: {
|
|
7741
|
+
'Content-Type': 'application/json',
|
|
7742
|
+
...options.headers
|
|
7743
|
+
}
|
|
7744
|
+
});
|
|
7745
|
+
/**
|
|
7746
|
+
* List sandboxes (v2)
|
|
7747
|
+
*
|
|
7748
|
+
* List your running and paused sandboxes with paging and filters. Use it to find a sandboxID before connecting to, pausing or killing a sandbox. Filter by state, template (id or alias), name, metadata (key=value pairs joined with &) and startedAfter; order sorts by start time (default newest first); limit is 1 to 100 (default 100). When more results exist the response carries an x-next-token header; send it back as nextToken for the next page. To read one sandbox use getSandbox.
|
|
7749
|
+
*/
|
|
7750
|
+
export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
|
|
7751
|
+
querySerializer: { parameters: { state: { array: { explode: false } } } },
|
|
7752
|
+
security: [
|
|
7753
|
+
{
|
|
7754
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7755
|
+
name: 'X-API-Key',
|
|
7756
|
+
type: 'apiKey'
|
|
7757
|
+
},
|
|
7758
|
+
{
|
|
7759
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7760
|
+
scheme: 'bearer',
|
|
7761
|
+
type: 'http'
|
|
7762
|
+
},
|
|
7763
|
+
{
|
|
7764
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7765
|
+
name: 'X-Team-ID',
|
|
7766
|
+
type: 'apiKey'
|
|
7767
|
+
},
|
|
7768
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7769
|
+
{
|
|
7770
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7771
|
+
name: 'X-Team-ID',
|
|
7772
|
+
type: 'apiKey'
|
|
7773
|
+
},
|
|
7774
|
+
{
|
|
7775
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7776
|
+
scheme: 'bearer',
|
|
7777
|
+
type: 'http'
|
|
7778
|
+
}
|
|
7779
|
+
],
|
|
7780
|
+
url: '/sandbox/v1/sandboxes',
|
|
7781
|
+
...options
|
|
7782
|
+
});
|
|
7783
|
+
/**
|
|
7784
|
+
* Create sandbox (v2)
|
|
7785
|
+
*
|
|
7786
|
+
* Create a sandbox from the template. All system communication with the sandbox is secured.
|
|
7787
|
+
*/
|
|
7788
|
+
export const postSandboxV1Sandboxes = (options) => (options.client ?? client).post({
|
|
7789
|
+
security: [
|
|
7790
|
+
{
|
|
7791
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7792
|
+
name: 'X-API-Key',
|
|
7793
|
+
type: 'apiKey'
|
|
7794
|
+
},
|
|
7795
|
+
{
|
|
7796
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7797
|
+
scheme: 'bearer',
|
|
7798
|
+
type: 'http'
|
|
7799
|
+
},
|
|
7800
|
+
{
|
|
7801
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7802
|
+
name: 'X-Team-ID',
|
|
7803
|
+
type: 'apiKey'
|
|
7804
|
+
},
|
|
7805
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7806
|
+
{
|
|
7807
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7808
|
+
name: 'X-Team-ID',
|
|
7809
|
+
type: 'apiKey'
|
|
7810
|
+
},
|
|
7811
|
+
{
|
|
7812
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7813
|
+
scheme: 'bearer',
|
|
7814
|
+
type: 'http'
|
|
7815
|
+
}
|
|
7816
|
+
],
|
|
7817
|
+
url: '/sandbox/v1/sandboxes',
|
|
7818
|
+
...options,
|
|
7819
|
+
headers: {
|
|
7820
|
+
'Content-Type': 'application/json',
|
|
7821
|
+
...options.headers
|
|
7822
|
+
}
|
|
7823
|
+
});
|
|
7824
|
+
/**
|
|
7825
|
+
* Sandbox metrics
|
|
7826
|
+
*
|
|
7827
|
+
* Read CPU, memory and disk usage samples of a sandbox over a time window. Use it to size a sandbox or find out why it is slow. start and end are Unix timestamps in seconds; without them the recent samples are returned. An unknown id answers 404.
|
|
7828
|
+
*/
|
|
7829
|
+
export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.client ?? client).get({
|
|
7830
|
+
security: [
|
|
7831
|
+
{
|
|
7832
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7833
|
+
name: 'X-API-Key',
|
|
7834
|
+
type: 'apiKey'
|
|
7835
|
+
},
|
|
7836
|
+
{
|
|
7837
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7838
|
+
scheme: 'bearer',
|
|
7839
|
+
type: 'http'
|
|
7840
|
+
},
|
|
7841
|
+
{
|
|
7842
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7843
|
+
name: 'X-Team-ID',
|
|
7844
|
+
type: 'apiKey'
|
|
7845
|
+
},
|
|
7846
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7847
|
+
{
|
|
7848
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7849
|
+
name: 'X-Team-ID',
|
|
7850
|
+
type: 'apiKey'
|
|
7851
|
+
},
|
|
7852
|
+
{
|
|
7853
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7854
|
+
scheme: 'bearer',
|
|
7855
|
+
type: 'http'
|
|
7856
|
+
}
|
|
7857
|
+
],
|
|
7858
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/metrics',
|
|
7859
|
+
...options
|
|
7860
|
+
});
|
|
7861
|
+
/**
|
|
7862
|
+
* Pause sandbox
|
|
7863
|
+
*
|
|
7864
|
+
* Pause a running sandbox, keeping its files and memory so that connectSandbox can resume it later. Use it to stop paying for compute without losing state; to discard the sandbox use killSandbox. Success answers 204. A sandbox that is not running answers 409.
|
|
7865
|
+
*/
|
|
7866
|
+
export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.client ?? client).post({
|
|
7867
|
+
security: [
|
|
7868
|
+
{
|
|
7869
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7870
|
+
name: 'X-API-Key',
|
|
7871
|
+
type: 'apiKey'
|
|
7872
|
+
},
|
|
7873
|
+
{
|
|
7874
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7875
|
+
scheme: 'bearer',
|
|
7876
|
+
type: 'http'
|
|
7877
|
+
},
|
|
7878
|
+
{
|
|
7879
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7880
|
+
name: 'X-Team-ID',
|
|
7881
|
+
type: 'apiKey'
|
|
7882
|
+
},
|
|
7883
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7884
|
+
{
|
|
7885
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7886
|
+
name: 'X-Team-ID',
|
|
7887
|
+
type: 'apiKey'
|
|
7888
|
+
},
|
|
7889
|
+
{
|
|
7890
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7891
|
+
scheme: 'bearer',
|
|
7892
|
+
type: 'http'
|
|
7893
|
+
}
|
|
7894
|
+
],
|
|
7895
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/pause',
|
|
7896
|
+
...options,
|
|
7897
|
+
headers: {
|
|
7898
|
+
'Content-Type': 'application/json',
|
|
7899
|
+
...options.headers
|
|
7900
|
+
}
|
|
7901
|
+
});
|
|
7902
|
+
/**
|
|
7903
|
+
* Set sandbox timeout
|
|
7904
|
+
*
|
|
7905
|
+
* Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration.
|
|
7906
|
+
*/
|
|
7907
|
+
export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.client ?? client).post({
|
|
7908
|
+
security: [
|
|
7909
|
+
{
|
|
7910
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7911
|
+
name: 'X-API-Key',
|
|
7912
|
+
type: 'apiKey'
|
|
7913
|
+
},
|
|
7914
|
+
{
|
|
7915
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7916
|
+
scheme: 'bearer',
|
|
7917
|
+
type: 'http'
|
|
7918
|
+
},
|
|
7919
|
+
{
|
|
7920
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7921
|
+
name: 'X-Team-ID',
|
|
7922
|
+
type: 'apiKey'
|
|
7923
|
+
},
|
|
7924
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7925
|
+
{
|
|
7926
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7927
|
+
name: 'X-Team-ID',
|
|
7928
|
+
type: 'apiKey'
|
|
7929
|
+
},
|
|
7930
|
+
{
|
|
7931
|
+
key: 'sandbox-AdminJWTAuth',
|
|
7932
|
+
scheme: 'bearer',
|
|
7933
|
+
type: 'http'
|
|
7934
|
+
}
|
|
7935
|
+
],
|
|
7936
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/timeout',
|
|
7937
|
+
...options,
|
|
7938
|
+
headers: {
|
|
7939
|
+
'Content-Type': 'application/json',
|
|
7940
|
+
...options.headers
|
|
7941
|
+
}
|
|
7942
|
+
});
|
|
7943
|
+
/**
|
|
7944
|
+
* Connect sandbox (v2)
|
|
7945
|
+
*
|
|
7946
|
+
* Returns sandbox details. If the sandbox is paused, it will be resumed. TTL is only extended. The request body is optional; an omitted timeout defaults to 300 seconds.
|
|
7947
|
+
*/
|
|
7948
|
+
export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.client ?? client).post({
|
|
7949
|
+
security: [
|
|
7950
|
+
{
|
|
7951
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7952
|
+
name: 'X-API-Key',
|
|
7953
|
+
type: 'apiKey'
|
|
7954
|
+
},
|
|
7955
|
+
{
|
|
7956
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
7957
|
+
scheme: 'bearer',
|
|
7958
|
+
type: 'http'
|
|
7959
|
+
},
|
|
7960
|
+
{
|
|
7961
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
7962
|
+
name: 'X-Team-ID',
|
|
7963
|
+
type: 'apiKey'
|
|
7964
|
+
},
|
|
7965
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
7966
|
+
{
|
|
7967
|
+
key: 'sandbox-AdminTeamAuth',
|
|
7968
|
+
name: 'X-Team-ID',
|
|
7969
|
+
type: 'apiKey'
|
|
7970
|
+
},
|
|
7971
|
+
{
|
|
7972
|
+
key: 'sandbox-AdminJWTAuth',
|
|
6306
7973
|
scheme: 'bearer',
|
|
6307
7974
|
type: 'http'
|
|
6308
|
-
}
|
|
6309
|
-
|
|
7975
|
+
}
|
|
7976
|
+
],
|
|
7977
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/connect',
|
|
6310
7978
|
...options,
|
|
6311
7979
|
headers: {
|
|
6312
7980
|
'Content-Type': 'application/json',
|
|
@@ -6314,40 +7982,89 @@ export const mediaBatchAssets = (options) => (options.client ?? client).post({
|
|
|
6314
7982
|
}
|
|
6315
7983
|
});
|
|
6316
7984
|
/**
|
|
6317
|
-
*
|
|
7985
|
+
* List templates (v2)
|
|
6318
7986
|
*
|
|
6319
|
-
*
|
|
7987
|
+
* List official templates and all your custom templates, including waiting, building, ready and error builds. Custom templates appear first; each custom row describes its latest build, not necessarily the current ready build. Use templateID for build management and a ready template name when creating a sandbox. Own-face official distinguishes public catalog entries; sourceKind is omitted until a source is submitted and on official templates. Other organizations' templates are invisible.
|
|
6320
7988
|
*/
|
|
6321
|
-
export const
|
|
6322
|
-
security: [
|
|
6323
|
-
|
|
7989
|
+
export const listSandboxTemplates = (options) => (options?.client ?? client).get({
|
|
7990
|
+
security: [
|
|
7991
|
+
{
|
|
7992
|
+
key: 'sandbox-ApiKeyAuth',
|
|
7993
|
+
name: 'X-API-Key',
|
|
7994
|
+
type: 'apiKey'
|
|
7995
|
+
},
|
|
7996
|
+
{
|
|
7997
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
6324
7998
|
scheme: 'bearer',
|
|
6325
7999
|
type: 'http'
|
|
6326
|
-
}
|
|
6327
|
-
|
|
8000
|
+
},
|
|
8001
|
+
{
|
|
8002
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8003
|
+
name: 'X-Team-ID',
|
|
8004
|
+
type: 'apiKey'
|
|
8005
|
+
},
|
|
8006
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8007
|
+
{
|
|
8008
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8009
|
+
name: 'X-Team-ID',
|
|
8010
|
+
type: 'apiKey'
|
|
8011
|
+
},
|
|
8012
|
+
{
|
|
8013
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8014
|
+
scheme: 'bearer',
|
|
8015
|
+
type: 'http'
|
|
8016
|
+
}
|
|
8017
|
+
],
|
|
8018
|
+
url: '/sandbox/v1/templates',
|
|
6328
8019
|
...options
|
|
6329
8020
|
});
|
|
6330
8021
|
/**
|
|
6331
|
-
*
|
|
8022
|
+
* Create template (v3)
|
|
6332
8023
|
*
|
|
6333
|
-
*
|
|
8024
|
+
* Reserve a waiting build before submitting its source. Reusing a name in your organization allocates a new build on the same template. Returns templateID and buildID; start it with templates.builds.update, then poll templates.builds.status.list. A name:tag suffix and tags are assigned after successful publication. Example: {"name":"my-template","cpuCount":2,"memoryMB":2048}. The own face also accepts diskGb, a positive integer defaulting to 10 GiB.
|
|
6334
8025
|
*/
|
|
6335
|
-
export const
|
|
6336
|
-
security: [
|
|
6337
|
-
|
|
8026
|
+
export const requestTemplateBuild = (options) => (options.client ?? client).post({
|
|
8027
|
+
security: [
|
|
8028
|
+
{
|
|
8029
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8030
|
+
name: 'X-API-Key',
|
|
8031
|
+
type: 'apiKey'
|
|
8032
|
+
},
|
|
8033
|
+
{
|
|
8034
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
6338
8035
|
scheme: 'bearer',
|
|
6339
8036
|
type: 'http'
|
|
6340
|
-
}
|
|
6341
|
-
|
|
6342
|
-
|
|
8037
|
+
},
|
|
8038
|
+
{
|
|
8039
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8040
|
+
name: 'X-Team-ID',
|
|
8041
|
+
type: 'apiKey'
|
|
8042
|
+
},
|
|
8043
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8044
|
+
{
|
|
8045
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8046
|
+
name: 'X-Team-ID',
|
|
8047
|
+
type: 'apiKey'
|
|
8048
|
+
},
|
|
8049
|
+
{
|
|
8050
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8051
|
+
scheme: 'bearer',
|
|
8052
|
+
type: 'http'
|
|
8053
|
+
}
|
|
8054
|
+
],
|
|
8055
|
+
url: '/sandbox/v1/templates',
|
|
8056
|
+
...options,
|
|
8057
|
+
headers: {
|
|
8058
|
+
'Content-Type': 'application/json',
|
|
8059
|
+
...options.headers
|
|
8060
|
+
}
|
|
6343
8061
|
});
|
|
6344
8062
|
/**
|
|
6345
|
-
* List
|
|
8063
|
+
* List team volumes
|
|
6346
8064
|
*
|
|
6347
|
-
* List
|
|
8065
|
+
* List the volumes of your team. Use it to find a volumeID before reading or deleting a volume, or to attach a volume to a sandbox by name when you create it.
|
|
6348
8066
|
*/
|
|
6349
|
-
export const
|
|
6350
|
-
querySerializer: { parameters: { state: { array: { explode: false } } } },
|
|
8067
|
+
export const getSandboxV1Volumes = (options) => (options?.client ?? client).get({
|
|
6351
8068
|
security: [
|
|
6352
8069
|
{
|
|
6353
8070
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6376,15 +8093,15 @@ export const getSandboxV1Sandboxes = (options) => (options?.client ?? client).ge
|
|
|
6376
8093
|
type: 'http'
|
|
6377
8094
|
}
|
|
6378
8095
|
],
|
|
6379
|
-
url: '/sandbox/v1/
|
|
8096
|
+
url: '/sandbox/v1/volumes',
|
|
6380
8097
|
...options
|
|
6381
8098
|
});
|
|
6382
8099
|
/**
|
|
6383
|
-
* Create
|
|
8100
|
+
* Create team volume
|
|
6384
8101
|
*
|
|
6385
|
-
* Create a
|
|
8102
|
+
* Create a team volume: persistent storage that can be mounted into sandboxes and outlives them. Send the volume name; the response returns the volume id and name. Use getVolume to read it back and deleteVolume to remove it.
|
|
6386
8103
|
*/
|
|
6387
|
-
export const
|
|
8104
|
+
export const postSandboxV1Volumes = (options) => (options.client ?? client).post({
|
|
6388
8105
|
security: [
|
|
6389
8106
|
{
|
|
6390
8107
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6413,7 +8130,7 @@ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).po
|
|
|
6413
8130
|
type: 'http'
|
|
6414
8131
|
}
|
|
6415
8132
|
],
|
|
6416
|
-
url: '/sandbox/v1/
|
|
8133
|
+
url: '/sandbox/v1/volumes',
|
|
6417
8134
|
...options,
|
|
6418
8135
|
headers: {
|
|
6419
8136
|
'Content-Type': 'application/json',
|
|
@@ -6421,11 +8138,11 @@ export const postSandboxV1Sandboxes = (options) => (options.client ?? client).po
|
|
|
6421
8138
|
}
|
|
6422
8139
|
});
|
|
6423
8140
|
/**
|
|
6424
|
-
*
|
|
8141
|
+
* Delete team volume
|
|
6425
8142
|
*
|
|
6426
|
-
*
|
|
8143
|
+
* Delete a team volume and its data permanently. Use it only when no sandbox needs the volume any more; the data cannot be recovered. Success answers 204; an unknown id answers 404.
|
|
6427
8144
|
*/
|
|
6428
|
-
export const
|
|
8145
|
+
export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).delete({
|
|
6429
8146
|
security: [
|
|
6430
8147
|
{
|
|
6431
8148
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6454,15 +8171,15 @@ export const getSandboxV1SandboxesBySandboxIdMetrics = (options) => (options.cli
|
|
|
6454
8171
|
type: 'http'
|
|
6455
8172
|
}
|
|
6456
8173
|
],
|
|
6457
|
-
url: '/sandbox/v1/
|
|
8174
|
+
url: '/sandbox/v1/volumes/{volumeID}',
|
|
6458
8175
|
...options
|
|
6459
8176
|
});
|
|
6460
8177
|
/**
|
|
6461
|
-
*
|
|
8178
|
+
* Team volume
|
|
6462
8179
|
*
|
|
6463
|
-
*
|
|
8180
|
+
* Read one team volume by id. Use it to confirm a volume exists and to read its name before mounting it in a sandbox. An unknown id answers 404.
|
|
6464
8181
|
*/
|
|
6465
|
-
export const
|
|
8182
|
+
export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? client).get({
|
|
6466
8183
|
security: [
|
|
6467
8184
|
{
|
|
6468
8185
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6491,19 +8208,15 @@ export const postSandboxV1SandboxesBySandboxIdPause = (options) => (options.clie
|
|
|
6491
8208
|
type: 'http'
|
|
6492
8209
|
}
|
|
6493
8210
|
],
|
|
6494
|
-
url: '/sandbox/v1/
|
|
6495
|
-
...options
|
|
6496
|
-
headers: {
|
|
6497
|
-
'Content-Type': 'application/json',
|
|
6498
|
-
...options.headers
|
|
6499
|
-
}
|
|
8211
|
+
url: '/sandbox/v1/volumes/{volumeID}',
|
|
8212
|
+
...options
|
|
6500
8213
|
});
|
|
6501
8214
|
/**
|
|
6502
|
-
*
|
|
8215
|
+
* Fork sandbox
|
|
6503
8216
|
*
|
|
6504
|
-
*
|
|
8217
|
+
* Fork the sandbox: checkpoint the running sandbox in place (it is briefly paused, snapshotted with its full memory state, and resumed on its node, keeping its ID and expiration untouched) and create count new sandboxes from that snapshot. Returns one result per requested fork, each carrying either the created sandbox or the error that prevented it from starting. A non-201 status means the request failed before any fork was attempted.
|
|
6505
8218
|
*/
|
|
6506
|
-
export const
|
|
8219
|
+
export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.client ?? client).post({
|
|
6507
8220
|
security: [
|
|
6508
8221
|
{
|
|
6509
8222
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6532,7 +8245,7 @@ export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.cl
|
|
|
6532
8245
|
type: 'http'
|
|
6533
8246
|
}
|
|
6534
8247
|
],
|
|
6535
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}/
|
|
8248
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/fork',
|
|
6536
8249
|
...options,
|
|
6537
8250
|
headers: {
|
|
6538
8251
|
'Content-Type': 'application/json',
|
|
@@ -6540,11 +8253,11 @@ export const postSandboxV1SandboxesBySandboxIdTimeout = (options) => (options.cl
|
|
|
6540
8253
|
}
|
|
6541
8254
|
});
|
|
6542
8255
|
/**
|
|
6543
|
-
*
|
|
8256
|
+
* Create snapshot
|
|
6544
8257
|
*
|
|
6545
|
-
*
|
|
8258
|
+
* Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new sandboxes and persist beyond the original sandbox's lifetime.
|
|
6546
8259
|
*/
|
|
6547
|
-
export const
|
|
8260
|
+
export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.client ?? client).post({
|
|
6548
8261
|
security: [
|
|
6549
8262
|
{
|
|
6550
8263
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6573,7 +8286,7 @@ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.cl
|
|
|
6573
8286
|
type: 'http'
|
|
6574
8287
|
}
|
|
6575
8288
|
],
|
|
6576
|
-
url: '/sandbox/v1/sandboxes/{sandboxID}/
|
|
8289
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/snapshots',
|
|
6577
8290
|
...options,
|
|
6578
8291
|
headers: {
|
|
6579
8292
|
'Content-Type': 'application/json',
|
|
@@ -6581,11 +8294,11 @@ export const postSandboxV1SandboxesBySandboxIdConnect = (options) => (options.cl
|
|
|
6581
8294
|
}
|
|
6582
8295
|
});
|
|
6583
8296
|
/**
|
|
6584
|
-
* List
|
|
8297
|
+
* List snapshots
|
|
6585
8298
|
*
|
|
6586
|
-
* List the
|
|
8299
|
+
* List the snapshots you created, one cursor page at a time. Use it to find a snapshot id before you create a sandbox from it or delete it. Filter by sandboxID (the source sandbox) or by name or snapshot id, optionally tag-qualified; limit is 1 to 100 (default 100). When more results exist send the cursor from the response back as nextToken.
|
|
6587
8300
|
*/
|
|
6588
|
-
export const
|
|
8301
|
+
export const getSandboxV1Snapshots = (options) => (options?.client ?? client).get({
|
|
6589
8302
|
security: [
|
|
6590
8303
|
{
|
|
6591
8304
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6614,15 +8327,15 @@ export const getSandboxV1Templates = (options) => (options?.client ?? client).ge
|
|
|
6614
8327
|
type: 'http'
|
|
6615
8328
|
}
|
|
6616
8329
|
],
|
|
6617
|
-
url: '/sandbox/v1/
|
|
8330
|
+
url: '/sandbox/v1/snapshots',
|
|
6618
8331
|
...options
|
|
6619
8332
|
});
|
|
6620
8333
|
/**
|
|
6621
|
-
*
|
|
8334
|
+
* Delete template
|
|
6622
8335
|
*
|
|
6623
|
-
*
|
|
8336
|
+
* Delete one of your snapshots. Sandboxes already created from it keep running; no new sandbox can be created from it afterwards. Success answers 204. A snapshot that does not exist or belongs to someone else answers 404.
|
|
6624
8337
|
*/
|
|
6625
|
-
export const
|
|
8338
|
+
export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client ?? client).delete({
|
|
6626
8339
|
security: [
|
|
6627
8340
|
{
|
|
6628
8341
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6651,15 +8364,15 @@ export const getSandboxV1Volumes = (options) => (options?.client ?? client).get(
|
|
|
6651
8364
|
type: 'http'
|
|
6652
8365
|
}
|
|
6653
8366
|
],
|
|
6654
|
-
url: '/sandbox/v1/
|
|
8367
|
+
url: '/sandbox/v1/snapshots/{snapshotID}',
|
|
6655
8368
|
...options
|
|
6656
8369
|
});
|
|
6657
8370
|
/**
|
|
6658
|
-
*
|
|
8371
|
+
* Update sandbox network
|
|
6659
8372
|
*
|
|
6660
|
-
*
|
|
8373
|
+
* Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.
|
|
6661
8374
|
*/
|
|
6662
|
-
export const
|
|
8375
|
+
export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.client ?? client).put({
|
|
6663
8376
|
security: [
|
|
6664
8377
|
{
|
|
6665
8378
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6688,7 +8401,7 @@ export const postSandboxV1Volumes = (options) => (options.client ?? client).post
|
|
|
6688
8401
|
type: 'http'
|
|
6689
8402
|
}
|
|
6690
8403
|
],
|
|
6691
|
-
url: '/sandbox/v1/
|
|
8404
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/network',
|
|
6692
8405
|
...options,
|
|
6693
8406
|
headers: {
|
|
6694
8407
|
'Content-Type': 'application/json',
|
|
@@ -6696,11 +8409,11 @@ export const postSandboxV1Volumes = (options) => (options.client ?? client).post
|
|
|
6696
8409
|
}
|
|
6697
8410
|
});
|
|
6698
8411
|
/**
|
|
6699
|
-
*
|
|
8412
|
+
* Sandbox logs (v2)
|
|
6700
8413
|
*
|
|
6701
|
-
*
|
|
8414
|
+
* Read the log lines of a sandbox. Use it to debug what ran inside a sandbox. cursor is a start timestamp in milliseconds, direction chooses forward or backward from it, level sets the lowest level to return, search is a case-sensitive substring filter (at most 256 characters) and limit caps the count (at most 1000, default 1000). To continue, pass the timestamp of the last entry as the next cursor.
|
|
6702
8415
|
*/
|
|
6703
|
-
export const
|
|
8416
|
+
export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client ?? client).get({
|
|
6704
8417
|
security: [
|
|
6705
8418
|
{
|
|
6706
8419
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6729,15 +8442,15 @@ export const deleteSandboxV1VolumesByVolumeId = (options) => (options.client ??
|
|
|
6729
8442
|
type: 'http'
|
|
6730
8443
|
}
|
|
6731
8444
|
],
|
|
6732
|
-
url: '/sandbox/v1/
|
|
8445
|
+
url: '/sandbox/v1/sandboxes/{sandboxID}/logs',
|
|
6733
8446
|
...options
|
|
6734
8447
|
});
|
|
6735
8448
|
/**
|
|
6736
|
-
*
|
|
8449
|
+
* Start template build (v2)
|
|
6737
8450
|
*
|
|
6738
|
-
*
|
|
8451
|
+
* Submit source for a waiting build returned by templates.create; returns 202 after queueing, not after successful publication. Unlike E2B, COPY is rejected (use RUN curl or git clone), fromTemplate accepts official catalog names only, and plaintext registry credentials are rejected. The own face also accepts dockerfile, mutually exclusive with fromImage/fromTemplate/steps, and fromImageRegistry vault references for nonofficial images. Poll templates.builds.status.list until ready or error. Example: {"fromImage":"node:22","steps":[{"type":"RUN","args":["echo hello"]}]}.
|
|
6739
8452
|
*/
|
|
6740
|
-
export const
|
|
8453
|
+
export const startTemplateBuild = (options) => (options.client ?? client).post({
|
|
6741
8454
|
security: [
|
|
6742
8455
|
{
|
|
6743
8456
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6766,15 +8479,19 @@ export const getSandboxV1VolumesByVolumeId = (options) => (options.client ?? cli
|
|
|
6766
8479
|
type: 'http'
|
|
6767
8480
|
}
|
|
6768
8481
|
],
|
|
6769
|
-
url: '/sandbox/v1/
|
|
6770
|
-
...options
|
|
8482
|
+
url: '/sandbox/v1/templates/{templateID}/builds/{buildID}',
|
|
8483
|
+
...options,
|
|
8484
|
+
headers: {
|
|
8485
|
+
'Content-Type': 'application/json',
|
|
8486
|
+
...options.headers
|
|
8487
|
+
}
|
|
6771
8488
|
});
|
|
6772
8489
|
/**
|
|
6773
|
-
*
|
|
8490
|
+
* Template build status
|
|
6774
8491
|
*
|
|
6775
|
-
*
|
|
8492
|
+
* Poll a build using templateID and buildID from templates.create. waiting means source has not been submitted; building includes queued work; ready permits sandbox creation; error is terminal, with reason when available. logsOffset counts previously read log entries, starting at zero; add logEntries.length after each response. limit is 0–100, default 100. level selects one log level; offsets then count entries at that level. Drain logs until an empty page, including after a terminal status.
|
|
6776
8493
|
*/
|
|
6777
|
-
export const
|
|
8494
|
+
export const getTemplateBuildStatus = (options) => (options.client ?? client).get({
|
|
6778
8495
|
security: [
|
|
6779
8496
|
{
|
|
6780
8497
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6803,19 +8520,15 @@ export const postSandboxV1SandboxesBySandboxIdFork = (options) => (options.clien
|
|
|
6803
8520
|
type: 'http'
|
|
6804
8521
|
}
|
|
6805
8522
|
],
|
|
6806
|
-
url: '/sandbox/v1/
|
|
6807
|
-
...options
|
|
6808
|
-
headers: {
|
|
6809
|
-
'Content-Type': 'application/json',
|
|
6810
|
-
...options.headers
|
|
6811
|
-
}
|
|
8523
|
+
url: '/sandbox/v1/templates/{templateID}/builds/{buildID}/status',
|
|
8524
|
+
...options
|
|
6812
8525
|
});
|
|
6813
8526
|
/**
|
|
6814
|
-
*
|
|
8527
|
+
* Delete template
|
|
6815
8528
|
*
|
|
6816
|
-
*
|
|
8529
|
+
* Permanently remove your template, its builds and tag assignments using templateID from templates.create. Active instances prevent deletion with 409; terminate them first. Unknown or other-organization IDs return 404. Snapshot IDs use snapshots.delete instead.
|
|
6817
8530
|
*/
|
|
6818
|
-
export const
|
|
8531
|
+
export const deleteUserTemplate = (options) => (options.client ?? client).delete({
|
|
6819
8532
|
security: [
|
|
6820
8533
|
{
|
|
6821
8534
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6844,19 +8557,15 @@ export const postSandboxV1SandboxesBySandboxIdSnapshots = (options) => (options.
|
|
|
6844
8557
|
type: 'http'
|
|
6845
8558
|
}
|
|
6846
8559
|
],
|
|
6847
|
-
url: '/sandbox/v1/
|
|
6848
|
-
...options
|
|
6849
|
-
headers: {
|
|
6850
|
-
'Content-Type': 'application/json',
|
|
6851
|
-
...options.headers
|
|
6852
|
-
}
|
|
8560
|
+
url: '/sandbox/v1/templates/{templateID}',
|
|
8561
|
+
...options
|
|
6853
8562
|
});
|
|
6854
8563
|
/**
|
|
6855
|
-
* List
|
|
8564
|
+
* List template builds
|
|
6856
8565
|
*
|
|
6857
|
-
*
|
|
8566
|
+
* Inspect your template and its newest builds using templateID from templates.create. Build states are waiting, building, ready or error. Use limit and the returned x-next-token header to page builds. Unknown or other-organization templates return 404.
|
|
6858
8567
|
*/
|
|
6859
|
-
export const
|
|
8568
|
+
export const getTemplateWithBuilds = (options) => (options.client ?? client).get({
|
|
6860
8569
|
security: [
|
|
6861
8570
|
{
|
|
6862
8571
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6885,15 +8594,15 @@ export const getSandboxV1Snapshots = (options) => (options?.client ?? client).ge
|
|
|
6885
8594
|
type: 'http'
|
|
6886
8595
|
}
|
|
6887
8596
|
],
|
|
6888
|
-
url: '/sandbox/v1/
|
|
8597
|
+
url: '/sandbox/v1/templates/{templateID}',
|
|
6889
8598
|
...options
|
|
6890
8599
|
});
|
|
6891
8600
|
/**
|
|
6892
|
-
* Delete template
|
|
8601
|
+
* Delete template tags
|
|
6893
8602
|
*
|
|
6894
|
-
*
|
|
8603
|
+
* Remove the specified tag labels from your template by name, for example {"name":"my-template","tags":["stable"]}. Builds remain available. Removing default means untagged sandbox creation no longer resolves this template. Unknown or other-organization names return 404. b<number> names are reserved read-only build aliases and cannot be assigned or deleted as tags.
|
|
6895
8604
|
*/
|
|
6896
|
-
export const
|
|
8605
|
+
export const deleteTemplateTags = (options) => (options.client ?? client).delete({
|
|
6897
8606
|
security: [
|
|
6898
8607
|
{
|
|
6899
8608
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6922,15 +8631,19 @@ export const deleteSandboxV1SnapshotsBySnapshotId = (options) => (options.client
|
|
|
6922
8631
|
type: 'http'
|
|
6923
8632
|
}
|
|
6924
8633
|
],
|
|
6925
|
-
url: '/sandbox/v1/
|
|
6926
|
-
...options
|
|
8634
|
+
url: '/sandbox/v1/templates/tags',
|
|
8635
|
+
...options,
|
|
8636
|
+
headers: {
|
|
8637
|
+
'Content-Type': 'application/json',
|
|
8638
|
+
...options.headers
|
|
8639
|
+
}
|
|
6927
8640
|
});
|
|
6928
8641
|
/**
|
|
6929
|
-
*
|
|
8642
|
+
* Assign template tags
|
|
6930
8643
|
*
|
|
6931
|
-
*
|
|
8644
|
+
* Assign tags to the ready build selected by target in name:tag format, for example {"target":"my-template:default","tags":["stable"]}. Names belong to your organization. Tags move an existing label to this build without rebuilding. Obtain available names from templates.list and tags from templates.tags.list. b<number> names are reserved read-only build aliases and cannot be assigned or deleted as tags. target also accepts name:b<number> to select a ready build by number, for example my-template:b1.
|
|
6932
8645
|
*/
|
|
6933
|
-
export const
|
|
8646
|
+
export const assignTemplateTags = (options) => (options.client ?? client).post({
|
|
6934
8647
|
security: [
|
|
6935
8648
|
{
|
|
6936
8649
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -6959,7 +8672,7 @@ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.cli
|
|
|
6959
8672
|
type: 'http'
|
|
6960
8673
|
}
|
|
6961
8674
|
],
|
|
6962
|
-
url: '/sandbox/v1/
|
|
8675
|
+
url: '/sandbox/v1/templates/tags',
|
|
6963
8676
|
...options,
|
|
6964
8677
|
headers: {
|
|
6965
8678
|
'Content-Type': 'application/json',
|
|
@@ -6967,11 +8680,11 @@ export const putSandboxV1SandboxesBySandboxIdNetwork = (options) => (options.cli
|
|
|
6967
8680
|
}
|
|
6968
8681
|
});
|
|
6969
8682
|
/**
|
|
6970
|
-
*
|
|
8683
|
+
* List template tags
|
|
6971
8684
|
*
|
|
6972
|
-
* Read the
|
|
8685
|
+
* Read the tag-to-build assignments for your template using templateID from templates.create. Only ready builds acquire tags. Use a returned tag with the template name as name:tag when creating a sandbox or assigning additional tags. Foreign IDs return 404.
|
|
6973
8686
|
*/
|
|
6974
|
-
export const
|
|
8687
|
+
export const listTemplateTags = (options) => (options.client ?? client).get({
|
|
6975
8688
|
security: [
|
|
6976
8689
|
{
|
|
6977
8690
|
key: 'sandbox-ApiKeyAuth',
|
|
@@ -7000,7 +8713,44 @@ export const getSandboxV1SandboxesBySandboxIdLogs = (options) => (options.client
|
|
|
7000
8713
|
type: 'http'
|
|
7001
8714
|
}
|
|
7002
8715
|
],
|
|
7003
|
-
url: '/sandbox/v1/
|
|
8716
|
+
url: '/sandbox/v1/templates/{templateID}/tags',
|
|
8717
|
+
...options
|
|
8718
|
+
});
|
|
8719
|
+
/**
|
|
8720
|
+
* Check template alias
|
|
8721
|
+
*
|
|
8722
|
+
* Resolve a name within your organization to its templateID before reading or managing builds. Use the bare template name, without a :tag suffix. Unknown and other-organization names return 404. The response public field is false for your private templates.
|
|
8723
|
+
*/
|
|
8724
|
+
export const resolveTemplateAlias = (options) => (options.client ?? client).get({
|
|
8725
|
+
security: [
|
|
8726
|
+
{
|
|
8727
|
+
key: 'sandbox-ApiKeyAuth',
|
|
8728
|
+
name: 'X-API-Key',
|
|
8729
|
+
type: 'apiKey'
|
|
8730
|
+
},
|
|
8731
|
+
{
|
|
8732
|
+
key: 'sandbox-AuthProviderBearerAuth',
|
|
8733
|
+
scheme: 'bearer',
|
|
8734
|
+
type: 'http'
|
|
8735
|
+
},
|
|
8736
|
+
{
|
|
8737
|
+
key: 'sandbox-AuthProviderTeamAuth',
|
|
8738
|
+
name: 'X-Team-ID',
|
|
8739
|
+
type: 'apiKey'
|
|
8740
|
+
},
|
|
8741
|
+
{ name: 'X-Admin-Token', type: 'apiKey' },
|
|
8742
|
+
{
|
|
8743
|
+
key: 'sandbox-AdminTeamAuth',
|
|
8744
|
+
name: 'X-Team-ID',
|
|
8745
|
+
type: 'apiKey'
|
|
8746
|
+
},
|
|
8747
|
+
{
|
|
8748
|
+
key: 'sandbox-AdminJWTAuth',
|
|
8749
|
+
scheme: 'bearer',
|
|
8750
|
+
type: 'http'
|
|
8751
|
+
}
|
|
8752
|
+
],
|
|
8753
|
+
url: '/sandbox/v1/templates/aliases/{alias}',
|
|
7004
8754
|
...options
|
|
7005
8755
|
});
|
|
7006
8756
|
/**
|
|
@@ -7216,7 +8966,7 @@ export const vaultListSecrets = (options) => (options.client ?? client).get({
|
|
|
7216
8966
|
/**
|
|
7217
8967
|
* Create secret
|
|
7218
8968
|
*
|
|
7219
|
-
* Store a manually supplied token in an active vault for
|
|
8969
|
+
* Store a manually supplied token in an active vault. Omit allowed_hosts for name-based resolution only; host-based redemption never matches an empty host list. Unlike Anthropic credentials, this native operation takes name and value directly, with optional allowed_hosts and creates only static secrets; use praxis.vault.authorizations.create for OAuth. Its name must be unused by any non-archived secret in that vault; the response contains metadata but never the supplied value. Application praxis_vault_ref bindings declare vault_id and secret (the secret name), but currently return 501; do not copy the value into a plain-text binding or metadata as a substitute.
|
|
7220
8970
|
*/
|
|
7221
8971
|
export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
7222
8972
|
security: [{
|
|
@@ -7234,7 +8984,7 @@ export const vaultCreateSecret = (options) => (options.client ?? client).post({
|
|
|
7234
8984
|
/**
|
|
7235
8985
|
* Import secrets
|
|
7236
8986
|
*
|
|
7237
|
-
* Import lines or dotenv text into an active vault, reporting success or failure for each entry. Existing names have their values replaced; their hosts change only when that line supplies allowed_hosts. Shared hosts apply only to newly created secrets.
|
|
8987
|
+
* Import lines or dotenv text into an active vault, reporting success or failure for each entry. Existing names have their values replaced; their hosts change only when that line supplies allowed_hosts. Shared hosts apply only to newly created secrets; if neither shared nor per-line hosts are supplied, new secrets use an empty host list for name-based resolution only.
|
|
7238
8988
|
*/
|
|
7239
8989
|
export const vaultImportSecrets = (options) => (options.client ?? client).post({
|
|
7240
8990
|
security: [{
|
|
@@ -7786,7 +9536,7 @@ export const ticketGetMilestones = (options) => (options?.client ?? client).get(
|
|
|
7786
9536
|
/**
|
|
7787
9537
|
* Create or add milestones
|
|
7788
9538
|
*
|
|
7789
|
-
* Create or add milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result.
|
|
9539
|
+
* Create or add milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.
|
|
7790
9540
|
*/
|
|
7791
9541
|
export const ticketPostMilestones = (options) => (options.client ?? client).post({
|
|
7792
9542
|
security: [{
|
|
@@ -7808,7 +9558,7 @@ export const ticketPostMilestones = (options) => (options.client ?? client).post
|
|
|
7808
9558
|
/**
|
|
7809
9559
|
* Remove milestones
|
|
7810
9560
|
*
|
|
7811
|
-
* Remove milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result.
|
|
9561
|
+
* Remove milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.
|
|
7812
9562
|
*/
|
|
7813
9563
|
export const ticketDeleteMilestonesNumber = (options) => (options.client ?? client).delete({
|
|
7814
9564
|
security: [{
|
|
@@ -7844,7 +9594,7 @@ export const ticketGetMilestonesNumber = (options) => (options.client ?? client)
|
|
|
7844
9594
|
/**
|
|
7845
9595
|
* Update milestones
|
|
7846
9596
|
*
|
|
7847
|
-
* Update milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result.
|
|
9597
|
+
* Update milestones within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. Service authorization applies to the verified human subject.
|
|
7848
9598
|
*/
|
|
7849
9599
|
export const ticketPatchMilestonesNumber = (options) => (options.client ?? client).patch({
|
|
7850
9600
|
security: [{
|