@carddb/core 0.1.5 → 0.2.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/README.md +4 -0
- package/dist/index.cjs +1083 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +711 -4
- package/dist/index.d.ts +711 -4
- package/dist/index.js +1083 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -439,6 +439,82 @@ function recordFields(options = {}) {
|
|
|
439
439
|
`;
|
|
440
440
|
}
|
|
441
441
|
var RECORD_FIELDS = recordFields();
|
|
442
|
+
var DECK_SECTION_DEFINITION_FIELDS = `
|
|
443
|
+
key
|
|
444
|
+
label
|
|
445
|
+
description
|
|
446
|
+
order
|
|
447
|
+
default
|
|
448
|
+
aliases
|
|
449
|
+
minCards
|
|
450
|
+
maxCards
|
|
451
|
+
excludedFromDeckSize
|
|
452
|
+
legalCardTypes
|
|
453
|
+
metadata
|
|
454
|
+
`;
|
|
455
|
+
var DECK_ENTRY_FIELDS = `
|
|
456
|
+
id
|
|
457
|
+
datasetId
|
|
458
|
+
recordId
|
|
459
|
+
identifier
|
|
460
|
+
quantity
|
|
461
|
+
section
|
|
462
|
+
sortOrder
|
|
463
|
+
annotations
|
|
464
|
+
display
|
|
465
|
+
record {
|
|
466
|
+
${RECORD_FIELDS}
|
|
467
|
+
}
|
|
468
|
+
`;
|
|
469
|
+
var DECK_VALIDATED_AGAINST_FIELDS = `
|
|
470
|
+
rulesetId
|
|
471
|
+
rulesetVersionId
|
|
472
|
+
rulesetVersionLabel
|
|
473
|
+
cardDatasetId
|
|
474
|
+
cardDatasetVersionId
|
|
475
|
+
validatedAt
|
|
476
|
+
validationResultSummary
|
|
477
|
+
`;
|
|
478
|
+
var DECK_VALIDATION_ISSUE_FIELDS = `
|
|
479
|
+
code
|
|
480
|
+
severity
|
|
481
|
+
message
|
|
482
|
+
entryIds
|
|
483
|
+
section
|
|
484
|
+
datasetId
|
|
485
|
+
identifier
|
|
486
|
+
metadata
|
|
487
|
+
`;
|
|
488
|
+
var DECK_VALIDATION_FIELDS = `
|
|
489
|
+
deckId
|
|
490
|
+
valid
|
|
491
|
+
blockers {
|
|
492
|
+
${DECK_VALIDATION_ISSUE_FIELDS}
|
|
493
|
+
}
|
|
494
|
+
warnings {
|
|
495
|
+
${DECK_VALIDATION_ISSUE_FIELDS}
|
|
496
|
+
}
|
|
497
|
+
affectedEntries {
|
|
498
|
+
entryId
|
|
499
|
+
datasetId
|
|
500
|
+
recordId
|
|
501
|
+
identifier
|
|
502
|
+
section
|
|
503
|
+
quantity
|
|
504
|
+
}
|
|
505
|
+
validatedAgainst {
|
|
506
|
+
${DECK_VALIDATED_AGAINST_FIELDS}
|
|
507
|
+
}
|
|
508
|
+
checkedAt
|
|
509
|
+
`;
|
|
510
|
+
var DECK_DIFF_FIELDS = `
|
|
511
|
+
deckId
|
|
512
|
+
fromVersionId
|
|
513
|
+
toVersionId
|
|
514
|
+
toDraftRevision
|
|
515
|
+
hasChanges
|
|
516
|
+
diff
|
|
517
|
+
`;
|
|
442
518
|
var DECK_VERSION_FIELDS = `
|
|
443
519
|
id
|
|
444
520
|
deckId
|
|
@@ -454,21 +530,23 @@ var DECK_VERSION_FIELDS = `
|
|
|
454
530
|
metadata
|
|
455
531
|
publishNote
|
|
456
532
|
computedDiff
|
|
533
|
+
rulesetId
|
|
534
|
+
rulesetVersionId
|
|
535
|
+
cardDatasetId
|
|
536
|
+
cardDatasetVersionId
|
|
537
|
+
validatedAt
|
|
538
|
+
validationSummary
|
|
539
|
+
validatedAgainst {
|
|
540
|
+
${DECK_VALIDATED_AGAINST_FIELDS}
|
|
541
|
+
}
|
|
542
|
+
sectionDefinitions {
|
|
543
|
+
${DECK_SECTION_DEFINITION_FIELDS}
|
|
544
|
+
}
|
|
457
545
|
publishedByAccountId
|
|
458
546
|
publishedByApiApplicationId
|
|
459
547
|
createdAt
|
|
460
548
|
entries {
|
|
461
|
-
|
|
462
|
-
datasetId
|
|
463
|
-
recordId
|
|
464
|
-
identifier
|
|
465
|
-
quantity
|
|
466
|
-
section
|
|
467
|
-
sortOrder
|
|
468
|
-
annotations
|
|
469
|
-
record {
|
|
470
|
-
${RECORD_FIELDS}
|
|
471
|
-
}
|
|
549
|
+
${DECK_ENTRY_FIELDS}
|
|
472
550
|
}
|
|
473
551
|
`;
|
|
474
552
|
var DECK_COLLABORATOR_FIELDS = `
|
|
@@ -490,8 +568,156 @@ var DECK_PREVIEW_TOKEN_FIELDS = `
|
|
|
490
568
|
createdAt
|
|
491
569
|
updatedAt
|
|
492
570
|
`;
|
|
571
|
+
var DECK_EMBED_TOKEN_FIELDS = `
|
|
572
|
+
id
|
|
573
|
+
deckId
|
|
574
|
+
apiApplicationId
|
|
575
|
+
label
|
|
576
|
+
readMode
|
|
577
|
+
allowedOrigins
|
|
578
|
+
externalSubject
|
|
579
|
+
expiresAt
|
|
580
|
+
revokedAt
|
|
581
|
+
lastUsedAt
|
|
582
|
+
createdAt
|
|
583
|
+
updatedAt
|
|
584
|
+
`;
|
|
585
|
+
var DECK_ACCESS_TOKEN_ISSUER_FIELDS = `
|
|
586
|
+
id
|
|
587
|
+
deckId
|
|
588
|
+
apiApplicationId
|
|
589
|
+
label
|
|
590
|
+
readModes
|
|
591
|
+
maxTokenLifetimeSeconds
|
|
592
|
+
directSigningAlg
|
|
593
|
+
directSigningKeyId
|
|
594
|
+
directSigningPublicKey
|
|
595
|
+
directSigningKeyRevokedAt
|
|
596
|
+
revokedAt
|
|
597
|
+
createdAt
|
|
598
|
+
updatedAt
|
|
599
|
+
`;
|
|
600
|
+
var DECK_ACCESS_TOKEN_FIELDS = `
|
|
601
|
+
id
|
|
602
|
+
deckId
|
|
603
|
+
apiApplicationId
|
|
604
|
+
issuerId
|
|
605
|
+
readMode
|
|
606
|
+
externalSubject
|
|
607
|
+
expiresAt
|
|
608
|
+
revokedAt
|
|
609
|
+
lastUsedAt
|
|
610
|
+
createdAt
|
|
611
|
+
updatedAt
|
|
612
|
+
`;
|
|
613
|
+
var DECK_IMPORT_ENTRY_FIELDS = `
|
|
614
|
+
lineNumber
|
|
615
|
+
raw
|
|
616
|
+
datasetKey
|
|
617
|
+
datasetId
|
|
618
|
+
recordId
|
|
619
|
+
identifier
|
|
620
|
+
quantity
|
|
621
|
+
section
|
|
622
|
+
sortOrder
|
|
623
|
+
display
|
|
624
|
+
record {
|
|
625
|
+
${RECORD_FIELDS}
|
|
626
|
+
}
|
|
627
|
+
`;
|
|
628
|
+
var DECK_IMPORT_ISSUE_FIELDS = `
|
|
629
|
+
lineNumber
|
|
630
|
+
raw
|
|
631
|
+
code
|
|
632
|
+
message
|
|
633
|
+
`;
|
|
634
|
+
var DECK_IMPORT_UNMATCHED_FIELDS = `
|
|
635
|
+
lineNumber
|
|
636
|
+
raw
|
|
637
|
+
datasetKey
|
|
638
|
+
identifier
|
|
639
|
+
quantity
|
|
640
|
+
section
|
|
641
|
+
code
|
|
642
|
+
message
|
|
643
|
+
`;
|
|
644
|
+
var DECK_IMPORT_AMBIGUOUS_FIELDS = `
|
|
645
|
+
lineNumber
|
|
646
|
+
raw
|
|
647
|
+
datasetKey
|
|
648
|
+
identifier
|
|
649
|
+
quantity
|
|
650
|
+
section
|
|
651
|
+
candidates {
|
|
652
|
+
recordId
|
|
653
|
+
identifier
|
|
654
|
+
display
|
|
655
|
+
}
|
|
656
|
+
`;
|
|
657
|
+
var DECK_IMPORT_FORMAT_DEFINITION_FIELDS = `
|
|
658
|
+
id
|
|
659
|
+
gameId
|
|
660
|
+
key
|
|
661
|
+
name
|
|
662
|
+
description
|
|
663
|
+
enabled
|
|
664
|
+
priority
|
|
665
|
+
datasetKey
|
|
666
|
+
config
|
|
667
|
+
archivedAt
|
|
668
|
+
isArchived
|
|
669
|
+
createdAt
|
|
670
|
+
updatedAt
|
|
671
|
+
`;
|
|
672
|
+
var DECK_IMPORT_FORMAT_DETECTION_FIELDS = `
|
|
673
|
+
formatId
|
|
674
|
+
key
|
|
675
|
+
name
|
|
676
|
+
confidence
|
|
677
|
+
reason
|
|
678
|
+
`;
|
|
679
|
+
var DECK_IMPORT_FORMAT_TEST_PAYLOAD_FIELDS = `
|
|
680
|
+
detection {
|
|
681
|
+
${DECK_IMPORT_FORMAT_DETECTION_FIELDS}
|
|
682
|
+
}
|
|
683
|
+
entries {
|
|
684
|
+
${DECK_IMPORT_ENTRY_FIELDS}
|
|
685
|
+
}
|
|
686
|
+
parseErrors {
|
|
687
|
+
${DECK_IMPORT_ISSUE_FIELDS}
|
|
688
|
+
}
|
|
689
|
+
unmatched {
|
|
690
|
+
${DECK_IMPORT_UNMATCHED_FIELDS}
|
|
691
|
+
}
|
|
692
|
+
ambiguous {
|
|
693
|
+
${DECK_IMPORT_AMBIGUOUS_FIELDS}
|
|
694
|
+
}
|
|
695
|
+
`;
|
|
696
|
+
var DECK_HYDRATE_ENTRIES_PAYLOAD_FIELDS = `
|
|
697
|
+
entries {
|
|
698
|
+
${DECK_IMPORT_ENTRY_FIELDS}
|
|
699
|
+
}
|
|
700
|
+
unmatched {
|
|
701
|
+
${DECK_IMPORT_UNMATCHED_FIELDS}
|
|
702
|
+
}
|
|
703
|
+
ambiguous {
|
|
704
|
+
${DECK_IMPORT_AMBIGUOUS_FIELDS}
|
|
705
|
+
}
|
|
706
|
+
`;
|
|
707
|
+
var DECK_EXPORT_PAYLOAD_FIELDS = `
|
|
708
|
+
deckId
|
|
709
|
+
format
|
|
710
|
+
text
|
|
711
|
+
entryCount
|
|
712
|
+
`;
|
|
493
713
|
var DECK_FIELDS = `
|
|
494
714
|
id
|
|
715
|
+
ownerType
|
|
716
|
+
ownerAccountId
|
|
717
|
+
ownerApiApplicationId
|
|
718
|
+
environment
|
|
719
|
+
createdByAccountId
|
|
720
|
+
createdByApiApplicationId
|
|
495
721
|
accountId
|
|
496
722
|
apiApplicationId
|
|
497
723
|
gameId
|
|
@@ -501,13 +727,29 @@ var DECK_FIELDS = `
|
|
|
501
727
|
description
|
|
502
728
|
formatKey
|
|
503
729
|
visibility
|
|
730
|
+
accessMode
|
|
731
|
+
discoverability
|
|
732
|
+
state
|
|
733
|
+
archivedAt
|
|
734
|
+
deletedAt
|
|
735
|
+
unpublishedAt
|
|
736
|
+
externalRefApiApplicationId
|
|
504
737
|
externalRef
|
|
738
|
+
externalSubjectRef
|
|
739
|
+
rulesetId
|
|
505
740
|
sourceUrl
|
|
506
741
|
metadata
|
|
742
|
+
sectionDefinitions {
|
|
743
|
+
${DECK_SECTION_DEFINITION_FIELDS}
|
|
744
|
+
}
|
|
507
745
|
latestPublishedVersion {
|
|
508
746
|
${DECK_VERSION_FIELDS}
|
|
509
747
|
}
|
|
510
748
|
publishedAt
|
|
749
|
+
draftRevision
|
|
750
|
+
draftUpdatedAt
|
|
751
|
+
draftUpdatedByAccountId
|
|
752
|
+
draftUpdatedByApiApplicationId
|
|
511
753
|
hasUnpublishedChanges
|
|
512
754
|
createdAt
|
|
513
755
|
updatedAt
|
|
@@ -515,17 +757,109 @@ var DECK_FIELDS = `
|
|
|
515
757
|
${GAME_FIELDS}
|
|
516
758
|
}
|
|
517
759
|
entries {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
760
|
+
${DECK_ENTRY_FIELDS}
|
|
761
|
+
}
|
|
762
|
+
`;
|
|
763
|
+
var DECK_OWNERSHIP_TRANSFER_PAYLOAD_FIELDS = `
|
|
764
|
+
deck {
|
|
765
|
+
${DECK_FIELDS}
|
|
766
|
+
}
|
|
767
|
+
retainedAppAccess
|
|
768
|
+
`;
|
|
769
|
+
var DECK_COPY_PAYLOAD_FIELDS = `
|
|
770
|
+
deck {
|
|
771
|
+
${DECK_FIELDS}
|
|
772
|
+
}
|
|
773
|
+
copiedFromDeckId
|
|
774
|
+
retainedAppAccess
|
|
775
|
+
`;
|
|
776
|
+
var DECK_ACCESS_APPLICATION_FIELDS = `
|
|
777
|
+
id
|
|
778
|
+
name
|
|
779
|
+
description
|
|
780
|
+
revokedAt
|
|
781
|
+
`;
|
|
782
|
+
var DECK_API_APPLICATION_ACCESS_FIELDS = `
|
|
783
|
+
id
|
|
784
|
+
deckId
|
|
785
|
+
deck {
|
|
786
|
+
${DECK_FIELDS}
|
|
787
|
+
}
|
|
788
|
+
apiApplicationId
|
|
789
|
+
apiApplication {
|
|
790
|
+
${DECK_ACCESS_APPLICATION_FIELDS}
|
|
791
|
+
}
|
|
792
|
+
role
|
|
793
|
+
grantSource
|
|
794
|
+
externalRef
|
|
795
|
+
createdByAccountId
|
|
796
|
+
createdByApiApplicationId
|
|
797
|
+
revokedAt
|
|
798
|
+
createdAt
|
|
799
|
+
updatedAt
|
|
800
|
+
`;
|
|
801
|
+
var DECK_PUBLISH_PAYLOAD_FIELDS = `
|
|
802
|
+
deck {
|
|
803
|
+
${DECK_FIELDS}
|
|
804
|
+
}
|
|
805
|
+
version {
|
|
806
|
+
${DECK_VERSION_FIELDS}
|
|
807
|
+
}
|
|
808
|
+
validation {
|
|
809
|
+
${DECK_VALIDATION_FIELDS}
|
|
810
|
+
}
|
|
811
|
+
blockers {
|
|
812
|
+
${DECK_VALIDATION_ISSUE_FIELDS}
|
|
813
|
+
}
|
|
814
|
+
warnings {
|
|
815
|
+
${DECK_VALIDATION_ISSUE_FIELDS}
|
|
816
|
+
}
|
|
817
|
+
`;
|
|
818
|
+
var DECK_ENTRY_MUTATION_PAYLOAD_FIELDS = `
|
|
819
|
+
deck {
|
|
820
|
+
${DECK_FIELDS}
|
|
821
|
+
}
|
|
822
|
+
entry {
|
|
823
|
+
${DECK_ENTRY_FIELDS}
|
|
824
|
+
}
|
|
825
|
+
`;
|
|
826
|
+
var DECK_ENTRY_REORDER_PAYLOAD_FIELDS = `
|
|
827
|
+
deck {
|
|
828
|
+
${DECK_FIELDS}
|
|
829
|
+
}
|
|
830
|
+
entries {
|
|
831
|
+
${DECK_ENTRY_FIELDS}
|
|
832
|
+
}
|
|
833
|
+
`;
|
|
834
|
+
var DECK_ENTRIES_REPLACE_PAYLOAD_FIELDS = DECK_ENTRY_REORDER_PAYLOAD_FIELDS;
|
|
835
|
+
var DECK_IMPORT_PAYLOAD_FIELDS = `
|
|
836
|
+
deck {
|
|
837
|
+
${DECK_FIELDS}
|
|
838
|
+
}
|
|
839
|
+
applied
|
|
840
|
+
dryRun
|
|
841
|
+
replace
|
|
842
|
+
format
|
|
843
|
+
importFormat {
|
|
844
|
+
${DECK_IMPORT_FORMAT_DEFINITION_FIELDS}
|
|
845
|
+
}
|
|
846
|
+
detection {
|
|
847
|
+
${DECK_IMPORT_FORMAT_DETECTION_FIELDS}
|
|
848
|
+
}
|
|
849
|
+
entries {
|
|
850
|
+
${DECK_IMPORT_ENTRY_FIELDS}
|
|
851
|
+
}
|
|
852
|
+
parseErrors {
|
|
853
|
+
${DECK_IMPORT_ISSUE_FIELDS}
|
|
854
|
+
}
|
|
855
|
+
unmatched {
|
|
856
|
+
${DECK_IMPORT_UNMATCHED_FIELDS}
|
|
857
|
+
}
|
|
858
|
+
ambiguous {
|
|
859
|
+
${DECK_IMPORT_AMBIGUOUS_FIELDS}
|
|
860
|
+
}
|
|
861
|
+
validation {
|
|
862
|
+
${DECK_VALIDATION_FIELDS}
|
|
529
863
|
}
|
|
530
864
|
`;
|
|
531
865
|
var RESOLVED_LINKS_FIELDS = `
|
|
@@ -900,6 +1234,11 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
900
1234
|
args.push("after: $after");
|
|
901
1235
|
variables["after"] = params.after;
|
|
902
1236
|
}
|
|
1237
|
+
if (params.includeArchived !== void 0) {
|
|
1238
|
+
defs.push("$includeArchived: Boolean");
|
|
1239
|
+
args.push("includeArchived: $includeArchived");
|
|
1240
|
+
variables["includeArchived"] = params.includeArchived;
|
|
1241
|
+
}
|
|
903
1242
|
const defStr = defs.length > 0 ? `(${defs.join(", ")})` : "";
|
|
904
1243
|
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
905
1244
|
return {
|
|
@@ -913,6 +1252,102 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
913
1252
|
variables
|
|
914
1253
|
};
|
|
915
1254
|
},
|
|
1255
|
+
viewerDecks(params = {}) {
|
|
1256
|
+
const variables = {};
|
|
1257
|
+
const args = [];
|
|
1258
|
+
const defs = [];
|
|
1259
|
+
if (params.filter !== void 0) {
|
|
1260
|
+
defs.push("$filter: ViewerDecksFilterInput");
|
|
1261
|
+
args.push("filter: $filter");
|
|
1262
|
+
variables["filter"] = params.filter;
|
|
1263
|
+
}
|
|
1264
|
+
if (params.first !== void 0) {
|
|
1265
|
+
defs.push("$first: Int");
|
|
1266
|
+
args.push("first: $first");
|
|
1267
|
+
variables["first"] = params.first;
|
|
1268
|
+
}
|
|
1269
|
+
if (params.after !== void 0) {
|
|
1270
|
+
defs.push("$after: String");
|
|
1271
|
+
args.push("after: $after");
|
|
1272
|
+
variables["after"] = params.after;
|
|
1273
|
+
}
|
|
1274
|
+
const defStr = defs.length > 0 ? `(${defs.join(", ")})` : "";
|
|
1275
|
+
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
1276
|
+
return {
|
|
1277
|
+
query: `
|
|
1278
|
+
query ViewerDecks${defStr} {
|
|
1279
|
+
viewerDecks${argStr} {
|
|
1280
|
+
${connectionFields(DECK_FIELDS)}
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
`,
|
|
1284
|
+
variables
|
|
1285
|
+
};
|
|
1286
|
+
},
|
|
1287
|
+
appDecks(params = {}) {
|
|
1288
|
+
const variables = {};
|
|
1289
|
+
const args = [];
|
|
1290
|
+
const defs = [];
|
|
1291
|
+
if (params.filter !== void 0) {
|
|
1292
|
+
defs.push("$filter: AppDecksFilterInput");
|
|
1293
|
+
args.push("filter: $filter");
|
|
1294
|
+
variables["filter"] = params.filter;
|
|
1295
|
+
}
|
|
1296
|
+
if (params.first !== void 0) {
|
|
1297
|
+
defs.push("$first: Int");
|
|
1298
|
+
args.push("first: $first");
|
|
1299
|
+
variables["first"] = params.first;
|
|
1300
|
+
}
|
|
1301
|
+
if (params.after !== void 0) {
|
|
1302
|
+
defs.push("$after: String");
|
|
1303
|
+
args.push("after: $after");
|
|
1304
|
+
variables["after"] = params.after;
|
|
1305
|
+
}
|
|
1306
|
+
const defStr = defs.length > 0 ? `(${defs.join(", ")})` : "";
|
|
1307
|
+
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
1308
|
+
return {
|
|
1309
|
+
query: `
|
|
1310
|
+
query AppDecks${defStr} {
|
|
1311
|
+
appDecks${argStr} {
|
|
1312
|
+
${connectionFields(DECK_FIELDS)}
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
`,
|
|
1316
|
+
variables
|
|
1317
|
+
};
|
|
1318
|
+
},
|
|
1319
|
+
publicDecks(params = {}) {
|
|
1320
|
+
const variables = {};
|
|
1321
|
+
const args = [];
|
|
1322
|
+
const defs = [];
|
|
1323
|
+
if (params.filter !== void 0) {
|
|
1324
|
+
defs.push("$filter: PublicDecksFilterInput");
|
|
1325
|
+
args.push("filter: $filter");
|
|
1326
|
+
variables["filter"] = params.filter;
|
|
1327
|
+
}
|
|
1328
|
+
if (params.first !== void 0) {
|
|
1329
|
+
defs.push("$first: Int");
|
|
1330
|
+
args.push("first: $first");
|
|
1331
|
+
variables["first"] = params.first;
|
|
1332
|
+
}
|
|
1333
|
+
if (params.after !== void 0) {
|
|
1334
|
+
defs.push("$after: String");
|
|
1335
|
+
args.push("after: $after");
|
|
1336
|
+
variables["after"] = params.after;
|
|
1337
|
+
}
|
|
1338
|
+
const defStr = defs.length > 0 ? `(${defs.join(", ")})` : "";
|
|
1339
|
+
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
1340
|
+
return {
|
|
1341
|
+
query: `
|
|
1342
|
+
query PublicDecks${defStr} {
|
|
1343
|
+
publicDecks${argStr} {
|
|
1344
|
+
${connectionFields(DECK_FIELDS)}
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
`,
|
|
1348
|
+
variables
|
|
1349
|
+
};
|
|
1350
|
+
},
|
|
916
1351
|
fetchDeckById() {
|
|
917
1352
|
return {
|
|
918
1353
|
query: `
|
|
@@ -924,6 +1359,17 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
924
1359
|
`
|
|
925
1360
|
};
|
|
926
1361
|
},
|
|
1362
|
+
deckById() {
|
|
1363
|
+
return {
|
|
1364
|
+
query: `
|
|
1365
|
+
query Deck($id: UUID!) {
|
|
1366
|
+
deck(id: $id) {
|
|
1367
|
+
${DECK_FIELDS}
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
`
|
|
1371
|
+
};
|
|
1372
|
+
},
|
|
927
1373
|
myDeck() {
|
|
928
1374
|
return {
|
|
929
1375
|
query: `
|
|
@@ -946,6 +1392,17 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
946
1392
|
`
|
|
947
1393
|
};
|
|
948
1394
|
},
|
|
1395
|
+
deckBySlug() {
|
|
1396
|
+
return {
|
|
1397
|
+
query: `
|
|
1398
|
+
query DeckBySlug($publisherSlug: String!, $gameKey: String!, $slug: String!) {
|
|
1399
|
+
deckBySlug(publisherSlug: $publisherSlug, gameKey: $gameKey, slug: $slug) {
|
|
1400
|
+
${DECK_FIELDS}
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
`
|
|
1404
|
+
};
|
|
1405
|
+
},
|
|
949
1406
|
fetchDeckByExternalRef() {
|
|
950
1407
|
return {
|
|
951
1408
|
query: `
|
|
@@ -957,10 +1414,21 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
957
1414
|
`
|
|
958
1415
|
};
|
|
959
1416
|
},
|
|
960
|
-
|
|
1417
|
+
deckByExternalRef() {
|
|
961
1418
|
return {
|
|
962
1419
|
query: `
|
|
963
|
-
query
|
|
1420
|
+
query DeckByExternalRef($externalRef: String!) {
|
|
1421
|
+
deckByExternalRef(externalRef: $externalRef) {
|
|
1422
|
+
${DECK_FIELDS}
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
`
|
|
1426
|
+
};
|
|
1427
|
+
},
|
|
1428
|
+
deckVersion() {
|
|
1429
|
+
return {
|
|
1430
|
+
query: `
|
|
1431
|
+
query DeckVersion($id: UUID!) {
|
|
964
1432
|
deckVersion(id: $id) {
|
|
965
1433
|
${DECK_VERSION_FIELDS}
|
|
966
1434
|
}
|
|
@@ -1004,6 +1472,125 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
1004
1472
|
`
|
|
1005
1473
|
};
|
|
1006
1474
|
},
|
|
1475
|
+
deckEmbed() {
|
|
1476
|
+
return {
|
|
1477
|
+
query: `
|
|
1478
|
+
query DeckEmbed($token: String!) {
|
|
1479
|
+
deckEmbed(token: $token) {
|
|
1480
|
+
${DECK_FIELDS}
|
|
1481
|
+
}
|
|
1482
|
+
}
|
|
1483
|
+
`
|
|
1484
|
+
};
|
|
1485
|
+
},
|
|
1486
|
+
deckAccess() {
|
|
1487
|
+
return {
|
|
1488
|
+
query: `
|
|
1489
|
+
query DeckAccess($token: String!) {
|
|
1490
|
+
deckAccess(token: $token) {
|
|
1491
|
+
${DECK_FIELDS}
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
`
|
|
1495
|
+
};
|
|
1496
|
+
},
|
|
1497
|
+
deckDraftDiff() {
|
|
1498
|
+
return {
|
|
1499
|
+
query: `
|
|
1500
|
+
query DeckDraftDiff($id: UUID!) {
|
|
1501
|
+
deckDraftDiff(id: $id) {
|
|
1502
|
+
${DECK_DIFF_FIELDS}
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
`
|
|
1506
|
+
};
|
|
1507
|
+
},
|
|
1508
|
+
deckVersionDiff() {
|
|
1509
|
+
return {
|
|
1510
|
+
query: `
|
|
1511
|
+
query DeckVersionDiff($fromVersionId: UUID!, $toVersionId: UUID!) {
|
|
1512
|
+
deckVersionDiff(fromVersionId: $fromVersionId, toVersionId: $toVersionId) {
|
|
1513
|
+
${DECK_DIFF_FIELDS}
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
`
|
|
1517
|
+
};
|
|
1518
|
+
},
|
|
1519
|
+
deckHydrateEntries() {
|
|
1520
|
+
return {
|
|
1521
|
+
query: `
|
|
1522
|
+
query DeckHydrateEntries($input: DeckHydrateEntriesInput!) {
|
|
1523
|
+
deckHydrateEntries(input: $input) {
|
|
1524
|
+
${DECK_HYDRATE_ENTRIES_PAYLOAD_FIELDS}
|
|
1525
|
+
}
|
|
1526
|
+
}
|
|
1527
|
+
`
|
|
1528
|
+
};
|
|
1529
|
+
},
|
|
1530
|
+
deckExport() {
|
|
1531
|
+
return {
|
|
1532
|
+
query: `
|
|
1533
|
+
query DeckExport($id: UUID!, $format: DeckExportFormat!) {
|
|
1534
|
+
deckExport(id: $id, format: $format) {
|
|
1535
|
+
${DECK_EXPORT_PAYLOAD_FIELDS}
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
`
|
|
1539
|
+
};
|
|
1540
|
+
},
|
|
1541
|
+
deckValidate() {
|
|
1542
|
+
return {
|
|
1543
|
+
query: `
|
|
1544
|
+
query DeckValidate($id: UUID!, $input: DeckValidateInput) {
|
|
1545
|
+
deckValidate(id: $id, input: $input) {
|
|
1546
|
+
${DECK_VALIDATION_FIELDS}
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
`
|
|
1550
|
+
};
|
|
1551
|
+
},
|
|
1552
|
+
deckSectionDefinitions(params = {}) {
|
|
1553
|
+
const variables = {};
|
|
1554
|
+
const args = [];
|
|
1555
|
+
const defs = [];
|
|
1556
|
+
if (params.publisherSlug !== void 0) {
|
|
1557
|
+
defs.push("$publisherSlug: String");
|
|
1558
|
+
args.push("publisherSlug: $publisherSlug");
|
|
1559
|
+
variables["publisherSlug"] = params.publisherSlug;
|
|
1560
|
+
}
|
|
1561
|
+
if (params.gameKey !== void 0) {
|
|
1562
|
+
defs.push("$gameKey: String");
|
|
1563
|
+
args.push("gameKey: $gameKey");
|
|
1564
|
+
variables["gameKey"] = params.gameKey;
|
|
1565
|
+
}
|
|
1566
|
+
if (params.gameId !== void 0) {
|
|
1567
|
+
defs.push("$gameId: UUID");
|
|
1568
|
+
args.push("gameId: $gameId");
|
|
1569
|
+
variables["gameId"] = params.gameId;
|
|
1570
|
+
}
|
|
1571
|
+
if (params.rulesetKey !== void 0) {
|
|
1572
|
+
defs.push("$rulesetKey: String");
|
|
1573
|
+
args.push("rulesetKey: $rulesetKey");
|
|
1574
|
+
variables["rulesetKey"] = params.rulesetKey;
|
|
1575
|
+
}
|
|
1576
|
+
if (params.rulesetVersionId !== void 0) {
|
|
1577
|
+
defs.push("$rulesetVersionId: UUID");
|
|
1578
|
+
args.push("rulesetVersionId: $rulesetVersionId");
|
|
1579
|
+
variables["rulesetVersionId"] = params.rulesetVersionId;
|
|
1580
|
+
}
|
|
1581
|
+
const defStr = defs.length > 0 ? `(${defs.join(", ")})` : "";
|
|
1582
|
+
const argStr = args.length > 0 ? `(${args.join(", ")})` : "";
|
|
1583
|
+
return {
|
|
1584
|
+
query: `
|
|
1585
|
+
query DeckSectionDefinitions${defStr} {
|
|
1586
|
+
deckSectionDefinitions${argStr} {
|
|
1587
|
+
${DECK_SECTION_DEFINITION_FIELDS}
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
`,
|
|
1591
|
+
variables
|
|
1592
|
+
};
|
|
1593
|
+
},
|
|
1007
1594
|
deckCollaborators() {
|
|
1008
1595
|
return {
|
|
1009
1596
|
query: `
|
|
@@ -1015,6 +1602,102 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
1015
1602
|
`
|
|
1016
1603
|
};
|
|
1017
1604
|
},
|
|
1605
|
+
deckEmbedTokens() {
|
|
1606
|
+
return {
|
|
1607
|
+
query: `
|
|
1608
|
+
query DeckEmbedTokens($deckId: UUID!) {
|
|
1609
|
+
deckEmbedTokens(deckId: $deckId) {
|
|
1610
|
+
${DECK_EMBED_TOKEN_FIELDS}
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
`
|
|
1614
|
+
};
|
|
1615
|
+
},
|
|
1616
|
+
deckAccessTokenIssuers() {
|
|
1617
|
+
return {
|
|
1618
|
+
query: `
|
|
1619
|
+
query DeckAccessTokenIssuers($deckId: UUID!) {
|
|
1620
|
+
deckAccessTokenIssuers(deckId: $deckId) {
|
|
1621
|
+
${DECK_ACCESS_TOKEN_ISSUER_FIELDS}
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
`
|
|
1625
|
+
};
|
|
1626
|
+
},
|
|
1627
|
+
deckApiApplicationAccesses() {
|
|
1628
|
+
return {
|
|
1629
|
+
query: `
|
|
1630
|
+
query DeckApiApplicationAccesses($deckId: UUID!, $includeRevoked: Boolean) {
|
|
1631
|
+
deckApiApplicationAccesses(deckId: $deckId, includeRevoked: $includeRevoked) {
|
|
1632
|
+
${DECK_API_APPLICATION_ACCESS_FIELDS}
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
`
|
|
1636
|
+
};
|
|
1637
|
+
},
|
|
1638
|
+
myDeckApiApplicationAccesses() {
|
|
1639
|
+
return {
|
|
1640
|
+
query: `
|
|
1641
|
+
query MyDeckApiApplicationAccesses($applicationId: UUID) {
|
|
1642
|
+
myDeckApiApplicationAccesses(applicationId: $applicationId) {
|
|
1643
|
+
${DECK_API_APPLICATION_ACCESS_FIELDS}
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
`
|
|
1647
|
+
};
|
|
1648
|
+
},
|
|
1649
|
+
deckImportFormats(params) {
|
|
1650
|
+
const variables = { gameId: params.gameId };
|
|
1651
|
+
const args = ["gameId: $gameId"];
|
|
1652
|
+
const defs = ["$gameId: UUID!"];
|
|
1653
|
+
if (params.includeArchived !== void 0) {
|
|
1654
|
+
defs.push("$includeArchived: Boolean");
|
|
1655
|
+
args.push("includeArchived: $includeArchived");
|
|
1656
|
+
variables["includeArchived"] = params.includeArchived;
|
|
1657
|
+
}
|
|
1658
|
+
if (params.first !== void 0) {
|
|
1659
|
+
defs.push("$first: Int");
|
|
1660
|
+
args.push("first: $first");
|
|
1661
|
+
variables["first"] = params.first;
|
|
1662
|
+
}
|
|
1663
|
+
if (params.after !== void 0) {
|
|
1664
|
+
defs.push("$after: String");
|
|
1665
|
+
args.push("after: $after");
|
|
1666
|
+
variables["after"] = params.after;
|
|
1667
|
+
}
|
|
1668
|
+
return {
|
|
1669
|
+
query: `
|
|
1670
|
+
query DeckImportFormats(${defs.join(", ")}) {
|
|
1671
|
+
deckImportFormats(${args.join(", ")}) {
|
|
1672
|
+
${connectionFields(DECK_IMPORT_FORMAT_DEFINITION_FIELDS)}
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
`,
|
|
1676
|
+
variables
|
|
1677
|
+
};
|
|
1678
|
+
},
|
|
1679
|
+
deckImportFormat() {
|
|
1680
|
+
return {
|
|
1681
|
+
query: `
|
|
1682
|
+
query DeckImportFormat($id: UUID!) {
|
|
1683
|
+
deckImportFormat(id: $id) {
|
|
1684
|
+
${DECK_IMPORT_FORMAT_DEFINITION_FIELDS}
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
`
|
|
1688
|
+
};
|
|
1689
|
+
},
|
|
1690
|
+
deckImportFormatTest() {
|
|
1691
|
+
return {
|
|
1692
|
+
query: `
|
|
1693
|
+
query DeckImportFormatTest($input: DeckImportFormatTestInput!) {
|
|
1694
|
+
deckImportFormatTest(input: $input) {
|
|
1695
|
+
${DECK_IMPORT_FORMAT_TEST_PAYLOAD_FIELDS}
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
`
|
|
1699
|
+
};
|
|
1700
|
+
},
|
|
1018
1701
|
deckPreviewTokens() {
|
|
1019
1702
|
return {
|
|
1020
1703
|
query: `
|
|
@@ -1057,12 +1740,214 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
1057
1740
|
`
|
|
1058
1741
|
};
|
|
1059
1742
|
},
|
|
1743
|
+
archiveDeck() {
|
|
1744
|
+
return {
|
|
1745
|
+
query: `
|
|
1746
|
+
mutation DeckArchive($id: UUID!) {
|
|
1747
|
+
deckArchive(id: $id) {
|
|
1748
|
+
${DECK_FIELDS}
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
`
|
|
1752
|
+
};
|
|
1753
|
+
},
|
|
1754
|
+
restoreDeck() {
|
|
1755
|
+
return {
|
|
1756
|
+
query: `
|
|
1757
|
+
mutation DeckRestore($id: UUID!) {
|
|
1758
|
+
deckRestore(id: $id) {
|
|
1759
|
+
${DECK_FIELDS}
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
`
|
|
1763
|
+
};
|
|
1764
|
+
},
|
|
1765
|
+
unpublishDeck() {
|
|
1766
|
+
return {
|
|
1767
|
+
query: `
|
|
1768
|
+
mutation DeckUnpublish($id: UUID!) {
|
|
1769
|
+
deckUnpublish(id: $id) {
|
|
1770
|
+
${DECK_FIELDS}
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
`
|
|
1774
|
+
};
|
|
1775
|
+
},
|
|
1776
|
+
addDeckEntry() {
|
|
1777
|
+
return {
|
|
1778
|
+
query: `
|
|
1779
|
+
mutation DeckEntryAdd($input: DeckEntryAddInput!) {
|
|
1780
|
+
deckEntryAdd(input: $input) {
|
|
1781
|
+
${DECK_ENTRY_MUTATION_PAYLOAD_FIELDS}
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1784
|
+
`
|
|
1785
|
+
};
|
|
1786
|
+
},
|
|
1787
|
+
updateDeckEntry() {
|
|
1788
|
+
return {
|
|
1789
|
+
query: `
|
|
1790
|
+
mutation DeckEntryUpdate($id: UUID!, $input: DeckEntryUpdateInput!) {
|
|
1791
|
+
deckEntryUpdate(id: $id, input: $input) {
|
|
1792
|
+
${DECK_ENTRY_MUTATION_PAYLOAD_FIELDS}
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
`
|
|
1796
|
+
};
|
|
1797
|
+
},
|
|
1798
|
+
removeDeckEntry() {
|
|
1799
|
+
return {
|
|
1800
|
+
query: `
|
|
1801
|
+
mutation DeckEntryRemove($id: UUID!, $expectedDraftRevision: Int!) {
|
|
1802
|
+
deckEntryRemove(id: $id, expectedDraftRevision: $expectedDraftRevision) {
|
|
1803
|
+
${DECK_ENTRY_MUTATION_PAYLOAD_FIELDS}
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
`
|
|
1807
|
+
};
|
|
1808
|
+
},
|
|
1809
|
+
reorderDeckEntries() {
|
|
1810
|
+
return {
|
|
1811
|
+
query: `
|
|
1812
|
+
mutation DeckEntryReorder($deckId: UUID!, $input: DeckEntryReorderInput!) {
|
|
1813
|
+
deckEntryReorder(deckId: $deckId, input: $input) {
|
|
1814
|
+
${DECK_ENTRY_REORDER_PAYLOAD_FIELDS}
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
`
|
|
1818
|
+
};
|
|
1819
|
+
},
|
|
1820
|
+
replaceDeckEntries() {
|
|
1821
|
+
return {
|
|
1822
|
+
query: `
|
|
1823
|
+
mutation DeckEntriesReplace($deckId: UUID!, $input: DeckEntriesReplaceInput!) {
|
|
1824
|
+
deckEntriesReplace(deckId: $deckId, input: $input) {
|
|
1825
|
+
${DECK_ENTRIES_REPLACE_PAYLOAD_FIELDS}
|
|
1826
|
+
}
|
|
1827
|
+
}
|
|
1828
|
+
`
|
|
1829
|
+
};
|
|
1830
|
+
},
|
|
1831
|
+
importDeck() {
|
|
1832
|
+
return {
|
|
1833
|
+
query: `
|
|
1834
|
+
mutation DeckImport($input: DeckImportInput!) {
|
|
1835
|
+
deckImport(input: $input) {
|
|
1836
|
+
${DECK_IMPORT_PAYLOAD_FIELDS}
|
|
1837
|
+
}
|
|
1838
|
+
}
|
|
1839
|
+
`
|
|
1840
|
+
};
|
|
1841
|
+
},
|
|
1842
|
+
createDeckImportFormat() {
|
|
1843
|
+
return {
|
|
1844
|
+
query: `
|
|
1845
|
+
mutation DeckImportFormatCreate($input: DeckImportFormatCreateInput!) {
|
|
1846
|
+
deckImportFormatCreate(input: $input) {
|
|
1847
|
+
${DECK_IMPORT_FORMAT_DEFINITION_FIELDS}
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
`
|
|
1851
|
+
};
|
|
1852
|
+
},
|
|
1853
|
+
updateDeckImportFormat() {
|
|
1854
|
+
return {
|
|
1855
|
+
query: `
|
|
1856
|
+
mutation DeckImportFormatUpdate($id: UUID!, $input: DeckImportFormatUpdateInput!) {
|
|
1857
|
+
deckImportFormatUpdate(id: $id, input: $input) {
|
|
1858
|
+
${DECK_IMPORT_FORMAT_DEFINITION_FIELDS}
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
`
|
|
1862
|
+
};
|
|
1863
|
+
},
|
|
1864
|
+
archiveDeckImportFormat() {
|
|
1865
|
+
return {
|
|
1866
|
+
query: `
|
|
1867
|
+
mutation DeckImportFormatArchive($id: UUID!) {
|
|
1868
|
+
deckImportFormatArchive(id: $id) {
|
|
1869
|
+
${DECK_IMPORT_FORMAT_DEFINITION_FIELDS}
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
`
|
|
1873
|
+
};
|
|
1874
|
+
},
|
|
1875
|
+
unarchiveDeckImportFormat() {
|
|
1876
|
+
return {
|
|
1877
|
+
query: `
|
|
1878
|
+
mutation DeckImportFormatUnarchive($id: UUID!) {
|
|
1879
|
+
deckImportFormatUnarchive(id: $id) {
|
|
1880
|
+
${DECK_IMPORT_FORMAT_DEFINITION_FIELDS}
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
`
|
|
1884
|
+
};
|
|
1885
|
+
},
|
|
1886
|
+
upsertDeckByExternalRef() {
|
|
1887
|
+
return {
|
|
1888
|
+
query: `
|
|
1889
|
+
mutation DeckUpsertByExternalRef($input: DeckUpsertByExternalRefInput!) {
|
|
1890
|
+
deckUpsertByExternalRef(input: $input) {
|
|
1891
|
+
deck {
|
|
1892
|
+
${DECK_FIELDS}
|
|
1893
|
+
}
|
|
1894
|
+
created
|
|
1895
|
+
idempotentReplay
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
`
|
|
1899
|
+
};
|
|
1900
|
+
},
|
|
1901
|
+
claimDeck() {
|
|
1902
|
+
return {
|
|
1903
|
+
query: `
|
|
1904
|
+
mutation DeckClaim($id: UUID!, $input: DeckClaimInput!) {
|
|
1905
|
+
deckClaim(id: $id, input: $input) {
|
|
1906
|
+
${DECK_OWNERSHIP_TRANSFER_PAYLOAD_FIELDS}
|
|
1907
|
+
}
|
|
1908
|
+
}
|
|
1909
|
+
`
|
|
1910
|
+
};
|
|
1911
|
+
},
|
|
1912
|
+
transferDeckOwnership() {
|
|
1913
|
+
return {
|
|
1914
|
+
query: `
|
|
1915
|
+
mutation DeckTransferOwnership($id: UUID!, $input: DeckTransferOwnershipInput!) {
|
|
1916
|
+
deckTransferOwnership(id: $id, input: $input) {
|
|
1917
|
+
${DECK_OWNERSHIP_TRANSFER_PAYLOAD_FIELDS}
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
`
|
|
1921
|
+
};
|
|
1922
|
+
},
|
|
1923
|
+
copyDeck() {
|
|
1924
|
+
return {
|
|
1925
|
+
query: `
|
|
1926
|
+
mutation DeckCopy($id: UUID!, $input: DeckCopyInput!) {
|
|
1927
|
+
deckCopy(id: $id, input: $input) {
|
|
1928
|
+
${DECK_COPY_PAYLOAD_FIELDS}
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
`
|
|
1932
|
+
};
|
|
1933
|
+
},
|
|
1060
1934
|
publishDeck() {
|
|
1061
1935
|
return {
|
|
1062
1936
|
query: `
|
|
1063
1937
|
mutation DeckPublish($id: UUID!, $input: DeckPublishInput!) {
|
|
1064
1938
|
deckPublish(id: $id, input: $input) {
|
|
1065
|
-
${
|
|
1939
|
+
${DECK_PUBLISH_PAYLOAD_FIELDS}
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
`
|
|
1943
|
+
};
|
|
1944
|
+
},
|
|
1945
|
+
removeInvalidDeckEntries() {
|
|
1946
|
+
return {
|
|
1947
|
+
query: `
|
|
1948
|
+
mutation DeckRemoveInvalidEntries($id: UUID!, $input: DeckRemoveInvalidEntriesInput!) {
|
|
1949
|
+
deckRemoveInvalidEntries(id: $id, input: $input) {
|
|
1950
|
+
${DECK_FIELDS}
|
|
1066
1951
|
}
|
|
1067
1952
|
}
|
|
1068
1953
|
`
|
|
@@ -1111,21 +1996,193 @@ ${RESOLVED_LINKS_FIELDS}` : selectedRecordFields;
|
|
|
1111
1996
|
`
|
|
1112
1997
|
};
|
|
1113
1998
|
},
|
|
1999
|
+
createDeckEmbedToken() {
|
|
2000
|
+
return {
|
|
2001
|
+
query: `
|
|
2002
|
+
mutation DeckEmbedTokenCreate($input: DeckEmbedTokenCreateInput!) {
|
|
2003
|
+
deckEmbedTokenCreate(input: $input) {
|
|
2004
|
+
token
|
|
2005
|
+
embedToken {
|
|
2006
|
+
${DECK_EMBED_TOKEN_FIELDS}
|
|
2007
|
+
}
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
`
|
|
2011
|
+
};
|
|
2012
|
+
},
|
|
2013
|
+
revokeDeckEmbedToken() {
|
|
2014
|
+
return {
|
|
2015
|
+
query: `
|
|
2016
|
+
mutation DeckEmbedTokenRevoke($id: UUID!) {
|
|
2017
|
+
deckEmbedTokenRevoke(id: $id)
|
|
2018
|
+
}
|
|
2019
|
+
`
|
|
2020
|
+
};
|
|
2021
|
+
},
|
|
2022
|
+
createDeckAccessTokenIssuer() {
|
|
2023
|
+
return {
|
|
2024
|
+
query: `
|
|
2025
|
+
mutation DeckAccessTokenIssuerCreate($input: DeckAccessTokenIssuerCreateInput!) {
|
|
2026
|
+
deckAccessTokenIssuerCreate(input: $input) {
|
|
2027
|
+
${DECK_ACCESS_TOKEN_ISSUER_FIELDS}
|
|
2028
|
+
}
|
|
2029
|
+
}
|
|
2030
|
+
`
|
|
2031
|
+
};
|
|
2032
|
+
},
|
|
2033
|
+
revokeDeckAccessTokenIssuer() {
|
|
2034
|
+
return {
|
|
2035
|
+
query: `
|
|
2036
|
+
mutation DeckAccessTokenIssuerRevoke($id: UUID!) {
|
|
2037
|
+
deckAccessTokenIssuerRevoke(id: $id)
|
|
2038
|
+
}
|
|
2039
|
+
`
|
|
2040
|
+
};
|
|
2041
|
+
},
|
|
2042
|
+
revokeDeckAccessTokenIssuerSigningKey() {
|
|
2043
|
+
return {
|
|
2044
|
+
query: `
|
|
2045
|
+
mutation DeckAccessTokenIssuerSigningKeyRevoke($id: UUID!) {
|
|
2046
|
+
deckAccessTokenIssuerSigningKeyRevoke(id: $id) {
|
|
2047
|
+
${DECK_ACCESS_TOKEN_ISSUER_FIELDS}
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
`
|
|
2051
|
+
};
|
|
2052
|
+
},
|
|
2053
|
+
exchangeDeckAccessToken() {
|
|
2054
|
+
return {
|
|
2055
|
+
query: `
|
|
2056
|
+
mutation DeckAccessTokenExchange($input: DeckAccessTokenExchangeInput!) {
|
|
2057
|
+
deckAccessTokenExchange(input: $input) {
|
|
2058
|
+
token
|
|
2059
|
+
accessToken {
|
|
2060
|
+
${DECK_ACCESS_TOKEN_FIELDS}
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
`
|
|
2065
|
+
};
|
|
2066
|
+
},
|
|
2067
|
+
grantDeckApiApplicationAccess() {
|
|
2068
|
+
return {
|
|
2069
|
+
query: `
|
|
2070
|
+
mutation DeckApiApplicationAccessGrant($input: DeckAPIApplicationAccessGrantInput!) {
|
|
2071
|
+
deckApiApplicationAccessGrant(input: $input) {
|
|
2072
|
+
${DECK_API_APPLICATION_ACCESS_FIELDS}
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
`
|
|
2076
|
+
};
|
|
2077
|
+
},
|
|
2078
|
+
revokeDeckApiApplicationAccess() {
|
|
2079
|
+
return {
|
|
2080
|
+
query: `
|
|
2081
|
+
mutation DeckApiApplicationAccessRevoke($deckId: UUID!, $apiApplicationId: UUID!) {
|
|
2082
|
+
deckApiApplicationAccessRevoke(deckId: $deckId, apiApplicationId: $apiApplicationId)
|
|
2083
|
+
}
|
|
2084
|
+
`
|
|
2085
|
+
};
|
|
2086
|
+
},
|
|
2087
|
+
revokeDeckAccessToken() {
|
|
2088
|
+
return {
|
|
2089
|
+
query: `
|
|
2090
|
+
mutation DeckAccessTokenRevoke($id: UUID!) {
|
|
2091
|
+
deckAccessTokenRevoke(id: $id)
|
|
2092
|
+
}
|
|
2093
|
+
`
|
|
2094
|
+
};
|
|
2095
|
+
},
|
|
1114
2096
|
deckCreateVariables(input) {
|
|
1115
2097
|
return { input };
|
|
1116
2098
|
},
|
|
1117
2099
|
deckUpdateVariables(id, input) {
|
|
1118
2100
|
return { id, input };
|
|
1119
2101
|
},
|
|
1120
|
-
|
|
2102
|
+
deckEntryAddVariables(input) {
|
|
2103
|
+
return { input };
|
|
2104
|
+
},
|
|
2105
|
+
deckEntryUpdateVariables(id, input) {
|
|
2106
|
+
return { id, input };
|
|
2107
|
+
},
|
|
2108
|
+
deckEntryRemoveVariables(id, expectedDraftRevision) {
|
|
2109
|
+
return { id, expectedDraftRevision };
|
|
2110
|
+
},
|
|
2111
|
+
deckEntryReorderVariables(deckId, input) {
|
|
2112
|
+
return { deckId, input };
|
|
2113
|
+
},
|
|
2114
|
+
deckEntriesReplaceVariables(deckId, input) {
|
|
2115
|
+
return { deckId, input };
|
|
2116
|
+
},
|
|
2117
|
+
deckImportVariables(input) {
|
|
2118
|
+
return { input };
|
|
2119
|
+
},
|
|
2120
|
+
deckImportFormatCreateVariables(input) {
|
|
2121
|
+
return { input };
|
|
2122
|
+
},
|
|
2123
|
+
deckImportFormatUpdateVariables(id, input) {
|
|
2124
|
+
return { id, input };
|
|
2125
|
+
},
|
|
2126
|
+
deckImportFormatTestVariables(input) {
|
|
2127
|
+
return { input };
|
|
2128
|
+
},
|
|
2129
|
+
deckUpsertByExternalRefVariables(input) {
|
|
2130
|
+
return { input };
|
|
2131
|
+
},
|
|
2132
|
+
deckClaimVariables(id, input) {
|
|
2133
|
+
return { id, input };
|
|
2134
|
+
},
|
|
2135
|
+
deckTransferOwnershipVariables(id, input) {
|
|
2136
|
+
return { id, input };
|
|
2137
|
+
},
|
|
2138
|
+
deckCopyVariables(id, input) {
|
|
2139
|
+
return { id, input };
|
|
2140
|
+
},
|
|
2141
|
+
deckPublishVariables(id, input) {
|
|
1121
2142
|
return { id, input };
|
|
1122
2143
|
},
|
|
2144
|
+
deckValidateVariables(id, input) {
|
|
2145
|
+
return input === void 0 ? { id } : { id, input };
|
|
2146
|
+
},
|
|
2147
|
+
deckRemoveInvalidEntriesVariables(id, input) {
|
|
2148
|
+
return { id, input };
|
|
2149
|
+
},
|
|
2150
|
+
deckHydrateEntriesVariables(input) {
|
|
2151
|
+
return { input };
|
|
2152
|
+
},
|
|
2153
|
+
deckExportVariables(id, format) {
|
|
2154
|
+
return { id, format };
|
|
2155
|
+
},
|
|
2156
|
+
deckVersionDiffVariables(fromVersionId, toVersionId) {
|
|
2157
|
+
return { fromVersionId, toVersionId };
|
|
2158
|
+
},
|
|
1123
2159
|
deckCollaboratorVariables(deckId, accountId, role) {
|
|
1124
2160
|
return role === void 0 ? { deckId, accountId } : { deckId, accountId, role };
|
|
1125
2161
|
},
|
|
1126
2162
|
deckPreviewTokenCreateVariables(input) {
|
|
1127
2163
|
return { input };
|
|
1128
2164
|
},
|
|
2165
|
+
deckEmbedTokenCreateVariables(input) {
|
|
2166
|
+
return { input };
|
|
2167
|
+
},
|
|
2168
|
+
deckAccessTokenIssuerCreateVariables(input) {
|
|
2169
|
+
return { input };
|
|
2170
|
+
},
|
|
2171
|
+
deckAccessTokenExchangeVariables(input) {
|
|
2172
|
+
return { input };
|
|
2173
|
+
},
|
|
2174
|
+
deckApiApplicationAccessesVariables(deckId, includeRevoked) {
|
|
2175
|
+
return includeRevoked === void 0 ? { deckId } : { deckId, includeRevoked };
|
|
2176
|
+
},
|
|
2177
|
+
myDeckApiApplicationAccessesVariables(applicationId) {
|
|
2178
|
+
return applicationId === void 0 ? {} : { applicationId };
|
|
2179
|
+
},
|
|
2180
|
+
deckApiApplicationAccessGrantVariables(input) {
|
|
2181
|
+
return { input };
|
|
2182
|
+
},
|
|
2183
|
+
deckApiApplicationAccessRevokeVariables(deckId, apiApplicationId) {
|
|
2184
|
+
return { deckId, apiApplicationId };
|
|
2185
|
+
},
|
|
1129
2186
|
// API Key Info
|
|
1130
2187
|
fetchMe() {
|
|
1131
2188
|
return {
|