@operla-ai/sdk 1.0.0 → 1.1.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/generated/index.d.ts +2 -2
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +2 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/sdk.gen.d.ts +27 -7
- package/dist/generated/sdk.gen.d.ts.map +1 -1
- package/dist/generated/sdk.gen.js +44 -1
- package/dist/generated/sdk.gen.js.map +1 -1
- package/dist/generated/types.gen.d.ts +702 -29
- package/dist/generated/types.gen.d.ts.map +1 -1
- package/dist/index.d.ts +178 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -5915,6 +5915,679 @@ export type Update3Responses = {
|
|
|
5915
5915
|
};
|
|
5916
5916
|
export type Update3Response = Update3Responses[keyof Update3Responses];
|
|
5917
5917
|
export type List5Data = {
|
|
5918
|
+
body?: never;
|
|
5919
|
+
path?: never;
|
|
5920
|
+
query?: {
|
|
5921
|
+
/**
|
|
5922
|
+
* Max number of items to return per page (1-100).
|
|
5923
|
+
*/
|
|
5924
|
+
limit?: number;
|
|
5925
|
+
/**
|
|
5926
|
+
* Number of items to skip for pagination.
|
|
5927
|
+
*/
|
|
5928
|
+
offset?: number | null;
|
|
5929
|
+
/**
|
|
5930
|
+
* Filter by status. Defaults to `open`.
|
|
5931
|
+
*/
|
|
5932
|
+
status?: 'open' | 'resolved' | 'dismissed';
|
|
5933
|
+
/**
|
|
5934
|
+
* Filter by severity.
|
|
5935
|
+
*/
|
|
5936
|
+
severity?: 'high' | 'medium' | 'low';
|
|
5937
|
+
/**
|
|
5938
|
+
* Keep insights citing this review failure reason.
|
|
5939
|
+
*/
|
|
5940
|
+
reason?: 'ai_error' | 'context_issue' | 'config_issue';
|
|
5941
|
+
};
|
|
5942
|
+
url: '/insights';
|
|
5943
|
+
};
|
|
5944
|
+
export type List5Errors = {
|
|
5945
|
+
/**
|
|
5946
|
+
* Bad request
|
|
5947
|
+
*/
|
|
5948
|
+
400: {
|
|
5949
|
+
/**
|
|
5950
|
+
* HTTP status code, repeated in the body.
|
|
5951
|
+
*/
|
|
5952
|
+
statusCode: number;
|
|
5953
|
+
/**
|
|
5954
|
+
* Error details.
|
|
5955
|
+
*/
|
|
5956
|
+
error: {
|
|
5957
|
+
/**
|
|
5958
|
+
* Stable, machine-readable error code — branch on this, never on the message.
|
|
5959
|
+
*/
|
|
5960
|
+
code: 'MISSING-ORG' | 'VALIDATION' | 'INVALID-JSON';
|
|
5961
|
+
/**
|
|
5962
|
+
* Human-readable explanation. Wording may change; do not parse it.
|
|
5963
|
+
*/
|
|
5964
|
+
message: string;
|
|
5965
|
+
};
|
|
5966
|
+
};
|
|
5967
|
+
/**
|
|
5968
|
+
* Authentication required
|
|
5969
|
+
*/
|
|
5970
|
+
401: {
|
|
5971
|
+
/**
|
|
5972
|
+
* HTTP status code, repeated in the body.
|
|
5973
|
+
*/
|
|
5974
|
+
statusCode: number;
|
|
5975
|
+
/**
|
|
5976
|
+
* Error details.
|
|
5977
|
+
*/
|
|
5978
|
+
error: {
|
|
5979
|
+
/**
|
|
5980
|
+
* Stable, machine-readable error code — branch on this, never on the message.
|
|
5981
|
+
*/
|
|
5982
|
+
code: 'AUTH';
|
|
5983
|
+
/**
|
|
5984
|
+
* Human-readable explanation. Wording may change; do not parse it.
|
|
5985
|
+
*/
|
|
5986
|
+
message: string;
|
|
5987
|
+
};
|
|
5988
|
+
};
|
|
5989
|
+
/**
|
|
5990
|
+
* Insufficient permissions
|
|
5991
|
+
*/
|
|
5992
|
+
403: {
|
|
5993
|
+
/**
|
|
5994
|
+
* HTTP status code, repeated in the body.
|
|
5995
|
+
*/
|
|
5996
|
+
statusCode: number;
|
|
5997
|
+
/**
|
|
5998
|
+
* Error details.
|
|
5999
|
+
*/
|
|
6000
|
+
error: {
|
|
6001
|
+
/**
|
|
6002
|
+
* Stable, machine-readable error code — branch on this, never on the message.
|
|
6003
|
+
*/
|
|
6004
|
+
code: 'FORBIDDEN' | 'SCOPE-FORBIDDEN';
|
|
6005
|
+
/**
|
|
6006
|
+
* Human-readable explanation. Wording may change; do not parse it.
|
|
6007
|
+
*/
|
|
6008
|
+
message: string;
|
|
6009
|
+
};
|
|
6010
|
+
};
|
|
6011
|
+
};
|
|
6012
|
+
export type List5Error = List5Errors[keyof List5Errors];
|
|
6013
|
+
export type List5Responses = {
|
|
6014
|
+
/**
|
|
6015
|
+
* Successful response
|
|
6016
|
+
*/
|
|
6017
|
+
200: {
|
|
6018
|
+
/**
|
|
6019
|
+
* This page of insights — at most `limit` items, starting at `offset`.
|
|
6020
|
+
*/
|
|
6021
|
+
insights: Array<{
|
|
6022
|
+
/**
|
|
6023
|
+
* Insight ID (format: ins_xxxxxxxxxxxx).
|
|
6024
|
+
*/
|
|
6025
|
+
id: string;
|
|
6026
|
+
/**
|
|
6027
|
+
* Short AI-written title.
|
|
6028
|
+
*/
|
|
6029
|
+
title: string;
|
|
6030
|
+
/**
|
|
6031
|
+
* What the AI observed across the failures backing this insight.
|
|
6032
|
+
*/
|
|
6033
|
+
summary: string;
|
|
6034
|
+
/**
|
|
6035
|
+
* What the AI suggests changing (prompt, KB, config, …).
|
|
6036
|
+
*/
|
|
6037
|
+
recommendation: string;
|
|
6038
|
+
/**
|
|
6039
|
+
* Review failure reasons cited by the occurrences backing this insight.
|
|
6040
|
+
*/
|
|
6041
|
+
failureReasons: Array<'ai_error' | 'context_issue' | 'config_issue'>;
|
|
6042
|
+
/**
|
|
6043
|
+
* How much this hurts, as judged by the AI.
|
|
6044
|
+
*/
|
|
6045
|
+
severity: 'high' | 'medium' | 'low';
|
|
6046
|
+
/**
|
|
6047
|
+
* `open` until a human resolves (fixed) or dismisses (not worth acting on) it.
|
|
6048
|
+
*/
|
|
6049
|
+
status: 'open' | 'resolved' | 'dismissed';
|
|
6050
|
+
/**
|
|
6051
|
+
* Perimeter the insight applies to.
|
|
6052
|
+
*/
|
|
6053
|
+
scope: {
|
|
6054
|
+
/**
|
|
6055
|
+
* Cascade level the insight was raised at — `global`, `organization` or `entity`.
|
|
6056
|
+
*/
|
|
6057
|
+
level: 'global' | 'organization' | 'entity';
|
|
6058
|
+
/**
|
|
6059
|
+
* Organization the insight is scoped to; null at global scope.
|
|
6060
|
+
*/
|
|
6061
|
+
organization: {
|
|
6062
|
+
/**
|
|
6063
|
+
* Opaque id of the referenced doc.
|
|
6064
|
+
*/
|
|
6065
|
+
id: string;
|
|
6066
|
+
/**
|
|
6067
|
+
* Display name of the referenced doc, denormalized so no extra fetch is needed.
|
|
6068
|
+
*/
|
|
6069
|
+
name: string;
|
|
6070
|
+
} | null;
|
|
6071
|
+
/**
|
|
6072
|
+
* Entity the insight is scoped to; null unless `level` is `entity`.
|
|
6073
|
+
*/
|
|
6074
|
+
entity: {
|
|
6075
|
+
/**
|
|
6076
|
+
* Opaque id of the referenced doc.
|
|
6077
|
+
*/
|
|
6078
|
+
id: string;
|
|
6079
|
+
/**
|
|
6080
|
+
* Display name of the referenced doc, denormalized so no extra fetch is needed.
|
|
6081
|
+
*/
|
|
6082
|
+
name: string;
|
|
6083
|
+
} | null;
|
|
6084
|
+
};
|
|
6085
|
+
/**
|
|
6086
|
+
* Reviewed failures backing the insight, oldest first.
|
|
6087
|
+
*/
|
|
6088
|
+
occurrences: Array<{
|
|
6089
|
+
/**
|
|
6090
|
+
* Conversation the reviewed failure belongs to (format: `conv_xxxxxxxxxxxx`).
|
|
6091
|
+
*/
|
|
6092
|
+
conversationId: string;
|
|
6093
|
+
/**
|
|
6094
|
+
* Zero-based index of the AI turn that was reviewed inside that conversation.
|
|
6095
|
+
*/
|
|
6096
|
+
analysisIndex: number;
|
|
6097
|
+
/**
|
|
6098
|
+
* ISO timestamp of the human review.
|
|
6099
|
+
*/
|
|
6100
|
+
reviewedAt: string;
|
|
6101
|
+
}>;
|
|
6102
|
+
/**
|
|
6103
|
+
* ISO timestamp of the most recent occurrence.
|
|
6104
|
+
*/
|
|
6105
|
+
lastOccurrenceAt: string;
|
|
6106
|
+
/**
|
|
6107
|
+
* Derived at read time — `rising` (more occurrences in the last 14 days than the previous 14), `improving` (no new occurrence despite sustained review activity), `unknown` (quiet, but too little review activity to conclude), `stable` otherwise.
|
|
6108
|
+
*/
|
|
6109
|
+
trend: 'rising' | 'stable' | 'improving' | 'unknown';
|
|
6110
|
+
/**
|
|
6111
|
+
* ISO timestamp when the insight was first raised.
|
|
6112
|
+
*/
|
|
6113
|
+
createdAt: string;
|
|
6114
|
+
/**
|
|
6115
|
+
* ISO timestamp of the last update.
|
|
6116
|
+
*/
|
|
6117
|
+
updatedAt: string;
|
|
6118
|
+
/**
|
|
6119
|
+
* Who resolved or dismissed it — null while open, and null when the change came from an API key (no operator identity).
|
|
6120
|
+
*/
|
|
6121
|
+
resolvedBy: {
|
|
6122
|
+
/**
|
|
6123
|
+
* Dashboard user who changed the status.
|
|
6124
|
+
*/
|
|
6125
|
+
userId: string;
|
|
6126
|
+
/**
|
|
6127
|
+
* Their username.
|
|
6128
|
+
*/
|
|
6129
|
+
username: string;
|
|
6130
|
+
} | null;
|
|
6131
|
+
}>;
|
|
6132
|
+
/**
|
|
6133
|
+
* Total number of items matching the query.
|
|
6134
|
+
*/
|
|
6135
|
+
total: number;
|
|
6136
|
+
/**
|
|
6137
|
+
* Page size applied to this response.
|
|
6138
|
+
*/
|
|
6139
|
+
limit: number;
|
|
6140
|
+
/**
|
|
6141
|
+
* Offset applied to this response.
|
|
6142
|
+
*/
|
|
6143
|
+
offset: number;
|
|
6144
|
+
};
|
|
6145
|
+
};
|
|
6146
|
+
export type List5Response = List5Responses[keyof List5Responses];
|
|
6147
|
+
export type Get5Data = {
|
|
6148
|
+
body?: never;
|
|
6149
|
+
path: {
|
|
6150
|
+
/**
|
|
6151
|
+
* Insight ID (format: `ins_xxxxxxxxxxxx`).
|
|
6152
|
+
*/
|
|
6153
|
+
id: string;
|
|
6154
|
+
};
|
|
6155
|
+
query?: never;
|
|
6156
|
+
url: '/insights/{id}';
|
|
6157
|
+
};
|
|
6158
|
+
export type Get5Errors = {
|
|
6159
|
+
/**
|
|
6160
|
+
* Bad request
|
|
6161
|
+
*/
|
|
6162
|
+
400: {
|
|
6163
|
+
/**
|
|
6164
|
+
* HTTP status code, repeated in the body.
|
|
6165
|
+
*/
|
|
6166
|
+
statusCode: number;
|
|
6167
|
+
/**
|
|
6168
|
+
* Error details.
|
|
6169
|
+
*/
|
|
6170
|
+
error: {
|
|
6171
|
+
/**
|
|
6172
|
+
* Stable, machine-readable error code — branch on this, never on the message.
|
|
6173
|
+
*/
|
|
6174
|
+
code: 'MISSING-ORG';
|
|
6175
|
+
/**
|
|
6176
|
+
* Human-readable explanation. Wording may change; do not parse it.
|
|
6177
|
+
*/
|
|
6178
|
+
message: string;
|
|
6179
|
+
};
|
|
6180
|
+
};
|
|
6181
|
+
/**
|
|
6182
|
+
* Authentication required
|
|
6183
|
+
*/
|
|
6184
|
+
401: {
|
|
6185
|
+
/**
|
|
6186
|
+
* HTTP status code, repeated in the body.
|
|
6187
|
+
*/
|
|
6188
|
+
statusCode: number;
|
|
6189
|
+
/**
|
|
6190
|
+
* Error details.
|
|
6191
|
+
*/
|
|
6192
|
+
error: {
|
|
6193
|
+
/**
|
|
6194
|
+
* Stable, machine-readable error code — branch on this, never on the message.
|
|
6195
|
+
*/
|
|
6196
|
+
code: 'AUTH';
|
|
6197
|
+
/**
|
|
6198
|
+
* Human-readable explanation. Wording may change; do not parse it.
|
|
6199
|
+
*/
|
|
6200
|
+
message: string;
|
|
6201
|
+
};
|
|
6202
|
+
};
|
|
6203
|
+
/**
|
|
6204
|
+
* Insufficient permissions
|
|
6205
|
+
*/
|
|
6206
|
+
403: {
|
|
6207
|
+
/**
|
|
6208
|
+
* HTTP status code, repeated in the body.
|
|
6209
|
+
*/
|
|
6210
|
+
statusCode: number;
|
|
6211
|
+
/**
|
|
6212
|
+
* Error details.
|
|
6213
|
+
*/
|
|
6214
|
+
error: {
|
|
6215
|
+
/**
|
|
6216
|
+
* Stable, machine-readable error code — branch on this, never on the message.
|
|
6217
|
+
*/
|
|
6218
|
+
code: 'FORBIDDEN' | 'SCOPE-FORBIDDEN';
|
|
6219
|
+
/**
|
|
6220
|
+
* Human-readable explanation. Wording may change; do not parse it.
|
|
6221
|
+
*/
|
|
6222
|
+
message: string;
|
|
6223
|
+
};
|
|
6224
|
+
};
|
|
6225
|
+
/**
|
|
6226
|
+
* Insight does not exist.
|
|
6227
|
+
*/
|
|
6228
|
+
404: {
|
|
6229
|
+
/**
|
|
6230
|
+
* HTTP status code, repeated in the body.
|
|
6231
|
+
*/
|
|
6232
|
+
statusCode: number;
|
|
6233
|
+
/**
|
|
6234
|
+
* Error details.
|
|
6235
|
+
*/
|
|
6236
|
+
error: {
|
|
6237
|
+
/**
|
|
6238
|
+
* Stable, machine-readable error code — branch on this, never on the message.
|
|
6239
|
+
*/
|
|
6240
|
+
code: 'NOT-FOUND';
|
|
6241
|
+
/**
|
|
6242
|
+
* Human-readable explanation. Wording may change; do not parse it.
|
|
6243
|
+
*/
|
|
6244
|
+
message: string;
|
|
6245
|
+
};
|
|
6246
|
+
};
|
|
6247
|
+
};
|
|
6248
|
+
export type Get5Error = Get5Errors[keyof Get5Errors];
|
|
6249
|
+
export type Get5Responses = {
|
|
6250
|
+
/**
|
|
6251
|
+
* Successful response
|
|
6252
|
+
*/
|
|
6253
|
+
200: {
|
|
6254
|
+
/**
|
|
6255
|
+
* Insight ID (format: ins_xxxxxxxxxxxx).
|
|
6256
|
+
*/
|
|
6257
|
+
id: string;
|
|
6258
|
+
/**
|
|
6259
|
+
* Short AI-written title.
|
|
6260
|
+
*/
|
|
6261
|
+
title: string;
|
|
6262
|
+
/**
|
|
6263
|
+
* What the AI observed across the failures backing this insight.
|
|
6264
|
+
*/
|
|
6265
|
+
summary: string;
|
|
6266
|
+
/**
|
|
6267
|
+
* What the AI suggests changing (prompt, KB, config, …).
|
|
6268
|
+
*/
|
|
6269
|
+
recommendation: string;
|
|
6270
|
+
/**
|
|
6271
|
+
* Review failure reasons cited by the occurrences backing this insight.
|
|
6272
|
+
*/
|
|
6273
|
+
failureReasons: Array<'ai_error' | 'context_issue' | 'config_issue'>;
|
|
6274
|
+
/**
|
|
6275
|
+
* How much this hurts, as judged by the AI.
|
|
6276
|
+
*/
|
|
6277
|
+
severity: 'high' | 'medium' | 'low';
|
|
6278
|
+
/**
|
|
6279
|
+
* `open` until a human resolves (fixed) or dismisses (not worth acting on) it.
|
|
6280
|
+
*/
|
|
6281
|
+
status: 'open' | 'resolved' | 'dismissed';
|
|
6282
|
+
/**
|
|
6283
|
+
* Perimeter the insight applies to.
|
|
6284
|
+
*/
|
|
6285
|
+
scope: {
|
|
6286
|
+
/**
|
|
6287
|
+
* Cascade level the insight was raised at — `global`, `organization` or `entity`.
|
|
6288
|
+
*/
|
|
6289
|
+
level: 'global' | 'organization' | 'entity';
|
|
6290
|
+
/**
|
|
6291
|
+
* Organization the insight is scoped to; null at global scope.
|
|
6292
|
+
*/
|
|
6293
|
+
organization: {
|
|
6294
|
+
/**
|
|
6295
|
+
* Opaque id of the referenced doc.
|
|
6296
|
+
*/
|
|
6297
|
+
id: string;
|
|
6298
|
+
/**
|
|
6299
|
+
* Display name of the referenced doc, denormalized so no extra fetch is needed.
|
|
6300
|
+
*/
|
|
6301
|
+
name: string;
|
|
6302
|
+
} | null;
|
|
6303
|
+
/**
|
|
6304
|
+
* Entity the insight is scoped to; null unless `level` is `entity`.
|
|
6305
|
+
*/
|
|
6306
|
+
entity: {
|
|
6307
|
+
/**
|
|
6308
|
+
* Opaque id of the referenced doc.
|
|
6309
|
+
*/
|
|
6310
|
+
id: string;
|
|
6311
|
+
/**
|
|
6312
|
+
* Display name of the referenced doc, denormalized so no extra fetch is needed.
|
|
6313
|
+
*/
|
|
6314
|
+
name: string;
|
|
6315
|
+
} | null;
|
|
6316
|
+
};
|
|
6317
|
+
/**
|
|
6318
|
+
* Reviewed failures backing the insight, oldest first.
|
|
6319
|
+
*/
|
|
6320
|
+
occurrences: Array<{
|
|
6321
|
+
/**
|
|
6322
|
+
* Conversation the reviewed failure belongs to (format: `conv_xxxxxxxxxxxx`).
|
|
6323
|
+
*/
|
|
6324
|
+
conversationId: string;
|
|
6325
|
+
/**
|
|
6326
|
+
* Zero-based index of the AI turn that was reviewed inside that conversation.
|
|
6327
|
+
*/
|
|
6328
|
+
analysisIndex: number;
|
|
6329
|
+
/**
|
|
6330
|
+
* ISO timestamp of the human review.
|
|
6331
|
+
*/
|
|
6332
|
+
reviewedAt: string;
|
|
6333
|
+
}>;
|
|
6334
|
+
/**
|
|
6335
|
+
* ISO timestamp of the most recent occurrence.
|
|
6336
|
+
*/
|
|
6337
|
+
lastOccurrenceAt: string;
|
|
6338
|
+
/**
|
|
6339
|
+
* Derived at read time — `rising` (more occurrences in the last 14 days than the previous 14), `improving` (no new occurrence despite sustained review activity), `unknown` (quiet, but too little review activity to conclude), `stable` otherwise.
|
|
6340
|
+
*/
|
|
6341
|
+
trend: 'rising' | 'stable' | 'improving' | 'unknown';
|
|
6342
|
+
/**
|
|
6343
|
+
* ISO timestamp when the insight was first raised.
|
|
6344
|
+
*/
|
|
6345
|
+
createdAt: string;
|
|
6346
|
+
/**
|
|
6347
|
+
* ISO timestamp of the last update.
|
|
6348
|
+
*/
|
|
6349
|
+
updatedAt: string;
|
|
6350
|
+
/**
|
|
6351
|
+
* Who resolved or dismissed it — null while open, and null when the change came from an API key (no operator identity).
|
|
6352
|
+
*/
|
|
6353
|
+
resolvedBy: {
|
|
6354
|
+
/**
|
|
6355
|
+
* Dashboard user who changed the status.
|
|
6356
|
+
*/
|
|
6357
|
+
userId: string;
|
|
6358
|
+
/**
|
|
6359
|
+
* Their username.
|
|
6360
|
+
*/
|
|
6361
|
+
username: string;
|
|
6362
|
+
} | null;
|
|
6363
|
+
};
|
|
6364
|
+
};
|
|
6365
|
+
export type Get5Response = Get5Responses[keyof Get5Responses];
|
|
6366
|
+
export type UpdateStatusData = {
|
|
6367
|
+
body?: {
|
|
6368
|
+
/**
|
|
6369
|
+
* `resolved` once you acted on it, `dismissed` when it isn't worth acting on, `open` to put it back in the queue.
|
|
6370
|
+
*/
|
|
6371
|
+
status: 'open' | 'resolved' | 'dismissed';
|
|
6372
|
+
};
|
|
6373
|
+
path: {
|
|
6374
|
+
/**
|
|
6375
|
+
* Insight ID (format: `ins_xxxxxxxxxxxx`).
|
|
6376
|
+
*/
|
|
6377
|
+
id: string;
|
|
6378
|
+
};
|
|
6379
|
+
query?: never;
|
|
6380
|
+
url: '/insights/{id}/status';
|
|
6381
|
+
};
|
|
6382
|
+
export type UpdateStatusErrors = {
|
|
6383
|
+
/**
|
|
6384
|
+
* Bad request
|
|
6385
|
+
*/
|
|
6386
|
+
400: {
|
|
6387
|
+
/**
|
|
6388
|
+
* HTTP status code, repeated in the body.
|
|
6389
|
+
*/
|
|
6390
|
+
statusCode: number;
|
|
6391
|
+
/**
|
|
6392
|
+
* Error details.
|
|
6393
|
+
*/
|
|
6394
|
+
error: {
|
|
6395
|
+
/**
|
|
6396
|
+
* Stable, machine-readable error code — branch on this, never on the message.
|
|
6397
|
+
*/
|
|
6398
|
+
code: 'MISSING-ORG' | 'VALIDATION' | 'INVALID-JSON';
|
|
6399
|
+
/**
|
|
6400
|
+
* Human-readable explanation. Wording may change; do not parse it.
|
|
6401
|
+
*/
|
|
6402
|
+
message: string;
|
|
6403
|
+
};
|
|
6404
|
+
};
|
|
6405
|
+
/**
|
|
6406
|
+
* Authentication required
|
|
6407
|
+
*/
|
|
6408
|
+
401: {
|
|
6409
|
+
/**
|
|
6410
|
+
* HTTP status code, repeated in the body.
|
|
6411
|
+
*/
|
|
6412
|
+
statusCode: number;
|
|
6413
|
+
/**
|
|
6414
|
+
* Error details.
|
|
6415
|
+
*/
|
|
6416
|
+
error: {
|
|
6417
|
+
/**
|
|
6418
|
+
* Stable, machine-readable error code — branch on this, never on the message.
|
|
6419
|
+
*/
|
|
6420
|
+
code: 'AUTH';
|
|
6421
|
+
/**
|
|
6422
|
+
* Human-readable explanation. Wording may change; do not parse it.
|
|
6423
|
+
*/
|
|
6424
|
+
message: string;
|
|
6425
|
+
};
|
|
6426
|
+
};
|
|
6427
|
+
/**
|
|
6428
|
+
* Insufficient permissions
|
|
6429
|
+
*/
|
|
6430
|
+
403: {
|
|
6431
|
+
/**
|
|
6432
|
+
* HTTP status code, repeated in the body.
|
|
6433
|
+
*/
|
|
6434
|
+
statusCode: number;
|
|
6435
|
+
/**
|
|
6436
|
+
* Error details.
|
|
6437
|
+
*/
|
|
6438
|
+
error: {
|
|
6439
|
+
/**
|
|
6440
|
+
* Stable, machine-readable error code — branch on this, never on the message.
|
|
6441
|
+
*/
|
|
6442
|
+
code: 'FORBIDDEN' | 'SCOPE-FORBIDDEN';
|
|
6443
|
+
/**
|
|
6444
|
+
* Human-readable explanation. Wording may change; do not parse it.
|
|
6445
|
+
*/
|
|
6446
|
+
message: string;
|
|
6447
|
+
};
|
|
6448
|
+
};
|
|
6449
|
+
/**
|
|
6450
|
+
* Insight does not exist.
|
|
6451
|
+
*/
|
|
6452
|
+
404: {
|
|
6453
|
+
/**
|
|
6454
|
+
* HTTP status code, repeated in the body.
|
|
6455
|
+
*/
|
|
6456
|
+
statusCode: number;
|
|
6457
|
+
/**
|
|
6458
|
+
* Error details.
|
|
6459
|
+
*/
|
|
6460
|
+
error: {
|
|
6461
|
+
/**
|
|
6462
|
+
* Stable, machine-readable error code — branch on this, never on the message.
|
|
6463
|
+
*/
|
|
6464
|
+
code: 'NOT-FOUND';
|
|
6465
|
+
/**
|
|
6466
|
+
* Human-readable explanation. Wording may change; do not parse it.
|
|
6467
|
+
*/
|
|
6468
|
+
message: string;
|
|
6469
|
+
};
|
|
6470
|
+
};
|
|
6471
|
+
};
|
|
6472
|
+
export type UpdateStatusError = UpdateStatusErrors[keyof UpdateStatusErrors];
|
|
6473
|
+
export type UpdateStatusResponses = {
|
|
6474
|
+
/**
|
|
6475
|
+
* Successful response
|
|
6476
|
+
*/
|
|
6477
|
+
200: {
|
|
6478
|
+
/**
|
|
6479
|
+
* Insight ID (format: ins_xxxxxxxxxxxx).
|
|
6480
|
+
*/
|
|
6481
|
+
id: string;
|
|
6482
|
+
/**
|
|
6483
|
+
* Short AI-written title.
|
|
6484
|
+
*/
|
|
6485
|
+
title: string;
|
|
6486
|
+
/**
|
|
6487
|
+
* What the AI observed across the failures backing this insight.
|
|
6488
|
+
*/
|
|
6489
|
+
summary: string;
|
|
6490
|
+
/**
|
|
6491
|
+
* What the AI suggests changing (prompt, KB, config, …).
|
|
6492
|
+
*/
|
|
6493
|
+
recommendation: string;
|
|
6494
|
+
/**
|
|
6495
|
+
* Review failure reasons cited by the occurrences backing this insight.
|
|
6496
|
+
*/
|
|
6497
|
+
failureReasons: Array<'ai_error' | 'context_issue' | 'config_issue'>;
|
|
6498
|
+
/**
|
|
6499
|
+
* How much this hurts, as judged by the AI.
|
|
6500
|
+
*/
|
|
6501
|
+
severity: 'high' | 'medium' | 'low';
|
|
6502
|
+
/**
|
|
6503
|
+
* `open` until a human resolves (fixed) or dismisses (not worth acting on) it.
|
|
6504
|
+
*/
|
|
6505
|
+
status: 'open' | 'resolved' | 'dismissed';
|
|
6506
|
+
/**
|
|
6507
|
+
* Perimeter the insight applies to.
|
|
6508
|
+
*/
|
|
6509
|
+
scope: {
|
|
6510
|
+
/**
|
|
6511
|
+
* Cascade level the insight was raised at — `global`, `organization` or `entity`.
|
|
6512
|
+
*/
|
|
6513
|
+
level: 'global' | 'organization' | 'entity';
|
|
6514
|
+
/**
|
|
6515
|
+
* Organization the insight is scoped to; null at global scope.
|
|
6516
|
+
*/
|
|
6517
|
+
organization: {
|
|
6518
|
+
/**
|
|
6519
|
+
* Opaque id of the referenced doc.
|
|
6520
|
+
*/
|
|
6521
|
+
id: string;
|
|
6522
|
+
/**
|
|
6523
|
+
* Display name of the referenced doc, denormalized so no extra fetch is needed.
|
|
6524
|
+
*/
|
|
6525
|
+
name: string;
|
|
6526
|
+
} | null;
|
|
6527
|
+
/**
|
|
6528
|
+
* Entity the insight is scoped to; null unless `level` is `entity`.
|
|
6529
|
+
*/
|
|
6530
|
+
entity: {
|
|
6531
|
+
/**
|
|
6532
|
+
* Opaque id of the referenced doc.
|
|
6533
|
+
*/
|
|
6534
|
+
id: string;
|
|
6535
|
+
/**
|
|
6536
|
+
* Display name of the referenced doc, denormalized so no extra fetch is needed.
|
|
6537
|
+
*/
|
|
6538
|
+
name: string;
|
|
6539
|
+
} | null;
|
|
6540
|
+
};
|
|
6541
|
+
/**
|
|
6542
|
+
* Reviewed failures backing the insight, oldest first.
|
|
6543
|
+
*/
|
|
6544
|
+
occurrences: Array<{
|
|
6545
|
+
/**
|
|
6546
|
+
* Conversation the reviewed failure belongs to (format: `conv_xxxxxxxxxxxx`).
|
|
6547
|
+
*/
|
|
6548
|
+
conversationId: string;
|
|
6549
|
+
/**
|
|
6550
|
+
* Zero-based index of the AI turn that was reviewed inside that conversation.
|
|
6551
|
+
*/
|
|
6552
|
+
analysisIndex: number;
|
|
6553
|
+
/**
|
|
6554
|
+
* ISO timestamp of the human review.
|
|
6555
|
+
*/
|
|
6556
|
+
reviewedAt: string;
|
|
6557
|
+
}>;
|
|
6558
|
+
/**
|
|
6559
|
+
* ISO timestamp of the most recent occurrence.
|
|
6560
|
+
*/
|
|
6561
|
+
lastOccurrenceAt: string;
|
|
6562
|
+
/**
|
|
6563
|
+
* Derived at read time — `rising` (more occurrences in the last 14 days than the previous 14), `improving` (no new occurrence despite sustained review activity), `unknown` (quiet, but too little review activity to conclude), `stable` otherwise.
|
|
6564
|
+
*/
|
|
6565
|
+
trend: 'rising' | 'stable' | 'improving' | 'unknown';
|
|
6566
|
+
/**
|
|
6567
|
+
* ISO timestamp when the insight was first raised.
|
|
6568
|
+
*/
|
|
6569
|
+
createdAt: string;
|
|
6570
|
+
/**
|
|
6571
|
+
* ISO timestamp of the last update.
|
|
6572
|
+
*/
|
|
6573
|
+
updatedAt: string;
|
|
6574
|
+
/**
|
|
6575
|
+
* Who resolved or dismissed it — null while open, and null when the change came from an API key (no operator identity).
|
|
6576
|
+
*/
|
|
6577
|
+
resolvedBy: {
|
|
6578
|
+
/**
|
|
6579
|
+
* Dashboard user who changed the status.
|
|
6580
|
+
*/
|
|
6581
|
+
userId: string;
|
|
6582
|
+
/**
|
|
6583
|
+
* Their username.
|
|
6584
|
+
*/
|
|
6585
|
+
username: string;
|
|
6586
|
+
} | null;
|
|
6587
|
+
};
|
|
6588
|
+
};
|
|
6589
|
+
export type UpdateStatusResponse = UpdateStatusResponses[keyof UpdateStatusResponses];
|
|
6590
|
+
export type List6Data = {
|
|
5918
6591
|
body?: never;
|
|
5919
6592
|
path?: never;
|
|
5920
6593
|
query?: {
|
|
@@ -5925,7 +6598,7 @@ export type List5Data = {
|
|
|
5925
6598
|
};
|
|
5926
6599
|
url: '/intents';
|
|
5927
6600
|
};
|
|
5928
|
-
export type
|
|
6601
|
+
export type List6Errors = {
|
|
5929
6602
|
/**
|
|
5930
6603
|
* Bad request
|
|
5931
6604
|
*/
|
|
@@ -5993,8 +6666,8 @@ export type List5Errors = {
|
|
|
5993
6666
|
};
|
|
5994
6667
|
};
|
|
5995
6668
|
};
|
|
5996
|
-
export type
|
|
5997
|
-
export type
|
|
6669
|
+
export type List6Error = List6Errors[keyof List6Errors];
|
|
6670
|
+
export type List6Responses = {
|
|
5998
6671
|
/**
|
|
5999
6672
|
* Successful response
|
|
6000
6673
|
*/
|
|
@@ -6060,7 +6733,7 @@ export type List5Responses = {
|
|
|
6060
6733
|
}>;
|
|
6061
6734
|
};
|
|
6062
6735
|
};
|
|
6063
|
-
export type
|
|
6736
|
+
export type List6Response = List6Responses[keyof List6Responses];
|
|
6064
6737
|
export type Create5Data = {
|
|
6065
6738
|
body?: {
|
|
6066
6739
|
/**
|
|
@@ -6324,7 +6997,7 @@ export type Delete5Responses = {
|
|
|
6324
6997
|
};
|
|
6325
6998
|
};
|
|
6326
6999
|
export type Delete5Response = Delete5Responses[keyof Delete5Responses];
|
|
6327
|
-
export type
|
|
7000
|
+
export type Get6Data = {
|
|
6328
7001
|
body?: never;
|
|
6329
7002
|
path: {
|
|
6330
7003
|
/**
|
|
@@ -6340,7 +7013,7 @@ export type Get5Data = {
|
|
|
6340
7013
|
};
|
|
6341
7014
|
url: '/intents/{type}';
|
|
6342
7015
|
};
|
|
6343
|
-
export type
|
|
7016
|
+
export type Get6Errors = {
|
|
6344
7017
|
/**
|
|
6345
7018
|
* Bad request
|
|
6346
7019
|
*/
|
|
@@ -6408,8 +7081,8 @@ export type Get5Errors = {
|
|
|
6408
7081
|
};
|
|
6409
7082
|
};
|
|
6410
7083
|
};
|
|
6411
|
-
export type
|
|
6412
|
-
export type
|
|
7084
|
+
export type Get6Error = Get6Errors[keyof Get6Errors];
|
|
7085
|
+
export type Get6Responses = {
|
|
6413
7086
|
/**
|
|
6414
7087
|
* Successful response
|
|
6415
7088
|
*/
|
|
@@ -6470,7 +7143,7 @@ export type Get5Responses = {
|
|
|
6470
7143
|
};
|
|
6471
7144
|
};
|
|
6472
7145
|
};
|
|
6473
|
-
export type
|
|
7146
|
+
export type Get6Response = Get6Responses[keyof Get6Responses];
|
|
6474
7147
|
export type Update4Data = {
|
|
6475
7148
|
body?: {
|
|
6476
7149
|
/**
|
|
@@ -6745,7 +7418,7 @@ export type DeleteOverride3Responses = {
|
|
|
6745
7418
|
};
|
|
6746
7419
|
};
|
|
6747
7420
|
export type DeleteOverride3Response = DeleteOverride3Responses[keyof DeleteOverride3Responses];
|
|
6748
|
-
export type
|
|
7421
|
+
export type List7Data = {
|
|
6749
7422
|
body?: never;
|
|
6750
7423
|
path?: never;
|
|
6751
7424
|
query?: {
|
|
@@ -6764,7 +7437,7 @@ export type List6Data = {
|
|
|
6764
7437
|
};
|
|
6765
7438
|
url: '/kb';
|
|
6766
7439
|
};
|
|
6767
|
-
export type
|
|
7440
|
+
export type List7Errors = {
|
|
6768
7441
|
/**
|
|
6769
7442
|
* Bad request
|
|
6770
7443
|
*/
|
|
@@ -6832,8 +7505,8 @@ export type List6Errors = {
|
|
|
6832
7505
|
};
|
|
6833
7506
|
};
|
|
6834
7507
|
};
|
|
6835
|
-
export type
|
|
6836
|
-
export type
|
|
7508
|
+
export type List7Error = List7Errors[keyof List7Errors];
|
|
7509
|
+
export type List7Responses = {
|
|
6837
7510
|
/**
|
|
6838
7511
|
* Successful response
|
|
6839
7512
|
*/
|
|
@@ -6902,7 +7575,7 @@ export type List6Responses = {
|
|
|
6902
7575
|
offset: number;
|
|
6903
7576
|
};
|
|
6904
7577
|
};
|
|
6905
|
-
export type
|
|
7578
|
+
export type List7Response = List7Responses[keyof List7Responses];
|
|
6906
7579
|
export type Create6Data = {
|
|
6907
7580
|
body?: {
|
|
6908
7581
|
/**
|
|
@@ -7179,7 +7852,7 @@ export type Delete6Responses = {
|
|
|
7179
7852
|
};
|
|
7180
7853
|
};
|
|
7181
7854
|
export type Delete6Response = Delete6Responses[keyof Delete6Responses];
|
|
7182
|
-
export type
|
|
7855
|
+
export type Get7Data = {
|
|
7183
7856
|
body?: never;
|
|
7184
7857
|
path: {
|
|
7185
7858
|
/**
|
|
@@ -7190,7 +7863,7 @@ export type Get6Data = {
|
|
|
7190
7863
|
query?: never;
|
|
7191
7864
|
url: '/kb/{id}';
|
|
7192
7865
|
};
|
|
7193
|
-
export type
|
|
7866
|
+
export type Get7Errors = {
|
|
7194
7867
|
/**
|
|
7195
7868
|
* Bad request
|
|
7196
7869
|
*/
|
|
@@ -7258,8 +7931,8 @@ export type Get6Errors = {
|
|
|
7258
7931
|
};
|
|
7259
7932
|
};
|
|
7260
7933
|
};
|
|
7261
|
-
export type
|
|
7262
|
-
export type
|
|
7934
|
+
export type Get7Error = Get7Errors[keyof Get7Errors];
|
|
7935
|
+
export type Get7Responses = {
|
|
7263
7936
|
/**
|
|
7264
7937
|
* Successful response
|
|
7265
7938
|
*/
|
|
@@ -7349,7 +8022,7 @@ export type Get6Responses = {
|
|
|
7349
8022
|
updatedAt: string;
|
|
7350
8023
|
};
|
|
7351
8024
|
};
|
|
7352
|
-
export type
|
|
8025
|
+
export type Get7Response = Get7Responses[keyof Get7Responses];
|
|
7353
8026
|
export type Update5Data = {
|
|
7354
8027
|
body?: {
|
|
7355
8028
|
/**
|
|
@@ -8240,7 +8913,7 @@ export type Rollback2Responses = {
|
|
|
8240
8913
|
};
|
|
8241
8914
|
};
|
|
8242
8915
|
export type Rollback2Response = Rollback2Responses[keyof Rollback2Responses];
|
|
8243
|
-
export type
|
|
8916
|
+
export type List8Data = {
|
|
8244
8917
|
body?: never;
|
|
8245
8918
|
path?: never;
|
|
8246
8919
|
query?: {
|
|
@@ -8259,7 +8932,7 @@ export type List7Data = {
|
|
|
8259
8932
|
};
|
|
8260
8933
|
url: '/organizations';
|
|
8261
8934
|
};
|
|
8262
|
-
export type
|
|
8935
|
+
export type List8Errors = {
|
|
8263
8936
|
/**
|
|
8264
8937
|
* Bad request
|
|
8265
8938
|
*/
|
|
@@ -8327,8 +9000,8 @@ export type List7Errors = {
|
|
|
8327
9000
|
};
|
|
8328
9001
|
};
|
|
8329
9002
|
};
|
|
8330
|
-
export type
|
|
8331
|
-
export type
|
|
9003
|
+
export type List8Error = List8Errors[keyof List8Errors];
|
|
9004
|
+
export type List8Responses = {
|
|
8332
9005
|
/**
|
|
8333
9006
|
* Successful response
|
|
8334
9007
|
*/
|
|
@@ -8368,7 +9041,7 @@ export type List7Responses = {
|
|
|
8368
9041
|
offset: number;
|
|
8369
9042
|
};
|
|
8370
9043
|
};
|
|
8371
|
-
export type
|
|
9044
|
+
export type List8Response = List8Responses[keyof List8Responses];
|
|
8372
9045
|
export type Create7Data = {
|
|
8373
9046
|
body?: {
|
|
8374
9047
|
/**
|
|
@@ -8590,7 +9263,7 @@ export type Delete7Responses = {
|
|
|
8590
9263
|
};
|
|
8591
9264
|
};
|
|
8592
9265
|
export type Delete7Response = Delete7Responses[keyof Delete7Responses];
|
|
8593
|
-
export type
|
|
9266
|
+
export type Get8Data = {
|
|
8594
9267
|
body?: never;
|
|
8595
9268
|
path: {
|
|
8596
9269
|
/**
|
|
@@ -8601,7 +9274,7 @@ export type Get7Data = {
|
|
|
8601
9274
|
query?: never;
|
|
8602
9275
|
url: '/organizations/{id}';
|
|
8603
9276
|
};
|
|
8604
|
-
export type
|
|
9277
|
+
export type Get8Errors = {
|
|
8605
9278
|
/**
|
|
8606
9279
|
* Bad request
|
|
8607
9280
|
*/
|
|
@@ -8669,8 +9342,8 @@ export type Get7Errors = {
|
|
|
8669
9342
|
};
|
|
8670
9343
|
};
|
|
8671
9344
|
};
|
|
8672
|
-
export type
|
|
8673
|
-
export type
|
|
9345
|
+
export type Get8Error = Get8Errors[keyof Get8Errors];
|
|
9346
|
+
export type Get8Responses = {
|
|
8674
9347
|
/**
|
|
8675
9348
|
* Successful response
|
|
8676
9349
|
*/
|
|
@@ -8699,7 +9372,7 @@ export type Get7Responses = {
|
|
|
8699
9372
|
};
|
|
8700
9373
|
};
|
|
8701
9374
|
};
|
|
8702
|
-
export type
|
|
9375
|
+
export type Get8Response = Get8Responses[keyof Get8Responses];
|
|
8703
9376
|
export type Update6Data = {
|
|
8704
9377
|
body?: {
|
|
8705
9378
|
/**
|