@operla-ai/sdk 0.0.7

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.
Files changed (129) hide show
  1. package/dist/client.d.ts +33 -0
  2. package/dist/client.d.ts.map +1 -0
  3. package/dist/client.js +48 -0
  4. package/dist/client.js.map +1 -0
  5. package/dist/generated/api-types.d.ts +881 -0
  6. package/dist/generated/api-types.d.ts.map +1 -0
  7. package/dist/generated/api-types.js +7 -0
  8. package/dist/generated/api-types.js.map +1 -0
  9. package/dist/generated/client/client.gen.d.ts +3 -0
  10. package/dist/generated/client/client.gen.d.ts.map +1 -0
  11. package/dist/generated/client/client.gen.js +240 -0
  12. package/dist/generated/client/client.gen.js.map +1 -0
  13. package/dist/generated/client/index.d.ts +9 -0
  14. package/dist/generated/client/index.d.ts.map +1 -0
  15. package/dist/generated/client/index.js +18 -0
  16. package/dist/generated/client/index.js.map +1 -0
  17. package/dist/generated/client/types.gen.d.ts +119 -0
  18. package/dist/generated/client/types.gen.d.ts.map +1 -0
  19. package/dist/generated/client/types.gen.js +4 -0
  20. package/dist/generated/client/types.gen.js.map +1 -0
  21. package/dist/generated/client/utils.gen.d.ts +34 -0
  22. package/dist/generated/client/utils.gen.d.ts.map +1 -0
  23. package/dist/generated/client/utils.gen.js +242 -0
  24. package/dist/generated/client/utils.gen.js.map +1 -0
  25. package/dist/generated/client.gen.d.ts +13 -0
  26. package/dist/generated/client.gen.d.ts.map +1 -0
  27. package/dist/generated/client.gen.js +7 -0
  28. package/dist/generated/client.gen.js.map +1 -0
  29. package/dist/generated/core/auth.gen.d.ts +19 -0
  30. package/dist/generated/core/auth.gen.d.ts.map +1 -0
  31. package/dist/generated/core/auth.gen.js +19 -0
  32. package/dist/generated/core/auth.gen.js.map +1 -0
  33. package/dist/generated/core/bodySerializer.gen.d.ts +26 -0
  34. package/dist/generated/core/bodySerializer.gen.d.ts.map +1 -0
  35. package/dist/generated/core/bodySerializer.gen.js +61 -0
  36. package/dist/generated/core/bodySerializer.gen.js.map +1 -0
  37. package/dist/generated/core/params.gen.d.ts +44 -0
  38. package/dist/generated/core/params.gen.d.ts.map +1 -0
  39. package/dist/generated/core/params.gen.js +105 -0
  40. package/dist/generated/core/params.gen.js.map +1 -0
  41. package/dist/generated/core/pathSerializer.gen.d.ts +34 -0
  42. package/dist/generated/core/pathSerializer.gen.d.ts.map +1 -0
  43. package/dist/generated/core/pathSerializer.gen.js +116 -0
  44. package/dist/generated/core/pathSerializer.gen.js.map +1 -0
  45. package/dist/generated/core/queryKeySerializer.gen.d.ts +19 -0
  46. package/dist/generated/core/queryKeySerializer.gen.d.ts.map +1 -0
  47. package/dist/generated/core/queryKeySerializer.gen.js +99 -0
  48. package/dist/generated/core/queryKeySerializer.gen.js.map +1 -0
  49. package/dist/generated/core/serverSentEvents.gen.d.ts +72 -0
  50. package/dist/generated/core/serverSentEvents.gen.d.ts.map +1 -0
  51. package/dist/generated/core/serverSentEvents.gen.js +136 -0
  52. package/dist/generated/core/serverSentEvents.gen.js.map +1 -0
  53. package/dist/generated/core/types.gen.d.ts +79 -0
  54. package/dist/generated/core/types.gen.d.ts.map +1 -0
  55. package/dist/generated/core/types.gen.js +4 -0
  56. package/dist/generated/core/types.gen.js.map +1 -0
  57. package/dist/generated/core/utils.gen.d.ts +20 -0
  58. package/dist/generated/core/utils.gen.d.ts.map +1 -0
  59. package/dist/generated/core/utils.gen.js +94 -0
  60. package/dist/generated/core/utils.gen.js.map +1 -0
  61. package/dist/generated/index.d.ts +3 -0
  62. package/dist/generated/index.d.ts.map +1 -0
  63. package/dist/generated/index.js +9 -0
  64. package/dist/generated/index.js.map +1 -0
  65. package/dist/generated/sdk.gen.d.ts +100 -0
  66. package/dist/generated/sdk.gen.d.ts.map +1 -0
  67. package/dist/generated/sdk.gen.js +191 -0
  68. package/dist/generated/sdk.gen.js.map +1 -0
  69. package/dist/generated/types.gen.d.ts +861 -0
  70. package/dist/generated/types.gen.d.ts.map +1 -0
  71. package/dist/generated/types.gen.js +4 -0
  72. package/dist/generated/types.gen.js.map +1 -0
  73. package/dist/index.d.ts +226 -0
  74. package/dist/index.d.ts.map +1 -0
  75. package/dist/index.js +130 -0
  76. package/dist/index.js.map +1 -0
  77. package/dist/resources/agents.d.ts +26 -0
  78. package/dist/resources/agents.d.ts.map +1 -0
  79. package/dist/resources/agents.js +49 -0
  80. package/dist/resources/agents.js.map +1 -0
  81. package/dist/resources/auth.d.ts +13 -0
  82. package/dist/resources/auth.d.ts.map +1 -0
  83. package/dist/resources/auth.js +16 -0
  84. package/dist/resources/auth.js.map +1 -0
  85. package/dist/resources/chat.d.ts +24 -0
  86. package/dist/resources/chat.d.ts.map +1 -0
  87. package/dist/resources/chat.js +28 -0
  88. package/dist/resources/chat.js.map +1 -0
  89. package/dist/resources/config.d.ts +23 -0
  90. package/dist/resources/config.d.ts.map +1 -0
  91. package/dist/resources/config.js +37 -0
  92. package/dist/resources/config.js.map +1 -0
  93. package/dist/resources/conversations.d.ts +46 -0
  94. package/dist/resources/conversations.d.ts.map +1 -0
  95. package/dist/resources/conversations.js +22 -0
  96. package/dist/resources/conversations.js.map +1 -0
  97. package/dist/resources/entities.d.ts +31 -0
  98. package/dist/resources/entities.d.ts.map +1 -0
  99. package/dist/resources/entities.js +26 -0
  100. package/dist/resources/entities.js.map +1 -0
  101. package/dist/resources/feedback.d.ts +33 -0
  102. package/dist/resources/feedback.d.ts.map +1 -0
  103. package/dist/resources/feedback.js +49 -0
  104. package/dist/resources/feedback.js.map +1 -0
  105. package/dist/resources/kb.d.ts +33 -0
  106. package/dist/resources/kb.d.ts.map +1 -0
  107. package/dist/resources/kb.js +40 -0
  108. package/dist/resources/kb.js.map +1 -0
  109. package/dist/resources/organizations.d.ts +40 -0
  110. package/dist/resources/organizations.d.ts.map +1 -0
  111. package/dist/resources/organizations.js +26 -0
  112. package/dist/resources/organizations.js.map +1 -0
  113. package/dist/resources/scenarios.d.ts +20 -0
  114. package/dist/resources/scenarios.d.ts.map +1 -0
  115. package/dist/resources/scenarios.js +37 -0
  116. package/dist/resources/scenarios.js.map +1 -0
  117. package/dist/resources/stats.d.ts +8 -0
  118. package/dist/resources/stats.d.ts.map +1 -0
  119. package/dist/resources/stats.js +16 -0
  120. package/dist/resources/stats.js.map +1 -0
  121. package/dist/resources/tickets.d.ts +33 -0
  122. package/dist/resources/tickets.d.ts.map +1 -0
  123. package/dist/resources/tickets.js +34 -0
  124. package/dist/resources/tickets.js.map +1 -0
  125. package/dist/resources/users.d.ts +32 -0
  126. package/dist/resources/users.d.ts.map +1 -0
  127. package/dist/resources/users.js +22 -0
  128. package/dist/resources/users.js.map +1 -0
  129. package/package.json +28 -0
