@antiphony/shared 0.1.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/LICENSE +21 -0
- package/README.md +50 -0
- package/dist/cjs/api-codecs.cjs +971 -0
- package/dist/cjs/api-codecs.d.cts +542 -0
- package/dist/cjs/errors/index.cjs +56 -0
- package/dist/cjs/errors/index.d.cts +45 -0
- package/dist/cjs/index.cjs +1276 -0
- package/dist/cjs/index.d.cts +11 -0
- package/dist/cjs/nsid.cjs +37 -0
- package/dist/cjs/nsid.d.cts +42 -0
- package/dist/cjs/observability/index.cjs +58 -0
- package/dist/cjs/observability/index.d.cts +1 -0
- package/dist/cjs/observability/report-error.cjs +58 -0
- package/dist/cjs/observability/report-error.d.cts +48 -0
- package/dist/cjs/types/api.cjs +726 -0
- package/dist/cjs/types/api.d.cts +494 -0
- package/dist/cjs/types/audio.cjs +835 -0
- package/dist/cjs/types/audio.d.cts +1149 -0
- package/dist/cjs/types/blob.cjs +23 -0
- package/dist/cjs/types/blob.d.cts +45 -0
- package/dist/cjs/types/channels.cjs +170 -0
- package/dist/cjs/types/channels.d.cts +262 -0
- package/dist/cjs/types/records.cjs +407 -0
- package/dist/cjs/types/records.d.cts +840 -0
- package/dist/cjs/types/storage.cjs +414 -0
- package/dist/cjs/types/storage.d.cts +197 -0
- package/dist/cjs/types/views.cjs +820 -0
- package/dist/cjs/types/views.d.cts +9806 -0
- package/dist/cjs/utils/index.cjs +8 -0
- package/dist/cjs/utils/index.d.cts +7 -0
- package/dist/esm/api-codecs.d.ts +542 -0
- package/dist/esm/api-codecs.js +6 -0
- package/dist/esm/chunk-24KIXQZK.js +6 -0
- package/dist/esm/chunk-3WZJXJNU.js +378 -0
- package/dist/esm/chunk-5EHV73BA.js +20 -0
- package/dist/esm/chunk-72G3LBUQ.js +1 -0
- package/dist/esm/chunk-7LW2FHLD.js +48 -0
- package/dist/esm/chunk-7V44CPRR.js +132 -0
- package/dist/esm/chunk-BUNMR4ZO.js +127 -0
- package/dist/esm/chunk-EA4OONDV.js +380 -0
- package/dist/esm/chunk-F2CANZZ7.js +40 -0
- package/dist/esm/chunk-ORMEWXMH.js +33 -0
- package/dist/esm/chunk-TIZRJORN.js +24 -0
- package/dist/esm/chunk-XDBKR6LW.js +32 -0
- package/dist/esm/errors/index.d.ts +45 -0
- package/dist/esm/errors/index.js +2 -0
- package/dist/esm/index.d.ts +11 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/nsid.d.ts +42 -0
- package/dist/esm/nsid.js +2 -0
- package/dist/esm/observability/index.d.ts +1 -0
- package/dist/esm/observability/index.js +3 -0
- package/dist/esm/observability/report-error.d.ts +48 -0
- package/dist/esm/observability/report-error.js +2 -0
- package/dist/esm/types/api.d.ts +494 -0
- package/dist/esm/types/api.js +5 -0
- package/dist/esm/types/audio.d.ts +1149 -0
- package/dist/esm/types/audio.js +5 -0
- package/dist/esm/types/blob.d.ts +45 -0
- package/dist/esm/types/blob.js +2 -0
- package/dist/esm/types/channels.d.ts +262 -0
- package/dist/esm/types/channels.js +162 -0
- package/dist/esm/types/records.d.ts +840 -0
- package/dist/esm/types/records.js +3 -0
- package/dist/esm/types/storage.d.ts +197 -0
- package/dist/esm/types/storage.js +26 -0
- package/dist/esm/types/views.d.ts +9806 -0
- package/dist/esm/types/views.js +4 -0
- package/dist/esm/utils/index.d.ts +7 -0
- package/dist/esm/utils/index.js +2 -0
- package/package.json +82 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { BadgeResetRequestSchema, BulkReplyActionRequestSchema, ConnectorConfigInputSchema, ConnectorConfigUpdateSchema, CreateAudioPostRequest, CreateAudioPostRequestSchema, CreateOrgInviteRequestSchema, CreateOrgRequestSchema, CreatePromptRequestSchema, FcmTokenRequestSchema, PersonMergeRequestSchema, PersonNotesUpdateSchema, ScreeningRuleInputSchema, ScreeningRuleUpdateSchema, SwitchOrgRequestSchema, UpdateMemberRoleRequestSchema, UpdateOrgRequestSchema, UpdateProfileRequestSchema, UpdateReplyStatusRequestSchema } from './api-codecs.js';
|
|
2
|
+
export { CallForwardingConfig, CallForwardingConfigSchema, ConnectorConfigRecord, ConnectorConfigRecordSchema, ConnectorStatus, ConnectorStatusSchema, ConnectorType, ConnectorTypeSchema, FirestoreTimestamp, FirestoreTimestampSchema, OrgInviteRecord, OrgInviteRecordSchema, OrganizationMemberRecord, OrganizationMemberRecordSchema, OrganizationRecord, OrganizationRecordSchema, PersonEnrichmentRecord, PersonEnrichmentRecordSchema, PromptRecord, PromptRecordSchema, ReplyEnrichmentRecord, ReplyEnrichmentRecordSchema, ReplyRecord, ReplyRecordSchema, ScreeningRuleRecord, ScreeningRuleRecordSchema, SipEnrichment, SipEnrichmentSchema, UserRecord, UserRecordSchema, httpsUrl } from './types/records.js';
|
|
3
|
+
export { ContactCrmData, EnrichedReplier, EnrichedReplierSchema, HandleResolution, HandleResolutionSchema, OrgInviteView, OrgInviteViewSchema, OrgProfileData, OrgProfileDataSchema, OrganizationMemberView, OrganizationMemberViewSchema, OrganizationView, OrganizationViewSchema, ProfileView, ProfileViewAdmin, ProfileViewAdminSchema, ProfileViewBasic, ProfileViewBasicSchema, ProfileViewDetailed, ProfileViewDetailedSchema, ProfileViewSchema, ProfileViewSelf, ProfileViewSelfSchema, PromptRepliers, PromptRepliersSchema, PromptView, PromptViewPublic, PromptViewPublicSchema, PromptViewSchema, PromptWithReplies, PromptWithRepliesSchema, Replier, ReplierSchema, ReplyView, ReplyViewPublic, ReplyViewPublicSchema, ReplyViewSchema, RssSummary, RssSummarySchema, UserProfileData, UserProfileDataSchema, VoxPopEmbedWidgetProps, toProfileViewBasic, toPromptViewPublic, toReplyViewPublic } from './types/views.js';
|
|
4
|
+
export { ActorProfileRecord, ActorProfileRecordSchema, AudioEmbed, AudioEmbedSchema, AudioEmbedView, AudioEmbedViewSchema, AudioPostRecord, AudioPostRecordSchema, AudioPostView, AudioPostViewSchema, PostRecordPublic, PostRecordPublicSchema, ReplyRef, ReplyRefSchema, StrongRef, StrongRefSchema, TimedTranscript, TimedTranscriptSchema, TranscriptEnrichmentRecord, TranscriptEnrichmentRecordSchema, TranscriptSegment, TranscriptSegmentSchema, ViewerState, ViewerStateSchema } from './types/audio.js';
|
|
5
|
+
export { BlobRef, BlobRefSchema, resolveAudioUrl } from './types/blob.js';
|
|
6
|
+
export { ActorView, ActorViewSchema, PublicProfileDto, PublicProfileDtoSchema, PublicReplyDto, PublicReplyDtoSchema } from './types/api.js';
|
|
7
|
+
export { COLLECTIONS, EMBED_NSID, NSID, NsidValue, nsidForCollection } from './nsid.js';
|
|
8
|
+
export { ConflictError, ForbiddenError, NotFoundError, RateLimitError, ServiceError, UnauthorizedError, ValidationError } from './errors/index.js';
|
|
9
|
+
export { isFirestoreTimestamp } from './utils/index.js';
|
|
10
|
+
export { ReportedErrorEvent, buildReportedErrorEvent, reportError } from './observability/report-error.js';
|
|
11
|
+
import 'zod';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { isFirestoreTimestamp } from './chunk-24KIXQZK.js';
|
|
2
|
+
export { BadgeResetRequestSchema, BulkReplyActionRequestSchema, ConnectorConfigInputSchema, ConnectorConfigUpdateSchema, CreateAudioPostRequestSchema, CreateOrgInviteRequestSchema, CreateOrgRequestSchema, CreatePromptRequestSchema, FcmTokenRequestSchema, PersonMergeRequestSchema, PersonNotesUpdateSchema, ScreeningRuleInputSchema, ScreeningRuleUpdateSchema, SwitchOrgRequestSchema, UpdateMemberRoleRequestSchema, UpdateOrgRequestSchema, UpdateProfileRequestSchema, UpdateReplyStatusRequestSchema } from './chunk-7V44CPRR.js';
|
|
3
|
+
export { COLLECTIONS, EMBED_NSID, NSID, nsidForCollection } from './chunk-XDBKR6LW.js';
|
|
4
|
+
export { ConflictError, ForbiddenError, NotFoundError, RateLimitError, ServiceError, UnauthorizedError, ValidationError } from './chunk-7LW2FHLD.js';
|
|
5
|
+
import './chunk-72G3LBUQ.js';
|
|
6
|
+
export { buildReportedErrorEvent, reportError } from './chunk-F2CANZZ7.js';
|
|
7
|
+
export { ActorViewSchema, PublicProfileDtoSchema, PublicReplyDtoSchema } from './chunk-TIZRJORN.js';
|
|
8
|
+
export { ActorProfileRecordSchema, AudioEmbedSchema, AudioEmbedViewSchema, AudioPostRecordSchema, AudioPostViewSchema, PostRecordPublicSchema, ReplyRefSchema, StrongRefSchema, TimedTranscriptSchema, TranscriptEnrichmentRecordSchema, TranscriptSegmentSchema, ViewerStateSchema } from './chunk-BUNMR4ZO.js';
|
|
9
|
+
export { EnrichedReplierSchema, HandleResolutionSchema, OrgInviteViewSchema, OrgProfileDataSchema, OrganizationMemberViewSchema, OrganizationViewSchema, ProfileViewAdminSchema, ProfileViewBasicSchema, ProfileViewDetailedSchema, ProfileViewSchema, ProfileViewSelfSchema, PromptRepliersSchema, PromptViewPublicSchema, PromptViewSchema, PromptWithRepliesSchema, ReplierSchema, ReplyViewPublicSchema, ReplyViewSchema, RssSummarySchema, UserProfileDataSchema, toProfileViewBasic, toPromptViewPublic, toReplyViewPublic } from './chunk-EA4OONDV.js';
|
|
10
|
+
export { CallForwardingConfigSchema, ConnectorConfigRecordSchema, ConnectorStatusSchema, ConnectorTypeSchema, FirestoreTimestampSchema, OrgInviteRecordSchema, OrganizationMemberRecordSchema, OrganizationRecordSchema, PersonEnrichmentRecordSchema, PromptRecordSchema, ReplyEnrichmentRecordSchema, ReplyRecordSchema, ScreeningRuleRecordSchema, SipEnrichmentSchema, UserRecordSchema, httpsUrl } from './chunk-3WZJXJNU.js';
|
|
11
|
+
export { BlobRefSchema, resolveAudioUrl } from './chunk-5EHV73BA.js';
|
|
12
|
+
import './chunk-ORMEWXMH.js';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AT Protocol Namespaced Identifiers (NSIDs) for Vox Pop record types.
|
|
3
|
+
*
|
|
4
|
+
* NSIDs are the canonical way to identify record types in AT Protocol.
|
|
5
|
+
* This mapping connects AT Protocol NSIDs to Firestore collection names,
|
|
6
|
+
* creating a single source of truth for the relationship.
|
|
7
|
+
*
|
|
8
|
+
* @see https://atproto.com/specs/nsid
|
|
9
|
+
*/
|
|
10
|
+
declare const NSID: {
|
|
11
|
+
readonly Prompt: "com.voxpop.audio.prompt";
|
|
12
|
+
readonly Reply: "com.voxpop.audio.reply";
|
|
13
|
+
readonly Profile: "com.voxpop.actor.profile";
|
|
14
|
+
readonly AudioPost: "dev.antiphony.audio.post";
|
|
15
|
+
readonly AudioTranscript: "dev.antiphony.audio.transcript";
|
|
16
|
+
readonly ActorProfile: "dev.antiphony.actor.profile";
|
|
17
|
+
};
|
|
18
|
+
type NsidValue = typeof NSID[keyof typeof NSID];
|
|
19
|
+
/**
|
|
20
|
+
* Antiphony embed NSIDs. Embeds live inline on a post's `embed` field, not in
|
|
21
|
+
* their own collection — kept out of `NSID`/`COLLECTIONS`.
|
|
22
|
+
*/
|
|
23
|
+
declare const EMBED_NSID: {
|
|
24
|
+
readonly Audio: "dev.antiphony.embed.audio";
|
|
25
|
+
readonly RecordWithAudio: "dev.antiphony.embed.recordWithAudio";
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Maps AT Protocol record-type NSIDs to Firestore collection names.
|
|
29
|
+
* When migrating to a PDS, this mapping becomes the adapter layer.
|
|
30
|
+
*
|
|
31
|
+
* Note: `dev.antiphony.actor.profile` and the legacy `com.voxpop.actor.profile`
|
|
32
|
+
* both map to `users`. `nsidForCollection('users')` returns the legacy NSID
|
|
33
|
+
* (listed first) — preserving today's reverse-lookup behavior until Stream 4
|
|
34
|
+
* removes the legacy entry.
|
|
35
|
+
*/
|
|
36
|
+
declare const COLLECTIONS: Record<NsidValue, string>;
|
|
37
|
+
/**
|
|
38
|
+
* Reverse lookup: get the NSID for a Firestore collection name.
|
|
39
|
+
*/
|
|
40
|
+
declare function nsidForCollection(collection: string): NsidValue | undefined;
|
|
41
|
+
|
|
42
|
+
export { COLLECTIONS, EMBED_NSID, NSID, type NsidValue, nsidForCollection };
|
package/dist/esm/nsid.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ReportedErrorEvent, buildReportedErrorEvent, reportError } from './report-error.js';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GCP Cloud Error Reporting integration — log-based, dependency-free.
|
|
3
|
+
*
|
|
4
|
+
* Cloud Error Reporting auto-ingests Cloud Logging entries shaped as a
|
|
5
|
+
* `ReportedErrorEvent`. On Firebase App Hosting (Cloud Run), single-line JSON
|
|
6
|
+
* written to stderr lands in Cloud Logging automatically — so emitting a
|
|
7
|
+
* correctly-shaped line is all it takes to surface a grouped, deduplicated
|
|
8
|
+
* error in the Error Reporting console. No SDK, no auth, no secrets (the
|
|
9
|
+
* `@google-cloud/error-reporting` library would add a gRPC client + cold-start
|
|
10
|
+
* weight + credential config for the same outcome on serverless).
|
|
11
|
+
*
|
|
12
|
+
* See https://cloud.google.com/error-reporting/docs/formatting-error-messages
|
|
13
|
+
*
|
|
14
|
+
* Grouping rules we satisfy:
|
|
15
|
+
* - `severity` must be ERROR or higher.
|
|
16
|
+
* - `message` must contain a full stack trace (that's what Error Reporting
|
|
17
|
+
* fingerprints on); we fall back to "name: message" when no stack exists,
|
|
18
|
+
* which still surfaces, just grouped less precisely.
|
|
19
|
+
* - `serviceContext.service` separates errors per deployable
|
|
20
|
+
* (core-api / web / public), so each app's errors are tracked apart.
|
|
21
|
+
*
|
|
22
|
+
* This module only ever *runs* from server code (core-api error-handler,
|
|
23
|
+
* Next instrumentation hooks, /api/client-error route handlers). It has no
|
|
24
|
+
* Node-only or heavy imports, so it stays safe to live in the shared package.
|
|
25
|
+
*/
|
|
26
|
+
interface ReportedErrorEvent {
|
|
27
|
+
severity: 'ERROR';
|
|
28
|
+
'@type': string;
|
|
29
|
+
message: string;
|
|
30
|
+
serviceContext: {
|
|
31
|
+
service: string;
|
|
32
|
+
version: string;
|
|
33
|
+
};
|
|
34
|
+
context?: Record<string, unknown>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Build the `ReportedErrorEvent` payload. Exported for unit testing; most
|
|
38
|
+
* callers want `reportError` instead.
|
|
39
|
+
*/
|
|
40
|
+
declare function buildReportedErrorEvent(err: unknown, context?: Record<string, unknown>): ReportedErrorEvent;
|
|
41
|
+
/**
|
|
42
|
+
* Report an error to GCP Error Reporting by emitting a single-line
|
|
43
|
+
* ReportedErrorEvent to stderr. Best-effort and total — a failure inside the
|
|
44
|
+
* reporter is swallowed so it can never mask the original error.
|
|
45
|
+
*/
|
|
46
|
+
declare function reportError(err: unknown, context?: Record<string, unknown>): void;
|
|
47
|
+
|
|
48
|
+
export { type ReportedErrorEvent, buildReportedErrorEvent, reportError };
|
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Public Profile DTO — the public-facing profile shape.
|
|
5
|
+
* Equivalent to ProfileViewBasicSchema plus a few enrichment fields.
|
|
6
|
+
*/
|
|
7
|
+
declare const PublicProfileDtoSchema: z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
|
+
displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
|
+
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
|
+
bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
|
+
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
15
|
+
label: z.ZodString;
|
|
16
|
+
url: z.ZodString;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
label: string;
|
|
19
|
+
url: string;
|
|
20
|
+
}, {
|
|
21
|
+
label: string;
|
|
22
|
+
url: string;
|
|
23
|
+
}>, "many">>;
|
|
24
|
+
stats: z.ZodOptional<z.ZodObject<{
|
|
25
|
+
followers: z.ZodDefault<z.ZodNumber>;
|
|
26
|
+
following: z.ZodDefault<z.ZodNumber>;
|
|
27
|
+
prompts: z.ZodDefault<z.ZodNumber>;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
followers: number;
|
|
30
|
+
following: number;
|
|
31
|
+
prompts: number;
|
|
32
|
+
}, {
|
|
33
|
+
followers?: number | undefined;
|
|
34
|
+
following?: number | undefined;
|
|
35
|
+
prompts?: number | undefined;
|
|
36
|
+
}>>;
|
|
37
|
+
badges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
38
|
+
isVerified: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
createdAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
|
|
40
|
+
} & {
|
|
41
|
+
bluesky: z.ZodOptional<z.ZodObject<{
|
|
42
|
+
handle: z.ZodString;
|
|
43
|
+
did: z.ZodString;
|
|
44
|
+
}, "strip", z.ZodTypeAny, {
|
|
45
|
+
handle: string;
|
|
46
|
+
did: string;
|
|
47
|
+
}, {
|
|
48
|
+
handle: string;
|
|
49
|
+
did: string;
|
|
50
|
+
}>>;
|
|
51
|
+
rssFeedUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
52
|
+
}, "strip", z.ZodTypeAny, {
|
|
53
|
+
id: string;
|
|
54
|
+
handle?: string | null | undefined;
|
|
55
|
+
displayName?: string | null | undefined;
|
|
56
|
+
bio?: string | null | undefined;
|
|
57
|
+
avatarUrl?: string | null | undefined;
|
|
58
|
+
website?: string | null | undefined;
|
|
59
|
+
links?: {
|
|
60
|
+
label: string;
|
|
61
|
+
url: string;
|
|
62
|
+
}[] | undefined;
|
|
63
|
+
createdAt?: Date | undefined;
|
|
64
|
+
rssFeedUrl?: string | null | undefined;
|
|
65
|
+
bluesky?: {
|
|
66
|
+
handle: string;
|
|
67
|
+
did: string;
|
|
68
|
+
} | undefined;
|
|
69
|
+
stats?: {
|
|
70
|
+
followers: number;
|
|
71
|
+
following: number;
|
|
72
|
+
prompts: number;
|
|
73
|
+
} | undefined;
|
|
74
|
+
badges?: string[] | undefined;
|
|
75
|
+
isVerified?: boolean | undefined;
|
|
76
|
+
}, {
|
|
77
|
+
id: string;
|
|
78
|
+
handle?: string | null | undefined;
|
|
79
|
+
displayName?: string | null | undefined;
|
|
80
|
+
bio?: string | null | undefined;
|
|
81
|
+
avatarUrl?: string | null | undefined;
|
|
82
|
+
website?: string | null | undefined;
|
|
83
|
+
links?: {
|
|
84
|
+
label: string;
|
|
85
|
+
url: string;
|
|
86
|
+
}[] | undefined;
|
|
87
|
+
createdAt?: unknown;
|
|
88
|
+
rssFeedUrl?: string | null | undefined;
|
|
89
|
+
bluesky?: {
|
|
90
|
+
handle: string;
|
|
91
|
+
did: string;
|
|
92
|
+
} | undefined;
|
|
93
|
+
stats?: {
|
|
94
|
+
followers?: number | undefined;
|
|
95
|
+
following?: number | undefined;
|
|
96
|
+
prompts?: number | undefined;
|
|
97
|
+
} | undefined;
|
|
98
|
+
badges?: string[] | undefined;
|
|
99
|
+
isVerified?: boolean | undefined;
|
|
100
|
+
}>;
|
|
101
|
+
type PublicProfileDto = z.infer<typeof PublicProfileDtoSchema>;
|
|
102
|
+
/**
|
|
103
|
+
* Public Reply DTO
|
|
104
|
+
* Excludes internal fields or sensitive metadata if any.
|
|
105
|
+
*/
|
|
106
|
+
declare const PublicReplyDtoSchema: z.ZodObject<{
|
|
107
|
+
id: z.ZodString;
|
|
108
|
+
audioUrl: z.ZodString;
|
|
109
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
110
|
+
createdAt: z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>;
|
|
111
|
+
transcription: z.ZodOptional<z.ZodString>;
|
|
112
|
+
sentiment: z.ZodOptional<z.ZodEnum<["Positive", "Negative", "Neutral"]>>;
|
|
113
|
+
aiSummary: z.ZodOptional<z.ZodString>;
|
|
114
|
+
author: z.ZodObject<{
|
|
115
|
+
id: z.ZodString;
|
|
116
|
+
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
117
|
+
displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
118
|
+
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
119
|
+
bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
|
+
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
121
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
122
|
+
label: z.ZodString;
|
|
123
|
+
url: z.ZodString;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
label: string;
|
|
126
|
+
url: string;
|
|
127
|
+
}, {
|
|
128
|
+
label: string;
|
|
129
|
+
url: string;
|
|
130
|
+
}>, "many">>;
|
|
131
|
+
stats: z.ZodOptional<z.ZodObject<{
|
|
132
|
+
followers: z.ZodDefault<z.ZodNumber>;
|
|
133
|
+
following: z.ZodDefault<z.ZodNumber>;
|
|
134
|
+
prompts: z.ZodDefault<z.ZodNumber>;
|
|
135
|
+
}, "strip", z.ZodTypeAny, {
|
|
136
|
+
followers: number;
|
|
137
|
+
following: number;
|
|
138
|
+
prompts: number;
|
|
139
|
+
}, {
|
|
140
|
+
followers?: number | undefined;
|
|
141
|
+
following?: number | undefined;
|
|
142
|
+
prompts?: number | undefined;
|
|
143
|
+
}>>;
|
|
144
|
+
badges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
145
|
+
isVerified: z.ZodOptional<z.ZodBoolean>;
|
|
146
|
+
createdAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
|
|
147
|
+
} & {
|
|
148
|
+
bluesky: z.ZodOptional<z.ZodObject<{
|
|
149
|
+
handle: z.ZodString;
|
|
150
|
+
did: z.ZodString;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
handle: string;
|
|
153
|
+
did: string;
|
|
154
|
+
}, {
|
|
155
|
+
handle: string;
|
|
156
|
+
did: string;
|
|
157
|
+
}>>;
|
|
158
|
+
rssFeedUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
159
|
+
}, "strip", z.ZodTypeAny, {
|
|
160
|
+
id: string;
|
|
161
|
+
handle?: string | null | undefined;
|
|
162
|
+
displayName?: string | null | undefined;
|
|
163
|
+
bio?: string | null | undefined;
|
|
164
|
+
avatarUrl?: string | null | undefined;
|
|
165
|
+
website?: string | null | undefined;
|
|
166
|
+
links?: {
|
|
167
|
+
label: string;
|
|
168
|
+
url: string;
|
|
169
|
+
}[] | undefined;
|
|
170
|
+
createdAt?: Date | undefined;
|
|
171
|
+
rssFeedUrl?: string | null | undefined;
|
|
172
|
+
bluesky?: {
|
|
173
|
+
handle: string;
|
|
174
|
+
did: string;
|
|
175
|
+
} | undefined;
|
|
176
|
+
stats?: {
|
|
177
|
+
followers: number;
|
|
178
|
+
following: number;
|
|
179
|
+
prompts: number;
|
|
180
|
+
} | undefined;
|
|
181
|
+
badges?: string[] | undefined;
|
|
182
|
+
isVerified?: boolean | undefined;
|
|
183
|
+
}, {
|
|
184
|
+
id: string;
|
|
185
|
+
handle?: string | null | undefined;
|
|
186
|
+
displayName?: string | null | undefined;
|
|
187
|
+
bio?: string | null | undefined;
|
|
188
|
+
avatarUrl?: string | null | undefined;
|
|
189
|
+
website?: string | null | undefined;
|
|
190
|
+
links?: {
|
|
191
|
+
label: string;
|
|
192
|
+
url: string;
|
|
193
|
+
}[] | undefined;
|
|
194
|
+
createdAt?: unknown;
|
|
195
|
+
rssFeedUrl?: string | null | undefined;
|
|
196
|
+
bluesky?: {
|
|
197
|
+
handle: string;
|
|
198
|
+
did: string;
|
|
199
|
+
} | undefined;
|
|
200
|
+
stats?: {
|
|
201
|
+
followers?: number | undefined;
|
|
202
|
+
following?: number | undefined;
|
|
203
|
+
prompts?: number | undefined;
|
|
204
|
+
} | undefined;
|
|
205
|
+
badges?: string[] | undefined;
|
|
206
|
+
isVerified?: boolean | undefined;
|
|
207
|
+
}>;
|
|
208
|
+
}, "strip", z.ZodTypeAny, {
|
|
209
|
+
id: string;
|
|
210
|
+
createdAt: Date;
|
|
211
|
+
audioUrl: string;
|
|
212
|
+
author: {
|
|
213
|
+
id: string;
|
|
214
|
+
handle?: string | null | undefined;
|
|
215
|
+
displayName?: string | null | undefined;
|
|
216
|
+
bio?: string | null | undefined;
|
|
217
|
+
avatarUrl?: string | null | undefined;
|
|
218
|
+
website?: string | null | undefined;
|
|
219
|
+
links?: {
|
|
220
|
+
label: string;
|
|
221
|
+
url: string;
|
|
222
|
+
}[] | undefined;
|
|
223
|
+
createdAt?: Date | undefined;
|
|
224
|
+
rssFeedUrl?: string | null | undefined;
|
|
225
|
+
bluesky?: {
|
|
226
|
+
handle: string;
|
|
227
|
+
did: string;
|
|
228
|
+
} | undefined;
|
|
229
|
+
stats?: {
|
|
230
|
+
followers: number;
|
|
231
|
+
following: number;
|
|
232
|
+
prompts: number;
|
|
233
|
+
} | undefined;
|
|
234
|
+
badges?: string[] | undefined;
|
|
235
|
+
isVerified?: boolean | undefined;
|
|
236
|
+
};
|
|
237
|
+
aiSummary?: string | undefined;
|
|
238
|
+
transcription?: string | undefined;
|
|
239
|
+
sentiment?: "Positive" | "Negative" | "Neutral" | undefined;
|
|
240
|
+
duration?: number | undefined;
|
|
241
|
+
}, {
|
|
242
|
+
id: string;
|
|
243
|
+
audioUrl: string;
|
|
244
|
+
author: {
|
|
245
|
+
id: string;
|
|
246
|
+
handle?: string | null | undefined;
|
|
247
|
+
displayName?: string | null | undefined;
|
|
248
|
+
bio?: string | null | undefined;
|
|
249
|
+
avatarUrl?: string | null | undefined;
|
|
250
|
+
website?: string | null | undefined;
|
|
251
|
+
links?: {
|
|
252
|
+
label: string;
|
|
253
|
+
url: string;
|
|
254
|
+
}[] | undefined;
|
|
255
|
+
createdAt?: unknown;
|
|
256
|
+
rssFeedUrl?: string | null | undefined;
|
|
257
|
+
bluesky?: {
|
|
258
|
+
handle: string;
|
|
259
|
+
did: string;
|
|
260
|
+
} | undefined;
|
|
261
|
+
stats?: {
|
|
262
|
+
followers?: number | undefined;
|
|
263
|
+
following?: number | undefined;
|
|
264
|
+
prompts?: number | undefined;
|
|
265
|
+
} | undefined;
|
|
266
|
+
badges?: string[] | undefined;
|
|
267
|
+
isVerified?: boolean | undefined;
|
|
268
|
+
};
|
|
269
|
+
createdAt?: unknown;
|
|
270
|
+
aiSummary?: string | undefined;
|
|
271
|
+
transcription?: string | undefined;
|
|
272
|
+
sentiment?: "Positive" | "Negative" | "Neutral" | undefined;
|
|
273
|
+
duration?: number | undefined;
|
|
274
|
+
}>;
|
|
275
|
+
type PublicReplyDto = z.infer<typeof PublicReplyDtoSchema>;
|
|
276
|
+
/**
|
|
277
|
+
* Actor View — the full view returned to the authenticated user about themselves.
|
|
278
|
+
* Uses ProfileViewSelfSchema which includes private settings but not admin fields.
|
|
279
|
+
*/
|
|
280
|
+
declare const ActorViewSchema: z.ZodObject<{
|
|
281
|
+
id: z.ZodString;
|
|
282
|
+
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
283
|
+
displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
284
|
+
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
285
|
+
bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
286
|
+
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
287
|
+
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
288
|
+
label: z.ZodString;
|
|
289
|
+
url: z.ZodString;
|
|
290
|
+
}, "strip", z.ZodTypeAny, {
|
|
291
|
+
label: string;
|
|
292
|
+
url: string;
|
|
293
|
+
}, {
|
|
294
|
+
label: string;
|
|
295
|
+
url: string;
|
|
296
|
+
}>, "many">>;
|
|
297
|
+
stats: z.ZodOptional<z.ZodObject<{
|
|
298
|
+
followers: z.ZodDefault<z.ZodNumber>;
|
|
299
|
+
following: z.ZodDefault<z.ZodNumber>;
|
|
300
|
+
prompts: z.ZodDefault<z.ZodNumber>;
|
|
301
|
+
}, "strip", z.ZodTypeAny, {
|
|
302
|
+
followers: number;
|
|
303
|
+
following: number;
|
|
304
|
+
prompts: number;
|
|
305
|
+
}, {
|
|
306
|
+
followers?: number | undefined;
|
|
307
|
+
following?: number | undefined;
|
|
308
|
+
prompts?: number | undefined;
|
|
309
|
+
}>>;
|
|
310
|
+
badges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
311
|
+
isVerified: z.ZodOptional<z.ZodBoolean>;
|
|
312
|
+
createdAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
|
|
313
|
+
} & {
|
|
314
|
+
bluesky: z.ZodOptional<z.ZodObject<{
|
|
315
|
+
handle: z.ZodString;
|
|
316
|
+
did: z.ZodString;
|
|
317
|
+
}, "strip", z.ZodTypeAny, {
|
|
318
|
+
handle: string;
|
|
319
|
+
did: string;
|
|
320
|
+
}, {
|
|
321
|
+
handle: string;
|
|
322
|
+
did: string;
|
|
323
|
+
}>>;
|
|
324
|
+
usageIntent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
325
|
+
rssSummary: z.ZodOptional<z.ZodObject<{
|
|
326
|
+
title: z.ZodOptional<z.ZodString>;
|
|
327
|
+
description: z.ZodOptional<z.ZodString>;
|
|
328
|
+
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
329
|
+
title: z.ZodOptional<z.ZodString>;
|
|
330
|
+
link: z.ZodOptional<z.ZodString>;
|
|
331
|
+
content: z.ZodOptional<z.ZodString>;
|
|
332
|
+
pubDate: z.ZodOptional<z.ZodString>;
|
|
333
|
+
}, "strip", z.ZodTypeAny, {
|
|
334
|
+
title?: string | undefined;
|
|
335
|
+
link?: string | undefined;
|
|
336
|
+
content?: string | undefined;
|
|
337
|
+
pubDate?: string | undefined;
|
|
338
|
+
}, {
|
|
339
|
+
title?: string | undefined;
|
|
340
|
+
link?: string | undefined;
|
|
341
|
+
content?: string | undefined;
|
|
342
|
+
pubDate?: string | undefined;
|
|
343
|
+
}>, "many">>;
|
|
344
|
+
lastFetchedAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
|
|
345
|
+
}, "strip", z.ZodTypeAny, {
|
|
346
|
+
title?: string | undefined;
|
|
347
|
+
description?: string | undefined;
|
|
348
|
+
items?: {
|
|
349
|
+
title?: string | undefined;
|
|
350
|
+
link?: string | undefined;
|
|
351
|
+
content?: string | undefined;
|
|
352
|
+
pubDate?: string | undefined;
|
|
353
|
+
}[] | undefined;
|
|
354
|
+
lastFetchedAt?: Date | undefined;
|
|
355
|
+
}, {
|
|
356
|
+
title?: string | undefined;
|
|
357
|
+
description?: string | undefined;
|
|
358
|
+
items?: {
|
|
359
|
+
title?: string | undefined;
|
|
360
|
+
link?: string | undefined;
|
|
361
|
+
content?: string | undefined;
|
|
362
|
+
pubDate?: string | undefined;
|
|
363
|
+
}[] | undefined;
|
|
364
|
+
lastFetchedAt?: unknown;
|
|
365
|
+
}>>;
|
|
366
|
+
promptAudioUrl: z.ZodOptional<z.ZodString>;
|
|
367
|
+
totalPrompts: z.ZodOptional<z.ZodNumber>;
|
|
368
|
+
totalReplies: z.ZodOptional<z.ZodNumber>;
|
|
369
|
+
favoritePromptId: z.ZodOptional<z.ZodString>;
|
|
370
|
+
} & {
|
|
371
|
+
phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
372
|
+
email: z.ZodOptional<z.ZodString>;
|
|
373
|
+
lastSeenAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
|
|
374
|
+
lastActiveAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
|
|
375
|
+
unreadReplyCount: z.ZodDefault<z.ZodNumber>;
|
|
376
|
+
newReplierCount: z.ZodDefault<z.ZodNumber>;
|
|
377
|
+
tier: z.ZodOptional<z.ZodEnum<["free", "creator_pro"]>>;
|
|
378
|
+
showBlueskyPublicly: z.ZodOptional<z.ZodBoolean>;
|
|
379
|
+
settings: z.ZodOptional<z.ZodObject<{
|
|
380
|
+
notifications: z.ZodOptional<z.ZodBoolean>;
|
|
381
|
+
theme: z.ZodOptional<z.ZodString>;
|
|
382
|
+
}, "strip", z.ZodTypeAny, {
|
|
383
|
+
notifications?: boolean | undefined;
|
|
384
|
+
theme?: string | undefined;
|
|
385
|
+
}, {
|
|
386
|
+
notifications?: boolean | undefined;
|
|
387
|
+
theme?: string | undefined;
|
|
388
|
+
}>>;
|
|
389
|
+
}, "strip", z.ZodTypeAny, {
|
|
390
|
+
id: string;
|
|
391
|
+
unreadReplyCount: number;
|
|
392
|
+
newReplierCount: number;
|
|
393
|
+
handle?: string | null | undefined;
|
|
394
|
+
usageIntent?: string | null | undefined;
|
|
395
|
+
displayName?: string | null | undefined;
|
|
396
|
+
bio?: string | null | undefined;
|
|
397
|
+
avatarUrl?: string | null | undefined;
|
|
398
|
+
website?: string | null | undefined;
|
|
399
|
+
links?: {
|
|
400
|
+
label: string;
|
|
401
|
+
url: string;
|
|
402
|
+
}[] | undefined;
|
|
403
|
+
showBlueskyPublicly?: boolean | undefined;
|
|
404
|
+
createdAt?: Date | undefined;
|
|
405
|
+
tier?: "free" | "creator_pro" | undefined;
|
|
406
|
+
phoneNumber?: string | null | undefined;
|
|
407
|
+
settings?: {
|
|
408
|
+
notifications?: boolean | undefined;
|
|
409
|
+
theme?: string | undefined;
|
|
410
|
+
} | undefined;
|
|
411
|
+
email?: string | undefined;
|
|
412
|
+
bluesky?: {
|
|
413
|
+
handle: string;
|
|
414
|
+
did: string;
|
|
415
|
+
} | undefined;
|
|
416
|
+
stats?: {
|
|
417
|
+
followers: number;
|
|
418
|
+
following: number;
|
|
419
|
+
prompts: number;
|
|
420
|
+
} | undefined;
|
|
421
|
+
badges?: string[] | undefined;
|
|
422
|
+
isVerified?: boolean | undefined;
|
|
423
|
+
rssSummary?: {
|
|
424
|
+
title?: string | undefined;
|
|
425
|
+
description?: string | undefined;
|
|
426
|
+
items?: {
|
|
427
|
+
title?: string | undefined;
|
|
428
|
+
link?: string | undefined;
|
|
429
|
+
content?: string | undefined;
|
|
430
|
+
pubDate?: string | undefined;
|
|
431
|
+
}[] | undefined;
|
|
432
|
+
lastFetchedAt?: Date | undefined;
|
|
433
|
+
} | undefined;
|
|
434
|
+
promptAudioUrl?: string | undefined;
|
|
435
|
+
totalPrompts?: number | undefined;
|
|
436
|
+
totalReplies?: number | undefined;
|
|
437
|
+
favoritePromptId?: string | undefined;
|
|
438
|
+
lastSeenAt?: Date | undefined;
|
|
439
|
+
lastActiveAt?: Date | undefined;
|
|
440
|
+
}, {
|
|
441
|
+
id: string;
|
|
442
|
+
handle?: string | null | undefined;
|
|
443
|
+
usageIntent?: string | null | undefined;
|
|
444
|
+
displayName?: string | null | undefined;
|
|
445
|
+
bio?: string | null | undefined;
|
|
446
|
+
avatarUrl?: string | null | undefined;
|
|
447
|
+
website?: string | null | undefined;
|
|
448
|
+
links?: {
|
|
449
|
+
label: string;
|
|
450
|
+
url: string;
|
|
451
|
+
}[] | undefined;
|
|
452
|
+
showBlueskyPublicly?: boolean | undefined;
|
|
453
|
+
createdAt?: unknown;
|
|
454
|
+
tier?: "free" | "creator_pro" | undefined;
|
|
455
|
+
phoneNumber?: string | null | undefined;
|
|
456
|
+
settings?: {
|
|
457
|
+
notifications?: boolean | undefined;
|
|
458
|
+
theme?: string | undefined;
|
|
459
|
+
} | undefined;
|
|
460
|
+
email?: string | undefined;
|
|
461
|
+
bluesky?: {
|
|
462
|
+
handle: string;
|
|
463
|
+
did: string;
|
|
464
|
+
} | undefined;
|
|
465
|
+
stats?: {
|
|
466
|
+
followers?: number | undefined;
|
|
467
|
+
following?: number | undefined;
|
|
468
|
+
prompts?: number | undefined;
|
|
469
|
+
} | undefined;
|
|
470
|
+
badges?: string[] | undefined;
|
|
471
|
+
isVerified?: boolean | undefined;
|
|
472
|
+
rssSummary?: {
|
|
473
|
+
title?: string | undefined;
|
|
474
|
+
description?: string | undefined;
|
|
475
|
+
items?: {
|
|
476
|
+
title?: string | undefined;
|
|
477
|
+
link?: string | undefined;
|
|
478
|
+
content?: string | undefined;
|
|
479
|
+
pubDate?: string | undefined;
|
|
480
|
+
}[] | undefined;
|
|
481
|
+
lastFetchedAt?: unknown;
|
|
482
|
+
} | undefined;
|
|
483
|
+
promptAudioUrl?: string | undefined;
|
|
484
|
+
totalPrompts?: number | undefined;
|
|
485
|
+
totalReplies?: number | undefined;
|
|
486
|
+
favoritePromptId?: string | undefined;
|
|
487
|
+
lastSeenAt?: unknown;
|
|
488
|
+
lastActiveAt?: unknown;
|
|
489
|
+
unreadReplyCount?: number | undefined;
|
|
490
|
+
newReplierCount?: number | undefined;
|
|
491
|
+
}>;
|
|
492
|
+
type ActorView = z.infer<typeof ActorViewSchema>;
|
|
493
|
+
|
|
494
|
+
export { type ActorView, ActorViewSchema, type PublicProfileDto, PublicProfileDtoSchema, type PublicReplyDto, PublicReplyDtoSchema };
|