@carddb/core 0.3.0 → 0.4.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/index.cjs +334 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +307 -2
- package/dist/index.d.ts +307 -2
- package/dist/index.js +334 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -1258,6 +1258,169 @@ var EXPORT_JOB_FIELDS = `
|
|
|
1258
1258
|
updatedAt
|
|
1259
1259
|
lastCheckpointIndex
|
|
1260
1260
|
`;
|
|
1261
|
+
var SCAN_CANDIDATE_FIELDS = `
|
|
1262
|
+
recordId
|
|
1263
|
+
rank
|
|
1264
|
+
score
|
|
1265
|
+
confidence
|
|
1266
|
+
reasons
|
|
1267
|
+
`;
|
|
1268
|
+
var SCAN_WEBHOOK_FIELDS = `
|
|
1269
|
+
configured
|
|
1270
|
+
url
|
|
1271
|
+
latestDeliveryId
|
|
1272
|
+
status
|
|
1273
|
+
attemptCount
|
|
1274
|
+
nextAttemptAt
|
|
1275
|
+
lastAttemptAt
|
|
1276
|
+
deliveredAt
|
|
1277
|
+
lastStatusCode
|
|
1278
|
+
lastError
|
|
1279
|
+
`;
|
|
1280
|
+
var SCAN_JOB_METRICS_FIELDS = `
|
|
1281
|
+
featureVersion
|
|
1282
|
+
candidateCount
|
|
1283
|
+
confidenceScore
|
|
1284
|
+
confidenceLabel
|
|
1285
|
+
stages {
|
|
1286
|
+
name
|
|
1287
|
+
status
|
|
1288
|
+
durationMs
|
|
1289
|
+
completedAt
|
|
1290
|
+
details
|
|
1291
|
+
}
|
|
1292
|
+
timings
|
|
1293
|
+
`;
|
|
1294
|
+
var SCAN_JOB_FIELDS = `
|
|
1295
|
+
jobId
|
|
1296
|
+
status
|
|
1297
|
+
publisherSlug
|
|
1298
|
+
gameKey
|
|
1299
|
+
datasetKey
|
|
1300
|
+
fileId
|
|
1301
|
+
clientRequestId
|
|
1302
|
+
templateId
|
|
1303
|
+
templateVersionId
|
|
1304
|
+
bestMatch {
|
|
1305
|
+
recordId
|
|
1306
|
+
score
|
|
1307
|
+
confidence
|
|
1308
|
+
}
|
|
1309
|
+
candidates {
|
|
1310
|
+
${SCAN_CANDIDATE_FIELDS}
|
|
1311
|
+
}
|
|
1312
|
+
extracted
|
|
1313
|
+
metrics {
|
|
1314
|
+
${SCAN_JOB_METRICS_FIELDS}
|
|
1315
|
+
}
|
|
1316
|
+
webhook {
|
|
1317
|
+
${SCAN_WEBHOOK_FIELDS}
|
|
1318
|
+
}
|
|
1319
|
+
error {
|
|
1320
|
+
code
|
|
1321
|
+
message
|
|
1322
|
+
}
|
|
1323
|
+
createdAt
|
|
1324
|
+
updatedAt
|
|
1325
|
+
startedAt
|
|
1326
|
+
completedAt
|
|
1327
|
+
`;
|
|
1328
|
+
var SCAN_METRICS_FIELDS = `
|
|
1329
|
+
publisherSlug
|
|
1330
|
+
gameKey
|
|
1331
|
+
datasetKey
|
|
1332
|
+
since
|
|
1333
|
+
until
|
|
1334
|
+
generatedAt
|
|
1335
|
+
totalJobs
|
|
1336
|
+
completedJobs
|
|
1337
|
+
failedJobs
|
|
1338
|
+
failureRate
|
|
1339
|
+
averageShortlistSize
|
|
1340
|
+
confidenceDistribution
|
|
1341
|
+
feedback {
|
|
1342
|
+
total
|
|
1343
|
+
correct
|
|
1344
|
+
corrected
|
|
1345
|
+
unknown
|
|
1346
|
+
accuracy
|
|
1347
|
+
}
|
|
1348
|
+
featureVersions {
|
|
1349
|
+
featureVersion
|
|
1350
|
+
jobCount
|
|
1351
|
+
completedJobs
|
|
1352
|
+
failedJobs
|
|
1353
|
+
averageConfidence
|
|
1354
|
+
averageShortlistSize
|
|
1355
|
+
feedbackCount
|
|
1356
|
+
correctFeedback
|
|
1357
|
+
correctedFeedback
|
|
1358
|
+
feedbackAccuracy
|
|
1359
|
+
}
|
|
1360
|
+
`;
|
|
1361
|
+
var SCAN_TEMPLATE_WARNING_FIELDS = `
|
|
1362
|
+
code
|
|
1363
|
+
region
|
|
1364
|
+
message
|
|
1365
|
+
`;
|
|
1366
|
+
var SCAN_TEMPLATE_REGION_FIELDS = `
|
|
1367
|
+
id
|
|
1368
|
+
key
|
|
1369
|
+
label
|
|
1370
|
+
sortOrder
|
|
1371
|
+
shapeType
|
|
1372
|
+
geometry
|
|
1373
|
+
semanticType
|
|
1374
|
+
extractionMode
|
|
1375
|
+
lookupMode
|
|
1376
|
+
isRequired
|
|
1377
|
+
weight
|
|
1378
|
+
config
|
|
1379
|
+
`;
|
|
1380
|
+
var SCAN_TEMPLATE_FIELDS = `
|
|
1381
|
+
id
|
|
1382
|
+
key
|
|
1383
|
+
name
|
|
1384
|
+
status
|
|
1385
|
+
version
|
|
1386
|
+
isDefault
|
|
1387
|
+
publisherSlug
|
|
1388
|
+
gameKey
|
|
1389
|
+
datasetKey
|
|
1390
|
+
exampleFileId
|
|
1391
|
+
coordinateSpace
|
|
1392
|
+
cardAspectRatio
|
|
1393
|
+
notes
|
|
1394
|
+
config
|
|
1395
|
+
regions {
|
|
1396
|
+
${SCAN_TEMPLATE_REGION_FIELDS}
|
|
1397
|
+
}
|
|
1398
|
+
createdAt
|
|
1399
|
+
updatedAt
|
|
1400
|
+
`;
|
|
1401
|
+
var SCAN_TEMPLATE_PREVIEW_REGION_FIELDS = `
|
|
1402
|
+
key
|
|
1403
|
+
label
|
|
1404
|
+
semanticType
|
|
1405
|
+
extractionMode
|
|
1406
|
+
lookupMode
|
|
1407
|
+
rawText
|
|
1408
|
+
normalizedValue
|
|
1409
|
+
source
|
|
1410
|
+
status
|
|
1411
|
+
confidence
|
|
1412
|
+
`;
|
|
1413
|
+
var GAME_SCAN_REGION_FIELDS = `
|
|
1414
|
+
id
|
|
1415
|
+
key
|
|
1416
|
+
name
|
|
1417
|
+
description
|
|
1418
|
+
sortOrder
|
|
1419
|
+
isActive
|
|
1420
|
+
metadata
|
|
1421
|
+
createdAt
|
|
1422
|
+
updatedAt
|
|
1423
|
+
`;
|
|
1261
1424
|
function connectionFields(nodeFields) {
|
|
1262
1425
|
return `
|
|
1263
1426
|
totalCount
|
|
@@ -2243,6 +2406,150 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
2243
2406
|
`
|
|
2244
2407
|
};
|
|
2245
2408
|
},
|
|
2409
|
+
createScanJob() {
|
|
2410
|
+
return {
|
|
2411
|
+
query: `
|
|
2412
|
+
mutation CreateScanJob($input: CreateScanJobInput!) {
|
|
2413
|
+
createScanJob(input: $input) {
|
|
2414
|
+
job {
|
|
2415
|
+
${SCAN_JOB_FIELDS}
|
|
2416
|
+
}
|
|
2417
|
+
created
|
|
2418
|
+
}
|
|
2419
|
+
}
|
|
2420
|
+
`
|
|
2421
|
+
};
|
|
2422
|
+
},
|
|
2423
|
+
scanJob() {
|
|
2424
|
+
return {
|
|
2425
|
+
query: `
|
|
2426
|
+
query ScanJob($id: UUID!) {
|
|
2427
|
+
scanJob(id: $id) {
|
|
2428
|
+
${SCAN_JOB_FIELDS}
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
`
|
|
2432
|
+
};
|
|
2433
|
+
},
|
|
2434
|
+
submitScanFeedback() {
|
|
2435
|
+
return {
|
|
2436
|
+
query: `
|
|
2437
|
+
mutation SubmitScanFeedback($input: SubmitScanFeedbackInput!) {
|
|
2438
|
+
submitScanFeedback(input: $input) {
|
|
2439
|
+
feedbackId
|
|
2440
|
+
jobId
|
|
2441
|
+
status
|
|
2442
|
+
persisted
|
|
2443
|
+
correct
|
|
2444
|
+
predictedRecordId
|
|
2445
|
+
selectedRecordId
|
|
2446
|
+
featureVersion
|
|
2447
|
+
message
|
|
2448
|
+
}
|
|
2449
|
+
}
|
|
2450
|
+
`
|
|
2451
|
+
};
|
|
2452
|
+
},
|
|
2453
|
+
scanMetrics() {
|
|
2454
|
+
return {
|
|
2455
|
+
query: `
|
|
2456
|
+
query ScanMetrics($input: ScanMetricsInput!) {
|
|
2457
|
+
scanMetrics(input: $input) {
|
|
2458
|
+
${SCAN_METRICS_FIELDS}
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2461
|
+
`
|
|
2462
|
+
};
|
|
2463
|
+
},
|
|
2464
|
+
resolveScanTemplate() {
|
|
2465
|
+
return {
|
|
2466
|
+
query: `
|
|
2467
|
+
query ResolveScanTemplate($input: ResolveScanTemplateInput!) {
|
|
2468
|
+
resolveScanTemplate(input: $input) {
|
|
2469
|
+
template {
|
|
2470
|
+
${SCAN_TEMPLATE_FIELDS}
|
|
2471
|
+
}
|
|
2472
|
+
warnings {
|
|
2473
|
+
${SCAN_TEMPLATE_WARNING_FIELDS}
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
`
|
|
2478
|
+
};
|
|
2479
|
+
},
|
|
2480
|
+
scanTemplates() {
|
|
2481
|
+
return {
|
|
2482
|
+
query: `
|
|
2483
|
+
query ScanTemplates($input: ScanTemplatesInput!) {
|
|
2484
|
+
scanTemplates(input: $input) {
|
|
2485
|
+
templates {
|
|
2486
|
+
${SCAN_TEMPLATE_FIELDS}
|
|
2487
|
+
}
|
|
2488
|
+
}
|
|
2489
|
+
}
|
|
2490
|
+
`
|
|
2491
|
+
};
|
|
2492
|
+
},
|
|
2493
|
+
createScanTemplate() {
|
|
2494
|
+
return {
|
|
2495
|
+
query: `
|
|
2496
|
+
mutation CreateScanTemplate($input: SaveScanTemplateInput!) {
|
|
2497
|
+
createScanTemplate(input: $input) {
|
|
2498
|
+
template {
|
|
2499
|
+
${SCAN_TEMPLATE_FIELDS}
|
|
2500
|
+
}
|
|
2501
|
+
warnings {
|
|
2502
|
+
${SCAN_TEMPLATE_WARNING_FIELDS}
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
}
|
|
2506
|
+
`
|
|
2507
|
+
};
|
|
2508
|
+
},
|
|
2509
|
+
updateScanTemplate() {
|
|
2510
|
+
return {
|
|
2511
|
+
query: `
|
|
2512
|
+
mutation UpdateScanTemplate($id: UUID!, $input: SaveScanTemplateInput!) {
|
|
2513
|
+
updateScanTemplate(id: $id, input: $input) {
|
|
2514
|
+
template {
|
|
2515
|
+
${SCAN_TEMPLATE_FIELDS}
|
|
2516
|
+
}
|
|
2517
|
+
warnings {
|
|
2518
|
+
${SCAN_TEMPLATE_WARNING_FIELDS}
|
|
2519
|
+
}
|
|
2520
|
+
}
|
|
2521
|
+
}
|
|
2522
|
+
`
|
|
2523
|
+
};
|
|
2524
|
+
},
|
|
2525
|
+
previewScanTemplate() {
|
|
2526
|
+
return {
|
|
2527
|
+
query: `
|
|
2528
|
+
mutation PreviewScanTemplate($input: PreviewScanTemplateInput!) {
|
|
2529
|
+
previewScanTemplate(input: $input) {
|
|
2530
|
+
warnings {
|
|
2531
|
+
${SCAN_TEMPLATE_WARNING_FIELDS}
|
|
2532
|
+
}
|
|
2533
|
+
regions {
|
|
2534
|
+
${SCAN_TEMPLATE_PREVIEW_REGION_FIELDS}
|
|
2535
|
+
}
|
|
2536
|
+
message
|
|
2537
|
+
}
|
|
2538
|
+
}
|
|
2539
|
+
`
|
|
2540
|
+
};
|
|
2541
|
+
},
|
|
2542
|
+
gameScanRegions() {
|
|
2543
|
+
return {
|
|
2544
|
+
query: `
|
|
2545
|
+
query GameScanRegions($publisherSlug: String!, $gameKey: String!, $includeInactive: Boolean) {
|
|
2546
|
+
gameScanRegions(publisherSlug: $publisherSlug, gameKey: $gameKey, includeInactive: $includeInactive) {
|
|
2547
|
+
${GAME_SCAN_REGION_FIELDS}
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
`
|
|
2551
|
+
};
|
|
2552
|
+
},
|
|
2246
2553
|
exportJob() {
|
|
2247
2554
|
return {
|
|
2248
2555
|
query: `
|
|
@@ -3373,6 +3680,33 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
3373
3680
|
fileUploadRequestVariables(input) {
|
|
3374
3681
|
return { input };
|
|
3375
3682
|
},
|
|
3683
|
+
createScanJobVariables(input) {
|
|
3684
|
+
return { input };
|
|
3685
|
+
},
|
|
3686
|
+
submitScanFeedbackVariables(input) {
|
|
3687
|
+
return { input };
|
|
3688
|
+
},
|
|
3689
|
+
scanMetricsVariables(input) {
|
|
3690
|
+
return { input };
|
|
3691
|
+
},
|
|
3692
|
+
resolveScanTemplateVariables(input) {
|
|
3693
|
+
return { input };
|
|
3694
|
+
},
|
|
3695
|
+
scanTemplatesVariables(input) {
|
|
3696
|
+
return { input };
|
|
3697
|
+
},
|
|
3698
|
+
createScanTemplateVariables(input) {
|
|
3699
|
+
return { input };
|
|
3700
|
+
},
|
|
3701
|
+
updateScanTemplateVariables(id, input) {
|
|
3702
|
+
return { id, input };
|
|
3703
|
+
},
|
|
3704
|
+
previewScanTemplateVariables(input) {
|
|
3705
|
+
return { input };
|
|
3706
|
+
},
|
|
3707
|
+
gameScanRegionsVariables(publisherSlug, gameKey, includeInactive) {
|
|
3708
|
+
return includeInactive === void 0 ? { publisherSlug, gameKey } : { publisherSlug, gameKey, includeInactive };
|
|
3709
|
+
},
|
|
3376
3710
|
datasetExportVariables(input) {
|
|
3377
3711
|
return { input };
|
|
3378
3712
|
},
|