@@ -0,0 +1,861 @@
1
+ export type ClientOptions = {
2
+ baseUrl: 'https://{subdomain}.operla.ai' | (string & {});
3
+ };
4
+ export type ListData = {
5
+ body?: never;
6
+ path?: never;
7
+ query?: {
8
+ /**
9
+ * Filter: only list conversations linked to this entity.
10
+ */
11
+ entityId?: string;
12
+ /**
13
+ * Filter: only list conversations in this status.
14
+ */
15
+ status?: 'pending' | 'processing' | 'awaiting_validation' | 'awaiting_user' | 'validated' | 'refused' | 'resolved' | 'closed' | 'failed' | 'escalated' | 'spam';
16
+ /**
17
+ * Max number of conversations to return (1-100, default 20).
18
+ */
19
+ limit?: number;
20
+ /**
21
+ * Number of conversations to skip for pagination (default 0).
22
+ */
23
+ offset?: number | null;
24
+ };
25
+ url: '/conversations';
26
+ };
27
+ export type ListErrors = {
28
+ /**
29
+ * Authentication required
30
+ */
31
+ 401: unknown;
32
+ /**
33
+ * Insufficient permissions
34
+ */
35
+ 403: unknown;
36
+ };
37
+ export type ListResponses = {
38
+ /**
39
+ * Successful response
40
+ */
41
+ 200: {
42
+ /**
43
+ * Conversations matching the query, sorted by last activity (most recent first).
44
+ */
45
+ conversations: Array<{
46
+ /**
47
+ * Conversation ID (format: conv_xxxxxxxxxxxx).
48
+ */
49
+ conversationId: string;
50
+ /**
51
+ * Organization linked to the conversation (when you use organizations).
52
+ */
53
+ organizationId?: string;
54
+ /**
55
+ * Current lifecycle status of the conversation.
56
+ */
57
+ status: 'pending' | 'processing' | 'awaiting_validation' | 'awaiting_user' | 'validated' | 'refused' | 'resolved' | 'closed' | 'failed' | 'escalated' | 'spam';
58
+ /**
59
+ * Short human-readable subject computed from the first messages or the user's identity.
60
+ */
61
+ subject: string;
62
+ /**
63
+ * The person in the conversation, if identified. Null when no user is known yet.
64
+ */
65
+ user: {
66
+ /**
67
+ * Unique identifier of the person in the conversation, in your system.
68
+ */
69
+ userId: string;
70
+ /**
71
+ * Whether the user is fully identified. Pass `true` to skip user resolution (you have a complete profile); pass `false` (or omit) to have us verify identity from the message. In responses, reflects the current state.
72
+ */
73
+ resolved?: boolean;
74
+ /**
75
+ * Custom data attached to the user (name, email, account info, etc.).
76
+ */
77
+ data?: {
78
+ [key: string]: unknown;
79
+ };
80
+ } | null;
81
+ /**
82
+ * Entity linked to the conversation (when you use entities).
83
+ */
84
+ entityId?: string;
85
+ /**
86
+ * Total number of messages exchanged so far (user + agent).
87
+ */
88
+ messageCount: number;
89
+ /**
90
+ * ISO timestamp of the last message, or null if no messages yet.
91
+ */
92
+ lastMessageAt: string | null;
93
+ /**
94
+ * ISO timestamp when the conversation was created.
95
+ */
96
+ createdAt: string;
97
+ /**
98
+ * ISO timestamp of the last modification (message, status change, etc.).
99
+ */
100
+ updatedAt: string;
101
+ }>;
102
+ /**
103
+ * Total number of conversations matching the query (across all pages).
104
+ */
105
+ total: number;
106
+ /**
107
+ * Page size applied to this response.
108
+ */
109
+ limit: number;
110
+ /**
111
+ * Offset applied to this response.
112
+ */
113
+ offset: number;
114
+ };
115
+ };
116
+ export type ListResponse = ListResponses[keyof ListResponses];
117
+ export type GetData = {
118
+ body?: never;
119
+ path: {
120
+ conversationId: string;
121
+ };
122
+ query?: never;
123
+ url: '/conversations/{conversationId}';
124
+ };
125
+ export type GetErrors = {
126
+ /**
127
+ * Authentication required
128
+ */
129
+ 401: unknown;
130
+ /**
131
+ * Insufficient permissions
132
+ */
133
+ 403: unknown;
134
+ };
135
+ export type GetResponses = {
136
+ /**
137
+ * Successful response
138
+ */
139
+ 200: {
140
+ /**
141
+ * Conversation ID (format: conv_xxxxxxxxxxxx).
142
+ */
143
+ conversationId: string;
144
+ /**
145
+ * Organization linked to the conversation (when you use organizations).
146
+ */
147
+ organizationId?: string;
148
+ /**
149
+ * Current lifecycle status of the conversation.
150
+ */
151
+ status: 'pending' | 'processing' | 'awaiting_validation' | 'awaiting_user' | 'validated' | 'refused' | 'resolved' | 'closed' | 'failed' | 'escalated' | 'spam';
152
+ /**
153
+ * Short human-readable subject computed from the first messages or the user's identity.
154
+ */
155
+ subject: string;
156
+ /**
157
+ * The person in the conversation, if identified. Null when no user is known yet.
158
+ */
159
+ user: {
160
+ /**
161
+ * Unique identifier of the person in the conversation, in your system.
162
+ */
163
+ userId: string;
164
+ /**
165
+ * Whether the user is fully identified. Pass `true` to skip user resolution (you have a complete profile); pass `false` (or omit) to have us verify identity from the message. In responses, reflects the current state.
166
+ */
167
+ resolved?: boolean;
168
+ /**
169
+ * Custom data attached to the user (name, email, account info, etc.).
170
+ */
171
+ data?: {
172
+ [key: string]: unknown;
173
+ };
174
+ } | null;
175
+ /**
176
+ * Entity linked to the conversation (when you use entities).
177
+ */
178
+ entityId?: string;
179
+ /**
180
+ * Total number of messages exchanged so far (user + agent).
181
+ */
182
+ messageCount: number;
183
+ /**
184
+ * ISO timestamp of the last message, or null if no messages yet.
185
+ */
186
+ lastMessageAt: string | null;
187
+ /**
188
+ * ISO timestamp when the conversation was created.
189
+ */
190
+ createdAt: string;
191
+ /**
192
+ * ISO timestamp of the last modification (message, status change, etc.).
193
+ */
194
+ updatedAt: string;
195
+ /**
196
+ * Full message history in chronological order.
197
+ */
198
+ thread: Array<{
199
+ /**
200
+ * Who emitted the message — the user or your AI agent.
201
+ */
202
+ role: 'user' | 'agent';
203
+ /**
204
+ * Message body.
205
+ */
206
+ content: string;
207
+ /**
208
+ * ISO timestamp when the message was recorded.
209
+ */
210
+ timestamp: string;
211
+ /**
212
+ * Display name of the author (when available).
213
+ */
214
+ authorName?: string;
215
+ }>;
216
+ /**
217
+ * Origin tag provided when the conversation was created.
218
+ */
219
+ source?: string;
220
+ /**
221
+ * Cross-reference ID in your external ticketing system (e.g. Zendesk), when applicable.
222
+ */
223
+ externalTicketId?: string;
224
+ };
225
+ };
226
+ export type GetResponse = GetResponses[keyof GetResponses];
227
+ export type SendMessageData = {
228
+ body?: {
229
+ /**
230
+ * Message text sent by the user.
231
+ */
232
+ message: string;
233
+ /**
234
+ * Conversation ID (format: conv_xxxxxxxxxxxx). Omit on the first call — the server generates one and returns it.
235
+ */
236
+ conversationId?: string;
237
+ /**
238
+ * Link the conversation to an entity (only applied when creating the conversation; ignored on subsequent messages for the same conversationId).
239
+ */
240
+ entityId?: string;
241
+ /**
242
+ * The user sending the message. Set `resolved: true` on the user object to skip identity resolution when you already have a complete profile.
243
+ */
244
+ user?: {
245
+ /**
246
+ * Unique identifier of the person in the conversation, in your system.
247
+ */
248
+ userId: string;
249
+ /**
250
+ * Whether the user is fully identified. Pass `true` to skip user resolution (you have a complete profile); pass `false` (or omit) to have us verify identity from the message. In responses, reflects the current state.
251
+ */
252
+ resolved?: boolean;
253
+ /**
254
+ * Custom data attached to the user (name, email, account info, etc.).
255
+ */
256
+ data?: {
257
+ [key: string]: unknown;
258
+ };
259
+ };
260
+ /**
261
+ * Overrides the configured KBs for this message. Not stored.
262
+ */
263
+ kbArticles?: Array<{
264
+ /**
265
+ * Article title shown to the agent.
266
+ */
267
+ title: string;
268
+ /**
269
+ * Article body (markdown-friendly).
270
+ */
271
+ content: string;
272
+ }>;
273
+ /**
274
+ * Origin tag for the conversation (e.g. "website", "chat_page"). Stored on the conversation for analytics.
275
+ */
276
+ source?: string;
277
+ /**
278
+ * Custom key/value pairs attached to the conversation. Available as variables in your agent prompts.
279
+ */
280
+ metadata?: {
281
+ [key: string]: string;
282
+ };
283
+ };
284
+ path?: never;
285
+ query?: never;
286
+ url: '/conversations/messages';
287
+ };
288
+ export type SendMessageErrors = {
289
+ /**
290
+ * Authentication required
291
+ */
292
+ 401: unknown;
293
+ /**
294
+ * Insufficient permissions
295
+ */
296
+ 403: unknown;
297
+ };
298
+ export type SendMessageResponses = {
299
+ /**
300
+ * Successful response
301
+ */
302
+ 200: {
303
+ /**
304
+ * Conversation ID — pass it back on subsequent calls to continue the conversation.
305
+ */
306
+ conversationId: string;
307
+ /**
308
+ * Organization linked to the conversation (when you use organizations).
309
+ */
310
+ organizationId?: string;
311
+ /**
312
+ * The person in the conversation, if identified. Null when no user is known yet.
313
+ */
314
+ user: {
315
+ /**
316
+ * Unique identifier of the person in the conversation, in your system.
317
+ */
318
+ userId: string;
319
+ /**
320
+ * Whether the user is fully identified. Pass `true` to skip user resolution (you have a complete profile); pass `false` (or omit) to have us verify identity from the message. In responses, reflects the current state.
321
+ */
322
+ resolved?: boolean;
323
+ /**
324
+ * Custom data attached to the user (name, email, account info, etc.).
325
+ */
326
+ data?: {
327
+ [key: string]: unknown;
328
+ };
329
+ } | null;
330
+ /**
331
+ * Entity linked to the conversation (when you use entities).
332
+ */
333
+ entityId?: string;
334
+ /**
335
+ * AI-generated response to the user message.
336
+ */
337
+ content: string;
338
+ };
339
+ };
340
+ export type SendMessageResponse = SendMessageResponses[keyof SendMessageResponses];
341
+ export type List2Data = {
342
+ body?: never;
343
+ path?: never;
344
+ query?: {
345
+ /**
346
+ * Filter: only list entities under this organization (when you use organizations).
347
+ */
348
+ organizationId?: string;
349
+ };
350
+ url: '/entities';
351
+ };
352
+ export type List2Errors = {
353
+ /**
354
+ * Authentication required
355
+ */
356
+ 401: unknown;
357
+ /**
358
+ * Insufficient permissions
359
+ */
360
+ 403: unknown;
361
+ };
362
+ export type List2Responses = {
363
+ /**
364
+ * Successful response
365
+ */
366
+ 200: {
367
+ /**
368
+ * Entities matching the query.
369
+ */
370
+ entities: Array<{
371
+ /**
372
+ * Entity ID (format: ent_xxxxxxxxxxxx).
373
+ */
374
+ id: string;
375
+ organizationId?: string | null;
376
+ /**
377
+ * Human-readable name of the entity.
378
+ */
379
+ name: string;
380
+ /**
381
+ * Free-form metadata attached to the entity (shape is up to you).
382
+ */
383
+ metadata?: {
384
+ [key: string]: unknown;
385
+ };
386
+ /**
387
+ * ISO timestamp when the entity was created.
388
+ */
389
+ createdAt: string;
390
+ /**
391
+ * ISO timestamp of the last update.
392
+ */
393
+ updatedAt: string;
394
+ }>;
395
+ /**
396
+ * Total number of entities matching the query.
397
+ */
398
+ total: number;
399
+ };
400
+ };
401
+ export type List2Response = List2Responses[keyof List2Responses];
402
+ export type CreateData = {
403
+ body?: {
404
+ /**
405
+ * Human-readable name of the entity.
406
+ */
407
+ name: string;
408
+ /**
409
+ * Free-form metadata attached to the entity (shape is up to you).
410
+ */
411
+ metadata?: {
412
+ [key: string]: unknown;
413
+ };
414
+ };
415
+ path?: never;
416
+ query?: never;
417
+ url: '/entities';
418
+ };
419
+ export type CreateErrors = {
420
+ /**
421
+ * Authentication required
422
+ */
423
+ 401: unknown;
424
+ /**
425
+ * Insufficient permissions
426
+ */
427
+ 403: unknown;
428
+ };
429
+ export type CreateResponses = {
430
+ /**
431
+ * Successful response
432
+ */
433
+ 200: {
434
+ /**
435
+ * Entity ID (format: ent_xxxxxxxxxxxx).
436
+ */
437
+ id: string;
438
+ organizationId?: string | null;
439
+ /**
440
+ * Human-readable name of the entity.
441
+ */
442
+ name: string;
443
+ /**
444
+ * Free-form metadata attached to the entity (shape is up to you).
445
+ */
446
+ metadata?: {
447
+ [key: string]: unknown;
448
+ };
449
+ /**
450
+ * ISO timestamp when the entity was created.
451
+ */
452
+ createdAt: string;
453
+ /**
454
+ * ISO timestamp of the last update.
455
+ */
456
+ updatedAt: string;
457
+ };
458
+ };
459
+ export type CreateResponse = CreateResponses[keyof CreateResponses];
460
+ export type DeleteData = {
461
+ body?: never;
462
+ path: {
463
+ id: string;
464
+ };
465
+ query?: never;
466
+ url: '/entities/{id}';
467
+ };
468
+ export type DeleteErrors = {
469
+ /**
470
+ * Authentication required
471
+ */
472
+ 401: unknown;
473
+ /**
474
+ * Insufficient permissions
475
+ */
476
+ 403: unknown;
477
+ };
478
+ export type DeleteResponses = {
479
+ /**
480
+ * Successful response
481
+ */
482
+ 200: {
483
+ /**
484
+ * Confirmation message.
485
+ */
486
+ message: string;
487
+ };
488
+ };
489
+ export type DeleteResponse = DeleteResponses[keyof DeleteResponses];
490
+ export type Get2Data = {
491
+ body?: never;
492
+ path: {
493
+ id: string;
494
+ };
495
+ query?: never;
496
+ url: '/entities/{id}';
497
+ };
498
+ export type Get2Errors = {
499
+ /**
500
+ * Authentication required
501
+ */
502
+ 401: unknown;
503
+ /**
504
+ * Insufficient permissions
505
+ */
506
+ 403: unknown;
507
+ };
508
+ export type Get2Responses = {
509
+ /**
510
+ * Successful response
511
+ */
512
+ 200: {
513
+ /**
514
+ * Entity ID (format: ent_xxxxxxxxxxxx).
515
+ */
516
+ id: string;
517
+ organizationId?: string | null;
518
+ /**
519
+ * Human-readable name of the entity.
520
+ */
521
+ name: string;
522
+ /**
523
+ * Free-form metadata attached to the entity (shape is up to you).
524
+ */
525
+ metadata?: {
526
+ [key: string]: unknown;
527
+ };
528
+ /**
529
+ * ISO timestamp when the entity was created.
530
+ */
531
+ createdAt: string;
532
+ /**
533
+ * ISO timestamp of the last update.
534
+ */
535
+ updatedAt: string;
536
+ };
537
+ };
538
+ export type Get2Response = Get2Responses[keyof Get2Responses];
539
+ export type UpdateData = {
540
+ body?: {
541
+ /**
542
+ * New name for the entity.
543
+ */
544
+ name?: string;
545
+ /**
546
+ * Replace the free-form metadata attached to the entity.
547
+ */
548
+ metadata?: {
549
+ [key: string]: unknown;
550
+ };
551
+ };
552
+ path: {
553
+ id: string;
554
+ };
555
+ query?: never;
556
+ url: '/entities/{id}';
557
+ };
558
+ export type UpdateErrors = {
559
+ /**
560
+ * Authentication required
561
+ */
562
+ 401: unknown;
563
+ /**
564
+ * Insufficient permissions
565
+ */
566
+ 403: unknown;
567
+ };
568
+ export type UpdateResponses = {
569
+ /**
570
+ * Successful response
571
+ */
572
+ 200: {
573
+ /**
574
+ * Entity ID (format: ent_xxxxxxxxxxxx).
575
+ */
576
+ id: string;
577
+ organizationId?: string | null;
578
+ /**
579
+ * Human-readable name of the entity.
580
+ */
581
+ name: string;
582
+ /**
583
+ * Free-form metadata attached to the entity (shape is up to you).
584
+ */
585
+ metadata?: {
586
+ [key: string]: unknown;
587
+ };
588
+ /**
589
+ * ISO timestamp when the entity was created.
590
+ */
591
+ createdAt: string;
592
+ /**
593
+ * ISO timestamp of the last update.
594
+ */
595
+ updatedAt: string;
596
+ };
597
+ };
598
+ export type UpdateResponse = UpdateResponses[keyof UpdateResponses];
599
+ export type List3Data = {
600
+ body?: never;
601
+ path?: never;
602
+ query?: never;
603
+ url: '/organizations';
604
+ };
605
+ export type List3Errors = {
606
+ /**
607
+ * Authentication required
608
+ */
609
+ 401: unknown;
610
+ /**
611
+ * Insufficient permissions
612
+ */
613
+ 403: unknown;
614
+ };
615
+ export type List3Responses = {
616
+ /**
617
+ * Successful response
618
+ */
619
+ 200: {
620
+ /**
621
+ * Organizations matching the query.
622
+ */
623
+ organizations: Array<{
624
+ /**
625
+ * Organization ID (format: org_xxxxxxxxxxxx).
626
+ */
627
+ id: string;
628
+ /**
629
+ * Human-readable name of the organization.
630
+ */
631
+ name: string;
632
+ /**
633
+ * Free-form metadata attached to the organization (shape is up to you).
634
+ */
635
+ metadata?: {
636
+ [key: string]: unknown;
637
+ };
638
+ /**
639
+ * ISO timestamp when the organization was created.
640
+ */
641
+ createdAt: string;
642
+ /**
643
+ * ISO timestamp of the last update.
644
+ */
645
+ updatedAt: string;
646
+ }>;
647
+ /**
648
+ * Total number of organizations matching the query.
649
+ */
650
+ total: number;
651
+ };
652
+ };
653
+ export type List3Response = List3Responses[keyof List3Responses];
654
+ export type Create2Data = {
655
+ body?: {
656
+ /**
657
+ * Human-readable name of the organization (must be unique).
658
+ */
659
+ name: string;
660
+ /**
661
+ * Free-form metadata attached to the organization (shape is up to you).
662
+ */
663
+ metadata?: {
664
+ [key: string]: unknown;
665
+ };
666
+ /**
667
+ * When true, also generate a scoped API key for the new organization (returned only once in the response). Defaults to false — API keys can be created later.
668
+ */
669
+ generateApiKey?: boolean;
670
+ };
671
+ path?: never;
672
+ query?: never;
673
+ url: '/organizations';
674
+ };
675
+ export type Create2Errors = {
676
+ /**
677
+ * Authentication required
678
+ */
679
+ 401: unknown;
680
+ /**
681
+ * Insufficient permissions
682
+ */
683
+ 403: unknown;
684
+ };
685
+ export type Create2Responses = {
686
+ /**
687
+ * Successful response
688
+ */
689
+ 200: {
690
+ /**
691
+ * The newly-created organization.
692
+ */
693
+ organization: {
694
+ /**
695
+ * Organization ID (format: org_xxxxxxxxxxxx).
696
+ */
697
+ id: string;
698
+ /**
699
+ * Human-readable name of the organization.
700
+ */
701
+ name: string;
702
+ /**
703
+ * Free-form metadata attached to the organization (shape is up to you).
704
+ */
705
+ metadata?: {
706
+ [key: string]: unknown;
707
+ };
708
+ /**
709
+ * ISO timestamp when the organization was created.
710
+ */
711
+ createdAt: string;
712
+ /**
713
+ * ISO timestamp of the last update.
714
+ */
715
+ updatedAt: string;
716
+ };
717
+ /**
718
+ * Scoped API key for the newly-created organization — shown only once. Store it securely; it cannot be retrieved later. Present only when `generateApiKey: true` was passed in the request.
719
+ */
720
+ apiKey?: string;
721
+ };
722
+ };
723
+ export type Create2Response = Create2Responses[keyof Create2Responses];
724
+ export type Delete2Data = {
725
+ body?: never;
726
+ path: {
727
+ id: string;
728
+ };
729
+ query?: never;
730
+ url: '/organizations/{id}';
731
+ };
732
+ export type Delete2Errors = {
733
+ /**
734
+ * Authentication required
735
+ */
736
+ 401: unknown;
737
+ /**
738
+ * Insufficient permissions
739
+ */
740
+ 403: unknown;
741
+ };
742
+ export type Delete2Responses = {
743
+ /**
744
+ * Successful response
745
+ */
746
+ 200: {
747
+ /**
748
+ * Confirmation message.
749
+ */
750
+ message: string;
751
+ };
752
+ };
753
+ export type Delete2Response = Delete2Responses[keyof Delete2Responses];
754
+ export type Get3Data = {
755
+ body?: never;
756
+ path: {
757
+ id: string;
758
+ };
759
+ query?: never;
760
+ url: '/organizations/{id}';
761
+ };
762
+ export type Get3Errors = {
763
+ /**
764
+ * Authentication required
765
+ */
766
+ 401: unknown;
767
+ /**
768
+ * Insufficient permissions
769
+ */
770
+ 403: unknown;
771
+ };
772
+ export type Get3Responses = {
773
+ /**
774
+ * Successful response
775
+ */
776
+ 200: {
777
+ /**
778
+ * Organization ID (format: org_xxxxxxxxxxxx).
779
+ */
780
+ id: string;
781
+ /**
782
+ * Human-readable name of the organization.
783
+ */
784
+ name: string;
785
+ /**
786
+ * Free-form metadata attached to the organization (shape is up to you).
787
+ */
788
+ metadata?: {
789
+ [key: string]: unknown;
790
+ };
791
+ /**
792
+ * ISO timestamp when the organization was created.
793
+ */
794
+ createdAt: string;
795
+ /**
796
+ * ISO timestamp of the last update.
797
+ */
798
+ updatedAt: string;
799
+ };
800
+ };
801
+ export type Get3Response = Get3Responses[keyof Get3Responses];
802
+ export type Update2Data = {
803
+ body?: {
804
+ /**
805
+ * New name for the organization.
806
+ */
807
+ name?: string;
808
+ /**
809
+ * Replace the free-form metadata attached to the organization.
810
+ */
811
+ metadata?: {
812
+ [key: string]: unknown;
813
+ };
814
+ };
815
+ path: {
816
+ id: string;
817
+ };
818
+ query?: never;
819
+ url: '/organizations/{id}';
820
+ };
821
+ export type Update2Errors = {
822
+ /**
823
+ * Authentication required
824
+ */
825
+ 401: unknown;
826
+ /**
827
+ * Insufficient permissions
828
+ */
829
+ 403: unknown;
830
+ };
831
+ export type Update2Responses = {
832
+ /**
833
+ * Successful response
834
+ */
835
+ 200: {
836
+ /**
837
+ * Organization ID (format: org_xxxxxxxxxxxx).
838
+ */
839
+ id: string;
840
+ /**
841
+ * Human-readable name of the organization.
842
+ */
843
+ name: string;
844
+ /**
845
+ * Free-form metadata attached to the organization (shape is up to you).
846
+ */
847
+ metadata?: {
848
+ [key: string]: unknown;
849
+ };
850
+ /**
851
+ * ISO timestamp when the organization was created.
852
+ */
853
+ createdAt: string;
854
+ /**
855
+ * ISO timestamp of the last update.
856
+ */
857
+ updatedAt: string;
858
+ };
859
+ };
860
+ export type Update2Response = Update2Responses[keyof Update2Responses];
861
+ //# sourceMappingURL=types.gen.d.ts.map