@deepraxis/sdk 0.1.1-dev.c64b603 → 0.1.1-dev.d775f1e
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 +1 -59
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +5 -107
- package/dist/generated/sdk.gen.js +4 -252
- package/dist/generated/types.gen.d.ts +940 -2762
- package/dist/operations.generated.d.ts +10 -328
- package/dist/operations.generated.js +10 -390
- package/dist/resources.generated.d.ts +9 -408
- package/dist/resources.generated.js +0 -31
- 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
|
*
|
|
@@ -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
|
*
|
|
@@ -2740,7 +2492,7 @@ export const agentsCreate = (options) => (options.client ?? client).post({
|
|
|
2740
2492
|
/**
|
|
2741
2493
|
* Get agent
|
|
2742
2494
|
*
|
|
2743
|
-
* Read
|
|
2495
|
+
* 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
2496
|
*/
|
|
2745
2497
|
export const agentsRetrieve = (options) => (options.client ?? client).get({
|
|
2746
2498
|
security: [{
|
|
@@ -2758,7 +2510,7 @@ export const agentsRetrieve = (options) => (options.client ?? client).get({
|
|
|
2758
2510
|
/**
|
|
2759
2511
|
* Update agent
|
|
2760
2512
|
*
|
|
2761
|
-
*
|
|
2513
|
+
* 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.
|
|
2762
2514
|
*/
|
|
2763
2515
|
export const agentsUpdate = (options) => (options.client ?? client).post({
|
|
2764
2516
|
security: [{
|
|
@@ -2798,7 +2550,7 @@ export const agentsArchive = (options) => (options.client ?? client).post({
|
|
|
2798
2550
|
/**
|
|
2799
2551
|
* List agent versions
|
|
2800
2552
|
*
|
|
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
|
|
2553
|
+
* 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
2554
|
*/
|
|
2803
2555
|
export const agentsVersionsList = (options) => (options.client ?? client).get({
|
|
2804
2556
|
security: [{
|