@operla-ai/sdk 0.2.0 → 0.3.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.
@@ -1,3 +1,3 @@
1
- export { Conversations, Entities, type Options, Organizations } from './sdk.gen.js';
2
- export type { ClientOptions, Create2Data, Create2Error, Create2Errors, Create2Response, Create2Responses, CreateData, CreateError, CreateErrors, CreateResponse, CreateResponses, Delete2Data, Delete2Error, Delete2Errors, Delete2Response, Delete2Responses, DeleteData, DeleteError, DeleteErrors, DeleteResponse, DeleteResponses, Get2Data, Get2Error, Get2Errors, Get2Response, Get2Responses, Get3Data, Get3Error, Get3Errors, Get3Response, Get3Responses, GetData, GetError, GetErrors, GetResponse, GetResponses, List2Data, List2Error, List2Errors, List2Response, List2Responses, List3Data, List3Error, List3Errors, List3Response, List3Responses, ListData, ListError, ListErrors, ListResponse, ListResponses, SendMessageData, SendMessageError, SendMessageErrors, SendMessageResponse, SendMessageResponses, Update2Data, Update2Error, Update2Errors, Update2Response, Update2Responses, UpdateData, UpdateError, UpdateErrors, UpdateResponse, UpdateResponses, ValidateResponseData, ValidateResponseError, ValidateResponseErrors, ValidateResponseResponse, ValidateResponseResponses } from './types.gen.js';
1
+ export { Agents, Conversations, Entities, Kb, type Options, Organizations } from './sdk.gen.js';
2
+ export type { AppendMessageData, AppendMessageError, AppendMessageErrors, AppendMessageResponse, AppendMessageResponses, ClientOptions, Create2Data, Create2Error, Create2Errors, Create2Response, Create2Responses, Create3Data, Create3Error, Create3Errors, Create3Response, Create3Responses, Create4Data, Create4Error, Create4Errors, Create4Response, Create4Responses, CreateData, CreateError, CreateErrors, CreateResponse, CreateResponses, Delete2Data, Delete2Error, Delete2Errors, Delete2Response, Delete2Responses, Delete3Data, Delete3Error, Delete3Errors, Delete3Response, Delete3Responses, Delete4Data, Delete4Error, Delete4Errors, Delete4Response, Delete4Responses, DeleteData, DeleteError, DeleteErrors, DeleteOverrideData, DeleteOverrideError, DeleteOverrideErrors, DeleteOverrideResponse, DeleteOverrideResponses, DeleteResponse, DeleteResponses, Get2Data, Get2Error, Get2Errors, Get2Response, Get2Responses, Get3Data, Get3Error, Get3Errors, Get3Response, Get3Responses, Get4Data, Get4Error, Get4Errors, Get4Response, Get4Responses, Get5Data, Get5Error, Get5Errors, Get5Response, Get5Responses, GetData, GetError, GetErrors, GetResponse, GetResponses, List2Data, List2Error, List2Errors, List2Response, List2Responses, List3Data, List3Error, List3Errors, List3Response, List3Responses, List4Data, List4Error, List4Errors, List4Response, List4Responses, List5Data, List5Error, List5Errors, List5Response, List5Responses, ListData, ListError, ListErrors, ListResponse, ListResponses, Publish2Data, Publish2Error, Publish2Errors, Publish2Response, Publish2Responses, PublishData, PublishError, PublishErrors, PublishResponse, PublishResponses, Rollback2Data, Rollback2Error, Rollback2Errors, Rollback2Response, Rollback2Responses, RollbackData, RollbackError, RollbackErrors, RollbackResponse, RollbackResponses, SendMessageData, SendMessageError, SendMessageErrors, SendMessageResponse, SendMessageResponses, Update2Data, Update2Error, Update2Errors, Update2Response, Update2Responses, Update3Data, Update3Error, Update3Errors, Update3Response, Update3Responses, Update4Data, Update4Error, Update4Errors, Update4Response, Update4Responses, UpdateData, UpdateError, UpdateErrors, UpdateResponse, UpdateResponses, ValidateResponseData, ValidateResponseError, ValidateResponseErrors, ValidateResponseResponse, ValidateResponseResponses } from './types.gen.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACpF,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,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,iBAAiB,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  // This file is auto-generated by @hey-api/openapi-ts
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Organizations = exports.Entities = exports.Conversations = void 0;
4
+ exports.Organizations = exports.Kb = exports.Entities = exports.Conversations = exports.Agents = void 0;
5
5
  var sdk_gen_js_1 = require("./sdk.gen.js");
