@workos/openapi-spec 0.71.0 → 0.73.0

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/dist/types.d.ts CHANGED
@@ -4,6 +4,78 @@
4
4
  */
5
5
 
6
6
  export interface paths {
7
+ "/agents/blueprints": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ /**
15
+ * List agent blueprints
16
+ * @description Lists the agent blueprints in the current environment.
17
+ */
18
+ get: operations["AgentBlueprintsController_list"];
19
+ put?: never;
20
+ /**
21
+ * Create an agent blueprint
22
+ * @description Creates an agent blueprint: the template describing what an agent may do (its permission ceiling), who may invoke it, and the lifetimes of its sessions.
23
+ */
24
+ post: operations["AgentBlueprintsController_create"];
25
+ delete?: never;
26
+ options?: never;
27
+ head?: never;
28
+ patch?: never;
29
+ trace?: never;
30
+ };
31
+ "/agents/blueprints/{agent_blueprint_id}": {
32
+ parameters: {
33
+ query?: never;
34
+ header?: never;
35
+ path?: never;
36
+ cookie?: never;
37
+ };
38
+ /**
39
+ * Get an agent blueprint
40
+ * @description Retrieves an agent blueprint by ID.
41
+ */
42
+ get: operations["AgentBlueprintsController_get"];
43
+ put?: never;
44
+ post?: never;
45
+ /**
46
+ * Delete an agent blueprint
47
+ * @description Deletes an agent blueprint along with its configuration, instances, and sessions.
48
+ */
49
+ delete: operations["AgentBlueprintsController_delete"];
50
+ options?: never;
51
+ head?: never;
52
+ /**
53
+ * Update an agent blueprint
54
+ * @description Updates an agent blueprint. Omitted fields are left unchanged; provided lists replace the existing configuration.
55
+ */
56
+ patch: operations["AgentBlueprintsController_update"];
57
+ trace?: never;
58
+ };
59
+ "/agents/blueprints/{agent_blueprint_id}/tokens": {
60
+ parameters: {
61
+ query?: never;
62
+ header?: never;
63
+ path?: never;
64
+ cookie?: never;
65
+ };
66
+ get?: never;
67
+ put?: never;
68
+ /**
69
+ * Mint an agent token
70
+ * @description Mint an agent access token (and backing session) from an agent blueprint. The session can be user-delegated (exchanging a user access token), autonomous (the agent acting as itself in an organization), agent-delegated (the agent exchanging its own access token for a new session on the same instance), or a refresh of a previously issued refresh token.
71
+ */
72
+ post: operations["AgentBlueprintsTokenController_mintToken"];
73
+ delete?: never;
74
+ options?: never;
75
+ head?: never;
76
+ patch?: never;
77
+ trace?: never;
78
+ };
7
79
  "/agents/claims/attempts": {
8
80
  parameters: {
9
81
  query?: never;
@@ -44,6 +116,50 @@ export interface paths {
44
116
  patch?: never;
45
117
  trace?: never;
46
118
  };
119
+ "/agents/instances": {
120
+ parameters: {
121
+ query?: never;
122
+ header?: never;
123
+ path?: never;
124
+ cookie?: never;
125
+ };
126
+ /**
127
+ * List agent instances
128
+ * @description Lists the agent instances in the current environment. Instances are created implicitly when tokens are minted.
129
+ */
130
+ get: operations["AgentInstancesController_list"];
131
+ put?: never;
132
+ post?: never;
133
+ delete?: never;
134
+ options?: never;
135
+ head?: never;
136
+ patch?: never;
137
+ trace?: never;
138
+ };
139
+ "/agents/instances/{agent_instance_id}": {
140
+ parameters: {
141
+ query?: never;
142
+ header?: never;
143
+ path?: never;
144
+ cookie?: never;
145
+ };
146
+ /**
147
+ * Get an agent instance
148
+ * @description Retrieves an agent instance by ID.
149
+ */
150
+ get: operations["AgentInstancesController_get"];
151
+ put?: never;
152
+ post?: never;
153
+ /**
154
+ * Delete an agent instance
155
+ * @description Deletes an agent instance along with its sessions, invalidating their refresh tokens.
156
+ */
157
+ delete: operations["AgentInstancesController_delete"];
158
+ options?: never;
159
+ head?: never;
160
+ patch?: never;
161
+ trace?: never;
162
+ };
47
163
  "/agents/registrations/{id}": {
48
164
  parameters: {
49
165
  query?: never;
@@ -64,6 +180,66 @@ export interface paths {
64
180
  patch?: never;
65
181
  trace?: never;
66
182
  };
183
+ "/agents/sessions": {
184
+ parameters: {
185
+ query?: never;
186
+ header?: never;
187
+ path?: never;
188
+ cookie?: never;
189
+ };
190
+ /**
191
+ * List agent instance sessions
192
+ * @description Lists the agent instance sessions in the current environment. Sessions are created when tokens are minted.
193
+ */
194
+ get: operations["AgentInstanceSessionsController_list"];
195
+ put?: never;
196
+ post?: never;
197
+ delete?: never;
198
+ options?: never;
199
+ head?: never;
200
+ patch?: never;
201
+ trace?: never;
202
+ };
203
+ "/agents/sessions/{agent_instance_session_id}": {
204
+ parameters: {
205
+ query?: never;
206
+ header?: never;
207
+ path?: never;
208
+ cookie?: never;
209
+ };
210
+ /**
211
+ * Get an agent instance session
212
+ * @description Retrieves an agent instance session by ID.
213
+ */
214
+ get: operations["AgentInstanceSessionsController_get"];
215
+ put?: never;
216
+ post?: never;
217
+ delete?: never;
218
+ options?: never;
219
+ head?: never;
220
+ patch?: never;
221
+ trace?: never;
222
+ };
223
+ "/agents/sessions/{agent_instance_session_id}/revoke": {
224
+ parameters: {
225
+ query?: never;
226
+ header?: never;
227
+ path?: never;
228
+ cookie?: never;
229
+ };
230
+ get?: never;
231
+ put?: never;
232
+ /**
233
+ * Revoke an agent instance session
234
+ * @description Revokes an agent instance session, invalidating its refresh token and every access token minted under it. Revocation is idempotent: revoking an already-revoked session keeps the original `revoked_at`, and revoking an already-expired session returns the session with `status: expired` and a null `revoked_at`.
235
+ */
236
+ post: operations["AgentInstanceSessionsController_revoke"];
237
+ delete?: never;
238
+ options?: never;
239
+ head?: never;
240
+ patch?: never;
241
+ trace?: never;
242
+ };
67
243
  "/api_keys/validations": {
68
244
  parameters: {
69
245
  query?: never;
@@ -3733,6 +3909,11 @@ export interface components {
3733
3909
  /** @description Array of [User Consent Options](/reference/workos-connect/standalone/user-consent-options) to store with the session. */
3734
3910
  user_consent_options?: components["schemas"]["UserConsentOption"][];
3735
3911
  };
3912
+ /**
3913
+ * @example desc
3914
+ * @enum {string}
3915
+ */
3916
+ PaginationOrder: "normal" | "desc" | "asc";
3736
3917
  ValidateApiKeyDto: {
3737
3918
  /**
3738
3919
  * @description The value for an API key.
@@ -3748,11 +3929,6 @@ export interface components {
3748
3929
  */
3749
3930
  expires_at?: string | null;
3750
3931
  };
3751
- /**
3752
- * @example desc
3753
- * @enum {string}
3754
- */
3755
- PaginationOrder: "normal" | "desc" | "asc";
3756
3932
  RedirectUriDto: {
3757
3933
  /**
3758
3934
  * @description The redirect URI.
@@ -4042,7 +4218,15 @@ export interface components {
4042
4218
  };
4043
4219
  UpdateAuditLogsRetentionDto: {
4044
4220
  /**
4045
- * @description The number of days Audit Log events will be retained. Valid values are `30` and `365`.
4221
+ * @description The period Audit Log events will be retained. Valid values are `1_MONTH` through `11_MONTHS` in one-month increments and `1_YEAR` through `10_YEARS` in one-year increments. Mutually exclusive with `retention_period_in_days`.
4222
+ * @example 1_MONTH
4223
+ * @enum {string}
4224
+ */
4225
+ retention_period: "1_MONTH" | "2_MONTHS" | "3_MONTHS" | "4_MONTHS" | "5_MONTHS" | "6_MONTHS" | "7_MONTHS" | "8_MONTHS" | "9_MONTHS" | "10_MONTHS" | "11_MONTHS" | "1_YEAR" | "2_YEARS" | "3_YEARS" | "4_YEARS" | "5_YEARS" | "6_YEARS" | "7_YEARS" | "8_YEARS" | "9_YEARS" | "10_YEARS";
4226
+ } | {
4227
+ /**
4228
+ * @deprecated
4229
+ * @description The number of days Audit Log events will be retained. Valid values are `30` through `330` in 30-day increments and `365` through `3650` in 365-day increments. Deprecated: use `retention_period` instead. Mutually exclusive with `retention_period`.
4046
4230
  * @example 30
4047
4231
  */
4048
4232
  retention_period_in_days: number;
@@ -6299,130 +6483,341 @@ export interface components {
6299
6483
  name: string;
6300
6484
  }[];
6301
6485
  };
6302
- ApiKey: {
6486
+ AgentBlueprint: {
6303
6487
  /**
6304
- * @description Distinguishes the API Key object.
6488
+ * @description Distinguishes the agent blueprint object.
6305
6489
  * @constant
6306
6490
  */
6307
- object: "api_key";
6491
+ object: "agent_blueprint";
6308
6492
  /**
6309
- * @description Unique identifier of the API Key.
6310
- * @example api_key_01EHZNVPK3SFK441A1RGBFSHRT
6493
+ * @description Unique identifier of the agent blueprint.
6494
+ * @example agent_blueprint_01EHWNCE74X7JSDV0X3SZ3KJNY
6311
6495
  */
6312
6496
  id: string;
6313
6497
  /**
6314
- * @description The entity that owns the API Key.
6315
- * @example {
6316
- * "type": "organization",
6317
- * "id": "org_01EHZNVPK3SFK441A1RGBFSHRT"
6318
- * }
6498
+ * @description Human-readable name of the agent blueprint.
6499
+ * @example Prospecting Agent
6319
6500
  */
6320
- owner: {
6501
+ name: string;
6502
+ /**
6503
+ * @description Human-readable description of the agent blueprint.
6504
+ * @example Finds and qualifies sales prospects.
6505
+ */
6506
+ description: string | null;
6507
+ /**
6508
+ * @description Permission slugs forming the ceiling on what sessions minted from this blueprint may do.
6509
+ * @example [
6510
+ * "crm:read",
6511
+ * "email:send"
6512
+ * ]
6513
+ */
6514
+ permissions: string[];
6515
+ /** @description Who may mint sessions from this blueprint. */
6516
+ invocable_by: {
6321
6517
  /**
6322
- * @description The type of the API Key owner.
6323
- * @example organization
6324
- * @constant
6518
+ * @description Role slugs whose members may mint user-delegated sessions from this blueprint.
6519
+ * @example [
6520
+ * "manager"
6521
+ * ]
6325
6522
  */
6326
- type: "organization";
6523
+ role_slugs: string[];
6327
6524
  /**
6328
- * @description Unique identifier of the API Key owner.
6329
- * @example org_01EHZNVPK3SFK441A1RGBFSHRT
6525
+ * @description Organizations in which sessions may be minted from this blueprint, enforced on user-delegated, autonomous, and agent-delegated mints.
6526
+ * @example [
6527
+ * "org_01EHWNCE74X7JSDV0X3SZ3KJNY"
6528
+ * ]
6330
6529
  */
6331
- id: string;
6332
- } | {
6530
+ organization_ids: string[];
6531
+ };
6532
+ /** @description Token and session lifetimes for sessions minted from this blueprint. */
6533
+ session_settings: {
6333
6534
  /**
6334
- * @description The type of the API Key owner.
6335
- * @example user
6336
- * @constant
6535
+ * @description Maximum lifetime of a session in seconds; refreshes never extend a session past this.
6536
+ * @example 3600
6337
6537
  */
6338
- type: "user";
6538
+ max_age_seconds: number;
6339
6539
  /**
6340
- * @description Unique identifier of the API Key owner.
6341
- * @example user_01EHZNVPK3SFK441A1RGBFSHRT
6540
+ * @description Lifetime of each minted access token in seconds.
6541
+ * @example 300
6342
6542
  */
6343
- id: string;
6543
+ access_token_ttl_seconds: number;
6344
6544
  /**
6345
- * @description Unique identifier of the organization the API Key can access.
6346
- * @example org_01EHZNVPK3SFK441A1RGBFSHRT
6545
+ * @description Lifetime of each rotated refresh token in seconds.
6546
+ * @example 3600
6347
6547
  */
6348
- organization_id: string;
6548
+ refresh_token_ttl_seconds: number;
6349
6549
  };
6350
6550
  /**
6351
- * @description A descriptive name for the API Key.
6352
- * @example Production API Key
6551
+ * Format: date-time
6552
+ * @description Timestamp when the agent blueprint was created.
6553
+ * @example 2026-01-15T12:00:00.000Z
6353
6554
  */
6354
- name: string;
6555
+ created_at: string;
6355
6556
  /**
6356
- * @description An obfuscated representation of the API Key value.
6357
- * @example sk_...3456
6557
+ * Format: date-time
6558
+ * @description Timestamp when the agent blueprint was last updated.
6559
+ * @example 2026-01-15T12:00:00.000Z
6358
6560
  */
6359
- obfuscated_value: string;
6561
+ updated_at: string;
6562
+ };
6563
+ AgentInstance: {
6360
6564
  /**
6361
- * Format: date-time
6362
- * @description Timestamp of when the API Key was last used.
6363
- * @example null
6565
+ * @description Distinguishes the agent instance object.
6566
+ * @constant
6364
6567
  */
6365
- last_used_at: string | null;
6568
+ object: "agent_instance";
6366
6569
  /**
6367
- * Format: date-time
6368
- * @description Timestamp when the API Key expires. Null means the key does not expire.
6369
- * @example null
6570
+ * @description Unique identifier of the agent instance.
6571
+ * @example agent_01EHWNCE74X7JSDV0X3SZ3KJNY
6370
6572
  */
6371
- expires_at: string | null;
6573
+ id: string;
6372
6574
  /**
6373
- * @description The permission slugs assigned to the API Key.
6374
- * @example [
6375
- * "posts:read",
6376
- * "posts:write"
6377
- * ]
6575
+ * @description The blueprint this instance was minted from.
6576
+ * @example agent_blueprint_01EHWNCE74X7JSDV0X3SZ3KJNY
6378
6577
  */
6379
- permissions: string[];
6578
+ agent_blueprint_id: string;
6579
+ /**
6580
+ * @description The organization the instance acts within.
6581
+ * @example org_01EHWNCE74X7JSDV0X3SZ3KJNY
6582
+ */
6583
+ organization_id: string;
6584
+ /**
6585
+ * @description The organization membership of the delegating user; `null` for autonomous instances.
6586
+ * @example om_01EHWNCE74X7JSDV0X3SZ3KJNY
6587
+ */
6588
+ organization_membership_id: string | null;
6589
+ /**
6590
+ * @description Whether the instance acts on behalf of a specific user (`delegated`) or as itself (`autonomous`).
6591
+ * @enum {string}
6592
+ */
6593
+ type: "delegated" | "autonomous";
6380
6594
  /**
6381
6595
  * Format: date-time
6382
- * @description An ISO 8601 timestamp.
6596
+ * @description Timestamp when the agent instance was created.
6383
6597
  * @example 2026-01-15T12:00:00.000Z
6384
6598
  */
6385
6599
  created_at: string;
6386
6600
  /**
6387
6601
  * Format: date-time
6388
- * @description An ISO 8601 timestamp.
6602
+ * @description Timestamp when the agent instance was last updated.
6389
6603
  * @example 2026-01-15T12:00:00.000Z
6390
6604
  */
6391
6605
  updated_at: string;
6392
6606
  };
6393
- ApiKeyValidationResponse: {
6394
- api_key: components["schemas"]["ApiKey"] | null;
6607
+ AgentToken: {
6395
6608
  /**
6396
- * @description The ID of the agent registration this API Key was issued for. Present only when the API Key is assigned to an agent registration.
6397
- * @example agent_reg_01EHZNVPK3SFK441A1RGBFSHRT
6609
+ * @description The agent access token (a JWT) carrying the effective permissions.
6610
+ * @example eyJhbGciOiJSUzI1NiIsImtpZCI6...
6398
6611
  */
6399
- agent_registration_id?: string;
6400
- };
6401
- ConnectApplication: {
6612
+ access_token: string;
6402
6613
  /**
6403
- * @description Distinguishes the connect application object.
6404
- * @example connect_application
6614
+ * @description Always `Bearer`.
6405
6615
  * @constant
6406
6616
  */
6407
- object: "connect_application";
6617
+ token_type: "Bearer";
6408
6618
  /**
6409
- * @description The unique ID of the connect application.
6410
- * @example conn_app_01HXYZ123456789ABCDEFGHIJ
6619
+ * @description Number of seconds until the access token expires.
6620
+ * @example 300
6411
6621
  */
6412
- id: string;
6622
+ expires_in: number;
6413
6623
  /**
6414
- * @description The client ID of the connect application.
6415
- * @example client_01HXYZ123456789ABCDEFGHIJ
6624
+ * @description Single-use refresh token for rotating the access token within the session lifetime.
6625
+ * @example njGkA8Wyht0GBEGGA0Zh1Q3wZzL2...
6416
6626
  */
6417
- client_id: string;
6627
+ refresh_token: string;
6418
6628
  /**
6419
- * @description A description of the connect application.
6420
- * @example An application for managing user access
6629
+ * @description The agent instance the session belongs to.
6630
+ * @example agent_01EHWNCE74X7JSDV0X3SZ3KJNY
6421
6631
  */
6422
- description: string | null;
6632
+ agent_instance_id: string;
6423
6633
  /**
6424
- * @description The name of the connect application.
6425
- * @example My Application
6634
+ * @description Whether this mint created the agent instance: `true` only for the mint that inserted the row, `false` when an existing instance was reused (including when a concurrent mint inserted it first).
6635
+ * @example false
6636
+ */
6637
+ new_instance: boolean;
6638
+ /**
6639
+ * @description The backing agent instance session.
6640
+ * @example agent_session_01EHWNCE74X7JSDV0X3SZ3KJNY
6641
+ */
6642
+ agent_instance_session_id: string;
6643
+ /**
6644
+ * @description The effective permission slugs carried by the token.
6645
+ * @example [
6646
+ * "crm:read"
6647
+ * ]
6648
+ */
6649
+ permissions: string[];
6650
+ };
6651
+ AgentInstanceSession: {
6652
+ /**
6653
+ * @description Distinguishes the agent instance session object.
6654
+ * @constant
6655
+ */
6656
+ object: "agent_instance_session";
6657
+ /**
6658
+ * @description Unique identifier of the agent instance session.
6659
+ * @example agent_session_01EHWNCE74X7JSDV0X3SZ3KJNY
6660
+ */
6661
+ id: string;
6662
+ /**
6663
+ * @description The agent instance the session belongs to.
6664
+ * @example agent_01EHWNCE74X7JSDV0X3SZ3KJNY
6665
+ */
6666
+ agent_instance_id: string;
6667
+ /**
6668
+ * @description Derived from `revoked_at` and `expires_at` at read time; a revoked session stays `revoked` even after it expires.
6669
+ * @enum {string}
6670
+ */
6671
+ status: "active" | "revoked" | "expired";
6672
+ /**
6673
+ * Format: date-time
6674
+ * @description Timestamp when the session expires.
6675
+ * @example 2026-01-15T13:00:00.000Z
6676
+ */
6677
+ expires_at: string;
6678
+ /**
6679
+ * Format: date-time
6680
+ * @description Timestamp when the session was revoked; `null` if it has not been revoked.
6681
+ * @example null
6682
+ */
6683
+ revoked_at: string | null;
6684
+ /**
6685
+ * Format: date-time
6686
+ * @description Timestamp when the session was created.
6687
+ * @example 2026-01-15T12:00:00.000Z
6688
+ */
6689
+ created_at: string;
6690
+ /**
6691
+ * Format: date-time
6692
+ * @description Timestamp when the session was last updated.
6693
+ * @example 2026-01-15T12:00:00.000Z
6694
+ */
6695
+ updated_at: string;
6696
+ };
6697
+ ApiKey: {
6698
+ /**
6699
+ * @description Distinguishes the API Key object.
6700
+ * @constant
6701
+ */
6702
+ object: "api_key";
6703
+ /**
6704
+ * @description Unique identifier of the API Key.
6705
+ * @example api_key_01EHZNVPK3SFK441A1RGBFSHRT
6706
+ */
6707
+ id: string;
6708
+ /**
6709
+ * @description The entity that owns the API Key.
6710
+ * @example {
6711
+ * "type": "organization",
6712
+ * "id": "org_01EHZNVPK3SFK441A1RGBFSHRT"
6713
+ * }
6714
+ */
6715
+ owner: {
6716
+ /**
6717
+ * @description The type of the API Key owner.
6718
+ * @example organization
6719
+ * @constant
6720
+ */
6721
+ type: "organization";
6722
+ /**
6723
+ * @description Unique identifier of the API Key owner.
6724
+ * @example org_01EHZNVPK3SFK441A1RGBFSHRT
6725
+ */
6726
+ id: string;
6727
+ } | {
6728
+ /**
6729
+ * @description The type of the API Key owner.
6730
+ * @example user
6731
+ * @constant
6732
+ */
6733
+ type: "user";
6734
+ /**
6735
+ * @description Unique identifier of the API Key owner.
6736
+ * @example user_01EHZNVPK3SFK441A1RGBFSHRT
6737
+ */
6738
+ id: string;
6739
+ /**
6740
+ * @description Unique identifier of the organization the API Key can access.
6741
+ * @example org_01EHZNVPK3SFK441A1RGBFSHRT
6742
+ */
6743
+ organization_id: string;
6744
+ };
6745
+ /**
6746
+ * @description A descriptive name for the API Key.
6747
+ * @example Production API Key
6748
+ */
6749
+ name: string;
6750
+ /**
6751
+ * @description An obfuscated representation of the API Key value.
6752
+ * @example sk_...3456
6753
+ */
6754
+ obfuscated_value: string;
6755
+ /**
6756
+ * Format: date-time
6757
+ * @description Timestamp of when the API Key was last used.
6758
+ * @example null
6759
+ */
6760
+ last_used_at: string | null;
6761
+ /**
6762
+ * Format: date-time
6763
+ * @description Timestamp when the API Key expires. Null means the key does not expire.
6764
+ * @example null
6765
+ */
6766
+ expires_at: string | null;
6767
+ /**
6768
+ * @description The permission slugs assigned to the API Key.
6769
+ * @example [
6770
+ * "posts:read",
6771
+ * "posts:write"
6772
+ * ]
6773
+ */
6774
+ permissions: string[];
6775
+ /**
6776
+ * Format: date-time
6777
+ * @description An ISO 8601 timestamp.
6778
+ * @example 2026-01-15T12:00:00.000Z
6779
+ */
6780
+ created_at: string;
6781
+ /**
6782
+ * Format: date-time
6783
+ * @description An ISO 8601 timestamp.
6784
+ * @example 2026-01-15T12:00:00.000Z
6785
+ */
6786
+ updated_at: string;
6787
+ };
6788
+ ApiKeyValidationResponse: {
6789
+ api_key: components["schemas"]["ApiKey"] | null;
6790
+ /**
6791
+ * @description The ID of the agent registration this API Key was issued for. Present only when the API Key is assigned to an agent registration.
6792
+ * @example agent_reg_01EHZNVPK3SFK441A1RGBFSHRT
6793
+ */
6794
+ agent_registration_id?: string;
6795
+ };
6796
+ ConnectApplication: {
6797
+ /**
6798
+ * @description Distinguishes the connect application object.
6799
+ * @example connect_application
6800
+ * @constant
6801
+ */
6802
+ object: "connect_application";
6803
+ /**
6804
+ * @description The unique ID of the connect application.
6805
+ * @example conn_app_01HXYZ123456789ABCDEFGHIJ
6806
+ */
6807
+ id: string;
6808
+ /**
6809
+ * @description The client ID of the connect application.
6810
+ * @example client_01HXYZ123456789ABCDEFGHIJ
6811
+ */
6812
+ client_id: string;
6813
+ /**
6814
+ * @description A description of the connect application.
6815
+ * @example An application for managing user access
6816
+ */
6817
+ description: string | null;
6818
+ /**
6819
+ * @description The name of the connect application.
6820
+ * @example My Application
6426
6821
  */
6427
6822
  name: string;
6428
6823
  /**
@@ -14959,7 +15354,7 @@ export interface components {
14959
15354
  * @example users
14960
15355
  * @enum {string}
14961
15356
  */
14962
- resource_type: "users" | "organizations" | "events" | "sessions";
15357
+ resource_type: "users" | "organizations" | "events" | "sessions" | "auditLogEvents";
14963
15358
  };
14964
15359
  /**
14965
15360
  * Format: date-time
@@ -14993,7 +15388,7 @@ export interface components {
14993
15388
  * @example users
14994
15389
  * @enum {string}
14995
15390
  */
14996
- resource_type: "users" | "organizations" | "events" | "sessions";
15391
+ resource_type: "users" | "organizations" | "events" | "sessions" | "auditLogEvents";
14997
15392
  };
14998
15393
  /**
14999
15394
  * Format: date-time
@@ -15027,7 +15422,7 @@ export interface components {
15027
15422
  * @example users
15028
15423
  * @enum {string}
15029
15424
  */
15030
- resource_type: "users" | "organizations" | "events" | "sessions";
15425
+ resource_type: "users" | "organizations" | "events" | "sessions" | "auditLogEvents";
15031
15426
  };
15032
15427
  /**
15033
15428
  * Format: date-time
@@ -15061,7 +15456,7 @@ export interface components {
15061
15456
  * @example users
15062
15457
  * @enum {string}
15063
15458
  */
15064
- resource_type: "users" | "organizations" | "events" | "sessions";
15459
+ resource_type: "users" | "organizations" | "events" | "sessions" | "auditLogEvents";
15065
15460
  };
15066
15461
  /**
15067
15462
  * Format: date-time
@@ -18891,136 +19286,156 @@ export interface components {
18891
19286
  }
18892
19287
  export type $defs = Record<string, never>;
18893
19288
  export interface operations {
18894
- AgentAdminController_linkClaimAttemptToExternalUser: {
19289
+ AgentBlueprintsController_list: {
18895
19290
  parameters: {
18896
- query?: never;
19291
+ query?: {
19292
+ /** @description An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. */
19293
+ before?: string;
19294
+ /** @description An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. */
19295
+ after?: string;
19296
+ /** @description Upper limit on the number of objects to return, between `1` and `100`. */
19297
+ limit?: number;
19298
+ /** @description Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to `normal`. */
19299
+ order?: components["schemas"]["PaginationOrder"];
19300
+ };
18897
19301
  header?: never;
18898
19302
  path?: never;
18899
19303
  cookie?: never;
18900
19304
  };
18901
- requestBody: {
18902
- content: {
18903
- "application/json": {
18904
- /**
18905
- * @description The operation to perform on the claim attempt. Currently only `link_external_user` is supported.
18906
- * @example link_external_user
18907
- * @constant
18908
- */
18909
- type: "link_external_user";
18910
- /**
18911
- * @description The token identifying the claim attempt.
18912
- * @example cla_tkn_01EHWNCE74X7JSDV0X3SZ3KJNY
18913
- */
18914
- claim_attempt_token: string;
18915
- /**
18916
- * @description The user to attach to the claim attempt, identified by email and external ID.
18917
- * @example {
18918
- * "email": "alice@example.com",
18919
- * "external_id": "user_abc123"
18920
- * }
18921
- */
18922
- user: {
18923
- /**
18924
- * Format: email
18925
- * @description The email address of the user.
18926
- * @example alice@example.com
18927
- */
18928
- email: string;
18929
- /**
18930
- * @description The external ID of the user.
18931
- * @example user_abc123
18932
- */
18933
- external_id: string;
18934
- };
18935
- /**
18936
- * @description The organization to place the agent in. Required when the user belongs to more than one organization.
18937
- * @example org_01EHWNCE74X7JSDV0X3SZ3KJNY
18938
- */
18939
- organization_id?: string;
18940
- };
18941
- };
18942
- };
19305
+ requestBody?: never;
18943
19306
  responses: {
18944
- /** @description Claim attempt linked to external user. */
19307
+ /** @description OK */
18945
19308
  200: {
18946
19309
  headers: {
18947
19310
  [name: string]: unknown;
18948
19311
  };
18949
19312
  content: {
18950
- "application/json": components["schemas"]["ClaimViewResponse"];
19313
+ "application/json": {
19314
+ /**
19315
+ * @description Indicates this is a list response.
19316
+ * @constant
19317
+ */
19318
+ object?: "list";
19319
+ /** @description Pagination cursors for navigating between pages of results. */
19320
+ list_metadata?: {
19321
+ /**
19322
+ * @description An object ID that defines your place in the list. When the ID is not present, you are at the start of the list.
19323
+ * @example agent_blueprint_01HXYZ123456789ABCDEFGHIJ
19324
+ */
19325
+ before: string | null;
19326
+ /**
19327
+ * @description An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
19328
+ * @example agent_blueprint_01HXYZ987654321KJIHGFEDCBA
19329
+ */
19330
+ after: string | null;
19331
+ };
19332
+ } & {
19333
+ /** @description The list of records for the current page. */
19334
+ data?: components["schemas"]["AgentBlueprint"][];
19335
+ };
18951
19336
  };
18952
19337
  };
18953
- /** @description Invalid request, email mismatch, invalid claim, invalid organization, or wrong account. */
18954
- 400: {
19338
+ /** @description Unauthorized */
19339
+ 401: {
18955
19340
  headers: {
18956
19341
  [name: string]: unknown;
18957
19342
  };
18958
19343
  content: {
18959
19344
  "application/json": {
18960
- /**
18961
- * @description The error code identifying the type of error.
18962
- * @example invalid_request
18963
- * @constant
18964
- */
18965
- code: "invalid_request";
18966
19345
  /**
18967
19346
  * @description A human-readable description of the error.
18968
- * @example Request could not be processed.
19347
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
18969
19348
  */
18970
19349
  message: string;
18971
- } | {
18972
- /**
18973
- * @description The error code identifying the type of error.
18974
- * @example invalid_claim
18975
- * @constant
18976
- */
18977
- code: "invalid_claim";
18978
- /**
18979
- * @description A human-readable description of the error.
18980
- * @example Request could not be processed.
18981
- */
18982
- message: string;
18983
- } | {
18984
- /**
18985
- * @description The error code identifying the type of error.
18986
- * @example invalid_organization
18987
- * @constant
18988
- */
18989
- code: "invalid_organization";
19350
+ };
19351
+ };
19352
+ };
19353
+ };
19354
+ };
19355
+ AgentBlueprintsController_create: {
19356
+ parameters: {
19357
+ query?: never;
19358
+ header?: never;
19359
+ path?: never;
19360
+ cookie?: never;
19361
+ };
19362
+ requestBody: {
19363
+ content: {
19364
+ "application/json": {
19365
+ /**
19366
+ * @description Human-readable name of the agent blueprint.
19367
+ * @example Prospecting Agent
19368
+ */
19369
+ name: string;
19370
+ /**
19371
+ * @description Human-readable description of the agent blueprint.
19372
+ * @example Finds and qualifies sales prospects.
19373
+ */
19374
+ description?: string;
19375
+ /**
19376
+ * @description Permission slugs forming the ceiling on what sessions minted from this blueprint may do. Each slug must exist in the environment.
19377
+ * @default []
19378
+ * @example [
19379
+ * "crm:read",
19380
+ * "email:send"
19381
+ * ]
19382
+ */
19383
+ permissions?: string[];
19384
+ /**
19385
+ * @description Who may mint sessions from this blueprint.
19386
+ * @default {}
19387
+ */
19388
+ invocable_by?: {
18990
19389
  /**
18991
- * @description A human-readable description of the error.
18992
- * @example Request could not be processed.
19390
+ * @description Role slugs whose members may mint user-delegated sessions from this blueprint. An empty list allows any member.
19391
+ * @default []
19392
+ * @example [
19393
+ * "manager"
19394
+ * ]
18993
19395
  */
18994
- message: string;
18995
- } | {
19396
+ role_slugs?: string[];
18996
19397
  /**
18997
- * @description The error code identifying the type of error.
18998
- * @example email_mismatch
18999
- * @constant
19398
+ * @description Organizations in which sessions may be minted from this blueprint, enforced on user-delegated, autonomous, and agent-delegated mints. An empty list allows any organization in the environment.
19399
+ * @default []
19400
+ * @example [
19401
+ * "org_01EHWNCE74X7JSDV0X3SZ3KJNY"
19402
+ * ]
19000
19403
  */
19001
- code: "email_mismatch";
19404
+ organization_ids?: string[];
19405
+ };
19406
+ /** @description Token and session lifetimes for sessions minted from this blueprint. */
19407
+ session_settings: {
19002
19408
  /**
19003
- * @description A human-readable description of the error.
19004
- * @example Request could not be processed.
19409
+ * @description Maximum lifetime of a session in seconds; refreshes never extend a session past this. At most 31,536,000 (365 days).
19410
+ * @example 3600
19005
19411
  */
19006
- message: string;
19007
- } | {
19412
+ max_age_seconds: number;
19008
19413
  /**
19009
- * @description The error code identifying the type of error.
19010
- * @example wrong_account
19011
- * @constant
19414
+ * @description Lifetime of each minted access token in seconds. At most 3,600 (1 hour).
19415
+ * @example 300
19012
19416
  */
19013
- code: "wrong_account";
19417
+ access_token_ttl_seconds: number;
19014
19418
  /**
19015
- * @description A human-readable description of the error.
19016
- * @example Request could not be processed.
19419
+ * @description Lifetime of each rotated refresh token in seconds. At most 5,184,000 (60 days).
19420
+ * @example 3600
19017
19421
  */
19018
- message: string;
19422
+ refresh_token_ttl_seconds: number;
19019
19423
  };
19020
19424
  };
19021
19425
  };
19022
- /** @description Claim denied or auth method disabled. */
19023
- 403: {
19426
+ };
19427
+ responses: {
19428
+ /** @description Created */
19429
+ 201: {
19430
+ headers: {
19431
+ [name: string]: unknown;
19432
+ };
19433
+ content: {
19434
+ "application/json": components["schemas"]["AgentBlueprint"];
19435
+ };
19436
+ };
19437
+ /** @description Bad Request */
19438
+ 400: {
19024
19439
  headers: {
19025
19440
  [name: string]: unknown;
19026
19441
  };
@@ -19028,22 +19443,30 @@ export interface operations {
19028
19443
  "application/json": {
19029
19444
  /**
19030
19445
  * @description The error code identifying the type of error.
19031
- * @example claim_denied
19446
+ * @example invalid_request
19032
19447
  * @constant
19033
19448
  */
19034
- code: "claim_denied";
19449
+ code: "invalid_request";
19035
19450
  /**
19036
19451
  * @description A human-readable description of the error.
19037
19452
  * @example Request could not be processed.
19038
19453
  */
19039
19454
  message: string;
19040
- } | {
19455
+ };
19456
+ };
19457
+ };
19458
+ 409: {
19459
+ headers: {
19460
+ [name: string]: unknown;
19461
+ };
19462
+ content: {
19463
+ "application/json": {
19041
19464
  /**
19042
19465
  * @description The error code identifying the type of error.
19043
- * @example auth_method_disabled
19466
+ * @example name_already_in_use
19044
19467
  * @constant
19045
19468
  */
19046
- code: "auth_method_disabled";
19469
+ code: "name_already_in_use";
19047
19470
  /**
19048
19471
  * @description A human-readable description of the error.
19049
19472
  * @example Request could not be processed.
@@ -19052,8 +19475,8 @@ export interface operations {
19052
19475
  };
19053
19476
  };
19054
19477
  };
19055
- /** @description Organization selection required, email already in use, or claim already completed. */
19056
- 409: {
19478
+ /** @description Unprocessable Entity */
19479
+ 422: {
19057
19480
  headers: {
19058
19481
  [name: string]: unknown;
19059
19482
  };
@@ -19061,35 +19484,22 @@ export interface operations {
19061
19484
  "application/json": {
19062
19485
  /**
19063
19486
  * @description The error code identifying the type of error.
19064
- * @example organization_selection_required
19487
+ * @example permission_not_found
19065
19488
  * @constant
19066
19489
  */
19067
- code: "organization_selection_required";
19490
+ code: "permission_not_found";
19068
19491
  /**
19069
19492
  * @description A human-readable description of the error.
19070
19493
  * @example Request could not be processed.
19071
19494
  */
19072
19495
  message: string;
19073
- /** @description Organizations the user belongs to. Pick one and retry with organization_id. */
19074
- organizations: {
19075
- /**
19076
- * @description The organization ID.
19077
- * @example org_01EHWNCE74X7JSDV0X3SZ3KJNY
19078
- */
19079
- id: string;
19080
- /**
19081
- * @description The organization name.
19082
- * @example Acme Corp
19083
- */
19084
- name: string;
19085
- }[];
19086
19496
  } | {
19087
19497
  /**
19088
19498
  * @description The error code identifying the type of error.
19089
- * @example email_already_in_use
19499
+ * @example role_not_found
19090
19500
  * @constant
19091
19501
  */
19092
- code: "email_already_in_use";
19502
+ code: "role_not_found";
19093
19503
  /**
19094
19504
  * @description A human-readable description of the error.
19095
19505
  * @example Request could not be processed.
@@ -19098,10 +19508,10 @@ export interface operations {
19098
19508
  } | {
19099
19509
  /**
19100
19510
  * @description The error code identifying the type of error.
19101
- * @example already_claimed
19511
+ * @example organization_not_found
19102
19512
  * @constant
19103
19513
  */
19104
- code: "already_claimed";
19514
+ code: "organization_not_found";
19105
19515
  /**
19106
19516
  * @description A human-readable description of the error.
19107
19517
  * @example Request could not be processed.
@@ -19110,34 +19520,75 @@ export interface operations {
19110
19520
  };
19111
19521
  };
19112
19522
  };
19113
- /** @description Claim or user code has expired. */
19114
- 410: {
19523
+ };
19524
+ };
19525
+ AgentBlueprintsController_get: {
19526
+ parameters: {
19527
+ query?: never;
19528
+ header?: never;
19529
+ path: {
19530
+ /** @description The unique ID of the agent blueprint. */
19531
+ agent_blueprint_id: string;
19532
+ };
19533
+ cookie?: never;
19534
+ };
19535
+ requestBody?: never;
19536
+ responses: {
19537
+ /** @description OK */
19538
+ 200: {
19539
+ headers: {
19540
+ [name: string]: unknown;
19541
+ };
19542
+ content: {
19543
+ "application/json": components["schemas"]["AgentBlueprint"];
19544
+ };
19545
+ };
19546
+ /** @description Not Found */
19547
+ 404: {
19115
19548
  headers: {
19116
19549
  [name: string]: unknown;
19117
19550
  };
19118
19551
  content: {
19119
19552
  "application/json": {
19120
- /**
19121
- * @description The error code identifying the type of error.
19122
- * @example claim_expired
19123
- * @constant
19124
- */
19125
- code: "claim_expired";
19126
19553
  /**
19127
19554
  * @description A human-readable description of the error.
19128
- * @example Request could not be processed.
19555
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
19129
19556
  */
19130
19557
  message: string;
19131
- } | {
19132
- /**
19133
- * @description The error code identifying the type of error.
19134
- * @example user_code_expired
19135
- * @constant
19136
- */
19137
- code: "user_code_expired";
19558
+ };
19559
+ };
19560
+ };
19561
+ };
19562
+ };
19563
+ AgentBlueprintsController_delete: {
19564
+ parameters: {
19565
+ query?: never;
19566
+ header?: never;
19567
+ path: {
19568
+ /** @description The unique ID of the agent blueprint. */
19569
+ agent_blueprint_id: string;
19570
+ };
19571
+ cookie?: never;
19572
+ };
19573
+ requestBody?: never;
19574
+ responses: {
19575
+ /** @description Agent blueprint deleted. */
19576
+ 204: {
19577
+ headers: {
19578
+ [name: string]: unknown;
19579
+ };
19580
+ content?: never;
19581
+ };
19582
+ /** @description Not Found */
19583
+ 404: {
19584
+ headers: {
19585
+ [name: string]: unknown;
19586
+ };
19587
+ content: {
19588
+ "application/json": {
19138
19589
  /**
19139
19590
  * @description A human-readable description of the error.
19140
- * @example Request could not be processed.
19591
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
19141
19592
  */
19142
19593
  message: string;
19143
19594
  };
@@ -19145,42 +19596,72 @@ export interface operations {
19145
19596
  };
19146
19597
  };
19147
19598
  };
19148
- AgentAdminController_validateCredential: {
19599
+ AgentBlueprintsController_update: {
19149
19600
  parameters: {
19150
19601
  query?: never;
19151
19602
  header?: never;
19152
- path?: never;
19603
+ path: {
19604
+ /** @description The unique ID of the agent blueprint. */
19605
+ agent_blueprint_id: string;
19606
+ };
19153
19607
  cookie?: never;
19154
19608
  };
19155
19609
  requestBody: {
19156
19610
  content: {
19157
19611
  "application/json": {
19158
19612
  /**
19159
- * @description The kind of credential being validated — an agent API key or an agent access token.
19160
- * @constant
19161
- */
19162
- type: "api_key";
19163
- /**
19164
- * @description The credential value to validate: the API key value for `api_key`, or the access token (JWT) for `access_token`.
19165
- * @example sk_agent_example_1234567890
19166
- */
19167
- credential: string;
19168
- } | {
19169
- /**
19170
- * @description The kind of credential being validated — an agent API key or an agent access token.
19171
- * @constant
19613
+ * @description Human-readable name of the agent blueprint.
19614
+ * @example Prospecting Agent
19172
19615
  */
19173
- type: "access_token";
19616
+ name?: string;
19174
19617
  /**
19175
- * @description The credential value to validate: the API key value for `api_key`, or the access token (JWT) for `access_token`.
19176
- * @example eyJhbGciOiJSUzI1NiIsImtpZCI6...
19618
+ * @description Human-readable description of the agent blueprint. Pass `null` to clear it.
19619
+ * @example Finds and qualifies sales prospects.
19177
19620
  */
19178
- credential: string;
19621
+ description?: string | null;
19179
19622
  /**
19180
- * @description When provided, the access token's `aud` claim is verified against this value. Tokens issued for a different resource are rejected.
19181
- * @example https://api.example.com
19623
+ * @description Permission slugs forming the ceiling on what sessions minted from this blueprint may do. Each slug must exist in the environment.
19624
+ * @example [
19625
+ * "crm:read",
19626
+ * "email:send"
19627
+ * ]
19182
19628
  */
19183
- audience?: string;
19629
+ permissions?: string[];
19630
+ /** @description Who may mint sessions from this blueprint. Omitted lists are left unchanged. */
19631
+ invocable_by?: {
19632
+ /**
19633
+ * @description Role slugs whose members may mint user-delegated sessions from this blueprint. An empty list allows any member.
19634
+ * @example [
19635
+ * "manager"
19636
+ * ]
19637
+ */
19638
+ role_slugs?: string[];
19639
+ /**
19640
+ * @description Organizations in which sessions may be minted from this blueprint, enforced on user-delegated, autonomous, and agent-delegated mints. An empty list allows any organization in the environment.
19641
+ * @example [
19642
+ * "org_01EHWNCE74X7JSDV0X3SZ3KJNY"
19643
+ * ]
19644
+ */
19645
+ organization_ids?: string[];
19646
+ };
19647
+ /** @description Token and session lifetimes for sessions minted from this blueprint. Omitted fields are left unchanged. */
19648
+ session_settings?: {
19649
+ /**
19650
+ * @description Maximum lifetime of a session in seconds; refreshes never extend a session past this. At most 31,536,000 (365 days).
19651
+ * @example 3600
19652
+ */
19653
+ max_age_seconds?: number;
19654
+ /**
19655
+ * @description Lifetime of each minted access token in seconds. At most 3,600 (1 hour).
19656
+ * @example 300
19657
+ */
19658
+ access_token_ttl_seconds?: number;
19659
+ /**
19660
+ * @description Lifetime of each rotated refresh token in seconds. At most 5,184,000 (60 days).
19661
+ * @example 3600
19662
+ */
19663
+ refresh_token_ttl_seconds?: number;
19664
+ };
19184
19665
  };
19185
19666
  };
19186
19667
  };
@@ -19191,7 +19672,7 @@ export interface operations {
19191
19672
  [name: string]: unknown;
19192
19673
  };
19193
19674
  content: {
19194
- "application/json": components["schemas"]["AgentCredentialValidation"];
19675
+ "application/json": components["schemas"]["AgentBlueprint"];
19195
19676
  };
19196
19677
  };
19197
19678
  /** @description Bad Request */
@@ -19215,27 +19696,1031 @@ export interface operations {
19215
19696
  };
19216
19697
  };
19217
19698
  };
19218
- };
19219
- };
19220
- AgentAdminController_getRegistration: {
19221
- parameters: {
19222
- query?: never;
19223
- header?: never;
19224
- path: {
19225
- /** @description The unique ID of the agent registration. */
19226
- id: string;
19227
- };
19228
- cookie?: never;
19229
- };
19230
- requestBody?: never;
19231
- responses: {
19232
- /** @description OK */
19233
- 200: {
19699
+ /** @description Not Found */
19700
+ 404: {
19234
19701
  headers: {
19235
19702
  [name: string]: unknown;
19236
19703
  };
19237
19704
  content: {
19238
- "application/json": components["schemas"]["AgentRegistration"];
19705
+ "application/json": {
19706
+ /**
19707
+ * @description A human-readable description of the error.
19708
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
19709
+ */
19710
+ message: string;
19711
+ };
19712
+ };
19713
+ };
19714
+ 409: {
19715
+ headers: {
19716
+ [name: string]: unknown;
19717
+ };
19718
+ content: {
19719
+ "application/json": {
19720
+ /**
19721
+ * @description The error code identifying the type of error.
19722
+ * @example name_already_in_use
19723
+ * @constant
19724
+ */
19725
+ code: "name_already_in_use";
19726
+ /**
19727
+ * @description A human-readable description of the error.
19728
+ * @example Request could not be processed.
19729
+ */
19730
+ message: string;
19731
+ };
19732
+ };
19733
+ };
19734
+ /** @description Unprocessable Entity */
19735
+ 422: {
19736
+ headers: {
19737
+ [name: string]: unknown;
19738
+ };
19739
+ content: {
19740
+ "application/json": {
19741
+ /**
19742
+ * @description The error code identifying the type of error.
19743
+ * @example permission_not_found
19744
+ * @constant
19745
+ */
19746
+ code: "permission_not_found";
19747
+ /**
19748
+ * @description A human-readable description of the error.
19749
+ * @example Request could not be processed.
19750
+ */
19751
+ message: string;
19752
+ } | {
19753
+ /**
19754
+ * @description The error code identifying the type of error.
19755
+ * @example role_not_found
19756
+ * @constant
19757
+ */
19758
+ code: "role_not_found";
19759
+ /**
19760
+ * @description A human-readable description of the error.
19761
+ * @example Request could not be processed.
19762
+ */
19763
+ message: string;
19764
+ } | {
19765
+ /**
19766
+ * @description The error code identifying the type of error.
19767
+ * @example organization_not_found
19768
+ * @constant
19769
+ */
19770
+ code: "organization_not_found";
19771
+ /**
19772
+ * @description A human-readable description of the error.
19773
+ * @example Request could not be processed.
19774
+ */
19775
+ message: string;
19776
+ };
19777
+ };
19778
+ };
19779
+ };
19780
+ };
19781
+ AgentBlueprintsTokenController_mintToken: {
19782
+ parameters: {
19783
+ query?: never;
19784
+ header?: never;
19785
+ path: {
19786
+ /** @description The unique ID of the agent blueprint. */
19787
+ agent_blueprint_id: string;
19788
+ };
19789
+ cookie?: never;
19790
+ };
19791
+ requestBody: {
19792
+ content: {
19793
+ "application/json": {
19794
+ /**
19795
+ * @description How the session is minted: `user_delegated`, `autonomous`, `agent_delegated`, or `refresh`.
19796
+ * @constant
19797
+ */
19798
+ type: "user_delegated";
19799
+ /**
19800
+ * @description The access token of the user delegating to the agent. The token identifies the user and organization; effective permissions are resolved server-side.
19801
+ * @example eyJhbGciOiJSUzI1NiIsImtpZCI6...
19802
+ */
19803
+ user_access_token: string;
19804
+ /**
19805
+ * @description Optional caller-supplied context, echoed as an object with a `text` field in the `intent` claim of the minted access token.
19806
+ * @example renew-contract-123
19807
+ */
19808
+ intent?: string;
19809
+ } | {
19810
+ /**
19811
+ * @description How the session is minted: `user_delegated`, `autonomous`, `agent_delegated`, or `refresh`.
19812
+ * @constant
19813
+ */
19814
+ type: "autonomous";
19815
+ /**
19816
+ * @description The organization the agent acts within when operating as itself.
19817
+ * @example org_01EHWNCE74X7JSDV0X3SZ3KJNY
19818
+ */
19819
+ organization_id: string;
19820
+ /**
19821
+ * @description Optional caller-supplied context, echoed as an object with a `text` field in the `intent` claim of the minted access token.
19822
+ * @example renew-contract-123
19823
+ */
19824
+ intent?: string;
19825
+ } | {
19826
+ /**
19827
+ * @description How the session is minted: `user_delegated`, `autonomous`, `agent_delegated`, or `refresh`.
19828
+ * @constant
19829
+ */
19830
+ type: "agent_delegated";
19831
+ /**
19832
+ * @description The agent's own access token to exchange for a new session on the same instance. The token must have been minted from this blueprint; permissions are re-derived from current authority.
19833
+ * @example eyJhbGciOiJSUzI1NiIsImtpZCI6...
19834
+ */
19835
+ agent_access_token: string;
19836
+ /**
19837
+ * @description Optional caller-supplied context, echoed as an object with a `text` field in the `intent` claim of the minted access token.
19838
+ * @example renew-contract-123
19839
+ */
19840
+ intent?: string;
19841
+ } | {
19842
+ /**
19843
+ * @description How the session is minted: `user_delegated`, `autonomous`, `agent_delegated`, or `refresh`.
19844
+ * @constant
19845
+ */
19846
+ type: "refresh";
19847
+ /**
19848
+ * @description The refresh token issued with a previous agent access token. Refresh tokens are single-use: each refresh rotates it.
19849
+ * @example njGkA8Wyht0GBEGGA0Zh1Q3wZzL2...
19850
+ */
19851
+ refresh_token: string;
19852
+ /**
19853
+ * @description Optional caller-supplied context, echoed as an object with a `text` field in the `intent` claim of the minted access token.
19854
+ * @example renew-contract-123
19855
+ */
19856
+ intent?: string;
19857
+ };
19858
+ };
19859
+ };
19860
+ responses: {
19861
+ /** @description OK */
19862
+ 200: {
19863
+ headers: {
19864
+ [name: string]: unknown;
19865
+ };
19866
+ content: {
19867
+ "application/json": components["schemas"]["AgentToken"];
19868
+ };
19869
+ };
19870
+ /** @description Bad Request */
19871
+ 400: {
19872
+ headers: {
19873
+ [name: string]: unknown;
19874
+ };
19875
+ content: {
19876
+ "application/json": {
19877
+ /**
19878
+ * @description The error code identifying the type of error.
19879
+ * @example invalid_request
19880
+ * @constant
19881
+ */
19882
+ code: "invalid_request";
19883
+ /**
19884
+ * @description A human-readable description of the error.
19885
+ * @example Request could not be processed.
19886
+ */
19887
+ message: string;
19888
+ } | {
19889
+ /**
19890
+ * @description The error code identifying the type of error.
19891
+ * @example invalid_user_access_token
19892
+ * @constant
19893
+ */
19894
+ code: "invalid_user_access_token";
19895
+ /**
19896
+ * @description A human-readable description of the error.
19897
+ * @example Request could not be processed.
19898
+ */
19899
+ message: string;
19900
+ } | {
19901
+ /**
19902
+ * @description The error code identifying the type of error.
19903
+ * @example invalid_agent_access_token
19904
+ * @constant
19905
+ */
19906
+ code: "invalid_agent_access_token";
19907
+ /**
19908
+ * @description A human-readable description of the error.
19909
+ * @example Request could not be processed.
19910
+ */
19911
+ message: string;
19912
+ } | {
19913
+ /**
19914
+ * @description The error code identifying the type of error.
19915
+ * @example invalid_refresh_token
19916
+ * @constant
19917
+ */
19918
+ code: "invalid_refresh_token";
19919
+ /**
19920
+ * @description A human-readable description of the error.
19921
+ * @example Request could not be processed.
19922
+ */
19923
+ message: string;
19924
+ } | {
19925
+ /**
19926
+ * @description The error code identifying the type of error.
19927
+ * @example session_revoked
19928
+ * @constant
19929
+ */
19930
+ code: "session_revoked";
19931
+ /**
19932
+ * @description A human-readable description of the error.
19933
+ * @example Request could not be processed.
19934
+ */
19935
+ message: string;
19936
+ } | {
19937
+ /**
19938
+ * @description The error code identifying the type of error.
19939
+ * @example session_expired
19940
+ * @constant
19941
+ */
19942
+ code: "session_expired";
19943
+ /**
19944
+ * @description A human-readable description of the error.
19945
+ * @example Request could not be processed.
19946
+ */
19947
+ message: string;
19948
+ } | {
19949
+ /**
19950
+ * @description The error code identifying the type of error.
19951
+ * @example user_session_ended
19952
+ * @constant
19953
+ */
19954
+ code: "user_session_ended";
19955
+ /**
19956
+ * @description A human-readable description of the error.
19957
+ * @example Request could not be processed.
19958
+ */
19959
+ message: string;
19960
+ } | {
19961
+ /**
19962
+ * @description The error code identifying the type of error.
19963
+ * @example max_age_exceeded
19964
+ * @constant
19965
+ */
19966
+ code: "max_age_exceeded";
19967
+ /**
19968
+ * @description A human-readable description of the error.
19969
+ * @example Request could not be processed.
19970
+ */
19971
+ message: string;
19972
+ } | {
19973
+ /**
19974
+ * @description The error code identifying the type of error.
19975
+ * @example session_settings_not_found
19976
+ * @constant
19977
+ */
19978
+ code: "session_settings_not_found";
19979
+ /**
19980
+ * @description A human-readable description of the error.
19981
+ * @example Request could not be processed.
19982
+ */
19983
+ message: string;
19984
+ } | {
19985
+ /**
19986
+ * @description The error code identifying the type of error.
19987
+ * @example chain_depth_exceeded
19988
+ * @constant
19989
+ */
19990
+ code: "chain_depth_exceeded";
19991
+ /**
19992
+ * @description A human-readable description of the error.
19993
+ * @example Request could not be processed.
19994
+ */
19995
+ message: string;
19996
+ };
19997
+ };
19998
+ };
19999
+ /** @description Forbidden */
20000
+ 403: {
20001
+ headers: {
20002
+ [name: string]: unknown;
20003
+ };
20004
+ content: {
20005
+ "application/json": {
20006
+ /**
20007
+ * @description The error code identifying the type of error.
20008
+ * @example user_not_member_of_organization
20009
+ * @constant
20010
+ */
20011
+ code: "user_not_member_of_organization";
20012
+ /**
20013
+ * @description A human-readable description of the error.
20014
+ * @example Request could not be processed.
20015
+ */
20016
+ message: string;
20017
+ } | {
20018
+ /**
20019
+ * @description The error code identifying the type of error.
20020
+ * @example organization_not_invocable
20021
+ * @constant
20022
+ */
20023
+ code: "organization_not_invocable";
20024
+ /**
20025
+ * @description A human-readable description of the error.
20026
+ * @example Request could not be processed.
20027
+ */
20028
+ message: string;
20029
+ } | {
20030
+ /**
20031
+ * @description The error code identifying the type of error.
20032
+ * @example role_not_invocable
20033
+ * @constant
20034
+ */
20035
+ code: "role_not_invocable";
20036
+ /**
20037
+ * @description A human-readable description of the error.
20038
+ * @example Request could not be processed.
20039
+ */
20040
+ message: string;
20041
+ };
20042
+ };
20043
+ };
20044
+ /** @description Not Found */
20045
+ 404: {
20046
+ headers: {
20047
+ [name: string]: unknown;
20048
+ };
20049
+ content: {
20050
+ "application/json": {
20051
+ /**
20052
+ * @description A human-readable description of the error.
20053
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
20054
+ */
20055
+ message: string;
20056
+ };
20057
+ };
20058
+ };
20059
+ };
20060
+ };
20061
+ AgentAdminController_linkClaimAttemptToExternalUser: {
20062
+ parameters: {
20063
+ query?: never;
20064
+ header?: never;
20065
+ path?: never;
20066
+ cookie?: never;
20067
+ };
20068
+ requestBody: {
20069
+ content: {
20070
+ "application/json": {
20071
+ /**
20072
+ * @description The operation to perform on the claim attempt. Currently only `link_external_user` is supported.
20073
+ * @example link_external_user
20074
+ * @constant
20075
+ */
20076
+ type: "link_external_user";
20077
+ /**
20078
+ * @description The token identifying the claim attempt.
20079
+ * @example cla_tkn_01EHWNCE74X7JSDV0X3SZ3KJNY
20080
+ */
20081
+ claim_attempt_token: string;
20082
+ /**
20083
+ * @description The user to attach to the claim attempt, identified by email and external ID.
20084
+ * @example {
20085
+ * "email": "alice@example.com",
20086
+ * "external_id": "user_abc123"
20087
+ * }
20088
+ */
20089
+ user: {
20090
+ /**
20091
+ * Format: email
20092
+ * @description The email address of the user.
20093
+ * @example alice@example.com
20094
+ */
20095
+ email: string;
20096
+ /**
20097
+ * @description The external ID of the user.
20098
+ * @example user_abc123
20099
+ */
20100
+ external_id: string;
20101
+ };
20102
+ /**
20103
+ * @description The organization to place the agent in. Required when the user belongs to more than one organization.
20104
+ * @example org_01EHWNCE74X7JSDV0X3SZ3KJNY
20105
+ */
20106
+ organization_id?: string;
20107
+ };
20108
+ };
20109
+ };
20110
+ responses: {
20111
+ /** @description Claim attempt linked to external user. */
20112
+ 200: {
20113
+ headers: {
20114
+ [name: string]: unknown;
20115
+ };
20116
+ content: {
20117
+ "application/json": components["schemas"]["ClaimViewResponse"];
20118
+ };
20119
+ };
20120
+ /** @description Invalid request, email mismatch, invalid claim, invalid organization, or wrong account. */
20121
+ 400: {
20122
+ headers: {
20123
+ [name: string]: unknown;
20124
+ };
20125
+ content: {
20126
+ "application/json": {
20127
+ /**
20128
+ * @description The error code identifying the type of error.
20129
+ * @example invalid_request
20130
+ * @constant
20131
+ */
20132
+ code: "invalid_request";
20133
+ /**
20134
+ * @description A human-readable description of the error.
20135
+ * @example Request could not be processed.
20136
+ */
20137
+ message: string;
20138
+ } | {
20139
+ /**
20140
+ * @description The error code identifying the type of error.
20141
+ * @example invalid_claim
20142
+ * @constant
20143
+ */
20144
+ code: "invalid_claim";
20145
+ /**
20146
+ * @description A human-readable description of the error.
20147
+ * @example Request could not be processed.
20148
+ */
20149
+ message: string;
20150
+ } | {
20151
+ /**
20152
+ * @description The error code identifying the type of error.
20153
+ * @example invalid_organization
20154
+ * @constant
20155
+ */
20156
+ code: "invalid_organization";
20157
+ /**
20158
+ * @description A human-readable description of the error.
20159
+ * @example Request could not be processed.
20160
+ */
20161
+ message: string;
20162
+ } | {
20163
+ /**
20164
+ * @description The error code identifying the type of error.
20165
+ * @example email_mismatch
20166
+ * @constant
20167
+ */
20168
+ code: "email_mismatch";
20169
+ /**
20170
+ * @description A human-readable description of the error.
20171
+ * @example Request could not be processed.
20172
+ */
20173
+ message: string;
20174
+ } | {
20175
+ /**
20176
+ * @description The error code identifying the type of error.
20177
+ * @example wrong_account
20178
+ * @constant
20179
+ */
20180
+ code: "wrong_account";
20181
+ /**
20182
+ * @description A human-readable description of the error.
20183
+ * @example Request could not be processed.
20184
+ */
20185
+ message: string;
20186
+ };
20187
+ };
20188
+ };
20189
+ /** @description Claim denied or auth method disabled. */
20190
+ 403: {
20191
+ headers: {
20192
+ [name: string]: unknown;
20193
+ };
20194
+ content: {
20195
+ "application/json": {
20196
+ /**
20197
+ * @description The error code identifying the type of error.
20198
+ * @example claim_denied
20199
+ * @constant
20200
+ */
20201
+ code: "claim_denied";
20202
+ /**
20203
+ * @description A human-readable description of the error.
20204
+ * @example Request could not be processed.
20205
+ */
20206
+ message: string;
20207
+ } | {
20208
+ /**
20209
+ * @description The error code identifying the type of error.
20210
+ * @example auth_method_disabled
20211
+ * @constant
20212
+ */
20213
+ code: "auth_method_disabled";
20214
+ /**
20215
+ * @description A human-readable description of the error.
20216
+ * @example Request could not be processed.
20217
+ */
20218
+ message: string;
20219
+ };
20220
+ };
20221
+ };
20222
+ /** @description Organization selection required, email already in use, or claim already completed. */
20223
+ 409: {
20224
+ headers: {
20225
+ [name: string]: unknown;
20226
+ };
20227
+ content: {
20228
+ "application/json": {
20229
+ /**
20230
+ * @description The error code identifying the type of error.
20231
+ * @example organization_selection_required
20232
+ * @constant
20233
+ */
20234
+ code: "organization_selection_required";
20235
+ /**
20236
+ * @description A human-readable description of the error.
20237
+ * @example Request could not be processed.
20238
+ */
20239
+ message: string;
20240
+ /** @description Organizations the user belongs to. Pick one and retry with organization_id. */
20241
+ organizations: {
20242
+ /**
20243
+ * @description The organization ID.
20244
+ * @example org_01EHWNCE74X7JSDV0X3SZ3KJNY
20245
+ */
20246
+ id: string;
20247
+ /**
20248
+ * @description The organization name.
20249
+ * @example Acme Corp
20250
+ */
20251
+ name: string;
20252
+ }[];
20253
+ } | {
20254
+ /**
20255
+ * @description The error code identifying the type of error.
20256
+ * @example email_already_in_use
20257
+ * @constant
20258
+ */
20259
+ code: "email_already_in_use";
20260
+ /**
20261
+ * @description A human-readable description of the error.
20262
+ * @example Request could not be processed.
20263
+ */
20264
+ message: string;
20265
+ } | {
20266
+ /**
20267
+ * @description The error code identifying the type of error.
20268
+ * @example already_claimed
20269
+ * @constant
20270
+ */
20271
+ code: "already_claimed";
20272
+ /**
20273
+ * @description A human-readable description of the error.
20274
+ * @example Request could not be processed.
20275
+ */
20276
+ message: string;
20277
+ };
20278
+ };
20279
+ };
20280
+ /** @description Claim or user code has expired. */
20281
+ 410: {
20282
+ headers: {
20283
+ [name: string]: unknown;
20284
+ };
20285
+ content: {
20286
+ "application/json": {
20287
+ /**
20288
+ * @description The error code identifying the type of error.
20289
+ * @example claim_expired
20290
+ * @constant
20291
+ */
20292
+ code: "claim_expired";
20293
+ /**
20294
+ * @description A human-readable description of the error.
20295
+ * @example Request could not be processed.
20296
+ */
20297
+ message: string;
20298
+ } | {
20299
+ /**
20300
+ * @description The error code identifying the type of error.
20301
+ * @example user_code_expired
20302
+ * @constant
20303
+ */
20304
+ code: "user_code_expired";
20305
+ /**
20306
+ * @description A human-readable description of the error.
20307
+ * @example Request could not be processed.
20308
+ */
20309
+ message: string;
20310
+ };
20311
+ };
20312
+ };
20313
+ };
20314
+ };
20315
+ AgentAdminController_validateCredential: {
20316
+ parameters: {
20317
+ query?: never;
20318
+ header?: never;
20319
+ path?: never;
20320
+ cookie?: never;
20321
+ };
20322
+ requestBody: {
20323
+ content: {
20324
+ "application/json": {
20325
+ /**
20326
+ * @description The kind of credential being validated — an agent API key or an agent access token.
20327
+ * @constant
20328
+ */
20329
+ type: "api_key";
20330
+ /**
20331
+ * @description The credential value to validate: the API key value for `api_key`, or the access token (JWT) for `access_token`.
20332
+ * @example sk_agent_example_1234567890
20333
+ */
20334
+ credential: string;
20335
+ } | {
20336
+ /**
20337
+ * @description The kind of credential being validated — an agent API key or an agent access token.
20338
+ * @constant
20339
+ */
20340
+ type: "access_token";
20341
+ /**
20342
+ * @description The credential value to validate: the API key value for `api_key`, or the access token (JWT) for `access_token`.
20343
+ * @example eyJhbGciOiJSUzI1NiIsImtpZCI6...
20344
+ */
20345
+ credential: string;
20346
+ /**
20347
+ * @description When provided, the access token's `aud` claim is verified against this value. Tokens issued for a different resource are rejected.
20348
+ * @example https://api.example.com
20349
+ */
20350
+ audience?: string;
20351
+ };
20352
+ };
20353
+ };
20354
+ responses: {
20355
+ /** @description OK */
20356
+ 200: {
20357
+ headers: {
20358
+ [name: string]: unknown;
20359
+ };
20360
+ content: {
20361
+ "application/json": components["schemas"]["AgentCredentialValidation"];
20362
+ };
20363
+ };
20364
+ /** @description Bad Request */
20365
+ 400: {
20366
+ headers: {
20367
+ [name: string]: unknown;
20368
+ };
20369
+ content: {
20370
+ "application/json": {
20371
+ /**
20372
+ * @description The error code identifying the type of error.
20373
+ * @example invalid_request
20374
+ * @constant
20375
+ */
20376
+ code: "invalid_request";
20377
+ /**
20378
+ * @description A human-readable description of the error.
20379
+ * @example Request could not be processed.
20380
+ */
20381
+ message: string;
20382
+ };
20383
+ };
20384
+ };
20385
+ };
20386
+ };
20387
+ AgentInstancesController_list: {
20388
+ parameters: {
20389
+ query?: {
20390
+ /** @description An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. */
20391
+ before?: string;
20392
+ /** @description An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. */
20393
+ after?: string;
20394
+ /** @description Upper limit on the number of objects to return, between `1` and `100`. */
20395
+ limit?: number;
20396
+ /** @description Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to `normal`. */
20397
+ order?: components["schemas"]["PaginationOrder"];
20398
+ /** @description Only return instances acting within this organization. */
20399
+ organization_id?: string;
20400
+ /** @description Only return instances minted from this blueprint. */
20401
+ agent_blueprint_id?: string;
20402
+ };
20403
+ header?: never;
20404
+ path?: never;
20405
+ cookie?: never;
20406
+ };
20407
+ requestBody?: never;
20408
+ responses: {
20409
+ /** @description OK */
20410
+ 200: {
20411
+ headers: {
20412
+ [name: string]: unknown;
20413
+ };
20414
+ content: {
20415
+ "application/json": {
20416
+ /**
20417
+ * @description Indicates this is a list response.
20418
+ * @constant
20419
+ */
20420
+ object?: "list";
20421
+ /** @description Pagination cursors for navigating between pages of results. */
20422
+ list_metadata?: {
20423
+ /**
20424
+ * @description An object ID that defines your place in the list. When the ID is not present, you are at the start of the list.
20425
+ * @example agent_01HXYZ123456789ABCDEFGHIJ
20426
+ */
20427
+ before: string | null;
20428
+ /**
20429
+ * @description An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
20430
+ * @example agent_01HXYZ987654321KJIHGFEDCBA
20431
+ */
20432
+ after: string | null;
20433
+ };
20434
+ } & {
20435
+ /** @description The list of records for the current page. */
20436
+ data?: components["schemas"]["AgentInstance"][];
20437
+ };
20438
+ };
20439
+ };
20440
+ /** @description Unauthorized */
20441
+ 401: {
20442
+ headers: {
20443
+ [name: string]: unknown;
20444
+ };
20445
+ content: {
20446
+ "application/json": {
20447
+ /**
20448
+ * @description A human-readable description of the error.
20449
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
20450
+ */
20451
+ message: string;
20452
+ };
20453
+ };
20454
+ };
20455
+ };
20456
+ };
20457
+ AgentInstancesController_get: {
20458
+ parameters: {
20459
+ query?: never;
20460
+ header?: never;
20461
+ path: {
20462
+ /** @description The unique ID of the agent instance. */
20463
+ agent_instance_id: string;
20464
+ };
20465
+ cookie?: never;
20466
+ };
20467
+ requestBody?: never;
20468
+ responses: {
20469
+ /** @description OK */
20470
+ 200: {
20471
+ headers: {
20472
+ [name: string]: unknown;
20473
+ };
20474
+ content: {
20475
+ "application/json": components["schemas"]["AgentInstance"];
20476
+ };
20477
+ };
20478
+ /** @description Not Found */
20479
+ 404: {
20480
+ headers: {
20481
+ [name: string]: unknown;
20482
+ };
20483
+ content: {
20484
+ "application/json": {
20485
+ /**
20486
+ * @description A human-readable description of the error.
20487
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
20488
+ */
20489
+ message: string;
20490
+ };
20491
+ };
20492
+ };
20493
+ };
20494
+ };
20495
+ AgentInstancesController_delete: {
20496
+ parameters: {
20497
+ query?: never;
20498
+ header?: never;
20499
+ path: {
20500
+ /** @description The unique ID of the agent instance. */
20501
+ agent_instance_id: string;
20502
+ };
20503
+ cookie?: never;
20504
+ };
20505
+ requestBody?: never;
20506
+ responses: {
20507
+ /** @description Agent instance deleted. */
20508
+ 204: {
20509
+ headers: {
20510
+ [name: string]: unknown;
20511
+ };
20512
+ content?: never;
20513
+ };
20514
+ /** @description Not Found */
20515
+ 404: {
20516
+ headers: {
20517
+ [name: string]: unknown;
20518
+ };
20519
+ content: {
20520
+ "application/json": {
20521
+ /**
20522
+ * @description A human-readable description of the error.
20523
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
20524
+ */
20525
+ message: string;
20526
+ };
20527
+ };
20528
+ };
20529
+ };
20530
+ };
20531
+ AgentAdminController_getRegistration: {
20532
+ parameters: {
20533
+ query?: never;
20534
+ header?: never;
20535
+ path: {
20536
+ /** @description The unique ID of the agent registration. */
20537
+ id: string;
20538
+ };
20539
+ cookie?: never;
20540
+ };
20541
+ requestBody?: never;
20542
+ responses: {
20543
+ /** @description OK */
20544
+ 200: {
20545
+ headers: {
20546
+ [name: string]: unknown;
20547
+ };
20548
+ content: {
20549
+ "application/json": components["schemas"]["AgentRegistration"];
20550
+ };
20551
+ };
20552
+ /** @description Not Found */
20553
+ 404: {
20554
+ headers: {
20555
+ [name: string]: unknown;
20556
+ };
20557
+ content: {
20558
+ "application/json": {
20559
+ /**
20560
+ * @description A human-readable description of the error.
20561
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
20562
+ */
20563
+ message: string;
20564
+ };
20565
+ };
20566
+ };
20567
+ };
20568
+ };
20569
+ AgentInstanceSessionsController_list: {
20570
+ parameters: {
20571
+ query?: {
20572
+ /** @description An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `before="obj_123"` to fetch a new batch of objects before `"obj_123"`. */
20573
+ before?: string;
20574
+ /** @description An object ID that defines your place in the list. When the ID is not present, you are at the end of the list. For example, if you make a list request and receive 100 objects, ending with `"obj_123"`, your subsequent call can include `after="obj_123"` to fetch a new batch of objects after `"obj_123"`. */
20575
+ after?: string;
20576
+ /** @description Upper limit on the number of objects to return, between `1` and `100`. */
20577
+ limit?: number;
20578
+ /** @description Order the results by the creation time. Supported values are `"asc"` (ascending), `"desc"` (descending), and `"normal"` (descending with reversed cursor semantics where `before` fetches older records and `after` fetches newer records). Defaults to `normal`. */
20579
+ order?: components["schemas"]["PaginationOrder"];
20580
+ /** @description Only return sessions of instances minted from this blueprint. */
20581
+ agent_blueprint_id?: string;
20582
+ /** @description Only return sessions belonging to this agent instance. */
20583
+ agent_instance_id?: string;
20584
+ };
20585
+ header?: never;
20586
+ path?: never;
20587
+ cookie?: never;
20588
+ };
20589
+ requestBody?: never;
20590
+ responses: {
20591
+ /** @description OK */
20592
+ 200: {
20593
+ headers: {
20594
+ [name: string]: unknown;
20595
+ };
20596
+ content: {
20597
+ "application/json": {
20598
+ /**
20599
+ * @description Indicates this is a list response.
20600
+ * @constant
20601
+ */
20602
+ object?: "list";
20603
+ /** @description Pagination cursors for navigating between pages of results. */
20604
+ list_metadata?: {
20605
+ /**
20606
+ * @description An object ID that defines your place in the list. When the ID is not present, you are at the start of the list.
20607
+ * @example agent_session_01HXYZ123456789ABCDEFGHIJ
20608
+ */
20609
+ before: string | null;
20610
+ /**
20611
+ * @description An object ID that defines your place in the list. When the ID is not present, you are at the end of the list.
20612
+ * @example agent_session_01HXYZ987654321KJIHGFEDCBA
20613
+ */
20614
+ after: string | null;
20615
+ };
20616
+ } & {
20617
+ /** @description The list of records for the current page. */
20618
+ data?: components["schemas"]["AgentInstanceSession"][];
20619
+ };
20620
+ };
20621
+ };
20622
+ /** @description Unauthorized */
20623
+ 401: {
20624
+ headers: {
20625
+ [name: string]: unknown;
20626
+ };
20627
+ content: {
20628
+ "application/json": {
20629
+ /**
20630
+ * @description A human-readable description of the error.
20631
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
20632
+ */
20633
+ message: string;
20634
+ };
20635
+ };
20636
+ };
20637
+ /** @description Unprocessable Entity */
20638
+ 422: {
20639
+ headers: {
20640
+ [name: string]: unknown;
20641
+ };
20642
+ content: {
20643
+ "application/json": {
20644
+ /**
20645
+ * @description A human-readable description of the error.
20646
+ * @example Validation failed.
20647
+ */
20648
+ message: string;
20649
+ /** @description The list of validation errors. */
20650
+ errors: {
20651
+ /**
20652
+ * @description The validation error code.
20653
+ * @example required
20654
+ */
20655
+ code: string;
20656
+ /**
20657
+ * @description The field that failed validation.
20658
+ * @example event.action
20659
+ */
20660
+ field: string;
20661
+ }[];
20662
+ };
20663
+ };
20664
+ };
20665
+ };
20666
+ };
20667
+ AgentInstanceSessionsController_get: {
20668
+ parameters: {
20669
+ query?: never;
20670
+ header?: never;
20671
+ path: {
20672
+ /** @description The unique ID of the agent instance session. */
20673
+ agent_instance_session_id: string;
20674
+ };
20675
+ cookie?: never;
20676
+ };
20677
+ requestBody?: never;
20678
+ responses: {
20679
+ /** @description OK */
20680
+ 200: {
20681
+ headers: {
20682
+ [name: string]: unknown;
20683
+ };
20684
+ content: {
20685
+ "application/json": components["schemas"]["AgentInstanceSession"];
20686
+ };
20687
+ };
20688
+ /** @description Not Found */
20689
+ 404: {
20690
+ headers: {
20691
+ [name: string]: unknown;
20692
+ };
20693
+ content: {
20694
+ "application/json": {
20695
+ /**
20696
+ * @description A human-readable description of the error.
20697
+ * @example Organization not found: 'org_01EHQMYV6MBK39QC5PZXHY59C3'.
20698
+ */
20699
+ message: string;
20700
+ };
20701
+ };
20702
+ };
20703
+ };
20704
+ };
20705
+ AgentInstanceSessionsController_revoke: {
20706
+ parameters: {
20707
+ query?: never;
20708
+ header?: never;
20709
+ path: {
20710
+ /** @description The unique ID of the agent instance session. */
20711
+ agent_instance_session_id: string;
20712
+ };
20713
+ cookie?: never;
20714
+ };
20715
+ requestBody?: never;
20716
+ responses: {
20717
+ /** @description OK */
20718
+ 200: {
20719
+ headers: {
20720
+ [name: string]: unknown;
20721
+ };
20722
+ content: {
20723
+ "application/json": components["schemas"]["AgentInstanceSession"];
19239
20724
  };
19240
20725
  };
19241
20726
  /** @description Not Found */