@originator-profile/model 0.5.3 → 0.6.0-beta.1

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.
@@ -10,6 +10,10 @@ type AllowedOrigin = z.infer<typeof AllowedOrigin>;
10
10
  declare const AllowedUrl: z.ZodUnion<readonly [z.ZodCustomStringFormat<"url-pattern">, z.ZodArray<z.ZodCustomStringFormat<"url-pattern">>]>;
11
11
  type AllowedUrl = z.infer<typeof AllowedUrl>;
12
12
 
13
+ /**
14
+ * @deprecated Use {@link ProfileAnnotationPolicy} instead.
15
+ * The CertificationSystem will be removed after 2027-01-01.
16
+ */
13
17
  declare const CertificationSystem: z.ZodObject<{
14
18
  id: z.ZodURL;
15
19
  type: z.ZodLiteral<"CertificationSystem">;
@@ -19,6 +23,10 @@ declare const CertificationSystem: z.ZodObject<{
19
23
  }, z.core.$strip>;
20
24
  type CertificationSystem = z.infer<typeof CertificationSystem>;
21
25
 
26
+ /**
27
+ * @deprecated Use {@link ProfileAnnotation} instead.
28
+ * The Certificate schema will be removed after 2027-01-01.
29
+ */
22
30
  declare const Certificate: z.ZodObject<{
23
31
  "@context": z.ZodTuple<[z.ZodLiteral<"https://www.w3.org/ns/credentials/v2">, z.ZodLiteral<"https://originator-profile.org/ns/credentials/v1">, z.ZodLiteral<"https://originator-profile.org/ns/cip/v1">, z.ZodObject<{
24
32
  "@language": z.ZodString;
@@ -48,6 +56,10 @@ declare const Certificate: z.ZodObject<{
48
56
  }, z.core.$strip>;
49
57
  type Certificate = z.infer<typeof Certificate>;
50
58
 
59
+ /**
60
+ * @deprecated Use {@link JapaneseExistencePAProperties} instead.
61
+ * The legacy Certificate-based schema will be removed after 2027-01-01.
62
+ */
51
63
  declare const JapaneseExistenceCertificateProperties: z.ZodObject<{
52
64
  id: z.ZodString;
53
65
  type: z.ZodLiteral<"JP-OrganizationExistenceCertificate">;
@@ -72,6 +84,10 @@ declare const JapaneseExistenceCertificateProperties: z.ZodObject<{
72
84
  ref: z.ZodOptional<z.ZodURL>;
73
85
  }, z.core.$strip>;
74
86
  }, z.core.$strip>;
87
+ /**
88
+ * @deprecated Use {@link JapaneseExistencePA} instead.
89
+ * The legacy Certificate-based schema will be removed after 2027-01-01.
90
+ */
75
91
  declare const JapaneseExistenceCertificate: z.ZodObject<{
76
92
  "@context": z.ZodTuple<[z.ZodLiteral<"https://www.w3.org/ns/credentials/v2">, z.ZodLiteral<"https://originator-profile.org/ns/credentials/v1">, z.ZodLiteral<"https://originator-profile.org/ns/cip/v1">, z.ZodObject<{
77
93
  "@language": z.ZodString;
@@ -448,14 +464,12 @@ type OpVc = z.infer<typeof OpVc>;
448
464
  declare const OriginatorProfile: z.ZodObject<{
449
465
  core: z.ZodString;
450
466
  annotations: z.ZodOptional<z.ZodArray<z.ZodString>>;
451
- /** @deprecated 後方互換性のため 2026-11-01 まで非配列 WMP を許容。代わりに配列を使用してください。 */
452
467
  media: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
453
468
  }, z.core.$loose>;
454
469
  type OriginatorProfile = z.infer<typeof OriginatorProfile>;
455
470
  declare const OriginatorProfileSet: z.ZodArray<z.ZodObject<{
456
471
  core: z.ZodString;
457
472
  annotations: z.ZodOptional<z.ZodArray<z.ZodString>>;
458
- /** @deprecated 後方互換性のため 2026-11-01 まで非配列 WMP を許容。代わりに配列を使用してください。 */
459
473
  media: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
460
474
  }, z.core.$loose>>;
461
475
  type OriginatorProfileSet = z.infer<typeof OriginatorProfileSet>;
@@ -466,6 +480,221 @@ declare const Page: z.ZodObject<{
466
480
  }, z.core.$strip>;
467
481
  type Page = z.infer<typeof Page>;
468
482
 
483
+ declare const AdvertisingQualityPAProperties: z.ZodObject<{
484
+ id: z.ZodString;
485
+ name: z.ZodOptional<z.ZodString>;
486
+ description: z.ZodOptional<z.ZodString>;
487
+ image: z.ZodOptional<z.ZodObject<{
488
+ id: z.ZodURL;
489
+ digestSRI: z.ZodOptional<z.ZodCustomStringFormat<"sri">>;
490
+ }, z.core.$strip>>;
491
+ annotationScheme: z.ZodOptional<z.ZodArray<z.ZodURL>>;
492
+ annotation: z.ZodObject<{
493
+ id: z.ZodURL;
494
+ type: z.ZodLiteral<"ProfileAnnotationPolicy">;
495
+ name: z.ZodString;
496
+ description: z.ZodOptional<z.ZodString>;
497
+ ref: z.ZodOptional<z.ZodURL>;
498
+ }, z.core.$strip>;
499
+ type: z.ZodLiteral<"AdvertisingQualityCertificate">;
500
+ verifier: z.ZodOptional<z.ZodString>;
501
+ }, z.core.$loose>;
502
+ declare const AdvertisingQualityPA: z.ZodObject<{
503
+ type: z.ZodTuple<[z.ZodLiteral<"VerifiableCredential">, z.ZodLiteral<"ProfileAnnotation">], null>;
504
+ issuer: z.ZodString;
505
+ validFrom: z.ZodOptional<z.ZodISODateTime>;
506
+ validUntil: z.ZodOptional<z.ZodISODateTime>;
507
+ "@context": z.ZodTuple<[z.ZodLiteral<"https://www.w3.org/ns/credentials/v2">, z.ZodLiteral<"https://originator-profile.org/ns/credentials/v1">, z.ZodLiteral<"https://originator-profile.org/ns/cip/v1">, z.ZodObject<{
508
+ "@language": z.ZodString;
509
+ }, z.core.$strip>], null>;
510
+ credentialSubject: z.ZodObject<{
511
+ id: z.ZodString;
512
+ name: z.ZodOptional<z.ZodString>;
513
+ description: z.ZodOptional<z.ZodString>;
514
+ image: z.ZodOptional<z.ZodObject<{
515
+ id: z.ZodURL;
516
+ digestSRI: z.ZodOptional<z.ZodCustomStringFormat<"sri">>;
517
+ }, z.core.$strip>>;
518
+ annotationScheme: z.ZodOptional<z.ZodArray<z.ZodURL>>;
519
+ annotation: z.ZodObject<{
520
+ id: z.ZodURL;
521
+ type: z.ZodLiteral<"ProfileAnnotationPolicy">;
522
+ name: z.ZodString;
523
+ description: z.ZodOptional<z.ZodString>;
524
+ ref: z.ZodOptional<z.ZodURL>;
525
+ }, z.core.$strip>;
526
+ type: z.ZodLiteral<"AdvertisingQualityCertificate">;
527
+ verifier: z.ZodOptional<z.ZodString>;
528
+ }, z.core.$loose>;
529
+ }, z.core.$loose>;
530
+ type AdvertisingQualityPA = z.infer<typeof AdvertisingQualityPA>;
531
+
532
+ declare const JapaneseExistencePAProperties: z.ZodObject<{
533
+ id: z.ZodString;
534
+ name: z.ZodOptional<z.ZodString>;
535
+ description: z.ZodOptional<z.ZodString>;
536
+ image: z.ZodOptional<z.ZodObject<{
537
+ id: z.ZodURL;
538
+ digestSRI: z.ZodOptional<z.ZodCustomStringFormat<"sri">>;
539
+ }, z.core.$strip>>;
540
+ annotationScheme: z.ZodOptional<z.ZodArray<z.ZodURL>>;
541
+ annotation: z.ZodObject<{
542
+ id: z.ZodURL;
543
+ type: z.ZodLiteral<"ProfileAnnotationPolicy">;
544
+ name: z.ZodString;
545
+ description: z.ZodOptional<z.ZodString>;
546
+ ref: z.ZodOptional<z.ZodURL>;
547
+ }, z.core.$strip>;
548
+ type: z.ZodLiteral<"JP-OrganizationExistenceCertificate">;
549
+ corporateName: z.ZodString;
550
+ corporateNumber: z.ZodString;
551
+ postalCode: z.ZodString;
552
+ addressCountry: z.ZodString;
553
+ addressRegion: z.ZodString;
554
+ addressLocality: z.ZodString;
555
+ streetAddress: z.ZodString;
556
+ }, z.core.$loose>;
557
+ declare const JapaneseExistencePA: z.ZodObject<{
558
+ type: z.ZodTuple<[z.ZodLiteral<"VerifiableCredential">, z.ZodLiteral<"ProfileAnnotation">], null>;
559
+ issuer: z.ZodString;
560
+ validFrom: z.ZodOptional<z.ZodISODateTime>;
561
+ validUntil: z.ZodOptional<z.ZodISODateTime>;
562
+ "@context": z.ZodTuple<[z.ZodLiteral<"https://www.w3.org/ns/credentials/v2">, z.ZodLiteral<"https://originator-profile.org/ns/credentials/v1">, z.ZodLiteral<"https://originator-profile.org/ns/cip/v1">, z.ZodObject<{
563
+ "@language": z.ZodString;
564
+ }, z.core.$strip>], null>;
565
+ credentialSubject: z.ZodObject<{
566
+ id: z.ZodString;
567
+ name: z.ZodOptional<z.ZodString>;
568
+ description: z.ZodOptional<z.ZodString>;
569
+ image: z.ZodOptional<z.ZodObject<{
570
+ id: z.ZodURL;
571
+ digestSRI: z.ZodOptional<z.ZodCustomStringFormat<"sri">>;
572
+ }, z.core.$strip>>;
573
+ annotationScheme: z.ZodOptional<z.ZodArray<z.ZodURL>>;
574
+ annotation: z.ZodObject<{
575
+ id: z.ZodURL;
576
+ type: z.ZodLiteral<"ProfileAnnotationPolicy">;
577
+ name: z.ZodString;
578
+ description: z.ZodOptional<z.ZodString>;
579
+ ref: z.ZodOptional<z.ZodURL>;
580
+ }, z.core.$strip>;
581
+ type: z.ZodLiteral<"JP-OrganizationExistenceCertificate">;
582
+ corporateName: z.ZodString;
583
+ corporateNumber: z.ZodString;
584
+ postalCode: z.ZodString;
585
+ addressCountry: z.ZodString;
586
+ addressRegion: z.ZodString;
587
+ addressLocality: z.ZodString;
588
+ streetAddress: z.ZodString;
589
+ }, z.core.$loose>;
590
+ }, z.core.$loose>;
591
+ type JapaneseExistencePA = z.infer<typeof JapaneseExistencePA>;
592
+
593
+ declare const ProfileAnnotation: z.ZodObject<{
594
+ "@context": z.ZodArray<z.ZodUnknown>;
595
+ type: z.ZodTuple<[z.ZodLiteral<"VerifiableCredential">, z.ZodLiteral<"ProfileAnnotation">], null>;
596
+ issuer: z.ZodString;
597
+ validFrom: z.ZodOptional<z.ZodISODateTime>;
598
+ validUntil: z.ZodOptional<z.ZodISODateTime>;
599
+ credentialSubject: z.ZodObject<{
600
+ id: z.ZodString;
601
+ type: z.ZodString;
602
+ name: z.ZodOptional<z.ZodString>;
603
+ description: z.ZodOptional<z.ZodString>;
604
+ image: z.ZodOptional<z.ZodObject<{
605
+ id: z.ZodURL;
606
+ digestSRI: z.ZodOptional<z.ZodCustomStringFormat<"sri">>;
607
+ }, z.core.$strip>>;
608
+ annotationScheme: z.ZodOptional<z.ZodArray<z.ZodURL>>;
609
+ annotation: z.ZodObject<{
610
+ id: z.ZodURL;
611
+ type: z.ZodLiteral<"ProfileAnnotationPolicy">;
612
+ name: z.ZodString;
613
+ description: z.ZodOptional<z.ZodString>;
614
+ ref: z.ZodOptional<z.ZodURL>;
615
+ }, z.core.$strip>;
616
+ }, z.core.$loose>;
617
+ }, z.core.$loose>;
618
+ type ProfileAnnotation = z.infer<typeof ProfileAnnotation>;
619
+
620
+ declare const ProfileAnnotationIssuerRegistrationProperties: z.ZodObject<{
621
+ id: z.ZodString;
622
+ name: z.ZodOptional<z.ZodString>;
623
+ description: z.ZodOptional<z.ZodString>;
624
+ image: z.ZodOptional<z.ZodObject<{
625
+ id: z.ZodURL;
626
+ digestSRI: z.ZodOptional<z.ZodCustomStringFormat<"sri">>;
627
+ }, z.core.$strip>>;
628
+ annotation: z.ZodObject<{
629
+ id: z.ZodURL;
630
+ type: z.ZodLiteral<"ProfileAnnotationPolicy">;
631
+ name: z.ZodString;
632
+ description: z.ZodOptional<z.ZodString>;
633
+ ref: z.ZodOptional<z.ZodURL>;
634
+ }, z.core.$strip>;
635
+ type: z.ZodLiteral<"ProfileAnnotationIssuerRegistration">;
636
+ annotationIssuerName: z.ZodString;
637
+ annotationScheme: z.ZodArray<z.ZodURL>;
638
+ }, z.core.$loose>;
639
+ declare const ProfileAnnotationIssuerRegistration: z.ZodObject<{
640
+ type: z.ZodTuple<[z.ZodLiteral<"VerifiableCredential">, z.ZodLiteral<"ProfileAnnotation">], null>;
641
+ issuer: z.ZodString;
642
+ validFrom: z.ZodOptional<z.ZodISODateTime>;
643
+ validUntil: z.ZodOptional<z.ZodISODateTime>;
644
+ "@context": z.ZodTuple<[z.ZodLiteral<"https://www.w3.org/ns/credentials/v2">, z.ZodLiteral<"https://originator-profile.org/ns/credentials/v1">, z.ZodLiteral<"https://originator-profile.org/ns/cip/v1">, z.ZodObject<{
645
+ "@language": z.ZodString;
646
+ }, z.core.$strip>], null>;
647
+ credentialSubject: z.ZodObject<{
648
+ id: z.ZodString;
649
+ name: z.ZodOptional<z.ZodString>;
650
+ description: z.ZodOptional<z.ZodString>;
651
+ image: z.ZodOptional<z.ZodObject<{
652
+ id: z.ZodURL;
653
+ digestSRI: z.ZodOptional<z.ZodCustomStringFormat<"sri">>;
654
+ }, z.core.$strip>>;
655
+ annotation: z.ZodObject<{
656
+ id: z.ZodURL;
657
+ type: z.ZodLiteral<"ProfileAnnotationPolicy">;
658
+ name: z.ZodString;
659
+ description: z.ZodOptional<z.ZodString>;
660
+ ref: z.ZodOptional<z.ZodURL>;
661
+ }, z.core.$strip>;
662
+ type: z.ZodLiteral<"ProfileAnnotationIssuerRegistration">;
663
+ annotationIssuerName: z.ZodString;
664
+ annotationScheme: z.ZodArray<z.ZodURL>;
665
+ }, z.core.$loose>;
666
+ }, z.core.$loose>;
667
+ type ProfileAnnotationIssuerRegistration = z.infer<typeof ProfileAnnotationIssuerRegistration>;
668
+
669
+ declare const ProfileAnnotationPolicy: z.ZodObject<{
670
+ id: z.ZodURL;
671
+ type: z.ZodLiteral<"ProfileAnnotationPolicy">;
672
+ name: z.ZodString;
673
+ description: z.ZodOptional<z.ZodString>;
674
+ ref: z.ZodOptional<z.ZodURL>;
675
+ }, z.core.$strip>;
676
+ type ProfileAnnotationPolicy = z.infer<typeof ProfileAnnotationPolicy>;
677
+
678
+ declare const ProfileAnnotationProperties: z.ZodObject<{
679
+ id: z.ZodString;
680
+ type: z.ZodString;
681
+ name: z.ZodOptional<z.ZodString>;
682
+ description: z.ZodOptional<z.ZodString>;
683
+ image: z.ZodOptional<z.ZodObject<{
684
+ id: z.ZodURL;
685
+ digestSRI: z.ZodOptional<z.ZodCustomStringFormat<"sri">>;
686
+ }, z.core.$strip>>;
687
+ annotationScheme: z.ZodOptional<z.ZodArray<z.ZodURL>>;
688
+ annotation: z.ZodObject<{
689
+ id: z.ZodURL;
690
+ type: z.ZodLiteral<"ProfileAnnotationPolicy">;
691
+ name: z.ZodString;
692
+ description: z.ZodOptional<z.ZodString>;
693
+ ref: z.ZodOptional<z.ZodURL>;
694
+ }, z.core.$strip>;
695
+ }, z.core.$loose>;
696
+ type ProfileAnnotationProperties = z.infer<typeof ProfileAnnotationProperties>;
697
+
469
698
  declare const SiteProfile: z.ZodObject<{
470
699
  originators: z.ZodArray<z.ZodObject<{
471
700
  core: z.ZodString;
@@ -473,7 +702,6 @@ declare const SiteProfile: z.ZodObject<{
473
702
  media: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
474
703
  }, z.core.$loose>>;
475
704
  sites: z.ZodOptional<z.ZodArray<z.ZodString>>;
476
- /** @deprecated 後方互換性のため 2026-11-01 まで許容。sites が優先され、存在しない場合に credential を使用。 */
477
705
  credential: z.ZodOptional<z.ZodString>;
478
706
  }, z.core.$loose>;
479
707
  type SiteProfile = z.infer<typeof SiteProfile>;
@@ -580,6 +808,62 @@ declare const UnsignedWebsiteProfile: z.ZodObject<{
580
808
  }, z.core.$loose>;
581
809
  type UnsignedWebsiteProfile = z.infer<typeof UnsignedWebsiteProfile>;
582
810
 
811
+ declare const UnsignedWebsiteProfileSet: z.ZodArray<z.ZodObject<{
812
+ credentialSubject: z.ZodUnion<readonly [z.ZodObject<{
813
+ id: z.ZodURL;
814
+ type: z.ZodLiteral<"WebSite">;
815
+ name: z.ZodString;
816
+ image: z.ZodOptional<z.ZodObject<{
817
+ id: z.ZodURL;
818
+ digestSRI: z.ZodOptional<z.ZodCustomStringFormat<"sri">>;
819
+ }, z.core.$strip>>;
820
+ description: z.ZodOptional<z.ZodString>;
821
+ url: z.ZodUnion<readonly [z.ZodCustomStringFormat<"origin">, z.ZodArray<z.ZodCustomStringFormat<"origin">>]>;
822
+ }, z.core.$loose>, z.ZodObject<{
823
+ id: z.ZodURL;
824
+ type: z.ZodLiteral<"WebSite">;
825
+ name: z.ZodString;
826
+ image: z.ZodOptional<z.ZodObject<{
827
+ id: z.ZodURL;
828
+ digestSRI: z.ZodOptional<z.ZodCustomStringFormat<"sri">>;
829
+ }, z.core.$strip>>;
830
+ description: z.ZodOptional<z.ZodString>;
831
+ allowedOrigin: z.ZodUnion<readonly [z.ZodCustomStringFormat<"origin">, z.ZodArray<z.ZodCustomStringFormat<"origin">>]>;
832
+ }, z.core.$loose>, z.ZodObject<{
833
+ id: z.ZodURL;
834
+ type: z.ZodLiteral<"WebSite">;
835
+ name: z.ZodString;
836
+ description: z.ZodOptional<z.ZodString>;
837
+ url: z.ZodUnion<readonly [z.ZodCustomStringFormat<"origin">, z.ZodArray<z.ZodCustomStringFormat<"origin">>]>;
838
+ image: z.ZodUnion<readonly [z.ZodObject<{
839
+ id: z.ZodURL;
840
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
841
+ }, z.core.$strip>, z.ZodObject<{
842
+ id: z.ZodURL;
843
+ digestSRI: z.ZodOptional<z.ZodCustomStringFormat<"sri">>;
844
+ }, z.core.$strip>]>;
845
+ }, z.core.$loose> | z.ZodObject<{
846
+ id: z.ZodURL;
847
+ type: z.ZodLiteral<"WebSite">;
848
+ name: z.ZodString;
849
+ description: z.ZodOptional<z.ZodString>;
850
+ allowedOrigin: z.ZodUnion<readonly [z.ZodCustomStringFormat<"origin">, z.ZodArray<z.ZodCustomStringFormat<"origin">>]>;
851
+ image: z.ZodUnion<readonly [z.ZodObject<{
852
+ id: z.ZodURL;
853
+ content: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
854
+ }, z.core.$strip>, z.ZodObject<{
855
+ id: z.ZodURL;
856
+ digestSRI: z.ZodOptional<z.ZodCustomStringFormat<"sri">>;
857
+ }, z.core.$strip>]>;
858
+ }, z.core.$loose> | z.ZodNever]>;
859
+ "@context": z.ZodTuple<[z.ZodLiteral<"https://www.w3.org/ns/credentials/v2">, z.ZodLiteral<"https://originator-profile.org/ns/credentials/v1">, z.ZodLiteral<"https://originator-profile.org/ns/cip/v1">, z.ZodObject<{
860
+ "@language": z.ZodString;
861
+ }, z.core.$strip>], null>;
862
+ type: z.ZodTuple<[z.ZodLiteral<"VerifiableCredential">, z.ZodLiteral<"WebsiteProfile">], null>;
863
+ issuer: z.ZodString;
864
+ }, z.core.$loose>>;
865
+ type UnsignedWebsiteProfileSet = z.infer<typeof UnsignedWebsiteProfileSet>;
866
+
583
867
  declare const WebMediaProfile: z.ZodObject<{
584
868
  "@context": z.ZodTuple<[z.ZodLiteral<"https://www.w3.org/ns/credentials/v2">, z.ZodLiteral<"https://originator-profile.org/ns/credentials/v1">, z.ZodLiteral<"https://originator-profile.org/ns/cip/v1">, z.ZodObject<{
585
869
  "@language": z.ZodString;
@@ -660,5 +944,5 @@ declare const WebsiteProfile: z.ZodObject<{
660
944
  }, z.core.$loose>;
661
945
  type WebsiteProfile = z.infer<typeof WebsiteProfile>;
662
946
 
663
- export { AdvertisementCA, AdvertorialCA, AllowedOrigin, AllowedUrl, ArticleCA, BasicTarget, Certificate, CertificationSystem, ContentAttestation, ContentAttestationSet, ContentAttestationSetItem, CoreProfile, DateTimeStamp, Description, ExternalResourceTarget, Image, JapaneseExistenceCertificate, JapaneseExistenceCertificateProperties, Jwk, Jwks, OpId, OpMeta, OpVc, OriginatorProfile, OriginatorProfileSet, Page, RawImage, RawTarget, SiteProfile, SubresourceIntegrity, Target, UnsignedContentAttestation, UnsignedWebsiteProfile, WebMediaProfile, WebsiteProfile, subject };
947
+ export { AdvertisementCA, AdvertisingQualityPA, AdvertisingQualityPAProperties, AdvertorialCA, AllowedOrigin, AllowedUrl, ArticleCA, BasicTarget, Certificate, CertificationSystem, ContentAttestation, ContentAttestationSet, ContentAttestationSetItem, CoreProfile, DateTimeStamp, Description, ExternalResourceTarget, Image, JapaneseExistenceCertificate, JapaneseExistenceCertificateProperties, JapaneseExistencePA, JapaneseExistencePAProperties, Jwk, Jwks, OpId, OpMeta, OpVc, OriginatorProfile, OriginatorProfileSet, Page, ProfileAnnotation, ProfileAnnotationIssuerRegistration, ProfileAnnotationIssuerRegistrationProperties, ProfileAnnotationPolicy, ProfileAnnotationProperties, RawImage, RawTarget, SiteProfile, SubresourceIntegrity, Target, UnsignedContentAttestation, UnsignedWebsiteProfile, UnsignedWebsiteProfileSet, WebMediaProfile, WebsiteProfile, subject };
664
948
  export type { AdvertisementSubject };
@@ -361,6 +361,78 @@ const OriginatorProfile = z.looseObject({
361
361
  });
362
362
  const OriginatorProfileSet = z.array(OriginatorProfile);
363
363
 
364
+ const ProfileAnnotationPolicy = z.object({
365
+ id: z.url().describe("Profile Annotation Policy ID"),
366
+ type: z.literal("ProfileAnnotationPolicy"),
367
+ name: z.string().describe("Name of the Profile Annotation Policy"),
368
+ description: z.string().optional().describe("Description"),
369
+ ref: z.url().optional().describe(
370
+ "A URL for people to read to find out more about the Profile Annotation Policy."
371
+ )
372
+ });
373
+
374
+ const ProfileAnnotationProperties = z.looseObject({
375
+ id: OpId.describe("OP ID of the subject"),
376
+ type: z.string().describe("PA-specific subtype identifier"),
377
+ name: z.string().optional().describe("PA name"),
378
+ description: z.string().optional().describe("Description"),
379
+ image: Image.optional(),
380
+ annotationScheme: z.array(z.url()).optional().describe("URIs identifying related PA sets"),
381
+ annotation: ProfileAnnotationPolicy
382
+ });
383
+
384
+ const ProfileAnnotation = z.looseObject({
385
+ "@context": OpContextHead,
386
+ type: z.tuple([
387
+ z.literal("VerifiableCredential"),
388
+ z.literal("ProfileAnnotation")
389
+ ]),
390
+ issuer: OpId,
391
+ validFrom: DateTimeStamp.optional().describe(
392
+ "Validity period start and time"
393
+ ),
394
+ validUntil: DateTimeStamp.optional().describe("Validity period end and time"),
395
+ credentialSubject: ProfileAnnotationProperties
396
+ });
397
+
398
+ const AdvertisingQualityPAProperties = ProfileAnnotationProperties.extend({
399
+ type: z.literal("AdvertisingQualityCertificate"),
400
+ verifier: z.string().optional().describe("Verifier name")
401
+ });
402
+ const AdvertisingQualityPA = ProfileAnnotation.extend({
403
+ "@context": OpCipContext,
404
+ credentialSubject: AdvertisingQualityPAProperties
405
+ });
406
+
407
+ const JapaneseExistencePAProperties = ProfileAnnotationProperties.extend(
408
+ {
409
+ type: z.literal("JP-OrganizationExistenceCertificate"),
410
+ corporateName: z.string().describe("Corporate name"),
411
+ corporateNumber: z.string().describe("Corporate number"),
412
+ postalCode: z.string().describe("Postal code"),
413
+ addressCountry: z.string().describe("Country"),
414
+ addressRegion: z.string().describe("Prefecture / State"),
415
+ addressLocality: z.string().describe("City / Municipality"),
416
+ streetAddress: z.string().describe("Street address")
417
+ }
418
+ );
419
+ const JapaneseExistencePA = ProfileAnnotation.extend({
420
+ "@context": OpCipContext,
421
+ credentialSubject: JapaneseExistencePAProperties
422
+ });
423
+
424
+ const ProfileAnnotationIssuerRegistrationProperties = ProfileAnnotationProperties.extend({
425
+ type: z.literal("ProfileAnnotationIssuerRegistration"),
426
+ annotationIssuerName: z.string().describe("Name of the Profile Annotation Issuer"),
427
+ annotationScheme: z.array(z.url()).describe(
428
+ "URIs identifying Profile Annotations the issuer is authorized to issue"
429
+ )
430
+ });
431
+ const ProfileAnnotationIssuerRegistration = ProfileAnnotation.extend({
432
+ "@context": OpCipContext,
433
+ credentialSubject: ProfileAnnotationIssuerRegistrationProperties
434
+ });
435
+
364
436
  const SiteProfile = z.looseObject({
365
437
  originators: z.array(OriginatorProfile).min(1),
366
438
  sites: z.array(z.string().describe("Website Profile")).optional().describe("An array of Website Profile"),
@@ -408,6 +480,37 @@ const UnsignedWebsiteProfile = z.looseObject({
408
480
  ])
409
481
  });
410
482
 
483
+ const UnsignedWebsiteProfileSet = z.array(UnsignedWebsiteProfile).min(1, "At least one UnsignedWebsiteProfile is required.").superRefine((value, ctx) => {
484
+ const [head] = value;
485
+ const languages = /* @__PURE__ */ new Set();
486
+ for (const [index, uwsp] of value.entries()) {
487
+ if (uwsp.issuer !== head.issuer) {
488
+ ctx.addIssue({
489
+ code: "custom",
490
+ message: `UnsignedWebsiteProfile entries must share the same issuer (entries[${index}] differs from entries[0]).`,
491
+ path: [index, "issuer"]
492
+ });
493
+ }
494
+ if (uwsp.credentialSubject.id !== head.credentialSubject.id) {
495
+ ctx.addIssue({
496
+ code: "custom",
497
+ message: `UnsignedWebsiteProfile entries must share the same credentialSubject.id (entries[${index}] differs from entries[0]).`,
498
+ path: [index, "credentialSubject", "id"]
499
+ });
500
+ }
501
+ const tail = uwsp["@context"].at(-1);
502
+ const language = tail["@language"];
503
+ if (languages.has(language)) {
504
+ ctx.addIssue({
505
+ code: "custom",
506
+ message: `Duplicate @language "${language}" at entries[${index}].`,
507
+ path: [index, "@context", uwsp["@context"].length - 1, "@language"]
508
+ });
509
+ }
510
+ languages.add(language);
511
+ }
512
+ });
513
+
411
514
  const subject = z.looseObject({
412
515
  id: OpId.describe("OP ID of the WMP holding organization"),
413
516
  type: z.literal("OnlineBusiness"),
@@ -444,4 +547,4 @@ const WebMediaProfile = z.looseObject({
444
547
  credentialSubject: subject
445
548
  });
446
549
 
447
- export { AdvertisementCA, AdvertorialCA, AllowedOrigin, AllowedUrl, ArticleCA, BasicTarget, Certificate, CertificationSystem, ContentAttestation, ContentAttestationSet, ContentAttestationSetItem, CoreProfile, DateTimeStamp, Description, ExternalResourceTarget, Image, JapaneseExistenceCertificate, JapaneseExistenceCertificateProperties, Jwk, Jwks, OpId, OpMeta, OpVc, OriginatorProfile, OriginatorProfileSet, Page, RawImage, RawTarget, SiteProfile, SubresourceIntegrity, Target, UnsignedContentAttestation, UnsignedWebsiteProfile, WebMediaProfile, WebsiteProfile, subject$5 as subject };
550
+ export { AdvertisementCA, AdvertisingQualityPA, AdvertisingQualityPAProperties, AdvertorialCA, AllowedOrigin, AllowedUrl, ArticleCA, BasicTarget, Certificate, CertificationSystem, ContentAttestation, ContentAttestationSet, ContentAttestationSetItem, CoreProfile, DateTimeStamp, Description, ExternalResourceTarget, Image, JapaneseExistenceCertificate, JapaneseExistenceCertificateProperties, JapaneseExistencePA, JapaneseExistencePAProperties, Jwk, Jwks, OpId, OpMeta, OpVc, OriginatorProfile, OriginatorProfileSet, Page, ProfileAnnotation, ProfileAnnotationIssuerRegistration, ProfileAnnotationIssuerRegistrationProperties, ProfileAnnotationPolicy, ProfileAnnotationProperties, RawImage, RawTarget, SiteProfile, SubresourceIntegrity, Target, UnsignedContentAttestation, UnsignedWebsiteProfile, UnsignedWebsiteProfileSet, WebMediaProfile, WebsiteProfile, subject$5 as subject };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@originator-profile/model",
3
- "version": "0.5.3",
3
+ "version": "0.6.0-beta.1",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://docs.originator-profile.org",
6
6
  "repository": {
@@ -13,14 +13,8 @@
13
13
  },
14
14
  "type": "module",
15
15
  "exports": {
16
- "require": {
17
- "types": "./dist/index.d.cts",
18
- "default": "./dist/index.cjs"
19
- },
20
- "import": {
21
- "types": "./dist/index.d.mts",
22
- "default": "./dist/index.mjs"
23
- }
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.js"
24
18
  },
25
19
  "files": [
26
20
  "dist",
@@ -33,15 +27,15 @@
33
27
  "zod": "^4.3.6"
34
28
  },
35
29
  "devDependencies": {
36
- "eslint": "^10.1.0",
37
- "pkgroll": "^2.27.0",
38
- "typescript": "^6.0.2",
39
- "vitest": "^4.1.2",
40
- "@originator-profile/tsconfig": "0.5.3",
41
- "eslint-config-originator-profile": "0.5.3"
30
+ "eslint": "10.2.0",
31
+ "pkgroll": "2.27.0",
32
+ "typescript": "6.0.2",
33
+ "vitest": "4.1.4",
34
+ "@originator-profile/tsconfig": "0.6.0-beta.1",
35
+ "eslint-config-originator-profile": "0.6.0-beta.1"
42
36
  },
43
37
  "scripts": {
44
- "build": "pkgroll --clean-dist --target=node20",
38
+ "build": "pkgroll --clean-dist",
45
39
  "test": "vitest run",
46
40
  "lint": "eslint --fix .",
47
41
  "type-check": "tsc --noEmit"