6
+ Object.defineProperty(exports, "Agents", { enumerable: true, get: function () { return sdk_gen_js_1.Agents; } });
6
7
  Object.defineProperty(exports, "Conversations", { enumerable: true, get: function () { return sdk_gen_js_1.Conversations; } });
7
8
  Object.defineProperty(exports, "Entities", { enumerable: true, get: function () { return sdk_gen_js_1.Entities; } });
9
+ Object.defineProperty(exports, "Kb", { enumerable: true, get: function () { return sdk_gen_js_1.Kb; } });
8
10
  Object.defineProperty(exports, "Organizations", { enumerable: true, get: function () { return sdk_gen_js_1.Organizations; } });
9
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAErD,2CAAoF;AAA3E,2GAAA,aAAa,OAAA;AAAE,sGAAA,QAAQ,OAAA;AAAgB,2GAAA,aAAa,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generated/index.ts"],"names":[],"mappings":";AAAA,qDAAqD;;;AAErD,2CAAgG;AAAvF,oGAAA,MAAM,OAAA;AAAE,2GAAA,aAAa,OAAA;AAAE,sGAAA,QAAQ,OAAA;AAAE,gGAAA,EAAE,OAAA;AAAgB,2GAAA,aAAa,OAAA"}
@@ -1,5 +1,5 @@
1
1
  import type { Client, Options as Options2, TDataShape } from './client/index.js';
2
- import type { Create2Data, Create2Errors, Create2Responses, CreateData, CreateErrors, CreateResponses, Delete2Data, Delete2Errors, Delete2Responses, DeleteData, DeleteErrors, DeleteResponses, Get2Data, Get2Errors, Get2Responses, Get3Data, Get3Errors, Get3Responses, GetData, GetErrors, GetResponses, List2Data, List2Errors, List2Responses, List3Data, List3Errors, List3Responses, ListData, ListErrors, ListResponses, SendMessageData, SendMessageErrors, SendMessageResponses, Update2Data, Update2Errors, Update2Responses, UpdateData, UpdateErrors, UpdateResponses, ValidateResponseData, ValidateResponseErrors, ValidateResponseResponses } from './types.gen.js';
2
+ import type { AppendMessageData, AppendMessageErrors, AppendMessageResponses, Create2Data, Create2Errors, Create2Responses, Create3Data, Create3Errors, Create3Responses, Create4Data, Create4Errors, Create4Responses, CreateData, CreateErrors, CreateResponses, Delete2Data, Delete2Errors, Delete2Responses, Delete3Data, Delete3Errors, Delete3Responses, Delete4Data, Delete4Errors, Delete4Responses, DeleteData, DeleteErrors, DeleteOverrideData, DeleteOverrideErrors, DeleteOverrideResponses, DeleteResponses, Get2Data, Get2Errors, Get2Responses, Get3Data, Get3Errors, Get3Responses, Get4Data, Get4Errors, Get4Responses, Get5Data, Get5Errors, Get5Responses, GetData, GetErrors, GetResponses, List2Data, List2Errors, List2Responses, List3Data, List3Errors, List3Responses, List4Data, List4Errors, List4Responses, List5Data, List5Errors, List5Responses, ListData, ListErrors, ListResponses, Publish2Data, Publish2Errors, Publish2Responses, PublishData, PublishErrors, PublishResponses, Rollback2Data, Rollback2Errors, Rollback2Responses, RollbackData, RollbackErrors, RollbackResponses, SendMessageData, SendMessageErrors, SendMessageResponses, Update2Data, Update2Errors, Update2Responses, Update3Data, Update3Errors, Update3Responses, Update4Data, Update4Errors, Update4Responses, UpdateData, UpdateErrors, UpdateResponses, ValidateResponseData, ValidateResponseErrors, ValidateResponseResponses } from './types.gen.js';
3
3
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
4
4
  /**
5
5
  * You can provide a client instance returned by `createClient()` instead of
@@ -13,94 +13,194 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
13
13
  */
