@gpt-core/client 0.11.0 → 0.11.1
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/README.md +239 -154
- package/dist/index.d.mts +3750 -40715
- package/dist/index.d.ts +3750 -40715
- package/dist/index.js +4280 -4168
- package/dist/index.mjs +4262 -3790
- package/llms.txt +360 -596
- package/package.json +1 -2
package/llms.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @gpt-core/client
|
|
2
2
|
|
|
3
3
|
> TypeScript SDK for GPT Core - document extraction, AI agents, and workspace management.
|
|
4
|
-
> Version:
|
|
4
|
+
> Version: 0.11.0
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
7
7
|
|
|
@@ -9,643 +9,407 @@
|
|
|
9
9
|
npm install @gpt-core/client
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Quick Start
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
import {
|
|
15
|
+
import { GptClient } from '@gpt-core/client';
|
|
16
16
|
|
|
17
|
-
client
|
|
18
|
-
baseUrl: 'https://api.
|
|
19
|
-
|
|
20
|
-
Authorization: 'Bearer YOUR_TOKEN',
|
|
21
|
-
},
|
|
17
|
+
const client = new GptClient({
|
|
18
|
+
baseUrl: 'https://api.gpt-core.com',
|
|
19
|
+
apiKey: 'sk_app_...', // or token: 'jwt_token'
|
|
22
20
|
});
|
|
23
21
|
```
|
|
24
22
|
|
|
25
|
-
##
|
|
26
|
-
|
|
27
|
-
- `getAgentsByIdStats()` - Get stats
|
|
28
|
-
|
|
29
|
-
## Agent test result
|
|
30
|
-
|
|
31
|
-
- `postAgent-test-results()` - Create agent test results
|
|
32
|
-
|
|
33
|
-
## Agent training stats
|
|
34
|
-
|
|
35
|
-
- `getAgentsByIdTraining-stats()` - Get training stats
|
|
36
|
-
|
|
37
|
-
## Agent usage
|
|
38
|
-
|
|
39
|
-
- `getAgentsByIdUsage()` - Get usage
|
|
40
|
-
- `getAgentsUsage()` - List usage
|
|
41
|
-
|
|
42
|
-
## Agent version comparison
|
|
43
|
-
|
|
44
|
-
- `postAgent-version-comparisons()` - Create agent version comparisons
|
|
45
|
-
|
|
46
|
-
## Agent version revision
|
|
47
|
-
|
|
48
|
-
- `getAgent-version-revisions()` - List agent version revisions
|
|
49
|
-
- `getAgent-version-revisionsById()` - Get agent version revisions
|
|
50
|
-
|
|
51
|
-
## AI Agents
|
|
52
|
-
|
|
53
|
-
- `getAgent-versions()` - List agent versions
|
|
54
|
-
- `getAgent-versionsById()` - Get agent versions
|
|
55
|
-
- `getAgent-versionsByIdMetrics()` - Get metrics
|
|
56
|
-
- `getAgent-versionsByIdRevisions()` - Get revisions
|
|
57
|
-
- `getAgents()` - List agents
|
|
58
|
-
- `getAgentsById()` - Get agents
|
|
59
|
-
- `getAgentsByIdSchema-versions()` - Get schema versions
|
|
60
|
-
- `getAgentsByIdTraining-examples()` - Get training examples
|
|
61
|
-
- `postAgent-versions()` - Create agent versions
|
|
62
|
-
- `postAgent-versionsByIdAdd-system-field()` - Create add system field
|
|
63
|
-
- `postAgent-versionsByIdRemove-system-field()` - Create remove system field
|
|
64
|
-
- `postAgent-versionsByIdSet-system-fields()` - Create set system fields
|
|
65
|
-
- `postAgents()` - Create agents
|
|
66
|
-
- `postAgentsByIdAnalyze-training()` - Create analyze training
|
|
67
|
-
- `postAgentsByIdClone()` - Create clone
|
|
68
|
-
- `postAgentsByIdDiscover-schema()` - Create discover schema
|
|
69
|
-
- `postAgentsByIdExport()` - Create export
|
|
70
|
-
- `postAgentsByIdPublish-version()` - Create publish version
|
|
71
|
-
- `postAgentsByIdRestore-version()` - Create restore version
|
|
72
|
-
- `postAgentsByIdSchema-versions()` - Create schema versions
|
|
73
|
-
- `postAgentsByIdSchema-versionsByVersionIdActivate()` - Create activate
|
|
74
|
-
- `postAgentsByIdTeach()` - Create teach
|
|
75
|
-
- `postAgentsByIdTest()` - Create test
|
|
76
|
-
- `postAgentsByIdValidate()` - Create validate
|
|
77
|
-
- `postAgentsClone-for-workspace()` - Create clone for workspace
|
|
78
|
-
- `postAgentsDiscover-schema()` - Create discover schema
|
|
79
|
-
- `postAgentsImport()` - Create import
|
|
80
|
-
- `postAgentsPredict()` - Create predict
|
|
81
|
-
- `patchAgentsById()` - Update agents
|
|
82
|
-
- `patchAgentsByIdSchema-versionsByVersionId()` - Update schema versions
|
|
83
|
-
- `deleteAgent-versionsById()` - Delete agent versions
|
|
84
|
-
- `deleteAgentsById()` - Delete agents
|
|
85
|
-
- `deleteAgentsByIdTraining-examplesByExampleId()` - Delete training examples
|
|
86
|
-
|
|
87
|
-
## AI Training
|
|
88
|
-
|
|
89
|
-
- `getTraining-examples()` - List training examples
|
|
90
|
-
- `getTraining-examplesById()` - Get training examples
|
|
91
|
-
- `getTraining-sessionsAgentsByAgentIdSessions()` - Get sessions
|
|
92
|
-
- `getTraining-sessionsById()` - Get training sessions
|
|
93
|
-
- `postTraining-examples()` - Create training examples
|
|
94
|
-
- `postTraining-examplesBulk()` - Create bulk
|
|
95
|
-
- `postTraining-examplesBulk-delete()` - Create bulk delete
|
|
96
|
-
- `postTraining-examplesSearch()` - Create search
|
|
97
|
-
- `patchTraining-examplesById()` - Update training examples
|
|
98
|
-
- `deleteTraining-examplesById()` - Delete training examples
|
|
99
|
-
- `deleteTraining-sessionsById()` - Delete training sessions
|
|
100
|
-
|
|
101
|
-
## Analytics
|
|
102
|
-
|
|
103
|
-
- `getLlmAnalytics()` - List llm analytics
|
|
104
|
-
- `getLlmAnalyticsById()` - Get llm analytics
|
|
105
|
-
- `getLlmAnalyticsCosts()` - List costs
|
|
106
|
-
- `getLlmAnalyticsPlatform()` - List platform
|
|
107
|
-
- `getLlmAnalyticsSummary()` - List summary
|
|
108
|
-
- `getLlmAnalyticsUsage()` - List usage
|
|
109
|
-
- `getLlmAnalyticsWorkspace()` - List workspace
|
|
110
|
-
- `postLlmAnalytics()` - Create llm analytics
|
|
111
|
-
|
|
112
|
-
## API Keys
|
|
113
|
-
|
|
114
|
-
- `getApi-keys()` - List api keys
|
|
115
|
-
- `getApi-keysActive()` - List active
|
|
116
|
-
- `getApi-keysById()` - Get api keys
|
|
117
|
-
- `getApi-keysStats()` - List stats
|
|
118
|
-
- `postApi-keys()` - Create api keys
|
|
119
|
-
- `patchApi-keysById()` - Update api keys
|
|
120
|
-
- `patchApi-keysByIdAllocate()` - Update allocate
|
|
121
|
-
- `patchApi-keysByIdReset-period()` - Update reset period
|
|
122
|
-
- `patchApi-keysByIdRevoke()` - Update revoke
|
|
123
|
-
- `patchApi-keysByIdRotate()` - Update rotate
|
|
124
|
-
- `patchApi-keysByIdSet-budget()` - Update set budget
|
|
125
|
-
- `deleteApi-keysById()` - Delete api keys
|
|
126
|
-
|
|
127
|
-
## Applications
|
|
128
|
-
|
|
129
|
-
- `getApplications()` - List applications
|
|
130
|
-
- `getApplicationsBy-slugBySlug()` - Get by slug
|
|
131
|
-
- `getApplicationsById()` - Get applications
|
|
132
|
-
- `getApplicationsCurrent()` - List current
|
|
133
|
-
- `postApplications()` - Create applications
|
|
134
|
-
- `patchApplicationsById()` - Update applications
|
|
135
|
-
- `patchApplicationsByIdAllocate-credits()` - Update allocate credits
|
|
136
|
-
- `patchApplicationsByIdGrant-credits()` - Update grant credits
|
|
137
|
-
- `deleteApplicationsById()` - Delete applications
|
|
138
|
-
|
|
139
|
-
## Audit-log
|
|
140
|
-
|
|
141
|
-
- `getAudit-logs()` - List audit logs
|
|
142
|
-
- `getAudit-logsActivity()` - List activity
|
|
143
|
-
|
|
144
|
-
## Billing
|
|
145
|
-
|
|
146
|
-
- `getCredit-packages()` - List credit packages
|
|
147
|
-
- `getCredit-packagesById()` - Get credit packages
|
|
148
|
-
- `getCredit-packagesSlugBySlug()` - Get slug
|
|
149
|
-
- `getPlans()` - List plans
|
|
150
|
-
- `getPlansById()` - Get plans
|
|
151
|
-
- `getPlansSlugBySlug()` - Get slug
|
|
152
|
-
- `getWallet()` - List wallet
|
|
153
|
-
- `getWalletPlanPreview()` - List preview
|
|
154
|
-
- `postPayments()` - Create payments
|
|
155
|
-
- `patchWalletAddons()` - Update addons
|
|
156
|
-
- `patchWalletAddonsByAddonSlugCancel()` - Update cancel
|
|
157
|
-
- `patchWalletAuto-top-up()` - Update auto top up
|
|
158
|
-
- `patchWalletCredits()` - Update credits
|
|
159
|
-
- `patchWalletPlan()` - Update plan
|
|
160
|
-
|
|
161
|
-
## Bulk dismissal result
|
|
162
|
-
|
|
163
|
-
- `postWorkspacesByWorkspaceIdExtractionDocumentsDismiss-all-trained()` - Create dismiss all trained
|
|
164
|
-
|
|
165
|
-
## Bulk reprocess result
|
|
166
|
-
|
|
167
|
-
- `postExtractionDocumentsBulk-reprocess()` - Create bulk reprocess
|
|
168
|
-
|
|
169
|
-
## Config
|
|
170
|
-
|
|
171
|
-
- `getConfigs()` - List configs
|
|
172
|
-
- `postConfigs()` - Create configs
|
|
173
|
-
- `patchConfigsByKey()` - Update configs
|
|
174
|
-
|
|
175
|
-
## Config enum
|
|
176
|
-
|
|
177
|
-
- `getExtractionConfig-enums()` - List config enums
|
|
178
|
-
- `getExtractionConfig-enumsById()` - Get config enums
|
|
179
|
-
- `postExtractionConfig-enums()` - Create config enums
|
|
180
|
-
- `patchExtractionConfig-enumsById()` - Update config enums
|
|
181
|
-
|
|
182
|
-
## Consent record
|
|
183
|
-
|
|
184
|
-
- `getConsent-records()` - List consent records
|
|
185
|
-
- `getConsent-recordsActive()` - List active
|
|
186
|
-
- `getConsent-recordsById()` - Get consent records
|
|
187
|
-
- `postConsent-records()` - Create consent records
|
|
188
|
-
- `patchConsent-recordsByIdWithdraw()` - Update withdraw
|
|
189
|
-
|
|
190
|
-
## Conversations
|
|
191
|
-
|
|
192
|
-
- `getAiConversations()` - List conversations
|
|
193
|
-
- `getAiConversationsById()` - Get conversations
|
|
194
|
-
- `postAiConversations()` - Create conversations
|
|
195
|
-
- `patchAiConversationsById()` - Update conversations
|
|
196
|
-
- `deleteAiConversationsById()` - Delete conversations
|
|
197
|
-
|
|
198
|
-
## Document chunk
|
|
199
|
-
|
|
200
|
-
- `getAiChunksDocumentByDocumentId()` - Get document
|
|
201
|
-
- `postAiChunksSearch()` - Create search
|
|
202
|
-
|
|
203
|
-
## Document Extraction
|
|
204
|
-
|
|
205
|
-
- `getExtractionDocuments()` - List documents
|
|
206
|
-
- `getExtractionDocumentsById()` - Get documents
|
|
207
|
-
- `getExtractionDocumentsByIdStatus()` - Get status
|
|
208
|
-
- `getExtractionDocumentsByIdView()` - Get view
|
|
209
|
-
- `getExtractionDocumentsWorkspaceByWorkspaceId()` - Get workspace
|
|
210
|
-
- `getExtractionDocumentsWorkspaceByWorkspaceIdBy-statusByStatus()` - Get by status
|
|
211
|
-
- `getExtractionDocumentsWorkspaceByWorkspaceIdExcluded()` - Get excluded
|
|
212
|
-
- `getExtractionDocumentsWorkspaceByWorkspaceIdReview-queue()` - Get review queue
|
|
213
|
-
- `getExtractionDocumentsWorkspaceByWorkspaceIdTrained()` - Get trained
|
|
214
|
-
- `getExtractionDocumentsWorkspaceByWorkspaceIdTrashed()` - Get trashed
|
|
215
|
-
- `postExtractionDocumentsBegin-upload()` - Create begin upload
|
|
216
|
-
- `postExtractionDocumentsFind-or-begin-upload()` - Create find or begin upload
|
|
217
|
-
- `postExtractionDocumentsUpload()` - Create upload
|
|
218
|
-
- `patchExtractionDocumentsByIdCancel()` - Update cancel
|
|
219
|
-
- `patchExtractionDocumentsByIdDismiss()` - Update dismiss
|
|
220
|
-
- `patchExtractionDocumentsByIdDismiss-training()` - Update dismiss training
|
|
221
|
-
- `patchExtractionDocumentsByIdExclude()` - Update exclude
|
|
222
|
-
- `patchExtractionDocumentsByIdFinish-upload()` - Update finish upload
|
|
223
|
-
- `patchExtractionDocumentsByIdInclude()` - Update include
|
|
224
|
-
- `patchExtractionDocumentsByIdMark-trained()` - Update mark trained
|
|
225
|
-
- `patchExtractionDocumentsByIdReprocess()` - Update reprocess
|
|
226
|
-
- `patchExtractionDocumentsByIdRestore()` - Update restore
|
|
227
|
-
- `patchExtractionDocumentsByIdStatus()` - Update status
|
|
228
|
-
- `patchExtractionDocumentsByIdVerification()` - Update verification
|
|
229
|
-
- `deleteExtractionDocumentsById()` - Delete documents
|
|
230
|
-
|
|
231
|
-
## Document stats
|
|
232
|
-
|
|
233
|
-
- `getDocumentsStats()` - List stats
|
|
234
|
-
|
|
235
|
-
## Email template
|
|
236
|
-
|
|
237
|
-
- `getApplicationsByApplicationIdEmail-templates()` - Get email templates
|
|
238
|
-
- `getApplicationsByApplicationIdEmail-templatesBySlug()` - Get email templates
|
|
239
|
-
- `postApplicationsByApplicationIdEmail-templates()` - Create email templates
|
|
240
|
-
- `postApplicationsByApplicationIdEmail-templatesBySlugPreview()` - Create preview
|
|
241
|
-
- `postApplicationsByApplicationIdEmail-templatesBySlugTest()` - Create test
|
|
242
|
-
- `patchApplicationsByApplicationIdEmail-templatesBySlug()` - Update email templates
|
|
243
|
-
- `deleteApplicationsByApplicationIdEmail-templatesBySlug()` - Delete email templates
|
|
244
|
-
|
|
245
|
-
## Embedding
|
|
246
|
-
|
|
247
|
-
- `postAiEmbed()` - Create embed
|
|
248
|
-
|
|
249
|
-
## Extraction Batches
|
|
250
|
-
|
|
251
|
-
- `getExtractionBatchesById()` - Get batches
|
|
252
|
-
- `getExtractionBatchesByIdUpload-urls()` - Get upload urls
|
|
253
|
-
- `getExtractionBatchesWorkspaceByWorkspaceId()` - Get workspace
|
|
254
|
-
- `postExtractionBatches()` - Create batches
|
|
255
|
-
- `deleteExtractionBatchesById()` - Delete batches
|
|
256
|
-
|
|
257
|
-
## Extraction export
|
|
23
|
+
## Configuration
|
|
258
24
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
- `postWorkspacesByWorkspaceIdExtractionByDocumentIdMapping()` - Create mapping
|
|
278
|
-
|
|
279
|
-
## Field mapping result
|
|
280
|
-
|
|
281
|
-
- `getWorkspacesByWorkspaceIdExtractionByDocumentIdMapping()` - Get mapping
|
|
282
|
-
|
|
283
|
-
## Field Templates
|
|
284
|
-
|
|
285
|
-
- `getField-templates()` - List field templates
|
|
286
|
-
- `getField-templatesById()` - Get field templates
|
|
287
|
-
- `postField-templates()` - Create field templates
|
|
288
|
-
- `deleteField-templatesById()` - Delete field templates
|
|
289
|
-
|
|
290
|
-
## Invitations
|
|
291
|
-
|
|
292
|
-
- `getInvitations()` - List invitations
|
|
293
|
-
- `getInvitationsConsumeByToken()` - Get consume
|
|
294
|
-
- `getInvitationsMe()` - List me
|
|
295
|
-
- `postInvitations()` - Create invitations
|
|
296
|
-
- `postInvitationsAccept-by-token()` - Create accept by token
|
|
297
|
-
- `patchInvitationsByIdAccept()` - Update accept
|
|
298
|
-
- `patchInvitationsByIdAccept-by-user()` - Update accept by user
|
|
299
|
-
- `patchInvitationsByIdDecline()` - Update decline
|
|
300
|
-
- `patchInvitationsByIdResend()` - Update resend
|
|
301
|
-
- `patchInvitationsByIdRevoke()` - Update revoke
|
|
302
|
-
|
|
303
|
-
## Invoice
|
|
304
|
-
|
|
305
|
-
- `getWalletInvoices()` - List invoices
|
|
306
|
-
|
|
307
|
-
## Knowledge Graph
|
|
308
|
-
|
|
309
|
-
- `getAiGraphEdges()` - List edges
|
|
310
|
-
- `getAiGraphNodes()` - List nodes
|
|
311
|
-
- `getAiGraphNodesBySourceNodeIdRelated()` - Get related
|
|
312
|
-
- `getAiGraphNodesLabelByLabel()` - Get label
|
|
313
|
-
- `postAiGraphEdges()` - Create edges
|
|
314
|
-
- `postAiGraphNodes()` - Create nodes
|
|
315
|
-
- `deleteAiGraphEdgesById()` - Delete edges
|
|
316
|
-
- `deleteAiGraphNodesById()` - Delete nodes
|
|
25
|
+
```typescript
|
|
26
|
+
new GptClient({
|
|
27
|
+
baseUrl: string, // API base URL (or env GPTCORE_BASE_URL)
|
|
28
|
+
apiKey?: string, // API key (or env GPTCORE_API_KEY)
|
|
29
|
+
token?: string, // JWT token (or env GPTCORE_TOKEN)
|
|
30
|
+
apiVersion?: string, // Default: '2025-12-03'
|
|
31
|
+
timeout?: number, // Request timeout in ms
|
|
32
|
+
fetch?: typeof fetch, // Custom fetch implementation
|
|
33
|
+
defaultHeaders?: Record<string, string>,
|
|
34
|
+
dangerouslyAllowBrowser?: boolean, // Allow API key in browser
|
|
35
|
+
logLevel?: 'debug' | 'info' | 'warn' | 'error' | 'none',
|
|
36
|
+
logger?: Logger, // Custom logger (console API)
|
|
37
|
+
appInfo?: { name: string, version?: string, url?: string },
|
|
38
|
+
retry?: { maxRetries, initialDelay, maxDelay } | false,
|
|
39
|
+
security?: { requireHttps?: boolean },
|
|
40
|
+
})
|
|
41
|
+
```
|
|
317
42
|
|
|
318
|
-
##
|
|
43
|
+
## Authentication
|
|
319
44
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
45
|
+
```typescript
|
|
46
|
+
// API key auth (machine-to-machine)
|
|
47
|
+
const client = new GptClient({ baseUrl, apiKey: 'sk_app_...' });
|
|
323
48
|
|
|
324
|
-
|
|
49
|
+
// JWT auth (user sessions)
|
|
50
|
+
const client = new GptClient({ baseUrl, token: 'eyJ...' });
|
|
325
51
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
- `postLegal-documents()` - Create legal documents
|
|
331
|
-
- `patchLegal-documentsById()` - Update legal documents
|
|
332
|
-
- `patchLegal-documentsByIdPublish()` - Update publish
|
|
333
|
-
- `patchLegal-documentsByIdUnpublish()` - Update unpublish
|
|
334
|
-
- `deleteLegal-documentsById()` - Delete legal documents
|
|
52
|
+
// Login and update token
|
|
53
|
+
const result = await client.identity.login(email, password);
|
|
54
|
+
client.setToken(result.token);
|
|
55
|
+
```
|
|
335
56
|
|
|
336
|
-
##
|
|
57
|
+
## Namespaces
|
|
337
58
|
|
|
338
|
-
|
|
339
|
-
- `getMessages()` - List messages
|
|
340
|
-
- `getMessagesById()` - Get messages
|
|
341
|
-
- `getMessagesSearch()` - List search
|
|
342
|
-
- `getMessagesSemantic-search()` - List semantic search
|
|
343
|
-
- `getThreadsByIdMessages()` - Get messages
|
|
344
|
-
- `postAiMessages()` - Create messages
|
|
345
|
-
- `postMessages()` - Create messages
|
|
346
|
-
- `patchMessagesById()` - Update messages
|
|
347
|
-
- `deleteAiMessagesById()` - Delete messages
|
|
348
|
-
- `deleteMessagesById()` - Delete messages
|
|
59
|
+
### identity
|
|
349
60
|
|
|
350
|
-
|
|
61
|
+
```typescript
|
|
62
|
+
client.identity.login(email, password)
|
|
63
|
+
client.identity.register(email, password, passwordConfirmation)
|
|
64
|
+
client.identity.confirm(token)
|
|
65
|
+
client.identity.resendConfirmation(email)
|
|
66
|
+
client.identity.requestMagicLink(email)
|
|
67
|
+
client.identity.magicLinkLogin(token)
|
|
68
|
+
client.identity.changePassword(currentPassword, newPassword, newPasswordConfirmation)
|
|
69
|
+
client.identity.resetPassword(token, password, passwordConfirmation)
|
|
70
|
+
client.identity.me()
|
|
71
|
+
client.identity.profile()
|
|
72
|
+
client.identity.updateProfile(attributes)
|
|
73
|
+
client.identity.acceptTos()
|
|
74
|
+
client.identity.stats()
|
|
75
|
+
client.identity.dashboard()
|
|
76
|
+
client.identity.activity()
|
|
77
|
+
client.identity.tenants()
|
|
78
|
+
|
|
79
|
+
// API Keys
|
|
80
|
+
client.identity.apiKeys.list()
|
|
81
|
+
client.identity.apiKeys.active()
|
|
82
|
+
client.identity.apiKeys.get(id)
|
|
83
|
+
client.identity.apiKeys.create(name)
|
|
84
|
+
client.identity.apiKeys.revoke(id)
|
|
85
|
+
client.identity.apiKeys.rotate(id)
|
|
86
|
+
client.identity.apiKeys.allocate(id, credits, reason?)
|
|
87
|
+
client.identity.apiKeys.setBudget(id, budget)
|
|
88
|
+
client.identity.apiKeys.stats()
|
|
89
|
+
```
|
|
351
90
|
|
|
352
|
-
|
|
353
|
-
- `getNotification-logsById()` - Get notification logs
|
|
354
|
-
- `getNotification-logsStats()` - List stats
|
|
91
|
+
### platform
|
|
355
92
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
93
|
+
```typescript
|
|
94
|
+
// Workspaces
|
|
95
|
+
client.platform.workspaces.list()
|
|
96
|
+
client.platform.workspaces.create(name, slug)
|
|
97
|
+
client.platform.workspaces.get(id)
|
|
98
|
+
client.platform.workspaces.update(id, attributes)
|
|
99
|
+
client.platform.workspaces.delete(id)
|
|
100
|
+
client.platform.workspaces.mine()
|
|
101
|
+
client.platform.workspaces.shared()
|
|
102
|
+
client.platform.workspaces.members(id)
|
|
103
|
+
client.platform.workspaces.allocate(id, credits)
|
|
104
|
+
|
|
105
|
+
// Applications
|
|
106
|
+
client.platform.applications.list()
|
|
107
|
+
client.platform.applications.create(attributes)
|
|
108
|
+
client.platform.applications.get(id)
|
|
109
|
+
client.platform.applications.getBySlug(slug)
|
|
110
|
+
client.platform.applications.current()
|
|
111
|
+
client.platform.applications.update(id, attributes)
|
|
112
|
+
client.platform.applications.delete(id)
|
|
113
|
+
|
|
114
|
+
// Tenants
|
|
115
|
+
client.platform.tenants.list()
|
|
116
|
+
client.platform.tenants.get(id)
|
|
117
|
+
client.platform.tenants.stats(id)
|
|
118
|
+
|
|
119
|
+
// Invitations
|
|
120
|
+
client.platform.invitations.list()
|
|
121
|
+
client.platform.invitations.mine()
|
|
122
|
+
client.platform.invitations.create(email, role, scopeType, scopeId)
|
|
123
|
+
client.platform.invitations.accept(id)
|
|
124
|
+
client.platform.invitations.decline(id)
|
|
125
|
+
client.platform.invitations.revoke(id)
|
|
126
|
+
client.platform.invitations.resend(id)
|
|
127
|
+
|
|
128
|
+
// Memberships
|
|
129
|
+
client.platform.memberships.list()
|
|
130
|
+
client.platform.memberships.create(workspaceId, userId, roleId)
|
|
131
|
+
|
|
132
|
+
// Roles
|
|
133
|
+
client.platform.roles.list()
|
|
134
|
+
```
|
|
374
135
|
|
|
375
|
-
|
|
136
|
+
### agents
|
|
376
137
|
|
|
377
|
-
|
|
138
|
+
```typescript
|
|
139
|
+
client.agents.list()
|
|
140
|
+
client.agents.create(name, systemPrompt, attributes?)
|
|
141
|
+
client.agents.get(id)
|
|
142
|
+
client.agents.update(id, attributes)
|
|
143
|
+
client.agents.delete(id)
|
|
144
|
+
client.agents.test(id, input)
|
|
145
|
+
client.agents.clone(id)
|
|
146
|
+
client.agents.export(id)
|
|
147
|
+
client.agents.import(data)
|
|
148
|
+
client.agents.validate(id)
|
|
149
|
+
client.agents.stats(id)
|
|
150
|
+
client.agents.usage(id)
|
|
151
|
+
|
|
152
|
+
// Versions
|
|
153
|
+
client.agents.versions.list(agentId)
|
|
154
|
+
client.agents.versions.get(id)
|
|
155
|
+
client.agents.versions.publish(agentId, attributes?)
|
|
156
|
+
client.agents.versions.restore(agentId, versionId)
|
|
157
|
+
client.agents.versions.metrics(id)
|
|
158
|
+
|
|
159
|
+
// Training
|
|
160
|
+
client.agents.training.examples(agentId)
|
|
161
|
+
client.agents.training.stats(agentId)
|
|
162
|
+
```
|
|
378
163
|
|
|
379
|
-
|
|
164
|
+
### extraction
|
|
380
165
|
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
166
|
+
```typescript
|
|
167
|
+
// Documents
|
|
168
|
+
client.extraction.documents.list()
|
|
169
|
+
client.extraction.documents.get(id)
|
|
170
|
+
client.extraction.documents.view(id)
|
|
171
|
+
client.extraction.documents.upload(file)
|
|
172
|
+
client.extraction.documents.beginUpload(attributes)
|
|
173
|
+
client.extraction.documents.findOrBeginUpload(attributes)
|
|
174
|
+
client.extraction.documents.finishUpload(id)
|
|
175
|
+
client.extraction.documents.delete(id)
|
|
176
|
+
client.extraction.documents.bulkDelete(ids)
|
|
177
|
+
client.extraction.documents.reprocess(id)
|
|
178
|
+
client.extraction.documents.bulkReprocess(ids)
|
|
179
|
+
client.extraction.documents.status(id)
|
|
180
|
+
client.extraction.documents.cancel(id)
|
|
181
|
+
client.extraction.documents.stats()
|
|
182
|
+
|
|
183
|
+
// Results
|
|
184
|
+
client.extraction.results.list()
|
|
185
|
+
client.extraction.results.get(id)
|
|
186
|
+
client.extraction.results.byDocument(documentId)
|
|
187
|
+
|
|
188
|
+
// Batches
|
|
189
|
+
client.extraction.batches.create(attributes)
|
|
190
|
+
client.extraction.batches.get(id)
|
|
191
|
+
|
|
192
|
+
// Exports
|
|
193
|
+
client.extraction.exports.list(workspaceId)
|
|
194
|
+
client.extraction.exports.create(workspaceId, attributes)
|
|
195
|
+
```
|
|
388
196
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
- `getPermissions()` - List permissions
|
|
392
|
-
- `getPermissionsById()` - Get permissions
|
|
393
|
-
- `getPermissionsPresets()` - List presets
|
|
394
|
-
|
|
395
|
-
## Permission meta
|
|
396
|
-
|
|
397
|
-
- `getPermissionsMeta()` - List meta
|
|
197
|
+
### ai
|
|
398
198
|
|
|
399
|
-
|
|
199
|
+
```typescript
|
|
200
|
+
client.ai.search(query, options?)
|
|
201
|
+
client.ai.searchAdvanced(query, options?)
|
|
202
|
+
client.ai.embed(text)
|
|
203
|
+
|
|
204
|
+
// Conversations
|
|
205
|
+
client.ai.conversations.list()
|
|
206
|
+
client.ai.conversations.create(attributes)
|
|
207
|
+
client.ai.conversations.get(id)
|
|
208
|
+
client.ai.conversations.update(id, attributes)
|
|
209
|
+
client.ai.conversations.delete(id)
|
|
210
|
+
|
|
211
|
+
// Messages
|
|
212
|
+
client.ai.messages.list()
|
|
213
|
+
client.ai.messages.create(attributes)
|
|
214
|
+
client.ai.messages.delete(id)
|
|
215
|
+
```
|
|
400
216
|
|
|
401
|
-
|
|
217
|
+
### billing
|
|
402
218
|
|
|
403
|
-
|
|
219
|
+
```typescript
|
|
220
|
+
// Wallet
|
|
221
|
+
client.billing.wallet.get()
|
|
222
|
+
client.billing.wallet.updateCredits(attributes)
|
|
223
|
+
client.billing.wallet.updatePlan(planSlug)
|
|
224
|
+
client.billing.wallet.planPreview()
|
|
225
|
+
client.billing.wallet.autoTopUp(attributes)
|
|
226
|
+
client.billing.wallet.addons(attributes)
|
|
227
|
+
client.billing.wallet.invoices()
|
|
228
|
+
|
|
229
|
+
// Plans
|
|
230
|
+
client.billing.plans.list()
|
|
231
|
+
client.billing.plans.get(id)
|
|
232
|
+
client.billing.plans.getBySlug(slug)
|
|
233
|
+
|
|
234
|
+
// Transactions
|
|
235
|
+
client.billing.transactions.list()
|
|
236
|
+
client.billing.transactions.get(id)
|
|
237
|
+
|
|
238
|
+
// Credit Packages
|
|
239
|
+
client.billing.creditPackages.list()
|
|
240
|
+
client.billing.creditPackages.get(id)
|
|
241
|
+
|
|
242
|
+
// Payment Methods
|
|
243
|
+
client.billing.paymentMethods.list()
|
|
244
|
+
client.billing.paymentMethods.create(attributes)
|
|
245
|
+
client.billing.paymentMethods.get(id)
|
|
246
|
+
client.billing.paymentMethods.delete(id)
|
|
247
|
+
client.billing.paymentMethods.setDefault(id)
|
|
248
|
+
```
|
|
404
249
|
|
|
405
|
-
|
|
406
|
-
- `postStorageSign-download()` - Create sign download
|
|
407
|
-
- `postStorageSign-upload()` - Create sign upload
|
|
250
|
+
### storage
|
|
408
251
|
|
|
409
|
-
|
|
252
|
+
```typescript
|
|
253
|
+
// Buckets
|
|
254
|
+
client.storage.buckets.list()
|
|
255
|
+
client.storage.buckets.all()
|
|
256
|
+
client.storage.buckets.create(name, type)
|
|
257
|
+
client.storage.buckets.get(id)
|
|
258
|
+
client.storage.buckets.update(id, attributes)
|
|
259
|
+
client.storage.buckets.delete(id)
|
|
260
|
+
client.storage.buckets.stats(id)
|
|
261
|
+
client.storage.buckets.objects(id)
|
|
262
|
+
|
|
263
|
+
// Objects
|
|
264
|
+
client.storage.objects.list()
|
|
265
|
+
client.storage.objects.get(id)
|
|
266
|
+
client.storage.objects.delete(id)
|
|
267
|
+
client.storage.objects.register(attributes)
|
|
268
|
+
|
|
269
|
+
// Presigned URLs
|
|
270
|
+
client.storage.signUpload(filename, contentType)
|
|
271
|
+
client.storage.signDownload(objectId)
|
|
272
|
+
|
|
273
|
+
// Stats
|
|
274
|
+
client.storage.stats()
|
|
275
|
+
```
|
|
410
276
|
|
|
411
|
-
|
|
412
|
-
- `postRoles()` - Create roles
|
|
413
|
-
- `patchRolesById()` - Update roles
|
|
414
|
-
- `deleteRolesById()` - Delete roles
|
|
277
|
+
### webhooks
|
|
415
278
|
|
|
416
|
-
|
|
279
|
+
```typescript
|
|
280
|
+
// Configs
|
|
281
|
+
client.webhooks.configs.list()
|
|
282
|
+
client.webhooks.configs.create(url, events, attributes?)
|
|
283
|
+
client.webhooks.configs.get(id)
|
|
284
|
+
client.webhooks.configs.update(id, attributes)
|
|
285
|
+
client.webhooks.configs.delete(id)
|
|
286
|
+
client.webhooks.configs.test(id)
|
|
287
|
+
client.webhooks.configs.rotateSecret(id)
|
|
288
|
+
client.webhooks.configs.stats()
|
|
289
|
+
|
|
290
|
+
// Deliveries
|
|
291
|
+
client.webhooks.deliveries.list()
|
|
292
|
+
client.webhooks.deliveries.get(id)
|
|
293
|
+
client.webhooks.deliveries.retry(id)
|
|
294
|
+
client.webhooks.deliveries.stats()
|
|
295
|
+
```
|
|
417
296
|
|
|
418
|
-
|
|
419
|
-
- `postExtractionSchema-discoveries()` - Create schema discoveries
|
|
420
|
-
|
|
421
|
-
## Search
|
|
297
|
+
### search
|
|
422
298
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
299
|
+
```typescript
|
|
300
|
+
client.search.query(q, options?)
|
|
301
|
+
client.search.semantic(q, options?)
|
|
302
|
+
client.search.suggest(q)
|
|
303
|
+
client.search.batch(queries)
|
|
304
|
+
client.search.reindex()
|
|
305
|
+
client.search.indexes()
|
|
306
|
+
client.search.stats()
|
|
307
|
+
client.search.health()
|
|
308
|
+
client.search.status()
|
|
309
|
+
client.search.analytics()
|
|
310
|
+
client.search.analyticsSummary()
|
|
311
|
+
|
|
312
|
+
// Saved Searches
|
|
313
|
+
client.search.saved.list()
|
|
314
|
+
client.search.saved.create(attributes)
|
|
315
|
+
client.search.saved.delete(id)
|
|
316
|
+
client.search.saved.run(id)
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### threads
|
|
320
|
+
|
|
321
|
+
```typescript
|
|
322
|
+
client.threads.list()
|
|
323
|
+
client.threads.create(title?, attributes?)
|
|
324
|
+
client.threads.get(id)
|
|
325
|
+
client.threads.update(id, attributes)
|
|
326
|
+
client.threads.delete(id)
|
|
327
|
+
client.threads.archive(id)
|
|
328
|
+
client.threads.unarchive(id)
|
|
329
|
+
client.threads.export(id)
|
|
330
|
+
client.threads.fork(id)
|
|
331
|
+
client.threads.summarize(id)
|
|
332
|
+
client.threads.search(query)
|
|
333
|
+
client.threads.stats()
|
|
334
|
+
|
|
335
|
+
// Messages
|
|
336
|
+
client.threads.messages.list(threadId)
|
|
337
|
+
client.threads.messages.send(threadId, content, attributes?)
|
|
338
|
+
```
|
|
439
339
|
|
|
440
|
-
|
|
340
|
+
### communication
|
|
441
341
|
|
|
442
|
-
|
|
443
|
-
|
|
342
|
+
```typescript
|
|
343
|
+
// Notification Logs
|
|
344
|
+
client.communication.notifications.logs()
|
|
345
|
+
client.communication.notifications.logById(id)
|
|
346
|
+
client.communication.notifications.logStats()
|
|
347
|
+
|
|
348
|
+
// Notification Methods
|
|
349
|
+
client.communication.notifications.methods.list()
|
|
350
|
+
client.communication.notifications.methods.get(id)
|
|
351
|
+
client.communication.notifications.methods.create(attributes)
|
|
352
|
+
client.communication.notifications.methods.update(id, attributes)
|
|
353
|
+
client.communication.notifications.methods.delete(id)
|
|
354
|
+
client.communication.notifications.methods.verify(id)
|
|
355
|
+
client.communication.notifications.methods.setPrimary(id)
|
|
356
|
+
|
|
357
|
+
// Notification Preferences
|
|
358
|
+
client.communication.notifications.preferences.list()
|
|
359
|
+
client.communication.notifications.preferences.get(id)
|
|
360
|
+
client.communication.notifications.preferences.create(attributes)
|
|
361
|
+
client.communication.notifications.preferences.update(id, attributes)
|
|
362
|
+
```
|
|
444
363
|
|
|
445
|
-
##
|
|
364
|
+
## Webhook Signature Verification
|
|
446
365
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
- `getBucketsById()` - Get buckets
|
|
450
|
-
- `getBucketsByIdObjects()` - Get objects
|
|
451
|
-
- `getBucketsByIdStats()` - Get stats
|
|
452
|
-
- `getObjects()` - List objects
|
|
453
|
-
- `getObjectsById()` - Get objects
|
|
454
|
-
- `postBuckets()` - Create buckets
|
|
455
|
-
- `postObjectsBulk-destroy()` - Create bulk destroy
|
|
456
|
-
- `postObjectsCopy()` - Create copy
|
|
457
|
-
- `postObjectsMove()` - Create move
|
|
458
|
-
- `postObjectsRegister()` - Create register
|
|
459
|
-
- `patchBucketsById()` - Update buckets
|
|
460
|
-
- `deleteBucketsById()` - Delete buckets
|
|
461
|
-
- `deleteObjectsById()` - Delete objects
|
|
462
|
-
|
|
463
|
-
## Storage stats
|
|
464
|
-
|
|
465
|
-
- `getStorageStats()` - List stats
|
|
466
|
-
- `getStorageStatsTenantByTenantId()` - Get tenant
|
|
467
|
-
|
|
468
|
-
## Tenant document stats
|
|
469
|
-
|
|
470
|
-
- `getTenantsByTenantIdDocumentStats()` - Get document stats
|
|
471
|
-
|
|
472
|
-
## Tenant stats
|
|
473
|
-
|
|
474
|
-
- `getTenantsByTenantIdStats()` - Get stats
|
|
475
|
-
|
|
476
|
-
## Tenant-membership
|
|
477
|
-
|
|
478
|
-
- `getTenant-memberships()` - List tenant memberships
|
|
479
|
-
- `postTenant-memberships()` - Create tenant memberships
|
|
480
|
-
- `patchTenant-membershipsByTenantIdByUserId()` - Update tenant memberships
|
|
481
|
-
- `deleteTenant-membershipsByTenantIdByUserId()` - Delete tenant memberships
|
|
482
|
-
|
|
483
|
-
## Tenants
|
|
484
|
-
|
|
485
|
-
- `getTenants()` - List tenants
|
|
486
|
-
- `getTenantsById()` - Get tenants
|
|
487
|
-
- `postTenants()` - Create tenants
|
|
488
|
-
- `postTenantsByIdBuy-storage()` - Create buy storage
|
|
489
|
-
- `postTenantsByIdCredit()` - Create credit
|
|
490
|
-
- `postTenantsByIdRemove-storage()` - Create remove storage
|
|
491
|
-
- `postTenantsByIdSchedule-purge()` - Create schedule purge
|
|
492
|
-
- `postTenantsIsv()` - Create isv
|
|
493
|
-
- `patchTenantsById()` - Update tenants
|
|
494
|
-
- `deleteTenantsById()` - Delete tenants
|
|
495
|
-
|
|
496
|
-
## Thread stats
|
|
497
|
-
|
|
498
|
-
- `getThreadsStats()` - List stats
|
|
499
|
-
|
|
500
|
-
## Thread workspace stats
|
|
501
|
-
|
|
502
|
-
- `getThreadsWorkspace-stats()` - List workspace stats
|
|
503
|
-
|
|
504
|
-
## Threads
|
|
505
|
-
|
|
506
|
-
- `getThreads()` - List threads
|
|
507
|
-
- `getThreadsById()` - Get threads
|
|
508
|
-
- `getThreadsSearch()` - List search
|
|
509
|
-
- `postThreads()` - Create threads
|
|
510
|
-
- `postThreadsActive()` - Create active
|
|
511
|
-
- `postThreadsByIdExport()` - Create export
|
|
512
|
-
- `postThreadsByIdFork()` - Create fork
|
|
513
|
-
- `postThreadsByIdMessages()` - Create messages
|
|
514
|
-
- `postThreadsByIdSummarize()` - Create summarize
|
|
515
|
-
- `patchThreadsById()` - Update threads
|
|
516
|
-
- `patchThreadsByIdArchive()` - Update archive
|
|
517
|
-
- `patchThreadsByIdUnarchive()` - Update unarchive
|
|
518
|
-
- `deleteThreadsById()` - Delete threads
|
|
519
|
-
|
|
520
|
-
## Token
|
|
521
|
-
|
|
522
|
-
- `postTokens()` - Create tokens
|
|
523
|
-
|
|
524
|
-
## Training analytics
|
|
525
|
-
|
|
526
|
-
- `getWorkspacesAnalytics-batch()` - List analytics batch
|
|
527
|
-
- `getWorkspacesByWorkspaceIdTrainingAnalytics()` - Get analytics
|
|
528
|
-
|
|
529
|
-
## Transaction
|
|
530
|
-
|
|
531
|
-
- `getTransactions()` - List transactions
|
|
532
|
-
- `getTransactionsById()` - Get transactions
|
|
533
|
-
|
|
534
|
-
## Users
|
|
535
|
-
|
|
536
|
-
- `getUser-profiles()` - List user profiles
|
|
537
|
-
- `getUser-profilesById()` - Get user profiles
|
|
538
|
-
- `getUser-profilesMe()` - List me
|
|
539
|
-
- `getUsers()` - List users
|
|
540
|
-
- `getUsersBy-email()` - List by email
|
|
541
|
-
- `getUsersById()` - Get users
|
|
542
|
-
- `getUsersMe()` - List me
|
|
543
|
-
- `getUsersMeActivity()` - List activity
|
|
544
|
-
- `getUsersMeDashboard()` - List dashboard
|
|
545
|
-
- `getUsersMeStats()` - List stats
|
|
546
|
-
- `getUsersMeTenants()` - List tenants
|
|
547
|
-
- `postUser-profiles()` - Create user profiles
|
|
548
|
-
- `postUsersAuthConfirm()` - Create confirm
|
|
549
|
-
- `postUsersAuthLogin()` - Create login
|
|
550
|
-
- `postUsersAuthMagic-linkLogin()` - Create login
|
|
551
|
-
- `postUsersAuthMagic-linkRequest()` - Create request
|
|
552
|
-
- `postUsersAuthRegister()` - Create register
|
|
553
|
-
- `postUsersAuthRegister-with-oidc()` - Create register with oidc
|
|
554
|
-
- `postUsersAuthResend-confirmation()` - Create resend confirmation
|
|
555
|
-
- `postUsersRegister-isv()` - Create register isv
|
|
556
|
-
- `patchUser-profilesById()` - Update user profiles
|
|
557
|
-
- `patchUser-profilesByIdAccept-tos()` - Update accept tos
|
|
558
|
-
- `patchUser-profilesByIdDismiss-announcement()` - Update dismiss announcement
|
|
559
|
-
- `patchUser-profilesByIdDismiss-welcome()` - Update dismiss welcome
|
|
560
|
-
- `patchUsersAuthPasswordChange()` - Update change
|
|
561
|
-
- `patchUsersAuthReset-password()` - Update reset password
|
|
562
|
-
- `patchUsersById()` - Update admin
|
|
563
|
-
- `patchUsersByIdConfirm-email()` - Update confirm email
|
|
564
|
-
- `patchUsersByIdEmail()` - Update email
|
|
565
|
-
- `patchUsersByIdReset-password()` - Update reset password
|
|
566
|
-
- `deleteUser-profilesById()` - Delete user profiles
|
|
567
|
-
- `deleteUsersById()` - Delete users
|
|
568
|
-
|
|
569
|
-
## Watcher claim
|
|
570
|
-
|
|
571
|
-
- `getWatcherClaims()` - List claims
|
|
572
|
-
- `getWatcherClaimsById()` - Get claims
|
|
573
|
-
- `getWatcherClaimsHistory()` - List history
|
|
574
|
-
- `getWatcherClaimsStatus()` - List status
|
|
575
|
-
- `postWatcherClaims()` - Create claims
|
|
576
|
-
- `patchWatcherClaimsById()` - Update claims
|
|
577
|
-
- `patchWatcherClaimsByIdRelease()` - Update release
|
|
578
|
-
- `patchWatcherClaimsByIdRetry()` - Update retry
|
|
579
|
-
|
|
580
|
-
## Watcher event
|
|
581
|
-
|
|
582
|
-
- `getWatcherEvents()` - List events
|
|
583
|
-
- `getWatcherEventsById()` - Get events
|
|
584
|
-
- `postWatcherEvents()` - Create events
|
|
585
|
-
|
|
586
|
-
## Webhooks
|
|
587
|
-
|
|
588
|
-
- `getWebhook-configs()` - List webhook configs
|
|
589
|
-
- `getWebhook-configsById()` - Get webhook configs
|
|
590
|
-
- `getWebhook-configsByIdEvents()` - Get events
|
|
591
|
-
- `getWebhook-configsStats()` - List stats
|
|
592
|
-
- `getWebhook-deliveries()` - List webhook deliveries
|
|
593
|
-
- `getWebhook-deliveriesById()` - Get webhook deliveries
|
|
594
|
-
- `getWebhook-deliveriesStats()` - List stats
|
|
595
|
-
- `postWebhook-configs()` - Create webhook configs
|
|
596
|
-
- `postWebhook-configsBulk-disable()` - Create bulk disable
|
|
597
|
-
- `postWebhook-configsBulk-enable()` - Create bulk enable
|
|
598
|
-
- `postWebhook-configsByIdReplay()` - Create replay
|
|
599
|
-
- `postWebhook-configsByIdTest()` - Create test
|
|
600
|
-
- `postWebhook-deliveriesBulk-retry()` - Create bulk retry
|
|
601
|
-
- `postWebhook-deliveriesByIdRetry()` - Create retry
|
|
602
|
-
- `patchWebhook-configsById()` - Update webhook configs
|
|
603
|
-
- `patchWebhook-configsByIdRotate-secret()` - Update rotate secret
|
|
604
|
-
- `deleteWebhook-configsById()` - Delete webhook configs
|
|
605
|
-
|
|
606
|
-
## Workspace document stats
|
|
607
|
-
|
|
608
|
-
- `getTenantsByTenantIdWorkspaceStats()` - Get workspace stats
|
|
609
|
-
|
|
610
|
-
## Workspace-membership
|
|
611
|
-
|
|
612
|
-
- `getWorkspace-memberships()` - List workspace memberships
|
|
613
|
-
- `getWorkspace-membershipsInherited()` - List inherited
|
|
614
|
-
- `getWorkspacesByIdMembers()` - Get members
|
|
615
|
-
- `postWorkspace-memberships()` - Create workspace memberships
|
|
616
|
-
- `patchWorkspace-membershipsByWorkspaceIdByUserId()` - Update workspace memberships
|
|
617
|
-
- `deleteWorkspace-membershipsByWorkspaceIdByUserId()` - Delete workspace memberships
|
|
618
|
-
|
|
619
|
-
## Workspaces
|
|
620
|
-
|
|
621
|
-
- `getWorkspaces()` - List workspaces
|
|
622
|
-
- `getWorkspacesById()` - Get workspaces
|
|
623
|
-
- `getWorkspacesMine()` - List mine
|
|
624
|
-
- `getWorkspacesShared()` - List shared
|
|
625
|
-
- `postWorkspaces()` - Create workspaces
|
|
626
|
-
- `patchWorkspacesById()` - Update workspaces
|
|
627
|
-
- `patchWorkspacesByIdAllocate()` - Update allocate
|
|
628
|
-
- `patchWorkspacesByIdPopulate-hashes()` - Update populate hashes
|
|
629
|
-
- `patchWorkspacesByIdStorage-settings()` - Update storage settings
|
|
630
|
-
- `deleteWorkspacesById()` - Delete workspaces
|
|
366
|
+
```typescript
|
|
367
|
+
import { Webhooks } from '@gpt-core/client';
|
|
631
368
|
|
|
632
|
-
|
|
369
|
+
const wh = new Webhooks('whsec_your_secret');
|
|
370
|
+
|
|
371
|
+
// In your webhook handler:
|
|
372
|
+
try {
|
|
373
|
+
await wh.verify(rawBody, req.headers['x-gptcore-signature']);
|
|
374
|
+
// Signature valid, process webhook
|
|
375
|
+
} catch (err) {
|
|
376
|
+
// Invalid signature
|
|
377
|
+
}
|
|
378
|
+
```
|
|
633
379
|
|
|
634
|
-
|
|
380
|
+
## Error Handling
|
|
635
381
|
|
|
636
382
|
```typescript
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
383
|
+
import {
|
|
384
|
+
AuthenticationError,
|
|
385
|
+
AuthorizationError,
|
|
386
|
+
NotFoundError,
|
|
387
|
+
ValidationError,
|
|
388
|
+
RateLimitError,
|
|
389
|
+
ServerError,
|
|
390
|
+
} from '@gpt-core/client';
|
|
391
|
+
|
|
392
|
+
try {
|
|
393
|
+
await client.identity.login(email, password);
|
|
394
|
+
} catch (error) {
|
|
395
|
+
if (error instanceof AuthenticationError) { /* ... */ }
|
|
396
|
+
if (error instanceof ValidationError) { /* error.errors */ }
|
|
397
|
+
if (error instanceof RateLimitError) { /* error.retryAfter */ }
|
|
642
398
|
}
|
|
643
399
|
```
|
|
644
400
|
|
|
645
|
-
##
|
|
401
|
+
## Raw Functions
|
|
402
|
+
|
|
403
|
+
All 403+ generated functions are also available as named exports for power users:
|
|
646
404
|
|
|
647
|
-
|
|
405
|
+
```typescript
|
|
406
|
+
import { getAgents, postUsersAuthLogin } from '@gpt-core/client';
|
|
407
|
+
|
|
408
|
+
const { data, error } = await getAgents({ client: myClient });
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
## Types
|
|
648
412
|
|
|
649
413
|
```typescript
|
|
650
|
-
import type {
|
|
414
|
+
import type { BaseClientConfig, AppInfo, Logger, LogLevel, RequestOptions } from '@gpt-core/client';
|
|
651
415
|
```
|