@carddb/core 0.2.0 → 0.2.5
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 +1341 -176
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +736 -9
- package/dist/index.d.ts +736 -9
- package/dist/index.js +1341 -176
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -250,6 +250,27 @@ function resolveFilter(input) {
|
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
// src/query-builder.ts
|
|
253
|
+
var FILE_FIELDS = `
|
|
254
|
+
id
|
|
255
|
+
createdAt
|
|
256
|
+
updatedAt
|
|
257
|
+
key
|
|
258
|
+
filename
|
|
259
|
+
contentType
|
|
260
|
+
size
|
|
261
|
+
status
|
|
262
|
+
isPublic
|
|
263
|
+
entityType
|
|
264
|
+
entityId
|
|
265
|
+
url
|
|
266
|
+
`;
|
|
267
|
+
var PRESIGNED_UPLOAD_FIELDS = `
|
|
268
|
+
file {
|
|
269
|
+
${FILE_FIELDS}
|
|
270
|
+
}
|
|
271
|
+
uploadUrl
|
|
272
|
+
expiresAt
|
|
273
|
+
`;
|
|
253
274
|
var PUBLISHER_FIELDS = `
|
|
254
275
|
id
|
|
255
276
|
name
|
|
@@ -274,6 +295,8 @@ var GAME_FIELDS = `
|
|
|
274
295
|
key
|
|
275
296
|
name
|
|
276
297
|
description
|
|
298
|
+
metafyGameUuid
|
|
299
|
+
metafyGameSlug
|
|
277
300
|
website
|
|
278
301
|
visibility
|
|
279
302
|
isArchived
|
|
@@ -301,8 +324,13 @@ var DATASET_FIELDS = `
|
|
|
301
324
|
name
|
|
302
325
|
description
|
|
303
326
|
purpose
|
|
327
|
+
activeVersionId
|
|
304
328
|
tcgplayerProductIdFieldKey
|
|
305
329
|
visibility
|
|
330
|
+
posX
|
|
331
|
+
posY
|
|
332
|
+
sortOrder
|
|
333
|
+
archivedAt
|
|
306
334
|
isArchived
|
|
307
335
|
createdAt
|
|
308
336
|
updatedAt
|
|
@@ -332,10 +360,28 @@ function fieldInfoFields(depth) {
|
|
|
332
360
|
filterable
|
|
333
361
|
searchable
|
|
334
362
|
isIdentifier
|
|
363
|
+
sortOrder
|
|
335
364
|
itemType
|
|
365
|
+
linkDatasetId
|
|
366
|
+
linkDatasetKey
|
|
367
|
+
linkDatasetName
|
|
368
|
+
linkFieldKey
|
|
369
|
+
linkAlias
|
|
370
|
+
linkDirection
|
|
336
371
|
displayFormat
|
|
337
372
|
semanticType
|
|
373
|
+
placeholder
|
|
374
|
+
isHidden
|
|
375
|
+
isComputed
|
|
376
|
+
isSystemField
|
|
377
|
+
defaultValue
|
|
338
378
|
allowedValues
|
|
379
|
+
minLength
|
|
380
|
+
maxLength
|
|
381
|
+
minValue
|
|
382
|
+
maxValue
|
|
383
|
+
pattern
|
|
384
|
+
isUnique
|
|
339
385
|
${nestedFields}
|
|
340
386
|
`;
|
|
341
387
|
}
|
|
@@ -352,9 +398,48 @@ var SCHEMA_FIELDS = `
|
|
|
352
398
|
targetDatasetKey
|
|
353
399
|
targetDatasetName
|
|
354
400
|
targetDatasetId
|
|
401
|
+
targetFieldKey
|
|
402
|
+
linkAlias
|
|
403
|
+
linkDirection
|
|
404
|
+
isArray
|
|
355
405
|
}
|
|
356
406
|
}
|
|
357
407
|
`;
|
|
408
|
+
var OBJECT_FIELD_FIELDS = `
|
|
409
|
+
id
|
|
410
|
+
objectTypeId
|
|
411
|
+
key
|
|
412
|
+
label
|
|
413
|
+
dataType
|
|
414
|
+
isRequired
|
|
415
|
+
isFilterable
|
|
416
|
+
isSearchable
|
|
417
|
+
isIdentifier
|
|
418
|
+
sortOrder
|
|
419
|
+
description
|
|
420
|
+
placeholder
|
|
421
|
+
displayFormat
|
|
422
|
+
semanticType
|
|
423
|
+
isHidden
|
|
424
|
+
isComputed
|
|
425
|
+
isSystemField
|
|
426
|
+
defaultValue
|
|
427
|
+
allowedValues
|
|
428
|
+
minLength
|
|
429
|
+
maxLength
|
|
430
|
+
minValue
|
|
431
|
+
maxValue
|
|
432
|
+
pattern
|
|
433
|
+
isUnique
|
|
434
|
+
itemType
|
|
435
|
+
linkDatasetId
|
|
436
|
+
linkFieldKey
|
|
437
|
+
linkAlias
|
|
438
|
+
linkDirection
|
|
439
|
+
parentFieldId
|
|
440
|
+
createdAt
|
|
441
|
+
updatedAt
|
|
442
|
+
`;
|
|
358
443
|
var TCGPLAYER_PRICING_FIELDS = `
|
|
359
444
|
pricing {
|
|
360
445
|
productId
|
|
@@ -821,6 +906,305 @@ var RESOLVED_LINKS_FIELDS = `
|
|
|
821
906
|
}
|
|
822
907
|
}
|
|
823
908
|
`;
|
|
909
|
+
var BULK_RECORD_ERROR_FIELDS = `
|
|
910
|
+
datasetKey
|
|
911
|
+
index
|
|
912
|
+
errors {
|
|
913
|
+
field
|
|
914
|
+
message
|
|
915
|
+
details
|
|
916
|
+
}
|
|
917
|
+
`;
|
|
918
|
+
var IMPORT_STATS_FIELDS = `
|
|
919
|
+
total
|
|
920
|
+
inserted
|
|
921
|
+
updated
|
|
922
|
+
skipped
|
|
923
|
+
failed
|
|
924
|
+
`;
|
|
925
|
+
var BULK_IMPORT_RESULT_FIELDS = `
|
|
926
|
+
inserted {
|
|
927
|
+
${RECORD_FIELDS}
|
|
928
|
+
}
|
|
929
|
+
updated {
|
|
930
|
+
${RECORD_FIELDS}
|
|
931
|
+
}
|
|
932
|
+
skipped
|
|
933
|
+
errors {
|
|
934
|
+
${BULK_RECORD_ERROR_FIELDS}
|
|
935
|
+
}
|
|
936
|
+
createdFields {
|
|
937
|
+
${OBJECT_FIELD_FIELDS}
|
|
938
|
+
}
|
|
939
|
+
stats {
|
|
940
|
+
${IMPORT_STATS_FIELDS}
|
|
941
|
+
}
|
|
942
|
+
`;
|
|
943
|
+
var IMPORT_JOB_ASSET_FIELDS = `
|
|
944
|
+
fileId
|
|
945
|
+
filename
|
|
946
|
+
file {
|
|
947
|
+
${FILE_FIELDS}
|
|
948
|
+
}
|
|
949
|
+
`;
|
|
950
|
+
var IMPORT_JOB_FIELDS = `
|
|
951
|
+
id
|
|
952
|
+
publisherId
|
|
953
|
+
publisher {
|
|
954
|
+
${PUBLISHER_FIELDS}
|
|
955
|
+
}
|
|
956
|
+
datasetId
|
|
957
|
+
dataset {
|
|
958
|
+
${DATASET_FIELDS}
|
|
959
|
+
${SCHEMA_FIELDS}
|
|
960
|
+
}
|
|
961
|
+
accountId
|
|
962
|
+
status
|
|
963
|
+
mode
|
|
964
|
+
onConflict
|
|
965
|
+
format
|
|
966
|
+
fileId
|
|
967
|
+
progress
|
|
968
|
+
totalRecords
|
|
969
|
+
processedRecords
|
|
970
|
+
insertedCount
|
|
971
|
+
updatedCount
|
|
972
|
+
skippedCount
|
|
973
|
+
failedCount
|
|
974
|
+
createdFields {
|
|
975
|
+
${OBJECT_FIELD_FIELDS}
|
|
976
|
+
}
|
|
977
|
+
errors {
|
|
978
|
+
${BULK_RECORD_ERROR_FIELDS}
|
|
979
|
+
}
|
|
980
|
+
errorMessage
|
|
981
|
+
assets {
|
|
982
|
+
${IMPORT_JOB_ASSET_FIELDS}
|
|
983
|
+
}
|
|
984
|
+
startedAt
|
|
985
|
+
completedAt
|
|
986
|
+
createdAt
|
|
987
|
+
updatedAt
|
|
988
|
+
lastCheckpointIndex
|
|
989
|
+
isResumed
|
|
990
|
+
imagesPending
|
|
991
|
+
imagesCompleted
|
|
992
|
+
imagesFailed
|
|
993
|
+
`;
|
|
994
|
+
var IMPORT_JOB_LOG_FIELDS = `
|
|
995
|
+
id
|
|
996
|
+
importJobId
|
|
997
|
+
level
|
|
998
|
+
message
|
|
999
|
+
datasetKey
|
|
1000
|
+
recordIndex
|
|
1001
|
+
fieldKey
|
|
1002
|
+
details
|
|
1003
|
+
createdAt
|
|
1004
|
+
`;
|
|
1005
|
+
var DATASET_RECORDS_UPSERT_PAYLOAD_FIELDS = `
|
|
1006
|
+
job {
|
|
1007
|
+
${IMPORT_JOB_FIELDS}
|
|
1008
|
+
}
|
|
1009
|
+
dryRunResult {
|
|
1010
|
+
${BULK_IMPORT_RESULT_FIELDS}
|
|
1011
|
+
}
|
|
1012
|
+
`;
|
|
1013
|
+
var DELETE_JOB_RESULT_FIELDS = `
|
|
1014
|
+
target
|
|
1015
|
+
recordId
|
|
1016
|
+
identifier
|
|
1017
|
+
status
|
|
1018
|
+
message
|
|
1019
|
+
`;
|
|
1020
|
+
var DATASET_RECORD_DELETE_JOB_FIELDS = `
|
|
1021
|
+
id
|
|
1022
|
+
publisherId
|
|
1023
|
+
publisher {
|
|
1024
|
+
${PUBLISHER_FIELDS}
|
|
1025
|
+
}
|
|
1026
|
+
datasetId
|
|
1027
|
+
dataset {
|
|
1028
|
+
${DATASET_FIELDS}
|
|
1029
|
+
}
|
|
1030
|
+
accountId
|
|
1031
|
+
status
|
|
1032
|
+
targetType
|
|
1033
|
+
dryRun
|
|
1034
|
+
targets
|
|
1035
|
+
progress
|
|
1036
|
+
totalTargets
|
|
1037
|
+
processedTargets
|
|
1038
|
+
matchedCount
|
|
1039
|
+
deletedCount
|
|
1040
|
+
missingCount
|
|
1041
|
+
blockedCount
|
|
1042
|
+
failedCount
|
|
1043
|
+
results {
|
|
1044
|
+
${DELETE_JOB_RESULT_FIELDS}
|
|
1045
|
+
}
|
|
1046
|
+
errorMessage
|
|
1047
|
+
startedAt
|
|
1048
|
+
completedAt
|
|
1049
|
+
createdAt
|
|
1050
|
+
updatedAt
|
|
1051
|
+
`;
|
|
1052
|
+
var FIELD_MAPPING_FIELDS = `
|
|
1053
|
+
sourceField
|
|
1054
|
+
targetField
|
|
1055
|
+
targetFieldLabel
|
|
1056
|
+
inferredType
|
|
1057
|
+
inferredItemType
|
|
1058
|
+
inferredChildren {
|
|
1059
|
+
key
|
|
1060
|
+
label
|
|
1061
|
+
type
|
|
1062
|
+
required
|
|
1063
|
+
itemType
|
|
1064
|
+
children {
|
|
1065
|
+
key
|
|
1066
|
+
label
|
|
1067
|
+
type
|
|
1068
|
+
required
|
|
1069
|
+
itemType
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
inferredLinkDataset
|
|
1073
|
+
inferredLinkFieldKey
|
|
1074
|
+
inferredLinkDirection
|
|
1075
|
+
targetFieldType
|
|
1076
|
+
sampleValues
|
|
1077
|
+
status
|
|
1078
|
+
`;
|
|
1079
|
+
var IMPORT_WARNING_FIELDS = `
|
|
1080
|
+
datasetKey
|
|
1081
|
+
field
|
|
1082
|
+
message
|
|
1083
|
+
severity
|
|
1084
|
+
`;
|
|
1085
|
+
var DATASET_IMPORT_PREVIEW_FIELDS = `
|
|
1086
|
+
datasetKey
|
|
1087
|
+
datasetName
|
|
1088
|
+
datasetId
|
|
1089
|
+
exists
|
|
1090
|
+
recordCount
|
|
1091
|
+
fieldMappings {
|
|
1092
|
+
${FIELD_MAPPING_FIELDS}
|
|
1093
|
+
}
|
|
1094
|
+
warnings {
|
|
1095
|
+
${IMPORT_WARNING_FIELDS}
|
|
1096
|
+
}
|
|
1097
|
+
canProceed
|
|
1098
|
+
sampleRecords
|
|
1099
|
+
availableDatasets {
|
|
1100
|
+
${DATASET_FIELDS}
|
|
1101
|
+
${SCHEMA_FIELDS}
|
|
1102
|
+
}
|
|
1103
|
+
`;
|
|
1104
|
+
var GAME_IMPORT_PREVIEW_FIELDS = `
|
|
1105
|
+
datasets {
|
|
1106
|
+
datasetKey
|
|
1107
|
+
datasetName
|
|
1108
|
+
datasetId
|
|
1109
|
+
exists
|
|
1110
|
+
recordCount
|
|
1111
|
+
fieldMappings {
|
|
1112
|
+
${FIELD_MAPPING_FIELDS}
|
|
1113
|
+
}
|
|
1114
|
+
warnings {
|
|
1115
|
+
${IMPORT_WARNING_FIELDS}
|
|
1116
|
+
}
|
|
1117
|
+
sampleRecords
|
|
1118
|
+
}
|
|
1119
|
+
importOrder
|
|
1120
|
+
warnings {
|
|
1121
|
+
${IMPORT_WARNING_FIELDS}
|
|
1122
|
+
}
|
|
1123
|
+
canProceed
|
|
1124
|
+
`;
|
|
1125
|
+
var GAME_IMPORT_DATASET_STATUS_FIELDS = `
|
|
1126
|
+
datasetKey
|
|
1127
|
+
datasetId
|
|
1128
|
+
datasetName
|
|
1129
|
+
status
|
|
1130
|
+
recordCount
|
|
1131
|
+
insertedCount
|
|
1132
|
+
updatedCount
|
|
1133
|
+
skippedCount
|
|
1134
|
+
failedCount
|
|
1135
|
+
errorMessage
|
|
1136
|
+
`;
|
|
1137
|
+
var GAME_IMPORT_JOB_FIELDS = `
|
|
1138
|
+
id
|
|
1139
|
+
publisherId
|
|
1140
|
+
publisher {
|
|
1141
|
+
${PUBLISHER_FIELDS}
|
|
1142
|
+
}
|
|
1143
|
+
gameId
|
|
1144
|
+
game {
|
|
1145
|
+
${GAME_FIELDS}
|
|
1146
|
+
}
|
|
1147
|
+
accountId
|
|
1148
|
+
status
|
|
1149
|
+
mode
|
|
1150
|
+
onConflict
|
|
1151
|
+
fileId
|
|
1152
|
+
assets {
|
|
1153
|
+
${IMPORT_JOB_ASSET_FIELDS}
|
|
1154
|
+
}
|
|
1155
|
+
totalDatasets
|
|
1156
|
+
completedDatasets
|
|
1157
|
+
progress
|
|
1158
|
+
importOrder
|
|
1159
|
+
datasetStatuses {
|
|
1160
|
+
${GAME_IMPORT_DATASET_STATUS_FIELDS}
|
|
1161
|
+
}
|
|
1162
|
+
errorMessage
|
|
1163
|
+
startedAt
|
|
1164
|
+
completedAt
|
|
1165
|
+
createdAt
|
|
1166
|
+
updatedAt
|
|
1167
|
+
completedDatasetKeys
|
|
1168
|
+
currentDatasetKey
|
|
1169
|
+
lastCheckpointIndex
|
|
1170
|
+
isResumed
|
|
1171
|
+
imagesPending
|
|
1172
|
+
imagesCompleted
|
|
1173
|
+
imagesFailed
|
|
1174
|
+
phase
|
|
1175
|
+
linkBuildingDataset
|
|
1176
|
+
linkBuildingTotalDatasets
|
|
1177
|
+
linkBuildingCompletedDatasets
|
|
1178
|
+
linkBuildingProcessedRecords
|
|
1179
|
+
linkBuildingTotalRecords
|
|
1180
|
+
`;
|
|
1181
|
+
var EXPORT_JOB_FIELDS = `
|
|
1182
|
+
id
|
|
1183
|
+
publisherId
|
|
1184
|
+
publisher {
|
|
1185
|
+
${PUBLISHER_FIELDS}
|
|
1186
|
+
}
|
|
1187
|
+
datasetId
|
|
1188
|
+
dataset {
|
|
1189
|
+
${DATASET_FIELDS}
|
|
1190
|
+
}
|
|
1191
|
+
accountId
|
|
1192
|
+
status
|
|
1193
|
+
format
|
|
1194
|
+
filter
|
|
1195
|
+
totalRecords
|
|
1196
|
+
processedRecords
|
|
1197
|
+
progress
|
|
1198
|
+
fileId
|
|
1199
|
+
downloadUrl
|
|
1200
|
+
downloadExpiresAt
|
|
1201
|
+
errorMessage
|
|
1202
|
+
startedAt
|
|
1203
|
+
completedAt
|
|
1204
|
+
createdAt
|
|
1205
|
+
updatedAt
|
|
1206
|
+
lastCheckpointIndex
|
|
1207
|
+
`;
|
|
824
1208
|
function connectionFields(nodeFields) {
|
|
825
1209
|
return `
|
|
826
1210
|
totalCount
|
|
@@ -859,147 +1243,878 @@ var QueryBuilder = {
|
|
|
859
1243
|
args.push("after: $after");
|
|
860
1244
|
variables["after"] = params.after;
|
|
861
1245
|
}
|
|
862
|
-
const defStr = defs.length > 0 ? `(${defs.join(", ")})` : "";
|
|
863
|
-
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
1246
|
+
const defStr = defs.length > 0 ? `(${defs.join(", ")})` : "";
|
|
1247
|
+
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
1248
|
+
return {
|
|
1249
|
+
query: `
|
|
1250
|
+
query SearchPublishers${defStr} {
|
|
1251
|
+
searchPublishers${argStr} {
|
|
1252
|
+
${connectionFields(PUBLISHER_FIELDS)}
|
|
1253
|
+
}
|
|
1254
|
+
}
|
|
1255
|
+
`,
|
|
1256
|
+
variables
|
|
1257
|
+
};
|
|
1258
|
+
},
|
|
1259
|
+
fetchPublisherById() {
|
|
1260
|
+
return {
|
|
1261
|
+
query: `
|
|
1262
|
+
query FetchPublisher($id: UUID!) {
|
|
1263
|
+
fetchPublisher(id: $id) {
|
|
1264
|
+
${PUBLISHER_FIELDS}
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
`
|
|
1268
|
+
};
|
|
1269
|
+
},
|
|
1270
|
+
fetchPublisherBySlug() {
|
|
1271
|
+
return {
|
|
1272
|
+
query: `
|
|
1273
|
+
query FetchPublisher($slug: String!) {
|
|
1274
|
+
fetchPublisher(slug: $slug) {
|
|
1275
|
+
${PUBLISHER_FIELDS}
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
`
|
|
1279
|
+
};
|
|
1280
|
+
},
|
|
1281
|
+
fetchPublishers() {
|
|
1282
|
+
return {
|
|
1283
|
+
query: `
|
|
1284
|
+
query FetchPublishers($slugs: [String!]!) {
|
|
1285
|
+
fetchPublishers(slugs: $slugs) {
|
|
1286
|
+
${PUBLISHER_FIELDS}
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
`
|
|
1290
|
+
};
|
|
1291
|
+
},
|
|
1292
|
+
// Games
|
|
1293
|
+
searchGames(params = {}) {
|
|
1294
|
+
const variables = {};
|
|
1295
|
+
const args = [];
|
|
1296
|
+
const defs = [];
|
|
1297
|
+
if (params.publisherSlug !== void 0) {
|
|
1298
|
+
defs.push("$publisherSlug: String");
|
|
1299
|
+
args.push("publisherSlug: $publisherSlug");
|
|
1300
|
+
variables["publisherSlug"] = params.publisherSlug;
|
|
1301
|
+
}
|
|
1302
|
+
if (params.search !== void 0) {
|
|
1303
|
+
defs.push("$search: String");
|
|
1304
|
+
args.push("search: $search");
|
|
1305
|
+
variables["search"] = params.search;
|
|
1306
|
+
}
|
|
1307
|
+
if (params.first !== void 0) {
|
|
1308
|
+
defs.push("$first: Int");
|
|
1309
|
+
args.push("first: $first");
|
|
1310
|
+
variables["first"] = params.first;
|
|
1311
|
+
}
|
|
1312
|
+
if (params.after !== void 0) {
|
|
1313
|
+
defs.push("$after: String");
|
|
1314
|
+
args.push("after: $after");
|
|
1315
|
+
variables["after"] = params.after;
|
|
1316
|
+
}
|
|
1317
|
+
const defStr = defs.length > 0 ? `(${defs.join(", ")})` : "";
|
|
1318
|
+
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
1319
|
+
return {
|
|
1320
|
+
query: `
|
|
1321
|
+
query SearchGames${defStr} {
|
|
1322
|
+
searchGames${argStr} {
|
|
1323
|
+
${connectionFields(GAME_FIELDS)}
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
`,
|
|
1327
|
+
variables
|
|
1328
|
+
};
|
|
1329
|
+
},
|
|
1330
|
+
fetchGameById() {
|
|
1331
|
+
return {
|
|
1332
|
+
query: `
|
|
1333
|
+
query FetchGame($id: UUID!) {
|
|
1334
|
+
fetchGame(id: $id) {
|
|
1335
|
+
${GAME_FIELDS}
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
`
|
|
1339
|
+
};
|
|
1340
|
+
},
|
|
1341
|
+
fetchGameByKeys() {
|
|
1342
|
+
return {
|
|
1343
|
+
query: `
|
|
1344
|
+
query FetchGame($publisherSlug: String!, $gameKey: String!) {
|
|
1345
|
+
fetchGame(publisherSlug: $publisherSlug, gameKey: $gameKey) {
|
|
1346
|
+
${GAME_FIELDS}
|
|
1347
|
+
}
|
|
1348
|
+
}
|
|
1349
|
+
`
|
|
1350
|
+
};
|
|
1351
|
+
},
|
|
1352
|
+
fetchGames() {
|
|
1353
|
+
return {
|
|
1354
|
+
query: `
|
|
1355
|
+
query FetchGames($ids: [UUID!]!) {
|
|
1356
|
+
fetchGames(ids: $ids) {
|
|
1357
|
+
${GAME_FIELDS}
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
`
|
|
1361
|
+
};
|
|
1362
|
+
},
|
|
1363
|
+
listGames(params) {
|
|
1364
|
+
const variables = { publisherId: params.publisherId };
|
|
1365
|
+
const args = ["publisherId: $publisherId"];
|
|
1366
|
+
const defs = ["$publisherId: UUID!"];
|
|
1367
|
+
if (params.first !== void 0) {
|
|
1368
|
+
defs.push("$first: Int");
|
|
1369
|
+
args.push("first: $first");
|
|
1370
|
+
variables["first"] = params.first;
|
|
1371
|
+
}
|
|
1372
|
+
if (params.after !== void 0) {
|
|
1373
|
+
defs.push("$after: String");
|
|
1374
|
+
args.push("after: $after");
|
|
1375
|
+
variables["after"] = params.after;
|
|
1376
|
+
}
|
|
1377
|
+
if (params.includeArchived !== void 0) {
|
|
1378
|
+
defs.push("$includeArchived: Boolean");
|
|
1379
|
+
args.push("includeArchived: $includeArchived");
|
|
1380
|
+
variables["includeArchived"] = params.includeArchived;
|
|
1381
|
+
}
|
|
1382
|
+
return {
|
|
1383
|
+
query: `
|
|
1384
|
+
query Games(${defs.join(", ")}) {
|
|
1385
|
+
games(${args.join(", ")}) {
|
|
1386
|
+
${connectionFields(GAME_FIELDS)}
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
`,
|
|
1390
|
+
variables
|
|
1391
|
+
};
|
|
1392
|
+
},
|
|
1393
|
+
game(params) {
|
|
1394
|
+
const variables = {};
|
|
1395
|
+
const args = [];
|
|
1396
|
+
const defs = [];
|
|
1397
|
+
if (params.id !== void 0) {
|
|
1398
|
+
defs.push("$id: UUID");
|
|
1399
|
+
args.push("id: $id");
|
|
1400
|
+
variables["id"] = params.id;
|
|
1401
|
+
}
|
|
1402
|
+
if (params.publisherId !== void 0) {
|
|
1403
|
+
defs.push("$publisherId: UUID");
|
|
1404
|
+
args.push("publisherId: $publisherId");
|
|
1405
|
+
variables["publisherId"] = params.publisherId;
|
|
1406
|
+
}
|
|
1407
|
+
if (params.publisherSlug !== void 0) {
|
|
1408
|
+
defs.push("$publisherSlug: String");
|
|
1409
|
+
args.push("publisherSlug: $publisherSlug");
|
|
1410
|
+
variables["publisherSlug"] = params.publisherSlug;
|
|
1411
|
+
}
|
|
1412
|
+
if (params.gameKey !== void 0) {
|
|
1413
|
+
defs.push("$gameKey: String");
|
|
1414
|
+
args.push("gameKey: $gameKey");
|
|
1415
|
+
variables["gameKey"] = params.gameKey;
|
|
1416
|
+
}
|
|
1417
|
+
if (params.gameSlug !== void 0) {
|
|
1418
|
+
defs.push("$gameSlug: String");
|
|
1419
|
+
args.push("gameSlug: $gameSlug");
|
|
1420
|
+
variables["gameSlug"] = params.gameSlug;
|
|
1421
|
+
}
|
|
1422
|
+
return {
|
|
1423
|
+
query: `
|
|
1424
|
+
query Game(${defs.join(", ")}) {
|
|
1425
|
+
game(${args.join(", ")}) {
|
|
1426
|
+
${GAME_FIELDS}
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
`,
|
|
1430
|
+
variables
|
|
1431
|
+
};
|
|
1432
|
+
},
|
|
1433
|
+
createGame() {
|
|
1434
|
+
return {
|
|
1435
|
+
query: `
|
|
1436
|
+
mutation GameCreate($input: GameCreateInput!) {
|
|
1437
|
+
gameCreate(input: $input) {
|
|
1438
|
+
${GAME_FIELDS}
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
`
|
|
1442
|
+
};
|
|
1443
|
+
},
|
|
1444
|
+
updateGame() {
|
|
1445
|
+
return {
|
|
1446
|
+
query: `
|
|
1447
|
+
mutation GameUpdate($id: UUID!, $input: GameUpdateInput!) {
|
|
1448
|
+
gameUpdate(id: $id, input: $input) {
|
|
1449
|
+
${GAME_FIELDS}
|
|
1450
|
+
}
|
|
1451
|
+
}
|
|
1452
|
+
`
|
|
1453
|
+
};
|
|
1454
|
+
},
|
|
1455
|
+
// Datasets
|
|
1456
|
+
searchDatasets(params = {}) {
|
|
1457
|
+
const variables = {};
|
|
1458
|
+
const args = [];
|
|
1459
|
+
const defs = [];
|
|
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.search !== void 0) {
|
|
1471
|
+
defs.push("$search: String");
|
|
1472
|
+
args.push("search: $search");
|
|
1473
|
+
variables["search"] = params.search;
|
|
1474
|
+
}
|
|
1475
|
+
if (params.purpose !== void 0) {
|
|
1476
|
+
defs.push("$purpose: DatasetPurpose");
|
|
1477
|
+
args.push("purpose: $purpose");
|
|
1478
|
+
variables["purpose"] = params.purpose;
|
|
1479
|
+
}
|
|
1480
|
+
if (params.first !== void 0) {
|
|
1481
|
+
defs.push("$first: Int");
|
|
1482
|
+
args.push("first: $first");
|
|
1483
|
+
variables["first"] = params.first;
|
|
1484
|
+
}
|
|
1485
|
+
if (params.after !== void 0) {
|
|
1486
|
+
defs.push("$after: String");
|
|
1487
|
+
args.push("after: $after");
|
|
1488
|
+
variables["after"] = params.after;
|
|
1489
|
+
}
|
|
1490
|
+
const defStr = defs.length > 0 ? `(${defs.join(", ")})` : "";
|
|
1491
|
+
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
1492
|
+
return {
|
|
1493
|
+
query: `
|
|
1494
|
+
query SearchDatasets${defStr} {
|
|
1495
|
+
searchDatasets${argStr} {
|
|
1496
|
+
${connectionFields(DATASET_FIELDS)}
|
|
1497
|
+
}
|
|
1498
|
+
}
|
|
1499
|
+
`,
|
|
1500
|
+
variables
|
|
1501
|
+
};
|
|
1502
|
+
},
|
|
1503
|
+
fetchDatasetById() {
|
|
1504
|
+
return {
|
|
1505
|
+
query: `
|
|
1506
|
+
query FetchDataset($id: UUID!) {
|
|
1507
|
+
fetchDataset(id: $id) {
|
|
1508
|
+
${DATASET_FIELDS}
|
|
1509
|
+
${SCHEMA_FIELDS}
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
`
|
|
1513
|
+
};
|
|
1514
|
+
},
|
|
1515
|
+
fetchDatasetByKeys() {
|
|
1516
|
+
return {
|
|
1517
|
+
query: `
|
|
1518
|
+
query FetchDataset($publisherSlug: String!, $gameKey: String!, $datasetKey: String!) {
|
|
1519
|
+
fetchDataset(publisherSlug: $publisherSlug, gameKey: $gameKey, datasetKey: $datasetKey) {
|
|
1520
|
+
${DATASET_FIELDS}
|
|
1521
|
+
${SCHEMA_FIELDS}
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
`
|
|
1525
|
+
};
|
|
1526
|
+
},
|
|
1527
|
+
fetchDatasets() {
|
|
1528
|
+
return {
|
|
1529
|
+
query: `
|
|
1530
|
+
query FetchDatasets($ids: [UUID!]!) {
|
|
1531
|
+
fetchDatasets(ids: $ids) {
|
|
1532
|
+
${DATASET_FIELDS}
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
`
|
|
1536
|
+
};
|
|
1537
|
+
},
|
|
1538
|
+
listDatasets(params) {
|
|
1539
|
+
const variables = { publisherId: params.publisherId };
|
|
1540
|
+
const args = ["publisherId: $publisherId"];
|
|
1541
|
+
const defs = ["$publisherId: UUID!"];
|
|
1542
|
+
if (params.gameId !== void 0) {
|
|
1543
|
+
defs.push("$gameId: UUID");
|
|
1544
|
+
args.push("gameId: $gameId");
|
|
1545
|
+
variables["gameId"] = params.gameId;
|
|
1546
|
+
}
|
|
1547
|
+
if (params.first !== void 0) {
|
|
1548
|
+
defs.push("$first: Int");
|
|
1549
|
+
args.push("first: $first");
|
|
1550
|
+
variables["first"] = params.first;
|
|
1551
|
+
}
|
|
1552
|
+
if (params.after !== void 0) {
|
|
1553
|
+
defs.push("$after: String");
|
|
1554
|
+
args.push("after: $after");
|
|
1555
|
+
variables["after"] = params.after;
|
|
1556
|
+
}
|
|
1557
|
+
if (params.includeArchived !== void 0) {
|
|
1558
|
+
defs.push("$includeArchived: Boolean");
|
|
1559
|
+
args.push("includeArchived: $includeArchived");
|
|
1560
|
+
variables["includeArchived"] = params.includeArchived;
|
|
1561
|
+
}
|
|
1562
|
+
if (params.purpose !== void 0) {
|
|
1563
|
+
defs.push("$purpose: DatasetPurpose");
|
|
1564
|
+
args.push("purpose: $purpose");
|
|
1565
|
+
variables["purpose"] = params.purpose;
|
|
1566
|
+
}
|
|
1567
|
+
return {
|
|
1568
|
+
query: `
|
|
1569
|
+
query Datasets(${defs.join(", ")}) {
|
|
1570
|
+
datasets(${args.join(", ")}) {
|
|
1571
|
+
${connectionFields(`${DATASET_FIELDS}
|
|
1572
|
+
${SCHEMA_FIELDS}`)}
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
`,
|
|
1576
|
+
variables
|
|
1577
|
+
};
|
|
1578
|
+
},
|
|
1579
|
+
dataset(params) {
|
|
1580
|
+
const variables = {};
|
|
1581
|
+
const args = [];
|
|
1582
|
+
const defs = [];
|
|
1583
|
+
if (params.id !== void 0) {
|
|
1584
|
+
defs.push("$id: UUID");
|
|
1585
|
+
args.push("id: $id");
|
|
1586
|
+
variables["id"] = params.id;
|
|
1587
|
+
}
|
|
1588
|
+
if (params.publisherId !== void 0) {
|
|
1589
|
+
defs.push("$publisherId: UUID");
|
|
1590
|
+
args.push("publisherId: $publisherId");
|
|
1591
|
+
variables["publisherId"] = params.publisherId;
|
|
1592
|
+
}
|
|
1593
|
+
if (params.gameId !== void 0) {
|
|
1594
|
+
defs.push("$gameId: UUID");
|
|
1595
|
+
args.push("gameId: $gameId");
|
|
1596
|
+
variables["gameId"] = params.gameId;
|
|
1597
|
+
}
|
|
1598
|
+
if (params.datasetKey !== void 0) {
|
|
1599
|
+
defs.push("$datasetKey: String");
|
|
1600
|
+
args.push("datasetKey: $datasetKey");
|
|
1601
|
+
variables["datasetKey"] = params.datasetKey;
|
|
1602
|
+
}
|
|
1603
|
+
return {
|
|
1604
|
+
query: `
|
|
1605
|
+
query Dataset(${defs.join(", ")}) {
|
|
1606
|
+
dataset(${args.join(", ")}) {
|
|
1607
|
+
${DATASET_FIELDS}
|
|
1608
|
+
${SCHEMA_FIELDS}
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
`,
|
|
1612
|
+
variables
|
|
1613
|
+
};
|
|
1614
|
+
},
|
|
1615
|
+
// Records
|
|
1616
|
+
searchRecords(params) {
|
|
1617
|
+
const variables = {
|
|
1618
|
+
publisherSlug: params.publisherSlug,
|
|
1619
|
+
gameKey: params.gameKey,
|
|
1620
|
+
datasetKey: params.datasetKey
|
|
1621
|
+
};
|
|
1622
|
+
const args = [
|
|
1623
|
+
"publisherSlug: $publisherSlug",
|
|
1624
|
+
"gameKey: $gameKey",
|
|
1625
|
+
"datasetKey: $datasetKey"
|
|
1626
|
+
];
|
|
1627
|
+
const defs = ["$publisherSlug: String!", "$gameKey: String!", "$datasetKey: String!"];
|
|
1628
|
+
if (params.filter !== void 0) {
|
|
1629
|
+
defs.push("$filter: JSON");
|
|
1630
|
+
args.push("filter: $filter");
|
|
1631
|
+
variables["filter"] = params.filter;
|
|
1632
|
+
}
|
|
1633
|
+
if (params.search !== void 0) {
|
|
1634
|
+
defs.push("$search: String");
|
|
1635
|
+
args.push("search: $search");
|
|
1636
|
+
variables["search"] = params.search;
|
|
1637
|
+
}
|
|
1638
|
+
if (params.orderBy !== void 0) {
|
|
1639
|
+
defs.push("$orderBy: String");
|
|
1640
|
+
args.push("orderBy: $orderBy");
|
|
1641
|
+
variables["orderBy"] = params.orderBy;
|
|
1642
|
+
}
|
|
1643
|
+
if (params.resolveLinks !== void 0) {
|
|
1644
|
+
defs.push("$resolveLinks: [String!]");
|
|
1645
|
+
args.push("resolveLinks: $resolveLinks");
|
|
1646
|
+
variables["resolveLinks"] = params.resolveLinks;
|
|
1647
|
+
}
|
|
1648
|
+
if (params.first !== void 0) {
|
|
1649
|
+
defs.push("$first: Int");
|
|
1650
|
+
args.push("first: $first");
|
|
1651
|
+
variables["first"] = params.first;
|
|
1652
|
+
}
|
|
1653
|
+
if (params.after !== void 0) {
|
|
1654
|
+
defs.push("$after: String");
|
|
1655
|
+
args.push("after: $after");
|
|
1656
|
+
variables["after"] = params.after;
|
|
1657
|
+
}
|
|
1658
|
+
if (params.validateSchema !== void 0) {
|
|
1659
|
+
defs.push("$validateSchema: Boolean");
|
|
1660
|
+
args.push("validateSchema: $validateSchema");
|
|
1661
|
+
variables["validateSchema"] = params.validateSchema;
|
|
1662
|
+
}
|
|
1663
|
+
const includeResolvedLinks = params.resolveLinks && params.resolveLinks.length > 0;
|
|
1664
|
+
const selectedRecordFields = recordFields({ includePricing: params.includePricing });
|
|
1665
|
+
const nodeFields = includeResolvedLinks ? `${selectedRecordFields}
|
|
1666
|
+
${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
1667
|
+
return {
|
|
1668
|
+
query: `
|
|
1669
|
+
query SearchRecords(${defs.join(", ")}) {
|
|
1670
|
+
searchRecords(${args.join(", ")}) {
|
|
1671
|
+
${connectionFields(nodeFields)}
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1674
|
+
`,
|
|
1675
|
+
variables
|
|
1676
|
+
};
|
|
1677
|
+
},
|
|
1678
|
+
fetchRecordById(params = {}) {
|
|
1679
|
+
return {
|
|
1680
|
+
query: `
|
|
1681
|
+
query FetchRecord($id: UUID!) {
|
|
1682
|
+
fetchRecord(id: $id) {
|
|
1683
|
+
${recordFields(params)}
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
`
|
|
1687
|
+
};
|
|
1688
|
+
},
|
|
1689
|
+
fetchRecordByIdentifier(params = {}) {
|
|
1690
|
+
return {
|
|
1691
|
+
query: `
|
|
1692
|
+
query FetchRecordByIdentifier($publisherSlug: String!, $gameKey: String!, $datasetKey: String!, $identifier: String!) {
|
|
1693
|
+
fetchRecordByIdentifier(publisherSlug: $publisherSlug, gameKey: $gameKey, datasetKey: $datasetKey, identifier: $identifier) {
|
|
1694
|
+
${recordFields(params)}
|
|
1695
|
+
}
|
|
1696
|
+
}
|
|
1697
|
+
`
|
|
1698
|
+
};
|
|
1699
|
+
},
|
|
1700
|
+
fetchRecordsByIdentifier(params = {}) {
|
|
1701
|
+
return {
|
|
1702
|
+
query: `
|
|
1703
|
+
query FetchRecordsByIdentifier($publisherSlug: String!, $gameKey: String!, $datasetKey: String!, $identifiers: [String!]!) {
|
|
1704
|
+
fetchRecordsByIdentifier(publisherSlug: $publisherSlug, gameKey: $gameKey, datasetKey: $datasetKey, identifiers: $identifiers) {
|
|
1705
|
+
${recordFields(params)}
|
|
1706
|
+
}
|
|
1707
|
+
}
|
|
1708
|
+
`
|
|
1709
|
+
};
|
|
1710
|
+
},
|
|
1711
|
+
fetchRecords(params = {}) {
|
|
1712
|
+
return {
|
|
1713
|
+
query: `
|
|
1714
|
+
query FetchRecords($ids: [UUID!]!) {
|
|
1715
|
+
fetchRecords(ids: $ids) {
|
|
1716
|
+
${recordFields(params)}
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
`
|
|
1720
|
+
};
|
|
1721
|
+
},
|
|
1722
|
+
listDatasetRecords(params) {
|
|
1723
|
+
const variables = { datasetId: params.datasetId };
|
|
1724
|
+
const args = ["datasetId: $datasetId"];
|
|
1725
|
+
const defs = ["$datasetId: UUID!"];
|
|
1726
|
+
if (params.filter !== void 0) {
|
|
1727
|
+
defs.push("$filter: JSON");
|
|
1728
|
+
args.push("filter: $filter");
|
|
1729
|
+
variables["filter"] = params.filter;
|
|
1730
|
+
}
|
|
1731
|
+
if (params.orderBy !== void 0) {
|
|
1732
|
+
defs.push("$orderBy: DatasetRecordOrderByInput");
|
|
1733
|
+
args.push("orderBy: $orderBy");
|
|
1734
|
+
variables["orderBy"] = params.orderBy;
|
|
1735
|
+
}
|
|
1736
|
+
if (params.first !== void 0) {
|
|
1737
|
+
defs.push("$first: Int");
|
|
1738
|
+
args.push("first: $first");
|
|
1739
|
+
variables["first"] = params.first;
|
|
1740
|
+
}
|
|
1741
|
+
if (params.after !== void 0) {
|
|
1742
|
+
defs.push("$after: String");
|
|
1743
|
+
args.push("after: $after");
|
|
1744
|
+
variables["after"] = params.after;
|
|
1745
|
+
}
|
|
1746
|
+
if (params.last !== void 0) {
|
|
1747
|
+
defs.push("$last: Int");
|
|
1748
|
+
args.push("last: $last");
|
|
1749
|
+
variables["last"] = params.last;
|
|
1750
|
+
}
|
|
1751
|
+
if (params.before !== void 0) {
|
|
1752
|
+
defs.push("$before: String");
|
|
1753
|
+
args.push("before: $before");
|
|
1754
|
+
variables["before"] = params.before;
|
|
1755
|
+
}
|
|
1756
|
+
if (params.validateSchema !== void 0) {
|
|
1757
|
+
defs.push("$validateSchema: Boolean");
|
|
1758
|
+
args.push("validateSchema: $validateSchema");
|
|
1759
|
+
variables["validateSchema"] = params.validateSchema;
|
|
1760
|
+
}
|
|
1761
|
+
return {
|
|
1762
|
+
query: `
|
|
1763
|
+
query DatasetRecords(${defs.join(", ")}) {
|
|
1764
|
+
datasetRecords(${args.join(", ")}) {
|
|
1765
|
+
${connectionFields(RECORD_FIELDS)}
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
`,
|
|
1769
|
+
variables
|
|
1770
|
+
};
|
|
1771
|
+
},
|
|
1772
|
+
datasetRecord(params) {
|
|
1773
|
+
const variables = {};
|
|
1774
|
+
const args = [];
|
|
1775
|
+
const defs = [];
|
|
1776
|
+
if (params.id !== void 0) {
|
|
1777
|
+
defs.push("$id: UUID");
|
|
1778
|
+
args.push("id: $id");
|
|
1779
|
+
variables["id"] = params.id;
|
|
1780
|
+
}
|
|
1781
|
+
if (params.datasetId !== void 0) {
|
|
1782
|
+
defs.push("$datasetId: UUID");
|
|
1783
|
+
args.push("datasetId: $datasetId");
|
|
1784
|
+
variables["datasetId"] = params.datasetId;
|
|
1785
|
+
}
|
|
1786
|
+
if (params.identifier !== void 0) {
|
|
1787
|
+
defs.push("$identifier: String");
|
|
1788
|
+
args.push("identifier: $identifier");
|
|
1789
|
+
variables["identifier"] = params.identifier;
|
|
1790
|
+
}
|
|
1791
|
+
if (params.publisherSlug !== void 0) {
|
|
1792
|
+
defs.push("$publisherSlug: String");
|
|
1793
|
+
args.push("publisherSlug: $publisherSlug");
|
|
1794
|
+
variables["publisherSlug"] = params.publisherSlug;
|
|
1795
|
+
}
|
|
1796
|
+
if (params.gameKey !== void 0) {
|
|
1797
|
+
defs.push("$gameKey: String");
|
|
1798
|
+
args.push("gameKey: $gameKey");
|
|
1799
|
+
variables["gameKey"] = params.gameKey;
|
|
1800
|
+
}
|
|
1801
|
+
if (params.datasetKey !== void 0) {
|
|
1802
|
+
defs.push("$datasetKey: String");
|
|
1803
|
+
args.push("datasetKey: $datasetKey");
|
|
1804
|
+
variables["datasetKey"] = params.datasetKey;
|
|
1805
|
+
}
|
|
1806
|
+
if (params.recordId !== void 0) {
|
|
1807
|
+
defs.push("$recordId: UUID");
|
|
1808
|
+
args.push("recordId: $recordId");
|
|
1809
|
+
variables["recordId"] = params.recordId;
|
|
1810
|
+
}
|
|
1811
|
+
if (params.resolveLinks !== void 0) {
|
|
1812
|
+
defs.push("$resolveLinks: [String!]");
|
|
1813
|
+
args.push("resolveLinks: $resolveLinks");
|
|
1814
|
+
variables["resolveLinks"] = params.resolveLinks;
|
|
1815
|
+
}
|
|
1816
|
+
if (params.validateSchema !== void 0) {
|
|
1817
|
+
defs.push("$validateSchema: Boolean");
|
|
1818
|
+
args.push("validateSchema: $validateSchema");
|
|
1819
|
+
variables["validateSchema"] = params.validateSchema;
|
|
1820
|
+
}
|
|
1821
|
+
const includeResolvedLinks = params.resolveLinks && params.resolveLinks.length > 0;
|
|
1822
|
+
const selectedRecordFields = recordFields({ includePricing: params.includePricing });
|
|
1823
|
+
const fields = includeResolvedLinks ? `${selectedRecordFields}
|
|
1824
|
+
${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
1825
|
+
return {
|
|
1826
|
+
query: `
|
|
1827
|
+
query DatasetRecord(${defs.join(", ")}) {
|
|
1828
|
+
datasetRecord(${args.join(", ")}) {
|
|
1829
|
+
${fields}
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
`,
|
|
1833
|
+
variables
|
|
1834
|
+
};
|
|
1835
|
+
},
|
|
1836
|
+
upsertDatasetRecords() {
|
|
1837
|
+
return {
|
|
1838
|
+
query: `
|
|
1839
|
+
mutation DatasetRecordsUpsert($input: DatasetRecordsUpsertInput!) {
|
|
1840
|
+
datasetRecordsUpsert(input: $input) {
|
|
1841
|
+
${DATASET_RECORDS_UPSERT_PAYLOAD_FIELDS}
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
`
|
|
1845
|
+
};
|
|
1846
|
+
},
|
|
1847
|
+
deleteDatasetRecords() {
|
|
1848
|
+
return {
|
|
1849
|
+
query: `
|
|
1850
|
+
mutation DatasetRecordsDelete($input: DatasetRecordsDeleteInput!) {
|
|
1851
|
+
datasetRecordsDelete(input: $input) {
|
|
1852
|
+
${DATASET_RECORD_DELETE_JOB_FIELDS}
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
`
|
|
1856
|
+
};
|
|
1857
|
+
},
|
|
1858
|
+
datasetRecordDeleteJob() {
|
|
1859
|
+
return {
|
|
1860
|
+
query: `
|
|
1861
|
+
query DatasetRecordDeleteJob($id: UUID!) {
|
|
1862
|
+
datasetRecordDeleteJob(id: $id) {
|
|
1863
|
+
${DATASET_RECORD_DELETE_JOB_FIELDS}
|
|
1864
|
+
}
|
|
1865
|
+
}
|
|
1866
|
+
`
|
|
1867
|
+
};
|
|
1868
|
+
},
|
|
1869
|
+
datasetRecordDeleteJobs(params) {
|
|
1870
|
+
const variables = { publisherId: params.publisherId };
|
|
1871
|
+
const args = ["publisherId: $publisherId"];
|
|
1872
|
+
const defs = ["$publisherId: UUID!"];
|
|
1873
|
+
if (params.datasetId !== void 0) {
|
|
1874
|
+
defs.push("$datasetId: UUID");
|
|
1875
|
+
args.push("datasetId: $datasetId");
|
|
1876
|
+
variables["datasetId"] = params.datasetId;
|
|
1877
|
+
}
|
|
1878
|
+
if (params.status !== void 0) {
|
|
1879
|
+
defs.push("$status: DatasetRecordDeleteJobStatus");
|
|
1880
|
+
args.push("status: $status");
|
|
1881
|
+
variables["status"] = params.status;
|
|
1882
|
+
}
|
|
1883
|
+
if (params.first !== void 0) {
|
|
1884
|
+
defs.push("$first: Int");
|
|
1885
|
+
args.push("first: $first");
|
|
1886
|
+
variables["first"] = params.first;
|
|
1887
|
+
}
|
|
1888
|
+
if (params.after !== void 0) {
|
|
1889
|
+
defs.push("$after: String");
|
|
1890
|
+
args.push("after: $after");
|
|
1891
|
+
variables["after"] = params.after;
|
|
1892
|
+
}
|
|
1893
|
+
return {
|
|
1894
|
+
query: `
|
|
1895
|
+
query DatasetRecordDeleteJobs(${defs.join(", ")}) {
|
|
1896
|
+
datasetRecordDeleteJobs(${args.join(", ")}) {
|
|
1897
|
+
${connectionFields(DATASET_RECORD_DELETE_JOB_FIELDS)}
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
`,
|
|
1901
|
+
variables
|
|
1902
|
+
};
|
|
1903
|
+
},
|
|
1904
|
+
datasetImportPreview() {
|
|
1905
|
+
return {
|
|
1906
|
+
query: `
|
|
1907
|
+
query DatasetImportPreview($input: DatasetImportPreviewInput!) {
|
|
1908
|
+
datasetImportPreview(input: $input) {
|
|
1909
|
+
${DATASET_IMPORT_PREVIEW_FIELDS}
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
`
|
|
1913
|
+
};
|
|
1914
|
+
},
|
|
1915
|
+
datasetImportValidate() {
|
|
1916
|
+
return {
|
|
1917
|
+
query: `
|
|
1918
|
+
query DatasetImportValidate($input: DatasetImportValidateInput!) {
|
|
1919
|
+
datasetImportValidate(input: $input) {
|
|
1920
|
+
${BULK_IMPORT_RESULT_FIELDS}
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
`
|
|
1924
|
+
};
|
|
1925
|
+
},
|
|
1926
|
+
datasetImportFromFile() {
|
|
1927
|
+
return {
|
|
1928
|
+
query: `
|
|
1929
|
+
mutation DatasetImportFromFile($input: DatasetImportFromFileInput!) {
|
|
1930
|
+
datasetImportFromFile(input: $input) {
|
|
1931
|
+
${IMPORT_JOB_FIELDS}
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
`
|
|
1935
|
+
};
|
|
1936
|
+
},
|
|
1937
|
+
datasetImportFromPayload() {
|
|
1938
|
+
return {
|
|
1939
|
+
query: `
|
|
1940
|
+
mutation DatasetImportFromPayload($input: DatasetImportFromPayloadInput!) {
|
|
1941
|
+
datasetImportFromPayload(input: $input) {
|
|
1942
|
+
${IMPORT_JOB_FIELDS}
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
`
|
|
1946
|
+
};
|
|
1947
|
+
},
|
|
1948
|
+
datasetImportFromUrl() {
|
|
1949
|
+
return {
|
|
1950
|
+
query: `
|
|
1951
|
+
mutation DatasetImportFromUrl($input: DatasetImportFromUrlInput!) {
|
|
1952
|
+
datasetImportFromUrl(input: $input) {
|
|
1953
|
+
${IMPORT_JOB_FIELDS}
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
`
|
|
1957
|
+
};
|
|
1958
|
+
},
|
|
1959
|
+
importJob() {
|
|
1960
|
+
return {
|
|
1961
|
+
query: `
|
|
1962
|
+
query ImportJob($id: UUID!) {
|
|
1963
|
+
importJob(id: $id) {
|
|
1964
|
+
${IMPORT_JOB_FIELDS}
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
`
|
|
1968
|
+
};
|
|
1969
|
+
},
|
|
1970
|
+
importJobs(params) {
|
|
1971
|
+
const variables = { publisherId: params.publisherId };
|
|
1972
|
+
const args = ["publisherId: $publisherId"];
|
|
1973
|
+
const defs = ["$publisherId: UUID!"];
|
|
1974
|
+
if (params.datasetId !== void 0) {
|
|
1975
|
+
defs.push("$datasetId: UUID");
|
|
1976
|
+
args.push("datasetId: $datasetId");
|
|
1977
|
+
variables["datasetId"] = params.datasetId;
|
|
1978
|
+
}
|
|
1979
|
+
if (params.status !== void 0) {
|
|
1980
|
+
defs.push("$status: ImportJobStatus");
|
|
1981
|
+
args.push("status: $status");
|
|
1982
|
+
variables["status"] = params.status;
|
|
1983
|
+
}
|
|
1984
|
+
if (params.first !== void 0) {
|
|
1985
|
+
defs.push("$first: Int");
|
|
1986
|
+
args.push("first: $first");
|
|
1987
|
+
variables["first"] = params.first;
|
|
1988
|
+
}
|
|
1989
|
+
if (params.after !== void 0) {
|
|
1990
|
+
defs.push("$after: String");
|
|
1991
|
+
args.push("after: $after");
|
|
1992
|
+
variables["after"] = params.after;
|
|
1993
|
+
}
|
|
864
1994
|
return {
|
|
865
1995
|
query: `
|
|
866
|
-
query
|
|
867
|
-
|
|
868
|
-
${connectionFields(
|
|
1996
|
+
query ImportJobs(${defs.join(", ")}) {
|
|
1997
|
+
importJobs(${args.join(", ")}) {
|
|
1998
|
+
${connectionFields(IMPORT_JOB_FIELDS)}
|
|
869
1999
|
}
|
|
870
2000
|
}
|
|
871
2001
|
`,
|
|
872
2002
|
variables
|
|
873
2003
|
};
|
|
874
2004
|
},
|
|
875
|
-
|
|
2005
|
+
importJobCancel() {
|
|
876
2006
|
return {
|
|
877
2007
|
query: `
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
${
|
|
2008
|
+
mutation ImportJobCancel($id: UUID!) {
|
|
2009
|
+
importJobCancel(id: $id) {
|
|
2010
|
+
${IMPORT_JOB_FIELDS}
|
|
881
2011
|
}
|
|
882
2012
|
}
|
|
883
2013
|
`
|
|
884
2014
|
};
|
|
885
2015
|
},
|
|
886
|
-
|
|
2016
|
+
importJobLogs(params) {
|
|
2017
|
+
const variables = { importJobId: params.importJobId };
|
|
2018
|
+
const args = ["id: $importJobId"];
|
|
2019
|
+
const logArgs = [];
|
|
2020
|
+
const defs = ["$importJobId: UUID!"];
|
|
2021
|
+
if (params.level !== void 0) {
|
|
2022
|
+
defs.push("$level: ImportLogLevel");
|
|
2023
|
+
logArgs.push("level: $level");
|
|
2024
|
+
variables["level"] = params.level;
|
|
2025
|
+
}
|
|
2026
|
+
if (params.datasetKey !== void 0) {
|
|
2027
|
+
defs.push("$datasetKey: String");
|
|
2028
|
+
logArgs.push("datasetKey: $datasetKey");
|
|
2029
|
+
variables["datasetKey"] = params.datasetKey;
|
|
2030
|
+
}
|
|
2031
|
+
if (params.first !== void 0) {
|
|
2032
|
+
defs.push("$first: Int");
|
|
2033
|
+
logArgs.push("first: $first");
|
|
2034
|
+
variables["first"] = params.first;
|
|
2035
|
+
}
|
|
2036
|
+
if (params.after !== void 0) {
|
|
2037
|
+
defs.push("$after: String");
|
|
2038
|
+
logArgs.push("after: $after");
|
|
2039
|
+
variables["after"] = params.after;
|
|
2040
|
+
}
|
|
2041
|
+
const logArgStr = logArgs.length > 0 ? `(${logArgs.join(", ")})` : "";
|
|
887
2042
|
return {
|
|
888
2043
|
query: `
|
|
889
|
-
query
|
|
890
|
-
|
|
891
|
-
${
|
|
2044
|
+
query ImportJobLogs(${defs.join(", ")}) {
|
|
2045
|
+
importJob(${args.join(", ")}) {
|
|
2046
|
+
logs${logArgStr} {
|
|
2047
|
+
${connectionFields(IMPORT_JOB_LOG_FIELDS)}
|
|
2048
|
+
}
|
|
892
2049
|
}
|
|
893
2050
|
}
|
|
894
|
-
|
|
2051
|
+
`,
|
|
2052
|
+
variables
|
|
895
2053
|
};
|
|
896
2054
|
},
|
|
897
|
-
|
|
2055
|
+
gameImportPreview() {
|
|
898
2056
|
return {
|
|
899
2057
|
query: `
|
|
900
|
-
query
|
|
901
|
-
|
|
902
|
-
${
|
|
2058
|
+
query GameImportPreview($input: GameImportPreviewInput!) {
|
|
2059
|
+
gameImportPreview(input: $input) {
|
|
2060
|
+
${GAME_IMPORT_PREVIEW_FIELDS}
|
|
903
2061
|
}
|
|
904
2062
|
}
|
|
905
2063
|
`
|
|
906
2064
|
};
|
|
907
2065
|
},
|
|
908
|
-
|
|
909
|
-
searchGames(params = {}) {
|
|
910
|
-
const variables = {};
|
|
911
|
-
const args = [];
|
|
912
|
-
const defs = [];
|
|
913
|
-
if (params.publisherSlug !== void 0) {
|
|
914
|
-
defs.push("$publisherSlug: String");
|
|
915
|
-
args.push("publisherSlug: $publisherSlug");
|
|
916
|
-
variables["publisherSlug"] = params.publisherSlug;
|
|
917
|
-
}
|
|
918
|
-
if (params.search !== void 0) {
|
|
919
|
-
defs.push("$search: String");
|
|
920
|
-
args.push("search: $search");
|
|
921
|
-
variables["search"] = params.search;
|
|
922
|
-
}
|
|
923
|
-
if (params.first !== void 0) {
|
|
924
|
-
defs.push("$first: Int");
|
|
925
|
-
args.push("first: $first");
|
|
926
|
-
variables["first"] = params.first;
|
|
927
|
-
}
|
|
928
|
-
if (params.after !== void 0) {
|
|
929
|
-
defs.push("$after: String");
|
|
930
|
-
args.push("after: $after");
|
|
931
|
-
variables["after"] = params.after;
|
|
932
|
-
}
|
|
933
|
-
const defStr = defs.length > 0 ? `(${defs.join(", ")})` : "";
|
|
934
|
-
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
2066
|
+
gameImportFromFile() {
|
|
935
2067
|
return {
|
|
936
2068
|
query: `
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
${
|
|
2069
|
+
mutation GameImportFromFile($input: GameImportFromFileInput!) {
|
|
2070
|
+
gameImportFromFile(input: $input) {
|
|
2071
|
+
${GAME_IMPORT_JOB_FIELDS}
|
|
940
2072
|
}
|
|
941
2073
|
}
|
|
942
|
-
|
|
943
|
-
variables
|
|
2074
|
+
`
|
|
944
2075
|
};
|
|
945
2076
|
},
|
|
946
|
-
|
|
2077
|
+
gameImportFromPayload() {
|
|
947
2078
|
return {
|
|
948
2079
|
query: `
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
${
|
|
2080
|
+
mutation GameImportFromPayload($input: GameImportFromPayloadInput!) {
|
|
2081
|
+
gameImportFromPayload(input: $input) {
|
|
2082
|
+
${GAME_IMPORT_JOB_FIELDS}
|
|
952
2083
|
}
|
|
953
2084
|
}
|
|
954
2085
|
`
|
|
955
2086
|
};
|
|
956
2087
|
},
|
|
957
|
-
|
|
2088
|
+
gameImportFromUrl() {
|
|
958
2089
|
return {
|
|
959
2090
|
query: `
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
${
|
|
2091
|
+
mutation GameImportFromUrl($input: GameImportFromUrlInput!) {
|
|
2092
|
+
gameImportFromUrl(input: $input) {
|
|
2093
|
+
${GAME_IMPORT_JOB_FIELDS}
|
|
963
2094
|
}
|
|
964
2095
|
}
|
|
965
2096
|
`
|
|
966
2097
|
};
|
|
967
2098
|
},
|
|
968
|
-
|
|
2099
|
+
gameImportJob() {
|
|
969
2100
|
return {
|
|
970
2101
|
query: `
|
|
971
|
-
query
|
|
972
|
-
|
|
973
|
-
${
|
|
2102
|
+
query GameImportJob($id: UUID!) {
|
|
2103
|
+
gameImportJob(id: $id) {
|
|
2104
|
+
${GAME_IMPORT_JOB_FIELDS}
|
|
974
2105
|
}
|
|
975
2106
|
}
|
|
976
2107
|
`
|
|
977
2108
|
};
|
|
978
2109
|
},
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
const
|
|
982
|
-
const
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
variables["publisherSlug"] = params.publisherSlug;
|
|
988
|
-
}
|
|
989
|
-
if (params.gameKey !== void 0) {
|
|
990
|
-
defs.push("$gameKey: String");
|
|
991
|
-
args.push("gameKey: $gameKey");
|
|
992
|
-
variables["gameKey"] = params.gameKey;
|
|
993
|
-
}
|
|
994
|
-
if (params.search !== void 0) {
|
|
995
|
-
defs.push("$search: String");
|
|
996
|
-
args.push("search: $search");
|
|
997
|
-
variables["search"] = params.search;
|
|
998
|
-
}
|
|
999
|
-
if (params.purpose !== void 0) {
|
|
1000
|
-
defs.push("$purpose: DatasetPurpose");
|
|
1001
|
-
args.push("purpose: $purpose");
|
|
1002
|
-
variables["purpose"] = params.purpose;
|
|
2110
|
+
gameImportJobs(params) {
|
|
2111
|
+
const variables = { gameId: params.gameId };
|
|
2112
|
+
const args = ["gameId: $gameId"];
|
|
2113
|
+
const defs = ["$gameId: UUID!"];
|
|
2114
|
+
if (params.status !== void 0) {
|
|
2115
|
+
defs.push("$status: ImportJobStatus");
|
|
2116
|
+
args.push("status: $status");
|
|
2117
|
+
variables["status"] = params.status;
|
|
1003
2118
|
}
|
|
1004
2119
|
if (params.first !== void 0) {
|
|
1005
2120
|
defs.push("$first: Int");
|
|
@@ -1011,86 +2126,99 @@ var QueryBuilder = {
|
|
|
1011
2126
|
args.push("after: $after");
|
|
1012
2127
|
variables["after"] = params.after;
|
|
1013
2128
|
}
|
|
1014
|
-
const defStr = defs.length > 0 ? `(${defs.join(", ")})` : "";
|
|
1015
|
-
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
1016
2129
|
return {
|
|
1017
2130
|
query: `
|
|
1018
|
-
query
|
|
1019
|
-
|
|
1020
|
-
${connectionFields(
|
|
2131
|
+
query GameImportJobs(${defs.join(", ")}) {
|
|
2132
|
+
gameImportJobs(${args.join(", ")}) {
|
|
2133
|
+
${connectionFields(GAME_IMPORT_JOB_FIELDS)}
|
|
1021
2134
|
}
|
|
1022
2135
|
}
|
|
1023
2136
|
`,
|
|
1024
2137
|
variables
|
|
1025
2138
|
};
|
|
1026
2139
|
},
|
|
1027
|
-
|
|
2140
|
+
gameImportJobCancel() {
|
|
1028
2141
|
return {
|
|
1029
2142
|
query: `
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
${
|
|
1033
|
-
${SCHEMA_FIELDS}
|
|
2143
|
+
mutation GameImportJobCancel($id: UUID!) {
|
|
2144
|
+
gameImportJobCancel(id: $id) {
|
|
2145
|
+
${GAME_IMPORT_JOB_FIELDS}
|
|
1034
2146
|
}
|
|
1035
2147
|
}
|
|
1036
2148
|
`
|
|
1037
2149
|
};
|
|
1038
2150
|
},
|
|
1039
|
-
|
|
2151
|
+
file() {
|
|
1040
2152
|
return {
|
|
1041
2153
|
query: `
|
|
1042
|
-
query
|
|
1043
|
-
|
|
1044
|
-
${
|
|
1045
|
-
${SCHEMA_FIELDS}
|
|
2154
|
+
query File($id: UUID!) {
|
|
2155
|
+
file(id: $id) {
|
|
2156
|
+
${FILE_FIELDS}
|
|
1046
2157
|
}
|
|
1047
2158
|
}
|
|
1048
2159
|
`
|
|
1049
2160
|
};
|
|
1050
2161
|
},
|
|
1051
|
-
|
|
2162
|
+
fileUploadRequest() {
|
|
1052
2163
|
return {
|
|
1053
2164
|
query: `
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
${
|
|
2165
|
+
mutation FileUploadRequest($input: FileUploadInput!) {
|
|
2166
|
+
fileUploadRequest(input: $input) {
|
|
2167
|
+
${PRESIGNED_UPLOAD_FIELDS}
|
|
1057
2168
|
}
|
|
1058
2169
|
}
|
|
1059
2170
|
`
|
|
1060
2171
|
};
|
|
1061
2172
|
},
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
2173
|
+
fileUploadConfirm() {
|
|
2174
|
+
return {
|
|
2175
|
+
query: `
|
|
2176
|
+
mutation FileUploadConfirm($id: UUID!) {
|
|
2177
|
+
fileUploadConfirm(id: $id) {
|
|
2178
|
+
${FILE_FIELDS}
|
|
2179
|
+
}
|
|
2180
|
+
}
|
|
2181
|
+
`
|
|
1068
2182
|
};
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
2183
|
+
},
|
|
2184
|
+
fileDelete() {
|
|
2185
|
+
return {
|
|
2186
|
+
query: `
|
|
2187
|
+
mutation FileDelete($id: UUID!) {
|
|
2188
|
+
fileDelete(id: $id)
|
|
2189
|
+
}
|
|
2190
|
+
`
|
|
2191
|
+
};
|
|
2192
|
+
},
|
|
2193
|
+
exportJob() {
|
|
2194
|
+
return {
|
|
2195
|
+
query: `
|
|
2196
|
+
query ExportJob($id: UUID!) {
|
|
2197
|
+
exportJob(id: $id) {
|
|
2198
|
+
${EXPORT_JOB_FIELDS}
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
`
|
|
2202
|
+
};
|
|
2203
|
+
},
|
|
2204
|
+
exportJobs(params) {
|
|
2205
|
+
const variables = { publisherId: params.publisherId };
|
|
2206
|
+
const args = ["publisherId: $publisherId"];
|
|
2207
|
+
const defs = ["$publisherId: UUID!"];
|
|
2208
|
+
if (params.gameId !== void 0) {
|
|
2209
|
+
defs.push("$gameId: UUID");
|
|
2210
|
+
args.push("gameId: $gameId");
|
|
2211
|
+
variables["gameId"] = params.gameId;
|
|
1084
2212
|
}
|
|
1085
|
-
if (params.
|
|
1086
|
-
defs.push("$
|
|
1087
|
-
args.push("
|
|
1088
|
-
variables["
|
|
2213
|
+
if (params.datasetId !== void 0) {
|
|
2214
|
+
defs.push("$datasetId: UUID");
|
|
2215
|
+
args.push("datasetId: $datasetId");
|
|
2216
|
+
variables["datasetId"] = params.datasetId;
|
|
1089
2217
|
}
|
|
1090
|
-
if (params.
|
|
1091
|
-
defs.push("$
|
|
1092
|
-
args.push("
|
|
1093
|
-
variables["
|
|
2218
|
+
if (params.status !== void 0) {
|
|
2219
|
+
defs.push("$status: ExportJobStatus");
|
|
2220
|
+
args.push("status: $status");
|
|
2221
|
+
variables["status"] = params.status;
|
|
1094
2222
|
}
|
|
1095
2223
|
if (params.first !== void 0) {
|
|
1096
2224
|
defs.push("$first: Int");
|
|
@@ -1102,65 +2230,45 @@ var QueryBuilder = {
|
|
|
1102
2230
|
args.push("after: $after");
|
|
1103
2231
|
variables["after"] = params.after;
|
|
1104
2232
|
}
|
|
1105
|
-
if (params.validateSchema !== void 0) {
|
|
1106
|
-
defs.push("$validateSchema: Boolean");
|
|
1107
|
-
args.push("validateSchema: $validateSchema");
|
|
1108
|
-
variables["validateSchema"] = params.validateSchema;
|
|
1109
|
-
}
|
|
1110
|
-
const includeResolvedLinks = params.resolveLinks && params.resolveLinks.length > 0;
|
|
1111
|
-
const selectedRecordFields = recordFields({ includePricing: params.includePricing });
|
|
1112
|
-
const nodeFields = includeResolvedLinks ? `${selectedRecordFields}
|
|
1113
|
-
${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
1114
2233
|
return {
|
|
1115
2234
|
query: `
|
|
1116
|
-
query
|
|
1117
|
-
|
|
1118
|
-
${connectionFields(
|
|
2235
|
+
query ExportJobs(${defs.join(", ")}) {
|
|
2236
|
+
exportJobs(${args.join(", ")}) {
|
|
2237
|
+
${connectionFields(EXPORT_JOB_FIELDS)}
|
|
1119
2238
|
}
|
|
1120
2239
|
}
|
|
1121
2240
|
`,
|
|
1122
2241
|
variables
|
|
1123
2242
|
};
|
|
1124
2243
|
},
|
|
1125
|
-
|
|
1126
|
-
return {
|
|
1127
|
-
query: `
|
|
1128
|
-
query FetchRecord($id: UUID!) {
|
|
1129
|
-
fetchRecord(id: $id) {
|
|
1130
|
-
${recordFields(params)}
|
|
1131
|
-
}
|
|
1132
|
-
}
|
|
1133
|
-
`
|
|
1134
|
-
};
|
|
1135
|
-
},
|
|
1136
|
-
fetchRecordByIdentifier(params = {}) {
|
|
2244
|
+
datasetExport() {
|
|
1137
2245
|
return {
|
|
1138
2246
|
query: `
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
${
|
|
2247
|
+
mutation DatasetExport($input: DatasetExportInput!) {
|
|
2248
|
+
datasetExport(input: $input) {
|
|
2249
|
+
${EXPORT_JOB_FIELDS}
|
|
1142
2250
|
}
|
|
1143
2251
|
}
|
|
1144
2252
|
`
|
|
1145
2253
|
};
|
|
1146
2254
|
},
|
|
1147
|
-
|
|
2255
|
+
exportJobCancel() {
|
|
1148
2256
|
return {
|
|
1149
2257
|
query: `
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
${
|
|
2258
|
+
mutation ExportJobCancel($id: UUID!) {
|
|
2259
|
+
exportJobCancel(id: $id) {
|
|
2260
|
+
${EXPORT_JOB_FIELDS}
|
|
1153
2261
|
}
|
|
1154
2262
|
}
|
|
1155
2263
|
`
|
|
1156
2264
|
};
|
|
1157
2265
|
},
|
|
1158
|
-
|
|
2266
|
+
exportJobRefreshUrl() {
|
|
1159
2267
|
return {
|
|
1160
2268
|
query: `
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
${
|
|
2269
|
+
mutation ExportJobRefreshUrl($id: UUID!) {
|
|
2270
|
+
exportJobRefreshUrl(id: $id) {
|
|
2271
|
+
${EXPORT_JOB_FIELDS}
|
|
1164
2272
|
}
|
|
1165
2273
|
}
|
|
1166
2274
|
`
|
|
@@ -1594,9 +2702,19 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
1594
2702
|
};
|
|
1595
2703
|
},
|
|
1596
2704
|
deckImportFormats(params) {
|
|
1597
|
-
const variables = {
|
|
1598
|
-
const args = [
|
|
1599
|
-
const defs = [
|
|
2705
|
+
const variables = {};
|
|
2706
|
+
const args = [];
|
|
2707
|
+
const defs = [];
|
|
2708
|
+
if (params.publisherId !== void 0) {
|
|
2709
|
+
defs.push("$publisherId: UUID");
|
|
2710
|
+
args.push("publisherId: $publisherId");
|
|
2711
|
+
variables["publisherId"] = params.publisherId;
|
|
2712
|
+
}
|
|
2713
|
+
if (params.gameId !== void 0) {
|
|
2714
|
+
defs.push("$gameId: UUID");
|
|
2715
|
+
args.push("gameId: $gameId");
|
|
2716
|
+
variables["gameId"] = params.gameId;
|
|
2717
|
+
}
|
|
1600
2718
|
if (params.includeArchived !== void 0) {
|
|
1601
2719
|
defs.push("$includeArchived: Boolean");
|
|
1602
2720
|
args.push("includeArchived: $includeArchived");
|
|
@@ -1612,10 +2730,12 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
1612
2730
|
args.push("after: $after");
|
|
1613
2731
|
variables["after"] = params.after;
|
|
1614
2732
|
}
|
|
2733
|
+
const defStr = defs.length > 0 ? `(${defs.join(", ")})` : "";
|
|
2734
|
+
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
1615
2735
|
return {
|
|
1616
2736
|
query: `
|
|
1617
|
-
query DeckImportFormats
|
|
1618
|
-
deckImportFormats
|
|
2737
|
+
query DeckImportFormats${defStr} {
|
|
2738
|
+
deckImportFormats${argStr} {
|
|
1619
2739
|
${connectionFields(DECK_IMPORT_FORMAT_DEFINITION_FIELDS)}
|
|
1620
2740
|
}
|
|
1621
2741
|
}
|
|
@@ -1626,8 +2746,8 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
1626
2746
|
deckImportFormat() {
|
|
1627
2747
|
return {
|
|
1628
2748
|
query: `
|
|
1629
|
-
query DeckImportFormat($id: UUID
|
|
1630
|
-
deckImportFormat(id: $id) {
|
|
2749
|
+
query DeckImportFormat($id: UUID, $gameId: UUID, $key: String) {
|
|
2750
|
+
deckImportFormat(id: $id, gameId: $gameId, key: $key) {
|
|
1631
2751
|
${DECK_IMPORT_FORMAT_DEFINITION_FIELDS}
|
|
1632
2752
|
}
|
|
1633
2753
|
}
|
|
@@ -2130,6 +3250,51 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
2130
3250
|
deckApiApplicationAccessRevokeVariables(deckId, apiApplicationId) {
|
|
2131
3251
|
return { deckId, apiApplicationId };
|
|
2132
3252
|
},
|
|
3253
|
+
gameCreateVariables(input) {
|
|
3254
|
+
return { input };
|
|
3255
|
+
},
|
|
3256
|
+
gameUpdateVariables(id, input) {
|
|
3257
|
+
return { id, input };
|
|
3258
|
+
},
|
|
3259
|
+
datasetImportPreviewVariables(input) {
|
|
3260
|
+
return { input };
|
|
3261
|
+
},
|
|
3262
|
+
datasetImportValidateVariables(input) {
|
|
3263
|
+
return { input };
|
|
3264
|
+
},
|
|
3265
|
+
datasetImportFromFileVariables(input) {
|
|
3266
|
+
return { input };
|
|
3267
|
+
},
|
|
3268
|
+
datasetImportFromPayloadVariables(input) {
|
|
3269
|
+
return { input };
|
|
3270
|
+
},
|
|
3271
|
+
datasetImportFromUrlVariables(input) {
|
|
3272
|
+
return { input };
|
|
3273
|
+
},
|
|
3274
|
+
gameImportPreviewVariables(input) {
|
|
3275
|
+
return { input };
|
|
3276
|
+
},
|
|
3277
|
+
gameImportFromFileVariables(input) {
|
|
3278
|
+
return { input };
|
|
3279
|
+
},
|
|
3280
|
+
gameImportFromPayloadVariables(input) {
|
|
3281
|
+
return { input };
|
|
3282
|
+
},
|
|
3283
|
+
gameImportFromUrlVariables(input) {
|
|
3284
|
+
return { input };
|
|
3285
|
+
},
|
|
3286
|
+
datasetRecordsUpsertVariables(input) {
|
|
3287
|
+
return { input };
|
|
3288
|
+
},
|
|
3289
|
+
datasetRecordsDeleteVariables(input) {
|
|
3290
|
+
return { input };
|
|
3291
|
+
},
|
|
3292
|
+
fileUploadRequestVariables(input) {
|
|
3293
|
+
return { input };
|
|
3294
|
+
},
|
|
3295
|
+
datasetExportVariables(input) {
|
|
3296
|
+
return { input };
|
|
3297
|
+
},
|
|
2133
3298
|
// API Key Info
|
|
2134
3299
|
fetchMe() {
|
|
2135
3300
|
return {
|