@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.d.cts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Core types for CardDB JavaScript clients
3
3
  */
4
4
  type LogLevel = 'debug' | 'info' | 'warn' | 'error';
5
- type ResourceType = 'publishers' | 'games' | 'datasets' | 'records' | 'decks';
5
+ type ResourceType = 'publishers' | 'games' | 'datasets' | 'records' | 'decks' | 'importFormats' | 'imports' | 'exports' | 'files';
6
6
  interface Logger {
7
7
  debug(message: string, ...args: unknown[]): void;
8
8
  info(message: string, ...args: unknown[]): void;
@@ -82,6 +82,36 @@ interface FileInfo {
82
82
  id: string;
83
83
  url: string;
84
84
  }
85
+ type FileStatus = 'PENDING' | 'UPLOADED' | 'DELETED';
86
+ interface FileUploadInput {
87
+ filename: string;
88
+ contentType: string;
89
+ size: number;
90
+ isPublic: boolean;
91
+ entityType?: string;
92
+ entityId?: string;
93
+ publisherId?: string;
94
+ datasetId?: string;
95
+ }
96
+ interface File {
97
+ id: string;
98
+ createdAt: string;
99
+ updatedAt: string;
100
+ key: string;
101
+ filename: string;
102
+ contentType: string;
103
+ size: number;
104
+ status: FileStatus;
105
+ isPublic: boolean;
106
+ entityType: string | null;
107
+ entityId: string | null;
108
+ url: string;
109
+ }
110
+ interface PresignedUpload {
111
+ file: File;
112
+ uploadUrl: string;
113
+ expiresAt: string;
114
+ }
85
115
  type PublisherStatus = 'ACTIVE' | 'DEACTIVATED';
86
116
  interface Publisher {
87
117
  id: string;
@@ -106,8 +136,10 @@ interface Game {
106
136
  key: string;
107
137
  name: string;
108
138
  description: string | null;
139
+ metafyGameUuid?: string | null;
140
+ metafyGameSlug?: string | null;
109
141
  website: string | null;
110
- visibility: string;
142
+ visibility: GameVisibility;
111
143
  isArchived: boolean;
112
144
  publisher: PublisherRef | null;
113
145
  logoFile: FileInfo | null;
@@ -115,6 +147,29 @@ interface Game {
115
147
  createdAt: string;
116
148
  updatedAt: string;
117
149
  }
150
+ type GameVisibility = 'PRIVATE' | 'PUBLIC';
151
+ interface GameCreateInput {
152
+ publisherId: string;
153
+ key: string;
154
+ name: string;
155
+ description?: string;
156
+ metafyGameUuid?: string;
157
+ metafyGameSlug?: string;
158
+ logoFileId?: string;
159
+ coverFileId?: string;
160
+ website?: string;
161
+ visibility?: GameVisibility;
162
+ }
163
+ interface GameUpdateInput {
164
+ name?: string;
165
+ description?: string;
166
+ metafyGameUuid?: string;
167
+ metafyGameSlug?: string;
168
+ logoFileId?: string;
169
+ coverFileId?: string;
170
+ website?: string;
171
+ visibility?: GameVisibility;
172
+ }
118
173
  interface GameRef {
119
174
  id: string;
120
175
  key: string;
@@ -127,9 +182,14 @@ interface Dataset {
127
182
  key: string;
128
183
  name: string;
129
184
  description: string | null;
130
- purpose: 'DATA' | 'RULES';
185
+ purpose: DatasetPurpose;
186
+ activeVersionId?: string | null;
131
187
  tcgplayerProductIdFieldKey: string | null;
132
- visibility: string;
188
+ visibility: DatasetVisibility;
189
+ posX?: number;
190
+ posY?: number;
191
+ sortOrder?: number;
192
+ archivedAt?: string | null;
133
193
  isArchived: boolean;
134
194
  publisher: PublisherRef | null;
135
195
  game: GameRef | null;
@@ -137,6 +197,8 @@ interface Dataset {
137
197
  createdAt: string;
138
198
  updatedAt: string;
139
199
  }
200
+ type DatasetPurpose = 'DATA' | 'RULES';
201
+ type DatasetVisibility = 'PRIVATE' | 'PUBLIC';
140
202
  interface DatasetRef {
141
203
  id: string;
142
204
  key: string;
@@ -154,6 +216,390 @@ interface DatasetRecord {
154
216
  createdAt: string;
155
217
  updatedAt: string;
156
218
  }
219
+ type ImportFormat = 'JSON' | 'CSV';
220
+ type ImportMode = 'STRICT' | 'CREATE';
221
+ type OnConflict = 'ERROR' | 'SKIP' | 'UPDATE';
222
+ type ImportJobStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED';
223
+ type ImportLogLevel = 'DEBUG' | 'INFO' | 'WARN' | 'ERROR';
224
+ type BulkInsertMode = 'FAIL_FAST' | 'COLLECT_ERRORS';
225
+ interface ImportOptions {
226
+ mode?: ImportMode;
227
+ onConflict?: OnConflict;
228
+ dryRun?: boolean;
229
+ validateLinks?: boolean;
230
+ }
231
+ interface CsvOptions {
232
+ delimiter?: string;
233
+ hasHeader?: boolean;
234
+ headerMapping?: Record<string, unknown>;
235
+ }
236
+ interface FieldMappingOverrideInput {
237
+ sourceField: string;
238
+ skip?: boolean;
239
+ targetType?: FieldType;
240
+ linkDatasetId?: string;
241
+ linkFieldKey?: string;
242
+ linkDirection?: string;
243
+ itemType?: string;
244
+ }
245
+ interface ImportJobAssetInput {
246
+ fileId: string;
247
+ filename: string;
248
+ }
249
+ interface ImportJobAsset {
250
+ fileId: string;
251
+ filename: string;
252
+ file: File;
253
+ }
254
+ interface ImportValidationError {
255
+ field: string;
256
+ message: string;
257
+ details?: Record<string, unknown> | null;
258
+ }
259
+ interface BulkRecordError {
260
+ datasetKey: string | null;
261
+ index: number;
262
+ errors: ImportValidationError[];
263
+ }
264
+ interface ImportStats {
265
+ total: number;
266
+ inserted: number;
267
+ updated: number;
268
+ skipped: number;
269
+ failed: number;
270
+ }
271
+ interface BulkImportResult {
272
+ inserted: DatasetRecord[];
273
+ updated: DatasetRecord[];
274
+ skipped: number;
275
+ errors: BulkRecordError[];
276
+ createdFields: ObjectField[];
277
+ stats: ImportStats;
278
+ }
279
+ interface BulkCreateResult {
280
+ inserted: DatasetRecord[];
281
+ errors: BulkRecordError[];
282
+ }
283
+ interface ImportJob {
284
+ id: string;
285
+ publisherId: string;
286
+ publisher: Publisher;
287
+ datasetId: string;
288
+ dataset: Dataset;
289
+ accountId: string;
290
+ status: ImportJobStatus;
291
+ mode: ImportMode;
292
+ onConflict: OnConflict;
293
+ format: ImportFormat;
294
+ fileId: string | null;
295
+ progress: number;
296
+ totalRecords: number | null;
297
+ processedRecords: number;
298
+ insertedCount: number;
299
+ updatedCount: number;
300
+ skippedCount: number;
301
+ failedCount: number;
302
+ createdFields: ObjectField[];
303
+ errors: BulkRecordError[];
304
+ errorMessage: string | null;
305
+ assets: ImportJobAsset[];
306
+ startedAt: string | null;
307
+ completedAt: string | null;
308
+ createdAt: string;
309
+ updatedAt: string;
310
+ lastCheckpointIndex: number;
311
+ isResumed: boolean;
312
+ imagesPending: number;
313
+ imagesCompleted: number;
314
+ imagesFailed: number;
315
+ }
316
+ type ImportJobConnection = Connection<ImportJob>;
317
+ interface ImportJobLog {
318
+ id: string;
319
+ importJobId: string;
320
+ level: ImportLogLevel;
321
+ message: string;
322
+ datasetKey: string | null;
323
+ recordIndex: number | null;
324
+ fieldKey: string | null;
325
+ details: Record<string, unknown> | null;
326
+ createdAt: string;
327
+ }
328
+ type ImportJobLogConnection = Connection<ImportJobLog>;
329
+ interface DatasetImportFromFileInput {
330
+ publisherId: string;
331
+ datasetKey: string;
332
+ fileId: string;
333
+ format: ImportFormat;
334
+ options: ImportOptions;
335
+ csvOptions?: CsvOptions;
336
+ fieldOverrides?: FieldMappingOverrideInput[];
337
+ assets?: ImportJobAssetInput[];
338
+ }
339
+ interface DatasetImportFromPayloadInput {
340
+ publisherId: string;
341
+ datasetKey: string;
342
+ data: Record<string, unknown> | unknown[];
343
+ options: ImportOptions;
344
+ assets?: ImportJobAssetInput[];
345
+ }
346
+ interface DatasetImportFromUrlInput {
347
+ publisherId: string;
348
+ datasetKey: string;
349
+ sourceUrl: string;
350
+ format: ImportFormat;
351
+ options: ImportOptions;
352
+ csvOptions?: CsvOptions;
353
+ fieldOverrides?: FieldMappingOverrideInput[];
354
+ assets?: ImportJobAssetInput[];
355
+ }
356
+ type DatasetImportRunInput = DatasetImportFromFileInput | DatasetImportFromPayloadInput | DatasetImportFromUrlInput;
357
+ interface DatasetImportPreviewInput {
358
+ publisherId: string;
359
+ datasetKey: string;
360
+ fileId?: string;
361
+ data?: Record<string, unknown> | unknown[];
362
+ sourceUrl?: string;
363
+ format?: ImportFormat;
364
+ }
365
+ interface DatasetImportValidateInput extends DatasetImportPreviewInput {
366
+ options: ImportOptions;
367
+ }
368
+ type FieldMappingStatus = 'MATCHED' | 'NOT_IN_SCHEMA' | 'TYPE_MISMATCH' | 'WILL_CREATE' | 'NEW';
369
+ interface InferredChildField {
370
+ key: string;
371
+ label: string;
372
+ type: FieldType;
373
+ required: boolean;
374
+ itemType: string | null;
375
+ children: InferredChildField[] | null;
376
+ }
377
+ interface FieldMapping {
378
+ sourceField: string;
379
+ targetField: string | null;
380
+ targetFieldLabel: string | null;
381
+ inferredType: FieldType | null;
382
+ inferredItemType: string | null;
383
+ inferredChildren: InferredChildField[] | null;
384
+ inferredLinkDataset: string | null;
385
+ inferredLinkFieldKey: string | null;
386
+ inferredLinkDirection: string | null;
387
+ targetFieldType: FieldType | null;
388
+ sampleValues: string[];
389
+ status: FieldMappingStatus;
390
+ }
391
+ type ImportWarningSeverity = 'INFO' | 'WARNING' | 'ERROR';
392
+ interface ImportWarning {
393
+ datasetKey: string | null;
394
+ field: string | null;
395
+ message: string;
396
+ severity: ImportWarningSeverity;
397
+ }
398
+ interface DatasetImportPreviewResult {
399
+ datasetKey: string;
400
+ datasetName: string | null;
401
+ datasetId: string | null;
402
+ exists: boolean;
403
+ recordCount: number;
404
+ fieldMappings: FieldMapping[];
405
+ warnings: ImportWarning[];
406
+ canProceed: boolean;
407
+ sampleRecords: Record<string, unknown>[];
408
+ availableDatasets: Dataset[];
409
+ }
410
+ interface GameImportPreviewInput {
411
+ gameId: string;
412
+ fileId?: string;
413
+ data?: Record<string, unknown> | unknown[];
414
+ sourceUrl?: string;
415
+ }
416
+ interface DatasetImportPreview {
417
+ datasetKey: string;
418
+ datasetName: string | null;
419
+ datasetId: string | null;
420
+ exists: boolean;
421
+ recordCount: number;
422
+ fieldMappings: FieldMapping[];
423
+ warnings: ImportWarning[];
424
+ sampleRecords: Record<string, unknown>[];
425
+ }
426
+ interface GameImportPreview {
427
+ datasets: DatasetImportPreview[];
428
+ importOrder: string[];
429
+ warnings: ImportWarning[];
430
+ canProceed: boolean;
431
+ }
432
+ interface GameImportFromFileInput {
433
+ gameId: string;
434
+ fileId: string;
435
+ options: ImportOptions;
436
+ skipDatasets?: string[];
437
+ datasetOverrides?: Record<string, unknown>;
438
+ assets?: ImportJobAssetInput[];
439
+ }
440
+ interface GameImportFromPayloadInput {
441
+ gameId: string;
442
+ data: Record<string, unknown> | unknown[];
443
+ options: ImportOptions;
444
+ skipDatasets?: string[];
445
+ datasetOverrides?: Record<string, unknown>;
446
+ assets?: ImportJobAssetInput[];
447
+ }
448
+ interface GameImportFromUrlInput {
449
+ gameId: string;
450
+ sourceUrl: string;
451
+ options: ImportOptions;
452
+ skipDatasets?: string[];
453
+ datasetOverrides?: Record<string, unknown>;
454
+ assets?: ImportJobAssetInput[];
455
+ }
456
+ type GameImportRunInput = GameImportFromFileInput | GameImportFromPayloadInput | GameImportFromUrlInput;
457
+ interface GameImportDatasetStatus {
458
+ datasetKey: string;
459
+ datasetId: string | null;
460
+ datasetName: string | null;
461
+ status: ImportJobStatus;
462
+ recordCount: number | null;
463
+ insertedCount: number;
464
+ updatedCount: number;
465
+ skippedCount: number;
466
+ failedCount: number;
467
+ errorMessage: string | null;
468
+ }
469
+ interface GameImportJob {
470
+ id: string;
471
+ publisherId: string;
472
+ publisher: Publisher;
473
+ gameId: string;
474
+ game: Game;
475
+ accountId: string;
476
+ status: ImportJobStatus;
477
+ mode: ImportMode;
478
+ onConflict: OnConflict;
479
+ fileId: string | null;
480
+ assets: ImportJobAsset[];
481
+ totalDatasets: number;
482
+ completedDatasets: number;
483
+ progress: number;
484
+ importOrder: string[];
485
+ datasetStatuses: GameImportDatasetStatus[];
486
+ errorMessage: string | null;
487
+ startedAt: string | null;
488
+ completedAt: string | null;
489
+ createdAt: string;
490
+ updatedAt: string;
491
+ completedDatasetKeys: string[];
492
+ currentDatasetKey: string | null;
493
+ lastCheckpointIndex: number;
494
+ isResumed: boolean;
495
+ imagesPending: number;
496
+ imagesCompleted: number;
497
+ imagesFailed: number;
498
+ phase: string | null;
499
+ linkBuildingDataset: string | null;
500
+ linkBuildingTotalDatasets: number;
501
+ linkBuildingCompletedDatasets: number;
502
+ linkBuildingProcessedRecords: number;
503
+ linkBuildingTotalRecords: number;
504
+ }
505
+ type GameImportJobConnection = Connection<GameImportJob>;
506
+ interface DatasetRecordsUpsertInput {
507
+ datasetId?: string;
508
+ publisherId?: string;
509
+ gameId?: string;
510
+ datasetKey?: string;
511
+ records?: Record<string, unknown>[];
512
+ fileId?: string;
513
+ sourceUrl?: string;
514
+ format?: ImportFormat;
515
+ options?: ImportOptions;
516
+ assets?: ImportJobAssetInput[];
517
+ }
518
+ interface DatasetRecordsUpsertPayload {
519
+ job: ImportJob | null;
520
+ dryRunResult: BulkImportResult | null;
521
+ }
522
+ type DatasetRecordDeleteJobStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED';
523
+ type DatasetRecordDeleteTargetType = 'RECORD_ID' | 'IDENTIFIER' | 'RECONCILE_MISSING_IDENTIFIER';
524
+ type DatasetRecordDeleteResultStatus = 'MATCHED' | 'MISSING' | 'DELETED' | 'BLOCKED' | 'ERROR';
525
+ interface DatasetRecordsDeleteInput {
526
+ datasetId?: string;
527
+ publisherId?: string;
528
+ gameId?: string;
529
+ datasetKey?: string;
530
+ recordIds?: string[];
531
+ identifiers?: string[];
532
+ reconcileIdentifiers?: string[];
533
+ dryRun?: boolean;
534
+ }
535
+ interface DatasetRecordDeleteJobResult {
536
+ target: string;
537
+ recordId: string | null;
538
+ identifier: string | null;
539
+ status: DatasetRecordDeleteResultStatus;
540
+ message: string | null;
541
+ }
542
+ interface DatasetRecordDeleteJob {
543
+ id: string;
544
+ publisherId: string;
545
+ publisher: Publisher;
546
+ datasetId: string;
547
+ dataset: Dataset;
548
+ accountId: string;
549
+ status: DatasetRecordDeleteJobStatus;
550
+ targetType: DatasetRecordDeleteTargetType;
551
+ dryRun: boolean;
552
+ targets: string[];
553
+ progress: number;
554
+ totalTargets: number;
555
+ processedTargets: number;
556
+ matchedCount: number;
557
+ deletedCount: number;
558
+ missingCount: number;
559
+ blockedCount: number;
560
+ failedCount: number;
561
+ results: DatasetRecordDeleteJobResult[];
562
+ errorMessage: string | null;
563
+ startedAt: string | null;
564
+ completedAt: string | null;
565
+ createdAt: string;
566
+ updatedAt: string;
567
+ }
568
+ type DatasetRecordDeleteJobConnection = Connection<DatasetRecordDeleteJob>;
569
+ type ExportFormat = 'JSON' | 'CSV';
570
+ type ExportJobStatus = 'PENDING' | 'PROCESSING' | 'COMPLETED' | 'FAILED';
571
+ interface DatasetExportInput {
572
+ datasetId?: string;
573
+ publisherId?: string;
574
+ gameId?: string;
575
+ datasetKey?: string;
576
+ format?: ExportFormat;
577
+ filter?: FilterCondition;
578
+ }
579
+ interface ExportJob {
580
+ id: string;
581
+ publisherId: string;
582
+ publisher: Publisher;
583
+ datasetId: string;
584
+ dataset: Dataset;
585
+ accountId: string;
586
+ status: ExportJobStatus;
587
+ format: ExportFormat;
588
+ filter: FilterCondition | null;
589
+ totalRecords: number | null;
590
+ processedRecords: number;
591
+ progress: number;
592
+ fileId: string | null;
593
+ downloadUrl: string | null;
594
+ downloadExpiresAt: string | null;
595
+ errorMessage: string | null;
596
+ startedAt: string | null;
597
+ completedAt: string | null;
598
+ createdAt: string;
599
+ updatedAt: string;
600
+ lastCheckpointIndex: number;
601
+ }
602
+ type ExportJobConnection = Connection<ExportJob>;
157
603
  interface TCGPlayerPricing {
158
604
  productId: string;
159
605
  prices: TCGPlayerPrice[];
@@ -800,7 +1246,42 @@ interface ResolvedLink {
800
1246
  values: string[];
801
1247
  records: (ResolvedRecord | null)[];
802
1248
  }
803
- type FieldType = 'STRING' | 'INTEGER' | 'FLOAT' | 'BOOLEAN' | 'DATE' | 'DATETIME' | 'URL' | 'IMAGE' | 'LINK' | 'ARRAY' | 'HASH';
1249
+ type FieldType = 'STRING' | 'INT' | 'INTEGER' | 'FLOAT' | 'BOOL' | 'BOOLEAN' | 'UUID' | 'DATE' | 'DATETIME' | 'URL' | 'FILE' | 'IMAGE' | 'LINK' | 'ARRAY' | 'HASH';
1250
+ interface ObjectField {
1251
+ id: string;
1252
+ objectTypeId: string;
1253
+ key: string;
1254
+ label: string;
1255
+ dataType: FieldType;
1256
+ isRequired: boolean;
1257
+ isFilterable: boolean;
1258
+ isSearchable: boolean;
1259
+ isIdentifier: boolean;
1260
+ sortOrder: number;
1261
+ description: string | null;
1262
+ placeholder: string | null;
1263
+ displayFormat: string | null;
1264
+ semanticType: string | null;
1265
+ isHidden: boolean;
1266
+ isComputed: boolean;
1267
+ isSystemField: boolean;
1268
+ defaultValue: unknown;
1269
+ allowedValues: unknown;
1270
+ minLength: number | null;
1271
+ maxLength: number | null;
1272
+ minValue: number | null;
1273
+ maxValue: number | null;
1274
+ pattern: string | null;
1275
+ isUnique: boolean;
1276
+ itemType: string | null;
1277
+ linkDatasetId: string | null;
1278
+ linkFieldKey: string | null;
1279
+ linkAlias: string | null;
1280
+ linkDirection: string | null;
1281
+ parentFieldId: string | null;
1282
+ createdAt: string;
1283
+ updatedAt: string;
1284
+ }
804
1285
  interface FieldInfo {
805
1286
  key: string;
806
1287
  label: string | null;
@@ -810,10 +1291,28 @@ interface FieldInfo {
810
1291
  filterable: boolean;
811
1292
  searchable: boolean;
812
1293
  isIdentifier: boolean;
813
- itemType: FieldType | null;
1294
+ sortOrder: number;
1295
+ itemType: string | null;
1296
+ linkDatasetId: string | null;
1297
+ linkDatasetKey: string | null;
1298
+ linkDatasetName: string | null;
1299
+ linkFieldKey: string | null;
1300
+ linkAlias: string | null;
1301
+ linkDirection: string | null;
814
1302
  displayFormat: string | null;
815
1303
  semanticType: string | null;
816
- allowedValues: string[] | null;
1304
+ placeholder: string | null;
1305
+ isHidden: boolean;
1306
+ isComputed: boolean;
1307
+ isSystemField: boolean;
1308
+ defaultValue: unknown;
1309
+ allowedValues: unknown;
1310
+ minLength: number | null;
1311
+ maxLength: number | null;
1312
+ minValue: number | null;
1313
+ maxValue: number | null;
1314
+ pattern: string | null;
1315
+ isUnique: boolean;
817
1316
  nestedFields: FieldInfo[] | null;
818
1317
  }
819
1318
  interface LinkFieldInfo {
@@ -822,6 +1321,10 @@ interface LinkFieldInfo {
822
1321
  targetDatasetKey: string;
823
1322
  targetDatasetName: string | null;
824
1323
  targetDatasetId: string;
1324
+ targetFieldKey: string | null;
1325
+ linkAlias: string | null;
1326
+ linkDirection: string | null;
1327
+ isArray: boolean;
825
1328
  }
826
1329
  interface DatasetSchema {
827
1330
  fields: FieldInfo[];
@@ -1202,6 +1705,86 @@ interface SearchRecordsParams {
1202
1705
  validateSchema?: boolean;
1203
1706
  includePricing?: boolean;
1204
1707
  }
1708
+ interface ListGamesParams {
1709
+ publisherId: string;
1710
+ first?: number;
1711
+ after?: string;
1712
+ includeArchived?: boolean;
1713
+ }
1714
+ interface GameLookupParams {
1715
+ id?: string;
1716
+ publisherId?: string;
1717
+ publisherSlug?: string;
1718
+ gameKey?: string;
1719
+ gameSlug?: string;
1720
+ }
1721
+ interface ListDatasetsParams {
1722
+ publisherId: string;
1723
+ gameId?: string;
1724
+ first?: number;
1725
+ after?: string;
1726
+ includeArchived?: boolean;
1727
+ purpose?: 'DATA' | 'RULES';
1728
+ }
1729
+ interface DatasetLookupParams {
1730
+ id?: string;
1731
+ publisherId?: string;
1732
+ gameId?: string;
1733
+ datasetKey?: string;
1734
+ }
1735
+ interface ListDatasetRecordsParams {
1736
+ datasetId: string;
1737
+ filter?: FilterCondition;
1738
+ orderBy?: {
1739
+ field: string;
1740
+ direction?: 'ASC' | 'DESC';
1741
+ };
1742
+ first?: number;
1743
+ after?: string;
1744
+ last?: number;
1745
+ before?: string;
1746
+ validateSchema?: boolean;
1747
+ }
1748
+ interface DatasetRecordLookupParams {
1749
+ id?: string;
1750
+ datasetId?: string;
1751
+ identifier?: string;
1752
+ publisherSlug?: string;
1753
+ gameKey?: string;
1754
+ datasetKey?: string;
1755
+ recordId?: string;
1756
+ resolveLinks?: string[];
1757
+ validateSchema?: boolean;
1758
+ includePricing?: boolean;
1759
+ }
1760
+ interface ListImportJobsParams {
1761
+ publisherId: string;
1762
+ datasetId?: string;
1763
+ status?: ImportJobStatus;
1764
+ first?: number;
1765
+ after?: string;
1766
+ }
1767
+ interface ListGameImportJobsParams {
1768
+ gameId: string;
1769
+ status?: ImportJobStatus;
1770
+ first?: number;
1771
+ after?: string;
1772
+ }
1773
+ interface ListDatasetRecordDeleteJobsParams {
1774
+ publisherId: string;
1775
+ datasetId?: string;
1776
+ status?: DatasetRecordDeleteJobStatus;
1777
+ first?: number;
1778
+ after?: string;
1779
+ }
1780
+ interface ListExportJobsParams {
1781
+ publisherId: string;
1782
+ gameId?: string;
1783
+ datasetId?: string;
1784
+ status?: ExportJobStatus;
1785
+ first?: number;
1786
+ after?: string;
1787
+ }
1205
1788
  interface ListDecksParams {
1206
1789
  first?: number;
1207
1790
  after?: string;
@@ -1234,7 +1817,8 @@ interface PublicDecksParams {
1234
1817
  after?: string;
1235
1818
  }
1236
1819
  interface ListDeckImportFormatsParams {
1237
- gameId: string;
1820
+ publisherId?: string;
1821
+ gameId?: string;
1238
1822
  includeArchived?: boolean;
1239
1823
  first?: number;
1240
1824
  after?: string;
@@ -1266,6 +1850,20 @@ declare const QueryBuilder: {
1266
1850
  fetchGames(): {
1267
1851
  query: string;
1268
1852
  };
1853
+ listGames(params: ListGamesParams): {
1854
+ query: string;
1855
+ variables: Record<string, unknown>;
1856
+ };
1857
+ game(params: GameLookupParams): {
1858
+ query: string;
1859
+ variables: Record<string, unknown>;
1860
+ };
1861
+ createGame(): {
1862
+ query: string;
1863
+ };
1864
+ updateGame(): {
1865
+ query: string;
1866
+ };
1269
1867
  searchDatasets(params?: SearchDatasetsParams): {
1270
1868
  query: string;
1271
1869
  variables: Record<string, unknown>;
@@ -1279,6 +1877,14 @@ declare const QueryBuilder: {
1279
1877
  fetchDatasets(): {
1280
1878
  query: string;
1281
1879
  };
1880
+ listDatasets(params: ListDatasetsParams): {
1881
+ query: string;
1882
+ variables: Record<string, unknown>;
1883
+ };
1884
+ dataset(params: DatasetLookupParams): {
1885
+ query: string;
1886
+ variables: Record<string, unknown>;
1887
+ };
1282
1888
  searchRecords(params: SearchRecordsParams): {
1283
1889
  query: string;
1284
1890
  variables: Record<string, unknown>;
@@ -1295,6 +1901,112 @@ declare const QueryBuilder: {
1295
1901
  fetchRecords(params?: RecordFieldOptions): {
1296
1902
  query: string;
1297
1903
  };
1904
+ listDatasetRecords(params: ListDatasetRecordsParams): {
1905
+ query: string;
1906
+ variables: Record<string, unknown>;
1907
+ };
1908
+ datasetRecord(params: DatasetRecordLookupParams): {
1909
+ query: string;
1910
+ variables: Record<string, unknown>;
1911
+ };
1912
+ upsertDatasetRecords(): {
1913
+ query: string;
1914
+ };
1915
+ deleteDatasetRecords(): {
1916
+ query: string;
1917
+ };
1918
+ datasetRecordDeleteJob(): {
1919
+ query: string;
1920
+ };
1921
+ datasetRecordDeleteJobs(params: ListDatasetRecordDeleteJobsParams): {
1922
+ query: string;
1923
+ variables: Record<string, unknown>;
1924
+ };
1925
+ datasetImportPreview(): {
1926
+ query: string;
1927
+ };
1928
+ datasetImportValidate(): {
1929
+ query: string;
1930
+ };
1931
+ datasetImportFromFile(): {
1932
+ query: string;
1933
+ };
1934
+ datasetImportFromPayload(): {
1935
+ query: string;
1936
+ };
1937
+ datasetImportFromUrl(): {
1938
+ query: string;
1939
+ };
1940
+ importJob(): {
1941
+ query: string;
1942
+ };
1943
+ importJobs(params: ListImportJobsParams): {
1944
+ query: string;
1945
+ variables: Record<string, unknown>;
1946
+ };
1947
+ importJobCancel(): {
1948
+ query: string;
1949
+ };
1950
+ importJobLogs(params: {
1951
+ importJobId: string;
1952
+ level?: string;
1953
+ datasetKey?: string;
1954
+ first?: number;
1955
+ after?: string;
1956
+ }): {
1957
+ query: string;
1958
+ variables: Record<string, unknown>;
1959
+ };
1960
+ gameImportPreview(): {
1961
+ query: string;
1962
+ };
1963
+ gameImportFromFile(): {
1964
+ query: string;
1965
+ };
1966
+ gameImportFromPayload(): {
1967
+ query: string;
1968
+ };
1969
+ gameImportFromUrl(): {
1970
+ query: string;
1971
+ };
1972
+ gameImportJob(): {
1973
+ query: string;
1974
+ };
1975
+ gameImportJobs(params: ListGameImportJobsParams): {
1976
+ query: string;
1977
+ variables: Record<string, unknown>;
1978
+ };
1979
+ gameImportJobCancel(): {
1980
+ query: string;
1981
+ };
1982
+ file(): {
1983
+ query: string;
1984
+ };
1985
+ fileUploadRequest(): {
1986
+ query: string;
1987
+ };
1988
+ fileUploadConfirm(): {
1989
+ query: string;
1990
+ };
1991
+ fileDelete(): {
1992
+ query: string;
1993
+ };
1994
+ exportJob(): {
1995
+ query: string;
1996
+ };
1997
+ exportJobs(params: ListExportJobsParams): {
1998
+ query: string;
1999
+ variables: Record<string, unknown>;
2000
+ };
2001
+ datasetExport(): {
2002
+ query: string;
2003
+ };
2004
+ exportJobCancel(): {
2005
+ query: string;
2006
+ };
2007
+ exportJobRefreshUrl(): {
2008
+ query: string;
2009
+ };
1298
2010
  listMyDecks(params?: ListDecksParams): {
1299
2011
  query: string;
1300
2012
  variables: Record<string, unknown>;
@@ -1530,6 +2242,21 @@ declare const QueryBuilder: {
1530
2242
  myDeckApiApplicationAccessesVariables(applicationId?: string): Record<string, unknown>;
1531
2243
  deckApiApplicationAccessGrantVariables(input: DeckAPIApplicationAccessGrantInput): Record<string, unknown>;
1532
2244
  deckApiApplicationAccessRevokeVariables(deckId: string, apiApplicationId: string): Record<string, unknown>;
2245
+ gameCreateVariables(input: GameCreateInput): Record<string, unknown>;
2246
+ gameUpdateVariables(id: string, input: GameUpdateInput): Record<string, unknown>;
2247
+ datasetImportPreviewVariables(input: DatasetImportPreviewInput): Record<string, unknown>;
2248
+ datasetImportValidateVariables(input: DatasetImportValidateInput): Record<string, unknown>;
2249
+ datasetImportFromFileVariables(input: DatasetImportFromFileInput): Record<string, unknown>;
2250
+ datasetImportFromPayloadVariables(input: DatasetImportFromPayloadInput): Record<string, unknown>;
2251
+ datasetImportFromUrlVariables(input: DatasetImportFromUrlInput): Record<string, unknown>;
2252
+ gameImportPreviewVariables(input: GameImportPreviewInput): Record<string, unknown>;
2253
+ gameImportFromFileVariables(input: GameImportFromFileInput): Record<string, unknown>;
2254
+ gameImportFromPayloadVariables(input: GameImportFromPayloadInput): Record<string, unknown>;
2255
+ gameImportFromUrlVariables(input: GameImportFromUrlInput): Record<string, unknown>;
2256
+ datasetRecordsUpsertVariables(input: DatasetRecordsUpsertInput): Record<string, unknown>;
2257
+ datasetRecordsDeleteVariables(input: DatasetRecordsDeleteInput): Record<string, unknown>;
2258
+ fileUploadRequestVariables(input: FileUploadInput): Record<string, unknown>;
2259
+ datasetExportVariables(input: DatasetExportInput): Record<string, unknown>;
1533
2260
  fetchMe(): {
1534
2261
  query: string;
1535
2262
  };
@@ -1665,4 +2392,4 @@ declare class Collection<T> implements AsyncIterable<T> {
1665
2392
  each(): AsyncIterable<T>;
1666
2393
  }
1667
2394
 
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 };
2395
+ export { type APIAccount, type APIApplication, type APIKeyInfo, type AppDecksFilterInput, type AppDecksParams, AuthenticationError, type BulkCreateResult, type BulkImportResult, type BulkInsertMode, type BulkRecordError, type Cache, type CardDBConfig, CardDBError, Collection, type Connection, ConnectionError, type CsvOptions, type Dataset, type DatasetExportInput, type DatasetImportFromFileInput, type DatasetImportFromPayloadInput, type DatasetImportFromUrlInput, type DatasetImportPreview, type DatasetImportPreviewInput, type DatasetImportPreviewResult, type DatasetImportRunInput, type DatasetImportValidateInput, type DatasetPurpose, type DatasetRecord, type DatasetRecordDeleteJob, type DatasetRecordDeleteJobConnection, type DatasetRecordDeleteJobResult, type DatasetRecordDeleteJobStatus, type DatasetRecordDeleteResultStatus, type DatasetRecordDeleteTargetType, type DatasetRecordsDeleteInput, type DatasetRecordsUpsertInput, type DatasetRecordsUpsertPayload, type DatasetRef, type DatasetSchema, type DatasetVisibility, 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 ExportFormat, type ExportJob, type ExportJobConnection, type ExportJobStatus, type FieldInfo, type FieldMapping, type FieldMappingOverrideInput, type FieldMappingStatus, type FieldType, type File, type FileInfo, type FileStatus, type FileUploadInput, FilterBuilder, type FilterBuilderInterface, type FilterCondition, type FilterInput, type FilterOperatorValue, type FilterValue, type Game, type GameCreateInput, type GameImportDatasetStatus, type GameImportFromFileInput, type GameImportFromPayloadInput, type GameImportFromUrlInput, type GameImportJob, type GameImportJobConnection, type GameImportPreview, type GameImportPreviewInput, type GameImportRunInput, type GameRef, type GameUpdateInput, type GameVisibility, GraphQLError, type GraphQLErrorInfo, type HydrateDeckEntryInput, type HydratedDeckEntry, type ImportFormat, type ImportJob, type ImportJobAsset, type ImportJobAssetInput, type ImportJobConnection, type ImportJobLog, type ImportJobLogConnection, type ImportJobStatus, type ImportLogLevel, type ImportMode, type ImportOptions, type ImportStats, type ImportValidationError, type ImportWarning, type ImportWarningSeverity, type InferredChildField, type LinkFieldInfo, LinkResolutionError, type LinkResolutionFailure, type ListDeckImportFormatsParams, type ListDeckVersionsParams, type ListDecksParams, type LogLevel, type Logger, type NextPageLoader, NotFoundError, type ObjectField, type OnConflict, type PageInfo, type PresignedUpload, 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 };