@carddb/core 0.3.15 → 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/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,172 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
2243
2406
  `
2244
2407
  };
2245
2408
  },
2409
+ createScanUploadSession() {
2410
+ return {
2411
+ query: `
2412
+ mutation CreateScanUploadSession($input: CreateScanUploadSessionInput!) {
2413
+ createScanUploadSession(input: $input) {
2414
+ ${PRESIGNED_UPLOAD_FIELDS}
2415
+ }
2416
+ }
2417
+ `
2418
+ };
2419
+ },
2420
+ confirmScanUpload() {
2421
+ return {
2422
+ query: `
2423
+ mutation ConfirmScanUpload($input: ConfirmScanUploadInput!) {
2424
+ confirmScanUpload(input: $input) {
2425
+ ${FILE_FIELDS}
2426
+ }
2427
+ }
2428
+ `
2429
+ };
2430
+ },
2431
+ createScanJob() {
2432
+ return {
2433
+ query: `
2434
+ mutation CreateScanJob($input: CreateScanJobInput!) {
2435
+ createScanJob(input: $input) {
2436
+ job {
2437
+ ${SCAN_JOB_FIELDS}
2438
+ }
2439
+ created
2440
+ }
2441
+ }
2442
+ `
2443
+ };
2444
+ },
2445
+ scanJob() {
2446
+ return {
2447
+ query: `
2448
+ query ScanJob($id: UUID!) {
2449
+ scanJob(id: $id) {
2450
+ ${SCAN_JOB_FIELDS}
2451
+ }
2452
+ }
2453
+ `
2454
+ };
2455
+ },
2456
+ submitScanFeedback() {
2457
+ return {
2458
+ query: `
2459
+ mutation SubmitScanFeedback($input: SubmitScanFeedbackInput!) {
2460
+ submitScanFeedback(input: $input) {
2461
+ feedbackId
2462
+ jobId
2463
+ status
2464
+ persisted
2465
+ correct
2466
+ predictedRecordId
2467
+ selectedRecordId
2468
+ featureVersion
2469
+ message
2470
+ }
2471
+ }
2472
+ `
2473
+ };
2474
+ },
2475
+ scanMetrics() {
2476
+ return {
2477
+ query: `
2478
+ query ScanMetrics($input: ScanMetricsInput!) {
2479
+ scanMetrics(input: $input) {
2480
+ ${SCAN_METRICS_FIELDS}
2481
+ }
2482
+ }
2483
+ `
2484
+ };
2485
+ },
2486
+ resolveScanTemplate() {
2487
+ return {
2488
+ query: `
2489
+ query ResolveScanTemplate($input: ResolveScanTemplateInput!) {
2490
+ resolveScanTemplate(input: $input) {
2491
+ template {
2492
+ ${SCAN_TEMPLATE_FIELDS}
2493
+ }
2494
+ warnings {
2495
+ ${SCAN_TEMPLATE_WARNING_FIELDS}
2496
+ }
2497
+ }
2498
+ }
2499
+ `
2500
+ };
2501
+ },
2502
+ scanTemplates() {
2503
+ return {
2504
+ query: `
2505
+ query ScanTemplates($input: ScanTemplatesInput!) {
2506
+ scanTemplates(input: $input) {
2507
+ templates {
2508
+ ${SCAN_TEMPLATE_FIELDS}
2509
+ }
2510
+ }
2511
+ }
2512
+ `
2513
+ };
2514
+ },
2515
+ createScanTemplate() {
2516
+ return {
2517
+ query: `
2518
+ mutation CreateScanTemplate($input: SaveScanTemplateInput!) {
2519
+ createScanTemplate(input: $input) {
2520
+ template {
2521
+ ${SCAN_TEMPLATE_FIELDS}
2522
+ }
2523
+ warnings {
2524
+ ${SCAN_TEMPLATE_WARNING_FIELDS}
2525
+ }
2526
+ }
2527
+ }
2528
+ `
2529
+ };
2530
+ },
2531
+ updateScanTemplate() {
2532
+ return {
2533
+ query: `
2534
+ mutation UpdateScanTemplate($id: UUID!, $input: SaveScanTemplateInput!) {
2535
+ updateScanTemplate(id: $id, input: $input) {
2536
+ template {
2537
+ ${SCAN_TEMPLATE_FIELDS}
2538
+ }
2539
+ warnings {
2540
+ ${SCAN_TEMPLATE_WARNING_FIELDS}
2541
+ }
2542
+ }
2543
+ }
2544
+ `
2545
+ };
2546
+ },
2547
+ previewScanTemplate() {
2548
+ return {
2549
+ query: `
2550
+ mutation PreviewScanTemplate($input: PreviewScanTemplateInput!) {
2551
+ previewScanTemplate(input: $input) {
2552
+ warnings {
2553
+ ${SCAN_TEMPLATE_WARNING_FIELDS}
2554
+ }
2555
+ regions {
2556
+ ${SCAN_TEMPLATE_PREVIEW_REGION_FIELDS}
2557
+ }
2558
+ message
2559
+ }
2560
+ }
2561
+ `
2562
+ };
2563
+ },
2564
+ gameScanRegions() {
2565
+ return {
2566
+ query: `
2567
+ query GameScanRegions($publisherSlug: String!, $gameKey: String!, $includeInactive: Boolean) {
2568
+ gameScanRegions(publisherSlug: $publisherSlug, gameKey: $gameKey, includeInactive: $includeInactive) {
2569
+ ${GAME_SCAN_REGION_FIELDS}
2570
+ }
2571
+ }
2572
+ `
2573
+ };
2574
+ },
2246
2575
  exportJob() {
2247
2576
  return {
2248
2577
  query: `
@@ -3373,6 +3702,39 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
3373
3702
  fileUploadRequestVariables(input) {
3374
3703
  return { input };
3375
3704
  },
3705
+ createScanUploadSessionVariables(input) {
3706
+ return { input };
3707
+ },
3708
+ confirmScanUploadVariables(input) {
3709
+ return { input };
3710
+ },
3711
+ createScanJobVariables(input) {
3712
+ return { input };
3713
+ },
3714
+ submitScanFeedbackVariables(input) {
3715
+ return { input };
3716
+ },
3717
+ scanMetricsVariables(input) {
3718
+ return { input };
3719
+ },
3720
+ resolveScanTemplateVariables(input) {
3721
+ return { input };
3722
+ },
3723
+ scanTemplatesVariables(input) {
3724
+ return { input };
3725
+ },
3726
+ createScanTemplateVariables(input) {
3727
+ return { input };
3728
+ },
3729
+ updateScanTemplateVariables(id, input) {
3730
+ return { id, input };
3731
+ },
3732
+ previewScanTemplateVariables(input) {
3733
+ return { input };
3734
+ },
3735
+ gameScanRegionsVariables(publisherSlug, gameKey, includeInactive) {
3736
+ return includeInactive === void 0 ? { publisherSlug, gameKey } : { publisherSlug, gameKey, includeInactive };
3737
+ },
3376
3738
  datasetExportVariables(input) {
3377
3739
  return { input };
3378
3740
  },