@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.js CHANGED
@@ -1205,6 +1205,169 @@ var EXPORT_JOB_FIELDS = `
1205
1205
  updatedAt
1206
1206
  lastCheckpointIndex
1207
1207
  `;
1208
+ var SCAN_CANDIDATE_FIELDS = `
1209
+ recordId
1210
+ rank
1211
+ score
1212
+ confidence
1213
+ reasons
1214
+ `;
1215
+ var SCAN_WEBHOOK_FIELDS = `
1216
+ configured
1217
+ url
1218
+ latestDeliveryId
1219
+ status
1220
+ attemptCount
1221
+ nextAttemptAt
1222
+ lastAttemptAt
1223
+ deliveredAt
1224
+ lastStatusCode
1225
+ lastError
1226
+ `;
1227
+ var SCAN_JOB_METRICS_FIELDS = `
1228
+ featureVersion
1229
+ candidateCount
1230
+ confidenceScore
1231
+ confidenceLabel
1232
+ stages {
1233
+ name
1234
+ status
1235
+ durationMs
1236
+ completedAt
1237
+ details
1238
+ }
1239
+ timings
1240
+ `;
1241
+ var SCAN_JOB_FIELDS = `
1242
+ jobId
1243
+ status
1244
+ publisherSlug
1245
+ gameKey
1246
+ datasetKey
1247
+ fileId
1248
+ clientRequestId
1249
+ templateId
1250
+ templateVersionId
1251
+ bestMatch {
1252
+ recordId
1253
+ score
1254
+ confidence
1255
+ }
1256
+ candidates {
1257
+ ${SCAN_CANDIDATE_FIELDS}
1258
+ }
1259
+ extracted
1260
+ metrics {
1261
+ ${SCAN_JOB_METRICS_FIELDS}
1262
+ }
1263
+ webhook {
1264
+ ${SCAN_WEBHOOK_FIELDS}
1265
+ }
1266
+ error {
1267
+ code
1268
+ message
1269
+ }
1270
+ createdAt
1271
+ updatedAt
1272
+ startedAt
1273
+ completedAt
1274
+ `;
1275
+ var SCAN_METRICS_FIELDS = `
1276
+ publisherSlug
1277
+ gameKey
1278
+ datasetKey
1279
+ since
1280
+ until
1281
+ generatedAt
1282
+ totalJobs
1283
+ completedJobs
1284
+ failedJobs
1285
+ failureRate
1286
+ averageShortlistSize
1287
+ confidenceDistribution
1288
+ feedback {
1289
+ total
1290
+ correct
1291
+ corrected
1292
+ unknown
1293
+ accuracy
1294
+ }
1295
+ featureVersions {
1296
+ featureVersion
1297
+ jobCount
1298
+ completedJobs
1299
+ failedJobs
1300
+ averageConfidence
1301
+ averageShortlistSize
1302
+ feedbackCount
1303
+ correctFeedback
1304
+ correctedFeedback
1305
+ feedbackAccuracy
1306
+ }
1307
+ `;
1308
+ var SCAN_TEMPLATE_WARNING_FIELDS = `
1309
+ code
1310
+ region
1311
+ message
1312
+ `;
1313
+ var SCAN_TEMPLATE_REGION_FIELDS = `
1314
+ id
1315
+ key
1316
+ label
1317
+ sortOrder
1318
+ shapeType
1319
+ geometry
1320
+ semanticType
1321
+ extractionMode
1322
+ lookupMode
1323
+ isRequired
1324
+ weight
1325
+ config
1326
+ `;
1327
+ var SCAN_TEMPLATE_FIELDS = `
1328
+ id
1329
+ key
1330
+ name
1331
+ status
1332
+ version
1333
+ isDefault
1334
+ publisherSlug
1335
+ gameKey
1336
+ datasetKey
1337
+ exampleFileId
1338
+ coordinateSpace
1339
+ cardAspectRatio
1340
+ notes
1341
+ config
1342
+ regions {
1343
+ ${SCAN_TEMPLATE_REGION_FIELDS}
1344
+ }
1345
+ createdAt
1346
+ updatedAt
1347
+ `;
1348
+ var SCAN_TEMPLATE_PREVIEW_REGION_FIELDS = `
1349
+ key
1350
+ label
1351
+ semanticType
1352
+ extractionMode
1353
+ lookupMode
1354
+ rawText
1355
+ normalizedValue
1356
+ source
1357
+ status
1358
+ confidence
1359
+ `;
1360
+ var GAME_SCAN_REGION_FIELDS = `
1361
+ id
1362
+ key
1363
+ name
1364
+ description
1365
+ sortOrder
1366
+ isActive
1367
+ metadata
1368
+ createdAt
1369
+ updatedAt
1370
+ `;
1208
1371
  function connectionFields(nodeFields) {
1209
1372
  return `
1210
1373
  totalCount
@@ -2190,6 +2353,172 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
2190
2353
  `
2191
2354
  };