14
14
  meta?: Record<string, unknown>;
15
15
  };
16
+ export declare class Agents {
17
+ /**
18
+ * List agents
19
+ *
20
+ * Returns every agent in the catalog. The response omits the resolved config and draft — fetch a single agent to get them.
21
+ */
22
+ static list<ThrowOnError extends boolean = false>(options?: Options<ListData, ThrowOnError>): import("./client/types.gen.js").RequestResult<ListResponses, ListErrors, ThrowOnError, "fields">;
23
+ /**
24
+ * Create a specialist agent
25
+ *
26
+ * Creates a new specialist agent. The machine name is derived from the label (slugified, prefixed with `specialist_`). Core agents (orchestrator, response, …) are bootstrapped by the engine and cannot be created via the SDK.
27
+ */
28
+ static create<ThrowOnError extends boolean = false>(options?: Options<CreateData, ThrowOnError>): import("./client/types.gen.js").RequestResult<CreateResponses, CreateErrors, ThrowOnError, "fields">;
29
+ /**
30
+ * Delete a specialist agent
31
+ *
32
+ * Hard-delete and irreversible. Any intent currently routed to this agent is rebased to the response agent. Only `specialist_*` agents can be deleted — core agents are protected.
33
+ */
34
+ static delete<ThrowOnError extends boolean = false>(options: Options<DeleteData, ThrowOnError>): import("./client/types.gen.js").RequestResult<DeleteResponses, DeleteErrors, ThrowOnError, "fields">;
35
+ /**
36
+ * Get an agent
37
+ *
38
+ * Returns the agent's resolved config at the caller's scope, plus the local draft if any.
39
+ */
40
+ static get<ThrowOnError extends boolean = false>(options: Options<GetData, ThrowOnError>): import("./client/types.gen.js").RequestResult<GetResponses, GetErrors, ThrowOnError, "fields">;
41
+ /**
42
+ * Update an agent
43
+ *
44
+ * Applies the provided fields to the agent's draft at the caller's scope, creating the draft if none exists. At organization or entity scope, the override itself is auto-created on the first update — no separate creation step needed. Set `publish: true` to immediately promote the draft (a version snapshot is still archived so rollback remains possible).
45
+ */
46
+ static update<ThrowOnError extends boolean = false>(options: Options<UpdateData, ThrowOnError>): import("./client/types.gen.js").RequestResult<UpdateResponses, UpdateErrors, ThrowOnError, "fields">;
47
+ /**
48
+ * Delete an agent override
49
+ *
50
+ * Removes the agent's override at the caller's scope, along with its draft and version history.
51
+ */
52
+ static deleteOverride<ThrowOnError extends boolean = false>(options: Options<DeleteOverrideData, ThrowOnError>): import("./client/types.gen.js").RequestResult<DeleteOverrideResponses, DeleteOverrideErrors, ThrowOnError, "fields">;
53
+ /**
54
+ * Publish an agent draft
55
+ *
56
+ * Promotes the current draft at the caller's scope to published, archiving the previous version.
57
+ */
58
+ static publish<ThrowOnError extends boolean = false>(options: Options<PublishData, ThrowOnError>): import("./client/types.gen.js").RequestResult<PublishResponses, PublishErrors, ThrowOnError, "fields">;
59
+ /**
60
+ * Rollback an agent to a previous version
61
+ *
62
+ * Restores a previously archived version as the new published. The current published is archived first.
63
+ */
64
+ static rollback<ThrowOnError extends boolean = false>(options: Options<RollbackData, ThrowOnError>): import("./client/types.gen.js").RequestResult<RollbackResponses, RollbackErrors, ThrowOnError, "fields">;
65
+ }
16
66
  export declare class Conversations {
17
67
  /**
18
68
  * List conversations
19
69
  *
20
- * Returns a paginated list of conversations visible to the caller. Admin API keys see every conversation; organization-scoped keys only see their own organization's. The response omits the message thread — fetch a single conversation to get the full thread.
70
+ * Returns conversations visible to the caller. The response omits the message thread and the custom user `data` — fetch a single conversation to get the full payload.
21
71
  */
22
- static list<ThrowOnError extends boolean = false>(options?: Options<ListData, ThrowOnError>): import("./client/types.gen.js").RequestResult<ListResponses, ListErrors, ThrowOnError, "fields">;
72
+ static list<ThrowOnError extends boolean = false>(options?: Options<List2Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<List2Responses, List2Errors, ThrowOnError, "fields">;
23
73
  /**
24
74
  * Get a conversation by ID
25
75
  *
26
- * Returns the full conversation, including the complete message thread. Returns 404 if the conversation doesn't exist or isn't visible to the caller.
76
+ * Returns the full conversation, including the complete message thread.
27
77
  */
28
- static get<ThrowOnError extends boolean = false>(options: Options<GetData, ThrowOnError>): import("./client/types.gen.js").RequestResult<GetResponses, GetErrors, ThrowOnError, "fields">;
78
+ static get<ThrowOnError extends boolean = false>(options: Options<Get2Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Get2Responses, Get2Errors, ThrowOnError, "fields">;
29
79
  /**
30
80
  * Send a conversation message
31
81
  *
32
- * Processes a user message. On the first call (no `conversationId`), a new conversation is created and returned. On subsequent calls, pass the `conversationId` to continue the same conversation. The response includes the AI answer, the resolved entity, and the organization the conversation was attached to (derived from the API key or `X-Organization-Id` header for admin keys).
82
+ * Processes a user message through the AI pipeline. Omit `conversationId` on the first call — a new conversation is created and its ID is returned to pass back on subsequent messages.
33
83
  */
34
84
  static sendMessage<ThrowOnError extends boolean = false>(options?: Options<SendMessageData, ThrowOnError>): import("./client/types.gen.js").RequestResult<SendMessageResponses, SendMessageErrors, ThrowOnError, "fields">;
35
85
  /**
36
86
  * Validate a pending response
37
87
  *
38
- * Approves an AI response that is awaiting human validation. Pending actions are executed and the response is recorded as validated. Pass `editedContent` to record an edited version of the response — the original AI content is preserved on the conversation for analytics.
88
+ * Approves an AI response awaiting human validation: pending actions run and the response is marked validated. Pass `editedContent` to record an edited version — the original AI content is preserved for analytics.
39
89
  */
40
90
  static validateResponse<ThrowOnError extends boolean = false>(options: Options<ValidateResponseData, ThrowOnError>): import("./client/types.gen.js").RequestResult<ValidateResponseResponses, ValidateResponseErrors, ThrowOnError, "fields">;
91
+ /**
92
+ * Append a message to a conversation
93
+ *
94
+ * Appends a message to the thread without triggering the AI. Use this for operator replies or out-of-band context. For user messages that should be processed, use [`sendMessage`](#tag/conversations/POST/conversations/messages) instead.
95
+ */
96
+ static appendMessage<ThrowOnError extends boolean = false>(options: Options<AppendMessageData, ThrowOnError>): import("./client/types.gen.js").RequestResult<AppendMessageResponses, AppendMessageErrors, ThrowOnError, "fields">;
41
97
  }
42
98
  export declare class Entities {
43
99
  /**
44
100
  * List entities
45
101
  *
46
- * Returns every entity visible to the authenticated caller. If organizations are enabled, scoped API keys only see entities in their org. Admin keys and admin users can filter by `organizationId`.
102
+ * Returns entities visible to the caller. The response omits `metadata` — fetch a single entity to get it.
47
103
  */
48
- static list<ThrowOnError extends boolean = false>(options?: Options<List2Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<List2Responses, List2Errors, ThrowOnError, "fields">;
104
+ static list<ThrowOnError extends boolean = false>(options?: Options<List3Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<List3Responses, List3Errors, ThrowOnError, "fields">;
49
105
  /**
50
106
  * Create an entity
51
107
  *
52
- * Creates a new entity within the caller's organization (or at the root if organizations are not enabled). `metadata` is free-form and must conform to the `entitySchema` you declared.
108
+ * Creates a new entity. `metadata` is free-form and must conform to the `entitySchema` you declared.
53
109
  */
54
- static create<ThrowOnError extends boolean = false>(options?: Options<CreateData, ThrowOnError>): import("./client/types.gen.js").RequestResult<CreateResponses, CreateErrors, ThrowOnError, "fields">;
110
+ static create<ThrowOnError extends boolean = false>(options?: Options<Create2Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Create2Responses, Create2Errors, ThrowOnError, "fields">;
55
111
  /**
56
112
  * Delete an entity
57
113
  *
58
- * Hard delete and irreversible — conversations and entity-scoped configs (KB articles, prompts, rules) tied to this entity will be orphaned (not cascaded).
114
+ * Hard delete and irreversible — conversations and entity-scoped configurations attached to this entity will be orphaned (not cascaded).
59
115
  */
60
- static delete<ThrowOnError extends boolean = false>(options: Options<DeleteData, ThrowOnError>): import("./client/types.gen.js").RequestResult<DeleteResponses, DeleteErrors, ThrowOnError, "fields">;
116
+ static delete<ThrowOnError extends boolean = false>(options: Options<Delete2Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Delete2Responses, Delete2Errors, ThrowOnError, "fields">;
61
117
  /**
62
118
  * Get entity by ID
63
119
  *
64
- * Fetch a single entity by ID. Returns 404 if the entity doesn't exist or isn't visible to the caller.
120
+ * Returns a single entity by ID.
65
121
  */
66
- static get<ThrowOnError extends boolean = false>(options: Options<Get2Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Get2Responses, Get2Errors, ThrowOnError, "fields">;
122
+ static get<ThrowOnError extends boolean = false>(options: Options<Get3Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Get3Responses, Get3Errors, ThrowOnError, "fields">;
67
123
  /**
68
124
  * Update an entity
69
125
  *
70
- * Partial update. Only the fields present in the body are modified. Returns the updated entity.
126
+ * Applies the provided fields to the entity. Only the fields present in the body are modified.
71
127
  */
72
- static update<ThrowOnError extends boolean = false>(options: Options<UpdateData, ThrowOnError>): import("./client/types.gen.js").RequestResult<UpdateResponses, UpdateErrors, ThrowOnError, "fields">;
128
+ static update<ThrowOnError extends boolean = false>(options: Options<Update2Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Update2Responses, Update2Errors, ThrowOnError, "fields">;
129
+ }
130
+ export declare class Kb {
131
+ /**
132
+ * List KB articles
133
+ *
134
+ * Returns articles visible at the caller's scope. The response omits the article body — fetch a single article to get the full content.
135
+ */
136
+ static list<ThrowOnError extends boolean = false>(options?: Options<List4Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<List4Responses, List4Errors, ThrowOnError, "fields">;
137
+ /**
138
+ * Create a KB article
139
+ *
140
+ * Creates a new article at the caller's scope, published immediately as v1.
141
+ */
142
+ static create<ThrowOnError extends boolean = false>(options?: Options<Create3Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Create3Responses, Create3Errors, ThrowOnError, "fields">;
143
+ /**
144
+ * Delete a KB article
145
+ *
146
+ * Hard delete and irreversible — removes the article and its version history.
147
+ */
148
+ static delete<ThrowOnError extends boolean = false>(options: Options<Delete3Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Delete3Responses, Delete3Errors, ThrowOnError, "fields">;
149
+ /**
150
+ * Get a KB article
151
+ *
152
+ * Returns the full article (published + draft if any).
153
+ */
154
+ static get<ThrowOnError extends boolean = false>(options: Options<Get4Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Get4Responses, Get4Errors, ThrowOnError, "fields">;
155
+ /**
156
+ * Update a KB article
157
+ *
158
+ * Applies the provided fields to the article. Content edits (`title`, `content`) go through the draft workflow — set `publish: true` to promote the draft in the same call. Routing changes (`intents`) bypass the draft.
159
+ */
160
+ static update<ThrowOnError extends boolean = false>(options: Options<Update3Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Update3Responses, Update3Errors, ThrowOnError, "fields">;
161
+ /**
162
+ * Publish a KB article draft
163
+ *
164
+ * Promotes the article's current draft to published, archiving the previous version.
165
+ */
166
+ static publish<ThrowOnError extends boolean = false>(options: Options<Publish2Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Publish2Responses, Publish2Errors, ThrowOnError, "fields">;
167
+ /**
168
+ * Rollback a KB article to a previous version
169
+ *
170
+ * Restores a previously archived version as the new published. The current published is archived first.
171
+ */
172
+ static rollback<ThrowOnError extends boolean = false>(options: Options<Rollback2Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Rollback2Responses, Rollback2Errors, ThrowOnError, "fields">;
73
173
  }
74
174
  export declare class Organizations {
75
175
  /**
76
176
  * List organizations
77
177
  *
78
- * Returns every organization in your deployment. Only admin API keys and admin users can list organizations — scoped keys always get a 403 here.
178
+ * Returns every organization in your deployment. Admin keys only. The response omits `metadata` — fetch a single organization to get it.
79
179
  */
80
- static list<ThrowOnError extends boolean = false>(options?: Options<List3Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<List3Responses, List3Errors, ThrowOnError, "fields">;
180
+ static list<ThrowOnError extends boolean = false>(options?: Options<List5Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<List5Responses, List5Errors, ThrowOnError, "fields">;
81
181
  /**
82
182
  * Create an organization
83
183
  *
84
- * Creates a new organization and returns a freshly-minted scoped API key for it. **The key is shown only once — store it immediately**, you won't be able to retrieve it again (only a non-sensitive prefix is persisted for identification).
184
+ * Creates a new organization and returns a freshly-minted scoped API key for it. **The key is shown only once — store it immediately**, you won't be able to retrieve it again.
85
185
  */
86
- static create<ThrowOnError extends boolean = false>(options?: Options<Create2Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Create2Responses, Create2Errors, ThrowOnError, "fields">;
186
+ static create<ThrowOnError extends boolean = false>(options?: Options<Create4Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Create4Responses, Create4Errors, ThrowOnError, "fields">;
87
187
  /**
88
188
  * Delete an organization
89
189
  *
90
- * Hard delete and irreversible — linked users, entities, API keys and conversations become orphaned (not cascaded), and users scoped to this organization lose login access.
190
+ * Hard delete and irreversible. Linked users, entities, API keys and conversations are orphaned (not cascaded). Users scoped to this organization lose login access.
91
191
  */
92
- static delete<ThrowOnError extends boolean = false>(options: Options<Delete2Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Delete2Responses, Delete2Errors, ThrowOnError, "fields">;
192
+ static delete<ThrowOnError extends boolean = false>(options: Options<Delete4Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Delete4Responses, Delete4Errors, ThrowOnError, "fields">;
93
193
  /**
94
194
  * Get organization by ID
95
195
  *
96
- * Fetch a single organization by ID.
196
+ * Returns a single organization by ID.
97
197
  */
98
- static get<ThrowOnError extends boolean = false>(options: Options<Get3Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Get3Responses, Get3Errors, ThrowOnError, "fields">;
198
+ static get<ThrowOnError extends boolean = false>(options: Options<Get5Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Get5Responses, Get5Errors, ThrowOnError, "fields">;
99
199
  /**
100
200
  * Update an organization
101
201
  *
102
- * Partial update — only the fields present in the body are modified.
202
+ * Applies the provided fields to the organization. Only the fields present in the body are modified.
103
203
  */
104
- static update<ThrowOnError extends boolean = false>(options: Options<Update2Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Update2Responses, Update2Errors, ThrowOnError, "fields">;
204
+ static update<ThrowOnError extends boolean = false>(options: Options<Update4Data, ThrowOnError>): import("./client/types.gen.js").RequestResult<Update4Responses, Update4Errors, ThrowOnError, "fields">;
105
205
  }
106
206
  //# sourceMappingURL=sdk.gen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.gen.d.ts","sourceRoot":"","sources":["../../src/generated/sdk.gen.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,IAAI,QAAQ,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,eAAe,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,WAAW,EAAE,aAAa,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AAEppB,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,UAAU,GAAG,UAAU,EAAE,YAAY,SAAS,OAAO,GAAG,OAAO,EAAE,SAAS,GAAG,OAAO,IAAI,QAAQ,CAAC,KAAK,EAAE,YAAY,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