@plasius/schema 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -2
- package/dist/{chunk-UQHPDQZX.js → chunk-GNL2RBO5.js} +133 -32
- package/dist/chunk-GNL2RBO5.js.map +1 -0
- package/dist/feedback-diagnostics.cjs +132 -31
- package/dist/feedback-diagnostics.cjs.map +1 -1
- package/dist/feedback-diagnostics.js +1 -1
- package/dist/index.cjs +206 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +62 -1
- package/dist/index.d.ts +62 -1
- package/dist/index.js +72 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-UQHPDQZX.js.map +0 -1
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. */
|
|
@@ -773,11 +777,41 @@ interface FeedbackReviewPacket {
|
|
|
773
777
|
satisfaction: FeedbackSatisfaction;
|
|
774
778
|
analysis?: FeedbackDerivedAnalysis;
|
|
775
779
|
}
|
|
780
|
+
/**
|
|
781
|
+
* Durable identifier-free proof that feedback intake committed a packet.
|
|
782
|
+
*
|
|
783
|
+
* This projection is emitted only by the trusted acceptance-evidence worker;
|
|
784
|
+
* the public intake contract never accepts it from a caller.
|
|
785
|
+
*/
|
|
786
|
+
interface FeedbackCommittedAcceptanceEvidence {
|
|
787
|
+
type: "feedback-committed-acceptance-evidence";
|
|
788
|
+
version: typeof FEEDBACK_CONTRACT_VERSION;
|
|
789
|
+
packetId: string;
|
|
790
|
+
packetKind: "bug" | "review";
|
|
791
|
+
acceptedAt: string;
|
|
792
|
+
}
|
|
776
793
|
/** Count bucket used by materialized feedback reports. */
|
|
777
794
|
interface FeedbackCountBucket {
|
|
778
795
|
id: string;
|
|
779
796
|
count: number;
|
|
780
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
|
+
}
|
|
781
815
|
/** A weekly public point that reveals nothing when the privacy threshold fails. */
|
|
782
816
|
type FeedbackPublicWeeklyPoint = {
|
|
783
817
|
weekStart: string;
|
|
@@ -1203,6 +1237,33 @@ declare const FeedbackReviewPacketSchema: Schema<{
|
|
|
1203
1237
|
version?: FieldBuilder<"1.0.0", "1.0.0"> | undefined;
|
|
1204
1238
|
}>;
|
|
1205
1239
|
}>;
|
|
1240
|
+
/**
|
|
1241
|
+
* Immutable proof that a structured packet completed the control-plane commit.
|
|
1242
|
+
* The schema deliberately excludes correlation, request, locator, and content
|
|
1243
|
+
* metadata so report materializers can retain it without retaining an actor.
|
|
1244
|
+
*/
|
|
1245
|
+
declare const FeedbackCommittedAcceptanceEvidenceSchema: Schema<{
|
|
1246
|
+
packetId: FieldBuilder<string, string>;
|
|
1247
|
+
packetKind: FieldBuilder<"bug" | "review", "bug" | "review">;
|
|
1248
|
+
acceptedAt: FieldBuilder<string, string>;
|
|
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
|
+
}>;
|
|
1206
1267
|
/** Safe facts used to reconstruct a representative in-game view server-side. */
|
|
1207
1268
|
declare const FeedbackGameReconstructionManifestSchema: Schema<{
|
|
1208
1269
|
reconstructionId: FieldBuilder<string, string>;
|
|
@@ -1356,4 +1417,4 @@ declare const FeedbackMaterializationManifestSchema: Schema<{
|
|
|
1356
1417
|
status: FieldBuilder<"published" | "corrected" | "no-op", "published" | "corrected" | "no-op">;
|
|
1357
1418
|
}>;
|
|
1358
1419
|
|
|
1359
|
-
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, 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 };
|
|
1420
|
+
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. */
|
|
@@ -773,11 +777,41 @@ interface FeedbackReviewPacket {
|
|
|
773
777
|
satisfaction: FeedbackSatisfaction;
|
|
774
778
|
analysis?: FeedbackDerivedAnalysis;
|
|
775
779
|
}
|
|
780
|
+
/**
|
|
781
|
+
* Durable identifier-free proof that feedback intake committed a packet.
|
|
782
|
+
*
|
|
783
|
+
* This projection is emitted only by the trusted acceptance-evidence worker;
|
|
784
|
+
* the public intake contract never accepts it from a caller.
|
|
785
|
+
*/
|
|
786
|
+
interface FeedbackCommittedAcceptanceEvidence {
|
|
787
|
+
type: "feedback-committed-acceptance-evidence";
|
|
788
|
+
version: typeof FEEDBACK_CONTRACT_VERSION;
|
|
789
|
+
packetId: string;
|
|
790
|
+
packetKind: "bug" | "review";
|
|
791
|
+
acceptedAt: string;
|
|
792
|
+
}
|
|
776
793
|
/** Count bucket used by materialized feedback reports. */
|
|
777
794
|
interface FeedbackCountBucket {
|
|
778
795
|
id: string;
|
|
779
796
|
count: number;
|
|
780
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
|
+
}
|
|
781
815
|
/** A weekly public point that reveals nothing when the privacy threshold fails. */
|
|
782
816
|
type FeedbackPublicWeeklyPoint = {
|
|
783
817
|
weekStart: string;
|
|
@@ -1203,6 +1237,33 @@ declare const FeedbackReviewPacketSchema: Schema<{
|
|
|
1203
1237
|
version?: FieldBuilder<"1.0.0", "1.0.0"> | undefined;
|
|
1204
1238
|
}>;
|
|
1205
1239
|
}>;
|
|
1240
|
+
/**
|
|
1241
|
+
* Immutable proof that a structured packet completed the control-plane commit.
|
|
1242
|
+
* The schema deliberately excludes correlation, request, locator, and content
|
|
1243
|
+
* metadata so report materializers can retain it without retaining an actor.
|
|
1244
|
+
*/
|
|
1245
|
+
declare const FeedbackCommittedAcceptanceEvidenceSchema: Schema<{
|
|
1246
|
+
packetId: FieldBuilder<string, string>;
|
|
1247
|
+
packetKind: FieldBuilder<"bug" | "review", "bug" | "review">;
|
|
1248
|
+
acceptedAt: FieldBuilder<string, string>;
|
|
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
|
+
}>;
|
|
1206
1267
|
/** Safe facts used to reconstruct a representative in-game view server-side. */
|
|
1207
1268
|
declare const FeedbackGameReconstructionManifestSchema: Schema<{
|
|
1208
1269
|
reconstructionId: FieldBuilder<string, string>;
|
|
@@ -1356,4 +1417,4 @@ declare const FeedbackMaterializationManifestSchema: Schema<{
|
|
|
1356
1417
|
status: FieldBuilder<"published" | "corrected" | "no-op", "published" | "corrected" | "no-op">;
|
|
1357
1418
|
}>;
|
|
1358
1419
|
|
|
1359
|
-
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, 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 };
|
|
1420
|
+
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-
|
|
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",
|
|
@@ -644,6 +653,7 @@ var BASE64URL_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01
|
|
|
644
653
|
var BUG_HOUR_WINDOW_PATTERN = /^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])T(?:[01]\d|2[0-3])$/;
|
|
645
654
|
var REVIEW_DAY_WINDOW_PATTERN = /^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])$/;
|
|
646
655
|
var RECONCILIATION_WINDOW_PATTERN = /^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])T(?:[01]\d|2[0-3]):(?:[0-5]\d)$/;
|
|
656
|
+
var CANONICAL_SERVER_UTC_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/;
|
|
647
657
|
var strictOptions = {
|
|
648
658
|
version: FEEDBACK_CONTRACT_VERSION,
|
|
649
659
|
piiEnforcement: "strict",
|
|
@@ -651,6 +661,16 @@ var strictOptions = {
|
|
|
651
661
|
identity: "exact"
|
|
652
662
|
};
|
|
653
663
|
var uuidField = () => field.string().validator((value) => OPAQUE_UUID_V4_PATTERN.test(value)).description("Opaque UUID generated for the feedback workflow");
|
|
664
|
+
var isCanonicalServerUtc = (value) => {
|
|
665
|
+
if (typeof value !== "string" || !CANONICAL_SERVER_UTC_PATTERN.test(value)) {
|
|
666
|
+
return false;
|
|
667
|
+
}
|
|
668
|
+
const timestamp = Date.parse(value);
|
|
669
|
+
return Number.isFinite(timestamp) && new Date(timestamp).toISOString() === value;
|
|
670
|
+
};
|
|
671
|
+
var canonicalServerUtcField = () => field.dateTimeISO().validator(isCanonicalServerUtc).description(
|
|
672
|
+
"Canonical millisecond-precision UTC timestamp supplied by the trusted server"
|
|
673
|
+
);
|
|
654
674
|
var draftIdField = () => field.string().validator((value) => OPAQUE_UUID_V4_PATTERN.test(value)).description("Opaque identifier for one short-lived structured draft").PID({
|
|
655
675
|
classification: "low",
|
|
656
676
|
action: "none",
|
|
@@ -1314,6 +1334,52 @@ var FeedbackReviewPacketSchema = createSchema(
|
|
|
1314
1334
|
schemaValidator: (value) => value.analysis === void 0 || isAnalysisProjectionConsistent(value.analysis)
|
|
1315
1335
|
}
|
|
1316
1336
|
);
|
|
1337
|
+
var FeedbackCommittedAcceptanceEvidenceSchema = createSchema(
|
|
1338
|
+
{
|
|
1339
|
+
packetId: uuidField(),
|
|
1340
|
+
packetKind: field.string().enum(["bug", "review"]),
|
|
1341
|
+
acceptedAt: canonicalServerUtcField()
|
|
1342
|
+
},
|
|
1343
|
+
"feedback-committed-acceptance-evidence",
|
|
1344
|
+
strictOptions
|
|
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
|
+
);
|
|
1317
1383
|
var FeedbackGameReconstructionManifestSchema = createSchema(
|
|
1318
1384
|
{
|
|
1319
1385
|
reconstructionId: uuidField(),
|
|
@@ -1438,20 +1504,10 @@ var FeedbackHourlyBugReportSchema = createSchema(
|
|
|
1438
1504
|
abuseBlockBands: field.array(
|
|
1439
1505
|
field.object(
|
|
1440
1506
|
distributionShape(
|
|
1441
|
-
() => field.string().enum(
|
|
1442
|
-
[
|
|
1443
|
-
"five-minutes",
|
|
1444
|
-
"fifteen-minutes",
|
|
1445
|
-
"one-hour",
|
|
1446
|
-
"six-hours",
|
|
1447
|
-
"twenty-four-hours",
|
|
1448
|
-
"fail-closed",
|
|
1449
|
-
"edge-blocked"
|
|
1450
|
-
]
|
|
1451
|
-
)
|
|
1507
|
+
() => field.string().enum(FEEDBACK_ABUSE_BLOCK_BANDS)
|
|
1452
1508
|
)
|
|
1453
1509
|
)
|
|
1454
|
-
).max(
|
|
1510
|
+
).max(FEEDBACK_ABUSE_BLOCK_BANDS.length),
|
|
1455
1511
|
comparison: field.object({
|
|
1456
1512
|
previousHourRatio: field.number().min(0).max(1e3),
|
|
1457
1513
|
sevenDaySameHourRatio: field.number().min(0).max(1e3)
|
|
@@ -1771,6 +1827,7 @@ var FeedbackMaterializationManifestSchema = createSchema(
|
|
|
1771
1827
|
}
|
|
1772
1828
|
);
|
|
1773
1829
|
export {
|
|
1830
|
+
FEEDBACK_ABUSE_BLOCK_BANDS,
|
|
1774
1831
|
FEEDBACK_ANALYSIS_MODEL_VERSIONS,
|
|
1775
1832
|
FEEDBACK_BACKEND_BUCKETS,
|
|
1776
1833
|
FEEDBACK_BUG_COOLDOWN_SECONDS,
|
|
@@ -1802,8 +1859,10 @@ export {
|
|
|
1802
1859
|
FEEDBACK_VIEWPORT_BUCKETS,
|
|
1803
1860
|
FeedbackAcceptanceReceiptSchema,
|
|
1804
1861
|
FeedbackAnalysisReceiptSchema,
|
|
1862
|
+
FeedbackBugHealthMetricsProjectionSchema,
|
|
1805
1863
|
FeedbackBugPacketSchema,
|
|
1806
1864
|
FeedbackBugSubmissionRequestSchema,
|
|
1865
|
+
FeedbackCommittedAcceptanceEvidenceSchema,
|
|
1807
1866
|
FeedbackContextSchema,
|
|
1808
1867
|
FeedbackDailySatisfactionReportSchema,
|
|
1809
1868
|
FeedbackDerivedAnalysisSchema,
|