@singi-labs/sifa-sdk 0.19.107 → 0.19.108
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/index.cjs +101 -96
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/schemas/index.cjs +6 -3
- package/dist/schemas/index.cjs.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
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"];
|
|
@@ -7007,63 +7069,6 @@ var EndorsementRecordSchema = zod.z.object({
|
|
|
7007
7069
|
comment: zod.z.string().refine(maxGraphemes(300)).max(3e3).optional(),
|
|
7008
7070
|
createdAt: datetimeSchema
|
|
7009
7071
|
});
|
|
7010
|
-
var orgAddressSchema = zod.z.object({
|
|
7011
|
-
country: zod.z.string().optional(),
|
|
7012
|
-
postalCode: zod.z.string().optional(),
|
|
7013
|
-
region: zod.z.string().optional(),
|
|
7014
|
-
locality: zod.z.string().optional(),
|
|
7015
|
-
street: zod.z.string().optional(),
|
|
7016
|
-
name: zod.z.string().optional()
|
|
7017
|
-
});
|
|
7018
|
-
var orgLinkSchema = zod.z.object({
|
|
7019
|
-
name: zod.z.string().refine(maxGraphemes(60)).max(600),
|
|
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
|
-
});
|
|
7067
7072
|
var OrgEmploymentAttestationRecordSchema = zod.z.object({
|
|
7068
7073
|
subject: didSchema,
|
|
7069
7074
|
position: strongRefSchema.optional(),
|
|
@@ -7850,7 +7855,7 @@ function describeSifaRecord(collection, value) {
|
|
|
7850
7855
|
}
|
|
7851
7856
|
|
|
7852
7857
|
// src/index.ts
|
|
7853
|
-
var SIFA_SDK_VERSION = "0.19.
|
|
7858
|
+
var SIFA_SDK_VERSION = "0.19.108";
|
|
7854
7859
|
|
|
7855
7860
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
7856
7861
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|