@cheqd/studio 3.3.0-develop.6 → 3.4.0-develop.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.
Files changed (52) hide show
  1. package/dist/app.d.ts.map +1 -1
  2. package/dist/app.js +4 -0
  3. package/dist/app.js.map +1 -1
  4. package/dist/controllers/api/accreditation.d.ts +94 -0
  5. package/dist/controllers/api/accreditation.d.ts.map +1 -0
  6. package/dist/controllers/api/accreditation.js +376 -0
  7. package/dist/controllers/api/accreditation.js.map +1 -0
  8. package/dist/controllers/validator/index.d.ts +1 -1
  9. package/dist/controllers/validator/index.d.ts.map +1 -1
  10. package/dist/controllers/validator/index.js +1 -1
  11. package/dist/controllers/validator/index.js.map +1 -1
  12. package/dist/helpers/helpers.d.ts +1 -0
  13. package/dist/helpers/helpers.d.ts.map +1 -1
  14. package/dist/helpers/helpers.js +3 -0
  15. package/dist/helpers/helpers.js.map +1 -1
  16. package/dist/middleware/auth/routes/api/accreditation-auth.d.ts +5 -0
  17. package/dist/middleware/auth/routes/api/accreditation-auth.d.ts.map +1 -0
  18. package/dist/middleware/auth/routes/api/accreditation-auth.js +15 -0
  19. package/dist/middleware/auth/routes/api/accreditation-auth.js.map +1 -0
  20. package/dist/middleware/authentication.d.ts.map +1 -1
  21. package/dist/middleware/authentication.js +2 -0
  22. package/dist/middleware/authentication.js.map +1 -1
  23. package/dist/services/api/accreditation.d.ts +11 -0
  24. package/dist/services/api/accreditation.d.ts.map +1 -0
  25. package/dist/services/api/accreditation.js +116 -0
  26. package/dist/services/api/accreditation.js.map +1 -0
  27. package/dist/services/api/credentials.d.ts +1 -1
  28. package/dist/services/api/credentials.d.ts.map +1 -1
  29. package/dist/services/api/credentials.js +10 -2
  30. package/dist/services/api/credentials.js.map +1 -1
  31. package/dist/services/connectors/resource.d.ts +22 -0
  32. package/dist/services/connectors/resource.d.ts.map +1 -0
  33. package/dist/services/connectors/resource.js +38 -0
  34. package/dist/services/connectors/resource.js.map +1 -0
  35. package/dist/services/w3c-credential.d.ts +1 -0
  36. package/dist/services/w3c-credential.d.ts.map +1 -1
  37. package/dist/services/w3c-credential.js +2 -0
  38. package/dist/services/w3c-credential.js.map +1 -1
  39. package/dist/static/swagger-api.json +403 -0
  40. package/dist/types/accreditation.d.ts +66 -0
  41. package/dist/types/accreditation.d.ts.map +1 -0
  42. package/dist/types/accreditation.js +23 -0
  43. package/dist/types/accreditation.js.map +1 -0
  44. package/dist/types/credential.d.ts +6 -0
  45. package/dist/types/credential.d.ts.map +1 -1
  46. package/dist/types/credential.js +5 -1
  47. package/dist/types/credential.js.map +1 -1
  48. package/dist/types/swagger-api-types.d.ts +200 -0
  49. package/dist/types/swagger-api-types.d.ts.map +1 -1
  50. package/dist/types/swagger-api-types.js +200 -0
  51. package/dist/types/swagger-api-types.js.map +1 -1
  52. package/package.json +23 -23
@@ -224,6 +224,13 @@
224
224
  }
225
225
  }
226
226
  },
227
+ "connector": {
228
+ "type": "string",
229
+ "enum": [
230
+ "verida",
231
+ "resource"
232
+ ]
233
+ },
227
234
  "required": [
228
235
  "issuerDid",
229
236
  "subjectDid",
@@ -505,6 +512,265 @@
505
512
  }
506
513
  }
507
514
  },
