@limai.io/cli 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +46 -40
- package/dist/index.d.ts +367 -7
- package/dist/index.js +9 -9
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -12,8 +12,12 @@ declare class HttpClient {
|
|
|
12
12
|
private getRetryDelay;
|
|
13
13
|
private request;
|
|
14
14
|
get<T>(apiPath: string, params?: Record<string, string | undefined>, timeoutMs?: number): Promise<T>;
|
|
15
|
-
post<T>(apiPath: string, body?: unknown, timeoutMs?: number
|
|
16
|
-
|
|
15
|
+
post<T>(apiPath: string, body?: unknown, timeoutMs?: number, opts?: {
|
|
16
|
+
retry?: boolean;
|
|
17
|
+
}): Promise<T>;
|
|
18
|
+
patch<T>(apiPath: string, body?: unknown, opts?: {
|
|
19
|
+
retry?: boolean;
|
|
20
|
+
}): Promise<T>;
|
|
17
21
|
del<T>(apiPath: string, body?: unknown): Promise<T>;
|
|
18
22
|
putRaw(url: string, body: Uint8Array | Buffer | Blob, contentType: string, onProgress?: (uploaded: number, total: number) => void): Promise<void>;
|
|
19
23
|
putFile(url: string, filePath: string, contentType: string, onProgress?: (uploaded: number, total: number) => void): Promise<number>;
|
|
@@ -85,6 +89,7 @@ type FileValidationCheck = {
|
|
|
85
89
|
completedAt: string | null;
|
|
86
90
|
};
|
|
87
91
|
type FileValidations = {
|
|
92
|
+
status: "pending" | "passed" | "failed" | "error" | null;
|
|
88
93
|
failCount: number | null;
|
|
89
94
|
checks: FileValidationCheck[];
|
|
90
95
|
rules: {
|
|
@@ -113,13 +118,68 @@ type Row = {
|
|
|
113
118
|
cells: Record<string, CellValue>;
|
|
114
119
|
childTables?: Record<string, TableData>;
|
|
115
120
|
};
|
|
121
|
+
type ColumnLabel = {
|
|
122
|
+
id: string;
|
|
123
|
+
name: string;
|
|
124
|
+
color: string;
|
|
125
|
+
};
|
|
126
|
+
type ColumnUnit = {
|
|
127
|
+
id: string;
|
|
128
|
+
name: string;
|
|
129
|
+
};
|
|
116
130
|
type Column = {
|
|
117
131
|
id: string;
|
|
118
132
|
name: string;
|
|
119
133
|
slug?: string | null;
|
|
120
134
|
type: string;
|
|
121
|
-
description?: string;
|
|
135
|
+
description?: string | null;
|
|
122
136
|
sharedColumnId?: string;
|
|
137
|
+
isKey?: boolean;
|
|
138
|
+
isList?: boolean;
|
|
139
|
+
dateFormat?: string | null;
|
|
140
|
+
measurementType?: string;
|
|
141
|
+
excludedFromExtraction?: boolean;
|
|
142
|
+
defaultValue?: unknown;
|
|
143
|
+
defaultValueEnabled?: boolean;
|
|
144
|
+
autoGenerateLabels?: boolean;
|
|
145
|
+
autoGenerateUnits?: boolean;
|
|
146
|
+
pinned?: boolean;
|
|
147
|
+
size?: number;
|
|
148
|
+
sharedId?: string | null;
|
|
149
|
+
index?: number;
|
|
150
|
+
tableId?: string;
|
|
151
|
+
labels?: ColumnLabel[];
|
|
152
|
+
units?: ColumnUnit[];
|
|
153
|
+
createdAt?: string;
|
|
154
|
+
updatedAt?: string;
|
|
155
|
+
};
|
|
156
|
+
type ColumnInput = {
|
|
157
|
+
name: string;
|
|
158
|
+
slug?: string;
|
|
159
|
+
type?: string;
|
|
160
|
+
description?: string | null;
|
|
161
|
+
isKey?: boolean;
|
|
162
|
+
isList?: boolean;
|
|
163
|
+
dateFormat?: string;
|
|
164
|
+
measurementType?: string;
|
|
165
|
+
excludedFromExtraction?: boolean;
|
|
166
|
+
pinned?: boolean;
|
|
167
|
+
size?: number;
|
|
168
|
+
defaultValue?: unknown;
|
|
169
|
+
defaultValueEnabled?: boolean;
|
|
170
|
+
autoGenerateLabels?: boolean;
|
|
171
|
+
autoGenerateUnits?: boolean;
|
|
172
|
+
labels?: Array<{
|
|
173
|
+
name: string;
|
|
174
|
+
color?: string;
|
|
175
|
+
}>;
|
|
176
|
+
units?: Array<{
|
|
177
|
+
name: string;
|
|
178
|
+
}>;
|
|
179
|
+
};
|
|
180
|
+
type ColumnUpdateInput = Partial<Omit<ColumnInput, "name">> & {
|
|
181
|
+
name?: string;
|
|
182
|
+
confirmSlugChange?: boolean;
|
|
123
183
|
};
|
|
124
184
|
type TableData = {
|
|
125
185
|
id: string;
|
|
@@ -188,6 +248,7 @@ type FlatRow = {
|
|
|
188
248
|
$index: string;
|
|
189
249
|
} & Record<string, unknown>;
|
|
190
250
|
type FlatFileValidations = {
|
|
251
|
+
status: "pending" | "passed" | "failed" | "error" | null;
|
|
191
252
|
failCount: number | null;
|
|
192
253
|
checks: {
|
|
193
254
|
key: string;
|
|
@@ -256,6 +317,7 @@ type DeploymentConfig = {
|
|
|
256
317
|
temperature?: number;
|
|
257
318
|
instructions?: string;
|
|
258
319
|
bigTableExtraction?: string;
|
|
320
|
+
useDynamicMapping?: boolean;
|
|
259
321
|
bboxTier?: "OFF" | "FAST" | "BALANCED" | "PRO";
|
|
260
322
|
enableConfidenceScore?: boolean;
|
|
261
323
|
enableLLMConfidence?: boolean;
|
|
@@ -372,6 +434,7 @@ type ExtractionSchema = {
|
|
|
372
434
|
instructions?: string;
|
|
373
435
|
temperature?: number;
|
|
374
436
|
bigTableExtraction?: string;
|
|
437
|
+
useDynamicMapping?: boolean;
|
|
375
438
|
bboxTier?: "OFF" | "FAST" | "BALANCED" | "PRO";
|
|
376
439
|
enableConfidenceScore?: boolean;
|
|
377
440
|
};
|
|
@@ -507,10 +570,12 @@ type AgentSkill = {
|
|
|
507
570
|
updatedAt: string;
|
|
508
571
|
linkedFiles?: AgentSkillLinkedFile[];
|
|
509
572
|
};
|
|
573
|
+
type AgentRole = "GENERAL" | "VALIDATOR";
|
|
510
574
|
type Agent = {
|
|
511
575
|
id: string;
|
|
512
576
|
name: string;
|
|
513
577
|
status: AgentStatus;
|
|
578
|
+
role?: AgentRole;
|
|
514
579
|
tier?: "STANDARD" | "STANDARD_PLUS" | "MAX";
|
|
515
580
|
processContent: string;
|
|
516
581
|
triggerTypes: AgentTriggerType[];
|
|
@@ -576,6 +641,45 @@ type AgentRunConversation = {
|
|
|
576
641
|
unavailable?: boolean;
|
|
577
642
|
source?: "s3" | "sandbox" | "unavailable";
|
|
578
643
|
};
|
|
644
|
+
type AgentRunInferenceLog = {
|
|
645
|
+
id: string;
|
|
646
|
+
createdAt: string;
|
|
647
|
+
processingLogId: string | null;
|
|
648
|
+
serviceType: string | null;
|
|
649
|
+
callType: string;
|
|
650
|
+
model: string;
|
|
651
|
+
temperature: number | null;
|
|
652
|
+
stepNumber: number | null;
|
|
653
|
+
attemptNumber: number | null;
|
|
654
|
+
tableName: string | null;
|
|
655
|
+
durationMs: number;
|
|
656
|
+
inputTokens: number | null;
|
|
657
|
+
outputTokens: number | null;
|
|
658
|
+
cachedInputTokens: number | null;
|
|
659
|
+
reasoningTokens: number | null;
|
|
660
|
+
status: string;
|
|
661
|
+
errorMessage: string | null;
|
|
662
|
+
files: Array<{
|
|
663
|
+
filename: string;
|
|
664
|
+
mediaType: string;
|
|
665
|
+
role?: string;
|
|
666
|
+
}>;
|
|
667
|
+
};
|
|
668
|
+
type AgentRunInferenceLogSummary = {
|
|
669
|
+
totalCalls: number;
|
|
670
|
+
successCount: number;
|
|
671
|
+
errorCount: number;
|
|
672
|
+
totalInputTokens: number;
|
|
673
|
+
totalOutputTokens: number;
|
|
674
|
+
totalDurationMs: number;
|
|
675
|
+
};
|
|
676
|
+
type AgentRunInferenceLogs = {
|
|
677
|
+
runId: string;
|
|
678
|
+
data: AgentRunInferenceLog[];
|
|
679
|
+
summary: AgentRunInferenceLogSummary;
|
|
680
|
+
truncated: boolean;
|
|
681
|
+
redactions: Record<string, number>;
|
|
682
|
+
};
|
|
579
683
|
|
|
580
684
|
declare class QueueResource {
|
|
581
685
|
private http;
|
|
@@ -618,6 +722,11 @@ type CreateProjectBody = {
|
|
|
618
722
|
teamId?: string;
|
|
619
723
|
icon?: string;
|
|
620
724
|
};
|
|
725
|
+
type DeleteProjectResponse = {
|
|
726
|
+
success: boolean;
|
|
727
|
+
id: string;
|
|
728
|
+
name: string;
|
|
729
|
+
};
|
|
621
730
|
type NotificationChannelType = "SLACK" | "TEAMS_CHANNEL" | "TEAMS_CHAT" | "EMAIL_ADDRESS";
|
|
622
731
|
type NotificationIntegrationProvider = "SLACK" | "TEAMS" | "SHAREPOINT" | "GOOGLE_DRIVE";
|
|
623
732
|
type NotificationRoute = {
|
|
@@ -679,7 +788,7 @@ declare class ProjectsResource {
|
|
|
679
788
|
constructor(http: HttpClient);
|
|
680
789
|
list(): Promise<Project[]>;
|
|
681
790
|
create(body: CreateProjectBody): Promise<Project>;
|
|
682
|
-
|
|
791
|
+
delete(projectId: string): Promise<DeleteProjectResponse>;
|
|
683
792
|
getSharedColumnIds(projectId: string): Promise<unknown>;
|
|
684
793
|
listDeployments(projectId: string): Promise<unknown>;
|
|
685
794
|
listBenchmarks(projectId: string): Promise<unknown>;
|
|
@@ -741,6 +850,17 @@ declare class TablesResource {
|
|
|
741
850
|
}): Promise<Table>;
|
|
742
851
|
}
|
|
743
852
|
|
|
853
|
+
declare class ColumnsResource {
|
|
854
|
+
private http;
|
|
855
|
+
constructor(http: HttpClient);
|
|
856
|
+
list(tableId: string): Promise<Column[]>;
|
|
857
|
+
get(columnId: string): Promise<Column>;
|
|
858
|
+
create(tableId: string, body: ColumnInput | {
|
|
859
|
+
columns: ColumnInput[];
|
|
860
|
+
}): Promise<Column[]>;
|
|
861
|
+
update(columnId: string, body: ColumnUpdateInput): Promise<Column>;
|
|
862
|
+
}
|
|
863
|
+
|
|
744
864
|
type OffsetFetcher<T> = (limit: number, offset: number) => Promise<{
|
|
745
865
|
data: T[];
|
|
746
866
|
pagination: {
|
|
@@ -786,10 +906,38 @@ declare class ExtractionsResource {
|
|
|
786
906
|
}): Promise<ExtractionRow[]>;
|
|
787
907
|
}
|
|
788
908
|
|
|
909
|
+
type ClassifierRouteProject = {
|
|
910
|
+
id: string;
|
|
911
|
+
name: string;
|
|
912
|
+
};
|
|
913
|
+
type ClassifierDeploymentRoute = {
|
|
914
|
+
id: string;
|
|
915
|
+
name: string;
|
|
916
|
+
description: string;
|
|
917
|
+
deploymentId: string;
|
|
918
|
+
deployment?: {
|
|
919
|
+
id: string;
|
|
920
|
+
name: string;
|
|
921
|
+
type: string;
|
|
922
|
+
projectId: string;
|
|
923
|
+
project?: ClassifierRouteProject;
|
|
924
|
+
};
|
|
925
|
+
};
|
|
926
|
+
type ClassifierSummary = {
|
|
927
|
+
id: string;
|
|
928
|
+
name: string;
|
|
929
|
+
projectId: string | null;
|
|
930
|
+
isGlobal?: boolean;
|
|
931
|
+
routeProjects?: ClassifierRouteProject[];
|
|
932
|
+
deploymentRoutes?: ClassifierDeploymentRoute[];
|
|
933
|
+
classificationCount?: number;
|
|
934
|
+
createdAt: string;
|
|
935
|
+
updatedAt: string;
|
|
936
|
+
};
|
|
789
937
|
declare class ClassifyResource {
|
|
790
938
|
private http;
|
|
791
939
|
constructor(http: HttpClient);
|
|
792
|
-
list(projectId: string): Promise<
|
|
940
|
+
list(projectId: string): Promise<ClassifierSummary[]>;
|
|
793
941
|
getUploadUrl(classifierId: string, filename: string): Promise<GetUrlResponse>;
|
|
794
942
|
classify(classifierId: string, fileId: string): Promise<ClassificationResult>;
|
|
795
943
|
classifyAsync(classifierId: string, fileId: string): Promise<ClassificationAsyncResponse>;
|
|
@@ -829,7 +977,7 @@ declare class SchemaResource {
|
|
|
829
977
|
private http;
|
|
830
978
|
constructor(http: HttpClient);
|
|
831
979
|
get(extractionSchemaId: string): Promise<ExtractionSchema>;
|
|
832
|
-
update(extractionSchemaId: string, body: Partial<DeploymentConfig>): Promise<
|
|
980
|
+
update(extractionSchemaId: string, body: Partial<DeploymentConfig>): Promise<DeploymentConfig>;
|
|
833
981
|
getAllData(extractionSchemaId: string): Promise<unknown>;
|
|
834
982
|
}
|
|
835
983
|
|
|
@@ -871,6 +1019,8 @@ declare class AgentsResource {
|
|
|
871
1019
|
enabled?: boolean;
|
|
872
1020
|
config?: Record<string, unknown>;
|
|
873
1021
|
}>;
|
|
1022
|
+
tier?: string;
|
|
1023
|
+
role?: string;
|
|
874
1024
|
emailLocalPart?: string;
|
|
875
1025
|
}): Promise<AgentDetail>;
|
|
876
1026
|
update(projectId: string, agentId: string, body: {
|
|
@@ -887,6 +1037,7 @@ declare class AgentsResource {
|
|
|
887
1037
|
}>;
|
|
888
1038
|
status?: string;
|
|
889
1039
|
tier?: string;
|
|
1040
|
+
role?: string;
|
|
890
1041
|
emailLocalPart?: string;
|
|
891
1042
|
}): Promise<Agent>;
|
|
892
1043
|
delete(projectId: string, agentId: string): Promise<void>;
|
|
@@ -932,6 +1083,10 @@ declare class AgentsResource {
|
|
|
932
1083
|
getRunConversation(projectId: string, agentId: string, runId: string, opts?: {
|
|
933
1084
|
stepId?: string;
|
|
934
1085
|
}): Promise<AgentRunConversation>;
|
|
1086
|
+
getRunInferenceLogs(projectId: string, agentId: string, runId: string, opts?: {
|
|
1087
|
+
limit?: number;
|
|
1088
|
+
status?: string;
|
|
1089
|
+
}): Promise<AgentRunInferenceLogs>;
|
|
935
1090
|
createRun(projectId: string, agentId: string, body: {
|
|
936
1091
|
triggerEventId: string;
|
|
937
1092
|
triggerType: string;
|
|
@@ -1097,6 +1252,38 @@ declare class VisionResource {
|
|
|
1097
1252
|
ask(projectId: string, body: VisionAskBody): Promise<VisionAskResponse>;
|
|
1098
1253
|
}
|
|
1099
1254
|
|
|
1255
|
+
type ValidationScript = {
|
|
1256
|
+
id: string;
|
|
1257
|
+
extractionSchemaId: string;
|
|
1258
|
+
key: string;
|
|
1259
|
+
name: string;
|
|
1260
|
+
description: string | null;
|
|
1261
|
+
behavior: "SURFACE" | "RESEND";
|
|
1262
|
+
s3Key: string;
|
|
1263
|
+
version: number;
|
|
1264
|
+
contentHash: string;
|
|
1265
|
+
enabled: boolean;
|
|
1266
|
+
timeoutMs: number;
|
|
1267
|
+
createdAt: string;
|
|
1268
|
+
updatedAt: string;
|
|
1269
|
+
source?: string;
|
|
1270
|
+
};
|
|
1271
|
+
type PushValidationScriptBody = {
|
|
1272
|
+
key: string;
|
|
1273
|
+
name: string;
|
|
1274
|
+
description?: string | null;
|
|
1275
|
+
behavior?: "SURFACE" | "RESEND";
|
|
1276
|
+
source: string;
|
|
1277
|
+
enabled?: boolean;
|
|
1278
|
+
timeoutMs?: number;
|
|
1279
|
+
};
|
|
1280
|
+
type UpdateValidationScriptBody = {
|
|
1281
|
+
name?: string;
|
|
1282
|
+
description?: string | null;
|
|
1283
|
+
behavior?: "SURFACE" | "RESEND";
|
|
1284
|
+
enabled?: boolean;
|
|
1285
|
+
timeoutMs?: number;
|
|
1286
|
+
};
|
|
1100
1287
|
declare class ValidationsResource {
|
|
1101
1288
|
private http;
|
|
1102
1289
|
constructor(http: HttpClient);
|
|
@@ -1107,6 +1294,20 @@ declare class ValidationsResource {
|
|
|
1107
1294
|
newRows?: unknown;
|
|
1108
1295
|
strict?: boolean;
|
|
1109
1296
|
}): Promise<unknown>;
|
|
1297
|
+
listScripts(extractionSchemaId: string): Promise<ValidationScript[]>;
|
|
1298
|
+
getScript(extractionSchemaId: string, key: string, opts?: {
|
|
1299
|
+
includeSource?: boolean;
|
|
1300
|
+
}): Promise<ValidationScript>;
|
|
1301
|
+
pushScript(extractionSchemaId: string, body: PushValidationScriptBody): Promise<{
|
|
1302
|
+
action: string;
|
|
1303
|
+
script: ValidationScript;
|
|
1304
|
+
}>;
|
|
1305
|
+
updateScript(extractionSchemaId: string, key: string, body: UpdateValidationScriptBody): Promise<ValidationScript>;
|
|
1306
|
+
deleteScript(extractionSchemaId: string, key: string): Promise<{
|
|
1307
|
+
deleted: boolean;
|
|
1308
|
+
key: string;
|
|
1309
|
+
deletedResults: number;
|
|
1310
|
+
}>;
|
|
1110
1311
|
}
|
|
1111
1312
|
|
|
1112
1313
|
type LabelListResponse = {
|
|
@@ -1144,6 +1345,163 @@ declare class LabelsResource {
|
|
|
1144
1345
|
}): Promise<LabelSearchResponse>;
|
|
1145
1346
|
}
|
|
1146
1347
|
|
|
1348
|
+
declare const WEBHOOK_EVENT_TYPES: readonly ["DOCUMENT_EXTRACTED", "DOCUMENT_REVIEWED", "DOCUMENT_EXTRACTION_FAILED", "DOCUMENT_VALIDATED", "DOCUMENT_VALIDATION_STARTED", "DOCUMENT_VALIDATION_FAILED", "DOCUMENT_CLASSIFIED", "DOCUMENT_CLASSIFICATION_FAILED", "DOCUMENT_SPLIT", "DOCUMENT_SPLIT_FAILED", "AGENT_RUN_STARTED", "AGENT_RUN_COMPLETED", "AGENT_RUN_FAILED", "AGENT_RUN_WAITING_HUMAN"];
|
|
1349
|
+
type WebhookEventType = (typeof WEBHOOK_EVENT_TYPES)[number];
|
|
1350
|
+
declare const WEBHOOK_DELIVERY_STATUSES: readonly ["success", "failed", "dead_lettered", "retrying", "pending"];
|
|
1351
|
+
type WebhookDeliveryStatus = (typeof WEBHOOK_DELIVERY_STATUSES)[number];
|
|
1352
|
+
declare const WEBHOOK_METRICS_WINDOWS: readonly ["24h", "7d", "30d"];
|
|
1353
|
+
type WebhookMetricsWindow = (typeof WEBHOOK_METRICS_WINDOWS)[number];
|
|
1354
|
+
declare const WEBHOOK_METRICS_BUCKETS: readonly ["hour", "day"];
|
|
1355
|
+
type WebhookMetricsBucket = (typeof WEBHOOK_METRICS_BUCKETS)[number];
|
|
1356
|
+
type WebhookRouteFamily = "deployment" | "agent" | "classifier" | "splitter";
|
|
1357
|
+
type WebhookDeploymentRoute = {
|
|
1358
|
+
id: string;
|
|
1359
|
+
name: string;
|
|
1360
|
+
type: string;
|
|
1361
|
+
};
|
|
1362
|
+
type WebhookNamedRoute = {
|
|
1363
|
+
id: string;
|
|
1364
|
+
name: string;
|
|
1365
|
+
};
|
|
1366
|
+
type Webhook = {
|
|
1367
|
+
id: string;
|
|
1368
|
+
projectId: string;
|
|
1369
|
+
url: string;
|
|
1370
|
+
events: WebhookEventType[];
|
|
1371
|
+
isActive: boolean;
|
|
1372
|
+
isVerified: boolean;
|
|
1373
|
+
createdAt: string;
|
|
1374
|
+
updatedAt: string;
|
|
1375
|
+
deployments: WebhookDeploymentRoute[];
|
|
1376
|
+
agents: WebhookNamedRoute[];
|
|
1377
|
+
classifiers: WebhookNamedRoute[];
|
|
1378
|
+
splitters: WebhookNamedRoute[];
|
|
1379
|
+
};
|
|
1380
|
+
type WebhookWithSecret = Webhook & {
|
|
1381
|
+
secretKey: string;
|
|
1382
|
+
};
|
|
1383
|
+
type WebhookListResponse = {
|
|
1384
|
+
webhooks: Webhook[];
|
|
1385
|
+
};
|
|
1386
|
+
type WebhookRouteIdsInput = {
|
|
1387
|
+
deploymentIds?: string[];
|
|
1388
|
+
agentIds?: string[];
|
|
1389
|
+
classifierIds?: string[];
|
|
1390
|
+
splitterIds?: string[];
|
|
1391
|
+
};
|
|
1392
|
+
type CreateWebhookInput = WebhookRouteIdsInput & {
|
|
1393
|
+
url?: string;
|
|
1394
|
+
events?: WebhookEventType[];
|
|
1395
|
+
};
|
|
1396
|
+
type UpdateWebhookInput = CreateWebhookInput & {
|
|
1397
|
+
isActive?: boolean;
|
|
1398
|
+
};
|
|
1399
|
+
type WebhookDelivery = {
|
|
1400
|
+
eventId: string;
|
|
1401
|
+
subscriptionId: string;
|
|
1402
|
+
eventType: string;
|
|
1403
|
+
timestamp: string;
|
|
1404
|
+
url: string;
|
|
1405
|
+
status: WebhookDeliveryStatus;
|
|
1406
|
+
responseCode?: number;
|
|
1407
|
+
responseBody?: string;
|
|
1408
|
+
errorType?: string;
|
|
1409
|
+
durationMs?: number;
|
|
1410
|
+
retryCount: number;
|
|
1411
|
+
routeFamily?: WebhookRouteFamily;
|
|
1412
|
+
deploymentId?: string;
|
|
1413
|
+
deploymentName?: string;
|
|
1414
|
+
agentId?: string;
|
|
1415
|
+
agentName?: string;
|
|
1416
|
+
classifierId?: string;
|
|
1417
|
+
classifierName?: string;
|
|
1418
|
+
splitterId?: string;
|
|
1419
|
+
splitterName?: string;
|
|
1420
|
+
};
|
|
1421
|
+
type WebhookDeliveriesResponse = {
|
|
1422
|
+
deliveries: WebhookDelivery[];
|
|
1423
|
+
total: number;
|
|
1424
|
+
limit: number;
|
|
1425
|
+
offset: number;
|
|
1426
|
+
};
|
|
1427
|
+
type WebhookDeliveriesQuery = {
|
|
1428
|
+
status?: string;
|
|
1429
|
+
eventType?: string;
|
|
1430
|
+
deploymentId?: string;
|
|
1431
|
+
agentId?: string;
|
|
1432
|
+
classifierId?: string;
|
|
1433
|
+
splitterId?: string;
|
|
1434
|
+
limit?: number;
|
|
1435
|
+
offset?: number;
|
|
1436
|
+
};
|
|
1437
|
+
type WebhookRouteMetrics = {
|
|
1438
|
+
routeFamily: WebhookRouteFamily;
|
|
1439
|
+
routeId: string;
|
|
1440
|
+
routeName: string;
|
|
1441
|
+
totalEvents: number;
|
|
1442
|
+
successfulEvents: number;
|
|
1443
|
+
failedEvents: number;
|
|
1444
|
+
pendingEvents: number;
|
|
1445
|
+
successRate: number;
|
|
1446
|
+
};
|
|
1447
|
+
type WebhookDeliveryPoint = {
|
|
1448
|
+
bucket: string;
|
|
1449
|
+
successful: number;
|
|
1450
|
+
failed: number;
|
|
1451
|
+
pending: number;
|
|
1452
|
+
};
|
|
1453
|
+
type WebhookMetrics = {
|
|
1454
|
+
organizationId: string;
|
|
1455
|
+
totalEvents: number;
|
|
1456
|
+
successfulEvents: number;
|
|
1457
|
+
failedEvents: number;
|
|
1458
|
+
pendingEvents: number;
|
|
1459
|
+
successRate: number;
|
|
1460
|
+
averageResponseTime?: number;
|
|
1461
|
+
perRoute: WebhookRouteMetrics[];
|
|
1462
|
+
series: WebhookDeliveryPoint[];
|
|
1463
|
+
window: WebhookMetricsWindow;
|
|
1464
|
+
bucket: WebhookMetricsBucket;
|
|
1465
|
+
};
|
|
1466
|
+
type WebhookMetricsQuery = {
|
|
1467
|
+
window?: WebhookMetricsWindow;
|
|
1468
|
+
bucket?: WebhookMetricsBucket;
|
|
1469
|
+
};
|
|
1470
|
+
type WebhookVerifyResponse = {
|
|
1471
|
+
success: boolean;
|
|
1472
|
+
message: string;
|
|
1473
|
+
};
|
|
1474
|
+
type WebhookRetryDelivery = {
|
|
1475
|
+
eventId: string;
|
|
1476
|
+
url: string;
|
|
1477
|
+
};
|
|
1478
|
+
type WebhookRetrySkip = WebhookRetryDelivery & {
|
|
1479
|
+
reason: string;
|
|
1480
|
+
};
|
|
1481
|
+
type WebhookRetryResponse = {
|
|
1482
|
+
retriedCount: number;
|
|
1483
|
+
retried: WebhookRetryDelivery[];
|
|
1484
|
+
skipped: WebhookRetrySkip[];
|
|
1485
|
+
message: string;
|
|
1486
|
+
};
|
|
1487
|
+
declare class WebhooksResource {
|
|
1488
|
+
private http;
|
|
1489
|
+
constructor(http: HttpClient);
|
|
1490
|
+
private basePath;
|
|
1491
|
+
list(projectId: string): Promise<WebhookListResponse>;
|
|
1492
|
+
get(projectId: string, webhookId: string): Promise<Webhook>;
|
|
1493
|
+
create(projectId: string, input: CreateWebhookInput): Promise<WebhookWithSecret>;
|
|
1494
|
+
update(projectId: string, webhookId: string, input: UpdateWebhookInput): Promise<Webhook>;
|
|
1495
|
+
delete(projectId: string, webhookId: string): Promise<void>;
|
|
1496
|
+
pause(projectId: string, webhookId: string): Promise<Webhook>;
|
|
1497
|
+
resume(projectId: string, webhookId: string): Promise<Webhook>;
|
|
1498
|
+
verify(projectId: string, webhookId: string): Promise<WebhookVerifyResponse>;
|
|
1499
|
+
rotateSecret(projectId: string, webhookId: string): Promise<WebhookWithSecret>;
|
|
1500
|
+
deliveries(projectId: string, webhookId: string, query?: WebhookDeliveriesQuery): Promise<WebhookDeliveriesResponse>;
|
|
1501
|
+
metrics(projectId: string, webhookId: string, query?: WebhookMetricsQuery): Promise<WebhookMetrics>;
|
|
1502
|
+
retry(projectId: string, webhookId: string, eventIds: string[]): Promise<WebhookRetryResponse>;
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1147
1505
|
type LimaiClientConfig = {
|
|
1148
1506
|
apiUrl: string;
|
|
1149
1507
|
token: string;
|
|
@@ -1155,6 +1513,7 @@ declare class LimaiClient {
|
|
|
1155
1513
|
readonly projects: ProjectsResource;
|
|
1156
1514
|
readonly deployments: DeploymentsResource;
|
|
1157
1515
|
readonly tables: TablesResource;
|
|
1516
|
+
readonly columns: ColumnsResource;
|
|
1158
1517
|
readonly extractions: ExtractionsResource;
|
|
1159
1518
|
readonly queue: QueueResource;
|
|
1160
1519
|
readonly classify: ClassifyResource;
|
|
@@ -1165,6 +1524,7 @@ declare class LimaiClient {
|
|
|
1165
1524
|
readonly vision: VisionResource;
|
|
1166
1525
|
readonly validations: ValidationsResource;
|
|
1167
1526
|
readonly labels: LabelsResource;
|
|
1527
|
+
readonly webhooks: WebhooksResource;
|
|
1168
1528
|
constructor(config: LimaiClientConfig);
|
|
1169
1529
|
uploadFile(extractionSchemaId: string, filePath: string, onProgress?: (uploaded: number, total: number) => void): Promise<UploadResult>;
|
|
1170
1530
|
uploadFolder(extractionSchemaId: string, dirPath: string, opts?: {
|
|
@@ -1290,4 +1650,4 @@ declare class UploadError extends LimaiError {
|
|
|
1290
1650
|
}
|
|
1291
1651
|
declare function mapHttpError(status: number, message: string, details?: unknown): LimaiError;
|
|
1292
1652
|
|
|
1293
|
-
export { type Agent, type AgentDeploymentRoute, type AgentDetail, type AgentFile, type AgentIntegrationConfig, type AgentRowData, type AgentRun, type AgentRunConversation, type AgentRunDetail, type AgentRunStatus, type AgentSkill, type AgentSkillLinkedFile, type AgentStatus, type AgentStep, type AgentStepType, type AgentSubmission, type AgentTriggerType, AuthError, type Bucket, type BucketFile, type BulkFileResult, type BulkFlatDocumentDataResponse, type BulkGetFilesDataResponse, type BulkProcessResponse, type BulkProcessResult, type BulkUploadFileStatus, type BulkUploadResult, type CellBoundingBox, type CellConfidence, type CellValidation, type CellValue, type ClassificationAsyncResponse, type ClassificationResult, type ClassificationStatus, type Column, ConflictError, type CreateRowInput, type CreateRowsRequest, type CreateRowsResponse, type DeleteRowsRequest, type DeleteRowsResponse, type Deployment, type DeploymentConfig, type DeploymentStatus, type DeploymentType, type Document, type ExtractionRow, type ExtractionSchema, type ExtractionsResponse, type FileData, type FileStatus, type FileValidationCheck, type FileValidations, type FlatCellData, type FlatCellValidation, type FlatDocumentDataResponse, type FlatDocumentEntry, type FlatFileValidations, type FlatRow, ForbiddenError, type GetUrlResponse, HttpClient, type IncludeOption, type JobContext, type JobContextColumn, type JobContextTable, JobPoller, type JobStatus, type JobStatusValue, LimaiClient, type LimaiClientConfig, type LimaiConfig, LimaiError, NotFoundError, type OffsetPaginatedResponse, type OffsetPagination, type PagePaginatedResponse, type PagePagination, type PaginationOptions, type PollOptions, type ProcessFileAsyncResponse, type ProcessOptions, type Project, RateLimitError, type Row, SSEClient, ServerError, type SplitAsyncResponse, type SplitResult, type SplitSegment, type SplitStatus, type StageStatus, type Table, type TableData, TimeoutError, type UpdateStatusRequest, type UpdateStatusResponse, UploadError, type UploadResult, ValidationError, type ValidationResult, collectAll, getDeploymentId, getFileId, getJobId, loadConfig, loadJobContext, mapHttpError, paginateOffset, paginatePage, requireConfig, saveConfig, validateSubmission };
|
|
1653
|
+
export { type Agent, type AgentDeploymentRoute, type AgentDetail, type AgentFile, type AgentIntegrationConfig, type AgentRole, type AgentRowData, type AgentRun, type AgentRunConversation, type AgentRunDetail, type AgentRunInferenceLog, type AgentRunInferenceLogSummary, type AgentRunInferenceLogs, type AgentRunStatus, type AgentSkill, type AgentSkillLinkedFile, type AgentStatus, type AgentStep, type AgentStepType, type AgentSubmission, type AgentTriggerType, AuthError, type Bucket, type BucketFile, type BulkFileResult, type BulkFlatDocumentDataResponse, type BulkGetFilesDataResponse, type BulkProcessResponse, type BulkProcessResult, type BulkUploadFileStatus, type BulkUploadResult, type CellBoundingBox, type CellConfidence, type CellValidation, type CellValue, type ClassificationAsyncResponse, type ClassificationResult, type ClassificationStatus, type Column, type ColumnInput, type ColumnLabel, type ColumnUnit, type ColumnUpdateInput, ConflictError, type CreateRowInput, type CreateRowsRequest, type CreateRowsResponse, type DeleteRowsRequest, type DeleteRowsResponse, type Deployment, type DeploymentConfig, type DeploymentStatus, type DeploymentType, type Document, type ExtractionRow, type ExtractionSchema, type ExtractionsResponse, type FileData, type FileStatus, type FileValidationCheck, type FileValidations, type FlatCellData, type FlatCellValidation, type FlatDocumentDataResponse, type FlatDocumentEntry, type FlatFileValidations, type FlatRow, ForbiddenError, type GetUrlResponse, HttpClient, type IncludeOption, type JobContext, type JobContextColumn, type JobContextTable, JobPoller, type JobStatus, type JobStatusValue, LimaiClient, type LimaiClientConfig, type LimaiConfig, LimaiError, NotFoundError, type OffsetPaginatedResponse, type OffsetPagination, type PagePaginatedResponse, type PagePagination, type PaginationOptions, type PollOptions, type ProcessFileAsyncResponse, type ProcessOptions, type Project, RateLimitError, type Row, SSEClient, ServerError, type SplitAsyncResponse, type SplitResult, type SplitSegment, type SplitStatus, type StageStatus, type Table, type TableData, TimeoutError, type UpdateStatusRequest, type UpdateStatusResponse, UploadError, type UploadResult, ValidationError, type ValidationResult, collectAll, getDeploymentId, getFileId, getJobId, loadConfig, loadJobContext, mapHttpError, paginateOffset, paginatePage, requireConfig, saveConfig, validateSubmission };
|