@antiphony/shared 0.3.0 → 0.4.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/README.md +4 -4
- package/dist/cjs/api-codecs.cjs +74 -147
- package/dist/cjs/api-codecs.d.cts +105 -60
- package/dist/cjs/index.cjs +84 -197
- package/dist/cjs/index.d.cts +89 -7
- package/dist/cjs/nsid.cjs +6 -9
- package/dist/cjs/nsid.d.cts +7 -8
- package/dist/cjs/types/audio.cjs +60 -124
- package/dist/cjs/types/audio.d.cts +226 -185
- package/dist/cjs/types/blob.cjs +5 -9
- package/dist/cjs/types/blob.d.cts +21 -21
- package/dist/cjs/types/records.cjs +0 -45
- package/dist/cjs/types/records.d.cts +1 -103
- package/dist/esm/api-codecs.d.ts +135 -90
- package/dist/esm/api-codecs.js +4 -5
- package/dist/esm/chunk-D655OH2I.js +35 -0
- package/dist/esm/chunk-RUUHUNZ6.js +37 -0
- package/dist/esm/{chunk-6LROFBKK.js → chunk-SBYNIQRZ.js} +7 -9
- package/dist/esm/chunk-SMK4OZNU.js +17 -0
- package/dist/esm/{chunk-F7IHVM34.js → chunk-WL2GSPGC.js} +64 -12
- package/dist/esm/index.d.ts +89 -7
- package/dist/esm/index.js +5 -7
- package/dist/esm/nsid.d.ts +7 -8
- package/dist/esm/nsid.js +1 -1
- package/dist/esm/types/audio.d.ts +303 -262
- package/dist/esm/types/audio.js +3 -4
- package/dist/esm/types/blob.d.ts +21 -21
- package/dist/esm/types/blob.js +1 -1
- package/dist/esm/types/records.d.ts +1 -103
- package/dist/esm/types/records.js +1 -1
- package/package.json +90 -26
- package/dist/cjs/types/api.cjs +0 -166
- package/dist/cjs/types/api.d.cts +0 -242
- package/dist/cjs/types/views.cjs +0 -179
- package/dist/cjs/types/views.d.cts +0 -726
- package/dist/esm/chunk-5EHV73BA.js +0 -20
- package/dist/esm/chunk-FDM5FDN4.js +0 -46
- package/dist/esm/chunk-IHIBHQBJ.js +0 -78
- package/dist/esm/chunk-R6SBR3IG.js +0 -97
- package/dist/esm/chunk-Y6HNNRVD.js +0 -12
- package/dist/esm/types/api.d.ts +0 -242
- package/dist/esm/types/api.js +0 -4
- package/dist/esm/types/views.d.ts +0 -726
- package/dist/esm/types/views.js +0 -3
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
// types/blob.ts
|
|
4
|
-
var BlobRefSchema = z.object({
|
|
5
|
-
/** Discriminator for AT Protocol type system */
|
|
6
|
-
$type: z.literal("blob"),
|
|
7
|
-
/** Content Identifier (CID) or URL pointing to the blob */
|
|
8
|
-
ref: z.string(),
|
|
9
|
-
/** MIME type of the blob (e.g., 'audio/webm') */
|
|
10
|
-
mimeType: z.string(),
|
|
11
|
-
/** Size of the blob in bytes */
|
|
12
|
-
size: z.number()
|
|
13
|
-
});
|
|
14
|
-
function resolveAudioUrl(record) {
|
|
15
|
-
var _a;
|
|
16
|
-
if ((_a = record.audio) == null ? void 0 : _a.ref) return record.audio.ref;
|
|
17
|
-
return record.audioUrl;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { BlobRefSchema, resolveAudioUrl };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ReplyRefSchema, AudioEmbedSchema } from './chunk-F7IHVM34.js';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
|
|
4
|
-
var CreateAudioPostRequestSchema = z.object({
|
|
5
|
-
/** User-authored text; may be empty for pure-audio posts. */
|
|
6
|
-
text: z.string().max(3e3).default(""),
|
|
7
|
-
/** Optional headline (prompt feature). */
|
|
8
|
-
title: z.string().max(3e3).optional(),
|
|
9
|
-
/** The uploaded audio attachment. */
|
|
10
|
-
embed: AudioEmbedSchema.optional(),
|
|
11
|
-
/** Present ⇒ this is a reply (StrongRef root + parent). */
|
|
12
|
-
reply: ReplyRefSchema.optional(),
|
|
13
|
-
/** BCP-47 language tags. */
|
|
14
|
-
langs: z.array(z.string()).max(3).optional(),
|
|
15
|
-
/** Author self-label values (content warnings). */
|
|
16
|
-
selfLabels: z.array(z.string()).optional()
|
|
17
|
-
}).refine((d) => !(d.reply && d.title), {
|
|
18
|
-
message: "Replies cannot have a title",
|
|
19
|
-
path: ["title"]
|
|
20
|
-
}).refine((d) => d.text.trim().length > 0 || !!d.embed, {
|
|
21
|
-
message: "Post must have text or an audio embed",
|
|
22
|
-
path: ["text"]
|
|
23
|
-
});
|
|
24
|
-
var UpdateProfileRequestSchema = z.object({
|
|
25
|
-
handle: z.string().min(3).max(20).regex(/^[a-zA-Z0-9_]+$/).optional(),
|
|
26
|
-
displayName: z.string().max(50).optional(),
|
|
27
|
-
bio: z.string().max(160).optional(),
|
|
28
|
-
avatarUrl: z.string().url().nullable().optional(),
|
|
29
|
-
usageIntent: z.string().max(200).nullable().optional(),
|
|
30
|
-
/**
|
|
31
|
-
* Personal website surfaced on the public profile. Accepts a URL, empty
|
|
32
|
-
* string, or null from the client; normalizes empty string → null so the
|
|
33
|
-
* value stored on `UserRecord` (which requires `.url() | null`) round-trips
|
|
34
|
-
* cleanly through `UserRecordSchema.parse` on subsequent reads.
|
|
35
|
-
*/
|
|
36
|
-
website: z.union([z.string().url(), z.literal(""), z.null()]).optional().transform((v) => v === "" ? null : v),
|
|
37
|
-
/** Up to 5 public links (label + URL) shown under the bio. */
|
|
38
|
-
links: z.array(z.object({
|
|
39
|
-
label: z.string().min(1).max(40),
|
|
40
|
-
url: z.string().url()
|
|
41
|
-
})).max(5).optional(),
|
|
42
|
-
/** When true, surfaces the linked Bluesky identity on the public profile. */
|
|
43
|
-
showBlueskyPublicly: z.boolean().optional()
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
export { CreateAudioPostRequestSchema, UpdateProfileRequestSchema };
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
// types/records.ts
|
|
4
|
-
function httpsUrl() {
|
|
5
|
-
return z.string().trim().url().refine((u) => /^https?:\/\//i.test(u), {
|
|
6
|
-
message: "URL must use the http or https scheme"
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
var FirestoreTimestampSchema = z.union([
|
|
10
|
-
z.custom((data) => {
|
|
11
|
-
return data && typeof data === "object" && (typeof data.toDate === "function" || "seconds" in data && "nanoseconds" in data);
|
|
12
|
-
}),
|
|
13
|
-
z.string(),
|
|
14
|
-
z.number(),
|
|
15
|
-
z.date()
|
|
16
|
-
]).transform((data, ctx) => {
|
|
17
|
-
let date;
|
|
18
|
-
if (data instanceof Date) {
|
|
19
|
-
date = data;
|
|
20
|
-
} else if (typeof data === "string") {
|
|
21
|
-
date = new Date(data);
|
|
22
|
-
} else if (typeof data === "number") {
|
|
23
|
-
date = new Date(data);
|
|
24
|
-
} else if (typeof data.toDate === "function") {
|
|
25
|
-
date = data.toDate();
|
|
26
|
-
} else {
|
|
27
|
-
const timestamp = data;
|
|
28
|
-
date = new Date(timestamp.seconds * 1e3 + timestamp.nanoseconds / 1e6);
|
|
29
|
-
}
|
|
30
|
-
if (Number.isNaN(date.getTime())) {
|
|
31
|
-
ctx.addIssue({
|
|
32
|
-
code: z.ZodIssueCode.custom,
|
|
33
|
-
message: "FirestoreTimestamp coerced to Invalid Date"
|
|
34
|
-
});
|
|
35
|
-
return z.NEVER;
|
|
36
|
-
}
|
|
37
|
-
return date;
|
|
38
|
-
});
|
|
39
|
-
var UserRecordSchema = z.object({
|
|
40
|
-
/** Unique Firebase UID */
|
|
41
|
-
id: z.string(),
|
|
42
|
-
/** Public handle (e.g. @brad). Optional for Lite Users. */
|
|
43
|
-
handle: z.string().min(3).max(20).regex(/^[a-zA-Z0-9_]+$/).nullable().optional(),
|
|
44
|
-
/** User stated intent (e.g. "Podcaster", "Listener") */
|
|
45
|
-
usageIntent: z.string().nullable().optional(),
|
|
46
|
-
/** Domain for federated handle support. */
|
|
47
|
-
domain: z.string().default("antiphony.dev"),
|
|
48
|
-
/**
|
|
49
|
-
* Display Name (e.g. "Brad Thorson"). Nullable: Firestore stores `null`
|
|
50
|
-
* when the user clears this field via the settings form, and the schema
|
|
51
|
-
* must match storage reality or `UserRecordSchema.parse` (in
|
|
52
|
-
* `getUserRecordByUid`) will throw.
|
|
53
|
-
*/
|
|
54
|
-
displayName: z.string().max(50).nullable().optional(),
|
|
55
|
-
/** Short bio/description — nullable for the same reason as displayName. */
|
|
56
|
-
bio: z.string().max(160).nullable().optional(),
|
|
57
|
-
/** URL to avatar image — nullable for the same reason as displayName. */
|
|
58
|
-
avatarUrl: z.string().url().nullable().optional(),
|
|
59
|
-
/** Optional personal website surfaced on the public profile. */
|
|
60
|
-
website: httpsUrl().nullable().optional(),
|
|
61
|
-
/** Up to 5 additional public links (label + URL) shown under the bio. */
|
|
62
|
-
links: z.array(z.object({
|
|
63
|
-
label: z.string().min(1).max(40),
|
|
64
|
-
url: httpsUrl()
|
|
65
|
-
})).max(5).optional(),
|
|
66
|
-
/** When true and a Bluesky identity is linked, surfaces it on the public profile. */
|
|
67
|
-
showBlueskyPublicly: z.boolean().optional(),
|
|
68
|
-
/** Server timestamp of creation */
|
|
69
|
-
createdAt: FirestoreTimestampSchema,
|
|
70
|
-
/** Individual account tier — free or creator_pro */
|
|
71
|
-
tier: z.enum(["free", "creator_pro"]).default("free"),
|
|
72
|
-
/** Account status. Deactivated accounts retain data but are excluded from lookups. */
|
|
73
|
-
status: z.enum(["active", "deactivated"]).default("active"),
|
|
74
|
-
/** Timestamp when the account was deactivated (soft deleted) */
|
|
75
|
-
deactivatedAt: FirestoreTimestampSchema.optional()
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
export { FirestoreTimestampSchema, UserRecordSchema, httpsUrl };
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { FirestoreTimestampSchema } from './chunk-IHIBHQBJ.js';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
|
|
4
|
-
var ProfileViewBasicSchema = z.object({
|
|
5
|
-
id: z.string(),
|
|
6
|
-
handle: z.string().nullable().optional(),
|
|
7
|
-
// `displayName` and `bio` are `.nullable()` — Firestore stores `null` for
|
|
8
|
-
// empty values on these fields (see users-dependencies.ts), and Zod's
|
|
9
|
-
// `.optional()` alone rejects `null`. Consumers already use truthy
|
|
10
|
-
// checks / `??` / `||`, so widening the type to include `null` is safe.
|
|
11
|
-
displayName: z.string().nullable().optional(),
|
|
12
|
-
avatarUrl: z.string().nullable().optional(),
|
|
13
|
-
bio: z.string().nullable().optional(),
|
|
14
|
-
/** Personal website link surfaced on the public profile. */
|
|
15
|
-
website: z.string().nullable().optional(),
|
|
16
|
-
/** Public links (label + URL) shown under the bio. */
|
|
17
|
-
links: z.array(z.object({
|
|
18
|
-
label: z.string(),
|
|
19
|
-
url: z.string()
|
|
20
|
-
})).optional(),
|
|
21
|
-
/**
|
|
22
|
-
* AT Protocol identity, surfaced on the public profile only when the user
|
|
23
|
-
* opts in (`UserRecord.showBlueskyPublicly === true`). Projection happens
|
|
24
|
-
* in the user dependency layer; this schema simply allows the field.
|
|
25
|
-
*/
|
|
26
|
-
bluesky: z.object({
|
|
27
|
-
handle: z.string(),
|
|
28
|
-
did: z.string()
|
|
29
|
-
}).optional(),
|
|
30
|
-
stats: z.object({
|
|
31
|
-
followers: z.number().default(0),
|
|
32
|
-
following: z.number().default(0),
|
|
33
|
-
prompts: z.number().default(0)
|
|
34
|
-
}).optional(),
|
|
35
|
-
badges: z.array(z.string()).optional(),
|
|
36
|
-
isVerified: z.boolean().optional(),
|
|
37
|
-
createdAt: FirestoreTimestampSchema.optional()
|
|
38
|
-
});
|
|
39
|
-
function toProfileViewBasic(profile) {
|
|
40
|
-
const { id, handle, displayName, avatarUrl, bio, website, links, bluesky, showBlueskyPublicly, stats, badges, isVerified, createdAt } = profile;
|
|
41
|
-
return {
|
|
42
|
-
id,
|
|
43
|
-
handle,
|
|
44
|
-
displayName,
|
|
45
|
-
avatarUrl,
|
|
46
|
-
bio,
|
|
47
|
-
website,
|
|
48
|
-
links,
|
|
49
|
-
bluesky: showBlueskyPublicly ? bluesky : void 0,
|
|
50
|
-
stats,
|
|
51
|
-
badges,
|
|
52
|
-
isVerified,
|
|
53
|
-
createdAt
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
var ProfileViewDetailedSchema = ProfileViewBasicSchema.extend({
|
|
57
|
-
/** AT Protocol Identity link */
|
|
58
|
-
bluesky: z.object({
|
|
59
|
-
handle: z.string(),
|
|
60
|
-
did: z.string()
|
|
61
|
-
}).optional(),
|
|
62
|
-
usageIntent: z.string().nullable().optional()
|
|
63
|
-
});
|
|
64
|
-
var ProfileViewSelfSchema = ProfileViewDetailedSchema.extend({
|
|
65
|
-
phoneNumber: z.string().nullable().optional(),
|
|
66
|
-
email: z.string().optional(),
|
|
67
|
-
lastSeenAt: FirestoreTimestampSchema.optional(),
|
|
68
|
-
lastActiveAt: FirestoreTimestampSchema.optional(),
|
|
69
|
-
unreadReplyCount: z.number().default(0),
|
|
70
|
-
newReplierCount: z.number().default(0),
|
|
71
|
-
/**
|
|
72
|
-
* Account tier from UserRecord — surfaced on the self profile so the
|
|
73
|
-
* client can gate paid features. Optional for legacy docs without the
|
|
74
|
-
* field; consumers should treat missing as `'free'`.
|
|
75
|
-
*/
|
|
76
|
-
tier: z.enum(["free", "creator_pro"]).optional(),
|
|
77
|
-
/**
|
|
78
|
-
* Surfaces the linked Bluesky identity (handle + DID) on the public profile
|
|
79
|
-
* when true. Persisted on UserRecord; exposed in self/detailed views so the
|
|
80
|
-
* settings form can render the toggle's current state.
|
|
81
|
-
*/
|
|
82
|
-
showBlueskyPublicly: z.boolean().optional(),
|
|
83
|
-
settings: z.object({
|
|
84
|
-
notifications: z.boolean().optional(),
|
|
85
|
-
theme: z.string().optional()
|
|
86
|
-
}).optional()
|
|
87
|
-
});
|
|
88
|
-
var ProfileViewAdminSchema = ProfileViewSelfSchema.extend({
|
|
89
|
-
blockedUsers: z.array(z.string()).optional(),
|
|
90
|
-
followers: z.array(z.string()).optional(),
|
|
91
|
-
following: z.array(z.string()).optional(),
|
|
92
|
-
reportCount: z.number().optional(),
|
|
93
|
-
isBanned: z.boolean().optional()
|
|
94
|
-
});
|
|
95
|
-
var ProfileViewSchema = ProfileViewAdminSchema;
|
|
96
|
-
|
|
97
|
-
export { ProfileViewAdminSchema, ProfileViewBasicSchema, ProfileViewDetailedSchema, ProfileViewSchema, ProfileViewSelfSchema, toProfileViewBasic };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ProfileViewBasicSchema, ProfileViewSelfSchema } from './chunk-R6SBR3IG.js';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
|
|
4
|
-
var PublicProfileDtoSchema = ProfileViewBasicSchema.extend({
|
|
5
|
-
bluesky: z.object({
|
|
6
|
-
handle: z.string(),
|
|
7
|
-
did: z.string()
|
|
8
|
-
}).optional()
|
|
9
|
-
});
|
|
10
|
-
var ActorViewSchema = ProfileViewSelfSchema;
|
|
11
|
-
|
|
12
|
-
export { ActorViewSchema, PublicProfileDtoSchema };
|
package/dist/esm/types/api.d.ts
DELETED
|
@@ -1,242 +0,0 @@
|
|
|
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
|
-
}, "strip", z.ZodTypeAny, {
|
|
52
|
-
id: string;
|
|
53
|
-
handle?: string | null | undefined;
|
|
54
|
-
displayName?: string | null | undefined;
|
|
55
|
-
bio?: string | null | undefined;
|
|
56
|
-
avatarUrl?: string | null | undefined;
|
|
57
|
-
website?: string | null | undefined;
|
|
58
|
-
links?: {
|
|
59
|
-
label: string;
|
|
60
|
-
url: string;
|
|
61
|
-
}[] | undefined;
|
|
62
|
-
createdAt?: Date | undefined;
|
|
63
|
-
bluesky?: {
|
|
64
|
-
handle: string;
|
|
65
|
-
did: string;
|
|
66
|
-
} | undefined;
|
|
67
|
-
stats?: {
|
|
68
|
-
followers: number;
|
|
69
|
-
following: number;
|
|
70
|
-
prompts: number;
|
|
71
|
-
} | undefined;
|
|
72
|
-
badges?: string[] | undefined;
|
|
73
|
-
isVerified?: boolean | undefined;
|
|
74
|
-
}, {
|
|
75
|
-
id: string;
|
|
76
|
-
handle?: string | null | undefined;
|
|
77
|
-
displayName?: string | null | undefined;
|
|
78
|
-
bio?: string | null | undefined;
|
|
79
|
-
avatarUrl?: string | null | undefined;
|
|
80
|
-
website?: string | null | undefined;
|
|
81
|
-
links?: {
|
|
82
|
-
label: string;
|
|
83
|
-
url: string;
|
|
84
|
-
}[] | undefined;
|
|
85
|
-
createdAt?: unknown;
|
|
86
|
-
bluesky?: {
|
|
87
|
-
handle: string;
|
|
88
|
-
did: string;
|
|
89
|
-
} | undefined;
|
|
90
|
-
stats?: {
|
|
91
|
-
followers?: number | undefined;
|
|
92
|
-
following?: number | undefined;
|
|
93
|
-
prompts?: number | undefined;
|
|
94
|
-
} | undefined;
|
|
95
|
-
badges?: string[] | undefined;
|
|
96
|
-
isVerified?: boolean | undefined;
|
|
97
|
-
}>;
|
|
98
|
-
type PublicProfileDto = z.infer<typeof PublicProfileDtoSchema>;
|
|
99
|
-
/**
|
|
100
|
-
* Actor View — the full view returned to the authenticated user about themselves.
|
|
101
|
-
* Uses ProfileViewSelfSchema which includes private settings but not admin fields.
|
|
102
|
-
*/
|
|
103
|
-
declare const ActorViewSchema: z.ZodObject<{
|
|
104
|
-
id: z.ZodString;
|
|
105
|
-
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
106
|
-
displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
107
|
-
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
108
|
-
bio: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
109
|
-
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
110
|
-
links: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
111
|
-
label: z.ZodString;
|
|
112
|
-
url: z.ZodString;
|
|
113
|
-
}, "strip", z.ZodTypeAny, {
|
|
114
|
-
label: string;
|
|
115
|
-
url: string;
|
|
116
|
-
}, {
|
|
117
|
-
label: string;
|
|
118
|
-
url: string;
|
|
119
|
-
}>, "many">>;
|
|
120
|
-
stats: z.ZodOptional<z.ZodObject<{
|
|
121
|
-
followers: z.ZodDefault<z.ZodNumber>;
|
|
122
|
-
following: z.ZodDefault<z.ZodNumber>;
|
|
123
|
-
prompts: z.ZodDefault<z.ZodNumber>;
|
|
124
|
-
}, "strip", z.ZodTypeAny, {
|
|
125
|
-
followers: number;
|
|
126
|
-
following: number;
|
|
127
|
-
prompts: number;
|
|
128
|
-
}, {
|
|
129
|
-
followers?: number | undefined;
|
|
130
|
-
following?: number | undefined;
|
|
131
|
-
prompts?: number | undefined;
|
|
132
|
-
}>>;
|
|
133
|
-
badges: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
134
|
-
isVerified: z.ZodOptional<z.ZodBoolean>;
|
|
135
|
-
createdAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
|
|
136
|
-
} & {
|
|
137
|
-
bluesky: z.ZodOptional<z.ZodObject<{
|
|
138
|
-
handle: z.ZodString;
|
|
139
|
-
did: z.ZodString;
|
|
140
|
-
}, "strip", z.ZodTypeAny, {
|
|
141
|
-
handle: string;
|
|
142
|
-
did: string;
|
|
143
|
-
}, {
|
|
144
|
-
handle: string;
|
|
145
|
-
did: string;
|
|
146
|
-
}>>;
|
|
147
|
-
usageIntent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
148
|
-
} & {
|
|
149
|
-
phoneNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
150
|
-
email: z.ZodOptional<z.ZodString>;
|
|
151
|
-
lastSeenAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
|
|
152
|
-
lastActiveAt: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodType<unknown, z.ZodTypeDef, unknown>, z.ZodString, z.ZodNumber, z.ZodDate]>, Date, unknown>>;
|
|
153
|
-
unreadReplyCount: z.ZodDefault<z.ZodNumber>;
|
|
154
|
-
newReplierCount: z.ZodDefault<z.ZodNumber>;
|
|
155
|
-
tier: z.ZodOptional<z.ZodEnum<["free", "creator_pro"]>>;
|
|
156
|
-
showBlueskyPublicly: z.ZodOptional<z.ZodBoolean>;
|
|
157
|
-
settings: z.ZodOptional<z.ZodObject<{
|
|
158
|
-
notifications: z.ZodOptional<z.ZodBoolean>;
|
|
159
|
-
theme: z.ZodOptional<z.ZodString>;
|
|
160
|
-
}, "strip", z.ZodTypeAny, {
|
|
161
|
-
notifications?: boolean | undefined;
|
|
162
|
-
theme?: string | undefined;
|
|
163
|
-
}, {
|
|
164
|
-
notifications?: boolean | undefined;
|
|
165
|
-
theme?: string | undefined;
|
|
166
|
-
}>>;
|
|
167
|
-
}, "strip", z.ZodTypeAny, {
|
|
168
|
-
id: string;
|
|
169
|
-
unreadReplyCount: number;
|
|
170
|
-
newReplierCount: number;
|
|
171
|
-
handle?: string | null | undefined;
|
|
172
|
-
displayName?: string | null | undefined;
|
|
173
|
-
bio?: string | null | undefined;
|
|
174
|
-
avatarUrl?: string | null | undefined;
|
|
175
|
-
usageIntent?: string | null | undefined;
|
|
176
|
-
website?: string | null | undefined;
|
|
177
|
-
links?: {
|
|
178
|
-
label: string;
|
|
179
|
-
url: string;
|
|
180
|
-
}[] | undefined;
|
|
181
|
-
showBlueskyPublicly?: boolean | undefined;
|
|
182
|
-
createdAt?: Date | undefined;
|
|
183
|
-
tier?: "free" | "creator_pro" | undefined;
|
|
184
|
-
bluesky?: {
|
|
185
|
-
handle: string;
|
|
186
|
-
did: string;
|
|
187
|
-
} | undefined;
|
|
188
|
-
stats?: {
|
|
189
|
-
followers: number;
|
|
190
|
-
following: number;
|
|
191
|
-
prompts: number;
|
|
192
|
-
} | undefined;
|
|
193
|
-
badges?: string[] | undefined;
|
|
194
|
-
isVerified?: boolean | undefined;
|
|
195
|
-
phoneNumber?: string | null | undefined;
|
|
196
|
-
email?: string | undefined;
|
|
197
|
-
lastSeenAt?: Date | undefined;
|
|
198
|
-
lastActiveAt?: Date | undefined;
|
|
199
|
-
settings?: {
|
|
200
|
-
notifications?: boolean | undefined;
|
|
201
|
-
theme?: string | undefined;
|
|
202
|
-
} | undefined;
|
|
203
|
-
}, {
|
|
204
|
-
id: string;
|
|
205
|
-
handle?: string | null | undefined;
|
|
206
|
-
displayName?: string | null | undefined;
|
|
207
|
-
bio?: string | null | undefined;
|
|
208
|
-
avatarUrl?: string | null | undefined;
|
|
209
|
-
usageIntent?: string | null | undefined;
|
|
210
|
-
website?: string | null | undefined;
|
|
211
|
-
links?: {
|
|
212
|
-
label: string;
|
|
213
|
-
url: string;
|
|
214
|
-
}[] | undefined;
|
|
215
|
-
showBlueskyPublicly?: boolean | undefined;
|
|
216
|
-
createdAt?: unknown;
|
|
217
|
-
tier?: "free" | "creator_pro" | undefined;
|
|
218
|
-
bluesky?: {
|
|
219
|
-
handle: string;
|
|
220
|
-
did: string;
|
|
221
|
-
} | undefined;
|
|
222
|
-
stats?: {
|
|
223
|
-
followers?: number | undefined;
|
|
224
|
-
following?: number | undefined;
|
|
225
|
-
prompts?: number | undefined;
|
|
226
|
-
} | undefined;
|
|
227
|
-
badges?: string[] | undefined;
|
|
228
|
-
isVerified?: boolean | undefined;
|
|
229
|
-
phoneNumber?: string | null | undefined;
|
|
230
|
-
email?: string | undefined;
|
|
231
|
-
lastSeenAt?: unknown;
|
|
232
|
-
lastActiveAt?: unknown;
|
|
233
|
-
unreadReplyCount?: number | undefined;
|
|
234
|
-
newReplierCount?: number | undefined;
|
|
235
|
-
settings?: {
|
|
236
|
-
notifications?: boolean | undefined;
|
|
237
|
-
theme?: string | undefined;
|
|
238
|
-
} | undefined;
|
|
239
|
-
}>;
|
|
240
|
-
type ActorView = z.infer<typeof ActorViewSchema>;
|
|
241
|
-
|
|
242
|
-
export { type ActorView, ActorViewSchema, type PublicProfileDto, PublicProfileDtoSchema };
|
package/dist/esm/types/api.js
DELETED