@bunizao/contracts 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/comments.d.ts +8 -5
- package/dist/content.d.ts +17 -0
- package/dist/mood.d.ts +0 -7
- package/dist/notify.d.ts +12 -0
- package/package.json +1 -1
package/dist/comments.d.ts
CHANGED
|
@@ -64,7 +64,8 @@ export interface ReaderMe {
|
|
|
64
64
|
has been handed out -- the client then draws from the name. */
|
|
65
65
|
avatarSeed: number | null;
|
|
66
66
|
notifyReplies: boolean;
|
|
67
|
-
/** Whether this address holds an active
|
|
67
|
+
/** Whether this address holds an active subscription that includes the blog
|
|
68
|
+
channel -- the reader switch is "latest posts", so mood alone reads false. */
|
|
68
69
|
subscribed: boolean;
|
|
69
70
|
}
|
|
70
71
|
export interface ReaderMeResult {
|
|
@@ -453,8 +454,9 @@ export interface CommentPolicy {
|
|
|
453
454
|
Independent of `mode`: a post can take reactions with comments off, and
|
|
454
455
|
an open thread can refuse them. */
|
|
455
456
|
reactions: boolean;
|
|
456
|
-
/**
|
|
457
|
-
|
|
457
|
+
/** Publish a comment only from an address that has been verified. An
|
|
458
|
+
anonymous writer must give an address, and the comment is held until
|
|
459
|
+
they confirm it; one with no address is refused. */
|
|
458
460
|
requireVerifiedEmail: boolean;
|
|
459
461
|
}
|
|
460
462
|
export declare const DEFAULT_COMMENT_POLICY: CommentPolicy;
|
|
@@ -464,8 +466,9 @@ export declare const COMMENT_POLICY_TAGS: {
|
|
|
464
466
|
readonly 'no-comments': (policy: CommentPolicy) => CommentPolicy;
|
|
465
467
|
readonly 'reactions-off': (policy: CommentPolicy) => {
|
|
466
468
|
mode: CommentsMode;
|
|
467
|
-
/**
|
|
468
|
-
|
|
469
|
+
/** Publish a comment only from an address that has been verified. An
|
|
470
|
+
anonymous writer must give an address, and the comment is held until
|
|
471
|
+
they confirm it; one with no address is refused. */
|
|
469
472
|
requireVerifiedEmail: boolean;
|
|
470
473
|
reactions: false;
|
|
471
474
|
};
|
package/dist/content.d.ts
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
export declare const CONTENT_DOCUMENT_SOURCES: readonly ['mood', 'post'];
|
|
2
2
|
export type ContentDocumentSource = (typeof CONTENT_DOCUMENT_SOURCES)[number];
|
|
3
|
+
/** Public read aggregates since analytics collection began. */
|
|
4
|
+
export interface BlogStats {
|
|
5
|
+
generatedAt: string;
|
|
6
|
+
/** Null until the first event has been recorded. */
|
|
7
|
+
since: string | null;
|
|
8
|
+
totals: {
|
|
9
|
+
reads: number;
|
|
10
|
+
readers: number;
|
|
11
|
+
completed: number;
|
|
12
|
+
};
|
|
13
|
+
posts: {
|
|
14
|
+
slug: string;
|
|
15
|
+
reads: number;
|
|
16
|
+
completed: number;
|
|
17
|
+
medianDwellMs: number;
|
|
18
|
+
}[];
|
|
19
|
+
}
|
|
3
20
|
export interface PostLocaleTag {
|
|
4
21
|
locale: string;
|
|
5
22
|
canonicalSlug?: string;
|
package/dist/mood.d.ts
CHANGED
|
@@ -22,16 +22,9 @@ export interface MoodStatsActivityBucket {
|
|
|
22
22
|
date: string;
|
|
23
23
|
count: number;
|
|
24
24
|
}
|
|
25
|
-
export interface MoodStatsSentimentBucket {
|
|
26
|
-
bucketStart: string;
|
|
27
|
-
avgValence: number | null;
|
|
28
|
-
dominantLabel: MoodSentimentLabel | null;
|
|
29
|
-
scoredCount: number;
|
|
30
|
-
}
|
|
31
25
|
export interface MoodStatsSnapshot {
|
|
32
26
|
activity: MoodStatsActivityBucket[];
|
|
33
27
|
rhythm: number[][];
|
|
34
|
-
sentimentTimeline: MoodStatsSentimentBucket[];
|
|
35
28
|
streaks: {
|
|
36
29
|
current: number;
|
|
37
30
|
longest: number;
|
package/dist/notify.d.ts
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
|
+
import type { ClientEvidence } from './comments';
|
|
1
2
|
export type SubscriberStatus = 'pending' | 'active' | 'unsubscribed';
|
|
2
3
|
export type DeliveryMode = 'immediate' | 'every_5h' | 'daily';
|
|
3
4
|
export type NotifyChannel = 'mood' | 'blog' | 'privacy' | 'announcement';
|
|
4
5
|
export type NotifyAuditEventType = 'subscribe_requested' | 'subscription_confirmed' | 'unsubscribed' | 'email_change_requested' | 'email_changed' | 'admin_create' | 'admin_update' | 'admin_delete' | 'admin_resend_confirm' | 'broadcast_sent';
|
|
5
6
|
export declare const NOTIFY_CHANNELS: readonly NotifyChannel[];
|
|
7
|
+
/** Optional risk evidence preserves compatibility with existing clients. */
|
|
8
|
+
export interface SubscribeRequest extends ClientEvidence {
|
|
9
|
+
email: string;
|
|
10
|
+
turnstileToken?: string;
|
|
11
|
+
channels?: NotifyChannel[];
|
|
12
|
+
deliveryMode?: DeliveryMode;
|
|
13
|
+
timezone?: string;
|
|
14
|
+
dailyHour?: number;
|
|
15
|
+
website?: string;
|
|
16
|
+
dwellToken?: string;
|
|
17
|
+
}
|
|
6
18
|
export interface SubscriberRecord {
|
|
7
19
|
email: string;
|
|
8
20
|
emailHash: string;
|