515
+ "AccreditationIssueRequest": {
516
+ "description": "Input fields for the creating a Verifiable Accreditation.",
517
+ "type": "object",
518
+ "additionalProperties": false,
519
+ "properties": {
520
+ "issuerDid": {
521
+ "description": "DID of the Verifiable Accreditation issuer. This needs to be a `did:cheqd` DID.",
522
+ "type": "string",
523
+ "example": "did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0"
524
+ },
525
+ "subjectDid": {
526
+ "description": "DID of the Verifiable Accreditation holder/subject. This needs to be a `did:cheqd` DID.",
527
+ "type": "string",
528
+ "example": "did:cheqd:testnet:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK"
529
+ },
530
+ "schemas": {
531
+ "description": "The list of schemas the subject DID is accredited for.",
532
+ "type": "array",
533
+ "items": {
534
+ "$ref": "#/components/schemas/SchemaUrl"
535
+ }
536
+ },
537
+ "attributes": {
538
+ "description": "JSON object containing the attributes to be included in the Accreditation.",
539
+ "type": "object"
540
+ },
541
+ "@context": {
542
+ "description": "Optional properties to be included in the `@context` property of the Accreditation.",
543
+ "type": "array",
544
+ "items": {
545
+ "type": "string"
546
+ },
547
+ "example": [
548
+ "https://schema.org/schema.jsonld",
549
+ "https://veramo.io/contexts/profile/v1"
550
+ ]
551
+ },
552
+ "parentAccreditation": {
553
+ "description": "DID Url of the parent Verifiable Accreditation.",
554
+ "type": "string"
555
+ },
556
+ "rootAuthorization": {
557
+ "description": "DID Url of the root Verifiable Accreditation.",
558
+ "type": "string"
559
+ },
560
+ "type": {
561
+ "description": "Optional properties to be included in the `type` property of the Accreditation.",
562
+ "type": "array",
563
+ "items": {
564
+ "type": "string"
565
+ },
566
+ "example": [
567
+ "Person"
568
+ ]
569
+ },
570
+ "expirationDate": {
571
+ "description": "Optional expiration date according to the <a href=https://www.w3.org/TR/vc-data-model/#expiration> VC Data Model specification</a>.",
572
+ "type": "string",
573
+ "format": "date-time",
574
+ "example": "2023-06-08T13:49:28.000Z"
575
+ },
576
+ "format": {
577
+ "description": "Format of the Verifiable Accreditation. Defaults to VC-JWT.",
578
+ "type": "string",
579
+ "enum": [
580
+ "jwt",
581
+ "jsonld"
582
+ ],
583
+ "example": "jwt"
584
+ },
585
+ "credentialStatus": {
586
+ "description": "Optional `credentialStatus` properties for VC revocation or suspension. Takes `statusListName` and `statusListPurpose` as inputs.",
587
+ "type": "object",
588
+ "required": [
589
+ "statusPurpose",
590
+ "statusListName"
591
+ ],
592
+ "properties": {
593
+ "statusPurpose": {
594
+ "type": "string",
595
+ "enum": [
596
+ "revocation",
597
+ "suspension"
598
+ ]
599
+ },
600
+ "statusListName": {
601
+ "type": "string"
602
+ },
603
+ "statusListIndex": {
604
+ "type": "number"
605
+ },
606
+ "statusListVersion": {
607
+ "type": "string",
608
+ "format": "date-time"
609
+ },
610
+ "statusListRangeStart": {
611
+ "type": "number"
612
+ },
613
+ "statusListRangeEnd": {
614
+ "type": "number"
615
+ },
616
+ "indexNotIn": {
617
+ "type": "number"
618
+ }
619
+ },
620
+ "example": {
621
+ "statusPurpose": "revocation",
622
+ "statusListName": "employee-credentials"
623
+ }
624
+ },
625
+ "termsOfUse": {
626
+ "description": "Terms of use can be utilized by an issuer or a holder to communicate the terms under which a verifiable credential was issued.",
627
+ "type": "array",
628
+ "items": {
629
+ "type": "object",
630
+ "example": {
631
+ "type": "IssuerPolicy",
632
+ "id": "http://example.com/policies/credential/4",
633
+ "profile": "http://example.com/profiles/credential",
634
+ "prohibition": [
635
+ {
636
+ "assigner": "https://example.edu/issuers/14",
637
+ "assignee": "AllVerifiers",
638
+ "target": "http://example.edu/credentials/3732",
639
+ "action": [
640
+ "Archival"
641
+ ]
642
+ }
643
+ ]
644
+ }
645
+ }
646
+ },
647
+ "refreshService": {
648
+ "description": "RefreshService property MUST be one or more refresh services that provides enough information to the recipient's software such that the recipient can refresh the verifiable credential.",
649
+ "type": "array",
650
+ "items": {
651
+ "type": "object",
652
+ "example": {
653
+ "type": "ManualRefreshService2018",
654
+ "id": "https://example.edu/refresh/3732"
655
+ }
656
+ }
657
+ },
658
+ "evidence": {
659
+ "description": "Evidence property MUST be one or more evidence schemes providing enough information for a verifier to determine whether the evidence gathered by the issuer meets its confidence requirements for relying on the credential.",
660
+ "type": "array",
661
+ "items": {
662
+ "type": "object",
663
+ "example": {
664
+ "type": [
665
+ "DocumentVerification"
666
+ ],
667
+ "id": "https://example.edu/evidence/f2aeec97-fc0d-42bf-8ca7-0548192d4231",
668
+ "verifier": "https://example.edu/issuers/14",
669
+ "evidenceDocument": "DriversLicense",
670
+ "subjectPresence": "Physical",
671
+ "documentPresence": "Physical",
672
+ "licenseNumber": "123AB4567"
673
+ }
674
+ }
675
+ }
676
+ },
677
+ "connector": {
678
+ "type": "string",
679
+ "enum": [
680
+ "verida",
681
+ "resource"
682
+ ]
683
+ },
684
+ "required": [
685
+ "issuerDid",
686
+ "subjectDid",
687
+ "schemas"
688
+ ],
689
+ "example": {
690
+ "issuerDid": "did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0",
691
+ "subjectDid": "did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK",
692
+ "schemas": [
693
+ {
694
+ "type": "MuseumPassCredential",
695
+ "url": "https://resolver.cheqd.net/1.0/identifiers/did:cheqd:testnet:0a5b94d0-a417-48ed-a6f5-4abc9e95888d?resourceName=MuseumPassCredentialSchema&resourceType=JsonSchemaValidator2018"
696
+ }
697
+ ],
698
+ "@context": [
699
+ "https://schema.org"
700
+ ],
701
+ "type": [
702
+ "Person"
703
+ ],
704
+ "format": "jwt",
705
+ "credentialStatus": {
706
+ "statusPurpose": "revocation",
707
+ "statusListName": "employee-credentials",
708
+ "statusListIndex": 10
709
+ }
710
+ }
711
+ },
712
+ "AccreditationVerifyRequest": {
713
+ "type": "object",
714
+ "properties": {
715
+ "subjectDid": {
716
+ "description": "DID of the Verifiable Accreditation holder/subject. This needs to be a `did:key` DID.",
717
+ "type": "string",
718
+ "example": "did:cheqd:testnet:5efa5126-c070-420f-a9c2-d22ae6eefb92"
719
+ },
720
+ "didUrl": {
721
+ "description": "Verifiable Accreditation to be verified as a VC-JWT string or a JSON object.",
722
+ "type": "string",
723
+ "example": "did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e?resourceName=cheqd-issuer-logo&resourceType=CredentialArtwork"
724
+ },
725
+ "did": {
726
+ "type": "string",
727
+ "example": "did:cheqd:testnet:7c2b990c-3d05-4ebf-91af-f4f4d0091d2e"
728
+ },
729
+ "resourceId": {
730
+ "type": "string",
731
+ "example": "398cee0a-efac-4643-9f4c-74c48c72a14b"
732
+ },
733
+ "resourceName": {
734
+ "type": "string",
735
+ "example": "cheqd-issuer-logo"
736
+ },
737
+ "resourceType": {
738
+ "type": "string",
739
+ "example": "CredentialArtwork"
740
+ },
741
+ "schemas": {
742
+ "description": "The list of schemas the subject DID is accredited for.",
743
+ "type": "array",
744
+ "items": {
745
+ "$ref": "#/components/schemas/SchemaUrl"
746
+ }
747
+ },
748
+ "policies": {
749
+ "description": "Custom verification policies to execute when verifying Accreditation.",
750
+ "type": "object",
751
+ "properties": {
752
+ "issuanceDate": {
753
+ "description": "Policy to skip the `issuanceDate` (`nbf`) timestamp check when set to `false`.",
754
+ "type": "boolean",
755
+ "default": true
756
+ },
757
+ "expirationDate": {
758
+ "description": "Policy to skip the `expirationDate` (`exp`) timestamp check when set to `false`.",
759
+ "type": "boolean",
760
+ "default": true
761
+ },
762
+ "audience": {
763
+ "description": "Policy to skip the audience check when set to `false`.",
764
+ "type": "boolean",
765
+ "default": false
766
+ }
767
+ }
768
+ }
769
+ },
770
+ "required": [
771
+ "subjectDid"
772
+ ]
773
+ },
508
774
  "PresentationCreateRequest": {
509
775
  "type": "object",
510
776
  "required": [
@@ -2042,6 +2308,17 @@
2042
2308
  }
2043
2309
  }