2192
2355
  },
2356
+ createScanUploadSession() {
2357
+ return {
2358
+ query: `
2359
+ mutation CreateScanUploadSession($input: CreateScanUploadSessionInput!) {
2360
+ createScanUploadSession(input: $input) {
2361
+ ${PRESIGNED_UPLOAD_FIELDS}
2362
+ }
2363
+ }
2364
+ `
2365
+ };
2366
+ },
2367
+ confirmScanUpload() {
2368
+ return {
2369
+ query: `
2370
+ mutation ConfirmScanUpload($input: ConfirmScanUploadInput!) {
2371
+ confirmScanUpload(input: $input) {
2372
+ ${FILE_FIELDS}
2373
+ }
2374
+ }
2375
+ `
2376
+ };
2377
+ },
2378
+ createScanJob() {
2379
+ return {
2380
+ query: `
2381
+ mutation CreateScanJob($input: CreateScanJobInput!) {
2382
+ createScanJob(input: $input) {
2383
+ job {
2384
+ ${SCAN_JOB_FIELDS}
2385
+ }
2386
+ created
2387
+ }
2388
+ }
2389
+ `
2390
+ };
2391
+ },
2392
+ scanJob() {
2393
+ return {
2394
+ query: `
2395
+ query ScanJob($id: UUID!) {
2396
+ scanJob(id: $id) {
2397
+ ${SCAN_JOB_FIELDS}
2398
+ }
2399
+ }
2400
+ `
2401
+ };
2402
+ },
2403
+ submitScanFeedback() {
2404
+ return {
2405
+ query: `
2406
+ mutation SubmitScanFeedback($input: SubmitScanFeedbackInput!) {
2407
+ submitScanFeedback(input: $input) {
2408
+ feedbackId
2409
+ jobId
2410
+ status
2411
+ persisted
2412
+ correct
2413
+ predictedRecordId
2414
+ selectedRecordId
2415
+ featureVersion
2416
+ message
2417
+ }
2418
+ }
2419
+ `
2420
+ };
2421
+ },
2422
+ scanMetrics() {
2423
+ return {
2424
+ query: `
2425
+ query ScanMetrics($input: ScanMetricsInput!) {
2426
+ scanMetrics(input: $input) {
2427
+ ${SCAN_METRICS_FIELDS}
2428
+ }
2429
+ }
2430
+ `
2431
+ };
2432
+ },
2433
+ resolveScanTemplate() {
2434
+ return {
2435
+ query: `
2436
+ query ResolveScanTemplate($input: ResolveScanTemplateInput!) {
2437
+ resolveScanTemplate(input: $input) {
2438
+ template {
2439
+ ${SCAN_TEMPLATE_FIELDS}
2440
+ }
2441
+ warnings {
2442
+ ${SCAN_TEMPLATE_WARNING_FIELDS}
2443
+ }
2444
+ }
2445
+ }
2446
+ `
2447
+ };
2448
+ },
2449
+ scanTemplates() {
2450
+ return {
2451
+ query: `
2452
+ query ScanTemplates($input: ScanTemplatesInput!) {
2453
+ scanTemplates(input: $input) {
2454
+ templates {
2455
+ ${SCAN_TEMPLATE_FIELDS}
2456
+ }
2457
+ }
2458
+ }
2459
+ `
2460
+ };
2461
+ },
2462
+ createScanTemplate() {
2463
+ return {
2464
+ query: `
2465
+ mutation CreateScanTemplate($input: SaveScanTemplateInput!) {
2466
+ createScanTemplate(input: $input) {
2467
+ template {
2468
+ ${SCAN_TEMPLATE_FIELDS}
2469
+ }
2470
+ warnings {
2471
+ ${SCAN_TEMPLATE_WARNING_FIELDS}
2472
+ }
2473
+ }
2474
+ }
2475
+ `
2476
+ };
2477
+ },
2478
+ updateScanTemplate() {
2479
+ return {
2480
+ query: `
2481
+ mutation UpdateScanTemplate($id: UUID!, $input: SaveScanTemplateInput!) {
2482
+ updateScanTemplate(id: $id, input: $input) {
2483
+ template {
2484
+ ${SCAN_TEMPLATE_FIELDS}
2485
+ }
2486
+ warnings {
2487
+ ${SCAN_TEMPLATE_WARNING_FIELDS}
2488
+ }
2489
+ }
2490
+ }
2491
+ `
2492
+ };
2493
+ },
2494
+ previewScanTemplate() {
2495
+ return {
2496
+ query: `
2497
+ mutation PreviewScanTemplate($input: PreviewScanTemplateInput!) {
2498
+ previewScanTemplate(input: $input) {
2499
+ warnings {
2500
+ ${SCAN_TEMPLATE_WARNING_FIELDS}
2501
+ }
2502
+ regions {
2503
+ ${SCAN_TEMPLATE_PREVIEW_REGION_FIELDS}
2504
+ }
2505
+ message
2506
+ }
2507
+ }
2508
+ `
2509
+ };
2510
+ },
2511
+ gameScanRegions() {
2512
+ return {
2513
+ query: `
2514
+ query GameScanRegions($publisherSlug: String!, $gameKey: String!, $includeInactive: Boolean) {
2515
+ gameScanRegions(publisherSlug: $publisherSlug, gameKey: $gameKey, includeInactive: $includeInactive) {
2516
+ ${GAME_SCAN_REGION_FIELDS}
2517
+ }
2518
+ }
2519
+ `
2520
+ };
2521
+ },
2193
2522
  exportJob() {
2194
2523
  return {
2195
2524
  query: `
@@ -3320,6 +3649,39 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
3320
3649
  fileUploadRequestVariables(input) {
3321
3650
  return { input };
3322
3651
  },
3652
+ createScanUploadSessionVariables(input) {
3653
+ return { input };
3654
+ },
3655
+ confirmScanUploadVariables(input) {
3656
+ return { input };
3657
+ },
3658
+ createScanJobVariables(input) {
3659
+ return { input };
3660
+ },
3661
+ submitScanFeedbackVariables(input) {
3662
+ return { input };
3663
+ },
3664
+ scanMetricsVariables(input) {
3665
+ return { input };
3666
+ },
3667
+ resolveScanTemplateVariables(input) {
3668
+ return { input };
3669
+ },
3670
+ scanTemplatesVariables(input) {
3671
+ return { input };
3672
+ },
3673
+ createScanTemplateVariables(input) {
3674
+ return { input };
3675
+ },
3676
+ updateScanTemplateVariables(id, input) {
3677
+ return { id, input };
3678
+ },
3679
+ previewScanTemplateVariables(input) {
3680
+ return { input };
3681
+ },
3682
+ gameScanRegionsVariables(publisherSlug, gameKey, includeInactive) {
3683
+ return includeInactive === void 0 ? { publisherSlug, gameKey } : { publisherSlug, gameKey, includeInactive };
3684
+ },
3323
3685
  datasetExportVariables(input) {
3324
3686
  return { input };
3325
3687
  },