@carddb/core 0.2.0 → 0.3.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 +1351 -158
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +766 -9
- package/dist/index.d.ts +766 -9
- package/dist/index.js +1351 -158
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -303,6 +303,27 @@ function resolveFilter(input) {
|
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
// src/query-builder.ts
|
|
306
|
+
var FILE_FIELDS = `
|
|
307
|
+
id
|
|
308
|
+
createdAt
|
|
309
|
+
updatedAt
|
|
310
|
+
key
|
|
311
|
+
filename
|
|
312
|
+
contentType
|
|
313
|
+
size
|
|
314
|
+
status
|
|
315
|
+
isPublic
|
|
316
|
+
entityType
|
|
317
|
+
entityId
|
|
318
|
+
url
|
|
319
|
+
`;
|
|
320
|
+
var PRESIGNED_UPLOAD_FIELDS = `
|
|
321
|
+
file {
|
|
322
|
+
${FILE_FIELDS}
|
|
323
|
+
}
|
|
324
|
+
uploadUrl
|
|
325
|
+
expiresAt
|
|
326
|
+
`;
|
|
306
327
|
var PUBLISHER_FIELDS = `
|
|
307
328
|
id
|
|
308
329
|
name
|
|
@@ -327,6 +348,8 @@ var GAME_FIELDS = `
|
|
|
327
348
|
key
|
|
328
349
|
name
|
|
329
350
|
description
|
|
351
|
+
metafyGameUuid
|
|
352
|
+
metafyGameSlug
|
|
330
353
|
website
|
|
331
354
|
visibility
|
|
332
355
|
isArchived
|
|
@@ -354,8 +377,13 @@ var DATASET_FIELDS = `
|
|
|
354
377
|
name
|
|
355
378
|
description
|
|
356
379
|
purpose
|
|
380
|
+
activeVersionId
|
|
357
381
|
tcgplayerProductIdFieldKey
|
|
358
382
|
visibility
|
|
383
|
+
posX
|
|
384
|
+
posY
|
|
385
|
+
sortOrder
|
|
386
|
+
archivedAt
|
|
359
387
|
isArchived
|
|
360
388
|
createdAt
|
|
361
389
|
updatedAt
|
|
@@ -385,10 +413,28 @@ function fieldInfoFields(depth) {
|
|
|
385
413
|
filterable
|
|
386
414
|
searchable
|
|
387
415
|
isIdentifier
|
|
416
|
+
sortOrder
|
|
388
417
|
itemType
|
|
418
|
+
linkDatasetId
|
|
419
|
+
linkDatasetKey
|
|
420
|
+
linkDatasetName
|
|
421
|
+
linkFieldKey
|
|
422
|
+
linkAlias
|
|
423
|
+
linkDirection
|
|
389
424
|
displayFormat
|
|
390
425
|
semanticType
|
|
426
|
+
placeholder
|
|
427
|
+
isHidden
|
|
428
|
+
isComputed
|
|
429
|
+
isSystemField
|
|
430
|
+
defaultValue
|
|
391
431
|
allowedValues
|
|
432
|
+
minLength
|
|
433
|
+
maxLength
|
|
434
|
+
minValue
|
|
435
|
+
maxValue
|
|
436
|
+
pattern
|
|
437
|
+
isUnique
|
|
392
438
|
${nestedFields}
|
|
393
439
|
`;
|
|
394
440
|
}
|
|
@@ -405,9 +451,48 @@ var SCHEMA_FIELDS = `
|
|
|
405
451
|
targetDatasetKey
|
|
406
452
|
targetDatasetName
|
|
407
453
|
targetDatasetId
|
|
454
|
+
targetFieldKey
|
|
455
|
+
linkAlias
|
|
456
|
+
linkDirection
|
|
457
|
+
isArray
|
|
408
458
|
}
|
|
409
459
|
}
|
|
410
460
|
`;
|
|
461
|
+
var OBJECT_FIELD_FIELDS = `
|
|
462
|
+
id
|
|
463
|
+
objectTypeId
|
|
464
|
+
key
|
|
465
|
+
label
|
|
466
|
+
dataType
|
|
467
|
+
isRequired
|
|
468
|
+
isFilterable
|
|
469
|
+
isSearchable
|
|
470
|
+
isIdentifier
|
|
471
|
+
sortOrder
|
|
472
|
+
description
|
|
473
|
+
placeholder
|
|
474
|
+
displayFormat
|
|
475
|
+
semanticType
|
|
476
|
+
isHidden
|
|
477
|
+
isComputed
|
|
478
|
+
isSystemField
|
|
479
|
+
defaultValue
|
|
480
|
+
allowedValues
|
|
481
|
+
minLength
|
|
482
|
+
maxLength
|
|
483
|
+
minValue
|
|
484
|
+
maxValue
|
|
485
|
+
pattern
|
|
486
|
+
isUnique
|
|
487
|
+
itemType
|
|
488
|
+
linkDatasetId
|
|
489
|
+
linkFieldKey
|
|
490
|
+
linkAlias
|
|
491
|
+
linkDirection
|
|
492
|
+
parentFieldId
|
|
493
|
+
createdAt
|
|
494
|
+
updatedAt
|
|
495
|
+
`;
|
|
411
496
|
var TCGPLAYER_PRICING_FIELDS = `
|
|
412
497
|
pricing {
|
|
413
498
|
productId
|
|
@@ -874,6 +959,305 @@ var RESOLVED_LINKS_FIELDS = `
|
|
|
874
959
|
}
|
|
875
960
|
}
|
|
876
961
|
`;
|
|
962
|
+
var BULK_RECORD_ERROR_FIELDS = `
|
|
963
|
+
datasetKey
|
|
964
|
+
index
|
|
965
|
+
errors {
|
|
966
|
+
field
|
|
967
|
+
message
|
|
968
|
+
details
|
|
969
|
+
}
|
|
970
|
+
`;
|
|
971
|
+
var IMPORT_STATS_FIELDS = `
|
|
972
|
+
total
|
|
973
|
+
inserted
|
|
974
|
+
updated
|
|
975
|
+
skipped
|
|
976
|
+
failed
|
|
977
|
+
`;
|
|
978
|
+
var BULK_IMPORT_RESULT_FIELDS = `
|
|
979
|
+
inserted {
|
|
980
|
+
${RECORD_FIELDS}
|
|
981
|
+
}
|
|
982
|
+
updated {
|
|
983
|
+
${RECORD_FIELDS}
|
|
984
|
+
}
|
|
985
|
+
skipped
|
|
986
|
+
errors {
|
|
987
|
+
${BULK_RECORD_ERROR_FIELDS}
|
|
988
|
+
}
|
|
989
|
+
createdFields {
|
|
990
|
+
${OBJECT_FIELD_FIELDS}
|
|
991
|
+
}
|
|
992
|
+
stats {
|
|
993
|
+
${IMPORT_STATS_FIELDS}
|
|
994
|
+
}
|
|
995
|
+
`;
|
|
996
|
+
var IMPORT_JOB_ASSET_FIELDS = `
|
|
997
|
+
fileId
|
|
998
|
+
filename
|
|
999
|
+
file {
|
|
1000
|
+
${FILE_FIELDS}
|
|
1001
|
+
}
|
|
1002
|
+
`;
|
|
1003
|
+
var IMPORT_JOB_FIELDS = `
|
|
1004
|
+
id
|
|
1005
|
+
publisherId
|
|
1006
|
+
publisher {
|
|
1007
|
+
${PUBLISHER_FIELDS}
|
|
1008
|
+
}
|
|
1009
|
+
datasetId
|
|
1010
|
+
dataset {
|
|
1011
|
+
${DATASET_FIELDS}
|
|
1012
|
+
${SCHEMA_FIELDS}
|
|
1013
|
+
}
|
|
1014
|
+
accountId
|
|
1015
|
+
status
|
|
1016
|
+
mode
|
|
1017
|
+
onConflict
|
|
1018
|
+
format
|
|
1019
|
+
fileId
|
|
1020
|
+
progress
|
|
1021
|
+
totalRecords
|
|
1022
|
+
processedRecords
|
|
1023
|
+
insertedCount
|
|
1024
|
+
updatedCount
|
|
1025
|
+
skippedCount
|
|
1026
|
+
failedCount
|
|
1027
|
+
createdFields {
|
|
1028
|
+
${OBJECT_FIELD_FIELDS}
|
|
1029
|
+
}
|
|
1030
|
+
errors {
|
|
1031
|
+
${BULK_RECORD_ERROR_FIELDS}
|
|
1032
|
+
}
|
|
1033
|
+
errorMessage
|
|
1034
|
+
assets {
|
|
1035
|
+
${IMPORT_JOB_ASSET_FIELDS}
|
|
1036
|
+
}
|
|
1037
|
+
startedAt
|
|
1038
|
+
completedAt
|
|
1039
|
+
createdAt
|
|
1040
|
+
updatedAt
|
|
1041
|
+
lastCheckpointIndex
|
|
1042
|
+
isResumed
|
|
1043
|
+
imagesPending
|
|
1044
|
+
imagesCompleted
|
|
1045
|
+
imagesFailed
|
|
1046
|
+
`;
|
|
1047
|
+
var IMPORT_JOB_LOG_FIELDS = `
|
|
1048
|
+
id
|
|
1049
|
+
importJobId
|
|
1050
|
+
level
|
|
1051
|
+
message
|
|
1052
|
+
datasetKey
|
|
1053
|
+
recordIndex
|
|
1054
|
+
fieldKey
|
|
1055
|
+
details
|
|
1056
|
+
createdAt
|
|
1057
|
+
`;
|
|
1058
|
+
var DATASET_RECORDS_UPSERT_PAYLOAD_FIELDS = `
|
|
1059
|
+
job {
|
|
1060
|
+
${IMPORT_JOB_FIELDS}
|
|
1061
|
+
}
|
|
1062
|
+
dryRunResult {
|
|
1063
|
+
${BULK_IMPORT_RESULT_FIELDS}
|
|
1064
|
+
}
|
|
1065
|
+
`;
|
|
1066
|
+
var DELETE_JOB_RESULT_FIELDS = `
|
|
1067
|
+
target
|
|
1068
|
+
recordId
|
|
1069
|
+
identifier
|
|
1070
|
+
status
|
|
1071
|
+
message
|
|
1072
|
+
`;
|
|
1073
|
+
var DATASET_RECORD_DELETE_JOB_FIELDS = `
|
|
1074
|
+
id
|
|
1075
|
+
publisherId
|
|
1076
|
+
publisher {
|
|
1077
|
+
${PUBLISHER_FIELDS}
|
|
1078
|
+
}
|
|
1079
|
+
datasetId
|
|
1080
|
+
dataset {
|
|
1081
|
+
${DATASET_FIELDS}
|
|
1082
|
+
}
|
|
1083
|
+
accountId
|
|
1084
|
+
status
|
|
1085
|
+
targetType
|
|
1086
|
+
dryRun
|
|
1087
|
+
targets
|
|
1088
|
+
progress
|
|
1089
|
+
totalTargets
|
|
1090
|
+
processedTargets
|
|
1091
|
+
matchedCount
|
|
1092
|
+
deletedCount
|
|
1093
|
+
missingCount
|
|
1094
|
+
blockedCount
|
|
1095
|
+
failedCount
|
|
1096
|
+
results {
|
|
1097
|
+
${DELETE_JOB_RESULT_FIELDS}
|
|
1098
|
+
}
|
|
1099
|
+
errorMessage
|
|
1100
|
+
startedAt
|
|
1101
|
+
completedAt
|
|
1102
|
+
createdAt
|
|
1103
|
+
updatedAt
|
|
1104
|
+
`;
|
|
1105
|
+
var FIELD_MAPPING_FIELDS = `
|
|
1106
|
+
sourceField
|
|
1107
|
+
targetField
|
|
1108
|
+
targetFieldLabel
|
|
1109
|
+
inferredType
|
|
1110
|
+
inferredItemType
|
|
1111
|
+
inferredChildren {
|
|
1112
|
+
key
|
|
1113
|
+
label
|
|
1114
|
+
type
|
|
1115
|
+
required
|
|
1116
|
+
itemType
|
|
1117
|
+
children {
|
|
1118
|
+
key
|
|
1119
|
+
label
|
|
1120
|
+
type
|
|
1121
|
+
required
|
|
1122
|
+
itemType
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
inferredLinkDataset
|
|
1126
|
+
inferredLinkFieldKey
|
|
1127
|
+
inferredLinkDirection
|
|
1128
|
+
targetFieldType
|
|
1129
|
+
sampleValues
|
|
1130
|
+
status
|
|
1131
|
+
`;
|
|
1132
|
+
var IMPORT_WARNING_FIELDS = `
|
|
1133
|
+
datasetKey
|
|
1134
|
+
field
|
|
1135
|
+
message
|
|
1136
|
+
severity
|
|
1137
|
+
`;
|
|
1138
|
+
var DATASET_IMPORT_PREVIEW_FIELDS = `
|
|
1139
|
+
datasetKey
|
|
1140
|
+
datasetName
|
|
1141
|
+
datasetId
|
|
1142
|
+
exists
|
|
1143
|
+
recordCount
|
|
1144
|
+
fieldMappings {
|
|
1145
|
+
${FIELD_MAPPING_FIELDS}
|
|
1146
|
+
}
|
|
1147
|
+
warnings {
|
|
1148
|
+
${IMPORT_WARNING_FIELDS}
|
|
1149
|
+
}
|
|
1150
|
+
canProceed
|
|
1151
|
+
sampleRecords
|
|
1152
|
+
availableDatasets {
|
|
1153
|
+
${DATASET_FIELDS}
|
|
1154
|
+
${SCHEMA_FIELDS}
|
|
1155
|
+
}
|
|
1156
|
+
`;
|
|
1157
|
+
var GAME_IMPORT_PREVIEW_FIELDS = `
|
|
1158
|
+
datasets {
|
|
1159
|
+
datasetKey
|
|
1160
|
+
datasetName
|
|
1161
|
+
datasetId
|
|
1162
|
+
exists
|
|
1163
|
+
recordCount
|
|
1164
|
+
fieldMappings {
|
|
1165
|
+
${FIELD_MAPPING_FIELDS}
|
|
1166
|
+
}
|
|
1167
|
+
warnings {
|
|
1168
|
+
${IMPORT_WARNING_FIELDS}
|
|
1169
|
+
}
|
|
1170
|
+
sampleRecords
|
|
1171
|
+
}
|
|
1172
|
+
importOrder
|
|
1173
|
+
warnings {
|
|
1174
|
+
${IMPORT_WARNING_FIELDS}
|
|
1175
|
+
}
|
|
1176
|
+
canProceed
|
|
1177
|
+
`;
|
|
1178
|
+
var GAME_IMPORT_DATASET_STATUS_FIELDS = `
|
|
1179
|
+
datasetKey
|
|
1180
|
+
datasetId
|
|
1181
|
+
datasetName
|
|
1182
|
+
status
|
|
1183
|
+
recordCount
|
|
1184
|
+
insertedCount
|
|
1185
|
+
updatedCount
|
|
1186
|
+
skippedCount
|
|
1187
|
+
failedCount
|
|
1188
|
+
errorMessage
|
|
1189
|
+
`;
|
|
1190
|
+
var GAME_IMPORT_JOB_FIELDS = `
|
|
1191
|
+
id
|
|
1192
|
+
publisherId
|
|
1193
|
+
publisher {
|
|
1194
|
+
${PUBLISHER_FIELDS}
|
|
1195
|
+
}
|
|
1196
|
+
gameId
|
|
1197
|
+
game {
|
|
1198
|
+
${GAME_FIELDS}
|
|
1199
|
+
}
|
|
1200
|
+
accountId
|
|
1201
|
+
status
|
|
1202
|
+
mode
|
|
1203
|
+
onConflict
|
|
1204
|
+
fileId
|
|
1205
|
+
assets {
|
|
1206
|
+
${IMPORT_JOB_ASSET_FIELDS}
|
|
1207
|
+
}
|
|
1208
|
+
totalDatasets
|
|
1209
|
+
completedDatasets
|
|
1210
|
+
progress
|
|
1211
|
+
importOrder
|
|
1212
|
+
datasetStatuses {
|
|
1213
|
+
${GAME_IMPORT_DATASET_STATUS_FIELDS}
|
|
1214
|
+
}
|
|
1215
|
+
errorMessage
|
|
1216
|
+
startedAt
|
|
1217
|
+
completedAt
|
|
1218
|
+
createdAt
|
|
1219
|
+
updatedAt
|
|
1220
|
+
completedDatasetKeys
|
|
1221
|
+
currentDatasetKey
|
|
1222
|
+
lastCheckpointIndex
|
|
1223
|
+
isResumed
|
|
1224
|
+
imagesPending
|
|
1225
|
+
imagesCompleted
|
|
1226
|
+
imagesFailed
|
|
1227
|
+
phase
|
|
1228
|
+
linkBuildingDataset
|
|
1229
|
+
linkBuildingTotalDatasets
|
|
1230
|
+
linkBuildingCompletedDatasets
|
|
1231
|
+
linkBuildingProcessedRecords
|
|
1232
|
+
linkBuildingTotalRecords
|
|
1233
|
+
`;
|
|
1234
|
+
var EXPORT_JOB_FIELDS = `
|
|
1235
|
+
id
|
|
1236
|
+
publisherId
|
|
1237
|
+
publisher {
|
|
1238
|
+
${PUBLISHER_FIELDS}
|
|
1239
|
+
}
|
|
1240
|
+
datasetId
|
|
1241
|
+
dataset {
|
|
1242
|
+
${DATASET_FIELDS}
|
|
1243
|
+
}
|
|
1244
|
+
accountId
|
|
1245
|
+
status
|
|
1246
|
+
format
|
|
1247
|
+
filter
|
|
1248
|
+
totalRecords
|
|
1249
|
+
processedRecords
|
|
1250
|
+
progress
|
|
1251
|
+
fileId
|
|
1252
|
+
downloadUrl
|
|
1253
|
+
downloadExpiresAt
|
|
1254
|
+
errorMessage
|
|
1255
|
+
startedAt
|
|
1256
|
+
completedAt
|
|
1257
|
+
createdAt
|
|
1258
|
+
updatedAt
|
|
1259
|
+
lastCheckpointIndex
|
|
1260
|
+
`;
|
|
877
1261
|
function connectionFields(nodeFields) {
|
|
878
1262
|
return `
|
|
879
1263
|
totalCount
|
|
@@ -928,131 +1312,862 @@ var QueryBuilder = {
|
|
|
928
1312
|
fetchPublisherById() {
|
|
929
1313
|
return {
|
|
930
1314
|
query: `
|
|
931
|
-
query FetchPublisher($id: UUID!) {
|
|
932
|
-
fetchPublisher(id: $id) {
|
|
933
|
-
${PUBLISHER_FIELDS}
|
|
1315
|
+
query FetchPublisher($id: UUID!) {
|
|
1316
|
+
fetchPublisher(id: $id) {
|
|
1317
|
+
${PUBLISHER_FIELDS}
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
`
|
|
1321
|
+
};
|
|
1322
|
+
},
|
|
1323
|
+
fetchPublisherBySlug() {
|
|
1324
|
+
return {
|
|
1325
|
+
query: `
|
|
1326
|
+
query FetchPublisher($slug: String!) {
|
|
1327
|
+
fetchPublisher(slug: $slug) {
|
|
1328
|
+
${PUBLISHER_FIELDS}
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
`
|
|
1332
|
+
};
|
|
1333
|
+
},
|
|
1334
|
+
fetchPublishers() {
|
|
1335
|
+
return {
|
|
1336
|
+
query: `
|
|
1337
|
+
query FetchPublishers($slugs: [String!]!) {
|
|
1338
|
+
fetchPublishers(slugs: $slugs) {
|
|
1339
|
+
${PUBLISHER_FIELDS}
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
`
|
|
1343
|
+
};
|
|
1344
|
+
},
|
|
1345
|
+
// Games
|
|
1346
|
+
searchGames(params = {}) {
|
|
1347
|
+
const variables = {};
|
|
1348
|
+
const args = [];
|
|
1349
|
+
const defs = [];
|
|
1350
|
+
if (params.publisherSlug !== void 0) {
|
|
1351
|
+
defs.push("$publisherSlug: String");
|
|
1352
|
+
args.push("publisherSlug: $publisherSlug");
|
|
1353
|
+
variables["publisherSlug"] = params.publisherSlug;
|
|
1354
|
+
}
|
|
1355
|
+
if (params.search !== void 0) {
|
|
1356
|
+
defs.push("$search: String");
|
|
1357
|
+
args.push("search: $search");
|
|
1358
|
+
variables["search"] = params.search;
|
|
1359
|
+
}
|
|
1360
|
+
if (params.first !== void 0) {
|
|
1361
|
+
defs.push("$first: Int");
|
|
1362
|
+
args.push("first: $first");
|
|
1363
|
+
variables["first"] = params.first;
|
|
1364
|
+
}
|
|
1365
|
+
if (params.after !== void 0) {
|
|
1366
|
+
defs.push("$after: String");
|
|
1367
|
+
args.push("after: $after");
|
|
1368
|
+
variables["after"] = params.after;
|
|
1369
|
+
}
|
|
1370
|
+
const defStr = defs.length > 0 ? `(${defs.join(", ")})` : "";
|
|
1371
|
+
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
1372
|
+
return {
|
|
1373
|
+
query: `
|
|
1374
|
+
query SearchGames${defStr} {
|
|
1375
|
+
searchGames${argStr} {
|
|
1376
|
+
${connectionFields(GAME_FIELDS)}
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
`,
|
|
1380
|
+
variables
|
|
1381
|
+
};
|
|
1382
|
+
},
|
|
1383
|
+
fetchGameById() {
|
|
1384
|
+
return {
|
|
1385
|
+
query: `
|
|
1386
|
+
query FetchGame($id: UUID!) {
|
|
1387
|
+
fetchGame(id: $id) {
|
|
1388
|
+
${GAME_FIELDS}
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
`
|
|
1392
|
+
};
|
|
1393
|
+
},
|
|
1394
|
+
fetchGameByKeys() {
|
|
1395
|
+
return {
|
|
1396
|
+
query: `
|
|
1397
|
+
query FetchGame($publisherSlug: String!, $gameKey: String!) {
|
|
1398
|
+
fetchGame(publisherSlug: $publisherSlug, gameKey: $gameKey) {
|
|
1399
|
+
${GAME_FIELDS}
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
`
|
|
1403
|
+
};
|
|
1404
|
+
},
|
|
1405
|
+
fetchGames() {
|
|
1406
|
+
return {
|
|
1407
|
+
query: `
|
|
1408
|
+
query FetchGames($ids: [UUID!]!) {
|
|
1409
|
+
fetchGames(ids: $ids) {
|
|
1410
|
+
${GAME_FIELDS}
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
`
|
|
1414
|
+
};
|
|
1415
|
+
},
|
|
1416
|
+
listGames(params) {
|
|
1417
|
+
const variables = { publisherId: params.publisherId };
|
|
1418
|
+
const args = ["publisherId: $publisherId"];
|
|
1419
|
+
const defs = ["$publisherId: UUID!"];
|
|
1420
|
+
if (params.first !== void 0) {
|
|
1421
|
+
defs.push("$first: Int");
|
|
1422
|
+
args.push("first: $first");
|
|
1423
|
+
variables["first"] = params.first;
|
|
1424
|
+
}
|
|
1425
|
+
if (params.after !== void 0) {
|
|
1426
|
+
defs.push("$after: String");
|
|
1427
|
+
args.push("after: $after");
|
|
1428
|
+
variables["after"] = params.after;
|
|
1429
|
+
}
|
|
1430
|
+
if (params.includeArchived !== void 0) {
|
|
1431
|
+
defs.push("$includeArchived: Boolean");
|
|
1432
|
+
args.push("includeArchived: $includeArchived");
|
|
1433
|
+
variables["includeArchived"] = params.includeArchived;
|
|
1434
|
+
}
|
|
1435
|
+
return {
|
|
1436
|
+
query: `
|
|
1437
|
+
query Games(${defs.join(", ")}) {
|
|
1438
|
+
games(${args.join(", ")}) {
|
|
1439
|
+
${connectionFields(GAME_FIELDS)}
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
`,
|
|
1443
|
+
variables
|
|
1444
|
+
};
|
|
1445
|
+
},
|
|
1446
|
+
game(params) {
|
|
1447
|
+
const variables = {};
|
|
1448
|
+
const args = [];
|
|
1449
|
+
const defs = [];
|
|
1450
|
+
if (params.id !== void 0) {
|
|
1451
|
+
defs.push("$id: UUID");
|
|
1452
|
+
args.push("id: $id");
|
|
1453
|
+
variables["id"] = params.id;
|
|
1454
|
+
}
|
|
1455
|
+
if (params.publisherId !== void 0) {
|
|
1456
|
+
defs.push("$publisherId: UUID");
|
|
1457
|
+
args.push("publisherId: $publisherId");
|
|
1458
|
+
variables["publisherId"] = params.publisherId;
|
|
1459
|
+
}
|
|
1460
|
+
if (params.publisherSlug !== void 0) {
|
|
1461
|
+
defs.push("$publisherSlug: String");
|
|
1462
|
+
args.push("publisherSlug: $publisherSlug");
|
|
1463
|
+
variables["publisherSlug"] = params.publisherSlug;
|
|
1464
|
+
}
|
|
1465
|
+
if (params.gameKey !== void 0) {
|
|
1466
|
+
defs.push("$gameKey: String");
|
|
1467
|
+
args.push("gameKey: $gameKey");
|
|
1468
|
+
variables["gameKey"] = params.gameKey;
|
|
1469
|
+
}
|
|
1470
|
+
if (params.gameSlug !== void 0) {
|
|
1471
|
+
defs.push("$gameSlug: String");
|
|
1472
|
+
args.push("gameSlug: $gameSlug");
|
|
1473
|
+
variables["gameSlug"] = params.gameSlug;
|
|
1474
|
+
}
|
|
1475
|
+
return {
|
|
1476
|
+
query: `
|
|
1477
|
+
query Game(${defs.join(", ")}) {
|
|
1478
|
+
game(${args.join(", ")}) {
|
|
1479
|
+
${GAME_FIELDS}
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
`,
|
|
1483
|
+
variables
|
|
1484
|
+
};
|
|
1485
|
+
},
|
|
1486
|
+
createGame() {
|
|
1487
|
+
return {
|
|
1488
|
+
query: `
|
|
1489
|
+
mutation GameCreate($input: GameCreateInput!) {
|
|
1490
|
+
gameCreate(input: $input) {
|
|
1491
|
+
${GAME_FIELDS}
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
`
|
|
1495
|
+
};
|
|
1496
|
+
},
|
|
1497
|
+
updateGame() {
|
|
1498
|
+
return {
|
|
1499
|
+
query: `
|
|
1500
|
+
mutation GameUpdate($id: UUID!, $input: GameUpdateInput!) {
|
|
1501
|
+
gameUpdate(id: $id, input: $input) {
|
|
1502
|
+
${GAME_FIELDS}
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
`
|
|
1506
|
+
};
|
|
1507
|
+
},
|
|
1508
|
+
// Datasets
|
|
1509
|
+
searchDatasets(params = {}) {
|
|
1510
|
+
const variables = {};
|
|
1511
|
+
const args = [];
|
|
1512
|
+
const defs = [];
|
|
1513
|
+
if (params.publisherSlug !== void 0) {
|
|
1514
|
+
defs.push("$publisherSlug: String");
|
|
1515
|
+
args.push("publisherSlug: $publisherSlug");
|
|
1516
|
+
variables["publisherSlug"] = params.publisherSlug;
|
|
1517
|
+
}
|
|
1518
|
+
if (params.gameKey !== void 0) {
|
|
1519
|
+
defs.push("$gameKey: String");
|
|
1520
|
+
args.push("gameKey: $gameKey");
|
|
1521
|
+
variables["gameKey"] = params.gameKey;
|
|
1522
|
+
}
|
|
1523
|
+
if (params.search !== void 0) {
|
|
1524
|
+
defs.push("$search: String");
|
|
1525
|
+
args.push("search: $search");
|
|
1526
|
+
variables["search"] = params.search;
|
|
1527
|
+
}
|
|
1528
|
+
if (params.purpose !== void 0) {
|
|
1529
|
+
defs.push("$purpose: DatasetPurpose");
|
|
1530
|
+
args.push("purpose: $purpose");
|
|
1531
|
+
variables["purpose"] = params.purpose;
|
|
1532
|
+
}
|
|
1533
|
+
if (params.first !== void 0) {
|
|
1534
|
+
defs.push("$first: Int");
|
|
1535
|
+
args.push("first: $first");
|
|
1536
|
+
variables["first"] = params.first;
|
|
1537
|
+
}
|
|
1538
|
+
if (params.after !== void 0) {
|
|
1539
|
+
defs.push("$after: String");
|
|
1540
|
+
args.push("after: $after");
|
|
1541
|
+
variables["after"] = params.after;
|
|
1542
|
+
}
|
|
1543
|
+
const defStr = defs.length > 0 ? `(${defs.join(", ")})` : "";
|
|
1544
|
+
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
1545
|
+
return {
|
|
1546
|
+
query: `
|
|
1547
|
+
query SearchDatasets${defStr} {
|
|
1548
|
+
searchDatasets${argStr} {
|
|
1549
|
+
${connectionFields(DATASET_FIELDS)}
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
`,
|
|
1553
|
+
variables
|
|
1554
|
+
};
|
|
1555
|
+
},
|
|
1556
|
+
fetchDatasetById() {
|
|
1557
|
+
return {
|
|
1558
|
+
query: `
|
|
1559
|
+
query FetchDataset($id: UUID!) {
|
|
1560
|
+
fetchDataset(id: $id) {
|
|
1561
|
+
${DATASET_FIELDS}
|
|
1562
|
+
${SCHEMA_FIELDS}
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
`
|
|
1566
|
+
};
|
|
1567
|
+
},
|
|
1568
|
+
fetchDatasetByKeys() {
|
|
1569
|
+
return {
|
|
1570
|
+
query: `
|
|
1571
|
+
query FetchDataset($publisherSlug: String!, $gameKey: String!, $datasetKey: String!) {
|
|
1572
|
+
fetchDataset(publisherSlug: $publisherSlug, gameKey: $gameKey, datasetKey: $datasetKey) {
|
|
1573
|
+
${DATASET_FIELDS}
|
|
1574
|
+
${SCHEMA_FIELDS}
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
`
|
|
1578
|
+
};
|
|
1579
|
+
},
|
|
1580
|
+
fetchDatasets() {
|
|
1581
|
+
return {
|
|
1582
|
+
query: `
|
|
1583
|
+
query FetchDatasets($ids: [UUID!]!) {
|
|
1584
|
+
fetchDatasets(ids: $ids) {
|
|
1585
|
+
${DATASET_FIELDS}
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
`
|
|
1589
|
+
};
|
|
1590
|
+
},
|
|
1591
|
+
listDatasets(params) {
|
|
1592
|
+
const variables = { publisherId: params.publisherId };
|
|
1593
|
+
const args = ["publisherId: $publisherId"];
|
|
1594
|
+
const defs = ["$publisherId: UUID!"];
|
|
1595
|
+
if (params.gameId !== void 0) {
|
|
1596
|
+
defs.push("$gameId: UUID");
|
|
1597
|
+
args.push("gameId: $gameId");
|
|
1598
|
+
variables["gameId"] = params.gameId;
|
|
1599
|
+
}
|
|
1600
|
+
if (params.first !== void 0) {
|
|
1601
|
+
defs.push("$first: Int");
|
|
1602
|
+
args.push("first: $first");
|
|
1603
|
+
variables["first"] = params.first;
|
|
1604
|
+
}
|
|
1605
|
+
if (params.after !== void 0) {
|
|
1606
|
+
defs.push("$after: String");
|
|
1607
|
+
args.push("after: $after");
|
|
1608
|
+
variables["after"] = params.after;
|
|
1609
|
+
}
|
|
1610
|
+
if (params.includeArchived !== void 0) {
|
|
1611
|
+
defs.push("$includeArchived: Boolean");
|
|
1612
|
+
args.push("includeArchived: $includeArchived");
|
|
1613
|
+
variables["includeArchived"] = params.includeArchived;
|
|
1614
|
+
}
|
|
1615
|
+
if (params.purpose !== void 0) {
|
|
1616
|
+
defs.push("$purpose: DatasetPurpose");
|
|
1617
|
+
args.push("purpose: $purpose");
|
|
1618
|
+
variables["purpose"] = params.purpose;
|
|
1619
|
+
}
|
|
1620
|
+
return {
|
|
1621
|
+
query: `
|
|
1622
|
+
query Datasets(${defs.join(", ")}) {
|
|
1623
|
+
datasets(${args.join(", ")}) {
|
|
1624
|
+
${connectionFields(`${DATASET_FIELDS}
|
|
1625
|
+
${SCHEMA_FIELDS}`)}
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
`,
|
|
1629
|
+
variables
|
|
1630
|
+
};
|
|
1631
|
+
},
|
|
1632
|
+
dataset(params) {
|
|
1633
|
+
const variables = {};
|
|
1634
|
+
const args = [];
|
|
1635
|
+
const defs = [];
|
|
1636
|
+
if (params.id !== void 0) {
|
|
1637
|
+
defs.push("$id: UUID");
|
|
1638
|
+
args.push("id: $id");
|
|
1639
|
+
variables["id"] = params.id;
|
|
1640
|
+
}
|
|
1641
|
+
if (params.publisherId !== void 0) {
|
|
1642
|
+
defs.push("$publisherId: UUID");
|
|
1643
|
+
args.push("publisherId: $publisherId");
|
|
1644
|
+
variables["publisherId"] = params.publisherId;
|
|
1645
|
+
}
|
|
1646
|
+
if (params.gameId !== void 0) {
|
|
1647
|
+
defs.push("$gameId: UUID");
|
|
1648
|
+
args.push("gameId: $gameId");
|
|
1649
|
+
variables["gameId"] = params.gameId;
|
|
1650
|
+
}
|
|
1651
|
+
if (params.datasetKey !== void 0) {
|
|
1652
|
+
defs.push("$datasetKey: String");
|
|
1653
|
+
args.push("datasetKey: $datasetKey");
|
|
1654
|
+
variables["datasetKey"] = params.datasetKey;
|
|
1655
|
+
}
|
|
1656
|
+
return {
|
|
1657
|
+
query: `
|
|
1658
|
+
query Dataset(${defs.join(", ")}) {
|
|
1659
|
+
dataset(${args.join(", ")}) {
|
|
1660
|
+
${DATASET_FIELDS}
|
|
1661
|
+
${SCHEMA_FIELDS}
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
`,
|
|
1665
|
+
variables
|
|
1666
|
+
};
|
|
1667
|
+
},
|
|
1668
|
+
// Records
|
|
1669
|
+
searchRecords(params) {
|
|
1670
|
+
const variables = {
|
|
1671
|
+
publisherSlug: params.publisherSlug,
|
|
1672
|
+
gameKey: params.gameKey,
|
|
1673
|
+
datasetKey: params.datasetKey
|
|
1674
|
+
};
|
|
1675
|
+
const args = [
|
|
1676
|
+
"publisherSlug: $publisherSlug",
|
|
1677
|
+
"gameKey: $gameKey",
|
|
1678
|
+
"datasetKey: $datasetKey"
|
|
1679
|
+
];
|
|
1680
|
+
const defs = ["$publisherSlug: String!", "$gameKey: String!", "$datasetKey: String!"];
|
|
1681
|
+
if (params.filter !== void 0) {
|
|
1682
|
+
defs.push("$filter: JSON");
|
|
1683
|
+
args.push("filter: $filter");
|
|
1684
|
+
variables["filter"] = params.filter;
|
|
1685
|
+
}
|
|
1686
|
+
if (params.search !== void 0) {
|
|
1687
|
+
defs.push("$search: String");
|
|
1688
|
+
args.push("search: $search");
|
|
1689
|
+
variables["search"] = params.search;
|
|
1690
|
+
}
|
|
1691
|
+
if (params.orderBy !== void 0) {
|
|
1692
|
+
defs.push("$orderBy: String");
|
|
1693
|
+
args.push("orderBy: $orderBy");
|
|
1694
|
+
variables["orderBy"] = params.orderBy;
|
|
1695
|
+
}
|
|
1696
|
+
if (params.resolveLinks !== void 0) {
|
|
1697
|
+
defs.push("$resolveLinks: [String!]");
|
|
1698
|
+
args.push("resolveLinks: $resolveLinks");
|
|
1699
|
+
variables["resolveLinks"] = params.resolveLinks;
|
|
1700
|
+
}
|
|
1701
|
+
if (params.first !== void 0) {
|
|
1702
|
+
defs.push("$first: Int");
|
|
1703
|
+
args.push("first: $first");
|
|
1704
|
+
variables["first"] = params.first;
|
|
1705
|
+
}
|
|
1706
|
+
if (params.after !== void 0) {
|
|
1707
|
+
defs.push("$after: String");
|
|
1708
|
+
args.push("after: $after");
|
|
1709
|
+
variables["after"] = params.after;
|
|
1710
|
+
}
|
|
1711
|
+
if (params.validateSchema !== void 0) {
|
|
1712
|
+
defs.push("$validateSchema: Boolean");
|
|
1713
|
+
args.push("validateSchema: $validateSchema");
|
|
1714
|
+
variables["validateSchema"] = params.validateSchema;
|
|
1715
|
+
}
|
|
1716
|
+
const includeResolvedLinks = params.resolveLinks && params.resolveLinks.length > 0;
|
|
1717
|
+
const selectedRecordFields = recordFields({ includePricing: params.includePricing });
|
|
1718
|
+
const nodeFields = includeResolvedLinks ? `${selectedRecordFields}
|
|
1719
|
+
${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
1720
|
+
return {
|
|
1721
|
+
query: `
|
|
1722
|
+
query SearchRecords(${defs.join(", ")}) {
|
|
1723
|
+
searchRecords(${args.join(", ")}) {
|
|
1724
|
+
${connectionFields(nodeFields)}
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
`,
|
|
1728
|
+
variables
|
|
1729
|
+
};
|
|
1730
|
+
},
|
|
1731
|
+
fetchRecordById(params = {}) {
|
|
1732
|
+
return {
|
|
1733
|
+
query: `
|
|
1734
|
+
query FetchRecord($id: UUID!) {
|
|
1735
|
+
fetchRecord(id: $id) {
|
|
1736
|
+
${recordFields(params)}
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
`
|
|
1740
|
+
};
|
|
1741
|
+
},
|
|
1742
|
+
fetchRecordByIdentifier(params = {}) {
|
|
1743
|
+
return {
|
|
1744
|
+
query: `
|
|
1745
|
+
query FetchRecordByIdentifier($publisherSlug: String!, $gameKey: String!, $datasetKey: String!, $identifier: String!) {
|
|
1746
|
+
fetchRecordByIdentifier(publisherSlug: $publisherSlug, gameKey: $gameKey, datasetKey: $datasetKey, identifier: $identifier) {
|
|
1747
|
+
${recordFields(params)}
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
`
|
|
1751
|
+
};
|
|
1752
|
+
},
|
|
1753
|
+
fetchRecordsByIdentifier(params = {}) {
|
|
1754
|
+
return {
|
|
1755
|
+
query: `
|
|
1756
|
+
query FetchRecordsByIdentifier($publisherSlug: String!, $gameKey: String!, $datasetKey: String!, $identifiers: [String!]!) {
|
|
1757
|
+
fetchRecordsByIdentifier(publisherSlug: $publisherSlug, gameKey: $gameKey, datasetKey: $datasetKey, identifiers: $identifiers) {
|
|
1758
|
+
${recordFields(params)}
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
`
|
|
1762
|
+
};
|
|
1763
|
+
},
|
|
1764
|
+
fetchRecords(params = {}) {
|
|
1765
|
+
return {
|
|
1766
|
+
query: `
|
|
1767
|
+
query FetchRecords($ids: [UUID!]!) {
|
|
1768
|
+
fetchRecords(ids: $ids) {
|
|
1769
|
+
${recordFields(params)}
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
`
|
|
1773
|
+
};
|
|
1774
|
+
},
|
|
1775
|
+
listDatasetRecords(params) {
|
|
1776
|
+
const variables = { datasetId: params.datasetId };
|
|
1777
|
+
const args = ["datasetId: $datasetId"];
|
|
1778
|
+
const defs = ["$datasetId: UUID!"];
|
|
1779
|
+
if (params.filter !== void 0) {
|
|
1780
|
+
defs.push("$filter: JSON");
|
|
1781
|
+
args.push("filter: $filter");
|
|
1782
|
+
variables["filter"] = params.filter;
|
|
1783
|
+
}
|
|
1784
|
+
if (params.orderBy !== void 0) {
|
|
1785
|
+
defs.push("$orderBy: DatasetRecordOrderByInput");
|
|
1786
|
+
args.push("orderBy: $orderBy");
|
|
1787
|
+
variables["orderBy"] = params.orderBy;
|
|
1788
|
+
}
|
|
1789
|
+
if (params.first !== void 0) {
|
|
1790
|
+
defs.push("$first: Int");
|
|
1791
|
+
args.push("first: $first");
|
|
1792
|
+
variables["first"] = params.first;
|
|
1793
|
+
}
|
|
1794
|
+
if (params.after !== void 0) {
|
|
1795
|
+
defs.push("$after: String");
|
|
1796
|
+
args.push("after: $after");
|
|
1797
|
+
variables["after"] = params.after;
|
|
1798
|
+
}
|
|
1799
|
+
if (params.last !== void 0) {
|
|
1800
|
+
defs.push("$last: Int");
|
|
1801
|
+
args.push("last: $last");
|
|
1802
|
+
variables["last"] = params.last;
|
|
1803
|
+
}
|
|
1804
|
+
if (params.before !== void 0) {
|
|
1805
|
+
defs.push("$before: String");
|
|
1806
|
+
args.push("before: $before");
|
|
1807
|
+
variables["before"] = params.before;
|
|
1808
|
+
}
|
|
1809
|
+
if (params.validateSchema !== void 0) {
|
|
1810
|
+
defs.push("$validateSchema: Boolean");
|
|
1811
|
+
args.push("validateSchema: $validateSchema");
|
|
1812
|
+
variables["validateSchema"] = params.validateSchema;
|
|
1813
|
+
}
|
|
1814
|
+
return {
|
|
1815
|
+
query: `
|
|
1816
|
+
query DatasetRecords(${defs.join(", ")}) {
|
|
1817
|
+
datasetRecords(${args.join(", ")}) {
|
|
1818
|
+
${connectionFields(RECORD_FIELDS)}
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
`,
|
|
1822
|
+
variables
|
|
1823
|
+
};
|
|
1824
|
+
},
|
|
1825
|
+
datasetRecord(params) {
|
|
1826
|
+
const variables = {};
|
|
1827
|
+
const args = [];
|
|
1828
|
+
const defs = [];
|
|
1829
|
+
if (params.id !== void 0) {
|
|
1830
|
+
defs.push("$id: UUID");
|
|
1831
|
+
args.push("id: $id");
|
|
1832
|
+
variables["id"] = params.id;
|
|
1833
|
+
}
|
|
1834
|
+
if (params.datasetId !== void 0) {
|
|
1835
|
+
defs.push("$datasetId: UUID");
|
|
1836
|
+
args.push("datasetId: $datasetId");
|
|
1837
|
+
variables["datasetId"] = params.datasetId;
|
|
1838
|
+
}
|
|
1839
|
+
if (params.identifier !== void 0) {
|
|
1840
|
+
defs.push("$identifier: String");
|
|
1841
|
+
args.push("identifier: $identifier");
|
|
1842
|
+
variables["identifier"] = params.identifier;
|
|
1843
|
+
}
|
|
1844
|
+
if (params.publisherSlug !== void 0) {
|
|
1845
|
+
defs.push("$publisherSlug: String");
|
|
1846
|
+
args.push("publisherSlug: $publisherSlug");
|
|
1847
|
+
variables["publisherSlug"] = params.publisherSlug;
|
|
1848
|
+
}
|
|
1849
|
+
if (params.gameKey !== void 0) {
|
|
1850
|
+
defs.push("$gameKey: String");
|
|
1851
|
+
args.push("gameKey: $gameKey");
|
|
1852
|
+
variables["gameKey"] = params.gameKey;
|
|
1853
|
+
}
|
|
1854
|
+
if (params.datasetKey !== void 0) {
|
|
1855
|
+
defs.push("$datasetKey: String");
|
|
1856
|
+
args.push("datasetKey: $datasetKey");
|
|
1857
|
+
variables["datasetKey"] = params.datasetKey;
|
|
1858
|
+
}
|
|
1859
|
+
if (params.recordId !== void 0) {
|
|
1860
|
+
defs.push("$recordId: UUID");
|
|
1861
|
+
args.push("recordId: $recordId");
|
|
1862
|
+
variables["recordId"] = params.recordId;
|
|
1863
|
+
}
|
|
1864
|
+
if (params.resolveLinks !== void 0) {
|
|
1865
|
+
defs.push("$resolveLinks: [String!]");
|
|
1866
|
+
args.push("resolveLinks: $resolveLinks");
|
|
1867
|
+
variables["resolveLinks"] = params.resolveLinks;
|
|
1868
|
+
}
|
|
1869
|
+
if (params.validateSchema !== void 0) {
|
|
1870
|
+
defs.push("$validateSchema: Boolean");
|
|
1871
|
+
args.push("validateSchema: $validateSchema");
|
|
1872
|
+
variables["validateSchema"] = params.validateSchema;
|
|
1873
|
+
}
|
|
1874
|
+
const includeResolvedLinks = params.resolveLinks && params.resolveLinks.length > 0;
|
|
1875
|
+
const selectedRecordFields = recordFields({ includePricing: params.includePricing });
|
|
1876
|
+
const fields = includeResolvedLinks ? `${selectedRecordFields}
|
|
1877
|
+
${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
1878
|
+
return {
|
|
1879
|
+
query: `
|
|
1880
|
+
query DatasetRecord(${defs.join(", ")}) {
|
|
1881
|
+
datasetRecord(${args.join(", ")}) {
|
|
1882
|
+
${fields}
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1885
|
+
`,
|
|
1886
|
+
variables
|
|
1887
|
+
};
|
|
1888
|
+
},
|
|
1889
|
+
upsertDatasetRecords() {
|
|
1890
|
+
return {
|
|
1891
|
+
query: `
|
|
1892
|
+
mutation DatasetRecordsUpsert($input: DatasetRecordsUpsertInput!) {
|
|
1893
|
+
datasetRecordsUpsert(input: $input) {
|
|
1894
|
+
${DATASET_RECORDS_UPSERT_PAYLOAD_FIELDS}
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
`
|
|
1898
|
+
};
|
|
1899
|
+
},
|
|
1900
|
+
deleteDatasetRecords() {
|
|
1901
|
+
return {
|
|
1902
|
+
query: `
|
|
1903
|
+
mutation DatasetRecordsDelete($input: DatasetRecordsDeleteInput!) {
|
|
1904
|
+
datasetRecordsDelete(input: $input) {
|
|
1905
|
+
${DATASET_RECORD_DELETE_JOB_FIELDS}
|
|
1906
|
+
}
|
|
1907
|
+
}
|
|
1908
|
+
`
|
|
1909
|
+
};
|
|
1910
|
+
},
|
|
1911
|
+
datasetRecordDeleteJob() {
|
|
1912
|
+
return {
|
|
1913
|
+
query: `
|
|
1914
|
+
query DatasetRecordDeleteJob($id: UUID!) {
|
|
1915
|
+
datasetRecordDeleteJob(id: $id) {
|
|
1916
|
+
${DATASET_RECORD_DELETE_JOB_FIELDS}
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
`
|
|
1920
|
+
};
|
|
1921
|
+
},
|
|
1922
|
+
datasetRecordDeleteJobs(params) {
|
|
1923
|
+
const variables = { publisherId: params.publisherId };
|
|
1924
|
+
const args = ["publisherId: $publisherId"];
|
|
1925
|
+
const defs = ["$publisherId: UUID!"];
|
|
1926
|
+
if (params.datasetId !== void 0) {
|
|
1927
|
+
defs.push("$datasetId: UUID");
|
|
1928
|
+
args.push("datasetId: $datasetId");
|
|
1929
|
+
variables["datasetId"] = params.datasetId;
|
|
1930
|
+
}
|
|
1931
|
+
if (params.status !== void 0) {
|
|
1932
|
+
defs.push("$status: DatasetRecordDeleteJobStatus");
|
|
1933
|
+
args.push("status: $status");
|
|
1934
|
+
variables["status"] = params.status;
|
|
1935
|
+
}
|
|
1936
|
+
if (params.first !== void 0) {
|
|
1937
|
+
defs.push("$first: Int");
|
|
1938
|
+
args.push("first: $first");
|
|
1939
|
+
variables["first"] = params.first;
|
|
1940
|
+
}
|
|
1941
|
+
if (params.after !== void 0) {
|
|
1942
|
+
defs.push("$after: String");
|
|
1943
|
+
args.push("after: $after");
|
|
1944
|
+
variables["after"] = params.after;
|
|
1945
|
+
}
|
|
1946
|
+
return {
|
|
1947
|
+
query: `
|
|
1948
|
+
query DatasetRecordDeleteJobs(${defs.join(", ")}) {
|
|
1949
|
+
datasetRecordDeleteJobs(${args.join(", ")}) {
|
|
1950
|
+
${connectionFields(DATASET_RECORD_DELETE_JOB_FIELDS)}
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1953
|
+
`,
|
|
1954
|
+
variables
|
|
1955
|
+
};
|
|
1956
|
+
},
|
|
1957
|
+
datasetImportPreview() {
|
|
1958
|
+
return {
|
|
1959
|
+
query: `
|
|
1960
|
+
query DatasetImportPreview($input: DatasetImportPreviewInput!) {
|
|
1961
|
+
datasetImportPreview(input: $input) {
|
|
1962
|
+
${DATASET_IMPORT_PREVIEW_FIELDS}
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
`
|
|
1966
|
+
};
|
|
1967
|
+
},
|
|
1968
|
+
datasetImportValidate() {
|
|
1969
|
+
return {
|
|
1970
|
+
query: `
|
|
1971
|
+
query DatasetImportValidate($input: DatasetImportValidateInput!) {
|
|
1972
|
+
datasetImportValidate(input: $input) {
|
|
1973
|
+
${BULK_IMPORT_RESULT_FIELDS}
|
|
1974
|
+
}
|
|
1975
|
+
}
|
|
1976
|
+
`
|
|
1977
|
+
};
|
|
1978
|
+
},
|
|
1979
|
+
datasetImportFromFile() {
|
|
1980
|
+
return {
|
|
1981
|
+
query: `
|
|
1982
|
+
mutation DatasetImportFromFile($input: DatasetImportFromFileInput!) {
|
|
1983
|
+
datasetImportFromFile(input: $input) {
|
|
1984
|
+
${IMPORT_JOB_FIELDS}
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
`
|
|
1988
|
+
};
|
|
1989
|
+
},
|
|
1990
|
+
datasetImportFromPayload() {
|
|
1991
|
+
return {
|
|
1992
|
+
query: `
|
|
1993
|
+
mutation DatasetImportFromPayload($input: DatasetImportFromPayloadInput!) {
|
|
1994
|
+
datasetImportFromPayload(input: $input) {
|
|
1995
|
+
${IMPORT_JOB_FIELDS}
|
|
1996
|
+
}
|
|
1997
|
+
}
|
|
1998
|
+
`
|
|
1999
|
+
};
|
|
2000
|
+
},
|
|
2001
|
+
datasetImportFromUrl() {
|
|
2002
|
+
return {
|
|
2003
|
+
query: `
|
|
2004
|
+
mutation DatasetImportFromUrl($input: DatasetImportFromUrlInput!) {
|
|
2005
|
+
datasetImportFromUrl(input: $input) {
|
|
2006
|
+
${IMPORT_JOB_FIELDS}
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
`
|
|
2010
|
+
};
|
|
2011
|
+
},
|
|
2012
|
+
importJob() {
|
|
2013
|
+
return {
|
|
2014
|
+
query: `
|
|
2015
|
+
query ImportJob($id: UUID!) {
|
|
2016
|
+
importJob(id: $id) {
|
|
2017
|
+
${IMPORT_JOB_FIELDS}
|
|
934
2018
|
}
|
|
935
2019
|
}
|
|
936
2020
|
`
|
|
937
2021
|
};
|
|
938
2022
|
},
|
|
939
|
-
|
|
2023
|
+
importJobs(params) {
|
|
2024
|
+
const variables = { publisherId: params.publisherId };
|
|
2025
|
+
const args = ["publisherId: $publisherId"];
|
|
2026
|
+
const defs = ["$publisherId: UUID!"];
|
|
2027
|
+
if (params.datasetId !== void 0) {
|
|
2028
|
+
defs.push("$datasetId: UUID");
|
|
2029
|
+
args.push("datasetId: $datasetId");
|
|
2030
|
+
variables["datasetId"] = params.datasetId;
|
|
2031
|
+
}
|
|
2032
|
+
if (params.status !== void 0) {
|
|
2033
|
+
defs.push("$status: ImportJobStatus");
|
|
2034
|
+
args.push("status: $status");
|
|
2035
|
+
variables["status"] = params.status;
|
|
2036
|
+
}
|
|
2037
|
+
if (params.first !== void 0) {
|
|
2038
|
+
defs.push("$first: Int");
|
|
2039
|
+
args.push("first: $first");
|
|
2040
|
+
variables["first"] = params.first;
|
|
2041
|
+
}
|
|
2042
|
+
if (params.after !== void 0) {
|
|
2043
|
+
defs.push("$after: String");
|
|
2044
|
+
args.push("after: $after");
|
|
2045
|
+
variables["after"] = params.after;
|
|
2046
|
+
}
|
|
940
2047
|
return {
|
|
941
2048
|
query: `
|
|
942
|
-
query
|
|
943
|
-
|
|
944
|
-
${
|
|
2049
|
+
query ImportJobs(${defs.join(", ")}) {
|
|
2050
|
+
importJobs(${args.join(", ")}) {
|
|
2051
|
+
${connectionFields(IMPORT_JOB_FIELDS)}
|
|
945
2052
|
}
|
|
946
2053
|
}
|
|
947
|
-
|
|
2054
|
+
`,
|
|
2055
|
+
variables
|
|
948
2056
|
};
|
|
949
2057
|
},
|
|
950
|
-
|
|
2058
|
+
importJobCancel() {
|
|
951
2059
|
return {
|
|
952
2060
|
query: `
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
${
|
|
2061
|
+
mutation ImportJobCancel($id: UUID!) {
|
|
2062
|
+
importJobCancel(id: $id) {
|
|
2063
|
+
${IMPORT_JOB_FIELDS}
|
|
956
2064
|
}
|
|
957
2065
|
}
|
|
958
2066
|
`
|
|
959
2067
|
};
|
|
960
2068
|
},
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
const
|
|
964
|
-
const
|
|
965
|
-
const defs = [];
|
|
966
|
-
if (params.
|
|
967
|
-
defs.push("$
|
|
968
|
-
|
|
969
|
-
variables["
|
|
2069
|
+
importJobLogs(params) {
|
|
2070
|
+
const variables = { importJobId: params.importJobId };
|
|
2071
|
+
const args = ["id: $importJobId"];
|
|
2072
|
+
const logArgs = [];
|
|
2073
|
+
const defs = ["$importJobId: UUID!"];
|
|
2074
|
+
if (params.level !== void 0) {
|
|
2075
|
+
defs.push("$level: ImportLogLevel");
|
|
2076
|
+
logArgs.push("level: $level");
|
|
2077
|
+
variables["level"] = params.level;
|
|
970
2078
|
}
|
|
971
|
-
if (params.
|
|
972
|
-
defs.push("$
|
|
973
|
-
|
|
974
|
-
variables["
|
|
2079
|
+
if (params.datasetKey !== void 0) {
|
|
2080
|
+
defs.push("$datasetKey: String");
|
|
2081
|
+
logArgs.push("datasetKey: $datasetKey");
|
|
2082
|
+
variables["datasetKey"] = params.datasetKey;
|
|
975
2083
|
}
|
|
976
2084
|
if (params.first !== void 0) {
|
|
977
2085
|
defs.push("$first: Int");
|
|
978
|
-
|
|
2086
|
+
logArgs.push("first: $first");
|
|
979
2087
|
variables["first"] = params.first;
|
|
980
2088
|
}
|
|
981
2089
|
if (params.after !== void 0) {
|
|
982
2090
|
defs.push("$after: String");
|
|
983
|
-
|
|
2091
|
+
logArgs.push("after: $after");
|
|
984
2092
|
variables["after"] = params.after;
|
|
985
2093
|
}
|
|
986
|
-
const
|
|
987
|
-
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
2094
|
+
const logArgStr = logArgs.length > 0 ? `(${logArgs.join(", ")})` : "";
|
|
988
2095
|
return {
|
|
989
2096
|
query: `
|
|
990
|
-
query
|
|
991
|
-
|
|
992
|
-
${
|
|
2097
|
+
query ImportJobLogs(${defs.join(", ")}) {
|
|
2098
|
+
importJob(${args.join(", ")}) {
|
|
2099
|
+
logs${logArgStr} {
|
|
2100
|
+
${connectionFields(IMPORT_JOB_LOG_FIELDS)}
|
|
2101
|
+
}
|
|
993
2102
|
}
|
|
994
2103
|
}
|
|
995
2104
|
`,
|
|
996
2105
|
variables
|
|
997
2106
|
};
|
|
998
2107
|
},
|
|
999
|
-
|
|
2108
|
+
gameImportPreview() {
|
|
1000
2109
|
return {
|
|
1001
2110
|
query: `
|
|
1002
|
-
query
|
|
1003
|
-
|
|
1004
|
-
${
|
|
2111
|
+
query GameImportPreview($input: GameImportPreviewInput!) {
|
|
2112
|
+
gameImportPreview(input: $input) {
|
|
2113
|
+
${GAME_IMPORT_PREVIEW_FIELDS}
|
|
1005
2114
|
}
|
|
1006
2115
|
}
|
|
1007
2116
|
`
|
|
1008
2117
|
};
|
|
1009
2118
|
},
|
|
1010
|
-
|
|
2119
|
+
gameImportFromFile() {
|
|
1011
2120
|
return {
|
|
1012
2121
|
query: `
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
${
|
|
2122
|
+
mutation GameImportFromFile($input: GameImportFromFileInput!) {
|
|
2123
|
+
gameImportFromFile(input: $input) {
|
|
2124
|
+
${GAME_IMPORT_JOB_FIELDS}
|
|
1016
2125
|
}
|
|
1017
2126
|
}
|
|
1018
2127
|
`
|
|
1019
2128
|
};
|
|
1020
2129
|
},
|
|
1021
|
-
|
|
2130
|
+
gameImportFromPayload() {
|
|
1022
2131
|
return {
|
|
1023
2132
|
query: `
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
${
|
|
2133
|
+
mutation GameImportFromPayload($input: GameImportFromPayloadInput!) {
|
|
2134
|
+
gameImportFromPayload(input: $input) {
|
|
2135
|
+
${GAME_IMPORT_JOB_FIELDS}
|
|
1027
2136
|
}
|
|
1028
2137
|
}
|
|
1029
2138
|
`
|
|
1030
2139
|
};
|
|
1031
2140
|
},
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
2141
|
+
gameImportFromUrl() {
|
|
2142
|
+
return {
|
|
2143
|
+
query: `
|
|
2144
|
+
mutation GameImportFromUrl($input: GameImportFromUrlInput!) {
|
|
2145
|
+
gameImportFromUrl(input: $input) {
|
|
2146
|
+
${GAME_IMPORT_JOB_FIELDS}
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
`
|
|
2150
|
+
};
|
|
2151
|
+
},
|
|
2152
|
+
gameImportJob() {
|
|
2153
|
+
return {
|
|
2154
|
+
query: `
|
|
2155
|
+
query GameImportJob($id: UUID!) {
|
|
2156
|
+
gameImportJob(id: $id) {
|
|
2157
|
+
${GAME_IMPORT_JOB_FIELDS}
|
|
2158
|
+
}
|
|
2159
|
+
}
|
|
2160
|
+
`
|
|
2161
|
+
};
|
|
2162
|
+
},
|
|
2163
|
+
gameImportJobs(params) {
|
|
2164
|
+
const variables = { gameId: params.gameId };
|
|
2165
|
+
const args = ["gameId: $gameId"];
|
|
2166
|
+
const defs = ["$gameId: UUID!"];
|
|
2167
|
+
if (params.status !== void 0) {
|
|
2168
|
+
defs.push("$status: ImportJobStatus");
|
|
2169
|
+
args.push("status: $status");
|
|
2170
|
+
variables["status"] = params.status;
|
|
1056
2171
|
}
|
|
1057
2172
|
if (params.first !== void 0) {
|
|
1058
2173
|
defs.push("$first: Int");
|
|
@@ -1064,86 +2179,99 @@ var QueryBuilder = {
|
|
|
1064
2179
|
args.push("after: $after");
|
|
1065
2180
|
variables["after"] = params.after;
|
|
1066
2181
|
}
|
|
1067
|
-
const defStr = defs.length > 0 ? `(${defs.join(", ")})` : "";
|
|
1068
|
-
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
1069
2182
|
return {
|
|
1070
2183
|
query: `
|
|
1071
|
-
query
|
|
1072
|
-
|
|
1073
|
-
${connectionFields(
|
|
2184
|
+
query GameImportJobs(${defs.join(", ")}) {
|
|
2185
|
+
gameImportJobs(${args.join(", ")}) {
|
|
2186
|
+
${connectionFields(GAME_IMPORT_JOB_FIELDS)}
|
|
1074
2187
|
}
|
|
1075
2188
|
}
|
|
1076
2189
|
`,
|
|
1077
2190
|
variables
|
|
1078
2191
|
};
|
|
1079
2192
|
},
|
|
1080
|
-
|
|
2193
|
+
gameImportJobCancel() {
|
|
1081
2194
|
return {
|
|
1082
2195
|
query: `
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
${
|
|
1086
|
-
${SCHEMA_FIELDS}
|
|
2196
|
+
mutation GameImportJobCancel($id: UUID!) {
|
|
2197
|
+
gameImportJobCancel(id: $id) {
|
|
2198
|
+
${GAME_IMPORT_JOB_FIELDS}
|
|
1087
2199
|
}
|
|
1088
2200
|
}
|
|
1089
2201
|
`
|
|
1090
2202
|
};
|
|
1091
2203
|
},
|
|
1092
|
-
|
|
2204
|
+
file() {
|
|
1093
2205
|
return {
|
|
1094
2206
|
query: `
|
|
1095
|
-
query
|
|
1096
|
-
|
|
1097
|
-
${
|
|
1098
|
-
${SCHEMA_FIELDS}
|
|
2207
|
+
query File($id: UUID!) {
|
|
2208
|
+
file(id: $id) {
|
|
2209
|
+
${FILE_FIELDS}
|
|
1099
2210
|
}
|
|
1100
2211
|
}
|
|
1101
2212
|
`
|
|
1102
2213
|
};
|
|
1103
2214
|
},
|
|
1104
|
-
|
|
2215
|
+
fileUploadRequest() {
|
|
1105
2216
|
return {
|
|
1106
2217
|
query: `
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
${
|
|
2218
|
+
mutation FileUploadRequest($input: FileUploadInput!) {
|
|
2219
|
+
fileUploadRequest(input: $input) {
|
|
2220
|
+
${PRESIGNED_UPLOAD_FIELDS}
|
|
1110
2221
|
}
|
|
1111
2222
|
}
|
|
1112
2223
|
`
|
|
1113
2224
|
};
|
|
1114
2225
|
},
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
2226
|
+
fileUploadConfirm() {
|
|
2227
|
+
return {
|
|
2228
|
+
query: `
|
|
2229
|
+
mutation FileUploadConfirm($id: UUID!) {
|
|
2230
|
+
fileUploadConfirm(id: $id) {
|
|
2231
|
+
${FILE_FIELDS}
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
`
|
|
1121
2235
|
};
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
2236
|
+
},
|
|
2237
|
+
fileDelete() {
|
|
2238
|
+
return {
|
|
2239
|
+
query: `
|
|
2240
|
+
mutation FileDelete($id: UUID!) {
|
|
2241
|
+
fileDelete(id: $id)
|
|
2242
|
+
}
|
|
2243
|
+
`
|
|
2244
|
+
};
|
|
2245
|
+
},
|
|
2246
|
+
exportJob() {
|
|
2247
|
+
return {
|
|
2248
|
+
query: `
|
|
2249
|
+
query ExportJob($id: UUID!) {
|
|
2250
|
+
exportJob(id: $id) {
|
|
2251
|
+
${EXPORT_JOB_FIELDS}
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
`
|
|
2255
|
+
};
|
|
2256
|
+
},
|
|
2257
|
+
exportJobs(params) {
|
|
2258
|
+
const variables = { publisherId: params.publisherId };
|
|
2259
|
+
const args = ["publisherId: $publisherId"];
|
|
2260
|
+
const defs = ["$publisherId: UUID!"];
|
|
2261
|
+
if (params.gameId !== void 0) {
|
|
2262
|
+
defs.push("$gameId: UUID");
|
|
2263
|
+
args.push("gameId: $gameId");
|
|
2264
|
+
variables["gameId"] = params.gameId;
|
|
1137
2265
|
}
|
|
1138
|
-
if (params.
|
|
1139
|
-
defs.push("$
|
|
1140
|
-
args.push("
|
|
1141
|
-
variables["
|
|
2266
|
+
if (params.datasetId !== void 0) {
|
|
2267
|
+
defs.push("$datasetId: UUID");
|
|
2268
|
+
args.push("datasetId: $datasetId");
|
|
2269
|
+
variables["datasetId"] = params.datasetId;
|
|
1142
2270
|
}
|
|
1143
|
-
if (params.
|
|
1144
|
-
defs.push("$
|
|
1145
|
-
args.push("
|
|
1146
|
-
variables["
|
|
2271
|
+
if (params.status !== void 0) {
|
|
2272
|
+
defs.push("$status: ExportJobStatus");
|
|
2273
|
+
args.push("status: $status");
|
|
2274
|
+
variables["status"] = params.status;
|
|
1147
2275
|
}
|
|
1148
2276
|
if (params.first !== void 0) {
|
|
1149
2277
|
defs.push("$first: Int");
|
|
@@ -1155,65 +2283,45 @@ var QueryBuilder = {
|
|
|
1155
2283
|
args.push("after: $after");
|
|
1156
2284
|
variables["after"] = params.after;
|
|
1157
2285
|
}
|
|
1158
|
-
if (params.validateSchema !== void 0) {
|
|
1159
|
-
defs.push("$validateSchema: Boolean");
|
|
1160
|
-
args.push("validateSchema: $validateSchema");
|
|
1161
|
-
variables["validateSchema"] = params.validateSchema;
|
|
1162
|
-
}
|
|
1163
|
-
const includeResolvedLinks = params.resolveLinks && params.resolveLinks.length > 0;
|
|
1164
|
-
const selectedRecordFields = recordFields({ includePricing: params.includePricing });
|
|
1165
|
-
const nodeFields = includeResolvedLinks ? `${selectedRecordFields}
|
|
1166
|
-
${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
1167
2286
|
return {
|
|
1168
2287
|
query: `
|
|
1169
|
-
query
|
|
1170
|
-
|
|
1171
|
-
${connectionFields(
|
|
2288
|
+
query ExportJobs(${defs.join(", ")}) {
|
|
2289
|
+
exportJobs(${args.join(", ")}) {
|
|
2290
|
+
${connectionFields(EXPORT_JOB_FIELDS)}
|
|
1172
2291
|
}
|
|
1173
2292
|
}
|
|
1174
2293
|
`,
|
|
1175
2294
|
variables
|
|
1176
2295
|
};
|
|
1177
2296
|
},
|
|
1178
|
-
|
|
1179
|
-
return {
|
|
1180
|
-
query: `
|
|
1181
|
-
query FetchRecord($id: UUID!) {
|
|
1182
|
-
fetchRecord(id: $id) {
|
|
1183
|
-
${recordFields(params)}
|
|
1184
|
-
}
|
|
1185
|
-
}
|
|
1186
|
-
`
|
|
1187
|
-
};
|
|
1188
|
-
},
|
|
1189
|
-
fetchRecordByIdentifier(params = {}) {
|
|
2297
|
+
datasetExport() {
|
|
1190
2298
|
return {
|
|
1191
2299
|
query: `
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
${
|
|
2300
|
+
mutation DatasetExport($input: DatasetExportInput!) {
|
|
2301
|
+
datasetExport(input: $input) {
|
|
2302
|
+
${EXPORT_JOB_FIELDS}
|
|
1195
2303
|
}
|
|
1196
2304
|
}
|
|
1197
2305
|
`
|
|
1198
2306
|
};
|
|
1199
2307
|
},
|
|
1200
|
-
|
|
2308
|
+
exportJobCancel() {
|
|
1201
2309
|
return {
|
|
1202
2310
|
query: `
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
${
|
|
2311
|
+
mutation ExportJobCancel($id: UUID!) {
|
|
2312
|
+
exportJobCancel(id: $id) {
|
|
2313
|
+
${EXPORT_JOB_FIELDS}
|
|
1206
2314
|
}
|
|
1207
2315
|
}
|
|
1208
2316
|
`
|
|
1209
2317
|
};
|
|
1210
2318
|
},
|
|
1211
|
-
|
|
2319
|
+
exportJobRefreshUrl() {
|
|
1212
2320
|
return {
|
|
1213
2321
|
query: `
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
${
|
|
2322
|
+
mutation ExportJobRefreshUrl($id: UUID!) {
|
|
2323
|
+
exportJobRefreshUrl(id: $id) {
|
|
2324
|
+
${EXPORT_JOB_FIELDS}
|
|
1217
2325
|
}
|
|
1218
2326
|
}
|
|
1219
2327
|
`
|
|
@@ -1647,9 +2755,19 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
1647
2755
|
};
|
|
1648
2756
|
},
|
|
1649
2757
|
deckImportFormats(params) {
|
|
1650
|
-
const variables = {
|
|
1651
|
-
const args = [
|
|
1652
|
-
const defs = [
|
|
2758
|
+
const variables = {};
|
|
2759
|
+
const args = [];
|
|
2760
|
+
const defs = [];
|
|
2761
|
+
if (params.publisherId !== void 0) {
|
|
2762
|
+
defs.push("$publisherId: UUID");
|
|
2763
|
+
args.push("publisherId: $publisherId");
|
|
2764
|
+
variables["publisherId"] = params.publisherId;
|
|
2765
|
+
}
|
|
2766
|
+
if (params.gameId !== void 0) {
|
|
2767
|
+
defs.push("$gameId: UUID");
|
|
2768
|
+
args.push("gameId: $gameId");
|
|
2769
|
+
variables["gameId"] = params.gameId;
|
|
2770
|
+
}
|
|
1653
2771
|
if (params.includeArchived !== void 0) {
|
|
1654
2772
|
defs.push("$includeArchived: Boolean");
|
|
1655
2773
|
args.push("includeArchived: $includeArchived");
|
|
@@ -1665,10 +2783,12 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
1665
2783
|
args.push("after: $after");
|
|
1666
2784
|
variables["after"] = params.after;
|
|
1667
2785
|
}
|
|
2786
|
+
const defStr = defs.length > 0 ? `(${defs.join(", ")})` : "";
|
|
2787
|
+
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
1668
2788
|
return {
|
|
1669
2789
|
query: `
|
|
1670
|
-
query DeckImportFormats
|
|
1671
|
-
deckImportFormats
|
|
2790
|
+
query DeckImportFormats${defStr} {
|
|
2791
|
+
deckImportFormats${argStr} {
|
|
1672
2792
|
${connectionFields(DECK_IMPORT_FORMAT_DEFINITION_FIELDS)}
|
|
1673
2793
|
}
|
|
1674
2794
|
}
|
|
@@ -1679,8 +2799,8 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
1679
2799
|
deckImportFormat() {
|
|
1680
2800
|
return {
|
|
1681
2801
|
query: `
|
|
1682
|
-
query DeckImportFormat($id: UUID
|
|
1683
|
-
deckImportFormat(id: $id) {
|
|
2802
|
+
query DeckImportFormat($id: UUID, $gameId: UUID, $key: String) {
|
|
2803
|
+
deckImportFormat(id: $id, gameId: $gameId, key: $key) {
|
|
1684
2804
|
${DECK_IMPORT_FORMAT_DEFINITION_FIELDS}
|
|
1685
2805
|
}
|
|
1686
2806
|
}
|
|
@@ -2064,6 +3184,31 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
2064
3184
|
`
|
|
2065
3185
|
};
|
|
2066
3186
|
},
|
|
3187
|
+
exchangeDeckSessionToken() {
|
|
3188
|
+
return {
|
|
3189
|
+
query: `
|
|
3190
|
+
mutation DeckSessionTokenExchange($input: DeckSessionTokenExchangeInput!) {
|
|
3191
|
+
deckSessionTokenExchange(input: $input) {
|
|
3192
|
+
token
|
|
3193
|
+
sessionToken {
|
|
3194
|
+
id
|
|
3195
|
+
accountId
|
|
3196
|
+
apiApplicationId
|
|
3197
|
+
gameId
|
|
3198
|
+
environment
|
|
3199
|
+
externalSubject
|
|
3200
|
+
scopes
|
|
3201
|
+
expiresAt
|
|
3202
|
+
revokedAt
|
|
3203
|
+
lastUsedAt
|
|
3204
|
+
createdAt
|
|
3205
|
+
updatedAt
|
|
3206
|
+
}
|
|
3207
|
+
}
|
|
3208
|
+
}
|
|
3209
|
+
`
|
|
3210
|
+
};
|
|
3211
|
+
},
|
|
2067
3212
|
grantDeckApiApplicationAccess() {
|
|
2068
3213
|
return {
|
|
2069
3214
|
query: `
|
|
@@ -2171,6 +3316,9 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
2171
3316
|
deckAccessTokenExchangeVariables(input) {
|
|
2172
3317
|
return { input };
|
|
2173
3318
|
},
|
|
3319
|
+
deckSessionTokenExchangeVariables(input) {
|
|
3320
|
+
return { input };
|
|
3321
|
+
},
|
|
2174
3322
|
deckApiApplicationAccessesVariables(deckId, includeRevoked) {
|
|
2175
3323
|
return includeRevoked === void 0 ? { deckId } : { deckId, includeRevoked };
|
|
2176
3324
|
},
|
|
@@ -2183,6 +3331,51 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
2183
3331
|
deckApiApplicationAccessRevokeVariables(deckId, apiApplicationId) {
|
|
2184
3332
|
return { deckId, apiApplicationId };
|
|
2185
3333
|
},
|
|
3334
|
+
gameCreateVariables(input) {
|
|
3335
|
+
return { input };
|
|
3336
|
+
},
|
|
3337
|
+
gameUpdateVariables(id, input) {
|
|
3338
|
+
return { id, input };
|
|
3339
|
+
},
|
|
3340
|
+
datasetImportPreviewVariables(input) {
|
|
3341
|
+
return { input };
|
|
3342
|
+
},
|
|
3343
|
+
datasetImportValidateVariables(input) {
|
|
3344
|
+
return { input };
|
|
3345
|
+
},
|
|
3346
|
+
datasetImportFromFileVariables(input) {
|
|
3347
|
+
return { input };
|
|
3348
|
+
},
|
|
3349
|
+
datasetImportFromPayloadVariables(input) {
|
|
3350
|
+
return { input };
|
|
3351
|
+
},
|
|
3352
|
+
datasetImportFromUrlVariables(input) {
|
|
3353
|
+
return { input };
|
|
3354
|
+
},
|
|
3355
|
+
gameImportPreviewVariables(input) {
|
|
3356
|
+
return { input };
|
|
3357
|
+
},
|
|
3358
|
+
gameImportFromFileVariables(input) {
|
|
3359
|
+
return { input };
|
|
3360
|
+
},
|
|
3361
|
+
gameImportFromPayloadVariables(input) {
|
|
3362
|
+
return { input };
|
|
3363
|
+
},
|
|
3364
|
+
gameImportFromUrlVariables(input) {
|
|
3365
|
+
return { input };
|
|
3366
|
+
},
|
|
3367
|
+
datasetRecordsUpsertVariables(input) {
|
|
3368
|
+
return { input };
|
|
3369
|
+
},
|
|
3370
|
+
datasetRecordsDeleteVariables(input) {
|
|
3371
|
+
return { input };
|
|
3372
|
+
},
|
|
3373
|
+
fileUploadRequestVariables(input) {
|
|
3374
|
+
return { input };
|
|
3375
|
+
},
|
|
3376
|
+
datasetExportVariables(input) {
|
|
3377
|
+
return { input };
|
|
3378
|
+
},
|
|
2186
3379
|
// API Key Info
|
|
2187
3380
|
fetchMe() {
|
|
2188
3381
|
return {
|