@singi-labs/sifa-sdk 0.11.31 → 0.11.32
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 +16 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +16 -33
- package/dist/index.js.map +1 -1
- package/dist/publishing/index.cjs +1 -0
- package/dist/publishing/index.cjs.map +1 -1
- package/dist/publishing/index.js +1 -0
- package/dist/publishing/index.js.map +1 -1
- package/dist/schemas/index.cjs +15 -31
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +11 -1
- package/dist/schemas/index.d.ts +11 -1
- package/dist/schemas/index.js +15 -32
- package/dist/schemas/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2719,6 +2719,7 @@ function maxGraphemes(max) {
|
|
|
2719
2719
|
}
|
|
2720
2720
|
var didSchema = zod.z.string().regex(/^did:[a-z]+:[a-zA-Z0-9._:%-]+$/, "Invalid DID");
|
|
2721
2721
|
var datetimeSchema = zod.z.string().datetime({ offset: true });
|
|
2722
|
+
var partialDateSchema = zod.z.string().regex(/^\d{4}(-\d{2}(-\d{2}(T.+)?)?)?$/, "Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime");
|
|
2722
2723
|
var atUriSchema = zod.z.string().regex(/^at:\/\/[^\s]+$/, "Invalid AT-URI");
|
|
2723
2724
|
var cidSchema = zod.z.string().regex(/^(Qm[1-9A-HJ-NP-Za-km-z]{44}|b[A-Za-z0-9+/=]+)$/, "Invalid CID");
|
|
2724
2725
|
var languageTagSchema = zod.z.string().regex(/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/, "Invalid BCP 47 language tag");
|
|
@@ -2903,10 +2904,8 @@ var ProfileCertificationRecordSchema = zod.z.object({
|
|
|
2903
2904
|
entityRef: zod.z.string().url().refine((s) => /^https?:\/\//i.test(s), { message: "entityRef must be an http(s) URL" }).max(2048).optional(),
|
|
2904
2905
|
credentialId: zod.z.string().refine(maxGraphemes(100)).max(1e3).optional(),
|
|
2905
2906
|
credentialUrl: uriSchema.optional(),
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
issuedAt: zod.z.string().optional(),
|
|
2909
|
-
expiresAt: zod.z.string().optional(),
|
|
2907
|
+
issuedAt: partialDateSchema.optional(),
|
|
2908
|
+
expiresAt: partialDateSchema.optional(),
|
|
2910
2909
|
labels: selfLabelsSchema.optional(),
|
|
2911
2910
|
createdAt: datetimeSchema
|
|
2912
2911
|
});
|
|
@@ -2921,10 +2920,7 @@ var ProfileCourseRecordSchema = zod.z.object({
|
|
|
2921
2920
|
// AT-URI of the associated id.sifa.profile.certification record. Plain
|
|
2922
2921
|
// at-uri (not a strongRef) so the link tracks the live certification.
|
|
2923
2922
|
credential: atUriSchema.optional(),
|
|
2924
|
-
|
|
2925
|
-
// datetime) so month-granularity and partial dates are accepted. See
|
|
2926
|
-
// sifa-lexicons#256.
|
|
2927
|
-
completedAt: zod.z.string().optional(),
|
|
2923
|
+
completedAt: partialDateSchema.optional(),
|
|
2928
2924
|
createdAt: datetimeSchema
|
|
2929
2925
|
});
|
|
2930
2926
|
var ProfileEducationRecordSchema = zod.z.object({
|
|
@@ -2939,10 +2935,8 @@ var ProfileEducationRecordSchema = zod.z.object({
|
|
|
2939
2935
|
activities: zod.z.string().refine(maxGraphemes(1e3)).max(1e4).optional(),
|
|
2940
2936
|
description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
|
|
2941
2937
|
location: zod.z.unknown().optional(),
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
startedAt: zod.z.string().optional(),
|
|
2945
|
-
endedAt: zod.z.string().optional(),
|
|
2938
|
+
startedAt: partialDateSchema.optional(),
|
|
2939
|
+
endedAt: partialDateSchema.optional(),
|
|
2946
2940
|
labels: selfLabelsSchema.optional(),
|
|
2947
2941
|
createdAt: datetimeSchema
|
|
2948
2942
|
});
|
|
@@ -2962,13 +2956,10 @@ var ProfileHonorRecordSchema = zod.z.object({
|
|
|
2962
2956
|
// Constrained to http(s) so a script-bearing scheme is never a valid ref (#159).
|
|
2963
2957
|
entityRef: zod.z.string().url().refine((s) => /^https?:\/\//i.test(s), { message: "entityRef must be an http(s) URL" }).max(2048).optional(),
|
|
2964
2958
|
description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
|
|
2965
|
-
|
|
2966
|
-
// and LinkedIn-importer writes are accepted. See sifa-lexicons#256.
|
|
2967
|
-
awardedAt: zod.z.string().optional(),
|
|
2959
|
+
awardedAt: partialDateSchema.optional(),
|
|
2968
2960
|
createdAt: datetimeSchema
|
|
2969
2961
|
});
|
|
2970
2962
|
var PROFILE_INVOLVEMENT_NSID = "id.sifa.profile.involvement";
|
|
2971
|
-
var partialDateSchema = zod.z.string().regex(/^\d{4}(-\d{2}(-\d{2}(T.+)?)?)?$/, "Expected YYYY, YYYY-MM, YYYY-MM-DD, or a datetime");
|
|
2972
2963
|
var ArtifactLinkSchema = zod.z.object({
|
|
2973
2964
|
url: uriSchema,
|
|
2974
2965
|
kind: zod.z.string().optional(),
|
|
@@ -3010,10 +3001,8 @@ var ProfilePositionRecordSchema = zod.z.object({
|
|
|
3010
3001
|
employmentType: zod.z.string().optional(),
|
|
3011
3002
|
workplaceType: zod.z.string().optional(),
|
|
3012
3003
|
location: zod.z.unknown().optional(),
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
startedAt: zod.z.string(),
|
|
3016
|
-
endedAt: zod.z.string().optional(),
|
|
3004
|
+
startedAt: partialDateSchema,
|
|
3005
|
+
endedAt: partialDateSchema.optional(),
|
|
3017
3006
|
skills: zod.z.array(strongRefSchema).max(50).optional(),
|
|
3018
3007
|
labels: selfLabelsSchema.optional(),
|
|
3019
3008
|
createdAt: datetimeSchema
|
|
@@ -3065,10 +3054,8 @@ var ProfileProjectRecordSchema = zod.z.object({
|
|
|
3065
3054
|
description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
|
|
3066
3055
|
url: uriSchema.optional(),
|
|
3067
3056
|
position: strongRefSchema.optional(),
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
startedAt: zod.z.string().optional(),
|
|
3071
|
-
endedAt: zod.z.string().optional(),
|
|
3057
|
+
startedAt: partialDateSchema.optional(),
|
|
3058
|
+
endedAt: partialDateSchema.optional(),
|
|
3072
3059
|
labels: selfLabelsSchema.optional(),
|
|
3073
3060
|
createdAt: datetimeSchema
|
|
3074
3061
|
});
|
|
@@ -3083,9 +3070,7 @@ var ProfilePublicationRecordSchema = zod.z.object({
|
|
|
3083
3070
|
url: uriSchema.optional(),
|
|
3084
3071
|
description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
|
|
3085
3072
|
authors: zod.z.array(PublicationAuthorSchema).max(50).optional(),
|
|
3086
|
-
|
|
3087
|
-
// and LinkedIn-importer writes are accepted. See sifa-lexicons#256.
|
|
3088
|
-
publishedAt: zod.z.string().optional(),
|
|
3073
|
+
publishedAt: partialDateSchema.optional(),
|
|
3089
3074
|
createdAt: datetimeSchema
|
|
3090
3075
|
});
|
|
3091
3076
|
var ProfileSelfRecordSchema = zod.z.object({
|
|
@@ -3116,15 +3101,13 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
|
3116
3101
|
role: zod.z.string().refine(maxGraphemes(100)).max(1e3).optional(),
|
|
3117
3102
|
cause: zod.z.string().refine(maxGraphemes(100)).max(1e3).optional(),
|
|
3118
3103
|
description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
startedAt: zod.z.string().optional(),
|
|
3122
|
-
endedAt: zod.z.string().optional(),
|
|
3104
|
+
startedAt: partialDateSchema.optional(),
|
|
3105
|
+
endedAt: partialDateSchema.optional(),
|
|
3123
3106
|
createdAt: datetimeSchema
|
|
3124
3107
|
});
|
|
3125
3108
|
|
|
3126
3109
|
// src/index.ts
|
|
3127
|
-
var SIFA_SDK_VERSION = "0.11.
|
|
3110
|
+
var SIFA_SDK_VERSION = "0.11.32";
|
|
3128
3111
|
|
|
3129
3112
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
3130
3113
|
exports.ACTIVITY_VISIBILITY_RULES = ACTIVITY_VISIBILITY_RULES;
|
|
@@ -3293,6 +3276,7 @@ exports.openToValueToToken = openToValueToToken;
|
|
|
3293
3276
|
exports.parseIntendedAudiences = parseIntendedAudiences;
|
|
3294
3277
|
exports.parseLocationString = parseLocationString;
|
|
3295
3278
|
exports.parsePresentationDuration = parsePresentationDuration;
|
|
3279
|
+
exports.partialDateSchema = partialDateSchema;
|
|
3296
3280
|
exports.pdsProviderFromApi = pdsProviderFromApi;
|
|
3297
3281
|
exports.pickPrimaryPosition = pickPrimaryPosition;
|
|
3298
3282
|
exports.presentationCsvRowToRecord = presentationCsvRowToRecord;
|