@singi-labs/sifa-sdk 0.19.107 → 0.19.109
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/germ-declaration-BQBocGww.d.cts +33 -0
- package/dist/germ-declaration-BQBocGww.d.ts +33 -0
- package/dist/index.cjs +182 -96
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +61 -1
- package/dist/index.d.ts +61 -1
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/logic/germ.js +71 -0
- package/dist/logic/germ.js.map +1 -0
- package/dist/logic/index.js +14 -0
- package/dist/logic/index.js.map +1 -1
- package/dist/{network-map-DTlhFNIf.d.ts → network-map-DVzGiX2h.d.ts} +36 -1
- package/dist/{network-map-CVr1LskK.d.cts → network-map-DsxrigjL.d.cts} +36 -1
- package/dist/query/fetchers/germ.js +46 -0
- package/dist/query/fetchers/germ.js.map +1 -0
- package/dist/query/fetchers/index.cjs +50 -0
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +2 -1
- package/dist/query/fetchers/index.d.ts +2 -1
- package/dist/query/fetchers/index.js +6 -0
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/index.cjs +50 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +3 -2
- package/dist/query/index.d.ts +3 -2
- package/dist/query/index.js +6 -0
- package/dist/query/index.js.map +1 -1
- package/dist/schemas/germ-declaration.js +17 -0
- package/dist/schemas/germ-declaration.js.map +1 -0
- package/dist/schemas/index.cjs +18 -3
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +1 -0
- package/dist/schemas/index.d.ts +1 -0
- package/dist/schemas/index.js +6 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/org-profile.js +10 -4
- package/dist/schemas/org-profile.js.map +1 -1
- package/dist/schemas/write/index.cjs +126 -61
- package/dist/schemas/write/index.cjs.map +1 -1
- package/dist/schemas/write/index.d.cts +8 -2
- package/dist/schemas/write/index.d.ts +8 -2
- package/dist/schemas/write/index.js +5 -1
- package/dist/schemas/write/index.js.map +1 -1
- package/dist/schemas/write/org-claim.js +5 -6
- package/dist/schemas/write/org-claim.js.map +1 -1
- package/dist/schemas/write/org-profile.js +12 -4
- package/dist/schemas/write/org-profile.js.map +1 -1
- package/dist/schemas/write/org-settings.js +6 -4
- package/dist/schemas/write/org-settings.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `showButtonTo` values the Germ lexicon declares. The lexicon lists them as
|
|
5
|
+
* `knownValues`, not an enum, so the schema accepts any string; consumers must
|
|
6
|
+
* treat an unknown value as "no button" (see `germButtonAudience`).
|
|
7
|
+
*/
|
|
8
|
+
declare const GERM_SHOW_BUTTON_TO_VALUES: readonly ["none", "usersIFollow", "everyone"];
|
|
9
|
+
type GermShowButtonTo = (typeof GERM_SHOW_BUTTON_TO_VALUES)[number];
|
|
10
|
+
/**
|
|
11
|
+
* Zod schema for `com.germnetwork.declaration` (rkey `self`), the record a Germ
|
|
12
|
+
* DM user publishes in their own repo.
|
|
13
|
+
*
|
|
14
|
+
* Only the fields an AppView reads are typed. The key material (`currentKey`,
|
|
15
|
+
* `keyPackage`, `continuityProofs`) is opaque; `currentKey` is checked for shape
|
|
16
|
+
* only, because an empty key means the DID is no longer bound to Germ. Unknown
|
|
17
|
+
* keys pass through so a newer record version still parses.
|
|
18
|
+
*
|
|
19
|
+
* @see https://lexicon.garden/lexicon/did:plc:qyqmmncrm6qx33kpy7vqndik/com.germnetwork.declaration
|
|
20
|
+
*/
|
|
21
|
+
declare const GermDeclarationRecordSchema: z.ZodObject<{
|
|
22
|
+
version: z.ZodString;
|
|
23
|
+
currentKey: z.ZodUnion<readonly [z.ZodObject<{
|
|
24
|
+
$bytes: z.ZodString;
|
|
25
|
+
}, z.core.$strip>, z.ZodInstanceOf<Uint8Array<ArrayBuffer>>]>;
|
|
26
|
+
messageMe: z.ZodOptional<z.ZodObject<{
|
|
27
|
+
showButtonTo: z.ZodString;
|
|
28
|
+
messageMeUrl: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
}, z.core.$loose>;
|
|
31
|
+
type GermDeclarationRecord = z.infer<typeof GermDeclarationRecordSchema>;
|
|
32
|
+
|
|
33
|
+
export { type GermDeclarationRecord as G, GERM_SHOW_BUTTON_TO_VALUES as a, GermDeclarationRecordSchema as b, type GermShowButtonTo as c };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `showButtonTo` values the Germ lexicon declares. The lexicon lists them as
|
|
5
|
+
* `knownValues`, not an enum, so the schema accepts any string; consumers must
|
|
6
|
+
* treat an unknown value as "no button" (see `germButtonAudience`).
|
|
7
|
+
*/
|
|
8
|
+
declare const GERM_SHOW_BUTTON_TO_VALUES: readonly ["none", "usersIFollow", "everyone"];
|
|
9
|
+
type GermShowButtonTo = (typeof GERM_SHOW_BUTTON_TO_VALUES)[number];
|
|
10
|
+
/**
|
|
11
|
+
* Zod schema for `com.germnetwork.declaration` (rkey `self`), the record a Germ
|
|
12
|
+
* DM user publishes in their own repo.
|
|
13
|
+
*
|
|
14
|
+
* Only the fields an AppView reads are typed. The key material (`currentKey`,
|
|
15
|
+
* `keyPackage`, `continuityProofs`) is opaque; `currentKey` is checked for shape
|
|
16
|
+
* only, because an empty key means the DID is no longer bound to Germ. Unknown
|
|
17
|
+
* keys pass through so a newer record version still parses.
|
|
18
|
+
*
|
|
19
|
+
* @see https://lexicon.garden/lexicon/did:plc:qyqmmncrm6qx33kpy7vqndik/com.germnetwork.declaration
|
|
20
|
+
*/
|
|
21
|
+
declare const GermDeclarationRecordSchema: z.ZodObject<{
|
|
22
|
+
version: z.ZodString;
|
|
23
|
+
currentKey: z.ZodUnion<readonly [z.ZodObject<{
|
|
24
|
+
$bytes: z.ZodString;
|
|
25
|
+
}, z.core.$strip>, z.ZodInstanceOf<Uint8Array<ArrayBuffer>>]>;
|
|
26
|
+
messageMe: z.ZodOptional<z.ZodObject<{
|
|
27
|
+
showButtonTo: z.ZodString;
|
|
28
|
+
messageMeUrl: z.ZodString;
|
|
29
|
+
}, z.core.$strip>>;
|
|
30
|
+
}, z.core.$loose>;
|
|
31
|
+
type GermDeclarationRecord = z.infer<typeof GermDeclarationRecordSchema>;
|
|
32
|
+
|
|
33
|
+
export { type GermDeclarationRecord as G, GERM_SHOW_BUTTON_TO_VALUES as a, GermDeclarationRecordSchema as b, type GermShowButtonTo as c };
|
package/dist/index.cjs
CHANGED
|
@@ -3798,6 +3798,106 @@ var presentationLinkSchema = zod.z.object({
|
|
|
3798
3798
|
label: zod.z.string().max(640).nullable().optional(),
|
|
3799
3799
|
type: zod.z.string().max(256).nullable().optional()
|
|
3800
3800
|
});
|
|
3801
|
+
function maxGraphemes(max) {
|
|
3802
|
+
return (value) => {
|
|
3803
|
+
const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
3804
|
+
let count = 0;
|
|
3805
|
+
for (const _ of segmenter.segment(value)) {
|
|
3806
|
+
count++;
|
|
3807
|
+
if (count > max) return false;
|
|
3808
|
+
}
|
|
3809
|
+
return true;
|
|
3810
|
+
};
|
|
3811
|
+
}
|
|
3812
|
+
var didSchema = zod.z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, "Invalid DID");
|
|
3813
|
+
var datetimeSchema = zod.z.string().datetime({ offset: true });
|
|
3814
|
+
var partialDateSchema = zod.z.string().regex(/^\d{4}(-\d{2}(-\d{2}(T.+)?)?)?$/, "Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime");
|
|
3815
|
+
var atUriSchema = zod.z.string().regex(/^at:\/\/[^\s]+$/, "Invalid AT-URI");
|
|
3816
|
+
var cidSchema = zod.z.string().regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z0-9+/=]+)$/, "Invalid CID");
|
|
3817
|
+
var languageTagSchema = zod.z.string().regex(/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/, "Invalid BCP 47 language tag");
|
|
3818
|
+
var uriSchema = zod.z.string().url();
|
|
3819
|
+
var strongRefSchema = zod.z.object({
|
|
3820
|
+
uri: atUriSchema,
|
|
3821
|
+
cid: cidSchema
|
|
3822
|
+
});
|
|
3823
|
+
var skillRefSchema2 = zod.z.object({
|
|
3824
|
+
uri: atUriSchema
|
|
3825
|
+
});
|
|
3826
|
+
var externalRecordRefSchema2 = zod.z.object({
|
|
3827
|
+
uri: atUriSchema,
|
|
3828
|
+
cid: cidSchema.optional()
|
|
3829
|
+
});
|
|
3830
|
+
var agentRefSchema = zod.z.object({
|
|
3831
|
+
name: zod.z.string().min(1).refine(maxGraphemes(256)).max(2560),
|
|
3832
|
+
did: didSchema.optional(),
|
|
3833
|
+
entityRef: uriSchema.optional()
|
|
3834
|
+
}).passthrough();
|
|
3835
|
+
var selfLabelsSchema = zod.z.object({
|
|
3836
|
+
$type: zod.z.literal("com.atproto.label.defs#selfLabels").optional(),
|
|
3837
|
+
values: zod.z.array(zod.z.object({ val: zod.z.string() }))
|
|
3838
|
+
});
|
|
3839
|
+
|
|
3840
|
+
// src/schemas/org-profile.ts
|
|
3841
|
+
var orgAddressSchema = zod.z.object({
|
|
3842
|
+
country: zod.z.string().optional(),
|
|
3843
|
+
postalCode: zod.z.string().optional(),
|
|
3844
|
+
region: zod.z.string().optional(),
|
|
3845
|
+
locality: zod.z.string().optional(),
|
|
3846
|
+
street: zod.z.string().optional(),
|
|
3847
|
+
name: zod.z.string().optional()
|
|
3848
|
+
});
|
|
3849
|
+
var orgLinkSchema = zod.z.object({
|
|
3850
|
+
name: zod.z.string().refine(maxGraphemes(60)).max(600),
|
|
3851
|
+
url: uriSchema.max(2048)
|
|
3852
|
+
});
|
|
3853
|
+
var orgNameField = zod.z.string().min(1).refine(maxGraphemes(200)).max(2e3);
|
|
3854
|
+
var orgDescriptionField = zod.z.string().refine(maxGraphemes(5e3)).max(5e4);
|
|
3855
|
+
var orgAliasField = zod.z.string().refine(maxGraphemes(200)).max(2e3);
|
|
3856
|
+
var OrgProfileRecordSchema = zod.z.object({
|
|
3857
|
+
name: orgNameField,
|
|
3858
|
+
description: orgDescriptionField.optional(),
|
|
3859
|
+
/** Blob ref for the org logo (`image/png` | `image/jpeg`). Not deeply validated client-side. */
|
|
3860
|
+
logo: zod.z.unknown().optional(),
|
|
3861
|
+
website: uriSchema.optional(),
|
|
3862
|
+
entityRefs: zod.z.array(uriSchema).max(20).optional(),
|
|
3863
|
+
/** Contact email. NOT rendered publicly; validated as email at the app layer. */
|
|
3864
|
+
contact: zod.z.string().optional(),
|
|
3865
|
+
/** Physical addresses (headquarters, offices). */
|
|
3866
|
+
addresses: zod.z.array(orgAddressSchema).max(10).optional(),
|
|
3867
|
+
/**
|
|
3868
|
+
* Self-selected headcount range (a declared bucket, never a calculated count).
|
|
3869
|
+
* Open enum (bare-string knownValues in the lexicon): `1-10`, `11-50`,
|
|
3870
|
+
* `51-200`, `201-500`, `501-1000`, `1001-5000`, `5001-10000`, `10001+`. Any
|
|
3871
|
+
* string is accepted so future ranges do not break older records.
|
|
3872
|
+
*/
|
|
3873
|
+
companySize: zod.z.string().optional(),
|
|
3874
|
+
companyType: zod.z.string().optional(),
|
|
3875
|
+
/** Featured links or content surfaced on the org profile. */
|
|
3876
|
+
links: zod.z.array(orgLinkSchema).max(10).optional(),
|
|
3877
|
+
/**
|
|
3878
|
+
* Self-declared industry/domain pairs (same shape as the person profile's
|
|
3879
|
+
* `industries`). Registry-sourced classifications are layered separately.
|
|
3880
|
+
*/
|
|
3881
|
+
industries: zod.z.array(
|
|
3882
|
+
zod.z.object({
|
|
3883
|
+
industry: zod.z.string().max(100),
|
|
3884
|
+
domain: zod.z.string().max(100).optional()
|
|
3885
|
+
})
|
|
3886
|
+
).max(10).optional(),
|
|
3887
|
+
/** Self-declared founding date: a year (YYYY), month (YYYY-MM), or full date (YYYY-MM-DD). */
|
|
3888
|
+
founded: zod.z.string().max(10).optional(),
|
|
3889
|
+
/** Self-declared alternative names / acronyms ("also known as"). */
|
|
3890
|
+
aliases: zod.z.array(orgAliasField).max(20).optional(),
|
|
3891
|
+
/**
|
|
3892
|
+
* Whether the account holder's personal profile stays visible alongside this
|
|
3893
|
+
* org profile. For sole traders whose personal domain is also their trade
|
|
3894
|
+
* name: one account, two facets, both pages render. Absent or false means the
|
|
3895
|
+
* account presents solely as an organization.
|
|
3896
|
+
*/
|
|
3897
|
+
personalProfileVisible: zod.z.boolean().optional(),
|
|
3898
|
+
labels: selfLabelsSchema.optional(),
|
|
3899
|
+
createdAt: datetimeSchema
|
|
3900
|
+
});
|
|
3801
3901
|
var PresentationDeliveryWriteSchema = zod.z.object({
|
|
3802
3902
|
presentationRef: externalRecordRefSchema.optional(),
|
|
3803
3903
|
/**
|
|
@@ -3843,44 +3943,6 @@ var PresentationWriteSchema = zod.z.object({
|
|
|
3843
3943
|
writeupRef: externalRecordRefSchema.optional(),
|
|
3844
3944
|
coverImage: BlobRefSchema.nullable().optional()
|
|
3845
3945
|
});
|
|
3846
|
-
function maxGraphemes(max) {
|
|
3847
|
-
return (value) => {
|
|
3848
|
-
const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
3849
|
-
let count = 0;
|
|
3850
|
-
for (const _ of segmenter.segment(value)) {
|
|
3851
|
-
count++;
|
|
3852
|
-
if (count > max) return false;
|
|
3853
|
-
}
|
|
3854
|
-
return true;
|
|
3855
|
-
};
|
|
3856
|
-
}
|
|
3857
|
-
var didSchema = zod.z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, "Invalid DID");
|
|
3858
|
-
var datetimeSchema = zod.z.string().datetime({ offset: true });
|
|
3859
|
-
var partialDateSchema = zod.z.string().regex(/^\d{4}(-\d{2}(-\d{2}(T.+)?)?)?$/, "Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime");
|
|
3860
|
-
var atUriSchema = zod.z.string().regex(/^at:\/\/[^\s]+$/, "Invalid AT-URI");
|
|
3861
|
-
var cidSchema = zod.z.string().regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z0-9+/=]+)$/, "Invalid CID");
|
|
3862
|
-
var languageTagSchema = zod.z.string().regex(/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/, "Invalid BCP 47 language tag");
|
|
3863
|
-
var uriSchema = zod.z.string().url();
|
|
3864
|
-
var strongRefSchema = zod.z.object({
|
|
3865
|
-
uri: atUriSchema,
|
|
3866
|
-
cid: cidSchema
|
|
3867
|
-
});
|
|
3868
|
-
var skillRefSchema2 = zod.z.object({
|
|
3869
|
-
uri: atUriSchema
|
|
3870
|
-
});
|
|
3871
|
-
var externalRecordRefSchema2 = zod.z.object({
|
|
3872
|
-
uri: atUriSchema,
|
|
3873
|
-
cid: cidSchema.optional()
|
|
3874
|
-
});
|
|
3875
|
-
var agentRefSchema = zod.z.object({
|
|
3876
|
-
name: zod.z.string().min(1).refine(maxGraphemes(256)).max(2560),
|
|
3877
|
-
did: didSchema.optional(),
|
|
3878
|
-
entityRef: uriSchema.optional()
|
|
3879
|
-
}).passthrough();
|
|
3880
|
-
var selfLabelsSchema = zod.z.object({
|
|
3881
|
-
$type: zod.z.literal("com.atproto.label.defs#selfLabels").optional(),
|
|
3882
|
-
values: zod.z.array(zod.z.object({ val: zod.z.string() }))
|
|
3883
|
-
});
|
|
3884
3946
|
|
|
3885
3947
|
// src/import/talks-import-validation.ts
|
|
3886
3948
|
var PRESENTATION_URL_COLUMNS = ["slides_url", "recording_url", "writeup_url"];
|
|
@@ -6472,6 +6534,69 @@ function excludeSelfApp(apps) {
|
|
|
6472
6534
|
return apps.filter((app) => app.id !== SELF_APP_ID);
|
|
6473
6535
|
}
|
|
6474
6536
|
|
|
6537
|
+
// src/logic/germ.ts
|
|
6538
|
+
var GERM_MESSAGE_HOSTS = ["landing.ger.mx"];
|
|
6539
|
+
var MAX_DID_LENGTH = 2048;
|
|
6540
|
+
var STRICT_DID = /^did:[a-z]+:(?:[A-Za-z0-9._:-]|%3A)*(?:[A-Za-z0-9._-]|%3A)$/;
|
|
6541
|
+
function isStrictDid(value) {
|
|
6542
|
+
return value.length <= MAX_DID_LENGTH && STRICT_DID.test(value);
|
|
6543
|
+
}
|
|
6544
|
+
function parseGermMessageUrl(raw) {
|
|
6545
|
+
let url;
|
|
6546
|
+
try {
|
|
6547
|
+
url = new URL(raw);
|
|
6548
|
+
} catch {
|
|
6549
|
+
return null;
|
|
6550
|
+
}
|
|
6551
|
+
if (url.protocol !== "https:") return null;
|
|
6552
|
+
if (url.username !== "" || url.password !== "" || url.port !== "") return null;
|
|
6553
|
+
if (!GERM_MESSAGE_HOSTS.includes(url.hostname)) return null;
|
|
6554
|
+
if (url.hash !== "") return null;
|
|
6555
|
+
return url;
|
|
6556
|
+
}
|
|
6557
|
+
function germButtonAudience(declaration) {
|
|
6558
|
+
if (!declaration) return null;
|
|
6559
|
+
const key = declaration.currentKey;
|
|
6560
|
+
if (key instanceof Uint8Array ? key.length === 0 : key.$bytes === "") return null;
|
|
6561
|
+
const messageMe = declaration.messageMe;
|
|
6562
|
+
if (!messageMe) return null;
|
|
6563
|
+
if (!parseGermMessageUrl(messageMe.messageMeUrl)) return null;
|
|
6564
|
+
if (messageMe.showButtonTo === "everyone" || messageMe.showButtonTo === "usersIFollow") {
|
|
6565
|
+
return messageMe.showButtonTo;
|
|
6566
|
+
}
|
|
6567
|
+
return null;
|
|
6568
|
+
}
|
|
6569
|
+
function shouldShowGermButton(input) {
|
|
6570
|
+
const { audience, ownerDid, viewerDid, ownerFollowsViewer } = input;
|
|
6571
|
+
if (!audience) return false;
|
|
6572
|
+
if (!isStrictDid(ownerDid)) return false;
|
|
6573
|
+
if (viewerDid !== null && !isStrictDid(viewerDid)) return false;
|
|
6574
|
+
if (viewerDid === ownerDid) return false;
|
|
6575
|
+
if (audience === "everyone") return true;
|
|
6576
|
+
return viewerDid !== null && ownerFollowsViewer === true;
|
|
6577
|
+
}
|
|
6578
|
+
function buildGermMessageUrl(input) {
|
|
6579
|
+
const { messageMeUrl, ownerDid, viewerDid, platform } = input;
|
|
6580
|
+
if (!isStrictDid(ownerDid)) return null;
|
|
6581
|
+
if (viewerDid !== null && !isStrictDid(viewerDid)) return null;
|
|
6582
|
+
const url = parseGermMessageUrl(messageMeUrl);
|
|
6583
|
+
if (!url) return null;
|
|
6584
|
+
if (platform) {
|
|
6585
|
+
const path = url.pathname;
|
|
6586
|
+
let end = path.length;
|
|
6587
|
+
while (end > 0 && path[end - 1] === "/") end--;
|
|
6588
|
+
url.pathname = `${path.slice(0, end)}/${platform}`;
|
|
6589
|
+
}
|
|
6590
|
+
url.hash = viewerDid ? `${ownerDid}+${viewerDid}` : ownerDid;
|
|
6591
|
+
return url.toString();
|
|
6592
|
+
}
|
|
6593
|
+
function germPlatformFromUserAgent(userAgent) {
|
|
6594
|
+
if (!userAgent) return "web";
|
|
6595
|
+
if (/\b(iPhone|iPad|iPod)\b/.test(userAgent)) return "iOS";
|
|
6596
|
+
if (/\bAndroid\b/i.test(userAgent)) return "android";
|
|
6597
|
+
return "web";
|
|
6598
|
+
}
|
|
6599
|
+
|
|
6475
6600
|
// src/logic/actor-identity.ts
|
|
6476
6601
|
function actorShowsIdentity(actor) {
|
|
6477
6602
|
return !!(actor.confirmed || actor.claimed);
|
|
@@ -7007,63 +7132,16 @@ var EndorsementRecordSchema = zod.z.object({
|
|
|
7007
7132
|
comment: zod.z.string().refine(maxGraphemes(300)).max(3e3).optional(),
|
|
7008
7133
|
createdAt: datetimeSchema
|
|
7009
7134
|
});
|
|
7010
|
-
var
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
url: uriSchema.max(2048)
|
|
7021
|
-
});
|
|
7022
|
-
var OrgProfileRecordSchema = zod.z.object({
|
|
7023
|
-
name: zod.z.string().min(1).refine(maxGraphemes(200)).max(2e3),
|
|
7024
|
-
description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
|
|
7025
|
-
/** Blob ref for the org logo (`image/png` | `image/jpeg`). Not deeply validated client-side. */
|
|
7026
|
-
logo: zod.z.unknown().optional(),
|
|
7027
|
-
website: uriSchema.optional(),
|
|
7028
|
-
entityRefs: zod.z.array(uriSchema).max(20).optional(),
|
|
7029
|
-
/** Contact email. NOT rendered publicly; validated as email at the app layer. */
|
|
7030
|
-
contact: zod.z.string().optional(),
|
|
7031
|
-
/** Physical addresses (headquarters, offices). */
|
|
7032
|
-
addresses: zod.z.array(orgAddressSchema).max(10).optional(),
|
|
7033
|
-
/**
|
|
7034
|
-
* Self-selected headcount range (a declared bucket, never a calculated count).
|
|
7035
|
-
* Open enum (bare-string knownValues in the lexicon): `1-10`, `11-50`,
|
|
7036
|
-
* `51-200`, `201-500`, `501-1000`, `1001-5000`, `5001-10000`, `10001+`. Any
|
|
7037
|
-
* string is accepted so future ranges do not break older records.
|
|
7038
|
-
*/
|
|
7039
|
-
companySize: zod.z.string().optional(),
|
|
7040
|
-
companyType: zod.z.string().optional(),
|
|
7041
|
-
/** Featured links or content surfaced on the org profile. */
|
|
7042
|
-
links: zod.z.array(orgLinkSchema).max(10).optional(),
|
|
7043
|
-
/**
|
|
7044
|
-
* Self-declared industry/domain pairs (same shape as the person profile's
|
|
7045
|
-
* `industries`). Registry-sourced classifications are layered separately.
|
|
7046
|
-
*/
|
|
7047
|
-
industries: zod.z.array(
|
|
7048
|
-
zod.z.object({
|
|
7049
|
-
industry: zod.z.string().max(100),
|
|
7050
|
-
domain: zod.z.string().max(100).optional()
|
|
7051
|
-
})
|
|
7052
|
-
).max(10).optional(),
|
|
7053
|
-
/** Self-declared founding date: a year (YYYY), month (YYYY-MM), or full date (YYYY-MM-DD). */
|
|
7054
|
-
founded: zod.z.string().max(10).optional(),
|
|
7055
|
-
/** Self-declared alternative names / acronyms ("also known as"). */
|
|
7056
|
-
aliases: zod.z.array(zod.z.string().refine(maxGraphemes(200)).max(2e3)).max(20).optional(),
|
|
7057
|
-
/**
|
|
7058
|
-
* Whether the account holder's personal profile stays visible alongside this
|
|
7059
|
-
* org profile. For sole traders whose personal domain is also their trade
|
|
7060
|
-
* name: one account, two facets, both pages render. Absent or false means the
|
|
7061
|
-
* account presents solely as an organization.
|
|
7062
|
-
*/
|
|
7063
|
-
personalProfileVisible: zod.z.boolean().optional(),
|
|
7064
|
-
labels: selfLabelsSchema.optional(),
|
|
7065
|
-
createdAt: datetimeSchema
|
|
7066
|
-
});
|
|
7135
|
+
var GERM_SHOW_BUTTON_TO_VALUES = ["none", "usersIFollow", "everyone"];
|
|
7136
|
+
var GermDeclarationRecordSchema = zod.z.object({
|
|
7137
|
+
version: zod.z.string().min(5).max(14),
|
|
7138
|
+
// JSON form (`{ $bytes }`, PDS and Jetstream) or decoded CBOR (`Uint8Array`).
|
|
7139
|
+
currentKey: zod.z.union([zod.z.object({ $bytes: zod.z.string() }), zod.z.instanceof(Uint8Array)]),
|
|
7140
|
+
messageMe: zod.z.object({
|
|
7141
|
+
showButtonTo: zod.z.string().min(1).max(100),
|
|
7142
|
+
messageMeUrl: zod.z.string().min(1).max(2047)
|
|
7143
|
+
}).optional()
|
|
7144
|
+
}).passthrough();
|
|
7067
7145
|
var OrgEmploymentAttestationRecordSchema = zod.z.object({
|
|
7068
7146
|
subject: didSchema,
|
|
7069
7147
|
position: strongRefSchema.optional(),
|
|
@@ -7850,7 +7928,7 @@ function describeSifaRecord(collection, value) {
|
|
|
7850
7928
|
}
|
|
7851
7929
|
|
|
7852
7930
|
// src/index.ts
|
|
7853
|
-
var SIFA_SDK_VERSION = "0.19.
|
|
7931
|
+
var SIFA_SDK_VERSION = "0.19.109";
|
|
7854
7932
|
|
|
7855
7933
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
7856
7934
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|
|
@@ -7910,6 +7988,9 @@ exports.FollowFeedItemSchema = FollowFeedItemSchema;
|
|
|
7910
7988
|
exports.FollowFeedPageSchema = FollowFeedPageSchema;
|
|
7911
7989
|
exports.FollowProfilePageSchema = FollowProfilePageSchema;
|
|
7912
7990
|
exports.FollowProfileSchema = FollowProfileSchema;
|
|
7991
|
+
exports.GERM_MESSAGE_HOSTS = GERM_MESSAGE_HOSTS;
|
|
7992
|
+
exports.GERM_SHOW_BUTTON_TO_VALUES = GERM_SHOW_BUTTON_TO_VALUES;
|
|
7993
|
+
exports.GermDeclarationRecordSchema = GermDeclarationRecordSchema;
|
|
7913
7994
|
exports.GraphFollowRecordSchema = GraphFollowRecordSchema;
|
|
7914
7995
|
exports.INDUSTRY_LABELS = INDUSTRY_LABELS;
|
|
7915
7996
|
exports.INDUSTRY_OPTIONS = INDUSTRY_OPTIONS;
|
|
@@ -7995,6 +8076,7 @@ exports.agentRefSchema = agentRefSchema;
|
|
|
7995
8076
|
exports.appLinksItems = appLinksItems;
|
|
7996
8077
|
exports.atUriSchema = atUriSchema;
|
|
7997
8078
|
exports.blobProxyUrl = blobProxyUrl;
|
|
8079
|
+
exports.buildGermMessageUrl = buildGermMessageUrl;
|
|
7998
8080
|
exports.buildMetaDescription = buildMetaDescription;
|
|
7999
8081
|
exports.buildProfileHighlights = buildProfileHighlights;
|
|
8000
8082
|
exports.buildTalkSlug = buildTalkSlug;
|
|
@@ -8043,6 +8125,8 @@ exports.formatRelativeTime = formatRelativeTime;
|
|
|
8043
8125
|
exports.formatSingleDate = formatSingleDate;
|
|
8044
8126
|
exports.formatSpanDate = formatSpanDate;
|
|
8045
8127
|
exports.formatTimelineDate = formatTimelineDate;
|
|
8128
|
+
exports.germButtonAudience = germButtonAudience;
|
|
8129
|
+
exports.germPlatformFromUserAgent = germPlatformFromUserAgent;
|
|
8046
8130
|
exports.getActivityTaxonomyVersion = getActivityTaxonomyVersion;
|
|
8047
8131
|
exports.getActivityTier = getActivityTier;
|
|
8048
8132
|
exports.getActivityVerbsVersion = getActivityVerbsVersion;
|
|
@@ -8106,6 +8190,7 @@ exports.isRoleLineRedundant = isRoleLineRedundant;
|
|
|
8106
8190
|
exports.isSectionPopulated = isSectionPopulated;
|
|
8107
8191
|
exports.isSelfAuthoredRich = isSelfAuthoredRich;
|
|
8108
8192
|
exports.isSiteActivityPresetActive = isSiteActivityPresetActive;
|
|
8193
|
+
exports.isStrictDid = isStrictDid;
|
|
8109
8194
|
exports.isTeachingCourse = isTeachingCourse;
|
|
8110
8195
|
exports.isTimelineWorthy = isTimelineWorthy;
|
|
8111
8196
|
exports.isUpcomingStart = isUpcomingStart;
|
|
@@ -8173,6 +8258,7 @@ exports.sanitizeHandleInput = sanitizeHandleInput;
|
|
|
8173
8258
|
exports.searchResultDisambiguation = searchResultDisambiguation;
|
|
8174
8259
|
exports.selfLabelsSchema = selfLabelsSchema;
|
|
8175
8260
|
exports.shouldRenderHighlights = shouldRenderHighlights;
|
|
8261
|
+
exports.shouldShowGermButton = shouldShowGermButton;
|
|
8176
8262
|
exports.singleDateExtractor = singleDateExtractor;
|
|
8177
8263
|
exports.siteActivityPresetSchema = siteActivityPresetSchema;
|
|
8178
8264
|
exports.siteActivityPresetUpdateSchema = siteActivityPresetUpdateSchema;
|