2044
2310
  },
2311
+ "SchemaUrl": {
2312
+ "type": "object",
2313
+ "properties": {
2314
+ "type": {
2315
+ "type": "string"
2316
+ },
2317
+ "url": {
2318
+ "type": "string"
2319
+ }
2320
+ }
2321
+ },
2045
2322
  "InvalidRequest": {
2046
2323
  "description": "A problem with the input fields has occurred. Additional state information plus metadata may be available in the response body.",
2047
2324
  "type": "object",
@@ -2185,6 +2462,132 @@
2185
2462
  }
2186
2463
  }
2187
2464
  },
2465
+ "/trust-registry/accreditation/issue": {
2466
+ "post": {
2467
+ "tags": [
2468
+ "Trust Registry"
2469
+ ],
2470
+ "summary": "Publish a verifiable accreditation for a DID.",
2471
+ "description": "Generate and publish a Verifiable Accreditation for a subject DID as a DID Linked resource.",
2472
+ "operationId": "accredit-issue",
2473
+ "parameters": [
2474
+ {
2475
+ "in": "query",
2476
+ "name": "accreditationType",
2477
+ "description": "Select the type of accreditation to be issued.",
2478
+ "schema": {
2479
+ "type": "string",
2480
+ "enum": [
2481
+ "authorize",
2482
+ "accredit",
2483
+ "attest"
2484
+ ]
2485
+ },
2486
+ "required": true
2487
+ }
2488
+ ],
2489
+ "requestBody": {
2490
+ "content": {
2491
+ "application/x-www-form-urlencoded": {
2492
+ "schema": {
2493
+ "$ref": "#/components/schemas/AccreditationIssueRequest"
2494
+ }
2495
+ },
2496
+ "application/json": {
2497
+ "schema": {
2498
+ "$ref": "#/components/schemas/AccreditationIssueRequest"
2499
+ }
2500
+ }
2501
+ }
2502
+ },
2503
+ "responses": {
2504
+ "200": {
2505
+ "description": "The request was successful.",
2506
+ "content": {
2507
+ "application/json": {
2508
+ "schema": {
2509
+ "$ref": "#/components/schemas/Credential"
2510
+ }
2511
+ }
2512
+ }
2513
+ },
2514
+ "400": {
2515
+ "$ref": "#/components/schemas/InvalidRequest"
2516
+ },
2517
+ "401": {
2518
+ "$ref": "#/components/schemas/UnauthorizedError"
2519
+ },
2520
+ "500": {
2521
+ "$ref": "#/components/schemas/InternalError"
2522
+ }
2523
+ }
2524
+ }
2525
+ },
2526
+ "/trust-registry/accreditation/verify": {
2527
+ "post": {
2528
+ "tags": [
2529
+ "Trust Registry"
2530
+ ],
2531
+ "summary": "Verify a verifiable accreditation for a DID.",
2532
+ "description": "Generate and publish a Verifiable Accreditation for a subject DID as a DID Linked resource.",
2533
+ "operationId": "accredit-verify",
2534
+ "parameters": [
2535
+ {
2536
+ "in": "query",
2537
+ "name": "verifyStatus",
2538
+ "description": "If set to `true` the verification will also check the status of the accreditation. Requires the VC to have a `credentialStatus` property.",
2539
+ "schema": {
2540
+ "type": "boolean",
2541
+ "default": false
2542
+ }
2543
+ },
2544
+ {
2545
+ "in": "query",
2546
+ "name": "allowDeactivatedDid",
2547
+ "description": "If set to `true` allow to verify accreditation which based on deactivated DID.",
2548
+ "schema": {
2549
+ "type": "boolean",
2550
+ "default": false
2551
+ }
2552
+ }
2553
+ ],
2554
+ "requestBody": {
2555
+ "content": {
2556
+ "application/x-www-form-urlencoded": {
2557
+ "schema": {
2558
+ "$ref": "#/components/schemas/AccreditationVerifyRequest"
2559
+ }
2560
+ },
2561
+ "application/json": {
2562
+ "schema": {
2563
+ "$ref": "#/components/schemas/AccreditationVerifyRequest"
2564
+ }
2565
+ }
2566
+ }
2567
+ },
2568
+ "responses": {
2569
+ "200": {
2570
+ "description": "The request was successful.",
2571
+ "content": {
2572
+ "application/json": {
2573
+ "schema": {
2574
+ "$ref": "#/components/schemas/Credential"
2575
+ }
2576
+ }
2577
+ }
2578
+ },
2579
+ "400": {
2580
+ "$ref": "#/components/schemas/InvalidRequest"
2581
+ },
2582
+ "401": {
2583
+ "$ref": "#/components/schemas/UnauthorizedError"
2584
+ },
2585
+ "500": {
2586
+ "$ref": "#/components/schemas/InternalError"
2587
+ }
2588
+ }
2589
+ }
2590
+ },
2188
2591
  "/credential-status/create/unencrypted": {
2189
2592
  "post": {
2190
2593
  "tags": [
@@ -0,0 +1,66 @@
1
+ import { VerifiableCredential } from '@veramo/core';
2
+ import type { CredentialRequest, VerifyCredentialRequestBody } from './credential';
3
+ export declare enum DIDAccreditationTypes {
4
+ VerifiableAuthorisationForTrustChain = "VerifiableAuthorisationForTrustChain",
5
+ VerifiableAccreditationToAccredit = "VerifiableAccreditationToAccredit",
6
+ VerifiableAccreditationToAttest = "VerifiableAccreditationToAttest"
7
+ }
8
+ export declare enum AccreditationRequestType {
9
+ authorize = "authorize",
10
+ accredit = "accredit",
11
+ attest = "attest"
12
+ }
13
+ export type AccreditationSchemaType = {
14
+ type: string;
15
+ schemaId: string;
16
+ };
17
+ export type SchemaUrlType = {
18
+ type: string;
19
+ url: string;
20
+ };
21
+ export type DIDAccreditationRequestBody = Omit<CredentialRequest, 'attributes' | 'credentialSummary' | 'credentialSchema' | 'credentialName'> & {
22
+ schemas: SchemaUrlType[];
23
+ accreditationName: string;
24
+ attributes?: Record<string, unknown>;
25
+ type: string[] | undefined;
26
+ rootAuthorization?: string;
27
+ parentAccreditation?: string;
28
+ trustFramework?: string;
29
+ trustFrameworkId?: string;
30
+ };
31
+ export type DIDAccreditationRequestParams = {
32
+ accreditationType: 'authorize' | 'accredit' | 'attest';
33
+ };
34
+ export interface VerifyAccreditationRequestBody extends Pick<VerifyCredentialRequestBody, 'policies'> {
35
+ didUrl?: string;
36
+ did?: string;
37
+ resourceId?: string;
38
+ resourceName?: string;
39
+ resourceType?: string;
40
+ subjectDid: string;
41
+ schemas?: SchemaUrlType[];
42
+ }
43
+ type DidUrl = Pick<VerifyAccreditationRequestBody, 'policies' | 'subjectDid' | 'schemas'> & {
44
+ didUrl: string;
45
+ };
46
+ type DidAndResourceId = Pick<VerifyAccreditationRequestBody, 'policies' | 'subjectDid' | 'schemas'> & {
47
+ did: string;
48
+ resourceId: string;
49
+ };
50
+ type DidResourceNameAndType = Pick<VerifyAccreditationRequestBody, 'policies' | 'subjectDid' | 'schemas'> & {
51
+ did: string;
52
+ resourceName: string;
53
+ resourceType: string;
54
+ };
55
+ export type VerifyAccreditationRequest = DidUrl | DidAndResourceId | DidResourceNameAndType;
56
+ export declare function isDidUrl(body: VerifyAccreditationRequestBody): body is DidUrl;
57
+ export declare function isDidAndResourceId(body: VerifyAccreditationRequestBody): body is DidAndResourceId;
58
+ export declare function isDidAndResourceName(body: VerifyAccreditationRequestBody): body is DidResourceNameAndType;
59
+ export interface VerfifiableAccreditation extends VerifiableCredential {
60
+ credentialSubject: {
61
+ id: string;
62
+ accreditedFor: AccreditationSchemaType[];
63
+ };
64
+ }
65
+ export {};
66
+ //# sourceMappingURL=accreditation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accreditation.d.ts","sourceRoot":"","sources":["../../src/types/accreditation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAGnF,oBAAY,qBAAqB;IAChC,oCAAoC,yCAAyC;IAC7E,i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;CAC1B;AAED,KAAK,MAAM,GAAG,IAAI,CAAC,8BAA8B,EAAE,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC,GAAG;IAC3F,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AACF,KAAK,gBAAgB,GAAG,IAAI,CAAC,8BAA8B,EAAE,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC,GAAG;IACrG,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;CACnB,CAAC;AACF,KAAK,sBAAsB,GAAG,IAAI,CAAC,8BAA8B,EAAE,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC,GAAG;IAC3G,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,gBAAgB,GAAG,sBAAsB,CAAC;AAE5F,wBAAgB,QAAQ,CAAC,IAAI,EAAE,8BAA8B,GAAG,IAAI,IAAI,MAAM,CAE7E;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,8BAA8B,GAAG,IAAI,IAAI,gBAAgB,CAEjG;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,8BAA8B,GAAG,IAAI,IAAI,sBAAsB,CAIzG;AAED,MAAM,WAAW,wBAAyB,SAAQ,oBAAoB;IACrE,iBAAiB,EAAE;QAClB,EAAE,EAAE,MAAM,CAAC;QACX,aAAa,EAAE,uBAAuB,EAAE,CAAC;KACzC,CAAC;CACF"}
@@ -0,0 +1,23 @@
1
+ // Enums
2
+ export var DIDAccreditationTypes;
3
+ (function (DIDAccreditationTypes) {
4
+ DIDAccreditationTypes["VerifiableAuthorisationForTrustChain"] = "VerifiableAuthorisationForTrustChain";
5
+ DIDAccreditationTypes["VerifiableAccreditationToAccredit"] = "VerifiableAccreditationToAccredit";
6
+ DIDAccreditationTypes["VerifiableAccreditationToAttest"] = "VerifiableAccreditationToAttest";
7
+ })(DIDAccreditationTypes || (DIDAccreditationTypes = {}));
8
+ export var AccreditationRequestType;
9
+ (function (AccreditationRequestType) {
10
+ AccreditationRequestType["authorize"] = "authorize";
11
+ AccreditationRequestType["accredit"] = "accredit";
12
+ AccreditationRequestType["attest"] = "attest";
13
+ })(AccreditationRequestType || (AccreditationRequestType = {}));
14
+ export function isDidUrl(body) {
15
+ return typeof body.didUrl === 'string';
16
+ }
17
+ export function isDidAndResourceId(body) {
18
+ return typeof body.did === 'string' && typeof body.resourceId === 'string';
19
+ }
20
+ export function isDidAndResourceName(body) {
21
+ return (typeof body.did === 'string' && typeof body.resourceName === 'string' && typeof body.resourceType === 'string');
22
+ }
23
+ //# sourceMappingURL=accreditation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accreditation.js","sourceRoot":"","sources":["../../src/types/accreditation.ts"],"names":[],"mappings":"AAGA,QAAQ;AACR,MAAM,CAAN,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAChC,sGAA6E,CAAA;IAC7E,gGAAuE,CAAA;IACvE,4FAAmE,CAAA;AACpE,CAAC,EAJW,qBAAqB,KAArB,qBAAqB,QAIhC;AAED,MAAM,CAAN,IAAY,wBAIX;AAJD,WAAY,wBAAwB;IACnC,mDAAuB,CAAA;IACvB,iDAAqB,CAAA;IACrB,6CAAiB,CAAA;AAClB,CAAC,EAJW,wBAAwB,KAAxB,wBAAwB,QAInC;AAuDD,MAAM,UAAU,QAAQ,CAAC,IAAoC;IAC5D,OAAO,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAoC;IACtE,OAAO,OAAO,IAAI,CAAC,GAAG,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,UAAU,KAAK,QAAQ,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAoC;IACxE,OAAO,CACN,OAAO,IAAI,CAAC,GAAG,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,YAAY,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,YAAY,KAAK,QAAQ,CAC9G,CAAC;AACH,CAAC"}
@@ -3,6 +3,10 @@ import type { StatusOptions } from './credential-status.js';
3
3
  import type { UnsuccessfulResponseBody } from './shared.js';
4
4
  import type { BulkRevocationResult, BulkSuspensionResult, BulkUnsuspensionResult, RevocationResult, SuspensionResult, UnsuspensionResult } from '@cheqd/did-provider-cheqd';
5
5
  import type { VerificationOptions } from './shared.js';
6
+ export declare enum CredentialConnectors {
7
+ Verida = 0,
8
+ Resource = 1
9
+ }
6
10
  export interface CredentialRequest {
7
11
  subjectDid: string;
8
12
  attributes: Record<string, unknown>;
@@ -18,6 +22,8 @@ export interface CredentialRequest {
18
22
  termsOfUse?: AdditionalData | AdditionalData[];
19
23
  refreshService?: AdditionalData | AdditionalData[];
20
24
  evidence?: AdditionalData | AdditionalData[];
25
+ connector?: CredentialConnectors;
26
+ credentialId?: string;
21
27
  [x: string]: any;
22
28
  }
23
29
  export type AdditionalData = {
@@ -1 +1 @@
1
- {"version":3,"file":"credential.d.ts","sourceRoot":"","sources":["../../src/types/credential.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACvH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,KAAK,EACX,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,WAAW,iBAAiB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC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,GAAG,oBAAoB,CAAC;AAEpF,MAAM,MAAM,+BAA+B,GAAG,kBAAkB,GAAG,sBAAsB,CAAC;AAI1F,MAAM,MAAM,sCAAsC,GAAG,wBAAwB,CAAC;AAE9E,MAAM,MAAM,sCAAsC,GAAG,wBAAwB,CAAC;AAE9E,MAAM,MAAM,0CAA0C,GAAG,wBAAwB,CAAC;AAElF,MAAM,MAAM,uCAAuC,GAAG,wBAAwB,GAAG,4BAA4B,CAAC;AAE9G,MAAM,MAAM,uCAAuC,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,GAAG,wBAAwB,CAAC;AAEnH,MAAM,MAAM,wCAAwC,GAAG,IAAI,CAAC,gBAAgB,EAAE,WAAW,CAAC,GAAG,wBAAwB,CAAC;AAEtH,MAAM,MAAM,0CAA0C,GACnD,IAAI,CAAC,kBAAkB,EAAE,aAAa,CAAC,GACvC,wBAAwB,CAAC"}
@@ -1,2 +1,6 @@
1
- export {};
1
+ export var CredentialConnectors;
2
+ (function (CredentialConnectors) {
3
+ CredentialConnectors[CredentialConnectors["Verida"] = 0] = "Verida";
4
+ CredentialConnectors[CredentialConnectors["Resource"] = 1] = "Resource";
5
+ })(CredentialConnectors || (CredentialConnectors = {}));
2
6
  //# sourceMappingURL=credential.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"credential.js","sourceRoot":"","sources":["../../src/types/credential.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"credential.js","sourceRoot":"","sources":["../../src/types/credential.ts"],"names":[],"mappings":"AAaA,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC/B,mEAAM,CAAA;IACN,uEAAQ,CAAA;AACT,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B"}