@plasius/schema 1.4.1 → 1.4.3

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
@@ -506,6 +506,8 @@ declare const FEEDBACK_UNICODE_NORMALIZATION_PROFILE: "unicode-15.1.0-nfkc-v1";
506
506
  declare const FEEDBACK_BUG_COOLDOWN_SECONDS: readonly [number, number, number, number, number];
507
507
  /** Exact post-review suppression period, in seconds. */
508
508
  declare const FEEDBACK_REVIEW_COOLDOWN_SECONDS: number;
509
+ /** Closed abuse-control bands safe to aggregate without reporter identity. */
510
+ declare const FEEDBACK_ABUSE_BLOCK_BANDS: readonly ["five-minutes", "fifteen-minutes", "one-hour", "six-hours", "twenty-four-hours", "fail-closed", "edge-blocked"];
509
511
  /** Stable issue types accepted by bug-report intake. */
510
512
  declare const FEEDBACK_ISSUE_TYPES: readonly ["visual-layout", "functionality", "gameplay", "performance-stability", "accessibility", "content-localisation", "account-access", "privacy-security", "other"];
511
513
  /** Issue types that may be persisted after intake routing. */
@@ -656,6 +658,8 @@ type FeedbackIntentId = (typeof FEEDBACK_INTENT_IDS)[number];
656
658
  type FeedbackThemeId = (typeof FEEDBACK_THEME_IDS)[number];
657
659
  /** Closed site-section identifier eligible for capability projection. */
658
660
  type FeedbackSurfaceId = (typeof FEEDBACK_SURFACE_IDS)[number];
661
+ /** Closed abuse-control aggregation band. */
662
+ type FeedbackAbuseBlockBand = (typeof FEEDBACK_ABUSE_BLOCK_BANDS)[number];
659
663
  /** Supported rich-text mark. */
660
664
  type FeedbackRichTextMark = "bold" | "italic" | "underline";
661
665
  /** Text leaf in the transient rich-text AST. */
@@ -791,6 +795,23 @@ interface FeedbackCountBucket {
791
795
  id: string;
792
796
  count: number;
793
797
  }
798
+ /** Allowlisted abuse-control count safe for identifier-free reports. */
799
+ interface FeedbackAbuseBlockBucket extends FeedbackCountBucket {
800
+ id: FeedbackAbuseBlockBand;
801
+ }
802
+ /** Identifier-free finalized facts supplied to one hourly bug-health window. */
803
+ interface FeedbackBugHealthMetricsProjection {
804
+ type: "feedback-bug-health-metrics-projection";
805
+ version: typeof FEEDBACK_CONTRACT_VERSION;
806
+ projectionId: string;
807
+ windowStart: string;
808
+ windowEnd: string;
809
+ observedAt: string;
810
+ finalized: true;
811
+ rejectedCount: number;
812
+ trafficDenominator: number;
813
+ abuseBlockBands: readonly FeedbackAbuseBlockBucket[];
814
+ }
794
815
  /** A weekly public point that reveals nothing when the privacy threshold fails. */
