@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/dist/index.d.ts CHANGED
@@ -16,8 +16,16 @@ interface Cache {
16
16
  clear?(): void | Promise<void>;
17
17
  }
18
18
  interface CardDBConfig {
19
- /** API key for authentication (increases rate limits) */
19
+ /** API key for authentication. Prefer publishableKey or secretKey when credential intent matters. */
20
20
  apiKey?: string;
21
+ /** Browser-safe publishable API key for public reads and OAuth-enabled user flows. */
22
+ publishableKey?: string;
23
+ /** Server-side secret API key for app-owned deck workflows. Never expose this in browsers. */
24
+ secretKey?: string;
25
+ /** OAuth bearer token for user-authorized requests. */
26
+ accessToken?: string;
27
+ /** Client environment used by API-created resources when supported by the backend. */
28
+ environment?: 'TEST' | 'LIVE';
21
29
  /** GraphQL endpoint URL (defaults to production) */
22
30
  endpoint?: string;
23
31
  /** Request timeout in milliseconds */
@@ -159,9 +167,68 @@ interface TCGPlayerPrice {
159
167
  directLowPrice: number | null;
160
168
  }
161
169
  type DeckVisibility = 'PRIVATE' | 'UNLISTED' | 'PUBLIC';
170
+ type DeckOwnerType = 'ACCOUNT' | 'API_APPLICATION';
171
+ type DeckEnvironment = 'TEST' | 'LIVE';
172
+ type DeckAccessMode = 'PUBLIC' | 'OWNER_ONLY' | 'AUTHORIZED_TOKEN';
173
+ type DeckDiscoverability = 'LISTED' | 'UNLISTED';
174
+ type DeckState = 'DRAFT' | 'PUBLISHED' | 'ARCHIVED' | 'DELETED';
175
+ type DeckTokenReadMode = 'PUBLIC' | 'PREVIEW' | 'EMBED' | 'FULL';
176
+ type DeckAccessTokenSigningAlgorithm = 'ED25519';
177
+ type DeckImportFormat = 'SIMPLE_TEXT' | 'CONFIGURED';
178
+ type DeckExportFormat = 'SIMPLE_TEXT';
162
179
  type DeckCollaboratorRole = 'VIEWER' | 'EDITOR';
180
+ type DeckAppAccessRetention = 'RETAIN' | 'REVOKE';
181
+ type DeckAPIApplicationAccessRole = 'VIEWER' | 'EDITOR' | 'OWNER';
182
+ type DeckAPIApplicationAccessGrantSource = 'APP_CREATED' | 'USER_SELECTED' | 'CLAIM_RETAINED' | 'TRANSFER_RETAINED';
183
+ type DeckValidationSeverity = 'BLOCKER' | 'WARNING';
184
+ interface ViewerDecksFilterInput {
185
+ environment?: DeckEnvironment;
186
+ gameId?: string;
187
+ rulesetId?: string;
188
+ state?: DeckState;
189
+ accessMode?: DeckAccessMode;
190
+ discoverability?: DeckDiscoverability;
191
+ createdByApiApplicationId?: string;
192
+ externalSubjectRef?: string;
193
+ updatedAfter?: string;
194
+ updatedBefore?: string;
195
+ publishedAfter?: string;
196
+ publishedBefore?: string;
197
+ includeArchived?: boolean;
198
+ }
199
+ interface AppDecksFilterInput {
200
+ environment?: DeckEnvironment;
201
+ gameId?: string;
202
+ rulesetId?: string;
203
+ state?: DeckState;
204
+ accessMode?: DeckAccessMode;
205
+ discoverability?: DeckDiscoverability;
206
+ externalSubjectRef?: string;
207
+ updatedAfter?: string;
208
+ updatedBefore?: string;
209
+ publishedAfter?: string;
210
+ publishedBefore?: string;
211
+ includeArchived?: boolean;
212
+ }
213
+ interface PublicDecksFilterInput {
214
+ environment?: DeckEnvironment;
215
+ gameId?: string;
216
+ rulesetId?: string;
217
+ accessMode?: DeckAccessMode;
218
+ discoverability?: DeckDiscoverability;
219
+ updatedAfter?: string;
220
+ updatedBefore?: string;
221
+ publishedAfter?: string;
222
+ publishedBefore?: string;
223
+ }
163
224
  interface Deck {
164
225
  id: string;
226
+ ownerType: DeckOwnerType;
227
+ ownerAccountId: string | null;
228
+ ownerApiApplicationId: string | null;
229
+ environment: DeckEnvironment;
230
+ createdByAccountId: string | null;
231
+ createdByApiApplicationId: string | null;
165
232
  accountId: string;
166
233
  apiApplicationId: string | null;
167
234
  gameId: string;
@@ -172,12 +239,26 @@ interface Deck {
172
239
  description: string | null;
173
240
  formatKey: string | null;
174
241
  visibility: DeckVisibility;
242
+ accessMode: DeckAccessMode;
243
+ discoverability: DeckDiscoverability;
244
+ state: DeckState;
245
+ archivedAt: string | null;
246
+ deletedAt: string | null;
247
+ unpublishedAt: string | null;
248
+ externalRefApiApplicationId: string | null;
175
249
  externalRef: string | null;
250
+ externalSubjectRef: string | null;
251
+ rulesetId: string | null;
176
252
  sourceUrl: string | null;
177
253
  metadata: Record<string, unknown>;
178
254
  entries: DeckEntry[];
255
+ sectionDefinitions: DeckSectionDefinition[];
179
256
  latestPublishedVersion: DeckVersion | null;
180
257
  publishedAt: string | null;
258
+ draftRevision: number;
259
+ draftUpdatedAt: string;
260
+ draftUpdatedByAccountId: string | null;
261
+ draftUpdatedByApiApplicationId: string | null;
181
262
  hasUnpublishedChanges: boolean;
182
263
  createdAt: string;
183
264
  updatedAt: string;
@@ -198,6 +279,14 @@ interface DeckVersion {
198
279
  entries: DeckEntry[];
199
280
  publishNote: string | null;
200
281
  computedDiff: Record<string, unknown>;
282
+ rulesetId: string | null;
283
+ rulesetVersionId: string | null;
284
+ cardDatasetId: string | null;
285
+ cardDatasetVersionId: string | null;
286
+ validatedAt: string | null;
287
+ validationSummary: Record<string, unknown>;
288
+ validatedAgainst: DeckValidatedAgainst | null;
289
+ sectionDefinitions: DeckSectionDefinition[];
201
290
  publishedByAccountId: string | null;
202
291
  publishedByApiApplicationId: string | null;
203
292
  createdAt: string;
@@ -212,6 +301,36 @@ interface DeckCollaborator {
212
301
  createdAt: string;
213
302
  updatedAt: string;
214
303
  }
304
+ interface DeckOwnershipTransferPayload {
305
+ deck: Deck;
306
+ retainedAppAccess: boolean;
307
+ }
308
+ interface DeckCopyPayload {
309
+ deck: Deck;
310
+ copiedFromDeckId: string;
311
+ retainedAppAccess: boolean;
312
+ }
313
+ interface DeckAccessApplication {
314
+ id: string;
315
+ name: string;
316
+ description: string | null;
317
+ revokedAt: string | null;
318
+ }
319
+ interface DeckAPIApplicationAccess {
320
+ id: string;
321
+ deckId: string;
322
+ deck: Deck;
323
+ apiApplicationId: string;
324
+ apiApplication: DeckAccessApplication;
325
+ role: DeckAPIApplicationAccessRole;
326
+ grantSource: DeckAPIApplicationAccessGrantSource;
327
+ externalRef: string | null;
328
+ createdByAccountId: string | null;
329
+ createdByApiApplicationId: string | null;
330
+ revokedAt: string | null;
331
+ createdAt: string;
332
+ updatedAt: string;
333
+ }
215
334
  interface DeckPreviewToken {
216
335
  id: string;
217
336
  deckId: string;
@@ -226,6 +345,56 @@ interface DeckPreviewTokenCreatePayload {
226
345
  token: string;
227
346
  previewToken: DeckPreviewToken;
228
347
  }
348
+ interface DeckEmbedToken {
349
+ id: string;
350
+ deckId: string;
351
+ apiApplicationId: string | null;
352
+ label: string | null;
353
+ readMode: DeckTokenReadMode;
354
+ allowedOrigins: string[];
355
+ externalSubject: string | null;
356
+ expiresAt: string | null;
357
+ revokedAt: string | null;
358
+ lastUsedAt: string | null;
359
+ createdAt: string;
360
+ updatedAt: string;
361
+ }
362
+ interface DeckEmbedTokenCreatePayload {
363
+ token: string;
364
+ embedToken: DeckEmbedToken;
365
+ }
366
+ interface DeckAccessTokenIssuer {
367
+ id: string;
368
+ deckId: string;
369
+ apiApplicationId: string;
370
+ label: string | null;
371
+ readModes: DeckTokenReadMode[];
372
+ maxTokenLifetimeSeconds: number;
373
+ directSigningAlg: DeckAccessTokenSigningAlgorithm | null;
374
+ directSigningKeyId: string | null;
375
+ directSigningPublicKey: string | null;
376
+ directSigningKeyRevokedAt: string | null;
377
+ revokedAt: string | null;
378
+ createdAt: string;
379
+ updatedAt: string;
380
+ }
381
+ interface DeckAccessToken {
382
+ id: string;
383
+ deckId: string;
384
+ apiApplicationId: string;
385
+ issuerId: string;
386
+ readMode: DeckTokenReadMode;
387
+ externalSubject: string | null;
388
+ expiresAt: string;
389
+ revokedAt: string | null;
390
+ lastUsedAt: string | null;
391
+ createdAt: string;
392
+ updatedAt: string;
393
+ }
394
+ interface DeckAccessTokenExchangePayload {
395
+ token: string;
396
+ accessToken: DeckAccessToken;
397
+ }
229
398
  interface DeckEntry {
230
399
  id: string;
231
400
  datasetId: string;
@@ -235,6 +404,7 @@ interface DeckEntry {
235
404
  section: string;
236
405
  sortOrder: number;
237
406
  annotations: Record<string, unknown>;
407
+ display: Record<string, unknown>;
238
408
  record: DatasetRecord | null;
239
409
  }
240
410
  interface DeckEntryInput {
@@ -252,29 +422,363 @@ interface DeckCreateInput {
252
422
  description?: string;
253
423
  formatKey?: string;
254
424
  visibility?: DeckVisibility;
425
+ accessMode?: DeckAccessMode;
426
+ discoverability?: DeckDiscoverability;
255
427
  externalRef?: string;
428
+ externalSubjectRef?: string;
429
+ rulesetId?: string;
430
+ sourceUrl?: string;
431
+ metadata?: Record<string, unknown>;
432
+ entries: DeckEntryInput[];
433
+ }
434
+ interface DeckUpsertByExternalRefInput {
435
+ externalRef: string;
436
+ idempotencyKey?: string;
437
+ expectedDraftRevision?: number;
438
+ publisherSlug: string;
439
+ gameKey: string;
440
+ title: string;
441
+ description?: string;
442
+ formatKey?: string;
443
+ visibility?: DeckVisibility;
444
+ accessMode?: DeckAccessMode;
445
+ discoverability?: DeckDiscoverability;
446
+ externalSubjectRef?: string;
447
+ rulesetId?: string;
256
448
  sourceUrl?: string;
257
449
  metadata?: Record<string, unknown>;
258
450
  entries: DeckEntryInput[];
259
451
  }
452
+ interface DeckUpsertByExternalRefPayload {
453
+ deck: Deck;
454
+ created: boolean;
455
+ idempotentReplay: boolean;
456
+ }
260
457
  interface DeckUpdateInput {
458
+ expectedDraftRevision: number;
261
459
  title?: string;
262
460
  description?: string;
263
461
  formatKey?: string;
264
462
  visibility?: DeckVisibility;
463
+ accessMode?: DeckAccessMode;
464
+ discoverability?: DeckDiscoverability;
265
465
  externalRef?: string;
466
+ externalSubjectRef?: string;
467
+ rulesetId?: string;
266
468
  sourceUrl?: string;
267
469
  metadata?: Record<string, unknown>;
268
- entries?: DeckEntryInput[];
269
470
  }
270
471
  interface DeckPublishInput {
472
+ expectedDraftRevision: number;
271
473
  note?: string;
474
+ rulesetVersionId?: string;
475
+ cardDatasetVersionId?: string;
476
+ }
477
+ interface DeckEntryAddInput extends DeckEntryInput {
478
+ deckId: string;
479
+ expectedDraftRevision: number;
480
+ }
481
+ interface DeckEntryUpdateInput {
482
+ expectedDraftRevision: number;
483
+ datasetKey?: string;
484
+ identifier?: string;
485
+ quantity?: number;
486
+ section?: string;
487
+ sortOrder?: number;
488
+ annotations?: Record<string, unknown>;
489
+ }
490
+ interface DeckEntryReorderItemInput {
491
+ id: string;
492
+ section?: string;
493
+ sortOrder: number;
494
+ }
495
+ interface DeckEntryReorderInput {
496
+ expectedDraftRevision: number;
497
+ entries: DeckEntryReorderItemInput[];
498
+ }
499
+ interface DeckEntriesReplaceInput {
500
+ expectedDraftRevision: number;
501
+ entries: DeckEntryInput[];
502
+ }
503
+ interface DeckEntryMutationPayload {
504
+ deck: Deck;
505
+ entry: DeckEntry | null;
506
+ }
507
+ interface DeckEntryReorderPayload {
508
+ deck: Deck;
509
+ entries: DeckEntry[];
510
+ }
511
+ interface DeckEntriesReplacePayload {
512
+ deck: Deck;
513
+ entries: DeckEntry[];
514
+ }
515
+ interface DeckPublishPayload {
516
+ deck: Deck;
517
+ version: DeckVersion | null;
518
+ validation: DeckValidation;
519
+ blockers: DeckValidationIssue[];
520
+ warnings: DeckValidationIssue[];
521
+ }
522
+ interface DeckValidateInput {
523
+ rulesetVersionId?: string;
524
+ cardDatasetVersionId?: string;
525
+ }
526
+ interface DeckRemoveInvalidEntriesInput extends DeckValidateInput {
527
+ expectedDraftRevision: number;
528
+ }
529
+ interface DeckClaimInput {
530
+ idempotencyKey?: string;
531
+ expectedDraftRevision: number;
532
+ appAccess: DeckAppAccessRetention;
533
+ }
534
+ interface DeckTransferOwnershipInput {
535
+ idempotencyKey?: string;
536
+ targetAccountId: string;
537
+ expectedDraftRevision: number;
538
+ appAccess: DeckAppAccessRetention;
539
+ }
540
+ interface DeckCopyInput {
541
+ idempotencyKey?: string;
542
+ title?: string;
543
+ expectedDraftRevision: number;
544
+ appAccess: DeckAppAccessRetention;
545
+ }
546
+ interface DeckValidatedAgainst {
547
+ rulesetId: string | null;
548
+ rulesetVersionId: string | null;
549
+ rulesetVersionLabel: string | null;
550
+ cardDatasetId: string | null;
551
+ cardDatasetVersionId: string | null;
552
+ validatedAt: string;
553
+ validationResultSummary: Record<string, unknown>;
554
+ }
555
+ interface DeckValidationAffectedEntry {
556
+ entryId: string;
557
+ datasetId: string;
558
+ recordId: string | null;
559
+ identifier: string;
560
+ section: string;
561
+ quantity: number;
562
+ }
563
+ interface DeckValidationIssue {
564
+ code: string;
565
+ severity: DeckValidationSeverity;
566
+ message: string;
567
+ entryIds: string[];
568
+ section: string | null;
569
+ datasetId: string | null;
570
+ identifier: string | null;
571
+ metadata: Record<string, unknown>;
572
+ }
573
+ interface DeckValidation {
574
+ deckId: string;
575
+ valid: boolean;
576
+ blockers: DeckValidationIssue[];
577
+ warnings: DeckValidationIssue[];
578
+ affectedEntries: DeckValidationAffectedEntry[];
579
+ validatedAgainst: DeckValidatedAgainst;
580
+ checkedAt: string;
581
+ }
582
+ interface DeckDiff {
583
+ deckId: string;
584
+ fromVersionId: string | null;
585
+ toVersionId: string | null;
586
+ toDraftRevision: number | null;
587
+ hasChanges: boolean;
588
+ diff: Record<string, unknown>;
589
+ }
590
+ interface DeckSectionDefinition {
591
+ key: string;
592
+ label: string;
593
+ description: string | null;
594
+ order: number;
595
+ default: boolean;
596
+ aliases: string[];
597
+ minCards: number | null;
598
+ maxCards: number | null;
599
+ excludedFromDeckSize: boolean;
600
+ legalCardTypes: string[];
601
+ metadata: Record<string, unknown>;
272
602
  }
273
603
  interface DeckPreviewTokenCreateInput {
274
604
  deckId: string;
275
605
  label?: string;
276
606
  expiresAt?: string;
277
607
  }
608
+ interface DeckEmbedTokenCreateInput {
609
+ deckId: string;
610
+ label?: string;
611
+ readMode?: DeckTokenReadMode;
612
+ allowedOrigins?: string[];
613
+ externalSubject?: string;
614
+ expiresAt?: string;
615
+ }
616
+ interface DeckAccessTokenIssuerCreateInput {
617
+ deckId: string;
618
+ apiApplicationId?: string;
619
+ label?: string;
620
+ readModes?: DeckTokenReadMode[];
621
+ maxTokenLifetimeSeconds?: number;
622
+ directSigningKey?: DeckAccessTokenIssuerSigningKeyInput;
623
+ }
624
+ interface DeckAccessTokenIssuerSigningKeyInput {
625
+ algorithm: DeckAccessTokenSigningAlgorithm;
626
+ keyId: string;
627
+ publicKey: string;
628
+ }
629
+ interface DeckAccessTokenExchangeInput {
630
+ deckId: string;
631
+ readMode: DeckTokenReadMode;
632
+ externalSubject?: string;
633
+ expiresAt?: string;
634
+ }
635
+ interface DeckAPIApplicationAccessGrantInput {
636
+ deckId: string;
637
+ apiApplicationId: string;
638
+ role: DeckAPIApplicationAccessRole;
639
+ }
640
+ interface DeckImportInput {
641
+ deckId: string;
642
+ format?: DeckImportFormat;
643
+ importFormatId?: string;
644
+ importFormatKey?: string;
645
+ autoDetect?: boolean;
646
+ datasetKey?: string;
647
+ text: string;
648
+ defaultSection?: string;
649
+ replace?: boolean;
650
+ dryRun?: boolean;
651
+ expectedDraftRevision?: number;
652
+ }
653
+ interface DeckImportEntry {
654
+ lineNumber: number;
655
+ raw: string;
656
+ datasetKey: string;
657
+ datasetId: string;
658
+ recordId: string;
659
+ identifier: string;
660
+ quantity: number;
661
+ section: string;
662
+ sortOrder: number;
663
+ display: Record<string, unknown>;
664
+ record: DatasetRecord | null;
665
+ }
666
+ interface DeckImportIssue {
667
+ lineNumber: number;
668
+ raw: string;
669
+ code: string;
670
+ message: string;
671
+ }
672
+ interface DeckImportUnmatchedEntry {
673
+ lineNumber: number;
674
+ raw: string;
675
+ datasetKey: string;
676
+ identifier: string;
677
+ quantity: number;
678
+ section: string;
679
+ code: string;
680
+ message: string;
681
+ }
682
+ interface DeckImportCandidate {
683
+ recordId: string;
684
+ identifier: string;
685
+ display: Record<string, unknown>;
686
+ }
687
+ interface DeckImportAmbiguousEntry {
688
+ lineNumber: number;
689
+ raw: string;
690
+ datasetKey: string;
691
+ identifier: string;
692
+ quantity: number;
693
+ section: string;
694
+ candidates: DeckImportCandidate[];
695
+ }
696
+ interface DeckImportFormatDefinition {
697
+ id: string;
698
+ gameId: string;
699
+ key: string;
700
+ name: string;
701
+ description: string | null;
702
+ enabled: boolean;
703
+ priority: number;
704
+ datasetKey: string;
705
+ config: Record<string, unknown>;
706
+ archivedAt: string | null;
707
+ isArchived: boolean;
708
+ createdAt: string;
709
+ updatedAt: string;
710
+ }
711
+ type DeckImportFormatDefinitionConnection = Connection<DeckImportFormatDefinition>;
712
+ interface DeckImportFormatDetection {
713
+ formatId: string | null;
714
+ key: string;
715
+ name: string;
716
+ confidence: number;
717
+ reason: string;
718
+ }
719
+ interface DeckImportFormatTestPayload {
720
+ detection: DeckImportFormatDetection;
721
+ entries: DeckImportEntry[];
722
+ parseErrors: DeckImportIssue[];
723
+ unmatched: DeckImportUnmatchedEntry[];
724
+ ambiguous: DeckImportAmbiguousEntry[];
725
+ }
726
+ interface DeckImportFormatCreateInput {
727
+ gameId: string;
728
+ key: string;
729
+ name: string;
730
+ description?: string;
731
+ enabled?: boolean;
732
+ priority?: number;
733
+ datasetKey?: string;
734
+ config: Record<string, unknown>;
735
+ }
736
+ interface DeckImportFormatUpdateInput {
737
+ name?: string;
738
+ description?: string;
739
+ enabled?: boolean;
740
+ priority?: number;
741
+ datasetKey?: string;
742
+ config?: Record<string, unknown>;
743
+ }
744
+ interface DeckImportFormatTestInput {
745
+ gameId: string;
746
+ formatId?: string;
747
+ formatKey?: string;
748
+ datasetKey?: string;
749
+ defaultSection?: string;
750
+ config?: Record<string, unknown>;
751
+ text: string;
752
+ }
753
+ interface DeckImportPayload {
754
+ deck: Deck | null;
755
+ applied: boolean;
756
+ dryRun: boolean;
757
+ replace: boolean;
758
+ format: DeckImportFormat;
759
+ importFormat: DeckImportFormatDefinition | null;
760
+ detection: DeckImportFormatDetection;
761
+ entries: DeckImportEntry[];
762
+ parseErrors: DeckImportIssue[];
763
+ unmatched: DeckImportUnmatchedEntry[];
764
+ ambiguous: DeckImportAmbiguousEntry[];
765
+ validation: DeckValidation | null;
766
+ }
767
+ interface DeckHydrateEntriesInput {
768
+ deckId: string;
769
+ entries: DeckEntryInput[];
770
+ }
771
+ interface DeckHydrateEntriesPayload {
772
+ entries: DeckImportEntry[];
773
+ unmatched: DeckImportUnmatchedEntry[];
774
+ ambiguous: DeckImportAmbiguousEntry[];
775
+ }
776
+ interface DeckExportPayload {
777
+ deckId: string;
778
+ format: DeckExportFormat;
779
+ text: string;
780
+ entryCount: number;
781
+ }
278
782
  interface HydrateDeckEntryInput {
279
783
  identifier: string;
280
784
  quantity: number;
@@ -701,11 +1205,40 @@ interface SearchRecordsParams {
701
1205
  interface ListDecksParams {
702
1206
  first?: number;
703
1207
  after?: string;
1208
+ includeArchived?: boolean;
704
1209
  }
705
1210
  interface ListDeckVersionsParams {
706
1211
  first?: number;
707
1212
  after?: string;
708
1213
  }
1214
+ interface DeckSectionDefinitionsParams {
1215
+ publisherSlug?: string;
1216
+ gameKey?: string;
1217
+ gameId?: string;
1218
+ rulesetKey?: string;
1219
+ rulesetVersionId?: string;
1220
+ }
1221
+ interface ViewerDecksParams {
1222
+ filter?: ViewerDecksFilterInput;
1223
+ first?: number;
1224
+ after?: string;
1225
+ }
1226
+ interface AppDecksParams {
1227
+ filter?: AppDecksFilterInput;
1228
+ first?: number;
1229
+ after?: string;
1230
+ }
1231
+ interface PublicDecksParams {
1232
+ filter?: PublicDecksFilterInput;
1233
+ first?: number;
1234
+ after?: string;
1235
+ }
1236
+ interface ListDeckImportFormatsParams {
1237
+ gameId: string;
1238
+ includeArchived?: boolean;
1239
+ first?: number;
1240
+ after?: string;
1241
+ }
709
1242
  declare const QueryBuilder: {
710
1243
  searchPublishers(params?: SearchPublishersParams): {
711
1244
  query: string;
@@ -766,18 +1299,39 @@ declare const QueryBuilder: {
766
1299
  query: string;
767
1300
  variables: Record<string, unknown>;
768
1301
  };
1302
+ viewerDecks(params?: ViewerDecksParams): {
1303
+ query: string;
1304
+ variables: Record<string, unknown>;
1305
+ };
1306
+ appDecks(params?: AppDecksParams): {
1307
+ query: string;
1308
+ variables: Record<string, unknown>;
1309
+ };
1310
+ publicDecks(params?: PublicDecksParams): {
1311
+ query: string;
1312
+ variables: Record<string, unknown>;
1313
+ };
769
1314
  fetchDeckById(): {
770
1315
  query: string;
771
1316
  };
1317
+ deckById(): {
1318
+ query: string;
1319
+ };
772
1320
  myDeck(): {
773
1321
  query: string;
774
1322
  };
775
1323
  fetchDeckBySlug(): {
776
1324
  query: string;
777
1325
  };
1326
+ deckBySlug(): {
1327
+ query: string;
1328
+ };
778
1329
  fetchDeckByExternalRef(): {
779
1330
  query: string;
780
1331
  };
1332
+ deckByExternalRef(): {
1333
+ query: string;
1334
+ };
781
1335
  deckVersion(): {
782
1336
  query: string;
783
1337
  };
@@ -788,9 +1342,56 @@ declare const QueryBuilder: {
788
1342
  deckPreview(): {
789
1343
  query: string;
790
1344
  };
1345
+ deckEmbed(): {
1346
+ query: string;
1347
+ };
1348
+ deckAccess(): {
1349
+ query: string;
1350
+ };
1351
+ deckDraftDiff(): {
1352
+ query: string;
1353
+ };
1354
+ deckVersionDiff(): {
1355
+ query: string;
1356
+ };
1357
+ deckHydrateEntries(): {
1358
+ query: string;
1359
+ };
1360
+ deckExport(): {
1361
+ query: string;
1362
+ };
1363
+ deckValidate(): {
1364
+ query: string;
1365
+ };
1366
+ deckSectionDefinitions(params?: DeckSectionDefinitionsParams): {
1367
+ query: string;
1368
+ variables: Record<string, unknown>;
1369
+ };
791
1370
  deckCollaborators(): {
792
1371
  query: string;
793
1372
  };
1373
+ deckEmbedTokens(): {
1374
+ query: string;
1375
+ };
1376
+ deckAccessTokenIssuers(): {
1377
+ query: string;
1378
+ };
1379
+ deckApiApplicationAccesses(): {
1380
+ query: string;
1381
+ };
1382
+ myDeckApiApplicationAccesses(): {
1383
+ query: string;
1384
+ };
1385
+ deckImportFormats(params: ListDeckImportFormatsParams): {
1386
+ query: string;
1387
+ variables: Record<string, unknown>;
1388
+ };
1389
+ deckImportFormat(): {
1390
+ query: string;
1391
+ };
1392
+ deckImportFormatTest(): {
1393
+ query: string;
1394
+ };
794
1395
  deckPreviewTokens(): {
795
1396
  query: string;
796
1397
  };
@@ -803,9 +1404,63 @@ declare const QueryBuilder: {
803
1404
  deleteDeck(): {
804
1405
  query: string;
805
1406
  };
1407
+ archiveDeck(): {
1408
+ query: string;
1409
+ };
1410
+ restoreDeck(): {
1411
+ query: string;
1412
+ };
1413
+ unpublishDeck(): {
1414
+ query: string;
1415
+ };
1416
+ addDeckEntry(): {
1417
+ query: string;
1418
+ };
1419
+ updateDeckEntry(): {
1420
+ query: string;
1421
+ };
1422
+ removeDeckEntry(): {
1423
+ query: string;
1424
+ };
1425
+ reorderDeckEntries(): {
1426
+ query: string;
1427
+ };
1428
+ replaceDeckEntries(): {
1429
+ query: string;
1430
+ };
1431
+ importDeck(): {
1432
+ query: string;
1433
+ };
1434
+ createDeckImportFormat(): {
1435
+ query: string;
1436
+ };
1437
+ updateDeckImportFormat(): {
1438
+ query: string;
1439
+ };
1440
+ archiveDeckImportFormat(): {
1441
+ query: string;
1442
+ };
1443
+ unarchiveDeckImportFormat(): {
1444
+ query: string;
1445
+ };
1446
+ upsertDeckByExternalRef(): {
1447
+ query: string;
1448
+ };
1449
+ claimDeck(): {
1450
+ query: string;
1451
+ };
1452
+ transferDeckOwnership(): {
1453
+ query: string;
1454
+ };
1455
+ copyDeck(): {
1456
+ query: string;
1457
+ };
806
1458
  publishDeck(): {
807
1459
  query: string;
808
1460
  };
1461
+ removeInvalidDeckEntries(): {
1462
+ query: string;
1463
+ };
809
1464
  upsertDeckCollaborator(): {
810
1465
  query: string;
811
1466
  };
@@ -818,11 +1473,63 @@ declare const QueryBuilder: {
818
1473
  revokeDeckPreviewToken(): {
819
1474
  query: string;
820
1475
  };
1476
+ createDeckEmbedToken(): {
1477
+ query: string;
1478
+ };
1479
+ revokeDeckEmbedToken(): {
1480
+ query: string;
1481
+ };
1482
+ createDeckAccessTokenIssuer(): {
1483
+ query: string;
1484
+ };
1485
+ revokeDeckAccessTokenIssuer(): {
1486
+ query: string;
1487
+ };
1488
+ revokeDeckAccessTokenIssuerSigningKey(): {
1489
+ query: string;
1490
+ };
1491
+ exchangeDeckAccessToken(): {
1492
+ query: string;
1493
+ };
1494
+ grantDeckApiApplicationAccess(): {
1495
+ query: string;
1496
+ };
1497
+ revokeDeckApiApplicationAccess(): {
1498
+ query: string;
1499
+ };
1500
+ revokeDeckAccessToken(): {
1501
+ query: string;
1502
+ };
821
1503
  deckCreateVariables(input: DeckCreateInput): Record<string, unknown>;
822
1504
  deckUpdateVariables(id: string, input: DeckUpdateInput): Record<string, unknown>;
823
- deckPublishVariables(id: string, input?: DeckPublishInput): Record<string, unknown>;
1505
+ deckEntryAddVariables(input: DeckEntryAddInput): Record<string, unknown>;
1506
+ deckEntryUpdateVariables(id: string, input: DeckEntryUpdateInput): Record<string, unknown>;
1507
+ deckEntryRemoveVariables(id: string, expectedDraftRevision: number): Record<string, unknown>;
1508
+ deckEntryReorderVariables(deckId: string, input: DeckEntryReorderInput): Record<string, unknown>;
1509
+ deckEntriesReplaceVariables(deckId: string, input: DeckEntriesReplaceInput): Record<string, unknown>;
1510
+ deckImportVariables(input: DeckImportInput): Record<string, unknown>;
1511
+ deckImportFormatCreateVariables(input: DeckImportFormatCreateInput): Record<string, unknown>;
1512
+ deckImportFormatUpdateVariables(id: string, input: DeckImportFormatUpdateInput): Record<string, unknown>;
1513
+ deckImportFormatTestVariables(input: DeckImportFormatTestInput): Record<string, unknown>;
1514
+ deckUpsertByExternalRefVariables(input: DeckUpsertByExternalRefInput): Record<string, unknown>;
1515
+ deckClaimVariables(id: string, input: DeckClaimInput): Record<string, unknown>;
1516
+ deckTransferOwnershipVariables(id: string, input: DeckTransferOwnershipInput): Record<string, unknown>;
1517
+ deckCopyVariables(id: string, input: DeckCopyInput): Record<string, unknown>;
1518
+ deckPublishVariables(id: string, input: DeckPublishInput): Record<string, unknown>;
1519
+ deckValidateVariables(id: string, input?: DeckValidateInput): Record<string, unknown>;
1520
+ deckRemoveInvalidEntriesVariables(id: string, input: DeckRemoveInvalidEntriesInput): Record<string, unknown>;
1521
+ deckHydrateEntriesVariables(input: DeckHydrateEntriesInput): Record<string, unknown>;
1522
+ deckExportVariables(id: string, format: DeckExportFormat): Record<string, unknown>;
1523
+ deckVersionDiffVariables(fromVersionId: string, toVersionId: string): Record<string, unknown>;
824
1524
  deckCollaboratorVariables(deckId: string, accountId: string, role?: DeckCollaboratorRole): Record<string, unknown>;
825
1525
  deckPreviewTokenCreateVariables(input: DeckPreviewTokenCreateInput): Record<string, unknown>;
1526
+ deckEmbedTokenCreateVariables(input: DeckEmbedTokenCreateInput): Record<string, unknown>;
1527
+ deckAccessTokenIssuerCreateVariables(input: DeckAccessTokenIssuerCreateInput): Record<string, unknown>;
1528
+ deckAccessTokenExchangeVariables(input: DeckAccessTokenExchangeInput): Record<string, unknown>;
1529
+ deckApiApplicationAccessesVariables(deckId: string, includeRevoked?: boolean): Record<string, unknown>;
1530
+ myDeckApiApplicationAccessesVariables(applicationId?: string): Record<string, unknown>;
1531
+ deckApiApplicationAccessGrantVariables(input: DeckAPIApplicationAccessGrantInput): Record<string, unknown>;
1532
+ deckApiApplicationAccessRevokeVariables(deckId: string, apiApplicationId: string): Record<string, unknown>;
826
1533
  fetchMe(): {
827
1534
  query: string;
828
1535
  };
@@ -958,4 +1665,4 @@ declare class Collection<T> implements AsyncIterable<T> {
958
1665
  each(): AsyncIterable<T>;
959
1666
  }
960
1667
 
961
- export { type APIAccount, type APIApplication, type APIKeyInfo, AuthenticationError, type Cache, type CardDBConfig, CardDBError, Collection, type Connection, ConnectionError, type Dataset, type DatasetRecord, type DatasetRef, type DatasetSchema, type Deck, type DeckCollaborator, type DeckCollaboratorRole, type DeckCreateInput, type DeckEntry, type DeckEntryInput, type DeckPreviewToken, type DeckPreviewTokenCreateInput, type DeckPreviewTokenCreatePayload, type DeckPublishInput, type DeckUpdateInput, type DeckVersion, type DeckVersionConnection, type DeckVisibility, type Edge, type FieldInfo, type FieldType, type FileInfo, FilterBuilder, type FilterBuilderInterface, type FilterCondition, type FilterInput, type FilterOperatorValue, type FilterValue, type Game, type GameRef, GraphQLError, type GraphQLErrorInfo, type HydrateDeckEntryInput, type HydratedDeckEntry, type LinkFieldInfo, LinkResolutionError, type LinkResolutionFailure, type ListDeckVersionsParams, type ListDecksParams, type LogLevel, type Logger, type NextPageLoader, NotFoundError, type PageInfo, type Publisher, type PublisherRef, type PublisherStatus, QueryBuilder, RateLimitError, type RateLimitInfo, type ResolvedLink, type ResourceType, RestrictedError, type SearchDatasetsParams, type SearchGamesParams, type SearchPublishersParams, type SearchRecordsParams, ServerError, type TCGPlayerPrice, type TCGPlayerPricing, TimeoutError, ValidationError, contains, eq, gt, gte, ilike, isNotNull, isNull, like, lt, lte, neq, notWithin, resolveFilter, within };
1668
+ export { type APIAccount, type APIApplication, type APIKeyInfo, type AppDecksFilterInput, type AppDecksParams, AuthenticationError, type Cache, type CardDBConfig, CardDBError, Collection, type Connection, ConnectionError, type Dataset, type DatasetRecord, type DatasetRef, type DatasetSchema, type Deck, type DeckAPIApplicationAccess, type DeckAPIApplicationAccessGrantInput, type DeckAPIApplicationAccessGrantSource, type DeckAPIApplicationAccessRole, type DeckAccessApplication, type DeckAccessMode, type DeckAccessToken, type DeckAccessTokenExchangeInput, type DeckAccessTokenExchangePayload, type DeckAccessTokenIssuer, type DeckAccessTokenIssuerCreateInput, type DeckAccessTokenIssuerSigningKeyInput, type DeckAccessTokenSigningAlgorithm, type DeckAppAccessRetention, type DeckClaimInput, type DeckCollaborator, type DeckCollaboratorRole, type DeckCopyInput, type DeckCopyPayload, type DeckCreateInput, type DeckDiff, type DeckDiscoverability, type DeckEmbedToken, type DeckEmbedTokenCreateInput, type DeckEmbedTokenCreatePayload, type DeckEntriesReplaceInput, type DeckEntriesReplacePayload, type DeckEntry, type DeckEntryAddInput, type DeckEntryInput, type DeckEntryMutationPayload, type DeckEntryReorderInput, type DeckEntryReorderItemInput, type DeckEntryReorderPayload, type DeckEntryUpdateInput, type DeckEnvironment, type DeckExportFormat, type DeckExportPayload, type DeckHydrateEntriesInput, type DeckHydrateEntriesPayload, type DeckImportAmbiguousEntry, type DeckImportCandidate, type DeckImportEntry, type DeckImportFormat, type DeckImportFormatCreateInput, type DeckImportFormatDefinition, type DeckImportFormatDefinitionConnection, type DeckImportFormatDetection, type DeckImportFormatTestInput, type DeckImportFormatTestPayload, type DeckImportFormatUpdateInput, type DeckImportInput, type DeckImportIssue, type DeckImportPayload, type DeckImportUnmatchedEntry, type DeckOwnerType, type DeckOwnershipTransferPayload, type DeckPreviewToken, type DeckPreviewTokenCreateInput, type DeckPreviewTokenCreatePayload, type DeckPublishInput, type DeckPublishPayload, type DeckRemoveInvalidEntriesInput, type DeckSectionDefinition, type DeckSectionDefinitionsParams, type DeckState, type DeckTokenReadMode, type DeckTransferOwnershipInput, type DeckUpdateInput, type DeckUpsertByExternalRefInput, type DeckUpsertByExternalRefPayload, type DeckValidateInput, type DeckValidatedAgainst, type DeckValidation, type DeckValidationAffectedEntry, type DeckValidationIssue, type DeckValidationSeverity, type DeckVersion, type DeckVersionConnection, type DeckVisibility, type Edge, type FieldInfo, type FieldType, type FileInfo, FilterBuilder, type FilterBuilderInterface, type FilterCondition, type FilterInput, type FilterOperatorValue, type FilterValue, type Game, type GameRef, GraphQLError, type GraphQLErrorInfo, type HydrateDeckEntryInput, type HydratedDeckEntry, type LinkFieldInfo, LinkResolutionError, type LinkResolutionFailure, type ListDeckImportFormatsParams, type ListDeckVersionsParams, type ListDecksParams, type LogLevel, type Logger, type NextPageLoader, NotFoundError, type PageInfo, type PublicDecksFilterInput, type PublicDecksParams, type Publisher, type PublisherRef, type PublisherStatus, QueryBuilder, RateLimitError, type RateLimitInfo, type ResolvedLink, type ResourceType, RestrictedError, type SearchDatasetsParams, type SearchGamesParams, type SearchPublishersParams, type SearchRecordsParams, ServerError, type TCGPlayerPrice, type TCGPlayerPricing, TimeoutError, ValidationError, type ViewerDecksFilterInput, type ViewerDecksParams, contains, eq, gt, gte, ilike, isNotNull, isNull, like, lt, lte, neq, notWithin, resolveFilter, within };