carddb 0.4.2 → 0.4.6
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.
- checksums.yaml +4 -4
- data/.rspec_status +158 -143
- data/README.md +15 -21
- data/lib/carddb/batch.rb +40 -6
- data/lib/carddb/client.rb +7 -0
- data/lib/carddb/collection.rb +112 -101
- data/lib/carddb/deck_tokens.rb +76 -61
- data/lib/carddb/query_builder.rb +318 -176
- data/lib/carddb/resources/decks.rb +94 -115
- data/lib/carddb/resources/rulesets.rb +180 -0
- data/lib/carddb/version.rb +1 -1
- data/lib/carddb.rb +8 -0
- metadata +2 -1
data/lib/carddb/query_builder.rb
CHANGED
|
@@ -968,8 +968,8 @@ module CardDB
|
|
|
968
968
|
|
|
969
969
|
def deck
|
|
970
970
|
<<~GRAPHQL
|
|
971
|
-
query Deck($id: UUID
|
|
972
|
-
deck(id: $id) {
|
|
971
|
+
query Deck($id: UUID!, $readState: DeckReadState!, $version: DeckPublishedVersionSelector) {
|
|
972
|
+
deck(id: $id, readState: $readState, version: $version) {
|
|
973
973
|
#{deck_fields}
|
|
974
974
|
}
|
|
975
975
|
}
|
|
@@ -1021,8 +1021,8 @@ module CardDB
|
|
|
1021
1021
|
|
|
1022
1022
|
def deck_by_external_ref
|
|
1023
1023
|
<<~GRAPHQL
|
|
1024
|
-
query DeckByExternalRef($externalRef: String
|
|
1025
|
-
deckByExternalRef(externalRef: $externalRef) {
|
|
1024
|
+
query DeckByExternalRef($externalRef: String!, $readState: DeckReadState!, $version: DeckPublishedVersionSelector) {
|
|
1025
|
+
deckByExternalRef(externalRef: $externalRef, readState: $readState, version: $version) {
|
|
1026
1026
|
#{deck_fields}
|
|
1027
1027
|
}
|
|
1028
1028
|
}
|
|
@@ -1053,37 +1053,6 @@ module CardDB
|
|
|
1053
1053
|
GRAPHQL
|
|
1054
1054
|
end
|
|
1055
1055
|
|
|
1056
|
-
# Builds a deckPreview query
|
|
1057
|
-
def deck_preview
|
|
1058
|
-
<<~GRAPHQL
|
|
1059
|
-
query DeckPreview($token: String!) {
|
|
1060
|
-
deckPreview(token: $token) {
|
|
1061
|
-
#{deck_fields}
|
|
1062
|
-
}
|
|
1063
|
-
}
|
|
1064
|
-
GRAPHQL
|
|
1065
|
-
end
|
|
1066
|
-
|
|
1067
|
-
def deck_embed
|
|
1068
|
-
<<~GRAPHQL
|
|
1069
|
-
query DeckEmbed($token: String!) {
|
|
1070
|
-
deckEmbed(token: $token) {
|
|
1071
|
-
#{deck_fields}
|
|
1072
|
-
}
|
|
1073
|
-
}
|
|
1074
|
-
GRAPHQL
|
|
1075
|
-
end
|
|
1076
|
-
|
|
1077
|
-
def deck_access
|
|
1078
|
-
<<~GRAPHQL
|
|
1079
|
-
query DeckAccess($token: String!) {
|
|
1080
|
-
deckAccess(token: $token) {
|
|
1081
|
-
#{deck_fields}
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
GRAPHQL
|
|
1085
|
-
end
|
|
1086
|
-
|
|
1087
1056
|
def deck_draft_diff
|
|
1088
1057
|
<<~GRAPHQL
|
|
1089
1058
|
query DeckDraftDiff($id: UUID!) {
|
|
@@ -1152,43 +1121,188 @@ module CardDB
|
|
|
1152
1121
|
GRAPHQL
|
|
1153
1122
|
end
|
|
1154
1123
|
|
|
1155
|
-
|
|
1156
|
-
|
|
1124
|
+
def rulesets(game_id:, include_archived: nil, first: nil, after: nil)
|
|
1125
|
+
args = build_args(
|
|
1126
|
+
{ gameId: game_id, includeArchived: include_archived, first: first, after: after },
|
|
1127
|
+
required: [:gameId]
|
|
1128
|
+
)
|
|
1129
|
+
|
|
1157
1130
|
<<~GRAPHQL
|
|
1158
|
-
query
|
|
1159
|
-
|
|
1160
|
-
#{
|
|
1131
|
+
query Rulesets#{args[:definition]} {
|
|
1132
|
+
rulesets#{args[:call]} {
|
|
1133
|
+
#{ruleset_connection_fields}
|
|
1161
1134
|
}
|
|
1162
1135
|
}
|
|
1163
1136
|
GRAPHQL
|
|
1164
1137
|
end
|
|
1165
1138
|
|
|
1166
|
-
|
|
1167
|
-
|
|
1139
|
+
def public_rulesets(game_id:, first: nil, after: nil)
|
|
1140
|
+
args = build_args({ gameId: game_id, first: first, after: after }, required: [:gameId])
|
|
1141
|
+
|
|
1168
1142
|
<<~GRAPHQL
|
|
1169
|
-
query
|
|
1170
|
-
|
|
1171
|
-
#{
|
|
1143
|
+
query PublicRulesets#{args[:definition]} {
|
|
1144
|
+
publicRulesets#{args[:call]} {
|
|
1145
|
+
#{ruleset_connection_fields}
|
|
1172
1146
|
}
|
|
1173
1147
|
}
|
|
1174
1148
|
GRAPHQL
|
|
1175
1149
|
end
|
|
1176
1150
|
|
|
1177
|
-
def
|
|
1151
|
+
def ruleset
|
|
1178
1152
|
<<~GRAPHQL
|
|
1179
|
-
query
|
|
1180
|
-
|
|
1181
|
-
#{
|
|
1153
|
+
query Ruleset($id: UUID, $gameId: UUID, $key: String) {
|
|
1154
|
+
ruleset(id: $id, gameId: $gameId, key: $key) {
|
|
1155
|
+
#{ruleset_fields}
|
|
1182
1156
|
}
|
|
1183
1157
|
}
|
|
1184
1158
|
GRAPHQL
|
|
1185
1159
|
end
|
|
1186
1160
|
|
|
1187
|
-
def
|
|
1161
|
+
def ruleset_versions(ruleset_id:, status: nil, first: nil, after: nil)
|
|
1162
|
+
args = build_args(
|
|
1163
|
+
{ rulesetId: ruleset_id, status: status, first: first, after: after },
|
|
1164
|
+
required: [:rulesetId],
|
|
1165
|
+
type_overrides: { status: 'RulesetVersionStatus' }
|
|
1166
|
+
)
|
|
1167
|
+
|
|
1188
1168
|
<<~GRAPHQL
|
|
1189
|
-
query
|
|
1190
|
-
|
|
1191
|
-
#{
|
|
1169
|
+
query RulesetVersions#{args[:definition]} {
|
|
1170
|
+
rulesetVersions#{args[:call]} {
|
|
1171
|
+
#{ruleset_version_connection_fields}
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
GRAPHQL
|
|
1175
|
+
end
|
|
1176
|
+
|
|
1177
|
+
def ruleset_version
|
|
1178
|
+
<<~GRAPHQL
|
|
1179
|
+
query RulesetVersion($id: UUID!) {
|
|
1180
|
+
rulesetVersion(id: $id) {
|
|
1181
|
+
#{ruleset_version_fields}
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
GRAPHQL
|
|
1185
|
+
end
|
|
1186
|
+
|
|
1187
|
+
def ruleset_validation_rules
|
|
1188
|
+
<<~GRAPHQL
|
|
1189
|
+
query RulesetValidationRules($gameId: UUID!, $rulesetKey: String!, $rulesetVersionId: UUID) {
|
|
1190
|
+
rulesetValidationRules(gameId: $gameId, rulesetKey: $rulesetKey, rulesetVersionId: $rulesetVersionId)
|
|
1191
|
+
}
|
|
1192
|
+
GRAPHQL
|
|
1193
|
+
end
|
|
1194
|
+
|
|
1195
|
+
def deck_validation_rules
|
|
1196
|
+
<<~GRAPHQL
|
|
1197
|
+
query DeckValidationRules($gameId: UUID!, $rulesetKey: String!, $rulesetVersionId: UUID) {
|
|
1198
|
+
deckValidationRules(gameId: $gameId, rulesetKey: $rulesetKey, rulesetVersionId: $rulesetVersionId) {
|
|
1199
|
+
#{deck_validation_rules_fields}
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
GRAPHQL
|
|
1203
|
+
end
|
|
1204
|
+
|
|
1205
|
+
def ruleset_version_draft_import_preview
|
|
1206
|
+
<<~GRAPHQL
|
|
1207
|
+
query RulesetVersionDraftImportPreview($rulesetId: UUID!, $input: RulesetVersionDraftImportFromDatasetRecordInput!) {
|
|
1208
|
+
rulesetVersionDraftImportPreview(rulesetId: $rulesetId, input: $input) {
|
|
1209
|
+
#{ruleset_version_draft_import_preview_fields}
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
GRAPHQL
|
|
1213
|
+
end
|
|
1214
|
+
|
|
1215
|
+
def ruleset_validation_impact(ruleset_version_id:, first: nil)
|
|
1216
|
+
args = build_args(
|
|
1217
|
+
{ rulesetVersionId: ruleset_version_id, first: first },
|
|
1218
|
+
required: [:rulesetVersionId]
|
|
1219
|
+
)
|
|
1220
|
+
|
|
1221
|
+
<<~GRAPHQL
|
|
1222
|
+
query RulesetValidationImpact#{args[:definition]} {
|
|
1223
|
+
rulesetValidationImpact#{args[:call]} {
|
|
1224
|
+
#{ruleset_validation_impact_fields}
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
GRAPHQL
|
|
1228
|
+
end
|
|
1229
|
+
|
|
1230
|
+
def create_ruleset
|
|
1231
|
+
<<~GRAPHQL
|
|
1232
|
+
mutation RulesetCreate($input: RulesetCreateInput!) {
|
|
1233
|
+
rulesetCreate(input: $input) {
|
|
1234
|
+
#{ruleset_fields}
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
GRAPHQL
|
|
1238
|
+
end
|
|
1239
|
+
|
|
1240
|
+
def update_ruleset
|
|
1241
|
+
<<~GRAPHQL
|
|
1242
|
+
mutation RulesetUpdate($id: UUID!, $input: RulesetUpdateInput!) {
|
|
1243
|
+
rulesetUpdate(id: $id, input: $input) {
|
|
1244
|
+
#{ruleset_fields}
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
GRAPHQL
|
|
1248
|
+
end
|
|
1249
|
+
|
|
1250
|
+
def create_ruleset_version_draft
|
|
1251
|
+
<<~GRAPHQL
|
|
1252
|
+
mutation RulesetVersionDraftCreate($rulesetId: UUID!, $input: RulesetVersionDraftCreateInput!) {
|
|
1253
|
+
rulesetVersionDraftCreate(rulesetId: $rulesetId, input: $input) {
|
|
1254
|
+
#{ruleset_version_fields}
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
GRAPHQL
|
|
1258
|
+
end
|
|
1259
|
+
|
|
1260
|
+
def import_ruleset_version_draft_from_dataset_record
|
|
1261
|
+
<<~GRAPHQL
|
|
1262
|
+
mutation RulesetVersionDraftImportFromDatasetRecord($rulesetId: UUID!, $input: RulesetVersionDraftImportFromDatasetRecordInput!) {
|
|
1263
|
+
rulesetVersionDraftImportFromDatasetRecord(rulesetId: $rulesetId, input: $input) {
|
|
1264
|
+
#{ruleset_version_fields}
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
GRAPHQL
|
|
1268
|
+
end
|
|
1269
|
+
|
|
1270
|
+
def update_ruleset_version_draft
|
|
1271
|
+
<<~GRAPHQL
|
|
1272
|
+
mutation RulesetVersionDraftUpdate($id: UUID!, $input: RulesetVersionDraftUpdateInput!) {
|
|
1273
|
+
rulesetVersionDraftUpdate(id: $id, input: $input) {
|
|
1274
|
+
#{ruleset_version_fields}
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
GRAPHQL
|
|
1278
|
+
end
|
|
1279
|
+
|
|
1280
|
+
def publish_ruleset_version
|
|
1281
|
+
<<~GRAPHQL
|
|
1282
|
+
mutation RulesetVersionPublish($id: UUID!, $input: RulesetVersionPublishInput) {
|
|
1283
|
+
rulesetVersionPublish(id: $id, input: $input) {
|
|
1284
|
+
#{ruleset_version_fields}
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
GRAPHQL
|
|
1288
|
+
end
|
|
1289
|
+
|
|
1290
|
+
def activate_ruleset_version
|
|
1291
|
+
<<~GRAPHQL
|
|
1292
|
+
mutation RulesetVersionActivate($id: UUID!) {
|
|
1293
|
+
rulesetVersionActivate(id: $id) {
|
|
1294
|
+
#{ruleset_version_fields}
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
GRAPHQL
|
|
1298
|
+
end
|
|
1299
|
+
|
|
1300
|
+
# Builds a deckCollaborators query
|
|
1301
|
+
def deck_collaborators
|
|
1302
|
+
<<~GRAPHQL
|
|
1303
|
+
query DeckCollaborators($deckId: UUID!) {
|
|
1304
|
+
deckCollaborators(deckId: $deckId) {
|
|
1305
|
+
#{deck_collaborator_fields}
|
|
1192
1306
|
}
|
|
1193
1307
|
}
|
|
1194
1308
|
GRAPHQL
|
|
@@ -1485,119 +1599,51 @@ module CardDB
|
|
|
1485
1599
|
GRAPHQL
|
|
1486
1600
|
end
|
|
1487
1601
|
|
|
1488
|
-
|
|
1489
|
-
def create_deck_preview_token
|
|
1490
|
-
<<~GRAPHQL
|
|
1491
|
-
mutation DeckPreviewTokenCreate($input: DeckPreviewTokenCreateInput!) {
|
|
1492
|
-
deckPreviewTokenCreate(input: $input) {
|
|
1493
|
-
token
|
|
1494
|
-
previewToken {
|
|
1495
|
-
#{deck_preview_token_fields}
|
|
1496
|
-
}
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
GRAPHQL
|
|
1500
|
-
end
|
|
1501
|
-
|
|
1502
|
-
# Builds a deckPreviewTokenRevoke mutation
|
|
1503
|
-
def revoke_deck_preview_token
|
|
1504
|
-
<<~GRAPHQL
|
|
1505
|
-
mutation DeckPreviewTokenRevoke($id: UUID!) {
|
|
1506
|
-
deckPreviewTokenRevoke(id: $id)
|
|
1507
|
-
}
|
|
1508
|
-
GRAPHQL
|
|
1509
|
-
end
|
|
1510
|
-
|
|
1511
|
-
def create_deck_embed_token
|
|
1602
|
+
def create_deck_token_issuer
|
|
1512
1603
|
<<~GRAPHQL
|
|
1513
|
-
mutation
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
embedToken {
|
|
1517
|
-
#{deck_embed_token_fields}
|
|
1518
|
-
}
|
|
1604
|
+
mutation DeckTokenIssuerCreate($input: DeckTokenIssuerCreateInput!) {
|
|
1605
|
+
deckTokenIssuerCreate(input: $input) {
|
|
1606
|
+
#{deck_token_issuer_fields}
|
|
1519
1607
|
}
|
|
1520
1608
|
}
|
|
1521
1609
|
GRAPHQL
|
|
1522
1610
|
end
|
|
1523
1611
|
|
|
1524
|
-
def
|
|
1612
|
+
def revoke_deck_token_issuer
|
|
1525
1613
|
<<~GRAPHQL
|
|
1526
|
-
mutation
|
|
1527
|
-
|
|
1614
|
+
mutation DeckTokenIssuerRevoke($id: UUID!) {
|
|
1615
|
+
deckTokenIssuerRevoke(id: $id)
|
|
1528
1616
|
}
|
|
1529
1617
|
GRAPHQL
|
|
1530
1618
|
end
|
|
1531
1619
|
|
|
1532
|
-
def
|
|
1620
|
+
def revoke_deck_token_issuer_signing_key
|
|
1533
1621
|
<<~GRAPHQL
|
|
1534
|
-
mutation
|
|
1535
|
-
|
|
1536
|
-
#{
|
|
1622
|
+
mutation DeckTokenIssuerSigningKeyRevoke($id: UUID!) {
|
|
1623
|
+
deckTokenIssuerSigningKeyRevoke(id: $id) {
|
|
1624
|
+
#{deck_token_issuer_fields}
|
|
1537
1625
|
}
|
|
1538
1626
|
}
|
|
1539
1627
|
GRAPHQL
|
|
1540
1628
|
end
|
|
1541
1629
|
|
|
1542
|
-
def
|
|
1630
|
+
def exchange_deck_token
|
|
1543
1631
|
<<~GRAPHQL
|
|
1544
|
-
mutation
|
|
1545
|
-
|
|
1546
|
-
}
|
|
1547
|
-
GRAPHQL
|
|
1548
|
-
end
|
|
1549
|
-
|
|
1550
|
-
def revoke_deck_access_token_issuer_signing_key
|
|
1551
|
-
<<~GRAPHQL
|
|
1552
|
-
mutation DeckAccessTokenIssuerSigningKeyRevoke($id: UUID!) {
|
|
1553
|
-
deckAccessTokenIssuerSigningKeyRevoke(id: $id) {
|
|
1554
|
-
#{deck_access_token_issuer_fields}
|
|
1555
|
-
}
|
|
1556
|
-
}
|
|
1557
|
-
GRAPHQL
|
|
1558
|
-
end
|
|
1559
|
-
|
|
1560
|
-
def exchange_deck_access_token
|
|
1561
|
-
<<~GRAPHQL
|
|
1562
|
-
mutation DeckAccessTokenExchange($input: DeckAccessTokenExchangeInput!) {
|
|
1563
|
-
deckAccessTokenExchange(input: $input) {
|
|
1632
|
+
mutation DeckTokenExchange($input: DeckTokenExchangeInput!) {
|
|
1633
|
+
deckTokenExchange(input: $input) {
|
|
1564
1634
|
token
|
|
1565
|
-
|
|
1566
|
-
#{
|
|
1635
|
+
deckToken {
|
|
1636
|
+
#{deck_token_fields}
|
|
1567
1637
|
}
|
|
1568
1638
|
}
|
|
1569
1639
|
}
|
|
1570
1640
|
GRAPHQL
|
|
1571
1641
|
end
|
|
1572
1642
|
|
|
1573
|
-
def
|
|
1643
|
+
def revoke_deck_token
|
|
1574
1644
|
<<~GRAPHQL
|
|
1575
|
-
mutation
|
|
1576
|
-
|
|
1577
|
-
token
|
|
1578
|
-
sessionToken {
|
|
1579
|
-
id
|
|
1580
|
-
accountId
|
|
1581
|
-
apiApplicationId
|
|
1582
|
-
gameId
|
|
1583
|
-
environment
|
|
1584
|
-
externalSubject
|
|
1585
|
-
scopes
|
|
1586
|
-
expiresAt
|
|
1587
|
-
revokedAt
|
|
1588
|
-
lastUsedAt
|
|
1589
|
-
createdAt
|
|
1590
|
-
updatedAt
|
|
1591
|
-
}
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
GRAPHQL
|
|
1595
|
-
end
|
|
1596
|
-
|
|
1597
|
-
def revoke_deck_access_token
|
|
1598
|
-
<<~GRAPHQL
|
|
1599
|
-
mutation DeckAccessTokenRevoke($id: UUID!) {
|
|
1600
|
-
deckAccessTokenRevoke(id: $id)
|
|
1645
|
+
mutation DeckTokenRevoke($id: UUID!) {
|
|
1646
|
+
deckTokenRevoke(id: $id)
|
|
1601
1647
|
}
|
|
1602
1648
|
GRAPHQL
|
|
1603
1649
|
end
|
|
@@ -1687,6 +1733,7 @@ module CardDB
|
|
|
1687
1733
|
externalRef: 'String',
|
|
1688
1734
|
deckId: 'UUID!',
|
|
1689
1735
|
gameId: 'UUID',
|
|
1736
|
+
rulesetId: 'UUID',
|
|
1690
1737
|
rulesetKey: 'String',
|
|
1691
1738
|
rulesetVersionId: 'UUID',
|
|
1692
1739
|
validateSchema: 'Boolean',
|
|
@@ -2715,6 +2762,121 @@ module CardDB
|
|
|
2715
2762
|
FIELDS
|
|
2716
2763
|
end
|
|
2717
2764
|
|
|
2765
|
+
def ruleset_version_fields
|
|
2766
|
+
<<~FIELDS
|
|
2767
|
+
id
|
|
2768
|
+
rulesetId
|
|
2769
|
+
versionLabel
|
|
2770
|
+
status
|
|
2771
|
+
rules
|
|
2772
|
+
sectionDefinitions {
|
|
2773
|
+
#{deck_section_definition_fields}
|
|
2774
|
+
}
|
|
2775
|
+
cardDatasetId
|
|
2776
|
+
cardDatasetVersionId
|
|
2777
|
+
sourceDatasetId
|
|
2778
|
+
sourceDatasetVersionId
|
|
2779
|
+
sourceDatasetRecordId
|
|
2780
|
+
sourceRecordIdentifier
|
|
2781
|
+
rulesFingerprint
|
|
2782
|
+
effectiveAt
|
|
2783
|
+
changelog
|
|
2784
|
+
createdByAccountId
|
|
2785
|
+
publishedByAccountId
|
|
2786
|
+
publishedAt
|
|
2787
|
+
supersededAt
|
|
2788
|
+
createdAt
|
|
2789
|
+
updatedAt
|
|
2790
|
+
FIELDS
|
|
2791
|
+
end
|
|
2792
|
+
|
|
2793
|
+
def ruleset_fields
|
|
2794
|
+
<<~FIELDS
|
|
2795
|
+
id
|
|
2796
|
+
gameId
|
|
2797
|
+
game {
|
|
2798
|
+
id
|
|
2799
|
+
key
|
|
2800
|
+
name
|
|
2801
|
+
}
|
|
2802
|
+
key
|
|
2803
|
+
name
|
|
2804
|
+
description
|
|
2805
|
+
tags
|
|
2806
|
+
sortOrder
|
|
2807
|
+
currentVersionId
|
|
2808
|
+
currentVersion {
|
|
2809
|
+
#{ruleset_version_fields}
|
|
2810
|
+
}
|
|
2811
|
+
archivedAt
|
|
2812
|
+
isArchived
|
|
2813
|
+
createdAt
|
|
2814
|
+
updatedAt
|
|
2815
|
+
FIELDS
|
|
2816
|
+
end
|
|
2817
|
+
|
|
2818
|
+
def deck_validation_rules_fields
|
|
2819
|
+
<<~FIELDS
|
|
2820
|
+
rulesetId
|
|
2821
|
+
rulesetVersionId
|
|
2822
|
+
rulesetKey
|
|
2823
|
+
rulesetVersionLabel
|
|
2824
|
+
rules
|
|
2825
|
+
sections {
|
|
2826
|
+
#{deck_section_definition_fields}
|
|
2827
|
+
}
|
|
2828
|
+
FIELDS
|
|
2829
|
+
end
|
|
2830
|
+
|
|
2831
|
+
def ruleset_validation_impact_deck_fields
|
|
2832
|
+
<<~FIELDS
|
|
2833
|
+
deckId
|
|
2834
|
+
title
|
|
2835
|
+
slug
|
|
2836
|
+
state
|
|
2837
|
+
hasUnpublishedChanges
|
|
2838
|
+
valid
|
|
2839
|
+
blockerCount
|
|
2840
|
+
warningCount
|
|
2841
|
+
affectedEntryCount
|
|
2842
|
+
issues {
|
|
2843
|
+
#{deck_validation_issue_fields}
|
|
2844
|
+
}
|
|
2845
|
+
FIELDS
|
|
2846
|
+
end
|
|
2847
|
+
|
|
2848
|
+
def ruleset_validation_impact_fields
|
|
2849
|
+
<<~FIELDS
|
|
2850
|
+
rulesetId
|
|
2851
|
+
rulesetVersionId
|
|
2852
|
+
checkedAt
|
|
2853
|
+
affectedDeckCount
|
|
2854
|
+
invalidDeckCount
|
|
2855
|
+
blockerCount
|
|
2856
|
+
warningCount
|
|
2857
|
+
results {
|
|
2858
|
+
#{ruleset_validation_impact_deck_fields}
|
|
2859
|
+
}
|
|
2860
|
+
FIELDS
|
|
2861
|
+
end
|
|
2862
|
+
|
|
2863
|
+
def ruleset_version_draft_import_preview_fields
|
|
2864
|
+
<<~FIELDS
|
|
2865
|
+
sourceDatasetId
|
|
2866
|
+
sourceDatasetVersionId
|
|
2867
|
+
sourceDatasetRecordId
|
|
2868
|
+
sourceRecordIdentifier
|
|
2869
|
+
rules
|
|
2870
|
+
sectionDefinitions {
|
|
2871
|
+
#{deck_section_definition_fields}
|
|
2872
|
+
}
|
|
2873
|
+
rulesFingerprint
|
|
2874
|
+
summary
|
|
2875
|
+
sectionCount
|
|
2876
|
+
copyLimitCount
|
|
2877
|
+
FIELDS
|
|
2878
|
+
end
|
|
2879
|
+
|
|
2718
2880
|
def deck_diff_fields
|
|
2719
2881
|
<<~FIELDS
|
|
2720
2882
|
deckId
|
|
@@ -2926,55 +3088,33 @@ module CardDB
|
|
|
2926
3088
|
FIELDS
|
|
2927
3089
|
end
|
|
2928
3090
|
|
|
2929
|
-
def
|
|
2930
|
-
|
|
2931
|
-
id
|
|
2932
|
-
deckId
|
|
2933
|
-
accountId
|
|
2934
|
-
role
|
|
2935
|
-
createdByAccountId
|
|
2936
|
-
createdAt
|
|
2937
|
-
updatedAt
|
|
2938
|
-
FIELDS
|
|
3091
|
+
def ruleset_connection_fields
|
|
3092
|
+
connection_fields(ruleset_fields)
|
|
2939
3093
|
end
|
|
2940
3094
|
|
|
2941
|
-
def
|
|
2942
|
-
|
|
2943
|
-
id
|
|
2944
|
-
deckId
|
|
2945
|
-
label
|
|
2946
|
-
expiresAt
|
|
2947
|
-
revokedAt
|
|
2948
|
-
lastUsedAt
|
|
2949
|
-
createdAt
|
|
2950
|
-
updatedAt
|
|
2951
|
-
FIELDS
|
|
3095
|
+
def ruleset_version_connection_fields
|
|
3096
|
+
connection_fields(ruleset_version_fields)
|
|
2952
3097
|
end
|
|
2953
3098
|
|
|
2954
|
-
def
|
|
3099
|
+
def deck_collaborator_fields
|
|
2955
3100
|
<<~FIELDS
|
|
2956
3101
|
id
|
|
2957
3102
|
deckId
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
allowedOrigins
|
|
2962
|
-
externalSubject
|
|
2963
|
-
expiresAt
|
|
2964
|
-
revokedAt
|
|
2965
|
-
lastUsedAt
|
|
3103
|
+
accountId
|
|
3104
|
+
role
|
|
3105
|
+
createdByAccountId
|
|
2966
3106
|
createdAt
|
|
2967
3107
|
updatedAt
|
|
2968
3108
|
FIELDS
|
|
2969
3109
|
end
|
|
2970
3110
|
|
|
2971
|
-
def
|
|
3111
|
+
def deck_token_issuer_fields
|
|
2972
3112
|
<<~FIELDS
|
|
2973
3113
|
id
|
|
2974
|
-
deckId
|
|
2975
3114
|
apiApplicationId
|
|
2976
3115
|
label
|
|
2977
|
-
|
|
3116
|
+
allowedScopes
|
|
3117
|
+
allowedRepresentations
|
|
2978
3118
|
maxTokenLifetimeSeconds
|
|
2979
3119
|
directSigningAlg
|
|
2980
3120
|
directSigningKeyId
|
|
@@ -2986,14 +3126,16 @@ module CardDB
|
|
|
2986
3126
|
FIELDS
|
|
2987
3127
|
end
|
|
2988
3128
|
|
|
2989
|
-
def
|
|
3129
|
+
def deck_token_fields
|
|
2990
3130
|
<<~FIELDS
|
|
2991
3131
|
id
|
|
2992
|
-
deckId
|
|
2993
3132
|
apiApplicationId
|
|
2994
3133
|
issuerId
|
|
2995
|
-
|
|
3134
|
+
deckId
|
|
3135
|
+
gameId
|
|
2996
3136
|
externalSubject
|
|
3137
|
+
scopes
|
|
3138
|
+
representation
|
|
2997
3139
|
expiresAt
|
|
2998
3140
|
revokedAt
|
|
2999
3141
|
lastUsedAt
|