795
816
  type FeedbackPublicWeeklyPoint = {
796
817
  weekStart: string;
@@ -1226,6 +1247,23 @@ declare const FeedbackCommittedAcceptanceEvidenceSchema: Schema<{
1226
1247
  packetKind: FieldBuilder<"bug" | "review", "bug" | "review">;
1227
1248
  acceptedAt: FieldBuilder<string, string>;
1228
1249
  }>;
1250
+ /**
1251
+ * Immutable identifier-free input for one exact UTC bug-health hour.
1252
+ *
1253
+ * The trusted producer owns the deterministic projection identifier. The
1254
+ * schema validates its canonical UUID representation while consumers bind it
1255
+ * to the requested window before using the projection.
1256
+ */
1257
+ declare const FeedbackBugHealthMetricsProjectionSchema: Schema<{
1258
+ projectionId: FieldBuilder<string, string>;
1259
+ windowStart: FieldBuilder<string, string>;
1260
+ windowEnd: FieldBuilder<string, string>;
1261
+ observedAt: FieldBuilder<string, string>;
1262
+ finalized: FieldBuilder<boolean, boolean>;
1263
+ rejectedCount: FieldBuilder<number, number>;
1264
+ trafficDenominator: FieldBuilder<number, number>;
1265
+ abuseBlockBands: FieldBuilder<unknown, unknown>;
1266
+ }>;
1229
1267
  /** Safe facts used to reconstruct a representative in-game view server-side. */
1230
1268
  declare const FeedbackGameReconstructionManifestSchema: Schema<{
1231
1269
  reconstructionId: FieldBuilder<string, string>;
@@ -1375,8 +1413,9 @@ declare const FeedbackMaterializationManifestSchema: Schema<{
1375
1413
  generatedAt: FieldBuilder<string, string>;
1376
1414
  sourcePacketCount: FieldBuilder<number, number>;
1377
1415
  lateArrivalCount: FieldBuilder<number, number>;
1416
+ correctionReason: FieldBuilder<"late-arrival" | "metrics-source", "late-arrival" | "metrics-source">;
1378
1417
  outputReportId: FieldBuilder<string, string>;
1379
1418
  status: FieldBuilder<"published" | "corrected" | "no-op", "published" | "corrected" | "no-op">;
1380
1419
  }>;
1381
1420
 
1382
- export { FEEDBACK_ANALYSIS_MODEL_VERSIONS, FEEDBACK_BUG_COOLDOWN_SECONDS, FEEDBACK_CONTRACT_VERSION, FEEDBACK_INTENT_IDS, FEEDBACK_ISSUE_TYPES, FEEDBACK_PERSISTABLE_ISSUE_TYPES, FEEDBACK_PRIVACY_POLICY_VERSIONS, FEEDBACK_REVIEW_COOLDOWN_SECONDS, FEEDBACK_SATISFACTION_LEVELS, FEEDBACK_SENTIMENT_BUCKETS, FEEDBACK_SEVERITY_LEVELS, FEEDBACK_STRUCTURED_ONLY_REASON_CODES, FEEDBACK_SURFACE_DEFINITIONS, FEEDBACK_SURFACE_IDS, FEEDBACK_THEME_IDS, FEEDBACK_UNICODE_NORMALIZATION_PROFILE, FeedbackAcceptanceReceiptSchema, type FeedbackAnalysisReceipt, FeedbackAnalysisReceiptSchema, type FeedbackBugPacket, FeedbackBugPacketSchema, FeedbackBugSubmissionRequestSchema, type FeedbackBugTransientAnalysisRequest, type FeedbackCommittedAcceptanceEvidence, FeedbackCommittedAcceptanceEvidenceSchema, FeedbackContextSchema, type FeedbackCountBucket, FeedbackDailySatisfactionReportSchema, type FeedbackDerivedAnalysis, FeedbackDerivedAnalysisSchema, FeedbackDraftPacketSchema, FeedbackDraftReceiptSchema, FeedbackDraftUpsertRequestSchema, type FeedbackEncryptedNarrativeEnvelope, FeedbackEncryptedNarrativeEnvelopeSchema, FeedbackGameDiagnostics, FeedbackGameReconstructionManifestSchema, FeedbackHourlyBugReportSchema, type FeedbackIntentId, type FeedbackIssueType, FeedbackMaterializationManifestSchema, type FeedbackPersistableIssueType, FeedbackProcessorCheckpointSchema, type FeedbackPublicComparison, type FeedbackPublicSummary, FeedbackPublicSummarySchema, type FeedbackPublicWeeklyPoint, type FeedbackReviewPacket, FeedbackReviewPacketSchema, FeedbackReviewSubmissionRequestSchema, type FeedbackReviewTransientAnalysisRequest, FeedbackRichTextAstSchema, type FeedbackRichTextBlock, type FeedbackRichTextDocument, type FeedbackRichTextMark, type FeedbackRichTextNode, type FeedbackSatisfaction, type FeedbackSentiment, type FeedbackSeverity, FeedbackStructuredOnlyAnalysisResultSchema, FeedbackSurfaceCatalogSchema, type FeedbackSurfaceId, type FeedbackThemeId, type FeedbackTransientAnalysisRequest, FeedbackTransientAnalysisRequestSchema, type FeedbackTransientAnalysisRequestValidationResult, FieldBuilder, FieldType, Infer, IsoLanguageCode, PLAYER_SYSTEM_ACHIEVEMENT_TIERS, PLAYER_SYSTEM_ACHIEVEMENT_TRACK_STATUSES, PLAYER_SYSTEM_EVENT_KINDS, type PlayerSystemAchievementEntry, type PlayerSystemAchievementTier, type PlayerSystemAchievementTrack, type PlayerSystemAchievementTrackStatus, type PlayerSystemCuratedSnapshot, type PlayerSystemCuratedSnapshotEntity, PlayerSystemCuratedSnapshotSchema, type PlayerSystemEventEntry, type PlayerSystemEventHighlight, type PlayerSystemEventKind, type PlayerSystemNormalizedEventBatch, type PlayerSystemNormalizedEventBatchEntity, PlayerSystemNormalizedEventBatchSchema, type PlayerSystemNormalizedObservedEvent, type PlayerSystemObservedEvent, type PlayerSystemObservedEventBatch, type PlayerSystemObservedEventBatchEntity, PlayerSystemObservedEventBatchSchema, Schema, SchemaOptions, SchemaShape, ValidationIssue, createComponentSchema, createSchema, field, getAllComponentSchemas, getAllSchemas, getComponentSchema, getSchemaForType, isExtensionSingleton, isExtensionSubtag, isIsoLanguageCode, isPrivateUseSingleton, isPrivateUseSubtag, isRegionSubtag, isScriptSubtag, isVariantSubtag, isoCountryCodes, isoCurrencyCodes, registerComponentSchema, renderSchemaDescription, validateCountryCode, validateCurrencyCode, validateDateTimeISO, validateDisplayName, validateEmail, validateFeedbackTransientAnalysisRequest, validateLanguage, validateName, validatePercentage, validatePhone, validateRichText, validateSafeText, validateSemVer, validateUUID, validateUrl, validateUserId, validateUserIdArray };
1421
+ export { FEEDBACK_ABUSE_BLOCK_BANDS, FEEDBACK_ANALYSIS_MODEL_VERSIONS, FEEDBACK_BUG_COOLDOWN_SECONDS, FEEDBACK_CONTRACT_VERSION, FEEDBACK_INTENT_IDS, FEEDBACK_ISSUE_TYPES, FEEDBACK_PERSISTABLE_ISSUE_TYPES, FEEDBACK_PRIVACY_POLICY_VERSIONS, FEEDBACK_REVIEW_COOLDOWN_SECONDS, FEEDBACK_SATISFACTION_LEVELS, FEEDBACK_SENTIMENT_BUCKETS, FEEDBACK_SEVERITY_LEVELS, FEEDBACK_STRUCTURED_ONLY_REASON_CODES, FEEDBACK_SURFACE_DEFINITIONS, FEEDBACK_SURFACE_IDS, FEEDBACK_THEME_IDS, FEEDBACK_UNICODE_NORMALIZATION_PROFILE, type FeedbackAbuseBlockBand, type FeedbackAbuseBlockBucket, FeedbackAcceptanceReceiptSchema, type FeedbackAnalysisReceipt, FeedbackAnalysisReceiptSchema, type FeedbackBugHealthMetricsProjection, FeedbackBugHealthMetricsProjectionSchema, type FeedbackBugPacket, FeedbackBugPacketSchema, FeedbackBugSubmissionRequestSchema, type FeedbackBugTransientAnalysisRequest, type FeedbackCommittedAcceptanceEvidence, FeedbackCommittedAcceptanceEvidenceSchema, FeedbackContextSchema, type FeedbackCountBucket, FeedbackDailySatisfactionReportSchema, type FeedbackDerivedAnalysis, FeedbackDerivedAnalysisSchema, FeedbackDraftPacketSchema, FeedbackDraftReceiptSchema, FeedbackDraftUpsertRequestSchema, type FeedbackEncryptedNarrativeEnvelope, FeedbackEncryptedNarrativeEnvelopeSchema, FeedbackGameDiagnostics, FeedbackGameReconstructionManifestSchema, FeedbackHourlyBugReportSchema, type FeedbackIntentId, type FeedbackIssueType, FeedbackMaterializationManifestSchema, type FeedbackPersistableIssueType, FeedbackProcessorCheckpointSchema, type FeedbackPublicComparison, type FeedbackPublicSummary, FeedbackPublicSummarySchema, type FeedbackPublicWeeklyPoint, type FeedbackReviewPacket, FeedbackReviewPacketSchema, FeedbackReviewSubmissionRequestSchema, type FeedbackReviewTransientAnalysisRequest, FeedbackRichTextAstSchema, type FeedbackRichTextBlock, type FeedbackRichTextDocument, type FeedbackRichTextMark, type FeedbackRichTextNode, type FeedbackSatisfaction, type FeedbackSentiment, type FeedbackSeverity, FeedbackStructuredOnlyAnalysisResultSchema, FeedbackSurfaceCatalogSchema, type FeedbackSurfaceId, type FeedbackThemeId, type FeedbackTransientAnalysisRequest, FeedbackTransientAnalysisRequestSchema, type FeedbackTransientAnalysisRequestValidationResult, FieldBuilder, FieldType, Infer, IsoLanguageCode, PLAYER_SYSTEM_ACHIEVEMENT_TIERS, PLAYER_SYSTEM_ACHIEVEMENT_TRACK_STATUSES, PLAYER_SYSTEM_EVENT_KINDS, type PlayerSystemAchievementEntry, type PlayerSystemAchievementTier, type PlayerSystemAchievementTrack, type PlayerSystemAchievementTrackStatus, type PlayerSystemCuratedSnapshot, type PlayerSystemCuratedSnapshotEntity, PlayerSystemCuratedSnapshotSchema, type PlayerSystemEventEntry, type PlayerSystemEventHighlight, type PlayerSystemEventKind, type PlayerSystemNormalizedEventBatch, type PlayerSystemNormalizedEventBatchEntity, PlayerSystemNormalizedEventBatchSchema, type PlayerSystemNormalizedObservedEvent, type PlayerSystemObservedEvent, type PlayerSystemObservedEventBatch, type PlayerSystemObservedEventBatchEntity, PlayerSystemObservedEventBatchSchema, Schema, SchemaOptions, SchemaShape, ValidationIssue, createComponentSchema, createSchema, field, getAllComponentSchemas, getAllSchemas, getComponentSchema, getSchemaForType, isExtensionSingleton, isExtensionSubtag, isIsoLanguageCode, isPrivateUseSingleton, isPrivateUseSubtag, isRegionSubtag, isScriptSubtag, isVariantSubtag, isoCountryCodes, isoCurrencyCodes, registerComponentSchema, renderSchemaDescription, validateCountryCode, validateCurrencyCode, validateDateTimeISO, validateDisplayName, validateEmail, validateFeedbackTransientAnalysisRequest, validateLanguage, validateName, validatePercentage, validatePhone, validateRichText, validateSafeText, validateSemVer, validateUUID, validateUrl, validateUserId, validateUserIdArray };
package/dist/index.d.ts CHANGED
@@ -506,6 +506,8 @@ declare const FEEDBACK_UNICODE_NORMALIZATION_PROFILE: "unicode-15.1.0-nfkc-v1";
506
506
  declare const FEEDBACK_BUG_COOLDOWN_SECONDS: readonly [number, number, number, number, number];
507
507
  /** Exact post-review suppression period, in seconds. */
508
508
  declare const FEEDBACK_REVIEW_COOLDOWN_SECONDS: number;
509
+ /** Closed abuse-control bands safe to aggregate without reporter identity. */
510
+ declare const FEEDBACK_ABUSE_BLOCK_BANDS: readonly ["five-minutes", "fifteen-minutes", "one-hour", "six-hours", "twenty-four-hours", "fail-closed", "edge-blocked"];
509
511
  /** Stable issue types accepted by bug-report intake. */
510
512
  declare const FEEDBACK_ISSUE_TYPES: readonly ["visual-layout", "functionality", "gameplay", "performance-stability", "accessibility", "content-localisation", "account-access", "privacy-security", "other"];
511
513
  /** Issue types that may be persisted after intake routing. */
@@ -656,6 +658,8 @@ type FeedbackIntentId = (typeof FEEDBACK_INTENT_IDS)[number];
656
658
  type FeedbackThemeId = (typeof FEEDBACK_THEME_IDS)[number];
657
659
  /** Closed site-section identifier eligible for capability projection. */
658
660
  type FeedbackSurfaceId = (typeof FEEDBACK_SURFACE_IDS)[number];
661
+ /** Closed abuse-control aggregation band. */
662
+ type FeedbackAbuseBlockBand = (typeof FEEDBACK_ABUSE_BLOCK_BANDS)[number];
659
663
  /** Supported rich-text mark. */
660
664
  type FeedbackRichTextMark = "bold" | "italic" | "underline";
661
665
  /** Text leaf in the transient rich-text AST. */
@@ -791,6 +795,23 @@ interface FeedbackCountBucket {
791
795
  id: string;
792
796
  count: number;
793
797
  }
798
+ /** Allowlisted abuse-control count safe for identifier-free reports. */
799
+ interface FeedbackAbuseBlockBucket extends FeedbackCountBucket {
800
+ id: FeedbackAbuseBlockBand;
801
+ }
802
+ /** Identifier-free finalized facts supplied to one hourly bug-health window. */
803
+ interface FeedbackBugHealthMetricsProjection {
804
+ type: "feedback-bug-health-metrics-projection";
805
+ version: typeof FEEDBACK_CONTRACT_VERSION;
806
+ projectionId: string;
807
+ windowStart: string;
808
+ windowEnd: string;
809
+ observedAt: string;
810
+ finalized: true;
811
+ rejectedCount: number;
812
+ trafficDenominator: number;
813
+ abuseBlockBands: readonly FeedbackAbuseBlockBucket[];
814
+ }
794
815
  /** A weekly public point that reveals nothing when the privacy threshold fails. */
795
816
  type FeedbackPublicWeeklyPoint = {
796
817
  weekStart: string;
@@ -1226,6 +1247,23 @@ declare const FeedbackCommittedAcceptanceEvidenceSchema: Schema<{
1226
1247
  packetKind: FieldBuilder<"bug" | "review", "bug" | "review">;
1227
1248
  acceptedAt: FieldBuilder<string, string>;
1228
1249
  }>;
1250
+ /**
1251
+ * Immutable identifier-free input for one exact UTC bug-health hour.
1252
+ *
1253
+ * The trusted producer owns the deterministic projection identifier. The
1254
+ * schema validates its canonical UUID representation while consumers bind it
1255
+ * to the requested window before using the projection.
1256
+ */
1257
+ declare const FeedbackBugHealthMetricsProjectionSchema: Schema<{
1258
+ projectionId: FieldBuilder<string, string>;
1259
+ windowStart: FieldBuilder<string, string>;
1260
+ windowEnd: FieldBuilder<string, string>;
1261
+ observedAt: FieldBuilder<string, string>;
1262
+ finalized: FieldBuilder<boolean, boolean>;
1263
+ rejectedCount: FieldBuilder<number, number>;
1264
+ trafficDenominator: FieldBuilder<number, number>;
1265
+ abuseBlockBands: FieldBuilder<unknown, unknown>;
1266
+ }>;
1229
1267
  /** Safe facts used to reconstruct a representative in-game view server-side. */
1230
1268
  declare const FeedbackGameReconstructionManifestSchema: Schema<{
1231
1269
  reconstructionId: FieldBuilder<string, string>;
@@ -1375,8 +1413,9 @@ declare const FeedbackMaterializationManifestSchema: Schema<{
1375
1413
  generatedAt: FieldBuilder<string, string>;
1376
1414
  sourcePacketCount: FieldBuilder<number, number>;
1377
1415
  lateArrivalCount: FieldBuilder<number, number>;
1416
+ correctionReason: FieldBuilder<"late-arrival" | "metrics-source", "late-arrival" | "metrics-source">;
1378
1417
  outputReportId: FieldBuilder<string, string>;
1379
1418
  status: FieldBuilder<"published" | "corrected" | "no-op", "published" | "corrected" | "no-op">;
1380
1419
  }>;
1381
1420
 
1382
- export { FEEDBACK_ANALYSIS_MODEL_VERSIONS, FEEDBACK_BUG_COOLDOWN_SECONDS, FEEDBACK_CONTRACT_VERSION, FEEDBACK_INTENT_IDS, FEEDBACK_ISSUE_TYPES, FEEDBACK_PERSISTABLE_ISSUE_TYPES, FEEDBACK_PRIVACY_POLICY_VERSIONS, FEEDBACK_REVIEW_COOLDOWN_SECONDS, FEEDBACK_SATISFACTION_LEVELS, FEEDBACK_SENTIMENT_BUCKETS, FEEDBACK_SEVERITY_LEVELS, FEEDBACK_STRUCTURED_ONLY_REASON_CODES, FEEDBACK_SURFACE_DEFINITIONS, FEEDBACK_SURFACE_IDS, FEEDBACK_THEME_IDS, FEEDBACK_UNICODE_NORMALIZATION_PROFILE, FeedbackAcceptanceReceiptSchema, type FeedbackAnalysisReceipt, FeedbackAnalysisReceiptSchema, type FeedbackBugPacket, FeedbackBugPacketSchema, FeedbackBugSubmissionRequestSchema, type FeedbackBugTransientAnalysisRequest, type FeedbackCommittedAcceptanceEvidence, FeedbackCommittedAcceptanceEvidenceSchema, FeedbackContextSchema, type FeedbackCountBucket, FeedbackDailySatisfactionReportSchema, type FeedbackDerivedAnalysis, FeedbackDerivedAnalysisSchema, FeedbackDraftPacketSchema, FeedbackDraftReceiptSchema, FeedbackDraftUpsertRequestSchema, type FeedbackEncryptedNarrativeEnvelope, FeedbackEncryptedNarrativeEnvelopeSchema, FeedbackGameDiagnostics, FeedbackGameReconstructionManifestSchema, FeedbackHourlyBugReportSchema, type FeedbackIntentId, type FeedbackIssueType, FeedbackMaterializationManifestSchema, type FeedbackPersistableIssueType, FeedbackProcessorCheckpointSchema, type FeedbackPublicComparison, type FeedbackPublicSummary, FeedbackPublicSummarySchema, type FeedbackPublicWeeklyPoint, type FeedbackReviewPacket, FeedbackReviewPacketSchema, FeedbackReviewSubmissionRequestSchema, type FeedbackReviewTransientAnalysisRequest, FeedbackRichTextAstSchema, type FeedbackRichTextBlock, type FeedbackRichTextDocument, type FeedbackRichTextMark, type FeedbackRichTextNode, type FeedbackSatisfaction, type FeedbackSentiment, type FeedbackSeverity, FeedbackStructuredOnlyAnalysisResultSchema, FeedbackSurfaceCatalogSchema, type FeedbackSurfaceId, type FeedbackThemeId, type FeedbackTransientAnalysisRequest, FeedbackTransientAnalysisRequestSchema, type FeedbackTransientAnalysisRequestValidationResult, FieldBuilder, FieldType, Infer, IsoLanguageCode, PLAYER_SYSTEM_ACHIEVEMENT_TIERS, PLAYER_SYSTEM_ACHIEVEMENT_TRACK_STATUSES, PLAYER_SYSTEM_EVENT_KINDS, type PlayerSystemAchievementEntry, type PlayerSystemAchievementTier, type PlayerSystemAchievementTrack, type PlayerSystemAchievementTrackStatus, type PlayerSystemCuratedSnapshot, type PlayerSystemCuratedSnapshotEntity, PlayerSystemCuratedSnapshotSchema, type PlayerSystemEventEntry, type PlayerSystemEventHighlight, type PlayerSystemEventKind, type PlayerSystemNormalizedEventBatch, type PlayerSystemNormalizedEventBatchEntity, PlayerSystemNormalizedEventBatchSchema, type PlayerSystemNormalizedObservedEvent, type PlayerSystemObservedEvent, type PlayerSystemObservedEventBatch, type PlayerSystemObservedEventBatchEntity, PlayerSystemObservedEventBatchSchema, Schema, SchemaOptions, SchemaShape, ValidationIssue, createComponentSchema, createSchema, field, getAllComponentSchemas, getAllSchemas, getComponentSchema, getSchemaForType, isExtensionSingleton, isExtensionSubtag, isIsoLanguageCode, isPrivateUseSingleton, isPrivateUseSubtag, isRegionSubtag, isScriptSubtag, isVariantSubtag, isoCountryCodes, isoCurrencyCodes, registerComponentSchema, renderSchemaDescription, validateCountryCode, validateCurrencyCode, validateDateTimeISO, validateDisplayName, validateEmail, validateFeedbackTransientAnalysisRequest, validateLanguage, validateName, validatePercentage, validatePhone, validateRichText, validateSafeText, validateSemVer, validateUUID, validateUrl, validateUserId, validateUserIdArray };
1421
+ export { FEEDBACK_ABUSE_BLOCK_BANDS, FEEDBACK_ANALYSIS_MODEL_VERSIONS, FEEDBACK_BUG_COOLDOWN_SECONDS, FEEDBACK_CONTRACT_VERSION, FEEDBACK_INTENT_IDS, FEEDBACK_ISSUE_TYPES, FEEDBACK_PERSISTABLE_ISSUE_TYPES, FEEDBACK_PRIVACY_POLICY_VERSIONS, FEEDBACK_REVIEW_COOLDOWN_SECONDS, FEEDBACK_SATISFACTION_LEVELS, FEEDBACK_SENTIMENT_BUCKETS, FEEDBACK_SEVERITY_LEVELS, FEEDBACK_STRUCTURED_ONLY_REASON_CODES, FEEDBACK_SURFACE_DEFINITIONS, FEEDBACK_SURFACE_IDS, FEEDBACK_THEME_IDS, FEEDBACK_UNICODE_NORMALIZATION_PROFILE, type FeedbackAbuseBlockBand, type FeedbackAbuseBlockBucket, FeedbackAcceptanceReceiptSchema, type FeedbackAnalysisReceipt, FeedbackAnalysisReceiptSchema, type FeedbackBugHealthMetricsProjection, FeedbackBugHealthMetricsProjectionSchema, type FeedbackBugPacket, FeedbackBugPacketSchema, FeedbackBugSubmissionRequestSchema, type FeedbackBugTransientAnalysisRequest, type FeedbackCommittedAcceptanceEvidence, FeedbackCommittedAcceptanceEvidenceSchema, FeedbackContextSchema, type FeedbackCountBucket, FeedbackDailySatisfactionReportSchema, type FeedbackDerivedAnalysis, FeedbackDerivedAnalysisSchema, FeedbackDraftPacketSchema, FeedbackDraftReceiptSchema, FeedbackDraftUpsertRequestSchema, type FeedbackEncryptedNarrativeEnvelope, FeedbackEncryptedNarrativeEnvelopeSchema, FeedbackGameDiagnostics, FeedbackGameReconstructionManifestSchema, FeedbackHourlyBugReportSchema, type FeedbackIntentId, type FeedbackIssueType, FeedbackMaterializationManifestSchema, type FeedbackPersistableIssueType, FeedbackProcessorCheckpointSchema, type FeedbackPublicComparison, type FeedbackPublicSummary, FeedbackPublicSummarySchema, type FeedbackPublicWeeklyPoint, type FeedbackReviewPacket, FeedbackReviewPacketSchema, FeedbackReviewSubmissionRequestSchema, type FeedbackReviewTransientAnalysisRequest, FeedbackRichTextAstSchema, type FeedbackRichTextBlock, type FeedbackRichTextDocument, type FeedbackRichTextMark, type FeedbackRichTextNode, type FeedbackSatisfaction, type FeedbackSentiment, type FeedbackSeverity, FeedbackStructuredOnlyAnalysisResultSchema, FeedbackSurfaceCatalogSchema, type FeedbackSurfaceId, type FeedbackThemeId, type FeedbackTransientAnalysisRequest, FeedbackTransientAnalysisRequestSchema, type FeedbackTransientAnalysisRequestValidationResult, FieldBuilder, FieldType, Infer, IsoLanguageCode, PLAYER_SYSTEM_ACHIEVEMENT_TIERS, PLAYER_SYSTEM_ACHIEVEMENT_TRACK_STATUSES, PLAYER_SYSTEM_EVENT_KINDS, type PlayerSystemAchievementEntry, type PlayerSystemAchievementTier, type PlayerSystemAchievementTrack, type PlayerSystemAchievementTrackStatus, type PlayerSystemCuratedSnapshot, type PlayerSystemCuratedSnapshotEntity, PlayerSystemCuratedSnapshotSchema, type PlayerSystemEventEntry, type PlayerSystemEventHighlight, type PlayerSystemEventKind, type PlayerSystemNormalizedEventBatch, type PlayerSystemNormalizedEventBatchEntity, PlayerSystemNormalizedEventBatchSchema, type PlayerSystemNormalizedObservedEvent, type PlayerSystemObservedEvent, type PlayerSystemObservedEventBatch, type PlayerSystemObservedEventBatchEntity, PlayerSystemObservedEventBatchSchema, Schema, SchemaOptions, SchemaShape, ValidationIssue, createComponentSchema, createSchema, field, getAllComponentSchemas, getAllSchemas, getComponentSchema, getSchemaForType, isExtensionSingleton, isExtensionSubtag, isIsoLanguageCode, isPrivateUseSingleton, isPrivateUseSubtag, isRegionSubtag, isScriptSubtag, isVariantSubtag, isoCountryCodes, isoCurrencyCodes, registerComponentSchema, renderSchemaDescription, validateCountryCode, validateCurrencyCode, validateDateTimeISO, validateDisplayName, validateEmail, validateFeedbackTransientAnalysisRequest, validateLanguage, validateName, validatePercentage, validatePhone, validateRichText, validateSafeText, validateSemVer, validateUUID, validateUrl, validateUserId, validateUserIdArray };
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ import {
31
31
  validateSemVer,
32
32
  validateUUID,
33
33
  validateUrl
34
- } from "./chunk-UQHPDQZX.js";
34
+ } from "./chunk-GNL2RBO5.js";
35
35
  import {
36
36
  FEEDBACK_BACKEND_BUCKETS,
37
37
  FEEDBACK_CONTRACT_VERSION,
@@ -427,6 +427,15 @@ var FEEDBACK_BUG_COOLDOWN_SECONDS = Object.freeze([
427
427
  24 * 60 * 60
428
428
  ]);
429
429
  var FEEDBACK_REVIEW_COOLDOWN_SECONDS = 30 * 24 * 60 * 60;
430
+ var FEEDBACK_ABUSE_BLOCK_BANDS = Object.freeze([
431
+ "five-minutes",
432
+ "fifteen-minutes",
433
+ "one-hour",
434
+ "six-hours",
435
+ "twenty-four-hours",
436
+ "fail-closed",
437
+ "edge-blocked"
438
+ ]);
430
439
  var FEEDBACK_ISSUE_TYPES = [
431
440
  "visual-layout",
432
441
  "functionality",
@@ -1334,6 +1343,43 @@ var FeedbackCommittedAcceptanceEvidenceSchema = createSchema(
1334
1343
  "feedback-committed-acceptance-evidence",
1335
1344
  strictOptions
1336
1345
  );
1346
+ var FeedbackBugHealthMetricsProjectionSchema = createSchema(
1347
+ {
1348
+ projectionId: uuidField(),
1349
+ windowStart: canonicalServerUtcField(),
1350
+ windowEnd: canonicalServerUtcField(),
1351
+ observedAt: canonicalServerUtcField(),
1352
+ finalized: field.boolean().validator((value) => value === true),
1353
+ rejectedCount: countField(),
1354
+ trafficDenominator: countField(),
1355
+ abuseBlockBands: field.array(
1356
+ field.object({
1357
+ id: field.string().enum(FEEDBACK_ABUSE_BLOCK_BANDS),
1358
+ count: positiveCountField()
1359
+ })
1360
+ ).max(FEEDBACK_ABUSE_BLOCK_BANDS.length)
1361
+ },
1362
+ "feedback-bug-health-metrics-projection",
1363
+ {
1364
+ ...strictOptions,
1365
+ schemaValidator: (value) => {
1366
+ const blockBands = value.abuseBlockBands;
1367
+ let previousIndex = -1;
1368
+ const canonicalBands = blockBands.every((bucket) => {
1369
+ const index = FEEDBACK_ABUSE_BLOCK_BANDS.indexOf(bucket.id);
1370
+ if (index <= previousIndex) {
1371
+ return false;
1372
+ }
1373
+ previousIndex = index;
1374
+ return true;
1375
+ });
1376
+ return orderedWindow(
1377
+ { ...value, generatedAt: value.observedAt },
1378
+ 60 * 60 * 1e3
1379
+ ) && Date.parse(String(value.observedAt)) >= Date.parse(String(value.windowEnd)) && canonicalBands;
1380
+ }
1381
+ }
1382
+ );
1337
1383
  var FeedbackGameReconstructionManifestSchema = createSchema(
1338
1384
  {
1339
1385
  reconstructionId: uuidField(),
@@ -1458,20 +1504,10 @@ var FeedbackHourlyBugReportSchema = createSchema(
1458
1504
  abuseBlockBands: field.array(
1459
1505
  field.object(
1460
1506
  distributionShape(
1461
- () => field.string().enum(
1462
- [
1463
- "five-minutes",
1464
- "fifteen-minutes",
1465
- "one-hour",
1466
- "six-hours",
1467
- "twenty-four-hours",
1468
- "fail-closed",
1469
- "edge-blocked"
1470
- ]
1471
- )
1507
+ () => field.string().enum(FEEDBACK_ABUSE_BLOCK_BANDS)
1472
1508
  )
1473
1509
  )
1474
- ).max(16),
1510
+ ).max(FEEDBACK_ABUSE_BLOCK_BANDS.length),
1475
1511
  comparison: field.object({
1476
1512
  previousHourRatio: field.number().min(0).max(1e3),
1477
1513
  sevenDaySameHourRatio: field.number().min(0).max(1e3)
@@ -1773,6 +1809,7 @@ var FeedbackMaterializationManifestSchema = createSchema(
1773
1809
  generatedAt: field.dateTimeISO(),
1774
1810
  sourcePacketCount: countField(),
1775
1811
  lateArrivalCount: countField(),
1812
+ correctionReason: field.string().enum(["late-arrival", "metrics-source"]).optional(),
1776
1813
  outputReportId: uuidField().optional(),
1777
1814
  status: field.string().enum(["published", "corrected", "no-op"])
1778
1815
  },
@@ -1784,13 +1821,14 @@ var FeedbackMaterializationManifestSchema = createSchema(
1784
1821
  return false;
1785
1822
  }
1786
1823
  if (value.processor === "commit-reconciliation") {
1787
- return value.status === "no-op" && value.revision >= 1 && value.outputReportId === void 0 && value.lateArrivalCount === 0;
1824
+ return value.status === "no-op" && value.revision >= 1 && value.outputReportId === void 0 && value.correctionReason === void 0 && value.lateArrivalCount === 0;
1788
1825
  }
1789
- return value.status === "published" && value.revision === 1 && value.lateArrivalCount === 0 && value.outputReportId !== void 0 || value.status === "corrected" && value.revision >= 2 && value.lateArrivalCount > 0 && value.outputReportId !== void 0;
1826
+ return value.status === "published" && value.revision === 1 && value.lateArrivalCount === 0 && value.correctionReason === void 0 && value.outputReportId !== void 0 || value.status === "corrected" && value.revision >= 2 && (value.correctionReason === "metrics-source" && value.lateArrivalCount === 0 || (value.correctionReason === void 0 || value.correctionReason === "late-arrival") && value.lateArrivalCount > 0) && value.outputReportId !== void 0;
1790
1827
  }
1791
1828
  }
1792
1829
  );
1793
1830
  export {
1831
+ FEEDBACK_ABUSE_BLOCK_BANDS,
1794
1832
  FEEDBACK_ANALYSIS_MODEL_VERSIONS,
1795
1833
  FEEDBACK_BACKEND_BUCKETS,
1796
1834
  FEEDBACK_BUG_COOLDOWN_SECONDS,
@@ -1822,6 +1860,7 @@ export {
1822
1860
  FEEDBACK_VIEWPORT_BUCKETS,
1823
1861
  FeedbackAcceptanceReceiptSchema,
1824
1862
  FeedbackAnalysisReceiptSchema,
1863
+ FeedbackBugHealthMetricsProjectionSchema,
1825
1864
  FeedbackBugPacketSchema,
1826
1865
  FeedbackBugSubmissionRequestSchema,
1827
1866
  FeedbackCommittedAcceptanceEvidenceSchema,