@carddb/core 0.5.1 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +89 -6
- package/dist/index.d.ts +89 -6
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1333,6 +1333,89 @@ interface DeckSectionDefinition {
|
|
|
1333
1333
|
metadata: Record<string, unknown>;
|
|
1334
1334
|
}
|
|
1335
1335
|
type RulesetVersionStatus = 'DRAFT' | 'ACTIVE' | 'SUPERSEDED';
|
|
1336
|
+
/** Extensible rules for one deck section in a canonical ruleset payload. */
|
|
1337
|
+
interface RulesetSectionRule {
|
|
1338
|
+
key: string;
|
|
1339
|
+
label?: string;
|
|
1340
|
+
description?: string;
|
|
1341
|
+
order?: number;
|
|
1342
|
+
default?: boolean;
|
|
1343
|
+
aliases?: string[];
|
|
1344
|
+
minCards?: number;
|
|
1345
|
+
maxCards?: number;
|
|
1346
|
+
excludedFromDeckSize?: boolean;
|
|
1347
|
+
legalCardTypes?: string[];
|
|
1348
|
+
severity?: DeckValidationSeverity;
|
|
1349
|
+
[key: string]: unknown;
|
|
1350
|
+
}
|
|
1351
|
+
/** Supported player-count fields plus format-specific player configuration. */
|
|
1352
|
+
interface RulesetPlayerCountRules {
|
|
1353
|
+
min?: number;
|
|
1354
|
+
max?: number;
|
|
1355
|
+
[key: string]: unknown;
|
|
1356
|
+
}
|
|
1357
|
+
/** Fixed opening-hand fields. Dynamic formats can use additional policy fields on setup. */
|
|
1358
|
+
interface RulesetOpeningHandRules {
|
|
1359
|
+
size: number;
|
|
1360
|
+
sourceSection?: string;
|
|
1361
|
+
countsAsDraw?: boolean;
|
|
1362
|
+
[key: string]: unknown;
|
|
1363
|
+
}
|
|
1364
|
+
/** Common game setup fields. Additional setup rules are preserved. */
|
|
1365
|
+
interface RulesetSetupRules {
|
|
1366
|
+
openingHand?: RulesetOpeningHandRules;
|
|
1367
|
+
startingLife?: number;
|
|
1368
|
+
shuffleDeck?: boolean;
|
|
1369
|
+
[key: string]: unknown;
|
|
1370
|
+
}
|
|
1371
|
+
/** Common mulligan fields. The kind and extra fields describe game-specific procedures. */
|
|
1372
|
+
interface RulesetMulliganRules {
|
|
1373
|
+
kind?: string;
|
|
1374
|
+
maxUses?: number;
|
|
1375
|
+
handSizeDeltaPerUse?: number;
|
|
1376
|
+
[key: string]: unknown;
|
|
1377
|
+
}
|
|
1378
|
+
/** Common per-turn draw fields. Additional turn rules are preserved. */
|
|
1379
|
+
interface RulesetTurnRules {
|
|
1380
|
+
drawCount?: number;
|
|
1381
|
+
startingPlayerDrawsOnFirstTurn?: boolean;
|
|
1382
|
+
[key: string]: unknown;
|
|
1383
|
+
}
|
|
1384
|
+
/** One game outcome, such as reaching a score threshold or drawing from an empty deck. */
|
|
1385
|
+
interface RulesetOutcomeRule {
|
|
1386
|
+
kind: string;
|
|
1387
|
+
result: string;
|
|
1388
|
+
[key: string]: unknown;
|
|
1389
|
+
}
|
|
1390
|
+
/** Game setup, turn, mulligan, and outcome configuration. */
|
|
1391
|
+
interface RulesetGameplayRules {
|
|
1392
|
+
players?: RulesetPlayerCountRules;
|
|
1393
|
+
setup?: RulesetSetupRules;
|
|
1394
|
+
mulligan?: RulesetMulliganRules;
|
|
1395
|
+
turn?: RulesetTurnRules;
|
|
1396
|
+
outcomes?: RulesetOutcomeRule[];
|
|
1397
|
+
[key: string]: unknown;
|
|
1398
|
+
}
|
|
1399
|
+
/** Match-level configuration. Additional profiles and format-specific structures are preserved. */
|
|
1400
|
+
interface RulesetMatchRules {
|
|
1401
|
+
gamesToWin?: number;
|
|
1402
|
+
sideboardingAllowed?: boolean;
|
|
1403
|
+
timeLimitMinutes?: number;
|
|
1404
|
+
[key: string]: unknown;
|
|
1405
|
+
}
|
|
1406
|
+
/**
|
|
1407
|
+
* Canonical, forward-compatible ruleset JSON.
|
|
1408
|
+
*
|
|
1409
|
+
* The known gameplay and match fields are typed while index signatures preserve
|
|
1410
|
+
* game-specific extensions and future schema additions.
|
|
1411
|
+
*/
|
|
1412
|
+
interface RulesetRules {
|
|
1413
|
+
schemaVersion?: number;
|
|
1414
|
+
sections?: RulesetSectionRule[];
|
|
1415
|
+
gameplay?: RulesetGameplayRules;
|
|
1416
|
+
match?: RulesetMatchRules;
|
|
1417
|
+
[key: string]: unknown;
|
|
1418
|
+
}
|
|
1336
1419
|
interface Ruleset {
|
|
1337
1420
|
id: string;
|
|
1338
1421
|
gameId: string;
|
|
@@ -1354,7 +1437,7 @@ interface RulesetVersion {
|
|
|
1354
1437
|
rulesetId: string;
|
|
1355
1438
|
versionLabel: string;
|
|
1356
1439
|
status: RulesetVersionStatus;
|
|
1357
|
-
rules:
|
|
1440
|
+
rules: RulesetRules;
|
|
1358
1441
|
sectionDefinitions: DeckSectionDefinition[];
|
|
1359
1442
|
cardDatasetId: string | null;
|
|
1360
1443
|
cardDatasetVersionId: string | null;
|
|
@@ -1379,7 +1462,7 @@ interface DeckValidationRules {
|
|
|
1379
1462
|
rulesetVersionId: string;
|
|
1380
1463
|
rulesetKey: string;
|
|
1381
1464
|
rulesetVersionLabel: string;
|
|
1382
|
-
rules:
|
|
1465
|
+
rules: RulesetRules;
|
|
1383
1466
|
sections: DeckSectionDefinition[];
|
|
1384
1467
|
}
|
|
1385
1468
|
interface RulesetValidationImpact {
|
|
@@ -1409,7 +1492,7 @@ interface RulesetVersionDraftImportPreview {
|
|
|
1409
1492
|
sourceDatasetVersionId: string | null;
|
|
1410
1493
|
sourceDatasetRecordId: string;
|
|
1411
1494
|
sourceRecordIdentifier: string;
|
|
1412
|
-
rules:
|
|
1495
|
+
rules: RulesetRules;
|
|
1413
1496
|
sectionDefinitions: DeckSectionDefinition[];
|
|
1414
1497
|
rulesFingerprint: string;
|
|
1415
1498
|
summary: string;
|
|
@@ -1432,7 +1515,7 @@ interface RulesetUpdateInput {
|
|
|
1432
1515
|
}
|
|
1433
1516
|
interface RulesetVersionDraftCreateInput {
|
|
1434
1517
|
versionLabel: string;
|
|
1435
|
-
rules:
|
|
1518
|
+
rules: RulesetRules;
|
|
1436
1519
|
cardDatasetId?: string;
|
|
1437
1520
|
cardDatasetVersionId?: string;
|
|
1438
1521
|
effectiveAt?: string;
|
|
@@ -1450,7 +1533,7 @@ interface RulesetVersionDraftImportFromDatasetRecordInput {
|
|
|
1450
1533
|
}
|
|
1451
1534
|
interface RulesetVersionDraftUpdateInput {
|
|
1452
1535
|
versionLabel?: string;
|
|
1453
|
-
rules?:
|
|
1536
|
+
rules?: RulesetRules;
|
|
1454
1537
|
cardDatasetId?: string;
|
|
1455
1538
|
cardDatasetVersionId?: string;
|
|
1456
1539
|
effectiveAt?: string;
|
|
@@ -2927,4 +3010,4 @@ declare class Collection<T> implements AsyncIterable<T> {
|
|
|
2927
3010
|
each(): AsyncIterable<T>;
|
|
2928
3011
|
}
|
|
2929
3012
|
|
|
2930
|
-
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 ConfirmScanUploadInput, type Connection, ConnectionError, type CreateScanJobInput, type CreateScanUploadSessionInput, type CsvOptions, type Dataset, type DatasetExportInput, type DatasetFilterValue, type DatasetFilterValueConnection, type DatasetFilterValueEdge, 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 DeckAppAccessRetention, type DeckClaimInput, type DeckCollaborator, type DeckCollaboratorRole, type DeckCopyInput, type DeckCopyPayload, type DeckCreateInput, type DeckDiff, type DeckDiscoverability, 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 DeckImportCandidateSelectionInput, 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 DeckPublishInput, type DeckPublishPayload, type DeckPublishedVersionSelector, type DeckReadState, type DeckRemoveInvalidEntriesInput, type DeckRepresentation, type DeckSectionDefinition, type DeckSectionDefinitionsParams, type DeckState, type DeckToken, type DeckTokenExchangeInput, type DeckTokenExchangePayload, type DeckTokenIssuer, type DeckTokenIssuerCreateInput, type DeckTokenIssuerSigningKeyInput, type DeckTokenScope, type DeckTokenSigningAlgorithm, type DeckTransferOwnershipInput, type DeckUpdateInput, type DeckUpsertByExternalRefInput, type DeckUpsertByExternalRefPayload, type DeckValidateInput, type DeckValidatedAgainst, type DeckValidation, type DeckValidationAffectedEntry, type DeckValidationIssue, type DeckValidationRules, 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 GameScanRegion, 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 ListPublicRulesetsParams, type ListRulesetVersionsParams, type ListRulesetsParams, type LogLevel, type Logger, type NextPageLoader, NotFoundError, type ObjectField, type OnConflict, type PageInfo, type PresignedUpload, type PreviewScanTemplateInput, type PublicDecksFilterInput, type PublicDecksParams, type Publisher, type PublisherRef, type PublisherStatus, QueryBuilder, RateLimitError, type RateLimitInfo, type ResolveScanTemplateInput, type ResolvedLink, type ResourceType, RestrictedError, type Ruleset, type RulesetConnection, type RulesetCreateInput, type RulesetLookupParams, type RulesetUpdateInput, type RulesetValidationImpact, type RulesetValidationImpactDeck, type RulesetValidationImpactParams, type RulesetValidationRulesParams, type RulesetVersion, type RulesetVersionConnection, type RulesetVersionDraftCreateInput, type RulesetVersionDraftImportFromDatasetRecordInput, type RulesetVersionDraftImportPreview, type RulesetVersionDraftUpdateInput, type RulesetVersionPublishInput, type RulesetVersionStatus, type SaveScanTemplateInput, type ScanBestMatch, type ScanCandidate, type ScanFeatureVersionMetrics, type ScanFeedbackMetrics, type ScanFeedbackPayload, type ScanJob, type ScanJobError, type ScanJobMetrics, type ScanJobPayload, type ScanJobStatus, type ScanMetrics, type ScanMetricsInput, type ScanStageMetrics, type ScanTemplate, type ScanTemplateList, type ScanTemplatePayload, type ScanTemplatePreview, type ScanTemplateRegion, type ScanTemplateRegionInput, type ScanTemplateRegionPreview, type ScanTemplateResolution, type ScanTemplateWarning, type ScanTemplatesInput, type ScanWebhookState, type SearchDatasetsParams, type SearchGamesParams, type SearchPublishersParams, type SearchRecordsParams, ServerError, type SubmitScanFeedbackInput, type TCGPlayerPrice, type TCGPlayerPricing, TimeoutError, type UploadPurpose, ValidationError, type ViewerDecksFilterInput, type ViewerDecksParams, contains, eq, gt, gte, ilike, isNotNull, isNull, like, lt, lte, neq, notWithin, resolveFilter, within };
|
|
3013
|
+
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 ConfirmScanUploadInput, type Connection, ConnectionError, type CreateScanJobInput, type CreateScanUploadSessionInput, type CsvOptions, type Dataset, type DatasetExportInput, type DatasetFilterValue, type DatasetFilterValueConnection, type DatasetFilterValueEdge, 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 DeckAppAccessRetention, type DeckClaimInput, type DeckCollaborator, type DeckCollaboratorRole, type DeckCopyInput, type DeckCopyPayload, type DeckCreateInput, type DeckDiff, type DeckDiscoverability, 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 DeckImportCandidateSelectionInput, 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 DeckPublishInput, type DeckPublishPayload, type DeckPublishedVersionSelector, type DeckReadState, type DeckRemoveInvalidEntriesInput, type DeckRepresentation, type DeckSectionDefinition, type DeckSectionDefinitionsParams, type DeckState, type DeckToken, type DeckTokenExchangeInput, type DeckTokenExchangePayload, type DeckTokenIssuer, type DeckTokenIssuerCreateInput, type DeckTokenIssuerSigningKeyInput, type DeckTokenScope, type DeckTokenSigningAlgorithm, type DeckTransferOwnershipInput, type DeckUpdateInput, type DeckUpsertByExternalRefInput, type DeckUpsertByExternalRefPayload, type DeckValidateInput, type DeckValidatedAgainst, type DeckValidation, type DeckValidationAffectedEntry, type DeckValidationIssue, type DeckValidationRules, 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 GameScanRegion, 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 ListPublicRulesetsParams, type ListRulesetVersionsParams, type ListRulesetsParams, type LogLevel, type Logger, type NextPageLoader, NotFoundError, type ObjectField, type OnConflict, type PageInfo, type PresignedUpload, type PreviewScanTemplateInput, type PublicDecksFilterInput, type PublicDecksParams, type Publisher, type PublisherRef, type PublisherStatus, QueryBuilder, RateLimitError, type RateLimitInfo, type ResolveScanTemplateInput, type ResolvedLink, type ResourceType, RestrictedError, type Ruleset, type RulesetConnection, type RulesetCreateInput, type RulesetGameplayRules, type RulesetLookupParams, type RulesetMatchRules, type RulesetMulliganRules, type RulesetOpeningHandRules, type RulesetOutcomeRule, type RulesetPlayerCountRules, type RulesetRules, type RulesetSectionRule, type RulesetSetupRules, type RulesetTurnRules, type RulesetUpdateInput, type RulesetValidationImpact, type RulesetValidationImpactDeck, type RulesetValidationImpactParams, type RulesetValidationRulesParams, type RulesetVersion, type RulesetVersionConnection, type RulesetVersionDraftCreateInput, type RulesetVersionDraftImportFromDatasetRecordInput, type RulesetVersionDraftImportPreview, type RulesetVersionDraftUpdateInput, type RulesetVersionPublishInput, type RulesetVersionStatus, type SaveScanTemplateInput, type ScanBestMatch, type ScanCandidate, type ScanFeatureVersionMetrics, type ScanFeedbackMetrics, type ScanFeedbackPayload, type ScanJob, type ScanJobError, type ScanJobMetrics, type ScanJobPayload, type ScanJobStatus, type ScanMetrics, type ScanMetricsInput, type ScanStageMetrics, type ScanTemplate, type ScanTemplateList, type ScanTemplatePayload, type ScanTemplatePreview, type ScanTemplateRegion, type ScanTemplateRegionInput, type ScanTemplateRegionPreview, type ScanTemplateResolution, type ScanTemplateWarning, type ScanTemplatesInput, type ScanWebhookState, type SearchDatasetsParams, type SearchGamesParams, type SearchPublishersParams, type SearchRecordsParams, ServerError, type SubmitScanFeedbackInput, type TCGPlayerPrice, type TCGPlayerPricing, TimeoutError, type UploadPurpose, ValidationError, type ViewerDecksFilterInput, type ViewerDecksParams, contains, eq, gt, gte, ilike, isNotNull, isNull, like, lt, lte, neq, notWithin, resolveFilter, within };
|
package/dist/index.d.ts
CHANGED
|
@@ -1333,6 +1333,89 @@ interface DeckSectionDefinition {
|
|
|
1333
1333
|
metadata: Record<string, unknown>;
|
|
1334
1334
|
}
|
|
1335
1335
|
type RulesetVersionStatus = 'DRAFT' | 'ACTIVE' | 'SUPERSEDED';
|
|
1336
|
+
/** Extensible rules for one deck section in a canonical ruleset payload. */
|
|
1337
|
+
interface RulesetSectionRule {
|
|
1338
|
+
key: string;
|
|
1339
|
+
label?: string;
|
|
1340
|
+
description?: string;
|
|
1341
|
+
order?: number;
|
|
1342
|
+
default?: boolean;
|
|
1343
|
+
aliases?: string[];
|
|
1344
|
+
minCards?: number;
|
|
1345
|
+
maxCards?: number;
|
|
1346
|
+
excludedFromDeckSize?: boolean;
|
|
1347
|
+
legalCardTypes?: string[];
|
|
1348
|
+
severity?: DeckValidationSeverity;
|
|
1349
|
+
[key: string]: unknown;
|
|
1350
|
+
}
|
|
1351
|
+
/** Supported player-count fields plus format-specific player configuration. */
|
|
1352
|
+
interface RulesetPlayerCountRules {
|
|
1353
|
+
min?: number;
|
|
1354
|
+
max?: number;
|
|
1355
|
+
[key: string]: unknown;
|
|
1356
|
+
}
|
|
1357
|
+
/** Fixed opening-hand fields. Dynamic formats can use additional policy fields on setup. */
|
|
1358
|
+
interface RulesetOpeningHandRules {
|
|
1359
|
+
size: number;
|
|
1360
|
+
sourceSection?: string;
|
|
1361
|
+
countsAsDraw?: boolean;
|
|
1362
|
+
[key: string]: unknown;
|
|
1363
|
+
}
|
|
1364
|
+
/** Common game setup fields. Additional setup rules are preserved. */
|
|
1365
|
+
interface RulesetSetupRules {
|
|
1366
|
+
openingHand?: RulesetOpeningHandRules;
|
|
1367
|
+
startingLife?: number;
|
|
1368
|
+
shuffleDeck?: boolean;
|
|
1369
|
+
[key: string]: unknown;
|
|
1370
|
+
}
|
|
1371
|
+
/** Common mulligan fields. The kind and extra fields describe game-specific procedures. */
|
|
1372
|
+
interface RulesetMulliganRules {
|
|
1373
|
+
kind?: string;
|
|
1374
|
+
maxUses?: number;
|
|
1375
|
+
handSizeDeltaPerUse?: number;
|
|
1376
|
+
[key: string]: unknown;
|
|
1377
|
+
}
|
|
1378
|
+
/** Common per-turn draw fields. Additional turn rules are preserved. */
|
|
1379
|
+
interface RulesetTurnRules {
|
|
1380
|
+
drawCount?: number;
|
|
1381
|
+
startingPlayerDrawsOnFirstTurn?: boolean;
|
|
1382
|
+
[key: string]: unknown;
|
|
1383
|
+
}
|
|
1384
|
+
/** One game outcome, such as reaching a score threshold or drawing from an empty deck. */
|
|
1385
|
+
interface RulesetOutcomeRule {
|
|
1386
|
+
kind: string;
|
|
1387
|
+
result: string;
|
|
1388
|
+
[key: string]: unknown;
|
|
1389
|
+
}
|
|
1390
|
+
/** Game setup, turn, mulligan, and outcome configuration. */
|
|
1391
|
+
interface RulesetGameplayRules {
|
|
1392
|
+
players?: RulesetPlayerCountRules;
|
|
1393
|
+
setup?: RulesetSetupRules;
|
|
1394
|
+
mulligan?: RulesetMulliganRules;
|
|
1395
|
+
turn?: RulesetTurnRules;
|
|
1396
|
+
outcomes?: RulesetOutcomeRule[];
|
|
1397
|
+
[key: string]: unknown;
|
|
1398
|
+
}
|
|
1399
|
+
/** Match-level configuration. Additional profiles and format-specific structures are preserved. */
|
|
1400
|
+
interface RulesetMatchRules {
|
|
1401
|
+
gamesToWin?: number;
|
|
1402
|
+
sideboardingAllowed?: boolean;
|
|
1403
|
+
timeLimitMinutes?: number;
|
|
1404
|
+
[key: string]: unknown;
|
|
1405
|
+
}
|
|
1406
|
+
/**
|
|
1407
|
+
* Canonical, forward-compatible ruleset JSON.
|
|
1408
|
+
*
|
|
1409
|
+
* The known gameplay and match fields are typed while index signatures preserve
|
|
1410
|
+
* game-specific extensions and future schema additions.
|
|
1411
|
+
*/
|
|
1412
|
+
interface RulesetRules {
|
|
1413
|
+
schemaVersion?: number;
|
|
1414
|
+
sections?: RulesetSectionRule[];
|
|
1415
|
+
gameplay?: RulesetGameplayRules;
|
|
1416
|
+
match?: RulesetMatchRules;
|
|
1417
|
+
[key: string]: unknown;
|
|
1418
|
+
}
|
|
1336
1419
|
interface Ruleset {
|
|
1337
1420
|
id: string;
|
|
1338
1421
|
gameId: string;
|
|
@@ -1354,7 +1437,7 @@ interface RulesetVersion {
|
|
|
1354
1437
|
rulesetId: string;
|
|
1355
1438
|
versionLabel: string;
|
|
1356
1439
|
status: RulesetVersionStatus;
|
|
1357
|
-
rules:
|
|
1440
|
+
rules: RulesetRules;
|
|
1358
1441
|
sectionDefinitions: DeckSectionDefinition[];
|
|
1359
1442
|
cardDatasetId: string | null;
|
|
1360
1443
|
cardDatasetVersionId: string | null;
|
|
@@ -1379,7 +1462,7 @@ interface DeckValidationRules {
|
|
|
1379
1462
|
rulesetVersionId: string;
|
|
1380
1463
|
rulesetKey: string;
|
|
1381
1464
|
rulesetVersionLabel: string;
|
|
1382
|
-
rules:
|
|
1465
|
+
rules: RulesetRules;
|
|
1383
1466
|
sections: DeckSectionDefinition[];
|
|
1384
1467
|
}
|
|
1385
1468
|
interface RulesetValidationImpact {
|
|
@@ -1409,7 +1492,7 @@ interface RulesetVersionDraftImportPreview {
|
|
|
1409
1492
|
sourceDatasetVersionId: string | null;
|
|
1410
1493
|
sourceDatasetRecordId: string;
|
|
1411
1494
|
sourceRecordIdentifier: string;
|
|
1412
|
-
rules:
|
|
1495
|
+
rules: RulesetRules;
|
|
1413
1496
|
sectionDefinitions: DeckSectionDefinition[];
|
|
1414
1497
|
rulesFingerprint: string;
|
|
1415
1498
|
summary: string;
|
|
@@ -1432,7 +1515,7 @@ interface RulesetUpdateInput {
|
|
|
1432
1515
|
}
|
|
1433
1516
|
interface RulesetVersionDraftCreateInput {
|
|
1434
1517
|
versionLabel: string;
|
|
1435
|
-
rules:
|
|
1518
|
+
rules: RulesetRules;
|
|
1436
1519
|
cardDatasetId?: string;
|
|
1437
1520
|
cardDatasetVersionId?: string;
|
|
1438
1521
|
effectiveAt?: string;
|
|
@@ -1450,7 +1533,7 @@ interface RulesetVersionDraftImportFromDatasetRecordInput {
|
|
|
1450
1533
|
}
|
|
1451
1534
|
interface RulesetVersionDraftUpdateInput {
|
|
1452
1535
|
versionLabel?: string;
|
|
1453
|
-
rules?:
|
|
1536
|
+
rules?: RulesetRules;
|
|
1454
1537
|
cardDatasetId?: string;
|
|
1455
1538
|
cardDatasetVersionId?: string;
|
|
1456
1539
|
effectiveAt?: string;
|
|
@@ -2927,4 +3010,4 @@ declare class Collection<T> implements AsyncIterable<T> {
|
|
|
2927
3010
|
each(): AsyncIterable<T>;
|
|
2928
3011
|
}
|
|
2929
3012
|
|
|
2930
|
-
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 ConfirmScanUploadInput, type Connection, ConnectionError, type CreateScanJobInput, type CreateScanUploadSessionInput, type CsvOptions, type Dataset, type DatasetExportInput, type DatasetFilterValue, type DatasetFilterValueConnection, type DatasetFilterValueEdge, 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 DeckAppAccessRetention, type DeckClaimInput, type DeckCollaborator, type DeckCollaboratorRole, type DeckCopyInput, type DeckCopyPayload, type DeckCreateInput, type DeckDiff, type DeckDiscoverability, 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 DeckImportCandidateSelectionInput, 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 DeckPublishInput, type DeckPublishPayload, type DeckPublishedVersionSelector, type DeckReadState, type DeckRemoveInvalidEntriesInput, type DeckRepresentation, type DeckSectionDefinition, type DeckSectionDefinitionsParams, type DeckState, type DeckToken, type DeckTokenExchangeInput, type DeckTokenExchangePayload, type DeckTokenIssuer, type DeckTokenIssuerCreateInput, type DeckTokenIssuerSigningKeyInput, type DeckTokenScope, type DeckTokenSigningAlgorithm, type DeckTransferOwnershipInput, type DeckUpdateInput, type DeckUpsertByExternalRefInput, type DeckUpsertByExternalRefPayload, type DeckValidateInput, type DeckValidatedAgainst, type DeckValidation, type DeckValidationAffectedEntry, type DeckValidationIssue, type DeckValidationRules, 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 GameScanRegion, 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 ListPublicRulesetsParams, type ListRulesetVersionsParams, type ListRulesetsParams, type LogLevel, type Logger, type NextPageLoader, NotFoundError, type ObjectField, type OnConflict, type PageInfo, type PresignedUpload, type PreviewScanTemplateInput, type PublicDecksFilterInput, type PublicDecksParams, type Publisher, type PublisherRef, type PublisherStatus, QueryBuilder, RateLimitError, type RateLimitInfo, type ResolveScanTemplateInput, type ResolvedLink, type ResourceType, RestrictedError, type Ruleset, type RulesetConnection, type RulesetCreateInput, type RulesetLookupParams, type RulesetUpdateInput, type RulesetValidationImpact, type RulesetValidationImpactDeck, type RulesetValidationImpactParams, type RulesetValidationRulesParams, type RulesetVersion, type RulesetVersionConnection, type RulesetVersionDraftCreateInput, type RulesetVersionDraftImportFromDatasetRecordInput, type RulesetVersionDraftImportPreview, type RulesetVersionDraftUpdateInput, type RulesetVersionPublishInput, type RulesetVersionStatus, type SaveScanTemplateInput, type ScanBestMatch, type ScanCandidate, type ScanFeatureVersionMetrics, type ScanFeedbackMetrics, type ScanFeedbackPayload, type ScanJob, type ScanJobError, type ScanJobMetrics, type ScanJobPayload, type ScanJobStatus, type ScanMetrics, type ScanMetricsInput, type ScanStageMetrics, type ScanTemplate, type ScanTemplateList, type ScanTemplatePayload, type ScanTemplatePreview, type ScanTemplateRegion, type ScanTemplateRegionInput, type ScanTemplateRegionPreview, type ScanTemplateResolution, type ScanTemplateWarning, type ScanTemplatesInput, type ScanWebhookState, type SearchDatasetsParams, type SearchGamesParams, type SearchPublishersParams, type SearchRecordsParams, ServerError, type SubmitScanFeedbackInput, type TCGPlayerPrice, type TCGPlayerPricing, TimeoutError, type UploadPurpose, ValidationError, type ViewerDecksFilterInput, type ViewerDecksParams, contains, eq, gt, gte, ilike, isNotNull, isNull, like, lt, lte, neq, notWithin, resolveFilter, within };
|
|
3013
|
+
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 ConfirmScanUploadInput, type Connection, ConnectionError, type CreateScanJobInput, type CreateScanUploadSessionInput, type CsvOptions, type Dataset, type DatasetExportInput, type DatasetFilterValue, type DatasetFilterValueConnection, type DatasetFilterValueEdge, 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 DeckAppAccessRetention, type DeckClaimInput, type DeckCollaborator, type DeckCollaboratorRole, type DeckCopyInput, type DeckCopyPayload, type DeckCreateInput, type DeckDiff, type DeckDiscoverability, 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 DeckImportCandidateSelectionInput, 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 DeckPublishInput, type DeckPublishPayload, type DeckPublishedVersionSelector, type DeckReadState, type DeckRemoveInvalidEntriesInput, type DeckRepresentation, type DeckSectionDefinition, type DeckSectionDefinitionsParams, type DeckState, type DeckToken, type DeckTokenExchangeInput, type DeckTokenExchangePayload, type DeckTokenIssuer, type DeckTokenIssuerCreateInput, type DeckTokenIssuerSigningKeyInput, type DeckTokenScope, type DeckTokenSigningAlgorithm, type DeckTransferOwnershipInput, type DeckUpdateInput, type DeckUpsertByExternalRefInput, type DeckUpsertByExternalRefPayload, type DeckValidateInput, type DeckValidatedAgainst, type DeckValidation, type DeckValidationAffectedEntry, type DeckValidationIssue, type DeckValidationRules, 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 GameScanRegion, 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 ListPublicRulesetsParams, type ListRulesetVersionsParams, type ListRulesetsParams, type LogLevel, type Logger, type NextPageLoader, NotFoundError, type ObjectField, type OnConflict, type PageInfo, type PresignedUpload, type PreviewScanTemplateInput, type PublicDecksFilterInput, type PublicDecksParams, type Publisher, type PublisherRef, type PublisherStatus, QueryBuilder, RateLimitError, type RateLimitInfo, type ResolveScanTemplateInput, type ResolvedLink, type ResourceType, RestrictedError, type Ruleset, type RulesetConnection, type RulesetCreateInput, type RulesetGameplayRules, type RulesetLookupParams, type RulesetMatchRules, type RulesetMulliganRules, type RulesetOpeningHandRules, type RulesetOutcomeRule, type RulesetPlayerCountRules, type RulesetRules, type RulesetSectionRule, type RulesetSetupRules, type RulesetTurnRules, type RulesetUpdateInput, type RulesetValidationImpact, type RulesetValidationImpactDeck, type RulesetValidationImpactParams, type RulesetValidationRulesParams, type RulesetVersion, type RulesetVersionConnection, type RulesetVersionDraftCreateInput, type RulesetVersionDraftImportFromDatasetRecordInput, type RulesetVersionDraftImportPreview, type RulesetVersionDraftUpdateInput, type RulesetVersionPublishInput, type RulesetVersionStatus, type SaveScanTemplateInput, type ScanBestMatch, type ScanCandidate, type ScanFeatureVersionMetrics, type ScanFeedbackMetrics, type ScanFeedbackPayload, type ScanJob, type ScanJobError, type ScanJobMetrics, type ScanJobPayload, type ScanJobStatus, type ScanMetrics, type ScanMetricsInput, type ScanStageMetrics, type ScanTemplate, type ScanTemplateList, type ScanTemplatePayload, type ScanTemplatePreview, type ScanTemplateRegion, type ScanTemplateRegionInput, type ScanTemplateRegionPreview, type ScanTemplateResolution, type ScanTemplateWarning, type ScanTemplatesInput, type ScanWebhookState, type SearchDatasetsParams, type SearchGamesParams, type SearchPublishersParams, type SearchRecordsParams, ServerError, type SubmitScanFeedbackInput, type TCGPlayerPrice, type TCGPlayerPricing, TimeoutError, type UploadPurpose, ValidationError, type ViewerDecksFilterInput, type ViewerDecksParams, contains, eq, gt, gte, ilike, isNotNull, isNull, like, lt, lte, neq, notWithin, resolveFilter, within };
|