@operla-ai/sdk 0.3.6 → 0.4.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.
@@ -2386,6 +2386,171 @@ export type List2Responses = {
2386
2386
  };
2387
2387
  };
2388
2388
  export type List2Response = List2Responses[keyof List2Responses];
2389
+ export type Create2Data = {
2390
+ body?: {
2391
+ /**
2392
+ * The person the conversation is with. Set `resolved: true` when you already have a complete profile to skip identity resolution on later messages.
2393
+ */
2394
+ user?: {
2395
+ /**
2396
+ * Unique identifier of the person in the conversation, in your system.
2397
+ */
2398
+ userId: string;
2399
+ /**
2400
+ * 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.
2401
+ */
2402
+ resolved?: boolean;
2403
+ /**
2404
+ * Custom data attached to the user (name, email, account info, etc.).
2405
+ */
2406
+ data?: {
2407
+ [key: string]: unknown;
2408
+ };
2409
+ };
2410
+ /**
2411
+ * Link the conversation to an entity (format: ent_xxxxxxxxxxxx).
2412
+ */
2413
+ entityId?: string;
2414
+ /**
2415
+ * Origin tag for the conversation (e.g. "website", "import"). Stored for analytics.
2416
+ */
2417
+ source?: string;
2418
+ };
2419
+ path?: never;
2420
+ query?: never;
2421
+ url: '/conversations';
2422
+ };
2423
+ export type Create2Errors = {
2424
+ /**
2425
+ * Bad request
2426
+ */
2427
+ 400: {
2428
+ statusCode: number;
2429
+ error: {
2430
+ code: 'MISSING-ORG' | 'VALIDATION' | 'INVALID-JSON';
2431
+ message: string;
2432
+ };
2433
+ };
2434
+ /**
2435
+ * Authentication required
2436
+ */
2437
+ 401: {
2438
+ statusCode: number;
2439
+ error: {
2440
+ code: 'AUTH';
2441
+ message: string;
2442
+ };
2443
+ };
2444
+ /**
2445
+ * Insufficient permissions
2446
+ */
2447
+ 403: {
2448
+ statusCode: number;
2449
+ error: {
2450
+ code: 'FORBIDDEN' | 'SCOPE-FORBIDDEN';
2451
+ message: string;
2452
+ };
2453
+ };
2454
+ };
2455
+ export type Create2Error = Create2Errors[keyof Create2Errors];
2456
+ export type Create2Responses = {
2457
+ /**
2458
+ * Successful response
2459
+ */
2460
+ 200: {
2461
+ /**
2462
+ * Conversation ID (format: conv_xxxxxxxxxxxx).
2463
+ */
2464
+ conversationId: string;
2465
+ /**
2466
+ * Organization the conversation is linked to (id + name); null when not tied to one.
2467
+ */
2468
+ organization: {
2469
+ id: string;
2470
+ name: string;
2471
+ } | null;
2472
+ /**
2473
+ * Current lifecycle status of the conversation.
2474
+ */
2475
+ status: 'pending' | 'processing' | 'awaiting_validation' | 'awaiting_user' | 'resolved' | 'closed' | 'failed' | 'escalated' | 'spam';
2476
+ /**
2477
+ * Short human-readable subject computed from the first messages or the user's identity.
2478
+ */
2479
+ subject: string;
2480
+ /**
2481
+ * The person in the conversation, if identified. Null when no user is known yet.
2482
+ */
2483
+ user: {
2484
+ /**
2485
+ * Unique identifier of the person in the conversation, in your system.
2486
+ */
2487
+ userId: string;
2488
+ /**
2489
+ * 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.
2490
+ */
2491
+ resolved?: boolean;
2492
+ /**
2493
+ * Custom data attached to the user (name, email, account info, etc.).
2494
+ */
2495
+ data?: {
2496
+ [key: string]: unknown;
2497
+ };
2498
+ } | null;
2499
+ /**
2500
+ * Entity the conversation is linked to (id + name); null when not tied to one.
2501
+ */
2502
+ entity: {
2503
+ id: string;
2504
+ name: string;
2505
+ } | null;
2506
+ /**
2507
+ * Total number of messages exchanged so far (user + agent).
2508
+ */
2509
+ messageCount: number;
2510
+ /**
2511
+ * ISO timestamp of the last message, or null if no messages yet.
2512
+ */
2513
+ lastMessageAt: string | null;
2514
+ /**
2515
+ * ISO timestamp when the conversation was created.
2516
+ */
2517
+ createdAt: string;
2518
+ /**
2519
+ * ISO timestamp of the last modification (message, status change, etc.).
2520
+ */
2521
+ updatedAt: string;
2522
+ /**
2523
+ * Full message history in chronological order.
2524
+ */
2525
+ thread: Array<{
2526
+ /**
2527
+ * Who emitted the message — the user or your AI agent.
2528
+ */
2529
+ role: 'user' | 'agent';
2530
+ /**
2531
+ * Message body.
2532
+ */
2533
+ content: string;
2534
+ /**
2535
+ * ISO timestamp when the message was recorded.
2536
+ */
2537
+ timestamp: string;
2538
+ /**
2539
+ * Display name of the author (when available).
2540
+ */
2541
+ authorName?: string;
2542
+ }>;
2543
+ /**
2544
+ * Origin tag provided when the conversation was created.
2545
+ */
2546
+ source?: string;
2547
+ /**
2548
+ * Cross-reference ID in your external ticketing system (e.g. Zendesk), when applicable.
2549
+ */
2550
+ externalTicketId?: string;
2551
+ };
2552
+ };
2553
+ export type Create2Response = Create2Responses[keyof Create2Responses];
2389
2554
  export type Get2Data = {
2390
2555
  body?: never;
2391
2556
  path: {
@@ -2951,7 +3116,7 @@ export type List3Responses = {
2951
3116
  };
2952
3117
  };
2953
3118
  export type List3Response = List3Responses[keyof List3Responses];
2954
- export type Create2Data = {
3119
+ export type Create3Data = {
2955
3120
  body?: {
2956
3121
  /**
2957
3122
  * Human-readable name of the entity.
@@ -2968,7 +3133,7 @@ export type Create2Data = {
2968
3133
  query?: never;
2969
3134
  url: '/entities';
2970
3135
  };
2971
- export type Create2Errors = {
3136
+ export type Create3Errors = {
2972
3137
  /**
2973
3138
  * Bad request
2974
3139
  */
@@ -3000,8 +3165,8 @@ export type Create2Errors = {
3000
3165
  };
3001
3166
  };
3002
3167
  };
3003
- export type Create2Error = Create2Errors[keyof Create2Errors];
3004
- export type Create2Responses = {
3168
+ export type Create3Error = Create3Errors[keyof Create3Errors];
3169
+ export type Create3Responses = {
3005
3170
  /**
3006
3171
  * Successful response
3007
3172
  */
@@ -3037,26 +3202,564 @@ export type Create2Responses = {
3037
3202
  };
3038
3203
  };
3039
3204
  };
3040
- export type Create2Response = Create2Responses[keyof Create2Responses];
3041
- export type Delete2Data = {
3205
+ export type Create3Response = Create3Responses[keyof Create3Responses];
3206
+ export type Delete2Data = {
3207
+ body?: never;
3208
+ path: {
3209
+ /**
3210
+ * Entity ID (format: `ent_xxxxxxxxxxxx`).
3211
+ */
3212
+ id: string;
3213
+ };
3214
+ query?: never;
3215
+ url: '/entities/{id}';
3216
+ };
3217
+ export type Delete2Errors = {
3218
+ /**
3219
+ * Bad request
3220
+ */
3221
+ 400: {
3222
+ statusCode: number;
3223
+ error: {
3224
+ code: 'MISSING-ORG';
3225
+ message: string;
3226
+ };
3227
+ };
3228
+ /**
3229
+ * Authentication required
3230
+ */
3231
+ 401: {
3232
+ statusCode: number;
3233
+ error: {
3234
+ code: 'AUTH';
3235
+ message: string;
3236
+ };
3237
+ };
3238
+ /**
3239
+ * Insufficient permissions
3240
+ */
3241
+ 403: {
3242
+ statusCode: number;
3243
+ error: {
3244
+ code: 'FORBIDDEN' | 'SCOPE-FORBIDDEN';
3245
+ message: string;
3246
+ };
3247
+ };
3248
+ };
3249
+ export type Delete2Error = Delete2Errors[keyof Delete2Errors];
3250
+ export type Delete2Responses = {
3251
+ /**
3252
+ * Successful response
3253
+ */
3254
+ 200: {
3255
+ /**
3256
+ * Confirmation message.
3257
+ */
3258
+ message: string;
3259
+ };
3260
+ };
3261
+ export type Delete2Response = Delete2Responses[keyof Delete2Responses];
3262
+ export type Get3Data = {
3263
+ body?: never;
3264
+ path: {
3265
+ /**
3266
+ * Entity ID (format: `ent_xxxxxxxxxxxx`).
3267
+ */
3268
+ id: string;
3269
+ };
3270
+ query?: never;
3271
+ url: '/entities/{id}';
3272
+ };
3273
+ export type Get3Errors = {
3274
+ /**
3275
+ * Bad request
3276
+ */
3277
+ 400: {
3278
+ statusCode: number;
3279
+ error: {
3280
+ code: 'MISSING-ORG';
3281
+ message: string;
3282
+ };
3283
+ };
3284
+ /**
3285
+ * Authentication required
3286
+ */
3287
+ 401: {
3288
+ statusCode: number;
3289
+ error: {
3290
+ code: 'AUTH';
3291
+ message: string;
3292
+ };
3293
+ };
3294
+ /**
3295
+ * Insufficient permissions
3296
+ */
3297
+ 403: {
3298
+ statusCode: number;
3299
+ error: {
3300
+ code: 'FORBIDDEN' | 'SCOPE-FORBIDDEN';
3301
+ message: string;
3302
+ };
3303
+ };
3304
+ };
3305
+ export type Get3Error = Get3Errors[keyof Get3Errors];
3306
+ export type Get3Responses = {
3307
+ /**
3308
+ * Successful response
3309
+ */
3310
+ 200: {
3311
+ /**
3312
+ * Entity ID (format: ent_xxxxxxxxxxxx).
3313
+ */
3314
+ id: string;
3315
+ /**
3316
+ * Parent organization ref (id + name); null when not tied to one.
3317
+ */
3318
+ organization: {
3319
+ id: string;
3320
+ name: string;
3321
+ } | null;
3322
+ /**
3323
+ * Human-readable name of the entity.
3324
+ */
3325
+ name: string;
3326
+ /**
3327
+ * ISO timestamp when the entity was created.
3328
+ */
3329
+ createdAt: string;
3330
+ /**
3331
+ * ISO timestamp of the last update.
3332
+ */
3333
+ updatedAt: string;
3334
+ /**
3335
+ * Free-form metadata attached to the entity (shape is up to you).
3336
+ */
3337
+ metadata?: {
3338
+ [key: string]: unknown;
3339
+ };
3340
+ };
3341
+ };
3342
+ export type Get3Response = Get3Responses[keyof Get3Responses];
3343
+ export type Update2Data = {
3344
+ body?: {
3345
+ /**
3346
+ * New name for the entity.
3347
+ */
3348
+ name?: string;
3349
+ /**
3350
+ * Replace the free-form metadata attached to the entity.
3351
+ */
3352
+ metadata?: {
3353
+ [key: string]: unknown;
3354
+ };
3355
+ };
3356
+ path: {
3357
+ /**
3358
+ * Entity ID (format: `ent_xxxxxxxxxxxx`).
3359
+ */
3360
+ id: string;
3361
+ };
3362
+ query?: never;
3363
+ url: '/entities/{id}';
3364
+ };
3365
+ export type Update2Errors = {
3366
+ /**
3367
+ * Bad request
3368
+ */
3369
+ 400: {
3370
+ statusCode: number;
3371
+ error: {
3372
+ code: 'MISSING-ORG' | 'VALIDATION' | 'INVALID-JSON';
3373
+ message: string;
3374
+ };
3375
+ };
3376
+ /**
3377
+ * Authentication required
3378
+ */
3379
+ 401: {
3380
+ statusCode: number;
3381
+ error: {
3382
+ code: 'AUTH';
3383
+ message: string;
3384
+ };
3385
+ };
3386
+ /**
3387
+ * Insufficient permissions
3388
+ */
3389
+ 403: {
3390
+ statusCode: number;
3391
+ error: {
3392
+ code: 'FORBIDDEN' | 'SCOPE-FORBIDDEN';
3393
+ message: string;
3394
+ };
3395
+ };
3396
+ };
3397
+ export type Update2Error = Update2Errors[keyof Update2Errors];
3398
+ export type Update2Responses = {
3399
+ /**
3400
+ * Successful response
3401
+ */
3402
+ 200: {
3403
+ /**
3404
+ * Entity ID (format: ent_xxxxxxxxxxxx).
3405
+ */
3406
+ id: string;
3407
+ /**
3408
+ * Parent organization ref (id + name); null when not tied to one.
3409
+ */
3410
+ organization: {
3411
+ id: string;
3412
+ name: string;
3413
+ } | null;
3414
+ /**
3415
+ * Human-readable name of the entity.
3416
+ */
3417
+ name: string;
3418
+ /**
3419
+ * ISO timestamp when the entity was created.
3420
+ */
3421
+ createdAt: string;
3422
+ /**
3423
+ * ISO timestamp of the last update.
3424
+ */
3425
+ updatedAt: string;
3426
+ /**
3427
+ * Free-form metadata attached to the entity (shape is up to you).
3428
+ */
3429
+ metadata?: {
3430
+ [key: string]: unknown;
3431
+ };
3432
+ };
3433
+ };
3434
+ export type Update2Response = Update2Responses[keyof Update2Responses];
3435
+ export type List4Data = {
3436
+ body?: never;
3437
+ path?: never;
3438
+ query?: {
3439
+ /**
3440
+ * Target a specific entity (under the caller's organization).
3441
+ */
3442
+ entityId?: string;
3443
+ };
3444
+ url: '/intents';
3445
+ };
3446
+ export type List4Errors = {
3447
+ /**
3448
+ * Bad request
3449
+ */
3450
+ 400: {
3451
+ statusCode: number;
3452
+ error: {
3453
+ code: 'MISSING-ORG' | 'VALIDATION' | 'INVALID-JSON';
3454
+ message: string;
3455
+ };
3456
+ };
3457
+ /**
3458
+ * Authentication required
3459
+ */
3460
+ 401: {
3461
+ statusCode: number;
3462
+ error: {
3463
+ code: 'AUTH';
3464
+ message: string;
3465
+ };
3466
+ };
3467
+ /**
3468
+ * Insufficient permissions
3469
+ */
3470
+ 403: {
3471
+ statusCode: number;
3472
+ error: {
3473
+ code: 'FORBIDDEN' | 'SCOPE-FORBIDDEN';
3474
+ message: string;
3475
+ };
3476
+ };
3477
+ };
3478
+ export type List4Error = List4Errors[keyof List4Errors];
3479
+ export type List4Responses = {
3480
+ /**
3481
+ * Successful response
3482
+ */
3483
+ 200: {
3484
+ /**
3485
+ * Intents visible at the caller's scope.
3486
+ */
3487
+ intents: Array<{
3488
+ /**
3489
+ * Opaque intent id (prefixed `int_`).
3490
+ */
3491
+ id: string;
3492
+ /**
3493
+ * Machine name — stable identifier used across the API.
3494
+ */
3495
+ intent: string;
3496
+ /**
3497
+ * Human-readable label.
3498
+ */
3499
+ label: string;
3500
+ /**
3501
+ * Description the orchestrator uses to classify user messages.
3502
+ */
3503
+ description: string;
3504
+ /**
3505
+ * Where the intent is routed once detected — response agent, human escalation, or a specialist.
3506
+ */
3507
+ route: {
3508
+ /**
3509
+ * Routing target — `response` (straight to the response agent), `human` (escalation), or `specialist`.
3510
+ */
3511
+ type: 'response' | 'human' | 'specialist';
3512
+ /**
3513
+ * Machine name of the specialist agent — required when `type` is `specialist`, ignored otherwise.
3514
+ */
3515
+ agentName?: string;
3516
+ };
3517
+ /**
3518
+ * Effective processing mode at the request scope.
3519
+ */
3520
+ mode: 'disabled' | 'copilot' | 'autopilot';
3521
+ /**
3522
+ * Whether the user must be identified before processing.
3523
+ */
3524
+ requiresUserInfo: boolean;
3525
+ /**
3526
+ * Display order in the intent list.
3527
+ */
3528
+ order: number;
3529
+ /**
3530
+ * Cascade level this view was resolved at.
3531
+ */
3532
+ scope: {
3533
+ /**
3534
+ * Cascade level of this view — `global` (applies everywhere), `organization`, or `entity`.
3535
+ */
3536
+ level: 'global' | 'organization' | 'entity';
3537
+ /**
3538
+ * Organization id when `level` is `organization` or `entity`.
3539
+ */
3540
+ organizationId?: string;
3541
+ /**
3542
+ * Entity id when `level` is `entity`.
3543
+ */
3544
+ entityId?: string;
3545
+ };
3546
+ }>;
3547
+ };
3548
+ };
3549
+ export type List4Response = List4Responses[keyof List4Responses];
3550
+ export type Create4Data = {
3551
+ body?: {
3552
+ /**
3553
+ * Human-readable label. The intent's machine name is derived from it (lower-cased, words joined by `_`).
3554
+ */
3555
+ label: string;
3556
+ /**
3557
+ * Description the orchestrator uses to classify user messages.
3558
+ */
3559
+ description: string;
3560
+ /**
3561
+ * Where the intent is routed once detected — response agent, human escalation, or a specialist. Defaults to direct response.
3562
+ */
3563
+ route?: {
3564
+ /**
3565
+ * Routing target — `response` (straight to the response agent), `human` (escalation), or `specialist`.
3566
+ */
3567
+ type: 'response' | 'human' | 'specialist';
3568
+ /**
3569
+ * Machine name of the specialist agent — required when `type` is `specialist`, ignored otherwise.
3570
+ */
3571
+ agentName?: string;
3572
+ };
3573
+ /**
3574
+ * Processing mode (`disabled` / `copilot` / `autopilot`). Defaults to `copilot`.
3575
+ */
3576
+ mode?: 'disabled' | 'copilot' | 'autopilot';
3577
+ /**
3578
+ * Whether the user must be identified before the intent is processed. Defaults to `true`.
3579
+ */
3580
+ requiresUserInfo?: boolean;
3581
+ /**
3582
+ * Display order in the intent list (lower first). Defaults to 0.
3583
+ */
3584
+ order?: number;
3585
+ };
3586
+ path?: never;
3587
+ query?: never;
3588
+ url: '/intents';
3589
+ };
3590
+ export type Create4Errors = {
3591
+ /**
3592
+ * Bad request
3593
+ */
3594
+ 400: {
3595
+ statusCode: number;
3596
+ error: {
3597
+ code: 'MISSING-ORG' | 'VALIDATION' | 'INVALID-JSON';
3598
+ message: string;
3599
+ };
3600
+ };
3601
+ /**
3602
+ * Authentication required
3603
+ */
3604
+ 401: {
3605
+ statusCode: number;
3606
+ error: {
3607
+ code: 'AUTH';
3608
+ message: string;
3609
+ };
3610
+ };
3611
+ /**
3612
+ * Insufficient permissions
3613
+ */
3614
+ 403: {
3615
+ statusCode: number;
3616
+ error: {
3617
+ code: 'FORBIDDEN' | 'SCOPE-FORBIDDEN';
3618
+ message: string;
3619
+ };
3620
+ };
3621
+ };
3622
+ export type Create4Error = Create4Errors[keyof Create4Errors];
3623
+ export type Create4Responses = {
3624
+ /**
3625
+ * Successful response
3626
+ */
3627
+ 200: {
3628
+ /**
3629
+ * Opaque intent id (prefixed `int_`).
3630
+ */
3631
+ id: string;
3632
+ /**
3633
+ * Machine name — stable identifier used across the API.
3634
+ */
3635
+ intent: string;
3636
+ /**
3637
+ * Human-readable label.
3638
+ */
3639
+ label: string;
3640
+ /**
3641
+ * Description the orchestrator uses to classify user messages.
3642
+ */
3643
+ description: string;
3644
+ /**
3645
+ * Where the intent is routed once detected — response agent, human escalation, or a specialist.
3646
+ */
3647
+ route: {
3648
+ /**
3649
+ * Routing target — `response` (straight to the response agent), `human` (escalation), or `specialist`.
3650
+ */
3651
+ type: 'response' | 'human' | 'specialist';
3652
+ /**
3653
+ * Machine name of the specialist agent — required when `type` is `specialist`, ignored otherwise.
3654
+ */
3655
+ agentName?: string;
3656
+ };
3657
+ /**
3658
+ * Effective processing mode at the request scope.
3659
+ */
3660
+ mode: 'disabled' | 'copilot' | 'autopilot';
3661
+ /**
3662
+ * Whether the user must be identified before processing.
3663
+ */
3664
+ requiresUserInfo: boolean;
3665
+ /**
3666
+ * Display order in the intent list.
3667
+ */
3668
+ order: number;
3669
+ /**
3670
+ * Cascade level this view was resolved at.
3671
+ */
3672
+ scope: {
3673
+ /**
3674
+ * Cascade level of this view — `global` (applies everywhere), `organization`, or `entity`.
3675
+ */
3676
+ level: 'global' | 'organization' | 'entity';
3677
+ /**
3678
+ * Organization id when `level` is `organization` or `entity`.
3679
+ */
3680
+ organizationId?: string;
3681
+ /**
3682
+ * Entity id when `level` is `entity`.
3683
+ */
3684
+ entityId?: string;
3685
+ };
3686
+ };
3687
+ };
3688
+ export type Create4Response = Create4Responses[keyof Create4Responses];
3689
+ export type Delete3Data = {
3690
+ body?: never;
3691
+ path: {
3692
+ id: string;
3693
+ };
3694
+ query?: never;
3695
+ url: '/intents/{id}';
3696
+ };
3697
+ export type Delete3Errors = {
3698
+ /**
3699
+ * Bad request
3700
+ */
3701
+ 400: {
3702
+ statusCode: number;
3703
+ error: {
3704
+ code: 'MISSING-ORG';
3705
+ message: string;
3706
+ };
3707
+ };
3708
+ /**
3709
+ * Authentication required
3710
+ */
3711
+ 401: {
3712
+ statusCode: number;
3713
+ error: {
3714
+ code: 'AUTH';
3715
+ message: string;
3716
+ };
3717
+ };
3718
+ /**
3719
+ * Insufficient permissions
3720
+ */
3721
+ 403: {
3722
+ statusCode: number;
3723
+ error: {
3724
+ code: 'FORBIDDEN' | 'SCOPE-FORBIDDEN';
3725
+ message: string;
3726
+ };
3727
+ };
3728
+ };
3729
+ export type Delete3Error = Delete3Errors[keyof Delete3Errors];
3730
+ export type Delete3Responses = {
3731
+ /**
3732
+ * Successful response
3733
+ */
3734
+ 200: {
3735
+ /**
3736
+ * Confirmation message describing the outcome.
3737
+ */
3738
+ message: string;
3739
+ };
3740
+ };
3741
+ export type Delete3Response = Delete3Responses[keyof Delete3Responses];
3742
+ export type Get4Data = {
3042
3743
  body?: never;
3043
3744
  path: {
3745
+ id: string;
3746
+ };
3747
+ query?: {
3044
3748
  /**
3045
- * Entity ID (format: `ent_xxxxxxxxxxxx`).
3749
+ * Target a specific entity (under the caller's organization).
3046
3750
  */
3047
- id: string;
3751
+ entityId?: string;
3048
3752
  };
3049
- query?: never;
3050
- url: '/entities/{id}';
3753
+ url: '/intents/{id}';
3051
3754
  };
3052
- export type Delete2Errors = {
3755
+ export type Get4Errors = {
3053
3756
  /**
3054
3757
  * Bad request
3055
3758
  */
3056
3759
  400: {
3057
3760
  statusCode: number;
3058
3761
  error: {
3059
- code: 'MISSING-ORG';
3762
+ code: 'MISSING-ORG' | 'VALIDATION' | 'INVALID-JSON';
3060
3763
  message: string;
3061
3764
  };
3062
3765
  };
@@ -3081,38 +3784,128 @@ export type Delete2Errors = {
3081
3784
  };
3082
3785
  };
3083
3786
  };
3084
- export type Delete2Error = Delete2Errors[keyof Delete2Errors];
3085
- export type Delete2Responses = {
3787
+ export type Get4Error = Get4Errors[keyof Get4Errors];
3788
+ export type Get4Responses = {
3086
3789
  /**
3087
3790
  * Successful response
3088
3791
  */
3089
3792
  200: {
3090
3793
  /**
3091
- * Confirmation message.
3794
+ * Opaque intent id (prefixed `int_`).
3092
3795
  */
3093
- message: string;
3796
+ id: string;
3797
+ /**
3798
+ * Machine name — stable identifier used across the API.
3799
+ */
3800
+ intent: string;
3801
+ /**
3802
+ * Human-readable label.
3803
+ */
3804
+ label: string;
3805
+ /**
3806
+ * Description the orchestrator uses to classify user messages.
3807
+ */
3808
+ description: string;
3809
+ /**
3810
+ * Where the intent is routed once detected — response agent, human escalation, or a specialist.
3811
+ */
3812
+ route: {
3813
+ /**
3814
+ * Routing target — `response` (straight to the response agent), `human` (escalation), or `specialist`.
3815
+ */
3816
+ type: 'response' | 'human' | 'specialist';
3817
+ /**
3818
+ * Machine name of the specialist agent — required when `type` is `specialist`, ignored otherwise.
3819
+ */
3820
+ agentName?: string;
3821
+ };
3822
+ /**
3823
+ * Effective processing mode at the request scope.
3824
+ */
3825
+ mode: 'disabled' | 'copilot' | 'autopilot';
3826
+ /**
3827
+ * Whether the user must be identified before processing.
3828
+ */
3829
+ requiresUserInfo: boolean;
3830
+ /**
3831
+ * Display order in the intent list.
3832
+ */
3833
+ order: number;
3834
+ /**
3835
+ * Cascade level this view was resolved at.
3836
+ */
3837
+ scope: {
3838
+ /**
3839
+ * Cascade level of this view — `global` (applies everywhere), `organization`, or `entity`.
3840
+ */
3841
+ level: 'global' | 'organization' | 'entity';
3842
+ /**
3843
+ * Organization id when `level` is `organization` or `entity`.
3844
+ */
3845
+ organizationId?: string;
3846
+ /**
3847
+ * Entity id when `level` is `entity`.
3848
+ */
3849
+ entityId?: string;
3850
+ };
3094
3851
  };
3095
3852
  };
3096
- export type Delete2Response = Delete2Responses[keyof Delete2Responses];
3097
- export type Get3Data = {
3098
- body?: never;
3099
- path: {
3853
+ export type Get4Response = Get4Responses[keyof Get4Responses];
3854
+ export type Update3Data = {
3855
+ body?: {
3100
3856
  /**
3101
- * Entity ID (format: `ent_xxxxxxxxxxxx`).
3857
+ * Human-readable label.
3858
+ */
3859
+ label?: string;
3860
+ /**
3861
+ * Description the orchestrator uses to classify user messages.
3862
+ */
3863
+ description?: string;
3864
+ /**
3865
+ * Where the intent is routed once detected. Editable at global scope only.
3866
+ */
3867
+ route?: {
3868
+ /**
3869
+ * Routing target — `response` (straight to the response agent), `human` (escalation), or `specialist`.
3870
+ */
3871
+ type: 'response' | 'human' | 'specialist';
3872
+ /**
3873
+ * Machine name of the specialist agent — required when `type` is `specialist`, ignored otherwise.
3874
+ */
3875
+ agentName?: string;
3876
+ };
3877
+ /**
3878
+ * Processing mode (`disabled` / `copilot` / `autopilot`) — the only field accepted at organization/entity scope.
3879
+ */
3880
+ mode?: 'disabled' | 'copilot' | 'autopilot';
3881
+ /**
3882
+ * Whether the user must be identified before processing.
3883
+ */
3884
+ requiresUserInfo?: boolean;
3885
+ /**
3886
+ * Display order in the intent list (lower first).
3102
3887
  */
3888
+ order?: number;
3889
+ };
3890
+ path: {
3103
3891
  id: string;
3104
3892
  };
3105
- query?: never;
3106
- url: '/entities/{id}';
3893
+ query?: {
3894
+ /**
3895
+ * Target a specific entity (under the caller's organization).
3896
+ */
3897
+ entityId?: string;
3898
+ };
3899
+ url: '/intents/{id}';
3107
3900
  };
3108
- export type Get3Errors = {
3901
+ export type Update3Errors = {
3109
3902
  /**
3110
3903
  * Bad request
3111
3904
  */
3112
3905
  400: {
3113
3906
  statusCode: number;
3114
3907
  error: {
3115
- code: 'MISSING-ORG';
3908
+ code: 'MISSING-ORG' | 'VALIDATION' | 'INVALID-JSON';
3116
3909
  message: string;
3117
3910
  };
3118
3911
  };
@@ -3137,67 +3930,87 @@ export type Get3Errors = {
3137
3930
  };
3138
3931
  };
3139
3932
  };
3140
- export type Get3Error = Get3Errors[keyof Get3Errors];
3141
- export type Get3Responses = {
3933
+ export type Update3Error = Update3Errors[keyof Update3Errors];
3934
+ export type Update3Responses = {
3142
3935
  /**
3143
3936
  * Successful response
3144
3937
  */
3145
3938
  200: {
3146
3939
  /**
3147
- * Entity ID (format: ent_xxxxxxxxxxxx).
3940
+ * Opaque intent id (prefixed `int_`).
3148
3941
  */
3149
3942
  id: string;
3150
3943
  /**
3151
- * Parent organization ref (id + name); null when not tied to one.
3944
+ * Machine name — stable identifier used across the API.
3152
3945
  */
3153
- organization: {
3154
- id: string;
3155
- name: string;
3156
- } | null;
3946
+ intent: string;
3157
3947
  /**
3158
- * Human-readable name of the entity.
3948
+ * Human-readable label.
3159
3949
  */
3160
- name: string;
3950
+ label: string;
3161
3951
  /**
3162
- * ISO timestamp when the entity was created.
3952
+ * Description the orchestrator uses to classify user messages.
3163
3953
  */
3164
- createdAt: string;
3954
+ description: string;
3165
3955
  /**
3166
- * ISO timestamp of the last update.
3956
+ * Where the intent is routed once detected — response agent, human escalation, or a specialist.
3167
3957
  */
3168
- updatedAt: string;
3958
+ route: {
3959
+ /**
3960
+ * Routing target — `response` (straight to the response agent), `human` (escalation), or `specialist`.
3961
+ */
3962
+ type: 'response' | 'human' | 'specialist';
3963
+ /**
3964
+ * Machine name of the specialist agent — required when `type` is `specialist`, ignored otherwise.
3965
+ */
3966
+ agentName?: string;
3967
+ };
3169
3968
  /**
3170
- * Free-form metadata attached to the entity (shape is up to you).
3969
+ * Effective processing mode at the request scope.
3171
3970
  */
3172
- metadata?: {
3173
- [key: string]: unknown;
3174
- };
3175
- };
3176
- };
3177
- export type Get3Response = Get3Responses[keyof Get3Responses];
3178
- export type Update2Data = {
3179
- body?: {
3971
+ mode: 'disabled' | 'copilot' | 'autopilot';
3180
3972
  /**
3181
- * New name for the entity.
3973
+ * Whether the user must be identified before processing.
3182
3974
  */
3183
- name?: string;
3975
+ requiresUserInfo: boolean;
3184
3976
  /**
3185
- * Replace the free-form metadata attached to the entity.
3977
+ * Display order in the intent list.
3186
3978
  */
3187
- metadata?: {
3188
- [key: string]: unknown;
3979
+ order: number;
3980
+ /**
3981
+ * Cascade level this view was resolved at.
3982
+ */
3983
+ scope: {
3984
+ /**
3985
+ * Cascade level of this view — `global` (applies everywhere), `organization`, or `entity`.
3986
+ */
3987
+ level: 'global' | 'organization' | 'entity';
3988
+ /**
3989
+ * Organization id when `level` is `organization` or `entity`.
3990
+ */
3991
+ organizationId?: string;
3992
+ /**
3993
+ * Entity id when `level` is `entity`.
3994
+ */
3995
+ entityId?: string;
3189
3996
  };
3190
3997
  };
3998
+ };
3999
+ export type Update3Response = Update3Responses[keyof Update3Responses];
4000
+ export type DeleteOverride2Data = {
4001
+ body?: never;
3191
4002
  path: {
4003
+ id: string;
4004
+ };
4005
+ query?: {
3192
4006
  /**
3193
- * Entity ID (format: `ent_xxxxxxxxxxxx`).
4007
+ * Target a specific entity (under the caller's organization).
3194
4008
  */
3195
- id: string;
4009
+ entityId?: string;
3196
4010
  };
3197
- query?: never;
3198
- url: '/entities/{id}';
4011
+ url: '/intents/{id}/override';
3199
4012
  };
3200
- export type Update2Errors = {
4013
+ export type DeleteOverride2Errors = {
3201
4014
  /**
3202
4015
  * Bad request
3203
4016
  */
@@ -3229,45 +4042,20 @@ export type Update2Errors = {
3229
4042
  };
3230
4043
  };
3231
4044
  };
3232
- export type Update2Error = Update2Errors[keyof Update2Errors];
3233
- export type Update2Responses = {
4045
+ export type DeleteOverride2Error = DeleteOverride2Errors[keyof DeleteOverride2Errors];
4046
+ export type DeleteOverride2Responses = {
3234
4047
  /**
3235
4048
  * Successful response
3236
4049
  */
3237
4050
  200: {
3238
4051
  /**
3239
- * Entity ID (format: ent_xxxxxxxxxxxx).
3240
- */
3241
- id: string;
3242
- /**
3243
- * Parent organization ref (id + name); null when not tied to one.
3244
- */
3245
- organization: {
3246
- id: string;
3247
- name: string;
3248
- } | null;
3249
- /**
3250
- * Human-readable name of the entity.
3251
- */
3252
- name: string;
3253
- /**
3254
- * ISO timestamp when the entity was created.
3255
- */
3256
- createdAt: string;
3257
- /**
3258
- * ISO timestamp of the last update.
3259
- */
3260
- updatedAt: string;
3261
- /**
3262
- * Free-form metadata attached to the entity (shape is up to you).
4052
+ * Confirmation message describing the outcome.
3263
4053
  */
3264
- metadata?: {
3265
- [key: string]: unknown;
3266
- };
4054
+ message: string;
3267
4055
  };
3268
4056
  };
3269
- export type Update2Response = Update2Responses[keyof Update2Responses];
3270
- export type List4Data = {
4057
+ export type DeleteOverride2Response = DeleteOverride2Responses[keyof DeleteOverride2Responses];
4058
+ export type List5Data = {
3271
4059
  body?: never;
3272
4060
  path?: never;
3273
4061
  query?: {
@@ -3286,7 +4074,7 @@ export type List4Data = {
3286
4074
  };
3287
4075
  url: '/kb';
3288
4076
  };
3289
- export type List4Errors = {
4077
+ export type List5Errors = {
3290
4078
  /**
3291
4079
  * Bad request
3292
4080
  */
@@ -3318,8 +4106,8 @@ export type List4Errors = {
3318
4106
  };
3319
4107
  };
3320
4108
  };
3321
- export type List4Error = List4Errors[keyof List4Errors];
3322
- export type List4Responses = {
4109
+ export type List5Error = List5Errors[keyof List5Errors];
4110
+ export type List5Responses = {
3323
4111
  /**
3324
4112
  * Successful response
3325
4113
  */
@@ -3385,8 +4173,8 @@ export type List4Responses = {
3385
4173
  offset: number;
3386
4174
  };
3387
4175
  };
3388
- export type List4Response = List4Responses[keyof List4Responses];
3389
- export type Create3Data = {
4176
+ export type List5Response = List5Responses[keyof List5Responses];
4177
+ export type Create5Data = {
3390
4178
  body?: {
3391
4179
  /**
3392
4180
  * Article title.
@@ -3410,7 +4198,7 @@ export type Create3Data = {
3410
4198
  };
3411
4199
  url: '/kb';
3412
4200
  };
3413
- export type Create3Errors = {
4201
+ export type Create5Errors = {
3414
4202
  /**
3415
4203
  * Bad request
3416
4204
  */
@@ -3442,8 +4230,8 @@ export type Create3Errors = {
3442
4230
  };
3443
4231
  };
3444
4232
  };
3445
- export type Create3Error = Create3Errors[keyof Create3Errors];
3446
- export type Create3Responses = {
4233
+ export type Create5Error = Create5Errors[keyof Create5Errors];
4234
+ export type Create5Responses = {
3447
4235
  /**
3448
4236
  * Successful response
3449
4237
  */
@@ -3533,8 +4321,8 @@ export type Create3Responses = {
3533
4321
  updatedAt: string;
3534
4322
  };
3535
4323
  };
3536
- export type Create3Response = Create3Responses[keyof Create3Responses];
3537
- export type Delete3Data = {
4324
+ export type Create5Response = Create5Responses[keyof Create5Responses];
4325
+ export type Delete4Data = {
3538
4326
  body?: never;
3539
4327
  path: {
3540
4328
  /**
@@ -3545,7 +4333,7 @@ export type Delete3Data = {
3545
4333
  query?: never;
3546
4334
  url: '/kb/{id}';
3547
4335
  };
3548
- export type Delete3Errors = {
4336
+ export type Delete4Errors = {
3549
4337
  /**
3550
4338
  * Bad request
3551
4339
  */
@@ -3577,8 +4365,8 @@ export type Delete3Errors = {
3577
4365
  };
3578
4366
  };
3579
4367
  };
3580
- export type Delete3Error = Delete3Errors[keyof Delete3Errors];
3581
- export type Delete3Responses = {
4368
+ export type Delete4Error = Delete4Errors[keyof Delete4Errors];
4369
+ export type Delete4Responses = {
3582
4370
  /**
3583
4371
  * Successful response
3584
4372
  */
@@ -3589,8 +4377,8 @@ export type Delete3Responses = {
3589
4377
  message: string;
3590
4378
  };
3591
4379
  };
3592
- export type Delete3Response = Delete3Responses[keyof Delete3Responses];
3593
- export type Get4Data = {
4380
+ export type Delete4Response = Delete4Responses[keyof Delete4Responses];
4381
+ export type Get5Data = {
3594
4382
  body?: never;
3595
4383
  path: {
3596
4384
  /**
@@ -3601,7 +4389,7 @@ export type Get4Data = {
3601
4389
  query?: never;
3602
4390
  url: '/kb/{id}';
3603
4391
  };
3604
- export type Get4Errors = {
4392
+ export type Get5Errors = {
3605
4393
  /**
3606
4394
  * Bad request
3607
4395
  */
@@ -3633,8 +4421,8 @@ export type Get4Errors = {
3633
4421
  };
3634
4422
  };
3635
4423
  };
3636
- export type Get4Error = Get4Errors[keyof Get4Errors];
3637
- export type Get4Responses = {
4424
+ export type Get5Error = Get5Errors[keyof Get5Errors];
4425
+ export type Get5Responses = {
3638
4426
  /**
3639
4427
  * Successful response
3640
4428
  */
@@ -3724,8 +4512,8 @@ export type Get4Responses = {
3724
4512
  updatedAt: string;
3725
4513
  };
3726
4514
  };
3727
- export type Get4Response = Get4Responses[keyof Get4Responses];
3728
- export type Update3Data = {
4515
+ export type Get5Response = Get5Responses[keyof Get5Responses];
4516
+ export type Update4Data = {
3729
4517
  body?: {
3730
4518
  /**
3731
4519
  * New article title.
@@ -3753,7 +4541,7 @@ export type Update3Data = {
3753
4541
  query?: never;
3754
4542
  url: '/kb/{id}';
3755
4543
  };
3756
- export type Update3Errors = {
4544
+ export type Update4Errors = {
3757
4545
  /**
3758
4546
  * Bad request
3759
4547
  */
@@ -3785,8 +4573,8 @@ export type Update3Errors = {
3785
4573
  };
3786
4574
  };
3787
4575
  };
3788
- export type Update3Error = Update3Errors[keyof Update3Errors];
3789
- export type Update3Responses = {
4576
+ export type Update4Error = Update4Errors[keyof Update4Errors];
4577
+ export type Update4Responses = {
3790
4578
  /**
3791
4579
  * Successful response
3792
4580
  */
@@ -3876,7 +4664,7 @@ export type Update3Responses = {
3876
4664
  updatedAt: string;
3877
4665
  };
3878
4666
  };
3879
- export type Update3Response = Update3Responses[keyof Update3Responses];
4667
+ export type Update4Response = Update4Responses[keyof Update4Responses];
3880
4668
  export type Publish2Data = {
3881
4669
  body?: never;
3882
4670
  path: {
@@ -4152,7 +4940,7 @@ export type Rollback2Responses = {
4152
4940
  };
4153
4941
  };
4154
4942
  export type Rollback2Response = Rollback2Responses[keyof Rollback2Responses];
4155
- export type List5Data = {
4943
+ export type List6Data = {
4156
4944
  body?: never;
4157
4945
  path?: never;
4158
4946
  query?: {
@@ -4171,7 +4959,7 @@ export type List5Data = {
4171
4959
  };
4172
4960
  url: '/organizations';
4173
4961
  };
4174
- export type List5Errors = {
4962
+ export type List6Errors = {
4175
4963
  /**
4176
4964
  * Bad request
4177
4965
  */
@@ -4203,8 +4991,8 @@ export type List5Errors = {
4203
4991
  };
4204
4992
  };
4205
4993
  };
4206
- export type List5Error = List5Errors[keyof List5Errors];
4207
- export type List5Responses = {
4994
+ export type List6Error = List6Errors[keyof List6Errors];
4995
+ export type List6Responses = {
4208
4996
  /**
4209
4997
  * Successful response
4210
4998
  */
@@ -4241,8 +5029,8 @@ export type List5Responses = {
4241
5029
  offset: number;
4242
5030
  };
4243
5031
  };
4244
- export type List5Response = List5Responses[keyof List5Responses];
4245
- export type Create4Data = {
5032
+ export type List6Response = List6Responses[keyof List6Responses];
5033
+ export type Create6Data = {
4246
5034
  body?: {
4247
5035
  /**
4248
5036
  * Human-readable name of the organization (must be unique).
@@ -4263,7 +5051,7 @@ export type Create4Data = {
4263
5051
  query?: never;
4264
5052
  url: '/organizations';
4265
5053
  };
4266
- export type Create4Errors = {
5054
+ export type Create6Errors = {
4267
5055
  /**
4268
5056
  * Bad request
4269
5057
  */
@@ -4295,8 +5083,8 @@ export type Create4Errors = {
4295
5083
  };
4296
5084
  };
4297
5085
  };
4298
- export type Create4Error = Create4Errors[keyof Create4Errors];
4299
- export type Create4Responses = {
5086
+ export type Create6Error = Create6Errors[keyof Create6Errors];
5087
+ export type Create6Responses = {
4300
5088
  /**
4301
5089
  * Successful response
4302
5090
  */
@@ -4334,8 +5122,8 @@ export type Create4Responses = {
4334
5122
  apiKey?: string;
4335
5123
  };
4336
5124
  };
4337
- export type Create4Response = Create4Responses[keyof Create4Responses];
4338
- export type Delete4Data = {
5125
+ export type Create6Response = Create6Responses[keyof Create6Responses];
5126
+ export type Delete5Data = {
4339
5127
  body?: never;
4340
5128
  path: {
4341
5129
  /**
@@ -4346,7 +5134,7 @@ export type Delete4Data = {
4346
5134
  query?: never;
4347
5135
  url: '/organizations/{id}';
4348
5136
  };
4349
- export type Delete4Errors = {
5137
+ export type Delete5Errors = {
4350
5138
  /**
4351
5139
  * Bad request
4352
5140
  */
@@ -4378,8 +5166,8 @@ export type Delete4Errors = {
4378
5166
  };
4379
5167
  };
4380
5168
  };
4381
- export type Delete4Error = Delete4Errors[keyof Delete4Errors];
4382
- export type Delete4Responses = {
5169
+ export type Delete5Error = Delete5Errors[keyof Delete5Errors];
5170
+ export type Delete5Responses = {
4383
5171
  /**
4384
5172
  * Successful response
4385
5173
  */
@@ -4390,8 +5178,8 @@ export type Delete4Responses = {
4390
5178
  message: string;
4391
5179
  };
4392
5180
  };
4393
- export type Delete4Response = Delete4Responses[keyof Delete4Responses];
4394
- export type Get5Data = {
5181
+ export type Delete5Response = Delete5Responses[keyof Delete5Responses];
5182
+ export type Get6Data = {
4395
5183
  body?: never;
4396
5184
  path: {
4397
5185
  /**
@@ -4402,7 +5190,7 @@ export type Get5Data = {
4402
5190
  query?: never;
4403
5191
  url: '/organizations/{id}';
4404
5192
  };
4405
- export type Get5Errors = {
5193
+ export type Get6Errors = {
4406
5194
  /**
4407
5195
  * Bad request
4408
5196
  */
@@ -4434,8 +5222,8 @@ export type Get5Errors = {
4434
5222
  };
4435
5223
  };
4436
5224
  };
4437
- export type Get5Error = Get5Errors[keyof Get5Errors];
4438
- export type Get5Responses = {
5225
+ export type Get6Error = Get6Errors[keyof Get6Errors];
5226
+ export type Get6Responses = {
4439
5227
  /**
4440
5228
  * Successful response
4441
5229
  */
@@ -4464,8 +5252,8 @@ export type Get5Responses = {
4464
5252
  };
4465
5253
  };
4466
5254
  };
4467
- export type Get5Response = Get5Responses[keyof Get5Responses];
4468
- export type Update4Data = {
5255
+ export type Get6Response = Get6Responses[keyof Get6Responses];
5256
+ export type Update5Data = {
4469
5257
  body?: {
4470
5258
  /**
4471
5259
  * New name for the organization.
@@ -4487,7 +5275,7 @@ export type Update4Data = {
4487
5275
  query?: never;
4488
5276
  url: '/organizations/{id}';
4489
5277
  };
4490
- export type Update4Errors = {
5278
+ export type Update5Errors = {
4491
5279
  /**
4492
5280
  * Bad request
4493
5281
  */
@@ -4519,8 +5307,8 @@ export type Update4Errors = {
4519
5307
  };
4520
5308
  };
4521
5309
  };
4522
- export type Update4Error = Update4Errors[keyof Update4Errors];
4523
- export type Update4Responses = {
5310
+ export type Update5Error = Update5Errors[keyof Update5Errors];
5311
+ export type Update5Responses = {
4524
5312
  /**
4525
5313
  * Successful response
4526
5314
  */
@@ -4549,5 +5337,5 @@ export type Update4Responses = {
4549
5337
  };
4550
5338
  };
4551
5339
  };
4552
- export type Update4Response = Update4Responses[keyof Update4Responses];
5340
+ export type Update5Response = Update5Responses[keyof Update5Responses];
4553
5341
  //# sourceMappingURL=types.gen.d.ts.map